Brak opisu

onsenui.js 2.8MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903
  1. /* onsenui v2.10.8 - 2019-04-01 */
  2. (function (global, factory) {
  3. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  4. typeof define === 'function' && define.amd ? define(factory) :
  5. (global.ons = factory());
  6. }(this, (function () { 'use strict';
  7. var onsElements = {};
  8. /*
  9. Copyright 2013-2015 ASIAL CORPORATION
  10. Licensed under the Apache License, Version 2.0 (the "License");
  11. you may not use this file except in compliance with the License.
  12. You may obtain a copy of the License at
  13. http://www.apache.org/licenses/LICENSE-2.0
  14. Unless required by applicable law or agreed to in writing, software
  15. distributed under the License is distributed on an "AS IS" BASIS,
  16. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. See the License for the specific language governing permissions and
  18. limitations under the License.
  19. */
  20. /**
  21. * Add vendor prefix.
  22. *
  23. * @param {String} name
  24. * @return {String}
  25. */
  26. var prefix = function () {
  27. var styles = window.getComputedStyle(document.documentElement, '');
  28. var prefix = (Array.prototype.slice.call(styles).join('').match(/-(moz|webkit|ms)-/) || styles.OLink === '' && ['', 'o'])[1];
  29. return function (name) {
  30. return '-' + prefix + '-' + util$1.hyphenate(name);
  31. };
  32. }();
  33. /**
  34. * Minimal utility library for manipulating element's style.
  35. * Set element's style.
  36. *
  37. * @param {Element} element
  38. * @param {Object} styles
  39. * @return {Element}
  40. */
  41. var styler = function styler(element, style) {
  42. Object.keys(style).forEach(function (key) {
  43. if (key in element.style) {
  44. element.style[key] = style[key];
  45. } else if (prefix(key) in element.style) {
  46. element.style[prefix(key)] = style[key];
  47. } else {
  48. util$1.warn('No such style property: ' + key);
  49. }
  50. });
  51. return element;
  52. };
  53. /**
  54. * @param {Element} element
  55. * @param {String} styles Space-separated CSS properties to remove
  56. */
  57. styler.clear = function (element) {
  58. var styles = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  59. var clearlist = styles.split(/\s+/).reduce(function (r, s) {
  60. return r.concat([util$1.hyphenate(s), prefix(s)]);
  61. }, []),
  62. keys = [];
  63. var _loop = function _loop(i) {
  64. var key = element.style[i];
  65. if (clearlist.length === 0 || clearlist.some(function (s) {
  66. return key.indexOf(s) === 0;
  67. })) {
  68. keys.push(key); // Store the key to fix Safari style indexes
  69. }
  70. };
  71. for (var i = element.style.length - 1; i >= 0; i--) {
  72. _loop(i);
  73. }
  74. keys.forEach(function (key) {
  75. return element.style[key] = '';
  76. });
  77. element.getAttribute('style') === '' && element.removeAttribute('style');
  78. };
  79. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
  80. return typeof obj;
  81. } : function (obj) {
  82. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  83. };
  84. var classCallCheck = function (instance, Constructor) {
  85. if (!(instance instanceof Constructor)) {
  86. throw new TypeError("Cannot call a class as a function");
  87. }
  88. };
  89. var createClass = function () {
  90. function defineProperties(target, props) {
  91. for (var i = 0; i < props.length; i++) {
  92. var descriptor = props[i];
  93. descriptor.enumerable = descriptor.enumerable || false;
  94. descriptor.configurable = true;
  95. if ("value" in descriptor) descriptor.writable = true;
  96. Object.defineProperty(target, descriptor.key, descriptor);
  97. }
  98. }
  99. return function (Constructor, protoProps, staticProps) {
  100. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  101. if (staticProps) defineProperties(Constructor, staticProps);
  102. return Constructor;
  103. };
  104. }();
  105. var defineProperty = function (obj, key, value) {
  106. if (key in obj) {
  107. Object.defineProperty(obj, key, {
  108. value: value,
  109. enumerable: true,
  110. configurable: true,
  111. writable: true
  112. });
  113. } else {
  114. obj[key] = value;
  115. }
  116. return obj;
  117. };
  118. var _extends = Object.assign || function (target) {
  119. for (var i = 1; i < arguments.length; i++) {
  120. var source = arguments[i];
  121. for (var key in source) {
  122. if (Object.prototype.hasOwnProperty.call(source, key)) {
  123. target[key] = source[key];
  124. }
  125. }
  126. }
  127. return target;
  128. };
  129. var get = function get(object, property, receiver) {
  130. if (object === null) object = Function.prototype;
  131. var desc = Object.getOwnPropertyDescriptor(object, property);
  132. if (desc === undefined) {
  133. var parent = Object.getPrototypeOf(object);
  134. if (parent === null) {
  135. return undefined;
  136. } else {
  137. return get(parent, property, receiver);
  138. }
  139. } else if ("value" in desc) {
  140. return desc.value;
  141. } else {
  142. var getter = desc.get;
  143. if (getter === undefined) {
  144. return undefined;
  145. }
  146. return getter.call(receiver);
  147. }
  148. };
  149. var inherits = function (subClass, superClass) {
  150. if (typeof superClass !== "function" && superClass !== null) {
  151. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  152. }
  153. subClass.prototype = Object.create(superClass && superClass.prototype, {
  154. constructor: {
  155. value: subClass,
  156. enumerable: false,
  157. writable: true,
  158. configurable: true
  159. }
  160. });
  161. if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  162. };
  163. var objectWithoutProperties = function (obj, keys) {
  164. var target = {};
  165. for (var i in obj) {
  166. if (keys.indexOf(i) >= 0) continue;
  167. if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
  168. target[i] = obj[i];
  169. }
  170. return target;
  171. };
  172. var possibleConstructorReturn = function (self, call) {
  173. if (!self) {
  174. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  175. }
  176. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  177. };
  178. var toConsumableArray = function (arr) {
  179. if (Array.isArray(arr)) {
  180. for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
  181. return arr2;
  182. } else {
  183. return Array.from(arr);
  184. }
  185. };
  186. /*
  187. Copyright 2013-2015 ASIAL CORPORATION
  188. Licensed under the Apache License, Version 2.0 (the "License");
  189. you may not use this file except in compliance with the License.
  190. You may obtain a copy of the License at
  191. http://www.apache.org/licenses/LICENSE-2.0
  192. Unless required by applicable law or agreed to in writing, software
  193. distributed under the License is distributed on an "AS IS" BASIS,
  194. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  195. See the License for the specific language governing permissions and
  196. limitations under the License.
  197. */
  198. // Save HTMLElement object before Custom Elements polyfill patch global HTMLElement.
  199. var NativeHTMLElement = window.HTMLElement;
  200. /**
  201. * @object ons.platform
  202. * @category util
  203. * @description
  204. * [en]Utility methods to detect current platform.[/en]
  205. * [ja]現在実行されているプラットフォームを検知するためのユーティリティメソッドを収めたオブジェクトです。[/ja]
  206. */
  207. var Platform = function () {
  208. /**
  209. * All elements will be rendered as if the app was running on this platform.
  210. * @type {String}
  211. */
  212. function Platform() {
  213. classCallCheck(this, Platform);
  214. this._selectedPlatform = null;
  215. this._ignorePlatformSelect = false;
  216. }
  217. /**
  218. * @method select
  219. * @signature select(platform)
  220. * @param {string} platform Name of the platform.
  221. * [en]Possible values are: "opera", "firefox", "safari", "chrome", "ie", "android", "blackberry", "ios" or "wp".[/en]
  222. * [ja]"opera", "firefox", "safari", "chrome", "ie", "android", "blackberry", "ios", "wp"のいずれかを指定します。[/ja]
  223. * @description
  224. * [en]Sets the platform used to render the elements. Useful for testing.[/en]
  225. * [ja]要素を描画するために利用するプラットフォーム名を設定します。テストに便利です。[/ja]
  226. */
  227. createClass(Platform, [{
  228. key: 'select',
  229. value: function select(platform) {
  230. if (typeof platform === 'string') {
  231. this._selectedPlatform = platform.trim().toLowerCase();
  232. }
  233. }
  234. }, {
  235. key: '_getSelectedPlatform',
  236. value: function _getSelectedPlatform() {
  237. return this._ignorePlatformSelect ? null : this._selectedPlatform;
  238. }
  239. }, {
  240. key: '_runOnActualPlatform',
  241. value: function _runOnActualPlatform(fn) {
  242. this._ignorePlatformSelect = true;
  243. var result = fn();
  244. this._ignorePlatformSelect = false;
  245. return result;
  246. }
  247. //----------------
  248. // General
  249. //----------------
  250. /**
  251. * @method isWebView
  252. * @signature isWebView()
  253. * @description
  254. * [en]Returns whether app is running in Cordova.[/en]
  255. * [ja]Cordova内で実行されているかどうかを返します。[/ja]
  256. * @return {Boolean}
  257. */
  258. }, {
  259. key: 'isWebView',
  260. value: function isWebView() {
  261. if (document.readyState === 'loading' || document.readyState == 'uninitialized') {
  262. throw new Error('isWebView() method is available after dom contents loaded.');
  263. }
  264. return !!(window.cordova || window.phonegap || window.PhoneGap);
  265. }
  266. //----------------
  267. // iOS devices
  268. //----------------
  269. /**
  270. * @method isIPhone
  271. * @signature isIPhone()
  272. * @description
  273. * [en]Returns whether the device is iPhone.[/en]
  274. * [ja]iPhone上で実行されているかどうかを返します。[/ja]
  275. * @return {Boolean}
  276. */
  277. }, {
  278. key: 'isIPhone',
  279. value: function isIPhone() {
  280. return (/iPhone/i.test(navigator.userAgent)
  281. );
  282. }
  283. /**
  284. * @method isIPhoneX
  285. * @signature isIPhoneX()
  286. * @description
  287. * [en]Returns whether the device is iPhone X, XS, XS Max, or XR.[/en]
  288. * [ja]iPhone X や XS、XS Max、または XR 上で実行されているかどうかを返します。[/ja]
  289. * @return {Boolean}
  290. */
  291. }, {
  292. key: 'isIPhoneX',
  293. value: function isIPhoneX() {
  294. // iOS WebViews on the same iOS version have the same user agent.
  295. // We cannot avoid using window.screen.
  296. // We also cannot use cordova-plugin-device since its behavior is different between simulators and real devices.
  297. // This works well both in iOS Safari and (UI|WK)WebView of iPhone X.
  298. return this.isIPhone() && (window.screen.width === 375 && window.screen.height === 812 || // X, XS portrait
  299. window.screen.width === 812 && window.screen.height === 375 || // X, XS landscape
  300. window.screen.width === 414 && window.screen.height === 896 || // XS Max, XR portrait
  301. window.screen.width === 896 && window.screen.height === 414); // XS Max, XR landscape
  302. }
  303. /**
  304. * @method isIPad
  305. * @signature isIPad()
  306. * @description
  307. * [en]Returns whether the device is iPad.[/en]
  308. * [ja]iPad上で実行されているかどうかを返します。[/ja]
  309. * @return {Boolean}
  310. */
  311. }, {
  312. key: 'isIPad',
  313. value: function isIPad() {
  314. return (/iPad/i.test(navigator.userAgent)
  315. );
  316. }
  317. /**
  318. * @return {Boolean}
  319. */
  320. }, {
  321. key: 'isIPod',
  322. value: function isIPod() {
  323. return (/iPod/i.test(navigator.userAgent)
  324. );
  325. }
  326. //----------------
  327. // iOS versions
  328. //----------------
  329. /**
  330. * @method isIOS
  331. * @signature isIOS([forceActualPlatform])
  332. * @param {Boolean} forceActualPlatform
  333. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  334. * [ja][/ja]
  335. * @description
  336. * [en]Returns whether the OS is iOS. By default will return manually selected platform if it is set.[/en]
  337. * [ja]iOS上で実行されているかどうかを返します。[/ja]
  338. * @return {Boolean}
  339. */
  340. }, {
  341. key: 'isIOS',
  342. value: function isIOS(forceActualPlatform) {
  343. if (!forceActualPlatform && this._getSelectedPlatform()) {
  344. return this._getSelectedPlatform() === 'ios';
  345. }
  346. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object' && !/browser/i.test(device.platform)) {
  347. return (/iOS/i.test(device.platform)
  348. );
  349. } else {
  350. return (/iPhone|iPad|iPod/i.test(navigator.userAgent)
  351. );
  352. }
  353. }
  354. /**
  355. * @method isIOS7above
  356. * @signature isIOS7above()
  357. * @description
  358. * [en]Returns whether the iOS version is 7 or above.[/en]
  359. * [ja]iOS7以上で実行されているかどうかを返します。[/ja]
  360. * @return {Boolean}
  361. */
  362. }, {
  363. key: 'isIOS7above',
  364. value: function isIOS7above() {
  365. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object' && !/browser/i.test(device.platform)) {
  366. return (/iOS/i.test(device.platform) && parseInt(device.version.split('.')[0]) >= 7
  367. );
  368. } else if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
  369. var ver = (navigator.userAgent.match(/\b[0-9]+_[0-9]+(?:_[0-9]+)?\b/) || [''])[0].replace(/_/g, '.');
  370. return parseInt(ver.split('.')[0]) >= 7;
  371. }
  372. return false;
  373. }
  374. //----------------
  375. // iOS browsers
  376. //----------------
  377. /**
  378. * @method isIOSSafari
  379. * @signature isIOSSafari()
  380. * @description
  381. * [en]Returns whether app is running in iOS Safari.[/en]
  382. * [ja]iOS Safariで実行されているかどうかを返します。[/ja]
  383. * @return {Boolean}
  384. */
  385. }, {
  386. key: 'isIOSSafari',
  387. value: function isIOSSafari() {
  388. var navigator = window.navigator;
  389. var ua = navigator.userAgent;
  390. return !!(this.isIOS() && ua.indexOf('Safari') !== -1 && ua.indexOf('Version') !== -1 && !navigator.standalone);
  391. }
  392. /**
  393. * @method isWKWebView
  394. * @signature isWKWebView()
  395. * @description
  396. * [en]Returns whether app is running in WKWebView.[/en]
  397. * [ja]WKWebViewで実行されているかどうかを返します。[/ja]
  398. * @return {Boolean}
  399. */
  400. }, {
  401. key: 'isWKWebView',
  402. value: function isWKWebView() {
  403. var lte9 = /constructor/i.test(NativeHTMLElement);
  404. return !!(this.isIOS() && window.webkit && window.webkit.messageHandlers && window.indexedDB && !lte9);
  405. }
  406. /**
  407. * @method isUIWebView
  408. * @signature isUIWebView()
  409. * @description
  410. * [en]Returns whether app is running in UIWebView.[/en]
  411. * [ja]UIWebViewで実行されているかどうかを返します。[/ja]
  412. * @return {Boolean}
  413. */
  414. }, {
  415. key: 'isUIWebView',
  416. value: function isUIWebView() {
  417. return !!(this.isIOS() && !this.isIOSSafari() && !this.isWKWebView());
  418. }
  419. //----------------
  420. // Android devices
  421. //----------------
  422. /**
  423. * @method isAndroidPhone
  424. * @signature isAndroidPhone()
  425. * @description
  426. * [en]Returns whether the device is Android phone.[/en]
  427. * [ja]Android携帯上で実行されているかどうかを返します。[/ja]
  428. * @return {Boolean}
  429. */
  430. }, {
  431. key: 'isAndroidPhone',
  432. value: function isAndroidPhone() {
  433. return (/Android/i.test(navigator.userAgent) && /Mobile/i.test(navigator.userAgent)
  434. );
  435. }
  436. /**
  437. * @method isAndroidTablet
  438. * @signature isAndroidTablet()
  439. * @description
  440. * [en]Returns whether the device is Android tablet.[/en]
  441. * [ja]Androidタブレット上で実行されているかどうかを返します。[/ja]
  442. * @return {Boolean}
  443. */
  444. }, {
  445. key: 'isAndroidTablet',
  446. value: function isAndroidTablet() {
  447. return (/Android/i.test(navigator.userAgent) && !/Mobile/i.test(navigator.userAgent)
  448. );
  449. }
  450. //----------------
  451. // Android versions
  452. //----------------
  453. /**
  454. * @method isAndroid
  455. * @signature isAndroid([forceActualPlatform])
  456. * @param {Boolean} forceActualPlatform
  457. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  458. * [ja][/ja]
  459. * @description
  460. * [en]Returns whether the OS is Android. By default will return manually selected platform if it is set.[/en]
  461. * [ja]Android上で実行されているかどうかを返します。[/ja]
  462. * @return {Boolean}
  463. */
  464. }, {
  465. key: 'isAndroid',
  466. value: function isAndroid(forceActualPlatform) {
  467. if (!forceActualPlatform && this._getSelectedPlatform()) {
  468. return this._getSelectedPlatform() === 'android';
  469. }
  470. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object' && !/browser/i.test(device.platform)) {
  471. return (/Android/i.test(device.platform)
  472. );
  473. } else {
  474. return (/Android/i.test(navigator.userAgent)
  475. );
  476. }
  477. }
  478. //----------------
  479. // Other devices
  480. //----------------
  481. /**
  482. * @method isWP
  483. * @signature isWP([forceActualPlatform])
  484. * @param {Boolean} forceActualPlatform
  485. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  486. * [ja][/ja]
  487. * @description
  488. * [en]Returns whether the OS is Windows phone. By default will return manually selected platform if it is set.[/en]
  489. * [ja][/ja]
  490. * @return {Boolean}
  491. */
  492. }, {
  493. key: 'isWP',
  494. value: function isWP(forceActualPlatform) {
  495. if (!forceActualPlatform && this._getSelectedPlatform()) {
  496. return this._getSelectedPlatform() === 'wp';
  497. }
  498. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object' && !/browser/i.test(device.platform)) {
  499. return (/Win32NT|WinCE/i.test(device.platform)
  500. );
  501. } else {
  502. return (/Windows Phone|IEMobile|WPDesktop/i.test(navigator.userAgent)
  503. );
  504. }
  505. }
  506. /**
  507. * @method isBlackBerry
  508. * @signature isBlackBerry([forceActualPlatform])
  509. * @param {Boolean} forceActualPlatform
  510. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  511. * [ja][/ja]
  512. * @description
  513. * [en]Returns whether the device is BlackBerry. By default will return manually selected platform if it is set.[/en]
  514. * [ja]BlackBerry上で実行されているかどうかを返します。[/ja]
  515. * @return {Boolean}
  516. */
  517. }, {
  518. key: 'isBlackBerry',
  519. value: function isBlackBerry(forceActualPlatform) {
  520. if (!forceActualPlatform && this._getSelectedPlatform()) {
  521. return this._getSelectedPlatform() === 'blackberry';
  522. }
  523. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object' && !/browser/i.test(device.platform)) {
  524. return (/BlackBerry/i.test(device.platform)
  525. );
  526. } else {
  527. return (/BlackBerry|RIM Tablet OS|BB10/i.test(navigator.userAgent)
  528. );
  529. }
  530. }
  531. //----------------
  532. // Other browsers
  533. //----------------
  534. /**
  535. * @method isOpera
  536. * @signature isOpera([forceActualPlatform])
  537. * @param {Boolean} forceActualPlatform
  538. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  539. * [ja][/ja]
  540. * @description
  541. * [en]Returns whether the browser is Opera. By default will return manually selected platform if it is set.[/en]
  542. * [ja]Opera上で実行されているかどうかを返します。[/ja]
  543. * @return {Boolean}
  544. */
  545. }, {
  546. key: 'isOpera',
  547. value: function isOpera(forceActualPlatform) {
  548. if (!forceActualPlatform && this._getSelectedPlatform()) {
  549. return this._getSelectedPlatform() === 'opera';
  550. }
  551. return !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
  552. }
  553. /**
  554. * @method isFirefox
  555. * @signature isFirefox([forceActualPlatform])
  556. * @param {Boolean} forceActualPlatform
  557. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  558. * [ja][/ja]
  559. * @description
  560. * [en]Returns whether the browser is Firefox. By default will return manually selected platform if it is set.[/en]
  561. * [ja]Firefox上で実行されているかどうかを返します。[/ja]
  562. * @return {Boolean}
  563. */
  564. }, {
  565. key: 'isFirefox',
  566. value: function isFirefox(forceActualPlatform) {
  567. if (!forceActualPlatform && this._getSelectedPlatform()) {
  568. return this._getSelectedPlatform() === 'firefox';
  569. }
  570. return typeof InstallTrigger !== 'undefined';
  571. }
  572. /**
  573. * @method isSafari
  574. * @signature isSafari([forceActualPlatform])
  575. * @param {Boolean} forceActualPlatform
  576. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  577. * [ja][/ja]
  578. * @description
  579. * [en]Returns whether the browser is Safari. By default will return manually selected platform if it is set.[/en]
  580. * [ja]Safari上で実行されているかどうかを返します。[/ja]
  581. * @return {Boolean}
  582. */
  583. }, {
  584. key: 'isSafari',
  585. value: function isSafari(forceActualPlatform) {
  586. if (!forceActualPlatform && this._getSelectedPlatform()) {
  587. return this._getSelectedPlatform() === 'safari';
  588. }
  589. return Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0 || function (p) {
  590. return p.toString() === '[object SafariRemoteNotification]';
  591. }(!window['safari'] || safari.pushNotification);
  592. }
  593. /**
  594. * @method isChrome
  595. * @signature isChrome([forceActualPlatform])
  596. * @param {Boolean} forceActualPlatform
  597. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  598. * [ja][/ja]
  599. * @description
  600. * [en]Returns whether the browser is Chrome. By default will return manually selected platform if it is set.[/en]
  601. * [ja]Chrome上で実行されているかどうかを返します。[/ja]
  602. * @return {Boolean}
  603. */
  604. }, {
  605. key: 'isChrome',
  606. value: function isChrome(forceActualPlatform) {
  607. if (!forceActualPlatform && this._getSelectedPlatform()) {
  608. return this._getSelectedPlatform() === 'chrome';
  609. }
  610. return !!window.chrome && !(!!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0) && !(navigator.userAgent.indexOf(' Edge/') >= 0);
  611. }
  612. /**
  613. * @method isIE
  614. * @signature isIE([forceActualPlatform])
  615. * @param {Boolean} forceActualPlatform
  616. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  617. * [ja][/ja]
  618. * @description
  619. * [en]Returns whether the browser is Internet Explorer. By default will return manually selected platform if it is set.[/en]
  620. * [ja]Internet Explorer上で実行されているかどうかを返します。[/ja]
  621. * @return {Boolean}
  622. */
  623. }, {
  624. key: 'isIE',
  625. value: function isIE(forceActualPlatform) {
  626. if (!forceActualPlatform && this._getSelectedPlatform()) {
  627. return this._getSelectedPlatform() === 'ie';
  628. }
  629. return false || !!document.documentMode;
  630. }
  631. /**
  632. * @method isEdge
  633. * @signature isEdge([forceActualPlatform])
  634. * @param {Boolean} forceActualPlatform
  635. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  636. * [ja][/ja]
  637. * @description
  638. * [en]Returns whether the browser is Edge. By default will return manually selected platform if it is set.[/en]
  639. * [ja]Edge上で実行されているかどうかを返します。[/ja]
  640. * @return {Boolean}
  641. */
  642. }, {
  643. key: 'isEdge',
  644. value: function isEdge(forceActualPlatform) {
  645. if (!forceActualPlatform && this._getSelectedPlatform()) {
  646. return this._getSelectedPlatform() === 'edge';
  647. }
  648. return navigator.userAgent.indexOf(' Edge/') >= 0;
  649. }
  650. //----------------
  651. // Utility functions
  652. //----------------
  653. /**
  654. * @return {String}
  655. */
  656. }, {
  657. key: 'getMobileOS',
  658. value: function getMobileOS() {
  659. if (this.isAndroid()) {
  660. return 'android';
  661. } else if (this.isIOS()) {
  662. return 'ios';
  663. } else if (this.isWP()) {
  664. return 'wp';
  665. } else {
  666. return 'other';
  667. }
  668. }
  669. /**
  670. * @return {String}
  671. */
  672. }, {
  673. key: 'getIOSDevice',
  674. value: function getIOSDevice() {
  675. if (this.isIPhone()) {
  676. return 'iphone';
  677. } else if (this.isIPad()) {
  678. return 'ipad';
  679. } else if (this.isIPod()) {
  680. return 'ipod';
  681. } else {
  682. return 'na';
  683. }
  684. }
  685. }]);
  686. return Platform;
  687. }();
  688. var platform = new Platform();
  689. /*
  690. Copyright 2013-2015 ASIAL CORPORATION
  691. Licensed under the Apache License, Version 2.0 (the "License");
  692. you may not use this file except in compliance with the License.
  693. You may obtain a copy of the License at
  694. http://www.apache.org/licenses/LICENSE-2.0
  695. Unless required by applicable law or agreed to in writing, software
  696. distributed under the License is distributed on an "AS IS" BASIS,
  697. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  698. See the License for the specific language governing permissions and
  699. limitations under the License.
  700. */
  701. var error = function error(message) {
  702. return util$1.throw('In PageAttributeExpression: ' + message);
  703. };
  704. var pageAttributeExpression = {
  705. _variables: {},
  706. /**
  707. * Define a variable.
  708. *
  709. * @param {String} name Name of the variable
  710. * @param {String|Function} value Value of the variable. Can be a string or a function. The function must return a string.
  711. * @param {Boolean} overwrite If this value is false, an error will be thrown when trying to define a variable that has already been defined.
  712. */
  713. defineVariable: function defineVariable(name, value) {
  714. var overwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  715. if (typeof name !== 'string') {
  716. error('Variable name must be a string');
  717. } else if (typeof value !== 'string' && typeof value !== 'function') {
  718. error('Variable value must be a string or a function');
  719. } else if (this._variables.hasOwnProperty(name) && !overwrite) {
  720. error('"' + name + '" is already defined');
  721. }
  722. this._variables[name] = value;
  723. },
  724. /**
  725. * Get a variable.
  726. *
  727. * @param {String} name Name of the variable.
  728. * @return {String|Function|null}
  729. */
  730. getVariable: function getVariable(name) {
  731. if (!this._variables.hasOwnProperty(name)) {
  732. return null;
  733. }
  734. return this._variables[name];
  735. },
  736. /**
  737. * Remove a variable.
  738. *
  739. * @param {String} name Name of the varaible.
  740. */
  741. removeVariable: function removeVariable(name) {
  742. delete this._variables[name];
  743. },
  744. /**
  745. * Get all variables.
  746. *
  747. * @return {Object}
  748. */
  749. getAllVariables: function getAllVariables() {
  750. return this._variables;
  751. },
  752. _parsePart: function _parsePart(part) {
  753. var c = void 0,
  754. inInterpolation = false,
  755. currentIndex = 0;
  756. var tokens = [];
  757. if (part.length === 0) {
  758. error('Unable to parse empty string');
  759. }
  760. for (var i = 0; i < part.length; i++) {
  761. c = part.charAt(i);
  762. if (c === '$' && part.charAt(i + 1) === '{') {
  763. if (inInterpolation) {
  764. error('Nested interpolation not supported');
  765. }
  766. var token = part.substring(currentIndex, i);
  767. if (token.length > 0) {
  768. tokens.push(part.substring(currentIndex, i));
  769. }
  770. currentIndex = i;
  771. inInterpolation = true;
  772. } else if (c === '}') {
  773. if (!inInterpolation) {
  774. error('} must be preceeded by ${');
  775. }
  776. var _token = part.substring(currentIndex, i + 1);
  777. if (_token.length > 0) {
  778. tokens.push(part.substring(currentIndex, i + 1));
  779. }
  780. currentIndex = i + 1;
  781. inInterpolation = false;
  782. }
  783. }
  784. if (inInterpolation) {
  785. error('Unterminated interpolation');
  786. }
  787. tokens.push(part.substring(currentIndex, part.length));
  788. return tokens;
  789. },
  790. _replaceToken: function _replaceToken(token) {
  791. var re = /^\${(.*?)}$/,
  792. match = token.match(re);
  793. if (match) {
  794. var name = match[1].trim();
  795. var variable = this.getVariable(name);
  796. if (variable === null) {
  797. error('Variable "' + name + '" does not exist');
  798. } else if (typeof variable === 'string') {
  799. return variable;
  800. } else {
  801. var rv = variable();
  802. if (typeof rv !== 'string') {
  803. error('Must return a string');
  804. }
  805. return rv;
  806. }
  807. } else {
  808. return token;
  809. }
  810. },
  811. _replaceTokens: function _replaceTokens(tokens) {
  812. return tokens.map(this._replaceToken.bind(this));
  813. },
  814. _parseExpression: function _parseExpression(expression) {
  815. return expression.split(',').map(function (part) {
  816. return part.trim();
  817. }).map(this._parsePart.bind(this)).map(this._replaceTokens.bind(this)).map(function (part) {
  818. return part.join('');
  819. });
  820. },
  821. /**
  822. * Evaluate an expression.
  823. *
  824. * @param {String} expression An page attribute expression.
  825. * @return {Array}
  826. */
  827. evaluate: function evaluate(expression) {
  828. if (!expression) {
  829. return [];
  830. }
  831. return this._parseExpression(expression);
  832. }
  833. };
  834. // Define default variables.
  835. pageAttributeExpression.defineVariable('mobileOS', platform.getMobileOS());
  836. pageAttributeExpression.defineVariable('iOSDevice', platform.getIOSDevice());
  837. pageAttributeExpression.defineVariable('runtime', function () {
  838. return platform.isWebView() ? 'cordova' : 'browser';
  839. });
  840. /*
  841. Copyright 2013-2015 ASIAL CORPORATION
  842. Licensed under the Apache License, Version 2.0 (the "License");
  843. you may not use this file except in compliance with the License.
  844. You may obtain a copy of the License at
  845. http://www.apache.org/licenses/LICENSE-2.0
  846. Unless required by applicable law or agreed to in writing, software
  847. distributed under the License is distributed on an "AS IS" BASIS,
  848. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  849. See the License for the specific language governing permissions and
  850. limitations under the License.
  851. */
  852. var internal$1 = {};
  853. internal$1.config = {
  854. autoStatusBarFill: true,
  855. animationsDisabled: false,
  856. warningsDisabled: false
  857. };
  858. internal$1.nullElement = window.document.createElement('div');
  859. /**
  860. * @return {Boolean}
  861. */
  862. internal$1.isEnabledAutoStatusBarFill = function () {
  863. return !!internal$1.config.autoStatusBarFill;
  864. };
  865. /**
  866. * @param {String} html
  867. * @return {String}
  868. */
  869. internal$1.normalizePageHTML = function (html) {
  870. return ('' + html).trim();
  871. };
  872. internal$1.waitDOMContentLoaded = function (callback) {
  873. if (window.document.readyState === 'loading' || window.document.readyState == 'uninitialized') {
  874. var wrappedCallback = function wrappedCallback() {
  875. callback();
  876. window.document.removeEventListener('DOMContentLoaded', wrappedCallback);
  877. };
  878. window.document.addEventListener('DOMContentLoaded', wrappedCallback);
  879. } else {
  880. setImmediate(callback);
  881. }
  882. };
  883. internal$1.autoStatusBarFill = function (action) {
  884. var onReady = function onReady() {
  885. if (internal$1.shouldFillStatusBar()) {
  886. action();
  887. }
  888. document.removeEventListener('deviceready', onReady);
  889. };
  890. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object') {
  891. document.addEventListener('deviceready', onReady);
  892. } else if (['complete', 'interactive'].indexOf(document.readyState) === -1) {
  893. internal$1.waitDOMContentLoaded(onReady);
  894. } else {
  895. onReady();
  896. }
  897. };
  898. internal$1.shouldFillStatusBar = function () {
  899. return internal$1.isEnabledAutoStatusBarFill() && (platform.isWebView() && platform.isIOS7above() && !platform.isIPhoneX() || document.body.querySelector('.ons-status-bar-mock.ios'));
  900. };
  901. internal$1.templateStore = {
  902. _storage: {},
  903. /**
  904. * @param {String} key
  905. * @return {String/null} template
  906. */
  907. get: function get$$1(key) {
  908. return internal$1.templateStore._storage[key] || null;
  909. },
  910. /**
  911. * @param {String} key
  912. * @param {String} template
  913. */
  914. set: function set$$1(key, template) {
  915. internal$1.templateStore._storage[key] = template;
  916. }
  917. };
  918. window.document.addEventListener('_templateloaded', function (e) {
  919. if (e.target.nodeName.toLowerCase() === 'ons-template') {
  920. internal$1.templateStore.set(e.templateId, e.template);
  921. }
  922. }, false);
  923. internal$1.waitDOMContentLoaded(function () {
  924. register('script[type="text/ons-template"]');
  925. register('script[type="text/template"]');
  926. register('script[type="text/ng-template"]');
  927. register('template');
  928. function register(query) {
  929. var templates = window.document.querySelectorAll(query);
  930. for (var i = 0; i < templates.length; i++) {
  931. internal$1.templateStore.set(templates[i].getAttribute('id'), templates[i].textContent || templates[i].content);
  932. }
  933. }
  934. });
  935. /**
  936. * @param {String} page
  937. * @return {Promise}
  938. */
  939. internal$1.getTemplateHTMLAsync = function (page) {
  940. return new Promise(function (resolve, reject) {
  941. internal$1.waitDOMContentLoaded(function () {
  942. var cache = internal$1.templateStore.get(page);
  943. if (cache) {
  944. if (cache instanceof DocumentFragment) {
  945. return resolve(cache);
  946. }
  947. var html = typeof cache === 'string' ? cache : cache[1];
  948. return resolve(internal$1.normalizePageHTML(html));
  949. }
  950. var local = window.document.getElementById(page);
  951. if (local) {
  952. var _html = local.textContent || local.content;
  953. return resolve(_html);
  954. }
  955. var xhr = new XMLHttpRequest();
  956. xhr.open('GET', page, true);
  957. xhr.onload = function () {
  958. var html = xhr.responseText;
  959. if (xhr.status >= 400 && xhr.status < 600) {
  960. reject(html);
  961. } else {
  962. // Refresh script tags
  963. var fragment = util$1.createFragment(html);
  964. util$1.arrayFrom(fragment.querySelectorAll('script')).forEach(function (el) {
  965. var script = document.createElement('script');
  966. script.type = el.type || 'text/javascript';
  967. script.appendChild(document.createTextNode(el.text || el.textContent || el.innerHTML));
  968. el.parentNode.replaceChild(script, el);
  969. });
  970. internal$1.templateStore.set(page, fragment);
  971. resolve(fragment);
  972. }
  973. };
  974. xhr.onerror = function () {
  975. util$1.throw('Page template not found: ' + page);
  976. };
  977. xhr.send(null);
  978. });
  979. });
  980. };
  981. /**
  982. * @param {String} page
  983. * @return {Promise}
  984. */
  985. internal$1.getPageHTMLAsync = function (page) {
  986. var pages = pageAttributeExpression.evaluate(page);
  987. var getPage = function getPage(page) {
  988. if (typeof page !== 'string') {
  989. return Promise.reject('Must specify a page.');
  990. }
  991. return internal$1.getTemplateHTMLAsync(page).catch(function (error) {
  992. if (pages.length === 0) {
  993. return Promise.reject(error);
  994. }
  995. return getPage(pages.shift());
  996. });
  997. };
  998. return getPage(pages.shift());
  999. };
  1000. /*
  1001. Copyright 2013-2015 ASIAL CORPORATION
  1002. Licensed under the Apache License, Version 2.0 (the "License");
  1003. you may not use this file except in compliance with the License.
  1004. You may obtain a copy of the License at
  1005. http://www.apache.org/licenses/LICENSE-2.0
  1006. Unless required by applicable law or agreed to in writing, software
  1007. distributed under the License is distributed on an "AS IS" BASIS,
  1008. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1009. See the License for the specific language governing permissions and
  1010. limitations under the License.
  1011. */
  1012. var AnimatorFactory = function () {
  1013. /**
  1014. * @param {Object} opts
  1015. * @param {Object} opts.animators The dictionary for animator classes
  1016. * @param {Function} opts.baseClass The base class of animators
  1017. * @param {String} [opts.baseClassName] The name of the base class of animators
  1018. * @param {String} [opts.defaultAnimation] The default animation name
  1019. * @param {Object} [opts.defaultAnimationOptions] The default animation options
  1020. */
  1021. function AnimatorFactory(opts) {
  1022. classCallCheck(this, AnimatorFactory);
  1023. this._animators = opts.animators;
  1024. this._baseClass = opts.baseClass;
  1025. this._baseClassName = opts.baseClassName || opts.baseClass.name;
  1026. this._animation = opts.defaultAnimation || 'default';
  1027. this._animationOptions = opts.defaultAnimationOptions || {};
  1028. if (!this._animators[this._animation]) {
  1029. util$1.throw('No such animation: ' + this._animation);
  1030. }
  1031. }
  1032. /**
  1033. * @param {String} jsonString
  1034. * @return {Object/null}
  1035. */
  1036. createClass(AnimatorFactory, [{
  1037. key: 'setAnimationOptions',
  1038. /**
  1039. * @param {Object} options
  1040. */
  1041. value: function setAnimationOptions(options) {
  1042. this._animationOptions = options;
  1043. }
  1044. /**
  1045. * @param {Object} options
  1046. * @param {String} [options.animation] The animation name
  1047. * @param {Object} [options.animationOptions] The animation options
  1048. * @param {Object} defaultAnimator The default animator instance
  1049. * @return {Object} An animator instance
  1050. */
  1051. }, {
  1052. key: 'newAnimator',
  1053. value: function newAnimator() {
  1054. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1055. var defaultAnimator = arguments[1];
  1056. var animator = null;
  1057. if (options.animation instanceof this._baseClass) {
  1058. return options.animation;
  1059. }
  1060. var Animator = null;
  1061. if (typeof options.animation === 'string') {
  1062. Animator = this._animators[options.animation];
  1063. }
  1064. if (!Animator && defaultAnimator) {
  1065. animator = defaultAnimator;
  1066. } else {
  1067. Animator = Animator || this._animators[this._animation];
  1068. var animationOpts = util$1.extend({}, this._animationOptions, options.animationOptions || {}, internal$1.config.animationsDisabled ? { duration: 0, delay: 0 } : {});
  1069. animator = new Animator(animationOpts);
  1070. if (typeof animator === 'function') {
  1071. animator = new animator(animationOpts); // eslint-disable-line new-cap
  1072. }
  1073. }
  1074. if (!(animator instanceof this._baseClass)) {
  1075. util$1.throw('"animator" is not an instance of ' + this._baseClassName);
  1076. }
  1077. return animator;
  1078. }
  1079. }], [{
  1080. key: 'parseAnimationOptionsString',
  1081. value: function parseAnimationOptionsString(jsonString) {
  1082. try {
  1083. if (typeof jsonString === 'string') {
  1084. var result = util$1.animationOptionsParse(jsonString);
  1085. if ((typeof result === 'undefined' ? 'undefined' : _typeof(result)) === 'object' && result !== null) {
  1086. return result;
  1087. } else {
  1088. console.error('"animation-options" attribute must be a JSON object string: ' + jsonString);
  1089. }
  1090. }
  1091. return {};
  1092. } catch (e) {
  1093. console.error('"animation-options" attribute must be a JSON object string: ' + jsonString);
  1094. return {};
  1095. }
  1096. }
  1097. }]);
  1098. return AnimatorFactory;
  1099. }();
  1100. /*
  1101. Copyright 2013-2015 ASIAL CORPORATION
  1102. Licensed under the Apache License, Version 2.0 (the "License");
  1103. you may not use this file except in compliance with the License.
  1104. You may obtain a copy of the License at
  1105. http://www.apache.org/licenses/LICENSE-2.0
  1106. Unless required by applicable law or agreed to in writing, software
  1107. distributed under the License is distributed on an "AS IS" BASIS,
  1108. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1109. See the License for the specific language governing permissions and
  1110. limitations under the License.
  1111. */
  1112. var autoStyleEnabled = true;
  1113. // Modifiers
  1114. var modifiersMap = {
  1115. 'quiet': 'material--flat',
  1116. 'light': 'material--flat',
  1117. 'outline': 'material--flat',
  1118. 'cta': '',
  1119. 'large--quiet': 'material--flat large',
  1120. 'large--cta': 'large',
  1121. 'noborder': '',
  1122. 'tappable': ''
  1123. };
  1124. var platforms = {};
  1125. platforms.android = function (element) {
  1126. var elementName = element.tagName.toLowerCase();
  1127. if (!util$1.hasModifier(element, 'material')) {
  1128. var oldModifier = element.getAttribute('modifier') || '';
  1129. var newModifier = oldModifier.trim().split(/\s+/).map(function (e) {
  1130. return modifiersMap.hasOwnProperty(e) ? modifiersMap[e] : e;
  1131. });
  1132. newModifier.unshift('material');
  1133. element.setAttribute('modifier', newModifier.join(' ').trim());
  1134. }
  1135. var elements = ['ons-alert-dialog-button', 'ons-toolbar-button', 'ons-back-button', 'ons-button', 'ons-list-item', 'ons-fab', 'ons-speed-dial', 'ons-speed-dial-item', 'ons-tab'];
  1136. // Effects
  1137. if (elements.indexOf(elementName) !== -1 && !element.hasAttribute('ripple') && !element.querySelector('ons-ripple')) {
  1138. if (elementName === 'ons-list-item') {
  1139. if (element.hasAttribute('tappable')) {
  1140. element.setAttribute('ripple', '');
  1141. element.removeAttribute('tappable');
  1142. }
  1143. } else {
  1144. element.setAttribute('ripple', '');
  1145. }
  1146. }
  1147. };
  1148. platforms.ios = function (element) {
  1149. // Modifiers
  1150. if (util$1.removeModifier(element, 'material')) {
  1151. if (util$1.removeModifier(element, 'material--flat')) {
  1152. util$1.addModifier(element, util$1.removeModifier(element, 'large') ? 'large--quiet' : 'quiet');
  1153. }
  1154. if (!element.getAttribute('modifier')) {
  1155. element.removeAttribute('modifier');
  1156. }
  1157. }
  1158. // Effects
  1159. if (element.hasAttribute('ripple')) {
  1160. if (element.tagName.toLowerCase() === 'ons-list-item') {
  1161. element.setAttribute('tappable', '');
  1162. }
  1163. element.removeAttribute('ripple');
  1164. }
  1165. };
  1166. var unlocked = {
  1167. android: true
  1168. };
  1169. var getPlatform = function getPlatform(element, force) {
  1170. if (autoStyleEnabled && !element.hasAttribute('disable-auto-styling')) {
  1171. var mobileOS = platform.getMobileOS();
  1172. if (platforms.hasOwnProperty(mobileOS) && (unlocked.hasOwnProperty(mobileOS) || force)) {
  1173. return mobileOS;
  1174. }
  1175. }
  1176. return null;
  1177. };
  1178. var prepare = function prepare(element, force) {
  1179. var p = getPlatform(element, force);
  1180. p && platforms[p](element);
  1181. };
  1182. var mapModifier = function mapModifier(modifier, element, force) {
  1183. if (getPlatform(element, force)) {
  1184. return modifier.split(/\s+/).map(function (m) {
  1185. return modifiersMap.hasOwnProperty(m) ? modifiersMap[m] : m;
  1186. }).join(' ');
  1187. }
  1188. return modifier;
  1189. };
  1190. var restoreModifier = function restoreModifier(element) {
  1191. if (getPlatform(element) === 'android') {
  1192. var modifier = element.getAttribute('modifier') || '';
  1193. var newModifier = mapModifier(modifier, element);
  1194. if (!/(^|\s+)material($|\s+)/i.test(modifier)) {
  1195. newModifier = 'material ' + newModifier;
  1196. }
  1197. if (newModifier !== modifier) {
  1198. element.setAttribute('modifier', newModifier.trim());
  1199. return true;
  1200. }
  1201. }
  1202. return false;
  1203. };
  1204. var autoStyle = {
  1205. isEnabled: function isEnabled() {
  1206. return autoStyleEnabled;
  1207. },
  1208. enable: function enable() {
  1209. return autoStyleEnabled = true;
  1210. },
  1211. disable: function disable() {
  1212. return autoStyleEnabled = false;
  1213. },
  1214. prepare: prepare,
  1215. mapModifier: mapModifier,
  1216. getPlatform: getPlatform,
  1217. restoreModifier: restoreModifier
  1218. };
  1219. /*
  1220. Copyright 2013-2015 ASIAL CORPORATION
  1221. Licensed under the Apache License, Version 2.0 (the "License");
  1222. you may not use this file except in compliance with the License.
  1223. You may obtain a copy of the License at
  1224. http://www.apache.org/licenses/LICENSE-2.0
  1225. Unless required by applicable law or agreed to in writing, software
  1226. distributed under the License is distributed on an "AS IS" BASIS,
  1227. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1228. See the License for the specific language governing permissions and
  1229. limitations under the License.
  1230. */
  1231. var ModifierUtil = function () {
  1232. function ModifierUtil() {
  1233. classCallCheck(this, ModifierUtil);
  1234. }
  1235. createClass(ModifierUtil, null, [{
  1236. key: 'diff',
  1237. /**
  1238. * @param {String} last
  1239. * @param {String} current
  1240. */
  1241. value: function diff(last, current) {
  1242. last = makeDict(('' + last).trim());
  1243. current = makeDict(('' + current).trim());
  1244. var removed = Object.keys(last).reduce(function (result, token) {
  1245. if (!current[token]) {
  1246. result.push(token);
  1247. }
  1248. return result;
  1249. }, []);
  1250. var added = Object.keys(current).reduce(function (result, token) {
  1251. if (!last[token]) {
  1252. result.push(token);
  1253. }
  1254. return result;
  1255. }, []);
  1256. return { added: added, removed: removed };
  1257. function makeDict(modifier) {
  1258. var dict = {};
  1259. ModifierUtil.split(modifier).forEach(function (token) {
  1260. return dict[token] = token;
  1261. });
  1262. return dict;
  1263. }
  1264. }
  1265. /**
  1266. * @param {Object} diff
  1267. * @param {Array} diff.removed
  1268. * @param {Array} diff.added
  1269. * @param {Object} classList
  1270. * @param {String} template
  1271. */
  1272. }, {
  1273. key: 'applyDiffToClassList',
  1274. value: function applyDiffToClassList(diff, classList, template) {
  1275. diff.added.map(function (modifier) {
  1276. return template.replace(/\*/g, modifier);
  1277. }).forEach(function (klass) {
  1278. return klass.split(/\s+/).forEach(function (k) {
  1279. return classList.add(k);
  1280. });
  1281. });
  1282. diff.removed.map(function (modifier) {
  1283. return template.replace(/\*/g, modifier);
  1284. }).forEach(function (klass) {
  1285. return klass.split(/\s+/).forEach(function (k) {
  1286. return classList.remove(k);
  1287. });
  1288. });
  1289. }
  1290. /**
  1291. * @param {Object} diff
  1292. * @param {Array} diff.removed
  1293. * @param {Array} diff.added
  1294. * @param {HTMLElement} element
  1295. * @param {Object} scheme
  1296. */
  1297. }, {
  1298. key: 'applyDiffToElement',
  1299. value: function applyDiffToElement(diff, element, scheme) {
  1300. Object.keys(scheme).forEach(function (selector) {
  1301. var targetElements = !selector || util$1.match(element, selector) ? [element] : Array.prototype.filter.call(element.querySelectorAll(selector), function (targetElement) {
  1302. return !util$1.findParent(targetElement, element.tagName, function (parent) {
  1303. return parent === element;
  1304. });
  1305. });
  1306. for (var i = 0; i < targetElements.length; i++) {
  1307. ModifierUtil.applyDiffToClassList(diff, targetElements[i].classList, scheme[selector]);
  1308. }
  1309. });
  1310. }
  1311. /**
  1312. * @param {String} last
  1313. * @param {String} current
  1314. * @param {HTMLElement} element
  1315. * @param {Object} scheme
  1316. */
  1317. }, {
  1318. key: 'onModifierChanged',
  1319. value: function onModifierChanged(last, current, element, scheme) {
  1320. ModifierUtil.applyDiffToElement(ModifierUtil.diff(last, current), element, scheme);
  1321. autoStyle.restoreModifier(element);
  1322. }
  1323. }, {
  1324. key: 'refresh',
  1325. value: function refresh(element, scheme) {
  1326. ModifierUtil.applyDiffToElement(ModifierUtil.diff('', element.getAttribute('modifier') || ''), element, scheme);
  1327. }
  1328. /**
  1329. * @param {HTMLElement} element
  1330. * @param {Object} scheme
  1331. */
  1332. }, {
  1333. key: 'initModifier',
  1334. value: function initModifier(element, scheme) {
  1335. var modifier = element.getAttribute('modifier');
  1336. if (typeof modifier !== 'string') {
  1337. return;
  1338. }
  1339. ModifierUtil.applyDiffToElement({
  1340. removed: [],
  1341. added: ModifierUtil.split(modifier)
  1342. }, element, scheme);
  1343. }
  1344. }, {
  1345. key: 'split',
  1346. value: function split(modifier) {
  1347. if (typeof modifier !== 'string') {
  1348. return [];
  1349. }
  1350. return modifier.trim().split(/ +/).filter(function (token) {
  1351. return token !== '';
  1352. });
  1353. }
  1354. /**
  1355. * Add modifier token to an element.
  1356. */
  1357. }, {
  1358. key: 'addModifier',
  1359. value: function addModifier(element, modifierToken) {
  1360. if (!element.hasAttribute('modifier')) {
  1361. element.setAttribute('modifier', modifierToken);
  1362. } else {
  1363. var tokens = ModifierUtil.split(element.getAttribute('modifier'));
  1364. if (tokens.indexOf(modifierToken) == -1) {
  1365. tokens.push(modifierToken);
  1366. element.setAttribute('modifier', tokens.join(' '));
  1367. }
  1368. }
  1369. }
  1370. /**
  1371. * Remove modifier token from an element.
  1372. */
  1373. }, {
  1374. key: 'removeModifier',
  1375. value: function removeModifier(element, modifierToken) {
  1376. if (element.hasAttribute('modifier')) {
  1377. var tokens = ModifierUtil.split(element.getAttribute('modifier'));
  1378. var index = tokens.indexOf(modifierToken);
  1379. if (index !== -1) {
  1380. tokens.splice(index, 1);
  1381. element.setAttribute('modifier', tokens.join(' '));
  1382. }
  1383. }
  1384. }
  1385. }]);
  1386. return ModifierUtil;
  1387. }();
  1388. /*
  1389. Copyright 2013-2015 ASIAL CORPORATION
  1390. Licensed under the Apache License, Version 2.0 (the "License");
  1391. you may not use this file except in compliance with the License.
  1392. You may obtain a copy of the License at
  1393. http://www.apache.org/licenses/LICENSE-2.0
  1394. Unless required by applicable law or agreed to in writing, software
  1395. distributed under the License is distributed on an "AS IS" BASIS,
  1396. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1397. See the License for the specific language governing permissions and
  1398. limitations under the License.
  1399. */
  1400. var util$3 = {
  1401. _ready: false,
  1402. _domContentLoaded: false,
  1403. _onDOMContentLoaded: function _onDOMContentLoaded() {
  1404. util$3._domContentLoaded = true;
  1405. if (platform.isWebView()) {
  1406. window.document.addEventListener('deviceready', function () {
  1407. util$3._ready = true;
  1408. }, false);
  1409. } else {
  1410. util$3._ready = true;
  1411. }
  1412. },
  1413. addBackButtonListener: function addBackButtonListener(fn) {
  1414. if (!this._domContentLoaded) {
  1415. throw new Error('This method is available after DOMContentLoaded');
  1416. }
  1417. if (this._ready) {
  1418. window.document.addEventListener('backbutton', fn, false);
  1419. } else {
  1420. window.document.addEventListener('deviceready', function () {
  1421. window.document.addEventListener('backbutton', fn, false);
  1422. });
  1423. }
  1424. },
  1425. removeBackButtonListener: function removeBackButtonListener(fn) {
  1426. if (!this._domContentLoaded) {
  1427. throw new Error('This method is available after DOMContentLoaded');
  1428. }
  1429. if (this._ready) {
  1430. window.document.removeEventListener('backbutton', fn, false);
  1431. } else {
  1432. window.document.addEventListener('deviceready', function () {
  1433. window.document.removeEventListener('backbutton', fn, false);
  1434. });
  1435. }
  1436. }
  1437. };
  1438. window.addEventListener('DOMContentLoaded', function () {
  1439. return util$3._onDOMContentLoaded();
  1440. }, false);
  1441. var HandlerRepository = {
  1442. _store: {},
  1443. _genId: function () {
  1444. var i = 0;
  1445. return function () {
  1446. return i++;
  1447. };
  1448. }(),
  1449. set: function set$$1(element, handler) {
  1450. if (element.dataset.deviceBackButtonHandlerId) {
  1451. this.remove(element);
  1452. }
  1453. var id = element.dataset.deviceBackButtonHandlerId = HandlerRepository._genId();
  1454. this._store[id] = handler;
  1455. },
  1456. remove: function remove(element) {
  1457. if (element.dataset.deviceBackButtonHandlerId) {
  1458. delete this._store[element.dataset.deviceBackButtonHandlerId];
  1459. delete element.dataset.deviceBackButtonHandlerId;
  1460. }
  1461. },
  1462. get: function get$$1(element) {
  1463. if (!element.dataset.deviceBackButtonHandlerId) {
  1464. return undefined;
  1465. }
  1466. var id = element.dataset.deviceBackButtonHandlerId;
  1467. if (!this._store[id]) {
  1468. throw new Error();
  1469. }
  1470. return this._store[id];
  1471. },
  1472. has: function has(element) {
  1473. if (!element.dataset) {
  1474. return false;
  1475. }
  1476. var id = element.dataset.deviceBackButtonHandlerId;
  1477. return !!this._store[id];
  1478. }
  1479. };
  1480. var DeviceBackButtonDispatcher = function () {
  1481. function DeviceBackButtonDispatcher() {
  1482. classCallCheck(this, DeviceBackButtonDispatcher);
  1483. this._isEnabled = false;
  1484. this._boundCallback = this._callback.bind(this);
  1485. }
  1486. /**
  1487. * Enable to handle 'backbutton' events.
  1488. */
  1489. createClass(DeviceBackButtonDispatcher, [{
  1490. key: 'enable',
  1491. value: function enable() {
  1492. if (!this._isEnabled) {
  1493. util$3.addBackButtonListener(this._boundCallback);
  1494. this._isEnabled = true;
  1495. }
  1496. }
  1497. /**
  1498. * Disable to handle 'backbutton' events.
  1499. */
  1500. }, {
  1501. key: 'disable',
  1502. value: function disable() {
  1503. if (this._isEnabled) {
  1504. util$3.removeBackButtonListener(this._boundCallback);
  1505. this._isEnabled = false;
  1506. }
  1507. }
  1508. /**
  1509. * Fire a 'backbutton' event manually.
  1510. */
  1511. }, {
  1512. key: 'fireDeviceBackButtonEvent',
  1513. value: function fireDeviceBackButtonEvent() {
  1514. var event = document.createEvent('Event');
  1515. event.initEvent('backbutton', true, true);
  1516. document.dispatchEvent(event);
  1517. }
  1518. }, {
  1519. key: '_callback',
  1520. value: function _callback() {
  1521. this._dispatchDeviceBackButtonEvent();
  1522. }
  1523. /**
  1524. * @param {HTMLElement} element
  1525. * @param {Function} callback
  1526. */
  1527. }, {
  1528. key: 'createHandler',
  1529. value: function createHandler(element, callback) {
  1530. if (!(element instanceof HTMLElement)) {
  1531. throw new Error('element must be an instance of HTMLElement');
  1532. }
  1533. if (!(callback instanceof Function)) {
  1534. throw new Error('callback must be an instance of Function');
  1535. }
  1536. var handler = {
  1537. _callback: callback,
  1538. _element: element,
  1539. disable: function disable() {
  1540. HandlerRepository.remove(element);
  1541. },
  1542. setListener: function setListener(callback) {
  1543. this._callback = callback;
  1544. },
  1545. enable: function enable() {
  1546. HandlerRepository.set(element, this);
  1547. },
  1548. isEnabled: function isEnabled() {
  1549. return HandlerRepository.get(element) === this;
  1550. },
  1551. destroy: function destroy() {
  1552. HandlerRepository.remove(element);
  1553. this._callback = this._element = null;
  1554. }
  1555. };
  1556. handler.enable();
  1557. return handler;
  1558. }
  1559. }, {
  1560. key: '_dispatchDeviceBackButtonEvent',
  1561. value: function _dispatchDeviceBackButtonEvent() {
  1562. var tree = this._captureTree();
  1563. var element = this._findHandlerLeafElement(tree);
  1564. var handler = HandlerRepository.get(element);
  1565. handler._callback(createEvent(element));
  1566. function createEvent(element) {
  1567. return {
  1568. _element: element,
  1569. callParentHandler: function callParentHandler() {
  1570. var parent = this._element.parentNode;
  1571. while (parent) {
  1572. handler = HandlerRepository.get(parent);
  1573. if (handler) {
  1574. return handler._callback(createEvent(parent));
  1575. }
  1576. parent = parent.parentNode;
  1577. }
  1578. }
  1579. };
  1580. }
  1581. }
  1582. /**
  1583. * @return {Object}
  1584. */
  1585. }, {
  1586. key: '_captureTree',
  1587. value: function _captureTree() {
  1588. return createTree(document.body);
  1589. function createTree(element) {
  1590. var tree = {
  1591. element: element,
  1592. children: Array.prototype.concat.apply([], arrayOf(element.children).map(function (childElement) {
  1593. if (childElement.style.display === 'none' || childElement._isShown === false) {
  1594. return [];
  1595. }
  1596. if (childElement.children.length === 0 && !HandlerRepository.has(childElement)) {
  1597. return [];
  1598. }
  1599. var result = createTree(childElement);
  1600. if (result.children.length === 0 && !HandlerRepository.has(result.element)) {
  1601. return [];
  1602. }
  1603. return [result];
  1604. }))
  1605. };
  1606. if (!HandlerRepository.has(tree.element)) {
  1607. for (var i = 0; i < tree.children.length; i++) {
  1608. var subTree = tree.children[i];
  1609. if (HandlerRepository.has(subTree.element)) {
  1610. return subTree;
  1611. }
  1612. }
  1613. }
  1614. return tree;
  1615. }
  1616. function arrayOf(target) {
  1617. var result = [];
  1618. for (var i = 0; i < target.length; i++) {
  1619. result.push(target[i]);
  1620. }
  1621. return result;
  1622. }
  1623. }
  1624. /**
  1625. * @param {Object} tree
  1626. * @return {HTMLElement}
  1627. */
  1628. }, {
  1629. key: '_findHandlerLeafElement',
  1630. value: function _findHandlerLeafElement(tree) {
  1631. return find(tree);
  1632. function find(node) {
  1633. if (node.children.length === 0) {
  1634. return node.element;
  1635. }
  1636. if (node.children.length === 1) {
  1637. return find(node.children[0]);
  1638. }
  1639. return node.children.map(function (childNode) {
  1640. return childNode.element;
  1641. }).reduce(function (left, right) {
  1642. if (!left) {
  1643. return right;
  1644. }
  1645. var leftZ = parseInt(window.getComputedStyle(left, '').zIndex, 10);
  1646. var rightZ = parseInt(window.getComputedStyle(right, '').zIndex, 10);
  1647. if (!isNaN(leftZ) && !isNaN(rightZ)) {
  1648. return leftZ > rightZ ? left : right;
  1649. }
  1650. throw new Error('Capturing backbutton-handler is failure.');
  1651. }, null);
  1652. }
  1653. }
  1654. }]);
  1655. return DeviceBackButtonDispatcher;
  1656. }();
  1657. var deviceBackButtonDispatcher = new DeviceBackButtonDispatcher();
  1658. /*
  1659. Copyright 2013-2015 ASIAL CORPORATION
  1660. Licensed under the Apache License, Version 2.0 (the "License");
  1661. you may not use this file except in compliance with the License.
  1662. You may obtain a copy of the License at
  1663. http://www.apache.org/licenses/LICENSE-2.0
  1664. Unless required by applicable law or agreed to in writing, software
  1665. distributed under the License is distributed on an "AS IS" BASIS,
  1666. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1667. See the License for the specific language governing permissions and
  1668. limitations under the License.
  1669. */
  1670. internal$1.AnimatorFactory = AnimatorFactory;
  1671. internal$1.ModifierUtil = ModifierUtil;
  1672. internal$1.dbbDispatcher = deviceBackButtonDispatcher;
  1673. /*
  1674. Copyright 2013-2015 ASIAL CORPORATION
  1675. Licensed under the Apache License, Version 2.0 (the "License");
  1676. you may not use this file except in compliance with the License.
  1677. You may obtain a copy of the License at
  1678. http://www.apache.org/licenses/LICENSE-2.0
  1679. Unless required by applicable law or agreed to in writing, software
  1680. distributed under the License is distributed on an "AS IS" BASIS,
  1681. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1682. See the License for the specific language governing permissions and
  1683. limitations under the License.
  1684. */
  1685. var startsWith = function startsWith(s, c) {
  1686. return s.substr(0, c.length) === c;
  1687. };
  1688. var endsWith = function endsWith(s, c) {
  1689. return s.substr(s.length - c.length, c.length) === c;
  1690. };
  1691. var unwrap = function unwrap(s) {
  1692. return s.slice(1, -1);
  1693. };
  1694. var isObjectString = function isObjectString(s) {
  1695. return startsWith(s, '{') && endsWith(s, '}');
  1696. };
  1697. var isArrayString = function isArrayString(s) {
  1698. return startsWith(s, '[') && endsWith(s, ']');
  1699. };
  1700. var isQuotedString = function isQuotedString(s) {
  1701. return startsWith(s, '\'') && endsWith(s, '\'') || startsWith(s, '"') && endsWith(s, '"');
  1702. };
  1703. var error$1 = function error(token, string, originalString) {
  1704. throw new Error('Unexpected token \'' + token + '\' at position ' + (originalString.length - string.length - 1) + ' in string: \'' + originalString + '\'');
  1705. };
  1706. var processToken = function processToken(token, string, originalString) {
  1707. if (token === 'true' || token === 'false') {
  1708. return token === 'true';
  1709. } else if (isQuotedString(token)) {
  1710. return unwrap(token);
  1711. } else if (!isNaN(token)) {
  1712. return +token;
  1713. } else if (isObjectString(token)) {
  1714. return parseObject(unwrap(token));
  1715. } else if (isArrayString(token)) {
  1716. return parseArray(unwrap(token));
  1717. } else {
  1718. error$1(token, string, originalString);
  1719. }
  1720. };
  1721. var nextToken = function nextToken(string) {
  1722. string = string.trim();
  1723. var limit = string.length;
  1724. if (string[0] === ':' || string[0] === ',') {
  1725. limit = 1;
  1726. } else if (string[0] === '{' || string[0] === '[') {
  1727. var c = string.charCodeAt(0);
  1728. var nestedObject = 1;
  1729. for (var i = 1; i < string.length; i++) {
  1730. if (string.charCodeAt(i) === c) {
  1731. nestedObject++;
  1732. } else if (string.charCodeAt(i) === c + 2) {
  1733. nestedObject--;
  1734. if (nestedObject === 0) {
  1735. limit = i + 1;
  1736. break;
  1737. }
  1738. }
  1739. }
  1740. } else if (string[0] === '\'' || string[0] === '"') {
  1741. for (var _i = 1; _i < string.length; _i++) {
  1742. if (string[_i] === string[0]) {
  1743. limit = _i + 1;
  1744. break;
  1745. }
  1746. }
  1747. } else {
  1748. for (var _i2 = 1; _i2 < string.length; _i2++) {
  1749. if ([' ', ',', ':'].indexOf(string[_i2]) !== -1) {
  1750. limit = _i2;
  1751. break;
  1752. }
  1753. }
  1754. }
  1755. return string.slice(0, limit);
  1756. };
  1757. var parseObject = function parseObject(string) {
  1758. var isValidKey = function isValidKey(key) {
  1759. return (/^[A-Z_$][A-Z0-9_$]*$/i.test(key)
  1760. );
  1761. };
  1762. string = string.trim();
  1763. var originalString = string;
  1764. var object = {};
  1765. var readingKey = true,
  1766. key = void 0,
  1767. previousToken = void 0,
  1768. token = void 0;
  1769. while (string.length > 0) {
  1770. previousToken = token;
  1771. token = nextToken(string);
  1772. string = string.slice(token.length, string.length).trim();
  1773. if (token === ':' && (!readingKey || !previousToken || previousToken === ',') || token === ',' && readingKey || token !== ':' && token !== ',' && previousToken && previousToken !== ',' && previousToken !== ':') {
  1774. error$1(token, string, originalString);
  1775. } else if (token === ':' && readingKey && previousToken) {
  1776. previousToken = isQuotedString(previousToken) ? unwrap(previousToken) : previousToken;
  1777. if (isValidKey(previousToken)) {
  1778. key = previousToken;
  1779. readingKey = false;
  1780. } else {
  1781. throw new Error('Invalid key token \'' + previousToken + '\' at position 0 in string: \'' + originalString + '\'');
  1782. }
  1783. } else if (token === ',' && !readingKey && previousToken) {
  1784. object[key] = processToken(previousToken, string, originalString);
  1785. readingKey = true;
  1786. }
  1787. }
  1788. if (token) {
  1789. object[key] = processToken(token, string, originalString);
  1790. }
  1791. return object;
  1792. };
  1793. var parseArray = function parseArray(string) {
  1794. string = string.trim();
  1795. var originalString = string;
  1796. var array = [];
  1797. var previousToken = void 0,
  1798. token = void 0;
  1799. while (string.length > 0) {
  1800. previousToken = token;
  1801. token = nextToken(string);
  1802. string = string.slice(token.length, string.length).trim();
  1803. if (token === ',' && (!previousToken || previousToken === ',')) {
  1804. error$1(token, string, originalString);
  1805. } else if (token === ',') {
  1806. array.push(processToken(previousToken, string, originalString));
  1807. }
  1808. }
  1809. if (token) {
  1810. if (token !== ',') {
  1811. array.push(processToken(token, string, originalString));
  1812. } else {
  1813. error$1(token, string, originalString);
  1814. }
  1815. }
  1816. return array;
  1817. };
  1818. var parse = function parse(string) {
  1819. string = string.trim();
  1820. if (isObjectString(string)) {
  1821. return parseObject(unwrap(string));
  1822. } else if (isArrayString(string)) {
  1823. return parseArray(unwrap(string));
  1824. } else {
  1825. throw new Error('Provided string must be object or array like: ' + string);
  1826. }
  1827. };
  1828. /*
  1829. Copyright 2013-2015 ASIAL CORPORATION
  1830. Licensed under the Apache License, Version 2.0 (the "License");
  1831. you may not use this file except in compliance with the License.
  1832. You may obtain a copy of the License at
  1833. http://www.apache.org/licenses/LICENSE-2.0
  1834. Unless required by applicable law or agreed to in writing, software
  1835. distributed under the License is distributed on an "AS IS" BASIS,
  1836. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1837. See the License for the specific language governing permissions and
  1838. limitations under the License.
  1839. */
  1840. var util$1 = {};
  1841. var errorPrefix = '[Onsen UI]';
  1842. util$1.globals = {
  1843. fabOffset: 0,
  1844. errorPrefix: errorPrefix,
  1845. supportsPassive: false
  1846. };
  1847. platform._runOnActualPlatform(function () {
  1848. util$1.globals.actualMobileOS = platform.getMobileOS();
  1849. util$1.globals.isUIWebView = platform.isUIWebView();
  1850. util$1.globals.isWKWebView = platform.isWKWebView();
  1851. });
  1852. try {
  1853. var opts = Object.defineProperty({}, 'passive', {
  1854. get: function get$$1() {
  1855. util$1.globals.supportsPassive = true;
  1856. }
  1857. });
  1858. window.addEventListener('testPassive', null, opts);
  1859. window.removeEventListener('testPassive', null, opts);
  1860. } catch (e) {
  1861. }
  1862. /**
  1863. * @param {Element} el Target
  1864. * @param {String} name Event name
  1865. * @param {Function} handler Event handler
  1866. * @param {Object} [opt] Event options (passive, capture...)
  1867. * @param {Boolean} [isGD] If comes from GestureDetector. Just for testing.
  1868. */
  1869. util$1.addEventListener = function (el, name, handler, opt, isGD) {
  1870. el.addEventListener(name, handler, util$1.globals.supportsPassive ? opt : (opt || {}).capture);
  1871. };
  1872. util$1.removeEventListener = function (el, name, handler, opt, isGD) {
  1873. el.removeEventListener(name, handler, util$1.globals.supportsPassive ? opt : (opt || {}).capture);
  1874. };
  1875. /**
  1876. * @param {String/Function} query dot class name or node name or matcher function.
  1877. * @return {Function}
  1878. */
  1879. util$1.prepareQuery = function (query) {
  1880. return query instanceof Function ? query : function (element) {
  1881. return util$1.match(element, query);
  1882. };
  1883. };
  1884. /**
  1885. * @param {Element} e
  1886. * @param {String/Function} s CSS Selector.
  1887. * @return {Boolean}
  1888. */
  1889. util$1.match = function (e, s) {
  1890. return (e.matches || e.webkitMatchesSelector || e.mozMatchesSelector || e.msMatchesSelector).call(e, s);
  1891. };
  1892. /**
  1893. * @param {Element} element
  1894. * @param {String/Function} query dot class name or node name or matcher function.
  1895. * @return {HTMLElement/null}
  1896. */
  1897. util$1.findChild = function (element, query) {
  1898. var match = util$1.prepareQuery(query);
  1899. // Caution: `element.children` is `undefined` in some environments if `element` is `svg`
  1900. for (var i = 0; i < element.childNodes.length; i++) {
  1901. var node = element.childNodes[i];
  1902. if (node.nodeType !== Node.ELEMENT_NODE) {
  1903. // process only element nodes
  1904. continue;
  1905. }
  1906. if (match(node)) {
  1907. return node;
  1908. }
  1909. }
  1910. return null;
  1911. };
  1912. /**
  1913. * @param {Element} element
  1914. * @param {String/Function} query dot class name or node name or matcher function.
  1915. * @return {HTMLElement/null}
  1916. */
  1917. util$1.findParent = function (element, query, until) {
  1918. var match = util$1.prepareQuery(query);
  1919. var parent = element.parentNode;
  1920. for (;;) {
  1921. if (!parent || parent === document || parent instanceof DocumentFragment || until && until(parent)) {
  1922. return null;
  1923. } else if (match(parent)) {
  1924. return parent;
  1925. }
  1926. parent = parent.parentNode;
  1927. }
  1928. };
  1929. /**
  1930. * @param {Element} element
  1931. * @return {boolean}
  1932. */
  1933. util$1.isAttached = function (element) {
  1934. return document.body.contains(element);
  1935. };
  1936. /**
  1937. * @param {Element} element
  1938. * @return {boolean}
  1939. */
  1940. util$1.hasAnyComponentAsParent = function (element) {
  1941. while (element && document.documentElement !== element) {
  1942. element = element.parentNode;
  1943. if (element && element.nodeName.toLowerCase().match(/(ons-navigator|ons-tabbar|ons-modal)/)) {
  1944. return true;
  1945. }
  1946. }
  1947. return false;
  1948. };
  1949. /**
  1950. * @param {Object} element
  1951. * @return {Array}
  1952. */
  1953. util$1.getAllChildNodes = function (element) {
  1954. var _ref;
  1955. return (_ref = [element]).concat.apply(_ref, toConsumableArray(Array.from(element.children).map(function (childEl) {
  1956. return util$1.getAllChildNodes(childEl);
  1957. })));
  1958. };
  1959. /**
  1960. * @param {Element} element
  1961. * @return {boolean}
  1962. */
  1963. util$1.isPageControl = function (element) {
  1964. return element.nodeName.match(/^ons-(navigator|splitter|tabbar|page)$/i);
  1965. };
  1966. /**
  1967. * @param {Element} element
  1968. * @param {String} action to propagate
  1969. */
  1970. util$1.propagateAction = function (element, action) {
  1971. for (var i = 0; i < element.childNodes.length; i++) {
  1972. var child = element.childNodes[i];
  1973. if (child[action] instanceof Function) {
  1974. child[action]();
  1975. } else {
  1976. util$1.propagateAction(child, action);
  1977. }
  1978. }
  1979. };
  1980. /**
  1981. * @param {String} string - string to be camelized
  1982. * @return {String} Camelized string
  1983. */
  1984. util$1.camelize = function (string) {
  1985. return string.toLowerCase().replace(/-([a-z])/g, function (m, l) {
  1986. return l.toUpperCase();
  1987. });
  1988. };
  1989. /**
  1990. * @param {String} string - string to be hyphenated
  1991. * @return {String} Hyphenated string
  1992. */
  1993. util$1.hyphenate = function (string) {
  1994. return string.replace(/([a-zA-Z])([A-Z])/g, '$1-$2').toLowerCase();
  1995. };
  1996. /**
  1997. * @param {String} selector - tag and class only
  1998. * @param {Object} style
  1999. * @param {Element}
  2000. */
  2001. util$1.create = function () {
  2002. var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  2003. var style = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2004. var classList = selector.split('.');
  2005. var element = document.createElement(classList.shift() || 'div');
  2006. if (classList.length) {
  2007. element.className = classList.join(' ');
  2008. }
  2009. styler(element, style);
  2010. return element;
  2011. };
  2012. /**
  2013. * @param {String} html
  2014. * @return {Element}
  2015. */
  2016. util$1.createElement = function (html) {
  2017. var wrapper = document.createElement('div');
  2018. if (html instanceof DocumentFragment) {
  2019. wrapper.appendChild(document.importNode(html, true));
  2020. } else {
  2021. wrapper.innerHTML = html.trim();
  2022. }
  2023. if (wrapper.children.length > 1) {
  2024. util$1.throw('HTML template must contain a single root element');
  2025. }
  2026. var element = wrapper.children[0];
  2027. wrapper.children[0].remove();
  2028. return element;
  2029. };
  2030. /**
  2031. * @param {String} html
  2032. * @return {HTMLFragment}
  2033. */
  2034. util$1.createFragment = function (html) {
  2035. var template = document.createElement('template');
  2036. template.innerHTML = html;
  2037. return document.importNode(template.content, true);
  2038. };
  2039. /*
  2040. * @param {Object} dst Destination object.
  2041. * @param {...Object} src Source object(s).
  2042. * @returns {Object} Reference to `dst`.
  2043. */
  2044. util$1.extend = function (dst) {
  2045. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  2046. args[_key - 1] = arguments[_key];
  2047. }
  2048. for (var i = 0; i < args.length; i++) {
  2049. if (args[i]) {
  2050. var keys = Object.keys(args[i]);
  2051. for (var j = 0; j < keys.length; j++) {
  2052. var key = keys[j];
  2053. dst[key] = args[i][key];
  2054. }
  2055. }
  2056. }
  2057. return dst;
  2058. };
  2059. /**
  2060. * @param {Object} arrayLike
  2061. * @return {Array}
  2062. */
  2063. util$1.arrayFrom = function (arrayLike) {
  2064. return Array.prototype.slice.apply(arrayLike);
  2065. };
  2066. /**
  2067. * @param {String} jsonString
  2068. * @param {Object} [failSafe]
  2069. * @return {Object}
  2070. */
  2071. util$1.parseJSONObjectSafely = function (jsonString) {
  2072. var failSafe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2073. try {
  2074. var result = JSON.parse('' + jsonString);
  2075. if ((typeof result === 'undefined' ? 'undefined' : _typeof(result)) === 'object' && result !== null) {
  2076. return result;
  2077. }
  2078. } catch (e) {
  2079. return failSafe;
  2080. }
  2081. return failSafe;
  2082. };
  2083. /**
  2084. * @param {String} path - path such as 'myApp.controllers.data.loadData'
  2085. * @return {Any} - whatever is located at that path
  2086. */
  2087. util$1.findFromPath = function (path) {
  2088. path = path.split('.');
  2089. var el = window,
  2090. key;
  2091. while (key = path.shift()) {
  2092. // eslint-disable-line no-cond-assign
  2093. el = el[key];
  2094. }
  2095. return el;
  2096. };
  2097. /**
  2098. * @param {HTMLElement} container - Page or page-container that implements 'topPage'
  2099. * @return {HTMLElement|null} - Visible page element or null if not found.
  2100. */
  2101. util$1.getTopPage = function (container) {
  2102. return container && (container.tagName.toLowerCase() === 'ons-page' ? container : container.topPage) || null;
  2103. };
  2104. /**
  2105. * @param {HTMLElement} container - Element where the search begins
  2106. * @return {HTMLElement|null} - Page element that contains the visible toolbar or null.
  2107. */
  2108. util$1.findToolbarPage = function (container) {
  2109. var page = util$1.getTopPage(container);
  2110. if (page) {
  2111. if (page._canAnimateToolbar()) {
  2112. return page;
  2113. }
  2114. for (var i = 0; i < page._contentElement.children.length; i++) {
  2115. var nextPage = util$1.getTopPage(page._contentElement.children[i]);
  2116. if (nextPage && !/ons-tabbar/i.test(page._contentElement.children[i].tagName)) {
  2117. return util$1.findToolbarPage(nextPage);
  2118. }
  2119. }
  2120. }
  2121. return null;
  2122. };
  2123. /**
  2124. * @param {Element} element
  2125. * @param {String} eventName
  2126. * @param {Object} [detail]
  2127. * @return {CustomEvent}
  2128. */
  2129. util$1.triggerElementEvent = function (target, eventName) {
  2130. var detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2131. var event = new CustomEvent(eventName, {
  2132. bubbles: true,
  2133. cancelable: true,
  2134. detail: detail
  2135. });
  2136. Object.keys(detail).forEach(function (key) {
  2137. event[key] = detail[key];
  2138. });
  2139. target.dispatchEvent(event);
  2140. return event;
  2141. };
  2142. /**
  2143. * @param {Element} target
  2144. * @param {String} modifierName
  2145. * @return {Boolean}
  2146. */
  2147. util$1.hasModifier = function (target, modifierName) {
  2148. if (!target.hasAttribute('modifier')) {
  2149. return false;
  2150. }
  2151. return RegExp('(^|\\s+)' + modifierName + '($|\\s+)', 'i').test(target.getAttribute('modifier'));
  2152. };
  2153. /**
  2154. * @param {Element} target
  2155. * @param {String} modifierName
  2156. * @param {Object} options.autoStyle Maps the modifierName to the corresponding styled modifier.
  2157. * @param {Object} options.forceAutoStyle Ignores platform limitation.
  2158. * @return {Boolean} Whether it was added or not.
  2159. */
  2160. util$1.addModifier = function (target, modifierName) {
  2161. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2162. if (options.autoStyle) {
  2163. modifierName = autoStyle.mapModifier(modifierName, target, options.forceAutoStyle);
  2164. }
  2165. if (util$1.hasModifier(target, modifierName)) {
  2166. return false;
  2167. }
  2168. target.setAttribute('modifier', ((target.getAttribute('modifier') || '') + ' ' + modifierName).trim());
  2169. return true;
  2170. };
  2171. /**
  2172. * @param {Element} target
  2173. * @param {String} modifierName
  2174. * @param {Object} options.autoStyle Maps the modifierName to the corresponding styled modifier.
  2175. * @param {Object} options.forceAutoStyle Ignores platform limitation.
  2176. * @return {Boolean} Whether it was found or not.
  2177. */
  2178. util$1.removeModifier = function (target, modifierName) {
  2179. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2180. if (options.autoStyle) {
  2181. modifierName = autoStyle.mapModifier(modifierName, target, options.forceAutoStyle);
  2182. }
  2183. if (!target.getAttribute('modifier') || !util$1.hasModifier(target, modifierName)) {
  2184. return false;
  2185. }
  2186. var newModifiers = target.getAttribute('modifier').split(/\s+/).filter(function (m) {
  2187. return m && m !== modifierName;
  2188. });
  2189. newModifiers.length ? target.setAttribute('modifier', newModifiers.join(' ')) : target.removeAttribute('modifier');
  2190. return true;
  2191. };
  2192. /**
  2193. * @param {Element} target
  2194. * @param {String} modifierName
  2195. * @param {Boolean} options.force Forces modifier to be added or removed.
  2196. * @param {Object} options.autoStyle Maps the modifierName to the corresponding styled modifier.
  2197. * @param {Boolean} options.forceAutoStyle Ignores platform limitation.
  2198. * @return {Boolean} Whether it was found or not.
  2199. */
  2200. util$1.toggleModifier = function () {
  2201. var options = arguments.length > 2 ? arguments.length <= 2 ? undefined : arguments[2] : {};
  2202. var force = typeof options === 'boolean' ? options : options.force;
  2203. var toggle = typeof force === 'boolean' ? force : !util$1.hasModifier.apply(util$1, arguments);
  2204. toggle ? util$1.addModifier.apply(util$1, arguments) : util$1.removeModifier.apply(util$1, arguments);
  2205. };
  2206. /**
  2207. * @param {Element} el
  2208. * @param {String} defaultClass
  2209. * @param {Object} scheme
  2210. */
  2211. util$1.restoreClass = function (el, defaultClass, scheme) {
  2212. defaultClass.split(/\s+/).forEach(function (c) {
  2213. return c !== '' && !el.classList.contains(c) && el.classList.add(c);
  2214. });
  2215. el.hasAttribute('modifier') && ModifierUtil.refresh(el, scheme);
  2216. };
  2217. // TODO: FIX
  2218. util$1.updateParentPosition = function (el) {
  2219. if (!el._parentUpdated && el.parentElement) {
  2220. if (window.getComputedStyle(el.parentElement).getPropertyValue('position') === 'static') {
  2221. el.parentElement.style.position = 'relative';
  2222. }
  2223. el._parentUpdated = true;
  2224. }
  2225. };
  2226. util$1.toggleAttribute = function (element, name, value) {
  2227. if (value) {
  2228. element.setAttribute(name, typeof value === 'boolean' ? '' : value);
  2229. } else {
  2230. element.removeAttribute(name);
  2231. }
  2232. };
  2233. util$1.bindListeners = function (element, listenerNames) {
  2234. listenerNames.forEach(function (name) {
  2235. var boundName = name.replace(/^_[a-z]/, '_bound' + name[1].toUpperCase());
  2236. element[boundName] = element[boundName] || element[name].bind(element);
  2237. });
  2238. };
  2239. util$1.each = function (obj, f) {
  2240. return Object.keys(obj).forEach(function (key) {
  2241. return f(key, obj[key]);
  2242. });
  2243. };
  2244. /**
  2245. * @param {Element} target
  2246. * @param {boolean} hasRipple
  2247. * @param {Object} attrs
  2248. */
  2249. util$1.updateRipple = function (target, hasRipple) {
  2250. var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2251. if (hasRipple === undefined) {
  2252. hasRipple = target.hasAttribute('ripple');
  2253. }
  2254. var rippleElement = util$1.findChild(target, 'ons-ripple');
  2255. if (hasRipple) {
  2256. if (!rippleElement) {
  2257. var element = document.createElement('ons-ripple');
  2258. Object.keys(attrs).forEach(function (key) {
  2259. return element.setAttribute(key, attrs[key]);
  2260. });
  2261. target.insertBefore(element, target.firstChild);
  2262. }
  2263. } else if (rippleElement) {
  2264. rippleElement.remove();
  2265. }
  2266. };
  2267. /**
  2268. * @param {String}
  2269. * @return {Object}
  2270. */
  2271. util$1.animationOptionsParse = parse;
  2272. /**
  2273. * @param {*} value
  2274. */
  2275. util$1.isInteger = function (value) {
  2276. return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
  2277. };
  2278. /**
  2279. * @return {Object} Deferred promise.
  2280. */
  2281. util$1.defer = function () {
  2282. var deferred = {};
  2283. deferred.promise = new Promise(function (resolve, reject) {
  2284. deferred.resolve = resolve;
  2285. deferred.reject = reject;
  2286. });
  2287. return deferred;
  2288. };
  2289. /**
  2290. * Show warnings when they are enabled.
  2291. *
  2292. * @param {*} arguments to console.warn
  2293. */
  2294. util$1.warn = function () {
  2295. for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  2296. args[_key2] = arguments[_key2];
  2297. }
  2298. if (!internal$1.config.warningsDisabled) {
  2299. var _console;
  2300. (_console = console).warn.apply(_console, [errorPrefix].concat(args));
  2301. }
  2302. };
  2303. util$1.throw = function (message) {
  2304. throw new Error(errorPrefix + ' ' + message);
  2305. };
  2306. util$1.throwAbstract = function () {
  2307. return util$1.throw('Cannot instantiate abstract class');
  2308. };
  2309. util$1.throwMember = function () {
  2310. return util$1.throw('Class member must be implemented');
  2311. };
  2312. util$1.throwPageLoader = function () {
  2313. return util$1.throw('First parameter should be an instance of PageLoader');
  2314. };
  2315. util$1.throwAnimator = function (el) {
  2316. return util$1.throw('"Animator" param must inherit ' + el + 'Animator');
  2317. };
  2318. var prevent = function prevent(e) {
  2319. return e.cancelable && e.preventDefault();
  2320. };
  2321. /**
  2322. * Prevent scrolling while draging horizontally on iOS.
  2323. *
  2324. * @param {gd} GestureDetector instance
  2325. */
  2326. util$1.iosPreventScroll = function (gd) {
  2327. if (util$1.globals.actualMobileOS === 'ios') {
  2328. var clean = function clean(e) {
  2329. gd.off('touchmove', prevent);
  2330. gd.off('dragend', clean);
  2331. };
  2332. gd.on('touchmove', prevent);
  2333. gd.on('dragend', clean);
  2334. }
  2335. };
  2336. /**
  2337. * Prevents scroll in underlying pages on iOS. See #2220 #2274 #1949
  2338. *
  2339. * @param {el} HTMLElement that prevents the events
  2340. * @param {add} Boolean Add or remove event listeners
  2341. */
  2342. util$1.iosPageScrollFix = function (add) {
  2343. // Full fix - May cause issues with UIWebView's momentum scroll
  2344. if (util$1.globals.actualMobileOS === 'ios') {
  2345. document.body.classList.toggle('ons-ios-scroll', add); // Allows custom and localized fixes (#2274)
  2346. if (!util$1.globals.isUIWebView || internal$1.config.forceUIWebViewScrollFix) {
  2347. document.body.classList.toggle('ons-ios-scroll-fix', add);
  2348. }
  2349. }
  2350. };
  2351. util$1.iosMaskScrollFix = function (el, add) {
  2352. // Half fix - only prevents scroll on masks
  2353. if (util$1.globals.isUIWebView) {
  2354. var action = (add ? 'add' : 'remove') + 'EventListener';
  2355. el[action]('touchmove', prevent, false);
  2356. }
  2357. };
  2358. /**
  2359. * Distance and deltaTime filter some weird dragstart events that are not fired immediately.
  2360. *
  2361. * @param {event}
  2362. */
  2363. util$1.isValidGesture = function (event) {
  2364. return event.gesture !== undefined && (event.gesture.distance <= 15 || event.gesture.deltaTime <= 100);
  2365. };
  2366. util$1.checkMissingImport = function () {
  2367. for (var _len3 = arguments.length, elementNames = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  2368. elementNames[_key3] = arguments[_key3];
  2369. }
  2370. elementNames.forEach(function (name) {
  2371. if (!onsElements[name]) {
  2372. util$1.throw('Ons' + name + ' is required but was not imported (Custom Elements)');
  2373. }
  2374. });
  2375. };
  2376. /*
  2377. Copyright 2013-2015 ASIAL CORPORATION
  2378. Licensed under the Apache License, Version 2.0 (the "License");
  2379. you may not use this file except in compliance with the License.
  2380. You may obtain a copy of the License at
  2381. http://www.apache.org/licenses/LICENSE-2.0
  2382. Unless required by applicable law or agreed to in writing, software
  2383. distributed under the License is distributed on an "AS IS" BASIS,
  2384. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  2385. See the License for the specific language governing permissions and
  2386. limitations under the License.
  2387. */
  2388. /**
  2389. * Minimal animation library for managing css transition on mobile browsers.
  2390. */
  2391. var TIMEOUT_RATIO = 1.4;
  2392. var util$4 = {};
  2393. // capitalize string
  2394. util$4.capitalize = function (str) {
  2395. return str.charAt(0).toUpperCase() + str.slice(1);
  2396. };
  2397. /**
  2398. * @param {Object} params
  2399. * @param {String} params.property
  2400. * @param {Float} params.duration
  2401. * @param {String} params.timing
  2402. */
  2403. util$4.buildTransitionValue = function (params) {
  2404. params.property = params.property || 'all';
  2405. params.duration = params.duration || 0.4;
  2406. params.timing = params.timing || 'linear';
  2407. var props = params.property.split(/ +/);
  2408. return props.map(function (prop) {
  2409. return prop + ' ' + params.duration + 's ' + params.timing;
  2410. }).join(', ');
  2411. };
  2412. /**
  2413. * Add an event handler on "transitionend" event.
  2414. */
  2415. util$4.onceOnTransitionEnd = function (element, callback) {
  2416. if (!element) {
  2417. return function () {};
  2418. }
  2419. var fn = function fn(event) {
  2420. if (element == event.target) {
  2421. event.stopPropagation();
  2422. removeListeners();
  2423. callback();
  2424. }
  2425. };
  2426. var removeListeners = function removeListeners() {
  2427. util$4._transitionEndEvents.forEach(function (eventName) {
  2428. element.removeEventListener(eventName, fn, false);
  2429. });
  2430. };
  2431. util$4._transitionEndEvents.forEach(function (eventName) {
  2432. element.addEventListener(eventName, fn, false);
  2433. });
  2434. return removeListeners;
  2435. };
  2436. util$4._transitionEndEvents = function () {
  2437. if ('ontransitionend' in window) {
  2438. return ['transitionend'];
  2439. }
  2440. if ('onwebkittransitionend' in window) {
  2441. return ['webkitTransitionEnd'];
  2442. }
  2443. if (util$4.vendorPrefix === 'webkit' || util$4.vendorPrefix === 'o' || util$4.vendorPrefix === 'moz' || util$4.vendorPrefix === 'ms') {
  2444. return [util$4.vendorPrefix + 'TransitionEnd', 'transitionend'];
  2445. }
  2446. return [];
  2447. }();
  2448. util$4._cssPropertyDict = function () {
  2449. var styles = window.getComputedStyle(document.documentElement, '');
  2450. var dict = {};
  2451. var a = 'A'.charCodeAt(0);
  2452. var z = 'z'.charCodeAt(0);
  2453. var upper = function upper(s) {
  2454. return s.substr(1).toUpperCase();
  2455. };
  2456. for (var i = 0; i < styles.length; i++) {
  2457. var key = styles[i].replace(/^[-]+/, '').replace(/[-][a-z]/g, upper).replace(/^moz/, 'Moz');
  2458. if (a <= key.charCodeAt(0) && z >= key.charCodeAt(0)) {
  2459. if (key !== 'cssText' && key !== 'parentText') {
  2460. dict[key] = true;
  2461. }
  2462. }
  2463. }
  2464. return dict;
  2465. }();
  2466. util$4.hasCssProperty = function (name) {
  2467. return name in util$4._cssPropertyDict;
  2468. };
  2469. /**
  2470. * Vendor prefix for css property.
  2471. */
  2472. util$4.vendorPrefix = function () {
  2473. var styles = window.getComputedStyle(document.documentElement, ''),
  2474. pre = (Array.prototype.slice.call(styles).join('').match(/-(moz|webkit|ms)-/) || styles.OLink === '' && ['', 'o'])[1];
  2475. return pre;
  2476. }();
  2477. util$4.forceLayoutAtOnce = function (elements, callback) {
  2478. this.batchImmediate(function () {
  2479. elements.forEach(function (element) {
  2480. // force layout
  2481. element.offsetHeight;
  2482. });
  2483. callback();
  2484. });
  2485. };
  2486. util$4.batchImmediate = function () {
  2487. var callbacks = [];
  2488. return function (callback) {
  2489. if (callbacks.length === 0) {
  2490. setImmediate(function () {
  2491. var concreateCallbacks = callbacks.slice(0);
  2492. callbacks = [];
  2493. concreateCallbacks.forEach(function (callback) {
  2494. callback();
  2495. });
  2496. });
  2497. }
  2498. callbacks.push(callback);
  2499. };
  2500. }();
  2501. util$4.batchAnimationFrame = function () {
  2502. var callbacks = [];
  2503. var raf = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {
  2504. setTimeout(callback, 1000 / 60);
  2505. };
  2506. return function (callback) {
  2507. if (callbacks.length === 0) {
  2508. raf(function () {
  2509. var concreateCallbacks = callbacks.slice(0);
  2510. callbacks = [];
  2511. concreateCallbacks.forEach(function (callback) {
  2512. callback();
  2513. });
  2514. });
  2515. }
  2516. callbacks.push(callback);
  2517. };
  2518. }();
  2519. util$4.transitionPropertyName = function () {
  2520. if (util$4.hasCssProperty('transitionDuration')) {
  2521. return 'transition';
  2522. }
  2523. if (util$4.hasCssProperty(util$4.vendorPrefix + 'TransitionDuration')) {
  2524. return util$4.vendorPrefix + 'Transition';
  2525. }
  2526. throw new Error('Invalid state');
  2527. }();
  2528. /**
  2529. * @param {HTMLElement} element
  2530. */
  2531. var Animit = function Animit(element, defaults) {
  2532. if (!(this instanceof Animit)) {
  2533. return new Animit(element, defaults);
  2534. }
  2535. if (element instanceof HTMLElement) {
  2536. this.elements = [element];
  2537. } else if (Object.prototype.toString.call(element) === '[object Array]') {
  2538. this.elements = element;
  2539. } else {
  2540. throw new Error('First argument must be an array or an instance of HTMLElement.');
  2541. }
  2542. this.defaults = defaults;
  2543. this.transitionQueue = [];
  2544. this.lastStyleAttributeDict = [];
  2545. };
  2546. Animit.prototype = {
  2547. /**
  2548. * @property {Array}
  2549. */
  2550. transitionQueue: undefined,
  2551. /**
  2552. * @property {Array}
  2553. */
  2554. elements: undefined,
  2555. /**
  2556. * @property {Object}
  2557. */
  2558. defaults: undefined,
  2559. /**
  2560. * Start animation sequence with passed animations.
  2561. *
  2562. * @param {Function} callback
  2563. */
  2564. play: function play(callback) {
  2565. if (typeof callback === 'function') {
  2566. this.transitionQueue.push(function (done) {
  2567. callback();
  2568. done();
  2569. });
  2570. }
  2571. this.startAnimation();
  2572. return this;
  2573. },
  2574. /**
  2575. * Most of the animations follow this default process.
  2576. *
  2577. * @param {from} css or options object containing css
  2578. * @param {to} css or options object containing css
  2579. * @param {delay} delay to wait
  2580. */
  2581. default: function _default(from, to, delay) {
  2582. function step(params, duration, timing) {
  2583. if (params.duration !== undefined) {
  2584. duration = params.duration;
  2585. }
  2586. if (params.timing !== undefined) {
  2587. timing = params.timing;
  2588. }
  2589. return {
  2590. css: params.css || params,
  2591. duration: duration,
  2592. timing: timing
  2593. };
  2594. }
  2595. return this.saveStyle().queue(step(from, 0, this.defaults.timing)).wait(delay === undefined ? this.defaults.delay : delay).queue(step(to, this.defaults.duration, this.defaults.timing)).restoreStyle();
  2596. },
  2597. /**
  2598. * Queue transition animations or other function.
  2599. *
  2600. * e.g. animit(elt).queue({color: 'red'})
  2601. * e.g. animit(elt).queue({color: 'red'}, {duration: 0.4})
  2602. * e.g. animit(elt).queue({css: {color: 'red'}, duration: 0.2})
  2603. *
  2604. * @param {Object|Animit.Transition|Function} transition
  2605. * @param {Object} [options]
  2606. */
  2607. queue: function queue(transition, options) {
  2608. var queue = this.transitionQueue;
  2609. if (transition && options) {
  2610. options.css = transition;
  2611. transition = new Animit.Transition(options);
  2612. }
  2613. if (!(transition instanceof Function || transition instanceof Animit.Transition)) {
  2614. if (transition.css) {
  2615. transition = new Animit.Transition(transition);
  2616. } else {
  2617. transition = new Animit.Transition({
  2618. css: transition
  2619. });
  2620. }
  2621. }
  2622. if (transition instanceof Function) {
  2623. queue.push(transition);
  2624. } else if (transition instanceof Animit.Transition) {
  2625. queue.push(transition.build());
  2626. } else {
  2627. throw new Error('Invalid arguments');
  2628. }
  2629. return this;
  2630. },
  2631. /**
  2632. * Queue transition animations.
  2633. *
  2634. * @param {Float} seconds
  2635. */
  2636. wait: function wait(seconds) {
  2637. if (seconds > 0) {
  2638. this.transitionQueue.push(function (done) {
  2639. setTimeout(done, 1000 * seconds);
  2640. });
  2641. }
  2642. return this;
  2643. },
  2644. saveStyle: function saveStyle() {
  2645. this.transitionQueue.push(function (done) {
  2646. this.elements.forEach(function (element, index) {
  2647. var css = this.lastStyleAttributeDict[index] = {};
  2648. for (var i = 0; i < element.style.length; i++) {
  2649. css[element.style[i]] = element.style[element.style[i]];
  2650. }
  2651. }.bind(this));
  2652. done();
  2653. }.bind(this));
  2654. return this;
  2655. },
  2656. /**
  2657. * Restore element's style.
  2658. *
  2659. * @param {Object} [options]
  2660. * @param {Float} [options.duration]
  2661. * @param {String} [options.timing]
  2662. * @param {String} [options.transition]
  2663. */
  2664. restoreStyle: function restoreStyle(options) {
  2665. options = options || {};
  2666. var self = this;
  2667. if (options.transition && !options.duration) {
  2668. throw new Error('"options.duration" is required when "options.transition" is enabled.');
  2669. }
  2670. var transitionName = util$4.transitionPropertyName;
  2671. if (options.transition || options.duration && options.duration > 0) {
  2672. var transitionValue = options.transition || 'all ' + options.duration + 's ' + (options.timing || 'linear');
  2673. this.transitionQueue.push(function (done) {
  2674. var elements = this.elements;
  2675. var timeoutId;
  2676. var clearTransition = function clearTransition() {
  2677. elements.forEach(function (element) {
  2678. element.style[transitionName] = '';
  2679. });
  2680. };
  2681. // add "transitionend" event handler
  2682. var removeListeners = util$4.onceOnTransitionEnd(elements[0], function () {
  2683. clearTimeout(timeoutId);
  2684. clearTransition();
  2685. done();
  2686. });
  2687. // for fail safe.
  2688. timeoutId = setTimeout(function () {
  2689. removeListeners();
  2690. clearTransition();
  2691. done();
  2692. }, options.duration * 1000 * TIMEOUT_RATIO);
  2693. // transition and style settings
  2694. elements.forEach(function (element, index) {
  2695. var css = self.lastStyleAttributeDict[index];
  2696. if (!css) {
  2697. throw new Error('restoreStyle(): The style is not saved. Invoke saveStyle() before.');
  2698. }
  2699. self.lastStyleAttributeDict[index] = undefined;
  2700. var name;
  2701. for (var i = 0, len = element.style.length; i < len; i++) {
  2702. name = element.style[i];
  2703. if (css[name] === undefined) {
  2704. css[name] = '';
  2705. }
  2706. }
  2707. element.style[transitionName] = transitionValue;
  2708. Object.keys(css).forEach(function (key) {
  2709. if (key !== transitionName) {
  2710. element.style[key] = css[key];
  2711. }
  2712. });
  2713. element.style[transitionName] = transitionValue;
  2714. });
  2715. });
  2716. } else {
  2717. this.transitionQueue.push(function (done) {
  2718. reset();
  2719. done();
  2720. });
  2721. }
  2722. return this;
  2723. function reset() {
  2724. // Clear transition animation settings.
  2725. self.elements.forEach(function (element, index) {
  2726. element.style[transitionName] = 'none';
  2727. var css = self.lastStyleAttributeDict[index];
  2728. if (!css) {
  2729. throw new Error('restoreStyle(): The style is not saved. Invoke saveStyle() before.');
  2730. }
  2731. self.lastStyleAttributeDict[index] = undefined;
  2732. for (var i = 0, name = ''; i < element.style.length; i++) {
  2733. name = element.style[i];
  2734. if (typeof css[element.style[i]] === 'undefined') {
  2735. css[element.style[i]] = '';
  2736. }
  2737. }
  2738. Object.keys(css).forEach(function (key) {
  2739. element.style[key] = css[key];
  2740. });
  2741. });
  2742. }
  2743. },
  2744. /**
  2745. * Start animation sequence.
  2746. */
  2747. startAnimation: function startAnimation() {
  2748. this._dequeueTransition();
  2749. return this;
  2750. },
  2751. _dequeueTransition: function _dequeueTransition() {
  2752. var transition = this.transitionQueue.shift();
  2753. if (this._currentTransition) {
  2754. throw new Error('Current transition exists.');
  2755. }
  2756. this._currentTransition = transition;
  2757. var self = this;
  2758. var called = false;
  2759. var done = function done() {
  2760. if (!called) {
  2761. called = true;
  2762. self._currentTransition = undefined;
  2763. self._dequeueTransition();
  2764. } else {
  2765. throw new Error('Invalid state: This callback is called twice.');
  2766. }
  2767. };
  2768. if (transition) {
  2769. transition.call(this, done);
  2770. }
  2771. }
  2772. };
  2773. /**
  2774. * @param {Animit} arguments
  2775. */
  2776. Animit.runAll = function () /* arguments... */{
  2777. for (var i = 0; i < arguments.length; i++) {
  2778. arguments[i].play();
  2779. }
  2780. };
  2781. /**
  2782. * @param {Object} options
  2783. * @param {Float} [options.duration]
  2784. * @param {String} [options.property]
  2785. * @param {String} [options.timing]
  2786. */
  2787. Animit.Transition = function (options) {
  2788. this.options = options || {};
  2789. this.options.duration = this.options.duration || 0;
  2790. this.options.timing = this.options.timing || 'linear';
  2791. this.options.css = this.options.css || {};
  2792. this.options.property = this.options.property || 'all';
  2793. };
  2794. Animit.Transition.prototype = {
  2795. /**
  2796. * @param {HTMLElement} element
  2797. * @return {Function}
  2798. */
  2799. build: function build() {
  2800. if (Object.keys(this.options.css).length === 0) {
  2801. throw new Error('options.css is required.');
  2802. }
  2803. var css = createActualCssProps(this.options.css);
  2804. if (this.options.duration > 0) {
  2805. var transitionValue = util$4.buildTransitionValue(this.options);
  2806. var self = this;
  2807. return function (callback) {
  2808. var elements = this.elements;
  2809. var timeout = self.options.duration * 1000 * TIMEOUT_RATIO;
  2810. var timeoutId;
  2811. var removeListeners = util$4.onceOnTransitionEnd(elements[0], function () {
  2812. clearTimeout(timeoutId);
  2813. callback();
  2814. });
  2815. timeoutId = setTimeout(function () {
  2816. removeListeners();
  2817. callback();
  2818. }, timeout);
  2819. elements.forEach(function (element) {
  2820. element.style[util$4.transitionPropertyName] = transitionValue;
  2821. Object.keys(css).forEach(function (name) {
  2822. element.style[name] = css[name];
  2823. });
  2824. });
  2825. };
  2826. }
  2827. if (this.options.duration <= 0) {
  2828. return function (callback) {
  2829. var elements = this.elements;
  2830. elements.forEach(function (element) {
  2831. element.style[util$4.transitionPropertyName] = '';
  2832. Object.keys(css).forEach(function (name) {
  2833. element.style[name] = css[name];
  2834. });
  2835. });
  2836. if (elements.length > 0) {
  2837. util$4.forceLayoutAtOnce(elements, function () {
  2838. util$4.batchAnimationFrame(callback);
  2839. });
  2840. } else {
  2841. util$4.batchAnimationFrame(callback);
  2842. }
  2843. };
  2844. }
  2845. function createActualCssProps(css) {
  2846. var result = {};
  2847. Object.keys(css).forEach(function (name) {
  2848. var value = css[name];
  2849. if (util$4.hasCssProperty(name)) {
  2850. result[name] = value;
  2851. return;
  2852. }
  2853. var prefixed = util$4.vendorPrefix + util$4.capitalize(name);
  2854. if (util$4.hasCssProperty(prefixed)) {
  2855. result[prefixed] = value;
  2856. } else {
  2857. result[prefixed] = value;
  2858. result[name] = value;
  2859. }
  2860. });
  2861. return result;
  2862. }
  2863. }
  2864. };
  2865. /*
  2866. * Gesture detector library that forked from github.com/EightMedia/hammer.js.
  2867. */
  2868. var Event$1;
  2869. var Utils;
  2870. var Detection;
  2871. var PointerEvent;
  2872. /**
  2873. * @object ons.GestureDetector
  2874. * @category gesture
  2875. * @description
  2876. * [en]Utility class for gesture detection.[/en]
  2877. * [ja]ジェスチャを検知するためのユーティリティクラスです。[/ja]
  2878. */
  2879. /**
  2880. * @method constructor
  2881. * @signature constructor(element[, options])
  2882. * @description
  2883. * [en]Create a new GestureDetector instance.[/en]
  2884. * [ja]GestureDetectorのインスタンスを生成します。[/ja]
  2885. * @param {Element} element
  2886. * [en]Name of the event.[/en]
  2887. * [ja]ジェスチャを検知するDOM要素を指定します。[/ja]
  2888. * @param {Object} [options]
  2889. * [en]Options object.[/en]
  2890. * [ja]オプションを指定します。[/ja]
  2891. * @return {ons.GestureDetector.Instance}
  2892. */
  2893. var GestureDetector = function GestureDetector(element, options) {
  2894. return new GestureDetector.Instance(element, options || {});
  2895. };
  2896. /**
  2897. * default settings.
  2898. * more settings are defined per gesture at `/gestures`. Each gesture can be disabled/enabled
  2899. * by setting it's name (like `swipe`) to false.
  2900. * You can set the defaults for all instances by changing this object before creating an instance.
  2901. * @example
  2902. * ````
  2903. * GestureDetector.defaults.drag = false;
  2904. * GestureDetector.defaults.behavior.touchAction = 'pan-y';
  2905. * delete GestureDetector.defaults.behavior.userSelect;
  2906. * ````
  2907. * @property defaults
  2908. * @type {Object}
  2909. */
  2910. GestureDetector.defaults = {
  2911. behavior: {
  2912. // userSelect: 'none', // Also disables selection in `input` children
  2913. touchAction: 'pan-y',
  2914. touchCallout: 'none',
  2915. contentZooming: 'none',
  2916. userDrag: 'none',
  2917. tapHighlightColor: 'rgba(0,0,0,0)'
  2918. }
  2919. };
  2920. /**
  2921. * GestureDetector document where the base events are added at
  2922. * @property DOCUMENT
  2923. * @type {HTMLElement}
  2924. * @default window.document
  2925. */
  2926. GestureDetector.DOCUMENT = document;
  2927. /**
  2928. * detect support for pointer events
  2929. * @property HAS_POINTEREVENTS
  2930. * @type {Boolean}
  2931. */
  2932. GestureDetector.HAS_POINTEREVENTS = navigator.pointerEnabled || navigator.msPointerEnabled;
  2933. /**
  2934. * detect support for touch events
  2935. * @property HAS_TOUCHEVENTS
  2936. * @type {Boolean}
  2937. */
  2938. GestureDetector.HAS_TOUCHEVENTS = 'ontouchstart' in window;
  2939. /**
  2940. * detect mobile browsers
  2941. * @property IS_MOBILE
  2942. * @type {Boolean}
  2943. */
  2944. GestureDetector.IS_MOBILE = /mobile|tablet|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent);
  2945. /**
  2946. * detect if we want to support mouseevents at all
  2947. * @property NO_MOUSEEVENTS
  2948. * @type {Boolean}
  2949. */
  2950. GestureDetector.NO_MOUSEEVENTS = GestureDetector.HAS_TOUCHEVENTS && GestureDetector.IS_MOBILE || GestureDetector.HAS_POINTEREVENTS;
  2951. /**
  2952. * interval in which GestureDetector recalculates current velocity/direction/angle in ms
  2953. * @property CALCULATE_INTERVAL
  2954. * @type {Number}
  2955. * @default 25
  2956. */
  2957. GestureDetector.CALCULATE_INTERVAL = 25;
  2958. /**
  2959. * eventtypes per touchevent (start, move, end) are filled by `Event.determineEventTypes` on `setup`
  2960. * the object contains the DOM event names per type (`EVENT_START`, `EVENT_MOVE`, `EVENT_END`)
  2961. * @property EVENT_TYPES
  2962. * @private
  2963. * @writeOnce
  2964. * @type {Object}
  2965. */
  2966. var EVENT_TYPES = {};
  2967. /**
  2968. * direction strings, for safe comparisons
  2969. * @property DIRECTION_DOWN|LEFT|UP|RIGHT
  2970. * @final
  2971. * @type {String}
  2972. * @default 'down' 'left' 'up' 'right'
  2973. */
  2974. var DIRECTION_DOWN = GestureDetector.DIRECTION_DOWN = 'down';
  2975. var DIRECTION_LEFT = GestureDetector.DIRECTION_LEFT = 'left';
  2976. var DIRECTION_UP = GestureDetector.DIRECTION_UP = 'up';
  2977. var DIRECTION_RIGHT = GestureDetector.DIRECTION_RIGHT = 'right';
  2978. /**
  2979. * pointertype strings, for safe comparisons
  2980. * @property POINTER_MOUSE|TOUCH|PEN
  2981. * @final
  2982. * @type {String}
  2983. * @default 'mouse' 'touch' 'pen'
  2984. */
  2985. var POINTER_MOUSE = GestureDetector.POINTER_MOUSE = 'mouse';
  2986. var POINTER_TOUCH = GestureDetector.POINTER_TOUCH = 'touch';
  2987. var POINTER_PEN = GestureDetector.POINTER_PEN = 'pen';
  2988. /**
  2989. * eventtypes
  2990. * @property EVENT_START|MOVE|END|RELEASE|TOUCH
  2991. * @final
  2992. * @type {String}
  2993. * @default 'start' 'change' 'move' 'end' 'release' 'touch'
  2994. */
  2995. var EVENT_START = GestureDetector.EVENT_START = 'start';
  2996. var EVENT_MOVE = GestureDetector.EVENT_MOVE = 'move';
  2997. var EVENT_END = GestureDetector.EVENT_END = 'end';
  2998. var EVENT_RELEASE = GestureDetector.EVENT_RELEASE = 'release';
  2999. var EVENT_TOUCH = GestureDetector.EVENT_TOUCH = 'touch';
  3000. /**
  3001. * if the window events are set...
  3002. * @property READY
  3003. * @writeOnce
  3004. * @type {Boolean}
  3005. * @default false
  3006. */
  3007. GestureDetector.READY = false;
  3008. /**
  3009. * plugins namespace
  3010. * @property plugins
  3011. * @type {Object}
  3012. */
  3013. GestureDetector.plugins = GestureDetector.plugins || {};
  3014. /**
  3015. * gestures namespace
  3016. * see `/gestures` for the definitions
  3017. * @property gestures
  3018. * @type {Object}
  3019. */
  3020. GestureDetector.gestures = GestureDetector.gestures || {};
  3021. /**
  3022. * setup events to detect gestures on the document
  3023. * this function is called when creating an new instance
  3024. * @private
  3025. */
  3026. function setup(opts) {
  3027. if (GestureDetector.READY) {
  3028. return;
  3029. }
  3030. // find what eventtypes we add listeners to
  3031. Event$1.determineEventTypes();
  3032. // Register all gestures inside GestureDetector.gestures
  3033. Utils.each(GestureDetector.gestures, function (gesture) {
  3034. Detection.register(gesture);
  3035. });
  3036. // Add touch events on the document
  3037. Event$1.onTouch(GestureDetector.DOCUMENT, EVENT_MOVE, Detection.detect, opts);
  3038. Event$1.onTouch(GestureDetector.DOCUMENT, EVENT_END, Detection.detect, opts);
  3039. // GestureDetector is ready...!
  3040. GestureDetector.READY = true;
  3041. }
  3042. /**
  3043. * @module GestureDetector
  3044. *
  3045. * @class Utils
  3046. * @static
  3047. */
  3048. Utils = GestureDetector.utils = {
  3049. /**
  3050. * extend method, could also be used for cloning when `dest` is an empty object.
  3051. * changes the dest object
  3052. * @param {Object} dest
  3053. * @param {Object} src
  3054. * @param {Boolean} [merge=false] do a merge
  3055. * @return {Object} dest
  3056. */
  3057. extend: function extend(dest, src, merge) {
  3058. for (var key in src) {
  3059. if (src.hasOwnProperty(key) && (dest[key] === undefined || !merge)) {
  3060. dest[key] = src[key];
  3061. }
  3062. }
  3063. return dest;
  3064. },
  3065. /**
  3066. * simple addEventListener wrapper
  3067. * @param {HTMLElement} element
  3068. * @param {String} type
  3069. * @param {Function} handler
  3070. */
  3071. on: function on(element, type, handler, opt) {
  3072. util$1.addEventListener(element, type, handler, opt, true);
  3073. },
  3074. /**
  3075. * simple removeEventListener wrapper
  3076. * @param {HTMLElement} element
  3077. * @param {String} type
  3078. * @param {Function} handler
  3079. */
  3080. off: function off(element, type, handler, opt) {
  3081. util$1.removeEventListener(element, type, handler, opt, true);
  3082. },
  3083. /**
  3084. * forEach over arrays and objects
  3085. * @param {Object|Array} obj
  3086. * @param {Function} iterator
  3087. * @param {any} iterator.item
  3088. * @param {Number} iterator.index
  3089. * @param {Object|Array} iterator.obj the source object
  3090. * @param {Object} context value to use as `this` in the iterator
  3091. */
  3092. each: function each(obj, iterator, context) {
  3093. var i, len;
  3094. // native forEach on arrays
  3095. if ('forEach' in obj) {
  3096. obj.forEach(iterator, context);
  3097. // arrays
  3098. } else if (obj.length !== undefined) {
  3099. for (i = 0, len = obj.length; i < len; i++) {
  3100. if (iterator.call(context, obj[i], i, obj) === false) {
  3101. return;
  3102. }
  3103. }
  3104. // objects
  3105. } else {
  3106. for (i in obj) {
  3107. if (obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj) === false) {
  3108. return;
  3109. }
  3110. }
  3111. }
  3112. },
  3113. /**
  3114. * find if a string contains the string using indexOf
  3115. * @param {String} src
  3116. * @param {String} find
  3117. * @return {Boolean} found
  3118. */
  3119. inStr: function inStr(src, find) {
  3120. return src.indexOf(find) > -1;
  3121. },
  3122. /**
  3123. * find if a array contains the object using indexOf or a simple polyfill
  3124. * @param {String} src
  3125. * @param {String} find
  3126. * @return {Boolean|Number} false when not found, or the index
  3127. */
  3128. inArray: function inArray(src, find, deep) {
  3129. if (deep) {
  3130. for (var i = 0, len = src.length; i < len; i++) {
  3131. // Array.findIndex
  3132. if (Object.keys(find).every(function (key) {
  3133. return src[i][key] === find[key];
  3134. })) {
  3135. return i;
  3136. }
  3137. }
  3138. return -1;
  3139. }
  3140. if (src.indexOf) {
  3141. return src.indexOf(find);
  3142. } else {
  3143. for (var i = 0, len = src.length; i < len; i++) {
  3144. if (src[i] === find) {
  3145. return i;
  3146. }
  3147. }
  3148. return -1;
  3149. }
  3150. },
  3151. /**
  3152. * convert an array-like object (`arguments`, `touchlist`) to an array
  3153. * @param {Object} obj
  3154. * @return {Array}
  3155. */
  3156. toArray: function toArray(obj) {
  3157. return Array.prototype.slice.call(obj, 0);
  3158. },
  3159. /**
  3160. * find if a node is in the given parent
  3161. * @param {HTMLElement} node
  3162. * @param {HTMLElement} parent
  3163. * @return {Boolean} found
  3164. */
  3165. hasParent: function hasParent(node, parent) {
  3166. while (node) {
  3167. if (node == parent) {
  3168. return true;
  3169. }
  3170. node = node.parentNode;
  3171. }
  3172. return false;
  3173. },
  3174. /**
  3175. * get the center of all the touches
  3176. * @param {Array} touches
  3177. * @return {Object} center contains `pageX`, `pageY`, `clientX` and `clientY` properties
  3178. */
  3179. getCenter: function getCenter(touches) {
  3180. var pageX = [],
  3181. pageY = [],
  3182. clientX = [],
  3183. clientY = [],
  3184. min = Math.min,
  3185. max = Math.max;
  3186. // no need to loop when only one touch
  3187. if (touches.length === 1) {
  3188. return {
  3189. pageX: touches[0].pageX,
  3190. pageY: touches[0].pageY,
  3191. clientX: touches[0].clientX,
  3192. clientY: touches[0].clientY
  3193. };
  3194. }
  3195. Utils.each(touches, function (touch) {
  3196. pageX.push(touch.pageX);
  3197. pageY.push(touch.pageY);
  3198. clientX.push(touch.clientX);
  3199. clientY.push(touch.clientY);
  3200. });
  3201. return {
  3202. pageX: (min.apply(Math, pageX) + max.apply(Math, pageX)) / 2,
  3203. pageY: (min.apply(Math, pageY) + max.apply(Math, pageY)) / 2,
  3204. clientX: (min.apply(Math, clientX) + max.apply(Math, clientX)) / 2,
  3205. clientY: (min.apply(Math, clientY) + max.apply(Math, clientY)) / 2
  3206. };
  3207. },
  3208. /**
  3209. * calculate the velocity between two points. unit is in px per ms.
  3210. * @param {Number} deltaTime
  3211. * @param {Number} deltaX
  3212. * @param {Number} deltaY
  3213. * @return {Object} velocity `x` and `y`
  3214. */
  3215. getVelocity: function getVelocity(deltaTime, deltaX, deltaY) {
  3216. return {
  3217. x: Math.abs(deltaX / deltaTime) || 0,
  3218. y: Math.abs(deltaY / deltaTime) || 0
  3219. };
  3220. },
  3221. /**
  3222. * calculate the angle between two coordinates
  3223. * @param {Touch} touch1
  3224. * @param {Touch} touch2
  3225. * @return {Number} angle
  3226. */
  3227. getAngle: function getAngle(touch1, touch2) {
  3228. var x = touch2.clientX - touch1.clientX,
  3229. y = touch2.clientY - touch1.clientY;
  3230. return Math.atan2(y, x) * 180 / Math.PI;
  3231. },
  3232. /**
  3233. * do a small comparison to get the direction between two touches.
  3234. * @param {Touch} touch1
  3235. * @param {Touch} touch2
  3236. * @return {String} direction matches `DIRECTION_LEFT|RIGHT|UP|DOWN`
  3237. */
  3238. getDirection: function getDirection(touch1, touch2) {
  3239. var x = Math.abs(touch1.clientX - touch2.clientX),
  3240. y = Math.abs(touch1.clientY - touch2.clientY);
  3241. if (x >= y) {
  3242. return touch1.clientX - touch2.clientX > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;
  3243. }
  3244. return touch1.clientY - touch2.clientY > 0 ? DIRECTION_UP : DIRECTION_DOWN;
  3245. },
  3246. /**
  3247. * calculate the distance between two touches
  3248. * @param {Touch}touch1
  3249. * @param {Touch} touch2
  3250. * @return {Number} distance
  3251. */
  3252. getDistance: function getDistance(touch1, touch2) {
  3253. var x = touch2.clientX - touch1.clientX,
  3254. y = touch2.clientY - touch1.clientY;
  3255. return Math.sqrt(x * x + y * y);
  3256. },
  3257. /**
  3258. * calculate the scale factor between two touchLists
  3259. * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out
  3260. * @param {Array} start array of touches
  3261. * @param {Array} end array of touches
  3262. * @return {Number} scale
  3263. */
  3264. getScale: function getScale(start, end) {
  3265. // need two fingers...
  3266. if (start.length >= 2 && end.length >= 2) {
  3267. return this.getDistance(end[0], end[1]) / this.getDistance(start[0], start[1]);
  3268. }
  3269. return 1;
  3270. },
  3271. /**
  3272. * calculate the rotation degrees between two touchLists
  3273. * @param {Array} start array of touches
  3274. * @param {Array} end array of touches
  3275. * @return {Number} rotation
  3276. */
  3277. getRotation: function getRotation(start, end) {
  3278. // need two fingers
  3279. if (start.length >= 2 && end.length >= 2) {
  3280. return this.getAngle(end[1], end[0]) - this.getAngle(start[1], start[0]);
  3281. }
  3282. return 0;
  3283. },
  3284. /**
  3285. * find out if the direction is vertical *
  3286. * @param {String} direction matches `DIRECTION_UP|DOWN`
  3287. * @return {Boolean} is_vertical
  3288. */
  3289. isVertical: function isVertical(direction) {
  3290. return direction == DIRECTION_UP || direction == DIRECTION_DOWN;
  3291. },
  3292. /**
  3293. * set css properties with their prefixes
  3294. * @param {HTMLElement} element
  3295. * @param {String} prop
  3296. * @param {String} value
  3297. * @param {Boolean} [toggle=true]
  3298. * @return {Boolean}
  3299. */
  3300. setPrefixedCss: function setPrefixedCss(element, prop, value, toggle) {
  3301. var prefixes = ['', 'Webkit', 'Moz', 'O', 'ms'];
  3302. prop = Utils.toCamelCase(prop);
  3303. for (var i = 0; i < prefixes.length; i++) {
  3304. var p = prop;
  3305. // prefixes
  3306. if (prefixes[i]) {
  3307. p = prefixes[i] + p.slice(0, 1).toUpperCase() + p.slice(1);
  3308. }
  3309. // test the style
  3310. if (p in element.style) {
  3311. element.style[p] = (toggle === null || toggle) && value || '';
  3312. break;
  3313. }
  3314. }
  3315. },
  3316. /**
  3317. * toggle browser default behavior by setting css properties.
  3318. * `userSelect='none'` also sets `element.onselectstart` to false
  3319. * `userDrag='none'` also sets `element.ondragstart` to false
  3320. *
  3321. * @param {HtmlElement} element
  3322. * @param {Object} props
  3323. * @param {Boolean} [toggle=true]
  3324. */
  3325. toggleBehavior: function toggleBehavior(element, props, toggle) {
  3326. if (!props || !element || !element.style) {
  3327. return;
  3328. }
  3329. // set the css properties
  3330. Utils.each(props, function (value, prop) {
  3331. Utils.setPrefixedCss(element, prop, value, toggle);
  3332. });
  3333. var falseFn = toggle && function () {
  3334. return false;
  3335. };
  3336. // also the disable onselectstart
  3337. if (props.userSelect == 'none') {
  3338. element.onselectstart = falseFn;
  3339. }
  3340. // and disable ondragstart
  3341. if (props.userDrag == 'none') {
  3342. element.ondragstart = falseFn;
  3343. }
  3344. },
  3345. /**
  3346. * convert a string with underscores to camelCase
  3347. * so prevent_default becomes preventDefault
  3348. * @param {String} str
  3349. * @return {String} camelCaseStr
  3350. */
  3351. toCamelCase: function toCamelCase(str) {
  3352. return str.replace(/[_-]([a-z])/g, function (s) {
  3353. return s[1].toUpperCase();
  3354. });
  3355. }
  3356. };
  3357. /**
  3358. * @module GestureDetector
  3359. */
  3360. /**
  3361. * @class Event
  3362. * @static
  3363. */
  3364. Event$1 = GestureDetector.event = {
  3365. /**
  3366. * when touch events have been fired, this is true
  3367. * this is used to stop mouse events
  3368. * @property prevent_mouseevents
  3369. * @private
  3370. * @type {Boolean}
  3371. */
  3372. preventMouseEvents: false,
  3373. /**
  3374. * if EVENT_START has been fired
  3375. * @property started
  3376. * @private
  3377. * @type {Boolean}
  3378. */
  3379. started: false,
  3380. /**
  3381. * when the mouse is hold down, this is true
  3382. * @property should_detect
  3383. * @private
  3384. * @type {Boolean}
  3385. */
  3386. shouldDetect: false,
  3387. /**
  3388. * simple event binder with a hook and support for multiple types
  3389. * @param {HTMLElement} element
  3390. * @param {String} type
  3391. * @param {Function} handler
  3392. * @param {Object} [opt]
  3393. * @param {Function} [hook]
  3394. * @param {Object} hook.type
  3395. */
  3396. on: function on(element, type, handler, opt, hook) {
  3397. var types = type.split(' ');
  3398. Utils.each(types, function (type) {
  3399. Utils.on(element, type, handler, opt);
  3400. hook && hook(type);
  3401. });
  3402. },
  3403. /**
  3404. * simple event unbinder with a hook and support for multiple types
  3405. * @param {HTMLElement} element
  3406. * @param {String} type
  3407. * @param {Function} handler
  3408. * @param {Object} [opt]
  3409. * @param {Function} [hook]
  3410. * @param {Object} hook.type
  3411. */
  3412. off: function off(element, type, handler, opt, hook) {
  3413. var types = type.split(' ');
  3414. Utils.each(types, function (type) {
  3415. Utils.off(element, type, handler, opt);
  3416. hook && hook(type);
  3417. });
  3418. },
  3419. /**
  3420. * the core touch event handler.
  3421. * this finds out if we should to detect gestures
  3422. * @param {HTMLElement} element
  3423. * @param {String} eventType matches `EVENT_START|MOVE|END`
  3424. * @param {Function} handler
  3425. * @return onTouchHandler {Function} the core event handler
  3426. */
  3427. onTouch: function onTouch(element, eventType, handler, opt) {
  3428. var self = this;
  3429. var onTouchHandler = function onTouchHandler(ev) {
  3430. var srcType = ev.type.toLowerCase(),
  3431. isPointer = GestureDetector.HAS_POINTEREVENTS,
  3432. isMouse = Utils.inStr(srcType, 'mouse'),
  3433. triggerType;
  3434. // if we are in a mouseevent, but there has been a touchevent triggered in this session
  3435. // we want to do nothing. simply break out of the event.
  3436. if (isMouse && self.preventMouseEvents) {
  3437. return;
  3438. // mousebutton must be down
  3439. } else if (isMouse && eventType == EVENT_START && ev.button === 0) {
  3440. self.preventMouseEvents = false;
  3441. self.shouldDetect = true;
  3442. } else if (isPointer && eventType == EVENT_START) {
  3443. self.shouldDetect = ev.buttons === 1 || PointerEvent.matchType(POINTER_TOUCH, ev);
  3444. // just a valid start event, but no mouse
  3445. } else if (!isMouse && eventType == EVENT_START) {
  3446. self.preventMouseEvents = true;
  3447. self.shouldDetect = true;
  3448. }
  3449. // update the pointer event before entering the detection
  3450. if (isPointer && eventType != EVENT_END) {
  3451. PointerEvent.updatePointer(eventType, ev);
  3452. }
  3453. // we are in a touch/down state, so allowed detection of gestures
  3454. if (self.shouldDetect) {
  3455. triggerType = self.doDetect.call(self, ev, eventType, element, handler);
  3456. }
  3457. // ...and we are done with the detection
  3458. // so reset everything to start each detection totally fresh
  3459. if (triggerType == EVENT_END) {
  3460. self.preventMouseEvents = false;
  3461. self.shouldDetect = false;
  3462. PointerEvent.reset();
  3463. // update the pointerevent object after the detection
  3464. }
  3465. if (isPointer && eventType == EVENT_END) {
  3466. PointerEvent.updatePointer(eventType, ev);
  3467. }
  3468. };
  3469. this.on(element, EVENT_TYPES[eventType], onTouchHandler, opt);
  3470. return onTouchHandler;
  3471. },
  3472. /**
  3473. * the core detection method
  3474. * this finds out what GestureDetector-touch-events to trigger
  3475. * @param {Object} ev
  3476. * @param {String} eventType matches `EVENT_START|MOVE|END`
  3477. * @param {HTMLElement} element
  3478. * @param {Function} handler
  3479. * @return {String} triggerType matches `EVENT_START|MOVE|END`
  3480. */
  3481. doDetect: function doDetect(ev, eventType, element, handler) {
  3482. var touchList = this.getTouchList(ev, eventType);
  3483. var touchListLength = touchList.length;
  3484. var triggerType = eventType;
  3485. var triggerChange = touchList.trigger; // used by fakeMultitouch plugin
  3486. var changedLength = touchListLength;
  3487. // at each touchstart-like event we want also want to trigger a TOUCH event...
  3488. if (eventType == EVENT_START) {
  3489. triggerChange = EVENT_TOUCH;
  3490. // ...the same for a touchend-like event
  3491. } else if (eventType == EVENT_END) {
  3492. triggerChange = EVENT_RELEASE;
  3493. // keep track of how many touches have been removed
  3494. changedLength = touchList.length - (ev.changedTouches ? ev.changedTouches.length : 1);
  3495. }
  3496. // after there are still touches on the screen,
  3497. // we just want to trigger a MOVE event. so change the START or END to a MOVE
  3498. // but only after detection has been started, the first time we actually want a START
  3499. if (changedLength > 0 && this.started) {
  3500. triggerType = EVENT_MOVE;
  3501. }
  3502. // detection has been started, we keep track of this, see above
  3503. this.started = true;
  3504. // generate some event data, some basic information
  3505. var evData = this.collectEventData(element, triggerType, touchList, ev);
  3506. // trigger the triggerType event before the change (TOUCH, RELEASE) events
  3507. // but the END event should be at last
  3508. if (eventType != EVENT_END) {
  3509. handler.call(Detection, evData);
  3510. }
  3511. // trigger a change (TOUCH, RELEASE) event, this means the length of the touches changed
  3512. if (triggerChange) {
  3513. evData.changedLength = changedLength;
  3514. evData.eventType = triggerChange;
  3515. handler.call(Detection, evData);
  3516. evData.eventType = triggerType;
  3517. delete evData.changedLength;
  3518. }
  3519. // trigger the END event
  3520. if (triggerType == EVENT_END) {
  3521. handler.call(Detection, evData);
  3522. // ...and we are done with the detection
  3523. // so reset everything to start each detection totally fresh
  3524. this.started = false;
  3525. }
  3526. return triggerType;
  3527. },
  3528. /**
  3529. * we have different events for each device/browser
  3530. * determine what we need and set them in the EVENT_TYPES constant
  3531. * the `onTouch` method is bind to these properties.
  3532. * @return {Object} events
  3533. */
  3534. determineEventTypes: function determineEventTypes() {
  3535. var types;
  3536. if (GestureDetector.HAS_POINTEREVENTS) {
  3537. if (window.PointerEvent) {
  3538. types = ['pointerdown', 'pointermove', 'pointerup pointercancel lostpointercapture'];
  3539. } else {
  3540. types = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp MSPointerCancel MSLostPointerCapture'];
  3541. }
  3542. } else if (GestureDetector.NO_MOUSEEVENTS) {
  3543. types = ['touchstart', 'touchmove', 'touchend touchcancel'];
  3544. } else {
  3545. types = ['touchstart mousedown', 'touchmove mousemove', 'touchend touchcancel mouseup'];
  3546. }
  3547. EVENT_TYPES[EVENT_START] = types[0];
  3548. EVENT_TYPES[EVENT_MOVE] = types[1];
  3549. EVENT_TYPES[EVENT_END] = types[2];
  3550. return EVENT_TYPES;
  3551. },
  3552. /**
  3553. * create touchList depending on the event
  3554. * @param {Object} ev
  3555. * @param {String} eventType
  3556. * @return {Array} touches
  3557. */
  3558. getTouchList: function getTouchList(ev, eventType) {
  3559. // get the fake pointerEvent touchlist
  3560. if (GestureDetector.HAS_POINTEREVENTS) {
  3561. return PointerEvent.getTouchList();
  3562. }
  3563. // get the touchlist
  3564. if (ev.touches) {
  3565. if (eventType == EVENT_MOVE) {
  3566. return ev.touches;
  3567. }
  3568. var identifiers = [];
  3569. var concat = [].concat(Utils.toArray(ev.touches), Utils.toArray(ev.changedTouches));
  3570. var touchList = [];
  3571. Utils.each(concat, function (touch) {
  3572. if (Utils.inArray(identifiers, touch.identifier) === -1) {
  3573. touchList.push(touch);
  3574. }
  3575. identifiers.push(touch.identifier);
  3576. });
  3577. return touchList;
  3578. }
  3579. // make fake touchList from mouse position
  3580. ev.identifier = 1;
  3581. return [ev];
  3582. },
  3583. /**
  3584. * collect basic event data
  3585. * @param {HTMLElement} element
  3586. * @param {String} eventType matches `EVENT_START|MOVE|END`
  3587. * @param {Array} touches
  3588. * @param {Object} ev
  3589. * @return {Object} ev
  3590. */
  3591. collectEventData: function collectEventData(element, eventType, touches, ev) {
  3592. // find out pointerType
  3593. var pointerType = POINTER_TOUCH;
  3594. if (Utils.inStr(ev.type, 'mouse') || PointerEvent.matchType(POINTER_MOUSE, ev)) {
  3595. pointerType = POINTER_MOUSE;
  3596. } else if (PointerEvent.matchType(POINTER_PEN, ev)) {
  3597. pointerType = POINTER_PEN;
  3598. }
  3599. return {
  3600. center: Utils.getCenter(touches),
  3601. timeStamp: Date.now(),
  3602. target: ev.target,
  3603. touches: touches,
  3604. eventType: eventType,
  3605. pointerType: pointerType,
  3606. srcEvent: ev,
  3607. /**
  3608. * prevent the browser default actions
  3609. * mostly used to disable scrolling of the browser
  3610. */
  3611. preventDefault: function preventDefault() {
  3612. var srcEvent = this.srcEvent;
  3613. srcEvent.preventManipulation && srcEvent.preventManipulation();
  3614. srcEvent.preventDefault && srcEvent.preventDefault();
  3615. },
  3616. /**
  3617. * stop bubbling the event up to its parents
  3618. */
  3619. stopPropagation: function stopPropagation() {
  3620. this.srcEvent.stopPropagation();
  3621. },
  3622. /**
  3623. * immediately stop gesture detection
  3624. * might be useful after a swipe was detected
  3625. * @return {*}
  3626. */
  3627. stopDetect: function stopDetect() {
  3628. return Detection.stopDetect();
  3629. }
  3630. };
  3631. }
  3632. };
  3633. /**
  3634. * @module GestureDetector
  3635. *
  3636. * @class PointerEvent
  3637. * @static
  3638. */
  3639. PointerEvent = GestureDetector.PointerEvent = {
  3640. /**
  3641. * holds all pointers, by `identifier`
  3642. * @property pointers
  3643. * @type {Object}
  3644. */
  3645. pointers: {},
  3646. /**
  3647. * get the pointers as an array
  3648. * @return {Array} touchlist
  3649. */
  3650. getTouchList: function getTouchList() {
  3651. var touchlist = [];
  3652. // we can use forEach since pointerEvents only is in IE10
  3653. Utils.each(this.pointers, function (pointer) {
  3654. touchlist.push(pointer);
  3655. });
  3656. return touchlist;
  3657. },
  3658. /**
  3659. * update the position of a pointer
  3660. * @param {String} eventType matches `EVENT_START|MOVE|END`
  3661. * @param {Object} pointerEvent
  3662. */
  3663. updatePointer: function updatePointer(eventType, pointerEvent) {
  3664. if (eventType == EVENT_END || eventType != EVENT_END && pointerEvent.buttons !== 1) {
  3665. delete this.pointers[pointerEvent.pointerId];
  3666. } else {
  3667. pointerEvent.identifier = pointerEvent.pointerId;
  3668. this.pointers[pointerEvent.pointerId] = pointerEvent;
  3669. }
  3670. },
  3671. /**
  3672. * check if ev matches pointertype
  3673. * @param {String} pointerType matches `POINTER_MOUSE|TOUCH|PEN`
  3674. * @param {PointerEvent} ev
  3675. */
  3676. matchType: function matchType(pointerType, ev) {
  3677. if (!ev.pointerType) {
  3678. return false;
  3679. }
  3680. var pt = ev.pointerType,
  3681. types = {};
  3682. types[POINTER_MOUSE] = pt === (ev.MSPOINTER_TYPE_MOUSE || POINTER_MOUSE);
  3683. types[POINTER_TOUCH] = pt === (ev.MSPOINTER_TYPE_TOUCH || POINTER_TOUCH);
  3684. types[POINTER_PEN] = pt === (ev.MSPOINTER_TYPE_PEN || POINTER_PEN);
  3685. return types[pointerType];
  3686. },
  3687. /**
  3688. * reset the stored pointers
  3689. */
  3690. reset: function resetList() {
  3691. this.pointers = {};
  3692. }
  3693. };
  3694. /**
  3695. * @module GestureDetector
  3696. *
  3697. * @class Detection
  3698. * @static
  3699. */
  3700. Detection = GestureDetector.detection = {
  3701. // contains all registered GestureDetector.gestures in the correct order
  3702. gestures: [],
  3703. // data of the current GestureDetector.gesture detection session
  3704. current: null,
  3705. // the previous GestureDetector.gesture session data
  3706. // is a full clone of the previous gesture.current object
  3707. previous: null,
  3708. // when this becomes true, no gestures are fired
  3709. stopped: false,
  3710. /**
  3711. * start GestureDetector.gesture detection
  3712. * @param {GestureDetector.Instance} inst
  3713. * @param {Object} eventData
  3714. */
  3715. startDetect: function startDetect(inst, eventData) {
  3716. // already busy with a GestureDetector.gesture detection on an element
  3717. if (this.current) {
  3718. return;
  3719. }
  3720. this.stopped = false;
  3721. // holds current session
  3722. this.current = {
  3723. inst: inst, // reference to GestureDetectorInstance we're working for
  3724. startEvent: Utils.extend({}, eventData), // start eventData for distances, timing etc
  3725. lastEvent: false, // last eventData
  3726. lastCalcEvent: false, // last eventData for calculations.
  3727. futureCalcEvent: false, // last eventData for calculations.
  3728. lastCalcData: {}, // last lastCalcData
  3729. name: '' // current gesture we're in/detected, can be 'tap', 'hold' etc
  3730. };
  3731. this.detect(eventData);
  3732. },
  3733. /**
  3734. * GestureDetector.gesture detection
  3735. * @param {Object} eventData
  3736. * @return {any}
  3737. */
  3738. detect: function detect(eventData) {
  3739. if (!this.current || this.stopped) {
  3740. return;
  3741. }
  3742. // extend event data with calculations about scale, distance etc
  3743. eventData = this.extendEventData(eventData);
  3744. // GestureDetector instance and instance options
  3745. var inst = this.current.inst,
  3746. instOptions = inst.options;
  3747. // call GestureDetector.gesture handlers
  3748. Utils.each(this.gestures, function triggerGesture(gesture) {
  3749. // only when the instance options have enabled this gesture
  3750. if (!this.stopped && inst.enabled && instOptions[gesture.name]) {
  3751. gesture.handler.call(gesture, eventData, inst);
  3752. }
  3753. }, this);
  3754. // store as previous event event
  3755. if (this.current) {
  3756. this.current.lastEvent = eventData;
  3757. }
  3758. if (eventData.eventType == EVENT_END) {
  3759. this.stopDetect();
  3760. }
  3761. return eventData; // eslint-disable-line consistent-return
  3762. },
  3763. /**
  3764. * clear the GestureDetector.gesture vars
  3765. * this is called on endDetect, but can also be used when a final GestureDetector.gesture has been detected
  3766. * to stop other GestureDetector.gestures from being fired
  3767. */
  3768. stopDetect: function stopDetect() {
  3769. // clone current data to the store as the previous gesture
  3770. // used for the double tap gesture, since this is an other gesture detect session
  3771. this.previous = Utils.extend({}, this.current);
  3772. // reset the current
  3773. this.current = null;
  3774. this.stopped = true;
  3775. },
  3776. /**
  3777. * calculate velocity, angle and direction
  3778. * @param {Object} ev
  3779. * @param {Object} center
  3780. * @param {Number} deltaTime
  3781. * @param {Number} deltaX
  3782. * @param {Number} deltaY
  3783. */
  3784. getCalculatedData: function getCalculatedData(ev, center, deltaTime, deltaX, deltaY) {
  3785. var cur = this.current,
  3786. recalc = false,
  3787. calcEv = cur.lastCalcEvent,
  3788. calcData = cur.lastCalcData;
  3789. if (calcEv && ev.timeStamp - calcEv.timeStamp > GestureDetector.CALCULATE_INTERVAL) {
  3790. center = calcEv.center;
  3791. deltaTime = ev.timeStamp - calcEv.timeStamp;
  3792. deltaX = ev.center.clientX - calcEv.center.clientX;
  3793. deltaY = ev.center.clientY - calcEv.center.clientY;
  3794. recalc = true;
  3795. }
  3796. if (ev.eventType == EVENT_TOUCH || ev.eventType == EVENT_RELEASE) {
  3797. cur.futureCalcEvent = ev;
  3798. }
  3799. if (!cur.lastCalcEvent || recalc) {
  3800. calcData.velocity = Utils.getVelocity(deltaTime, deltaX, deltaY);
  3801. calcData.angle = Utils.getAngle(center, ev.center);
  3802. calcData.direction = Utils.getDirection(center, ev.center);
  3803. cur.lastCalcEvent = cur.futureCalcEvent || ev;
  3804. cur.futureCalcEvent = ev;
  3805. }
  3806. ev.velocityX = calcData.velocity.x;
  3807. ev.velocityY = calcData.velocity.y;
  3808. ev.interimAngle = calcData.angle;
  3809. ev.interimDirection = calcData.direction;
  3810. },
  3811. /**
  3812. * extend eventData for GestureDetector.gestures
  3813. * @param {Object} ev
  3814. * @return {Object} ev
  3815. */
  3816. extendEventData: function extendEventData(ev) {
  3817. var cur = this.current,
  3818. startEv = cur.startEvent,
  3819. lastEv = cur.lastEvent || startEv;
  3820. // update the start touchlist to calculate the scale/rotation
  3821. if (ev.eventType == EVENT_TOUCH || ev.eventType == EVENT_RELEASE) {
  3822. startEv.touches = [];
  3823. Utils.each(ev.touches, function (touch) {
  3824. startEv.touches.push({
  3825. clientX: touch.clientX,
  3826. clientY: touch.clientY
  3827. });
  3828. });
  3829. }
  3830. var deltaTime = ev.timeStamp - startEv.timeStamp,
  3831. deltaX = ev.center.clientX - startEv.center.clientX,
  3832. deltaY = ev.center.clientY - startEv.center.clientY;
  3833. this.getCalculatedData(ev, lastEv.center, deltaTime, deltaX, deltaY);
  3834. Utils.extend(ev, {
  3835. startEvent: startEv,
  3836. deltaTime: deltaTime,
  3837. deltaX: deltaX,
  3838. deltaY: deltaY,
  3839. distance: Utils.getDistance(startEv.center, ev.center),
  3840. angle: Utils.getAngle(startEv.center, ev.center),
  3841. direction: Utils.getDirection(startEv.center, ev.center),
  3842. scale: Utils.getScale(startEv.touches, ev.touches),
  3843. rotation: Utils.getRotation(startEv.touches, ev.touches)
  3844. });
  3845. return ev;
  3846. },
  3847. /**
  3848. * register new gesture
  3849. * @param {Object} gesture object, see `gestures/` for documentation
  3850. * @return {Array} gestures
  3851. */
  3852. register: function register(gesture) {
  3853. // add an enable gesture options if there is no given
  3854. var options = gesture.defaults || {};
  3855. if (options[gesture.name] === undefined) {
  3856. options[gesture.name] = true;
  3857. }
  3858. // extend GestureDetector default options with the GestureDetector.gesture options
  3859. Utils.extend(GestureDetector.defaults, options, true);
  3860. // set its index
  3861. gesture.index = gesture.index || 1000;
  3862. // add GestureDetector.gesture to the list
  3863. this.gestures.push(gesture);
  3864. // sort the list by index
  3865. this.gestures.sort(function (a, b) {
  3866. if (a.index < b.index) {
  3867. return -1;
  3868. }
  3869. if (a.index > b.index) {
  3870. return 1;
  3871. }
  3872. return 0;
  3873. });
  3874. return this.gestures;
  3875. }
  3876. };
  3877. /**
  3878. * @module GestureDetector
  3879. */
  3880. /**
  3881. * create new GestureDetector instance
  3882. * all methods should return the instance itself, so it is chainable.
  3883. *
  3884. * @class Instance
  3885. * @constructor
  3886. * @param {HTMLElement} element
  3887. * @param {Object} [options={}] options are merged with `GestureDetector.defaults`
  3888. * @return {GestureDetector.Instance}
  3889. */
  3890. GestureDetector.Instance = function (element, options) {
  3891. var self = this;
  3892. var listenerOptions = options && options.passive ? { passive: true } : undefined;
  3893. // setup GestureDetectorJS window events and register all gestures
  3894. // this also sets up the default options
  3895. setup(listenerOptions);
  3896. /**
  3897. * @property element
  3898. * @type {HTMLElement}
  3899. */
  3900. this.element = element;
  3901. /**
  3902. * @property enabled
  3903. * @type {Boolean}
  3904. * @protected
  3905. */
  3906. this.enabled = true;
  3907. /**
  3908. * options, merged with the defaults
  3909. * options with an _ are converted to camelCase
  3910. * @property options
  3911. * @type {Object}
  3912. */
  3913. Utils.each(options, function (value, name) {
  3914. delete options[name];
  3915. options[Utils.toCamelCase(name)] = value;
  3916. });
  3917. this.options = Utils.extend(Utils.extend({}, GestureDetector.defaults), options || {});
  3918. this.options.listenerOptions = listenerOptions;
  3919. // add some css to the element to prevent the browser from doing its native behavior
  3920. if (this.options.behavior) {
  3921. Utils.toggleBehavior(this.element, this.options.behavior, true);
  3922. }
  3923. /**
  3924. * event start handler on the element to start the detection
  3925. * @property eventStartHandler
  3926. * @type {Object}
  3927. */
  3928. this.eventStartHandler = Event$1.onTouch(element, EVENT_START, function (ev) {
  3929. if (self.enabled && ev.eventType == EVENT_START) {
  3930. Detection.startDetect(self, ev);
  3931. } else if (ev.eventType == EVENT_TOUCH) {
  3932. Detection.detect(ev);
  3933. }
  3934. }, listenerOptions);
  3935. /**
  3936. * keep a list of user event handlers which needs to be removed when calling 'dispose'
  3937. * @property eventHandlers
  3938. * @type {Array}
  3939. */
  3940. this.eventHandlers = [];
  3941. };
  3942. GestureDetector.Instance.prototype = {
  3943. /**
  3944. * @method on
  3945. * @signature on(gestures, handler)
  3946. * @description
  3947. * [en]Adds an event handler for a gesture. Available gestures are: drag, dragleft, dragright, dragup, dragdown, hold, release, swipe, swipeleft, swiperight, swipeup, swipedown, tap, doubletap, touch, transform, pinch, pinchin, pinchout and rotate. [/en]
  3948. * [ja]ジェスチャに対するイベントハンドラを追加します。指定できるジェスチャ名は、drag dragleft dragright dragup dragdown hold release swipe swipeleft swiperight swipeup swipedown tap doubletap touch transform pinch pinchin pinchout rotate です。[/ja]
  3949. * @param {String} gestures
  3950. * [en]A space separated list of gestures.[/en]
  3951. * [ja]検知するジェスチャ名を指定します。スペースで複数指定することができます。[/ja]
  3952. * @param {Function} handler
  3953. * [en]An event handling function.[/en]
  3954. * [ja]イベントハンドラとなる関数オブジェクトを指定します。[/ja]
  3955. */
  3956. on: function onEvent(gestures, handler, opt) {
  3957. var self = this;
  3958. Event$1.on(self.element, gestures, handler, util$1.extend({}, self.options.listenerOptions, opt), function (type) {
  3959. self.eventHandlers.push({ gesture: type, handler: handler });
  3960. });
  3961. return self;
  3962. },
  3963. /**
  3964. * @method off
  3965. * @signature off(gestures, handler)
  3966. * @description
  3967. * [en]Remove an event listener.[/en]
  3968. * [ja]イベントリスナーを削除します。[/ja]
  3969. * @param {String} gestures
  3970. * [en]A space separated list of gestures.[/en]
  3971. * [ja]ジェスチャ名を指定します。スペースで複数指定することができます。[/ja]
  3972. * @param {Function} handler
  3973. * [en]An event handling function.[/en]
  3974. * [ja]イベントハンドラとなる関数オブジェクトを指定します。[/ja]
  3975. */
  3976. off: function offEvent(gestures, handler, opt) {
  3977. var self = this;
  3978. Event$1.off(self.element, gestures, handler, util$1.extend({}, self.options.listenerOptions, opt), function (type) {
  3979. var index = Utils.inArray(self.eventHandlers, { gesture: type, handler: handler }, true);
  3980. if (index >= 0) {
  3981. self.eventHandlers.splice(index, 1);
  3982. }
  3983. });
  3984. return self;
  3985. },
  3986. /**
  3987. * trigger gesture event
  3988. * @method trigger
  3989. * @signature trigger(gesture, eventData)
  3990. * @param {String} gesture
  3991. * @param {Object} [eventData]
  3992. */
  3993. trigger: function triggerEvent(gesture, eventData) {
  3994. // optional
  3995. if (!eventData) {
  3996. eventData = {};
  3997. }
  3998. // create DOM event
  3999. var event = GestureDetector.DOCUMENT.createEvent('Event');
  4000. event.initEvent(gesture, true, true);
  4001. event.gesture = eventData;
  4002. // trigger on the target if it is in the instance element,
  4003. // this is for event delegation tricks
  4004. var element = this.element;
  4005. if (Utils.hasParent(eventData.target, element)) {
  4006. element = eventData.target;
  4007. }
  4008. element.dispatchEvent(event);
  4009. return this;
  4010. },
  4011. /**
  4012. * @method enable
  4013. * @signature enable(state)
  4014. * @description
  4015. * [en]Enable or disable gesture detection.[/en]
  4016. * [ja]ジェスチャ検知を有効化/無効化します。[/ja]
  4017. * @param {Boolean} state
  4018. * [en]Specify if it should be enabled or not.[/en]
  4019. * [ja]有効にするかどうかを指定します。[/ja]
  4020. */
  4021. enable: function enable(state) {
  4022. this.enabled = state;
  4023. return this;
  4024. },
  4025. /**
  4026. * @method dispose
  4027. * @signature dispose()
  4028. * @description
  4029. * [en]Remove and destroy all event handlers for this instance.[/en]
  4030. * [ja]このインスタンスでのジェスチャの検知や、イベントハンドラを全て解除して廃棄します。[/ja]
  4031. */
  4032. dispose: function dispose() {
  4033. var i, eh;
  4034. // undo all changes made by stop_browser_behavior
  4035. Utils.toggleBehavior(this.element, this.options.behavior, false);
  4036. // unbind all custom event handlers
  4037. for (i = -1; eh = this.eventHandlers[++i];) {
  4038. // eslint-disable-line no-cond-assign
  4039. Utils.off(this.element, eh.gesture, eh.handler);
  4040. }
  4041. this.eventHandlers = [];
  4042. // unbind the start event listener
  4043. Event$1.off(this.element, EVENT_TYPES[EVENT_START], this.eventStartHandler);
  4044. return null;
  4045. }
  4046. };
  4047. /**
  4048. * @module gestures
  4049. */
  4050. /**
  4051. * Move with x fingers (default 1) around on the page.
  4052. * Preventing the default browser behavior is a good way to improve feel and working.
  4053. * ````
  4054. * GestureDetectortime.on("drag", function(ev) {
  4055. * console.log(ev);
  4056. * ev.gesture.preventDefault();
  4057. * });
  4058. * ````
  4059. *
  4060. * @class Drag
  4061. * @static
  4062. */
  4063. /**
  4064. * @event drag
  4065. * @param {Object} ev
  4066. */
  4067. /**
  4068. * @event dragstart
  4069. * @param {Object} ev
  4070. */
  4071. /**
  4072. * @event dragend
  4073. * @param {Object} ev
  4074. */
  4075. /**
  4076. * @event drapleft
  4077. * @param {Object} ev
  4078. */
  4079. /**
  4080. * @event dragright
  4081. * @param {Object} ev
  4082. */
  4083. /**
  4084. * @event dragup
  4085. * @param {Object} ev
  4086. */
  4087. /**
  4088. * @event dragdown
  4089. * @param {Object} ev
  4090. */
  4091. /**
  4092. * @param {String} name
  4093. */
  4094. (function (name) {
  4095. var triggered = false;
  4096. function dragGesture(ev, inst) {
  4097. var cur = Detection.current;
  4098. // max touches
  4099. if (inst.options.dragMaxTouches > 0 && ev.touches.length > inst.options.dragMaxTouches) {
  4100. return;
  4101. }
  4102. switch (ev.eventType) {
  4103. case EVENT_START:
  4104. triggered = false;
  4105. break;
  4106. case EVENT_MOVE:
  4107. // when the distance we moved is too small we skip this gesture
  4108. // or we can be already in dragging
  4109. if (ev.distance < inst.options.dragMinDistance && cur.name != name) {
  4110. return;
  4111. }
  4112. var startCenter = cur.startEvent.center;
  4113. // we are dragging!
  4114. if (cur.name != name) {
  4115. cur.name = name;
  4116. if (inst.options.dragDistanceCorrection && ev.distance > 0) {
  4117. // When a drag is triggered, set the event center to dragMinDistance pixels from the original event center.
  4118. // Without this correction, the dragged distance would jumpstart at dragMinDistance pixels instead of at 0.
  4119. // It might be useful to save the original start point somewhere
  4120. var factor = Math.abs(inst.options.dragMinDistance / ev.distance);
  4121. startCenter.pageX += ev.deltaX * factor;
  4122. startCenter.pageY += ev.deltaY * factor;
  4123. startCenter.clientX += ev.deltaX * factor;
  4124. startCenter.clientY += ev.deltaY * factor;
  4125. // recalculate event data using new start point
  4126. ev = Detection.extendEventData(ev);
  4127. }
  4128. }
  4129. // lock drag to axis?
  4130. if (cur.lastEvent.dragLockToAxis || inst.options.dragLockToAxis && inst.options.dragLockMinDistance <= ev.distance) {
  4131. ev.dragLockToAxis = true;
  4132. }
  4133. // keep direction on the axis that the drag gesture started on
  4134. var lastDirection = cur.lastEvent.direction;
  4135. if (ev.dragLockToAxis && lastDirection !== ev.direction) {
  4136. if (Utils.isVertical(lastDirection)) {
  4137. ev.direction = ev.deltaY < 0 ? DIRECTION_UP : DIRECTION_DOWN;
  4138. } else {
  4139. ev.direction = ev.deltaX < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;
  4140. }
  4141. }
  4142. // first time, trigger dragstart event
  4143. if (!triggered) {
  4144. inst.trigger(name + 'start', ev);
  4145. triggered = true;
  4146. }
  4147. // trigger events
  4148. inst.trigger(name, ev);
  4149. inst.trigger(name + ev.direction, ev);
  4150. var isVertical = Utils.isVertical(ev.direction);
  4151. // block the browser events
  4152. if (inst.options.dragBlockVertical && isVertical || inst.options.dragBlockHorizontal && !isVertical) {
  4153. ev.preventDefault();
  4154. }
  4155. break;
  4156. case EVENT_RELEASE:
  4157. if (triggered && ev.changedLength <= inst.options.dragMaxTouches) {
  4158. inst.trigger(name + 'end', ev);
  4159. triggered = false;
  4160. }
  4161. break;
  4162. case EVENT_END:
  4163. triggered = false;
  4164. break;
  4165. }
  4166. }
  4167. GestureDetector.gestures.Drag = {
  4168. name: name,
  4169. index: 50,
  4170. handler: dragGesture,
  4171. defaults: {
  4172. /**
  4173. * minimal movement that have to be made before the drag event gets triggered
  4174. * @property dragMinDistance
  4175. * @type {Number}
  4176. * @default 10
  4177. */
  4178. dragMinDistance: 10,
  4179. /**
  4180. * Set dragDistanceCorrection to true to make the starting point of the drag
  4181. * be calculated from where the drag was triggered, not from where the touch started.
  4182. * Useful to avoid a jerk-starting drag, which can make fine-adjustments
  4183. * through dragging difficult, and be visually unappealing.
  4184. * @property dragDistanceCorrection
  4185. * @type {Boolean}
  4186. * @default true
  4187. */
  4188. dragDistanceCorrection: true,
  4189. /**
  4190. * set 0 for unlimited, but this can conflict with transform
  4191. * @property dragMaxTouches
  4192. * @type {Number}
  4193. * @default 1
  4194. */
  4195. dragMaxTouches: 1,
  4196. /**
  4197. * prevent default browser behavior when dragging occurs
  4198. * be careful with it, it makes the element a blocking element
  4199. * when you are using the drag gesture, it is a good practice to set this true
  4200. * @property dragBlockHorizontal
  4201. * @type {Boolean}
  4202. * @default false
  4203. */
  4204. dragBlockHorizontal: false,
  4205. /**
  4206. * same as `dragBlockHorizontal`, but for vertical movement
  4207. * @property dragBlockVertical
  4208. * @type {Boolean}
  4209. * @default false
  4210. */
  4211. dragBlockVertical: false,
  4212. /**
  4213. * dragLockToAxis keeps the drag gesture on the axis that it started on,
  4214. * It disallows vertical directions if the initial direction was horizontal, and vice versa.
  4215. * @property dragLockToAxis
  4216. * @type {Boolean}
  4217. * @default false
  4218. */
  4219. dragLockToAxis: false,
  4220. /**
  4221. * drag lock only kicks in when distance > dragLockMinDistance
  4222. * This way, locking occurs only when the distance has become large enough to reliably determine the direction
  4223. * @property dragLockMinDistance
  4224. * @type {Number}
  4225. * @default 25
  4226. */
  4227. dragLockMinDistance: 25
  4228. }
  4229. };
  4230. })('drag');
  4231. /**
  4232. * @module gestures
  4233. */
  4234. /**
  4235. * trigger a simple gesture event, so you can do anything in your handler.
  4236. * only usable if you know what your doing...
  4237. *
  4238. * @class Gesture
  4239. * @static
  4240. */
  4241. /**
  4242. * @event gesture
  4243. * @param {Object} ev
  4244. */
  4245. GestureDetector.gestures.Gesture = {
  4246. name: 'gesture',
  4247. index: 1337,
  4248. handler: function releaseGesture(ev, inst) {
  4249. inst.trigger(this.name, ev);
  4250. }
  4251. };
  4252. /**
  4253. * @module gestures
  4254. */
  4255. /**
  4256. * Touch stays at the same place for x time
  4257. *
  4258. * @class Hold
  4259. * @static
  4260. */
  4261. /**
  4262. * @event hold
  4263. * @param {Object} ev
  4264. */
  4265. /**
  4266. * @param {String} name
  4267. */
  4268. (function (name) {
  4269. var timer;
  4270. function holdGesture(ev, inst) {
  4271. var options = inst.options,
  4272. current = Detection.current;
  4273. switch (ev.eventType) {
  4274. case EVENT_START:
  4275. clearTimeout(timer);
  4276. // set the gesture so we can check in the timeout if it still is
  4277. current.name = name;
  4278. // set timer and if after the timeout it still is hold,
  4279. // we trigger the hold event
  4280. timer = setTimeout(function () {
  4281. if (current && current.name == name) {
  4282. inst.trigger(name, ev);
  4283. }
  4284. }, options.holdTimeout);
  4285. break;
  4286. case EVENT_MOVE:
  4287. if (ev.distance > options.holdThreshold) {
  4288. clearTimeout(timer);
  4289. }
  4290. break;
  4291. case EVENT_RELEASE:
  4292. clearTimeout(timer);
  4293. break;
  4294. }
  4295. }
  4296. GestureDetector.gestures.Hold = {
  4297. name: name,
  4298. index: 10,
  4299. defaults: {
  4300. /**
  4301. * @property holdTimeout
  4302. * @type {Number}
  4303. * @default 500
  4304. */
  4305. holdTimeout: 500,
  4306. /**
  4307. * movement allowed while holding
  4308. * @property holdThreshold
  4309. * @type {Number}
  4310. * @default 2
  4311. */
  4312. holdThreshold: 2
  4313. },
  4314. handler: holdGesture
  4315. };
  4316. })('hold');
  4317. /**
  4318. * @module gestures
  4319. */
  4320. /**
  4321. * when a touch is being released from the page
  4322. *
  4323. * @class Release
  4324. * @static
  4325. */
  4326. /**
  4327. * @event release
  4328. * @param {Object} ev
  4329. */
  4330. GestureDetector.gestures.Release = {
  4331. name: 'release',
  4332. index: Infinity,
  4333. handler: function releaseGesture(ev, inst) {
  4334. if (ev.eventType == EVENT_RELEASE) {
  4335. inst.trigger(this.name, ev);
  4336. }
  4337. }
  4338. };
  4339. /**
  4340. * @module gestures
  4341. */
  4342. /**
  4343. * triggers swipe events when the end velocity is above the threshold
  4344. * for best usage, set `preventDefault` (on the drag gesture) to `true`
  4345. * ````
  4346. * GestureDetectortime.on("dragleft swipeleft", function(ev) {
  4347. * console.log(ev);
  4348. * ev.gesture.preventDefault();
  4349. * });
  4350. * ````
  4351. *
  4352. * @class Swipe
  4353. * @static
  4354. */
  4355. /**
  4356. * @event swipe
  4357. * @param {Object} ev
  4358. */
  4359. /**
  4360. * @event swipeleft
  4361. * @param {Object} ev
  4362. */
  4363. /**
  4364. * @event swiperight
  4365. * @param {Object} ev
  4366. */
  4367. /**
  4368. * @event swipeup
  4369. * @param {Object} ev
  4370. */
  4371. /**
  4372. * @event swipedown
  4373. * @param {Object} ev
  4374. */
  4375. GestureDetector.gestures.Swipe = {
  4376. name: 'swipe',
  4377. index: 40,
  4378. defaults: {
  4379. /**
  4380. * @property swipeMinTouches
  4381. * @type {Number}
  4382. * @default 1
  4383. */
  4384. swipeMinTouches: 1,
  4385. /**
  4386. * @property swipeMaxTouches
  4387. * @type {Number}
  4388. * @default 1
  4389. */
  4390. swipeMaxTouches: 1,
  4391. /**
  4392. * horizontal swipe velocity
  4393. * @property swipeVelocityX
  4394. * @type {Number}
  4395. * @default 0.6
  4396. */
  4397. swipeVelocityX: 0.6,
  4398. /**
  4399. * vertical swipe velocity
  4400. * @property swipeVelocityY
  4401. * @type {Number}
  4402. * @default 0.6
  4403. */
  4404. swipeVelocityY: 0.6
  4405. },
  4406. handler: function swipeGesture(ev, inst) {
  4407. if (ev.eventType == EVENT_RELEASE) {
  4408. var touches = ev.touches.length,
  4409. options = inst.options;
  4410. // max touches
  4411. if (touches < options.swipeMinTouches || touches > options.swipeMaxTouches) {
  4412. return;
  4413. }
  4414. // when the distance we moved is too small we skip this gesture
  4415. // or we can be already in dragging
  4416. if (ev.velocityX > options.swipeVelocityX || ev.velocityY > options.swipeVelocityY) {
  4417. // trigger swipe events
  4418. inst.trigger(this.name, ev);
  4419. inst.trigger(this.name + ev.direction, ev);
  4420. }
  4421. }
  4422. }
  4423. };
  4424. /**
  4425. * @module gestures
  4426. */
  4427. /**
  4428. * Single tap and a double tap on a place
  4429. *
  4430. * @class Tap
  4431. * @static
  4432. */
  4433. /**
  4434. * @event tap
  4435. * @param {Object} ev
  4436. */
  4437. /**
  4438. * @event doubletap
  4439. * @param {Object} ev
  4440. */
  4441. /**
  4442. * @param {String} name
  4443. */
  4444. (function (name) {
  4445. var hasMoved = false;
  4446. function tapGesture(ev, inst) {
  4447. var options = inst.options,
  4448. current = Detection.current,
  4449. prev = Detection.previous,
  4450. sincePrev,
  4451. didDoubleTap;
  4452. switch (ev.eventType) {
  4453. case EVENT_START:
  4454. hasMoved = false;
  4455. break;
  4456. case EVENT_MOVE:
  4457. hasMoved = hasMoved || ev.distance > options.tapMaxDistance;
  4458. break;
  4459. case EVENT_END:
  4460. if (!Utils.inStr(ev.srcEvent.type, 'cancel') && ev.deltaTime < options.tapMaxTime && !hasMoved) {
  4461. // previous gesture, for the double tap since these are two different gesture detections
  4462. sincePrev = prev && prev.lastEvent && ev.timeStamp - prev.lastEvent.timeStamp;
  4463. didDoubleTap = false;
  4464. // check if double tap
  4465. if (prev && prev.name == name && sincePrev && sincePrev < options.doubleTapInterval && ev.distance < options.doubleTapDistance) {
  4466. inst.trigger('doubletap', ev);
  4467. didDoubleTap = true;
  4468. }
  4469. // do a single tap
  4470. if (!didDoubleTap || options.tapAlways) {
  4471. current.name = name;
  4472. inst.trigger(current.name, ev);
  4473. }
  4474. }
  4475. break;
  4476. }
  4477. }
  4478. GestureDetector.gestures.Tap = {
  4479. name: name,
  4480. index: 100,
  4481. handler: tapGesture,
  4482. defaults: {
  4483. /**
  4484. * max time of a tap, this is for the slow tappers
  4485. * @property tapMaxTime
  4486. * @type {Number}
  4487. * @default 250
  4488. */
  4489. tapMaxTime: 250,
  4490. /**
  4491. * max distance of movement of a tap, this is for the slow tappers
  4492. * @property tapMaxDistance
  4493. * @type {Number}
  4494. * @default 10
  4495. */
  4496. tapMaxDistance: 10,
  4497. /**
  4498. * always trigger the `tap` event, even while double-tapping
  4499. * @property tapAlways
  4500. * @type {Boolean}
  4501. * @default true
  4502. */
  4503. tapAlways: true,
  4504. /**
  4505. * max distance between two taps
  4506. * @property doubleTapDistance
  4507. * @type {Number}
  4508. * @default 20
  4509. */
  4510. doubleTapDistance: 20,
  4511. /**
  4512. * max time between two taps
  4513. * @property doubleTapInterval
  4514. * @type {Number}
  4515. * @default 300
  4516. */
  4517. doubleTapInterval: 300
  4518. }
  4519. };
  4520. })('tap');
  4521. /**
  4522. * @module gestures
  4523. */
  4524. /**
  4525. * when a touch is being touched at the page
  4526. *
  4527. * @class Touch
  4528. * @static
  4529. */
  4530. /**
  4531. * @event touch
  4532. * @param {Object} ev
  4533. */
  4534. GestureDetector.gestures.Touch = {
  4535. name: 'touch',
  4536. index: -Infinity,
  4537. defaults: {
  4538. /**
  4539. * call preventDefault at touchstart, and makes the element blocking by disabling the scrolling of the page,
  4540. * but it improves gestures like transforming and dragging.
  4541. * be careful with using this, it can be very annoying for users to be stuck on the page
  4542. * @property preventDefault
  4543. * @type {Boolean}
  4544. * @default false
  4545. */
  4546. preventDefault: false,
  4547. /**
  4548. * disable mouse events, so only touch (or pen!) input triggers events
  4549. * @property preventMouse
  4550. * @type {Boolean}
  4551. * @default false
  4552. */
  4553. preventMouse: false
  4554. },
  4555. handler: function touchGesture(ev, inst) {
  4556. if (inst.options.preventMouse && ev.pointerType == POINTER_MOUSE) {
  4557. ev.stopDetect();
  4558. return;
  4559. }
  4560. if (inst.options.preventDefault) {
  4561. ev.preventDefault();
  4562. }
  4563. if (ev.eventType == EVENT_TOUCH) {
  4564. inst.trigger('touch', ev);
  4565. }
  4566. }
  4567. };
  4568. /**
  4569. * @module gestures
  4570. */
  4571. /**
  4572. * User want to scale or rotate with 2 fingers
  4573. * Preventing the default browser behavior is a good way to improve feel and working. This can be done with the
  4574. * `preventDefault` option.
  4575. *
  4576. * @class Transform
  4577. * @static
  4578. */
  4579. /**
  4580. * @event transform
  4581. * @param {Object} ev
  4582. */
  4583. /**
  4584. * @event transformstart
  4585. * @param {Object} ev
  4586. */
  4587. /**
  4588. * @event transformend
  4589. * @param {Object} ev
  4590. */
  4591. /**
  4592. * @event pinchin
  4593. * @param {Object} ev
  4594. */
  4595. /**
  4596. * @event pinchout
  4597. * @param {Object} ev
  4598. */
  4599. /**
  4600. * @event rotate
  4601. * @param {Object} ev
  4602. */
  4603. /**
  4604. * @param {String} name
  4605. */
  4606. (function (name) {
  4607. var triggered = false;
  4608. function transformGesture(ev, inst) {
  4609. switch (ev.eventType) {
  4610. case EVENT_START:
  4611. triggered = false;
  4612. break;
  4613. case EVENT_MOVE:
  4614. // at least multitouch
  4615. if (ev.touches.length < 2) {
  4616. return;
  4617. }
  4618. var scaleThreshold = Math.abs(1 - ev.scale);
  4619. var rotationThreshold = Math.abs(ev.rotation);
  4620. // when the distance we moved is too small we skip this gesture
  4621. // or we can be already in dragging
  4622. if (scaleThreshold < inst.options.transformMinScale && rotationThreshold < inst.options.transformMinRotation) {
  4623. return;
  4624. }
  4625. // we are transforming!
  4626. Detection.current.name = name;
  4627. // first time, trigger dragstart event
  4628. if (!triggered) {
  4629. inst.trigger(name + 'start', ev);
  4630. triggered = true;
  4631. }
  4632. inst.trigger(name, ev); // basic transform event
  4633. // trigger rotate event
  4634. if (rotationThreshold > inst.options.transformMinRotation) {
  4635. inst.trigger('rotate', ev);
  4636. }
  4637. // trigger pinch event
  4638. if (scaleThreshold > inst.options.transformMinScale) {
  4639. inst.trigger('pinch', ev);
  4640. inst.trigger('pinch' + (ev.scale < 1 ? 'in' : 'out'), ev);
  4641. }
  4642. break;
  4643. case EVENT_RELEASE:
  4644. if (triggered && ev.changedLength < 2) {
  4645. inst.trigger(name + 'end', ev);
  4646. triggered = false;
  4647. }
  4648. break;
  4649. }
  4650. }
  4651. GestureDetector.gestures.Transform = {
  4652. name: name,
  4653. index: 45,
  4654. defaults: {
  4655. /**
  4656. * minimal scale factor, no scale is 1, zoomin is to 0 and zoomout until higher then 1
  4657. * @property transformMinScale
  4658. * @type {Number}
  4659. * @default 0.01
  4660. */
  4661. transformMinScale: 0.01,
  4662. /**
  4663. * rotation in degrees
  4664. * @property transformMinRotation
  4665. * @type {Number}
  4666. * @default 1
  4667. */
  4668. transformMinRotation: 1
  4669. },
  4670. handler: transformGesture
  4671. };
  4672. })('transform');
  4673. /*
  4674. Copyright 2013-2015 ASIAL CORPORATION
  4675. Licensed under the Apache License, Version 2.0 (the "License");
  4676. you may not use this file except in compliance with the License.
  4677. You may obtain a copy of the License at
  4678. http://www.apache.org/licenses/LICENSE-2.0
  4679. Unless required by applicable law or agreed to in writing, software
  4680. distributed under the License is distributed on an "AS IS" BASIS,
  4681. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  4682. See the License for the specific language governing permissions and
  4683. limitations under the License.
  4684. */
  4685. var readyMap = void 0;
  4686. var queueMap = void 0;
  4687. function isContentReady(element) {
  4688. if (element.childNodes.length > 0) {
  4689. setContentReady(element);
  4690. }
  4691. return readyMap.has(element);
  4692. }
  4693. function setContentReady(element) {
  4694. readyMap.set(element, true);
  4695. }
  4696. function addCallback(element, fn) {
  4697. if (!queueMap.has(element)) {
  4698. queueMap.set(element, []);
  4699. }
  4700. queueMap.get(element).push(fn);
  4701. }
  4702. function consumeQueue(element) {
  4703. var callbacks = queueMap.get(element, []) || [];
  4704. queueMap.delete(element);
  4705. callbacks.forEach(function (callback) {
  4706. return callback();
  4707. });
  4708. }
  4709. function contentReady(element) {
  4710. var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
  4711. if (readyMap === undefined) {
  4712. readyMap = new WeakMap();
  4713. queueMap = new WeakMap();
  4714. }
  4715. addCallback(element, fn);
  4716. if (isContentReady(element)) {
  4717. consumeQueue(element);
  4718. return;
  4719. }
  4720. var observer = new MutationObserver(function (changes) {
  4721. setContentReady(element);
  4722. consumeQueue(element);
  4723. });
  4724. observer.observe(element, { childList: true, characterData: true });
  4725. // failback for elements has empty content.
  4726. setImmediate(function () {
  4727. setContentReady(element);
  4728. consumeQueue(element);
  4729. });
  4730. }
  4731. /*
  4732. Copyright 2013-2015 ASIAL CORPORATION
  4733. Licensed under the Apache License, Version 2.0 (the "License");
  4734. you may not use this file except in compliance with the License.
  4735. You may obtain a copy of the License at
  4736. http://www.apache.org/licenses/LICENSE-2.0
  4737. Unless required by applicable law or agreed to in writing, software
  4738. distributed under the License is distributed on an "AS IS" BASIS,
  4739. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  4740. See the License for the specific language governing permissions and
  4741. limitations under the License.
  4742. */
  4743. var ToastQueue = function () {
  4744. function ToastQueue() {
  4745. classCallCheck(this, ToastQueue);
  4746. this.queue = [];
  4747. }
  4748. createClass(ToastQueue, [{
  4749. key: "add",
  4750. value: function add(fn, promise) {
  4751. var _this = this;
  4752. this.queue.push(fn);
  4753. if (this.queue.length === 1) {
  4754. setImmediate(this.queue[0]);
  4755. }
  4756. promise.then(function () {
  4757. _this.queue.shift();
  4758. if (_this.queue.length > 0) {
  4759. setTimeout(_this.queue[0], 1000 / 30); // Apply some visual delay
  4760. }
  4761. });
  4762. }
  4763. }]);
  4764. return ToastQueue;
  4765. }();
  4766. var ToastQueue$1 = new ToastQueue();
  4767. /*
  4768. Copyright 2013-2015 ASIAL CORPORATION
  4769. Licensed under the Apache License, Version 2.0 (the "License");
  4770. you may not use this file except in compliance with the License.
  4771. You may obtain a copy of the License at
  4772. http://www.apache.org/licenses/LICENSE-2.0
  4773. Unless required by applicable law or agreed to in writing, software
  4774. distributed under the License is distributed on an "AS IS" BASIS,
  4775. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  4776. See the License for the specific language governing permissions and
  4777. limitations under the License.
  4778. */
  4779. var _setAttributes = function _setAttributes(element, options) {
  4780. ['id', 'class', 'animation'].forEach(function (a) {
  4781. return options.hasOwnProperty(a) && element.setAttribute(a, options[a]);
  4782. });
  4783. if (options.modifier) {
  4784. util$1.addModifier(element, options.modifier);
  4785. }
  4786. };
  4787. var _normalizeArguments = function _normalizeArguments(message) {
  4788. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  4789. var defaults$$1 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  4790. options = _extends({}, options);
  4791. typeof message === 'string' ? options.message = message : options = message;
  4792. if (!options || !options.message && !options.messageHTML) {
  4793. util$1.throw('Notifications must contain a message');
  4794. }
  4795. if (options.hasOwnProperty('buttonLabels') || options.hasOwnProperty('buttonLabel')) {
  4796. options.buttonLabels = options.buttonLabels || options.buttonLabel;
  4797. if (!Array.isArray(options.buttonLabels)) {
  4798. options.buttonLabels = [options.buttonLabels || ''];
  4799. }
  4800. }
  4801. return util$1.extend({
  4802. compile: function compile(param) {
  4803. return param;
  4804. },
  4805. callback: function callback(param) {
  4806. return param;
  4807. },
  4808. animation: 'default',
  4809. cancelable: false,
  4810. primaryButtonIndex: (options.buttonLabels || defaults$$1.buttonLabels || []).length - 1
  4811. }, defaults$$1, options);
  4812. };
  4813. /**
  4814. * @object ons.notification
  4815. * @category dialog
  4816. * @tutorial vanilla/Reference/notification
  4817. * @description
  4818. * [en]
  4819. * Utility methods to create different kinds of notifications. There are three methods available:
  4820. *
  4821. * * `ons.notification.alert()`
  4822. * * `ons.notification.confirm()`
  4823. * * `ons.notification.prompt()`
  4824. * * `ons.notification.toast()`
  4825. *
  4826. * It will automatically display a Material Design dialog on Android devices.
  4827. * [/en]
  4828. * [ja]いくつかの種類のアラートダイアログを作成するためのユーティリティメソッドを収めたオブジェクトです。[/ja]
  4829. * @example
  4830. * ons.notification.alert('Hello, world!');
  4831. *
  4832. * ons.notification.confirm('Are you ready?')
  4833. * .then(
  4834. * function(answer) {
  4835. * if (answer === 1) {
  4836. * ons.notification.alert('Let\'s go!');
  4837. * }
  4838. * }
  4839. * );
  4840. *
  4841. * ons.notification.prompt('How old are ?')
  4842. * .then(
  4843. * function(age) {
  4844. * ons.notification.alert('You are ' + age + ' years old.');
  4845. * }
  4846. * );
  4847. */
  4848. var notification = {};
  4849. notification._createAlertDialog = function () {
  4850. for (var _len = arguments.length, params = Array(_len), _key = 0; _key < _len; _key++) {
  4851. params[_key] = arguments[_key];
  4852. }
  4853. return new Promise(function (resolve) {
  4854. var options = _normalizeArguments.apply(undefined, params);
  4855. util$1.checkMissingImport('AlertDialog', 'AlertDialogButton');
  4856. // Prompt input string
  4857. var inputString = '';
  4858. if (options.isPrompt) {
  4859. inputString = '\n <input\n class="text-input text-input--underbar"\n type="' + (options.inputType || 'text') + '"\n placeholder="' + (options.placeholder || '') + '"\n value="' + (options.defaultValue || '') + '"\n style="width: 100%; margin-top: 10px;"\n />\n ';
  4860. }
  4861. // Buttons string
  4862. var buttons = '';
  4863. options.buttonLabels.forEach(function (label, index) {
  4864. buttons += '\n <ons-alert-dialog-button\n class="\n ' + (index === options.primaryButtonIndex ? ' alert-dialog-button--primal' : '') + '\n ' + (options.buttonLabels.length <= 2 ? ' alert-dialog-button--rowfooter' : '') + '\n "\n style="position: relative;">\n ' + label + '\n </ons-alert-dialog-button>\n ';
  4865. });
  4866. // Dialog Element
  4867. var el = {};
  4868. var _destroyDialog = function _destroyDialog() {
  4869. if (el.dialog.onDialogCancel) {
  4870. el.dialog.removeEventListener('dialog-cancel', el.dialog.onDialogCancel);
  4871. }
  4872. Object.keys(el).forEach(function (key) {
  4873. return delete el[key];
  4874. });
  4875. el = null;
  4876. if (options.destroy instanceof Function) {
  4877. options.destroy();
  4878. }
  4879. };
  4880. el.dialog = document.createElement('ons-alert-dialog');
  4881. el.dialog.innerHTML = '\n <div class="alert-dialog-mask"\n style="\n ' + (options.maskColor ? 'background-color: ' + options.maskColor : '') + '\n "></div>\n <div class="alert-dialog">\n <div class="alert-dialog-container">\n <div class="alert-dialog-title">\n ' + (options.title || '') + '\n </div>\n <div class="alert-dialog-content">\n ' + (options.message || options.messageHTML) + '\n ' + inputString + '\n </div>\n <div class="\n alert-dialog-footer\n ' + (options.buttonLabels.length <= 2 ? ' alert-dialog-footer--rowfooter' : '') + '\n ">\n ' + buttons + '\n </div>\n </div>\n </div>\n ';
  4882. contentReady(el.dialog);
  4883. // Set attributes
  4884. _setAttributes(el.dialog, options);
  4885. // Prompt events
  4886. if (options.isPrompt && options.submitOnEnter) {
  4887. el.input = el.dialog.querySelector('.text-input');
  4888. el.input.onkeypress = function (event) {
  4889. if (event.keyCode === 13) {
  4890. el.dialog.hide().then(function () {
  4891. if (el) {
  4892. var resolveValue = el.input.value;
  4893. _destroyDialog();
  4894. options.callback(resolveValue);
  4895. resolve(resolveValue);
  4896. }
  4897. });
  4898. }
  4899. };
  4900. }
  4901. // Button events
  4902. el.footer = el.dialog.querySelector('.alert-dialog-footer');
  4903. util$1.arrayFrom(el.dialog.querySelectorAll('.alert-dialog-button')).forEach(function (buttonElement, index) {
  4904. buttonElement.onclick = function () {
  4905. el.dialog.hide().then(function () {
  4906. if (el) {
  4907. var resolveValue = index;
  4908. if (options.isPrompt) {
  4909. resolveValue = index === options.primaryButtonIndex ? el.input.value : null;
  4910. }
  4911. el.dialog.remove();
  4912. _destroyDialog();
  4913. options.callback(resolveValue);
  4914. resolve(resolveValue);
  4915. }
  4916. });
  4917. };
  4918. el.footer.appendChild(buttonElement);
  4919. });
  4920. // Cancel events
  4921. if (options.cancelable) {
  4922. el.dialog.cancelable = true;
  4923. el.dialog.onDialogCancel = function () {
  4924. setImmediate(function () {
  4925. el.dialog.remove();
  4926. _destroyDialog();
  4927. });
  4928. var resolveValue = options.isPrompt ? null : -1;
  4929. options.callback(resolveValue);
  4930. resolve(resolveValue);
  4931. };
  4932. el.dialog.addEventListener('dialog-cancel', el.dialog.onDialogCancel, false);
  4933. }
  4934. // Show dialog
  4935. document.body.appendChild(el.dialog);
  4936. options.compile(el.dialog);
  4937. setImmediate(function () {
  4938. el.dialog.show().then(function () {
  4939. if (el.input && options.isPrompt && options.autofocus) {
  4940. var strLength = el.input.value.length;
  4941. el.input.focus();
  4942. el.input.setSelectionRange(strLength, strLength);
  4943. }
  4944. });
  4945. });
  4946. });
  4947. };
  4948. /**
  4949. * @method alert
  4950. * @signature alert(message [, options] | options)
  4951. * @return {Promise}
  4952. * [en]Will resolve to the index of the button that was pressed or `-1` when canceled.[/en]
  4953. * [ja][/ja]
  4954. * @param {String} message
  4955. * [en]Notification message. This argument is optional but if it's not defined either `options.message` or `options.messageHTML` must be defined instead.[/en]
  4956. * [ja][/ja]
  4957. * @param {Object} options
  4958. * [en]Parameter object.[/en]
  4959. * [ja]オプションを指定するオブジェクトです。[/ja]
  4960. * @param {String} [options.message]
  4961. * [en]Notification message.[/en]
  4962. * [ja]アラートダイアログに表示する文字列を指定します。[/ja]
  4963. * @param {String} [options.messageHTML]
  4964. * [en]Notification message in HTML.[/en]
  4965. * [ja]アラートダイアログに表示するHTMLを指定します。[/ja]
  4966. * @param {String | Array} [options.buttonLabels]
  4967. * [en]Labels for the buttons. Default is `"OK"`.[/en]
  4968. * [ja]確認ボタンのラベルを指定します。"OK"がデフォルトです。[/ja]
  4969. * @param {Number} [options.primaryButtonIndex]
  4970. * [en]Index of primary button. Default is the last one.[/en]
  4971. * [ja]プライマリボタンのインデックスを指定します。デフォルトは 0 です。[/ja]
  4972. * @param {Boolean} [options.cancelable]
  4973. * [en]Whether the dialog is cancelable or not. Default is `false`. If the dialog is cancelable it can be closed by clicking the background or pressing the Android back button.[/en]
  4974. * [ja]ダイアログがキャンセル可能かどうかを指定します。[/ja]
  4975. * @param {String} [options.animation]
  4976. * [en]Animation name. Available animations are `none` and `fade`. Default is `fade`.[/en]
  4977. * [ja]アラートダイアログを表示する際のアニメーション名を指定します。"none", "fade"のいずれかを指定できます。[/ja]
  4978. * @param {String} [options.id]
  4979. * [en]The `<ons-alert-dialog>` element's ID.[/en]
  4980. * [ja]ons-alert-dialog要素のID。[/ja]
  4981. * @param {String} [options.class]
  4982. * [en]The `<ons-alert-dialog>` element's class.[/en]
  4983. * [ja]ons-alert-dialog要素のclass。[/ja]
  4984. * @param {String} [options.title]
  4985. * [en]Dialog title. Default is `"Alert"`.[/en]
  4986. * [ja]アラートダイアログの上部に表示するタイトルを指定します。"Alert"がデフォルトです。[/ja]
  4987. * @param {String} [options.modifier]
  4988. * [en]Modifier for the dialog.[/en]
  4989. * [ja]アラートダイアログのmodifier属性の値を指定します。[/ja]
  4990. * @param {String} [options.maskColor]
  4991. * [en]Color of the background mask. Default is "rgba(0, 0, 0, 0.2)" ("rgba(0, 0, 0, 0.3)" for Material).[/en]
  4992. * [ja]背景のマスクの色を指定します。"rgba(0, 0, 0, 0.2)"がデフォルト値です。[/ja]
  4993. * @param {Function} [options.callback]
  4994. * [en]Function that executes after dialog has been closed.[/en]
  4995. * [ja]アラートダイアログが閉じられた時に呼び出される関数オブジェクトを指定します。[/ja]
  4996. * @description
  4997. * [en]
  4998. * Display an alert dialog to show the user a message.
  4999. *
  5000. * The content of the message can be either simple text or HTML.
  5001. *
  5002. * It can be called in the following ways:
  5003. *
  5004. * ```
  5005. * ons.notification.alert(message, options);
  5006. * ons.notification.alert(options);
  5007. * ```
  5008. *
  5009. * Must specify either `message` or `messageHTML`.
  5010. * [/en]
  5011. * [ja]
  5012. * ユーザーへメッセージを見せるためのアラートダイアログを表示します。
  5013. * 表示するメッセージは、テキストかもしくはHTMLを指定できます。
  5014. * このメソッドの引数には、options.messageもしくはoptions.messageHTMLのどちらかを必ず指定する必要があります。
  5015. * [/ja]
  5016. */
  5017. notification.alert = function (message, options) {
  5018. return notification._createAlertDialog(message, options, {
  5019. buttonLabels: ['OK'],
  5020. title: 'Alert'
  5021. });
  5022. };
  5023. /**
  5024. * @method confirm
  5025. * @signature confirm(message [, options] | options)
  5026. * @return {Promise}
  5027. * [en]Will resolve to the index of the button that was pressed or `-1` when canceled.[/en]
  5028. * [ja][/ja]
  5029. * @param {String} message
  5030. * [en]Notification message. This argument is optional but if it's not defined either `options.message` or `options.messageHTML` must be defined instead.[/en]
  5031. * [ja][/ja]
  5032. * @param {Object} options
  5033. * [en]Parameter object.[/en]
  5034. * @param {Array} [options.buttonLabels]
  5035. * [en]Labels for the buttons. Default is `["Cancel", "OK"]`.[/en]
  5036. * [ja]ボタンのラベルの配列を指定します。["Cancel", "OK"]がデフォルトです。[/ja]
  5037. * @param {Number} [options.primaryButtonIndex]
  5038. * [en]Index of primary button. Default is the last one.[/en]
  5039. * [ja]プライマリボタンのインデックスを指定します。デフォルトは 1 です。[/ja]
  5040. * @description
  5041. * [en]
  5042. * Display a dialog to ask the user for confirmation. Extends `alert()` parameters.
  5043. * The default button labels are `"Cancel"` and `"OK"` but they can be customized.
  5044. *
  5045. * It can be called in the following ways:
  5046. *
  5047. * ```
  5048. * ons.notification.confirm(message, options);
  5049. * ons.notification.confirm(options);
  5050. * ```
  5051. *
  5052. * Must specify either `message` or `messageHTML`.
  5053. * [/en]
  5054. * [ja]
  5055. * ユーザに確認を促すダイアログを表示します。
  5056. * デオルとのボタンラベルは、"Cancel"と"OK"ですが、これはこのメソッドの引数でカスタマイズできます。
  5057. * このメソッドの引数には、options.messageもしくはoptions.messageHTMLのどちらかを必ず指定する必要があります。
  5058. * [/ja]
  5059. */
  5060. notification.confirm = function (message, options) {
  5061. return notification._createAlertDialog(message, options, {
  5062. buttonLabels: ['Cancel', 'OK'],
  5063. title: 'Confirm'
  5064. });
  5065. };
  5066. /**
  5067. * @method prompt
  5068. * @signature prompt(message [, options] | options)
  5069. * @param {String} message
  5070. * [en]Notification message. This argument is optional but if it's not defined either `options.message` or `options.messageHTML` must be defined instead.[/en]
  5071. * [ja][/ja]
  5072. * @return {Promise}
  5073. * [en]Will resolve to the input value when the dialog is closed or `null` when canceled.[/en]
  5074. * [ja][/ja]
  5075. * @param {Object} options
  5076. * [en]Parameter object.[/en]
  5077. * [ja]オプションを指定するオブジェクトです。[/ja]
  5078. * @param {String | Array} [options.buttonLabels]
  5079. * [en]Labels for the buttons. Default is `"OK"`.[/en]
  5080. * [ja]確認ボタンのラベルを指定します。"OK"がデフォルトです。[/ja]
  5081. * @param {Number} [options.primaryButtonIndex]
  5082. * [en]Index of primary button. Default is the last one.[/en]
  5083. * [ja]プライマリボタンのインデックスを指定します。デフォルトは 0 です。[/ja]
  5084. * @param {String} [options.placeholder]
  5085. * [en]Placeholder for the text input.[/en]
  5086. * [ja]テキスト欄のプレースホルダに表示するテキストを指定します。[/ja]
  5087. * @param {String} [options.defaultValue]
  5088. * [en]Default value for the text input.[/en]
  5089. * [ja]テキスト欄のデフォルトの値を指定します。[/ja]
  5090. * @param {String} [options.inputType]
  5091. * [en]Type of the input element (`password`, `date`...). Default is `text`.[/en]
  5092. * [ja][/ja]
  5093. * @param {Boolean} [options.autofocus]
  5094. * [en]Autofocus the input element. Default is `true`. In Cordova, `KeyboardDisplayRequiresUserAction` in `config.xml` must be `false` to activate this feature.[/en]
  5095. * [ja]input要素に自動的にフォーカスするかどうかを指定します。デフォルトはtrueです。Cordova環境では、この機能を有効にするためには `config.xml` で `KeyboardDisplayRequiresUserAction` を `false` に設定する必要があります。[/ja]
  5096. * @param {Boolean} [options.submitOnEnter]
  5097. * [en]Submit automatically when enter is pressed. Default is `true`.[/en]
  5098. * [ja]Enterが押された際にそのformをsubmitするかどうかを指定します。デフォルトはtrueです。[/ja]
  5099. * @description
  5100. * [en]
  5101. * Display a dialog with a prompt to ask the user a question. Extends `alert()` parameters.
  5102. *
  5103. * It can be called in the following ways:
  5104. *
  5105. * ```
  5106. * ons.notification.prompt(message, options);
  5107. * ons.notification.prompt(options);
  5108. * ```
  5109. *
  5110. * Must specify either `message` or `messageHTML`.
  5111. * [/en]
  5112. * [ja]
  5113. * ユーザーに入力を促すダイアログを表示します。
  5114. * このメソッドの引数には、options.messageもしくはoptions.messageHTMLのどちらかを必ず指定する必要があります。
  5115. * [/ja]
  5116. */
  5117. notification.prompt = function (message, options) {
  5118. return notification._createAlertDialog(message, options, {
  5119. buttonLabels: ['OK'],
  5120. title: 'Alert',
  5121. isPrompt: true,
  5122. autofocus: true,
  5123. submitOnEnter: true
  5124. });
  5125. };
  5126. /**
  5127. * @method toast
  5128. * @signature toast(message [, options] | options)
  5129. * @return {Promise}
  5130. * [en]Will resolve when the toast is hidden.[/en]
  5131. * [ja][/ja]
  5132. * @param {String} message
  5133. * [en]Toast message. This argument is optional but if it's not defined then `options.message` must be defined instead.[/en]
  5134. * [ja][/ja]
  5135. * @param {Object} options
  5136. * [en]Parameter object.[/en]
  5137. * [ja]オプションを指定するオブジェクトです。[/ja]
  5138. * @param {String} [options.message]
  5139. * [en]Notification message.[/en]
  5140. * [ja]トーストに表示する文字列を指定します。[/ja]
  5141. * @param {String} [options.buttonLabel]
  5142. * [en]Label for the button.[/en]
  5143. * [ja]確認ボタンのラベルを指定します。[/ja]
  5144. * @param {String} [options.animation]
  5145. * [en]Animation name. Available animations are `none`, `fade`, `ascend`, `lift` and `fall`. Default is `ascend` for Android and `lift` for iOS.[/en]
  5146. * [ja]トーストを表示する際のアニメーション名を指定します。"none", "fade", "ascend", "lift", "fall"のいずれかを指定できます。[/ja]
  5147. * @param {Number} [options.timeout]
  5148. * [en]Number of miliseconds where the toast is visible before hiding automatically.[/en]
  5149. * [ja][/ja]
  5150. * @param {Boolean} [options.force]
  5151. * [en]If `true`, the toast skips the notification queue and is shown immediately. Defaults to `false`.[/en]
  5152. * [ja][/ja]
  5153. * @param {String} [options.id]
  5154. * [en]The `<ons-toast>` element's ID.[/en]
  5155. * [ja]ons-toast要素のID。[/ja]
  5156. * @param {String} [options.class]
  5157. * [en]The `<ons-toast>` element's class.[/en]
  5158. * [ja]ons-toast要素のclass。[/ja]
  5159. * @param {String} [options.modifier]
  5160. * [en]Modifier for the element.[/en]
  5161. * [ja]トーストのmodifier属性の値を指定します。[/ja]
  5162. * @param {Function} [options.callback]
  5163. * [en]Function that executes after toast has been hidden.[/en]
  5164. * [ja]トーストが閉じられた時に呼び出される関数オブジェクトを指定します。[/ja]
  5165. * @description
  5166. * [en]
  5167. * Display a simple notification toast with an optional button that can be used for simple actions.
  5168. *
  5169. * It can be called in the following ways:
  5170. *
  5171. * ```
  5172. * ons.notification.toast(message, options);
  5173. * ons.notification.toast(options);
  5174. * ```
  5175. * [/en]
  5176. * [ja][/ja]
  5177. */
  5178. notification.toast = function (message, options) {
  5179. var promise = new Promise(function (resolve) {
  5180. util$1.checkMissingImport('Toast'); // Throws error, must be inside promise
  5181. options = _normalizeArguments(message, options, {
  5182. timeout: 0,
  5183. force: false
  5184. });
  5185. var toast = util$1.createElement('\n <ons-toast>\n ' + options.message + '\n ' + (options.buttonLabels ? '<button>' + options.buttonLabels[0] + '</button>' : '') + '\n </ons-toast>\n ');
  5186. _setAttributes(toast, options);
  5187. var finish = function finish(value) {
  5188. if (toast) {
  5189. toast.hide().then(function () {
  5190. if (toast) {
  5191. toast.remove();
  5192. toast = null;
  5193. options.callback(value);
  5194. resolve(value);
  5195. }
  5196. });
  5197. }
  5198. };
  5199. if (options.buttonLabels) {
  5200. util$1.findChild(toast._toast, 'button').onclick = function () {
  5201. return finish(0);
  5202. };
  5203. }
  5204. document.body.appendChild(toast);
  5205. options.compile(toast);
  5206. var show = function show() {
  5207. toast.parentElement && toast.show(options).then(function () {
  5208. if (options.timeout) {
  5209. setTimeout(function () {
  5210. return finish(-1);
  5211. }, options.timeout);
  5212. }
  5213. });
  5214. };
  5215. setImmediate(function () {
  5216. return options.force ? show() : ToastQueue$1.add(show, promise);
  5217. });
  5218. });
  5219. return promise;
  5220. };
  5221. /*
  5222. Copyright 2013-2015 ASIAL CORPORATION
  5223. Licensed under the Apache License, Version 2.0 (the "License");
  5224. you may not use this file except in compliance with the License.
  5225. You may obtain a copy of the License at
  5226. http://www.apache.org/licenses/LICENSE-2.0
  5227. Unless required by applicable law or agreed to in writing, software
  5228. distributed under the License is distributed on an "AS IS" BASIS,
  5229. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5230. See the License for the specific language governing permissions and
  5231. limitations under the License.
  5232. */
  5233. // Validate parameters
  5234. var checkOptions = function checkOptions(options) {
  5235. var err = function err(prop) {
  5236. var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Function';
  5237. return util$1.throw('"options.' + prop + '" must be an instance of ' + type);
  5238. };
  5239. var hasOwnProperty = function hasOwnProperty(prop) {
  5240. return Object.hasOwnProperty.call(options, prop);
  5241. };
  5242. var instanceOf = function instanceOf(prop) {
  5243. var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Function;
  5244. return options[prop] instanceof type;
  5245. };
  5246. var b = 'buttons',
  5247. cb = 'callback',
  5248. c = 'compile',
  5249. d = 'destroy';
  5250. (!hasOwnProperty(b) || !instanceOf(b, Array)) && err(b, 'Array');
  5251. hasOwnProperty(cb) && !instanceOf(cb) && err(cb);
  5252. hasOwnProperty(c) && !instanceOf(c) && err(c);
  5253. hasOwnProperty(d) && !instanceOf(d) && err(d);
  5254. };
  5255. // Action Sheet
  5256. var actionSheet = (function () {
  5257. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  5258. return new Promise(function (resolve) {
  5259. util$1.checkMissingImport('ActionSheet');
  5260. checkOptions(options);
  5261. // Main component
  5262. var actionSheet = util$1.createElement('\n <ons-action-sheet\n ' + (options.title ? 'title="' + options.title + '"' : '') + '\n ' + (options.cancelable ? 'cancelable' : '') + '\n ' + (options.modifier ? 'modifier="' + options.modifier + '"' : '') + '\n ' + (options.maskColor ? 'mask-color="' + options.maskColor + '"' : '') + '\n ' + (options.id ? 'id="' + options.id + '"' : '') + '\n ' + (options.class ? 'class="' + options.class + '"' : '') + '\n >\n <div class="action-sheet"></div>\n </ons-action-sheet>\n ');
  5263. // Resolve action and clean up
  5264. var finish = function finish(event) {
  5265. var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
  5266. if (actionSheet) {
  5267. options.destroy && options.destroy(actionSheet);
  5268. actionSheet.removeEventListener('dialog-cancel', finish, false);
  5269. actionSheet.remove();
  5270. actionSheet = null;
  5271. options.callback && options.callback(index);
  5272. resolve(index);
  5273. }
  5274. };
  5275. // Link cancel handler
  5276. actionSheet.addEventListener('dialog-cancel', finish, false);
  5277. // Create buttons and link action handler
  5278. var buttons = document.createDocumentFragment();
  5279. options.buttons.forEach(function (item, index) {
  5280. var buttonOptions = typeof item === 'string' ? { label: item } : _extends({}, item);
  5281. if (options.destructive === index) {
  5282. buttonOptions.modifier = (buttonOptions.modifier || '') + ' destructive';
  5283. }
  5284. var button = util$1.createElement('\n <ons-action-sheet-button\n ' + (buttonOptions.icon ? 'icon="' + buttonOptions.icon + '"' : '') + '\n ' + (buttonOptions.modifier ? 'modifier="' + buttonOptions.modifier + '"' : '') + '\n >\n ' + buttonOptions.label + '\n </ons-action-sheet-button>\n ');
  5285. button.onclick = function (event) {
  5286. return actionSheet.hide().then(function () {
  5287. return finish(event, index);
  5288. });
  5289. };
  5290. buttons.appendChild(button);
  5291. });
  5292. // Finish component and attach
  5293. util$1.findChild(actionSheet, '.action-sheet').appendChild(buttons);
  5294. document.body.appendChild(actionSheet);
  5295. options.compile && options.compile(el.dialog);
  5296. // Show
  5297. setImmediate(function () {
  5298. return actionSheet.show({
  5299. animation: options.animation,
  5300. animationOptions: options.animationOptions
  5301. });
  5302. });
  5303. });
  5304. });
  5305. /**
  5306. * MicroEvent - to make any js object an event emitter (server or browser)
  5307. *
  5308. * - pure javascript - server compatible, browser compatible
  5309. * - dont rely on the browser doms
  5310. * - super simple - you get it immediately, no mystery, no magic involved
  5311. *
  5312. * - create a MicroEventDebug with goodies to debug
  5313. * - make it safer to use
  5314. */
  5315. /** NOTE: This library is customized for Onsen UI. */
  5316. var MicroEvent = function MicroEvent() {};
  5317. MicroEvent.prototype = {
  5318. on: function on(event, fct) {
  5319. this._events = this._events || {};
  5320. this._events[event] = this._events[event] || [];
  5321. this._events[event].push(fct);
  5322. },
  5323. once: function once(event, fct) {
  5324. var self = this;
  5325. var wrapper = function wrapper() {
  5326. self.off(event, wrapper);
  5327. return fct.apply(null, arguments);
  5328. };
  5329. this.on(event, wrapper);
  5330. },
  5331. off: function off(event, fct) {
  5332. this._events = this._events || {};
  5333. if (event in this._events === false) {
  5334. return;
  5335. }
  5336. this._events[event] = this._events[event].filter(function (_fct) {
  5337. if (fct) {
  5338. return fct !== _fct;
  5339. } else {
  5340. return false;
  5341. }
  5342. });
  5343. },
  5344. emit: function emit(event /* , args... */) {
  5345. this._events = this._events || {};
  5346. if (event in this._events === false) {
  5347. return;
  5348. }
  5349. for (var i = 0; i < this._events[event].length; i++) {
  5350. this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));
  5351. }
  5352. }
  5353. };
  5354. /**
  5355. * mixin will delegate all MicroEvent.js function in the destination object
  5356. *
  5357. * - require('MicroEvent').mixin(Foobar) will make Foobar able to use MicroEvent
  5358. *
  5359. * @param {Object} the object which will support MicroEvent
  5360. */
  5361. MicroEvent.mixin = function (destObject) {
  5362. var props = ['on', 'once', 'off', 'emit'];
  5363. for (var i = 0; i < props.length; i++) {
  5364. if (typeof destObject === 'function') {
  5365. destObject.prototype[props[i]] = MicroEvent.prototype[props[i]];
  5366. } else {
  5367. destObject[props[i]] = MicroEvent.prototype[props[i]];
  5368. }
  5369. }
  5370. };
  5371. window.MicroEvent = MicroEvent;
  5372. /*
  5373. Copyright 2013-2015 ASIAL CORPORATION
  5374. Licensed under the Apache License, Version 2.0 (the "License");
  5375. you may not use this file except in compliance with the License.
  5376. You may obtain a copy of the License at
  5377. http://www.apache.org/licenses/LICENSE-2.0
  5378. Unless required by applicable law or agreed to in writing, software
  5379. distributed under the License is distributed on an "AS IS" BASIS,
  5380. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5381. See the License for the specific language governing permissions and
  5382. limitations under the License.
  5383. */
  5384. var create = function create() {
  5385. /**
  5386. * @object ons.orientation
  5387. * @category util
  5388. * @description
  5389. * [en]Utility methods for orientation detection.[/en]
  5390. * [ja]画面のオリエンテーション検知のためのユーティリティメソッドを収めているオブジェクトです。[/ja]
  5391. */
  5392. var obj = {
  5393. /**
  5394. * @event change
  5395. * @description
  5396. * [en]Fired when the device orientation changes.[/en]
  5397. * [ja]デバイスのオリエンテーションが変化した際に発火します。[/ja]
  5398. * @param {Object} event
  5399. * [en]Event object.[/en]
  5400. * [ja]イベントオブジェクトです。[/ja]
  5401. * @param {Boolean} event.isPortrait
  5402. * [en]Will be true if the current orientation is portrait mode.[/en]
  5403. * [ja]現在のオリエンテーションがportraitの場合にtrueを返します。[/ja]
  5404. */
  5405. /**
  5406. * @method on
  5407. * @signature on(eventName, listener)
  5408. * @description
  5409. * [en]Add an event listener.[/en]
  5410. * [ja]イベントリスナーを追加します。[/ja]
  5411. * @param {String} eventName
  5412. * [en]Name of the event.[/en]
  5413. * [ja]イベント名を指定します。[/ja]
  5414. * @param {Function} listener
  5415. * [en]Function to execute when the event is triggered.[/en]
  5416. * [ja]このイベントが発火された際に呼び出される関数オブジェクトを指定します。[/ja]
  5417. */
  5418. /**
  5419. * @method once
  5420. * @signature once(eventName, listener)
  5421. * @description
  5422. * [en]Add an event listener that's only triggered once.[/en]
  5423. * [ja]一度だけ呼び出されるイベントリスナーを追加します。[/ja]
  5424. * @param {String} eventName
  5425. * [en]Name of the event.[/en]
  5426. * [ja]イベント名を指定します。[/ja]
  5427. * @param {Function} listener
  5428. * [en]Function to execute when the event is triggered.[/en]
  5429. * [ja]イベントが発火した際に呼び出される関数オブジェクトを指定します。[/ja]
  5430. */
  5431. /**
  5432. * @method off
  5433. * @signature off(eventName, [listener])
  5434. * @description
  5435. * [en]Remove an event listener. If the listener is not specified all listeners for the event type will be removed.[/en]
  5436. * [ja]イベントリスナーを削除します。もしイベントリスナーを指定しなかった場合には、そのイベントに紐づく全てのイベントリスナーが削除されます。[/ja]
  5437. * @param {String} eventName
  5438. * [en]Name of the event.[/en]
  5439. * [ja]イベント名を指定します。[/ja]
  5440. * @param {Function} listener
  5441. * [en]Function to execute when the event is triggered.[/en]
  5442. * [ja]削除するイベントリスナーを指定します。[/ja]
  5443. */
  5444. // actual implementation to detect if whether current screen is portrait or not
  5445. _isPortrait: false,
  5446. /**
  5447. * @method isPortrait
  5448. * @signature isPortrait()
  5449. * @return {Boolean}
  5450. * [en]Will be true if the current orientation is portrait mode.[/en]
  5451. * [ja]オリエンテーションがportraitモードの場合にtrueになります。[/ja]
  5452. * @description
  5453. * [en]Returns whether the current screen orientation is portrait or not.[/en]
  5454. * [ja]オリエンテーションがportraitモードかどうかを返します。[/ja]
  5455. */
  5456. isPortrait: function isPortrait() {
  5457. return this._isPortrait();
  5458. },
  5459. /**
  5460. * @method isLandscape
  5461. * @signature isLandscape()
  5462. * @return {Boolean}
  5463. * [en]Will be true if the current orientation is landscape mode.[/en]
  5464. * [ja]オリエンテーションがlandscapeモードの場合にtrueになります。[/ja]
  5465. * @description
  5466. * [en]Returns whether the current screen orientation is landscape or not.[/en]
  5467. * [ja]オリエンテーションがlandscapeモードかどうかを返します。[/ja]
  5468. */
  5469. isLandscape: function isLandscape() {
  5470. return !this.isPortrait();
  5471. },
  5472. _init: function _init() {
  5473. document.addEventListener('DOMContentLoaded', this._onDOMContentLoaded.bind(this), false);
  5474. if ('orientation' in window) {
  5475. window.addEventListener('orientationchange', this._onOrientationChange.bind(this), false);
  5476. } else {
  5477. window.addEventListener('resize', this._onResize.bind(this), false);
  5478. }
  5479. this._isPortrait = function () {
  5480. return window.innerHeight > window.innerWidth;
  5481. };
  5482. return this;
  5483. },
  5484. _onDOMContentLoaded: function _onDOMContentLoaded() {
  5485. this._installIsPortraitImplementation();
  5486. this.emit('change', { isPortrait: this.isPortrait() });
  5487. },
  5488. _installIsPortraitImplementation: function _installIsPortraitImplementation() {
  5489. var isPortrait = window.innerWidth < window.innerHeight;
  5490. if (!('orientation' in window)) {
  5491. this._isPortrait = function () {
  5492. return window.innerHeight > window.innerWidth;
  5493. };
  5494. } else if (window.orientation % 180 === 0) {
  5495. this._isPortrait = function () {
  5496. return Math.abs(window.orientation % 180) === 0 ? isPortrait : !isPortrait;
  5497. };
  5498. } else {
  5499. this._isPortrait = function () {
  5500. return Math.abs(window.orientation % 180) === 90 ? isPortrait : !isPortrait;
  5501. };
  5502. }
  5503. },
  5504. _onOrientationChange: function _onOrientationChange() {
  5505. var _this = this;
  5506. var isPortrait = this._isPortrait();
  5507. // Wait for the dimensions to change because
  5508. // of Android inconsistency.
  5509. var nIter = 0;
  5510. var interval = setInterval(function () {
  5511. nIter++;
  5512. var w = window.innerWidth;
  5513. var h = window.innerHeight;
  5514. if (isPortrait && w <= h || !isPortrait && w >= h) {
  5515. _this.emit('change', { isPortrait: isPortrait });
  5516. clearInterval(interval);
  5517. } else if (nIter === 50) {
  5518. _this.emit('change', { isPortrait: isPortrait });
  5519. clearInterval(interval);
  5520. }
  5521. }, 20);
  5522. },
  5523. // Run on not mobile browser.
  5524. _onResize: function _onResize() {
  5525. this.emit('change', { isPortrait: this.isPortrait() });
  5526. }
  5527. };
  5528. MicroEvent.mixin(obj);
  5529. return obj;
  5530. };
  5531. var orientation = create()._init();
  5532. /*
  5533. Copyright 2013-2015 ASIAL CORPORATION
  5534. Licensed under the Apache License, Version 2.0 (the "License");
  5535. you may not use this file except in compliance with the License.
  5536. You may obtain a copy of the License at
  5537. http://www.apache.org/licenses/LICENSE-2.0
  5538. Unless required by applicable law or agreed to in writing, software
  5539. distributed under the License is distributed on an "AS IS" BASIS,
  5540. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5541. See the License for the specific language governing permissions and
  5542. limitations under the License.
  5543. */
  5544. /**
  5545. * @object ons.modifier
  5546. * @category visual
  5547. * @description
  5548. * [en]
  5549. * Utility methods to change modifier attributes of Onsen UI elements..
  5550. * [/en]
  5551. * [ja][/ja]
  5552. * @example
  5553. * ons.modifier.add(myOnsInputElement, 'underbar');
  5554. * ons.modifier.toggle(myOnsToastElement, 'custom-modifier');
  5555. *
  5556. */
  5557. var modifier = {
  5558. /**
  5559. * @method add
  5560. * @signature add(element, modifier [, modifier])
  5561. * @description
  5562. * [en]Add the specified modifiers to the element if they are not already included.[/en]
  5563. * [ja][/ja]
  5564. * @param {HTMLElement} element
  5565. * [en]Target element.[/en]
  5566. * [ja][/ja]
  5567. * @param {String} modifier
  5568. * [en]Name of the modifier.[/en]
  5569. * [ja][/ja]
  5570. */
  5571. add: function add(element) {
  5572. for (var _len = arguments.length, modifiers = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  5573. modifiers[_key - 1] = arguments[_key];
  5574. }
  5575. return modifiers.forEach(function (modifier) {
  5576. return util$1.addModifier(element, modifier);
  5577. });
  5578. },
  5579. /**
  5580. * @method remove
  5581. * @signature remove(element, modifier [, modifier])
  5582. * @description
  5583. * [en]Remove the specified modifiers from the element if they are included.[/en]
  5584. * [ja][/ja]
  5585. * @param {HTMLElement} element
  5586. * [en]Target element.[/en]
  5587. * [ja][/ja]
  5588. * @param {String} modifier
  5589. * [en]Name of the modifier.[/en]
  5590. * [ja][/ja]
  5591. */
  5592. remove: function remove(element) {
  5593. for (var _len2 = arguments.length, modifiers = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  5594. modifiers[_key2 - 1] = arguments[_key2];
  5595. }
  5596. return modifiers.forEach(function (modifier) {
  5597. return util$1.removeModifier(element, modifier);
  5598. });
  5599. },
  5600. /**
  5601. * @method contains
  5602. * @signature contains(element, modifier)
  5603. * @description
  5604. * [en]Check whether the specified modifier is included in the element.[/en]
  5605. * [ja][/ja]
  5606. * @param {HTMLElement} element
  5607. * [en]Target element.[/en]
  5608. * [ja][/ja]
  5609. * @param {String} modifier
  5610. * [en]Name of the modifier.[/en]
  5611. * [ja][/ja]
  5612. * @return {Boolean}
  5613. * [en]`true` when the specified modifier is found in the element's `modifier` attribute. `false` otherwise.[/en]
  5614. * [ja][/ja]
  5615. */
  5616. contains: util$1.hasModifier,
  5617. /**
  5618. * @method toggle
  5619. * @signature toggle(element, modifier [, force])
  5620. * @description
  5621. * [en]Toggle the specified modifier.[/en]
  5622. * [ja][/ja]
  5623. * @param {HTMLElement} element
  5624. * [en]Target element.[/en]
  5625. * [ja][/ja]
  5626. * @param {String} modifier
  5627. * [en]Name of the modifier.[/en]
  5628. * [ja][/ja]
  5629. * @param {String} force
  5630. * [en]If it evaluates to true, add specified modifier value, and if it evaluates to false, remove it.[/en]
  5631. * [ja][/ja]
  5632. */
  5633. toggle: util$1.toggleModifier
  5634. };
  5635. /*
  5636. Copyright 2013-2015 ASIAL CORPORATION
  5637. Licensed under the Apache License, Version 2.0 (the "License");
  5638. you may not use this file except in compliance with the License.
  5639. You may obtain a copy of the License at
  5640. http://www.apache.org/licenses/LICENSE-2.0
  5641. Unless required by applicable law or agreed to in writing, software
  5642. distributed under the License is distributed on an "AS IS" BASIS,
  5643. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5644. See the License for the specific language governing permissions and
  5645. limitations under the License.
  5646. */
  5647. var softwareKeyboard = new MicroEvent();
  5648. softwareKeyboard._visible = false;
  5649. var onShow = function onShow() {
  5650. softwareKeyboard._visible = true;
  5651. softwareKeyboard.emit('show');
  5652. };
  5653. var onHide = function onHide() {
  5654. softwareKeyboard._visible = false;
  5655. softwareKeyboard.emit('hide');
  5656. };
  5657. var bindEvents = function bindEvents() {
  5658. if (typeof Keyboard !== 'undefined') {
  5659. // https://github.com/martinmose/cordova-keyboard/blob/95f3da3a38d8f8e1fa41fbf40145352c13535a00/README.md
  5660. Keyboard.onshow = onShow;
  5661. Keyboard.onhide = onHide;
  5662. softwareKeyboard.emit('init', { visible: Keyboard.isVisible });
  5663. return true;
  5664. } else if (typeof cordova.plugins !== 'undefined' && typeof cordova.plugins.Keyboard !== 'undefined') {
  5665. // https://github.com/driftyco/ionic-plugins-keyboard/blob/ca27ecf/README.md
  5666. window.addEventListener('native.keyboardshow', onShow);
  5667. window.addEventListener('native.keyboardhide', onHide);
  5668. softwareKeyboard.emit('init', { visible: cordova.plugins.Keyboard.isVisible });
  5669. return true;
  5670. }
  5671. return false;
  5672. };
  5673. var noPluginError = function noPluginError() {
  5674. util$1.warn('ons-keyboard: Cordova Keyboard plugin is not present.');
  5675. };
  5676. document.addEventListener('deviceready', function () {
  5677. if (!bindEvents()) {
  5678. if (document.querySelector('[ons-keyboard-active]') || document.querySelector('[ons-keyboard-inactive]')) {
  5679. noPluginError();
  5680. }
  5681. softwareKeyboard.on = noPluginError;
  5682. }
  5683. });
  5684. /*
  5685. Copyright 2013-2015 ASIAL CORPORATION
  5686. Licensed under the Apache License, Version 2.0 (the "License");
  5687. you may not use this file except in compliance with the License.
  5688. You may obtain a copy of the License at
  5689. http://www.apache.org/licenses/LICENSE-2.0
  5690. Unless required by applicable law or agreed to in writing, software
  5691. distributed under the License is distributed on an "AS IS" BASIS,
  5692. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5693. See the License for the specific language governing permissions and
  5694. limitations under the License.
  5695. */
  5696. var generateId = function () {
  5697. var i = 0;
  5698. return function () {
  5699. return i++;
  5700. };
  5701. }();
  5702. /**
  5703. * Door locking system.
  5704. *
  5705. * @param {Object} [options]
  5706. * @param {Function} [options.log]
  5707. */
  5708. var DoorLock = function () {
  5709. function DoorLock() {
  5710. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  5711. classCallCheck(this, DoorLock);
  5712. this._lockList = [];
  5713. this._waitList = [];
  5714. this._log = options.log || function () {};
  5715. }
  5716. /**
  5717. * Register a lock.
  5718. *
  5719. * @return {Function} Callback for unlocking.
  5720. */
  5721. createClass(DoorLock, [{
  5722. key: 'lock',
  5723. value: function lock() {
  5724. var _this = this;
  5725. var unlock = function unlock() {
  5726. _this._unlock(unlock);
  5727. };
  5728. unlock.id = generateId();
  5729. this._lockList.push(unlock);
  5730. this._log('lock: ' + unlock.id);
  5731. return unlock;
  5732. }
  5733. }, {
  5734. key: '_unlock',
  5735. value: function _unlock(fn) {
  5736. var index = this._lockList.indexOf(fn);
  5737. if (index === -1) {
  5738. throw new Error('This function is not registered in the lock list.');
  5739. }
  5740. this._lockList.splice(index, 1);
  5741. this._log('unlock: ' + fn.id);
  5742. this._tryToFreeWaitList();
  5743. }
  5744. }, {
  5745. key: '_tryToFreeWaitList',
  5746. value: function _tryToFreeWaitList() {
  5747. while (!this.isLocked() && this._waitList.length > 0) {
  5748. this._waitList.shift()();
  5749. }
  5750. }
  5751. /**
  5752. * Register a callback for waiting unlocked door.
  5753. *
  5754. * @params {Function} callback Callback on unlocking the door completely.
  5755. */
  5756. }, {
  5757. key: 'waitUnlock',
  5758. value: function waitUnlock(callback) {
  5759. if (!(callback instanceof Function)) {
  5760. throw new Error('The callback param must be a function.');
  5761. }
  5762. if (this.isLocked()) {
  5763. this._waitList.push(callback);
  5764. } else {
  5765. callback();
  5766. }
  5767. }
  5768. /**
  5769. * @return {Boolean}
  5770. */
  5771. }, {
  5772. key: 'isLocked',
  5773. value: function isLocked() {
  5774. return this._lockList.length > 0;
  5775. }
  5776. }]);
  5777. return DoorLock;
  5778. }();
  5779. /*
  5780. Copyright 2013-2015 ASIAL CORPORATION
  5781. Licensed under the Apache License, Version 2.0 (the "License");
  5782. you may not use this file except in compliance with the License.
  5783. You may obtain a copy of the License at
  5784. http://www.apache.org/licenses/LICENSE-2.0
  5785. Unless required by applicable law or agreed to in writing, software
  5786. distributed under the License is distributed on an "AS IS" BASIS,
  5787. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5788. See the License for the specific language governing permissions and
  5789. limitations under the License.
  5790. */
  5791. // Default implementation for global PageLoader.
  5792. function loadPage(_ref, done) {
  5793. var page = _ref.page,
  5794. parent = _ref.parent,
  5795. _ref$params = _ref.params;
  5796. internal$1.getPageHTMLAsync(page).then(function (html) {
  5797. var pageElement = util$1.createElement(html);
  5798. parent.appendChild(pageElement);
  5799. done(pageElement);
  5800. });
  5801. }
  5802. function unloadPage(element) {
  5803. if (element._destroy instanceof Function) {
  5804. element._destroy();
  5805. } else {
  5806. element.remove();
  5807. }
  5808. }
  5809. var PageLoader = function () {
  5810. /**
  5811. * @param {Function} [fn] Returns an object that has "element" property and "unload" function.
  5812. */
  5813. function PageLoader(loader, unloader) {
  5814. classCallCheck(this, PageLoader);
  5815. this._loader = loader instanceof Function ? loader : loadPage;
  5816. this._unloader = unloader instanceof Function ? unloader : unloadPage;
  5817. }
  5818. /**
  5819. * Set internal loader implementation.
  5820. */
  5821. createClass(PageLoader, [{
  5822. key: 'load',
  5823. /**
  5824. * @param {any} options.page
  5825. * @param {Element} options.parent A location to load page.
  5826. * @param {Object} [options.params] Extra parameters for ons-page.
  5827. * @param {Function} done Take an object that has "element" property and "unload" function.
  5828. */
  5829. value: function load(_ref2, done) {
  5830. var page = _ref2.page,
  5831. parent = _ref2.parent,
  5832. _ref2$params = _ref2.params,
  5833. params = _ref2$params === undefined ? {} : _ref2$params;
  5834. this._loader({ page: page, parent: parent, params: params }, function (pageElement) {
  5835. if (!(pageElement instanceof Element)) {
  5836. throw Error('pageElement must be an instance of Element.');
  5837. }
  5838. done(pageElement);
  5839. });
  5840. }
  5841. }, {
  5842. key: 'unload',
  5843. value: function unload(pageElement) {
  5844. if (!(pageElement instanceof Element)) {
  5845. throw Error('pageElement must be an instance of Element.');
  5846. }
  5847. this._unloader(pageElement);
  5848. }
  5849. }, {
  5850. key: 'internalLoader',
  5851. set: function set$$1(fn) {
  5852. if (!(fn instanceof Function)) {
  5853. throw Error('First parameter must be an instance of Function');
  5854. }
  5855. this._loader = fn;
  5856. },
  5857. get: function get$$1() {
  5858. return this._loader;
  5859. }
  5860. }]);
  5861. return PageLoader;
  5862. }();
  5863. var defaultPageLoader = new PageLoader();
  5864. var instantPageLoader = new PageLoader(function (_ref3, done) {
  5865. var page = _ref3.page,
  5866. parent = _ref3.parent,
  5867. _ref3$params = _ref3.params;
  5868. var element = util$1.createElement(page.trim());
  5869. parent.appendChild(element);
  5870. done(element);
  5871. }, unloadPage);
  5872. /*
  5873. Copyright 2013-2015 ASIAL CORPORATION
  5874. Licensed under the Apache License, Version 2.0 (the "License");
  5875. you may not use this file except in compliance with the License.
  5876. You may obtain a copy of the License at
  5877. http://www.apache.org/licenses/LICENSE-2.0
  5878. Unless required by applicable law or agreed to in writing, software
  5879. distributed under the License is distributed on an "AS IS" BASIS,
  5880. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5881. See the License for the specific language governing permissions and
  5882. limitations under the License.
  5883. */
  5884. /**
  5885. * @object ons
  5886. * @category util
  5887. * @description
  5888. * [ja]Onsen UIで利用できるグローバルなオブジェクトです。[/ja]
  5889. * [en]A global object that's used in Onsen UI. [/en]
  5890. */
  5891. var ons$1 = {
  5892. animit: Animit,
  5893. defaultPageLoader: defaultPageLoader,
  5894. elements: onsElements,
  5895. GestureDetector: GestureDetector,
  5896. modifier: modifier,
  5897. notification: notification,
  5898. orientation: orientation,
  5899. pageAttributeExpression: pageAttributeExpression,
  5900. PageLoader: PageLoader,
  5901. platform: platform,
  5902. softwareKeyboard: softwareKeyboard,
  5903. _autoStyle: autoStyle,
  5904. _internal: internal$1,
  5905. _readyLock: new DoorLock(),
  5906. _util: util$1
  5907. };
  5908. ons$1.platform.select((window.location.search.match(/platform=([\w-]+)/) || [])[1]);
  5909. waitDeviceReady();
  5910. var readyError = function readyError(after) {
  5911. return util$1.throw('This method must be called ' + (after ? 'after' : 'before') + ' ons.isReady() is true');
  5912. };
  5913. /**
  5914. * @method isReady
  5915. * @signature isReady()
  5916. * @return {Boolean}
  5917. * [en]Will be true if Onsen UI is initialized.[/en]
  5918. * [ja]初期化されているかどうかを返します。[/ja]
  5919. * @description
  5920. * [en]Returns true if Onsen UI is initialized.[/en]
  5921. * [ja]Onsen UIがすでに初期化されているかどうかを返すメソッドです。[/ja]
  5922. */
  5923. ons$1.isReady = function () {
  5924. return !ons$1._readyLock.isLocked();
  5925. };
  5926. /**
  5927. * @method isWebView
  5928. * @signature isWebView()
  5929. * @return {Boolean}
  5930. * [en]Will be true if the app is running in Cordova.[/en]
  5931. * [ja]Cordovaで実行されている場合にtrueになります。[/ja]
  5932. * @description
  5933. * [en]Returns true if running inside Cordova.[/en]
  5934. * [ja]Cordovaで実行されているかどうかを返すメソッドです。[/ja]
  5935. */
  5936. ons$1.isWebView = ons$1.platform.isWebView;
  5937. /**
  5938. * @method ready
  5939. * @signature ready(callback)
  5940. * @description
  5941. * [ja]アプリの初期化に利用するメソッドです。渡された関数は、Onsen UIの初期化が終了している時点で必ず呼ばれます。[/ja]
  5942. * [en]Method used to wait for app initialization. Waits for `DOMContentLoaded` and `deviceready`, when necessary, before executing the callback.[/en]
  5943. * @param {Function} callback
  5944. * [en]Function that executes after Onsen UI has been initialized.[/en]
  5945. * [ja]Onsen UIが初期化が完了した後に呼び出される関数オブジェクトを指定します。[/ja]
  5946. */
  5947. ons$1.ready = function (callback) {
  5948. if (ons$1.isReady()) {
  5949. callback();
  5950. } else {
  5951. ons$1._readyLock.waitUnlock(callback);
  5952. }
  5953. };
  5954. /**
  5955. * @method setDefaultDeviceBackButtonListener
  5956. * @signature setDefaultDeviceBackButtonListener(listener)
  5957. * @param {Function} listener
  5958. * [en]Function that executes when device back button is pressed. Must be called on `ons.ready`.[/en]
  5959. * [ja]デバイスのバックボタンが押された時に実行される関数オブジェクトを指定します。[/ja]
  5960. * @description
  5961. * [en]Set default handler for device back button.[/en]
  5962. * [ja]デバイスのバックボタンのためのデフォルトのハンドラを設定します。[/ja]
  5963. */
  5964. ons$1.setDefaultDeviceBackButtonListener = function (listener) {
  5965. if (!ons$1.isReady()) {
  5966. readyError(true);
  5967. }
  5968. ons$1._defaultDeviceBackButtonHandler.setListener(listener);
  5969. };
  5970. /**
  5971. * @method disableDeviceBackButtonHandler
  5972. * @signature disableDeviceBackButtonHandler()
  5973. * @description
  5974. * [en]Disable device back button event handler. Must be called on `ons.ready`.[/en]
  5975. * [ja]デバイスのバックボタンのイベントを受け付けないようにします。[/ja]
  5976. */
  5977. ons$1.disableDeviceBackButtonHandler = function () {
  5978. if (!ons$1.isReady()) {
  5979. readyError(true);
  5980. }
  5981. internal$1.dbbDispatcher.disable();
  5982. };
  5983. /**
  5984. * @method enableDeviceBackButtonHandler
  5985. * @signature enableDeviceBackButtonHandler()
  5986. * @description
  5987. * [en]Enable device back button event handler. Must be called on `ons.ready`.[/en]
  5988. * [ja]デバイスのバックボタンのイベントを受け付けるようにします。[/ja]
  5989. */
  5990. ons$1.enableDeviceBackButtonHandler = function () {
  5991. if (!ons$1.isReady()) {
  5992. readyError(true);
  5993. }
  5994. internal$1.dbbDispatcher.enable();
  5995. };
  5996. ons$1.fireDeviceBackButtonEvent = function () {
  5997. internal$1.dbbDispatcher.fireDeviceBackButtonEvent();
  5998. };
  5999. /**
  6000. * @method enableAutoStatusBarFill
  6001. * @signature enableAutoStatusBarFill()
  6002. * @description
  6003. * [en]Enable status bar fill feature on iOS7 and above (except for iPhone X). Must be called before `ons.ready`.[/en]
  6004. * [ja]iOS7以上(iPhone Xは除く)で、ステータスバー部分の高さを自動的に埋める処理を有効にします。[/ja]
  6005. */
  6006. ons$1.enableAutoStatusBarFill = function () {
  6007. if (ons$1.isReady()) {
  6008. readyError(false);
  6009. }
  6010. internal$1.config.autoStatusBarFill = true;
  6011. };
  6012. /**
  6013. * @method disableAutoStatusBarFill
  6014. * @signature disableAutoStatusBarFill()
  6015. * @description
  6016. * [en]Disable status bar fill feature on iOS7 and above (except for iPhone X). Must be called before `ons.ready`.[/en]
  6017. * [ja]iOS7以上(iPhone Xは除く)で、ステータスバー部分の高さを自動的に埋める処理を無効にします。[/ja]
  6018. */
  6019. ons$1.disableAutoStatusBarFill = function () {
  6020. if (ons$1.isReady()) {
  6021. readyError(false);
  6022. }
  6023. internal$1.config.autoStatusBarFill = false;
  6024. };
  6025. /**
  6026. * @method mockStatusBar
  6027. * @signature mockStatusBar()
  6028. * @description
  6029. * [en]Creates a static element similar to iOS status bar. Only useful for browser testing. Must be called before `ons.ready`.[/en]
  6030. * [ja][/ja]
  6031. */
  6032. ons$1.mockStatusBar = function () {
  6033. if (ons$1.isReady()) {
  6034. readyError(false);
  6035. }
  6036. var mock = function mock() {
  6037. if (!document.body.children[0] || !document.body.children[0].classList.contains('ons-status-bar-mock')) {
  6038. var android = platform.isAndroid(),
  6039. i = function i(_i) {
  6040. return '<i class="' + _i.split('-')[0] + ' ' + _i + '"></i>';
  6041. };
  6042. var left = android ? i('zmdi-twitter') + ' ' + i('zmdi-google-play') : 'No SIM ' + i('fa-wifi'),
  6043. center = android ? '' : '12:28 PM',
  6044. right = android ? i('zmdi-network') + ' ' + i('zmdi-wifi') + ' ' + i('zmdi-battery') + ' 12:28 PM' : '80% ' + i('fa-battery-three-quarters');
  6045. document.body.insertBefore(util$1.createElement('<div class="ons-status-bar-mock ' + (android ? 'android' : 'ios') + '">' + ('<div>' + left + '</div><div>' + center + '</div><div>' + right + '</div>') + '</div>'), document.body.firstChild);
  6046. }
  6047. };
  6048. document.body ? mock() : internal$1.waitDOMContentLoaded(mock);
  6049. };
  6050. /**
  6051. * @method disableAnimations
  6052. * @signature disableAnimations()
  6053. * @description
  6054. * [en]Disable all animations. Could be handy for testing and older devices.[/en]
  6055. * [ja]アニメーションを全て無効にします。テストの際に便利です。[/ja]
  6056. */
  6057. ons$1.disableAnimations = function () {
  6058. internal$1.config.animationsDisabled = true;
  6059. };
  6060. /**
  6061. * @method enableAnimations
  6062. * @signature enableAnimations()
  6063. * @description
  6064. * [en]Enable animations (default).[/en]
  6065. * [ja]アニメーションを有効にします。[/ja]
  6066. */
  6067. ons$1.enableAnimations = function () {
  6068. internal$1.config.animationsDisabled = false;
  6069. };
  6070. ons$1._disableWarnings = function () {
  6071. internal$1.config.warningsDisabled = true;
  6072. };
  6073. ons$1._enableWarnings = function () {
  6074. internal$1.config.warningsDisabled = false;
  6075. };
  6076. /**
  6077. * @method disableAutoStyling
  6078. * @signature disableAutoStyling()
  6079. * @description
  6080. * [en]Disable automatic styling.[/en]
  6081. * [ja][/ja]
  6082. */
  6083. ons$1.disableAutoStyling = autoStyle.disable;
  6084. /**
  6085. * @method enableAutoStyling
  6086. * @signature enableAutoStyling()
  6087. * @description
  6088. * [en]Enable automatic styling based on OS (default).[/en]
  6089. * [ja][/ja]
  6090. */
  6091. ons$1.enableAutoStyling = autoStyle.enable;
  6092. /**
  6093. * @method disableIconAutoPrefix
  6094. * @signature disableIconAutoPrefix()
  6095. * @description
  6096. * [en]Disable adding `fa-` prefix automatically to `ons-icon` classes. Useful when including custom icon packs.[/en]
  6097. * [ja][/ja]
  6098. */
  6099. ons$1.disableIconAutoPrefix = function () {
  6100. util$1.checkMissingImport('Icon');
  6101. onsElements.Icon.setAutoPrefix(false);
  6102. };
  6103. /**
  6104. * @method forceUIWebViewScrollFix
  6105. * @signature forceUIWebViewScrollFix()
  6106. * @param {Boolean} force Enable or disable the fix.
  6107. * @description
  6108. * [en]Applies a fix for iOS UIWebView which prevents scroll events jumping to pages under the top layer. This may visually affect normal scrolling of UIWebView if you open a dialog/menu before the scroll momentum finished. Disabled by default.[/en]
  6109. * [ja][/ja]
  6110. */
  6111. ons$1.forceUIWebViewScrollFix = function () {
  6112. var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  6113. internal$1.config.forceUIWebViewScrollFix = force;
  6114. };
  6115. /**
  6116. * @method forcePlatformStyling
  6117. * @signature forcePlatformStyling(platform)
  6118. * @description
  6119. * [en]Refresh styling for the given platform. Only useful for demos. Use `ons.platform.select(...)` instead for development and production.[/en]
  6120. * [ja][/ja]
  6121. * @param {string} platform New platform to style the elements.
  6122. */
  6123. ons$1.forcePlatformStyling = function (newPlatform) {
  6124. ons$1.enableAutoStyling();
  6125. ons$1.platform.select(newPlatform || 'ios');
  6126. ons$1._util.arrayFrom(document.querySelectorAll('*')).forEach(function (element) {
  6127. if (element.tagName.toLowerCase() === 'ons-if') {
  6128. element._platformUpdate();
  6129. } else if (element.tagName.match(/^ons-/i)) {
  6130. autoStyle.prepare(element, true);
  6131. if (element.tagName.toLowerCase() === 'ons-tabbar') {
  6132. element._updatePosition();
  6133. }
  6134. }
  6135. });
  6136. };
  6137. /**
  6138. * @method preload
  6139. * @signature preload(templatePaths)
  6140. * @param {String|Array} templatePaths
  6141. * [en]Set of HTML file paths containing 'ons-page' elements.[/en]
  6142. * [ja][/ja]
  6143. * @return {Promise}
  6144. * [en]Promise that resolves when all the templates are cached.[/en]
  6145. * [ja][/ja]
  6146. * @description
  6147. * [en]Separated files need to be requested on demand and this can slightly delay pushing new pages. This method requests and caches templates for later use.[/en]
  6148. * [ja][/ja]
  6149. */
  6150. ons$1.preload = function () {
  6151. var templates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  6152. return Promise.all((templates instanceof Array ? templates : [templates]).map(function (template) {
  6153. if (typeof template !== 'string') {
  6154. util$1.throw('Expected string arguments but got ' + (typeof template === 'undefined' ? 'undefined' : _typeof(template)));
  6155. }
  6156. return internal$1.getTemplateHTMLAsync(template);
  6157. }));
  6158. };
  6159. /**
  6160. * @method createElement
  6161. * @signature createElement(template, options)
  6162. * @param {String} template
  6163. * [en]Either an HTML file path, a `<template>` id or an HTML string such as `'<div id="foo">hoge</div>'`.[/en]
  6164. * [ja][/ja]
  6165. * @param {Object} [options]
  6166. * [en]Parameter object.[/en]
  6167. * [ja]オプションを指定するオブジェクト。[/ja]
  6168. * @param {Boolean|HTMLElement} [options.append]
  6169. * [en]Whether or not the element should be automatically appended to the DOM. Defaults to `false`. If `true` value is given, `document.body` will be used as the target.[/en]
  6170. * [ja][/ja]
  6171. * @param {HTMLElement} [options.insertBefore]
  6172. * [en]Reference node that becomes the next sibling of the new node (`options.append` element).[/en]
  6173. * [ja][/ja]
  6174. * @return {HTMLElement|Promise}
  6175. * [en]If the provided template was an inline HTML string, it returns the new element. Otherwise, it returns a promise that resolves to the new element.[/en]
  6176. * [ja][/ja]
  6177. * @description
  6178. * [en]Create a new element from a template. Both inline HTML and external files are supported although the return value differs.[/en]
  6179. * [ja][/ja]
  6180. */
  6181. ons$1.createElement = function (template) {
  6182. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  6183. template = template.trim();
  6184. var create = function create(html) {
  6185. var element = ons$1._util.createElement(html);
  6186. element.remove();
  6187. if (options.append) {
  6188. var target = options.append instanceof HTMLElement ? options.append : document.body;
  6189. target.insertBefore(element, options.insertBefore || null);
  6190. options.link instanceof Function && options.link(element);
  6191. }
  6192. return element;
  6193. };
  6194. return template.charAt(0) === '<' ? create(template) : internal$1.getPageHTMLAsync(template).then(create);
  6195. };
  6196. /**
  6197. * @method createPopover
  6198. * @signature createPopover(page, [options])
  6199. * @param {String} page
  6200. * [en]Page name. Can be either an HTML file or a <template> containing a <ons-dialog> component.[/en]
  6201. * [ja]pageのURLか、もしくは`<template>`で宣言したテンプレートのid属性の値を指定できます。[/ja]
  6202. * @param {Object} [options]
  6203. * [en]Parameter object.[/en]
  6204. * [ja]オプションを指定するオブジェクト。[/ja]
  6205. * @param {Object} [options.parentScope]
  6206. * [en]Parent scope of the dialog. Used to bind models and access scope methods from the dialog.[/en]
  6207. * [ja]ダイアログ内で利用する親スコープを指定します。ダイアログからモデルやスコープのメソッドにアクセスするのに使います。このパラメータはAngularJSバインディングでのみ利用できます。[/ja]
  6208. * @return {Promise}
  6209. * [en]Promise object that resolves to the popover component object.[/en]
  6210. * [ja]ポップオーバーのコンポーネントオブジェクトを解決するPromiseオブジェクトを返します。[/ja]
  6211. * @description
  6212. * [en]Create a popover instance from a template.[/en]
  6213. * [ja]テンプレートからポップオーバーのインスタンスを生成します。[/ja]
  6214. */
  6215. /**
  6216. * @method createDialog
  6217. * @signature createDialog(page, [options])
  6218. * @param {String} page
  6219. * [en]Page name. Can be either an HTML file or an `<template>` containing a <ons-dialog> component.[/en]
  6220. * [ja]pageのURLか、もしくは`<template>`で宣言したテンプレートのid属性の値を指定できます。[/ja]
  6221. * @param {Object} [options]
  6222. * [en]Parameter object.[/en]
  6223. * [ja]オプションを指定するオブジェクト。[/ja]
  6224. * @return {Promise}
  6225. * [en]Promise object that resolves to the dialog component object.[/en]
  6226. * [ja]ダイアログのコンポーネントオブジェクトを解決するPromiseオブジェクトを返します。[/ja]
  6227. * @description
  6228. * [en]Create a dialog instance from a template.[/en]
  6229. * [ja]テンプレートからダイアログのインスタンスを生成します。[/ja]
  6230. */
  6231. /**
  6232. * @method createAlertDialog
  6233. * @signature createAlertDialog(page, [options])
  6234. * @param {String} page
  6235. * [en]Page name. Can be either an HTML file or an `<template>` containing a <ons-alert-dialog> component.[/en]
  6236. * [ja]pageのURLか、もしくは`<template>`で宣言したテンプレートのid属性の値を指定できます。[/ja]
  6237. * @param {Object} [options]
  6238. * [en]Parameter object.[/en]
  6239. * [ja]オプションを指定するオブジェクト。[/ja]
  6240. * @return {Promise}
  6241. * [en]Promise object that resolves to the alert dialog component object.[/en]
  6242. * [ja]ダイアログのコンポーネントオブジェクトを解決するPromiseオブジェクトを返します。[/ja]
  6243. * @description
  6244. * [en]Create a alert dialog instance from a template.[/en]
  6245. * [ja]テンプレートからアラートダイアログのインスタンスを生成します。[/ja]
  6246. */
  6247. ons$1.createPopover = ons$1.createDialog = ons$1.createAlertDialog = function (template) {
  6248. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  6249. return ons$1.createElement(template, _extends({ append: true }, options));
  6250. };
  6251. /**
  6252. * @method openActionSheet
  6253. * @signature openActionSheet(options)
  6254. * @description
  6255. * [en]Shows an instant Action Sheet and lets the user choose an action.[/en]
  6256. * [ja][/ja]
  6257. * @param {Object} [options]
  6258. * [en]Parameter object.[/en]
  6259. * [ja]オプションを指定するオブジェクト。[/ja]
  6260. * @param {Array} [options.buttons]
  6261. * [en]Represent each button of the action sheet following the specified order. Every item can be either a string label or an object containing `label`, `icon` and `modifier` properties.[/en]
  6262. * [ja][/ja]
  6263. * @param {String} [options.title]
  6264. * [en]Optional title for the action sheet.[/en]
  6265. * [ja][/ja]
  6266. * @param {Number} [options.destructive]
  6267. * [en]Optional index of the "destructive" button (only for iOS). It can be specified in the button array as well.[/en]
  6268. * [ja][/ja]
  6269. * @param {Boolean} [options.cancelable]
  6270. * [en]Whether the action sheet can be canceled by tapping on the background mask or not.[/en]
  6271. * [ja][/ja]
  6272. * @param {String} [options.modifier]
  6273. * [en]Modifier attribute of the action sheet. E.g. `'destructive'`.[/en]
  6274. * [ja][/ja]
  6275. * @param {String} [options.maskColor]
  6276. * [en]Optionally change the background mask color.[/en]
  6277. * [ja][/ja]
  6278. * @param {String} [options.id]
  6279. * [en]The element's id attribute.[/en]
  6280. * [ja][/ja]
  6281. * @param {String} [options.class]
  6282. * [en]The element's class attribute.[/en]
  6283. * [ja][/ja]
  6284. * @return {Promise}
  6285. * [en]Will resolve when the action sheet is closed. The resolve value is either the index of the tapped button or -1 when canceled.[/en]
  6286. * [ja][/ja]
  6287. */
  6288. ons$1.openActionSheet = actionSheet;
  6289. /**
  6290. * @method resolveLoadingPlaceholder
  6291. * @signature resolveLoadingPlaceholder(page)
  6292. * @param {String} page
  6293. * [en]Page name. Can be either an HTML file or a `<template>` id.[/en]
  6294. * [ja]pageのURLか、もしくは`<template>`で宣言したテンプレートのid属性の値を指定できます。[/ja]
  6295. * @description
  6296. * [en]If no page is defined for the `ons-loading-placeholder` attribute it will wait for this method being called before loading the page.[/en]
  6297. * [ja]ons-loading-placeholderの属性値としてページが指定されていない場合は、ページロード前に呼ばれるons.resolveLoadingPlaceholder処理が行われるまで表示されません。[/ja]
  6298. */
  6299. ons$1.resolveLoadingPlaceholder = function (page, link) {
  6300. var elements = ons$1._util.arrayFrom(window.document.querySelectorAll('[ons-loading-placeholder]'));
  6301. if (elements.length === 0) {
  6302. util$1.throw('No ons-loading-placeholder exists');
  6303. }
  6304. elements.filter(function (element) {
  6305. return !element.getAttribute('page');
  6306. }).forEach(function (element) {
  6307. element.setAttribute('ons-loading-placeholder', page);
  6308. ons$1._resolveLoadingPlaceholder(element, page, link);
  6309. });
  6310. };
  6311. ons$1._setupLoadingPlaceHolders = function () {
  6312. ons$1.ready(function () {
  6313. var elements = ons$1._util.arrayFrom(window.document.querySelectorAll('[ons-loading-placeholder]'));
  6314. elements.forEach(function (element) {
  6315. var page = element.getAttribute('ons-loading-placeholder');
  6316. if (typeof page === 'string') {
  6317. ons$1._resolveLoadingPlaceholder(element, page);
  6318. }
  6319. });
  6320. });
  6321. };
  6322. ons$1._resolveLoadingPlaceholder = function (parent, page) {
  6323. var link = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (el, done) {
  6324. return done();
  6325. };
  6326. page && ons$1.createElement(page).then(function (element) {
  6327. element.style.display = 'none';
  6328. parent.appendChild(element);
  6329. link(element, function () {
  6330. while (parent.firstChild && parent.firstChild !== element) {
  6331. parent.removeChild(parent.firstChild);
  6332. }
  6333. element.style.display = '';
  6334. });
  6335. }).catch(function (error) {
  6336. return Promise.reject('Unabled to resolve placeholder: ' + error);
  6337. });
  6338. };
  6339. function waitDeviceReady() {
  6340. var unlockDeviceReady = ons$1._readyLock.lock();
  6341. window.addEventListener('DOMContentLoaded', function () {
  6342. if (ons$1.isWebView()) {
  6343. window.document.addEventListener('deviceready', unlockDeviceReady, false);
  6344. } else {
  6345. unlockDeviceReady();
  6346. }
  6347. }, false);
  6348. }
  6349. /**
  6350. * @method getScriptPage
  6351. * @signature getScriptPage()
  6352. * @description
  6353. * [en]Access the last created page from the current `script` scope. Only works inside `<script></script>` tags that are direct children of `ons-page` element. Use this to add lifecycle hooks to a page.[/en]
  6354. * [ja][/ja]
  6355. * @return {HTMLElement}
  6356. * [en]Returns the corresponding page element.[/en]
  6357. * [ja][/ja]
  6358. */
  6359. var getCS = 'currentScript' in document ? function () {
  6360. return document.currentScript;
  6361. } : function () {
  6362. return document.scripts[document.scripts.length - 1];
  6363. };
  6364. ons$1.getScriptPage = function () {
  6365. return getCS() && /ons-page/i.test(getCS().parentElement.tagName) && getCS().parentElement || null;
  6366. };
  6367. function createCommonjsModule(fn, module) {
  6368. return module = { exports: {} }, fn(module, module.exports), module.exports;
  6369. }
  6370. var fastclick = createCommonjsModule(function (module) {
  6371. (function () {
  6372. function FastClick(layer, options) {
  6373. var oldOnClick;
  6374. options = options || {};
  6375. /**
  6376. * Whether a click is currently being tracked.
  6377. *
  6378. * @type boolean
  6379. */
  6380. this.trackingClick = false;
  6381. /**
  6382. * Timestamp for when click tracking started.
  6383. *
  6384. * @type number
  6385. */
  6386. this.trackingClickStart = 0;
  6387. /**
  6388. * The element being tracked for a click.
  6389. *
  6390. * @type EventTarget
  6391. */
  6392. this.targetElement = null;
  6393. /**
  6394. * X-coordinate of touch start event.
  6395. *
  6396. * @type number
  6397. */
  6398. this.touchStartX = 0;
  6399. /**
  6400. * Y-coordinate of touch start event.
  6401. *
  6402. * @type number
  6403. */
  6404. this.touchStartY = 0;
  6405. /**
  6406. * ID of the last touch, retrieved from Touch.identifier.
  6407. *
  6408. * @type number
  6409. */
  6410. this.lastTouchIdentifier = 0;
  6411. /**
  6412. * Touchmove boundary, beyond which a click will be cancelled.
  6413. *
  6414. * @type number
  6415. */
  6416. this.touchBoundary = options.touchBoundary || 10;
  6417. /**
  6418. * The FastClick layer.
  6419. *
  6420. * @type Element
  6421. */
  6422. this.layer = layer;
  6423. /**
  6424. * The minimum time between tap(touchstart and touchend) events
  6425. *
  6426. * @type number
  6427. */
  6428. this.tapDelay = options.tapDelay || 200;
  6429. /**
  6430. * The maximum time for a tap
  6431. *
  6432. * @type number
  6433. */
  6434. this.tapTimeout = options.tapTimeout || 700;
  6435. if (FastClick.notNeeded(layer)) {
  6436. return;
  6437. }
  6438. // Some old versions of Android don't have Function.prototype.bind
  6439. function bind(method, context) {
  6440. return function () {
  6441. return method.apply(context, arguments);
  6442. };
  6443. }
  6444. var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
  6445. var context = this;
  6446. for (var i = 0, l = methods.length; i < l; i++) {
  6447. context[methods[i]] = bind(context[methods[i]], context);
  6448. }
  6449. // Set up event handlers as required
  6450. if (deviceIsAndroid) {
  6451. layer.addEventListener('mouseover', this.onMouse, true);
  6452. layer.addEventListener('mousedown', this.onMouse, true);
  6453. layer.addEventListener('mouseup', this.onMouse, true);
  6454. }
  6455. layer.addEventListener('click', this.onClick, true);
  6456. layer.addEventListener('touchstart', this.onTouchStart, false);
  6457. layer.addEventListener('touchmove', this.onTouchMove, false);
  6458. layer.addEventListener('touchend', this.onTouchEnd, false);
  6459. layer.addEventListener('touchcancel', this.onTouchCancel, false);
  6460. // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
  6461. // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
  6462. // layer when they are cancelled.
  6463. if (!Event.prototype.stopImmediatePropagation) {
  6464. layer.removeEventListener = function (type, callback, capture) {
  6465. var rmv = Node.prototype.removeEventListener;
  6466. if (type === 'click') {
  6467. rmv.call(layer, type, callback.hijacked || callback, capture);
  6468. } else {
  6469. rmv.call(layer, type, callback, capture);
  6470. }
  6471. };
  6472. layer.addEventListener = function (type, callback, capture) {
  6473. var adv = Node.prototype.addEventListener;
  6474. if (type === 'click') {
  6475. adv.call(layer, type, callback.hijacked || (callback.hijacked = function (event) {
  6476. if (!event.propagationStopped) {
  6477. callback(event);
  6478. }
  6479. }), capture);
  6480. } else {
  6481. adv.call(layer, type, callback, capture);
  6482. }
  6483. };
  6484. }
  6485. // If a handler is already declared in the element's onclick attribute, it will be fired before
  6486. // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
  6487. // adding it as listener.
  6488. if (typeof layer.onclick === 'function') {
  6489. // Android browser on at least 3.2 requires a new reference to the function in layer.onclick
  6490. // - the old one won't work if passed to addEventListener directly.
  6491. oldOnClick = layer.onclick;
  6492. layer.addEventListener('click', function (event) {
  6493. oldOnClick(event);
  6494. }, false);
  6495. layer.onclick = null;
  6496. }
  6497. }
  6498. /**
  6499. * Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
  6500. *
  6501. * @type boolean
  6502. */
  6503. var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0;
  6504. /**
  6505. * Android requires exceptions.
  6506. *
  6507. * @type boolean
  6508. */
  6509. var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;
  6510. /**
  6511. * iOS requires exceptions.
  6512. *
  6513. * @type boolean
  6514. */
  6515. var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;
  6516. /**
  6517. * iOS 4 requires an exception for select elements.
  6518. *
  6519. * @type boolean
  6520. */
  6521. var deviceIsIOS4 = deviceIsIOS && /OS 4_\d(_\d)?/.test(navigator.userAgent);
  6522. /**
  6523. * iOS 6.0-7.* requires the target element to be manually derived
  6524. *
  6525. * @type boolean
  6526. */
  6527. var deviceIsIOSWithBadTarget = deviceIsIOS && /OS [6-7]_\d/.test(navigator.userAgent);
  6528. /**
  6529. * BlackBerry requires exceptions.
  6530. *
  6531. * @type boolean
  6532. */
  6533. var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
  6534. /**
  6535. * Valid types for text inputs
  6536. *
  6537. * @type array
  6538. */
  6539. var textFields = ['email', 'number', 'password', 'search', 'tel', 'text', 'url'];
  6540. /**
  6541. * Determine whether a given element requires a native click.
  6542. *
  6543. * @param {EventTarget|Element} target Target DOM element
  6544. * @returns {boolean} Returns true if the element needs a native click
  6545. */
  6546. FastClick.prototype.needsClick = function (target) {
  6547. switch (target.nodeName.toLowerCase()) {
  6548. // Don't send a synthetic click to disabled inputs (issue #62)
  6549. case 'button':
  6550. case 'select':
  6551. case 'textarea':
  6552. if (target.disabled) {
  6553. return true;
  6554. }
  6555. break;
  6556. case 'input':
  6557. // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
  6558. if (deviceIsIOS && target.type === 'file' || target.disabled) {
  6559. return true;
  6560. }
  6561. break;
  6562. case 'label':
  6563. case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
  6564. case 'video':
  6565. return true;
  6566. }
  6567. return (/\bneedsclick\b/.test(target.className)
  6568. );
  6569. };
  6570. /**
  6571. * Determine whether a given element requires a call to focus to simulate click into element.
  6572. *
  6573. * @param {EventTarget|Element} target Target DOM element
  6574. * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
  6575. */
  6576. FastClick.prototype.needsFocus = function (target) {
  6577. switch (target.nodeName.toLowerCase()) {
  6578. case 'textarea':
  6579. return true;
  6580. case 'select':
  6581. return !deviceIsAndroid;
  6582. case 'input':
  6583. switch (target.type) {
  6584. case 'button':
  6585. case 'checkbox':
  6586. case 'file':
  6587. case 'image':
  6588. case 'radio':
  6589. case 'submit':
  6590. return false;
  6591. }
  6592. // No point in attempting to focus disabled inputs
  6593. return !target.disabled && !target.readOnly;
  6594. default:
  6595. return (/\bneedsfocus\b/.test(target.className)
  6596. );
  6597. }
  6598. };
  6599. /**
  6600. * Send a click event to the specified element.
  6601. *
  6602. * @param {EventTarget|Element} targetElement
  6603. * @param {Event} event
  6604. */
  6605. FastClick.prototype.sendClick = function (targetElement, event) {
  6606. var clickEvent, touch;
  6607. // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
  6608. if (document.activeElement && document.activeElement !== targetElement) {
  6609. document.activeElement.blur();
  6610. }
  6611. touch = event.changedTouches[0];
  6612. // Synthesise a click event, with an extra attribute so it can be tracked
  6613. clickEvent = document.createEvent('MouseEvents');
  6614. clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
  6615. clickEvent.forwardedTouchEvent = true;
  6616. targetElement.dispatchEvent(clickEvent);
  6617. };
  6618. FastClick.prototype.determineEventType = function (targetElement) {
  6619. //Issue #159: Android Chrome Select Box does not open with a synthetic click event
  6620. if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
  6621. return 'mousedown';
  6622. }
  6623. return 'click';
  6624. };
  6625. /**
  6626. * @param {EventTarget|Element} targetElement
  6627. */
  6628. FastClick.prototype.focus = function (targetElement) {
  6629. var length;
  6630. // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
  6631. if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month' && targetElement.type !== 'email' && targetElement.type !== 'number') {
  6632. length = targetElement.value.length;
  6633. targetElement.setSelectionRange(length, length);
  6634. } else {
  6635. targetElement.focus();
  6636. }
  6637. };
  6638. /**
  6639. * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
  6640. *
  6641. * @param {EventTarget|Element} targetElement
  6642. */
  6643. FastClick.prototype.updateScrollParent = function (targetElement) {
  6644. var scrollParent, parentElement;
  6645. scrollParent = targetElement.fastClickScrollParent;
  6646. // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
  6647. // target element was moved to another parent.
  6648. if (!scrollParent || !scrollParent.contains(targetElement)) {
  6649. parentElement = targetElement;
  6650. do {
  6651. if (parentElement.scrollHeight > parentElement.offsetHeight) {
  6652. scrollParent = parentElement;
  6653. targetElement.fastClickScrollParent = parentElement;
  6654. break;
  6655. }
  6656. parentElement = parentElement.parentElement;
  6657. } while (parentElement);
  6658. }
  6659. // Always update the scroll top tracker if possible.
  6660. if (scrollParent) {
  6661. scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
  6662. }
  6663. };
  6664. /**
  6665. * @param {EventTarget} targetElement
  6666. * @returns {Element|EventTarget}
  6667. */
  6668. FastClick.prototype.getTargetElementFromEventTarget = function (eventTarget) {
  6669. // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
  6670. if (eventTarget.nodeType === Node.TEXT_NODE) {
  6671. return eventTarget.parentNode;
  6672. }
  6673. return eventTarget;
  6674. };
  6675. /**
  6676. * @param {EventTarget} targetElement
  6677. * @returns {boolean}
  6678. */
  6679. FastClick.prototype.isTextField = function (targetElement) {
  6680. return targetElement.tagName.toLowerCase() === 'textarea' || textFields.indexOf(targetElement.type) !== -1;
  6681. };
  6682. /**
  6683. * On touch start, record the position and scroll offset.
  6684. *
  6685. * @param {Event} event
  6686. * @returns {boolean}
  6687. */
  6688. FastClick.prototype.onTouchStart = function (event) {
  6689. var targetElement, touch;
  6690. // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
  6691. if (event.targetTouches.length > 1) {
  6692. return true;
  6693. }
  6694. targetElement = this.getTargetElementFromEventTarget(event.target);
  6695. touch = event.targetTouches[0];
  6696. // Ignore touches on contenteditable elements to prevent conflict with text selection.
  6697. // (For details: https://github.com/ftlabs/fastclick/pull/211 )
  6698. if (targetElement.isContentEditable) {
  6699. return true;
  6700. }
  6701. if (deviceIsIOS) {
  6702. // Ignore touchstart in focused text field
  6703. // Allows normal text selection and commands (select/paste/cut) when a field has focus, while still allowing fast tap-to-focus.
  6704. // Without this fix, user needs to tap-and-hold a text field for context menu, and double-tap to select text doesn't work at all.
  6705. if (targetElement === document.activeElement && this.isTextField(targetElement)) {
  6706. return true;
  6707. }
  6708. if (!deviceIsIOS4) {
  6709. // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
  6710. // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
  6711. // with the same identifier as the touch event that previously triggered the click that triggered the alert.
  6712. // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
  6713. // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
  6714. // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,
  6715. // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,
  6716. // random integers, it's safe to to continue if the identifier is 0 here.
  6717. if (touch.identifier && touch.identifier === this.lastTouchIdentifier) {
  6718. event.preventDefault();
  6719. return false;
  6720. }
  6721. this.lastTouchIdentifier = touch.identifier;
  6722. // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
  6723. // 1) the user does a fling scroll on the scrollable layer
  6724. // 2) the user stops the fling scroll with another tap
  6725. // then the event.target of the last 'touchend' event will be the element that was under the user's finger
  6726. // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
  6727. // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
  6728. this.updateScrollParent(targetElement);
  6729. }
  6730. }
  6731. this.trackingClick = true;
  6732. this.trackingClickStart = event.timeStamp;
  6733. this.targetElement = targetElement;
  6734. this.touchStartX = touch.pageX;
  6735. this.touchStartY = touch.pageY;
  6736. // Prevent phantom clicks on fast double-tap (issue #36)
  6737. if (event.timeStamp - this.lastClickTime < this.tapDelay && event.timeStamp - this.lastClickTime > -1) {
  6738. event.preventDefault();
  6739. }
  6740. return true;
  6741. };
  6742. /**
  6743. * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
  6744. *
  6745. * @param {Event} event
  6746. * @returns {boolean}
  6747. */
  6748. FastClick.prototype.touchHasMoved = function (event) {
  6749. var touch = event.changedTouches[0],
  6750. boundary = this.touchBoundary;
  6751. if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
  6752. return true;
  6753. }
  6754. return false;
  6755. };
  6756. /**
  6757. * Update the last position.
  6758. *
  6759. * @param {Event} event
  6760. * @returns {boolean}
  6761. */
  6762. FastClick.prototype.onTouchMove = function (event) {
  6763. if (!this.trackingClick) {
  6764. return true;
  6765. }
  6766. // If the touch has moved, cancel the click tracking
  6767. if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
  6768. this.trackingClick = false;
  6769. this.targetElement = null;
  6770. }
  6771. return true;
  6772. };
  6773. /**
  6774. * Attempt to find the labelled control for the given label element.
  6775. *
  6776. * @param {EventTarget|HTMLLabelElement} labelElement
  6777. * @returns {Element|null}
  6778. */
  6779. FastClick.prototype.findControl = function (labelElement) {
  6780. // Fast path for newer browsers supporting the HTML5 control attribute
  6781. if (labelElement.control !== undefined) {
  6782. return labelElement.control;
  6783. }
  6784. // All browsers under test that support touch events also support the HTML5 htmlFor attribute
  6785. if (labelElement.htmlFor) {
  6786. return document.getElementById(labelElement.htmlFor);
  6787. }
  6788. // If no for attribute exists, attempt to retrieve the first labellable descendant element
  6789. // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
  6790. return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
  6791. };
  6792. /**
  6793. * On touch end, determine whether to send a click event at once.
  6794. *
  6795. * @param {Event} event
  6796. * @returns {boolean}
  6797. */
  6798. FastClick.prototype.onTouchEnd = function (event) {
  6799. var forElement,
  6800. trackingClickStart,
  6801. targetTagName,
  6802. scrollParent,
  6803. touch,
  6804. targetElement = this.targetElement;
  6805. if (!this.trackingClick) {
  6806. return true;
  6807. }
  6808. // Prevent phantom clicks on fast double-tap (issue #36)
  6809. if (event.timeStamp - this.lastClickTime < this.tapDelay && event.timeStamp - this.lastClickTime > -1) {
  6810. this.cancelNextClick = true;
  6811. return true;
  6812. }
  6813. if (event.timeStamp - this.trackingClickStart > this.tapTimeout) {
  6814. return true;
  6815. }
  6816. // Reset to prevent wrong click cancel on input (issue #156).
  6817. this.cancelNextClick = false;
  6818. this.lastClickTime = event.timeStamp;
  6819. trackingClickStart = this.trackingClickStart;
  6820. this.trackingClick = false;
  6821. this.trackingClickStart = 0;
  6822. // On some iOS devices, the targetElement supplied with the event is invalid if the layer
  6823. // is performing a transition or scroll, and has to be re-detected manually. Note that
  6824. // for this to function correctly, it must be called *after* the event target is checked!
  6825. // See issue #57; also filed as rdar://13048589 .
  6826. if (deviceIsIOSWithBadTarget) {
  6827. touch = event.changedTouches[0];
  6828. // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
  6829. targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
  6830. targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
  6831. }
  6832. targetTagName = targetElement.tagName.toLowerCase();
  6833. if (targetTagName === 'label') {
  6834. forElement = this.findControl(targetElement);
  6835. if (forElement) {
  6836. this.focus(targetElement);
  6837. if (deviceIsAndroid) {
  6838. return false;
  6839. }
  6840. targetElement = forElement;
  6841. }
  6842. } else if (this.needsFocus(targetElement)) {
  6843. // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
  6844. // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
  6845. if (event.timeStamp - trackingClickStart > 100 || deviceIsIOS && window.top !== window && targetTagName === 'input') {
  6846. this.targetElement = null;
  6847. return false;
  6848. }
  6849. this.focus(targetElement);
  6850. this.sendClick(targetElement, event);
  6851. // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
  6852. // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
  6853. if (!deviceIsIOS4 || targetTagName !== 'select') {
  6854. this.targetElement = null;
  6855. event.preventDefault();
  6856. }
  6857. return false;
  6858. }
  6859. if (deviceIsIOS && !deviceIsIOS4) {
  6860. // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
  6861. // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
  6862. scrollParent = targetElement.fastClickScrollParent;
  6863. if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
  6864. return true;
  6865. }
  6866. }
  6867. // Prevent the actual click from going though - unless the target node is marked as requiring
  6868. // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
  6869. if (!this.needsClick(targetElement)) {
  6870. event.preventDefault();
  6871. this.sendClick(targetElement, event);
  6872. }
  6873. return false;
  6874. };
  6875. /**
  6876. * On touch cancel, stop tracking the click.
  6877. *
  6878. * @returns {void}
  6879. */
  6880. FastClick.prototype.onTouchCancel = function () {
  6881. this.trackingClick = false;
  6882. this.targetElement = null;
  6883. };
  6884. /**
  6885. * Determine mouse events which should be permitted.
  6886. *
  6887. * @param {Event} event
  6888. * @returns {boolean}
  6889. */
  6890. FastClick.prototype.onMouse = function (event) {
  6891. // If a target element was never set (because a touch event was never fired) allow the event
  6892. if (!this.targetElement) {
  6893. return true;
  6894. }
  6895. if (event.forwardedTouchEvent) {
  6896. return true;
  6897. }
  6898. // Programmatically generated events targeting a specific element should be permitted
  6899. if (!event.cancelable) {
  6900. return true;
  6901. }
  6902. // Derive and check the target element to see whether the mouse event needs to be permitted;
  6903. // unless explicitly enabled, prevent non-touch click events from triggering actions,
  6904. // to prevent ghost/doubleclicks.
  6905. if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
  6906. // Prevent any user-added listeners declared on FastClick element from being fired.
  6907. if (event.stopImmediatePropagation) {
  6908. event.stopImmediatePropagation();
  6909. } else {
  6910. // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
  6911. event.propagationStopped = true;
  6912. }
  6913. // Cancel the event
  6914. event.stopPropagation();
  6915. event.preventDefault();
  6916. return false;
  6917. }
  6918. // If the mouse event is permitted, return true for the action to go through.
  6919. return true;
  6920. };
  6921. /**
  6922. * On actual clicks, determine whether this is a touch-generated click, a click action occurring
  6923. * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
  6924. * an actual click which should be permitted.
  6925. *
  6926. * @param {Event} event
  6927. * @returns {boolean}
  6928. */
  6929. FastClick.prototype.onClick = function (event) {
  6930. var permitted;
  6931. // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
  6932. if (this.trackingClick) {
  6933. this.targetElement = null;
  6934. this.trackingClick = false;
  6935. return true;
  6936. }
  6937. // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
  6938. if (event.target.type === 'submit' && event.detail === 0) {
  6939. return true;
  6940. }
  6941. permitted = this.onMouse(event);
  6942. // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
  6943. if (!permitted) {
  6944. this.targetElement = null;
  6945. }
  6946. // If clicks are permitted, return true for the action to go through.
  6947. return permitted;
  6948. };
  6949. /**
  6950. * Remove all FastClick's event listeners.
  6951. *
  6952. * @returns {void}
  6953. */
  6954. FastClick.prototype.destroy = function () {
  6955. var layer = this.layer;
  6956. if (deviceIsAndroid) {
  6957. layer.removeEventListener('mouseover', this.onMouse, true);
  6958. layer.removeEventListener('mousedown', this.onMouse, true);
  6959. layer.removeEventListener('mouseup', this.onMouse, true);
  6960. }
  6961. layer.removeEventListener('click', this.onClick, true);
  6962. layer.removeEventListener('touchstart', this.onTouchStart, false);
  6963. layer.removeEventListener('touchmove', this.onTouchMove, false);
  6964. layer.removeEventListener('touchend', this.onTouchEnd, false);
  6965. layer.removeEventListener('touchcancel', this.onTouchCancel, false);
  6966. };
  6967. /**
  6968. * Check whether FastClick is needed.
  6969. *
  6970. * @param {Element} layer The layer to listen on
  6971. */
  6972. FastClick.notNeeded = function (layer) {
  6973. var metaViewport;
  6974. var chromeVersion;
  6975. var blackberryVersion;
  6976. var firefoxVersion;
  6977. // Devices that don't support touch don't need FastClick
  6978. if (typeof window.ontouchstart === 'undefined') {
  6979. return true;
  6980. }
  6981. // Chrome version - zero for other browsers
  6982. chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
  6983. if (chromeVersion) {
  6984. if (deviceIsAndroid) {
  6985. metaViewport = document.querySelector('meta[name=viewport]');
  6986. if (metaViewport) {
  6987. // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
  6988. if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
  6989. return true;
  6990. }
  6991. // Chrome 32 and above with width=device-width or less don't need FastClick
  6992. if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
  6993. return true;
  6994. }
  6995. }
  6996. // Chrome desktop doesn't need FastClick (issue #15)
  6997. } else {
  6998. return true;
  6999. }
  7000. }
  7001. if (deviceIsBlackBerry10) {
  7002. blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
  7003. // BlackBerry 10.3+ does not require Fastclick library.
  7004. // https://github.com/ftlabs/fastclick/issues/251
  7005. if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
  7006. metaViewport = document.querySelector('meta[name=viewport]');
  7007. if (metaViewport) {
  7008. // user-scalable=no eliminates click delay.
  7009. if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
  7010. return true;
  7011. }
  7012. // width=device-width (or less than device-width) eliminates click delay.
  7013. if (document.documentElement.scrollWidth <= window.outerWidth) {
  7014. return true;
  7015. }
  7016. }
  7017. }
  7018. }
  7019. // IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)
  7020. if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {
  7021. return true;
  7022. }
  7023. // Firefox version - zero for other browsers
  7024. firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
  7025. if (firefoxVersion >= 27) {
  7026. // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
  7027. metaViewport = document.querySelector('meta[name=viewport]');
  7028. if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
  7029. return true;
  7030. }
  7031. }
  7032. // IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version
  7033. // http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx
  7034. if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {
  7035. return true;
  7036. }
  7037. return false;
  7038. };
  7039. /**
  7040. * Factory method for creating a FastClick object
  7041. *
  7042. * @param {Element} layer The layer to listen on
  7043. * @param {Object} [options={}] The options to override the defaults
  7044. */
  7045. FastClick.attach = function (layer, options) {
  7046. return new FastClick(layer, options);
  7047. };
  7048. if (typeof undefined === 'function' && _typeof(undefined.amd) === 'object' && undefined.amd) {
  7049. // AMD. Register as an anonymous module.
  7050. undefined(function () {
  7051. return FastClick;
  7052. });
  7053. } else if ('object' !== 'undefined' && module.exports) {
  7054. module.exports = FastClick.attach;
  7055. module.exports.FastClick = FastClick;
  7056. } else {
  7057. window.FastClick = FastClick;
  7058. }
  7059. })();
  7060. });
  7061. var fastclick_1 = fastclick.FastClick;
  7062. // For @onsenui/custom-elements
  7063. if (window.customElements) {
  7064. // even if native CE1 impl exists, use polyfill
  7065. window.customElements.forcePolyfill = true;
  7066. }
  7067. var _global = createCommonjsModule(function (module) {
  7068. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  7069. var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self
  7070. // eslint-disable-next-line no-new-func
  7071. : Function('return this')();
  7072. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  7073. });
  7074. var _core = createCommonjsModule(function (module) {
  7075. var core = module.exports = { version: '2.5.1' };
  7076. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  7077. });
  7078. var _core_1 = _core.version;
  7079. var _isObject = function _isObject(it) {
  7080. return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) === 'object' ? it !== null : typeof it === 'function';
  7081. };
  7082. var _anObject = function _anObject(it) {
  7083. if (!_isObject(it)) throw TypeError(it + ' is not an object!');
  7084. return it;
  7085. };
  7086. var _fails = function _fails(exec) {
  7087. try {
  7088. return !!exec();
  7089. } catch (e) {
  7090. return true;
  7091. }
  7092. };
  7093. // Thank's IE8 for his funny defineProperty
  7094. var _descriptors = !_fails(function () {
  7095. return Object.defineProperty({}, 'a', { get: function get() {
  7096. return 7;
  7097. } }).a != 7;
  7098. });
  7099. var document$1 = _global.document;
  7100. // typeof document.createElement is 'object' in old IE
  7101. var is = _isObject(document$1) && _isObject(document$1.createElement);
  7102. var _domCreate = function _domCreate(it) {
  7103. return is ? document$1.createElement(it) : {};
  7104. };
  7105. var _ie8DomDefine = !_descriptors && !_fails(function () {
  7106. return Object.defineProperty(_domCreate('div'), 'a', { get: function get() {
  7107. return 7;
  7108. } }).a != 7;
  7109. });
  7110. // 7.1.1 ToPrimitive(input [, PreferredType])
  7111. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  7112. // and the second argument - flag - preferred type is a string
  7113. var _toPrimitive = function _toPrimitive(it, S) {
  7114. if (!_isObject(it)) return it;
  7115. var fn, val;
  7116. if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
  7117. if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;
  7118. if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
  7119. throw TypeError("Can't convert object to primitive value");
  7120. };
  7121. var dP = Object.defineProperty;
  7122. var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  7123. _anObject(O);
  7124. P = _toPrimitive(P, true);
  7125. _anObject(Attributes);
  7126. if (_ie8DomDefine) try {
  7127. return dP(O, P, Attributes);
  7128. } catch (e) {/* empty */}
  7129. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  7130. if ('value' in Attributes) O[P] = Attributes.value;
  7131. return O;
  7132. };
  7133. var _objectDp = {
  7134. f: f
  7135. };
  7136. var _propertyDesc = function _propertyDesc(bitmap, value) {
  7137. return {
  7138. enumerable: !(bitmap & 1),
  7139. configurable: !(bitmap & 2),
  7140. writable: !(bitmap & 4),
  7141. value: value
  7142. };
  7143. };
  7144. var _hide = _descriptors ? function (object, key, value) {
  7145. return _objectDp.f(object, key, _propertyDesc(1, value));
  7146. } : function (object, key, value) {
  7147. object[key] = value;
  7148. return object;
  7149. };
  7150. var hasOwnProperty = {}.hasOwnProperty;
  7151. var _has = function _has(it, key) {
  7152. return hasOwnProperty.call(it, key);
  7153. };
  7154. var id = 0;
  7155. var px = Math.random();
  7156. var _uid = function _uid(key) {
  7157. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  7158. };
  7159. var _redefine = createCommonjsModule(function (module) {
  7160. var SRC = _uid('src');
  7161. var TO_STRING = 'toString';
  7162. var $toString = Function[TO_STRING];
  7163. var TPL = ('' + $toString).split(TO_STRING);
  7164. _core.inspectSource = function (it) {
  7165. return $toString.call(it);
  7166. };
  7167. (module.exports = function (O, key, val, safe) {
  7168. var isFunction = typeof val == 'function';
  7169. if (isFunction) _has(val, 'name') || _hide(val, 'name', key);
  7170. if (O[key] === val) return;
  7171. if (isFunction) _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  7172. if (O === _global) {
  7173. O[key] = val;
  7174. } else if (!safe) {
  7175. delete O[key];
  7176. _hide(O, key, val);
  7177. } else if (O[key]) {
  7178. O[key] = val;
  7179. } else {
  7180. _hide(O, key, val);
  7181. }
  7182. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  7183. })(Function.prototype, TO_STRING, function toString() {
  7184. return typeof this == 'function' && this[SRC] || $toString.call(this);
  7185. });
  7186. });
  7187. var _aFunction = function _aFunction(it) {
  7188. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  7189. return it;
  7190. };
  7191. // optional / simple context binding
  7192. var _ctx = function _ctx(fn, that, length) {
  7193. _aFunction(fn);
  7194. if (that === undefined) return fn;
  7195. switch (length) {
  7196. case 1:
  7197. return function (a) {
  7198. return fn.call(that, a);
  7199. };
  7200. case 2:
  7201. return function (a, b) {
  7202. return fn.call(that, a, b);
  7203. };
  7204. case 3:
  7205. return function (a, b, c) {
  7206. return fn.call(that, a, b, c);
  7207. };
  7208. }
  7209. return function () /* ...args */{
  7210. return fn.apply(that, arguments);
  7211. };
  7212. };
  7213. var PROTOTYPE = 'prototype';
  7214. var $export = function $export(type, name, source) {
  7215. var IS_FORCED = type & $export.F;
  7216. var IS_GLOBAL = type & $export.G;
  7217. var IS_STATIC = type & $export.S;
  7218. var IS_PROTO = type & $export.P;
  7219. var IS_BIND = type & $export.B;
  7220. var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE];
  7221. var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
  7222. var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  7223. var key, own, out, exp;
  7224. if (IS_GLOBAL) source = name;
  7225. for (key in source) {
  7226. // contains in native
  7227. own = !IS_FORCED && target && target[key] !== undefined;
  7228. // export native or passed
  7229. out = (own ? target : source)[key];
  7230. // bind timers to global for call from export context
  7231. exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
  7232. // extend global
  7233. if (target) _redefine(target, key, out, type & $export.U);
  7234. // export
  7235. if (exports[key] != out) _hide(exports, key, exp);
  7236. if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  7237. }
  7238. };
  7239. _global.core = _core;
  7240. // type bitmap
  7241. $export.F = 1; // forced
  7242. $export.G = 2; // global
  7243. $export.S = 4; // static
  7244. $export.P = 8; // proto
  7245. $export.B = 16; // bind
  7246. $export.W = 32; // wrap
  7247. $export.U = 64; // safe
  7248. $export.R = 128; // real proto method for `library`
  7249. var _export = $export;
  7250. var f$2 = {}.propertyIsEnumerable;
  7251. var _objectPie = {
  7252. f: f$2
  7253. };
  7254. var toString = {}.toString;
  7255. var _cof = function _cof(it) {
  7256. return toString.call(it).slice(8, -1);
  7257. };
  7258. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  7259. // eslint-disable-next-line no-prototype-builtins
  7260. var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  7261. return _cof(it) == 'String' ? it.split('') : Object(it);
  7262. };
  7263. // 7.2.1 RequireObjectCoercible(argument)
  7264. var _defined = function _defined(it) {
  7265. if (it == undefined) throw TypeError("Can't call method on " + it);
  7266. return it;
  7267. };
  7268. // to indexed object, toObject with fallback for non-array-like ES3 strings
  7269. var _toIobject = function _toIobject(it) {
  7270. return _iobject(_defined(it));
  7271. };
  7272. var gOPD = Object.getOwnPropertyDescriptor;
  7273. var f$1 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) {
  7274. O = _toIobject(O);
  7275. P = _toPrimitive(P, true);
  7276. if (_ie8DomDefine) try {
  7277. return gOPD(O, P);
  7278. } catch (e) {/* empty */}
  7279. if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]);
  7280. };
  7281. var _objectGopd = {
  7282. f: f$1
  7283. };
  7284. // Works with __proto__ only. Old v8 can't work with null proto objects.
  7285. /* eslint-disable no-proto */
  7286. var check = function check(O, proto) {
  7287. _anObject(O);
  7288. if (!_isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  7289. };
  7290. var _setProto = {
  7291. set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
  7292. function (test, buggy, set) {
  7293. try {
  7294. set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2);
  7295. set(test, []);
  7296. buggy = !(test instanceof Array);
  7297. } catch (e) {
  7298. buggy = true;
  7299. }
  7300. return function setPrototypeOf(O, proto) {
  7301. check(O, proto);
  7302. if (buggy) O.__proto__ = proto;else set(O, proto);
  7303. return O;
  7304. };
  7305. }({}, false) : undefined),
  7306. check: check
  7307. };
  7308. // 19.1.3.19 Object.setPrototypeOf(O, proto)
  7309. _export(_export.S, 'Object', { setPrototypeOf: _setProto.set });
  7310. var setPrototypeOf = _core.Object.setPrototypeOf;
  7311. var SHARED = '__core-js_shared__';
  7312. var store = _global[SHARED] || (_global[SHARED] = {});
  7313. var _shared = function _shared(key) {
  7314. return store[key] || (store[key] = {});
  7315. };
  7316. var _wks = createCommonjsModule(function (module) {
  7317. var store = _shared('wks');
  7318. var _Symbol = _global.Symbol;
  7319. var USE_SYMBOL = typeof _Symbol == 'function';
  7320. var $exports = module.exports = function (name) {
  7321. return store[name] || (store[name] = USE_SYMBOL && _Symbol[name] || (USE_SYMBOL ? _Symbol : _uid)('Symbol.' + name));
  7322. };
  7323. $exports.store = store;
  7324. });
  7325. // getting tag from 19.1.3.6 Object.prototype.toString()
  7326. var TAG = _wks('toStringTag');
  7327. // ES3 wrong here
  7328. var ARG = _cof(function () {
  7329. return arguments;
  7330. }()) == 'Arguments';
  7331. // fallback for IE11 Script Access Denied error
  7332. var tryGet = function tryGet(it, key) {
  7333. try {
  7334. return it[key];
  7335. } catch (e) {/* empty */}
  7336. };
  7337. var _classof = function _classof(it) {
  7338. var O, T, B;
  7339. return it === undefined ? 'Undefined' : it === null ? 'Null'
  7340. // @@toStringTag case
  7341. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  7342. // builtinTag case
  7343. : ARG ? _cof(O)
  7344. // ES3 arguments fallback
  7345. : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  7346. };
  7347. // 19.1.3.6 Object.prototype.toString()
  7348. var test = {};
  7349. test[_wks('toStringTag')] = 'z';
  7350. if (test + '' != '[object z]') {
  7351. _redefine(Object.prototype, 'toString', function toString() {
  7352. return '[object ' + _classof(this) + ']';
  7353. }, true);
  7354. }
  7355. // 7.1.4 ToInteger
  7356. var ceil = Math.ceil;
  7357. var floor = Math.floor;
  7358. var _toInteger = function _toInteger(it) {
  7359. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  7360. };
  7361. // true -> String#at
  7362. // false -> String#codePointAt
  7363. var _stringAt = function _stringAt(TO_STRING) {
  7364. return function (that, pos) {
  7365. var s = String(_defined(that));
  7366. var i = _toInteger(pos);
  7367. var l = s.length;
  7368. var a, b;
  7369. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  7370. a = s.charCodeAt(i);
  7371. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  7372. };
  7373. };
  7374. var _library = false;
  7375. var _iterators = {};
  7376. // 7.1.15 ToLength
  7377. var min = Math.min;
  7378. var _toLength = function _toLength(it) {
  7379. return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  7380. };
  7381. var max = Math.max;
  7382. var min$1 = Math.min;
  7383. var _toAbsoluteIndex = function _toAbsoluteIndex(index, length) {
  7384. index = _toInteger(index);
  7385. return index < 0 ? max(index + length, 0) : min$1(index, length);
  7386. };
  7387. // false -> Array#indexOf
  7388. // true -> Array#includes
  7389. var _arrayIncludes = function _arrayIncludes(IS_INCLUDES) {
  7390. return function ($this, el, fromIndex) {
  7391. var O = _toIobject($this);
  7392. var length = _toLength(O.length);
  7393. var index = _toAbsoluteIndex(fromIndex, length);
  7394. var value;
  7395. // Array#includes uses SameValueZero equality algorithm
  7396. // eslint-disable-next-line no-self-compare
  7397. if (IS_INCLUDES && el != el) while (length > index) {
  7398. value = O[index++];
  7399. // eslint-disable-next-line no-self-compare
  7400. if (value != value) return true;
  7401. // Array#indexOf ignores holes, Array#includes - not
  7402. } else for (; length > index; index++) {
  7403. if (IS_INCLUDES || index in O) {
  7404. if (O[index] === el) return IS_INCLUDES || index || 0;
  7405. }
  7406. }return !IS_INCLUDES && -1;
  7407. };
  7408. };
  7409. var shared = _shared('keys');
  7410. var _sharedKey = function _sharedKey(key) {
  7411. return shared[key] || (shared[key] = _uid(key));
  7412. };
  7413. var arrayIndexOf = _arrayIncludes(false);
  7414. var IE_PROTO$1 = _sharedKey('IE_PROTO');
  7415. var _objectKeysInternal = function _objectKeysInternal(object, names) {
  7416. var O = _toIobject(object);
  7417. var i = 0;
  7418. var result = [];
  7419. var key;
  7420. for (key in O) {
  7421. if (key != IE_PROTO$1) _has(O, key) && result.push(key);
  7422. } // Don't enum bug & hidden keys
  7423. while (names.length > i) {
  7424. if (_has(O, key = names[i++])) {
  7425. ~arrayIndexOf(result, key) || result.push(key);
  7426. }
  7427. }return result;
  7428. };
  7429. // IE 8- don't enum bug keys
  7430. var _enumBugKeys = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');
  7431. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  7432. var _objectKeys = Object.keys || function keys(O) {
  7433. return _objectKeysInternal(O, _enumBugKeys);
  7434. };
  7435. var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  7436. _anObject(O);
  7437. var keys = _objectKeys(Properties);
  7438. var length = keys.length;
  7439. var i = 0;
  7440. var P;
  7441. while (length > i) {
  7442. _objectDp.f(O, P = keys[i++], Properties[P]);
  7443. }return O;
  7444. };
  7445. var document$2 = _global.document;
  7446. var _html = document$2 && document$2.documentElement;
  7447. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  7448. var IE_PROTO = _sharedKey('IE_PROTO');
  7449. var Empty = function Empty() {/* empty */};
  7450. var PROTOTYPE$1 = 'prototype';
  7451. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  7452. var _createDict = function createDict() {
  7453. // Thrash, waste and sodomy: IE GC bug
  7454. var iframe = _domCreate('iframe');
  7455. var i = _enumBugKeys.length;
  7456. var lt = '<';
  7457. var gt = '>';
  7458. var iframeDocument;
  7459. iframe.style.display = 'none';
  7460. _html.appendChild(iframe);
  7461. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  7462. // createDict = iframe.contentWindow.Object;
  7463. // html.removeChild(iframe);
  7464. iframeDocument = iframe.contentWindow.document;
  7465. iframeDocument.open();
  7466. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  7467. iframeDocument.close();
  7468. _createDict = iframeDocument.F;
  7469. while (i--) {
  7470. delete _createDict[PROTOTYPE$1][_enumBugKeys[i]];
  7471. }return _createDict();
  7472. };
  7473. var _objectCreate = Object.create || function create(O, Properties) {
  7474. var result;
  7475. if (O !== null) {
  7476. Empty[PROTOTYPE$1] = _anObject(O);
  7477. result = new Empty();
  7478. Empty[PROTOTYPE$1] = null;
  7479. // add "__proto__" for Object.getPrototypeOf polyfill
  7480. result[IE_PROTO] = O;
  7481. } else result = _createDict();
  7482. return Properties === undefined ? result : _objectDps(result, Properties);
  7483. };
  7484. var def = _objectDp.f;
  7485. var TAG$1 = _wks('toStringTag');
  7486. var _setToStringTag = function _setToStringTag(it, tag, stat) {
  7487. if (it && !_has(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
  7488. };
  7489. var IteratorPrototype = {};
  7490. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  7491. _hide(IteratorPrototype, _wks('iterator'), function () {
  7492. return this;
  7493. });
  7494. var _iterCreate = function _iterCreate(Constructor, NAME, next) {
  7495. Constructor.prototype = _objectCreate(IteratorPrototype, { next: _propertyDesc(1, next) });
  7496. _setToStringTag(Constructor, NAME + ' Iterator');
  7497. };
  7498. // 7.1.13 ToObject(argument)
  7499. var _toObject = function _toObject(it) {
  7500. return Object(_defined(it));
  7501. };
  7502. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  7503. var IE_PROTO$2 = _sharedKey('IE_PROTO');
  7504. var ObjectProto = Object.prototype;
  7505. var _objectGpo = Object.getPrototypeOf || function (O) {
  7506. O = _toObject(O);
  7507. if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2];
  7508. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  7509. return O.constructor.prototype;
  7510. }return O instanceof Object ? ObjectProto : null;
  7511. };
  7512. var ITERATOR = _wks('iterator');
  7513. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  7514. var FF_ITERATOR = '@@iterator';
  7515. var KEYS = 'keys';
  7516. var VALUES = 'values';
  7517. var returnThis = function returnThis() {
  7518. return this;
  7519. };
  7520. var _iterDefine = function _iterDefine(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  7521. _iterCreate(Constructor, NAME, next);
  7522. var getMethod = function getMethod(kind) {
  7523. if (!BUGGY && kind in proto) return proto[kind];
  7524. switch (kind) {
  7525. case KEYS:
  7526. return function keys() {
  7527. return new Constructor(this, kind);
  7528. };
  7529. case VALUES:
  7530. return function values() {
  7531. return new Constructor(this, kind);
  7532. };
  7533. }return function entries() {
  7534. return new Constructor(this, kind);
  7535. };
  7536. };
  7537. var TAG = NAME + ' Iterator';
  7538. var DEF_VALUES = DEFAULT == VALUES;
  7539. var VALUES_BUG = false;
  7540. var proto = Base.prototype;
  7541. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  7542. var $default = $native || getMethod(DEFAULT);
  7543. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  7544. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  7545. var methods, key, IteratorPrototype;
  7546. // Fix native
  7547. if ($anyNative) {
  7548. IteratorPrototype = _objectGpo($anyNative.call(new Base()));
  7549. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  7550. // Set @@toStringTag to native iterators
  7551. _setToStringTag(IteratorPrototype, TAG, true);
  7552. // fix for some old engines
  7553. if (!_library && !_has(IteratorPrototype, ITERATOR)) _hide(IteratorPrototype, ITERATOR, returnThis);
  7554. }
  7555. }
  7556. // fix Array#{values, @@iterator}.name in V8 / FF
  7557. if (DEF_VALUES && $native && $native.name !== VALUES) {
  7558. VALUES_BUG = true;
  7559. $default = function values() {
  7560. return $native.call(this);
  7561. };
  7562. }
  7563. // Define iterator
  7564. if ((!_library || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  7565. _hide(proto, ITERATOR, $default);
  7566. }
  7567. // Plug for library
  7568. _iterators[NAME] = $default;
  7569. _iterators[TAG] = returnThis;
  7570. if (DEFAULT) {
  7571. methods = {
  7572. values: DEF_VALUES ? $default : getMethod(VALUES),
  7573. keys: IS_SET ? $default : getMethod(KEYS),
  7574. entries: $entries
  7575. };
  7576. if (FORCED) for (key in methods) {
  7577. if (!(key in proto)) _redefine(proto, key, methods[key]);
  7578. } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods);
  7579. }
  7580. return methods;
  7581. };
  7582. var $at = _stringAt(true);
  7583. // 21.1.3.27 String.prototype[@@iterator]()
  7584. _iterDefine(String, 'String', function (iterated) {
  7585. this._t = String(iterated); // target
  7586. this._i = 0; // next index
  7587. // 21.1.5.2.1 %StringIteratorPrototype%.next()
  7588. }, function () {
  7589. var O = this._t;
  7590. var index = this._i;
  7591. var point;
  7592. if (index >= O.length) return { value: undefined, done: true };
  7593. point = $at(O, index);
  7594. this._i += point.length;
  7595. return { value: point, done: false };
  7596. });
  7597. // 22.1.3.31 Array.prototype[@@unscopables]
  7598. var UNSCOPABLES = _wks('unscopables');
  7599. var ArrayProto = Array.prototype;
  7600. if (ArrayProto[UNSCOPABLES] == undefined) _hide(ArrayProto, UNSCOPABLES, {});
  7601. var _addToUnscopables = function _addToUnscopables(key) {
  7602. ArrayProto[UNSCOPABLES][key] = true;
  7603. };
  7604. var _iterStep = function _iterStep(done, value) {
  7605. return { value: value, done: !!done };
  7606. };
  7607. // 22.1.3.4 Array.prototype.entries()
  7608. // 22.1.3.13 Array.prototype.keys()
  7609. // 22.1.3.29 Array.prototype.values()
  7610. // 22.1.3.30 Array.prototype[@@iterator]()
  7611. var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) {
  7612. this._t = _toIobject(iterated); // target
  7613. this._i = 0; // next index
  7614. this._k = kind; // kind
  7615. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  7616. }, function () {
  7617. var O = this._t;
  7618. var kind = this._k;
  7619. var index = this._i++;
  7620. if (!O || index >= O.length) {
  7621. this._t = undefined;
  7622. return _iterStep(1);
  7623. }
  7624. if (kind == 'keys') return _iterStep(0, index);
  7625. if (kind == 'values') return _iterStep(0, O[index]);
  7626. return _iterStep(0, [index, O[index]]);
  7627. }, 'values');
  7628. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  7629. _iterators.Arguments = _iterators.Array;
  7630. _addToUnscopables('keys');
  7631. _addToUnscopables('values');
  7632. _addToUnscopables('entries');
  7633. var ITERATOR$1 = _wks('iterator');
  7634. var TO_STRING_TAG = _wks('toStringTag');
  7635. var ArrayValues = _iterators.Array;
  7636. var DOMIterables = {
  7637. CSSRuleList: true, // TODO: Not spec compliant, should be false.
  7638. CSSStyleDeclaration: false,
  7639. CSSValueList: false,
  7640. ClientRectList: false,
  7641. DOMRectList: false,
  7642. DOMStringList: false,
  7643. DOMTokenList: true,
  7644. DataTransferItemList: false,
  7645. FileList: false,
  7646. HTMLAllCollection: false,
  7647. HTMLCollection: false,
  7648. HTMLFormElement: false,
  7649. HTMLSelectElement: false,
  7650. MediaList: true, // TODO: Not spec compliant, should be false.
  7651. MimeTypeArray: false,
  7652. NamedNodeMap: false,
  7653. NodeList: true,
  7654. PaintRequestList: false,
  7655. Plugin: false,
  7656. PluginArray: false,
  7657. SVGLengthList: false,
  7658. SVGNumberList: false,
  7659. SVGPathSegList: false,
  7660. SVGPointList: false,
  7661. SVGStringList: false,
  7662. SVGTransformList: false,
  7663. SourceBufferList: false,
  7664. StyleSheetList: true, // TODO: Not spec compliant, should be false.
  7665. TextTrackCueList: false,
  7666. TextTrackList: false,
  7667. TouchList: false
  7668. };
  7669. for (var collections = _objectKeys(DOMIterables), i = 0; i < collections.length; i++) {
  7670. var NAME = collections[i];
  7671. var explicit = DOMIterables[NAME];
  7672. var Collection = _global[NAME];
  7673. var proto = Collection && Collection.prototype;
  7674. var key;
  7675. if (proto) {
  7676. if (!proto[ITERATOR$1]) _hide(proto, ITERATOR$1, ArrayValues);
  7677. if (!proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME);
  7678. _iterators[NAME] = ArrayValues;
  7679. if (explicit) for (key in es6_array_iterator) {
  7680. if (!proto[key]) _redefine(proto, key, es6_array_iterator[key], true);
  7681. }
  7682. }
  7683. }
  7684. var _redefineAll = function _redefineAll(target, src, safe) {
  7685. for (var key in src) {
  7686. _redefine(target, key, src[key], safe);
  7687. }return target;
  7688. };
  7689. var _anInstance = function _anInstance(it, Constructor, name, forbiddenField) {
  7690. if (!(it instanceof Constructor) || forbiddenField !== undefined && forbiddenField in it) {
  7691. throw TypeError(name + ': incorrect invocation!');
  7692. }return it;
  7693. };
  7694. // call something on iterator step with safe closing on error
  7695. var _iterCall = function _iterCall(iterator, fn, value, entries) {
  7696. try {
  7697. return entries ? fn(_anObject(value)[0], value[1]) : fn(value);
  7698. // 7.4.6 IteratorClose(iterator, completion)
  7699. } catch (e) {
  7700. var ret = iterator['return'];
  7701. if (ret !== undefined) _anObject(ret.call(iterator));
  7702. throw e;
  7703. }
  7704. };
  7705. // check on default Array iterator
  7706. var ITERATOR$2 = _wks('iterator');
  7707. var ArrayProto$1 = Array.prototype;
  7708. var _isArrayIter = function _isArrayIter(it) {
  7709. return it !== undefined && (_iterators.Array === it || ArrayProto$1[ITERATOR$2] === it);
  7710. };
  7711. var ITERATOR$3 = _wks('iterator');
  7712. var core_getIteratorMethod = _core.getIteratorMethod = function (it) {
  7713. if (it != undefined) return it[ITERATOR$3] || it['@@iterator'] || _iterators[_classof(it)];
  7714. };
  7715. var _forOf = createCommonjsModule(function (module) {
  7716. var BREAK = {};
  7717. var RETURN = {};
  7718. var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  7719. var iterFn = ITERATOR ? function () {
  7720. return iterable;
  7721. } : core_getIteratorMethod(iterable);
  7722. var f = _ctx(fn, that, entries ? 2 : 1);
  7723. var index = 0;
  7724. var length, step, iterator, result;
  7725. if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  7726. // fast case for arrays with default iterator
  7727. if (_isArrayIter(iterFn)) for (length = _toLength(iterable.length); length > index; index++) {
  7728. result = entries ? f(_anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
  7729. if (result === BREAK || result === RETURN) return result;
  7730. } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
  7731. result = _iterCall(iterator, f, step.value, entries);
  7732. if (result === BREAK || result === RETURN) return result;
  7733. }
  7734. };
  7735. exports.BREAK = BREAK;
  7736. exports.RETURN = RETURN;
  7737. });
  7738. var SPECIES = _wks('species');
  7739. var _setSpecies = function _setSpecies(KEY) {
  7740. var C = _global[KEY];
  7741. if (_descriptors && C && !C[SPECIES]) _objectDp.f(C, SPECIES, {
  7742. configurable: true,
  7743. get: function get() {
  7744. return this;
  7745. }
  7746. });
  7747. };
  7748. var _meta = createCommonjsModule(function (module) {
  7749. var META = _uid('meta');
  7750. var setDesc = _objectDp.f;
  7751. var id = 0;
  7752. var isExtensible = Object.isExtensible || function () {
  7753. return true;
  7754. };
  7755. var FREEZE = !_fails(function () {
  7756. return isExtensible(Object.preventExtensions({}));
  7757. });
  7758. var setMeta = function setMeta(it) {
  7759. setDesc(it, META, { value: {
  7760. i: 'O' + ++id, // object ID
  7761. w: {} // weak collections IDs
  7762. } });
  7763. };
  7764. var fastKey = function fastKey(it, create) {
  7765. // return primitive with prefix
  7766. if (!_isObject(it)) return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  7767. if (!_has(it, META)) {
  7768. // can't set metadata to uncaught frozen object
  7769. if (!isExtensible(it)) return 'F';
  7770. // not necessary to add metadata
  7771. if (!create) return 'E';
  7772. // add missing metadata
  7773. setMeta(it);
  7774. // return object ID
  7775. }return it[META].i;
  7776. };
  7777. var getWeak = function getWeak(it, create) {
  7778. if (!_has(it, META)) {
  7779. // can't set metadata to uncaught frozen object
  7780. if (!isExtensible(it)) return true;
  7781. // not necessary to add metadata
  7782. if (!create) return false;
  7783. // add missing metadata
  7784. setMeta(it);
  7785. // return hash weak collections IDs
  7786. }return it[META].w;
  7787. };
  7788. // add metadata on freeze-family methods calling
  7789. var onFreeze = function onFreeze(it) {
  7790. if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it);
  7791. return it;
  7792. };
  7793. var meta = module.exports = {
  7794. KEY: META,
  7795. NEED: false,
  7796. fastKey: fastKey,
  7797. getWeak: getWeak,
  7798. onFreeze: onFreeze
  7799. };
  7800. });
  7801. var _meta_1 = _meta.KEY;
  7802. var _meta_2 = _meta.NEED;
  7803. var _meta_3 = _meta.fastKey;
  7804. var _meta_4 = _meta.getWeak;
  7805. var _meta_5 = _meta.onFreeze;
  7806. var _validateCollection = function _validateCollection(it, TYPE) {
  7807. if (!_isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
  7808. return it;
  7809. };
  7810. var dP$1 = _objectDp.f;
  7811. var fastKey = _meta.fastKey;
  7812. var SIZE = _descriptors ? '_s' : 'size';
  7813. var getEntry = function getEntry(that, key) {
  7814. // fast case
  7815. var index = fastKey(key);
  7816. var entry;
  7817. if (index !== 'F') return that._i[index];
  7818. // frozen object case
  7819. for (entry = that._f; entry; entry = entry.n) {
  7820. if (entry.k == key) return entry;
  7821. }
  7822. };
  7823. var _collectionStrong = {
  7824. getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) {
  7825. var C = wrapper(function (that, iterable) {
  7826. _anInstance(that, C, NAME, '_i');
  7827. that._t = NAME; // collection type
  7828. that._i = _objectCreate(null); // index
  7829. that._f = undefined; // first entry
  7830. that._l = undefined; // last entry
  7831. that[SIZE] = 0; // size
  7832. if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that);
  7833. });
  7834. _redefineAll(C.prototype, {
  7835. // 23.1.3.1 Map.prototype.clear()
  7836. // 23.2.3.2 Set.prototype.clear()
  7837. clear: function clear() {
  7838. for (var that = _validateCollection(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
  7839. entry.r = true;
  7840. if (entry.p) entry.p = entry.p.n = undefined;
  7841. delete data[entry.i];
  7842. }
  7843. that._f = that._l = undefined;
  7844. that[SIZE] = 0;
  7845. },
  7846. // 23.1.3.3 Map.prototype.delete(key)
  7847. // 23.2.3.4 Set.prototype.delete(value)
  7848. 'delete': function _delete(key) {
  7849. var that = _validateCollection(this, NAME);
  7850. var entry = getEntry(that, key);
  7851. if (entry) {
  7852. var next = entry.n;
  7853. var prev = entry.p;
  7854. delete that._i[entry.i];
  7855. entry.r = true;
  7856. if (prev) prev.n = next;
  7857. if (next) next.p = prev;
  7858. if (that._f == entry) that._f = next;
  7859. if (that._l == entry) that._l = prev;
  7860. that[SIZE]--;
  7861. }return !!entry;
  7862. },
  7863. // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
  7864. // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
  7865. forEach: function forEach(callbackfn /* , that = undefined */) {
  7866. _validateCollection(this, NAME);
  7867. var f = _ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  7868. var entry;
  7869. while (entry = entry ? entry.n : this._f) {
  7870. f(entry.v, entry.k, this);
  7871. // revert to the last existing entry
  7872. while (entry && entry.r) {
  7873. entry = entry.p;
  7874. }
  7875. }
  7876. },
  7877. // 23.1.3.7 Map.prototype.has(key)
  7878. // 23.2.3.7 Set.prototype.has(value)
  7879. has: function has(key) {
  7880. return !!getEntry(_validateCollection(this, NAME), key);
  7881. }
  7882. });
  7883. if (_descriptors) dP$1(C.prototype, 'size', {
  7884. get: function get() {
  7885. return _validateCollection(this, NAME)[SIZE];
  7886. }
  7887. });
  7888. return C;
  7889. },
  7890. def: function def(that, key, value) {
  7891. var entry = getEntry(that, key);
  7892. var prev, index;
  7893. // change existing entry
  7894. if (entry) {
  7895. entry.v = value;
  7896. // create new entry
  7897. } else {
  7898. that._l = entry = {
  7899. i: index = fastKey(key, true), // <- index
  7900. k: key, // <- key
  7901. v: value, // <- value
  7902. p: prev = that._l, // <- previous entry
  7903. n: undefined, // <- next entry
  7904. r: false // <- removed
  7905. };
  7906. if (!that._f) that._f = entry;
  7907. if (prev) prev.n = entry;
  7908. that[SIZE]++;
  7909. // add to index
  7910. if (index !== 'F') that._i[index] = entry;
  7911. }return that;
  7912. },
  7913. getEntry: getEntry,
  7914. setStrong: function setStrong(C, NAME, IS_MAP) {
  7915. // add .keys, .values, .entries, [@@iterator]
  7916. // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
  7917. _iterDefine(C, NAME, function (iterated, kind) {
  7918. this._t = _validateCollection(iterated, NAME); // target
  7919. this._k = kind; // kind
  7920. this._l = undefined; // previous
  7921. }, function () {
  7922. var that = this;
  7923. var kind = that._k;
  7924. var entry = that._l;
  7925. // revert to the last existing entry
  7926. while (entry && entry.r) {
  7927. entry = entry.p;
  7928. } // get next entry
  7929. if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
  7930. // or finish the iteration
  7931. that._t = undefined;
  7932. return _iterStep(1);
  7933. }
  7934. // return step by kind
  7935. if (kind == 'keys') return _iterStep(0, entry.k);
  7936. if (kind == 'values') return _iterStep(0, entry.v);
  7937. return _iterStep(0, [entry.k, entry.v]);
  7938. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  7939. // add [@@species], 23.1.2.2, 23.2.2.2
  7940. _setSpecies(NAME);
  7941. }
  7942. };
  7943. var ITERATOR$4 = _wks('iterator');
  7944. var SAFE_CLOSING = false;
  7945. try {
  7946. var riter = [7][ITERATOR$4]();
  7947. riter['return'] = function () {
  7948. SAFE_CLOSING = true;
  7949. };
  7950. // eslint-disable-next-line no-throw-literal
  7951. } catch (e) {/* empty */}
  7952. var _iterDetect = function _iterDetect(exec, skipClosing) {
  7953. if (!skipClosing && !SAFE_CLOSING) return false;
  7954. var safe = false;
  7955. try {
  7956. var arr = [7];
  7957. var iter = arr[ITERATOR$4]();
  7958. iter.next = function () {
  7959. return { done: safe = true };
  7960. };
  7961. arr[ITERATOR$4] = function () {
  7962. return iter;
  7963. };
  7964. exec(arr);
  7965. } catch (e) {/* empty */}
  7966. return safe;
  7967. };
  7968. var setPrototypeOf$2 = _setProto.set;
  7969. var _inheritIfRequired = function _inheritIfRequired(that, target, C) {
  7970. var S = target.constructor;
  7971. var P;
  7972. if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && _isObject(P) && setPrototypeOf$2) {
  7973. setPrototypeOf$2(that, P);
  7974. }return that;
  7975. };
  7976. var _collection = function _collection(NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  7977. var Base = _global[NAME];
  7978. var C = Base;
  7979. var ADDER = IS_MAP ? 'set' : 'add';
  7980. var proto = C && C.prototype;
  7981. var O = {};
  7982. var fixMethod = function fixMethod(KEY) {
  7983. var fn = proto[KEY];
  7984. _redefine(proto, KEY, KEY == 'delete' ? function (a) {
  7985. return IS_WEAK && !_isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  7986. } : KEY == 'has' ? function has(a) {
  7987. return IS_WEAK && !_isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  7988. } : KEY == 'get' ? function get(a) {
  7989. return IS_WEAK && !_isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
  7990. } : KEY == 'add' ? function add(a) {
  7991. fn.call(this, a === 0 ? 0 : a);return this;
  7992. } : function set(a, b) {
  7993. fn.call(this, a === 0 ? 0 : a, b);return this;
  7994. });
  7995. };
  7996. if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !_fails(function () {
  7997. new C().entries().next();
  7998. }))) {
  7999. // create collection constructor
  8000. C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
  8001. _redefineAll(C.prototype, methods);
  8002. _meta.NEED = true;
  8003. } else {
  8004. var instance = new C();
  8005. // early implementations not supports chaining
  8006. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  8007. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  8008. var THROWS_ON_PRIMITIVES = _fails(function () {
  8009. instance.has(1);
  8010. });
  8011. // most early implementations doesn't supports iterables, most modern - not close it correctly
  8012. var ACCEPT_ITERABLES = _iterDetect(function (iter) {
  8013. new C(iter);
  8014. }); // eslint-disable-line no-new
  8015. // for early implementations -0 and +0 not the same
  8016. var BUGGY_ZERO = !IS_WEAK && _fails(function () {
  8017. // V8 ~ Chromium 42- fails only with 5+ elements
  8018. var $instance = new C();
  8019. var index = 5;
  8020. while (index--) {
  8021. $instance[ADDER](index, index);
  8022. }return !$instance.has(-0);
  8023. });
  8024. if (!ACCEPT_ITERABLES) {
  8025. C = wrapper(function (target, iterable) {
  8026. _anInstance(target, C, NAME);
  8027. var that = _inheritIfRequired(new Base(), target, C);
  8028. if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that);
  8029. return that;
  8030. });
  8031. C.prototype = proto;
  8032. proto.constructor = C;
  8033. }
  8034. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  8035. fixMethod('delete');
  8036. fixMethod('has');
  8037. IS_MAP && fixMethod('get');
  8038. }
  8039. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  8040. // weak collections should not contains .clear method
  8041. if (IS_WEAK && proto.clear) delete proto.clear;
  8042. }
  8043. _setToStringTag(C, NAME);
  8044. O[NAME] = C;
  8045. _export(_export.G + _export.W + _export.F * (C != Base), O);
  8046. if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
  8047. return C;
  8048. };
  8049. var SET = 'Set';
  8050. // 23.2 Set Objects
  8051. var es6_set = _collection(SET, function (get) {
  8052. return function Set() {
  8053. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  8054. };
  8055. }, {
  8056. // 23.2.3.1 Set.prototype.add(value)
  8057. add: function add(value) {
  8058. return _collectionStrong.def(_validateCollection(this, SET), value = value === 0 ? 0 : value, value);
  8059. }
  8060. }, _collectionStrong);
  8061. var _arrayFromIterable = function _arrayFromIterable(iter, ITERATOR) {
  8062. var result = [];
  8063. _forOf(iter, false, result.push, result, ITERATOR);
  8064. return result;
  8065. };
  8066. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  8067. var _collectionToJson = function _collectionToJson(NAME) {
  8068. return function toJSON() {
  8069. if (_classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
  8070. return _arrayFromIterable(this);
  8071. };
  8072. };
  8073. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  8074. _export(_export.P + _export.R, 'Set', { toJSON: _collectionToJson('Set') });
  8075. // https://tc39.github.io/proposal-setmap-offrom/
  8076. var _setCollectionOf = function _setCollectionOf(COLLECTION) {
  8077. _export(_export.S, COLLECTION, { of: function of() {
  8078. var length = arguments.length;
  8079. var A = Array(length);
  8080. while (length--) {
  8081. A[length] = arguments[length];
  8082. }return new this(A);
  8083. } });
  8084. };
  8085. // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
  8086. _setCollectionOf('Set');
  8087. // https://tc39.github.io/proposal-setmap-offrom/
  8088. var _setCollectionFrom = function _setCollectionFrom(COLLECTION) {
  8089. _export(_export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
  8090. var mapFn = arguments[1];
  8091. var mapping, A, n, cb;
  8092. _aFunction(this);
  8093. mapping = mapFn !== undefined;
  8094. if (mapping) _aFunction(mapFn);
  8095. if (source == undefined) return new this();
  8096. A = [];
  8097. if (mapping) {
  8098. n = 0;
  8099. cb = _ctx(mapFn, arguments[2], 2);
  8100. _forOf(source, false, function (nextItem) {
  8101. A.push(cb(nextItem, n++));
  8102. });
  8103. } else {
  8104. _forOf(source, false, A.push, A);
  8105. }
  8106. return new this(A);
  8107. } });
  8108. };
  8109. // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
  8110. _setCollectionFrom('Set');
  8111. var set$1 = _core.Set;
  8112. var MAP = 'Map';
  8113. // 23.1 Map Objects
  8114. var es6_map = _collection(MAP, function (get) {
  8115. return function Map() {
  8116. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  8117. };
  8118. }, {
  8119. // 23.1.3.6 Map.prototype.get(key)
  8120. get: function get(key) {
  8121. var entry = _collectionStrong.getEntry(_validateCollection(this, MAP), key);
  8122. return entry && entry.v;
  8123. },
  8124. // 23.1.3.9 Map.prototype.set(key, value)
  8125. set: function set(key, value) {
  8126. return _collectionStrong.def(_validateCollection(this, MAP), key === 0 ? 0 : key, value);
  8127. }
  8128. }, _collectionStrong, true);
  8129. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  8130. _export(_export.P + _export.R, 'Map', { toJSON: _collectionToJson('Map') });
  8131. // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
  8132. _setCollectionOf('Map');
  8133. // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
  8134. _setCollectionFrom('Map');
  8135. var map = _core.Map;
  8136. // 7.2.2 IsArray(argument)
  8137. var _isArray = Array.isArray || function isArray(arg) {
  8138. return _cof(arg) == 'Array';
  8139. };
  8140. var SPECIES$1 = _wks('species');
  8141. var _arraySpeciesConstructor = function _arraySpeciesConstructor(original) {
  8142. var C;
  8143. if (_isArray(original)) {
  8144. C = original.constructor;
  8145. // cross-realm fallback
  8146. if (typeof C == 'function' && (C === Array || _isArray(C.prototype))) C = undefined;
  8147. if (_isObject(C)) {
  8148. C = C[SPECIES$1];
  8149. if (C === null) C = undefined;
  8150. }
  8151. }return C === undefined ? Array : C;
  8152. };
  8153. // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
  8154. var _arraySpeciesCreate = function _arraySpeciesCreate(original, length) {
  8155. return new (_arraySpeciesConstructor(original))(length);
  8156. };
  8157. // 0 -> Array#forEach
  8158. // 1 -> Array#map
  8159. // 2 -> Array#filter
  8160. // 3 -> Array#some
  8161. // 4 -> Array#every
  8162. // 5 -> Array#find
  8163. // 6 -> Array#findIndex
  8164. var _arrayMethods = function _arrayMethods(TYPE, $create) {
  8165. var IS_MAP = TYPE == 1;
  8166. var IS_FILTER = TYPE == 2;
  8167. var IS_SOME = TYPE == 3;
  8168. var IS_EVERY = TYPE == 4;
  8169. var IS_FIND_INDEX = TYPE == 6;
  8170. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  8171. var create = $create || _arraySpeciesCreate;
  8172. return function ($this, callbackfn, that) {
  8173. var O = _toObject($this);
  8174. var self = _iobject(O);
  8175. var f = _ctx(callbackfn, that, 3);
  8176. var length = _toLength(self.length);
  8177. var index = 0;
  8178. var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  8179. var val, res;
  8180. for (; length > index; index++) {
  8181. if (NO_HOLES || index in self) {
  8182. val = self[index];
  8183. res = f(val, index, O);
  8184. if (TYPE) {
  8185. if (IS_MAP) result[index] = res; // map
  8186. else if (res) switch (TYPE) {
  8187. case 3:
  8188. return true; // some
  8189. case 5:
  8190. return val; // find
  8191. case 6:
  8192. return index; // findIndex
  8193. case 2:
  8194. result.push(val); // filter
  8195. } else if (IS_EVERY) return false; // every
  8196. }
  8197. }
  8198. }return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  8199. };
  8200. };
  8201. var f$3 = Object.getOwnPropertySymbols;
  8202. var _objectGops = {
  8203. f: f$3
  8204. };
  8205. // 19.1.2.1 Object.assign(target, source, ...)
  8206. var $assign = Object.assign;
  8207. // should work with symbols and should have deterministic property order (V8 bug)
  8208. var _objectAssign = !$assign || _fails(function () {
  8209. var A = {};
  8210. var B = {};
  8211. // eslint-disable-next-line no-undef
  8212. var S = Symbol();
  8213. var K = 'abcdefghijklmnopqrst';
  8214. A[S] = 7;
  8215. K.split('').forEach(function (k) {
  8216. B[k] = k;
  8217. });
  8218. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  8219. }) ? function assign(target, source) {
  8220. // eslint-disable-line no-unused-vars
  8221. var T = _toObject(target);
  8222. var aLen = arguments.length;
  8223. var index = 1;
  8224. var getSymbols = _objectGops.f;
  8225. var isEnum = _objectPie.f;
  8226. while (aLen > index) {
  8227. var S = _iobject(arguments[index++]);
  8228. var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S);
  8229. var length = keys.length;
  8230. var j = 0;
  8231. var key;
  8232. while (length > j) {
  8233. if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
  8234. }
  8235. }return T;
  8236. } : $assign;
  8237. var getWeak = _meta.getWeak;
  8238. var arrayFind = _arrayMethods(5);
  8239. var arrayFindIndex = _arrayMethods(6);
  8240. var id$1 = 0;
  8241. // fallback for uncaught frozen keys
  8242. var uncaughtFrozenStore = function uncaughtFrozenStore(that) {
  8243. return that._l || (that._l = new UncaughtFrozenStore());
  8244. };
  8245. var UncaughtFrozenStore = function UncaughtFrozenStore() {
  8246. this.a = [];
  8247. };
  8248. var findUncaughtFrozen = function findUncaughtFrozen(store, key) {
  8249. return arrayFind(store.a, function (it) {
  8250. return it[0] === key;
  8251. });
  8252. };
  8253. UncaughtFrozenStore.prototype = {
  8254. get: function get(key) {
  8255. var entry = findUncaughtFrozen(this, key);
  8256. if (entry) return entry[1];
  8257. },
  8258. has: function has(key) {
  8259. return !!findUncaughtFrozen(this, key);
  8260. },
  8261. set: function set(key, value) {
  8262. var entry = findUncaughtFrozen(this, key);
  8263. if (entry) entry[1] = value;else this.a.push([key, value]);
  8264. },
  8265. 'delete': function _delete(key) {
  8266. var index = arrayFindIndex(this.a, function (it) {
  8267. return it[0] === key;
  8268. });
  8269. if (~index) this.a.splice(index, 1);
  8270. return !!~index;
  8271. }
  8272. };
  8273. var _collectionWeak = {
  8274. getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) {
  8275. var C = wrapper(function (that, iterable) {
  8276. _anInstance(that, C, NAME, '_i');
  8277. that._t = NAME; // collection type
  8278. that._i = id$1++; // collection id
  8279. that._l = undefined; // leak store for uncaught frozen objects
  8280. if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that);
  8281. });
  8282. _redefineAll(C.prototype, {
  8283. // 23.3.3.2 WeakMap.prototype.delete(key)
  8284. // 23.4.3.3 WeakSet.prototype.delete(value)
  8285. 'delete': function _delete(key) {
  8286. if (!_isObject(key)) return false;
  8287. var data = getWeak(key);
  8288. if (data === true) return uncaughtFrozenStore(_validateCollection(this, NAME))['delete'](key);
  8289. return data && _has(data, this._i) && delete data[this._i];
  8290. },
  8291. // 23.3.3.4 WeakMap.prototype.has(key)
  8292. // 23.4.3.4 WeakSet.prototype.has(value)
  8293. has: function has(key) {
  8294. if (!_isObject(key)) return false;
  8295. var data = getWeak(key);
  8296. if (data === true) return uncaughtFrozenStore(_validateCollection(this, NAME)).has(key);
  8297. return data && _has(data, this._i);
  8298. }
  8299. });
  8300. return C;
  8301. },
  8302. def: function def(that, key, value) {
  8303. var data = getWeak(_anObject(key), true);
  8304. if (data === true) uncaughtFrozenStore(that).set(key, value);else data[that._i] = value;
  8305. return that;
  8306. },
  8307. ufstore: uncaughtFrozenStore
  8308. };
  8309. var es6_weakMap = createCommonjsModule(function (module) {
  8310. var each = _arrayMethods(0);
  8311. var WEAK_MAP = 'WeakMap';
  8312. var getWeak = _meta.getWeak;
  8313. var isExtensible = Object.isExtensible;
  8314. var uncaughtFrozenStore = _collectionWeak.ufstore;
  8315. var tmp = {};
  8316. var InternalMap;
  8317. var wrapper = function wrapper(get) {
  8318. return function WeakMap() {
  8319. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  8320. };
  8321. };
  8322. var methods = {
  8323. // 23.3.3.3 WeakMap.prototype.get(key)
  8324. get: function get(key) {
  8325. if (_isObject(key)) {
  8326. var data = getWeak(key);
  8327. if (data === true) return uncaughtFrozenStore(_validateCollection(this, WEAK_MAP)).get(key);
  8328. return data ? data[this._i] : undefined;
  8329. }
  8330. },
  8331. // 23.3.3.5 WeakMap.prototype.set(key, value)
  8332. set: function set(key, value) {
  8333. return _collectionWeak.def(_validateCollection(this, WEAK_MAP), key, value);
  8334. }
  8335. };
  8336. // 23.3 WeakMap Objects
  8337. var $WeakMap = module.exports = _collection(WEAK_MAP, wrapper, methods, _collectionWeak, true, true);
  8338. // IE11 WeakMap frozen keys fix
  8339. if (_fails(function () {
  8340. return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7;
  8341. })) {
  8342. InternalMap = _collectionWeak.getConstructor(wrapper, WEAK_MAP);
  8343. _objectAssign(InternalMap.prototype, methods);
  8344. _meta.NEED = true;
  8345. each(['delete', 'has', 'get', 'set'], function (key) {
  8346. var proto = $WeakMap.prototype;
  8347. var method = proto[key];
  8348. _redefine(proto, key, function (a, b) {
  8349. // store frozen objects on internal weakmap shim
  8350. if (_isObject(a) && !isExtensible(a)) {
  8351. if (!this._f) this._f = new InternalMap();
  8352. var result = this._f[key](a, b);
  8353. return key == 'set' ? this : result;
  8354. // store all the rest on native weakmap
  8355. }return method.call(this, a, b);
  8356. });
  8357. });
  8358. }
  8359. });
  8360. // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
  8361. _setCollectionOf('WeakMap');
  8362. // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
  8363. _setCollectionFrom('WeakMap');
  8364. var weakMap = _core.WeakMap;
  8365. var _createProperty = function _createProperty(object, index, value) {
  8366. if (index in object) _objectDp.f(object, index, _propertyDesc(0, value));else object[index] = value;
  8367. };
  8368. _export(_export.S + _export.F * !_iterDetect(function (iter) {
  8369. }), 'Array', {
  8370. // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  8371. from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  8372. var O = _toObject(arrayLike);
  8373. var C = typeof this == 'function' ? this : Array;
  8374. var aLen = arguments.length;
  8375. var mapfn = aLen > 1 ? arguments[1] : undefined;
  8376. var mapping = mapfn !== undefined;
  8377. var index = 0;
  8378. var iterFn = core_getIteratorMethod(O);
  8379. var length, result, step, iterator;
  8380. if (mapping) mapfn = _ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
  8381. // if object isn't iterable or it's array with default iterator - use simple case
  8382. if (iterFn != undefined && !(C == Array && _isArrayIter(iterFn))) {
  8383. for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
  8384. _createProperty(result, index, mapping ? _iterCall(iterator, mapfn, [step.value, index], true) : step.value);
  8385. }
  8386. } else {
  8387. length = _toLength(O.length);
  8388. for (result = new C(length); length > index; index++) {
  8389. _createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
  8390. }
  8391. }
  8392. result.length = index;
  8393. return result;
  8394. }
  8395. });
  8396. var from$1 = _core.Array.from;
  8397. var reservedTagList = new Set(['annotation-xml', 'color-profile', 'font-face', 'font-face-src', 'font-face-uri', 'font-face-format', 'font-face-name', 'missing-glyph']);
  8398. /**
  8399. * @param {string} localName
  8400. * @returns {boolean}
  8401. */
  8402. function isValidCustomElementName(localName) {
  8403. var reserved = reservedTagList.has(localName);
  8404. var validForm = /^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(localName);
  8405. return !reserved && validForm;
  8406. }
  8407. /**
  8408. * @private
  8409. * @param {!Node} node
  8410. * @return {boolean}
  8411. */
  8412. function isConnected(node) {
  8413. // Use `Node#isConnected`, if defined.
  8414. var nativeValue = node.isConnected;
  8415. if (nativeValue !== undefined) {
  8416. return nativeValue;
  8417. }
  8418. /** @type {?Node|undefined} */
  8419. var current = node;
  8420. while (current && !(current.__CE_isImportDocument || current instanceof Document)) {
  8421. current = current.parentNode || (window.ShadowRoot && current instanceof ShadowRoot ? current.host : undefined);
  8422. }
  8423. return !!(current && (current.__CE_isImportDocument || current instanceof Document));
  8424. }
  8425. /**
  8426. * @param {!Node} root
  8427. * @param {!Node} start
  8428. * @return {?Node}
  8429. */
  8430. function nextSiblingOrAncestorSibling(root, start) {
  8431. var node = start;
  8432. while (node && node !== root && !node.nextSibling) {
  8433. node = node.parentNode;
  8434. }
  8435. return !node || node === root ? null : node.nextSibling;
  8436. }
  8437. /**
  8438. * @param {!Node} root
  8439. * @param {!Node} start
  8440. * @return {?Node}
  8441. */
  8442. function nextNode(root, start) {
  8443. return start.firstChild ? start.firstChild : nextSiblingOrAncestorSibling(root, start);
  8444. }
  8445. /**
  8446. * @param {!Node} root
  8447. * @param {!function(!Element)} callback
  8448. * @param {!Set<Node>=} visitedImports
  8449. */
  8450. function walkDeepDescendantElements(root, callback) {
  8451. var visitedImports = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Set();
  8452. var node = root;
  8453. while (node) {
  8454. if (node.nodeType === Node.ELEMENT_NODE) {
  8455. var element = /** @type {!Element} */node;
  8456. callback(element);
  8457. var localName = element.localName;
  8458. if (localName === 'link' && element.getAttribute('rel') === 'import') {
  8459. // If this import (polyfilled or not) has it's root node available,
  8460. // walk it.
  8461. var importNode = /** @type {!Node} */element.import;
  8462. if (importNode instanceof Node && !visitedImports.has(importNode)) {
  8463. // Prevent multiple walks of the same import root.
  8464. visitedImports.add(importNode);
  8465. for (var child = importNode.firstChild; child; child = child.nextSibling) {
  8466. walkDeepDescendantElements(child, callback, visitedImports);
  8467. }
  8468. }
  8469. // Ignore descendants of import links to prevent attempting to walk the
  8470. // elements created by the HTML Imports polyfill that we just walked
  8471. // above.
  8472. node = nextSiblingOrAncestorSibling(root, element);
  8473. continue;
  8474. } else if (localName === 'template') {
  8475. // Ignore descendants of templates. There shouldn't be any descendants
  8476. // because they will be moved into `.content` during construction in
  8477. // browsers that support template but, in case they exist and are still
  8478. // waiting to be moved by a polyfill, they will be ignored.
  8479. node = nextSiblingOrAncestorSibling(root, element);
  8480. continue;
  8481. }
  8482. // Walk shadow roots.
  8483. var shadowRoot = element.__CE_shadowRoot;
  8484. if (shadowRoot) {
  8485. for (var _child = shadowRoot.firstChild; _child; _child = _child.nextSibling) {
  8486. walkDeepDescendantElements(_child, callback, visitedImports);
  8487. }
  8488. }
  8489. }
  8490. node = nextNode(root, node);
  8491. }
  8492. }
  8493. /**
  8494. * Used to suppress Closure's "Modifying the prototype is only allowed if the
  8495. * constructor is in the same scope" warning without using
  8496. * `@suppress {newCheckTypes, duplicate}` because `newCheckTypes` is too broad.
  8497. *
  8498. * @param {!Object} destination
  8499. * @param {string} name
  8500. * @param {*} value
  8501. */
  8502. function setPropertyUnchecked(destination, name, value) {
  8503. destination[name] = value;
  8504. }
  8505. /**
  8506. * @enum {number}
  8507. */
  8508. var CustomElementState = {
  8509. custom: 1,
  8510. failed: 2
  8511. };
  8512. var CustomElementInternals = function () {
  8513. function CustomElementInternals() {
  8514. classCallCheck(this, CustomElementInternals);
  8515. /** @type {!Map<string, !CustomElementDefinition>} */
  8516. this._localNameToDefinition = new Map();
  8517. /** @type {!Map<!Function, !CustomElementDefinition>} */
  8518. this._constructorToDefinition = new Map();
  8519. /** @type {!Array<!function(!Node)>} */
  8520. this._patches = [];
  8521. /** @type {boolean} */
  8522. this._hasPatches = false;
  8523. }
  8524. /**
  8525. * @param {string} localName
  8526. * @param {!CustomElementDefinition} definition
  8527. */
  8528. createClass(CustomElementInternals, [{
  8529. key: 'setDefinition',
  8530. value: function setDefinition(localName, definition) {
  8531. this._localNameToDefinition.set(localName, definition);
  8532. this._constructorToDefinition.set(definition.constructor, definition);
  8533. }
  8534. /**
  8535. * @param {string} localName
  8536. * @return {!CustomElementDefinition|undefined}
  8537. */
  8538. }, {
  8539. key: 'localNameToDefinition',
  8540. value: function localNameToDefinition(localName) {
  8541. return this._localNameToDefinition.get(localName);
  8542. }
  8543. /**
  8544. * @param {!Function} constructor
  8545. * @return {!CustomElementDefinition|undefined}
  8546. */
  8547. }, {
  8548. key: 'constructorToDefinition',
  8549. value: function constructorToDefinition(constructor) {
  8550. return this._constructorToDefinition.get(constructor);
  8551. }
  8552. /**
  8553. * @param {!function(!Node)} listener
  8554. */
  8555. }, {
  8556. key: 'addPatch',
  8557. value: function addPatch(listener) {
  8558. this._hasPatches = true;
  8559. this._patches.push(listener);
  8560. }
  8561. /**
  8562. * @param {!Node} node
  8563. */
  8564. }, {
  8565. key: 'patchTree',
  8566. value: function patchTree(node) {
  8567. var _this = this;
  8568. if (!this._hasPatches) return;
  8569. walkDeepDescendantElements(node, function (element) {
  8570. return _this.patch(element);
  8571. });
  8572. }
  8573. /**
  8574. * @param {!Node} node
  8575. */
  8576. }, {
  8577. key: 'patch',
  8578. value: function patch(node) {
  8579. if (!this._hasPatches) return;
  8580. if (node.__CE_patched) return;
  8581. node.__CE_patched = true;
  8582. for (var i = 0; i < this._patches.length; i++) {
  8583. this._patches[i](node);
  8584. }
  8585. }
  8586. /**
  8587. * @param {!Node} root
  8588. */
  8589. }, {
  8590. key: 'connectTree',
  8591. value: function connectTree(root) {
  8592. var elements = [];
  8593. walkDeepDescendantElements(root, function (element) {
  8594. return elements.push(element);
  8595. });
  8596. for (var i = 0; i < elements.length; i++) {
  8597. var element = elements[i];
  8598. if (element.__CE_state === CustomElementState.custom) {
  8599. if (isConnected(element)) {
  8600. this.connectedCallback(element);
  8601. }
  8602. } else {
  8603. this.upgradeElement(element);
  8604. }
  8605. }
  8606. }
  8607. /**
  8608. * @param {!Node} root
  8609. */
  8610. }, {
  8611. key: 'disconnectTree',
  8612. value: function disconnectTree(root) {
  8613. var elements = [];
  8614. walkDeepDescendantElements(root, function (element) {
  8615. return elements.push(element);
  8616. });
  8617. for (var i = 0; i < elements.length; i++) {
  8618. var element = elements[i];
  8619. if (element.__CE_state === CustomElementState.custom) {
  8620. this.disconnectedCallback(element);
  8621. }
  8622. }
  8623. }
  8624. /**
  8625. * Upgrades all uncustomized custom elements at and below a root node for
  8626. * which there is a definition. When custom element reaction callbacks are
  8627. * assumed to be called synchronously (which, by the current DOM / HTML spec
  8628. * definitions, they are *not*), callbacks for both elements customized
  8629. * synchronously by the parser and elements being upgraded occur in the same
  8630. * relative order.
  8631. *
  8632. * NOTE: This function, when used to simulate the construction of a tree that
  8633. * is already created but not customized (i.e. by the parser), does *not*
  8634. * prevent the element from reading the 'final' (true) state of the tree. For
  8635. * example, the element, during truly synchronous parsing / construction would
  8636. * see that it contains no children as they have not yet been inserted.
  8637. * However, this function does not modify the tree, the element will
  8638. * (incorrectly) have children. Additionally, self-modification restrictions
  8639. * for custom element constructors imposed by the DOM spec are *not* enforced.
  8640. *
  8641. *
  8642. * The following nested list shows the steps extending down from the HTML
  8643. * spec's parsing section that cause elements to be synchronously created and
  8644. * upgraded:
  8645. *
  8646. * The "in body" insertion mode:
  8647. * https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
  8648. * - Switch on token:
  8649. * .. other cases ..
  8650. * -> Any other start tag
  8651. * - [Insert an HTML element](below) for the token.
  8652. *
  8653. * Insert an HTML element:
  8654. * https://html.spec.whatwg.org/multipage/syntax.html#insert-an-html-element
  8655. * - Insert a foreign element for the token in the HTML namespace:
  8656. * https://html.spec.whatwg.org/multipage/syntax.html#insert-a-foreign-element
  8657. * - Create an element for a token:
  8658. * https://html.spec.whatwg.org/multipage/syntax.html#create-an-element-for-the-token
  8659. * - Will execute script flag is true?
  8660. * - (Element queue pushed to the custom element reactions stack.)
  8661. * - Create an element:
  8662. * https://dom.spec.whatwg.org/#concept-create-element
  8663. * - Sync CE flag is true?
  8664. * - Constructor called.
  8665. * - Self-modification restrictions enforced.
  8666. * - Sync CE flag is false?
  8667. * - (Upgrade reaction enqueued.)
  8668. * - Attributes appended to element.
  8669. * (`attributeChangedCallback` reactions enqueued.)
  8670. * - Will execute script flag is true?
  8671. * - (Element queue popped from the custom element reactions stack.
  8672. * Reactions in the popped stack are invoked.)
  8673. * - (Element queue pushed to the custom element reactions stack.)
  8674. * - Insert the element:
  8675. * https://dom.spec.whatwg.org/#concept-node-insert
  8676. * - Shadow-including descendants are connected. During parsing
  8677. * construction, there are no shadow-*excluding* descendants.
  8678. * However, the constructor may have validly attached a shadow
  8679. * tree to itself and added descendants to that shadow tree.
  8680. * (`connectedCallback` reactions enqueued.)
  8681. * - (Element queue popped from the custom element reactions stack.
  8682. * Reactions in the popped stack are invoked.)
  8683. *
  8684. * @param {!Node} root
  8685. * @param {!Set<Node>=} visitedImports
  8686. */
  8687. }, {
  8688. key: 'patchAndUpgradeTree',
  8689. value: function patchAndUpgradeTree(root) {
  8690. var _this2 = this;
  8691. var visitedImports = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set();
  8692. var elements = [];
  8693. var gatherElements = function gatherElements(element) {
  8694. if (element.localName === 'link' && element.getAttribute('rel') === 'import') {
  8695. // The HTML Imports polyfill sets a descendant element of the link to
  8696. // the `import` property, specifically this is *not* a Document.
  8697. var importNode = /** @type {?Node} */element.import;
  8698. if (importNode instanceof Node && importNode.readyState === 'complete') {
  8699. importNode.__CE_isImportDocument = true;
  8700. // Connected links are associated with the registry.
  8701. importNode.__CE_hasRegistry = true;
  8702. } else {
  8703. // If this link's import root is not available, its contents can't be
  8704. // walked. Wait for 'load' and walk it when it's ready.
  8705. element.addEventListener('load', function () {
  8706. var importNode = /** @type {!Node} */element.import;
  8707. if (importNode.__CE_documentLoadHandled) return;
  8708. importNode.__CE_documentLoadHandled = true;
  8709. importNode.__CE_isImportDocument = true;
  8710. // Connected links are associated with the registry.
  8711. importNode.__CE_hasRegistry = true;
  8712. // Clone the `visitedImports` set that was populated sync during
  8713. // the `patchAndUpgradeTree` call that caused this 'load' handler to
  8714. // be added. Then, remove *this* link's import node so that we can
  8715. // walk that import again, even if it was partially walked later
  8716. // during the same `patchAndUpgradeTree` call.
  8717. visitedImports.delete(importNode);
  8718. _this2.patchAndUpgradeTree(importNode, visitedImports);
  8719. });
  8720. }
  8721. } else {
  8722. elements.push(element);
  8723. }
  8724. };
  8725. // `walkDeepDescendantElements` populates (and internally checks against)
  8726. // `visitedImports` when traversing a loaded import.
  8727. walkDeepDescendantElements(root, gatherElements, visitedImports);
  8728. if (this._hasPatches) {
  8729. for (var i = 0; i < elements.length; i++) {
  8730. this.patch(elements[i]);
  8731. }
  8732. }
  8733. for (var _i = 0; _i < elements.length; _i++) {
  8734. this.upgradeElement(elements[_i]);
  8735. }
  8736. }
  8737. /**
  8738. * @param {!Element} element
  8739. */
  8740. }, {
  8741. key: 'upgradeElement',
  8742. value: function upgradeElement(element) {
  8743. var currentState = element.__CE_state;
  8744. if (currentState !== undefined) return;
  8745. var definition = this.localNameToDefinition(element.localName);
  8746. if (!definition) return;
  8747. definition.constructionStack.push(element);
  8748. var constructor = definition.constructor;
  8749. try {
  8750. try {
  8751. var result = new constructor();
  8752. if (result !== element) {
  8753. throw new Error('The custom element constructor did not produce the element being upgraded.');
  8754. }
  8755. } finally {
  8756. definition.constructionStack.pop();
  8757. }
  8758. } catch (e) {
  8759. element.__CE_state = CustomElementState.failed;
  8760. throw e;
  8761. }
  8762. element.__CE_state = CustomElementState.custom;
  8763. element.__CE_definition = definition;
  8764. if (definition.attributeChangedCallback) {
  8765. var observedAttributes = definition.observedAttributes;
  8766. for (var i = 0; i < observedAttributes.length; i++) {
  8767. var name = observedAttributes[i];
  8768. var value = element.getAttribute(name);
  8769. if (value !== null) {
  8770. this.attributeChangedCallback(element, name, null, value, null);
  8771. }
  8772. }
  8773. }
  8774. if (isConnected(element)) {
  8775. this.connectedCallback(element);
  8776. }
  8777. }
  8778. /**
  8779. * @param {!Element} element
  8780. */
  8781. }, {
  8782. key: 'connectedCallback',
  8783. value: function connectedCallback(element) {
  8784. var definition = element.__CE_definition;
  8785. if (definition.connectedCallback) {
  8786. definition.connectedCallback.call(element);
  8787. }
  8788. element.__CE_isConnectedCallbackCalled = true;
  8789. }
  8790. /**
  8791. * @param {!Element} element
  8792. */
  8793. }, {
  8794. key: 'disconnectedCallback',
  8795. value: function disconnectedCallback(element) {
  8796. if (!element.__CE_isConnectedCallbackCalled) {
  8797. this.connectedCallback(element);
  8798. }
  8799. var definition = element.__CE_definition;
  8800. if (definition.disconnectedCallback) {
  8801. definition.disconnectedCallback.call(element);
  8802. }
  8803. element.__CE_isConnectedCallbackCalled = undefined;
  8804. }
  8805. /**
  8806. * @param {!Element} element
  8807. * @param {string} name
  8808. * @param {?string} oldValue
  8809. * @param {?string} newValue
  8810. * @param {?string} namespace
  8811. */
  8812. }, {
  8813. key: 'attributeChangedCallback',
  8814. value: function attributeChangedCallback(element, name, oldValue, newValue, namespace) {
  8815. var definition = element.__CE_definition;
  8816. if (definition.attributeChangedCallback && definition.observedAttributes.indexOf(name) > -1) {
  8817. definition.attributeChangedCallback.call(element, name, oldValue, newValue, namespace);
  8818. }
  8819. }
  8820. }]);
  8821. return CustomElementInternals;
  8822. }();
  8823. var DocumentConstructionObserver = function () {
  8824. function DocumentConstructionObserver(internals, doc) {
  8825. classCallCheck(this, DocumentConstructionObserver);
  8826. /**
  8827. * @type {!CustomElementInternals}
  8828. */
  8829. this._internals = internals;
  8830. /**
  8831. * @type {!Document}
  8832. */
  8833. this._document = doc;
  8834. /**
  8835. * @type {MutationObserver|undefined}
  8836. */
  8837. this._observer = undefined;
  8838. // Simulate tree construction for all currently accessible nodes in the
  8839. // document.
  8840. this._internals.patchAndUpgradeTree(this._document);
  8841. if (this._document.readyState === 'loading') {
  8842. this._observer = new MutationObserver(this._handleMutations.bind(this));
  8843. // Nodes created by the parser are given to the observer *before* the next
  8844. // task runs. Inline scripts are run in a new task. This means that the
  8845. // observer will be able to handle the newly parsed nodes before the inline
  8846. // script is run.
  8847. this._observer.observe(this._document, {
  8848. childList: true,
  8849. subtree: true
  8850. });
  8851. }
  8852. }
  8853. createClass(DocumentConstructionObserver, [{
  8854. key: 'disconnect',
  8855. value: function disconnect() {
  8856. if (this._observer) {
  8857. this._observer.disconnect();
  8858. }
  8859. }
  8860. /**
  8861. * @param {!Array<!MutationRecord>} mutations
  8862. */
  8863. }, {
  8864. key: '_handleMutations',
  8865. value: function _handleMutations(mutations) {
  8866. // Once the document's `readyState` is 'interactive' or 'complete', all new
  8867. // nodes created within that document will be the result of script and
  8868. // should be handled by patching.
  8869. var readyState = this._document.readyState;
  8870. if (readyState === 'interactive' || readyState === 'complete') {
  8871. this.disconnect();
  8872. }
  8873. for (var i = 0; i < mutations.length; i++) {
  8874. var addedNodes = mutations[i].addedNodes;
  8875. for (var j = 0; j < addedNodes.length; j++) {
  8876. var node = addedNodes[j];
  8877. this._internals.patchAndUpgradeTree(node);
  8878. }
  8879. }
  8880. }
  8881. }]);
  8882. return DocumentConstructionObserver;
  8883. }();
  8884. /**
  8885. * @template T
  8886. */
  8887. var Deferred = function () {
  8888. function Deferred() {
  8889. var _this = this;
  8890. classCallCheck(this, Deferred);
  8891. /**
  8892. * @private
  8893. * @type {T|undefined}
  8894. */
  8895. this._value = undefined;
  8896. /**
  8897. * @private
  8898. * @type {Function|undefined}
  8899. */
  8900. this._resolve = undefined;
  8901. /**
  8902. * @private
  8903. * @type {!Promise<T>}
  8904. */
  8905. this._promise = new Promise(function (resolve) {
  8906. _this._resolve = resolve;
  8907. if (_this._value) {
  8908. resolve(_this._value);
  8909. }
  8910. });
  8911. }
  8912. /**
  8913. * @param {T} value
  8914. */
  8915. createClass(Deferred, [{
  8916. key: 'resolve',
  8917. value: function resolve(value) {
  8918. if (this._value) {
  8919. throw new Error('Already resolved.');
  8920. }
  8921. this._value = value;
  8922. if (this._resolve) {
  8923. this._resolve(value);
  8924. }
  8925. }
  8926. /**
  8927. * @return {!Promise<T>}
  8928. */
  8929. }, {
  8930. key: 'toPromise',
  8931. value: function toPromise() {
  8932. return this._promise;
  8933. }
  8934. }]);
  8935. return Deferred;
  8936. }();
  8937. /**
  8938. * @unrestricted
  8939. */
  8940. var CustomElementRegistry = function () {
  8941. /**
  8942. * @param {!CustomElementInternals} internals
  8943. */
  8944. function CustomElementRegistry(internals) {
  8945. classCallCheck(this, CustomElementRegistry);
  8946. /**
  8947. * @private
  8948. * @type {boolean}
  8949. */
  8950. this._elementDefinitionIsRunning = false;
  8951. /**
  8952. * @private
  8953. * @type {!CustomElementInternals}
  8954. */
  8955. this._internals = internals;
  8956. /**
  8957. * @private
  8958. * @type {!Map<string, !Deferred<undefined>>}
  8959. */
  8960. this._whenDefinedDeferred = new Map();
  8961. /**
  8962. * The default flush callback triggers the document walk synchronously.
  8963. * @private
  8964. * @type {!Function}
  8965. */
  8966. this._flushCallback = function (fn) {
  8967. return fn();
  8968. };
  8969. /**
  8970. * @private
  8971. * @type {boolean}
  8972. */
  8973. this._flushPending = false;
  8974. /**
  8975. * @private
  8976. * @type {!Array<string>}
  8977. */
  8978. this._unflushedLocalNames = [];
  8979. /**
  8980. * @private
  8981. * @type {!DocumentConstructionObserver}
  8982. */
  8983. this._documentConstructionObserver = new DocumentConstructionObserver(internals, document);
  8984. }
  8985. /**
  8986. * @param {string} localName
  8987. * @param {!Function} constructor
  8988. */
  8989. createClass(CustomElementRegistry, [{
  8990. key: 'define',
  8991. value: function define(localName, constructor) {
  8992. var _this = this;
  8993. if (!(constructor instanceof Function)) {
  8994. throw new TypeError('Custom element constructors must be functions.');
  8995. }
  8996. if (!isValidCustomElementName(localName)) {
  8997. throw new SyntaxError('The element name \'' + localName + '\' is not valid.');
  8998. }
  8999. if (this._internals.localNameToDefinition(localName)) {
  9000. throw new Error('A custom element with name \'' + localName + '\' has already been defined.');
  9001. }
  9002. if (this._elementDefinitionIsRunning) {
  9003. throw new Error('A custom element is already being defined.');
  9004. }
  9005. this._elementDefinitionIsRunning = true;
  9006. var connectedCallback = void 0;
  9007. var disconnectedCallback = void 0;
  9008. var adoptedCallback = void 0;
  9009. var attributeChangedCallback = void 0;
  9010. var observedAttributes = void 0;
  9011. try {
  9012. var getCallback = function getCallback(name) {
  9013. var callbackValue = prototype[name];
  9014. if (callbackValue !== undefined && !(callbackValue instanceof Function)) {
  9015. throw new Error('The \'' + name + '\' callback must be a function.');
  9016. }
  9017. return callbackValue;
  9018. };
  9019. /** @type {!Object} */
  9020. var prototype = constructor.prototype;
  9021. if (!(prototype instanceof Object)) {
  9022. throw new TypeError('The custom element constructor\'s prototype is not an object.');
  9023. }
  9024. connectedCallback = getCallback('connectedCallback');
  9025. disconnectedCallback = getCallback('disconnectedCallback');
  9026. adoptedCallback = getCallback('adoptedCallback');
  9027. attributeChangedCallback = getCallback('attributeChangedCallback');
  9028. observedAttributes = constructor['observedAttributes'] || [];
  9029. } catch (e) {
  9030. return;
  9031. } finally {
  9032. this._elementDefinitionIsRunning = false;
  9033. }
  9034. var definition = {
  9035. localName: localName,
  9036. constructor: constructor,
  9037. connectedCallback: connectedCallback,
  9038. disconnectedCallback: disconnectedCallback,
  9039. adoptedCallback: adoptedCallback,
  9040. attributeChangedCallback: attributeChangedCallback,
  9041. observedAttributes: observedAttributes,
  9042. constructionStack: []
  9043. };
  9044. this._internals.setDefinition(localName, definition);
  9045. this._unflushedLocalNames.push(localName);
  9046. // If we've already called the flush callback and it hasn't called back yet,
  9047. // don't call it again.
  9048. if (!this._flushPending) {
  9049. this._flushPending = true;
  9050. this._flushCallback(function () {
  9051. return _this._flush();
  9052. });
  9053. }
  9054. }
  9055. }, {
  9056. key: '_flush',
  9057. value: function _flush() {
  9058. // If no new definitions were defined, don't attempt to flush. This could
  9059. // happen if a flush callback keeps the function it is given and calls it
  9060. // multiple times.
  9061. if (this._flushPending === false) return;
  9062. this._flushPending = false;
  9063. this._internals.patchAndUpgradeTree(document);
  9064. while (this._unflushedLocalNames.length > 0) {
  9065. var localName = this._unflushedLocalNames.shift();
  9066. var deferred = this._whenDefinedDeferred.get(localName);
  9067. if (deferred) {
  9068. deferred.resolve(undefined);
  9069. }
  9070. }
  9071. }
  9072. /**
  9073. * @param {string} localName
  9074. * @return {Function|undefined}
  9075. */
  9076. }, {
  9077. key: 'get',
  9078. value: function get$$1(localName) {
  9079. var definition = this._internals.localNameToDefinition(localName);
  9080. if (definition) {
  9081. return definition.constructor;
  9082. }
  9083. return undefined;
  9084. }
  9085. /**
  9086. * @param {string} localName
  9087. * @return {!Promise<undefined>}
  9088. */
  9089. }, {
  9090. key: 'whenDefined',
  9091. value: function whenDefined(localName) {
  9092. if (!isValidCustomElementName(localName)) {
  9093. return Promise.reject(new SyntaxError('\'' + localName + '\' is not a valid custom element name.'));
  9094. }
  9095. var prior = this._whenDefinedDeferred.get(localName);
  9096. if (prior) {
  9097. return prior.toPromise();
  9098. }
  9099. var deferred = new Deferred();
  9100. this._whenDefinedDeferred.set(localName, deferred);
  9101. var definition = this._internals.localNameToDefinition(localName);
  9102. // Resolve immediately only if the given local name has a definition *and*
  9103. // the full document walk to upgrade elements with that local name has
  9104. // already happened.
  9105. if (definition && this._unflushedLocalNames.indexOf(localName) === -1) {
  9106. deferred.resolve(undefined);
  9107. }
  9108. return deferred.toPromise();
  9109. }
  9110. }, {
  9111. key: 'polyfillWrapFlushCallback',
  9112. value: function polyfillWrapFlushCallback(outer) {
  9113. this._documentConstructionObserver.disconnect();
  9114. var inner = this._flushCallback;
  9115. this._flushCallback = function (flush) {
  9116. return outer(function () {
  9117. return inner(flush);
  9118. });
  9119. };
  9120. }
  9121. }]);
  9122. return CustomElementRegistry;
  9123. }();
  9124. window['CustomElementRegistry'] = CustomElementRegistry;
  9125. CustomElementRegistry.prototype['define'] = CustomElementRegistry.prototype.define;
  9126. CustomElementRegistry.prototype['get'] = CustomElementRegistry.prototype.get;
  9127. CustomElementRegistry.prototype['whenDefined'] = CustomElementRegistry.prototype.whenDefined;
  9128. CustomElementRegistry.prototype['polyfillWrapFlushCallback'] = CustomElementRegistry.prototype.polyfillWrapFlushCallback;
  9129. var Native = {
  9130. Document_createElement: window.Document.prototype.createElement,
  9131. Document_createElementNS: window.Document.prototype.createElementNS,
  9132. Document_importNode: window.Document.prototype.importNode,
  9133. Document_prepend: window.Document.prototype['prepend'],
  9134. Document_append: window.Document.prototype['append'],
  9135. Node_cloneNode: window.Node.prototype.cloneNode,
  9136. Node_appendChild: window.Node.prototype.appendChild,
  9137. Node_insertBefore: window.Node.prototype.insertBefore,
  9138. Node_removeChild: window.Node.prototype.removeChild,
  9139. Node_replaceChild: window.Node.prototype.replaceChild,
  9140. Node_textContent: Object.getOwnPropertyDescriptor(window.Node.prototype, 'textContent'),
  9141. Element_attachShadow: window.Element.prototype['attachShadow'],
  9142. Element_innerHTML: Object.getOwnPropertyDescriptor(window.Element.prototype, 'innerHTML'),
  9143. Element_getAttribute: window.Element.prototype.getAttribute,
  9144. Element_setAttribute: window.Element.prototype.setAttribute,
  9145. Element_removeAttribute: window.Element.prototype.removeAttribute,
  9146. Element_getAttributeNS: window.Element.prototype.getAttributeNS,
  9147. Element_setAttributeNS: window.Element.prototype.setAttributeNS,
  9148. Element_removeAttributeNS: window.Element.prototype.removeAttributeNS,
  9149. Element_insertAdjacentElement: window.Element.prototype['insertAdjacentElement'],
  9150. Element_prepend: window.Element.prototype['prepend'],
  9151. Element_append: window.Element.prototype['append'],
  9152. Element_before: window.Element.prototype['before'],
  9153. Element_after: window.Element.prototype['after'],
  9154. Element_replaceWith: window.Element.prototype['replaceWith'],
  9155. Element_remove: window.Element.prototype['remove'],
  9156. HTMLElement: window.HTMLElement,
  9157. HTMLElement_innerHTML: Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, 'innerHTML'),
  9158. HTMLElement_insertAdjacentElement: window.HTMLElement.prototype['insertAdjacentElement']
  9159. };
  9160. /**
  9161. * This class exists only to work around Closure's lack of a way to describe
  9162. * singletons. It represents the 'already constructed marker' used in custom
  9163. * element construction stacks.
  9164. *
  9165. * https://html.spec.whatwg.org/#concept-already-constructed-marker
  9166. */
  9167. var AlreadyConstructedMarker = function AlreadyConstructedMarker() {
  9168. classCallCheck(this, AlreadyConstructedMarker);
  9169. };
  9170. var AlreadyConstructedMarker$1 = new AlreadyConstructedMarker();
  9171. /**
  9172. * @param {!CustomElementInternals} internals
  9173. */
  9174. var PatchHTMLElement = function (internals) {
  9175. window['HTMLElement'] = function () {
  9176. /**
  9177. * @type {function(new: HTMLElement): !HTMLElement}
  9178. */
  9179. function HTMLElement() {
  9180. // This should really be `new.target` but `new.target` can't be emulated
  9181. // in ES5. Assuming the user keeps the default value of the constructor's
  9182. // prototype's `constructor` property, this is equivalent.
  9183. /** @type {!Function} */
  9184. var constructor = this.constructor;
  9185. var definition = internals.constructorToDefinition(constructor);
  9186. if (!definition) {
  9187. throw new Error('The custom element being constructed was not registered with `customElements`.');
  9188. }
  9189. var constructionStack = definition.constructionStack;
  9190. if (constructionStack.length === 0) {
  9191. var _element = Native.Document_createElement.call(document, definition.localName);
  9192. Object.setPrototypeOf(_element, constructor.prototype);
  9193. _element.__CE_state = CustomElementState.custom;
  9194. _element.__CE_definition = definition;
  9195. internals.patch(_element);
  9196. return _element;
  9197. }
  9198. var lastIndex = constructionStack.length - 1;
  9199. var element = constructionStack[lastIndex];
  9200. if (element === AlreadyConstructedMarker$1) {
  9201. throw new Error('The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.');
  9202. }
  9203. constructionStack[lastIndex] = AlreadyConstructedMarker$1;
  9204. Object.setPrototypeOf(element, constructor.prototype);
  9205. internals.patch( /** @type {!HTMLElement} */element);
  9206. return element;
  9207. }
  9208. HTMLElement.prototype = Native.HTMLElement.prototype;
  9209. return HTMLElement;
  9210. }();
  9211. };
  9212. /**
  9213. * @param {!CustomElementInternals} internals
  9214. * @param {!Object} destination
  9215. * @param {!ParentNodeNativeMethods} builtIn
  9216. */
  9217. var PatchParentNode = function (internals, destination, builtIn) {
  9218. /**
  9219. * @param {...(!Node|string)} nodes
  9220. */
  9221. destination['prepend'] = function () {
  9222. for (var _len = arguments.length, nodes = Array(_len), _key = 0; _key < _len; _key++) {
  9223. nodes[_key] = arguments[_key];
  9224. }
  9225. // TODO: Fix this for when one of `nodes` is a DocumentFragment!
  9226. var connectedBefore = /** @type {!Array<!Node>} */nodes.filter(function (node) {
  9227. // DocumentFragments are not connected and will not be added to the list.
  9228. return node instanceof Node && isConnected(node);
  9229. });
  9230. builtIn.prepend.apply(this, nodes);
  9231. for (var i = 0; i < connectedBefore.length; i++) {
  9232. internals.disconnectTree(connectedBefore[i]);
  9233. }
  9234. if (isConnected(this)) {
  9235. for (var _i = 0; _i < nodes.length; _i++) {
  9236. var node = nodes[_i];
  9237. if (node instanceof Element) {
  9238. internals.connectTree(node);
  9239. }
  9240. }
  9241. }
  9242. };
  9243. /**
  9244. * @param {...(!Node|string)} nodes
  9245. */
  9246. destination['append'] = function () {
  9247. for (var _len2 = arguments.length, nodes = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  9248. nodes[_key2] = arguments[_key2];
  9249. }
  9250. // TODO: Fix this for when one of `nodes` is a DocumentFragment!
  9251. var connectedBefore = /** @type {!Array<!Node>} */nodes.filter(function (node) {
  9252. // DocumentFragments are not connected and will not be added to the list.
  9253. return node instanceof Node && isConnected(node);
  9254. });
  9255. builtIn.append.apply(this, nodes);
  9256. for (var i = 0; i < connectedBefore.length; i++) {
  9257. internals.disconnectTree(connectedBefore[i]);
  9258. }
  9259. if (isConnected(this)) {
  9260. for (var _i2 = 0; _i2 < nodes.length; _i2++) {
  9261. var node = nodes[_i2];
  9262. if (node instanceof Element) {
  9263. internals.connectTree(node);
  9264. }
  9265. }
  9266. }
  9267. };
  9268. };
  9269. /**
  9270. * @param {!CustomElementInternals} internals
  9271. */
  9272. var PatchDocument = function (internals) {
  9273. setPropertyUnchecked(Document.prototype, 'createElement',
  9274. /**
  9275. * @this {Document}
  9276. * @param {string} localName
  9277. * @return {!Element}
  9278. */
  9279. function (localName) {
  9280. // Only create custom elements if this document is associated with the registry.
  9281. if (this.__CE_hasRegistry) {
  9282. var definition = internals.localNameToDefinition(localName);
  9283. if (definition) {
  9284. return new definition.constructor();
  9285. }
  9286. }
  9287. var result = /** @type {!Element} */
  9288. Native.Document_createElement.call(this, localName);
  9289. internals.patch(result);
  9290. return result;
  9291. });
  9292. setPropertyUnchecked(Document.prototype, 'importNode',
  9293. /**
  9294. * @this {Document}
  9295. * @param {!Node} node
  9296. * @param {boolean=} deep
  9297. * @return {!Node}
  9298. */
  9299. function (node, deep) {
  9300. var clone = Native.Document_importNode.call(this, node, deep);
  9301. // Only create custom elements if this document is associated with the registry.
  9302. if (!this.__CE_hasRegistry) {
  9303. internals.patchTree(clone);
  9304. } else {
  9305. internals.patchAndUpgradeTree(clone);
  9306. }
  9307. return clone;
  9308. });
  9309. var NS_HTML = "http://www.w3.org/1999/xhtml";
  9310. setPropertyUnchecked(Document.prototype, 'createElementNS',
  9311. /**
  9312. * @this {Document}
  9313. * @param {?string} namespace
  9314. * @param {string} localName
  9315. * @return {!Element}
  9316. */
  9317. function (namespace, localName) {
  9318. // Only create custom elements if this document is associated with the registry.
  9319. if (this.__CE_hasRegistry && (namespace === null || namespace === NS_HTML)) {
  9320. var definition = internals.localNameToDefinition(localName);
  9321. if (definition) {
  9322. return new definition.constructor();
  9323. }
  9324. }
  9325. var result = /** @type {!Element} */
  9326. Native.Document_createElementNS.call(this, namespace, localName);
  9327. internals.patch(result);
  9328. return result;
  9329. });
  9330. PatchParentNode(internals, Document.prototype, {
  9331. prepend: Native.Document_prepend,
  9332. append: Native.Document_append
  9333. });
  9334. };
  9335. /**
  9336. * @param {!CustomElementInternals} internals
  9337. */
  9338. var PatchNode = function (internals) {
  9339. // `Node#nodeValue` is implemented on `Attr`.
  9340. // `Node#textContent` is implemented on `Attr`, `Element`.
  9341. setPropertyUnchecked(Node.prototype, 'insertBefore',
  9342. /**
  9343. * @this {Node}
  9344. * @param {!Node} node
  9345. * @param {?Node} refNode
  9346. * @return {!Node}
  9347. */
  9348. function (node, refNode) {
  9349. if (node instanceof DocumentFragment) {
  9350. var insertedNodes = Array.prototype.slice.apply(node.childNodes);
  9351. var _nativeResult = Native.Node_insertBefore.call(this, node, refNode);
  9352. // DocumentFragments can't be connected, so `disconnectTree` will never
  9353. // need to be called on a DocumentFragment's children after inserting it.
  9354. if (isConnected(this)) {
  9355. for (var i = 0; i < insertedNodes.length; i++) {
  9356. internals.connectTree(insertedNodes[i]);
  9357. }
  9358. }
  9359. return _nativeResult;
  9360. }
  9361. var nodeWasConnected = isConnected(node);
  9362. var nativeResult = Native.Node_insertBefore.call(this, node, refNode);
  9363. if (nodeWasConnected) {
  9364. internals.disconnectTree(node);
  9365. }
  9366. if (isConnected(this)) {
  9367. internals.connectTree(node);
  9368. }
  9369. return nativeResult;
  9370. });
  9371. setPropertyUnchecked(Node.prototype, 'appendChild',
  9372. /**
  9373. * @this {Node}
  9374. * @param {!Node} node
  9375. * @return {!Node}
  9376. */
  9377. function (node) {
  9378. if (node instanceof DocumentFragment) {
  9379. var insertedNodes = Array.prototype.slice.apply(node.childNodes);
  9380. var _nativeResult2 = Native.Node_appendChild.call(this, node);
  9381. // DocumentFragments can't be connected, so `disconnectTree` will never
  9382. // need to be called on a DocumentFragment's children after inserting it.
  9383. if (isConnected(this)) {
  9384. for (var i = 0; i < insertedNodes.length; i++) {
  9385. internals.connectTree(insertedNodes[i]);
  9386. }
  9387. }
  9388. return _nativeResult2;
  9389. }
  9390. var nodeWasConnected = isConnected(node);
  9391. var nativeResult = Native.Node_appendChild.call(this, node);
  9392. if (nodeWasConnected) {
  9393. internals.disconnectTree(node);
  9394. }
  9395. if (isConnected(this)) {
  9396. internals.connectTree(node);
  9397. }
  9398. return nativeResult;
  9399. });
  9400. setPropertyUnchecked(Node.prototype, 'cloneNode',
  9401. /**
  9402. * @this {Node}
  9403. * @param {boolean=} deep
  9404. * @return {!Node}
  9405. */
  9406. function (deep) {
  9407. var clone = Native.Node_cloneNode.call(this, deep);
  9408. // Only create custom elements if this element's owner document is
  9409. // associated with the registry.
  9410. if (!this.ownerDocument.__CE_hasRegistry) {
  9411. internals.patchTree(clone);
  9412. } else {
  9413. internals.patchAndUpgradeTree(clone);
  9414. }
  9415. return clone;
  9416. });
  9417. setPropertyUnchecked(Node.prototype, 'removeChild',
  9418. /**
  9419. * @this {Node}
  9420. * @param {!Node} node
  9421. * @return {!Node}
  9422. */
  9423. function (node) {
  9424. var nodeWasConnected = isConnected(node);
  9425. var nativeResult = Native.Node_removeChild.call(this, node);
  9426. if (nodeWasConnected) {
  9427. internals.disconnectTree(node);
  9428. }
  9429. return nativeResult;
  9430. });
  9431. setPropertyUnchecked(Node.prototype, 'replaceChild',
  9432. /**
  9433. * @this {Node}
  9434. * @param {!Node} nodeToInsert
  9435. * @param {!Node} nodeToRemove
  9436. * @return {!Node}
  9437. */
  9438. function (nodeToInsert, nodeToRemove) {
  9439. if (nodeToInsert instanceof DocumentFragment) {
  9440. var insertedNodes = Array.prototype.slice.apply(nodeToInsert.childNodes);
  9441. var _nativeResult3 = Native.Node_replaceChild.call(this, nodeToInsert, nodeToRemove);
  9442. // DocumentFragments can't be connected, so `disconnectTree` will never
  9443. // need to be called on a DocumentFragment's children after inserting it.
  9444. if (isConnected(this)) {
  9445. internals.disconnectTree(nodeToRemove);
  9446. for (var i = 0; i < insertedNodes.length; i++) {
  9447. internals.connectTree(insertedNodes[i]);
  9448. }
  9449. }
  9450. return _nativeResult3;
  9451. }
  9452. var nodeToInsertWasConnected = isConnected(nodeToInsert);
  9453. var nativeResult = Native.Node_replaceChild.call(this, nodeToInsert, nodeToRemove);
  9454. var thisIsConnected = isConnected(this);
  9455. if (thisIsConnected) {
  9456. internals.disconnectTree(nodeToRemove);
  9457. }
  9458. if (nodeToInsertWasConnected) {
  9459. internals.disconnectTree(nodeToInsert);
  9460. }
  9461. if (thisIsConnected) {
  9462. internals.connectTree(nodeToInsert);
  9463. }
  9464. return nativeResult;
  9465. });
  9466. function patch_textContent(destination, baseDescriptor) {
  9467. Object.defineProperty(destination, 'textContent', {
  9468. enumerable: baseDescriptor.enumerable,
  9469. configurable: true,
  9470. get: baseDescriptor.get,
  9471. set: /** @this {Node} */function set(assignedValue) {
  9472. // If this is a text node then there are no nodes to disconnect.
  9473. if (this.nodeType === Node.TEXT_NODE) {
  9474. baseDescriptor.set.call(this, assignedValue);
  9475. return;
  9476. }
  9477. var removedNodes = undefined;
  9478. // Checking for `firstChild` is faster than reading `childNodes.length`
  9479. // to compare with 0.
  9480. if (this.firstChild) {
  9481. // Using `childNodes` is faster than `children`, even though we only
  9482. // care about elements.
  9483. var childNodes = this.childNodes;
  9484. var childNodesLength = childNodes.length;
  9485. if (childNodesLength > 0 && isConnected(this)) {
  9486. // Copying an array by iterating is faster than using slice.
  9487. removedNodes = new Array(childNodesLength);
  9488. for (var i = 0; i < childNodesLength; i++) {
  9489. removedNodes[i] = childNodes[i];
  9490. }
  9491. }
  9492. }
  9493. baseDescriptor.set.call(this, assignedValue);
  9494. if (removedNodes) {
  9495. for (var _i = 0; _i < removedNodes.length; _i++) {
  9496. internals.disconnectTree(removedNodes[_i]);
  9497. }
  9498. }
  9499. }
  9500. });
  9501. }
  9502. if (Native.Node_textContent && Native.Node_textContent.get) {
  9503. patch_textContent(Node.prototype, Native.Node_textContent);
  9504. } else {
  9505. internals.addPatch(function (element) {
  9506. patch_textContent(element, {
  9507. enumerable: true,
  9508. configurable: true,
  9509. // NOTE: This implementation of the `textContent` getter assumes that
  9510. // text nodes' `textContent` getter will not be patched.
  9511. get: /** @this {Node} */function get() {
  9512. /** @type {!Array<string>} */
  9513. var parts = [];
  9514. for (var i = 0; i < this.childNodes.length; i++) {
  9515. parts.push(this.childNodes[i].textContent);
  9516. }
  9517. return parts.join('');
  9518. },
  9519. set: /** @this {Node} */function set(assignedValue) {
  9520. while (this.firstChild) {
  9521. Native.Node_removeChild.call(this, this.firstChild);
  9522. }
  9523. Native.Node_appendChild.call(this, document.createTextNode(assignedValue));
  9524. }
  9525. });
  9526. });
  9527. }
  9528. };
  9529. /**
  9530. * @param {!CustomElementInternals} internals
  9531. * @param {!Object} destination
  9532. * @param {!ChildNodeNativeMethods} builtIn
  9533. */
  9534. var PatchChildNode = function (internals, destination, builtIn) {
  9535. /**
  9536. * @param {...(!Node|string)} nodes
  9537. */
  9538. destination['before'] = function () {
  9539. for (var _len = arguments.length, nodes = Array(_len), _key = 0; _key < _len; _key++) {
  9540. nodes[_key] = arguments[_key];
  9541. }
  9542. // TODO: Fix this for when one of `nodes` is a DocumentFragment!
  9543. var connectedBefore = /** @type {!Array<!Node>} */nodes.filter(function (node) {
  9544. // DocumentFragments are not connected and will not be added to the list.
  9545. return node instanceof Node && isConnected(node);
  9546. });
  9547. builtIn.before.apply(this, nodes);
  9548. for (var i = 0; i < connectedBefore.length; i++) {
  9549. internals.disconnectTree(connectedBefore[i]);
  9550. }
  9551. if (isConnected(this)) {
  9552. for (var _i = 0; _i < nodes.length; _i++) {
  9553. var node = nodes[_i];
  9554. if (node instanceof Element) {
  9555. internals.connectTree(node);
  9556. }
  9557. }
  9558. }
  9559. };
  9560. /**
  9561. * @param {...(!Node|string)} nodes
  9562. */
  9563. destination['after'] = function () {
  9564. for (var _len2 = arguments.length, nodes = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  9565. nodes[_key2] = arguments[_key2];
  9566. }
  9567. // TODO: Fix this for when one of `nodes` is a DocumentFragment!
  9568. var connectedBefore = /** @type {!Array<!Node>} */nodes.filter(function (node) {
  9569. // DocumentFragments are not connected and will not be added to the list.
  9570. return node instanceof Node && isConnected(node);
  9571. });
  9572. builtIn.after.apply(this, nodes);
  9573. for (var i = 0; i < connectedBefore.length; i++) {
  9574. internals.disconnectTree(connectedBefore[i]);
  9575. }
  9576. if (isConnected(this)) {
  9577. for (var _i2 = 0; _i2 < nodes.length; _i2++) {
  9578. var node = nodes[_i2];
  9579. if (node instanceof Element) {
  9580. internals.connectTree(node);
  9581. }
  9582. }
  9583. }
  9584. };
  9585. /**
  9586. * @param {...(!Node|string)} nodes
  9587. */
  9588. destination['replaceWith'] = function () {
  9589. for (var _len3 = arguments.length, nodes = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  9590. nodes[_key3] = arguments[_key3];
  9591. }
  9592. // TODO: Fix this for when one of `nodes` is a DocumentFragment!
  9593. var connectedBefore = /** @type {!Array<!Node>} */nodes.filter(function (node) {
  9594. // DocumentFragments are not connected and will not be added to the list.
  9595. return node instanceof Node && isConnected(node);
  9596. });
  9597. var wasConnected = isConnected(this);
  9598. builtIn.replaceWith.apply(this, nodes);
  9599. for (var i = 0; i < connectedBefore.length; i++) {
  9600. internals.disconnectTree(connectedBefore[i]);
  9601. }
  9602. if (wasConnected) {
  9603. internals.disconnectTree(this);
  9604. for (var _i3 = 0; _i3 < nodes.length; _i3++) {
  9605. var node = nodes[_i3];
  9606. if (node instanceof Element) {
  9607. internals.connectTree(node);
  9608. }
  9609. }
  9610. }
  9611. };
  9612. destination['remove'] = function () {
  9613. var wasConnected = isConnected(this);
  9614. builtIn.remove.call(this);
  9615. if (wasConnected) {
  9616. internals.disconnectTree(this);
  9617. }
  9618. };
  9619. };
  9620. /**
  9621. * @param {!CustomElementInternals} internals
  9622. */
  9623. var PatchElement = function (internals) {
  9624. if (Native.Element_attachShadow) {
  9625. setPropertyUnchecked(Element.prototype, 'attachShadow',
  9626. /**
  9627. * @this {Element}
  9628. * @param {!{mode: string}} init
  9629. * @return {ShadowRoot}
  9630. */
  9631. function (init) {
  9632. var shadowRoot = Native.Element_attachShadow.call(this, init);
  9633. this.__CE_shadowRoot = shadowRoot;
  9634. return shadowRoot;
  9635. });
  9636. } else {
  9637. console.warn('Custom Elements: `Element#attachShadow` was not patched.');
  9638. }
  9639. function patch_innerHTML(destination, baseDescriptor) {
  9640. Object.defineProperty(destination, 'innerHTML', {
  9641. enumerable: baseDescriptor.enumerable,
  9642. configurable: true,
  9643. get: baseDescriptor.get,
  9644. set: /** @this {Element} */function set(htmlString) {
  9645. var _this = this;
  9646. var isConnected$$1 = isConnected(this);
  9647. // NOTE: In IE11, when using the native `innerHTML` setter, all nodes
  9648. // that were previously descendants of the context element have all of
  9649. // their children removed as part of the set - the entire subtree is
  9650. // 'disassembled'. This work around walks the subtree *before* using the
  9651. // native setter.
  9652. /** @type {!Array<!Element>|undefined} */
  9653. var removedElements = undefined;
  9654. if (isConnected$$1) {
  9655. removedElements = [];
  9656. walkDeepDescendantElements(this, function (element) {
  9657. if (element !== _this) {
  9658. removedElements.push(element);
  9659. }
  9660. });
  9661. }
  9662. baseDescriptor.set.call(this, htmlString);
  9663. if (removedElements) {
  9664. for (var i = 0; i < removedElements.length; i++) {
  9665. var element = removedElements[i];
  9666. if (element.__CE_state === CustomElementState.custom) {
  9667. internals.disconnectedCallback(element);
  9668. }
  9669. }
  9670. }
  9671. // Only create custom elements if this element's owner document is
  9672. // associated with the registry.
  9673. if (!this.ownerDocument.__CE_hasRegistry) {
  9674. internals.patchTree(this);
  9675. } else {
  9676. internals.patchAndUpgradeTree(this);
  9677. }
  9678. return htmlString;
  9679. }
  9680. });
  9681. }
  9682. if (Native.Element_innerHTML && Native.Element_innerHTML.get) {
  9683. patch_innerHTML(Element.prototype, Native.Element_innerHTML);
  9684. } else if (Native.HTMLElement_innerHTML && Native.HTMLElement_innerHTML.get) {
  9685. patch_innerHTML(HTMLElement.prototype, Native.HTMLElement_innerHTML);
  9686. } else {
  9687. /** @type {HTMLDivElement} */
  9688. var rawDiv = Native.Document_createElement.call(document, 'div');
  9689. internals.addPatch(function (element) {
  9690. patch_innerHTML(element, {
  9691. enumerable: true,
  9692. configurable: true,
  9693. // Implements getting `innerHTML` by performing an unpatched `cloneNode`
  9694. // of the element and returning the resulting element's `innerHTML`.
  9695. // TODO: Is this too expensive?
  9696. get: /** @this {Element} */function get() {
  9697. return Native.Node_cloneNode.call(this, true).innerHTML;
  9698. },
  9699. // Implements setting `innerHTML` by creating an unpatched element,
  9700. // setting `innerHTML` of that element and replacing the target
  9701. // element's children with those of the unpatched element.
  9702. set: /** @this {Element} */function set(assignedValue) {
  9703. // NOTE: re-route to `content` for `template` elements.
  9704. // We need to do this because `template.appendChild` does not
  9705. // route into `template.content`.
  9706. /** @type {!Node} */
  9707. var content = this.localName === 'template' ? /** @type {!HTMLTemplateElement} */this.content : this;
  9708. rawDiv.innerHTML = assignedValue;
  9709. while (content.childNodes.length > 0) {
  9710. Native.Node_removeChild.call(content, content.childNodes[0]);
  9711. }
  9712. while (rawDiv.childNodes.length > 0) {
  9713. Native.Node_appendChild.call(content, rawDiv.childNodes[0]);
  9714. }
  9715. }
  9716. });
  9717. });
  9718. }
  9719. setPropertyUnchecked(Element.prototype, 'setAttribute',
  9720. /**
  9721. * @this {Element}
  9722. * @param {string} name
  9723. * @param {string} newValue
  9724. */
  9725. function (name, newValue) {
  9726. // Fast path for non-custom elements.
  9727. if (this.__CE_state !== CustomElementState.custom) {
  9728. return Native.Element_setAttribute.call(this, name, newValue);
  9729. }
  9730. var oldValue = Native.Element_getAttribute.call(this, name);
  9731. Native.Element_setAttribute.call(this, name, newValue);
  9732. newValue = Native.Element_getAttribute.call(this, name);
  9733. internals.attributeChangedCallback(this, name, oldValue, newValue, null);
  9734. });
  9735. setPropertyUnchecked(Element.prototype, 'setAttributeNS',
  9736. /**
  9737. * @this {Element}
  9738. * @param {?string} namespace
  9739. * @param {string} name
  9740. * @param {string} newValue
  9741. */
  9742. function (namespace, name, newValue) {
  9743. // Fast path for non-custom elements.
  9744. if (this.__CE_state !== CustomElementState.custom) {
  9745. return Native.Element_setAttributeNS.call(this, namespace, name, newValue);
  9746. }
  9747. var oldValue = Native.Element_getAttributeNS.call(this, namespace, name);
  9748. Native.Element_setAttributeNS.call(this, namespace, name, newValue);
  9749. newValue = Native.Element_getAttributeNS.call(this, namespace, name);
  9750. internals.attributeChangedCallback(this, name, oldValue, newValue, namespace);
  9751. });
  9752. setPropertyUnchecked(Element.prototype, 'removeAttribute',
  9753. /**
  9754. * @this {Element}
  9755. * @param {string} name
  9756. */
  9757. function (name) {
  9758. // Fast path for non-custom elements.
  9759. if (this.__CE_state !== CustomElementState.custom) {
  9760. return Native.Element_removeAttribute.call(this, name);
  9761. }
  9762. var oldValue = Native.Element_getAttribute.call(this, name);
  9763. Native.Element_removeAttribute.call(this, name);
  9764. if (oldValue !== null) {
  9765. internals.attributeChangedCallback(this, name, oldValue, null, null);
  9766. }
  9767. });
  9768. setPropertyUnchecked(Element.prototype, 'removeAttributeNS',
  9769. /**
  9770. * @this {Element}
  9771. * @param {?string} namespace
  9772. * @param {string} name
  9773. */
  9774. function (namespace, name) {
  9775. // Fast path for non-custom elements.
  9776. if (this.__CE_state !== CustomElementState.custom) {
  9777. return Native.Element_removeAttributeNS.call(this, namespace, name);
  9778. }
  9779. var oldValue = Native.Element_getAttributeNS.call(this, namespace, name);
  9780. Native.Element_removeAttributeNS.call(this, namespace, name);
  9781. // In older browsers, `Element#getAttributeNS` may return the empty string
  9782. // instead of null if the attribute does not exist. For details, see;
  9783. // https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNS#Notes
  9784. var newValue = Native.Element_getAttributeNS.call(this, namespace, name);
  9785. if (oldValue !== newValue) {
  9786. internals.attributeChangedCallback(this, name, oldValue, newValue, namespace);
  9787. }
  9788. });
  9789. function patch_insertAdjacentElement(destination, baseMethod) {
  9790. setPropertyUnchecked(destination, 'insertAdjacentElement',
  9791. /**
  9792. * @this {Element}
  9793. * @param {string} where
  9794. * @param {!Element} element
  9795. * @return {?Element}
  9796. */
  9797. function (where, element) {
  9798. var wasConnected = isConnected(element);
  9799. var insertedElement = /** @type {!Element} */
  9800. baseMethod.call(this, where, element);
  9801. if (wasConnected) {
  9802. internals.disconnectTree(element);
  9803. }
  9804. if (isConnected(insertedElement)) {
  9805. internals.connectTree(element);
  9806. }
  9807. return insertedElement;
  9808. });
  9809. }
  9810. if (Native.HTMLElement_insertAdjacentElement) {
  9811. patch_insertAdjacentElement(HTMLElement.prototype, Native.HTMLElement_insertAdjacentElement);
  9812. } else if (Native.Element_insertAdjacentElement) {
  9813. patch_insertAdjacentElement(Element.prototype, Native.Element_insertAdjacentElement);
  9814. } else {
  9815. console.warn('Custom Elements: `Element#insertAdjacentElement` was not patched.');
  9816. }
  9817. PatchParentNode(internals, Element.prototype, {
  9818. prepend: Native.Element_prepend,
  9819. append: Native.Element_append
  9820. });
  9821. PatchChildNode(internals, Element.prototype, {
  9822. before: Native.Element_before,
  9823. after: Native.Element_after,
  9824. replaceWith: Native.Element_replaceWith,
  9825. remove: Native.Element_remove
  9826. });
  9827. };
  9828. /**
  9829. * @license
  9830. * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
  9831. * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  9832. * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  9833. * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  9834. * Code distributed by Google as part of the polymer project is also
  9835. * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  9836. */
  9837. var priorCustomElements = window['customElements'];
  9838. if (!priorCustomElements || priorCustomElements['forcePolyfill'] || typeof priorCustomElements['define'] != 'function' || typeof priorCustomElements['get'] != 'function') {
  9839. /** @type {!CustomElementInternals} */
  9840. var internals = new CustomElementInternals();
  9841. PatchHTMLElement(internals);
  9842. PatchDocument(internals);
  9843. PatchNode(internals);
  9844. PatchElement(internals);
  9845. // The main document is always associated with the registry.
  9846. document.__CE_hasRegistry = true;
  9847. /** @type {!CustomElementRegistry} */
  9848. var customElements$1 = new CustomElementRegistry(internals);
  9849. Object.defineProperty(window, 'customElements', {
  9850. configurable: true,
  9851. enumerable: true,
  9852. value: customElements$1
  9853. });
  9854. }
  9855. /**
  9856. * @license
  9857. * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
  9858. * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  9859. * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  9860. * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  9861. * Code distributed by Google as part of the polymer project is also
  9862. * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  9863. */
  9864. // @version 0.7.22
  9865. (function (global) {
  9866. if (global.JsMutationObserver) {
  9867. return;
  9868. }
  9869. var registrationsTable = new WeakMap();
  9870. var setImmediate;
  9871. if (/Trident|Edge/.test(navigator.userAgent)) {
  9872. setImmediate = setTimeout;
  9873. } else if (window.setImmediate) {
  9874. setImmediate = window.setImmediate;
  9875. } else {
  9876. var setImmediateQueue = [];
  9877. var sentinel = String(Math.random());
  9878. window.addEventListener("message", function (e) {
  9879. if (e.data === sentinel) {
  9880. var queue = setImmediateQueue;
  9881. setImmediateQueue = [];
  9882. queue.forEach(function (func) {
  9883. func();
  9884. });
  9885. }
  9886. });
  9887. setImmediate = function setImmediate(func) {
  9888. setImmediateQueue.push(func);
  9889. window.postMessage(sentinel, "*");
  9890. };
  9891. }
  9892. var isScheduled = false;
  9893. var scheduledObservers = [];
  9894. function scheduleCallback(observer) {
  9895. scheduledObservers.push(observer);
  9896. if (!isScheduled) {
  9897. isScheduled = true;
  9898. setImmediate(dispatchCallbacks);
  9899. }
  9900. }
  9901. function wrapIfNeeded(node) {
  9902. return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
  9903. }
  9904. function dispatchCallbacks() {
  9905. isScheduled = false;
  9906. var observers = scheduledObservers;
  9907. scheduledObservers = [];
  9908. observers.sort(function (o1, o2) {
  9909. return o1.uid_ - o2.uid_;
  9910. });
  9911. var anyNonEmpty = false;
  9912. observers.forEach(function (observer) {
  9913. var queue = observer.takeRecords();
  9914. removeTransientObserversFor(observer);
  9915. if (queue.length) {
  9916. observer.callback_(queue, observer);
  9917. anyNonEmpty = true;
  9918. }
  9919. });
  9920. if (anyNonEmpty) dispatchCallbacks();
  9921. }
  9922. function removeTransientObserversFor(observer) {
  9923. observer.nodes_.forEach(function (node) {
  9924. var registrations = registrationsTable.get(node);
  9925. if (!registrations) return;
  9926. registrations.forEach(function (registration) {
  9927. if (registration.observer === observer) registration.removeTransientObservers();
  9928. });
  9929. });
  9930. }
  9931. function forEachAncestorAndObserverEnqueueRecord(target, callback) {
  9932. for (var node = target; node; node = node.parentNode) {
  9933. var registrations = registrationsTable.get(node);
  9934. if (registrations) {
  9935. for (var j = 0; j < registrations.length; j++) {
  9936. var registration = registrations[j];
  9937. var options = registration.options;
  9938. if (node !== target && !options.subtree) continue;
  9939. var record = callback(options);
  9940. if (record) registration.enqueue(record);
  9941. }
  9942. }
  9943. }
  9944. }
  9945. var uidCounter = 0;
  9946. function JsMutationObserver(callback) {
  9947. this.callback_ = callback;
  9948. this.nodes_ = [];
  9949. this.records_ = [];
  9950. this.uid_ = ++uidCounter;
  9951. }
  9952. JsMutationObserver.prototype = {
  9953. observe: function observe(target, options) {
  9954. target = wrapIfNeeded(target);
  9955. if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
  9956. throw new SyntaxError();
  9957. }
  9958. var registrations = registrationsTable.get(target);
  9959. if (!registrations) registrationsTable.set(target, registrations = []);
  9960. var registration;
  9961. for (var i = 0; i < registrations.length; i++) {
  9962. if (registrations[i].observer === this) {
  9963. registration = registrations[i];
  9964. registration.removeListeners();
  9965. registration.options = options;
  9966. break;
  9967. }
  9968. }
  9969. if (!registration) {
  9970. registration = new Registration(this, target, options);
  9971. registrations.push(registration);
  9972. this.nodes_.push(target);
  9973. }
  9974. registration.addListeners();
  9975. },
  9976. disconnect: function disconnect() {
  9977. this.nodes_.forEach(function (node) {
  9978. var registrations = registrationsTable.get(node);
  9979. for (var i = 0; i < registrations.length; i++) {
  9980. var registration = registrations[i];
  9981. if (registration.observer === this) {
  9982. registration.removeListeners();
  9983. registrations.splice(i, 1);
  9984. break;
  9985. }
  9986. }
  9987. }, this);
  9988. this.records_ = [];
  9989. },
  9990. takeRecords: function takeRecords() {
  9991. var copyOfRecords = this.records_;
  9992. this.records_ = [];
  9993. return copyOfRecords;
  9994. }
  9995. };
  9996. function MutationRecord(type, target) {
  9997. this.type = type;
  9998. this.target = target;
  9999. this.addedNodes = [];
  10000. this.removedNodes = [];
  10001. this.previousSibling = null;
  10002. this.nextSibling = null;
  10003. this.attributeName = null;
  10004. this.attributeNamespace = null;
  10005. this.oldValue = null;
  10006. }
  10007. function copyMutationRecord(original) {
  10008. var record = new MutationRecord(original.type, original.target);
  10009. record.addedNodes = original.addedNodes.slice();
  10010. record.removedNodes = original.removedNodes.slice();
  10011. record.previousSibling = original.previousSibling;
  10012. record.nextSibling = original.nextSibling;
  10013. record.attributeName = original.attributeName;
  10014. record.attributeNamespace = original.attributeNamespace;
  10015. record.oldValue = original.oldValue;
  10016. return record;
  10017. }
  10018. var currentRecord, recordWithOldValue;
  10019. function getRecord(type, target) {
  10020. return currentRecord = new MutationRecord(type, target);
  10021. }
  10022. function getRecordWithOldValue(oldValue) {
  10023. if (recordWithOldValue) return recordWithOldValue;
  10024. recordWithOldValue = copyMutationRecord(currentRecord);
  10025. recordWithOldValue.oldValue = oldValue;
  10026. return recordWithOldValue;
  10027. }
  10028. function clearRecords() {
  10029. currentRecord = recordWithOldValue = undefined;
  10030. }
  10031. function recordRepresentsCurrentMutation(record) {
  10032. return record === recordWithOldValue || record === currentRecord;
  10033. }
  10034. function selectRecord(lastRecord, newRecord) {
  10035. if (lastRecord === newRecord) return lastRecord;
  10036. if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
  10037. return null;
  10038. }
  10039. function Registration(observer, target, options) {
  10040. this.observer = observer;
  10041. this.target = target;
  10042. this.options = options;
  10043. this.transientObservedNodes = [];
  10044. }
  10045. Registration.prototype = {
  10046. enqueue: function enqueue(record) {
  10047. var records = this.observer.records_;
  10048. var length = records.length;
  10049. if (records.length > 0) {
  10050. var lastRecord = records[length - 1];
  10051. var recordToReplaceLast = selectRecord(lastRecord, record);
  10052. if (recordToReplaceLast) {
  10053. records[length - 1] = recordToReplaceLast;
  10054. return;
  10055. }
  10056. } else {
  10057. scheduleCallback(this.observer);
  10058. }
  10059. records[length] = record;
  10060. },
  10061. addListeners: function addListeners() {
  10062. this.addListeners_(this.target);
  10063. },
  10064. addListeners_: function addListeners_(node) {
  10065. var options = this.options;
  10066. if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
  10067. if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
  10068. if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
  10069. if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
  10070. },
  10071. removeListeners: function removeListeners() {
  10072. this.removeListeners_(this.target);
  10073. },
  10074. removeListeners_: function removeListeners_(node) {
  10075. var options = this.options;
  10076. if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
  10077. if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
  10078. if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
  10079. if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
  10080. },
  10081. addTransientObserver: function addTransientObserver(node) {
  10082. if (node === this.target) return;
  10083. this.addListeners_(node);
  10084. this.transientObservedNodes.push(node);
  10085. var registrations = registrationsTable.get(node);
  10086. if (!registrations) registrationsTable.set(node, registrations = []);
  10087. registrations.push(this);
  10088. },
  10089. removeTransientObservers: function removeTransientObservers() {
  10090. var transientObservedNodes = this.transientObservedNodes;
  10091. this.transientObservedNodes = [];
  10092. transientObservedNodes.forEach(function (node) {
  10093. this.removeListeners_(node);
  10094. var registrations = registrationsTable.get(node);
  10095. for (var i = 0; i < registrations.length; i++) {
  10096. if (registrations[i] === this) {
  10097. registrations.splice(i, 1);
  10098. break;
  10099. }
  10100. }
  10101. }, this);
  10102. },
  10103. handleEvent: function handleEvent(e) {
  10104. e.stopImmediatePropagation();
  10105. switch (e.type) {
  10106. case "DOMAttrModified":
  10107. var name = e.attrName;
  10108. var namespace = e.relatedNode.namespaceURI;
  10109. var target = e.target;
  10110. var record = new getRecord("attributes", target);
  10111. record.attributeName = name;
  10112. record.attributeNamespace = namespace;
  10113. var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
  10114. forEachAncestorAndObserverEnqueueRecord(target, function (options) {
  10115. if (!options.attributes) return;
  10116. if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
  10117. return;
  10118. }
  10119. if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
  10120. return record;
  10121. });
  10122. break;
  10123. case "DOMCharacterDataModified":
  10124. var target = e.target;
  10125. var record = getRecord("characterData", target);
  10126. var oldValue = e.prevValue;
  10127. forEachAncestorAndObserverEnqueueRecord(target, function (options) {
  10128. if (!options.characterData) return;
  10129. if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
  10130. return record;
  10131. });
  10132. break;
  10133. case "DOMNodeRemoved":
  10134. this.addTransientObserver(e.target);
  10135. case "DOMNodeInserted":
  10136. var changedNode = e.target;
  10137. var addedNodes, removedNodes;
  10138. if (e.type === "DOMNodeInserted") {
  10139. addedNodes = [changedNode];
  10140. removedNodes = [];
  10141. } else {
  10142. addedNodes = [];
  10143. removedNodes = [changedNode];
  10144. }
  10145. var previousSibling = changedNode.previousSibling;
  10146. var nextSibling = changedNode.nextSibling;
  10147. var record = getRecord("childList", e.target.parentNode);
  10148. record.addedNodes = addedNodes;
  10149. record.removedNodes = removedNodes;
  10150. record.previousSibling = previousSibling;
  10151. record.nextSibling = nextSibling;
  10152. forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function (options) {
  10153. if (!options.childList) return;
  10154. return record;
  10155. });
  10156. }
  10157. clearRecords();
  10158. }
  10159. };
  10160. global.JsMutationObserver = JsMutationObserver;
  10161. if (!global.MutationObserver) {
  10162. global.MutationObserver = JsMutationObserver;
  10163. JsMutationObserver._isPolyfilled = true;
  10164. }
  10165. })(self);
  10166. /*
  10167. Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola
  10168. Permission is hereby granted, free of charge, to any person obtaining
  10169. a copy of this software and associated documentation files (the
  10170. "Software"), to deal in the Software without restriction, including
  10171. without limitation the rights to use, copy, modify, merge, publish,
  10172. distribute, sublicense, and/or sell copies of the Software, and to
  10173. permit persons to whom the Software is furnished to do so, subject to
  10174. the following conditions:
  10175. The above copyright notice and this permission notice shall be
  10176. included in all copies or substantial portions of the Software.
  10177. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  10178. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10179. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  10180. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  10181. LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  10182. OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  10183. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  10184. */
  10185. (function (global, undefined) {
  10186. if (global.setImmediate) {
  10187. return;
  10188. }
  10189. var nextHandle = 1; // Spec says greater than zero
  10190. var tasksByHandle = {};
  10191. var currentlyRunningATask = false;
  10192. var doc = global.document;
  10193. var setImmediate;
  10194. function addFromSetImmediateArguments(args) {
  10195. tasksByHandle[nextHandle] = partiallyApplied.apply(undefined, args);
  10196. return nextHandle++;
  10197. }
  10198. // This function accepts the same arguments as setImmediate, but
  10199. // returns a function that requires no arguments.
  10200. function partiallyApplied(handler) {
  10201. var args = [].slice.call(arguments, 1);
  10202. return function () {
  10203. if (typeof handler === "function") {
  10204. handler.apply(undefined, args);
  10205. } else {
  10206. new Function("" + handler)();
  10207. }
  10208. };
  10209. }
  10210. function runIfPresent(handle) {
  10211. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  10212. // So if we're currently running a task, we'll need to delay this invocation.
  10213. if (currentlyRunningATask) {
  10214. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  10215. // "too much recursion" error.
  10216. setTimeout(partiallyApplied(runIfPresent, handle), 0);
  10217. } else {
  10218. var task = tasksByHandle[handle];
  10219. if (task) {
  10220. currentlyRunningATask = true;
  10221. try {
  10222. task();
  10223. } finally {
  10224. clearImmediate(handle);
  10225. currentlyRunningATask = false;
  10226. }
  10227. }
  10228. }
  10229. }
  10230. function clearImmediate(handle) {
  10231. delete tasksByHandle[handle];
  10232. }
  10233. function installNextTickImplementation() {
  10234. setImmediate = function setImmediate() {
  10235. var handle = addFromSetImmediateArguments(arguments);
  10236. process.nextTick(partiallyApplied(runIfPresent, handle));
  10237. return handle;
  10238. };
  10239. }
  10240. function canUsePostMessage() {
  10241. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  10242. // where `global.postMessage` means something completely different and can't be used for this purpose.
  10243. if (global.postMessage && !global.importScripts) {
  10244. var postMessageIsAsynchronous = true;
  10245. var oldOnMessage = global.onmessage;
  10246. global.onmessage = function () {
  10247. postMessageIsAsynchronous = false;
  10248. };
  10249. global.postMessage("", "*");
  10250. global.onmessage = oldOnMessage;
  10251. return postMessageIsAsynchronous;
  10252. }
  10253. }
  10254. function installPostMessageImplementation() {
  10255. // Installs an event handler on `global` for the `message` event: see
  10256. // * https://developer.mozilla.org/en/DOM/window.postMessage
  10257. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  10258. var messagePrefix = "setImmediate$" + Math.random() + "$";
  10259. var onGlobalMessage = function onGlobalMessage(event) {
  10260. if (event.source === global && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) {
  10261. runIfPresent(+event.data.slice(messagePrefix.length));
  10262. }
  10263. };
  10264. if (global.addEventListener) {
  10265. global.addEventListener("message", onGlobalMessage, false);
  10266. } else {
  10267. global.attachEvent("onmessage", onGlobalMessage);
  10268. }
  10269. setImmediate = function setImmediate() {
  10270. var handle = addFromSetImmediateArguments(arguments);
  10271. global.postMessage(messagePrefix + handle, "*");
  10272. return handle;
  10273. };
  10274. }
  10275. function installMessageChannelImplementation() {
  10276. var channel = new MessageChannel();
  10277. channel.port1.onmessage = function (event) {
  10278. var handle = event.data;
  10279. runIfPresent(handle);
  10280. };
  10281. setImmediate = function setImmediate() {
  10282. var handle = addFromSetImmediateArguments(arguments);
  10283. channel.port2.postMessage(handle);
  10284. return handle;
  10285. };
  10286. }
  10287. function installReadyStateChangeImplementation() {
  10288. var html = doc.documentElement;
  10289. setImmediate = function setImmediate() {
  10290. var handle = addFromSetImmediateArguments(arguments);
  10291. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  10292. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  10293. var script = doc.createElement("script");
  10294. script.onreadystatechange = function () {
  10295. runIfPresent(handle);
  10296. script.onreadystatechange = null;
  10297. html.removeChild(script);
  10298. script = null;
  10299. };
  10300. html.appendChild(script);
  10301. return handle;
  10302. };
  10303. }
  10304. function installSetTimeoutImplementation() {
  10305. setImmediate = function setImmediate() {
  10306. var handle = addFromSetImmediateArguments(arguments);
  10307. setTimeout(partiallyApplied(runIfPresent, handle), 0);
  10308. return handle;
  10309. };
  10310. }
  10311. // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  10312. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  10313. attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
  10314. // Don't get fooled by e.g. browserify environments.
  10315. if ({}.toString.call(global.process) === "[object process]") {
  10316. // For Node.js before 0.9
  10317. installNextTickImplementation();
  10318. } else if (canUsePostMessage()) {
  10319. // For non-IE10 modern browsers
  10320. installPostMessageImplementation();
  10321. } else if (global.MessageChannel) {
  10322. // For web workers, where supported
  10323. installMessageChannelImplementation();
  10324. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  10325. // For IE 6–8
  10326. installReadyStateChangeImplementation();
  10327. } else {
  10328. // For older browsers
  10329. installSetTimeoutImplementation();
  10330. }
  10331. attachTo.setImmediate = setImmediate;
  10332. attachTo.clearImmediate = clearImmediate;
  10333. })(self);
  10334. // Caution:
  10335. // Do not replace this import statement with codes.
  10336. //
  10337. // If you replace this import statement with codes,
  10338. // the codes will be executed after the following polyfills are imported
  10339. // because import statements are hoisted during compilation.
  10340. // Polyfill ECMAScript standard features with global namespace pollution
  10341. // Polyfill Custom Elements v1 with global namespace pollution
  10342. // Polyfill MutationObserver with global namespace pollution
  10343. // Polyfill setImmediate with global namespace pollution
  10344. (function () {
  10345. var DEFAULT_VIEWPORT = 'width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no';
  10346. var Viewport = {
  10347. ensureViewportElement: function ensureViewportElement() {
  10348. var viewportElement = document.querySelector('meta[name=viewport]');
  10349. if (!viewportElement) {
  10350. viewportElement = document.createElement('meta');
  10351. viewportElement.name = 'viewport';
  10352. document.head.appendChild(viewportElement);
  10353. }
  10354. return viewportElement;
  10355. },
  10356. setup: function setup() {
  10357. var viewportElement = Viewport.ensureViewportElement();
  10358. if (!viewportElement) {
  10359. return;
  10360. }
  10361. if (!viewportElement.hasAttribute('content')) {
  10362. viewportElement.setAttribute('content', DEFAULT_VIEWPORT);
  10363. }
  10364. }
  10365. };
  10366. window.Viewport = Viewport;
  10367. })();
  10368. function setup$1(ons) {
  10369. if (window._onsLoaded) {
  10370. ons._util.warn('Onsen UI is loaded more than once.');
  10371. }
  10372. window._onsLoaded = true;
  10373. // fastclick
  10374. window.addEventListener('load', function () {
  10375. ons.fastClick = fastclick_1.attach(document.body);
  10376. var supportTouchAction = 'touch-action' in document.body.style;
  10377. ons.platform._runOnActualPlatform(function () {
  10378. if (ons.platform.isAndroid()) {
  10379. // In Android4.4+, correct viewport settings can remove click delay.
  10380. // So disable FastClick on Android.
  10381. ons.fastClick.destroy();
  10382. } else if (ons.platform.isIOS()) {
  10383. if (supportTouchAction && (ons.platform.isIOSSafari() || ons.platform.isWKWebView())) {
  10384. // If 'touch-action' supported in iOS Safari or WKWebView, disable FastClick.
  10385. ons.fastClick.destroy();
  10386. } else {
  10387. // Do nothing. 'touch-action: manipulation' has no effect on UIWebView.
  10388. }
  10389. }
  10390. });
  10391. }, false);
  10392. ons.ready(function () {
  10393. ons.enableDeviceBackButtonHandler();
  10394. ons._defaultDeviceBackButtonHandler = ons._internal.dbbDispatcher.createHandler(window.document.body, function () {
  10395. if (Object.hasOwnProperty.call(navigator, 'app')) {
  10396. navigator.app.exitApp();
  10397. } else {
  10398. console.warn('Could not close the app. Is \'cordova.js\' included?\nError: \'window.navigator.app\' is undefined.');
  10399. }
  10400. });
  10401. document.body._gestureDetector = new ons.GestureDetector(document.body, { passive: true });
  10402. // Simulate Device Back Button on ESC press
  10403. if (!ons.platform.isWebView()) {
  10404. document.body.addEventListener('keydown', function (event) {
  10405. if (event.keyCode === 27) {
  10406. ons.fireDeviceBackButtonEvent();
  10407. }
  10408. });
  10409. }
  10410. // setup loading placeholder
  10411. ons._setupLoadingPlaceHolders();
  10412. });
  10413. // viewport.js
  10414. Viewport.setup();
  10415. }
  10416. /*
  10417. Copyright 2013-2015 ASIAL CORPORATION
  10418. Licensed under the Apache License, Version 2.0 (the "License");
  10419. you may not use this file except in compliance with the License.
  10420. You may obtain a copy of the License at
  10421. http://www.apache.org/licenses/LICENSE-2.0
  10422. Unless required by applicable law or agreed to in writing, software
  10423. distributed under the License is distributed on an "AS IS" BASIS,
  10424. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10425. See the License for the specific language governing permissions and
  10426. limitations under the License.
  10427. */
  10428. function getElementClass() {
  10429. if (typeof HTMLElement !== 'function') {
  10430. // case of Safari
  10431. var _BaseElement = function _BaseElement() {};
  10432. _BaseElement.prototype = document.createElement('div');
  10433. return _BaseElement;
  10434. } else {
  10435. return HTMLElement;
  10436. }
  10437. }
  10438. var BaseElement = function (_getElementClass) {
  10439. inherits(BaseElement, _getElementClass);
  10440. function BaseElement() {
  10441. classCallCheck(this, BaseElement);
  10442. return possibleConstructorReturn(this, (BaseElement.__proto__ || Object.getPrototypeOf(BaseElement)).call(this));
  10443. }
  10444. return BaseElement;
  10445. }(getElementClass());
  10446. /*
  10447. Copyright 2013-2015 ASIAL CORPORATION
  10448. Licensed under the Apache License, Version 2.0 (the "License");
  10449. you may not use this file except in compliance with the License.
  10450. You may obtain a copy of the License at
  10451. http://www.apache.org/licenses/LICENSE-2.0
  10452. Unless required by applicable law or agreed to in writing, software
  10453. distributed under the License is distributed on an "AS IS" BASIS,
  10454. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10455. See the License for the specific language governing permissions and
  10456. limitations under the License.
  10457. */
  10458. /**
  10459. * @element ons-template
  10460. * @category util
  10461. * @description
  10462. * [en]
  10463. * Define a separate HTML fragment and use as a template. These templates can be loaded as pages in `<ons-navigator>`, `<ons-tabbar>` and `<ons-splitter>`. They can also be used to generate dialogs. Since Onsen UI 2.4.0, the native `<template>` element can be used instead of `<ons-template>` for better performance and features. `<ons-template>` is still supported for backward compatibility.
  10464. * [/en]
  10465. * [ja]テンプレートとして使用するためのHTMLフラグメントを定義します。この要素でHTMLを宣言すると、id属性に指定した名前をpageのURLとしてons-navigatorなどのコンポーネントから参照できます。[/ja]
  10466. * @seealso ons-navigator
  10467. * [en]The `<ons-navigator>` component enables stack based navigation.[/en]
  10468. * [ja][/ja]
  10469. * @seealso ons-tabbar
  10470. * [en]The `<ons-tabbar>` component is used to add tab navigation.[/en]
  10471. * [ja][/ja]
  10472. * @seealso ons-splitter
  10473. * [en]The `<ons-splitter>` component can be used to create a draggable menu or column based layout.[/en]
  10474. * [ja][/ja]
  10475. * @example
  10476. * <ons-template id="foobar.html">
  10477. * <ons-page>
  10478. * Page content
  10479. * </ons-page>
  10480. * </ons-template>
  10481. *
  10482. * <ons-navigator page="foobar.html"></ons-navigator>
  10483. */
  10484. var TemplateElement = function (_BaseElement) {
  10485. inherits(TemplateElement, _BaseElement);
  10486. /**
  10487. * @property template
  10488. * @type {String}
  10489. * @description
  10490. * [en]Template content. This property can not be used with AngularJS bindings.[/en]
  10491. * [ja][/ja]
  10492. */
  10493. function TemplateElement() {
  10494. classCallCheck(this, TemplateElement);
  10495. var _this = possibleConstructorReturn(this, (TemplateElement.__proto__ || Object.getPrototypeOf(TemplateElement)).call(this));
  10496. _this.template = _this.innerHTML;
  10497. while (_this.firstChild) {
  10498. _this.removeChild(_this.firstChild);
  10499. }
  10500. return _this;
  10501. }
  10502. createClass(TemplateElement, [{
  10503. key: 'connectedCallback',
  10504. value: function connectedCallback() {
  10505. if (this.parentNode) {
  10506. // Note: this.parentNode is not set in some CE0/CE1 polyfills.
  10507. // Show warning when the ons-template is not located just under document.body
  10508. if (this.parentNode !== document.body) {
  10509. // if the parent is not document.body
  10510. util$1.warn('ons-template (id = ' + this.getAttribute('id') + ') must be located just under document.body' + (this.parentNode.outerHTML ? ':\n\n' + this.parentNode.outerHTML : '.'));
  10511. }
  10512. }
  10513. var event = new CustomEvent('_templateloaded', { bubbles: true, cancelable: true });
  10514. event.template = this.template;
  10515. event.templateId = this.getAttribute('id');
  10516. this.dispatchEvent(event);
  10517. }
  10518. }]);
  10519. return TemplateElement;
  10520. }(BaseElement);
  10521. onsElements.Template = TemplateElement;
  10522. customElements.define('ons-template', TemplateElement);
  10523. /*
  10524. Copyright 2013-2015 ASIAL CORPORATION
  10525. Licensed under the Apache License, Version 2.0 (the "License");
  10526. you may not use this file except in compliance with the License.
  10527. You may obtain a copy of the License at
  10528. http://www.apache.org/licenses/LICENSE-2.0
  10529. Unless required by applicable law or agreed to in writing, software
  10530. distributed under the License is distributed on an "AS IS" BASIS,
  10531. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10532. See the License for the specific language governing permissions and
  10533. limitations under the License.
  10534. */
  10535. /**
  10536. * @element ons-if
  10537. * @category conditional
  10538. * @tutorial vanilla/Reference/if
  10539. * @description
  10540. * [en]
  10541. * Conditionally display content depending on the platform, device orientation or both.
  10542. *
  10543. * Sometimes it is useful to conditionally hide or show certain components based on platform. When running on iOS the `<ons-if>` element can be used to hide the `<ons-fab>` element.
  10544. * [/en]
  10545. * [ja][/ja]
  10546. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja]Information about cross platform styling[/ja]
  10547. * @example
  10548. * <ons-page>
  10549. * <ons-if orientation="landscape">
  10550. * Landscape view!
  10551. * </ons-if>
  10552. * <ons-if platform="android">
  10553. * This is Android.
  10554. * </ons-if>
  10555. * <ons-if platform="ios other">
  10556. * This is not Android.
  10557. * </ons-if>
  10558. * </ons-page>
  10559. */
  10560. var IfElement = function (_BaseElement) {
  10561. inherits(IfElement, _BaseElement);
  10562. /**
  10563. * @attribute platform
  10564. * @initonly
  10565. * @type {string}
  10566. * @description
  10567. * [en]Space-separated platform names. Possible values are `"ios"`, `"android"`, `"windows"` and `"other"`.[/en]
  10568. * [ja][/ja]
  10569. */
  10570. /**
  10571. * @attribute orientation
  10572. * @type {string}
  10573. * @description
  10574. * [en]Either `"portrait"` or `"landscape"`.[/en]
  10575. * [ja]portraitもしくはlandscapeを指定します[/ja]
  10576. */
  10577. function IfElement() {
  10578. classCallCheck(this, IfElement);
  10579. var _this = possibleConstructorReturn(this, (IfElement.__proto__ || Object.getPrototypeOf(IfElement)).call(this));
  10580. contentReady(_this, function () {
  10581. if (platform._getSelectedPlatform() !== null) {
  10582. _this._platformUpdate();
  10583. } else if (!_this._isAllowedPlatform()) {
  10584. while (_this.childNodes[0]) {
  10585. _this.childNodes[0].remove();
  10586. }
  10587. _this._platformUpdate();
  10588. }
  10589. });
  10590. _this._onOrientationChange();
  10591. return _this;
  10592. }
  10593. createClass(IfElement, [{
  10594. key: 'connectedCallback',
  10595. value: function connectedCallback() {
  10596. orientation.on('change', this._onOrientationChange.bind(this));
  10597. }
  10598. }, {
  10599. key: 'attributeChangedCallback',
  10600. value: function attributeChangedCallback(name) {
  10601. if (name === 'orientation') {
  10602. this._onOrientationChange();
  10603. }
  10604. }
  10605. }, {
  10606. key: 'disconnectedCallback',
  10607. value: function disconnectedCallback() {
  10608. orientation.off('change', this._onOrientationChange);
  10609. }
  10610. }, {
  10611. key: '_platformUpdate',
  10612. value: function _platformUpdate() {
  10613. this.style.display = this._isAllowedPlatform() ? '' : 'none';
  10614. }
  10615. }, {
  10616. key: '_isAllowedPlatform',
  10617. value: function _isAllowedPlatform() {
  10618. return !this.getAttribute('platform') || this.getAttribute('platform').split(/\s+/).indexOf(platform.getMobileOS()) >= 0;
  10619. }
  10620. }, {
  10621. key: '_onOrientationChange',
  10622. value: function _onOrientationChange() {
  10623. if (this.hasAttribute('orientation') && this._isAllowedPlatform()) {
  10624. var conditionalOrientation = this.getAttribute('orientation').toLowerCase();
  10625. var currentOrientation = orientation.isPortrait() ? 'portrait' : 'landscape';
  10626. this.style.display = conditionalOrientation === currentOrientation ? '' : 'none';
  10627. }
  10628. }
  10629. }], [{
  10630. key: 'observedAttributes',
  10631. get: function get$$1() {
  10632. return ['orientation'];
  10633. }
  10634. }]);
  10635. return IfElement;
  10636. }(BaseElement);
  10637. onsElements.If = IfElement;
  10638. customElements.define('ons-if', IfElement);
  10639. /*
  10640. Copyright 2013-2015 ASIAL CORPORATION
  10641. Licensed under the Apache License, Version 2.0 (the "License");
  10642. you may not use this file except in compliance with the License.
  10643. You may obtain a copy of the License at
  10644. http://www.apache.org/licenses/LICENSE-2.0
  10645. Unless required by applicable law or agreed to in writing, software
  10646. distributed under the License is distributed on an "AS IS" BASIS,
  10647. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10648. See the License for the specific language governing permissions and
  10649. limitations under the License.
  10650. */
  10651. var BaseAnimator = function () {
  10652. /**
  10653. * @param {Object} options
  10654. * @param {String} options.timing
  10655. * @param {Number} options.duration
  10656. * @param {Number} options.delay
  10657. */
  10658. function BaseAnimator() {
  10659. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  10660. classCallCheck(this, BaseAnimator);
  10661. this.timing = options.timing || 'linear';
  10662. this.duration = options.duration || 0;
  10663. this.delay = options.delay || 0;
  10664. this.def = {
  10665. timing: this.timing,
  10666. duration: this.duration,
  10667. delay: this.delay
  10668. };
  10669. }
  10670. createClass(BaseAnimator, null, [{
  10671. key: 'extend',
  10672. value: function extend() {
  10673. var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  10674. var extendedAnimator = this;
  10675. var newAnimator = function newAnimator() {
  10676. extendedAnimator.apply(this, arguments);
  10677. util$1.extend(this, properties);
  10678. };
  10679. newAnimator.prototype = this.prototype;
  10680. return newAnimator;
  10681. }
  10682. }]);
  10683. return BaseAnimator;
  10684. }();
  10685. /*
  10686. Copyright 2013-2015 ASIAL CORPORATION
  10687. Licensed under the Apache License, Version 2.0 (the "License");
  10688. you may not use this file except in compliance with the License.
  10689. You may obtain a copy of the License at
  10690. http://www.apache.org/licenses/LICENSE-2.0
  10691. Unless required by applicable law or agreed to in writing, software
  10692. distributed under the License is distributed on an "AS IS" BASIS,
  10693. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10694. See the License for the specific language governing permissions and
  10695. limitations under the License.
  10696. */
  10697. // This object should not be exposed to users. Please keep this private.
  10698. var iPhoneXPatch = {};
  10699. iPhoneXPatch.isIPhoneXPortraitPatchActive = function () {
  10700. return document.documentElement.getAttribute('onsflag-iphonex-portrait') != null && window.innerWidth < window.innerHeight;
  10701. };
  10702. iPhoneXPatch.isIPhoneXLandscapePatchActive = function () {
  10703. // If width === height, treat it as landscape
  10704. return document.documentElement.getAttribute('onsflag-iphonex-landscape') != null && window.innerWidth >= window.innerHeight;
  10705. };
  10706. /**
  10707. * Returns the safe area lengths based on the current state of the safe areas.
  10708. */
  10709. iPhoneXPatch.getSafeAreaLengths = function () {
  10710. var safeAreaLengths = void 0;
  10711. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  10712. safeAreaLengths = {
  10713. top: 44,
  10714. right: 0,
  10715. bottom: 34,
  10716. left: 0
  10717. };
  10718. } else if (iPhoneXPatch.isIPhoneXLandscapePatchActive()) {
  10719. safeAreaLengths = {
  10720. top: 0,
  10721. right: 44,
  10722. bottom: 21,
  10723. left: 44
  10724. };
  10725. } else {
  10726. safeAreaLengths = {
  10727. top: 0,
  10728. right: 0,
  10729. bottom: 0,
  10730. left: 0
  10731. };
  10732. }
  10733. return safeAreaLengths;
  10734. };
  10735. /**
  10736. * Returns the safe area rect based on the current state of the safe areas.
  10737. */
  10738. iPhoneXPatch.getSafeAreaDOMRect = function () {
  10739. var safeAreaRect = void 0;
  10740. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  10741. safeAreaRect = {
  10742. x: 0,
  10743. y: 44, /* 0 + 44 (top safe area) */
  10744. width: window.innerWidth,
  10745. height: window.innerHeight - 78 /* height - 44 (top safe area) - 34 (bottom safe area) */
  10746. };
  10747. } else if (iPhoneXPatch.isIPhoneXLandscapePatchActive()) {
  10748. safeAreaRect = {
  10749. x: 44, /* 0 + 44 (left safe area) */
  10750. y: 0,
  10751. width: window.innerWidth - 88, /* width - 44 (left safe area) - 34 (right safe area) */
  10752. height: window.innerHeight - 21 /* height - 21 (bottom safe area) */
  10753. };
  10754. } else {
  10755. safeAreaRect = {
  10756. x: 0,
  10757. y: 0,
  10758. width: window.innerWidth,
  10759. height: window.innerHeight
  10760. };
  10761. }
  10762. return _extends({}, safeAreaRect, {
  10763. left: safeAreaRect.x,
  10764. top: safeAreaRect.y,
  10765. right: safeAreaRect.x + safeAreaRect.width,
  10766. bottom: safeAreaRect.y + safeAreaRect.height
  10767. });
  10768. };
  10769. /*
  10770. Copyright 2013-2015 ASIAL CORPORATION
  10771. Licensed under the Apache License, Version 2.0 (the "License");
  10772. you may not use this file except in compliance with the License.
  10773. You may obtain a copy of the License at
  10774. http://www.apache.org/licenses/LICENSE-2.0
  10775. Unless required by applicable law or agreed to in writing, software
  10776. distributed under the License is distributed on an "AS IS" BASIS,
  10777. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10778. See the License for the specific language governing permissions and
  10779. limitations under the License.
  10780. */
  10781. var ActionSheetAnimator = function (_BaseAnimator) {
  10782. inherits(ActionSheetAnimator, _BaseAnimator);
  10783. function ActionSheetAnimator() {
  10784. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  10785. _ref$timing = _ref.timing,
  10786. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  10787. _ref$delay = _ref.delay,
  10788. delay = _ref$delay === undefined ? 0 : _ref$delay,
  10789. _ref$duration = _ref.duration,
  10790. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  10791. classCallCheck(this, ActionSheetAnimator);
  10792. return possibleConstructorReturn(this, (ActionSheetAnimator.__proto__ || Object.getPrototypeOf(ActionSheetAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  10793. }
  10794. /**
  10795. * @param {HTMLElement} dialog
  10796. * @param {Function} done
  10797. */
  10798. createClass(ActionSheetAnimator, [{
  10799. key: 'show',
  10800. value: function show(dialog, done) {
  10801. done();
  10802. }
  10803. /**
  10804. * @param {HTMLElement} dialog
  10805. * @param {Function} done
  10806. */
  10807. }, {
  10808. key: 'hide',
  10809. value: function hide(dialog, done) {
  10810. done();
  10811. }
  10812. }]);
  10813. return ActionSheetAnimator;
  10814. }(BaseAnimator);
  10815. /**
  10816. * Android style animator for Action Sheet.
  10817. */
  10818. var MDActionSheetAnimator = function (_ActionSheetAnimator) {
  10819. inherits(MDActionSheetAnimator, _ActionSheetAnimator);
  10820. function MDActionSheetAnimator() {
  10821. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  10822. _ref2$timing = _ref2.timing,
  10823. timing = _ref2$timing === undefined ? 'ease' : _ref2$timing,
  10824. _ref2$delay = _ref2.delay,
  10825. delay = _ref2$delay === undefined ? 0 : _ref2$delay,
  10826. _ref2$duration = _ref2.duration,
  10827. duration = _ref2$duration === undefined ? 0.4 : _ref2$duration;
  10828. classCallCheck(this, MDActionSheetAnimator);
  10829. var _this2 = possibleConstructorReturn(this, (MDActionSheetAnimator.__proto__ || Object.getPrototypeOf(MDActionSheetAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  10830. _this2.maskTiming = 'linear';
  10831. _this2.maskDuration = 0.2;
  10832. return _this2;
  10833. }
  10834. /**
  10835. * @param {Object} dialog
  10836. * @param {Function} callback
  10837. */
  10838. createClass(MDActionSheetAnimator, [{
  10839. key: 'show',
  10840. value: function show(dialog, callback) {
  10841. Animit.runAll(Animit(dialog._mask).queue({ opacity: 0 }).wait(this.delay).queue({ opacity: 1.0 }, {
  10842. duration: this.maskDuration,
  10843. timing: this.maskTiming
  10844. }), Animit(dialog._sheet, this.def).default({ transform: 'translate3d(0, 80%, 0)', opacity: 0 }, { transform: 'translate3d(0, 0, 0)', opacity: 1 }).queue(function (done) {
  10845. callback && callback();
  10846. done();
  10847. }));
  10848. }
  10849. /**
  10850. * @param {Object} dialog
  10851. * @param {Function} callback
  10852. */
  10853. }, {
  10854. key: 'hide',
  10855. value: function hide(dialog, callback) {
  10856. Animit.runAll(Animit(dialog._mask).queue({ opacity: 1 }).wait(this.delay).queue({ opacity: 0 }, {
  10857. duration: this.maskDuration,
  10858. timing: this.maskTiming
  10859. }), Animit(dialog._sheet, this.def).default({ transform: 'translate3d(0, 0, 0)', opacity: 1 }, { transform: 'translate3d(0, 80%, 0)', opacity: 0 }).queue(function (done) {
  10860. callback && callback();
  10861. done();
  10862. }));
  10863. }
  10864. }]);
  10865. return MDActionSheetAnimator;
  10866. }(ActionSheetAnimator);
  10867. /**
  10868. * iOS style animator for dialog.
  10869. */
  10870. var IOSActionSheetAnimator = function (_ActionSheetAnimator2) {
  10871. inherits(IOSActionSheetAnimator, _ActionSheetAnimator2);
  10872. function IOSActionSheetAnimator() {
  10873. var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  10874. _ref3$timing = _ref3.timing,
  10875. timing = _ref3$timing === undefined ? 'ease' : _ref3$timing,
  10876. _ref3$delay = _ref3.delay,
  10877. delay = _ref3$delay === undefined ? 0 : _ref3$delay,
  10878. _ref3$duration = _ref3.duration,
  10879. duration = _ref3$duration === undefined ? 0.3 : _ref3$duration;
  10880. classCallCheck(this, IOSActionSheetAnimator);
  10881. var _this3 = possibleConstructorReturn(this, (IOSActionSheetAnimator.__proto__ || Object.getPrototypeOf(IOSActionSheetAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  10882. _this3.maskTiming = 'linear';
  10883. _this3.maskDuration = 0.2;
  10884. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  10885. _this3.liftAmount = 'calc(100% + 48px)';
  10886. } else if (iPhoneXPatch.isIPhoneXLandscapePatchActive()) {
  10887. _this3.liftAmount = 'calc(100% + 33px)';
  10888. } else {
  10889. _this3.liftAmount = document.body.clientHeight / 2.0 - 1 + 'px'; // avoid Forced Synchronous Layout
  10890. }
  10891. return _this3;
  10892. }
  10893. /**
  10894. * @param {Object} dialog
  10895. * @param {Function} callback
  10896. */
  10897. createClass(IOSActionSheetAnimator, [{
  10898. key: 'show',
  10899. value: function show(dialog, callback) {
  10900. Animit.runAll(Animit(dialog._mask).queue({ opacity: 0 }).wait(this.delay).queue({ opacity: 1 }, {
  10901. duration: this.maskDuration,
  10902. timing: this.maskTiming
  10903. }), Animit(dialog._sheet, this.def).default({ transform: 'translate3d(0, ' + this.liftAmount + ', 0)' }, { transform: 'translate3d(0, 0, 0)' }).queue(function (done) {
  10904. callback && callback();
  10905. done();
  10906. }));
  10907. }
  10908. /**
  10909. * @param {Object} dialog
  10910. * @param {Function} callback
  10911. */
  10912. }, {
  10913. key: 'hide',
  10914. value: function hide(dialog, callback) {
  10915. Animit.runAll(Animit(dialog._mask).queue({ opacity: 1 }).wait(this.delay).queue({ opacity: 0 }, {
  10916. duration: this.maskDuration,
  10917. timing: this.maskTiming
  10918. }), Animit(dialog._sheet, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(0, ' + this.liftAmount + ', 0)' }).queue(function (done) {
  10919. callback && callback();
  10920. done();
  10921. }));
  10922. }
  10923. }]);
  10924. return IOSActionSheetAnimator;
  10925. }(ActionSheetAnimator);
  10926. /*
  10927. Copyright 2013-2015 ASIAL CORPORATION
  10928. Licensed under the Apache License, Version 2.0 (the "License");
  10929. you may not use this file except in compliance with the License.
  10930. You may obtain a copy of the License at
  10931. http://www.apache.org/licenses/LICENSE-2.0
  10932. Unless required by applicable law or agreed to in writing, software
  10933. distributed under the License is distributed on an "AS IS" BASIS,
  10934. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10935. See the License for the specific language governing permissions and
  10936. limitations under the License.
  10937. */
  10938. var BaseDialogElement = function (_BaseElement) {
  10939. inherits(BaseDialogElement, _BaseElement);
  10940. createClass(BaseDialogElement, [{
  10941. key: '_updateAnimatorFactory',
  10942. value: function _updateAnimatorFactory() {
  10943. util$1.throwMember();
  10944. }
  10945. }, {
  10946. key: '_toggleStyle',
  10947. value: function _toggleStyle(shouldShow) {
  10948. this.style.display = shouldShow ? 'block' : 'none';
  10949. }
  10950. }, {
  10951. key: '_scheme',
  10952. get: function get$$1() {
  10953. util$1.throwMember();
  10954. }
  10955. }]);
  10956. function BaseDialogElement() {
  10957. classCallCheck(this, BaseDialogElement);
  10958. var _this = possibleConstructorReturn(this, (BaseDialogElement.__proto__ || Object.getPrototypeOf(BaseDialogElement)).call(this));
  10959. if (_this.constructor === BaseDialogElement) {
  10960. util$1.throwAbstract();
  10961. }
  10962. _this._visible = false;
  10963. _this._doorLock = new DoorLock();
  10964. _this._cancel = _this._cancel.bind(_this);
  10965. _this._selfCamelName = util$1.camelize(_this.tagName.slice(4));
  10966. _this._defaultDBB = function (e) {
  10967. return _this.cancelable ? _this._cancel() : e.callParentHandler();
  10968. };
  10969. _this._animatorFactory = _this._updateAnimatorFactory();
  10970. return _this;
  10971. }
  10972. createClass(BaseDialogElement, [{
  10973. key: '_cancel',
  10974. value: function _cancel() {
  10975. var _this2 = this;
  10976. if (this.cancelable && !this._running) {
  10977. this._running = true;
  10978. this.hide().then(function () {
  10979. _this2._running = false;
  10980. util$1.triggerElementEvent(_this2, 'dialog-cancel');
  10981. }, function () {
  10982. return _this2._running = false;
  10983. });
  10984. }
  10985. }
  10986. }, {
  10987. key: 'show',
  10988. value: function show() {
  10989. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  10990. args[_key] = arguments[_key];
  10991. }
  10992. return this._setVisible.apply(this, [true].concat(args));
  10993. }
  10994. }, {
  10995. key: 'hide',
  10996. value: function hide() {
  10997. for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  10998. args[_key2] = arguments[_key2];
  10999. }
  11000. return this._setVisible.apply(this, [false].concat(args));
  11001. }
  11002. }, {
  11003. key: 'toggle',
  11004. value: function toggle() {
  11005. for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  11006. args[_key3] = arguments[_key3];
  11007. }
  11008. return this._setVisible.apply(this, [!this.visible].concat(args));
  11009. }
  11010. }, {
  11011. key: '_setVisible',
  11012. value: function _setVisible(shouldShow) {
  11013. var _util$triggerElementE,
  11014. _this3 = this;
  11015. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11016. var action = shouldShow ? 'show' : 'hide';
  11017. options = _extends({}, options);
  11018. options.animationOptions = util$1.extend(options.animationOptions || {}, AnimatorFactory.parseAnimationOptionsString(this.getAttribute('animation-options')));
  11019. var canceled = false;
  11020. util$1.triggerElementEvent(this, 'pre' + action, (_util$triggerElementE = {}, defineProperty(_util$triggerElementE, this._selfCamelName, this), defineProperty(_util$triggerElementE, 'cancel', function cancel() {
  11021. return canceled = true;
  11022. }), _util$triggerElementE));
  11023. if (canceled) {
  11024. return Promise.reject('Canceled in pre' + action + ' event.');
  11025. }
  11026. return new Promise(function (resolve) {
  11027. _this3._doorLock.waitUnlock(function () {
  11028. var unlock = _this3._doorLock.lock();
  11029. var animator = _this3._animatorFactory.newAnimator(options);
  11030. shouldShow && _this3._toggleStyle(true, options);
  11031. _this3._visible = shouldShow;
  11032. util$1.iosPageScrollFix(shouldShow);
  11033. contentReady(_this3, function () {
  11034. animator[action](_this3, function () {
  11035. !shouldShow && _this3._toggleStyle(false, options);
  11036. unlock();
  11037. util$1.propagateAction(_this3, '_' + action);
  11038. util$1.triggerElementEvent(_this3, 'post' + action, defineProperty({}, _this3._selfCamelName, _this3)); // postshow posthide
  11039. if (options.callback instanceof Function) {
  11040. options.callback(_this3);
  11041. }
  11042. resolve(_this3);
  11043. });
  11044. });
  11045. });
  11046. });
  11047. }
  11048. }, {
  11049. key: '_updateMask',
  11050. value: function _updateMask() {
  11051. var _this4 = this;
  11052. contentReady(this, function () {
  11053. if (_this4._mask && _this4.getAttribute('mask-color')) {
  11054. _this4._mask.style.backgroundColor = _this4.getAttribute('mask-color');
  11055. }
  11056. });
  11057. }
  11058. }, {
  11059. key: 'connectedCallback',
  11060. value: function connectedCallback() {
  11061. var _this5 = this;
  11062. if (typeof this._defaultDBB === 'function') {
  11063. this.onDeviceBackButton = this._defaultDBB.bind(this);
  11064. }
  11065. contentReady(this, function () {
  11066. if (_this5._mask) {
  11067. _this5._mask.addEventListener('click', _this5._cancel, false);
  11068. util$1.iosMaskScrollFix(_this5._mask, true);
  11069. }
  11070. });
  11071. }
  11072. }, {
  11073. key: 'disconnectedCallback',
  11074. value: function disconnectedCallback() {
  11075. if (this._backButtonHandler) {
  11076. this._backButtonHandler.destroy();
  11077. this._backButtonHandler = null;
  11078. }
  11079. if (this._mask) {
  11080. this._mask.removeEventListener('click', this._cancel, false);
  11081. util$1.iosMaskScrollFix(this._mask, false);
  11082. }
  11083. }
  11084. }, {
  11085. key: 'attributeChangedCallback',
  11086. value: function attributeChangedCallback(name, last, current) {
  11087. switch (name) {
  11088. case 'modifier':
  11089. ModifierUtil.onModifierChanged(last, current, this, this._scheme);
  11090. break;
  11091. case 'animation':
  11092. this._animatorFactory = this._updateAnimatorFactory();
  11093. break;
  11094. case 'mask-color':
  11095. this._updateMask();
  11096. break;
  11097. }
  11098. }
  11099. }, {
  11100. key: 'onDeviceBackButton',
  11101. get: function get$$1() {
  11102. return this._backButtonHandler;
  11103. },
  11104. set: function set$$1(callback) {
  11105. if (this._backButtonHandler) {
  11106. this._backButtonHandler.destroy();
  11107. }
  11108. this._backButtonHandler = deviceBackButtonDispatcher.createHandler(this, callback);
  11109. }
  11110. }, {
  11111. key: 'visible',
  11112. get: function get$$1() {
  11113. return this._visible;
  11114. }
  11115. }, {
  11116. key: 'disabled',
  11117. set: function set$$1(value) {
  11118. return util$1.toggleAttribute(this, 'disabled', value);
  11119. },
  11120. get: function get$$1() {
  11121. return this.hasAttribute('disabled');
  11122. }
  11123. }, {
  11124. key: 'cancelable',
  11125. set: function set$$1(value) {
  11126. return util$1.toggleAttribute(this, 'cancelable', value);
  11127. },
  11128. get: function get$$1() {
  11129. return this.hasAttribute('cancelable');
  11130. }
  11131. }], [{
  11132. key: 'observedAttributes',
  11133. get: function get$$1() {
  11134. return ['modifier', 'animation', 'mask-color'];
  11135. }
  11136. }, {
  11137. key: 'events',
  11138. get: function get$$1() {
  11139. return ['preshow', 'postshow', 'prehide', 'posthide', 'dialog-cancel'];
  11140. }
  11141. }]);
  11142. return BaseDialogElement;
  11143. }(BaseElement);
  11144. /*
  11145. Copyright 2013-2015 ASIAL CORPORATION
  11146. Licensed under the Apache License, Version 2.0 (the "License");
  11147. you may not use this file except in compliance with the License.
  11148. You may obtain a copy of the License at
  11149. http://www.apache.org/licenses/LICENSE-2.0
  11150. Unless required by applicable law or agreed to in writing, software
  11151. distributed under the License is distributed on an "AS IS" BASIS,
  11152. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11153. See the License for the specific language governing permissions and
  11154. limitations under the License.
  11155. */
  11156. var scheme = {
  11157. '.action-sheet': 'action-sheet--*',
  11158. '.action-sheet-mask': 'action-sheet-mask--*',
  11159. '.action-sheet-title': 'action-sheet-title--*'
  11160. };
  11161. var _animatorDict = {
  11162. 'default': function _default() {
  11163. return platform.isAndroid() ? MDActionSheetAnimator : IOSActionSheetAnimator;
  11164. },
  11165. 'none': ActionSheetAnimator
  11166. };
  11167. /**
  11168. * @element ons-action-sheet
  11169. * @category dialog
  11170. * @description
  11171. * [en]
  11172. * Action/bottom sheet that is displayed on top of current screen.
  11173. *
  11174. * This element can either be attached directly to the `<body>` or dynamically created from a template using the `ons.createElement(template, { append: true })` utility function and the `<template>` tag.
  11175. *
  11176. * The action sheet is useful for displaying a list of options and asking the user to make a decision. A `ons-action-sheet-button` is provided for this purpose, although it can contain any type of content.
  11177. *
  11178. * It will automatically be displayed as Material Design (bottom sheet) when running on an Android device.
  11179. * [/en]
  11180. * [ja]
  11181. * アクションシート、もしくはボトムシートを現在のスクリーン上に表示します。
  11182. *
  11183. * この要素は、`<body>`要素に直接アタッチされるか、もしくは`ons.createElement(template, { append: true })`と`<template>`タグを使ってテンプレートから動的に生成されます。
  11184. *
  11185. * アクションシートは、選択肢のリストを表示してユーザーに尋ねるのに便利です。`ons-action-sheet-button`は、この要素の中に置くために提供されていますが、それ以外にも他のどのような要素を含むことができます。
  11186. *
  11187. * Androidデバイスで実行されるときには、自動的にマテリアルデザイン(ボトムシート)として表示されます。
  11188. * [/ja]
  11189. * @modifier material
  11190. * [en]Display a Material Design bottom sheet.[/en]
  11191. * [ja]マテリアルデザインのボトムシートを表示します。[/ja]
  11192. * @tutorial vanilla/reference/action-sheet
  11193. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  11194. * @seealso ons-popover
  11195. * [en]`<ons-popover>` component[/en]
  11196. * [ja]ons-popoverコンポーネント[/ja]
  11197. * @seealso ons-modal
  11198. * [en]`<ons-modal>` component[/en]
  11199. * [ja]ons-modalコンポーネント[/ja]
  11200. * @example
  11201. * <ons-action-sheet id="sheet">
  11202. * <ons-action-sheet-button>Label</ons-action-sheet-button>
  11203. * <ons-action-sheet-button>Label</ons-action-sheet-button>
  11204. * </ons-action-sheet>
  11205. *
  11206. * <script>
  11207. * document.getElementById('sheet').show();
  11208. * </script>
  11209. */
  11210. var ActionSheetElement = function (_BaseDialogElement) {
  11211. inherits(ActionSheetElement, _BaseDialogElement);
  11212. /**
  11213. * @event preshow
  11214. * @description
  11215. * [en]Fired just before the action sheet is displayed.[/en]
  11216. * [ja]ダイアログが表示される直前に発火します。[/ja]
  11217. * @param {Object} event [en]Event object.[/en]
  11218. * @param {Object} event.actionSheet
  11219. * [en]Component object.[/en]
  11220. * [ja]コンポーネントのオブジェクト。[/ja]
  11221. * @param {Function} event.cancel
  11222. * [en]Execute this function to stop the action sheet from being shown.[/en]
  11223. * [ja]この関数を実行すると、ダイアログの表示がキャンセルされます。[/ja]
  11224. */
  11225. /**
  11226. * @event postshow
  11227. * @description
  11228. * [en]Fired just after the action sheet is displayed.[/en]
  11229. * [ja]ダイアログが表示された直後に発火します。[/ja]
  11230. * @param {Object} event [en]Event object.[/en]
  11231. * @param {Object} event.actionSheet
  11232. * [en]Component object.[/en]
  11233. * [ja]コンポーネントのオブジェクト。[/ja]
  11234. */
  11235. /**
  11236. * @event prehide
  11237. * @description
  11238. * [en]Fired just before the action sheet is hidden.[/en]
  11239. * [ja]ダイアログが隠れる直前に発火します。[/ja]
  11240. * @param {Object} event [en]Event object.[/en]
  11241. * @param {Object} event.actionSheet
  11242. * [en]Component object.[/en]
  11243. * [ja]コンポーネントのオブジェクト。[/ja]
  11244. * @param {Function} event.cancel
  11245. * [en]Execute this function to stop the action sheet from being hidden.[/en]
  11246. * [ja]この関数を実行すると、ダイアログの非表示がキャンセルされます。[/ja]
  11247. */
  11248. /**
  11249. * @event posthide
  11250. * @description
  11251. * [en]Fired just after the action sheet is hidden.[/en]
  11252. * [ja]ダイアログが隠れた後に発火します。[/ja]
  11253. * @param {Object} event [en]Event object.[/en]
  11254. * @param {Object} event.actionSheet
  11255. * [en]Component object.[/en]
  11256. * [ja]コンポーネントのオブジェクト。[/ja]
  11257. */
  11258. /**
  11259. * @attribute title
  11260. * @type {String}
  11261. * @description
  11262. * [en]Optional title of the action sheet. A new element will be created containing this string.[/en]
  11263. * [ja]アクションシートのタイトルを指定します。ここで指定した文字列を含む新しい要素が作成されます。[/ja]
  11264. */
  11265. /**
  11266. * @attribute modifier
  11267. * @type {String}
  11268. * @description
  11269. * [en]The appearance of the action sheet.[/en]
  11270. * [ja]ダイアログの表現を指定します。[/ja]
  11271. */
  11272. /**
  11273. * @attribute cancelable
  11274. * @description
  11275. * [en]If this attribute is set the action sheet can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  11276. * [ja]この属性が設定されると、アクションシートの背景やAndroidデバイスのバックボタンを推すことでアクションシートが閉じるようになります。[/ja]
  11277. */
  11278. /**
  11279. * @attribute disabled
  11280. * @description
  11281. * [en]If this attribute is set the action sheet is disabled.[/en]
  11282. * [ja]この属性がある時、ダイアログはdisabled状態になります。[/ja]
  11283. */
  11284. /**
  11285. * @attribute animation
  11286. * @type {String}
  11287. * @default default
  11288. * @description
  11289. * [en]The animation used when showing and hiding the action sheet. Can be either `"none"` or `"default"`.[/en]
  11290. * [ja]ダイアログを表示する際のアニメーション名を指定します。"none"もしくは"default"を指定できます。[/ja]
  11291. */
  11292. /**
  11293. * @attribute animation-options
  11294. * @type {Expression}
  11295. * @description
  11296. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  11297. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`[/ja]
  11298. */
  11299. /**
  11300. * @attribute mask-color
  11301. * @type {String}
  11302. * @default rgba(0, 0, 0, 0.2)
  11303. * @description
  11304. * [en]Color of the background mask. Default is `"rgba(0, 0, 0, 0.2)"`.[/en]
  11305. * [ja]背景のマスクの色を指定します。"rgba(0, 0, 0, 0.2)"がデフォルト値です。[/ja]
  11306. */
  11307. function ActionSheetElement() {
  11308. classCallCheck(this, ActionSheetElement);
  11309. var _this = possibleConstructorReturn(this, (ActionSheetElement.__proto__ || Object.getPrototypeOf(ActionSheetElement)).call(this));
  11310. contentReady(_this, function () {
  11311. return _this._compile();
  11312. });
  11313. return _this;
  11314. }
  11315. createClass(ActionSheetElement, [{
  11316. key: '_updateAnimatorFactory',
  11317. value: function _updateAnimatorFactory() {
  11318. return new AnimatorFactory({
  11319. animators: _animatorDict,
  11320. baseClass: ActionSheetAnimator,
  11321. baseClassName: 'ActionSheetAnimator',
  11322. defaultAnimation: this.getAttribute('animation')
  11323. });
  11324. }
  11325. }, {
  11326. key: '_compile',
  11327. value: function _compile() {
  11328. autoStyle.prepare(this);
  11329. this.style.display = 'none';
  11330. this.style.zIndex = 10001;
  11331. /* Expected result:
  11332. * <ons-action-sheet>
  11333. * <div class="action-sheet-mask"></div>
  11334. * <div class="action-sheet">
  11335. * <div class="action-sheet-title></div>
  11336. * ...
  11337. * </div>
  11338. * </ons-action-sheet>
  11339. */
  11340. if (!this._sheet) {
  11341. var sheet = document.createElement('div');
  11342. sheet.classList.add('action-sheet');
  11343. while (this.firstChild) {
  11344. sheet.appendChild(this.firstChild);
  11345. }
  11346. this.appendChild(sheet);
  11347. }
  11348. if (!this._title && this.hasAttribute('title')) {
  11349. var title = document.createElement('div');
  11350. title.innerHTML = this.getAttribute('title');
  11351. title.classList.add('action-sheet-title');
  11352. this._sheet.insertBefore(title, this._sheet.firstChild);
  11353. }
  11354. if (!this._mask) {
  11355. var mask = document.createElement('div');
  11356. mask.classList.add('action-sheet-mask');
  11357. this.insertBefore(mask, this.firstChild);
  11358. }
  11359. this._sheet.style.zIndex = 20001;
  11360. this._mask.style.zIndex = 20000;
  11361. ModifierUtil.initModifier(this, this._scheme);
  11362. }
  11363. }, {
  11364. key: '_updateTitle',
  11365. value: function _updateTitle() {
  11366. if (this._title) {
  11367. this._title.innerHTML = this.getAttribute('title');
  11368. }
  11369. }
  11370. /**
  11371. * @property onDeviceBackButton
  11372. * @type {Object}
  11373. * @description
  11374. * [en]Back-button handler.[/en]
  11375. * [ja]バックボタンハンドラ。[/ja]
  11376. */
  11377. /**
  11378. * @method show
  11379. * @signature show([options])
  11380. * @param {Object} [options]
  11381. * [en]Parameter object.[/en]
  11382. * [ja]オプションを指定するオブジェクト。[/ja]
  11383. * @param {String} [options.animation]
  11384. * [en]Animation name. Available animations are `"none"` and `"slide"`.[/en]
  11385. * [ja]アニメーション名を指定します。"none", "slide"のいずれかを指定します。[/ja]
  11386. * @param {String} [options.animationOptions]
  11387. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  11388. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}` [/ja]
  11389. * @param {Function} [options.callback]
  11390. * [en]This function is called after the action sheet has been revealed.[/en]
  11391. * [ja]ダイアログが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  11392. * @description
  11393. * [en]Show the action sheet.[/en]
  11394. * [ja]ダイアログを開きます。[/ja]
  11395. * @return {Promise} Resolves to the displayed element.
  11396. */
  11397. /**
  11398. * @method hide
  11399. * @signature hide([options])
  11400. * @param {Object} [options]
  11401. * [en]Parameter object.[/en]
  11402. * [ja]オプションを指定するオブジェクト。[/ja]
  11403. * @param {String} [options.animation]
  11404. * [en]Animation name. Available animations are `"none"` and `"slide"`.[/en]
  11405. * [ja]アニメーション名を指定します。"none", "slide"のいずれかを指定できます。[/ja]
  11406. * @param {String} [options.animationOptions]
  11407. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  11408. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`[/ja]
  11409. * @param {Function} [options.callback]
  11410. * [en]This functions is called after the action sheet has been hidden.[/en]
  11411. * [ja]ダイアログが隠れた後に呼び出される関数オブジェクトを指定します。[/ja]
  11412. * @description
  11413. * [en]Hide the action sheet.[/en]
  11414. * [ja]ダイアログを閉じます。[/ja]
  11415. * @return {Promise}
  11416. * [en]Resolves to the hidden element[/en]
  11417. * [ja]隠れた要素を解決します。[/ja]
  11418. */
  11419. /**
  11420. * @property visible
  11421. * @readonly
  11422. * @type {Boolean}
  11423. * @description
  11424. * [en]Whether the action sheet is visible or not.[/en]
  11425. * [ja]要素が見える場合に`true`。[/ja]
  11426. */
  11427. /**
  11428. * @property disabled
  11429. * @type {Boolean}
  11430. * @description
  11431. * [en]Whether the action sheet is disabled or not.[/en]
  11432. * [ja]無効化されている場合に`true`。[/ja]
  11433. */
  11434. /**
  11435. * @property cancelable
  11436. * @type {Boolean}
  11437. * @description
  11438. * [en]Whether the action sheet is cancelable or not. A cancelable action sheet can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  11439. * [ja]アクションシートがキャンセル可能かどうかを設定します。キャンセル可能なアクションシートは、背景をタップしたりAndroidデバイスのバックボタンを推すことで閉じるようになります。[/ja]
  11440. */
  11441. }, {
  11442. key: 'attributeChangedCallback',
  11443. value: function attributeChangedCallback(name, last, current) {
  11444. if (name === 'title') {
  11445. this._updateTitle();
  11446. } else {
  11447. get(ActionSheetElement.prototype.__proto__ || Object.getPrototypeOf(ActionSheetElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  11448. }
  11449. }
  11450. /**
  11451. * @param {String} name
  11452. * @param {ActionSheetAnimator} Animator
  11453. */
  11454. }, {
  11455. key: '_scheme',
  11456. get: function get$$1() {
  11457. return scheme;
  11458. }
  11459. }, {
  11460. key: '_mask',
  11461. get: function get$$1() {
  11462. return util$1.findChild(this, '.action-sheet-mask');
  11463. }
  11464. }, {
  11465. key: '_sheet',
  11466. get: function get$$1() {
  11467. return util$1.findChild(this, '.action-sheet');
  11468. }
  11469. }, {
  11470. key: '_title',
  11471. get: function get$$1() {
  11472. return this.querySelector('.action-sheet-title');
  11473. }
  11474. }], [{
  11475. key: 'registerAnimator',
  11476. value: function registerAnimator(name, Animator) {
  11477. if (!(Animator.prototype instanceof ActionSheetAnimator)) {
  11478. util$1.throwAnimator('ActionSheet');
  11479. }
  11480. _animatorDict[name] = Animator;
  11481. }
  11482. }, {
  11483. key: 'observedAttributes',
  11484. get: function get$$1() {
  11485. return [].concat(toConsumableArray(get(ActionSheetElement.__proto__ || Object.getPrototypeOf(ActionSheetElement), 'observedAttributes', this)), ['title']);
  11486. }
  11487. }, {
  11488. key: 'animators',
  11489. get: function get$$1() {
  11490. return _animatorDict;
  11491. }
  11492. }, {
  11493. key: 'ActionSheetAnimator',
  11494. get: function get$$1() {
  11495. return ActionSheetAnimator;
  11496. }
  11497. }]);
  11498. return ActionSheetElement;
  11499. }(BaseDialogElement);
  11500. onsElements.ActionSheet = ActionSheetElement;
  11501. customElements.define('ons-action-sheet', ActionSheetElement);
  11502. /*
  11503. Copyright 2013-2015 ASIAL CORPORATION
  11504. Licensed under the Apache License, Version 2.0 (the "License");
  11505. you may not use this file except in compliance with the License.
  11506. You may obtain a copy of the License at
  11507. http://www.apache.org/licenses/LICENSE-2.0
  11508. Unless required by applicable law or agreed to in writing, software
  11509. distributed under the License is distributed on an "AS IS" BASIS,
  11510. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11511. See the License for the specific language governing permissions and
  11512. limitations under the License.
  11513. */
  11514. var BaseButtonElement = function (_BaseElement) {
  11515. inherits(BaseButtonElement, _BaseElement);
  11516. createClass(BaseButtonElement, [{
  11517. key: '_scheme',
  11518. get: function get$$1() {
  11519. util$1.throwMember();
  11520. }
  11521. }, {
  11522. key: '_defaultClassName',
  11523. get: function get$$1() {
  11524. util$1.throwMember();
  11525. }
  11526. }, {
  11527. key: '_rippleOpt',
  11528. get: function get$$1() {
  11529. return [this];
  11530. }
  11531. }]);
  11532. function BaseButtonElement() {
  11533. classCallCheck(this, BaseButtonElement);
  11534. var _this = possibleConstructorReturn(this, (BaseButtonElement.__proto__ || Object.getPrototypeOf(BaseButtonElement)).call(this));
  11535. if (_this.constructor === BaseButtonElement) {
  11536. util$1.throwAbstract();
  11537. }
  11538. contentReady(_this, function () {
  11539. return _this._compile();
  11540. });
  11541. return _this;
  11542. }
  11543. createClass(BaseButtonElement, [{
  11544. key: '_compile',
  11545. value: function _compile() {
  11546. autoStyle.prepare(this);
  11547. this.classList.add(this._defaultClassName);
  11548. if (!this._icon && this.hasAttribute('icon')) {
  11549. util$1.checkMissingImport('Icon');
  11550. var icon = util$1.createElement('<ons-icon icon="' + this.getAttribute('icon') + '"></ons-icon>');
  11551. icon.classList.add(this._defaultClassName.replace('button', 'icon'));
  11552. this.insertBefore(icon, this.firstChild);
  11553. }
  11554. this._updateRipple();
  11555. ModifierUtil.initModifier(this, this._scheme);
  11556. }
  11557. }, {
  11558. key: '_updateIcon',
  11559. value: function _updateIcon() {
  11560. if (this._icon) {
  11561. this._icon.setAttribute('icon', this.getAttribute('icon'));
  11562. }
  11563. }
  11564. }, {
  11565. key: '_updateRipple',
  11566. value: function _updateRipple() {
  11567. this._rippleOpt && util$1.updateRipple.apply(util$1, toConsumableArray(this._rippleOpt));
  11568. }
  11569. }, {
  11570. key: 'attributeChangedCallback',
  11571. value: function attributeChangedCallback(name, last, current) {
  11572. switch (name) {
  11573. case 'class':
  11574. util$1.restoreClass(this, this._defaultClassName, this._scheme);
  11575. break;
  11576. case 'modifier':
  11577. ModifierUtil.onModifierChanged(last, current, this, this._scheme);
  11578. break;
  11579. case 'icon':
  11580. this._updateIcon();
  11581. break;
  11582. case 'ripple':
  11583. this.classList.contains(this._defaultClassName) && this._updateRipple();
  11584. break;
  11585. }
  11586. }
  11587. }, {
  11588. key: 'disabled',
  11589. set: function set$$1(value) {
  11590. return util$1.toggleAttribute(this, 'disabled', value);
  11591. },
  11592. get: function get$$1() {
  11593. return this.hasAttribute('disabled');
  11594. }
  11595. }, {
  11596. key: '_icon',
  11597. get: function get$$1() {
  11598. return util$1.findChild(this, 'ons-icon');
  11599. }
  11600. }], [{
  11601. key: 'observedAttributes',
  11602. get: function get$$1() {
  11603. return ['modifier', 'class', 'icon', 'ripple'];
  11604. }
  11605. }]);
  11606. return BaseButtonElement;
  11607. }(BaseElement);
  11608. /*
  11609. Copyright 2013-2015 ASIAL CORPORATION
  11610. Licensed under the Apache License, Version 2.0 (the "License");
  11611. you may not use this file except in compliance with the License.
  11612. You may obtain a copy of the License at
  11613. http://www.apache.org/licenses/LICENSE-2.0
  11614. Unless required by applicable law or agreed to in writing, software
  11615. distributed under the License is distributed on an "AS IS" BASIS,
  11616. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11617. See the License for the specific language governing permissions and
  11618. limitations under the License.
  11619. */
  11620. /**
  11621. * @element ons-action-sheet-button
  11622. * @category dialog
  11623. * @modifier destructive
  11624. * [en]Shows a "destructive" button (only for iOS).[/en]
  11625. * [ja]"destructive"なボタンを表示します(iOSでのみ有効)。[/ja]
  11626. * @description
  11627. * [en]Component that represent each button of the action sheet.[/en]
  11628. * [ja]アクションシートに表示される各ボタンを表現するコンポーネントです。[/ja]
  11629. * @seealso ons-action-sheet
  11630. * [en]The `<ons-action-sheet>` component[/en]
  11631. * [ja]ons-action-sheetコンポーネント[/ja]
  11632. * @seealso ons-list-item
  11633. * [en]The `<ons-list-item>` component[/en]
  11634. * [ja]ons-list-itemコンポーネント[/ja]
  11635. * @seealso ons-icon
  11636. * [en]The `<ons-icon>` component[/en]
  11637. * [ja]ons-iconコンポーネント[/ja]
  11638. * @tutorial vanilla/Reference/action-sheet
  11639. * @guide appsize.html#removing-icon-packs [en]Removing icon packs.[/en][ja][/ja]
  11640. * @guide faq.html#how-can-i-use-custom-icon-packs [en]Adding custom icon packs.[/en][ja][/ja]
  11641. * @modifier material
  11642. * [en]Display a Material Design action sheet button.[/en]
  11643. * [ja]マテリアルデザインのアクションシート用のボタンを表示します。[/ja]
  11644. * @example
  11645. * <ons-action-sheet id="sheet">
  11646. * <ons-action-sheet-button>Label</ons-action-sheet-button>
  11647. * <ons-action-sheet-button>Label</ons-action-sheet-button>
  11648. * </ons-action-sheet>
  11649. *
  11650. * <script>
  11651. * document.getElementById('sheet').show();
  11652. * </script>
  11653. */
  11654. var ActionSheetButtonElement = function (_BaseButtonElement) {
  11655. inherits(ActionSheetButtonElement, _BaseButtonElement);
  11656. function ActionSheetButtonElement() {
  11657. classCallCheck(this, ActionSheetButtonElement);
  11658. return possibleConstructorReturn(this, (ActionSheetButtonElement.__proto__ || Object.getPrototypeOf(ActionSheetButtonElement)).apply(this, arguments));
  11659. }
  11660. createClass(ActionSheetButtonElement, [{
  11661. key: '_scheme',
  11662. /**
  11663. * @attribute icon
  11664. * @type {String}
  11665. * @description
  11666. * [en]Creates an `ons-icon` component with this string. Only visible on Android. Check [See also](#seealso) section for more information.[/en]
  11667. * [ja]`ons-icon`コンポーネントを悪性します。Androidでのみ表示されます。[/ja]
  11668. */
  11669. /**
  11670. * @attribute modifier
  11671. * @type {String}
  11672. * @description
  11673. * [en]The appearance of the action sheet button.[/en]
  11674. * [ja]アクションシートボタンの見た目を設定します。[/ja]
  11675. */
  11676. get: function get$$1() {
  11677. return {
  11678. '': 'action-sheet-button--*',
  11679. '.action-sheet-icon': 'action-sheet-icon--*'
  11680. };
  11681. }
  11682. }, {
  11683. key: '_defaultClassName',
  11684. get: function get$$1() {
  11685. return 'action-sheet-button';
  11686. }
  11687. }, {
  11688. key: '_rippleOpt',
  11689. get: function get$$1() {
  11690. return undefined;
  11691. }
  11692. }]);
  11693. return ActionSheetButtonElement;
  11694. }(BaseButtonElement);
  11695. onsElements.ActionSheetButton = ActionSheetButtonElement;
  11696. customElements.define('ons-action-sheet-button', ActionSheetButtonElement);
  11697. /*
  11698. Copyright 2013-2015 ASIAL CORPORATION
  11699. Licensed under the Apache License, Version 2.0 (the "License");
  11700. you may not use this file except in compliance with the License.
  11701. You may obtain a copy of the License at
  11702. http://www.apache.org/licenses/LICENSE-2.0
  11703. Unless required by applicable law or agreed to in writing, software
  11704. distributed under the License is distributed on an "AS IS" BASIS,
  11705. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11706. See the License for the specific language governing permissions and
  11707. limitations under the License.
  11708. */
  11709. var AlertDialogAnimator = function (_BaseAnimator) {
  11710. inherits(AlertDialogAnimator, _BaseAnimator);
  11711. function AlertDialogAnimator() {
  11712. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11713. _ref$timing = _ref.timing,
  11714. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  11715. _ref$delay = _ref.delay,
  11716. delay = _ref$delay === undefined ? 0 : _ref$delay,
  11717. _ref$duration = _ref.duration,
  11718. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  11719. classCallCheck(this, AlertDialogAnimator);
  11720. return possibleConstructorReturn(this, (AlertDialogAnimator.__proto__ || Object.getPrototypeOf(AlertDialogAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  11721. }
  11722. /**
  11723. * @param {HTMLElement} dialog
  11724. * @param {Function} done
  11725. */
  11726. createClass(AlertDialogAnimator, [{
  11727. key: 'show',
  11728. value: function show(dialog, done) {
  11729. done();
  11730. }
  11731. /**
  11732. * @param {HTMLElement} dialog
  11733. * @param {Function} done
  11734. */
  11735. }, {
  11736. key: 'hide',
  11737. value: function hide(dialog, done) {
  11738. done();
  11739. }
  11740. }]);
  11741. return AlertDialogAnimator;
  11742. }(BaseAnimator);
  11743. /**
  11744. * Android style animator for alert dialog.
  11745. */
  11746. var AndroidAlertDialogAnimator = function (_AlertDialogAnimator) {
  11747. inherits(AndroidAlertDialogAnimator, _AlertDialogAnimator);
  11748. function AndroidAlertDialogAnimator() {
  11749. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11750. _ref2$timing = _ref2.timing,
  11751. timing = _ref2$timing === undefined ? 'cubic-bezier(.1, .7, .4, 1)' : _ref2$timing,
  11752. _ref2$duration = _ref2.duration,
  11753. duration = _ref2$duration === undefined ? 0.2 : _ref2$duration,
  11754. _ref2$delay = _ref2.delay,
  11755. delay = _ref2$delay === undefined ? 0 : _ref2$delay;
  11756. classCallCheck(this, AndroidAlertDialogAnimator);
  11757. return possibleConstructorReturn(this, (AndroidAlertDialogAnimator.__proto__ || Object.getPrototypeOf(AndroidAlertDialogAnimator)).call(this, { duration: duration, timing: timing, delay: delay }));
  11758. }
  11759. /**
  11760. * @param {Object} dialog
  11761. * @param {Function} callback
  11762. */
  11763. createClass(AndroidAlertDialogAnimator, [{
  11764. key: 'show',
  11765. value: function show(dialog, callback) {
  11766. callback = callback ? callback : function () {};
  11767. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 0 }, { opacity: 1 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0) scale3d(.9, .9, 1)', opacity: 0 }, { transform: 'translate3d(-50%, -50%, 0) scale3d(1, 1, 1)', opacity: 1 }).queue(function (done) {
  11768. callback();
  11769. done();
  11770. }));
  11771. }
  11772. /**
  11773. * @param {Object} dialog
  11774. * @param {Function} callback
  11775. */
  11776. }, {
  11777. key: 'hide',
  11778. value: function hide(dialog, callback) {
  11779. callback = callback ? callback : function () {};
  11780. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0) scale3d(1, 1, 1)', opacity: 1 }, { transform: 'translate3d(-50%, -50%, 0) scale3d(.9, .9, 1)', opacity: 0 }).queue(function (done) {
  11781. callback();
  11782. done();
  11783. }));
  11784. }
  11785. }]);
  11786. return AndroidAlertDialogAnimator;
  11787. }(AlertDialogAnimator);
  11788. /**
  11789. * iOS style animator for alert dialog.
  11790. */
  11791. var IOSAlertDialogAnimator = function (_AlertDialogAnimator2) {
  11792. inherits(IOSAlertDialogAnimator, _AlertDialogAnimator2);
  11793. function IOSAlertDialogAnimator() {
  11794. var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11795. _ref3$timing = _ref3.timing,
  11796. timing = _ref3$timing === undefined ? 'cubic-bezier(.1, .7, .4, 1)' : _ref3$timing,
  11797. _ref3$duration = _ref3.duration,
  11798. duration = _ref3$duration === undefined ? 0.2 : _ref3$duration,
  11799. _ref3$delay = _ref3.delay,
  11800. delay = _ref3$delay === undefined ? 0 : _ref3$delay;
  11801. classCallCheck(this, IOSAlertDialogAnimator);
  11802. return possibleConstructorReturn(this, (IOSAlertDialogAnimator.__proto__ || Object.getPrototypeOf(IOSAlertDialogAnimator)).call(this, { duration: duration, timing: timing, delay: delay }));
  11803. }
  11804. /*
  11805. * @param {Object} dialog
  11806. * @param {Function} callback
  11807. */
  11808. createClass(IOSAlertDialogAnimator, [{
  11809. key: 'show',
  11810. value: function show(dialog, callback) {
  11811. callback = callback ? callback : function () {};
  11812. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 0 }, { opacity: 1 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0) scale3d(1.3, 1.3, 1)', opacity: 0 }, { transform: 'translate3d(-50%, -50%, 0) scale3d(1, 1, 1)', opacity: 1 }).queue(function (done) {
  11813. callback();
  11814. done();
  11815. }));
  11816. }
  11817. /**
  11818. * @param {Object} dialog
  11819. * @param {Function} callback
  11820. */
  11821. }, {
  11822. key: 'hide',
  11823. value: function hide(dialog, callback) {
  11824. callback = callback ? callback : function () {};
  11825. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(dialog._dialog, this.def).default({ opacity: 1 }, { opacity: 0 }).queue(function (done) {
  11826. callback();
  11827. done();
  11828. }));
  11829. }
  11830. }]);
  11831. return IOSAlertDialogAnimator;
  11832. }(AlertDialogAnimator);
  11833. /*
  11834. Copyright 2013-2015 ASIAL CORPORATION
  11835. Licensed under the Apache License, Version 2.0 (the "License");
  11836. you may not use this file except in compliance with the License.
  11837. You may obtain a copy of the License at
  11838. http://www.apache.org/licenses/LICENSE-2.0
  11839. Unless required by applicable law or agreed to in writing, software
  11840. distributed under the License is distributed on an "AS IS" BASIS,
  11841. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11842. See the License for the specific language governing permissions and
  11843. limitations under the License.
  11844. */
  11845. var scheme$1 = {
  11846. '.alert-dialog': 'alert-dialog--*',
  11847. '.alert-dialog-container': 'alert-dialog-container--*',
  11848. '.alert-dialog-title': 'alert-dialog-title--*',
  11849. '.alert-dialog-content': 'alert-dialog-content--*',
  11850. '.alert-dialog-footer': 'alert-dialog-footer--*',
  11851. '.alert-dialog-footer--rowfooter': 'alert-dialog-footer--rowfooter--*',
  11852. '.alert-dialog-button--rowfooter': 'alert-dialog-button--rowfooter--*',
  11853. '.alert-dialog-button--primal': 'alert-dialog-button--primal--*',
  11854. '.alert-dialog-button': 'alert-dialog-button--*',
  11855. 'ons-alert-dialog-button': 'alert-dialog-button--*',
  11856. '.alert-dialog-mask': 'alert-dialog-mask--*',
  11857. '.text-input': 'text-input--*'
  11858. };
  11859. var _animatorDict$1 = {
  11860. 'none': AlertDialogAnimator,
  11861. 'default': function _default() {
  11862. return platform.isAndroid() ? AndroidAlertDialogAnimator : IOSAlertDialogAnimator;
  11863. },
  11864. 'fade': function fade() {
  11865. return platform.isAndroid() ? AndroidAlertDialogAnimator : IOSAlertDialogAnimator;
  11866. }
  11867. };
  11868. /**
  11869. * @element ons-alert-dialog
  11870. * @category dialog
  11871. * @description
  11872. * [en]
  11873. * Alert dialog that is displayed on top of the current screen. Useful for displaying questions, warnings or error messages to the user. The title, content and buttons can be easily customized and it will automatically switch style based on the platform.
  11874. *
  11875. * To use the element it can either be attached directly to the `<body>` element or dynamically created from a template using the `ons.createAlertDialog(template)` utility function and the `<template>` tag.
  11876. * [/en]
  11877. * [ja]
  11878. * 現在のスクリーンの上に表示するアラートダイアログです。ユーザに対する問いかけ、警告、エラーメッセージを表示するのに利用できます。タイトルやコンテンツやボタンは簡単にカスタマイズでき、実行しているプラットフォームに併せてスタイルが自動的に切り替わります。
  11879. * [/ja]
  11880. * @codepen Qwwxyp
  11881. * @tutorial vanilla/Reference/alert-dialog
  11882. * @modifier material
  11883. * [en]Material Design style[/en]
  11884. * [ja]マテリアルデザインのスタイル[/ja]
  11885. * @modifier rowfooter
  11886. * [en]Horizontally aligns the footer buttons.[/en]
  11887. * [ja]フッターの複数のボタンを水平に配置[/ja]
  11888. * @seealso ons-dialog
  11889. * [en]ons-dialog component[/en]
  11890. * [ja]ons-dialogコンポーネント[/ja]
  11891. * @seealso ons-popover
  11892. * [en]ons-popover component[/en]
  11893. * [ja]ons-dialogコンポーネント[/ja]
  11894. * @seealso ons.notification
  11895. * [en]Using ons.notification utility functions.[/en]
  11896. * [ja]アラートダイアログを表示するには、ons.notificationオブジェクトのメソッドを使うこともできます。[/ja]
  11897. * @example
  11898. * <ons-alert-dialog id="alert-dialog">
  11899. * <div class="alert-dialog-title">Warning!</div>
  11900. * <div class="alert-dialog-content">
  11901. * An error has occurred!
  11902. * </div>
  11903. * <div class="alert-dialog-footer">
  11904. * <button id="alert-dialog-button" class="alert-dialog-button">OK</button>
  11905. * </div>
  11906. * </ons-alert-dialog>
  11907. * <script>
  11908. * document.getElementById('alert-dialog').show();
  11909. * </script>
  11910. */
  11911. var AlertDialogElement = function (_BaseDialogElement) {
  11912. inherits(AlertDialogElement, _BaseDialogElement);
  11913. /**
  11914. * @event preshow
  11915. * @description
  11916. * [en]Fired just before the alert dialog is displayed.[/en]
  11917. * [ja]アラートダイアログが表示される直前に発火します。[/ja]
  11918. * @param {Object} event [en]Event object.[/en]
  11919. * @param {Object} event.alertDialog
  11920. * [en]Alert dialog object.[/en]
  11921. * [ja]アラートダイアログのオブジェクト。[/ja]
  11922. * @param {Function} event.cancel
  11923. * [en]Execute to stop the dialog from showing.[/en]
  11924. * [ja]この関数を実行すると、アラートダイアログの表示を止めます。[/ja]
  11925. */
  11926. /**
  11927. * @event postshow
  11928. * @description
  11929. * [en]Fired just after the alert dialog is displayed.[/en]
  11930. * [ja]アラートダイアログが表示された直後に発火します。[/ja]
  11931. * @param {Object} event [en]Event object.[/en]
  11932. * @param {Object} event.alertDialog
  11933. * [en]Alert dialog object.[/en]
  11934. * [ja]アラートダイアログのオブジェクト。[/ja]
  11935. */
  11936. /**
  11937. * @event prehide
  11938. * @description
  11939. * [en]Fired just before the alert dialog is hidden.[/en]
  11940. * [ja]アラートダイアログが隠れる直前に発火します。[/ja]
  11941. * @param {Object} event [en]Event object.[/en]
  11942. * @param {Object} event.alertDialog
  11943. * [en]Alert dialog object.[/en]
  11944. * [ja]アラートダイアログのオブジェクト。[/ja]
  11945. * @param {Function} event.cancel
  11946. * [en]Execute to stop the dialog from hiding.[/en]
  11947. * [ja]この関数を実行すると、アラートダイアログが閉じようとするのを止めます。[/ja]
  11948. */
  11949. /**
  11950. * @event posthide
  11951. * @description
  11952. * [en]Fired just after the alert dialog is hidden.[/en]
  11953. * [ja]アラートダイアログが隠れた後に発火します。[/ja]
  11954. * @param {Object} event [en]Event object.[/en]
  11955. * @param {Object} event.alertDialog
  11956. * [en]Alert dialog object.[/en]
  11957. * [ja]アラートダイアログのオブジェクト。[/ja]
  11958. */
  11959. /**
  11960. * @attribute modifier
  11961. * @type {String}
  11962. * @description
  11963. * [en]The appearance of the dialog.[/en]
  11964. * [ja]ダイアログの見た目を指定します。[/ja]
  11965. */
  11966. /**
  11967. * @attribute cancelable
  11968. * @description
  11969. * [en]If this attribute is set the dialog can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  11970. * [ja]この属性を設定すると、ダイアログの背景をタップしたりAndroidデバイスのバックボタンを押すとダイアログが閉じるようになります。[/ja]
  11971. */
  11972. /**
  11973. * @attribute disabled
  11974. * @description
  11975. * [en]If this attribute is set the dialog is disabled.[/en]
  11976. * [ja]この属性がある時、アラートダイアログはdisabled状態になります。[/ja]
  11977. */
  11978. /**
  11979. * @attribute animation
  11980. * @type {String}
  11981. * @default default
  11982. * @description
  11983. * [en]The animation used when showing and hiding the dialog. Can be either `"none"` or `"default"`.[/en]
  11984. * [ja]ダイアログを表示する際のアニメーション名を指定します。デフォルトでは"none"か"default"が指定できます。[/ja]
  11985. */
  11986. /**
  11987. * @attribute animation-options
  11988. * @type {Expression}
  11989. * @description
  11990. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  11991. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。例:{duration: 0.2, delay: 1, timing: 'ease-in'}[/ja]
  11992. */
  11993. /**
  11994. * @attribute mask-color
  11995. * @type {String}
  11996. * @default rgba(0, 0, 0, 0.2)
  11997. * @description
  11998. * [en]Color of the background mask. Default is "rgba(0, 0, 0, 0.2)".[/en]
  11999. * [ja]背景のマスクの色を指定します。"rgba(0, 0, 0, 0.2)"がデフォルト値です。[/ja]
  12000. */
  12001. function AlertDialogElement() {
  12002. classCallCheck(this, AlertDialogElement);
  12003. var _this = possibleConstructorReturn(this, (AlertDialogElement.__proto__ || Object.getPrototypeOf(AlertDialogElement)).call(this));
  12004. contentReady(_this, function () {
  12005. return _this._compile();
  12006. });
  12007. return _this;
  12008. }
  12009. createClass(AlertDialogElement, [{
  12010. key: '_updateAnimatorFactory',
  12011. value: function _updateAnimatorFactory() {
  12012. return new AnimatorFactory({
  12013. animators: _animatorDict$1,
  12014. baseClass: AlertDialogAnimator,
  12015. baseClassName: 'AlertDialogAnimator',
  12016. defaultAnimation: this.getAttribute('animation')
  12017. });
  12018. }
  12019. }, {
  12020. key: '_compile',
  12021. value: function _compile() {
  12022. autoStyle.prepare(this);
  12023. this.style.display = 'none';
  12024. this.style.zIndex = 10001;
  12025. /**
  12026. * Expected result after compile:
  12027. *
  12028. * <ons-alert-dialog style="none">
  12029. * <div class="alert-dialog-mask"></div>
  12030. * <div class="alert-dialog">
  12031. * <div class="alert-dialog-container">...</div>
  12032. * </div>
  12033. * </ons-alert-dialog>
  12034. */
  12035. var content = document.createDocumentFragment();
  12036. if (!this._mask && !this._dialog) {
  12037. while (this.firstChild) {
  12038. content.appendChild(this.firstChild);
  12039. }
  12040. }
  12041. if (!this._mask) {
  12042. var mask = document.createElement('div');
  12043. mask.classList.add('alert-dialog-mask');
  12044. this.insertBefore(mask, this.children[0]);
  12045. }
  12046. if (!this._dialog) {
  12047. var dialog = document.createElement('div');
  12048. dialog.classList.add('alert-dialog');
  12049. this.insertBefore(dialog, null);
  12050. }
  12051. if (!util$1.findChild(this._dialog, '.alert-dialog-container')) {
  12052. var container = document.createElement('div');
  12053. container.classList.add('alert-dialog-container');
  12054. this._dialog.appendChild(container);
  12055. }
  12056. this._dialog.children[0].appendChild(content);
  12057. this._dialog.style.zIndex = 20001;
  12058. this._mask.style.zIndex = 20000;
  12059. ModifierUtil.initModifier(this, this._scheme);
  12060. }
  12061. /**
  12062. * @property disabled
  12063. * @type {Boolean}
  12064. * @description
  12065. * [en]Whether the element is disabled or not.[/en]
  12066. * [ja]無効化されている場合に`true`。[/ja]
  12067. */
  12068. /**
  12069. * @property cancelable
  12070. * @type {Boolean}
  12071. * @description
  12072. * [en]Whether the dialog is cancelable or not. A cancelable dialog can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  12073. * [ja]そのダイアログがキャンセル可能かどうかを表します。キャンセル可能なダイアログは、背景をタップするかAndroidデバイスのバックボタンを押すことで閉じることが出来るようになります。[/ja]
  12074. */
  12075. /**
  12076. * @method show
  12077. * @signature show([options])
  12078. * @param {Object} [options]
  12079. * [en]Parameter object.[/en]
  12080. * [ja]オプションを指定するオブジェクトです。[/ja]
  12081. * @param {String} [options.animation]
  12082. * [en]Animation name. Available animations are `"fade"` and `"none"`.[/en]
  12083. * [ja]アニメーション名を指定します。指定できるのは、"fade", "none"のいずれかです。[/ja]
  12084. * @param {String} [options.animationOptions]
  12085. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  12086. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. <code>{duration: 0.2, delay: 0.4, timing: 'ease-in'}</code> [/ja]
  12087. * @param {Function} [options.callback]
  12088. * [en]Function to execute after the dialog has been revealed.[/en]
  12089. * [ja]ダイアログが表示され終わった時に呼び出されるコールバックを指定します。[/ja]
  12090. * @description
  12091. * [en]Show the alert dialog.[/en]
  12092. * [ja]ダイアログを表示します。[/ja]
  12093. * @return {Promise}
  12094. * [en]A `Promise` object that resolves to the displayed element.[/en]
  12095. * [ja]表示される要素を解決する`Promise`オブジェクトを返します。[/ja]
  12096. */
  12097. /**
  12098. * @method hide
  12099. * @signature hide([options])
  12100. * @param {Object} [options]
  12101. * [en]Parameter object.[/en]
  12102. * [ja]オプションを指定するオブジェクト。[/ja]
  12103. * @param {String} [options.animation]
  12104. * [en]Animation name. Available animations are `"fade"` and `"none"`.[/en]
  12105. * [ja]アニメーション名を指定します。"fade", "none"のいずれかを指定します。[/ja]
  12106. * @param {String} [options.animationOptions]
  12107. * [en]Specify the animation's duration, delay and timing. E.g. <code>{duration: 0.2, delay: 0.4, timing: 'ease-in'}</code>[/en]
  12108. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. <code>{duration: 0.2, delay: 0.4, timing: 'ease-in'}</code> [/ja]
  12109. * @param {Function} [options.callback]
  12110. * [en]Function to execute after the dialog has been hidden.[/en]
  12111. * [ja]このダイアログが閉じた時に呼び出されるコールバックを指定します。[/ja]
  12112. * @description
  12113. * [en]Hide the alert dialog.[/en]
  12114. * [ja]ダイアログを閉じます。[/ja]
  12115. * @return {Promise}
  12116. * [en]Resolves to the hidden element[/en]
  12117. * [ja]隠れた要素を解決する`Promise`オブジェクトを返します。[/ja]
  12118. */
  12119. /**
  12120. * @property visible
  12121. * @readonly
  12122. * @type {Boolean}
  12123. * @description
  12124. * [en]Whether the dialog is visible or not.[/en]
  12125. * [ja]要素が見える場合に`true`。[/ja]
  12126. */
  12127. /**
  12128. * @property onDeviceBackButton
  12129. * @type {Object}
  12130. * @description
  12131. * [en]Back-button handler.[/en]
  12132. * [ja]バックボタンハンドラ。[/ja]
  12133. */
  12134. /**
  12135. * @param {String} name
  12136. * @param {DialogAnimator} Animator
  12137. */
  12138. }, {
  12139. key: '_scheme',
  12140. get: function get$$1() {
  12141. return scheme$1;
  12142. }
  12143. /**
  12144. * @return {Element}
  12145. */
  12146. }, {
  12147. key: '_mask',
  12148. get: function get$$1() {
  12149. return util$1.findChild(this, '.alert-dialog-mask');
  12150. }
  12151. /**
  12152. * @return {Element}
  12153. */
  12154. }, {
  12155. key: '_dialog',
  12156. get: function get$$1() {
  12157. return util$1.findChild(this, '.alert-dialog');
  12158. }
  12159. /**
  12160. * @return {Element}
  12161. */
  12162. }, {
  12163. key: '_titleElement',
  12164. get: function get$$1() {
  12165. return util$1.findChild(this._dialog.children[0], '.alert-dialog-title');
  12166. }
  12167. /**
  12168. * @return {Element}
  12169. */
  12170. }, {
  12171. key: '_contentElement',
  12172. get: function get$$1() {
  12173. return util$1.findChild(this._dialog.children[0], '.alert-dialog-content');
  12174. }
  12175. }], [{
  12176. key: 'registerAnimator',
  12177. value: function registerAnimator(name, Animator) {
  12178. if (!(Animator.prototype instanceof AlertDialogAnimator)) {
  12179. util$1.throwAnimator('AlertDialog');
  12180. }
  12181. _animatorDict$1[name] = Animator;
  12182. }
  12183. }, {
  12184. key: 'animators',
  12185. get: function get$$1() {
  12186. return _animatorDict$1;
  12187. }
  12188. }, {
  12189. key: 'AlertDialogAnimator',
  12190. get: function get$$1() {
  12191. return AlertDialogAnimator;
  12192. }
  12193. }]);
  12194. return AlertDialogElement;
  12195. }(BaseDialogElement);
  12196. onsElements.AlertDialog = AlertDialogElement;
  12197. customElements.define('ons-alert-dialog', AlertDialogElement);
  12198. /*
  12199. Copyright 2013-2015 ASIAL CORPORATION
  12200. Licensed under the Apache License, Version 2.0 (the "License");
  12201. you may not use this file except in compliance with the License.
  12202. You may obtain a copy of the License at
  12203. http://www.apache.org/licenses/LICENSE-2.0
  12204. Unless required by applicable law or agreed to in writing, software
  12205. distributed under the License is distributed on an "AS IS" BASIS,
  12206. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12207. See the License for the specific language governing permissions and
  12208. limitations under the License.
  12209. */
  12210. /**
  12211. * @element ons-alert-dialog-button
  12212. * @modifier material
  12213. * [en]Material Design alert-dialog button.[/en]
  12214. * [ja]マテリアルデザインのボタンを表示します。[/ja]
  12215. * @description
  12216. * [en][/en]
  12217. * [ja][/ja]
  12218. * @seealso ons-alert-dialog
  12219. * [en]The `<ons-alert-dialog>` component displays a alert dialog.[/en]
  12220. * [ja]ons-alert-dialogコンポーネント[/ja]
  12221. * @example
  12222. * <ons-alert-dialog>
  12223. * <div class="alert-dialog-title">Warning!</div>
  12224. * <div class="alert-dialog-content">
  12225. * An error has occurred!
  12226. * </div>
  12227. * <div class="alert-dialog-footer">
  12228. * <alert-dialog-button onclick="app.close()">Cancel</alert-dialog-button>
  12229. * <alert-dialog-button class="alert-dialog-button" onclick="app.close()">OK</alert-dialog-button>
  12230. * </div>
  12231. * </ons-alert-dialog>
  12232. */
  12233. var AlertDialogButtonElement = function (_BaseButtonElement) {
  12234. inherits(AlertDialogButtonElement, _BaseButtonElement);
  12235. function AlertDialogButtonElement() {
  12236. classCallCheck(this, AlertDialogButtonElement);
  12237. return possibleConstructorReturn(this, (AlertDialogButtonElement.__proto__ || Object.getPrototypeOf(AlertDialogButtonElement)).apply(this, arguments));
  12238. }
  12239. createClass(AlertDialogButtonElement, [{
  12240. key: '_scheme',
  12241. /**
  12242. * @attribute modifier
  12243. * @type {String}
  12244. * @description
  12245. * [en]The appearance of the button.[/en]
  12246. * [ja]ボタンの表現を指定します。[/ja]
  12247. */
  12248. /**
  12249. * @attribute disabled
  12250. * @description
  12251. * [en]Specify if button should be disabled.[/en]
  12252. * [ja]ボタンを無効化する場合は指定してください。[/ja]
  12253. */
  12254. /**
  12255. * @property disabled
  12256. * @type {Boolean}
  12257. * @description
  12258. * [en]Whether the element is disabled or not.[/en]
  12259. * [ja]無効化されている場合に`true`。[/ja]
  12260. */
  12261. get: function get$$1() {
  12262. return { '': 'alert-dialog-button--*' };
  12263. }
  12264. }, {
  12265. key: '_defaultClassName',
  12266. get: function get$$1() {
  12267. return 'alert-dialog-button';
  12268. }
  12269. }, {
  12270. key: '_rippleOpt',
  12271. get: function get$$1() {
  12272. return [this, undefined, { 'modifier': 'light-gray' }];
  12273. }
  12274. }]);
  12275. return AlertDialogButtonElement;
  12276. }(BaseButtonElement);
  12277. onsElements.AlertDialogButton = AlertDialogButtonElement;
  12278. customElements.define('ons-alert-dialog-button', AlertDialogButtonElement);
  12279. var iosBackButtonIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"13px\" height=\"21px\" viewBox=\"0 0 13 21\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>ios-back-button-icon</title>\n <desc>Created with Sketch.</desc>\n <defs></defs>\n <g id=\"toolbar-back-button\" stroke=\"none\" stroke-width=\"1\" fill-rule=\"evenodd\">\n <g id=\"ios\" transform=\"translate(-34.000000, -30.000000)\">\n <polygon id=\"ios-back-button-icon\" points=\"34 40.5 44.5 30 46.5 32 38 40.5 46.5 49 44.5 51\"></polygon>\n </g>\n </g>\n</svg>\n";
  12280. var mdBackButtonIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>md-back-button-icon</title>\n <desc>Created with Sketch.</desc>\n <defs></defs>\n <g id=\"toolbar-back-button\" stroke=\"none\" stroke-width=\"1\" fill-rule=\"evenodd\">\n <g id=\"android\" transform=\"translate(-32.000000, -32.000000)\" fill-rule=\"nonzero\">\n <polygon id=\"md-back-button-icon\" points=\"48 39 35.83 39 41.42 33.41 40 32 32 40 40 48 41.41 46.59 35.83 41 48 41\"></polygon>\n </g>\n </g>\n</svg>\n";
  12281. /*
  12282. Copyright 2013-2015 ASIAL CORPORATION
  12283. Licensed under the Apache License, Version 2.0 (the "License");
  12284. you may not use this file except in compliance with the License.
  12285. You may obtain a copy of the License at
  12286. http://www.apache.org/licenses/LICENSE-2.0
  12287. Unless required by applicable law or agreed to in writing, software
  12288. distributed under the License is distributed on an "AS IS" BASIS,
  12289. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12290. See the License for the specific language governing permissions and
  12291. limitations under the License.
  12292. */
  12293. var defaultClassName = 'back-button';
  12294. var scheme$2 = {
  12295. '': 'back-button--*',
  12296. '.back-button__icon': 'back-button--*__icon',
  12297. '.back-button__label': 'back-button--*__label'
  12298. };
  12299. /**
  12300. * @element ons-back-button
  12301. * @category navigation
  12302. * @description
  12303. * [en]
  12304. * Back button component for `<ons-toolbar>`. Put it in the left part of the `<ons-toolbar>`.
  12305. *
  12306. * It will find the parent `<ons-navigator>` element and pop a page when clicked. This behavior can be overriden by specifying the `onClick` property.
  12307. * [/en]
  12308. * [ja][/ja]
  12309. * @codepen aHmGL
  12310. * @tutorial vanilla/Reference/back-button
  12311. * @modifier material
  12312. * [en]Material Design style[/en]
  12313. * [ja][/ja]
  12314. * @seealso ons-toolbar
  12315. * [en]ons-toolbar component[/en]
  12316. * [ja]ons-toolbarコンポーネント[/ja]
  12317. * @seealso ons-navigator
  12318. * [en]ons-navigator component[/en]
  12319. * [ja]ons-navigatorコンポーネント[/ja]
  12320. * @example
  12321. * <ons-toolbar>
  12322. * <div class="left">
  12323. * <ons-back-button>Back</ons-back-button>
  12324. * </div>
  12325. * <div class="center">
  12326. * Title
  12327. * <div>
  12328. * </ons-toolbar>
  12329. */
  12330. var BackButtonElement = function (_BaseElement) {
  12331. inherits(BackButtonElement, _BaseElement);
  12332. /**
  12333. * @attribute modifier
  12334. * @type {String}
  12335. * @description
  12336. * [en]The appearance of the back button.[/en]
  12337. * [ja]バックボタンの見た目を指定します。[/ja]
  12338. */
  12339. function BackButtonElement() {
  12340. classCallCheck(this, BackButtonElement);
  12341. var _this = possibleConstructorReturn(this, (BackButtonElement.__proto__ || Object.getPrototypeOf(BackButtonElement)).call(this));
  12342. contentReady(_this, function () {
  12343. _this._compile();
  12344. });
  12345. _this._options = {};
  12346. _this._boundOnClick = _this._onClick.bind(_this);
  12347. return _this;
  12348. }
  12349. createClass(BackButtonElement, [{
  12350. key: '_updateIcon',
  12351. value: function _updateIcon() {
  12352. var icon = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : util$1.findChild(this, '.back-button__icon');
  12353. icon.innerHTML = autoStyle.getPlatform(this) === 'android' || util$1.hasModifier(this, 'material') ? mdBackButtonIcon : iosBackButtonIcon;
  12354. }
  12355. }, {
  12356. key: '_compile',
  12357. value: function _compile() {
  12358. autoStyle.prepare(this);
  12359. this.classList.add(defaultClassName);
  12360. if (!util$1.findChild(this, '.back-button__label')) {
  12361. var label = util$1.create('span.back-button__label');
  12362. while (this.childNodes[0]) {
  12363. label.appendChild(this.childNodes[0]);
  12364. }
  12365. this.appendChild(label);
  12366. }
  12367. if (!util$1.findChild(this, '.back-button__icon')) {
  12368. var icon = util$1.create('span.back-button__icon');
  12369. this._updateIcon(icon);
  12370. this.insertBefore(icon, this.children[0]);
  12371. }
  12372. util$1.updateRipple(this, undefined, { center: '', 'size': 'contain', 'background': 'transparent' });
  12373. ModifierUtil.initModifier(this, scheme$2);
  12374. }
  12375. /**
  12376. * @property options
  12377. * @type {Object}
  12378. * @description
  12379. * [en]Options object.[/en]
  12380. * [ja]オプションを指定するオブジェクト。[/ja]
  12381. */
  12382. /**
  12383. * @property options.animation
  12384. * @type {String}
  12385. * @description
  12386. * [en]Animation name. Available animations are "slide", "lift", "fade" and "none".
  12387. * These are platform based animations. For fixed animations, add "-ios" or "-md"
  12388. * suffix to the animation name. E.g. "lift-ios", "lift-md". Defaults values are "slide-ios" and "fade-md".
  12389. * [/en]
  12390. * [ja][/ja]
  12391. */
  12392. /**
  12393. * @property options.animationOptions
  12394. * @type {String}
  12395. * @description
  12396. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`[/en]
  12397. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}` [/ja]
  12398. */
  12399. /**
  12400. * @property options.callback
  12401. * @type {String}
  12402. * @description
  12403. * [en]Function that is called when the transition has ended.[/en]
  12404. * [ja]このメソッドによる画面遷移が終了した際に呼び出される関数オブジェクトを指定します。[/ja]
  12405. */
  12406. }, {
  12407. key: '_onClick',
  12408. /**
  12409. * @property onClick
  12410. * @type {Function}
  12411. * @description
  12412. * [en]Used to override the default back button behavior.[/en]
  12413. * [ja][/ja]
  12414. */
  12415. value: function _onClick() {
  12416. if (this.onClick) {
  12417. this.onClick.apply(this);
  12418. } else {
  12419. var navigator = util$1.findParent(this, 'ons-navigator');
  12420. if (navigator) {
  12421. navigator.popPage(this.options);
  12422. }
  12423. }
  12424. }
  12425. }, {
  12426. key: 'connectedCallback',
  12427. value: function connectedCallback() {
  12428. this.addEventListener('click', this._boundOnClick, false);
  12429. }
  12430. }, {
  12431. key: 'attributeChangedCallback',
  12432. value: function attributeChangedCallback(name, last, current) {
  12433. switch (name) {
  12434. case 'class':
  12435. util$1.restoreClass(this, defaultClassName, scheme$2);
  12436. break;
  12437. case 'modifier':
  12438. {
  12439. ModifierUtil.onModifierChanged(last, current, this, scheme$2) && this._updateIcon();
  12440. break;
  12441. }
  12442. }
  12443. }
  12444. }, {
  12445. key: 'disconnectedCallback',
  12446. value: function disconnectedCallback() {
  12447. this.removeEventListener('click', this._boundOnClick, false);
  12448. }
  12449. }, {
  12450. key: 'show',
  12451. value: function show() {
  12452. this.style.display = 'inline-block';
  12453. }
  12454. }, {
  12455. key: 'hide',
  12456. value: function hide() {
  12457. this.style.display = 'none';
  12458. }
  12459. }, {
  12460. key: 'options',
  12461. get: function get$$1() {
  12462. return this._options;
  12463. },
  12464. set: function set$$1(object) {
  12465. this._options = object;
  12466. }
  12467. }], [{
  12468. key: 'observedAttributes',
  12469. get: function get$$1() {
  12470. return ['modifier', 'class'];
  12471. }
  12472. }]);
  12473. return BackButtonElement;
  12474. }(BaseElement);
  12475. onsElements.BackButton = BackButtonElement;
  12476. customElements.define('ons-back-button', BackButtonElement);
  12477. /*
  12478. Copyright 2013-2015 ASIAL CORPORATION
  12479. Licensed under the Apache License, Version 2.0 (the "License");
  12480. you may not use this file except in compliance with the License.
  12481. You may obtain a copy of the License at
  12482. http://www.apache.org/licenses/LICENSE-2.0
  12483. Unless required by applicable law or agreed to in writing, software
  12484. distributed under the License is distributed on an "AS IS" BASIS,
  12485. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12486. See the License for the specific language governing permissions and
  12487. limitations under the License.
  12488. */
  12489. var defaultClassName$1 = 'bottom-bar';
  12490. var scheme$3 = { '': 'bottom-bar--*' };
  12491. /**
  12492. * @element ons-bottom-toolbar
  12493. * @category page
  12494. * @description
  12495. * [en]Toolbar component that is positioned at the bottom of the page. Since bottom toolbars are very versatile elements, `ons-bottom-toolbar` does not provide any specific layout syntax for its children. Modifiers or custom CSS must be used.[/en]
  12496. * [ja]ページ下部に配置されるツールバー用コンポーネントです。[/ja]
  12497. * @modifier transparent
  12498. * [en]Make the toolbar transparent.[/en]
  12499. * [ja]ツールバーの背景を透明にして表示します。[/ja]
  12500. * @modifier aligned
  12501. * [en]Vertically aligns its children and applies flexbox for block elements. `justify-content` CSS rule can be used to change horizontal align.[/en]
  12502. * [ja]ツールバーの背景を透明にして表示します。[/ja]
  12503. * @seealso ons-toolbar [en]ons-toolbar component[/en][ja]ons-toolbarコンポーネント[/ja]
  12504. * @example
  12505. * <ons-bottom-toolbar>
  12506. * Content
  12507. * </ons-bottom-toolbar>
  12508. */
  12509. var BottomToolbarElement = function (_BaseElement) {
  12510. inherits(BottomToolbarElement, _BaseElement);
  12511. /**
  12512. * @attribute modifier
  12513. * @type {String}
  12514. * @description
  12515. * [en]The appearance of the toolbar.[/en]
  12516. * [ja]ツールバーの見た目の表現を指定します。[/ja]
  12517. */
  12518. function BottomToolbarElement() {
  12519. classCallCheck(this, BottomToolbarElement);
  12520. var _this = possibleConstructorReturn(this, (BottomToolbarElement.__proto__ || Object.getPrototypeOf(BottomToolbarElement)).call(this));
  12521. _this.classList.add(defaultClassName$1);
  12522. ModifierUtil.initModifier(_this, scheme$3);
  12523. return _this;
  12524. }
  12525. createClass(BottomToolbarElement, [{
  12526. key: 'attributeChangedCallback',
  12527. value: function attributeChangedCallback(name, last, current) {
  12528. switch (name) {
  12529. case 'class':
  12530. util$1.restoreClass(this, defaultClassName$1, scheme$3);
  12531. break;
  12532. case 'modifier':
  12533. ModifierUtil.onModifierChanged(last, current, this, scheme$3);
  12534. break;
  12535. }
  12536. }
  12537. }], [{
  12538. key: 'observedAttributes',
  12539. get: function get$$1() {
  12540. return ['modifier', 'class'];
  12541. }
  12542. }]);
  12543. return BottomToolbarElement;
  12544. }(BaseElement);
  12545. onsElements.BottomToolbar = BottomToolbarElement;
  12546. customElements.define('ons-bottom-toolbar', BottomToolbarElement);
  12547. /*
  12548. Copyright 2013-2015 ASIAL CORPORATION
  12549. Licensed under the Apache License, Version 2.0 (the "License");
  12550. you may not use this file except in compliance with the License.
  12551. You may obtain a copy of the License at
  12552. http://www.apache.org/licenses/LICENSE-2.0
  12553. Unless required by applicable law or agreed to in writing, software
  12554. distributed under the License is distributed on an "AS IS" BASIS,
  12555. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12556. See the License for the specific language governing permissions and
  12557. limitations under the License.
  12558. */
  12559. /**
  12560. * @element ons-button
  12561. * @category form
  12562. * @modifier outline
  12563. * [en]Button with outline and transparent background[/en]
  12564. * [ja]アウトラインを持ったボタンを表示します。[/ja]
  12565. * @modifier light
  12566. * [en]Button that doesn't stand out.[/en]
  12567. * [ja]目立たないボタンを表示します。[/ja]
  12568. * @modifier quiet
  12569. * [en]Button with no outline and or background..[/en]
  12570. * [ja]枠線や背景が無い文字だけのボタンを表示します。[/ja]
  12571. * @modifier cta
  12572. * [en]Button that really stands out.[/en]
  12573. * [ja]目立つボタンを表示します。[/ja]
  12574. * @modifier large
  12575. * [en]Large button that covers the width of the screen.[/en]
  12576. * [ja]横いっぱいに広がる大きなボタンを表示します。[/ja]
  12577. * @modifier large--quiet
  12578. * [en]Large quiet button.[/en]
  12579. * [ja]横いっぱいに広がるquietボタンを表示します。[/ja]
  12580. * @modifier large--cta
  12581. * [en]Large call to action button.[/en]
  12582. * [ja]横いっぱいに広がるctaボタンを表示します。[/ja]
  12583. * @modifier material
  12584. * [en]Material Design button[/en]
  12585. * [ja]マテリアルデザインのボタン[/ja]
  12586. * @modifier material--flat
  12587. * [en]Material Design flat button[/en]
  12588. * [ja]マテリアルデザインのフラットボタン[/ja]
  12589. * @description
  12590. * [en]
  12591. * Button component. If you want to place a button in a toolbar, use `<ons-toolbar-button>` or `<ons-back-button>` instead.
  12592. *
  12593. * Will automatically display as a Material Design button with a ripple effect on Android.
  12594. * [/en]
  12595. * [ja]ボタン用コンポーネント。ツールバーにボタンを設置する場合は、ons-toolbar-buttonもしくはons-back-buttonコンポーネントを使用します。[/ja]
  12596. * @codepen hLayx
  12597. * @tutorial vanilla/Reference/button
  12598. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  12599. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja]Information about cross platform styling[/ja]
  12600. * @example
  12601. * <ons-button modifier="large--cta">
  12602. * Tap Me
  12603. * </ons-button>
  12604. */
  12605. var ButtonElement = function (_BaseButtonElement) {
  12606. inherits(ButtonElement, _BaseButtonElement);
  12607. function ButtonElement() {
  12608. classCallCheck(this, ButtonElement);
  12609. return possibleConstructorReturn(this, (ButtonElement.__proto__ || Object.getPrototypeOf(ButtonElement)).apply(this, arguments));
  12610. }
  12611. createClass(ButtonElement, [{
  12612. key: '_scheme',
  12613. /**
  12614. * @attribute modifier
  12615. * @type {String}
  12616. * @description
  12617. * [en]The appearance of the button.[/en]
  12618. * [ja]ボタンの表現を指定します。[/ja]
  12619. */
  12620. /**
  12621. * @attribute ripple
  12622. * @description
  12623. * [en]If this attribute is defined, the button will have a ripple effect.[/en]
  12624. * [ja][/ja]
  12625. */
  12626. /**
  12627. * @attribute disabled
  12628. * @description
  12629. * [en]Specify if button should be disabled.[/en]
  12630. * [ja]ボタンを無効化する場合は指定します。[/ja]
  12631. */
  12632. /**
  12633. * @property disabled
  12634. * @type {Boolean}
  12635. * @description
  12636. * [en]Whether the button is disabled or not.[/en]
  12637. * [ja]無効化されている場合に`true`。[/ja]
  12638. */
  12639. get: function get$$1() {
  12640. return { '': 'button--*' };
  12641. }
  12642. }, {
  12643. key: '_defaultClassName',
  12644. get: function get$$1() {
  12645. return 'button';
  12646. }
  12647. }]);
  12648. return ButtonElement;
  12649. }(BaseButtonElement);
  12650. onsElements.Button = ButtonElement;
  12651. customElements.define('ons-button', ButtonElement);
  12652. /*
  12653. Copyright 2013-2015 ASIAL CORPORATION
  12654. Licensed under the Apache License, Version 2.0 (the "License");
  12655. you may not use this file except in compliance with the License.
  12656. You may obtain a copy of the License at
  12657. http://www.apache.org/licenses/LICENSE-2.0
  12658. Unless required by applicable law or agreed to in writing, software
  12659. distributed under the License is distributed on an "AS IS" BASIS,
  12660. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12661. See the License for the specific language governing permissions and
  12662. limitations under the License.
  12663. */
  12664. var defaultClassName$2 = 'card';
  12665. var scheme$4 = {
  12666. '': 'card--*',
  12667. '.card__title': 'card--*__title',
  12668. '.card__content': 'card--*__content'
  12669. };
  12670. /**
  12671. * @element ons-card
  12672. * @category visual
  12673. * @modifier material
  12674. * [en]A card with material design.[/en]
  12675. * [ja]リストの上下のボーダーが無いリストを表示します。[/ja]
  12676. * @description
  12677. * [en]
  12678. * Component to create a card that displays some information.
  12679. *
  12680. * The card may be composed by divs with specially prepared classes `title` and/or `content`. You can also add your own content as you please.[/en]
  12681. * [ja][/ja]
  12682. * @tutorial vanilla/Reference/card
  12683. * @example
  12684. * <ons-card>
  12685. * <p>Some content</p>
  12686. * </ons-card>
  12687. */
  12688. var CardElement = function (_BaseElement) {
  12689. inherits(CardElement, _BaseElement);
  12690. /**
  12691. * @attribute modifier
  12692. * @type {String}
  12693. * @description
  12694. * [en]The appearance of the card.[/en]
  12695. * [ja]リストの表現を指定します。[/ja]
  12696. */
  12697. function CardElement() {
  12698. classCallCheck(this, CardElement);
  12699. var _this = possibleConstructorReturn(this, (CardElement.__proto__ || Object.getPrototypeOf(CardElement)).call(this));
  12700. contentReady(_this, function () {
  12701. _this._compile();
  12702. });
  12703. return _this;
  12704. }
  12705. createClass(CardElement, [{
  12706. key: '_compile',
  12707. value: function _compile() {
  12708. for (var i = 0; i < this.children.length; i++) {
  12709. var el = this.children[i];
  12710. if (el.classList.contains('title')) {
  12711. el.classList.add('card__title');
  12712. } else if (el.classList.contains('content')) {
  12713. el.classList.add('card__content');
  12714. }
  12715. }
  12716. autoStyle.prepare(this);
  12717. this.classList.add(defaultClassName$2);
  12718. ModifierUtil.initModifier(this, scheme$4);
  12719. }
  12720. }, {
  12721. key: 'attributeChangedCallback',
  12722. value: function attributeChangedCallback(name, last, current) {
  12723. switch (name) {
  12724. case 'class':
  12725. util$1.restoreClass(this, defaultClassName$2, scheme$4);
  12726. break;
  12727. case 'modifier':
  12728. ModifierUtil.onModifierChanged(last, current, this, scheme$4);
  12729. break;
  12730. }
  12731. }
  12732. }], [{
  12733. key: 'observedAttributes',
  12734. get: function get$$1() {
  12735. return ['modifier', 'class'];
  12736. }
  12737. }]);
  12738. return CardElement;
  12739. }(BaseElement);
  12740. onsElements.Card = CardElement;
  12741. customElements.define('ons-card', CardElement);
  12742. /*
  12743. Copyright 2013-2015 ASIAL CORPORATION
  12744. Licensed under the Apache License, Version 2.0 (the "License");
  12745. you may not use this file except in compliance with the License.
  12746. You may obtain a copy of the License at
  12747. http://www.apache.org/licenses/LICENSE-2.0
  12748. Unless required by applicable law or agreed to in writing, software
  12749. distributed under the License is distributed on an "AS IS" BASIS,
  12750. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12751. See the License for the specific language governing permissions and
  12752. limitations under the License.
  12753. */
  12754. var scheme$5 = { '': 'carousel-item--*' };
  12755. /**
  12756. * @element ons-carousel-item
  12757. * @category carousel
  12758. * @description
  12759. * [en]
  12760. * Carousel item component. Used as a child of the `<ons-carousel>` element.
  12761. * [/en]
  12762. * [ja][/ja]
  12763. * @codepen xbbzOQ
  12764. * @tutorial vanilla/Reference/carousel
  12765. * @seealso ons-carousel
  12766. * [en]`<ons-carousel>` components[/en]
  12767. * [ja]<ons-carousel>コンポーネント[/ja]
  12768. * @example
  12769. * <ons-carousel style="width: 100%; height: 200px">
  12770. * <ons-carousel-item>
  12771. * ...
  12772. * </ons-carousel-item>
  12773. * <ons-carousel-item>
  12774. * ...
  12775. * </ons-carousel-item>
  12776. * </ons-carousel>
  12777. */
  12778. var CarouselItemElement = function (_BaseElement) {
  12779. inherits(CarouselItemElement, _BaseElement);
  12780. function CarouselItemElement() {
  12781. classCallCheck(this, CarouselItemElement);
  12782. var _this = possibleConstructorReturn(this, (CarouselItemElement.__proto__ || Object.getPrototypeOf(CarouselItemElement)).call(this));
  12783. _this.style.width = '100%';
  12784. ModifierUtil.initModifier(_this, scheme$5);
  12785. return _this;
  12786. }
  12787. createClass(CarouselItemElement, [{
  12788. key: 'attributeChangedCallback',
  12789. value: function attributeChangedCallback(name, last, current) {
  12790. if (name === 'modifier') {
  12791. return ModifierUtil.onModifierChanged(last, current, this, scheme$5);
  12792. }
  12793. }
  12794. }], [{
  12795. key: 'observedAttributes',
  12796. get: function get$$1() {
  12797. return ['modifier'];
  12798. }
  12799. }]);
  12800. return CarouselItemElement;
  12801. }(BaseElement);
  12802. onsElements.CarouselItem = CarouselItemElement;
  12803. customElements.define('ons-carousel-item', CarouselItemElement);
  12804. var directionMap = {
  12805. vertical: {
  12806. axis: 'Y',
  12807. size: 'Height',
  12808. dir: ['up', 'down'],
  12809. t3d: ['0px, ', 'px, 0px']
  12810. },
  12811. horizontal: {
  12812. axis: 'X',
  12813. size: 'Width',
  12814. dir: ['left', 'right'],
  12815. t3d: ['', 'px, 0px, 0px']
  12816. }
  12817. };
  12818. var Swiper = function () {
  12819. function Swiper(params) {
  12820. var _this = this;
  12821. classCallCheck(this, Swiper);
  12822. // Parameters
  12823. var FALSE = function FALSE() {
  12824. return false;
  12825. };
  12826. 'getInitialIndex getBubbleWidth isVertical isOverScrollable isCentered\n isAutoScrollable refreshHook preChangeHook postChangeHook overScrollHook'.split(/\s+/).forEach(function (key) {
  12827. return _this[key] = params[key] || FALSE;
  12828. });
  12829. this.getElement = params.getElement; // Required
  12830. this.scrollHook = params.scrollHook; // Optional
  12831. this.itemSize = params.itemSize || '100%';
  12832. this.getAutoScrollRatio = function () {
  12833. var ratio = params.getAutoScrollRatio && params.getAutoScrollRatio.apply(params, arguments);
  12834. ratio = typeof ratio === 'number' && ratio === ratio ? ratio : .5;
  12835. if (ratio < 0.0 || ratio > 1.0) {
  12836. util$1.throw('Invalid auto-scroll-ratio ' + ratio + '. Must be between 0 and 1');
  12837. }
  12838. return ratio;
  12839. };
  12840. // Prevent clicks only on desktop
  12841. this.shouldBlock = util$1.globals.actualMobileOS === 'other';
  12842. // Bind handlers
  12843. this.onDragStart = this.onDragStart.bind(this);
  12844. this.onDrag = this.onDrag.bind(this);
  12845. this.onDragEnd = this.onDragEnd.bind(this);
  12846. this.onResize = this.onResize.bind(this);
  12847. this._shouldFixScroll = util$1.globals.actualMobileOS === 'ios';
  12848. }
  12849. createClass(Swiper, [{
  12850. key: 'init',
  12851. value: function init() {
  12852. var _this2 = this;
  12853. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12854. swipeable = _ref.swipeable,
  12855. autoRefresh = _ref.autoRefresh;
  12856. this.initialized = true;
  12857. this.target = this.getElement().children[0];
  12858. this.blocker = this.getElement().children[1];
  12859. if (!this.target || !this.blocker) {
  12860. util$1.throw('Expected "target" and "blocker" elements to exist before initializing Swiper');
  12861. }
  12862. if (!this.shouldBlock) {
  12863. this.blocker.style.display = 'none';
  12864. }
  12865. // Add classes
  12866. this.getElement().classList.add('ons-swiper');
  12867. this.target.classList.add('ons-swiper-target');
  12868. this.blocker.classList.add('ons-swiper-blocker');
  12869. // Setup listeners
  12870. this._gestureDetector = new GestureDetector(this.getElement(), { dragMinDistance: 1, dragLockToAxis: true, passive: !this._shouldFixScroll });
  12871. this._mutationObserver = new MutationObserver(function () {
  12872. return _this2.refresh();
  12873. });
  12874. this.updateSwipeable(swipeable);
  12875. this.updateAutoRefresh(autoRefresh);
  12876. // Setup initial layout
  12877. this._scroll = this._offset = this._lastActiveIndex = 0;
  12878. this._updateLayout();
  12879. this._setupInitialIndex();
  12880. setImmediate(function () {
  12881. return _this2.initialized && _this2._setupInitialIndex();
  12882. });
  12883. // Fix rendering glitch on Android 4.1
  12884. // Fix for iframes where the width is inconsistent at the beginning
  12885. if (window !== window.parent || this.offsetHeight === 0) {
  12886. window.requestAnimationFrame(function () {
  12887. return _this2.initialized && _this2.onResize();
  12888. });
  12889. }
  12890. }
  12891. }, {
  12892. key: 'dispose',
  12893. value: function dispose() {
  12894. this.initialized = false;
  12895. this.updateSwipeable(false);
  12896. this.updateAutoRefresh(false);
  12897. this._gestureDetector && this._gestureDetector.dispose();
  12898. this.target = this.blocker = this._gestureDetector = this._mutationObserver = null;
  12899. this.setupResize(false);
  12900. }
  12901. }, {
  12902. key: 'onResize',
  12903. value: function onResize() {
  12904. var i = this._scroll / this.targetSize;
  12905. this._reset();
  12906. this.setActiveIndex(i);
  12907. this.refresh();
  12908. }
  12909. }, {
  12910. key: '_calculateItemSize',
  12911. value: function _calculateItemSize() {
  12912. var matches = this.itemSize.match(/^(\d+)(px|%)/);
  12913. if (!matches) {
  12914. util$1.throw('Invalid state: swiper\'s size unit must be \'%\' or \'px\'');
  12915. }
  12916. var value = parseInt(matches[1], 10);
  12917. return matches[2] === '%' ? Math.round(value / 100 * this.targetSize) : value;
  12918. }
  12919. }, {
  12920. key: '_setupInitialIndex',
  12921. value: function _setupInitialIndex() {
  12922. this._reset();
  12923. this._lastActiveIndex = Math.max(Math.min(Number(this.getInitialIndex()), this.itemCount), 0);
  12924. this._scroll = this._offset + this.itemNumSize * this._lastActiveIndex;
  12925. this._scrollTo(this._scroll);
  12926. }
  12927. }, {
  12928. key: '_setSwiping',
  12929. value: function _setSwiping(toggle) {
  12930. this.target.classList.toggle('swiping', toggle); // Hides everything except shown pages
  12931. }
  12932. }, {
  12933. key: 'setActiveIndex',
  12934. value: function setActiveIndex(index) {
  12935. var _this3 = this;
  12936. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12937. this._setSwiping(true);
  12938. index = Math.max(0, Math.min(index, this.itemCount - 1));
  12939. var scroll = Math.max(0, Math.min(this.maxScroll, this._offset + this.itemNumSize * index));
  12940. if (platform.isUIWebView()) {
  12941. /* Dirty fix for #2231(https://github.com/OnsenUI/OnsenUI/issues/2231). begin */
  12942. var concat = function concat(arrayOfArray) {
  12943. return Array.prototype.concat.apply([], arrayOfArray);
  12944. };
  12945. var contents = concat(util$1.arrayFrom(this.target.children).map(function (page) {
  12946. return util$1.arrayFrom(page.children).filter(function (child) {
  12947. return child.classList.contains('page__content');
  12948. });
  12949. }));
  12950. var map = new Map();
  12951. return new Promise(function (resolve) {
  12952. contents.forEach(function (content) {
  12953. map.set(content, content.getAttribute('class'));
  12954. content.classList.add('page__content--suppress-layer-creation');
  12955. });
  12956. requestAnimationFrame(resolve);
  12957. }).then(function () {
  12958. return _this3._changeTo(scroll, options);
  12959. }).then(function () {
  12960. return new Promise(function (resolve) {
  12961. contents.forEach(function (content) {
  12962. content.setAttribute('class', map.get(content));
  12963. });
  12964. requestAnimationFrame(resolve);
  12965. });
  12966. });
  12967. /* end */
  12968. } else {
  12969. return this._changeTo(scroll, options);
  12970. }
  12971. }
  12972. }, {
  12973. key: 'getActiveIndex',
  12974. value: function getActiveIndex() {
  12975. var scroll = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._scroll;
  12976. scroll -= this._offset;
  12977. var count = this.itemCount,
  12978. size = this.itemNumSize;
  12979. if (this.itemNumSize === 0 || !util$1.isInteger(scroll)) {
  12980. return this._lastActiveIndex;
  12981. }
  12982. if (scroll <= 0) {
  12983. return 0;
  12984. }
  12985. for (var i = 0; i < count; i++) {
  12986. if (size * i <= scroll && size * (i + 1) > scroll) {
  12987. return i;
  12988. }
  12989. }
  12990. return count - 1;
  12991. }
  12992. }, {
  12993. key: 'setupResize',
  12994. value: function setupResize(add) {
  12995. window[(add ? 'add' : 'remove') + 'EventListener']('resize', this.onResize, true);
  12996. }
  12997. }, {
  12998. key: 'show',
  12999. value: function show() {
  13000. var _this4 = this;
  13001. this.setupResize(true);
  13002. this.onResize();
  13003. setTimeout(function () {
  13004. return _this4.target && _this4.target.classList.add('active');
  13005. }, 1000 / 60); // Hide elements after animations
  13006. }
  13007. }, {
  13008. key: 'hide',
  13009. value: function hide() {
  13010. this.setupResize(false);
  13011. this.target.classList.remove('active'); // Show elements before animations
  13012. }
  13013. }, {
  13014. key: 'updateSwipeable',
  13015. value: function updateSwipeable(shouldUpdate) {
  13016. if (this._gestureDetector) {
  13017. var action = shouldUpdate ? 'on' : 'off';
  13018. this._gestureDetector[action]('drag', this.onDrag);
  13019. this._gestureDetector[action]('dragstart', this.onDragStart);
  13020. this._gestureDetector[action]('dragend', this.onDragEnd);
  13021. }
  13022. }
  13023. }, {
  13024. key: 'updateAutoRefresh',
  13025. value: function updateAutoRefresh(shouldWatch) {
  13026. if (this._mutationObserver) {
  13027. shouldWatch ? this._mutationObserver.observe(this.target, { childList: true }) : this._mutationObserver.disconnect();
  13028. }
  13029. }
  13030. }, {
  13031. key: 'updateItemSize',
  13032. value: function updateItemSize(newSize) {
  13033. this.itemSize = newSize || '100%';
  13034. this.refresh();
  13035. }
  13036. }, {
  13037. key: 'toggleBlocker',
  13038. value: function toggleBlocker(block) {
  13039. this.blocker.style.pointerEvents = block ? 'auto' : 'none';
  13040. }
  13041. }, {
  13042. key: '_canConsumeGesture',
  13043. value: function _canConsumeGesture(gesture) {
  13044. var d = gesture.direction;
  13045. var isFirst = this._scroll === 0 && !this.isOverScrollable();
  13046. var isLast = this._scroll === this.maxScroll && !this.isOverScrollable();
  13047. return this.isVertical() ? d === 'down' && !isFirst || d === 'up' && !isLast : d === 'right' && !isFirst || d === 'left' && !isLast;
  13048. }
  13049. }, {
  13050. key: 'onDragStart',
  13051. value: function onDragStart(event) {
  13052. var _this5 = this;
  13053. this._ignoreDrag = event.consumed || !util$1.isValidGesture(event);
  13054. if (!this._ignoreDrag) {
  13055. var consume = event.consume;
  13056. event.consume = function () {
  13057. consume && consume();_this5._ignoreDrag = true;
  13058. };
  13059. if (this._canConsumeGesture(event.gesture)) {
  13060. var startX = event.gesture.center && event.gesture.center.clientX || 0,
  13061. distFromEdge = this.getBubbleWidth() || 0,
  13062. start = function start() {
  13063. consume && consume();
  13064. event.consumed = true;
  13065. _this5._started = true; // Avoid starting drag from outside
  13066. _this5.shouldBlock && _this5.toggleBlocker(true);
  13067. _this5._setSwiping(true);
  13068. util$1.iosPreventScroll(_this5._gestureDetector);
  13069. };
  13070. // Let parent elements consume the gesture or consume it right away
  13071. startX < distFromEdge || startX > this.targetSize - distFromEdge ? setImmediate(function () {
  13072. return !_this5._ignoreDrag && start();
  13073. }) : start();
  13074. }
  13075. }
  13076. }
  13077. }, {
  13078. key: 'onDrag',
  13079. value: function onDrag(event) {
  13080. if (!event.gesture || this._ignoreDrag || !this._started) {
  13081. return;
  13082. }
  13083. this._continued = true; // Fix for random 'dragend' without 'drag'
  13084. event.stopPropagation();
  13085. this._scrollTo(this._scroll - this._getDelta(event), { throttle: true });
  13086. }
  13087. }, {
  13088. key: 'onDragEnd',
  13089. value: function onDragEnd(event) {
  13090. this._started = false;
  13091. if (!event.gesture || this._ignoreDrag || !this._continued) {
  13092. this._ignoreDrag = true; // onDragEnd might fire before onDragStart's setImmediate
  13093. return;
  13094. }
  13095. this._continued = false;
  13096. event.stopPropagation();
  13097. var scroll = this._scroll - this._getDelta(event);
  13098. var normalizedScroll = this._normalizeScroll(scroll);
  13099. scroll === normalizedScroll ? this._startMomentumScroll(scroll, event) : this._killOverScroll(normalizedScroll);
  13100. this.shouldBlock && this.toggleBlocker(false);
  13101. }
  13102. }, {
  13103. key: '_startMomentumScroll',
  13104. value: function _startMomentumScroll(scroll, event) {
  13105. var velocity = this._getVelocity(event),
  13106. matchesDirection = event.gesture.interimDirection === this.dM.dir[this._getDelta(event) < 0 ? 0 : 1];
  13107. var nextScroll = this._getAutoScroll(scroll, velocity, matchesDirection);
  13108. var duration = Math.abs(nextScroll - scroll) / (velocity + 0.01) / 1000;
  13109. duration = Math.min(.25, Math.max(.1, duration));
  13110. this._changeTo(nextScroll, { swipe: true, animationOptions: { duration: duration, timing: 'cubic-bezier(.4, .7, .5, 1)' } });
  13111. }
  13112. }, {
  13113. key: '_killOverScroll',
  13114. value: function _killOverScroll(scroll) {
  13115. var _this6 = this;
  13116. this._scroll = scroll;
  13117. var direction = this.dM.dir[Number(scroll > 0)];
  13118. var killOverScroll = function killOverScroll() {
  13119. return _this6._changeTo(scroll, { animationOptions: { duration: .4, timing: 'cubic-bezier(.1, .4, .1, 1)' } });
  13120. };
  13121. this.overScrollHook({ direction: direction, killOverScroll: killOverScroll }) || killOverScroll();
  13122. }
  13123. }, {
  13124. key: '_changeTo',
  13125. value: function _changeTo(scroll) {
  13126. var _this7 = this;
  13127. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13128. var e = { activeIndex: this.getActiveIndex(scroll), lastActiveIndex: this._lastActiveIndex, swipe: options.swipe || false };
  13129. var change = e.activeIndex !== e.lastActiveIndex;
  13130. var canceled = change ? this.preChangeHook(e) : false;
  13131. this._scroll = canceled ? this._offset + e.lastActiveIndex * this.itemNumSize : scroll;
  13132. this._lastActiveIndex = canceled ? e.lastActiveIndex : e.activeIndex;
  13133. return this._scrollTo(this._scroll, options).then(function () {
  13134. if (scroll === _this7._scroll && !canceled) {
  13135. _this7._setSwiping(false);
  13136. change && _this7.postChangeHook(e);
  13137. } else if (options.reject) {
  13138. _this7._setSwiping(false);
  13139. return Promise.reject('Canceled');
  13140. }
  13141. });
  13142. }
  13143. }, {
  13144. key: '_scrollTo',
  13145. value: function _scrollTo(scroll) {
  13146. var _this8 = this;
  13147. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13148. if (options.throttle) {
  13149. var ratio = 0.35;
  13150. if (scroll < 0) {
  13151. scroll = this.isOverScrollable() ? Math.round(scroll * ratio) : 0;
  13152. } else {
  13153. var maxScroll = this.maxScroll;
  13154. if (maxScroll < scroll) {
  13155. scroll = this.isOverScrollable() ? maxScroll + Math.round((scroll - maxScroll) * ratio) : maxScroll;
  13156. }
  13157. }
  13158. }
  13159. var opt = options.animation === 'none' ? {} : options.animationOptions;
  13160. this.scrollHook && this.itemNumSize > 0 && this.scrollHook((scroll / this.itemNumSize).toFixed(2), options.animationOptions || {});
  13161. return new Promise(function (resolve) {
  13162. return Animit(_this8.target).queue({ transform: _this8._getTransform(scroll) }, opt).play(resolve);
  13163. });
  13164. }
  13165. }, {
  13166. key: '_getAutoScroll',
  13167. value: function _getAutoScroll(scroll, velocity, matchesDirection) {
  13168. var max = this.maxScroll,
  13169. offset = this._offset,
  13170. size = this.itemNumSize;
  13171. if (!this.isAutoScrollable()) {
  13172. return Math.max(0, Math.min(max, scroll));
  13173. }
  13174. var arr = [];
  13175. for (var s = offset; s < max; s += size) {
  13176. arr.push(s);
  13177. }
  13178. arr.push(max);
  13179. arr = arr.sort(function (left, right) {
  13180. return Math.abs(left - scroll) - Math.abs(right - scroll);
  13181. }).filter(function (item, pos) {
  13182. return !pos || item !== arr[pos - 1];
  13183. });
  13184. var result = arr[0];
  13185. var lastScroll = this._lastActiveIndex * size + offset;
  13186. var scrollRatio = Math.abs(scroll - lastScroll) / size;
  13187. if (scrollRatio <= this.getAutoScrollRatio(matchesDirection, velocity, size)) {
  13188. result = lastScroll;
  13189. } else {
  13190. if (scrollRatio < 1.0 && arr[0] === lastScroll && arr.length > 1) {
  13191. result = arr[1];
  13192. }
  13193. }
  13194. return Math.max(0, Math.min(max, result));
  13195. }
  13196. }, {
  13197. key: '_reset',
  13198. value: function _reset() {
  13199. this._targetSize = this._itemNumSize = undefined;
  13200. }
  13201. }, {
  13202. key: '_normalizeScroll',
  13203. value: function _normalizeScroll(scroll) {
  13204. return Math.max(Math.min(scroll, this.maxScroll), 0);
  13205. }
  13206. }, {
  13207. key: 'refresh',
  13208. value: function refresh() {
  13209. this._reset();
  13210. this._updateLayout();
  13211. if (util$1.isInteger(this._scroll)) {
  13212. var scroll = this._normalizeScroll(this._scroll);
  13213. scroll !== this._scroll ? this._killOverScroll(scroll) : this._changeTo(scroll);
  13214. } else {
  13215. this._setupInitialIndex();
  13216. }
  13217. this.refreshHook();
  13218. }
  13219. }, {
  13220. key: '_getDelta',
  13221. value: function _getDelta(event) {
  13222. return event.gesture['delta' + this.dM.axis];
  13223. }
  13224. }, {
  13225. key: '_getVelocity',
  13226. value: function _getVelocity(event) {
  13227. return event.gesture['velocity' + this.dM.axis];
  13228. }
  13229. }, {
  13230. key: '_getTransform',
  13231. value: function _getTransform(scroll) {
  13232. return 'translate3d(' + this.dM.t3d[0] + -scroll + this.dM.t3d[1] + ')';
  13233. }
  13234. }, {
  13235. key: '_updateLayout',
  13236. value: function _updateLayout() {
  13237. this.dM = directionMap[this.isVertical() ? 'vertical' : 'horizontal'];
  13238. this.target.classList.toggle('ons-swiper-target--vertical', this.isVertical());
  13239. for (var c = this.target.children[0]; c; c = c.nextElementSibling) {
  13240. c.style[this.dM.size.toLowerCase()] = this.itemSize;
  13241. }
  13242. if (this.isCentered()) {
  13243. this._offset = (this.targetSize - this.itemNumSize) / -2 || 0;
  13244. }
  13245. }
  13246. }, {
  13247. key: 'itemCount',
  13248. get: function get$$1() {
  13249. return this.target.children.length;
  13250. }
  13251. }, {
  13252. key: 'itemNumSize',
  13253. get: function get$$1() {
  13254. if (typeof this._itemNumSize !== 'number' || this._itemNumSize !== this._itemNumSize) {
  13255. this._itemNumSize = this._calculateItemSize();
  13256. }
  13257. return this._itemNumSize;
  13258. }
  13259. }, {
  13260. key: 'maxScroll',
  13261. get: function get$$1() {
  13262. var max = this.itemCount * this.itemNumSize - this.targetSize;
  13263. return Math.ceil(max < 0 ? 0 : max); // Need to return an integer value.
  13264. }
  13265. }, {
  13266. key: 'targetSize',
  13267. get: function get$$1() {
  13268. if (!this._targetSize) {
  13269. this._targetSize = this.target['offset' + this.dM.size];
  13270. }
  13271. return this._targetSize;
  13272. }
  13273. }]);
  13274. return Swiper;
  13275. }();
  13276. /*
  13277. Copyright 2013-2015 ASIAL CORPORATION
  13278. Licensed under the Apache License, Version 2.0 (the "License");
  13279. you may not use this file except in compliance with the License.
  13280. You may obtain a copy of the License at
  13281. http://www.apache.org/licenses/LICENSE-2.0
  13282. Unless required by applicable law or agreed to in writing, software
  13283. distributed under the License is distributed on an "AS IS" BASIS,
  13284. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13285. See the License for the specific language governing permissions and
  13286. limitations under the License.
  13287. */
  13288. /**
  13289. * @element ons-carousel
  13290. * @category carousel
  13291. * @description
  13292. * [en]
  13293. * Carousel component. A carousel can be used to display several items in the same space.
  13294. *
  13295. * The component supports displaying content both horizontally and vertically. The user can scroll through the items by dragging and it can also be controller programmatically.
  13296. * [/en]
  13297. * [ja][/ja]
  13298. * @codepen xbbzOQ
  13299. * @tutorial vanilla/Reference/carousel
  13300. * @seealso ons-carousel-item
  13301. * [en]`<ons-carousel-item>` component[/en]
  13302. * [ja]ons-carousel-itemコンポーネント[/ja]
  13303. * @example
  13304. * <ons-carousel style="width: 100%; height: 200px">
  13305. * <ons-carousel-item>
  13306. * ...
  13307. * </ons-carousel-item>
  13308. * <ons-carousel-item>
  13309. * ...
  13310. * </ons-carousel-item>
  13311. * </ons-carousel>
  13312. */
  13313. var CarouselElement = function (_BaseElement) {
  13314. inherits(CarouselElement, _BaseElement);
  13315. /**
  13316. * @event postchange
  13317. * @description
  13318. * [en]Fired just after the current carousel item has changed.[/en]
  13319. * [ja]現在表示しているカルーセルの要素が変わった時に発火します。[/ja]
  13320. * @param {Object} event
  13321. * [en]Event object.[/en]
  13322. * [ja]イベントオブジェクトです。[/ja]
  13323. * @param {Object} event.carousel
  13324. * [en]Carousel object.[/en]
  13325. * [ja]イベントが発火したCarouselオブジェクトです。[/ja]
  13326. * @param {Number} event.activeIndex
  13327. * [en]Current active index.[/en]
  13328. * [ja]現在アクティブになっている要素のインデックス。[/ja]
  13329. * @param {Number} event.lastActiveIndex
  13330. * [en]Previous active index.[/en]
  13331. * [ja]以前アクティブだった要素のインデックス。[/ja]
  13332. */
  13333. /**
  13334. * @event refresh
  13335. * @description
  13336. * [en]Fired when the carousel has been refreshed.[/en]
  13337. * [ja]カルーセルが更新された時に発火します。[/ja]
  13338. * @param {Object} event
  13339. * [en]Event object.[/en]
  13340. * [ja]イベントオブジェクトです。[/ja]
  13341. * @param {Object} event.carousel
  13342. * [en]Carousel object.[/en]
  13343. * [ja]イベントが発火したCarouselオブジェクトです。[/ja]
  13344. */
  13345. /**
  13346. * @event overscroll
  13347. * @description
  13348. * [en]Fired when the carousel has been overscrolled.[/en]
  13349. * [ja]カルーセルがオーバースクロールした時に発火します。[/ja]
  13350. * @param {Object} event
  13351. * [en]Event object.[/en]
  13352. * [ja]イベントオブジェクトです。[/ja]
  13353. * @param {Object} event.carousel
  13354. * [en]Fired when the carousel has been refreshed.[/en]
  13355. * [ja]カルーセルが更新された時に発火します。[/ja]
  13356. * @param {Number} event.activeIndex
  13357. * [en]Current active index.[/en]
  13358. * [ja]現在アクティブになっている要素のインデックス。[/ja]
  13359. * @param {String} event.direction
  13360. * [en]Can be one of either "up", "down", "left" or "right".[/en]
  13361. * [ja]オーバースクロールされた方向が得られます。"up", "down", "left", "right"のいずれかの方向が渡されます。[/ja]
  13362. * @param {Function} event.waitToReturn
  13363. * [en]Takes a <code>Promise</code> object as an argument. The carousel will not scroll back until the promise has been resolved or rejected.[/en]
  13364. * [ja]この関数はPromiseオブジェクトを引数として受け取ります。渡したPromiseオブジェクトがresolveされるかrejectされるまで、カルーセルはスクロールバックしません。[/ja]
  13365. */
  13366. /**
  13367. * @attribute direction
  13368. * @type {String}
  13369. * @description
  13370. * [en]The direction of the carousel. Can be either "horizontal" or "vertical". Default is "horizontal".[/en]
  13371. * [ja]カルーセルの方向を指定します。"horizontal"か"vertical"を指定できます。"horizontal"がデフォルト値です。[/ja]
  13372. */
  13373. /**
  13374. * @attribute fullscreen
  13375. * @description
  13376. * [en]If this attribute is set the carousel will cover the whole screen.[/en]
  13377. * [ja]この属性があると、absoluteポジションを使ってカルーセルが自動的に画面いっぱいに広がります。[/ja]
  13378. */
  13379. /**
  13380. * @attribute overscrollable
  13381. * @description
  13382. * [en]If this attribute is set the carousel will be scrollable over the edge. It will bounce back when released.[/en]
  13383. * [ja]この属性がある時、タッチやドラッグで端までスクロールした時に、バウンドするような効果が当たります。[/ja]
  13384. */
  13385. /**
  13386. * @attribute centered
  13387. * @description
  13388. * [en]If this attribute is set the carousel then the selected item will be in the center of the carousel instead of the beginning. Useful only when the items are smaller than the carousel. [/en]
  13389. * [ja]この属性がある時、選んでいるons-carousel-itemはカルーセルの真ん中へ行きます。項目がカルーセルよりも小さい場合にのみ、これは便利です。[/ja]
  13390. */
  13391. /**
  13392. * @attribute item-width
  13393. * @type {String}
  13394. * @description
  13395. * [en]ons-carousel-item's width. Only works when the direction is set to "horizontal".[/en]
  13396. * [ja]ons-carousel-itemの幅を指定します。この属性は、direction属性に"horizontal"を指定した時のみ有効になります。[/ja]
  13397. */
  13398. /**
  13399. * @attribute item-height
  13400. * @type {String}
  13401. * @description
  13402. * [en]ons-carousel-item's height. Only works when the direction is set to "vertical".[/en]
  13403. * [ja]ons-carousel-itemの高さを指定します。この属性は、direction属性に"vertical"を指定した時のみ有効になります。[/ja]
  13404. */
  13405. /**
  13406. * @attribute auto-scroll
  13407. * @description
  13408. * [en]If this attribute is set the carousel will be automatically scrolled to the closest item border when released.[/en]
  13409. * [ja]この属性がある時、一番近いcarousel-itemの境界まで自動的にスクロールするようになります。[/ja]
  13410. */
  13411. /**
  13412. * @attribute auto-scroll-ratio
  13413. * @type {Number}
  13414. * @description
  13415. * [en]A number between 0.0 and 1.0 that specifies how much the user must drag the carousel in order for it to auto scroll to the next item.[/en]
  13416. * [ja]0.0から1.0までの値を指定します。カルーセルの要素をどれぐらいの割合までドラッグすると次の要素に自動的にスクロールするかを指定します。[/ja]
  13417. */
  13418. /**
  13419. * @attribute swipeable
  13420. * @description
  13421. * [en]If this attribute is set the carousel can be scrolled by drag or swipe.[/en]
  13422. * [ja]この属性がある時、カルーセルをスワイプやドラッグで移動できるようになります。[/ja]
  13423. */
  13424. /**
  13425. * @attribute disabled
  13426. * @description
  13427. * [en]If this attribute is set the carousel is disabled.[/en]
  13428. * [ja]この属性がある時、dragやtouchやswipeを受け付けなくなります。[/ja]
  13429. */
  13430. /**
  13431. * @attribute initial-index
  13432. * @initonly
  13433. * @default 0
  13434. * @type {Number}
  13435. * @description
  13436. * [en]Specify the index of the ons-carousel-item to show initially. Default is 0.[/en]
  13437. * [ja]最初に表示するons-carousel-itemを0始まりのインデックスで指定します。デフォルト値は 0 です。[/ja]
  13438. */
  13439. /**
  13440. * @attribute auto-refresh
  13441. * @description
  13442. * [en]When this attribute is set the carousel will automatically refresh when the number of child nodes change.[/en]
  13443. * [ja]この属性がある時、子要素の数が変わるとカルーセルは自動的に更新されるようになります。[/ja]
  13444. */
  13445. /**
  13446. * @attribute animation
  13447. * @type {String}
  13448. * @description
  13449. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  13450. * [ja][/ja]
  13451. */
  13452. /**
  13453. * @attribute animation-options
  13454. * @type {Expression}
  13455. * @description
  13456. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  13457. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。例:{duration: 0.2, delay: 1, timing: 'ease-in'}[/ja]
  13458. */
  13459. function CarouselElement() {
  13460. classCallCheck(this, CarouselElement);
  13461. var _this = possibleConstructorReturn(this, (CarouselElement.__proto__ || Object.getPrototypeOf(CarouselElement)).call(this));
  13462. contentReady(_this, function () {
  13463. return _this._compile();
  13464. });
  13465. return _this;
  13466. }
  13467. createClass(CarouselElement, [{
  13468. key: '_compile',
  13469. value: function _compile() {
  13470. var target = this.children[0] && this.children[0].tagName !== 'ONS-CAROUSEL-ITEM' && this.children[0] || document.createElement('div');
  13471. if (!target.parentNode) {
  13472. while (this.firstChild) {
  13473. target.appendChild(this.firstChild);
  13474. }
  13475. this.appendChild(target);
  13476. }
  13477. !this.children[1] && this.appendChild(document.createElement('div'));
  13478. this.appendChild = this.appendChild.bind(target);
  13479. this.insertBefore = this.insertBefore.bind(target);
  13480. }
  13481. }, {
  13482. key: 'connectedCallback',
  13483. value: function connectedCallback() {
  13484. var _this2 = this;
  13485. if (!this._swiper) {
  13486. this._swiper = new Swiper({
  13487. getElement: function getElement() {
  13488. return _this2;
  13489. },
  13490. getInitialIndex: function getInitialIndex() {
  13491. return _this2.getAttribute('initial-index');
  13492. },
  13493. getAutoScrollRatio: function getAutoScrollRatio() {
  13494. return _this2.autoScrollRatio;
  13495. },
  13496. isVertical: function isVertical() {
  13497. return _this2.vertical;
  13498. },
  13499. isOverScrollable: function isOverScrollable() {
  13500. return _this2.overscrollable;
  13501. },
  13502. isCentered: function isCentered() {
  13503. return _this2.centered;
  13504. },
  13505. isAutoScrollable: function isAutoScrollable() {
  13506. return _this2.autoScroll;
  13507. },
  13508. itemSize: this.itemSize,
  13509. overScrollHook: this._onOverScroll.bind(this),
  13510. preChangeHook: this._onChange.bind(this, 'prechange'),
  13511. postChangeHook: this._onChange.bind(this, 'postchange'),
  13512. refreshHook: this._onRefresh.bind(this),
  13513. scrollHook: function scrollHook() {
  13514. return _this2._onSwipe && _this2._onSwipe.apply(_this2, arguments);
  13515. }
  13516. });
  13517. contentReady(this, function () {
  13518. return _this2._swiper.init({
  13519. swipeable: _this2.hasAttribute('swipeable'),
  13520. autoRefresh: _this2.hasAttribute('auto-refresh')
  13521. });
  13522. });
  13523. }
  13524. }
  13525. }, {
  13526. key: 'disconnectedCallback',
  13527. value: function disconnectedCallback() {
  13528. if (this._swiper && this._swiper.initialized) {
  13529. this._swiper.dispose();
  13530. this._swiper = null;
  13531. }
  13532. }
  13533. }, {
  13534. key: 'attributeChangedCallback',
  13535. value: function attributeChangedCallback(name, last, current) {
  13536. if (!this._swiper) {
  13537. return;
  13538. }
  13539. switch (name) {
  13540. case 'swipeable':
  13541. this._swiper.updateSwipeable(this.hasAttribute('swipeable'));
  13542. break;
  13543. case 'auto-refresh':
  13544. this._swiper.updateAutoRefresh(this.hasAttribute('auto-refresh'));
  13545. break;
  13546. case 'item-height':
  13547. this.vertical && this._swiper.updateItemSize(this.itemSize);
  13548. break;
  13549. case 'item-width':
  13550. this.vertical || this._swiper.updateItemSize(this.itemSize);
  13551. break;
  13552. case 'direction':
  13553. this._swiper.refresh();
  13554. }
  13555. }
  13556. }, {
  13557. key: '_show',
  13558. value: function _show() {
  13559. this._swiper.show();
  13560. }
  13561. }, {
  13562. key: '_hide',
  13563. value: function _hide() {
  13564. this._swiper.hide();
  13565. }
  13566. }, {
  13567. key: '_onOverScroll',
  13568. value: function _onOverScroll(_ref) {
  13569. var direction = _ref.direction,
  13570. killOverScroll = _ref.killOverScroll;
  13571. var waitForAction = false;
  13572. util$1.triggerElementEvent(this, 'overscroll', {
  13573. carousel: this,
  13574. activeIndex: this.getActiveIndex(),
  13575. direction: direction,
  13576. waitToReturn: function waitToReturn(promise) {
  13577. waitForAction = true;
  13578. promise.then(killOverScroll);
  13579. }
  13580. });
  13581. return waitForAction;
  13582. }
  13583. }, {
  13584. key: '_onChange',
  13585. value: function _onChange(eventName, _ref2) {
  13586. var activeIndex = _ref2.activeIndex,
  13587. lastActiveIndex = _ref2.lastActiveIndex;
  13588. util$1.triggerElementEvent(this, eventName, { carousel: this, activeIndex: activeIndex, lastActiveIndex: lastActiveIndex });
  13589. }
  13590. }, {
  13591. key: '_onRefresh',
  13592. value: function _onRefresh() {
  13593. util$1.triggerElementEvent(this, 'refresh', { carousel: this });
  13594. }
  13595. /**
  13596. * @method setActiveIndex
  13597. * @signature setActiveIndex(index, [options])
  13598. * @param {Number} index
  13599. * [en]The index that the carousel should be set to.[/en]
  13600. * [ja]carousel要素のインデックスを指定します。[/ja]
  13601. * @param {Object} [options]
  13602. * [en]Parameter object.[/en]
  13603. * [ja][/ja]
  13604. * @param {Function} [options.callback]
  13605. * [en]A function that will be called after the animation is finished.[/en]
  13606. * [ja][/ja]
  13607. * @param {String} [options.animation]
  13608. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  13609. * [ja][/ja]
  13610. * @param {Object} [options.animationOptions]
  13611. * [en]An object that can be used to specify duration, delay and timing function of the animation.[/en]
  13612. * [ja][/ja]
  13613. * @description
  13614. * [en]Specify the index of the `<ons-carousel-item>` to show.[/en]
  13615. * [ja]表示するons-carousel-itemをindexで指定します。[/ja]
  13616. * @return {Promise}
  13617. * [en]Resolves to the carousel element.[/en]
  13618. * [ja][/ja]
  13619. */
  13620. }, {
  13621. key: 'setActiveIndex',
  13622. value: function setActiveIndex(index) {
  13623. var _this3 = this;
  13624. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13625. options = _extends({
  13626. animation: this.getAttribute('animation'),
  13627. animationOptions: this.hasAttribute('animation-options') ? util$1.animationOptionsParse(this.getAttribute('animation-options')) : { duration: .3, timing: 'cubic-bezier(.4, .7, .5, 1)' }
  13628. }, options);
  13629. return this._swiper.setActiveIndex(index, options).then(function () {
  13630. options.callback instanceof Function && options.callback(_this3);
  13631. return Promise.resolve(_this3);
  13632. });
  13633. }
  13634. /**
  13635. * @method getActiveIndex
  13636. * @signature getActiveIndex()
  13637. * @return {Number}
  13638. * [en]The current carousel item index.[/en]
  13639. * [ja]現在表示しているカルーセル要素のインデックスが返されます。[/ja]
  13640. * @description
  13641. * [en]Returns the index of the currently visible `<ons-carousel-item>`.[/en]
  13642. * [ja]現在表示されているons-carousel-item要素のインデックスを返します。[/ja]
  13643. */
  13644. }, {
  13645. key: 'getActiveIndex',
  13646. value: function getActiveIndex() {
  13647. return this._swiper.getActiveIndex();
  13648. }
  13649. /**
  13650. * @method next
  13651. * @signature next([options])
  13652. * @param {Object} [options]
  13653. * [en]Parameter object.[/en]
  13654. * [ja][/ja]
  13655. * @param {Function} [options.callback]
  13656. * [en]A function that will be executed after the animation has finished.[/en]
  13657. * [ja][/ja]
  13658. * @param {String} [options.animation]
  13659. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  13660. * [ja][/ja]
  13661. * @param {Object} [options.animationOptions]
  13662. * [en]An object that can be used to specify the duration, delay and timing function of the animation.[/en]
  13663. * [ja][/ja]
  13664. * @return {Promise}
  13665. * [en]Resolves to the carousel element[/en]
  13666. * [ja][/ja]
  13667. * @description
  13668. * [en]Show next `<ons-carousel-item>`.[/en]
  13669. * [ja]次のons-carousel-itemを表示します。[/ja]
  13670. */
  13671. }, {
  13672. key: 'next',
  13673. value: function next(options) {
  13674. return this.setActiveIndex(this.getActiveIndex() + 1, options);
  13675. }
  13676. /**
  13677. * @method prev
  13678. * @signature prev([options])
  13679. * @param {Object} [options]
  13680. * [en]Parameter object.[/en]
  13681. * [ja][/ja]
  13682. * @param {Function} [options.callback]
  13683. * [en]A function that will be executed after the animation has finished.[/en]
  13684. * [ja][/ja]
  13685. * @param {String} [options.animation]
  13686. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  13687. * [ja][/ja]
  13688. * @param {Object} [options.animationOptions]
  13689. * [en]An object that can be used to specify the duration, delay and timing function of the animation.[/en]
  13690. * [ja][/ja]
  13691. * @return {Promise}
  13692. * [en]Resolves to the carousel element[/en]
  13693. * [ja][/ja]
  13694. * @description
  13695. * [en]Show previous `<ons-carousel-item>`.[/en]
  13696. * [ja]前のons-carousel-itemを表示します。[/ja]
  13697. */
  13698. }, {
  13699. key: 'prev',
  13700. value: function prev(options) {
  13701. return this.setActiveIndex(this.getActiveIndex() - 1, options);
  13702. }
  13703. /**
  13704. * @method first
  13705. * @signature first()
  13706. * @param {Object} [options]
  13707. * [en]Parameter object.[/en]
  13708. * [ja][/ja]
  13709. * @param {Function} [options.callback]
  13710. * [en]A function that will be executed after the animation has finished.[/en]
  13711. * [ja][/ja]
  13712. * @param {String} [options.animation]
  13713. * [en]If this is set to `"none"`, the transitions will not be animated.[/en]
  13714. * [ja][/ja]
  13715. * @param {Object} [options.animationOptions]
  13716. * [en]An object that can be used to specify the duration, delay and timing function of the animation.[/en]
  13717. * [ja][/ja]
  13718. * @return {Promise}
  13719. * [en]Resolves to the carousel element[/en]
  13720. * [ja][/ja]
  13721. * @description
  13722. * [en]Show first `<ons-carousel-item>`.[/en]
  13723. * [ja]最初のons-carousel-itemを表示します。[/ja]
  13724. */
  13725. }, {
  13726. key: 'first',
  13727. value: function first(options) {
  13728. return this.setActiveIndex(0, options);
  13729. }
  13730. /**
  13731. * @method last
  13732. * @signature last()
  13733. * @param {Object} [options]
  13734. * [en]Parameter object.[/en]
  13735. * [ja][/ja]
  13736. * @param {Function} [options.callback]
  13737. * [en]A function that will be executed after the animation has finished.[/en]
  13738. * [ja][/ja]
  13739. * @param {String} [options.animation]
  13740. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  13741. * [ja][/ja]
  13742. * @param {Object} [options.animationOptions]
  13743. * [en]An object that can be used to specify the duration, delay and timing function of the animation.[/en]
  13744. * [ja][/ja]
  13745. * @return {Promise}
  13746. * [en]Resolves to the carousel element[/en]
  13747. * [ja]Resolves to the carousel element[/ja]
  13748. * @description
  13749. * [en]Show last ons-carousel item.[/en]
  13750. * [ja]最後のons-carousel-itemを表示します。[/ja]
  13751. */
  13752. }, {
  13753. key: 'last',
  13754. value: function last(options) {
  13755. this.setActiveIndex(Math.max(this.itemCount - 1, 0), options);
  13756. }
  13757. /**
  13758. * @method refresh
  13759. * @signature refresh()
  13760. * @description
  13761. * [en]Update the layout of the carousel. Used when adding `<ons-carousel-items>` dynamically or to automatically adjust the size.[/en]
  13762. * [ja]レイアウトや内部の状態を最新のものに更新します。ons-carousel-itemを動的に増やしたり、ons-carouselの大きさを動的に変える際に利用します。[/ja]
  13763. */
  13764. }, {
  13765. key: 'refresh',
  13766. value: function refresh() {
  13767. this._swiper.refresh();
  13768. }
  13769. /**
  13770. * @property itemCount
  13771. * @readonly
  13772. * @type {Number}
  13773. * @description
  13774. * [en]The number of carousel items.[/en]
  13775. * [ja]カルーセル要素の数です。[/ja]
  13776. */
  13777. }, {
  13778. key: 'itemCount',
  13779. get: function get$$1() {
  13780. return this._swiper.itemCount;
  13781. }
  13782. /**
  13783. * @property swipeable
  13784. * @type {Boolean}
  13785. * @description
  13786. * [en]true if the carousel is swipeable.[/en]
  13787. * [ja]swipeableであればtrueを返します。[/ja]
  13788. */
  13789. }, {
  13790. key: 'swipeable',
  13791. get: function get$$1() {
  13792. return this.hasAttribute('swipeable');
  13793. },
  13794. set: function set$$1(value) {
  13795. return util$1.toggleAttribute(this, 'swipeable', value);
  13796. }
  13797. /**
  13798. * @property onSwipe
  13799. * @type {Function}
  13800. * @description
  13801. * [en]Hook called whenever the user slides the carousel. It gets a decimal index and an animationOptions object as arguments.[/en]
  13802. * [ja][/ja]
  13803. */
  13804. }, {
  13805. key: 'onSwipe',
  13806. get: function get$$1() {
  13807. return this._onSwipe;
  13808. },
  13809. set: function set$$1(value) {
  13810. if (value && !(value instanceof Function)) {
  13811. util$1.throw('"onSwipe" must be a function');
  13812. }
  13813. this._onSwipe = value;
  13814. }
  13815. /**
  13816. * @property autoScroll
  13817. * @type {Boolean}
  13818. * @description
  13819. * [en]true if auto scroll is enabled.[/en]
  13820. * [ja]オートスクロールが有効であればtrueを返します。[/ja]
  13821. */
  13822. }, {
  13823. key: 'autoScroll',
  13824. get: function get$$1() {
  13825. return this.hasAttribute('auto-scroll');
  13826. },
  13827. set: function set$$1(value) {
  13828. return util$1.toggleAttribute(this, 'auto-scroll', value);
  13829. }
  13830. }, {
  13831. key: 'vertical',
  13832. get: function get$$1() {
  13833. return this.getAttribute('direction') === 'vertical';
  13834. }
  13835. }, {
  13836. key: 'itemSize',
  13837. get: function get$$1() {
  13838. var itemSizeAttr = (this.getAttribute('item-' + (this.vertical ? 'height' : 'width')) || '').trim();
  13839. return itemSizeAttr.match(/^\d+(px|%)$/) ? itemSizeAttr : '100%';
  13840. }
  13841. /**
  13842. * @property autoScrollRatio
  13843. * @type {Number}
  13844. * @description
  13845. * [en]The current auto scroll ratio. [/en]
  13846. * [ja]現在のオートスクロールのratio値。[/ja]
  13847. */
  13848. }, {
  13849. key: 'autoScrollRatio',
  13850. get: function get$$1() {
  13851. return parseFloat(this.getAttribute('auto-scroll-ratio'));
  13852. },
  13853. set: function set$$1(ratio) {
  13854. this.setAttribute('auto-scroll-ratio', ratio);
  13855. }
  13856. /**
  13857. * @property disabled
  13858. * @type {Boolean}
  13859. * @description
  13860. * [en]Whether the carousel is disabled or not.[/en]
  13861. * [ja]無効化されている場合に`true`。[/ja]
  13862. */
  13863. }, {
  13864. key: 'disabled',
  13865. get: function get$$1() {
  13866. return this.hasAttribute('disabled');
  13867. },
  13868. set: function set$$1(value) {
  13869. return util$1.toggleAttribute(this, 'disabled', value);
  13870. }
  13871. /**
  13872. * @property overscrollable
  13873. * @type {Boolean}
  13874. * @description
  13875. * [en]Whether the carousel is overscrollable or not.[/en]
  13876. * [ja]overscrollできればtrueを返します。[/ja]
  13877. */
  13878. }, {
  13879. key: 'overscrollable',
  13880. get: function get$$1() {
  13881. return this.hasAttribute('overscrollable');
  13882. },
  13883. set: function set$$1(value) {
  13884. return util$1.toggleAttribute(this, 'overscrollable', value);
  13885. }
  13886. /**
  13887. * @property centered
  13888. * @type {Boolean}
  13889. * @description
  13890. * [en]Whether the carousel is centered or not.[/en]
  13891. * [ja]centered状態になっていればtrueを返します。[/ja]
  13892. */
  13893. }, {
  13894. key: 'centered',
  13895. get: function get$$1() {
  13896. return this.hasAttribute('centered');
  13897. },
  13898. set: function set$$1(value) {
  13899. return util$1.toggleAttribute(this, 'centered', value);
  13900. }
  13901. }], [{
  13902. key: 'observedAttributes',
  13903. get: function get$$1() {
  13904. return ['swipeable', 'auto-refresh', 'direction', 'item-height', 'item-width'];
  13905. }
  13906. }, {
  13907. key: 'events',
  13908. get: function get$$1() {
  13909. return ['postchange', 'refresh', 'overscroll'];
  13910. }
  13911. }]);
  13912. return CarouselElement;
  13913. }(BaseElement);
  13914. onsElements.Carousel = CarouselElement;
  13915. customElements.define('ons-carousel', CarouselElement);
  13916. /*
  13917. Copyright 2013-2015 ASIAL CORPORATION
  13918. Licensed under the Apache License, Version 2.0 (the "License");
  13919. you may not use this file except in compliance with the License.
  13920. You may obtain a copy of the License at
  13921. http://www.apache.org/licenses/LICENSE-2.0
  13922. Unless required by applicable law or agreed to in writing, software
  13923. distributed under the License is distributed on an "AS IS" BASIS,
  13924. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13925. See the License for the specific language governing permissions and
  13926. limitations under the License.
  13927. */
  13928. /**
  13929. * @element ons-col
  13930. * @category grid
  13931. * @description
  13932. * [en]Represents a column in the grid system. Use with `<ons-row>` to layout components.[/en]
  13933. * [ja]グリッドシステムにて列を定義します。ons-rowとともに使用し、コンポーネントのレイアウトに利用します。[/ja]
  13934. * @note
  13935. * [en]For Android 4.3 and earlier, and iOS6 and earlier, when using mixed alignment with ons-row and ons-column, they may not be displayed correctly. You can use only one alignment.[/en]
  13936. * [ja]Android 4.3以前、もしくはiOS 6以前のOSの場合、ons-rowとons-columnを組み合わせた場合に描画が崩れる場合があります。[/ja]
  13937. * @codepen GgujC {wide}
  13938. * @guide theming.html [en]Layouting guide[/en][ja]レイアウト機能[/ja]
  13939. * @seealso ons-row
  13940. * [en]The `<ons-row>` component is the parent of `<ons-col>`.[/en]
  13941. * [ja]ons-rowコンポーネント[/ja]
  13942. * @example
  13943. * <ons-row>
  13944. * <ons-col width="50px"><ons-icon icon="fa-twitter"></ons-icon></ons-col>
  13945. * <ons-col>Text</ons-col>
  13946. * </ons-row>
  13947. */
  13948. /**
  13949. * @attribute vertical-align
  13950. * @type {String}
  13951. * @description
  13952. * [en]Vertical alignment of the column. Valid values are "top", "center", and "bottom".[/en]
  13953. * [ja]縦の配置を指定する。"top", "center", "bottom"のいずれかを指定します。[/ja]
  13954. */
  13955. /**
  13956. * @attribute width
  13957. * @type {String}
  13958. * @description
  13959. * [en]The width of the column. Valid values are css width values ("10%", "50px").[/en]
  13960. * [ja]カラムの横幅を指定する。パーセントもしくはピクセルで指定します(10%や50px)。[/ja]
  13961. */
  13962. var ColElement = function (_BaseElement) {
  13963. inherits(ColElement, _BaseElement);
  13964. function ColElement() {
  13965. classCallCheck(this, ColElement);
  13966. var _this = possibleConstructorReturn(this, (ColElement.__proto__ || Object.getPrototypeOf(ColElement)).call(this));
  13967. if (_this.getAttribute('width')) {
  13968. _this._updateWidth();
  13969. }
  13970. return _this;
  13971. }
  13972. createClass(ColElement, [{
  13973. key: 'attributeChangedCallback',
  13974. value: function attributeChangedCallback(name, last, current) {
  13975. if (name === 'width') {
  13976. this._updateWidth();
  13977. }
  13978. }
  13979. }, {
  13980. key: '_updateWidth',
  13981. value: function _updateWidth() {
  13982. var width = this.getAttribute('width');
  13983. if (!width) {
  13984. styler.clear(this, 'flex maxWidth');
  13985. } else {
  13986. width = width.trim().match(/^\d+$/) ? width + '%' : width;
  13987. styler(this, {
  13988. flex: '0 0 ' + width,
  13989. maxWidth: width
  13990. });
  13991. }
  13992. }
  13993. }], [{
  13994. key: 'observedAttributes',
  13995. get: function get$$1() {
  13996. return ['width'];
  13997. }
  13998. }]);
  13999. return ColElement;
  14000. }(BaseElement);
  14001. onsElements.Col = ColElement;
  14002. customElements.define('ons-col', ColElement);
  14003. /*
  14004. Copyright 2013-2015 ASIAL CORPORATION
  14005. Licensed under the Apache License, Version 2.0 (the "License");
  14006. you may not use this file except in compliance with the License.
  14007. You may obtain a copy of the License at
  14008. http://www.apache.org/licenses/LICENSE-2.0
  14009. Unless required by applicable law or agreed to in writing, software
  14010. distributed under the License is distributed on an "AS IS" BASIS,
  14011. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14012. See the License for the specific language governing permissions and
  14013. limitations under the License.
  14014. */
  14015. var DialogAnimator = function (_BaseAnimator) {
  14016. inherits(DialogAnimator, _BaseAnimator);
  14017. function DialogAnimator() {
  14018. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14019. _ref$timing = _ref.timing,
  14020. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  14021. _ref$delay = _ref.delay,
  14022. delay = _ref$delay === undefined ? 0 : _ref$delay,
  14023. _ref$duration = _ref.duration,
  14024. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  14025. classCallCheck(this, DialogAnimator);
  14026. return possibleConstructorReturn(this, (DialogAnimator.__proto__ || Object.getPrototypeOf(DialogAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  14027. }
  14028. /**
  14029. * @param {HTMLElement} dialog
  14030. * @param {Function} done
  14031. */
  14032. createClass(DialogAnimator, [{
  14033. key: 'show',
  14034. value: function show(dialog, done) {
  14035. done();
  14036. }
  14037. /**
  14038. * @param {HTMLElement} dialog
  14039. * @param {Function} done
  14040. */
  14041. }, {
  14042. key: 'hide',
  14043. value: function hide(dialog, done) {
  14044. done();
  14045. }
  14046. }]);
  14047. return DialogAnimator;
  14048. }(BaseAnimator);
  14049. /**
  14050. * Android style animator for dialog.
  14051. */
  14052. var AndroidDialogAnimator = function (_DialogAnimator) {
  14053. inherits(AndroidDialogAnimator, _DialogAnimator);
  14054. function AndroidDialogAnimator() {
  14055. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14056. _ref2$timing = _ref2.timing,
  14057. timing = _ref2$timing === undefined ? 'ease-in-out' : _ref2$timing,
  14058. _ref2$delay = _ref2.delay,
  14059. delay = _ref2$delay === undefined ? 0 : _ref2$delay,
  14060. _ref2$duration = _ref2.duration,
  14061. duration = _ref2$duration === undefined ? 0.3 : _ref2$duration;
  14062. classCallCheck(this, AndroidDialogAnimator);
  14063. return possibleConstructorReturn(this, (AndroidDialogAnimator.__proto__ || Object.getPrototypeOf(AndroidDialogAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  14064. }
  14065. /**
  14066. * @param {Object} dialog
  14067. * @param {Function} callback
  14068. */
  14069. createClass(AndroidDialogAnimator, [{
  14070. key: 'show',
  14071. value: function show(dialog, callback) {
  14072. callback = callback ? callback : function () {};
  14073. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 0 }, { opacity: 1 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -60%, 0)', opacity: 0 }, { transform: 'translate3d(-50%, -50%, 0)', opacity: 1 }).queue(function (done) {
  14074. callback();
  14075. done();
  14076. }));
  14077. }
  14078. /**
  14079. * @param {Object} dialog
  14080. * @param {Function} callback
  14081. */
  14082. }, {
  14083. key: 'hide',
  14084. value: function hide(dialog, callback) {
  14085. callback = callback ? callback : function () {};
  14086. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0)', opacity: 1 }, { transform: 'translate3d(-50%, -60%, 0)', opacity: 0 }).queue(function (done) {
  14087. callback();
  14088. done();
  14089. }));
  14090. }
  14091. }]);
  14092. return AndroidDialogAnimator;
  14093. }(DialogAnimator);
  14094. /**
  14095. * iOS style animator for dialog.
  14096. */
  14097. var IOSDialogAnimator = function (_DialogAnimator2) {
  14098. inherits(IOSDialogAnimator, _DialogAnimator2);
  14099. function IOSDialogAnimator() {
  14100. var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14101. _ref3$timing = _ref3.timing,
  14102. timing = _ref3$timing === undefined ? 'ease-in-out' : _ref3$timing,
  14103. _ref3$delay = _ref3.delay,
  14104. delay = _ref3$delay === undefined ? 0 : _ref3$delay,
  14105. _ref3$duration = _ref3.duration,
  14106. duration = _ref3$duration === undefined ? 0.2 : _ref3$duration;
  14107. classCallCheck(this, IOSDialogAnimator);
  14108. var _this3 = possibleConstructorReturn(this, (IOSDialogAnimator.__proto__ || Object.getPrototypeOf(IOSDialogAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  14109. _this3.bodyHeight = document.body.clientHeight; // avoid Forced Synchronous Layout
  14110. return _this3;
  14111. }
  14112. /**
  14113. * @param {Object} dialog
  14114. * @param {Function} callback
  14115. */
  14116. createClass(IOSDialogAnimator, [{
  14117. key: 'show',
  14118. value: function show(dialog, callback) {
  14119. callback = callback ? callback : function () {};
  14120. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 0 }, { opacity: 1 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, ' + (this.bodyHeight / 2.0 - 1) + 'px, 0)' }, { transform: 'translate3d(-50%, -50%, 0)' }).queue(function (done) {
  14121. callback();
  14122. done();
  14123. }));
  14124. }
  14125. /**
  14126. * @param {Object} dialog
  14127. * @param {Function} callback
  14128. */
  14129. }, {
  14130. key: 'hide',
  14131. value: function hide(dialog, callback) {
  14132. callback = callback ? callback : function () {};
  14133. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0)' }, { transform: 'translate3d(-50%, ' + (this.bodyHeight / 2.0 - 1) + 'px, 0)' }).queue(function (done) {
  14134. callback();
  14135. done();
  14136. }));
  14137. }
  14138. }]);
  14139. return IOSDialogAnimator;
  14140. }(DialogAnimator);
  14141. /**
  14142. * Slide animator for dialog.
  14143. */
  14144. var SlideDialogAnimator = function (_DialogAnimator3) {
  14145. inherits(SlideDialogAnimator, _DialogAnimator3);
  14146. function SlideDialogAnimator() {
  14147. var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14148. _ref4$timing = _ref4.timing,
  14149. timing = _ref4$timing === undefined ? 'cubic-bezier(.1, .7, .4, 1)' : _ref4$timing,
  14150. _ref4$delay = _ref4.delay,
  14151. delay = _ref4$delay === undefined ? 0 : _ref4$delay,
  14152. _ref4$duration = _ref4.duration,
  14153. duration = _ref4$duration === undefined ? 0.2 : _ref4$duration;
  14154. classCallCheck(this, SlideDialogAnimator);
  14155. var _this4 = possibleConstructorReturn(this, (SlideDialogAnimator.__proto__ || Object.getPrototypeOf(SlideDialogAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  14156. _this4.bodyHeight = document.body.clientHeight; // avoid Forced Synchronous Layout
  14157. return _this4;
  14158. }
  14159. /**
  14160. * @param {Object} dialog
  14161. * @param {Function} callback
  14162. */
  14163. createClass(SlideDialogAnimator, [{
  14164. key: 'show',
  14165. value: function show(dialog, callback) {
  14166. callback = callback ? callback : function () {};
  14167. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 0 }, { opacity: 1 }), Animit(dialog._dialog, this.def).default(
  14168. // FIXME: This should avoid Forced Synchronous Layout. Otherwise, fade animation of mask will be broken.
  14169. { transform: 'translate3d(-50%, ' + (-(this.bodyHeight / 2.0) + 1 - dialog._dialog.clientHeight) + 'px, 0)' }, { transform: 'translate3d(-50%, -50%, 0)' }).queue(function (done) {
  14170. callback();
  14171. done();
  14172. }));
  14173. }
  14174. /**
  14175. * @param {Object} dialog
  14176. * @param {Function} callback
  14177. */
  14178. }, {
  14179. key: 'hide',
  14180. value: function hide(dialog, callback) {
  14181. callback = callback ? callback : function () {};
  14182. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0)' },
  14183. // FIXME: This should avoid Forced Synchronous Layout. Otherwise, fade animation of mask will be broken.
  14184. { transform: 'translate3d(-50%, ' + (-(this.bodyHeight / 2.0) + 1 - dialog._dialog.clientHeight) + 'px, 0)' }).queue(function (done) {
  14185. callback();
  14186. done();
  14187. }));
  14188. }
  14189. }]);
  14190. return SlideDialogAnimator;
  14191. }(DialogAnimator);
  14192. /*
  14193. Copyright 2013-2015 ASIAL CORPORATION
  14194. Licensed under the Apache License, Version 2.0 (the "License");
  14195. you may not use this file except in compliance with the License.
  14196. You may obtain a copy of the License at
  14197. http://www.apache.org/licenses/LICENSE-2.0
  14198. Unless required by applicable law or agreed to in writing, software
  14199. distributed under the License is distributed on an "AS IS" BASIS,
  14200. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14201. See the License for the specific language governing permissions and
  14202. limitations under the License.
  14203. */
  14204. var scheme$6 = {
  14205. '.dialog': 'dialog--*',
  14206. '.dialog-container': 'dialog-container--*',
  14207. '.dialog-mask': 'dialog-mask--*'
  14208. };
  14209. var _animatorDict$2 = {
  14210. 'default': function _default() {
  14211. return platform.isAndroid() ? AndroidDialogAnimator : IOSDialogAnimator;
  14212. },
  14213. 'slide': SlideDialogAnimator,
  14214. 'none': DialogAnimator
  14215. };
  14216. /**
  14217. * @element ons-dialog
  14218. * @category dialog
  14219. * @description
  14220. * [en]
  14221. * Dialog that is displayed on top of current screen. As opposed to the `<ons-alert-dialog>` element, this component can contain any kind of content.
  14222. *
  14223. * To use the element it can either be attached directly to the `<body>` element or dynamically created from a template using the `ons.createDialog(template)` utility function and the `<template>` tag.
  14224. *
  14225. * The dialog is useful for displaying menus, additional information or to ask the user to make a decision.
  14226. *
  14227. * It will automatically be displayed as Material Design when running on an Android device.
  14228. * [/en]
  14229. * [ja][/ja]
  14230. * @modifier material
  14231. * [en]Display a Material Design dialog.[/en]
  14232. * [ja]マテリアルデザインのダイアログを表示します。[/ja]
  14233. * @codepen zxxaGa
  14234. * @tutorial vanilla/Reference/dialog
  14235. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  14236. * @seealso ons-alert-dialog
  14237. * [en]`<ons-alert-dialog>` component[/en]
  14238. * [ja]ons-alert-dialogコンポーネント[/ja]
  14239. * @seealso ons-popover
  14240. * [en]`<ons-popover>` component[/en]
  14241. * [ja]ons-popoverコンポーネント[/ja]
  14242. * @seealso ons-modal
  14243. * [en]`<ons-modal>` component[/en]
  14244. * [ja]ons-modalコンポーネント[/ja]
  14245. * @example
  14246. * <ons-dialog id="dialog">
  14247. * <p>This is a dialog!</p>
  14248. * </ons-dialog>
  14249. *
  14250. * <script>
  14251. * document.getElementById('dialog').show();
  14252. * </script>
  14253. */
  14254. var DialogElement = function (_BaseDialogElement) {
  14255. inherits(DialogElement, _BaseDialogElement);
  14256. /**
  14257. * @event preshow
  14258. * @description
  14259. * [en]Fired just before the dialog is displayed.[/en]
  14260. * [ja]ダイアログが表示される直前に発火します。[/ja]
  14261. * @param {Object} event [en]Event object.[/en]
  14262. * @param {Object} event.dialog
  14263. * [en]Component object.[/en]
  14264. * [ja]コンポーネントのオブジェクト。[/ja]
  14265. * @param {Function} event.cancel
  14266. * [en]Execute this function to stop the dialog from being shown.[/en]
  14267. * [ja]この関数を実行すると、ダイアログの表示がキャンセルされます。[/ja]
  14268. */
  14269. /**
  14270. * @event postshow
  14271. * @description
  14272. * [en]Fired just after the dialog is displayed.[/en]
  14273. * [ja]ダイアログが表示された直後に発火します。[/ja]
  14274. * @param {Object} event [en]Event object.[/en]
  14275. * @param {Object} event.dialog
  14276. * [en]Component object.[/en]
  14277. * [ja]コンポーネントのオブジェクト。[/ja]
  14278. */
  14279. /**
  14280. * @event prehide
  14281. * @description
  14282. * [en]Fired just before the dialog is hidden.[/en]
  14283. * [ja]ダイアログが隠れる直前に発火します。[/ja]
  14284. * @param {Object} event [en]Event object.[/en]
  14285. * @param {Object} event.dialog
  14286. * [en]Component object.[/en]
  14287. * [ja]コンポーネントのオブジェクト。[/ja]
  14288. * @param {Function} event.cancel
  14289. * [en]Execute this function to stop the dialog from being hidden.[/en]
  14290. * [ja]この関数を実行すると、ダイアログの非表示がキャンセルされます。[/ja]
  14291. */
  14292. /**
  14293. * @event posthide
  14294. * @description
  14295. * [en]Fired just after the dialog is hidden.[/en]
  14296. * [ja]ダイアログが隠れた後に発火します。[/ja]
  14297. * @param {Object} event [en]Event object.[/en]
  14298. * @param {Object} event.dialog
  14299. * [en]Component object.[/en]
  14300. * [ja]コンポーネントのオブジェクト。[/ja]
  14301. */
  14302. /**
  14303. * @attribute modifier
  14304. * @type {String}
  14305. * @description
  14306. * [en]The appearance of the dialog.[/en]
  14307. * [ja]ダイアログの表現を指定します。[/ja]
  14308. */
  14309. /**
  14310. * @attribute cancelable
  14311. * @description
  14312. * [en]If this attribute is set the dialog can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  14313. * [ja][/ja]
  14314. */
  14315. /**
  14316. * @attribute disabled
  14317. * @description
  14318. * [en]If this attribute is set the dialog is disabled.[/en]
  14319. * [ja]この属性がある時、ダイアログはdisabled状態になります。[/ja]
  14320. */
  14321. /**
  14322. * @attribute animation
  14323. * @type {String}
  14324. * @default default
  14325. * @description
  14326. * [en]The animation used when showing and hiding the dialog. Can be either `"none"` or `"default"`.[/en]
  14327. * [ja]ダイアログを表示する際のアニメーション名を指定します。"none"もしくは"default"を指定できます。[/ja]
  14328. */
  14329. /**
  14330. * @attribute animation-options
  14331. * @type {Expression}
  14332. * @description
  14333. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  14334. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`[/ja]
  14335. */
  14336. /**
  14337. * @attribute mask-color
  14338. * @type {String}
  14339. * @default rgba(0, 0, 0, 0.2)
  14340. * @description
  14341. * [en]Color of the background mask. Default is `"rgba(0, 0, 0, 0.2)"`.[/en]
  14342. * [ja]背景のマスクの色を指定します。"rgba(0, 0, 0, 0.2)"がデフォルト値です。[/ja]
  14343. */
  14344. function DialogElement() {
  14345. classCallCheck(this, DialogElement);
  14346. var _this = possibleConstructorReturn(this, (DialogElement.__proto__ || Object.getPrototypeOf(DialogElement)).call(this));
  14347. contentReady(_this, function () {
  14348. return _this._compile();
  14349. });
  14350. return _this;
  14351. }
  14352. createClass(DialogElement, [{
  14353. key: '_updateAnimatorFactory',
  14354. value: function _updateAnimatorFactory() {
  14355. return new AnimatorFactory({
  14356. animators: _animatorDict$2,
  14357. baseClass: DialogAnimator,
  14358. baseClassName: 'DialogAnimator',
  14359. defaultAnimation: this.getAttribute('animation')
  14360. });
  14361. }
  14362. }, {
  14363. key: '_compile',
  14364. value: function _compile() {
  14365. autoStyle.prepare(this);
  14366. this.style.display = 'none';
  14367. this.style.zIndex = 10001;
  14368. /* Expected result:
  14369. * <ons-dialog>
  14370. * <div class="dialog-mask"></div>
  14371. * <div class="dialog">
  14372. * <div class="dialog-container">...</div>
  14373. * </div>
  14374. * </ons-dialog>
  14375. */
  14376. if (!this._dialog) {
  14377. var dialog = document.createElement('div');
  14378. dialog.classList.add('dialog');
  14379. var container = document.createElement('div');
  14380. container.classList.add('dialog-container');
  14381. while (this.firstChild) {
  14382. container.appendChild(this.firstChild);
  14383. }
  14384. dialog.appendChild(container);
  14385. this.appendChild(dialog);
  14386. }
  14387. if (!this._mask) {
  14388. var mask = document.createElement('div');
  14389. mask.classList.add('dialog-mask');
  14390. this.insertBefore(mask, this.firstChild);
  14391. }
  14392. this._dialog.style.zIndex = 20001;
  14393. this._mask.style.zIndex = 20000;
  14394. this.setAttribute('status-bar-fill', '');
  14395. ModifierUtil.initModifier(this, this._scheme);
  14396. }
  14397. /**
  14398. * @property onDeviceBackButton
  14399. * @type {Object}
  14400. * @description
  14401. * [en]Back-button handler.[/en]
  14402. * [ja]バックボタンハンドラ。[/ja]
  14403. */
  14404. /**
  14405. * @method show
  14406. * @signature show([options])
  14407. * @param {Object} [options]
  14408. * [en]Parameter object.[/en]
  14409. * [ja]オプションを指定するオブジェクト。[/ja]
  14410. * @param {String} [options.animation]
  14411. * [en]Animation name. Available animations are `"none"` and `"slide"`.[/en]
  14412. * [ja]アニメーション名を指定します。"none", "slide"のいずれかを指定します。[/ja]
  14413. * @param {String} [options.animationOptions]
  14414. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  14415. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}` [/ja]
  14416. * @param {Function} [options.callback]
  14417. * [en]This function is called after the dialog has been revealed.[/en]
  14418. * [ja]ダイアログが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  14419. * @description
  14420. * [en]Show the dialog.[/en]
  14421. * [ja]ダイアログを開きます。[/ja]
  14422. * @return {Promise} Resolves to the displayed element.
  14423. */
  14424. /**
  14425. * @method hide
  14426. * @signature hide([options])
  14427. * @param {Object} [options]
  14428. * [en]Parameter object.[/en]
  14429. * [ja]オプションを指定するオブジェクト。[/ja]
  14430. * @param {String} [options.animation]
  14431. * [en]Animation name. Available animations are `"none"` and `"slide"`.[/en]
  14432. * [ja]アニメーション名を指定します。"none", "slide"のいずれかを指定できます。[/ja]
  14433. * @param {String} [options.animationOptions]
  14434. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  14435. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`[/ja]
  14436. * @param {Function} [options.callback]
  14437. * [en]This functions is called after the dialog has been hidden.[/en]
  14438. * [ja]ダイアログが隠れた後に呼び出される関数オブジェクトを指定します。[/ja]
  14439. * @description
  14440. * [en]Hide the dialog.[/en]
  14441. * [ja]ダイアログを閉じます。[/ja]
  14442. * @return {Promise}
  14443. * [en]Resolves to the hidden element[/en]
  14444. * [ja][/ja]
  14445. */
  14446. /**
  14447. * @property visible
  14448. * @readonly
  14449. * @type {Boolean}
  14450. * @description
  14451. * [en]Whether the dialog is visible or not.[/en]
  14452. * [ja]要素が見える場合に`true`。[/ja]
  14453. */
  14454. /**
  14455. * @property disabled
  14456. * @type {Boolean}
  14457. * @description
  14458. * [en]Whether the dialog is disabled or not.[/en]
  14459. * [ja]無効化されている場合に`true`。[/ja]
  14460. */
  14461. /**
  14462. * @property cancelable
  14463. * @type {Boolean}
  14464. * @description
  14465. * [en]Whether the dialog is cancelable or not. A cancelable dialog can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  14466. * [ja][/ja]
  14467. */
  14468. /**
  14469. * @param {String} name
  14470. * @param {DialogAnimator} Animator
  14471. */
  14472. }, {
  14473. key: '_scheme',
  14474. get: function get$$1() {
  14475. return scheme$6;
  14476. }
  14477. }, {
  14478. key: '_mask',
  14479. get: function get$$1() {
  14480. return util$1.findChild(this, '.dialog-mask');
  14481. }
  14482. }, {
  14483. key: '_dialog',
  14484. get: function get$$1() {
  14485. return util$1.findChild(this, '.dialog');
  14486. }
  14487. }], [{
  14488. key: 'registerAnimator',
  14489. value: function registerAnimator(name, Animator) {
  14490. if (!(Animator.prototype instanceof DialogAnimator)) {
  14491. util$1.throwAnimator('Dialog');
  14492. }
  14493. _animatorDict$2[name] = Animator;
  14494. }
  14495. }, {
  14496. key: 'animators',
  14497. get: function get$$1() {
  14498. return _animatorDict$2;
  14499. }
  14500. }, {
  14501. key: 'DialogAnimator',
  14502. get: function get$$1() {
  14503. return DialogAnimator;
  14504. }
  14505. }]);
  14506. return DialogElement;
  14507. }(BaseDialogElement);
  14508. onsElements.Dialog = DialogElement;
  14509. customElements.define('ons-dialog', DialogElement);
  14510. /*
  14511. Copyright 2013-2015 ASIAL CORPORATION
  14512. Licensed under the Apache License, Version 2.0 (the "License");
  14513. you may not use this file except in compliance with the License.
  14514. You may obtain a copy of the License at
  14515. http://www.apache.org/licenses/LICENSE-2.0
  14516. Unless required by applicable law or agreed to in writing, software
  14517. distributed under the License is distributed on an "AS IS" BASIS,
  14518. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14519. See the License for the specific language governing permissions and
  14520. limitations under the License.
  14521. */
  14522. var defaultClassName$3 = 'fab';
  14523. var scheme$7 = {
  14524. '': 'fab--*',
  14525. '.fab__icon': 'fab--*__icon'
  14526. };
  14527. /**
  14528. * @element ons-fab
  14529. * @category form
  14530. * @description
  14531. * [en]
  14532. * The Floating action button is a circular button defined in the [Material Design specification](https://www.google.com/design/spec/components/buttons-floating-action-button.html). They are often used to promote the primary action of the app.
  14533. *
  14534. * It can be displayed either as an inline element or in one of the corners. Normally it will be positioned in the lower right corner of the screen.
  14535. * [/en]
  14536. * [ja][/ja]
  14537. * @tutorial vanilla/Reference/fab
  14538. * @modifier mini
  14539. * [en]Makes the `ons-fab` smaller.[/en]
  14540. * [ja][/ja]
  14541. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja]Information about cross platform styling[/ja]
  14542. * @seealso ons-speed-dial
  14543. * [en]The `<ons-speed-dial>` component is a Floating action button that displays a menu when tapped.[/en]
  14544. * [ja][/ja]
  14545. */
  14546. var FabElement = function (_BaseElement) {
  14547. inherits(FabElement, _BaseElement);
  14548. /**
  14549. * @attribute modifier
  14550. * @type {String}
  14551. * @description
  14552. * [en]The appearance of the button.[/en]
  14553. * [ja]ボタンの表現を指定します。[/ja]
  14554. */
  14555. /**
  14556. * @attribute ripple
  14557. * @description
  14558. * [en]If this attribute is defined, the button will have a ripple effect when tapped.[/en]
  14559. * [ja][/ja]
  14560. */
  14561. /**
  14562. * @attribute position
  14563. * @type {String}
  14564. * @description
  14565. * [en]The position of the button. Should be a string like `"bottom right"` or `"top left"`. If this attribute is not defined it will be displayed as an inline element.[/en]
  14566. * [ja][/ja]
  14567. */
  14568. /**
  14569. * @attribute disabled
  14570. * @description
  14571. * [en]Specify if button should be disabled.[/en]
  14572. * [ja]ボタンを無効化する場合は指定します。[/ja]
  14573. */
  14574. function FabElement() {
  14575. classCallCheck(this, FabElement);
  14576. // The following statements can be executed before contentReady
  14577. // since these do not access the children
  14578. var _this = possibleConstructorReturn(this, (FabElement.__proto__ || Object.getPrototypeOf(FabElement)).call(this));
  14579. _this._hide();
  14580. _this.classList.add(defaultClassName$3);
  14581. contentReady(_this, function () {
  14582. _this._compile();
  14583. });
  14584. return _this;
  14585. }
  14586. createClass(FabElement, [{
  14587. key: '_compile',
  14588. value: function _compile() {
  14589. autoStyle.prepare(this);
  14590. if (!util$1.findChild(this, '.fab__icon')) {
  14591. var content = document.createElement('span');
  14592. content.classList.add('fab__icon');
  14593. util$1.arrayFrom(this.childNodes).forEach(function (element) {
  14594. if (!element.tagName || element.tagName.toLowerCase() !== 'ons-ripple') {
  14595. content.appendChild(element);
  14596. }
  14597. });
  14598. this.appendChild(content);
  14599. }
  14600. this._updateRipple();
  14601. ModifierUtil.initModifier(this, scheme$7);
  14602. this._updatePosition();
  14603. }
  14604. }, {
  14605. key: 'connectedCallback',
  14606. value: function connectedCallback() {
  14607. var _this2 = this;
  14608. setImmediate(function () {
  14609. return _this2._show();
  14610. });
  14611. }
  14612. }, {
  14613. key: 'attributeChangedCallback',
  14614. value: function attributeChangedCallback(name, last, current) {
  14615. switch (name) {
  14616. case 'class':
  14617. util$1.restoreClass(this, defaultClassName$3, scheme$7);
  14618. break;
  14619. case 'modifier':
  14620. ModifierUtil.onModifierChanged(last, current, this, scheme$7);
  14621. break;
  14622. case 'ripple':
  14623. this._updateRipple();
  14624. break;
  14625. case 'position':
  14626. this._updatePosition();
  14627. break;
  14628. }
  14629. }
  14630. }, {
  14631. key: '_show',
  14632. value: function _show() {
  14633. if (!this._manuallyHidden) {
  14634. // if user has not called ons-fab.hide()
  14635. this._toggle(true);
  14636. }
  14637. }
  14638. }, {
  14639. key: '_hide',
  14640. value: function _hide() {
  14641. var _this3 = this;
  14642. setImmediate(function () {
  14643. return _this3._toggle(false);
  14644. });
  14645. }
  14646. }, {
  14647. key: '_updateRipple',
  14648. value: function _updateRipple() {
  14649. util$1.updateRipple(this);
  14650. }
  14651. }, {
  14652. key: '_updatePosition',
  14653. value: function _updatePosition() {
  14654. var position = this.getAttribute('position');
  14655. this.classList.remove('fab--top__left', 'fab--bottom__right', 'fab--bottom__left', 'fab--top__right', 'fab--top__center', 'fab--bottom__center');
  14656. switch (position) {
  14657. case 'top right':
  14658. case 'right top':
  14659. this.classList.add('fab--top__right');
  14660. break;
  14661. case 'top left':
  14662. case 'left top':
  14663. this.classList.add('fab--top__left');
  14664. break;
  14665. case 'bottom right':
  14666. case 'right bottom':
  14667. this.classList.add('fab--bottom__right');
  14668. break;
  14669. case 'bottom left':
  14670. case 'left bottom':
  14671. this.classList.add('fab--bottom__left');
  14672. break;
  14673. case 'center top':
  14674. case 'top center':
  14675. this.classList.add('fab--top__center');
  14676. break;
  14677. case 'center bottom':
  14678. case 'bottom center':
  14679. this.classList.add('fab--bottom__center');
  14680. break;
  14681. default:
  14682. break;
  14683. }
  14684. }
  14685. /**
  14686. * @method show
  14687. * @signature show()
  14688. * @description
  14689. * [en]Show the floating action button.[/en]
  14690. * [ja][/ja]
  14691. */
  14692. }, {
  14693. key: 'show',
  14694. value: function show() {
  14695. this.toggle(true);
  14696. }
  14697. /**
  14698. * @method hide
  14699. * @signature hide()
  14700. * @description
  14701. * [en]Hide the floating action button.[/en]
  14702. * [ja][/ja]
  14703. */
  14704. }, {
  14705. key: 'hide',
  14706. value: function hide() {
  14707. this.toggle(false);
  14708. }
  14709. /**
  14710. * @method toggle
  14711. * @signature toggle()
  14712. * @description
  14713. * [en]Toggle the visibility of the button.[/en]
  14714. * [ja][/ja]
  14715. */
  14716. }, {
  14717. key: 'toggle',
  14718. value: function toggle() {
  14719. var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !this.visible;
  14720. this._manuallyHidden = !action;
  14721. this._toggle(action);
  14722. }
  14723. }, {
  14724. key: '_toggle',
  14725. value: function _toggle() {
  14726. var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !this.visible;
  14727. var isBottom = (this.getAttribute('position') || '').indexOf('bottom') >= 0;
  14728. var translate = isBottom ? 'translate3d(0px, -' + (util$1.globals.fabOffset || 0) + 'px, 0px)' : '';
  14729. styler(this, { transform: translate + ' scale(' + Number(action) + ')' });
  14730. }
  14731. /**
  14732. * @property disabled
  14733. * @type {Boolean}
  14734. * @description
  14735. * [en]Whether the element is disabled or not.[/en]
  14736. * [ja]無効化されている場合に`true`。[/ja]
  14737. */
  14738. }, {
  14739. key: 'disabled',
  14740. set: function set$$1(value) {
  14741. return util$1.toggleAttribute(this, 'disabled', value);
  14742. },
  14743. get: function get$$1() {
  14744. return this.hasAttribute('disabled');
  14745. }
  14746. /**
  14747. * @property visible
  14748. * @readonly
  14749. * @type {Boolean}
  14750. * @description
  14751. * [en]Whether the element is visible or not.[/en]
  14752. * [ja]要素が見える場合に`true`。[/ja]
  14753. */
  14754. }, {
  14755. key: 'visible',
  14756. get: function get$$1() {
  14757. return this.style.transform.indexOf('scale(0)') === -1 && this.style.display !== 'none';
  14758. }
  14759. }], [{
  14760. key: 'observedAttributes',
  14761. get: function get$$1() {
  14762. return ['modifier', 'ripple', 'position', 'class'];
  14763. }
  14764. }]);
  14765. return FabElement;
  14766. }(BaseElement);
  14767. onsElements.Fab = FabElement;
  14768. customElements.define('ons-fab', FabElement);
  14769. /*
  14770. Copyright 2013-2015 ASIAL CORPORATION
  14771. Licensed under the Apache License, Version 2.0 (the "License");
  14772. you may not use this file except in compliance with the License.
  14773. You may obtain a copy of the License at
  14774. http://www.apache.org/licenses/LICENSE-2.0
  14775. Unless required by applicable law or agreed to in writing, software
  14776. distributed under the License is distributed on an "AS IS" BASIS,
  14777. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14778. See the License for the specific language governing permissions and
  14779. limitations under the License.
  14780. */
  14781. /**
  14782. * @element ons-gesture-detector
  14783. * @category gesture
  14784. * @description
  14785. * [en]
  14786. * Component to detect finger gestures within the wrapped element. Following gestures are supported:
  14787. * - Drag gestures: `drag`, `dragleft`, `dragright`, `dragup`, `dragdown`
  14788. * - Hold gestures: `hold`, `release`
  14789. * - Swipe gestures: `swipe`, `swipeleft`, `swiperight`, `swipeup`, `swipedown`
  14790. * - Tap gestures: `tap`, `doubletap`
  14791. * - Pinch gestures: `pinch`, `pinchin`, `pinchout`
  14792. * - Other gestures: `touch`, `transform`, `rotate`
  14793. * [/en]
  14794. * [ja]要素内のジェスチャー操作を検知します。詳しくはガイドを参照してください。[/ja]
  14795. * @guide features.html#gesture-detection
  14796. * [en]Detecting finger gestures[/en]
  14797. * [ja]ジェスチャー操作の検知[/ja]
  14798. * @example
  14799. * <ons-gesture-detector>
  14800. * <div id="detect-area" style="width: 100px; height: 100px;">
  14801. * Swipe Here
  14802. * </div>
  14803. * </ons-gesture-detector>
  14804. *
  14805. * <script>
  14806. * document.addEventListener('swipeleft', function(event) {
  14807. * if (event.target.matches('#detect-area')) {
  14808. * console.log('Swipe left is detected.');
  14809. * }
  14810. * });
  14811. * </script>
  14812. */
  14813. var GestureDetectorElement = function (_BaseElement) {
  14814. inherits(GestureDetectorElement, _BaseElement);
  14815. function GestureDetectorElement() {
  14816. classCallCheck(this, GestureDetectorElement);
  14817. var _this = possibleConstructorReturn(this, (GestureDetectorElement.__proto__ || Object.getPrototypeOf(GestureDetectorElement)).call(this));
  14818. _this._gestureDetector = new GestureDetector(_this, { passive: true });
  14819. return _this;
  14820. }
  14821. return GestureDetectorElement;
  14822. }(BaseElement);
  14823. onsElements.GestureDetector = GestureDetectorElement;
  14824. customElements.define('ons-gesture-detector', GestureDetectorElement);
  14825. /*
  14826. Copyright 2013-2015 ASIAL CORPORATION
  14827. Licensed under the Apache License, Version 2.0 (the "License");
  14828. you may not use this file except in compliance with the License.
  14829. You may obtain a copy of the License at
  14830. http://www.apache.org/licenses/LICENSE-2.0
  14831. Unless required by applicable law or agreed to in writing, software
  14832. distributed under the License is distributed on an "AS IS" BASIS,
  14833. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14834. See the License for the specific language governing permissions and
  14835. limitations under the License.
  14836. */
  14837. var autoPrefix = 'fa'; // FIXME: To be removed in v3
  14838. /**
  14839. * @element ons-icon
  14840. * @category visual
  14841. * @description
  14842. * [en]
  14843. * Displays an icon. The following icon suites are available:
  14844. *
  14845. * * [Font Awesome](https://fortawesome.github.io/Font-Awesome/)
  14846. * * [Ionicons](http://ionicons.com/)
  14847. * * [Material Design Iconic Font](http://zavoloklom.github.io/material-design-iconic-font/)
  14848. * [/en]
  14849. * [ja][/ja]
  14850. * @codepen xAhvg
  14851. * @tutorial vanilla/Reference/icon
  14852. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja][/ja]
  14853. * @guide appsize.html#removing-icon-packs [en]Removing icon packs.[/en][ja][/ja]
  14854. * @guide faq.html#how-can-i-use-custom-icon-packs [en]Adding custom icon packs.[/en][ja][/ja]
  14855. * @example
  14856. * <ons-icon
  14857. * icon="md-car"
  14858. * size="20px"
  14859. * style="color: red">
  14860. * </ons-icon>
  14861. *
  14862. * <ons-button>
  14863. * <ons-icon icon="md-car"></ons-icon>
  14864. * Car
  14865. * </ons-button>
  14866. */
  14867. var IconElement = function (_BaseElement) {
  14868. inherits(IconElement, _BaseElement);
  14869. /**
  14870. * @attribute icon
  14871. * @type {String}
  14872. * @description
  14873. * [en]
  14874. * The icon name. `"md-"` prefix for Material Icons, `"fa-"` for Font Awesome and `"ion-"` prefix for Ionicons.
  14875. *
  14876. * See all available icons on the element description (at the top).
  14877. *
  14878. * Icons can also be styled based on modifier presence. Add comma-separated icons with `"modifierName:"` prefix.
  14879. *
  14880. * The code `<ons-icon icon="ion-edit, material:md-edit"></ons-icon>` will display `"md-edit"` for Material Design and `"ion-edit"` as the default icon.
  14881. *
  14882. * `fa-` prefix is added automatically if none is provided. Check [See also](#seealso) section for more information.
  14883. * [/en]
  14884. * [ja][/ja]
  14885. */
  14886. /**
  14887. * @attribute size
  14888. * @type {String}
  14889. * @description
  14890. * [en]
  14891. * The sizes of the icon. Valid values are lg, 2x, 3x, 4x, 5x, or in the size in pixels.
  14892. * Icons can also be styled based on modifier presence. Add comma-separated icons with `"modifierName:"` prefix.
  14893. *
  14894. * The code:
  14895. *
  14896. * ```
  14897. * <ons-icon
  14898. * icon="ion-edit"
  14899. * size="32px, material:24px">
  14900. * </ons-icon>
  14901. * ```
  14902. *
  14903. * will render as a `24px` icon if the `"material"` modifier is present and `32px` otherwise.
  14904. * [/en]
  14905. * [ja][/ja]
  14906. */
  14907. /**
  14908. * @attribute rotate
  14909. * @type {Number}
  14910. * @description
  14911. * [en]Number of degrees to rotate the icon. Valid values are 90, 180 and 270.[/en]
  14912. * [ja]アイコンを回転して表示します。90, 180, 270から指定できます。[/ja]
  14913. */
  14914. /**
  14915. * @attribute fixed-width
  14916. * @type {Boolean}
  14917. * @default false
  14918. * @description
  14919. * [en]When used in a list, you want the icons to have the same width so that they align vertically by defining this attribute.[/en]
  14920. * [ja][/ja]
  14921. */
  14922. /**
  14923. * @attribute spin
  14924. * @description
  14925. * [en]Specify whether the icon should be spinning.[/en]
  14926. * [ja]アイコンを回転するかどうかを指定します。[/ja]
  14927. */
  14928. function IconElement() {
  14929. classCallCheck(this, IconElement);
  14930. var _this = possibleConstructorReturn(this, (IconElement.__proto__ || Object.getPrototypeOf(IconElement)).call(this));
  14931. contentReady(_this, function () {
  14932. _this._compile();
  14933. });
  14934. return _this;
  14935. }
  14936. createClass(IconElement, [{
  14937. key: 'attributeChangedCallback',
  14938. value: function attributeChangedCallback(name, last, current) {
  14939. this._cleanClassAttribute(name === 'icon' ? last : this.getAttribute('icon'), name === 'modifier' ? last : undefined);
  14940. this._update();
  14941. }
  14942. }, {
  14943. key: '_compile',
  14944. value: function _compile() {
  14945. autoStyle.prepare(this);
  14946. this._update();
  14947. }
  14948. }, {
  14949. key: '_update',
  14950. value: function _update() {
  14951. var _this2 = this;
  14952. var _buildClassAndStyle2 = this._buildClassAndStyle(this._parseAttr('icon'), this._parseAttr('size')),
  14953. classList = _buildClassAndStyle2.classList,
  14954. style = _buildClassAndStyle2.style;
  14955. util$1.extend(this.style, style);
  14956. classList.forEach(function (className) {
  14957. return _this2.classList.add(className);
  14958. });
  14959. }
  14960. }, {
  14961. key: '_parseAttr',
  14962. value: function _parseAttr(attrName) {
  14963. var modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getAttribute('modifier') || '';
  14964. var attr = this.getAttribute(attrName) || attrName || '';
  14965. var parts = attr.split(/\s*,\s*/);
  14966. var def = parts[0];
  14967. var md = parts[1];
  14968. md = (md || '').split(/\s*:\s*/);
  14969. return (modifier && RegExp('(^|\\s+)' + md[0] + '($|\\s+)', 'i').test(modifier) ? md[1] : def) || '';
  14970. }
  14971. /**
  14972. * Remove unneeded class value.
  14973. */
  14974. }, {
  14975. key: '_cleanClassAttribute',
  14976. value: function _cleanClassAttribute(lastIcon, lastModifier) {
  14977. var _this3 = this;
  14978. var _prefixIcon2 = this._prefixIcon(this._parseAttr(lastIcon, lastModifier)),
  14979. className = _prefixIcon2.className,
  14980. prefix = _prefixIcon2.prefix;
  14981. var customPrefixRE = className !== prefix ? '|' + prefix + '$|' + prefix + '-' : '|' + className + '$' || '';
  14982. var re = new RegExp('^(fa$|fa-|ion-|zmdi$|zmdi-|ons-icon--' + customPrefixRE + ')');
  14983. util$1.arrayFrom(this.classList).filter(function (className) {
  14984. return re.test(className);
  14985. }).forEach(function (className) {
  14986. return _this3.classList.remove(className);
  14987. });
  14988. }
  14989. }, {
  14990. key: '_prefixIcon',
  14991. value: function _prefixIcon(iconName) {
  14992. var className = autoPrefix + (autoPrefix ? '-' : '') + iconName;
  14993. return { className: className, prefix: className.split('-')[0] };
  14994. }
  14995. }, {
  14996. key: '_buildClassAndStyle',
  14997. value: function _buildClassAndStyle(iconName, size) {
  14998. var classList = ['ons-icon'];
  14999. var style = {};
  15000. // Icon
  15001. if (iconName.indexOf('ion-') === 0) {
  15002. classList.push(iconName);
  15003. classList.push('ons-icon--ion');
  15004. } else if (iconName.indexOf('fa-') === 0) {
  15005. classList.push(iconName);
  15006. // default icon style to Font Awesome Solid if icon style is not specified already
  15007. if (!(this.classList.contains('far') || this.classList.contains('fab') || this.classList.contains('fal'))) {
  15008. classList.push('fa');
  15009. }
  15010. } else if (iconName.indexOf('md-') === 0) {
  15011. classList.push('zmdi');
  15012. classList.push('zmdi-' + iconName.split(/-(.+)?/)[1]);
  15013. } else {
  15014. var _prefixIcon3 = this._prefixIcon(iconName),
  15015. className = _prefixIcon3.className,
  15016. prefix = _prefixIcon3.prefix;
  15017. prefix && classList.push(prefix);
  15018. className && classList.push(className);
  15019. }
  15020. // Size
  15021. if (size.match(/^[1-5]x|lg$/)) {
  15022. classList.push('ons-icon--' + size);
  15023. this.style.removeProperty('font-size');
  15024. } else {
  15025. style.fontSize = size;
  15026. }
  15027. return {
  15028. classList: classList,
  15029. style: style
  15030. };
  15031. }
  15032. }], [{
  15033. key: 'setAutoPrefix',
  15034. value: function setAutoPrefix(prefix) {
  15035. autoPrefix = prefix ? typeof prefix === 'string' && prefix || 'fa' : '';
  15036. }
  15037. }, {
  15038. key: 'observedAttributes',
  15039. get: function get$$1() {
  15040. return ['icon', 'size', 'modifier', 'class'];
  15041. }
  15042. }]);
  15043. return IconElement;
  15044. }(BaseElement);
  15045. onsElements.Icon = IconElement;
  15046. customElements.define('ons-icon', IconElement);
  15047. /*
  15048. Copyright 2013-2015 ASIAL CORPORATION
  15049. Licensed under the Apache License, Version 2.0 (the "License");
  15050. you may not use this file except in compliance with the License.
  15051. You may obtain a copy of the License at
  15052. http://www.apache.org/licenses/LICENSE-2.0
  15053. Unless required by applicable law or agreed to in writing, software
  15054. distributed under the License is distributed on an "AS IS" BASIS,
  15055. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15056. See the License for the specific language governing permissions and
  15057. limitations under the License.
  15058. */
  15059. var LazyRepeatDelegate = function () {
  15060. function LazyRepeatDelegate(userDelegate) {
  15061. var templateElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  15062. classCallCheck(this, LazyRepeatDelegate);
  15063. if ((typeof userDelegate === 'undefined' ? 'undefined' : _typeof(userDelegate)) !== 'object' || userDelegate === null) {
  15064. util$1.throw('"delegate" parameter must be an object');
  15065. }
  15066. this._userDelegate = userDelegate;
  15067. if (!(templateElement instanceof Element) && templateElement !== null) {
  15068. util$1.throw('"templateElement" parameter must be an instance of Element or null');
  15069. }
  15070. this._templateElement = templateElement;
  15071. }
  15072. createClass(LazyRepeatDelegate, [{
  15073. key: 'hasRenderFunction',
  15074. /**
  15075. * @return {Boolean}
  15076. */
  15077. value: function hasRenderFunction() {
  15078. return this._userDelegate._render instanceof Function;
  15079. }
  15080. /**
  15081. * @return {void}
  15082. */
  15083. }, {
  15084. key: '_render',
  15085. value: function _render() {
  15086. this._userDelegate._render.apply(this._userDelegate, arguments);
  15087. }
  15088. /**
  15089. * @param {Number} index
  15090. * @param {Function} done A function that take item object as parameter.
  15091. */
  15092. }, {
  15093. key: 'loadItemElement',
  15094. value: function loadItemElement(index, done) {
  15095. if (this._userDelegate.loadItemElement instanceof Function) {
  15096. this._userDelegate.loadItemElement(index, done);
  15097. } else {
  15098. var element = this._userDelegate.createItemContent(index, this._templateElement);
  15099. if (!(element instanceof Element)) {
  15100. util$1.throw('"createItemContent" must return an instance of Element');
  15101. }
  15102. done({ element: element });
  15103. }
  15104. }
  15105. /**
  15106. * @return {Number}
  15107. */
  15108. }, {
  15109. key: 'countItems',
  15110. value: function countItems() {
  15111. var count = this._userDelegate.countItems();
  15112. if (typeof count !== 'number') {
  15113. util$1.throw('"countItems" must return a number');
  15114. }
  15115. return count;
  15116. }
  15117. /**
  15118. * @param {Number} index
  15119. * @param {Object} item
  15120. * @param {Element} item.element
  15121. */
  15122. }, {
  15123. key: 'updateItem',
  15124. value: function updateItem(index, item) {
  15125. if (this._userDelegate.updateItemContent instanceof Function) {
  15126. this._userDelegate.updateItemContent(index, item);
  15127. }
  15128. }
  15129. /**
  15130. * @return {Number}
  15131. */
  15132. }, {
  15133. key: 'calculateItemHeight',
  15134. value: function calculateItemHeight(index) {
  15135. if (this._userDelegate.calculateItemHeight instanceof Function) {
  15136. var height = this._userDelegate.calculateItemHeight(index);
  15137. if (typeof height !== 'number') {
  15138. util$1.throw('"calculateItemHeight" must return a number');
  15139. }
  15140. return height;
  15141. }
  15142. return 0;
  15143. }
  15144. /**
  15145. * @param {Number} index
  15146. * @param {Object} item
  15147. */
  15148. }, {
  15149. key: 'destroyItem',
  15150. value: function destroyItem(index, item) {
  15151. if (this._userDelegate.destroyItem instanceof Function) {
  15152. this._userDelegate.destroyItem(index, item);
  15153. }
  15154. }
  15155. /**
  15156. * @return {void}
  15157. */
  15158. }, {
  15159. key: 'destroy',
  15160. value: function destroy() {
  15161. if (this._userDelegate.destroy instanceof Function) {
  15162. this._userDelegate.destroy();
  15163. }
  15164. this._userDelegate = this._templateElement = null;
  15165. }
  15166. }, {
  15167. key: 'itemHeight',
  15168. get: function get$$1() {
  15169. return this._userDelegate.itemHeight;
  15170. }
  15171. }]);
  15172. return LazyRepeatDelegate;
  15173. }();
  15174. /**
  15175. * This class provide core functions for ons-lazy-repeat.
  15176. */
  15177. var LazyRepeatProvider = function () {
  15178. /**
  15179. * @param {Element} wrapperElement
  15180. * @param {LazyRepeatDelegate} delegate
  15181. */
  15182. function LazyRepeatProvider(wrapperElement, delegate) {
  15183. classCallCheck(this, LazyRepeatProvider);
  15184. if (!(delegate instanceof LazyRepeatDelegate)) {
  15185. util$1.throw('"delegate" parameter must be an instance of LazyRepeatDelegate');
  15186. }
  15187. this._wrapperElement = wrapperElement;
  15188. this._delegate = delegate;
  15189. this._insertIndex = this._wrapperElement.children[0] && this._wrapperElement.children[0].tagName === 'ONS-LAZY-REPEAT' ? 1 : 0;
  15190. if (wrapperElement.tagName.toLowerCase() === 'ons-list') {
  15191. wrapperElement.classList.add('lazy-list');
  15192. }
  15193. this._pageContent = this._findPageContentElement(wrapperElement);
  15194. if (!this._pageContent) {
  15195. util$1.throw('LazyRepeat must be descendant of a Page element');
  15196. }
  15197. this.lastScrollTop = this._pageContent.scrollTop;
  15198. this.padding = 0;
  15199. this._topPositions = [0];
  15200. this._renderedItems = {};
  15201. if (!this._delegate.itemHeight && !this._delegate.calculateItemHeight(0)) {
  15202. this._unknownItemHeight = true;
  15203. }
  15204. this._addEventListeners();
  15205. this._onChange();
  15206. }
  15207. createClass(LazyRepeatProvider, [{
  15208. key: '_findPageContentElement',
  15209. value: function _findPageContentElement(wrapperElement) {
  15210. var pageContent = util$1.findParent(wrapperElement, '.page__content');
  15211. if (pageContent) {
  15212. return pageContent;
  15213. }
  15214. var page = util$1.findParent(wrapperElement, 'ons-page');
  15215. if (page) {
  15216. var content = util$1.findChild(page, '.content');
  15217. if (content) {
  15218. return content;
  15219. }
  15220. }
  15221. return null;
  15222. }
  15223. }, {
  15224. key: '_checkItemHeight',
  15225. value: function _checkItemHeight(callback) {
  15226. var _this = this;
  15227. this._delegate.loadItemElement(0, function (item) {
  15228. if (!_this._unknownItemHeight) {
  15229. util$1.throw('Invalid state');
  15230. }
  15231. _this._wrapperElement.appendChild(item.element);
  15232. var done = function done() {
  15233. _this._delegate.destroyItem(0, item);
  15234. item.element && item.element.remove();
  15235. delete _this._unknownItemHeight;
  15236. callback();
  15237. };
  15238. _this._itemHeight = item.element.offsetHeight;
  15239. if (_this._itemHeight > 0) {
  15240. done();
  15241. return;
  15242. }
  15243. // retry to measure offset height
  15244. // dirty fix for angular2 directive
  15245. _this._wrapperElement.style.visibility = 'hidden';
  15246. item.element.style.visibility = 'hidden';
  15247. setImmediate(function () {
  15248. _this._itemHeight = item.element.offsetHeight;
  15249. if (_this._itemHeight == 0) {
  15250. util$1.throw('Invalid state: "itemHeight" must be greater than zero');
  15251. }
  15252. _this._wrapperElement.style.visibility = '';
  15253. done();
  15254. });
  15255. });
  15256. }
  15257. }, {
  15258. key: '_countItems',
  15259. value: function _countItems() {
  15260. return this._delegate.countItems();
  15261. }
  15262. }, {
  15263. key: '_getItemHeight',
  15264. value: function _getItemHeight(i) {
  15265. // Item is rendered
  15266. if (this._renderedItems.hasOwnProperty(i)) {
  15267. if (!this._renderedItems[i].hasOwnProperty('height')) {
  15268. this._renderedItems[i].height = this._renderedItems[i].element.offsetHeight;
  15269. }
  15270. return this._renderedItems[i].height;
  15271. }
  15272. // Item is not rendered, scroll up
  15273. if (this._topPositions[i + 1] && this._topPositions[i]) {
  15274. return this._topPositions[i + 1] - this._topPositions[i];
  15275. }
  15276. // Item is not rendered, scroll down
  15277. return this.staticItemHeight || this._delegate.calculateItemHeight(i);
  15278. }
  15279. }, {
  15280. key: '_calculateRenderedHeight',
  15281. value: function _calculateRenderedHeight() {
  15282. var _this2 = this;
  15283. return Object.keys(this._renderedItems).reduce(function (a, b) {
  15284. return a + _this2._getItemHeight(+b);
  15285. }, 0);
  15286. }
  15287. }, {
  15288. key: '_onChange',
  15289. value: function _onChange() {
  15290. this._render();
  15291. }
  15292. }, {
  15293. key: '_lastItemRendered',
  15294. value: function _lastItemRendered() {
  15295. return Math.max.apply(Math, toConsumableArray(Object.keys(this._renderedItems)));
  15296. }
  15297. }, {
  15298. key: '_firstItemRendered',
  15299. value: function _firstItemRendered() {
  15300. return Math.min.apply(Math, toConsumableArray(Object.keys(this._renderedItems)));
  15301. }
  15302. }, {
  15303. key: 'refresh',
  15304. value: function refresh() {
  15305. var forceRender = { forceScrollDown: true };
  15306. var firstItemIndex = this._firstItemRendered();
  15307. if (util$1.isInteger(firstItemIndex)) {
  15308. this._wrapperElement.style.height = this._topPositions[firstItemIndex] + this._calculateRenderedHeight() + 'px';
  15309. this.padding = this._topPositions[firstItemIndex];
  15310. forceRender.forceFirstIndex = firstItemIndex;
  15311. }
  15312. this._removeAllElements();
  15313. this._render(forceRender);
  15314. this._wrapperElement.style.height = 'inherit';
  15315. }
  15316. }, {
  15317. key: '_render',
  15318. value: function _render() {
  15319. var _this3 = this;
  15320. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15321. _ref$forceScrollDown = _ref.forceScrollDown,
  15322. forceScrollDown = _ref$forceScrollDown === undefined ? false : _ref$forceScrollDown,
  15323. forceFirstIndex = _ref.forceFirstIndex,
  15324. forceLastIndex = _ref.forceLastIndex;
  15325. if (this._unknownItemHeight) {
  15326. return this._checkItemHeight(this._render.bind(this, arguments[0]));
  15327. }
  15328. var isScrollUp = !forceScrollDown && this.lastScrollTop > this._pageContent.scrollTop;
  15329. this.lastScrollTop = this._pageContent.scrollTop;
  15330. var keep = {};
  15331. var offset = this._wrapperElement.getBoundingClientRect().top;
  15332. var limit = 4 * window.innerHeight - offset;
  15333. var count = this._countItems();
  15334. var start = forceFirstIndex || Math.max(0, this._calculateStartIndex(offset) - 30); // Recalculate for 0 or undefined
  15335. var i = start;
  15336. for (var top = this._topPositions[i]; i < count && top < limit; i++) {
  15337. if (i >= this._topPositions.length) {
  15338. // perf optimization
  15339. this._topPositions.length += 100;
  15340. }
  15341. this._topPositions[i] = top;
  15342. top += this._getItemHeight(i);
  15343. }
  15344. if (this._delegate.hasRenderFunction && this._delegate.hasRenderFunction()) {
  15345. return this._delegate._render(start, i, function () {
  15346. _this3.padding = _this3._topPositions[start];
  15347. });
  15348. }
  15349. if (isScrollUp) {
  15350. for (var j = i - 1; j >= start; j--) {
  15351. keep[j] = true;
  15352. this._renderElement(j, isScrollUp);
  15353. }
  15354. } else {
  15355. var lastIndex = forceLastIndex || Math.max.apply(Math, [i - 1].concat(toConsumableArray(Object.keys(this._renderedItems)))); // Recalculate for 0 or undefined
  15356. for (var _j = start; _j <= lastIndex; _j++) {
  15357. keep[_j] = true;
  15358. this._renderElement(_j, isScrollUp);
  15359. }
  15360. }
  15361. Object.keys(this._renderedItems).forEach(function (key) {
  15362. return keep[key] || _this3._removeElement(key, isScrollUp);
  15363. });
  15364. }
  15365. /**
  15366. * @param {Number} index
  15367. * @param {Boolean} isScrollUp
  15368. */
  15369. }, {
  15370. key: '_renderElement',
  15371. value: function _renderElement(index, isScrollUp) {
  15372. var _this4 = this;
  15373. var item = this._renderedItems[index];
  15374. if (item) {
  15375. this._delegate.updateItem(index, item); // update if it exists
  15376. return;
  15377. }
  15378. this._delegate.loadItemElement(index, function (item) {
  15379. if (isScrollUp) {
  15380. _this4._wrapperElement.insertBefore(item.element, _this4._wrapperElement.children[_this4._insertIndex]);
  15381. _this4.padding = _this4._topPositions[index];
  15382. item.height = _this4._topPositions[index + 1] - _this4._topPositions[index];
  15383. } else {
  15384. _this4._wrapperElement.appendChild(item.element);
  15385. }
  15386. _this4._renderedItems[index] = item;
  15387. });
  15388. }
  15389. /**
  15390. * @param {Number} index
  15391. * @param {Boolean} isScrollUp
  15392. */
  15393. }, {
  15394. key: '_removeElement',
  15395. value: function _removeElement(index) {
  15396. var isScrollUp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  15397. index = +index;
  15398. var item = this._renderedItems[index];
  15399. this._delegate.destroyItem(index, item);
  15400. if (isScrollUp) {
  15401. this._topPositions[index + 1] = undefined;
  15402. } else {
  15403. this.padding = this.padding + this._getItemHeight(index);
  15404. }
  15405. if (item.element.parentElement) {
  15406. item.element.parentElement.removeChild(item.element);
  15407. }
  15408. delete this._renderedItems[index];
  15409. }
  15410. }, {
  15411. key: '_removeAllElements',
  15412. value: function _removeAllElements() {
  15413. var _this5 = this;
  15414. Object.keys(this._renderedItems).forEach(function (key) {
  15415. return _this5._removeElement(key);
  15416. });
  15417. }
  15418. }, {
  15419. key: '_recalculateTopPositions',
  15420. value: function _recalculateTopPositions(start, end) {
  15421. for (var i = start; i <= end; i++) {
  15422. this._topPositions[i + 1] = this._topPositions[i] + this._getItemHeight(i);
  15423. }
  15424. }
  15425. }, {
  15426. key: '_calculateStartIndex',
  15427. value: function _calculateStartIndex(current) {
  15428. var firstItemIndex = this._firstItemRendered();
  15429. var lastItemIndex = this._lastItemRendered();
  15430. // Fix for Safari scroll and Angular 2
  15431. this._recalculateTopPositions(firstItemIndex, lastItemIndex);
  15432. var start = 0;
  15433. var end = this._countItems() - 1;
  15434. // Binary search for index at top of screen so we can speed up rendering.
  15435. for (;;) {
  15436. var middle = Math.floor((start + end) / 2);
  15437. var value = current + this._topPositions[middle];
  15438. if (end < start) {
  15439. return 0;
  15440. } else if (value <= 0 && value + this._getItemHeight(middle) > 0) {
  15441. return middle;
  15442. } else if (isNaN(value) || value >= 0) {
  15443. end = middle - 1;
  15444. } else {
  15445. start = middle + 1;
  15446. }
  15447. }
  15448. }
  15449. }, {
  15450. key: '_debounce',
  15451. value: function _debounce(func, wait, immediate) {
  15452. var timeout = void 0;
  15453. return function () {
  15454. var _this6 = this,
  15455. _arguments = arguments;
  15456. var callNow = immediate && !timeout;
  15457. clearTimeout(timeout);
  15458. if (callNow) {
  15459. func.apply(this, arguments);
  15460. } else {
  15461. timeout = setTimeout(function () {
  15462. timeout = null;
  15463. func.apply(_this6, _arguments);
  15464. }, wait);
  15465. }
  15466. };
  15467. }
  15468. }, {
  15469. key: '_doubleFireOnTouchend',
  15470. value: function _doubleFireOnTouchend() {
  15471. this._render();
  15472. this._debounce(this._render.bind(this), 100);
  15473. }
  15474. }, {
  15475. key: '_addEventListeners',
  15476. value: function _addEventListeners() {
  15477. util$1.bindListeners(this, ['_onChange', '_doubleFireOnTouchend']);
  15478. if (platform.isIOS()) {
  15479. this._boundOnChange = this._debounce(this._boundOnChange, 30);
  15480. }
  15481. this._pageContent.addEventListener('scroll', this._boundOnChange, true);
  15482. if (platform.isIOS()) {
  15483. util$1.addEventListener(this._pageContent, 'touchmove', this._boundOnChange, { capture: true, passive: true });
  15484. this._pageContent.addEventListener('touchend', this._boundDoubleFireOnTouchend, true);
  15485. }
  15486. window.document.addEventListener('resize', this._boundOnChange, true);
  15487. }
  15488. }, {
  15489. key: '_removeEventListeners',
  15490. value: function _removeEventListeners() {
  15491. this._pageContent.removeEventListener('scroll', this._boundOnChange, true);
  15492. if (platform.isIOS()) {
  15493. util$1.removeEventListener(this._pageContent, 'touchmove', this._boundOnChange, { capture: true, passive: true });
  15494. this._pageContent.removeEventListener('touchend', this._boundDoubleFireOnTouchend, true);
  15495. }
  15496. window.document.removeEventListener('resize', this._boundOnChange, true);
  15497. }
  15498. }, {
  15499. key: 'destroy',
  15500. value: function destroy() {
  15501. this._removeAllElements();
  15502. this._delegate.destroy();
  15503. this._parentElement = this._delegate = this._renderedItems = null;
  15504. this._removeEventListeners();
  15505. }
  15506. }, {
  15507. key: 'padding',
  15508. get: function get$$1() {
  15509. return parseInt(this._wrapperElement.style.paddingTop, 10);
  15510. },
  15511. set: function set$$1(newValue) {
  15512. this._wrapperElement.style.paddingTop = newValue + 'px';
  15513. }
  15514. }, {
  15515. key: 'staticItemHeight',
  15516. get: function get$$1() {
  15517. return this._delegate.itemHeight || this._itemHeight;
  15518. }
  15519. }]);
  15520. return LazyRepeatProvider;
  15521. }();
  15522. /*
  15523. Copyright 2013-2015 ASIAL CORPORATION
  15524. Licensed under the Apache License, Version 2.0 (the "License");
  15525. you may not use this file except in compliance with the License.
  15526. You may obtain a copy of the License at
  15527. http://www.apache.org/licenses/LICENSE-2.0
  15528. Unless required by applicable law or agreed to in writing, software
  15529. distributed under the License is distributed on an "AS IS" BASIS,
  15530. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15531. See the License for the specific language governing permissions and
  15532. limitations under the License.
  15533. */
  15534. /**
  15535. * @element ons-lazy-repeat
  15536. * @category list
  15537. * @description
  15538. * [en]
  15539. * Using this component a list with millions of items can be rendered without a drop in performance.
  15540. * It does that by "lazily" loading elements into the DOM when they come into view and
  15541. * removing items from the DOM when they are not visible.
  15542. * [/en]
  15543. * [ja]
  15544. * このコンポーネント内で描画されるアイテムのDOM要素の読み込みは、画面に見えそうになった時まで自動的に遅延され、
  15545. * 画面から見えなくなった場合にはその要素は動的にアンロードされます。
  15546. * このコンポーネントを使うことで、パフォーマンスを劣化させること無しに巨大な数の要素を描画できます。
  15547. * [/ja]
  15548. * @codepen QwrGBm
  15549. * @tutorial vanilla/Reference/lazy-repeat
  15550. * @seealso ons-list
  15551. * [en]The `<ons-list>` element is used to render a list.[/en]
  15552. * [ja]`<ons-list>`要素はリストを描画するのに使われます。[/ja]
  15553. * @example
  15554. * <script>
  15555. * window.addEventListener('load', function() {
  15556. * var lazyRepeat = document.querySelector('#list');
  15557. * lazyRepeat.delegate = {
  15558. * createItemContent: function(i, template) {
  15559. * var dom = template.cloneNode(true);
  15560. * dom.innerText = i;
  15561. *
  15562. * return dom;
  15563. * },
  15564. * countItems: function() {
  15565. * return 10000000;
  15566. * },
  15567. * destroyItem: function(index, item) {
  15568. * console.log('Destroyed item with index: ' + index);
  15569. * }
  15570. * };
  15571. * });
  15572. * </script>
  15573. *
  15574. * <ons-list id="list">
  15575. * <ons-lazy-repeat>
  15576. * <ons-list-item></ons-list-item>
  15577. * </ons-lazy-repeat>
  15578. * </ons-list>
  15579. */
  15580. var LazyRepeatElement = function (_BaseElement) {
  15581. inherits(LazyRepeatElement, _BaseElement);
  15582. function LazyRepeatElement() {
  15583. classCallCheck(this, LazyRepeatElement);
  15584. return possibleConstructorReturn(this, (LazyRepeatElement.__proto__ || Object.getPrototypeOf(LazyRepeatElement)).apply(this, arguments));
  15585. }
  15586. createClass(LazyRepeatElement, [{
  15587. key: 'connectedCallback',
  15588. value: function connectedCallback() {
  15589. // not very good idea and also not documented
  15590. if (this.hasAttribute('delegate')) {
  15591. this.delegate = window[this.getAttribute('delegate')];
  15592. }
  15593. }
  15594. /**
  15595. * @property delegate
  15596. * @type {Object}
  15597. * @description
  15598. * [en]Specify a delegate object to load and unload item elements.[/en]
  15599. * [ja]要素のロード、アンロードなどの処理を委譲するオブジェクトを指定します。[/ja]
  15600. */
  15601. /**
  15602. * @property delegate.createItemContent
  15603. * @type {Function}
  15604. * @description
  15605. * [en]
  15606. * This function should return a `HTMLElement`.
  15607. *
  15608. * To help rendering the element, the current index and a template is supplied as arguments. The template is the initial content of the `<ons-lazy-repeat>` element.
  15609. * [/en]
  15610. * [ja]
  15611. * この関数は`HTMLElement`を返してください。
  15612. * 要素を生成しやすくするために、現在のアイテムのインデックスとテンプレートが引数に渡されます。
  15613. * このテンプレートは、`<ons-lazy-repeat>`要素のコンテンツが渡されます。
  15614. * [/ja]
  15615. */
  15616. /**
  15617. * @property delegate.countItems
  15618. * @type {Function}
  15619. * @description
  15620. * [en]Should return the number of items in the list.[/en]
  15621. * [ja]リスト内のアイテム数を返してください。[/ja]
  15622. */
  15623. /**
  15624. * @property delegate.calculateItemHeight
  15625. * @type {Function}
  15626. * @description
  15627. * [en]
  15628. * Should return the height of an item. The index is provided as an argument.
  15629. *
  15630. * This is important when rendering lists where the items have different height.
  15631. *
  15632. * The function is optional and if it isn't present the height of the first item will be automatically calculated and used for all other items.
  15633. * [/en]
  15634. * [ja]
  15635. * アイテムの高さ(ピクセル)を返してください。アイテムのインデックス値は引数で渡されます。
  15636. * この関数は、それぞれのアイムが違った高さを持つリストをレンダリングする際に重要です。
  15637. * この関数はオプショナルです。もしこの関数が無い場合には、
  15638. * 最初のアイテムの高さが他のすべてのアイテムの高さとして利用されます。
  15639. * [/ja]
  15640. */
  15641. /**
  15642. * @property delegate.destroyItem
  15643. * @type {Function}
  15644. * @description
  15645. * [en]
  15646. * This function is used called when an item is removed from the DOM. The index and DOM element is provided as arguments.
  15647. *
  15648. * The function is optional but may be important in order to avoid memory leaks.
  15649. * [/en]
  15650. * [ja]
  15651. * この関数は、あるアイテムがDOMツリーから除かれた時に呼び出されます。
  15652. * アイテムのインデックス値とDOM要素が引数として渡されます。
  15653. * この関数はオプショナルですが、各アイテムの後処理が必要な場合にはメモリーリークを避けるために重要です。
  15654. * [/ja]
  15655. */
  15656. }, {
  15657. key: 'refresh',
  15658. /**
  15659. * @method refresh
  15660. * @signature refresh()
  15661. * @description
  15662. * [en]Refresh the list. Use this method when the data has changed.[/en]
  15663. * [ja]リストを更新します。もしデータが変わった場合にはこのメソッドを使ってください。[/ja]
  15664. */
  15665. value: function refresh() {
  15666. this._lazyRepeatProvider && this._lazyRepeatProvider.refresh();
  15667. }
  15668. }, {
  15669. key: 'attributeChangedCallback',
  15670. value: function attributeChangedCallback(name, last, current) {}
  15671. }, {
  15672. key: 'disconnectedCallback',
  15673. value: function disconnectedCallback() {
  15674. if (this._lazyRepeatProvider) {
  15675. this._lazyRepeatProvider.destroy();
  15676. this._lazyRepeatProvider = null;
  15677. }
  15678. }
  15679. }, {
  15680. key: 'delegate',
  15681. set: function set$$1(userDelegate) {
  15682. this._lazyRepeatProvider && this._lazyRepeatProvider.destroy();
  15683. if (!this._templateElement && this.children[0]) {
  15684. this._templateElement = this.removeChild(this.children[0]);
  15685. }
  15686. var delegate = new LazyRepeatDelegate(userDelegate, this._templateElement || null);
  15687. this._lazyRepeatProvider = new LazyRepeatProvider(this.parentElement, delegate);
  15688. },
  15689. get: function get$$1() {
  15690. util$1.throw('No delegate getter');
  15691. }
  15692. }]);
  15693. return LazyRepeatElement;
  15694. }(BaseElement);
  15695. internal$1.LazyRepeatDelegate = LazyRepeatDelegate;
  15696. internal$1.LazyRepeatProvider = LazyRepeatProvider;
  15697. onsElements.LazyRepeat = LazyRepeatElement;
  15698. customElements.define('ons-lazy-repeat', LazyRepeatElement);
  15699. /*
  15700. Copyright 2013-2015 ASIAL CORPORATION
  15701. Licensed under the Apache License, Version 2.0 (the "License");
  15702. you may not use this file except in compliance with the License.
  15703. You may obtain a copy of the License at
  15704. http://www.apache.org/licenses/LICENSE-2.0
  15705. Unless required by applicable law or agreed to in writing, software
  15706. distributed under the License is distributed on an "AS IS" BASIS,
  15707. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15708. See the License for the specific language governing permissions and
  15709. limitations under the License.
  15710. */
  15711. var defaultClassName$4 = 'list-header';
  15712. var scheme$8 = { '': 'list-header--*' };
  15713. /**
  15714. * @element ons-list-header
  15715. * @category list
  15716. * @description
  15717. * [en]Header element for list items. Must be put inside the `<ons-list>` component.[/en]
  15718. * [ja]リスト要素に使用するヘッダー用コンポーネント。ons-listと共に使用します。[/ja]
  15719. * @seealso ons-list
  15720. * [en]The `<ons-list>` component[/en]
  15721. * [ja]ons-listコンポーネント[/ja]
  15722. * @seealso ons-list-item
  15723. * [en]The `<ons-list-item>` component[/en]
  15724. * [ja]ons-list-itemコンポーネント[/ja]
  15725. * @codepen yxcCt
  15726. * @tutorial vanilla/Reference/list
  15727. * @modifier material
  15728. * [en]Display a Material Design list header.[/en]
  15729. * [ja][/ja]
  15730. * @example
  15731. * <ons-list>
  15732. * <ons-list-header>Header Text</ons-list-header>
  15733. * <ons-list-item>Item</ons-list-item>
  15734. * <ons-list-item>Item</ons-list-item>
  15735. * </ons-list>
  15736. */
  15737. var ListHeaderElement = function (_BaseElement) {
  15738. inherits(ListHeaderElement, _BaseElement);
  15739. /**
  15740. * @attribute modifier
  15741. * @type {String}
  15742. * @description
  15743. * [en]The appearance of the list header.[/en]
  15744. * [ja]ヘッダーの表現を指定します。[/ja]
  15745. */
  15746. function ListHeaderElement() {
  15747. classCallCheck(this, ListHeaderElement);
  15748. var _this = possibleConstructorReturn(this, (ListHeaderElement.__proto__ || Object.getPrototypeOf(ListHeaderElement)).call(this));
  15749. _this._compile();
  15750. return _this;
  15751. }
  15752. createClass(ListHeaderElement, [{
  15753. key: '_compile',
  15754. value: function _compile() {
  15755. autoStyle.prepare(this);
  15756. this.classList.add(defaultClassName$4);
  15757. ModifierUtil.initModifier(this, scheme$8);
  15758. }
  15759. }, {
  15760. key: 'attributeChangedCallback',
  15761. value: function attributeChangedCallback(name, last, current) {
  15762. switch (name) {
  15763. case 'class':
  15764. util$1.restoreClass(this, defaultClassName$4, scheme$8);
  15765. break;
  15766. case 'modifier':
  15767. ModifierUtil.onModifierChanged(last, current, this, scheme$8);
  15768. break;
  15769. }
  15770. }
  15771. }], [{
  15772. key: 'observedAttributes',
  15773. get: function get$$1() {
  15774. return ['modifier', 'class'];
  15775. }
  15776. }]);
  15777. return ListHeaderElement;
  15778. }(BaseElement);
  15779. onsElements.ListHeader = ListHeaderElement;
  15780. customElements.define('ons-list-header', ListHeaderElement);
  15781. /*
  15782. Copyright 2013-2015 ASIAL CORPORATION
  15783. Licensed under the Apache License, Version 2.0 (the "License");
  15784. you may not use this file except in compliance with the License.
  15785. You may obtain a copy of the License at
  15786. http://www.apache.org/licenses/LICENSE-2.0
  15787. Unless required by applicable law or agreed to in writing, software
  15788. distributed under the License is distributed on an "AS IS" BASIS,
  15789. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15790. See the License for the specific language governing permissions and
  15791. limitations under the License.
  15792. */
  15793. var defaultClassName$5 = 'list-title';
  15794. var scheme$9 = { '': 'list-title--*' };
  15795. /**
  15796. * @element ons-list-title
  15797. * @category list
  15798. * @description
  15799. * [en]Represents a list title.[/en]
  15800. * [ja]リストのタイトルを表現します。[/ja]
  15801. * @example
  15802. * <ons-list-title>List Title</ons-list-title>
  15803. * <ons-list>
  15804. * <ons-list-item>Item</ons-list-item>
  15805. * </ons-list>
  15806. * @modifier material
  15807. * [en]Display a Material Design list title.[/en]
  15808. * [ja][/ja]
  15809. */
  15810. var ListTitleElement = function (_BaseElement) {
  15811. inherits(ListTitleElement, _BaseElement);
  15812. function ListTitleElement() {
  15813. classCallCheck(this, ListTitleElement);
  15814. var _this = possibleConstructorReturn(this, (ListTitleElement.__proto__ || Object.getPrototypeOf(ListTitleElement)).call(this));
  15815. _this._compile();
  15816. return _this;
  15817. }
  15818. createClass(ListTitleElement, [{
  15819. key: '_compile',
  15820. value: function _compile() {
  15821. autoStyle.prepare(this);
  15822. this.classList.add(defaultClassName$5);
  15823. ModifierUtil.initModifier(this, scheme$9);
  15824. }
  15825. }, {
  15826. key: 'attributeChangedCallback',
  15827. value: function attributeChangedCallback(name, last, current) {
  15828. switch (name) {
  15829. case 'class':
  15830. util$1.restoreClass(this, defaultClassName$5, scheme$9);
  15831. break;
  15832. case 'modifier':
  15833. ModifierUtil.onModifierChanged(last, current, this, scheme$9);
  15834. break;
  15835. }
  15836. }
  15837. }], [{
  15838. key: 'observedAttributes',
  15839. get: function get$$1() {
  15840. return ['modifier', 'class'];
  15841. }
  15842. }]);
  15843. return ListTitleElement;
  15844. }(BaseElement);
  15845. onsElements.ListTitle = ListTitleElement;
  15846. customElements.define('ons-list-title', ListTitleElement);
  15847. /*
  15848. Copyright 2013-2018 ASIAL CORPORATION
  15849. Licensed under the Apache License, Version 2.0 (the "License");
  15850. you may not use this file except in compliance with the License.
  15851. You may obtain a copy of the License at
  15852. http://www.apache.org/licenses/LICENSE-2.0
  15853. Unless required by applicable law or agreed to in writing, software
  15854. distributed under the License is distributed on an "AS IS" BASIS,
  15855. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15856. See the License for the specific language governing permissions and
  15857. limitations under the License.
  15858. */
  15859. var ListItemAnimator = function (_BaseAnimator) {
  15860. inherits(ListItemAnimator, _BaseAnimator);
  15861. function ListItemAnimator() {
  15862. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15863. _ref$timing = _ref.timing,
  15864. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  15865. _ref$delay = _ref.delay,
  15866. delay = _ref$delay === undefined ? 0 : _ref$delay,
  15867. _ref$duration = _ref.duration,
  15868. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  15869. classCallCheck(this, ListItemAnimator);
  15870. return possibleConstructorReturn(this, (ListItemAnimator.__proto__ || Object.getPrototypeOf(ListItemAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  15871. }
  15872. createClass(ListItemAnimator, [{
  15873. key: 'showExpansion',
  15874. value: function showExpansion(listItem, callback) {
  15875. callback();
  15876. }
  15877. }, {
  15878. key: 'hideExpansion',
  15879. value: function hideExpansion(listItem, callback) {
  15880. callback();
  15881. }
  15882. }]);
  15883. return ListItemAnimator;
  15884. }(BaseAnimator);
  15885. var SlideListItemAnimator = function (_ListItemAnimator) {
  15886. inherits(SlideListItemAnimator, _ListItemAnimator);
  15887. function SlideListItemAnimator() {
  15888. classCallCheck(this, SlideListItemAnimator);
  15889. return possibleConstructorReturn(this, (SlideListItemAnimator.__proto__ || Object.getPrototypeOf(SlideListItemAnimator)).apply(this, arguments));
  15890. }
  15891. createClass(SlideListItemAnimator, [{
  15892. key: 'showExpansion',
  15893. value: function showExpansion(listItem, callback) {
  15894. this._animateExpansion(listItem, true, callback);
  15895. }
  15896. }, {
  15897. key: 'hideExpansion',
  15898. value: function hideExpansion(listItem, callback) {
  15899. this._animateExpansion(listItem, false, callback);
  15900. }
  15901. }, {
  15902. key: '_animateExpansion',
  15903. value: function _animateExpansion(listItem, shouldOpen, callback) {
  15904. var _animit;
  15905. // To animate the opening of the expansion panel correctly, we need to know its
  15906. // height. To calculate this, we set its height to auto, and then get the computed
  15907. // height and padding. Once this is done, we set the height back to its original value.
  15908. var oldHeight = listItem.expandableContent.style.height;
  15909. var oldDisplay = listItem.expandableContent.style.display;
  15910. listItem.expandableContent.style.height = 'auto';
  15911. listItem.expandableContent.style.display = 'block';
  15912. var computedStyle = window.getComputedStyle(listItem.expandableContent);
  15913. var expansionOpenTransition = [{ height: 0, paddingTop: 0, paddingBottom: 0 }, {
  15914. height: computedStyle.height,
  15915. paddingTop: computedStyle.paddingTop,
  15916. paddingBottom: computedStyle.paddingBottom
  15917. }];
  15918. var iconOpenTransition = [{ transform: 'rotate(45deg)' }, { transform: 'rotate(225deg)' }];
  15919. // Now that we have the values we need, reset the height back to its original state
  15920. listItem.expandableContent.style.height = oldHeight;
  15921. (_animit = Animit(listItem.expandableContent, { duration: this.duration, property: 'height padding-top padding-bottom' })).default.apply(_animit, toConsumableArray(shouldOpen ? expansionOpenTransition : expansionOpenTransition.reverse())).play(function () {
  15922. listItem.expandableContent.style.display = oldDisplay;
  15923. callback && callback();
  15924. });
  15925. if (listItem.expandChevron) {
  15926. var _animit2;
  15927. (_animit2 = Animit(listItem.expandChevron, { duration: this.duration, property: 'transform' })).default.apply(_animit2, toConsumableArray(shouldOpen ? iconOpenTransition : iconOpenTransition.reverse())).play();
  15928. }
  15929. }
  15930. }]);
  15931. return SlideListItemAnimator;
  15932. }(ListItemAnimator);
  15933. /*
  15934. Copyright 2013-2015 ASIAL CORPORATION
  15935. Licensed under the Apache License, Version 2.0 (the "License");
  15936. you may not use this file except in compliance with the License.
  15937. You may obtain a copy of the License at
  15938. http://www.apache.org/licenses/LICENSE-2.0
  15939. Unless required by applicable law or agreed to in writing, software
  15940. distributed under the License is distributed on an "AS IS" BASIS,
  15941. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15942. See the License for the specific language governing permissions and
  15943. limitations under the License.
  15944. */
  15945. var defaultClassName$6 = 'list-item';
  15946. var scheme$10 = {
  15947. '.list-item': 'list-item--*',
  15948. '.list-item__left': 'list-item--*__left',
  15949. '.list-item__center': 'list-item--*__center',
  15950. '.list-item__right': 'list-item--*__right',
  15951. '.list-item__label': 'list-item--*__label',
  15952. '.list-item__title': 'list-item--*__title',
  15953. '.list-item__subtitle': 'list-item--*__subtitle',
  15954. '.list-item__thumbnail': 'list-item--*__thumbnail',
  15955. '.list-item__icon': 'list-item--*__icon'
  15956. };
  15957. var _animatorDict$3 = {
  15958. 'default': SlideListItemAnimator,
  15959. 'none': ListItemAnimator
  15960. };
  15961. /**
  15962. * @element ons-list-item
  15963. * @category list
  15964. * @modifier tappable
  15965. * [en]Make the list item change appearance when it's tapped. On iOS it is better to use the "tappable" and "tap-background-color" attribute for better behavior when scrolling.[/en]
  15966. * [ja]タップやクリックした時に効果が表示されるようになります。[/ja]
  15967. * @modifier chevron
  15968. * [en]Display a chevron at the right end of the list item and make it change appearance when tapped.[/en]
  15969. * [ja][/ja]
  15970. * @modifier longdivider
  15971. * [en]Displays a long horizontal divider between items.[/en]
  15972. * [ja][/ja]
  15973. * @modifier nodivider
  15974. * [en]Removes the divider between list items.[/en]
  15975. * [ja][/ja]
  15976. * @modifier material
  15977. * [en]Display a Material Design list item.[/en]
  15978. * [ja][/ja]
  15979. * @description
  15980. * [en]
  15981. * Component that represents each item in a list. The list item is composed of four parts that are represented with the `left`, `center`, `right` and `expandable-content` classes. These classes can be used to ensure that the content of the list items is properly aligned.
  15982. *
  15983. * ```
  15984. * <ons-list-item>
  15985. * <div class="left">Left</div>
  15986. * <div class="center">Center</div>
  15987. * <div class="right">Right</div>
  15988. * <div class="expandable-content">Expandable content</div>
  15989. * </ons-list-item>
  15990. * ```
  15991. *
  15992. * There are also a number of classes (prefixed with `list-item__*`) that help when putting things like icons and thumbnails into the list items.
  15993. * [/en]
  15994. * [ja][/ja]
  15995. * @seealso ons-list
  15996. * [en]ons-list component[/en]
  15997. * [ja]ons-listコンポーネント[/ja]
  15998. * @seealso ons-list-header
  15999. * [en]ons-list-header component[/en]
  16000. * [ja]ons-list-headerコンポーネント[/ja]
  16001. * @codepen yxcCt
  16002. * @tutorial vanilla/Reference/list
  16003. * @example
  16004. * <ons-list-item>
  16005. * <div class="left">
  16006. * <ons-icon icon="md-face" class="list-item__icon"></ons-icon>
  16007. * </div>
  16008. * <div class="center">
  16009. * <div class="list-item__title">Title</div>
  16010. * <div class="list-item__subtitle">Subtitle</div>
  16011. * </div>
  16012. * <div class="right">
  16013. * <ons-switch></ons-switch>
  16014. * </div>
  16015. * </ons-list-item>
  16016. */
  16017. var ListItemElement = function (_BaseElement) {
  16018. inherits(ListItemElement, _BaseElement);
  16019. /**
  16020. * @attribute modifier
  16021. * @type {String}
  16022. * @description
  16023. * [en]The appearance of the list item.[/en]
  16024. * [ja]各要素の表現を指定します。[/ja]
  16025. */
  16026. /**
  16027. * @attribute lock-on-drag
  16028. * @type {String}
  16029. * @description
  16030. * [en]Prevent vertical scrolling when the user drags horizontally.[/en]
  16031. * [ja]この属性があると、ユーザーがこの要素を横方向にドラッグしている時に、縦方向のスクロールが起きないようになります。[/ja]
  16032. */
  16033. /**
  16034. * @attribute tappable
  16035. * @type {Boolean}
  16036. * @description
  16037. * [en]Makes the element react to taps. `prevent-tap` attribute can be added to child elements like buttons or inputs to prevent this effect. `ons-*` elements are ignored by default.[/en]
  16038. * [ja][/ja]
  16039. */
  16040. /**
  16041. * @attribute tap-background-color
  16042. * @type {Color}
  16043. * @description
  16044. * [en] Changes the background color when tapped. For this to work, the attribute "tappable" needs to be set. The default color is "#d9d9d9". It will display as a ripple effect on Android.[/en]
  16045. * [ja][/ja]
  16046. */
  16047. /**
  16048. * @attribute expandable
  16049. * @type {Boolean}
  16050. * @description
  16051. * [en]Makes the element able to be expanded to reveal extra content. For this to work, the expandable content must be defined in `div.expandable-content`.[/en]
  16052. * [ja][/ja]
  16053. */
  16054. /**
  16055. * @attribute animation
  16056. * @type {String}
  16057. * @default default
  16058. * @description
  16059. * [en]The animation used when showing and hiding the expandable content. Can be either `"default"` or `"none"`.[/en]
  16060. * [ja][/ja]
  16061. */
  16062. function ListItemElement() {
  16063. classCallCheck(this, ListItemElement);
  16064. var _this = possibleConstructorReturn(this, (ListItemElement.__proto__ || Object.getPrototypeOf(ListItemElement)).call(this));
  16065. _this._animatorFactory = _this._updateAnimatorFactory();
  16066. _this.toggleExpansion = _this.toggleExpansion.bind(_this);
  16067. // Elements ignored when tapping
  16068. var re = /^ons-(?!col$|row$|if$)/i;
  16069. _this._shouldIgnoreTap = function (e) {
  16070. return e.hasAttribute('prevent-tap') || re.test(e.tagName);
  16071. };
  16072. // show and hide functions for Vue hidable mixin
  16073. _this.show = _this.showExpansion;
  16074. _this.hide = _this.hideExpansion;
  16075. contentReady(_this, function () {
  16076. _this._compile();
  16077. });
  16078. return _this;
  16079. }
  16080. /**
  16081. * Compiles the list item.
  16082. *
  16083. * Various elements are allowed in the body of a list item:
  16084. *
  16085. * - div.left, div.right, and div.center are allowed as direct children
  16086. * - if div.center is not defined, anything that isn't div.left, div.right or div.expandable-content will be put in a div.center
  16087. * - if div.center is defined, anything that isn't div.left, div.right or div.expandable-content will be ignored
  16088. * - if list item has expandable attribute:
  16089. * - div.expandable-content is allowed as a direct child
  16090. * - div.top is allowed as direct child
  16091. * - if div.top is defined, anything that isn't div.expandable-content should be inside div.top - anything else will be ignored
  16092. * - if div.right is not defined, a div.right will be created with a drop-down chevron
  16093. *
  16094. * See the tests for examples.
  16095. */
  16096. createClass(ListItemElement, [{
  16097. key: '_compile',
  16098. value: function _compile() {
  16099. autoStyle.prepare(this);
  16100. this.classList.add(defaultClassName$6);
  16101. var top = void 0,
  16102. expandableContent = void 0;
  16103. var topContent = [];
  16104. Array.from(this.childNodes).forEach(function (node) {
  16105. if (node.nodeType !== Node.ELEMENT_NODE) {
  16106. topContent.push(node);
  16107. } else if (node.classList.contains('top')) {
  16108. top = node;
  16109. } else if (node.classList.contains('expandable-content')) {
  16110. expandableContent = node;
  16111. } else {
  16112. topContent.push(node);
  16113. }
  16114. if (node.nodeName !== 'ONS-RIPPLE') {
  16115. node.remove();
  16116. }
  16117. });
  16118. topContent = top ? Array.from(top.childNodes) : topContent;
  16119. var left = void 0,
  16120. right = void 0,
  16121. center = void 0;
  16122. var centerContent = [];
  16123. topContent.forEach(function (node) {
  16124. if (node.nodeType !== Node.ELEMENT_NODE) {
  16125. centerContent.push(node);
  16126. } else if (node.classList.contains('left')) {
  16127. left = node;
  16128. } else if (node.classList.contains('right')) {
  16129. right = node;
  16130. } else if (node.classList.contains('center')) {
  16131. center = node;
  16132. } else {
  16133. centerContent.push(node);
  16134. }
  16135. });
  16136. if (this.hasAttribute('expandable')) {
  16137. this.classList.add('list-item--expandable');
  16138. if (!top) {
  16139. top = document.createElement('div');
  16140. top.classList.add('top');
  16141. }
  16142. top.classList.add('list-item__top');
  16143. this.appendChild(top);
  16144. this._top = top;
  16145. if (expandableContent) {
  16146. expandableContent.classList.add('list-item__expandable-content');
  16147. this.appendChild(expandableContent);
  16148. }
  16149. if (!right) {
  16150. right = document.createElement('div');
  16151. right.classList.add('list-item__right', 'right');
  16152. // We cannot use a pseudo-element for this chevron, as we cannot animate it using
  16153. // JS. So, we make a chevron span instead.
  16154. var chevron = document.createElement('span');
  16155. chevron.classList.add('list-item__expand-chevron');
  16156. right.appendChild(chevron);
  16157. }
  16158. } else {
  16159. top = this;
  16160. }
  16161. if (!center) {
  16162. center = document.createElement('div');
  16163. center.classList.add('center');
  16164. centerContent.forEach(function (node) {
  16165. return center.appendChild(node);
  16166. });
  16167. }
  16168. center.classList.add('list-item__center');
  16169. top.appendChild(center);
  16170. if (left) {
  16171. left.classList.add('list-item__left');
  16172. top.appendChild(left);
  16173. }
  16174. if (right) {
  16175. right.classList.add('list-item__right');
  16176. top.appendChild(right);
  16177. }
  16178. util$1.updateRipple(this);
  16179. ModifierUtil.initModifier(this, scheme$10);
  16180. }
  16181. /**
  16182. * @method showExpansion
  16183. * @signature showExpansion()
  16184. * @description
  16185. * [en]Show the expandable content if the element is expandable.[/en]
  16186. * [ja][/ja]
  16187. */
  16188. }, {
  16189. key: 'showExpansion',
  16190. value: function showExpansion() {
  16191. var _this2 = this;
  16192. if (this.hasAttribute('expandable') && !this._expanding) {
  16193. this.expanded = true;
  16194. this._expanding = true;
  16195. var animator = this._animatorFactory.newAnimator();
  16196. animator.showExpansion(this, function () {
  16197. _this2.classList.add('expanded');
  16198. _this2._expanding = false;
  16199. });
  16200. }
  16201. }
  16202. /**
  16203. * @method hideExpansion
  16204. * @signature hideExpansion()
  16205. * @description
  16206. * [en]Hide the expandable content if the element expandable.[/en]
  16207. * [ja][/ja]
  16208. */
  16209. }, {
  16210. key: 'hideExpansion',
  16211. value: function hideExpansion() {
  16212. var _this3 = this;
  16213. if (this.hasAttribute('expandable') && !this._expanding) {
  16214. this.expanded = false;
  16215. this._expanding = true;
  16216. var animator = this._animatorFactory.newAnimator();
  16217. animator.hideExpansion(this, function () {
  16218. _this3.classList.remove('expanded');
  16219. _this3._expanding = false;
  16220. });
  16221. }
  16222. }
  16223. }, {
  16224. key: 'toggleExpansion',
  16225. value: function toggleExpansion() {
  16226. this.classList.contains('expanded') ? this.hideExpansion() : this.showExpansion();
  16227. this.dispatchEvent(new Event('expansion'));
  16228. }
  16229. }, {
  16230. key: '_updateAnimatorFactory',
  16231. value: function _updateAnimatorFactory() {
  16232. return new AnimatorFactory({
  16233. animators: _animatorDict$3,
  16234. baseClass: ListItemAnimator,
  16235. baseClassName: 'ListItemAnimator',
  16236. defaultAnimation: this.getAttribute('animation') || 'default'
  16237. });
  16238. }
  16239. }, {
  16240. key: 'attributeChangedCallback',
  16241. value: function attributeChangedCallback(name, last, current) {
  16242. switch (name) {
  16243. case 'class':
  16244. util$1.restoreClass(this, defaultClassName$6, scheme$10);
  16245. break;
  16246. case 'modifier':
  16247. ModifierUtil.onModifierChanged(last, current, this, scheme$10);
  16248. break;
  16249. case 'ripple':
  16250. util$1.updateRipple(this);
  16251. break;
  16252. case 'animation':
  16253. this._animatorFactory = this._updateAnimatorFactory();
  16254. break;
  16255. }
  16256. }
  16257. }, {
  16258. key: 'connectedCallback',
  16259. value: function connectedCallback() {
  16260. var _this4 = this;
  16261. contentReady(this, function () {
  16262. _this4._setupListeners(true);
  16263. _this4._originalBackgroundColor = _this4.style.backgroundColor;
  16264. _this4.tapped = false;
  16265. });
  16266. }
  16267. }, {
  16268. key: 'disconnectedCallback',
  16269. value: function disconnectedCallback() {
  16270. this._setupListeners(false);
  16271. }
  16272. }, {
  16273. key: '_setupListeners',
  16274. value: function _setupListeners(add) {
  16275. var action = (add ? 'add' : 'remove') + 'EventListener';
  16276. util$1[action](this, 'touchstart', this._onTouch, { passive: true });
  16277. util$1[action](this, 'touchmove', this._onRelease, { passive: true });
  16278. this[action]('touchcancel', this._onRelease);
  16279. this[action]('touchend', this._onRelease);
  16280. this[action]('touchleave', this._onRelease);
  16281. this[action]('drag', this._onDrag);
  16282. this[action]('mousedown', this._onTouch);
  16283. this[action]('mouseup', this._onRelease);
  16284. this[action]('mouseout', this._onRelease);
  16285. if (this._top) {
  16286. this._top[action]('click', this.toggleExpansion);
  16287. }
  16288. }
  16289. }, {
  16290. key: '_onDrag',
  16291. value: function _onDrag(event) {
  16292. var gesture = event.gesture;
  16293. // Prevent vertical scrolling if the users pans left or right.
  16294. if (this.hasAttribute('lock-on-drag') && ['left', 'right'].indexOf(gesture.direction) > -1) {
  16295. gesture.preventDefault();
  16296. }
  16297. }
  16298. }, {
  16299. key: '_onTouch',
  16300. value: function _onTouch(e) {
  16301. var _this5 = this;
  16302. if (this.tapped || this !== e.target && (this._shouldIgnoreTap(e.target) || util$1.findParent(e.target, this._shouldIgnoreTap, function (p) {
  16303. return p === _this5;
  16304. }))) {
  16305. return; // Ignore tap
  16306. }
  16307. this.tapped = true;
  16308. var touchStyle = { transition: 'background-color 0.0s linear 0.02s, box-shadow 0.0s linear 0.02s' };
  16309. if (this.hasAttribute('tappable')) {
  16310. if (this.style.backgroundColor) {
  16311. this._originalBackgroundColor = this.style.backgroundColor;
  16312. }
  16313. touchStyle.backgroundColor = this.getAttribute('tap-background-color') || '#d9d9d9';
  16314. touchStyle.boxShadow = '0px -1px 0px 0px ' + touchStyle.backgroundColor;
  16315. }
  16316. styler(this, touchStyle);
  16317. }
  16318. }, {
  16319. key: '_onRelease',
  16320. value: function _onRelease() {
  16321. this.tapped = false;
  16322. this.style.backgroundColor = this._originalBackgroundColor || '';
  16323. styler.clear(this, 'transition boxShadow');
  16324. }
  16325. }, {
  16326. key: 'expandableContent',
  16327. get: function get$$1() {
  16328. return this.querySelector('.list-item__expandable-content');
  16329. }
  16330. }, {
  16331. key: 'expandChevron',
  16332. get: function get$$1() {
  16333. return this.querySelector('.list-item__expand-chevron');
  16334. }
  16335. }], [{
  16336. key: 'observedAttributes',
  16337. get: function get$$1() {
  16338. return ['modifier', 'class', 'ripple', 'animation'];
  16339. }
  16340. }]);
  16341. return ListItemElement;
  16342. }(BaseElement);
  16343. onsElements.ListItem = ListItemElement;
  16344. customElements.define('ons-list-item', ListItemElement);
  16345. /*
  16346. Copyright 2013-2015 ASIAL CORPORATION
  16347. Licensed under the Apache License, Version 2.0 (the "License");
  16348. you may not use this file except in compliance with the License.
  16349. You may obtain a copy of the License at
  16350. http://www.apache.org/licenses/LICENSE-2.0
  16351. Unless required by applicable law or agreed to in writing, software
  16352. distributed under the License is distributed on an "AS IS" BASIS,
  16353. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16354. See the License for the specific language governing permissions and
  16355. limitations under the License.
  16356. */
  16357. var defaultClassName$7 = 'list';
  16358. var scheme$11 = { '': 'list--*' };
  16359. /**
  16360. * @element ons-list
  16361. * @category list
  16362. * @modifier inset
  16363. * [en]Inset list that doesn't cover the whole width of the parent.[/en]
  16364. * [ja]親要素の画面いっぱいに広がらないリストを表示します。[/ja]
  16365. * @modifier noborder
  16366. * [en]A list with no borders at the top and bottom.[/en]
  16367. * [ja]リストの上下のボーダーが無いリストを表示します。[/ja]
  16368. * @description
  16369. * [en]Component to define a list, and the container for ons-list-item(s).[/en]
  16370. * [ja]リストを表現するためのコンポーネント。ons-list-itemのコンテナとして使用します。[/ja]
  16371. * @seealso ons-list-item
  16372. * [en]ons-list-item component[/en]
  16373. * [ja]ons-list-itemコンポーネント[/ja]
  16374. * @seealso ons-list-header
  16375. * [en]ons-list-header component[/en]
  16376. * [ja]ons-list-headerコンポーネント[/ja]
  16377. * @seealso ons-lazy-repeat
  16378. * [en]ons-lazy-repeat component[/en]
  16379. * [ja]ons-lazy-repeatコンポーネント[/ja]
  16380. * @codepen yxcCt
  16381. * @tutorial vanilla/Reference/list
  16382. * @example
  16383. * <ons-list>
  16384. * <ons-list-header>Header Text</ons-list-header>
  16385. * <ons-list-item>Item</ons-list-item>
  16386. * <ons-list-item>Item</ons-list-item>
  16387. * </ons-list>
  16388. */
  16389. var ListElement = function (_BaseElement) {
  16390. inherits(ListElement, _BaseElement);
  16391. /**
  16392. * @attribute modifier
  16393. * @type {String}
  16394. * @description
  16395. * [en]The appearance of the list.[/en]
  16396. * [ja]リストの表現を指定します。[/ja]
  16397. */
  16398. function ListElement() {
  16399. classCallCheck(this, ListElement);
  16400. var _this = possibleConstructorReturn(this, (ListElement.__proto__ || Object.getPrototypeOf(ListElement)).call(this));
  16401. _this._compile();
  16402. return _this;
  16403. }
  16404. createClass(ListElement, [{
  16405. key: '_compile',
  16406. value: function _compile() {
  16407. autoStyle.prepare(this);
  16408. this.classList.add(defaultClassName$7);
  16409. ModifierUtil.initModifier(this, scheme$11);
  16410. }
  16411. }, {
  16412. key: 'attributeChangedCallback',
  16413. value: function attributeChangedCallback(name, last, current) {
  16414. switch (name) {
  16415. case 'class':
  16416. util$1.restoreClass(this, defaultClassName$7, scheme$11);
  16417. break;
  16418. case 'modifier':
  16419. ModifierUtil.onModifierChanged(last, current, this, scheme$11);
  16420. break;
  16421. }
  16422. }
  16423. }], [{
  16424. key: 'observedAttributes',
  16425. get: function get$$1() {
  16426. return ['modifier', 'class'];
  16427. }
  16428. }]);
  16429. return ListElement;
  16430. }(BaseElement);
  16431. onsElements.List = ListElement;
  16432. customElements.define('ons-list', ListElement);
  16433. /*
  16434. Copyright 2013-2015 ASIAL CORPORATION
  16435. Licensed under the Apache License, Version 2.0 (the "License");
  16436. you may not use this file except in compliance with the License.
  16437. You may obtain a copy of the License at
  16438. http://www.apache.org/licenses/LICENSE-2.0
  16439. Unless required by applicable law or agreed to in writing, software
  16440. distributed under the License is distributed on an "AS IS" BASIS,
  16441. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16442. See the License for the specific language governing permissions and
  16443. limitations under the License.
  16444. */
  16445. var INPUT_ATTRIBUTES = ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'inputmode', 'max', 'maxlength', 'min', 'minlength', 'name', 'pattern', 'placeholder', 'readonly', 'required', 'size', 'step', 'validator', 'value'];
  16446. var BaseInputElement = function (_BaseElement) {
  16447. inherits(BaseInputElement, _BaseElement);
  16448. createClass(BaseInputElement, [{
  16449. key: '_update',
  16450. value: function _update() {} // Optionally implemented
  16451. }, {
  16452. key: '_scheme',
  16453. get: function get$$1() {
  16454. util$1.throwMember();
  16455. }
  16456. }, {
  16457. key: '_template',
  16458. get: function get$$1() {
  16459. util$1.throwMember();
  16460. }
  16461. }, {
  16462. key: 'type',
  16463. get: function get$$1() {
  16464. util$1.throwMember();
  16465. }
  16466. }]);
  16467. function BaseInputElement() {
  16468. classCallCheck(this, BaseInputElement);
  16469. var _this = possibleConstructorReturn(this, (BaseInputElement.__proto__ || Object.getPrototypeOf(BaseInputElement)).call(this));
  16470. if (_this.constructor === BaseInputElement) {
  16471. util$1.throwAbstract();
  16472. }
  16473. contentReady(_this, function () {
  16474. return _this._compile();
  16475. });
  16476. _this._boundDelegateEvent = _this._delegateEvent.bind(_this);
  16477. return _this;
  16478. }
  16479. createClass(BaseInputElement, [{
  16480. key: '_compile',
  16481. value: function _compile() {
  16482. autoStyle.prepare(this);
  16483. this._defaultClassName && this.classList.add(this._defaultClassName);
  16484. if (this.children.length !== 0) {
  16485. return;
  16486. }
  16487. this.appendChild(util$1.createFragment(this._template));
  16488. this._setInputId();
  16489. this._updateBoundAttributes();
  16490. ModifierUtil.initModifier(this, this._scheme);
  16491. }
  16492. }, {
  16493. key: '_updateBoundAttributes',
  16494. value: function _updateBoundAttributes() {
  16495. var _this2 = this;
  16496. INPUT_ATTRIBUTES.forEach(function (attr) {
  16497. if (_this2.hasAttribute(attr)) {
  16498. _this2._input.setAttribute(attr, _this2.getAttribute(attr));
  16499. } else {
  16500. _this2._input.removeAttribute(attr);
  16501. }
  16502. });
  16503. this._update();
  16504. }
  16505. }, {
  16506. key: '_delegateEvent',
  16507. value: function _delegateEvent(event) {
  16508. var e = new CustomEvent(event.type, {
  16509. bubbles: false,
  16510. cancelable: true
  16511. });
  16512. return this.dispatchEvent(e);
  16513. }
  16514. }, {
  16515. key: '_setInputId',
  16516. value: function _setInputId() {
  16517. if (this.hasAttribute('input-id')) {
  16518. this._input.id = this.getAttribute('input-id');
  16519. }
  16520. }
  16521. }, {
  16522. key: 'connectedCallback',
  16523. value: function connectedCallback() {
  16524. var _this3 = this;
  16525. contentReady(this, function () {
  16526. _this3._input.addEventListener('focus', _this3._boundDelegateEvent);
  16527. _this3._input.addEventListener('blur', _this3._boundDelegateEvent);
  16528. });
  16529. }
  16530. }, {
  16531. key: 'disconnectedCallback',
  16532. value: function disconnectedCallback() {
  16533. var _this4 = this;
  16534. contentReady(this, function () {
  16535. _this4._input.removeEventListener('focus', _this4._boundDelegateEvent);
  16536. _this4._input.removeEventListener('blur', _this4._boundDelegateEvent);
  16537. });
  16538. }
  16539. }, {
  16540. key: 'attributeChangedCallback',
  16541. value: function attributeChangedCallback(name, last, current) {
  16542. var _this5 = this;
  16543. switch (name) {
  16544. case 'modifier':
  16545. contentReady(this, function () {
  16546. return ModifierUtil.onModifierChanged(last, current, _this5, _this5._scheme);
  16547. });
  16548. break;
  16549. case 'input-id':
  16550. contentReady(this, function () {
  16551. return _this5._setInputId();
  16552. });
  16553. break;
  16554. case 'class':
  16555. util$1.restoreClass(this, this._defaultClassName, this._scheme);
  16556. break;
  16557. }
  16558. if (INPUT_ATTRIBUTES.indexOf(name) >= 0) {
  16559. contentReady(this, function () {
  16560. return _this5._updateBoundAttributes();
  16561. });
  16562. }
  16563. }
  16564. }, {
  16565. key: '_defaultClassName',
  16566. get: function get$$1() {
  16567. return '';
  16568. }
  16569. }, {
  16570. key: '_input',
  16571. get: function get$$1() {
  16572. return this.querySelector('input');
  16573. }
  16574. }, {
  16575. key: 'value',
  16576. get: function get$$1() {
  16577. return this._input === null ? this.getAttribute('value') : this._input.value;
  16578. },
  16579. set: function set$$1(val) {
  16580. var _this6 = this;
  16581. contentReady(this, function () {
  16582. if (val instanceof Date) {
  16583. val = val.toISOString().substring(0, 10);
  16584. }
  16585. _this6._input.value = val;
  16586. _this6._update();
  16587. });
  16588. }
  16589. }, {
  16590. key: 'disabled',
  16591. set: function set$$1(value) {
  16592. return util$1.toggleAttribute(this, 'disabled', value);
  16593. },
  16594. get: function get$$1() {
  16595. return this.hasAttribute('disabled');
  16596. }
  16597. }], [{
  16598. key: 'observedAttributes',
  16599. get: function get$$1() {
  16600. return ['modifier', 'input-id', 'class'].concat(INPUT_ATTRIBUTES);
  16601. }
  16602. }]);
  16603. return BaseInputElement;
  16604. }(BaseElement);
  16605. /*
  16606. Copyright 2013-2015 ASIAL CORPORATION
  16607. Licensed under the Apache License, Version 2.0 (the "License");
  16608. you may not use this file except in compliance with the License.
  16609. You may obtain a copy of the License at
  16610. http://www.apache.org/licenses/LICENSE-2.0
  16611. Unless required by applicable law or agreed to in writing, software
  16612. distributed under the License is distributed on an "AS IS" BASIS,
  16613. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16614. See the License for the specific language governing permissions and
  16615. limitations under the License.
  16616. */
  16617. var scheme$12 = {
  16618. '.text-input': 'text-input--*',
  16619. '.text-input__label': 'text-input--*__label'
  16620. };
  16621. /**
  16622. * @element ons-input
  16623. * @category form
  16624. * @modifier material
  16625. * [en]Displays a Material Design input.[/en]
  16626. * [ja][/ja]
  16627. * @modifier underbar
  16628. * [en]Displays a horizontal line underneath a text input.[/en]
  16629. * [ja][/ja]
  16630. * @modifier transparent
  16631. * [en]Displays a transparent input. Works for Material Design.[/en]
  16632. * [ja][/ja]
  16633. * @description
  16634. * [en]
  16635. * An input element. The `type` attribute can be used to change the input type. All text input types are supported.
  16636. *
  16637. * The component will automatically render as a Material Design input on Android devices.
  16638. *
  16639. * Most attributes that can be used for a normal `<input>` element can also be used on the `<ons-input>` element.
  16640. * [/en]
  16641. * [ja][/ja]
  16642. * @tutorial vanilla/Reference/input
  16643. * @seealso ons-checkbox
  16644. * [en]The `<ons-checkbox>` element is used to display a checkbox.[/en]
  16645. * [ja][/ja]
  16646. * @seealso ons-radio
  16647. * [en]The `<ons-radio>` element is used to display a radio button.[/en]
  16648. * [ja][/ja]
  16649. * @seealso ons-range
  16650. * [en]The `<ons-range>` element is used to display a range slider.[/en]
  16651. * [ja][/ja]
  16652. * @seealso ons-switch
  16653. * [en]The `<ons-switch>` element is used to display a draggable toggle switch.[/en]
  16654. * [ja][/ja]
  16655. * @seealso ons-select
  16656. * [en]The `<ons-select>` element is used to display a select box.[/en]
  16657. * [ja][/ja]
  16658. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  16659. * @example
  16660. * <ons-input placeholder="Username" float></ons-input>
  16661. */
  16662. var InputElement = function (_BaseInputElement) {
  16663. inherits(InputElement, _BaseInputElement);
  16664. function InputElement() {
  16665. classCallCheck(this, InputElement);
  16666. var _this = possibleConstructorReturn(this, (InputElement.__proto__ || Object.getPrototypeOf(InputElement)).call(this));
  16667. _this._boundOnInput = _this._update.bind(_this);
  16668. _this._boundOnFocusin = _this._update.bind(_this);
  16669. return _this;
  16670. }
  16671. /* Inherited props */
  16672. createClass(InputElement, [{
  16673. key: '_update',
  16674. value: function _update() {
  16675. this._updateLabel();
  16676. this._updateLabelClass();
  16677. }
  16678. }, {
  16679. key: '_updateLabel',
  16680. /* Own props */
  16681. value: function _updateLabel() {
  16682. var label = this.getAttribute('placeholder') || '';
  16683. if (typeof this._helper.textContent !== 'undefined') {
  16684. this._helper.textContent = label;
  16685. } else {
  16686. this._helper.innerText = label;
  16687. }
  16688. }
  16689. }, {
  16690. key: '_updateLabelClass',
  16691. value: function _updateLabelClass() {
  16692. if (this.value === '') {
  16693. this._helper.classList.remove('text-input--material__label--active');
  16694. } else {
  16695. this._helper.classList.add('text-input--material__label--active');
  16696. }
  16697. }
  16698. }, {
  16699. key: 'connectedCallback',
  16700. value: function connectedCallback() {
  16701. var _this2 = this;
  16702. get(InputElement.prototype.__proto__ || Object.getPrototypeOf(InputElement.prototype), 'connectedCallback', this).call(this);
  16703. contentReady(this, function () {
  16704. _this2._input.addEventListener('input', _this2._boundOnInput);
  16705. _this2._input.addEventListener('focusin', _this2._boundOnFocusin);
  16706. });
  16707. var type = this.getAttribute('type');
  16708. if (['checkbox', 'radio'].indexOf(type) >= 0) {
  16709. util$1.warn('Warn: <ons-input type="' + type + '"> is deprecated since v2.4.0. Use <ons-' + type + '> instead.');
  16710. }
  16711. }
  16712. }, {
  16713. key: 'disconnectedCallback',
  16714. value: function disconnectedCallback() {
  16715. var _this3 = this;
  16716. get(InputElement.prototype.__proto__ || Object.getPrototypeOf(InputElement.prototype), 'disconnectedCallback', this).call(this);
  16717. contentReady(this, function () {
  16718. _this3._input.removeEventListener('input', _this3._boundOnInput);
  16719. _this3._input.removeEventListener('focusin', _this3._boundOnFocusin);
  16720. });
  16721. }
  16722. }, {
  16723. key: 'attributeChangedCallback',
  16724. value: function attributeChangedCallback(name, last, current) {
  16725. var _this4 = this;
  16726. switch (name) {
  16727. case 'type':
  16728. contentReady(this, function () {
  16729. return _this4._input.setAttribute('type', _this4.type);
  16730. });
  16731. break;
  16732. default:
  16733. get(InputElement.prototype.__proto__ || Object.getPrototypeOf(InputElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  16734. }
  16735. }
  16736. /**
  16737. * @attribute placeholder
  16738. * @type {String}
  16739. * @description
  16740. * [en]Placeholder text. In Material Design, this placeholder will be a floating label.[/en]
  16741. * [ja][/ja]
  16742. */
  16743. /**
  16744. * @attribute float
  16745. * @description
  16746. * [en]If this attribute is present, the placeholder will be animated in Material Design.[/en]
  16747. * [ja]この属性が設定された時、ラベルはアニメーションするようになります。[/ja]
  16748. */
  16749. /**
  16750. * @attribute type
  16751. * @type {String}
  16752. * @description
  16753. * [en]
  16754. * Specify the input type. This is the same as the "type" attribute for normal inputs. It expects strict text types such as `text`, `password`, etc. For checkbox, radio button, select or range, please have a look at the corresponding elements.
  16755. *
  16756. * Please take a look at [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type) for an exhaustive list of possible values. Depending on the platform and browser version some of these might not work.
  16757. * [/en]
  16758. * [ja][/ja]
  16759. */
  16760. /**
  16761. * @attribute input-id
  16762. * @type {String}
  16763. * @description
  16764. * [en]Specify the "id" attribute of the inner `<input>` element. This is useful when using `<label for="...">` elements.[/en]
  16765. * [ja][/ja]
  16766. */
  16767. /**
  16768. * @property value
  16769. * @type {String}
  16770. * @description
  16771. * [en]The current value of the input.[/en]
  16772. * [ja][/ja]
  16773. */
  16774. /**
  16775. * @property disabled
  16776. * @type {Boolean}
  16777. * @description
  16778. * [en]Whether the input is disabled or not.[/en]
  16779. * [ja]無効化されている場合に`true`。[/ja]
  16780. */
  16781. }, {
  16782. key: '_scheme',
  16783. get: function get$$1() {
  16784. return scheme$12;
  16785. }
  16786. }, {
  16787. key: '_template',
  16788. get: function get$$1() {
  16789. return '\n <input type="' + this.type + '" class="text-input">\n <span class="text-input__label"></span>\n ';
  16790. }
  16791. }, {
  16792. key: 'type',
  16793. get: function get$$1() {
  16794. var type = this.getAttribute('type');
  16795. return ['checkbox', 'radio'].indexOf(type) < 0 && type || 'text';
  16796. }
  16797. }, {
  16798. key: '_helper',
  16799. get: function get$$1() {
  16800. return this.querySelector('span');
  16801. }
  16802. }], [{
  16803. key: 'observedAttributes',
  16804. get: function get$$1() {
  16805. return [].concat(toConsumableArray(get(InputElement.__proto__ || Object.getPrototypeOf(InputElement), 'observedAttributes', this)), ['type']);
  16806. }
  16807. }]);
  16808. return InputElement;
  16809. }(BaseInputElement);
  16810. onsElements.Input = InputElement;
  16811. customElements.define('ons-input', InputElement);
  16812. /*
  16813. Copyright 2013-2015 ASIAL CORPORATION
  16814. Licensed under the Apache License, Version 2.0 (the "License");
  16815. you may not use this file except in compliance with the License.
  16816. You may obtain a copy of the License at
  16817. http://www.apache.org/licenses/LICENSE-2.0
  16818. Unless required by applicable law or agreed to in writing, software
  16819. distributed under the License is distributed on an "AS IS" BASIS,
  16820. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16821. See the License for the specific language governing permissions and
  16822. limitations under the License.
  16823. */
  16824. var BaseCheckboxElement = function (_BaseInputElement) {
  16825. inherits(BaseCheckboxElement, _BaseInputElement);
  16826. function BaseCheckboxElement() {
  16827. classCallCheck(this, BaseCheckboxElement);
  16828. var _this = possibleConstructorReturn(this, (BaseCheckboxElement.__proto__ || Object.getPrototypeOf(BaseCheckboxElement)).call(this));
  16829. if (_this.constructor === BaseCheckboxElement) {
  16830. util.throwAbstract();
  16831. }
  16832. contentReady(_this, function () {
  16833. _this.attributeChangedCallback('checked', null, _this.getAttribute('checked'));
  16834. });
  16835. return _this;
  16836. }
  16837. /* Inherited props */
  16838. createClass(BaseCheckboxElement, [{
  16839. key: 'attributeChangedCallback',
  16840. value: function attributeChangedCallback(name, last, current) {
  16841. switch (name) {
  16842. case 'checked':
  16843. this.checked = current !== null;
  16844. break;
  16845. default:
  16846. get(BaseCheckboxElement.prototype.__proto__ || Object.getPrototypeOf(BaseCheckboxElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  16847. }
  16848. }
  16849. }, {
  16850. key: '_template',
  16851. get: function get$$1() {
  16852. return '\n <input type="' + this.type + '" class="' + this._defaultClassName + '__input">\n <span class="' + this._defaultClassName + '__checkmark"></span>\n ';
  16853. }
  16854. /* Own props */
  16855. }, {
  16856. key: '_helper',
  16857. get: function get$$1() {
  16858. return this.querySelector('span');
  16859. }
  16860. }, {
  16861. key: 'checked',
  16862. get: function get$$1() {
  16863. return this._input.checked;
  16864. },
  16865. set: function set$$1(val) {
  16866. var _this2 = this;
  16867. contentReady(this, function () {
  16868. _this2._input.checked = val;
  16869. });
  16870. }
  16871. }], [{
  16872. key: 'observedAttributes',
  16873. get: function get$$1() {
  16874. return [].concat(toConsumableArray(get(BaseCheckboxElement.__proto__ || Object.getPrototypeOf(BaseCheckboxElement), 'observedAttributes', this)), ['checked']);
  16875. }
  16876. }]);
  16877. return BaseCheckboxElement;
  16878. }(BaseInputElement);
  16879. /*
  16880. Copyright 2013-2015 ASIAL CORPORATION
  16881. Licensed under the Apache License, Version 2.0 (the "License");
  16882. you may not use this file except in compliance with the License.
  16883. You may obtain a copy of the License at
  16884. http://www.apache.org/licenses/LICENSE-2.0
  16885. Unless required by applicable law or agreed to in writing, software
  16886. distributed under the License is distributed on an "AS IS" BASIS,
  16887. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16888. See the License for the specific language governing permissions and
  16889. limitations under the License.
  16890. */
  16891. var scheme$13 = {
  16892. '.checkbox': 'checkbox--*',
  16893. '.checkbox__input': 'checkbox--*__input',
  16894. '.checkbox__checkmark': 'checkbox--*__checkmark'
  16895. };
  16896. /**
  16897. * @element ons-checkbox
  16898. * @category form
  16899. * @modifier material
  16900. * [en]Displays a Material Design checkbox.[/en]
  16901. * [ja][/ja]
  16902. * @modifier noborder
  16903. * [en]iOS borderless checkbox.[/en]
  16904. * [ja][/ja]
  16905. * @description
  16906. * [en]
  16907. * A checkbox element. The component will automatically render as a Material Design checkbox on Android devices.
  16908. *
  16909. * Most attributes that can be used for a normal `<input type="checkbox">` element can also be used on the `<ons-checkbox>` element.
  16910. * [/en]
  16911. * [ja][/ja]
  16912. * @tutorial vanilla/Reference/checkbox
  16913. * @seealso ons-switch
  16914. * [en]The `<ons-switch>` element is used to display a draggable toggle switch.[/en]
  16915. * [ja][/ja]
  16916. * @seealso ons-radio
  16917. * [en]The `<ons-radio>` element is used to display a radio button.[/en]
  16918. * [ja][/ja]
  16919. * @seealso ons-input
  16920. * [en]The `<ons-input>` element is used to display a text input.[/en]
  16921. * [ja][/ja]
  16922. * @seealso ons-search-input
  16923. * [en]The `<ons-search-input>` element is used to display a search input.[/en]
  16924. * [ja][/ja]
  16925. * @seealso ons-range
  16926. * [en]The `<ons-range>` element is used to display a range slider.[/en]
  16927. * [ja][/ja]
  16928. * @seealso ons-select
  16929. * [en]The `<ons-select>` element is used to display a select box.[/en]
  16930. * [ja][/ja]
  16931. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  16932. * @example
  16933. * <ons-checkbox checked></ons-checkbox>
  16934. */
  16935. var CheckboxElement = function (_BaseCheckboxElement) {
  16936. inherits(CheckboxElement, _BaseCheckboxElement);
  16937. function CheckboxElement() {
  16938. classCallCheck(this, CheckboxElement);
  16939. return possibleConstructorReturn(this, (CheckboxElement.__proto__ || Object.getPrototypeOf(CheckboxElement)).apply(this, arguments));
  16940. }
  16941. createClass(CheckboxElement, [{
  16942. key: '_scheme',
  16943. get: function get$$1() {
  16944. return scheme$13;
  16945. }
  16946. }, {
  16947. key: '_defaultClassName',
  16948. get: function get$$1() {
  16949. return 'checkbox';
  16950. }
  16951. }, {
  16952. key: 'type',
  16953. get: function get$$1() {
  16954. return 'checkbox';
  16955. }
  16956. /**
  16957. * @attribute input-id
  16958. * @type {String}
  16959. * @description
  16960. * [en]Specify the "id" attribute of the inner `<input>` element. This is useful when using `<label for="...">` elements.[/en]
  16961. * [ja][/ja]
  16962. */
  16963. /**
  16964. * @property value
  16965. * @type {String}
  16966. * @description
  16967. * [en]The current value of the checkbox.[/en]
  16968. * [ja][/ja]
  16969. */
  16970. /**
  16971. * @property checked
  16972. * @type {Boolean}
  16973. * @description
  16974. * [en]Whether the checkbox is checked or not.[/en]
  16975. * [ja][/ja]
  16976. */
  16977. /**
  16978. * @property disabled
  16979. * @type {Boolean}
  16980. * @description
  16981. * [en]Whether the checkbox is disabled or not.[/en]
  16982. * [ja]無効化されている場合に`true`。[/ja]
  16983. */
  16984. }]);
  16985. return CheckboxElement;
  16986. }(BaseCheckboxElement);
  16987. onsElements.Checkbox = CheckboxElement;
  16988. customElements.define('ons-checkbox', CheckboxElement);
  16989. /*
  16990. Copyright 2013-2015 ASIAL CORPORATION
  16991. Licensed under the Apache License, Version 2.0 (the "License");
  16992. you may not use this file except in compliance with the License.
  16993. You may obtain a copy of the License at
  16994. http://www.apache.org/licenses/LICENSE-2.0
  16995. Unless required by applicable law or agreed to in writing, software
  16996. distributed under the License is distributed on an "AS IS" BASIS,
  16997. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16998. See the License for the specific language governing permissions and
  16999. limitations under the License.
  17000. */
  17001. var scheme$14 = {
  17002. '.radio-button': 'radio-button--*',
  17003. '.radio-button__input': 'radio-button--*__input',
  17004. '.radio-button__checkmark': 'radio-button--*__checkmark'
  17005. };
  17006. /**
  17007. * @element ons-radio
  17008. * @category form
  17009. * @modifier material
  17010. * [en]Displays a Material Design radio button.[/en]
  17011. * [ja][/ja]
  17012. * @description
  17013. * [en]
  17014. * A radio button element. The component will automatically render as a Material Design radio button on Android devices.
  17015. *
  17016. * Most attributes that can be used for a normal `<input type="radio">` element can also be used on the `<ons-radio>` element.
  17017. * [/en]
  17018. * [ja][/ja]
  17019. * @tutorial vanilla/Reference/radio
  17020. * @seealso ons-select
  17021. * [en]The `<ons-select>` element is used to display a select box.[/en]
  17022. * [ja][/ja]
  17023. * @seealso ons-checkbox
  17024. * [en]The `<ons-checkbox>` element is used to display a checkbox.[/en]
  17025. * [ja][/ja]
  17026. * @seealso ons-switch
  17027. * [en]The `<ons-switch>` element is used to display a draggable toggle switch.[/en]
  17028. * [ja][/ja]
  17029. * @seealso ons-input
  17030. * [en]The `<ons-input>` element is used to display a text input.[/en]
  17031. * [ja][/ja]
  17032. * @seealso ons-search-input
  17033. * [en]The `<ons-search-input>` element is used to display a search input.[/en]
  17034. * [ja][/ja]
  17035. * @seealso ons-range
  17036. * [en]The `<ons-range>` element is used to display a range slider.[/en]
  17037. * [ja][/ja]
  17038. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  17039. * @example
  17040. * <ons-radio checked></ons-radio>
  17041. */
  17042. var RadioElement = function (_BaseCheckboxElement) {
  17043. inherits(RadioElement, _BaseCheckboxElement);
  17044. function RadioElement() {
  17045. classCallCheck(this, RadioElement);
  17046. return possibleConstructorReturn(this, (RadioElement.__proto__ || Object.getPrototypeOf(RadioElement)).apply(this, arguments));
  17047. }
  17048. createClass(RadioElement, [{
  17049. key: '_scheme',
  17050. get: function get$$1() {
  17051. return scheme$14;
  17052. }
  17053. }, {
  17054. key: '_defaultClassName',
  17055. get: function get$$1() {
  17056. return 'radio-button';
  17057. }
  17058. }, {
  17059. key: 'type',
  17060. get: function get$$1() {
  17061. return 'radio';
  17062. }
  17063. /**
  17064. * @attribute input-id
  17065. * @type {String}
  17066. * @description
  17067. * [en]Specify the "id" attribute of the inner `<input>` element. This is useful when using `<label for="...">` elements.[/en]
  17068. * [ja][/ja]
  17069. */
  17070. /**
  17071. * @property value
  17072. * @type {String}
  17073. * @description
  17074. * [en]The current value of the radio button.[/en]
  17075. * [ja][/ja]
  17076. */
  17077. /**
  17078. * @property checked
  17079. * @type {Boolean}
  17080. * @description
  17081. * [en]Whether the radio button is checked or not.[/en]
  17082. * [ja][/ja]
  17083. */
  17084. /**
  17085. * @property disabled
  17086. * @type {Boolean}
  17087. * @description
  17088. * [en]Whether the radio button is disabled or not.[/en]
  17089. * [ja]無効化されている場合に`true`。[/ja]
  17090. */
  17091. }]);
  17092. return RadioElement;
  17093. }(BaseCheckboxElement);
  17094. onsElements.Radio = RadioElement;
  17095. customElements.define('ons-radio', RadioElement);
  17096. /*
  17097. Copyright 2013-2015 ASIAL CORPORATION
  17098. Licensed under the Apache License, Version 2.0 (the "License");
  17099. you may not use this file except in compliance with the License.
  17100. You may obtain a copy of the License at
  17101. http://www.apache.org/licenses/LICENSE-2.0
  17102. Unless required by applicable law or agreed to in writing, software
  17103. distributed under the License is distributed on an "AS IS" BASIS,
  17104. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17105. See the License for the specific language governing permissions and
  17106. limitations under the License.
  17107. */
  17108. var scheme$15 = {
  17109. '.search-input': 'search-input--*'
  17110. };
  17111. /**
  17112. * @element ons-search-input
  17113. * @category form
  17114. * @modifier material
  17115. * [en]Displays a Material Design search input.[/en]
  17116. * [ja][/ja]
  17117. * @description
  17118. * [en]
  17119. * A search input element. The component will automatically render as a Material Design search input on Android devices.
  17120. *
  17121. * Most attributes that can be used for a normal `<input>` element can also be used on the `<ons-search-input>` element.
  17122. * [/en]
  17123. * [ja][/ja]
  17124. * @tutorial vanilla/Reference/search-input
  17125. * @seealso ons-input
  17126. * [en]The `<ons-input>` element is used to display a text input.[/en]
  17127. * [ja][/ja]
  17128. * @seealso ons-range
  17129. * [en]The `<ons-range>` element is used to display a range slider.[/en]
  17130. * [ja][/ja]
  17131. * @seealso ons-switch
  17132. * [en]The `<ons-switch>` element is used to display a draggable toggle switch.[/en]
  17133. * [ja][/ja]
  17134. * @seealso ons-select
  17135. * [en]The `<ons-select>` element is used to display a select box.[/en]
  17136. * [ja][/ja]
  17137. * @seealso ons-checkbox
  17138. * [en]The `<ons-checkbox>` element is used to display a checkbox.[/en]
  17139. * [ja][/ja]
  17140. * @seealso ons-radio
  17141. * [en]The `<ons-radio>` element is used to display a radio button.[/en]
  17142. * [ja][/ja]
  17143. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  17144. * @example
  17145. * <ons-search-input placeholder="Search"></ons-search-input>
  17146. */
  17147. var SearchInputElement = function (_BaseInputElement) {
  17148. inherits(SearchInputElement, _BaseInputElement);
  17149. function SearchInputElement() {
  17150. classCallCheck(this, SearchInputElement);
  17151. return possibleConstructorReturn(this, (SearchInputElement.__proto__ || Object.getPrototypeOf(SearchInputElement)).apply(this, arguments));
  17152. }
  17153. createClass(SearchInputElement, [{
  17154. key: '_scheme',
  17155. get: function get$$1() {
  17156. return scheme$15;
  17157. }
  17158. }, {
  17159. key: '_template',
  17160. get: function get$$1() {
  17161. return '\n <input type="' + this.type + '" class="search-input">\n ';
  17162. }
  17163. }, {
  17164. key: 'type',
  17165. get: function get$$1() {
  17166. return 'search';
  17167. }
  17168. /**
  17169. * @attribute input-id
  17170. * @type {String}
  17171. * @description
  17172. * [en]Specify the "id" attribute of the inner `<input>` element. This is useful when using `<label for="...">` elements.[/en]
  17173. * [ja][/ja]
  17174. */
  17175. /**
  17176. * @property value
  17177. * @type {String}
  17178. * @description
  17179. * [en]The current value of the input.[/en]
  17180. * [ja][/ja]
  17181. */
  17182. /**
  17183. * @property disabled
  17184. * @type {Boolean}
  17185. * @description
  17186. * [en]Whether the input is disabled or not.[/en]
  17187. * [ja]無効化されている場合に`true`。[/ja]
  17188. */
  17189. }]);
  17190. return SearchInputElement;
  17191. }(BaseInputElement);
  17192. onsElements.SearchInput = SearchInputElement;
  17193. customElements.define('ons-search-input', SearchInputElement);
  17194. /*
  17195. Copyright 2013-2015 ASIAL CORPORATION
  17196. Licensed under the Apache License, Version 2.0 (the "License");
  17197. you may not use this file except in compliance with the License.
  17198. You may obtain a copy of the License at
  17199. http://www.apache.org/licenses/LICENSE-2.0
  17200. Unless required by applicable law or agreed to in writing, software
  17201. distributed under the License is distributed on an "AS IS" BASIS,
  17202. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17203. See the License for the specific language governing permissions and
  17204. limitations under the License.
  17205. */
  17206. var ModalAnimator = function (_BaseAnimator) {
  17207. inherits(ModalAnimator, _BaseAnimator);
  17208. /**
  17209. * @param {Object} options
  17210. * @param {String} options.timing
  17211. * @param {Number} options.duration
  17212. * @param {Number} options.delay
  17213. */
  17214. function ModalAnimator() {
  17215. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17216. _ref$timing = _ref.timing,
  17217. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  17218. _ref$delay = _ref.delay,
  17219. delay = _ref$delay === undefined ? 0 : _ref$delay,
  17220. _ref$duration = _ref.duration,
  17221. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  17222. classCallCheck(this, ModalAnimator);
  17223. return possibleConstructorReturn(this, (ModalAnimator.__proto__ || Object.getPrototypeOf(ModalAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  17224. }
  17225. /**
  17226. * @param {HTMLElement} modal
  17227. * @param {Function} callback
  17228. */
  17229. createClass(ModalAnimator, [{
  17230. key: 'show',
  17231. value: function show(modal, callback) {
  17232. callback();
  17233. }
  17234. /**
  17235. * @param {HTMLElement} modal
  17236. * @param {Function} callback
  17237. */
  17238. }, {
  17239. key: 'hide',
  17240. value: function hide(modal, callback) {
  17241. callback();
  17242. }
  17243. }]);
  17244. return ModalAnimator;
  17245. }(BaseAnimator);
  17246. /*
  17247. Copyright 2013-2015 ASIAL CORPORATION
  17248. Licensed under the Apache License, Version 2.0 (the "License");
  17249. you may not use this file except in compliance with the License.
  17250. You may obtain a copy of the License at
  17251. http://www.apache.org/licenses/LICENSE-2.0
  17252. Unless required by applicable law or agreed to in writing, software
  17253. distributed under the License is distributed on an "AS IS" BASIS,
  17254. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17255. See the License for the specific language governing permissions and
  17256. limitations under the License.
  17257. */
  17258. /**
  17259. * iOS style animator for dialog.
  17260. */
  17261. var FadeModalAnimator = function (_ModalAnimator) {
  17262. inherits(FadeModalAnimator, _ModalAnimator);
  17263. function FadeModalAnimator() {
  17264. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17265. _ref$timing = _ref.timing,
  17266. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  17267. _ref$delay = _ref.delay,
  17268. delay = _ref$delay === undefined ? 0 : _ref$delay,
  17269. _ref$duration = _ref.duration,
  17270. duration = _ref$duration === undefined ? 0.3 : _ref$duration;
  17271. classCallCheck(this, FadeModalAnimator);
  17272. return possibleConstructorReturn(this, (FadeModalAnimator.__proto__ || Object.getPrototypeOf(FadeModalAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  17273. }
  17274. /**
  17275. * @param {HTMLElement} modal
  17276. * @param {Function} callback
  17277. */
  17278. createClass(FadeModalAnimator, [{
  17279. key: 'show',
  17280. value: function show(modal, callback) {
  17281. callback = callback ? callback : function () {};
  17282. Animit(modal, this.def).default({ opacity: 0 }, { opacity: 1 }).queue(function (done) {
  17283. callback();
  17284. done();
  17285. }).play();
  17286. }
  17287. /**
  17288. * @param {HTMLElement} modal
  17289. * @param {Function} callback
  17290. */
  17291. }, {
  17292. key: 'hide',
  17293. value: function hide(modal, callback) {
  17294. callback = callback ? callback : function () {};
  17295. Animit(modal, this.def).default({ opacity: 1 }, { opacity: 0 }).queue(function (done) {
  17296. callback();
  17297. done();
  17298. }).play();
  17299. }
  17300. }]);
  17301. return FadeModalAnimator;
  17302. }(ModalAnimator);
  17303. /*
  17304. Copyright 2013-2015 ASIAL CORPORATION
  17305. Licensed under the Apache License, Version 2.0 (the "License");
  17306. you may not use this file except in compliance with the License.
  17307. You may obtain a copy of the License at
  17308. http://www.apache.org/licenses/LICENSE-2.0
  17309. Unless required by applicable law or agreed to in writing, software
  17310. distributed under the License is distributed on an "AS IS" BASIS,
  17311. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17312. See the License for the specific language governing permissions and
  17313. limitations under the License.
  17314. */
  17315. /**
  17316. * iOS style animator for modal.
  17317. */
  17318. var LiftModalAnimator = function (_ModalAnimator) {
  17319. inherits(LiftModalAnimator, _ModalAnimator);
  17320. function LiftModalAnimator() {
  17321. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17322. _ref$timing = _ref.timing,
  17323. timing = _ref$timing === undefined ? 'cubic-bezier( .1, .7, .1, 1)' : _ref$timing,
  17324. _ref$delay = _ref.delay,
  17325. delay = _ref$delay === undefined ? 0 : _ref$delay,
  17326. _ref$duration = _ref.duration,
  17327. duration = _ref$duration === undefined ? 0.4 : _ref$duration;
  17328. classCallCheck(this, LiftModalAnimator);
  17329. return possibleConstructorReturn(this, (LiftModalAnimator.__proto__ || Object.getPrototypeOf(LiftModalAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  17330. }
  17331. /**
  17332. * @param {HTMLElement} modal
  17333. * @param {Function} callback
  17334. */
  17335. createClass(LiftModalAnimator, [{
  17336. key: 'show',
  17337. value: function show(modal, callback) {
  17338. callback = callback ? callback : function () {};
  17339. Animit(modal, this.def).default({ transform: 'translate3d(0, 100%, 0)' }, { transform: 'translate3d(0, 0, 0)' }).queue(function (done) {
  17340. callback();
  17341. done();
  17342. }).play();
  17343. }
  17344. /**
  17345. * @param {HTMLElement} modal
  17346. * @param {Function} callback
  17347. */
  17348. }, {
  17349. key: 'hide',
  17350. value: function hide(modal, callback) {
  17351. callback = callback ? callback : function () {};
  17352. Animit(modal, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(0, 100%, 0)' }).queue(function (done) {
  17353. callback();
  17354. done();
  17355. }).play();
  17356. }
  17357. }]);
  17358. return LiftModalAnimator;
  17359. }(ModalAnimator);
  17360. /*
  17361. Copyright 2013-2015 ASIAL CORPORATION
  17362. Licensed under the Apache License, Version 2.0 (the "License");
  17363. you may not use this file except in compliance with the License.
  17364. You may obtain a copy of the License at
  17365. http://www.apache.org/licenses/LICENSE-2.0
  17366. Unless required by applicable law or agreed to in writing, software
  17367. distributed under the License is distributed on an "AS IS" BASIS,
  17368. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17369. See the License for the specific language governing permissions and
  17370. limitations under the License.
  17371. */
  17372. var scheme$16 = {
  17373. '': 'modal--*',
  17374. 'modal__content': 'modal--*__content'
  17375. };
  17376. var defaultClassName$8 = 'modal';
  17377. var _animatorDict$4 = {
  17378. 'default': ModalAnimator,
  17379. 'fade': FadeModalAnimator,
  17380. 'lift': LiftModalAnimator,
  17381. 'none': ModalAnimator
  17382. };
  17383. /**
  17384. * @element ons-modal
  17385. * @category dialog
  17386. * @description
  17387. * [en]
  17388. * Modal component that masks current screen. Underlying components are not subject to any events while the modal component is shown.
  17389. *
  17390. * This component can be used to block user input while some operation is running or to show some information to the user.
  17391. * [/en]
  17392. * [ja]
  17393. * 画面全体をマスクするモーダル用コンポーネントです。下側にあるコンポーネントは、
  17394. * モーダルが表示されている間はイベント通知が行われません。
  17395. * [/ja]
  17396. * @seealso ons-dialog
  17397. * [en]The `<ons-dialog>` component can be used to create a modal dialog.[/en]
  17398. * [ja][/ja]
  17399. * @codepen devIg
  17400. * @tutorial vanilla/reference/modal
  17401. * @example
  17402. * <ons-modal id="modal">
  17403. * Modal content
  17404. * </ons-modal>
  17405. * <script>
  17406. * var modal = document.getElementById('modal');
  17407. * modal.show();
  17408. * </script>
  17409. */
  17410. var ModalElement = function (_BaseDialogElement) {
  17411. inherits(ModalElement, _BaseDialogElement);
  17412. /**
  17413. * @event preshow
  17414. * @description
  17415. * [en]Fired just before the modal is displayed.[/en]
  17416. * [ja]モーダルが表示される直前に発火します。[/ja]
  17417. * @param {Object} event [en]Event object.[/en]
  17418. * @param {Object} event.modal
  17419. * [en]Component object.[/en]
  17420. * [ja]コンポーネントのオブジェクト。[/ja]
  17421. * @param {Function} event.cancel
  17422. * [en]Execute this function to stop the modal from being shown.[/en]
  17423. * [ja]この関数を実行すると、ダイアログの表示がキャンセルされます。[/ja]
  17424. */
  17425. /**
  17426. * @event postshow
  17427. * @description
  17428. * [en]Fired just after the modal is displayed.[/en]
  17429. * [ja]モーダルが表示された直後に発火します。[/ja]
  17430. * @param {Object} event [en]Event object.[/en]
  17431. * @param {Object} event.modal
  17432. * [en]Component object.[/en]
  17433. * [ja]コンポーネントのオブジェクト。[/ja]
  17434. */
  17435. /**
  17436. * @event prehide
  17437. * @description
  17438. * [en]Fired just before the modal is hidden.[/en]
  17439. * [ja]モーダルが隠れる直前に発火します。[/ja]
  17440. * @param {Object} event [en]Event object.[/en]
  17441. * @param {Object} event.modal
  17442. * [en]Component object.[/en]
  17443. * [ja]コンポーネントのオブジェクト。[/ja]
  17444. * @param {Function} event.cancel
  17445. * [en]Execute this function to stop the modal from being hidden.[/en]
  17446. * [ja]この関数を実行すると、ダイアログの非表示がキャンセルされます。[/ja]
  17447. */
  17448. /**
  17449. * @event posthide
  17450. * @description
  17451. * [en]Fired just after the modal is hidden.[/en]
  17452. * [ja]モーダルが隠れた後に発火します。[/ja]
  17453. * @param {Object} event [en]Event object.[/en]
  17454. * @param {Object} event.modal
  17455. * [en]Component object.[/en]
  17456. * [ja]コンポーネントのオブジェクト。[/ja]
  17457. */
  17458. /**
  17459. * @attribute animation
  17460. * @type {String}
  17461. * @default default
  17462. * @description
  17463. * [en]The animation used when showing and hiding the modal. Can be either `"none"`, `"fade"` or `"lift"`.[/en]
  17464. * [ja]モーダルを表示する際のアニメーション名を指定します。"none"もしくは"fade","lift"を指定できます。[/ja]
  17465. */
  17466. /**
  17467. * @attribute animation-options
  17468. * @type {Expression}
  17469. * @description
  17470. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  17471. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. <code>{duration: 0.2, delay: 1, timing: 'ease-in'}</code>[/ja]
  17472. */
  17473. function ModalElement() {
  17474. classCallCheck(this, ModalElement);
  17475. var _this = possibleConstructorReturn(this, (ModalElement.__proto__ || Object.getPrototypeOf(ModalElement)).call(this));
  17476. _this._defaultDBB = function () {
  17477. return undefined;
  17478. };
  17479. contentReady(_this, function () {
  17480. return _this._compile();
  17481. });
  17482. return _this;
  17483. }
  17484. createClass(ModalElement, [{
  17485. key: '_updateAnimatorFactory',
  17486. value: function _updateAnimatorFactory() {
  17487. return new AnimatorFactory({
  17488. animators: _animatorDict$4,
  17489. baseClass: ModalAnimator,
  17490. baseClassName: 'ModalAnimator',
  17491. defaultAnimation: this.getAttribute('animation')
  17492. });
  17493. }
  17494. /**
  17495. * @property onDeviceBackButton
  17496. * @type {Object}
  17497. * @description
  17498. * [en]Back-button handler.[/en]
  17499. * [ja]バックボタンハンドラ。[/ja]
  17500. */
  17501. }, {
  17502. key: '_compile',
  17503. value: function _compile() {
  17504. this.style.display = 'none';
  17505. this.style.zIndex = 10001;
  17506. this.classList.add(defaultClassName$8);
  17507. if (!util$1.findChild(this, '.modal__content')) {
  17508. var content = document.createElement('div');
  17509. content.classList.add('modal__content');
  17510. while (this.childNodes[0]) {
  17511. var node = this.childNodes[0];
  17512. this.removeChild(node);
  17513. content.insertBefore(node, null);
  17514. }
  17515. this.appendChild(content);
  17516. }
  17517. ModifierUtil.initModifier(this, this._scheme);
  17518. }
  17519. }, {
  17520. key: '_toggleStyle',
  17521. value: function _toggleStyle(shouldShow) {
  17522. this.style.display = shouldShow ? 'table' : 'none';
  17523. }
  17524. }, {
  17525. key: 'connectedCallback',
  17526. value: function connectedCallback() {
  17527. get(ModalElement.prototype.__proto__ || Object.getPrototypeOf(ModalElement.prototype), 'connectedCallback', this).call(this);
  17528. }
  17529. }, {
  17530. key: 'disconnectedCallback',
  17531. value: function disconnectedCallback() {
  17532. get(ModalElement.prototype.__proto__ || Object.getPrototypeOf(ModalElement.prototype), 'disconnectedCallback', this).call(this);
  17533. }
  17534. /**
  17535. * @property visible
  17536. * @readonly
  17537. * @type {Boolean}
  17538. * @description
  17539. * [en]Whether the element is visible or not.[/en]
  17540. * [ja]要素が見える場合に`true`。[/ja]
  17541. */
  17542. /**
  17543. * @method show
  17544. * @signature show([options])
  17545. * @param {Object} [options]
  17546. * [en]Parameter object.[/en]
  17547. * [ja]オプションを指定するオブジェクト。[/ja]
  17548. * @param {String} [options.animation]
  17549. * [en]Animation name. Available animations are `"none"` and `"fade"`.[/en]
  17550. * [ja]アニメーション名を指定します。"none", "fade"のいずれかを指定します。[/ja]
  17551. * @param {String} [options.animationOptions]
  17552. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  17553. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  17554. * @param {Function} [options.callback]
  17555. * [en]This function is called after the modal has been revealed.[/en]
  17556. * [ja]モーダルが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  17557. * @description
  17558. * [en]Show modal.[/en]
  17559. * [ja]モーダルを表示します。[/ja]
  17560. * @return {Promise}
  17561. * [en]Resolves to the displayed element[/en]
  17562. * [ja][/ja]
  17563. */
  17564. /**
  17565. * @method toggle
  17566. * @signature toggle([options])
  17567. * @param {Object} [options]
  17568. * [en]Parameter object.[/en]
  17569. * [ja]オプションを指定するオブジェクト。[/ja]
  17570. * @param {String} [options.animation]
  17571. * [en]Animation name. Available animations are `"none"` and `"fade"`.[/en]
  17572. * [ja]アニメーション名を指定します。"none", "fade"のいずれかを指定します。[/ja]
  17573. * @param {String} [options.animationOptions]
  17574. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  17575. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  17576. * @param {Function} [options.callback]
  17577. * [en]This function is called after the modal has been revealed.[/en]
  17578. * [ja]モーダルが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  17579. * @description
  17580. * [en]Toggle modal visibility.[/en]
  17581. * [ja]モーダルの表示を切り替えます。[/ja]
  17582. */
  17583. /**
  17584. * @method hide
  17585. * @signature hide([options])
  17586. * @param {Object} [options]
  17587. * [en]Parameter object.[/en]
  17588. * [ja]オプションを指定するオブジェクト。[/ja]
  17589. * @param {String} [options.animation]
  17590. * [en]Animation name. Available animations are `"none"` and `"fade"`.[/en]
  17591. * [ja]アニメーション名を指定します。"none", "fade"のいずれかを指定します。[/ja]
  17592. * @param {String} [options.animationOptions]
  17593. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  17594. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  17595. * @param {Function} [options.callback]
  17596. * [en]This function is called after the modal has been revealed.[/en]
  17597. * [ja]モーダルが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  17598. * @description
  17599. * [en]Hide modal.[/en]
  17600. * [ja]モーダルを非表示にします。[/ja]
  17601. * @return {Promise}
  17602. * [en]Resolves to the hidden element[/en]
  17603. * [ja][/ja]
  17604. */
  17605. }, {
  17606. key: 'attributeChangedCallback',
  17607. value: function attributeChangedCallback(name, last, current) {
  17608. if (name === 'class') {
  17609. util$1.restoreClass(this, defaultClassName$8, scheme$16);
  17610. } else {
  17611. get(ModalElement.prototype.__proto__ || Object.getPrototypeOf(ModalElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  17612. }
  17613. }
  17614. /**
  17615. * @param {String} name
  17616. * @param {Function} Animator
  17617. */
  17618. }, {
  17619. key: '_scheme',
  17620. get: function get$$1() {
  17621. return scheme$16;
  17622. }
  17623. }], [{
  17624. key: 'registerAnimator',
  17625. value: function registerAnimator(name, Animator) {
  17626. if (!(Animator.prototype instanceof ModalAnimator)) {
  17627. util$1.throwAnimator('Modal');
  17628. }
  17629. _animatorDict$4[name] = Animator;
  17630. }
  17631. }, {
  17632. key: 'observedAttributes',
  17633. get: function get$$1() {
  17634. return [].concat(toConsumableArray(get(ModalElement.__proto__ || Object.getPrototypeOf(ModalElement), 'observedAttributes', this)), ['class']);
  17635. }
  17636. }, {
  17637. key: 'animators',
  17638. get: function get$$1() {
  17639. return _animatorDict$4;
  17640. }
  17641. }, {
  17642. key: 'ModalAnimator',
  17643. get: function get$$1() {
  17644. return ModalAnimator;
  17645. }
  17646. }]);
  17647. return ModalElement;
  17648. }(BaseDialogElement);
  17649. onsElements.Modal = ModalElement;
  17650. customElements.define('ons-modal', ModalElement);
  17651. /*
  17652. Copyright 2013-2015 ASIAL CORPORATION
  17653. Licensed under the Apache License, Version 2.0 (the "License");
  17654. you may not use this file except in compliance with the License.
  17655. You may obtain a copy of the License at
  17656. http://www.apache.org/licenses/LICENSE-2.0
  17657. Unless required by applicable law or agreed to in writing, software
  17658. distributed under the License is distributed on an "AS IS" BASIS,
  17659. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17660. See the License for the specific language governing permissions and
  17661. limitations under the License.
  17662. */
  17663. var widthToPx = function widthToPx(width) {
  17664. var _ref = [parseInt(width, 10), /px/.test(width)],
  17665. value = _ref[0],
  17666. px = _ref[1];
  17667. return px ? value : Math.round(document.body.offsetWidth * value / 100);
  17668. };
  17669. var SwipeReveal = function () {
  17670. function SwipeReveal(params) {
  17671. var _this = this;
  17672. classCallCheck(this, SwipeReveal);
  17673. 'element ignoreSwipe isInitialState onDragCallback swipeMax swipeMin swipeMid'.split(/\s+/).forEach(function (key) {
  17674. return _this[key] = params[key];
  17675. });
  17676. this.elementHandler = params.elementHandler || params.element;
  17677. this.getThreshold = params.getThreshold || function () {
  17678. return .5;
  17679. };
  17680. this.getSide = params.getSide || function () {
  17681. return 'left';
  17682. };
  17683. this.handleGesture = this.handleGesture.bind(this);
  17684. this._shouldFixScroll = util$1.globals.actualMobileOS === 'ios';
  17685. }
  17686. createClass(SwipeReveal, [{
  17687. key: 'update',
  17688. value: function update() {
  17689. var swipeable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.element.hasAttribute('swipeable');
  17690. if (!this.gestureDetector) {
  17691. this.gestureDetector = new GestureDetector(this.elementHandler, { dragMinDistance: 1, passive: !this._shouldFixScroll });
  17692. }
  17693. var action = swipeable ? 'on' : 'off';
  17694. this.gestureDetector[action]('drag dragstart dragend', this.handleGesture);
  17695. }
  17696. }, {
  17697. key: 'handleGesture',
  17698. value: function handleGesture(e) {
  17699. if (e.gesture) {
  17700. if (e.type === 'dragstart') {
  17701. this.onDragStart(e);
  17702. } else if (!this._ignoreDrag) {
  17703. e.type === 'dragend' ? this.onDragEnd(e) : this.onDrag(e);
  17704. }
  17705. }
  17706. }
  17707. }, {
  17708. key: 'onDragStart',
  17709. value: function onDragStart(event) {
  17710. var _this2 = this;
  17711. var getDistance = function getDistance() {
  17712. return _this2.getSide() === 'left' ? event.gesture.center.clientX : window.innerWidth - event.gesture.center.clientX;
  17713. };
  17714. this._ignoreDrag = event.consumed || !util$1.isValidGesture(event) || this.ignoreSwipe(event, getDistance());
  17715. if (!this._ignoreDrag) {
  17716. event.consume && event.consume();
  17717. event.consumed = true;
  17718. this._width = widthToPx(this.element.style.width || '100%');
  17719. this._startDistance = this._distance = !(this.isInitialState instanceof Function) || this.isInitialState() ? 0 : this._width;
  17720. util$1.iosPreventScroll(this.gestureDetector);
  17721. }
  17722. }
  17723. }, {
  17724. key: 'onDrag',
  17725. value: function onDrag(event) {
  17726. event.stopPropagation();
  17727. var delta = this.getSide() === 'left' ? event.gesture.deltaX : -event.gesture.deltaX;
  17728. var distance = Math.max(0, Math.min(this._width, this._startDistance + delta));
  17729. if (distance !== this._distance) {
  17730. this._distance = distance;
  17731. this.swipeMid(this._distance, this._width);
  17732. }
  17733. }
  17734. }, {
  17735. key: 'onDragEnd',
  17736. value: function onDragEnd(event) {
  17737. event.stopPropagation();
  17738. var direction = event.gesture.interimDirection;
  17739. var isSwipeMax = this.getSide() !== direction && this._distance > this._width * this.getThreshold();
  17740. isSwipeMax ? this.swipeMax() : this.swipeMin();
  17741. }
  17742. }, {
  17743. key: 'dispose',
  17744. value: function dispose() {
  17745. this.gestureDetector && this.gestureDetector.dispose();
  17746. this.gestureDetector = this.element = this.elementHandler = null;
  17747. }
  17748. }]);
  17749. return SwipeReveal;
  17750. }();
  17751. /*
  17752. Copyright 2013-2015 ASIAL CORPORATION
  17753. Licensed under the Apache License, Version 2.0 (the "License");
  17754. you may not use this file except in compliance with the License.
  17755. You may obtain a copy of the License at
  17756. http://www.apache.org/licenses/LICENSE-2.0
  17757. Unless required by applicable law or agreed to in writing, software
  17758. distributed under the License is distributed on an "AS IS" BASIS,
  17759. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17760. See the License for the specific language governing permissions and
  17761. limitations under the License.
  17762. */
  17763. var NavigatorAnimator = function (_BaseAnimator) {
  17764. inherits(NavigatorAnimator, _BaseAnimator);
  17765. /**
  17766. * @param {Object} options
  17767. * @param {String} options.timing
  17768. * @param {Number} options.duration
  17769. * @param {Number} options.delay
  17770. */
  17771. function NavigatorAnimator(options) {
  17772. classCallCheck(this, NavigatorAnimator);
  17773. options = util$1.extend({
  17774. timing: 'linear',
  17775. duration: '0.4',
  17776. delay: '0'
  17777. }, options || {});
  17778. return possibleConstructorReturn(this, (NavigatorAnimator.__proto__ || Object.getPrototypeOf(NavigatorAnimator)).call(this, options));
  17779. }
  17780. createClass(NavigatorAnimator, [{
  17781. key: 'push',
  17782. value: function push(enterPage, leavePage, callback) {
  17783. callback();
  17784. }
  17785. }, {
  17786. key: 'pop',
  17787. value: function pop(enterPage, leavePage, callback) {
  17788. callback();
  17789. }
  17790. }, {
  17791. key: 'block',
  17792. value: function block(page) {
  17793. var blocker = util$1.createElement('\n <div style="position: absolute; background-color: transparent; width: 100%; height: 100%; z-index: 100000"></div>\n ');
  17794. page.parentNode.appendChild(blocker);
  17795. return function () {
  17796. return blocker.remove();
  17797. };
  17798. }
  17799. }]);
  17800. return NavigatorAnimator;
  17801. }(BaseAnimator);
  17802. /*
  17803. Copyright 2013-2015 ASIAL CORPORATION
  17804. Licensed under the Apache License, Version 2.0 (the "License");
  17805. you may not use this file except in compliance with the License.
  17806. You may obtain a copy of the License at
  17807. http://www.apache.org/licenses/LICENSE-2.0
  17808. Unless required by applicable law or agreed to in writing, software
  17809. distributed under the License is distributed on an "AS IS" BASIS,
  17810. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17811. See the License for the specific language governing permissions and
  17812. limitations under the License.
  17813. */
  17814. /**
  17815. * Abstract swipe animator for iOS navigator transition.
  17816. */
  17817. var IOSSwipeNavigatorAnimator = function (_NavigatorAnimator) {
  17818. inherits(IOSSwipeNavigatorAnimator, _NavigatorAnimator);
  17819. createClass(IOSSwipeNavigatorAnimator, null, [{
  17820. key: 'swipeable',
  17821. get: function get$$1() {
  17822. return true;
  17823. }
  17824. }]);
  17825. function IOSSwipeNavigatorAnimator() {
  17826. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17827. var _ref$durationRestore = _ref.durationRestore,
  17828. durationRestore = _ref$durationRestore === undefined ? 0.1 : _ref$durationRestore,
  17829. _ref$durationSwipe = _ref.durationSwipe,
  17830. durationSwipe = _ref$durationSwipe === undefined ? 0.15 : _ref$durationSwipe,
  17831. _ref$timingSwipe = _ref.timingSwipe,
  17832. timingSwipe = _ref$timingSwipe === undefined ? 'linear' : _ref$timingSwipe,
  17833. rest = objectWithoutProperties(_ref, ['durationRestore', 'durationSwipe', 'timingSwipe']);
  17834. classCallCheck(this, IOSSwipeNavigatorAnimator);
  17835. var _this = possibleConstructorReturn(this, (IOSSwipeNavigatorAnimator.__proto__ || Object.getPrototypeOf(IOSSwipeNavigatorAnimator)).call(this, _extends({}, rest)));
  17836. if (_this.constructor === IOSSwipeNavigatorAnimator) {
  17837. util$1.throwAbstract();
  17838. }
  17839. _this.durationRestore = durationRestore;
  17840. _this.durationSwipe = durationSwipe;
  17841. _this.timingSwipe = timingSwipe;
  17842. _this.optSwipe = { timing: timingSwipe, duration: durationSwipe };
  17843. _this.optRestore = { timing: timingSwipe, duration: durationRestore };
  17844. _this.swipeShadow = util$1.createElement('<div style="position: absolute; height: 100%; width: 12px; right: 100%; top: 0; bottom: 0; z-index: -1;' + 'background: linear-gradient(to right, transparent 0, rgba(0,0,0,.04) 40%, rgba(0,0,0,.12) 80%, rgba(0,0,0,.16) 100%);"></div>');
  17845. _this.isDragStart = true;
  17846. return _this;
  17847. }
  17848. createClass(IOSSwipeNavigatorAnimator, [{
  17849. key: '_decompose',
  17850. value: function _decompose() {
  17851. util$1.throwMember();
  17852. }
  17853. }, {
  17854. key: '_shouldAnimateToolbar',
  17855. value: function _shouldAnimateToolbar() {
  17856. util$1.throwMember();
  17857. }
  17858. }, {
  17859. key: '_calculateDelta',
  17860. value: function _calculateDelta() {
  17861. util$1.throwMember();
  17862. }
  17863. }, {
  17864. key: '_dragStartSetup',
  17865. value: function _dragStartSetup(enterPage, leavePage) {
  17866. this.isDragStart = false;
  17867. // Avoid content clicks
  17868. this.unblock = get(IOSSwipeNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSSwipeNavigatorAnimator.prototype), 'block', this).call(this, leavePage);
  17869. // Mask
  17870. enterPage.parentElement.insertBefore(this.backgroundMask, enterPage);
  17871. // Decomposition
  17872. this.target = {
  17873. enter: util$1.findToolbarPage(enterPage) || enterPage,
  17874. leave: util$1.findToolbarPage(leavePage) || leavePage
  17875. };
  17876. this.decomp = {
  17877. enter: this._decompose(this.target.enter),
  17878. leave: this._decompose(this.target.leave)
  17879. };
  17880. // Animation values
  17881. this.delta = this._calculateDelta(leavePage, this.decomp.leave);
  17882. this.shouldAnimateToolbar = this._shouldAnimateToolbar(this.target.enter, this.target.leave);
  17883. // Shadow && styles
  17884. if (this.shouldAnimateToolbar) {
  17885. this.swipeShadow.style.top = this.decomp.leave.toolbar.offsetHeight + 'px';
  17886. this.target.leave.appendChild(this.swipeShadow);
  17887. this._saveStyle(this.target.enter, this.target.leave);
  17888. } else {
  17889. leavePage.appendChild(this.swipeShadow);
  17890. this._saveStyle(enterPage, leavePage);
  17891. }
  17892. leavePage.classList.add('overflow-visible');
  17893. this.overflowElement = leavePage;
  17894. this.decomp.leave.content.classList.add('content-swiping');
  17895. }
  17896. }, {
  17897. key: 'translate',
  17898. value: function translate(distance, maxWidth, enterPage, leavePage) {
  17899. this.isSwiping = true;
  17900. if (enterPage.style.display === 'none') {
  17901. enterPage.style.display = '';
  17902. }
  17903. if (this.isDragStart) {
  17904. this.maxWidth = maxWidth;
  17905. this._dragStartSetup(enterPage, leavePage);
  17906. }
  17907. var swipeRatio = (distance - maxWidth) / maxWidth;
  17908. if (this.shouldAnimateToolbar) {
  17909. Animit.runAll(
  17910. /* Enter page */
  17911. Animit([this.decomp.enter.content, this.decomp.enter.bottomToolbar, this.decomp.enter.background]).queue({
  17912. transform: 'translate3d(' + swipeRatio * 25 + '%, 0, 0)',
  17913. opacity: 1 + swipeRatio * 10 / 100 // 0.9 -> 1
  17914. }), Animit(this.decomp.enter.toolbarCenter).queue({
  17915. transform: 'translate3d(' + this.delta.title * swipeRatio + 'px, 0, 0)',
  17916. opacity: 1 + swipeRatio // 0 -> 1
  17917. }), Animit(this.decomp.enter.backButtonLabel).queue({
  17918. opacity: 1 + swipeRatio * 10 / 100, // 0.9 -> 1
  17919. transform: 'translate3d(' + this.delta.label * swipeRatio + 'px, 0, 0)'
  17920. }), Animit(this.decomp.enter.other).queue({
  17921. opacity: 1 + swipeRatio // 0 -> 1
  17922. }),
  17923. /* Leave page */
  17924. Animit([this.decomp.leave.content, this.decomp.leave.bottomToolbar, this.decomp.leave.background, this.swipeShadow]).queue({
  17925. transform: 'translate3d(' + distance + 'px, 0, 0)'
  17926. }), Animit(this.decomp.leave.toolbar).queue({
  17927. opacity: -1 * swipeRatio // 1 -> 0
  17928. }), Animit(this.decomp.leave.toolbarCenter).queue({
  17929. transform: 'translate3d(' + (1 + swipeRatio) * 125 + '%, 0, 0)'
  17930. }), Animit(this.decomp.leave.backButtonLabel).queue({
  17931. opacity: -1 * swipeRatio, // 1 -> 0
  17932. transform: 'translate3d(' + this.delta.title * (1 + swipeRatio) + 'px, 0, 0)'
  17933. }),
  17934. /* Other */
  17935. Animit(this.swipeShadow).queue({
  17936. opacity: -1 * swipeRatio // 1 -> 0
  17937. }));
  17938. } else {
  17939. Animit.runAll(Animit(leavePage).queue({
  17940. transform: 'translate3d(' + distance + 'px, 0, 0)'
  17941. }), Animit(enterPage).queue({
  17942. transform: 'translate3d(' + swipeRatio * 25 + '%, 0, 0)',
  17943. opacity: 1 + swipeRatio * 10 / 100 // 0.9 -> 1
  17944. }), Animit(this.swipeShadow).queue({
  17945. opacity: -1 * swipeRatio // 1 -> 0
  17946. }));
  17947. }
  17948. }
  17949. }, {
  17950. key: 'restore',
  17951. value: function restore(enterPage, leavePage, callback) {
  17952. var _this2 = this;
  17953. if (this.isDragStart) {
  17954. return;
  17955. }
  17956. if (this.shouldAnimateToolbar) {
  17957. Animit.runAll(
  17958. /* Enter page */
  17959. Animit([this.decomp.enter.content, this.decomp.enter.bottomToolbar, this.decomp.enter.background]).queue({
  17960. transform: 'translate3d(-25%, 0, 0)',
  17961. opacity: 0.9
  17962. }, this.optRestore), Animit(this.decomp.enter.toolbarCenter).queue({
  17963. transform: 'translate3d(-' + this.delta.title + 'px, 0, 0)',
  17964. transition: 'opacity ' + this.durationRestore + 's linear, transform ' + this.durationRestore + 's ' + this.timingSwipe,
  17965. opacity: 0
  17966. }), Animit(this.decomp.enter.backButtonLabel).queue({
  17967. transform: 'translate3d(-' + this.delta.label + 'px, 0, 0)'
  17968. }, this.optRestore), Animit(this.decomp.enter.other).queue({
  17969. opacity: 0
  17970. }, this.optRestore),
  17971. /* Leave page */
  17972. Animit([this.decomp.leave.content, this.decomp.leave.bottomToolbar, this.decomp.leave.background, this.swipeShadow]).queue({
  17973. transform: 'translate3d(0, 0, 0)'
  17974. }, this.optRestore), Animit(this.decomp.leave.toolbar).queue({
  17975. opacity: 1
  17976. }, this.optRestore), Animit(this.decomp.leave.toolbarCenter).queue({
  17977. transform: 'translate3d(0, 0, 0)'
  17978. }, this.optRestore), Animit(this.decomp.leave.backButtonLabel).queue({
  17979. opacity: 1,
  17980. transform: 'translate3d(0, 0, 0)',
  17981. transition: 'opacity ' + this.durationRestore + 's linear, transform ' + this.durationRestore + 's ' + this.timingSwipe
  17982. }),
  17983. /* Other */
  17984. Animit(this.swipeShadow).queue({
  17985. opacity: 0
  17986. }, this.optRestore).queue(function (done) {
  17987. _this2._reset(_this2.target.enter, _this2.target.leave);
  17988. enterPage.style.display = 'none';
  17989. callback && callback();
  17990. done();
  17991. }));
  17992. } else {
  17993. Animit.runAll(Animit(enterPage).queue({
  17994. transform: 'translate3D(-25%, 0, 0)',
  17995. opacity: 0.9
  17996. }, this.optRestore), Animit(leavePage).queue({
  17997. transform: 'translate3D(0, 0, 0)'
  17998. }, this.optRestore).queue(function (done) {
  17999. _this2._reset(enterPage, leavePage);
  18000. enterPage.style.display = 'none';
  18001. callback && callback();
  18002. done();
  18003. }));
  18004. }
  18005. }
  18006. }, {
  18007. key: 'popSwipe',
  18008. value: function popSwipe(enterPage, leavePage, callback) {
  18009. var _this3 = this;
  18010. if (this.isDragStart) {
  18011. return;
  18012. }
  18013. if (this.shouldAnimateToolbar) {
  18014. Animit.runAll(
  18015. /* Enter page */
  18016. Animit([this.decomp.enter.content, this.decomp.enter.bottomToolbar, this.decomp.enter.background]).queue({
  18017. transform: 'translate3d(0, 0, 0)',
  18018. opacity: 1
  18019. }, this.optSwipe), Animit(this.decomp.enter.toolbarCenter).queue({
  18020. transform: 'translate3d(0, 0, 0)',
  18021. transition: 'opacity ' + this.durationSwipe + 's linear, transform ' + this.durationSwipe + 's ' + this.timingSwipe,
  18022. opacity: 1
  18023. }), Animit(this.decomp.enter.backButtonLabel).queue({
  18024. transform: 'translate3d(0, 0, 0)'
  18025. }, this.optSwipe), Animit(this.decomp.enter.other).queue({
  18026. opacity: 1
  18027. }, this.optSwipe),
  18028. /* Leave page */
  18029. Animit([this.decomp.leave.content, this.decomp.leave.bottomToolbar, this.decomp.leave.background]).queue({
  18030. transform: 'translate3d(100%, 0, 0)'
  18031. }, this.optSwipe), Animit(this.decomp.leave.toolbar).queue({
  18032. opacity: 0
  18033. }, this.optSwipe), Animit(this.decomp.leave.toolbarCenter).queue({
  18034. transform: 'translate3d(125%, 0, 0)'
  18035. }, this.optSwipe), Animit(this.decomp.leave.backButtonLabel).queue({
  18036. opacity: 0,
  18037. transform: 'translate3d(' + this.delta.title + 'px, 0, 0)',
  18038. transition: 'opacity ' + this.durationSwipe + 's linear, transform ' + this.durationSwipe + 's ' + this.timingSwipe
  18039. }),
  18040. /* Other */
  18041. Animit(this.swipeShadow).queue({
  18042. opacity: 0,
  18043. transform: 'translate3d(' + this.maxWidth + 'px, 0, 0)'
  18044. }, this.optSwipe).queue(function (done) {
  18045. _this3._reset(_this3.target.enter, _this3.target.leave);
  18046. callback && callback();
  18047. done();
  18048. }));
  18049. } else {
  18050. Animit.runAll(Animit(enterPage).queue({
  18051. transform: 'translate3D(0, 0, 0)',
  18052. opacity: 1.0
  18053. }, this.optSwipe), Animit(leavePage).queue({
  18054. transform: 'translate3D(100%, 0, 0)'
  18055. }, this.optSwipe).queue(function (done) {
  18056. _this3._reset(enterPage, leavePage);
  18057. callback && callback();
  18058. done();
  18059. }));
  18060. }
  18061. }
  18062. }, {
  18063. key: '_saveStyle',
  18064. value: function _saveStyle() {
  18065. var _this4 = this;
  18066. this._savedStyle = new WeakMap();
  18067. var save = function save(el) {
  18068. return _this4._savedStyle.set(el, el.getAttribute('style'));
  18069. };
  18070. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  18071. args[_key] = arguments[_key];
  18072. }
  18073. args.forEach(save);
  18074. Object.keys(this.decomp).forEach(function (p) {
  18075. Object.keys(_this4.decomp[p]).forEach(function (k) {
  18076. (_this4.decomp[p][k] instanceof Array ? _this4.decomp[p][k] : [_this4.decomp[p][k]]).forEach(save);
  18077. });
  18078. });
  18079. }
  18080. }, {
  18081. key: '_restoreStyle',
  18082. value: function _restoreStyle() {
  18083. var _this5 = this;
  18084. var restore = function restore(el) {
  18085. _this5._savedStyle.get(el) === null ? el.removeAttribute('style') : el.setAttribute('style', _this5._savedStyle.get(el));
  18086. _this5._savedStyle.delete(el);
  18087. };
  18088. for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  18089. args[_key2] = arguments[_key2];
  18090. }
  18091. args.forEach(restore);
  18092. Object.keys(this.decomp).forEach(function (p) {
  18093. Object.keys(_this5.decomp[p]).forEach(function (k) {
  18094. (_this5.decomp[p][k] instanceof Array ? _this5.decomp[p][k] : [_this5.decomp[p][k]]).forEach(restore);
  18095. });
  18096. });
  18097. }
  18098. }, {
  18099. key: '_reset',
  18100. value: function _reset() {
  18101. this.isSwiping = false;
  18102. this._savedStyle && this._restoreStyle.apply(this, arguments);
  18103. this.unblock && this.unblock();
  18104. this.swipeShadow.remove();
  18105. this.backgroundMask.remove();
  18106. this.overflowElement.classList.remove('overflow-visible');
  18107. this.decomp.leave.content.classList.remove('content-swiping');
  18108. this.decomp = this.target = this.overflowElement = this._savedStyle = null;
  18109. this.isDragStart = true;
  18110. }
  18111. }]);
  18112. return IOSSwipeNavigatorAnimator;
  18113. }(NavigatorAnimator);
  18114. /*
  18115. Copyright 2013-2015 ASIAL CORPORATION
  18116. Licensed under the Apache License, Version 2.0 (the "License");
  18117. you may not use this file except in compliance with the License.
  18118. You may obtain a copy of the License at
  18119. http://www.apache.org/licenses/LICENSE-2.0
  18120. Unless required by applicable law or agreed to in writing, software
  18121. distributed under the License is distributed on an "AS IS" BASIS,
  18122. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18123. See the License for the specific language governing permissions and
  18124. limitations under the License.
  18125. */
  18126. var translate3d = function translate3d() {
  18127. var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  18128. var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  18129. var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  18130. return 'translate3d(' + x + ', ' + y + ', ' + z + ')';
  18131. };
  18132. /**
  18133. * Slide animator for navigator transition like iOS's screen slide transition.
  18134. */
  18135. var IOSSlideNavigatorAnimator = function (_IOSSwipeNavigatorAni) {
  18136. inherits(IOSSlideNavigatorAnimator, _IOSSwipeNavigatorAni);
  18137. function IOSSlideNavigatorAnimator() {
  18138. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  18139. var _ref$timing = _ref.timing,
  18140. timing = _ref$timing === undefined ? 'cubic-bezier(0.3, .4, 0, .9)' : _ref$timing,
  18141. _ref$delay = _ref.delay,
  18142. delay = _ref$delay === undefined ? 0 : _ref$delay,
  18143. _ref$duration = _ref.duration,
  18144. duration = _ref$duration === undefined ? 0.4 : _ref$duration,
  18145. rest = objectWithoutProperties(_ref, ['timing', 'delay', 'duration']);
  18146. classCallCheck(this, IOSSlideNavigatorAnimator);
  18147. var _this = possibleConstructorReturn(this, (IOSSlideNavigatorAnimator.__proto__ || Object.getPrototypeOf(IOSSlideNavigatorAnimator)).call(this, _extends({ timing: timing, delay: delay, duration: duration }, rest)));
  18148. _this.backgroundMask = util$1.createElement('<div style="position: absolute; width: 100%; height: 100%;' + 'background-color: black; z-index: 2"></div>');
  18149. return _this;
  18150. }
  18151. createClass(IOSSlideNavigatorAnimator, [{
  18152. key: '_decompose',
  18153. value: function _decompose(page) {
  18154. var toolbar = page._getToolbarElement();
  18155. var left = toolbar._getToolbarLeftItemsElement();
  18156. var right = toolbar._getToolbarRightItemsElement();
  18157. var excludeBackButton = function excludeBackButton(elements) {
  18158. var result = [];
  18159. for (var i = 0; i < elements.length; i++) {
  18160. if (elements[i].nodeName.toLowerCase() !== 'ons-back-button') {
  18161. result.push(elements[i]);
  18162. }
  18163. }
  18164. return result;
  18165. };
  18166. var other = [].concat(left.children.length === 0 ? left : excludeBackButton(left.children)).concat(right.children.length === 0 ? right : excludeBackButton(right.children));
  18167. return {
  18168. toolbarCenter: toolbar._getToolbarCenterItemsElement(),
  18169. backButtonIcon: toolbar._getToolbarBackButtonIconElement(),
  18170. backButtonLabel: toolbar._getToolbarBackButtonLabelElement(),
  18171. other: other,
  18172. content: page._getContentElement(),
  18173. background: page._getBackgroundElement(),
  18174. toolbar: toolbar,
  18175. bottomToolbar: page._getBottomToolbarElement()
  18176. };
  18177. }
  18178. }, {
  18179. key: '_shouldAnimateToolbar',
  18180. value: function _shouldAnimateToolbar(enterPage, leavePage) {
  18181. var toolbars = enterPage._canAnimateToolbar() && leavePage._canAnimateToolbar();
  18182. var enterToolbar = enterPage._getToolbarElement();
  18183. var leaveToolbar = leavePage._getToolbarElement();
  18184. var isStatic = enterToolbar.hasAttribute('static') || leaveToolbar.hasAttribute('static');
  18185. var isMaterial = util$1.hasModifier(enterToolbar, 'material') || util$1.hasModifier(leaveToolbar, 'material');
  18186. var isTransparent = util$1.hasModifier(enterToolbar, 'transparent') || util$1.hasModifier(leaveToolbar, 'transparent');
  18187. return toolbars && !isStatic && !isMaterial && !isTransparent;
  18188. }
  18189. }, {
  18190. key: '_calculateDelta',
  18191. value: function _calculateDelta(element, decomposition) {
  18192. var title = void 0,
  18193. label = void 0;
  18194. var pageRect = element.getBoundingClientRect();
  18195. if (decomposition.backButtonLabel.classList.contains('back-button__label')) {
  18196. var labelRect = decomposition.backButtonLabel.getBoundingClientRect();
  18197. title = Math.round(pageRect.width / 2 - labelRect.width / 2 - labelRect.left);
  18198. } else {
  18199. title = Math.round(pageRect.width / 2 * 0.6);
  18200. }
  18201. if (decomposition.backButtonIcon.classList.contains('back-button__icon')) {
  18202. label = decomposition.backButtonIcon.getBoundingClientRect().right - 2;
  18203. }
  18204. return { title: title, label: label };
  18205. }
  18206. /**
  18207. * @param {Object} enterPage
  18208. * @param {Object} leavePage
  18209. * @param {Function} callback
  18210. */
  18211. }, {
  18212. key: 'push',
  18213. value: function push(enterPage, leavePage, callback) {
  18214. var _this2 = this;
  18215. this.backgroundMask.remove();
  18216. leavePage.parentNode.insertBefore(this.backgroundMask, leavePage);
  18217. var unblock = get(IOSSlideNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSSlideNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18218. contentReady(enterPage, function () {
  18219. var enterPageTarget = util$1.findToolbarPage(enterPage) || enterPage;
  18220. var leavePageTarget = util$1.findToolbarPage(leavePage) || leavePage;
  18221. var enterPageDecomposition = _this2._decompose(enterPageTarget);
  18222. var leavePageDecomposition = _this2._decompose(leavePageTarget);
  18223. var delta = _this2._calculateDelta(leavePage, enterPageDecomposition);
  18224. var shouldAnimateToolbar = _this2._shouldAnimateToolbar(enterPageTarget, leavePageTarget);
  18225. if (shouldAnimateToolbar) {
  18226. Animit.runAll(Animit([enterPageDecomposition.content, enterPageDecomposition.bottomToolbar, enterPageDecomposition.background], _this2.def).default({ transform: translate3d('100%') }, { transform: translate3d() }), Animit(enterPageDecomposition.toolbar, _this2.def).default({ opacity: 0 }, { opacity: 1 }), Animit(enterPageDecomposition.toolbarCenter, _this2.def).default({ transform: translate3d('125%'), opacity: 1 }, { transform: translate3d(), opacity: 1 }), Animit(enterPageDecomposition.backButtonLabel, _this2.def).default({ transform: translate3d(delta.title + 'px'), opacity: 0 }, {
  18227. transform: translate3d(),
  18228. opacity: 1,
  18229. transition: 'opacity ' + _this2.duration + 's linear, transform ' + _this2.duration + 's ' + _this2.timing
  18230. }), Animit(enterPageDecomposition.other, _this2.def).default({ opacity: 0 }, { css: { opacity: 1 }, timing: 'linear' }), Animit([leavePageDecomposition.content, leavePageDecomposition.bottomToolbar, leavePageDecomposition.background], _this2.def).default({ transform: translate3d(), opacity: 1 }, { transform: translate3d('-25%'), opacity: 0.9 }).queue(function (done) {
  18231. _this2.backgroundMask.remove();
  18232. unblock();
  18233. callback();
  18234. done();
  18235. }), Animit(leavePageDecomposition.toolbarCenter, _this2.def).default({ transform: translate3d(), opacity: 1 }, {
  18236. transform: translate3d('-' + delta.title + 'px'),
  18237. opacity: 0,
  18238. transition: 'opacity ' + _this2.duration + 's linear, transform ' + _this2.duration + 's ' + _this2.timing
  18239. }), Animit(leavePageDecomposition.backButtonLabel, _this2.def).default({ transform: translate3d(), opacity: 1 }, { transform: translate3d('-' + delta.label + 'px'), opacity: 0 }), Animit(leavePageDecomposition.other, _this2.def).default({ opacity: 1 }, { css: { opacity: 0 }, timing: 'linear' }));
  18240. } else {
  18241. Animit.runAll(Animit(enterPage, _this2.def).default({ transform: translate3d('100%') }, { transform: translate3d() }), Animit(leavePage, _this2.def).default({ transform: translate3d(), opacity: 1 }, { transform: translate3d('-25%'), opacity: .9 }).queue(function (done) {
  18242. _this2.backgroundMask.remove();
  18243. unblock();
  18244. callback();
  18245. done();
  18246. }));
  18247. }
  18248. });
  18249. }
  18250. /**
  18251. * @param {Object} enterPage
  18252. * @param {Object} leavePage
  18253. * @param {Function} callback
  18254. */
  18255. }, {
  18256. key: 'pop',
  18257. value: function pop(enterPage, leavePage, callback) {
  18258. var _this3 = this;
  18259. if (this.isSwiping) {
  18260. return this.popSwipe(enterPage, leavePage, callback);
  18261. }
  18262. this.backgroundMask.remove();
  18263. enterPage.parentNode.insertBefore(this.backgroundMask, enterPage);
  18264. var unblock = get(IOSSlideNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSSlideNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18265. var enterPageTarget = util$1.findToolbarPage(enterPage) || enterPage;
  18266. var leavePageTarget = util$1.findToolbarPage(leavePage) || leavePage;
  18267. var enterPageDecomposition = this._decompose(enterPageTarget);
  18268. var leavePageDecomposition = this._decompose(leavePageTarget);
  18269. var delta = this._calculateDelta(leavePage, leavePageDecomposition);
  18270. var shouldAnimateToolbar = this._shouldAnimateToolbar(enterPageTarget, leavePageTarget);
  18271. if (shouldAnimateToolbar) {
  18272. Animit.runAll(Animit([enterPageDecomposition.content, enterPageDecomposition.bottomToolbar, enterPageDecomposition.background], this.def).default({ transform: translate3d('-25%'), opacity: .9 }, { transform: translate3d(), opacity: 1 }), Animit(enterPageDecomposition.toolbarCenter, this.def).default({ transform: translate3d('-' + delta.title + 'px'), opacity: 0 }, {
  18273. transform: translate3d(),
  18274. opacity: 1,
  18275. transition: 'opacity ' + this.duration + 's linear, transform ' + this.duration + 's ' + this.timing
  18276. }), Animit(enterPageDecomposition.backButtonLabel, this.def).default({ transform: translate3d('-' + delta.label + 'px') }, { transform: translate3d() }), Animit(enterPageDecomposition.other, this.def).default({ opacity: 0 }, { css: { opacity: 1 }, timing: 'linear' }), Animit([leavePageDecomposition.content, leavePageDecomposition.bottomToolbar, leavePageDecomposition.background], this.def).default({ transform: translate3d() }, { transform: translate3d('100%') }).wait(0).queue(function (done) {
  18277. _this3.backgroundMask.remove();
  18278. unblock();
  18279. callback();
  18280. done();
  18281. }), Animit(leavePageDecomposition.toolbar, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(leavePageDecomposition.toolbarCenter, this.def).default({ transform: translate3d() }, { transform: translate3d('125%') }), Animit(leavePageDecomposition.backButtonLabel, this.def).default({ transform: translate3d(), opacity: 1 }, {
  18282. transform: translate3d(delta.title + 'px'),
  18283. opacity: 0,
  18284. transition: 'opacity ' + this.duration + 's linear, transform ' + this.duration + 's ' + this.timing
  18285. }));
  18286. } else {
  18287. Animit.runAll(Animit(enterPage, this.def).default({ transform: translate3d('-25%'), opacity: .9 }, { transform: translate3d(), opacity: 1 }), Animit(leavePage, this.def).default({ transform: translate3d() }, { transform: translate3d('100%') }).queue(function (done) {
  18288. _this3.backgroundMask.remove();
  18289. unblock();
  18290. callback();
  18291. done();
  18292. }));
  18293. }
  18294. }
  18295. }]);
  18296. return IOSSlideNavigatorAnimator;
  18297. }(IOSSwipeNavigatorAnimator);
  18298. /*
  18299. Copyright 2013-2015 ASIAL CORPORATION
  18300. Licensed under the Apache License, Version 2.0 (the "License");
  18301. you may not use this file except in compliance with the License.
  18302. You may obtain a copy of the License at
  18303. http://www.apache.org/licenses/LICENSE-2.0
  18304. Unless required by applicable law or agreed to in writing, software
  18305. distributed under the License is distributed on an "AS IS" BASIS,
  18306. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18307. See the License for the specific language governing permissions and
  18308. limitations under the License.
  18309. */
  18310. /**
  18311. * Lift screen transition.
  18312. */
  18313. var IOSLiftNavigatorAnimator = function (_NavigatorAnimator) {
  18314. inherits(IOSLiftNavigatorAnimator, _NavigatorAnimator);
  18315. function IOSLiftNavigatorAnimator() {
  18316. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18317. _ref$timing = _ref.timing,
  18318. timing = _ref$timing === undefined ? 'cubic-bezier(.1, .7, .1, 1)' : _ref$timing,
  18319. _ref$delay = _ref.delay,
  18320. delay = _ref$delay === undefined ? 0 : _ref$delay,
  18321. _ref$duration = _ref.duration,
  18322. duration = _ref$duration === undefined ? 0.4 : _ref$duration;
  18323. classCallCheck(this, IOSLiftNavigatorAnimator);
  18324. var _this = possibleConstructorReturn(this, (IOSLiftNavigatorAnimator.__proto__ || Object.getPrototypeOf(IOSLiftNavigatorAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  18325. _this.backgroundMask = util$1.createElement('<div style="position: absolute; width: 100%; height: 100%;' + 'background: linear-gradient(black, white);"></div>');
  18326. return _this;
  18327. }
  18328. /**
  18329. * @param {Object} enterPage
  18330. * @param {Object} leavePage
  18331. * @param {Function} callback
  18332. */
  18333. createClass(IOSLiftNavigatorAnimator, [{
  18334. key: 'push',
  18335. value: function push(enterPage, leavePage, callback) {
  18336. var _this2 = this;
  18337. this.backgroundMask.remove();
  18338. leavePage.parentNode.insertBefore(this.backgroundMask, leavePage);
  18339. var unblock = get(IOSLiftNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSLiftNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18340. Animit.runAll(Animit(enterPage, this.def).default({ transform: 'translate3D(0, 100%, 0)' }, { transform: 'translate3D(0, 0, 0)' }), Animit(leavePage, this.def).default({ transform: 'translate3D(0, 0, 0)', opacity: 1 }, { transform: 'translate3D(0, -10%, 0)', opacity: .9 }).queue(function (done) {
  18341. _this2.backgroundMask.remove();
  18342. unblock();
  18343. callback();
  18344. done();
  18345. }));
  18346. }
  18347. /**
  18348. * @param {Object} enterPage
  18349. * @param {Object} leavePage
  18350. * @param {Function} callback
  18351. */
  18352. }, {
  18353. key: 'pop',
  18354. value: function pop(enterPage, leavePage, callback) {
  18355. var _this3 = this;
  18356. this.backgroundMask.remove();
  18357. enterPage.parentNode.insertBefore(this.backgroundMask, enterPage);
  18358. var unblock = get(IOSLiftNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSLiftNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18359. Animit.runAll(Animit(enterPage, this.def).default({ transform: 'translate3D(0, -43px, 0)', opacity: .9 }, { transform: 'translate3D(0, 0, 0)', opacity: 1 }).queue(function (done) {
  18360. _this3.backgroundMask.remove();
  18361. unblock();
  18362. callback();
  18363. done();
  18364. }), Animit(leavePage, this.def).default({ transform: 'translate3D(0, 0, 0)' }, { transform: 'translate3D(0, 100%, 0)' }));
  18365. }
  18366. }]);
  18367. return IOSLiftNavigatorAnimator;
  18368. }(NavigatorAnimator);
  18369. /*
  18370. Copyright 2013-2015 ASIAL CORPORATION
  18371. Licensed under the Apache License, Version 2.0 (the "License");
  18372. you may not use this file except in compliance with the License.
  18373. You may obtain a copy of the License at
  18374. http://www.apache.org/licenses/LICENSE-2.0
  18375. Unless required by applicable law or agreed to in writing, software
  18376. distributed under the License is distributed on an "AS IS" BASIS,
  18377. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18378. See the License for the specific language governing permissions and
  18379. limitations under the License.
  18380. */
  18381. var transform = 'translate3d(0, 0, 0)';
  18382. /**
  18383. * Fade-in screen transition.
  18384. */
  18385. var IOSFadeNavigatorAnimator = function (_NavigatorAnimator) {
  18386. inherits(IOSFadeNavigatorAnimator, _NavigatorAnimator);
  18387. function IOSFadeNavigatorAnimator() {
  18388. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18389. _ref$timing = _ref.timing,
  18390. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  18391. _ref$delay = _ref.delay,
  18392. delay = _ref$delay === undefined ? 0 : _ref$delay,
  18393. _ref$duration = _ref.duration,
  18394. duration = _ref$duration === undefined ? 0.4 : _ref$duration;
  18395. classCallCheck(this, IOSFadeNavigatorAnimator);
  18396. return possibleConstructorReturn(this, (IOSFadeNavigatorAnimator.__proto__ || Object.getPrototypeOf(IOSFadeNavigatorAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  18397. }
  18398. /**
  18399. * @param {Object} enterPage
  18400. * @param {Object} leavePage
  18401. * @param {Function} callback
  18402. */
  18403. createClass(IOSFadeNavigatorAnimator, [{
  18404. key: 'push',
  18405. value: function push(enterPage, leavePage, callback) {
  18406. var unblock = get(IOSFadeNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSFadeNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18407. Animit.runAll(Animit(enterPage, this.def).default({ transform: transform, opacity: 0 }, { transform: transform, opacity: 1 }).queue(function (done) {
  18408. unblock();
  18409. callback();
  18410. done();
  18411. }));
  18412. }
  18413. /**
  18414. * @param {Object} enterPage
  18415. * @param {Object} leavePage
  18416. * @param {Function} done
  18417. */
  18418. }, {
  18419. key: 'pop',
  18420. value: function pop(enterPage, leavePage, callback) {
  18421. var unblock = get(IOSFadeNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSFadeNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18422. Animit.runAll(Animit(leavePage, this.def).default({ transform: transform, opacity: 1 }, { transform: transform, opacity: 0 }).queue(function (done) {
  18423. unblock();
  18424. callback();
  18425. done();
  18426. }));
  18427. }
  18428. }]);
  18429. return IOSFadeNavigatorAnimator;
  18430. }(NavigatorAnimator);
  18431. /*
  18432. Copyright 2013-2015 ASIAL CORPORATION
  18433. Licensed under the Apache License, Version 2.0 (the "License");
  18434. you may not use this file except in compliance with the License.
  18435. You may obtain a copy of the License at
  18436. http://www.apache.org/licenses/LICENSE-2.0
  18437. Unless required by applicable law or agreed to in writing, software
  18438. distributed under the License is distributed on an "AS IS" BASIS,
  18439. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18440. See the License for the specific language governing permissions and
  18441. limitations under the License.
  18442. */
  18443. /**
  18444. * Slide animator for navigator transition.
  18445. */
  18446. var MDSlideNavigatorAnimator = function (_NavigatorAnimator) {
  18447. inherits(MDSlideNavigatorAnimator, _NavigatorAnimator);
  18448. function MDSlideNavigatorAnimator() {
  18449. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18450. _ref$timing = _ref.timing,
  18451. timing = _ref$timing === undefined ? 'cubic-bezier(.1, .7, .4, 1)' : _ref$timing,
  18452. _ref$delay = _ref.delay,
  18453. delay = _ref$delay === undefined ? 0 : _ref$delay,
  18454. _ref$duration = _ref.duration,
  18455. duration = _ref$duration === undefined ? 0.3 : _ref$duration;
  18456. classCallCheck(this, MDSlideNavigatorAnimator);
  18457. var _this = possibleConstructorReturn(this, (MDSlideNavigatorAnimator.__proto__ || Object.getPrototypeOf(MDSlideNavigatorAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  18458. _this.blackMaskOpacity = 0.4;
  18459. _this.backgroundMask = util$1.createElement('<div style="position: absolute; width: 100%; height: 100%; z-index: 2;' + 'background-color: black; opacity: 0;"></div>');
  18460. return _this;
  18461. }
  18462. /**
  18463. * @param {Object} enterPage
  18464. * @param {Object} leavePage
  18465. * @param {Function} callback
  18466. */
  18467. createClass(MDSlideNavigatorAnimator, [{
  18468. key: 'push',
  18469. value: function push(enterPage, leavePage, callback) {
  18470. var _this2 = this;
  18471. this.backgroundMask.remove();
  18472. leavePage.parentElement.insertBefore(this.backgroundMask, leavePage.nextSibling);
  18473. var unblock = get(MDSlideNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDSlideNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18474. Animit.runAll(Animit(this.backgroundMask, this.def).default({ transform: 'translate3d(0, 0, 0)', opacity: 0 }, { opacity: this.blackMaskOpacity }).queue(function (done) {
  18475. _this2.backgroundMask.remove();
  18476. done();
  18477. }), Animit(enterPage, this.def).default({ transform: 'translate3d(100%, 0, 0)' }, { transform: 'translate3d(0, 0, 0)' }), Animit(leavePage, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(-45%, 0, 0)' }).queue(function (done) {
  18478. unblock();
  18479. callback();
  18480. done();
  18481. }));
  18482. }
  18483. /**
  18484. * @param {Object} enterPage
  18485. * @param {Object} leavePage
  18486. * @param {Function} callback
  18487. */
  18488. }, {
  18489. key: 'pop',
  18490. value: function pop(enterPage, leavePage, callback) {
  18491. var _this3 = this;
  18492. this.backgroundMask.remove();
  18493. enterPage.parentNode.insertBefore(this.backgroundMask, enterPage.nextSibling);
  18494. var unblock = get(MDSlideNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDSlideNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18495. Animit.runAll(Animit(this.backgroundMask, this.def).default({ transform: 'translate3d(0, 0, 0)', opacity: this.blackMaskOpacity }, { opacity: 0 }).queue(function (done) {
  18496. _this3.backgroundMask.remove();
  18497. done();
  18498. }), Animit(enterPage, this.def).default({ transform: 'translate3d(-45%, 0, 0)', opacity: .9 }, { transform: 'translate3d(0, 0, 0)', opacity: 1 }), Animit(leavePage, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(100%, 0, 0)' }).queue(function (done) {
  18499. unblock();
  18500. callback();
  18501. done();
  18502. }));
  18503. }
  18504. }]);
  18505. return MDSlideNavigatorAnimator;
  18506. }(NavigatorAnimator);
  18507. /*
  18508. Copyright 2013-2015 ASIAL CORPORATION
  18509. Licensed under the Apache License, Version 2.0 (the "License");
  18510. you may not use this file except in compliance with the License.
  18511. You may obtain a copy of the License at
  18512. http://www.apache.org/licenses/LICENSE-2.0
  18513. Unless required by applicable law or agreed to in writing, software
  18514. distributed under the License is distributed on an "AS IS" BASIS,
  18515. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18516. See the License for the specific language governing permissions and
  18517. limitations under the License.
  18518. */
  18519. /**
  18520. * Lift screen transition.
  18521. */
  18522. var MDLiftNavigatorAnimator = function (_NavigatorAnimator) {
  18523. inherits(MDLiftNavigatorAnimator, _NavigatorAnimator);
  18524. function MDLiftNavigatorAnimator() {
  18525. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18526. _ref$timing = _ref.timing,
  18527. timing = _ref$timing === undefined ? 'cubic-bezier(.1, .7, .1, 1)' : _ref$timing,
  18528. _ref$delay = _ref.delay,
  18529. delay = _ref$delay === undefined ? 0.05 : _ref$delay,
  18530. _ref$duration = _ref.duration,
  18531. duration = _ref$duration === undefined ? 0.4 : _ref$duration;
  18532. classCallCheck(this, MDLiftNavigatorAnimator);
  18533. var _this = possibleConstructorReturn(this, (MDLiftNavigatorAnimator.__proto__ || Object.getPrototypeOf(MDLiftNavigatorAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  18534. _this.backgroundMask = util$1.createElement('<div style="position: absolute; width: 100%; height: 100%;' + 'background-color: black;"></div>');
  18535. return _this;
  18536. }
  18537. /**
  18538. * @param {Object} enterPage
  18539. * @param {Object} leavePage
  18540. * @param {Function} callback
  18541. */
  18542. createClass(MDLiftNavigatorAnimator, [{
  18543. key: 'push',
  18544. value: function push(enterPage, leavePage, callback) {
  18545. var _this2 = this;
  18546. this.backgroundMask.remove();
  18547. leavePage.parentNode.insertBefore(this.backgroundMask, leavePage);
  18548. var unblock = get(MDLiftNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDLiftNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18549. var maskClear = Animit(this.backgroundMask).wait(this.delay + this.duration).queue(function (done) {
  18550. _this2.backgroundMask.remove();
  18551. done();
  18552. });
  18553. Animit.runAll(maskClear, Animit(enterPage, this.def).default({ transform: 'translate3d(0, 100%, 0)' }, { transform: 'translate3d(0, 0, 0)' }), Animit(leavePage, this.def).default({ opacity: 1 }, { opacity: .4 }).queue(function (done) {
  18554. unblock();
  18555. callback();
  18556. done();
  18557. }));
  18558. }
  18559. /**
  18560. * @param {Object} enterPage
  18561. * @param {Object} leavePage
  18562. * @param {Function} callback
  18563. */
  18564. }, {
  18565. key: 'pop',
  18566. value: function pop(enterPage, leavePage, callback) {
  18567. var _this3 = this;
  18568. this.backgroundMask.remove();
  18569. enterPage.parentNode.insertBefore(this.backgroundMask, enterPage);
  18570. var unblock = get(MDLiftNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDLiftNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18571. Animit.runAll(Animit(this.backgroundMask).wait(this.delay + this.duration).queue(function (done) {
  18572. _this3.backgroundMask.remove();
  18573. done();
  18574. }), Animit(enterPage, this.def).default({ opacity: .4 }, { opacity: 1 }).queue(function (done) {
  18575. unblock();
  18576. callback();
  18577. done();
  18578. }), Animit(leavePage, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(0, 100%, 0)' }));
  18579. }
  18580. }]);
  18581. return MDLiftNavigatorAnimator;
  18582. }(NavigatorAnimator);
  18583. /*
  18584. Copyright 2013-2015 ASIAL CORPORATION
  18585. Licensed under the Apache License, Version 2.0 (the "License");
  18586. you may not use this file except in compliance with the License.
  18587. You may obtain a copy of the License at
  18588. http://www.apache.org/licenses/LICENSE-2.0
  18589. Unless required by applicable law or agreed to in writing, software
  18590. distributed under the License is distributed on an "AS IS" BASIS,
  18591. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18592. See the License for the specific language governing permissions and
  18593. limitations under the License.
  18594. */
  18595. /**
  18596. * Fade-in + Lift screen transition.
  18597. */
  18598. var MDFadeNavigatorAnimator = function (_NavigatorAnimator) {
  18599. inherits(MDFadeNavigatorAnimator, _NavigatorAnimator);
  18600. function MDFadeNavigatorAnimator() {
  18601. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18602. _ref$timing = _ref.timing,
  18603. timing = _ref$timing === undefined ? 'cubic-bezier(0.4, 0, 0.2, 1)' : _ref$timing,
  18604. _ref$timingPop = _ref.timingPop,
  18605. timingPop = _ref$timingPop === undefined ? 'cubic-bezier(0.4, 0, 1, 1)' : _ref$timingPop,
  18606. _ref$delay = _ref.delay,
  18607. delay = _ref$delay === undefined ? 0 : _ref$delay,
  18608. _ref$duration = _ref.duration,
  18609. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  18610. classCallCheck(this, MDFadeNavigatorAnimator);
  18611. var _this = possibleConstructorReturn(this, (MDFadeNavigatorAnimator.__proto__ || Object.getPrototypeOf(MDFadeNavigatorAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  18612. _this.timingPop = timingPop;
  18613. return _this;
  18614. }
  18615. /**
  18616. * @param {Object} enterPage
  18617. * @param {Object} leavePage
  18618. * @param {Function} callback
  18619. */
  18620. createClass(MDFadeNavigatorAnimator, [{
  18621. key: 'push',
  18622. value: function push(enterPage, leavePage, callback) {
  18623. var unblock = get(MDFadeNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDFadeNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18624. Animit.runAll(Animit(enterPage, this.def).default({ transform: 'translate3D(0, 42px, 0)', opacity: 0 }, { transform: 'translate3D(0, 0, 0)', opacity: 1 }).queue(function (done) {
  18625. unblock();
  18626. callback();
  18627. done();
  18628. }));
  18629. }
  18630. /**
  18631. * @param {Object} enterPage
  18632. * @param {Object} leavePage
  18633. * @param {Function} done
  18634. */
  18635. }, {
  18636. key: 'pop',
  18637. value: function pop(enterPage, leavePage, callback) {
  18638. var unblock = get(MDFadeNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDFadeNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18639. Animit.runAll(Animit(leavePage, this.def).default({ transform: 'translate3D(0, 0, 0)', opacity: 1 }, { css: { transform: 'translate3D(0, 38px, 0)', opacity: 0 }, timing: this.timingPop }).queue(function (done) {
  18640. unblock();
  18641. callback();
  18642. done();
  18643. }));
  18644. }
  18645. }]);
  18646. return MDFadeNavigatorAnimator;
  18647. }(NavigatorAnimator);
  18648. /*
  18649. Copyright 2013-2015 ASIAL CORPORATION
  18650. Licensed under the Apache License, Version 2.0 (the "License");
  18651. you may not use this file except in compliance with the License.
  18652. You may obtain a copy of the License at
  18653. http://www.apache.org/licenses/LICENSE-2.0
  18654. Unless required by applicable law or agreed to in writing, software
  18655. distributed under the License is distributed on an "AS IS" BASIS,
  18656. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18657. See the License for the specific language governing permissions and
  18658. limitations under the License.
  18659. */
  18660. var NoneNavigatorAnimator = function (_NavigatorAnimator) {
  18661. inherits(NoneNavigatorAnimator, _NavigatorAnimator);
  18662. function NoneNavigatorAnimator(options) {
  18663. classCallCheck(this, NoneNavigatorAnimator);
  18664. return possibleConstructorReturn(this, (NoneNavigatorAnimator.__proto__ || Object.getPrototypeOf(NoneNavigatorAnimator)).call(this, options));
  18665. }
  18666. createClass(NoneNavigatorAnimator, [{
  18667. key: 'push',
  18668. value: function push(enterPage, leavePage, callback) {
  18669. callback();
  18670. }
  18671. }, {
  18672. key: 'pop',
  18673. value: function pop(enterPage, leavePage, callback) {
  18674. callback();
  18675. }
  18676. }]);
  18677. return NoneNavigatorAnimator;
  18678. }(NavigatorAnimator);
  18679. /*
  18680. Copyright 2013-2015 ASIAL CORPORATION
  18681. Licensed under the Apache License, Version 2.0 (the "License");
  18682. you may not use this file except in compliance with the License.
  18683. You may obtain a copy of the License at
  18684. http://www.apache.org/licenses/LICENSE-2.0
  18685. Unless required by applicable law or agreed to in writing, software
  18686. distributed under the License is distributed on an "AS IS" BASIS,
  18687. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18688. See the License for the specific language governing permissions and
  18689. limitations under the License.
  18690. */
  18691. var _animatorDict$5 = {
  18692. 'default': function _default() {
  18693. return platform.isAndroid() ? MDFadeNavigatorAnimator : IOSSlideNavigatorAnimator;
  18694. },
  18695. 'slide': function slide() {
  18696. return platform.isAndroid() ? MDSlideNavigatorAnimator : IOSSlideNavigatorAnimator;
  18697. },
  18698. 'lift': function lift() {
  18699. return platform.isAndroid() ? MDLiftNavigatorAnimator : IOSLiftNavigatorAnimator;
  18700. },
  18701. 'fade': function fade() {
  18702. return platform.isAndroid() ? MDFadeNavigatorAnimator : IOSFadeNavigatorAnimator;
  18703. },
  18704. 'slide-ios': IOSSlideNavigatorAnimator,
  18705. 'slide-md': MDSlideNavigatorAnimator,
  18706. 'lift-ios': IOSLiftNavigatorAnimator,
  18707. 'lift-md': MDLiftNavigatorAnimator,
  18708. 'fade-ios': IOSFadeNavigatorAnimator,
  18709. 'fade-md': MDFadeNavigatorAnimator,
  18710. 'none': NoneNavigatorAnimator
  18711. };
  18712. var rewritables = {
  18713. /**
  18714. * @param {Element} navigatorSideElement
  18715. * @param {Function} callback
  18716. */
  18717. ready: function ready(navigatorElement, callback) {
  18718. callback();
  18719. }
  18720. };
  18721. var verifyPageElement = function verifyPageElement(el) {
  18722. return el.nodeName !== 'ONS-PAGE' && util$1.throw('Only page elements can be children of navigator');
  18723. };
  18724. /**
  18725. * @element ons-navigator
  18726. * @category navigation
  18727. * @description
  18728. * [en]
  18729. * A component that provides page stack management and navigation. Stack navigation is the most common navigation pattern for mobile apps.
  18730. *
  18731. * When a page is pushed on top of the stack it is displayed with a transition animation. When the user returns to the previous page the top page will be popped from the top of the stack and hidden with an opposite transition animation.
  18732. * [/en]
  18733. * [ja][/ja]
  18734. * @codepen yrhtv
  18735. * @tutorial vanilla/Reference/navigator
  18736. * @guide lifecycle.html#events
  18737. * [en]Overview of page events[/en]
  18738. * [ja]Overview of page events[/ja]
  18739. * @seealso ons-toolbar
  18740. * [en]The `<ons-toolbar>` component is used to display a toolbar on the top of a page.[/en]
  18741. * [ja][/ja]
  18742. * @seealso ons-back-button
  18743. * [en]The `<ons-back-button>` component lets the user return to the previous page.[/en]
  18744. * [ja][/ja]
  18745. * @example
  18746. * <ons-navigator id="navigator">
  18747. * <ons-page>
  18748. * <ons-toolbar>
  18749. * <div class="center">
  18750. * Title
  18751. * </div>
  18752. * </ons-toolbar>
  18753. * <p>
  18754. * <ons-button
  18755. * onclick="document.getElementById('navigator').pushPage('page.html')">
  18756. * Push page
  18757. * </ons-button>
  18758. * </p>
  18759. * </ons-page>
  18760. * </ons-navigator>
  18761. *
  18762. * <template id="page.html">
  18763. * <ons-page>
  18764. * <ons-toolbar>
  18765. * <div class="left">
  18766. * <ons-back-button>Back</ons-back-button>
  18767. * </div>
  18768. * <div class="center">
  18769. * Another page
  18770. * </div>
  18771. * </ons-toolbar>
  18772. * </ons-page>
  18773. * </template>
  18774. */
  18775. var NavigatorElement = function (_BaseElement) {
  18776. inherits(NavigatorElement, _BaseElement);
  18777. createClass(NavigatorElement, [{
  18778. key: 'animatorFactory',
  18779. /**
  18780. * @attribute page
  18781. * @initonly
  18782. * @type {String}
  18783. * @description
  18784. * [en]First page to show when navigator is initialized.[/en]
  18785. * [ja]ナビゲーターが初期化された時に表示するページを指定します。[/ja]
  18786. */
  18787. /**
  18788. * @attribute swipeable
  18789. * @type {Boolean}
  18790. * @description
  18791. * [en]Enable iOS "swipe to pop" feature.[/en]
  18792. * [ja][/ja]
  18793. */
  18794. /**
  18795. * @attribute swipe-target-width
  18796. * @type {String}
  18797. * @default 20px
  18798. * @description
  18799. * [en]The width of swipeable area calculated from the edge (in pixels). Use this to enable swipe only when the finger touch on the screen edge.[/en]
  18800. * [ja]スワイプの判定領域をピクセル単位で指定します。画面の端から指定した距離に達するとページが表示されます。[/ja]
  18801. */
  18802. /**
  18803. * @attribute swipe-threshold
  18804. * @type {Number}
  18805. * @default 0.2
  18806. * @description
  18807. * [en]Specify how much the page needs to be swiped before popping. A value between `0` and `1`.[/en]
  18808. * [ja][/ja]
  18809. */
  18810. /**
  18811. * @attribute animation
  18812. * @type {String}
  18813. * @default default
  18814. * @description
  18815. * [en]
  18816. * Animation name. Available animations are `"slide"`, `"lift"`, `"fade"` and `"none"`.
  18817. *
  18818. * These are platform based animations. For fixed animations, add `"-ios"` or `"-md"` suffix to the animation name. E.g. `"lift-ios"`, `"lift-md"`. Defaults values are `"slide-ios"` and `"fade-md"` depending on the platform.
  18819. * [/en]
  18820. * [ja][/ja]
  18821. */
  18822. /**
  18823. * @attribute animation-options
  18824. * @type {Expression}
  18825. * @description
  18826. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`[/en]
  18827. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`[/ja]
  18828. */
  18829. /**
  18830. * @event prepush
  18831. * @description
  18832. * [en]Fired just before a page is pushed.[/en]
  18833. * [ja]pageがpushされる直前に発火されます。[/ja]
  18834. * @param {Object} event [en]Event object.[/en]
  18835. * @param {Object} event.navigator
  18836. * [en]Component object.[/en]
  18837. * [ja]コンポーネントのオブジェクト。[/ja]
  18838. * @param {Object} event.currentPage
  18839. * [en]Current page object.[/en]
  18840. * [ja]現在のpageオブジェクト。[/ja]
  18841. * @param {Function} event.cancel
  18842. * [en]Call this function to cancel the push.[/en]
  18843. * [ja]この関数を呼び出すと、push処理がキャンセルされます。[/ja]
  18844. */
  18845. /**
  18846. * @event prepop
  18847. * @description
  18848. * [en]Fired just before a page is popped.[/en]
  18849. * [ja]pageがpopされる直前に発火されます。[/ja]
  18850. * @param {Object} event [en]Event object.[/en]
  18851. * @param {Object} event.navigator
  18852. * [en]Component object.[/en]
  18853. * [ja]コンポーネントのオブジェクト。[/ja]
  18854. * @param {Object} event.currentPage
  18855. * [en]Current page object.[/en]
  18856. * [ja]現在のpageオブジェクト。[/ja]
  18857. * @param {Function} event.cancel
  18858. * [en]Call this function to cancel the pop.[/en]
  18859. * [ja]この関数を呼び出すと、pageのpopがキャンセルされます。[/ja]
  18860. */
  18861. /**
  18862. * @event postpush
  18863. * @description
  18864. * [en]Fired just after a page is pushed.[/en]
  18865. * [ja]pageがpushされてアニメーションが終了してから発火されます。[/ja]
  18866. * @param {Object} event [en]Event object.[/en]
  18867. * @param {Object} event.navigator
  18868. * [en]Component object.[/en]
  18869. * [ja]コンポーネントのオブジェクト。[/ja]
  18870. * @param {Object} event.enterPage
  18871. * [en]Object of the next page.[/en]
  18872. * [ja]pushされたpageオブジェクト。[/ja]
  18873. * @param {Object} event.leavePage
  18874. * [en]Object of the previous page.[/en]
  18875. * [ja]以前のpageオブジェクト。[/ja]
  18876. */
  18877. /**
  18878. * @event postpop
  18879. * @description
  18880. * [en]Fired just after a page is popped.[/en]
  18881. * [ja]pageがpopされてアニメーションが終わった後に発火されます。[/ja]
  18882. * @param {Object} event [en]Event object.[/en]
  18883. * @param {Object} event.navigator
  18884. * [en]Component object.[/en]
  18885. * [ja]コンポーネントのオブジェクト。[/ja]
  18886. * @param {Object} event.enterPage
  18887. * [en]Object of the next page.[/en]
  18888. * [ja]popされて表示されるページのオブジェクト。[/ja]
  18889. * @param {Object} event.leavePage
  18890. * [en]Object of the previous page.[/en]
  18891. * [ja]popされて消えるページのオブジェクト。[/ja]
  18892. */
  18893. get: function get$$1() {
  18894. return this._animatorFactory;
  18895. }
  18896. }]);
  18897. function NavigatorElement() {
  18898. classCallCheck(this, NavigatorElement);
  18899. var _this = possibleConstructorReturn(this, (NavigatorElement.__proto__ || Object.getPrototypeOf(NavigatorElement)).call(this));
  18900. _this._isRunning = false;
  18901. _this._initialized = false;
  18902. _this._pageLoader = defaultPageLoader;
  18903. _this._pageMap = new WeakMap();
  18904. _this._updateAnimatorFactory();
  18905. return _this;
  18906. }
  18907. /**
  18908. * @property pageLoader
  18909. * @type {PageLoader}
  18910. * @description
  18911. * [en]PageLoader instance. It can be overriden to change the way pages are loaded by this element. Useful for lib developers.[/en]
  18912. * [ja]PageLoaderインスタンスを格納しています。[/ja]
  18913. */
  18914. createClass(NavigatorElement, [{
  18915. key: '_getPageTarget',
  18916. value: function _getPageTarget() {
  18917. return this._page || this.getAttribute('page');
  18918. }
  18919. /**
  18920. * @property page
  18921. * @type {*}
  18922. * @description
  18923. * [en]Specify the page to be loaded during initialization. This value takes precedence over the `page` attribute. Useful for lib developers.[/en]
  18924. * [ja]初期化時に読み込むページを指定します。`page`属性で指定した値よりも`page`プロパティに指定した値を優先します。[/ja]
  18925. */
  18926. }, {
  18927. key: 'connectedCallback',
  18928. value: function connectedCallback() {
  18929. var _this2 = this;
  18930. this.onDeviceBackButton = this._onDeviceBackButton.bind(this);
  18931. if (!platform.isAndroid() || this.getAttribute('swipeable') === 'force') {
  18932. var swipeAnimator = void 0;
  18933. this._swipe = new SwipeReveal({
  18934. element: this,
  18935. getThreshold: function getThreshold() {
  18936. return Math.max(0.2, parseFloat(_this2.getAttribute('swipe-threshold')) || 0);
  18937. },
  18938. swipeMax: function swipeMax() {
  18939. _this2._onSwipe && _this2._onSwipe(1, { duration: swipeAnimator.durationSwipe, timing: swipeAnimator.timingSwipe });
  18940. _this2[_this2.swipeMax ? 'swipeMax' : 'popPage']({ animator: swipeAnimator });
  18941. swipeAnimator = null;
  18942. },
  18943. swipeMid: function swipeMid(distance, width) {
  18944. _this2._onSwipe && _this2._onSwipe(distance / width);
  18945. swipeAnimator.translate(distance, width, _this2.topPage.previousElementSibling, _this2.topPage);
  18946. },
  18947. swipeMin: function swipeMin() {
  18948. _this2._onSwipe && _this2._onSwipe(0, { duration: swipeAnimator.durationRestore, timing: swipeAnimator.timingSwipe });
  18949. swipeAnimator.restore(_this2.topPage.previousElementSibling, _this2.topPage);
  18950. swipeAnimator = null;
  18951. },
  18952. ignoreSwipe: function ignoreSwipe(event, distance) {
  18953. // Basic conditions
  18954. if (!_this2._isRunning && _this2.children.length > 1) {
  18955. // Area or directional issues
  18956. var area = parseInt(_this2.getAttribute('swipe-target-width') || 25, 10);
  18957. if (event.gesture.direction === 'right' && area > distance) {
  18958. // Swipes on ons-back-button and its children
  18959. var isBB = function isBB(el) {
  18960. return (/ons-back-button/i.test(el.tagName)
  18961. );
  18962. };
  18963. if (!isBB(event.target) && !util$1.findParent(event.target, isBB, function (p) {
  18964. return (/ons-page/i.test(p.tagName)
  18965. );
  18966. })) {
  18967. // Animator is swipeable
  18968. var animation = (_this2.topPage.pushedOptions || {}).animation || _this2.animatorFactory._animation;
  18969. var Animator = _animatorDict$5[animation] instanceof Function ? _animatorDict$5[animation].call() : _animatorDict$5[animation];
  18970. if (typeof Animator !== 'undefined' && Animator.swipeable) {
  18971. swipeAnimator = new Animator(); // Prepare for the swipe
  18972. return false;
  18973. }
  18974. }
  18975. }
  18976. }
  18977. return true; // Ignore swipe
  18978. }
  18979. });
  18980. this.attributeChangedCallback('swipeable');
  18981. }
  18982. if (this._initialized) {
  18983. return;
  18984. }
  18985. this._initialized = true;
  18986. var deferred = util$1.defer();
  18987. this.loaded = deferred.promise;
  18988. rewritables.ready(this, function () {
  18989. var show = !util$1.hasAnyComponentAsParent(_this2);
  18990. var options = { animation: 'none', show: show };
  18991. if (_this2.pages.length === 0 && _this2._getPageTarget()) {
  18992. _this2.pushPage(_this2._getPageTarget(), options).then(function () {
  18993. return deferred.resolve();
  18994. });
  18995. } else if (_this2.pages.length > 0) {
  18996. for (var i = 0; i < _this2.pages.length; i++) {
  18997. verifyPageElement(_this2.pages[i]);
  18998. }
  18999. if (_this2.topPage) {
  19000. contentReady(_this2.topPage, function () {
  19001. return setTimeout(function () {
  19002. deferred.resolve();
  19003. show && _this2.topPage._show();
  19004. _this2._updateLastPageBackButton();
  19005. }, 0);
  19006. });
  19007. }
  19008. } else {
  19009. contentReady(_this2, function () {
  19010. if (_this2.pages.length === 0 && _this2._getPageTarget()) {
  19011. _this2.pushPage(_this2._getPageTarget(), options).then(function () {
  19012. return deferred.resolve();
  19013. });
  19014. } else {
  19015. deferred.resolve();
  19016. }
  19017. });
  19018. }
  19019. });
  19020. }
  19021. }, {
  19022. key: '_updateAnimatorFactory',
  19023. value: function _updateAnimatorFactory() {
  19024. this._animatorFactory = new AnimatorFactory({
  19025. animators: _animatorDict$5,
  19026. baseClass: NavigatorAnimator,
  19027. baseClassName: 'NavigatorAnimator',
  19028. defaultAnimation: this.getAttribute('animation')
  19029. });
  19030. }
  19031. }, {
  19032. key: 'disconnectedCallback',
  19033. value: function disconnectedCallback() {
  19034. this._backButtonHandler.destroy();
  19035. this._backButtonHandler = null;
  19036. this._swipe && this._swipe.dispose();
  19037. this._swipe = null;
  19038. }
  19039. }, {
  19040. key: 'attributeChangedCallback',
  19041. value: function attributeChangedCallback(name, last, current) {
  19042. switch (name) {
  19043. case 'animation':
  19044. this._updateAnimatorFactory();
  19045. break;
  19046. case 'swipeable':
  19047. this._swipe && this._swipe.update();
  19048. break;
  19049. }
  19050. }
  19051. /**
  19052. * @method popPage
  19053. * @signature popPage([options])
  19054. * @param {Object} [options]
  19055. * [en]Parameter object.[/en]
  19056. * [ja]オプションを指定するオブジェクト。[/ja]
  19057. * @param {String} [options.animation]
  19058. * [en]
  19059. * Animation name. Available animations are `"slide"`, `"lift"`, `"fade"` and `"none"`.
  19060. *
  19061. * These are platform based animations. For fixed animations, add `"-ios"` or `"-md"` suffix to the animation name. E.g. `"lift-ios"`, `"lift-md"`. Defaults values are `"slide-ios"` and `"fade-md"`.
  19062. * [/en]
  19063. * [ja][/ja]
  19064. * @param {String} [options.animationOptions]
  19065. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  19066. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  19067. * @param {Function} [options.callback]
  19068. * [en]Function that is called when the transition has ended.[/en]
  19069. * [ja]このメソッドによる画面遷移が終了した際に呼び出される関数オブジェクトを指定します。[/ja]
  19070. * @param {Object} [options.data]
  19071. * [en]Custom data that will be stored in the new page element.[/en]
  19072. * [ja][/ja]
  19073. * @param {Number} [options.times]
  19074. * [en]Number of pages to be popped. Only one animation will be shown.[/en]
  19075. * [ja][/ja]
  19076. * @return {Promise}
  19077. * [en]Promise which resolves to the revealed page.[/en]
  19078. * [ja]明らかにしたページを解決するPromiseを返します。[/ja]
  19079. * @description
  19080. * [en]Pops the current page from the page stack. The previous page will be displayed.[/en]
  19081. * [ja]現在表示中のページをページスタックから取り除きます。一つ前のページに戻ります。[/ja]
  19082. */
  19083. }, {
  19084. key: 'popPage',
  19085. value: function popPage() {
  19086. var _this3 = this;
  19087. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  19088. var _preparePageAndOption = this._preparePageAndOptions(null, options);
  19089. options = _preparePageAndOption.options;
  19090. if (util$1.isInteger(options.times) && options.times > 1) {
  19091. this._removePages(options.times);
  19092. }
  19093. var popUpdate = function popUpdate() {
  19094. return new Promise(function (resolve) {
  19095. _this3._pageLoader.unload(_this3.pages[_this3.pages.length - 1]);
  19096. resolve();
  19097. });
  19098. };
  19099. return this._popPage(options, popUpdate);
  19100. }
  19101. }, {
  19102. key: '_popPage',
  19103. value: function _popPage(options) {
  19104. var _this4 = this;
  19105. var update = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
  19106. return Promise.resolve();
  19107. };
  19108. if (this._isRunning) {
  19109. return Promise.reject('popPage is already running.');
  19110. }
  19111. if (this.pages.length <= 1) {
  19112. return Promise.reject('ons-navigator\'s page stack is empty.');
  19113. }
  19114. if (this._emitPrePopEvent()) {
  19115. return Promise.reject('Canceled in prepop event.');
  19116. }
  19117. var length = this.pages.length;
  19118. this._isRunning = true;
  19119. this.pages[length - 2].updateBackButton(length - 2 > 0);
  19120. return new Promise(function (resolve) {
  19121. var leavePage = _this4.pages[length - 1];
  19122. var enterPage = _this4.pages[length - 2];
  19123. options = util$1.extend({}, _this4.options || {}, leavePage.pushedOptions || {}, options);
  19124. if (options.data) {
  19125. enterPage.data = util$1.extend({}, enterPage.data || {}, options.data || {});
  19126. }
  19127. var done = function done() {
  19128. update().then(function () {
  19129. _this4._isRunning = false;
  19130. enterPage._show();
  19131. util$1.triggerElementEvent(_this4, 'postpop', { leavePage: leavePage, enterPage: enterPage, navigator: _this4 });
  19132. options.callback && options.callback(enterPage);
  19133. resolve(enterPage);
  19134. });
  19135. };
  19136. leavePage._hide();
  19137. enterPage.style.display = '';
  19138. var animator = options.animator || _this4._animatorFactory.newAnimator(options);
  19139. animator.pop(_this4.pages[length - 2], _this4.pages[length - 1], done);
  19140. }).catch(function () {
  19141. return _this4._isRunning = false;
  19142. });
  19143. }
  19144. /**
  19145. * @method pushPage
  19146. * @signature pushPage(page, [options])
  19147. * @param {String} page
  19148. * [en]Page URL. Can be either a HTML document or a template defined with the `<template>` tag.[/en]
  19149. * [ja]pageのURLか、もしくは`<template>`で宣言したテンプレートのid属性の値を指定できます。[/ja]
  19150. * @param {Object} [options]
  19151. * [en]Parameter object.[/en]
  19152. * [ja]オプションを指定するオブジェクト。[/ja]
  19153. * @param {String} [options.page]
  19154. * [en]Page URL. Only necessary if `page` parameter is null or undefined.[/en]
  19155. * [ja][/ja]
  19156. * @param {String} [options.pageHTML]
  19157. * [en]HTML code that will be computed as a new page. Overwrites `page` parameter.[/en]
  19158. * [ja][/ja]
  19159. * @param {String} [options.animation]
  19160. * [en]
  19161. * Animation name. Available animations are `"slide"`, `"lift"`, `"fade"` and `"none"`.
  19162. *
  19163. * These are platform based animations. For fixed animations, add `"-ios"` or `"-md"` suffix to the animation name. E.g. `"lift-ios"`, `"lift-md"`. Defaults values are `"slide-ios"` and `"fade-md"`.
  19164. * [/en]
  19165. * [ja][/ja]
  19166. * @param {String} [options.animationOptions]
  19167. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`[/en]
  19168. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}` [/ja]
  19169. * @param {Function} [options.callback]
  19170. * [en]Function that is called when the transition has ended.[/en]
  19171. * [ja]pushPage()による画面遷移が終了した時に呼び出される関数オブジェクトを指定します。[/ja]
  19172. * @param {Object} [options.data]
  19173. * [en]Custom data that will be stored in the new page element.[/en]
  19174. * [ja][/ja]
  19175. * @return {Promise}
  19176. * [en]Promise which resolves to the pushed page.[/en]
  19177. * [ja]追加したページを解決するPromiseを返します。[/ja]
  19178. * @description
  19179. * [en]Pushes the specified page into the stack.[/en]
  19180. * [ja]指定したpageを新しいページスタックに追加します。新しいページが表示されます。[/ja]
  19181. */
  19182. }, {
  19183. key: 'pushPage',
  19184. value: function pushPage(page) {
  19185. var _this5 = this;
  19186. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19187. var _preparePageAndOption2 = this._preparePageAndOptions(page, options);
  19188. page = _preparePageAndOption2.page;
  19189. options = _preparePageAndOption2.options;
  19190. var prepare = function prepare(pageElement) {
  19191. verifyPageElement(pageElement);
  19192. _this5._pageMap.set(pageElement, page);
  19193. pageElement = util$1.extend(pageElement, {
  19194. data: options.data
  19195. });
  19196. pageElement.style.visibility = 'hidden';
  19197. };
  19198. if (options.pageHTML) {
  19199. return this._pushPage(options, function () {
  19200. return new Promise(function (resolve) {
  19201. instantPageLoader.load({ page: options.pageHTML, parent: _this5, params: options.data }, function (pageElement) {
  19202. prepare(pageElement);
  19203. resolve();
  19204. });
  19205. });
  19206. });
  19207. }
  19208. return this._pushPage(options, function () {
  19209. return new Promise(function (resolve) {
  19210. _this5._pageLoader.load({ page: page, parent: _this5, params: options.data }, function (pageElement) {
  19211. prepare(pageElement);
  19212. resolve();
  19213. });
  19214. });
  19215. });
  19216. }
  19217. }, {
  19218. key: '_pushPage',
  19219. value: function _pushPage() {
  19220. var _this6 = this;
  19221. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  19222. var update = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
  19223. return Promise.resolve();
  19224. };
  19225. if (this._isRunning) {
  19226. return Promise.reject('pushPage is already running.');
  19227. }
  19228. if (this._emitPrePushEvent()) {
  19229. return Promise.reject('Canceled in prepush event.');
  19230. }
  19231. this._isRunning = true;
  19232. var animationOptions = AnimatorFactory.parseAnimationOptionsString(this.getAttribute('animation-options'));
  19233. options = util$1.extend({}, this.options || {}, { animationOptions: animationOptions }, options);
  19234. var animator = this._animatorFactory.newAnimator(options);
  19235. return update().then(function () {
  19236. var pageLength = _this6.pages.length;
  19237. var enterPage = _this6.pages[pageLength - 1];
  19238. var leavePage = options.leavePage || _this6.pages[pageLength - 2];
  19239. verifyPageElement(enterPage);
  19240. enterPage.updateBackButton(pageLength > (options._replacePage ? 2 : 1));
  19241. enterPage.pushedOptions = util$1.extend({}, enterPage.pushedOptions || {}, options || {});
  19242. enterPage.data = util$1.extend({}, enterPage.data || {}, options.data || {});
  19243. enterPage.unload = enterPage.unload || options.unload;
  19244. return new Promise(function (resolve) {
  19245. var done = function done() {
  19246. _this6._isRunning = false;
  19247. options.show !== false && setImmediate(function () {
  19248. return enterPage._show();
  19249. });
  19250. util$1.triggerElementEvent(_this6, 'postpush', { leavePage: leavePage, enterPage: enterPage, navigator: _this6 });
  19251. if (leavePage) {
  19252. leavePage.style.display = 'none';
  19253. }
  19254. options.callback && options.callback(enterPage);
  19255. resolve(enterPage);
  19256. };
  19257. enterPage.style.visibility = '';
  19258. if (leavePage) {
  19259. leavePage._hide();
  19260. animator.push(enterPage, leavePage, done);
  19261. } else {
  19262. done();
  19263. }
  19264. });
  19265. }).catch(function (error) {
  19266. _this6._isRunning = false;
  19267. throw error;
  19268. });
  19269. }
  19270. /**
  19271. * @method replacePage
  19272. * @signature replacePage(page, [options])
  19273. * @return {Promise}
  19274. * [en]Promise which resolves to the new page.[/en]
  19275. * [ja]新しいページを解決するPromiseを返します。[/ja]
  19276. * @description
  19277. * [en]Replaces the current top page with the specified one. Extends `pushPage()` parameters.[/en]
  19278. * [ja]現在表示中のページをを指定したページに置き換えます。[/ja]
  19279. */
  19280. }, {
  19281. key: 'replacePage',
  19282. value: function replacePage(page) {
  19283. var _this7 = this;
  19284. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19285. return this.pushPage(page, options).then(function (resolvedValue) {
  19286. if (_this7.pages.length > 1) {
  19287. _this7._pageLoader.unload(_this7.pages[_this7.pages.length - 2]);
  19288. }
  19289. _this7._updateLastPageBackButton();
  19290. return Promise.resolve(resolvedValue);
  19291. });
  19292. }
  19293. /**
  19294. * @method insertPage
  19295. * @signature insertPage(index, page, [options])
  19296. * @param {Number} index
  19297. * [en]The index where it should be inserted.[/en]
  19298. * [ja]スタックに挿入する位置のインデックスを指定します。[/ja]
  19299. * @return {Promise}
  19300. * [en]Promise which resolves to the inserted page.[/en]
  19301. * [ja]指定したページを解決するPromiseを返します。[/ja]
  19302. * @description
  19303. * [en]Insert the specified page into the stack with at a position defined by the `index` argument. Extends `pushPage()` parameters.[/en]
  19304. * [ja]指定したpageをページスタックのindexで指定した位置に追加します。[/ja]
  19305. */
  19306. }, {
  19307. key: 'insertPage',
  19308. value: function insertPage(index, page) {
  19309. var _this8 = this;
  19310. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  19311. var _preparePageAndOption3 = this._preparePageAndOptions(page, options);
  19312. page = _preparePageAndOption3.page;
  19313. options = _preparePageAndOption3.options;
  19314. index = this._normalizeIndex(index);
  19315. if (index >= this.pages.length) {
  19316. return this.pushPage(page, options);
  19317. }
  19318. page = typeof options.pageHTML === 'string' ? options.pageHTML : page;
  19319. var loader = typeof options.pageHTML === 'string' ? instantPageLoader : this._pageLoader;
  19320. return new Promise(function (resolve) {
  19321. loader.load({ page: page, parent: _this8 }, function (pageElement) {
  19322. verifyPageElement(pageElement);
  19323. _this8._pageMap.set(pageElement, page);
  19324. pageElement = util$1.extend(pageElement, {
  19325. data: options.data,
  19326. pushedOptions: options
  19327. });
  19328. options.animationOptions = util$1.extend({}, AnimatorFactory.parseAnimationOptionsString(_this8.getAttribute('animation-options')), options.animationOptions || {});
  19329. pageElement.style.display = 'none';
  19330. _this8.insertBefore(pageElement, _this8.pages[index]);
  19331. _this8.topPage.updateBackButton(true);
  19332. setTimeout(function () {
  19333. pageElement = null;
  19334. resolve(_this8.pages[index]);
  19335. }, 1000 / 60);
  19336. });
  19337. });
  19338. }
  19339. /**
  19340. * @method removePage
  19341. * @signature removePage(index, [options])
  19342. * @param {Number} index
  19343. * [en]The index where it should be removed.[/en]
  19344. * [ja]スタックから削除するページのインデックスを指定します。[/ja]
  19345. * @return {Promise}
  19346. * [en]Promise which resolves to the revealed page.[/en]
  19347. * [ja]削除によって表示されたページを解決するPromiseを返します。[/ja]
  19348. * @description
  19349. * [en]Remove the specified page at a position in the stack defined by the `index` argument. Extends `popPage()` parameters.[/en]
  19350. * [ja]指定したインデックスにあるページを削除します。[/ja]
  19351. */
  19352. }, {
  19353. key: 'removePage',
  19354. value: function removePage(index) {
  19355. var _this9 = this;
  19356. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19357. index = this._normalizeIndex(index);
  19358. if (index < this.pages.length - 1) {
  19359. return new Promise(function (resolve) {
  19360. var leavePage = _this9.pages[index];
  19361. var enterPage = _this9.topPage;
  19362. _this9._pageMap.delete(leavePage);
  19363. _this9._pageLoader.unload(leavePage);
  19364. if (_this9.pages.length === 1) {
  19365. // edge case
  19366. _this9.topPage.updateBackButton(false);
  19367. }
  19368. resolve(enterPage);
  19369. });
  19370. } else {
  19371. return this.popPage(options);
  19372. }
  19373. }
  19374. /**
  19375. * @method resetToPage
  19376. * @signature resetToPage(page, [options])
  19377. * @return {Promise}
  19378. * [en]Promise which resolves to the new top page.[/en]
  19379. * [ja]新しいトップページを解決するPromiseを返します。[/ja]
  19380. * @param {Boolean} [options.pop]
  19381. * [en]Performs 'pop' effect if `true` instead of 'push' or none. This also sets `options.animation` value to `default` instead of `none`.[/en]
  19382. * [ja][/ja]
  19383. * @description
  19384. * [en]Clears page stack and adds the specified page to the stack. Extends `pushPage()` parameters.[/en]
  19385. * [ja]ページスタックをリセットし、指定したページを表示します。[/ja]
  19386. */
  19387. }, {
  19388. key: 'resetToPage',
  19389. value: function resetToPage(page) {
  19390. var _this10 = this;
  19391. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19392. var _preparePageAndOption4 = this._preparePageAndOptions(page, options);
  19393. page = _preparePageAndOption4.page;
  19394. options = _preparePageAndOption4.options;
  19395. if (!options.animator && !options.animation && !options.pop) {
  19396. options.animation = 'none';
  19397. }
  19398. if (!options.page && !options.pageHTML && this._getPageTarget()) {
  19399. page = options.page = this._getPageTarget();
  19400. }
  19401. if (options.pop) {
  19402. this._removePages();
  19403. return this.insertPage(0, page, { data: options.data }).then(function () {
  19404. return _this10.popPage(options);
  19405. });
  19406. }
  19407. // Tip: callback runs before resolved promise
  19408. var callback = options.callback;
  19409. options.callback = function (newPage) {
  19410. _this10._removePages();
  19411. newPage.updateBackButton(false);
  19412. callback && callback(newPage);
  19413. };
  19414. return this.pushPage(page, options);
  19415. }
  19416. /**
  19417. * @method bringPageTop
  19418. * @signature bringPageTop(item, [options])
  19419. * @param {String|Number} item
  19420. * [en]Page URL or index of an existing page in navigator's stack.[/en]
  19421. * [ja]ページのURLかもしくはons-navigatorのページスタックのインデックス値を指定します。[/ja]
  19422. * @return {Promise}
  19423. * [en]Promise which resolves to the new top page.[/en]
  19424. * [ja]新しいトップページを解決するPromiseを返します。[/ja]
  19425. * @description
  19426. * [en]Brings the given page to the top of the page stack if it already exists or pushes it into the stack if doesn't. Extends `pushPage()` parameters.[/en]
  19427. * [ja]指定したページをページスタックの一番上に移動します。もし指定したページが無かった場合新しくpushされます。[/ja]
  19428. */
  19429. }, {
  19430. key: 'bringPageTop',
  19431. value: function bringPageTop(item) {
  19432. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19433. if (['number', 'string'].indexOf(typeof item === 'undefined' ? 'undefined' : _typeof(item)) === -1) {
  19434. util$1.throw('First argument must be a page name or the index of an existing page. You supplied ' + item);
  19435. }
  19436. var index = typeof item === 'number' ? this._normalizeIndex(item) : this._lastIndexOfPage(item);
  19437. var page = this.pages[index];
  19438. if (index < 0) {
  19439. return this.pushPage(item, options);
  19440. }
  19441. var _preparePageAndOption5 = this._preparePageAndOptions(page, options);
  19442. options = _preparePageAndOption5.options;
  19443. if (index === this.pages.length - 1) {
  19444. return Promise.resolve(page);
  19445. }
  19446. if (!page) {
  19447. util$1.throw('Failed to find item ' + item);
  19448. }
  19449. if (this._isRunning) {
  19450. return Promise.reject('pushPage is already running.');
  19451. }
  19452. if (this._emitPrePushEvent()) {
  19453. return Promise.reject('Canceled in prepush event.');
  19454. }
  19455. page.style.display = '';
  19456. page.style.visibility = 'hidden';
  19457. page.parentNode.appendChild(page);
  19458. return this._pushPage(options);
  19459. }
  19460. }, {
  19461. key: '_preparePageAndOptions',
  19462. value: function _preparePageAndOptions(page) {
  19463. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19464. if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) != 'object') {
  19465. util$1.throw('options must be an object. You supplied ' + options);
  19466. }
  19467. if ((page === null || page === undefined) && options.page) {
  19468. page = options.page;
  19469. }
  19470. options = util$1.extend({}, this.options || {}, options, { page: page });
  19471. return { page: page, options: options };
  19472. }
  19473. }, {
  19474. key: '_removePages',
  19475. value: function _removePages(times) {
  19476. var pages = this.pages;
  19477. var until = times === undefined ? 0 : pages.length - times;
  19478. until = until < 0 ? 1 : until;
  19479. for (var i = pages.length - 2; i >= until; i--) {
  19480. this._pageMap.delete(pages[i]);
  19481. this._pageLoader.unload(pages[i]);
  19482. }
  19483. }
  19484. }, {
  19485. key: '_updateLastPageBackButton',
  19486. value: function _updateLastPageBackButton() {
  19487. var index = this.pages.length - 1;
  19488. if (index >= 0) {
  19489. this.pages[index].updateBackButton(index > 0);
  19490. }
  19491. }
  19492. }, {
  19493. key: '_normalizeIndex',
  19494. value: function _normalizeIndex(index) {
  19495. return index >= 0 ? index : Math.abs(this.pages.length + index) % this.pages.length;
  19496. }
  19497. }, {
  19498. key: '_onDeviceBackButton',
  19499. value: function _onDeviceBackButton(event) {
  19500. if (this.pages.length > 1) {
  19501. this.popPage();
  19502. } else {
  19503. event.callParentHandler();
  19504. }
  19505. }
  19506. }, {
  19507. key: '_lastIndexOfPage',
  19508. value: function _lastIndexOfPage(pageName) {
  19509. var index = void 0;
  19510. for (index = this.pages.length - 1; index >= 0; index--) {
  19511. if (pageName === this._pageMap.get(this.pages[index])) {
  19512. break;
  19513. }
  19514. }
  19515. return index;
  19516. }
  19517. }, {
  19518. key: '_emitPreEvent',
  19519. value: function _emitPreEvent(name) {
  19520. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19521. var isCanceled = false;
  19522. util$1.triggerElementEvent(this, 'pre' + name, util$1.extend({
  19523. navigator: this,
  19524. currentPage: this.pages[this.pages.length - 1],
  19525. cancel: function cancel() {
  19526. return isCanceled = true;
  19527. }
  19528. }, data));
  19529. return isCanceled;
  19530. }
  19531. }, {
  19532. key: '_emitPrePushEvent',
  19533. value: function _emitPrePushEvent() {
  19534. return this._emitPreEvent('push');
  19535. }
  19536. }, {
  19537. key: '_emitPrePopEvent',
  19538. value: function _emitPrePopEvent() {
  19539. var l = this.pages.length;
  19540. return this._emitPreEvent('pop', {
  19541. leavePage: this.pages[l - 1],
  19542. enterPage: this.pages[l - 2]
  19543. });
  19544. }
  19545. // TODO: 書き直す
  19546. }, {
  19547. key: '_createPageElement',
  19548. value: function _createPageElement(templateHTML) {
  19549. var pageElement = util$1.createElement(internal$1.normalizePageHTML(templateHTML));
  19550. verifyPageElement(pageElement);
  19551. return pageElement;
  19552. }
  19553. /**
  19554. * @property onDeviceBackButton
  19555. * @type {Object}
  19556. * @description
  19557. * [en]Back-button handler.[/en]
  19558. * [ja]バックボタンハンドラ。[/ja]
  19559. */
  19560. }, {
  19561. key: '_show',
  19562. value: function _show() {
  19563. var _this11 = this;
  19564. this.loaded.then(function () {
  19565. return _this11.topPage && _this11.topPage._show();
  19566. });
  19567. }
  19568. }, {
  19569. key: '_hide',
  19570. value: function _hide() {
  19571. this.topPage && this.topPage._hide();
  19572. }
  19573. }, {
  19574. key: '_destroy',
  19575. value: function _destroy() {
  19576. for (var i = this.pages.length - 1; i >= 0; i--) {
  19577. this._pageLoader.unload(this.pages[i]);
  19578. }
  19579. this.remove();
  19580. }
  19581. /**
  19582. * @param {String} name
  19583. * @param {Function} Animator
  19584. */
  19585. }, {
  19586. key: 'pageLoader',
  19587. get: function get$$1() {
  19588. return this._pageLoader;
  19589. },
  19590. set: function set$$1(pageLoader) {
  19591. if (!(pageLoader instanceof PageLoader)) {
  19592. util$1.throwPageLoader();
  19593. }
  19594. this._pageLoader = pageLoader;
  19595. }
  19596. }, {
  19597. key: 'page',
  19598. get: function get$$1() {
  19599. return this._page;
  19600. },
  19601. set: function set$$1(page) {
  19602. this._page = page;
  19603. }
  19604. }, {
  19605. key: 'onDeviceBackButton',
  19606. get: function get$$1() {
  19607. return this._backButtonHandler;
  19608. },
  19609. set: function set$$1(callback) {
  19610. if (this._backButtonHandler) {
  19611. this._backButtonHandler.destroy();
  19612. }
  19613. this._backButtonHandler = deviceBackButtonDispatcher.createHandler(this, callback);
  19614. }
  19615. /**
  19616. * @property topPage
  19617. * @readonly
  19618. * @type {HTMLElement}
  19619. * @description
  19620. * [en]Current top page element. Use this method to access options passed by `pushPage()`-like methods.[/en]
  19621. * [ja]現在のページを取得します。pushPage()やresetToPage()メソッドの引数を取得できます。[/ja]
  19622. */
  19623. }, {
  19624. key: 'topPage',
  19625. get: function get$$1() {
  19626. var last = this.lastElementChild;
  19627. while (last && last.tagName !== 'ONS-PAGE') {
  19628. last = last.previousElementSibling;
  19629. }
  19630. return last;
  19631. }
  19632. /**
  19633. * @property pages
  19634. * @readonly
  19635. * @type {Array}
  19636. * @description
  19637. * [en]Copy of the navigator's page stack.[/en]
  19638. * [ja][/ja]
  19639. */
  19640. }, {
  19641. key: 'pages',
  19642. get: function get$$1() {
  19643. return util$1.arrayFrom(this.children).filter(function (element) {
  19644. return element.tagName === 'ONS-PAGE';
  19645. });
  19646. }
  19647. /**
  19648. * @property onSwipe
  19649. * @type {Function}
  19650. * @description
  19651. * [en]Hook called whenever the user slides the navigator (swipe-to-pop). It gets a decimal ratio (0-1) and an animationOptions object as arguments.[/en]
  19652. * [ja][/ja]
  19653. */
  19654. }, {
  19655. key: 'onSwipe',
  19656. get: function get$$1() {
  19657. return this._onSwipe;
  19658. },
  19659. set: function set$$1(value) {
  19660. if (value && !(value instanceof Function)) {
  19661. util$1.throw('"onSwipe" must be a function');
  19662. }
  19663. this._onSwipe = value;
  19664. }
  19665. /**
  19666. * @property options
  19667. * @type {Object}
  19668. * @description
  19669. * [en]Default options object. Attributes have priority over this property.[/en]
  19670. * [ja][/ja]
  19671. */
  19672. /**
  19673. * @property options.animation
  19674. * @type {String}
  19675. * @description
  19676. * [en]
  19677. * Animation name. Available animations are `"slide"`, `"lift"`, `"fade"` and `"none"`.
  19678. * These are platform based animations. For fixed animations, add `"-ios"` or `"-md"` suffix to the animation name. E.g. `"lift-ios"`, `"lift-md"`. Defaults values are `"slide-ios"` and `"fade-md"`.
  19679. * [/en]
  19680. * [ja][/ja]
  19681. */
  19682. /**
  19683. * @property options.animationOptions
  19684. * @type {String}
  19685. * @description
  19686. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  19687. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}` [/ja]
  19688. */
  19689. /**
  19690. * @property options.callback
  19691. * @type {String}
  19692. * @description
  19693. * [en]Function that is called when the transition has ended.[/en]
  19694. * [ja]このメソッドによる画面遷移が終了した際に呼び出される関数オブジェクトを指定します。[/ja]
  19695. */
  19696. }, {
  19697. key: 'options',
  19698. get: function get$$1() {
  19699. return this._options;
  19700. },
  19701. set: function set$$1(object) {
  19702. this._options = object;
  19703. }
  19704. }, {
  19705. key: '_isRunning',
  19706. set: function set$$1(value) {
  19707. this.setAttribute('_is-running', value ? 'true' : 'false');
  19708. },
  19709. get: function get$$1() {
  19710. return JSON.parse(this.getAttribute('_is-running'));
  19711. }
  19712. }], [{
  19713. key: 'registerAnimator',
  19714. value: function registerAnimator(name, Animator) {
  19715. if (!(Animator.prototype instanceof NavigatorAnimator)) {
  19716. util$1.throwAnimator('Navigator');
  19717. }
  19718. _animatorDict$5[name] = Animator;
  19719. }
  19720. }, {
  19721. key: 'observedAttributes',
  19722. get: function get$$1() {
  19723. return ['animation', 'swipeable'];
  19724. }
  19725. }, {
  19726. key: 'animators',
  19727. get: function get$$1() {
  19728. return _animatorDict$5;
  19729. }
  19730. }, {
  19731. key: 'NavigatorAnimator',
  19732. get: function get$$1() {
  19733. return NavigatorAnimator;
  19734. }
  19735. }, {
  19736. key: 'events',
  19737. get: function get$$1() {
  19738. return ['prepush', 'postpush', 'prepop', 'postpop'];
  19739. }
  19740. }, {
  19741. key: 'rewritables',
  19742. get: function get$$1() {
  19743. return rewritables;
  19744. }
  19745. }]);
  19746. return NavigatorElement;
  19747. }(BaseElement);
  19748. onsElements.Navigator = NavigatorElement;
  19749. customElements.define('ons-navigator', NavigatorElement);
  19750. /*
  19751. Copyright 2013-2015 ASIAL CORPORATION
  19752. Licensed under the Apache License, Version 2.0 (the "License");
  19753. you may not use this file except in compliance with the License.
  19754. You may obtain a copy of the License at
  19755. http://www.apache.org/licenses/LICENSE-2.0
  19756. Unless required by applicable law or agreed to in writing, software
  19757. distributed under the License is distributed on an "AS IS" BASIS,
  19758. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19759. See the License for the specific language governing permissions and
  19760. limitations under the License.
  19761. */
  19762. var defaultClassName$10 = 'toolbar';
  19763. var scheme$18 = {
  19764. '': 'toolbar--*',
  19765. '.toolbar__left': 'toolbar--*__left',
  19766. '.toolbar__center': 'toolbar--*__center',
  19767. '.toolbar__right': 'toolbar--*__right'
  19768. };
  19769. /**
  19770. * @element ons-toolbar
  19771. * @category page
  19772. * @modifier material
  19773. * [en]Material Design toolbar.[/en]
  19774. * [ja][/ja]
  19775. * @modifier transparent
  19776. * [en]Transparent toolbar.[/en]
  19777. * [ja]透明な背景を持つツールバーを表示します。[/ja]
  19778. * @modifier cover-content
  19779. * [en]Displays the toolbar on top of the page's content. Should be combined with `transparent` modifier.[/en]
  19780. * [ja][/ja]
  19781. * @modifier noshadow
  19782. * [en]Toolbar without shadow.[/en]
  19783. * [ja]ツールバーに影を付けずに表示します。[/ja]
  19784. * @description
  19785. * [en]
  19786. * Toolbar component that can be used with navigation.
  19787. *
  19788. * Left, center and right containers can be specified by class names.
  19789. *
  19790. * This component will automatically display as a Material Design toolbar when running on Android devices.
  19791. * [/en]
  19792. * [ja]ナビゲーションで使用するツールバー用コンポーネントです。クラス名により、左、中央、右のコンテナを指定できます。[/ja]
  19793. * @codepen aHmGL
  19794. * @tutorial vanilla/Reference/toolbar
  19795. * @guide compilation.html#toolbar-compilation [en]Adding a toolbar[/en][ja]ツールバーの追加[/ja]
  19796. * @seealso ons-bottom-toolbar
  19797. * [en]The `<ons-bottom-toolbar>` displays a toolbar on the bottom of the page.[/en]
  19798. * [ja]ons-bottom-toolbarコンポーネント[/ja]
  19799. * @seealso ons-back-button
  19800. * [en]The `<ons-back-button>` component displays a back button inside the toolbar.[/en]
  19801. * [ja]ons-back-buttonコンポーネント[/ja]
  19802. * @seealso ons-toolbar-button
  19803. * [en]The `<ons-toolbar-button>` component displays a toolbar button inside the toolbar.[/en]
  19804. * [ja]ons-toolbar-buttonコンポーネント[/ja]
  19805. * @example
  19806. * <ons-page>
  19807. * <ons-toolbar>
  19808. * <div class="left">
  19809. * <ons-back-button>
  19810. * Back
  19811. * </ons-back-button>
  19812. * </div>
  19813. * <div class="center">
  19814. * Title
  19815. * </div>
  19816. * <div class="right">
  19817. * <ons-toolbar-button>
  19818. * <ons-icon icon="md-menu"></ons-icon>
  19819. * </ons-toolbar-button>
  19820. * </div>
  19821. * </ons-toolbar>
  19822. * </ons-page>
  19823. */
  19824. var ToolbarElement = function (_BaseElement) {
  19825. inherits(ToolbarElement, _BaseElement);
  19826. /**
  19827. * @attribute inline
  19828. * @initonly
  19829. * @description
  19830. * [en]Display the toolbar as an inline element.[/en]
  19831. * [ja]ツールバーをインラインに置きます。スクロール領域内にそのまま表示されます。[/ja]
  19832. */
  19833. /**
  19834. * @attribute static
  19835. * @description
  19836. * [en]Static toolbars are not animated by `ons-navigator` when pushing or popping pages. This can be useful to improve performance in some situations.[/en]
  19837. * [ja][/ja]
  19838. */
  19839. /**
  19840. * @attribute modifier
  19841. * @description
  19842. * [en]The appearance of the toolbar.[/en]
  19843. * [ja]ツールバーの表現を指定します。[/ja]
  19844. */
  19845. function ToolbarElement() {
  19846. classCallCheck(this, ToolbarElement);
  19847. var _this = possibleConstructorReturn(this, (ToolbarElement.__proto__ || Object.getPrototypeOf(ToolbarElement)).call(this));
  19848. contentReady(_this, function () {
  19849. _this._compile();
  19850. });
  19851. return _this;
  19852. }
  19853. createClass(ToolbarElement, [{
  19854. key: 'attributeChangedCallback',
  19855. value: function attributeChangedCallback(name, last, current) {
  19856. switch (name) {
  19857. case 'class':
  19858. util$1.restoreClass(this, defaultClassName$10, scheme$18);
  19859. break;
  19860. case 'modifier':
  19861. ModifierUtil.onModifierChanged(last, current, this, scheme$18);
  19862. break;
  19863. }
  19864. }
  19865. /**
  19866. * @method setVisibility
  19867. * @signature setVisibility(visible)
  19868. * @param {Boolean} visible
  19869. * [en]Set to true to show the toolbar, false to hide it[/en]
  19870. * [ja][/ja]
  19871. * @description
  19872. * [en]Shows the toolbar if visible is true, otherwise hides it.[/en]
  19873. * [ja][/ja]
  19874. */
  19875. }, {
  19876. key: 'setVisibility',
  19877. value: function setVisibility(visible) {
  19878. var _this2 = this;
  19879. contentReady(this, function () {
  19880. _this2.style.display = visible ? '' : 'none';
  19881. if (_this2.parentNode) {
  19882. var siblingBackground = util$1.findChild(_this2.parentNode, '.page__background');
  19883. if (siblingBackground) {
  19884. siblingBackground.style.top = visible ? null : 0;
  19885. }
  19886. var siblingContent = util$1.findChild(_this2.parentNode, '.page__content');
  19887. if (siblingContent) {
  19888. siblingContent.style.top = visible ? null : 0;
  19889. }
  19890. }
  19891. });
  19892. }
  19893. /**
  19894. * @method show
  19895. * @signature show()
  19896. * @description
  19897. * [en]Show the toolbar.[/en]
  19898. * [ja][/ja]
  19899. */
  19900. }, {
  19901. key: 'show',
  19902. value: function show() {
  19903. this.setVisibility(true);
  19904. }
  19905. /**
  19906. * @method hide
  19907. * @signature hide()
  19908. * @description
  19909. * [en]Hide the toolbar.[/en]
  19910. * [ja][/ja]
  19911. */
  19912. }, {
  19913. key: 'hide',
  19914. value: function hide() {
  19915. this.setVisibility(false);
  19916. }
  19917. /**
  19918. * @return {HTMLElement}
  19919. */
  19920. }, {
  19921. key: '_getToolbarLeftItemsElement',
  19922. value: function _getToolbarLeftItemsElement() {
  19923. return this.querySelector('.left') || internal$1.nullElement;
  19924. }
  19925. /**
  19926. * @return {HTMLElement}
  19927. */
  19928. }, {
  19929. key: '_getToolbarCenterItemsElement',
  19930. value: function _getToolbarCenterItemsElement() {
  19931. return this.querySelector('.center') || internal$1.nullElement;
  19932. }
  19933. /**
  19934. * @return {HTMLElement}
  19935. */
  19936. }, {
  19937. key: '_getToolbarRightItemsElement',
  19938. value: function _getToolbarRightItemsElement() {
  19939. return this.querySelector('.right') || internal$1.nullElement;
  19940. }
  19941. /**
  19942. * @return {HTMLElement}
  19943. */
  19944. }, {
  19945. key: '_getToolbarBackButtonLabelElement',
  19946. value: function _getToolbarBackButtonLabelElement() {
  19947. return this.querySelector('ons-back-button .back-button__label') || internal$1.nullElement;
  19948. }
  19949. /**
  19950. * @return {HTMLElement}
  19951. */
  19952. }, {
  19953. key: '_getToolbarBackButtonIconElement',
  19954. value: function _getToolbarBackButtonIconElement() {
  19955. return this.querySelector('ons-back-button .back-button__icon') || internal$1.nullElement;
  19956. }
  19957. }, {
  19958. key: '_compile',
  19959. value: function _compile() {
  19960. autoStyle.prepare(this);
  19961. this.classList.add(defaultClassName$10);
  19962. this._ensureToolbarItemElements();
  19963. ModifierUtil.initModifier(this, scheme$18);
  19964. }
  19965. }, {
  19966. key: '_ensureToolbarItemElements',
  19967. value: function _ensureToolbarItemElements() {
  19968. for (var i = this.childNodes.length - 1; i >= 0; i--) {
  19969. // case of not element
  19970. if (this.childNodes[i].nodeType != 1) {
  19971. this.removeChild(this.childNodes[i]);
  19972. }
  19973. }
  19974. var center = this._ensureToolbarElement('center');
  19975. center.classList.add('toolbar__title');
  19976. if (this.children.length !== 1 || !this.children[0].classList.contains('center')) {
  19977. var left = this._ensureToolbarElement('left');
  19978. var right = this._ensureToolbarElement('right');
  19979. if (this.children[0] !== left || this.children[1] !== center || this.children[2] !== right) {
  19980. this.appendChild(left);
  19981. this.appendChild(center);
  19982. this.appendChild(right);
  19983. }
  19984. }
  19985. }
  19986. }, {
  19987. key: '_ensureToolbarElement',
  19988. value: function _ensureToolbarElement(name) {
  19989. if (util$1.findChild(this, '.toolbar__' + name)) {
  19990. var _element = util$1.findChild(this, '.toolbar__' + name);
  19991. _element.classList.add(name);
  19992. return _element;
  19993. }
  19994. var element = util$1.findChild(this, '.' + name) || util$1.create('.' + name);
  19995. element.classList.add('toolbar__' + name);
  19996. return element;
  19997. }
  19998. }], [{
  19999. key: 'observedAttributes',
  20000. get: function get$$1() {
  20001. return ['modifier', 'class'];
  20002. }
  20003. }]);
  20004. return ToolbarElement;
  20005. }(BaseElement);
  20006. onsElements.Toolbar = ToolbarElement;
  20007. customElements.define('ons-toolbar', ToolbarElement);
  20008. /*
  20009. Copyright 2013-2015 ASIAL CORPORATION
  20010. Licensed under the Apache License, Version 2.0 (the "License");
  20011. you may not use this file except in compliance with the License.
  20012. You may obtain a copy of the License at
  20013. http://www.apache.org/licenses/LICENSE-2.0
  20014. Unless required by applicable law or agreed to in writing, software
  20015. distributed under the License is distributed on an "AS IS" BASIS,
  20016. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20017. See the License for the specific language governing permissions and
  20018. limitations under the License.
  20019. */
  20020. var defaultClassName$9 = 'page';
  20021. var scheme$17 = {
  20022. '': 'page--*',
  20023. '.page__content': 'page--*__content',
  20024. '.page__background': 'page--*__background'
  20025. };
  20026. /**
  20027. * @element ons-page
  20028. * @category page
  20029. * @modifier material
  20030. * [en]Material Design style[/en]
  20031. * [ja][/ja]
  20032. * @description
  20033. * [en]
  20034. * This component defines the root of each page. If the content is large it will become scrollable.
  20035. *
  20036. * A navigation bar can be added to the top of the page using the `<ons-toolbar>` element.
  20037. * [/en]
  20038. * [ja]ページ定義のためのコンポーネントです。このコンポーネントの内容はスクロールが許可されます。[/ja]
  20039. * @tutorial vanilla/Reference/page
  20040. * @guide lifecycle.html#events
  20041. * [en]Overview of page events[/en]
  20042. * [ja]Overview of page events[/ja]
  20043. * @guide fundamentals.html#managing-pages
  20044. * [en]Managing multiple pages[/en]
  20045. * [ja]複数のページを管理する[/ja]
  20046. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  20047. * @seealso ons-toolbar
  20048. * [en]Use the `<ons-toolbar>` element to add a navigation bar to the top of the page.[/en]
  20049. * [ja][/ja]
  20050. * @example
  20051. * <ons-page>
  20052. * <ons-toolbar>
  20053. * <div class="left">
  20054. * <ons-back-button>Back</ons-back-button>
  20055. * </div>
  20056. * <div class="center">Title</div>
  20057. * <div class="right">
  20058. * <ons-toolbar-button>
  20059. * <ons-icon icon="md-menu"></ons-icon>
  20060. * </ons-toolbar-button>
  20061. * </div>
  20062. * </ons-toolbar>
  20063. *
  20064. * <p>Page content</p>
  20065. * </ons-page>
  20066. *
  20067. * @example
  20068. * <script>
  20069. * myApp.handler = function(done) {
  20070. * loadMore().then(done);
  20071. * }
  20072. * </script>
  20073. *
  20074. * <ons-page on-infinite-scroll="myApp.handler">
  20075. * <ons-toolbar>
  20076. * <div class="center">List</div>
  20077. * </ons-toolbar>
  20078. *
  20079. * <ons-list>
  20080. * <ons-list-item>#1</ons-list-item>
  20081. * <ons-list-item>#2</ons-list-item>
  20082. * <ons-list-item>#3</ons-list-item>
  20083. * ...
  20084. * </ons-list>
  20085. * </ons-page>
  20086. */
  20087. var PageElement = function (_BaseElement) {
  20088. inherits(PageElement, _BaseElement);
  20089. /**
  20090. * @event init
  20091. * @description
  20092. * [en]Fired right after the page is attached.[/en]
  20093. * [ja]ページがアタッチされた後に発火します。[/ja]
  20094. * @param {Object} event [en]Event object.[/en]
  20095. */
  20096. /**
  20097. * @event show
  20098. * @description
  20099. * [en]Fired right after the page is shown.[/en]
  20100. * [ja]ページが表示された後に発火します。[/ja]
  20101. * @param {Object} event [en]Event object.[/en]
  20102. */
  20103. /**
  20104. * @event hide
  20105. * @description
  20106. * [en]Fired right after the page is hidden.[/en]
  20107. * [ja]ページが隠れた後に発火します。[/ja]
  20108. * @param {Object} event [en]Event object.[/en]
  20109. */
  20110. /**
  20111. * @event destroy
  20112. * @description
  20113. * [en]Fired right before the page is destroyed.[/en]
  20114. * [ja]ページが破棄される前に発火します。[/ja]
  20115. * @param {Object} event [en]Event object.[/en]
  20116. */
  20117. /**
  20118. * @attribute modifier
  20119. * @type {String}
  20120. * @description
  20121. * [en]Specify modifier name to specify custom styles.[/en]
  20122. * [ja]スタイル定義をカスタマイズするための名前を指定します。[/ja]
  20123. */
  20124. /**
  20125. * @attribute on-infinite-scroll
  20126. * @type {String}
  20127. * @description
  20128. * [en]Path of the function to be executed on infinite scrolling. Example: `app.loadData`. The function receives a done callback that must be called when it's finished.[/en]
  20129. * [ja][/ja]
  20130. */
  20131. function PageElement() {
  20132. classCallCheck(this, PageElement);
  20133. var _this = possibleConstructorReturn(this, (PageElement.__proto__ || Object.getPrototypeOf(PageElement)).call(this));
  20134. _this._deriveHooks();
  20135. _this._defaultClassName = defaultClassName$9;
  20136. _this.classList.add(defaultClassName$9);
  20137. _this._initialized = false;
  20138. contentReady(_this, function () {
  20139. _this._compile();
  20140. _this._isShown = false;
  20141. _this._contentElement = _this._getContentElement();
  20142. _this._backgroundElement = _this._getBackgroundElement();
  20143. });
  20144. return _this;
  20145. }
  20146. createClass(PageElement, [{
  20147. key: '_compile',
  20148. value: function _compile() {
  20149. var _this2 = this;
  20150. autoStyle.prepare(this);
  20151. var toolbar = util$1.findChild(this, 'ons-toolbar');
  20152. var background = util$1.findChild(this, '.page__background') || util$1.findChild(this, '.background') || document.createElement('div');
  20153. background.classList.add('page__background');
  20154. this.insertBefore(background, !toolbar && this.firstChild || toolbar && toolbar.nextSibling);
  20155. var content = util$1.findChild(this, '.page__content') || util$1.findChild(this, '.content') || document.createElement('div');
  20156. content.classList.add('page__content');
  20157. if (!content.parentElement) {
  20158. util$1.arrayFrom(this.childNodes).forEach(function (node) {
  20159. if (node.nodeType !== 1 || _this2._elementShouldBeMoved(node)) {
  20160. content.appendChild(node); // Can trigger detached connectedCallbacks
  20161. }
  20162. });
  20163. }
  20164. this._tryToFillStatusBar(content); // Must run before child pages try to fill status bar.
  20165. this.insertBefore(content, background.nextSibling); // Can trigger attached connectedCallbacks
  20166. if ((!toolbar || !util$1.hasModifier(toolbar, 'transparent')) && content.children.length === 1 && util$1.isPageControl(content.children[0])) {
  20167. this._defaultClassName += ' page--wrapper';
  20168. this.attributeChangedCallback('class');
  20169. }
  20170. var bottomToolbar = util$1.findChild(this, 'ons-bottom-toolbar');
  20171. if (bottomToolbar) {
  20172. this._defaultClassName += ' page-with-bottom-toolbar';
  20173. this.attributeChangedCallback('class');
  20174. }
  20175. ModifierUtil.initModifier(this, scheme$17);
  20176. }
  20177. }, {
  20178. key: '_elementShouldBeMoved',
  20179. value: function _elementShouldBeMoved(el) {
  20180. if (el.classList.contains('page__background')) {
  20181. return false;
  20182. }
  20183. var tagName = el.tagName.toLowerCase();
  20184. if (tagName === 'ons-fab') {
  20185. return !el.hasAttribute('position');
  20186. }
  20187. var fixedElements = ['script', 'ons-toolbar', 'ons-bottom-toolbar', 'ons-modal', 'ons-speed-dial', 'ons-dialog', 'ons-alert-dialog', 'ons-popover', 'ons-action-sheet'];
  20188. return el.hasAttribute('inline') || fixedElements.indexOf(tagName) === -1;
  20189. }
  20190. }, {
  20191. key: '_tryToFillStatusBar',
  20192. value: function _tryToFillStatusBar() {
  20193. var _this3 = this;
  20194. var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._contentElement;
  20195. internal$1.autoStatusBarFill(function () {
  20196. util$1.toggleAttribute(_this3, 'status-bar-fill', !util$1.findParent(_this3, function (e) {
  20197. return e.hasAttribute('status-bar-fill');
  20198. }) // Not already filled
  20199. && (_this3._canAnimateToolbar(content) || !util$1.findChild(content, util$1.isPageControl)) // Has toolbar or cannot delegate
  20200. );
  20201. });
  20202. }
  20203. }, {
  20204. key: '_canAnimateToolbar',
  20205. value: function _canAnimateToolbar() {
  20206. var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._contentElement;
  20207. if (util$1.findChild(this, 'ons-toolbar')) {
  20208. return true;
  20209. }
  20210. return !!util$1.findChild(content, function (el) {
  20211. return util$1.match(el, 'ons-toolbar') && !el.hasAttribute('inline');
  20212. });
  20213. }
  20214. }, {
  20215. key: 'connectedCallback',
  20216. value: function connectedCallback() {
  20217. var _this4 = this;
  20218. if (!util$1.isAttached(this)) {
  20219. // Avoid detached calls
  20220. return;
  20221. }
  20222. contentReady(this, function () {
  20223. _this4._tryToFillStatusBar(); // Ensure status bar when the element was compiled before connected
  20224. if (_this4.hasAttribute('on-infinite-scroll')) {
  20225. _this4.attributeChangedCallback('on-infinite-scroll', null, _this4.getAttribute('on-infinite-scroll'));
  20226. }
  20227. if (!_this4._initialized) {
  20228. _this4._initialized = true;
  20229. setImmediate(function () {
  20230. _this4.onInit && _this4.onInit();
  20231. util$1.triggerElementEvent(_this4, 'init');
  20232. });
  20233. if (!util$1.hasAnyComponentAsParent(_this4)) {
  20234. setImmediate(function () {
  20235. return _this4._show();
  20236. });
  20237. }
  20238. }
  20239. });
  20240. }
  20241. }, {
  20242. key: 'updateBackButton',
  20243. value: function updateBackButton(show) {
  20244. if (this.backButton) {
  20245. show ? this.backButton.show() : this.backButton.hide();
  20246. }
  20247. }
  20248. }, {
  20249. key: '_onScroll',
  20250. value: function _onScroll() {
  20251. var _this5 = this;
  20252. var c = this._contentElement,
  20253. overLimit = (c.scrollTop + c.clientHeight) / c.scrollHeight >= this._infiniteScrollLimit;
  20254. if (this._onInfiniteScroll && !this._loadingContent && overLimit) {
  20255. this._loadingContent = true;
  20256. this._onInfiniteScroll(function () {
  20257. return _this5._loadingContent = false;
  20258. });
  20259. }
  20260. }
  20261. /**
  20262. * @property onDeviceBackButton
  20263. * @type {Object}
  20264. * @description
  20265. * [en]Back-button handler.[/en]
  20266. * [ja]バックボタンハンドラ。[/ja]
  20267. */
  20268. }, {
  20269. key: '_getContentElement',
  20270. value: function _getContentElement() {
  20271. var result = util$1.findChild(this, '.page__content');
  20272. if (result) {
  20273. return result;
  20274. }
  20275. util$1.throw('Fail to get ".page__content" element');
  20276. }
  20277. }, {
  20278. key: '_getBackgroundElement',
  20279. value: function _getBackgroundElement() {
  20280. var result = util$1.findChild(this, '.page__background');
  20281. if (result) {
  20282. return result;
  20283. }
  20284. util$1.throw('Fail to get ".page__background" element');
  20285. }
  20286. }, {
  20287. key: '_getBottomToolbarElement',
  20288. value: function _getBottomToolbarElement() {
  20289. return util$1.findChild(this, 'ons-bottom-toolbar') || internal$1.nullElement;
  20290. }
  20291. }, {
  20292. key: '_getToolbarElement',
  20293. value: function _getToolbarElement() {
  20294. return util$1.findChild(this, 'ons-toolbar') || document.createElement('ons-toolbar');
  20295. }
  20296. }, {
  20297. key: 'attributeChangedCallback',
  20298. value: function attributeChangedCallback(name, last, current) {
  20299. var _this6 = this;
  20300. switch (name) {
  20301. case 'class':
  20302. util$1.restoreClass(this, this._defaultClassName, scheme$17);
  20303. break;
  20304. case 'modifier':
  20305. ModifierUtil.onModifierChanged(last, current, this, scheme$17);
  20306. break;
  20307. case 'on-infinite-scroll':
  20308. if (current === null) {
  20309. this.onInfiniteScroll = null;
  20310. } else {
  20311. this.onInfiniteScroll = function (done) {
  20312. var f = util$1.findFromPath(current);
  20313. _this6.onInfiniteScroll = f;
  20314. f(done);
  20315. };
  20316. }
  20317. break;
  20318. }
  20319. }
  20320. }, {
  20321. key: '_show',
  20322. value: function _show() {
  20323. if (!this._isShown && util$1.isAttached(this)) {
  20324. this._isShown = true;
  20325. this.setAttribute('shown', '');
  20326. this.onShow && this.onShow();
  20327. util$1.triggerElementEvent(this, 'show');
  20328. util$1.propagateAction(this, '_show');
  20329. }
  20330. }
  20331. }, {
  20332. key: '_hide',
  20333. value: function _hide() {
  20334. if (this._isShown) {
  20335. this._isShown = false;
  20336. this.removeAttribute('shown');
  20337. this.onHide && this.onHide();
  20338. util$1.triggerElementEvent(this, 'hide');
  20339. util$1.propagateAction(this, '_hide');
  20340. }
  20341. }
  20342. }, {
  20343. key: '_destroy',
  20344. value: function _destroy() {
  20345. this._hide();
  20346. this.onDestroy && this.onDestroy();
  20347. util$1.triggerElementEvent(this, 'destroy');
  20348. if (this.onDeviceBackButton) {
  20349. this.onDeviceBackButton.destroy();
  20350. }
  20351. util$1.propagateAction(this, '_destroy');
  20352. this.remove();
  20353. }
  20354. }, {
  20355. key: '_deriveHooks',
  20356. value: function _deriveHooks() {
  20357. var _this7 = this;
  20358. this.constructor.events.forEach(function (event) {
  20359. var key = 'on' + event.charAt(0).toUpperCase() + event.slice(1);
  20360. Object.defineProperty(_this7, key, {
  20361. configurable: true,
  20362. enumerable: true,
  20363. get: function get$$1() {
  20364. return _this7['_' + key];
  20365. },
  20366. set: function set$$1(value) {
  20367. if (!(value instanceof Function)) {
  20368. util$1.throw('"' + key + '" hook must be a function');
  20369. }
  20370. _this7['_' + key] = value.bind(_this7);
  20371. }
  20372. });
  20373. });
  20374. }
  20375. }, {
  20376. key: 'name',
  20377. set: function set$$1(str) {
  20378. this.setAttribute('name', str);
  20379. },
  20380. get: function get$$1() {
  20381. return this.getAttribute('name');
  20382. }
  20383. }, {
  20384. key: 'backButton',
  20385. get: function get$$1() {
  20386. return this.querySelector('ons-back-button');
  20387. }
  20388. /**
  20389. * @property onInfiniteScroll
  20390. * @description
  20391. * [en]Function to be executed when scrolling to the bottom of the page. The function receives a done callback as an argument that must be called when it's finished.[/en]
  20392. * [ja][/ja]
  20393. */
  20394. }, {
  20395. key: 'onInfiniteScroll',
  20396. set: function set$$1(value) {
  20397. var _this8 = this;
  20398. if (value && !(value instanceof Function)) {
  20399. util$1.throw('"onInfiniteScroll" must be function or null');
  20400. }
  20401. contentReady(this, function () {
  20402. if (!value) {
  20403. _this8._contentElement.removeEventListener('scroll', _this8._boundOnScroll);
  20404. } else if (!_this8._onInfiniteScroll) {
  20405. _this8._infiniteScrollLimit = 0.9;
  20406. _this8._boundOnScroll = _this8._onScroll.bind(_this8);
  20407. setImmediate(function () {
  20408. return _this8._contentElement.addEventListener('scroll', _this8._boundOnScroll);
  20409. });
  20410. }
  20411. _this8._onInfiniteScroll = value;
  20412. });
  20413. },
  20414. get: function get$$1() {
  20415. return this._onInfiniteScroll;
  20416. }
  20417. }, {
  20418. key: 'onDeviceBackButton',
  20419. get: function get$$1() {
  20420. return this._backButtonHandler;
  20421. },
  20422. set: function set$$1(callback) {
  20423. if (this._backButtonHandler) {
  20424. this._backButtonHandler.destroy();
  20425. }
  20426. this._backButtonHandler = deviceBackButtonDispatcher.createHandler(this, callback);
  20427. }
  20428. }, {
  20429. key: 'scrollTop',
  20430. get: function get$$1() {
  20431. return this._contentElement.scrollTop;
  20432. },
  20433. set: function set$$1(newValue) {
  20434. this._contentElement.scrollTop = newValue;
  20435. }
  20436. }], [{
  20437. key: 'observedAttributes',
  20438. get: function get$$1() {
  20439. return ['modifier', 'on-infinite-scroll', 'class'];
  20440. }
  20441. }, {
  20442. key: 'events',
  20443. get: function get$$1() {
  20444. return ['init', 'show', 'hide', 'destroy'];
  20445. }
  20446. /**
  20447. * @property data
  20448. * @type {*}
  20449. * @description
  20450. * [en]User's custom data passed to `pushPage()`-like methods.[/en]
  20451. * [ja][/ja]
  20452. */
  20453. }]);
  20454. return PageElement;
  20455. }(BaseElement);
  20456. onsElements.Page = PageElement;
  20457. customElements.define('ons-page', PageElement);
  20458. /*
  20459. Copyright 2013-2015 ASIAL CORPORATION
  20460. Licensed under the Apache License, Version 2.0 (the "License");
  20461. you may not use this file except in compliance with the License.
  20462. You may obtain a copy of the License at
  20463. http://www.apache.org/licenses/LICENSE-2.0
  20464. Unless required by applicable law or agreed to in writing, software
  20465. distributed under the License is distributed on an "AS IS" BASIS,
  20466. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20467. See the License for the specific language governing permissions and
  20468. limitations under the License.
  20469. */
  20470. var PopoverAnimator = function (_BaseAnimator) {
  20471. inherits(PopoverAnimator, _BaseAnimator);
  20472. /**
  20473. * @param {Object} options
  20474. * @param {String} options.timing
  20475. * @param {Number} options.duration
  20476. * @param {Number} options.delay
  20477. */
  20478. function PopoverAnimator() {
  20479. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  20480. _ref$timing = _ref.timing,
  20481. timing = _ref$timing === undefined ? 'cubic-bezier(.1, .7, .4, 1)' : _ref$timing,
  20482. _ref$delay = _ref.delay,
  20483. delay = _ref$delay === undefined ? 0 : _ref$delay,
  20484. _ref$duration = _ref.duration,
  20485. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  20486. classCallCheck(this, PopoverAnimator);
  20487. return possibleConstructorReturn(this, (PopoverAnimator.__proto__ || Object.getPrototypeOf(PopoverAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  20488. }
  20489. createClass(PopoverAnimator, [{
  20490. key: 'show',
  20491. value: function show(popover, callback) {
  20492. callback();
  20493. }
  20494. }, {
  20495. key: 'hide',
  20496. value: function hide(popover, callback) {
  20497. callback();
  20498. }
  20499. }, {
  20500. key: '_animate',
  20501. value: function _animate(element, _ref2) {
  20502. var from = _ref2.from,
  20503. to = _ref2.to,
  20504. options = _ref2.options,
  20505. callback = _ref2.callback,
  20506. _ref2$restore = _ref2.restore,
  20507. restore = _ref2$restore === undefined ? false : _ref2$restore,
  20508. animation = _ref2.animation;
  20509. options = util$1.extend({}, this.options, options);
  20510. if (animation) {
  20511. from = animation.from;
  20512. to = animation.to;
  20513. }
  20514. animation = Animit(element);
  20515. if (restore) {
  20516. animation = animation.saveStyle();
  20517. }
  20518. animation = animation.queue(from).wait(this.delay).queue({
  20519. css: to,
  20520. duration: this.duration,
  20521. timing: this.timing
  20522. });
  20523. if (restore) {
  20524. animation = animation.restoreStyle();
  20525. }
  20526. if (callback) {
  20527. animation = animation.queue(function (done) {
  20528. callback();
  20529. done();
  20530. });
  20531. }
  20532. return animation;
  20533. }
  20534. }, {
  20535. key: '_animateAll',
  20536. value: function _animateAll(element, animations) {
  20537. var _this2 = this;
  20538. Object.keys(animations).forEach(function (key) {
  20539. return _this2._animate(element[key], animations[key]).play();
  20540. });
  20541. }
  20542. }]);
  20543. return PopoverAnimator;
  20544. }(BaseAnimator);
  20545. var fade = {
  20546. out: {
  20547. from: { opacity: 1.0 },
  20548. to: { opacity: 0 }
  20549. },
  20550. in: {
  20551. from: { opacity: 0 },
  20552. to: { opacity: 1.0 }
  20553. }
  20554. };
  20555. var MDFadePopoverAnimator = function (_PopoverAnimator) {
  20556. inherits(MDFadePopoverAnimator, _PopoverAnimator);
  20557. function MDFadePopoverAnimator() {
  20558. classCallCheck(this, MDFadePopoverAnimator);
  20559. return possibleConstructorReturn(this, (MDFadePopoverAnimator.__proto__ || Object.getPrototypeOf(MDFadePopoverAnimator)).apply(this, arguments));
  20560. }
  20561. createClass(MDFadePopoverAnimator, [{
  20562. key: 'show',
  20563. value: function show(popover, callback) {
  20564. this._animateAll(popover, {
  20565. _mask: fade.in,
  20566. _popover: { animation: fade.in, restore: true, callback: callback }
  20567. });
  20568. }
  20569. }, {
  20570. key: 'hide',
  20571. value: function hide(popover, callback) {
  20572. this._animateAll(popover, {
  20573. _mask: fade.out,
  20574. _popover: { animation: fade.out, restore: true, callback: callback }
  20575. });
  20576. }
  20577. }]);
  20578. return MDFadePopoverAnimator;
  20579. }(PopoverAnimator);
  20580. var IOSFadePopoverAnimator = function (_MDFadePopoverAnimato) {
  20581. inherits(IOSFadePopoverAnimator, _MDFadePopoverAnimato);
  20582. function IOSFadePopoverAnimator() {
  20583. classCallCheck(this, IOSFadePopoverAnimator);
  20584. return possibleConstructorReturn(this, (IOSFadePopoverAnimator.__proto__ || Object.getPrototypeOf(IOSFadePopoverAnimator)).apply(this, arguments));
  20585. }
  20586. createClass(IOSFadePopoverAnimator, [{
  20587. key: 'show',
  20588. value: function show(popover, callback) {
  20589. this._animateAll(popover, {
  20590. _mask: fade.in,
  20591. _popover: {
  20592. from: {
  20593. transform: 'scale3d(1.3, 1.3, 1.0)',
  20594. opacity: 0
  20595. },
  20596. to: {
  20597. transform: 'scale3d(1.0, 1.0, 1.0)',
  20598. opacity: 1.0
  20599. },
  20600. restore: true,
  20601. callback: callback
  20602. }
  20603. });
  20604. }
  20605. }]);
  20606. return IOSFadePopoverAnimator;
  20607. }(MDFadePopoverAnimator);
  20608. /*
  20609. Copyright 2013-2015 ASIAL CORPORATION
  20610. Licensed under the Apache License, Version 2.0 (the "License");
  20611. you may not use this file except in compliance with the License.
  20612. You may obtain a copy of the License at
  20613. http://www.apache.org/licenses/LICENSE-2.0
  20614. Unless required by applicable law or agreed to in writing, software
  20615. distributed under the License is distributed on an "AS IS" BASIS,
  20616. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20617. See the License for the specific language governing permissions and
  20618. limitations under the License.
  20619. */
  20620. var scheme$19 = {
  20621. '.popover': 'popover--*',
  20622. '.popover-mask': 'popover-mask--*',
  20623. '.popover__content': 'popover--*__content',
  20624. '.popover__arrow': 'popover--*__arrow'
  20625. };
  20626. var _animatorDict$6 = {
  20627. 'default': function _default() {
  20628. return platform.isAndroid() ? MDFadePopoverAnimator : IOSFadePopoverAnimator;
  20629. },
  20630. 'none': PopoverAnimator,
  20631. 'fade-ios': IOSFadePopoverAnimator,
  20632. 'fade-md': MDFadePopoverAnimator
  20633. };
  20634. var positions = {
  20635. up: 'bottom',
  20636. left: 'right',
  20637. down: 'top',
  20638. right: 'left'
  20639. };
  20640. /**
  20641. * @element ons-popover
  20642. * @category dialog
  20643. * @description
  20644. * [en]
  20645. * A component that displays a popover next to an element. The popover can be used to display extra information about a component or a tooltip.
  20646. *
  20647. * To use the element it can either be attached directly to the `<body>` element or dynamically created from a template using the `ons.createPopover(template)` utility function and the `<template>` tag.
  20648. *
  20649. * Another common way to use the popover is to display a menu when a button on the screen is tapped. For Material Design, popover looks exactly as a dropdown menu.
  20650. * [/en]
  20651. * [ja]ある要素を対象とするポップオーバーを表示するコンポーネントです。[/ja]
  20652. * @codepen ZYYRKo
  20653. * @tutorial vanilla/Reference/popover
  20654. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  20655. * @example
  20656. * <ons-button onclick="showPopover(this)">
  20657. * Click me!
  20658. * </ons-button>
  20659. *
  20660. * <ons-popover direction="down" id="popover">
  20661. * <p>This is a popover!</p>
  20662. * </ons-popover>
  20663. *
  20664. * <script>
  20665. * var showPopover = function(element) {
  20666. * var popover = document.getElementById('popover');
  20667. * popover.show(element);
  20668. * };
  20669. * </script>
  20670. */
  20671. var PopoverElement = function (_BaseDialogElement) {
  20672. inherits(PopoverElement, _BaseDialogElement);
  20673. /**
  20674. * @event preshow
  20675. * @description
  20676. * [en]Fired just before the popover is displayed.[/en]
  20677. * [ja]ポップオーバーが表示される直前に発火します。[/ja]
  20678. * @param {Object} event [en]Event object.[/en]
  20679. * @param {Object} event.popover
  20680. * [en]Component object.[/en]
  20681. * [ja]コンポーネントのオブジェクト。[/ja]
  20682. * @param {Function} event.cancel
  20683. * [en]Call this function to stop the popover from being shown.[/en]
  20684. * [ja]この関数を呼び出すと、ポップオーバーの表示がキャンセルされます。[/ja]
  20685. */
  20686. /**
  20687. * @event postshow
  20688. * @description
  20689. * [en]Fired just after the popover is displayed.[/en]
  20690. * [ja]ポップオーバーが表示された直後に発火します。[/ja]
  20691. * @param {Object} event [en]Event object.[/en]
  20692. * @param {Object} event.popover
  20693. * [en]Component object.[/en]
  20694. * [ja]コンポーネントのオブジェクト。[/ja]
  20695. */
  20696. /**
  20697. * @event prehide
  20698. * @description
  20699. * [en]Fired just before the popover is hidden.[/en]
  20700. * [ja]ポップオーバーが隠れる直前に発火します。[/ja]
  20701. * @param {Object} event [en]Event object.[/en]
  20702. * @param {Object} event.popover
  20703. * [en]Component object.[/en]
  20704. * [ja]コンポーネントのオブジェクト。[/ja]
  20705. * @param {Function} event.cancel
  20706. * [en]Call this function to stop the popover from being hidden.[/en]
  20707. * [ja]この関数を呼び出すと、ポップオーバーが隠れる処理をキャンセルします。[/ja]
  20708. */
  20709. /**
  20710. * @event posthide
  20711. * @description
  20712. * [en]Fired just after the popover is hidden.[/en]
  20713. * [ja]ポップオーバーが隠れた後に発火します。[/ja]
  20714. * @param {Object} event [en]Event object.[/en]
  20715. * @param {Object} event.popover
  20716. * [en]Component object.[/en]
  20717. * [ja]コンポーネントのオブジェクト。[/ja]
  20718. */
  20719. /**
  20720. * @attribute modifier
  20721. * @type {String}
  20722. * @description
  20723. * [en]The appearance of the popover.[/en]
  20724. * [ja]ポップオーバーの表現を指定します。[/ja]
  20725. */
  20726. /**
  20727. * @attribute direction
  20728. * @type {String}
  20729. * @description
  20730. * [en]
  20731. * A space separated list of directions. If more than one direction is specified,
  20732. * it will be chosen automatically. Valid directions are `"up"`, `"down"`, `"left"` and `"right"`.
  20733. * [/en]
  20734. * [ja]
  20735. * ポップオーバーを表示する方向を空白区切りで複数指定できます。
  20736. * 指定できる方向は、"up", "down", "left", "right"の4つです。空白区切りで複数指定することもできます。
  20737. * 複数指定された場合、対象とする要素に合わせて指定した値から自動的に選択されます。
  20738. * [/ja]
  20739. */
  20740. /**
  20741. * @attribute cancelable
  20742. * @description
  20743. * [en]If this attribute is set the popover can be closed by tapping the background or by pressing the back button.[/en]
  20744. * [ja]この属性があると、ポップオーバーが表示された時に、背景やバックボタンをタップした時にをポップオーバー閉じます。[/ja]
  20745. */
  20746. /**
  20747. * @attribute cover-target
  20748. * @description
  20749. * [en]If set the popover will cover the target on the screen.[/en]
  20750. * [ja][/ja]
  20751. */
  20752. /**
  20753. * @attribute animation
  20754. * @type {String}
  20755. * @description
  20756. * [en]The animation used when showing an hiding the popover. Can be either `"none"`, `"default"`, `"fade-ios"` or `"fade-md"`.[/en]
  20757. * [ja]ポップオーバーを表示する際のアニメーション名を指定します。[/ja]
  20758. */
  20759. /**
  20760. * @attribute animation-options
  20761. * @type {Expression}
  20762. * @description
  20763. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  20764. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. {duration: 0.2, delay: 1, timing: 'ease-in'}[/ja]
  20765. */
  20766. /**
  20767. * @attribute mask-color
  20768. * @type {Color}
  20769. * @description
  20770. * [en]Color of the background mask. Default is `"rgba(0, 0, 0, 0.2)"`.[/en]
  20771. * [ja]背景のマスクの色を指定します。デフォルトは"rgba(0, 0, 0, 0.2)"です。[/ja]
  20772. */
  20773. function PopoverElement() {
  20774. classCallCheck(this, PopoverElement);
  20775. var _this = possibleConstructorReturn(this, (PopoverElement.__proto__ || Object.getPrototypeOf(PopoverElement)).call(this));
  20776. _this._boundOnChange = _this._onChange.bind(_this);
  20777. contentReady(_this, function () {
  20778. _this._compile();
  20779. _this.style.display = 'none';
  20780. });
  20781. return _this;
  20782. }
  20783. createClass(PopoverElement, [{
  20784. key: '_updateAnimatorFactory',
  20785. value: function _updateAnimatorFactory() {
  20786. return new AnimatorFactory({
  20787. animators: _animatorDict$6,
  20788. baseClass: PopoverAnimator,
  20789. baseClassName: 'PopoverAnimator',
  20790. defaultAnimation: this.getAttribute('animation') || 'default'
  20791. });
  20792. }
  20793. }, {
  20794. key: '_toggleStyle',
  20795. value: function _toggleStyle(shouldShow) {
  20796. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  20797. if (shouldShow) {
  20798. this.style.display = 'block';
  20799. this._currentTarget = options.target;
  20800. this._positionPopover(options.target);
  20801. } else {
  20802. this.style.display = 'none';
  20803. this._clearStyles();
  20804. }
  20805. }
  20806. }, {
  20807. key: '_positionPopover',
  20808. value: function _positionPopover(target) {
  20809. var radius = this._radius,
  20810. contentElement = this._content,
  20811. margin = this._margin;
  20812. var safeAreaLengths = iPhoneXPatch.getSafeAreaLengths();
  20813. var safeAreaRect = iPhoneXPatch.getSafeAreaDOMRect();
  20814. var targetRect = target.getBoundingClientRect();
  20815. var isMD = util$1.hasModifier(this, 'material');
  20816. var cover = isMD && this.hasAttribute('cover-target');
  20817. var parent = util$1.findParent(this, 'ons-page') || document.body;
  20818. var parentDimensions = parent.getBoundingClientRect();
  20819. var maxPositions = {
  20820. top: Math.max(parentDimensions.top, safeAreaRect.top),
  20821. left: Math.max(parentDimensions.left, safeAreaRect.left),
  20822. bottom: Math.min(parentDimensions.bottom, safeAreaRect.bottom),
  20823. right: Math.min(parentDimensions.right, safeAreaRect.right)
  20824. };
  20825. // Distance from each side of the safe area (with margin) to the target element
  20826. var targetDistance = {
  20827. top: targetRect.top - (maxPositions.top + margin),
  20828. left: targetRect.left - (maxPositions.left + margin),
  20829. bottom: maxPositions.bottom - margin - targetRect.bottom,
  20830. right: maxPositions.right - margin - targetRect.right
  20831. };
  20832. // Distance from each side of the safe area (with margin) to the geometric center of the target element
  20833. var targetCenterDistanceFrom = {
  20834. top: targetRect.top + Math.round(targetRect.height / 2) - (maxPositions.top + margin),
  20835. left: targetRect.left + Math.round(targetRect.width / 2) - (maxPositions.left + margin),
  20836. bottom: maxPositions.bottom - margin - targetRect.bottom + Math.round(targetRect.height / 2),
  20837. right: maxPositions.right - margin - targetRect.right + Math.round(targetRect.width / 2)
  20838. };
  20839. var _calculateDirections2 = this._calculateDirections(targetDistance),
  20840. vertical = _calculateDirections2.vertical,
  20841. primaryDirection = _calculateDirections2.primary,
  20842. secondaryDirection = _calculateDirections2.secondary;
  20843. this._currentDirection = primaryDirection;
  20844. util$1.addModifier(this, primaryDirection);
  20845. var sizeName = vertical ? 'width' : 'height';
  20846. // Get .popover__content size
  20847. var contentSize = function (style) {
  20848. return {
  20849. width: parseInt(style.getPropertyValue('width'), 10),
  20850. height: parseInt(style.getPropertyValue('height'), 10)
  20851. };
  20852. }(window.getComputedStyle(contentElement));
  20853. // Setting .popover position.
  20854. var targetAndArrowLength = cover ? 0 : (vertical ? targetRect.height : targetRect.width) + (isMD ? 0 : 14);
  20855. var primaryOffset = Math.max(safeAreaLengths[primaryDirection] + margin, safeAreaLengths[primaryDirection] + margin + targetDistance[primaryDirection] + targetAndArrowLength);
  20856. var secondaryOffset = Math.max(safeAreaLengths[secondaryDirection] + margin, safeAreaLengths[secondaryDirection] + margin + targetCenterDistanceFrom[secondaryDirection] - contentSize[sizeName] / 2);
  20857. this._popover.style[primaryDirection] = primaryOffset + 'px';
  20858. this._popover.style[secondaryDirection] = secondaryOffset + 'px';
  20859. // Setting .popover__arrow position.
  20860. this._arrow.style[secondaryDirection] = Math.max(radius, safeAreaLengths[secondaryDirection] + margin + targetCenterDistanceFrom[secondaryDirection] - secondaryOffset) + 'px';
  20861. }
  20862. }, {
  20863. key: '_calculateDirections',
  20864. value: function _calculateDirections(distance) {
  20865. var options = (this.getAttribute('direction') || 'up down left right').split(/\s+/).map(function (e) {
  20866. return positions[e];
  20867. });
  20868. var primary = options.sort(function (a, b) {
  20869. return distance[a] - distance[b];
  20870. })[0];
  20871. var vertical = 'top' == primary || 'bottom' == primary;
  20872. var secondary = void 0;
  20873. if (vertical) {
  20874. secondary = distance.left < distance.right ? 'left' : 'right';
  20875. } else {
  20876. secondary = distance.top < distance.bottom ? 'top' : 'bottom';
  20877. }
  20878. return { vertical: vertical, primary: primary, secondary: secondary };
  20879. }
  20880. }, {
  20881. key: '_clearStyles',
  20882. value: function _clearStyles() {
  20883. var _this2 = this;
  20884. this._currentDirection = null;
  20885. ['top', 'bottom', 'left', 'right'].forEach(function (e) {
  20886. _this2._arrow.style[e] = _this2._content.style[e] = _this2._popover.style[e] = '';
  20887. util$1.removeModifier(_this2, e);
  20888. });
  20889. }
  20890. }, {
  20891. key: '_onChange',
  20892. value: function _onChange() {
  20893. var _this3 = this;
  20894. setImmediate(function () {
  20895. if (_this3._currentTarget) {
  20896. _this3._positionPopover(_this3._currentTarget);
  20897. }
  20898. });
  20899. }
  20900. }, {
  20901. key: '_compile',
  20902. value: function _compile() {
  20903. autoStyle.prepare(this);
  20904. if (this._popover && this._mask) {
  20905. return;
  20906. }
  20907. var hasDefaultContainer = this._popover && this._content;
  20908. if (hasDefaultContainer) {
  20909. if (!this._mask) {
  20910. var mask = document.createElement('div');
  20911. mask.classList.add('popover-mask');
  20912. this.insertBefore(mask, this.firstChild);
  20913. }
  20914. if (!this._arrow) {
  20915. var arrow = document.createElement('div');
  20916. arrow.classList.add('popover__arrow');
  20917. this._popover.appendChild(arrow);
  20918. }
  20919. } else {
  20920. var template = util$1.createFragment('\n <div class="popover-mask"></div>\n <div class="popover">\n <div class="popover__content"></div>\n <div class="popover__arrow"></div>\n </div>\n ');
  20921. var content = template.querySelector('.popover__content');
  20922. while (this.childNodes[0]) {
  20923. content.appendChild(this.childNodes[0]);
  20924. }
  20925. this.appendChild(template);
  20926. }
  20927. // FIXME!
  20928. if (this.hasAttribute('style')) {
  20929. this._popover.setAttribute('style', this.getAttribute('style'));
  20930. this.removeAttribute('style');
  20931. }
  20932. ModifierUtil.initModifier(this, this._scheme);
  20933. }
  20934. /**
  20935. * @method show
  20936. * @signature show(target, [options])
  20937. * @param {String|Event|HTMLElement} target
  20938. * [en]Target element. Can be either a CSS selector, an event object or a DOM element. It can be also provided as 'options.target' instead. [/en]
  20939. * [ja]ポップオーバーのターゲットとなる要素を指定します。CSSセレクタかeventオブジェクトかDOM要素のいずれかを渡せます。[/ja]
  20940. * @param {Object} [options]
  20941. * [en]Parameter object.[/en]
  20942. * [ja]オプションを指定するオブジェクト。[/ja]
  20943. * @param {String} [options.animation]
  20944. * [en]Animation name. Use one of `"fade-ios"`, `"fade-md"`, `"none"` and `"default"`.[/en]
  20945. * [ja]アニメーション名を指定します。"fade-ios", "fade-md", "none", "default"のいずれかを指定できます。[/ja]
  20946. * @param {String} [options.animationOptions]
  20947. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  20948. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  20949. * @param {Function} [options.callback]
  20950. * [en]This function is called after the popover has been revealed.[/en]
  20951. * [ja]ポップオーバーが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  20952. * @description
  20953. * [en]Open the popover and point it at a target. The target can be either an event, a CSS selector or a DOM element..[/en]
  20954. * [ja]対象とする要素にポップオーバーを表示します。target引数には、$eventオブジェクトやDOMエレメントやCSSセレクタを渡すことが出来ます。[/ja]
  20955. * @return {Promise}
  20956. * [en]Resolves to the displayed element[/en]
  20957. * [ja][/ja]
  20958. */
  20959. }, {
  20960. key: 'show',
  20961. value: function show(target) {
  20962. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  20963. // Copy options and include options.target
  20964. if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && !(target instanceof Event) && !(target instanceof HTMLElement)) {
  20965. options = _extends({}, target);
  20966. } else {
  20967. options = _extends({}, options, { target: target });
  20968. }
  20969. if (typeof options.target === 'string') {
  20970. options.target = document.querySelector(options.target);
  20971. } else if (options.target instanceof Event) {
  20972. options.target = options.target.target;
  20973. }
  20974. if (!(options.target instanceof HTMLElement)) {
  20975. util$1.throw('Invalid target type or undefined');
  20976. }
  20977. return get(PopoverElement.prototype.__proto__ || Object.getPrototypeOf(PopoverElement.prototype), 'show', this).call(this, options);
  20978. }
  20979. /**
  20980. * @method hide
  20981. * @signature hide([options])
  20982. * @param {Object} [options]
  20983. * [en]Parameter object.[/en]
  20984. * [ja]オプションを指定するオブジェクト。[/ja]
  20985. * @param {String} [options.animation]
  20986. * [en]Animation name. Use one of `"fade-ios"`, `"fade-md"`, `"none"` and `"default"`.[/en]
  20987. * [ja]アニメーション名を指定します。"fade-ios", "fade-md", "none", "default"のいずれかを指定できます。[/ja]
  20988. * @param {String} [options.animationOptions]
  20989. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  20990. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  20991. * @param {Function} [options.callback]
  20992. * [en]This functions is called after the popover has been hidden.[/en]
  20993. * [ja]ポップオーバーが隠れた後に呼び出される関数オブジェクトを指定します。[/ja]
  20994. * @description
  20995. * [en]Close the popover.[/en]
  20996. * [ja]ポップオーバーを閉じます。[/ja]
  20997. * @return {Promise}
  20998. * [en]Resolves to the hidden element[/en]
  20999. * [ja][/ja]
  21000. */
  21001. /**
  21002. * @property visible
  21003. * @readonly
  21004. * @type {Boolean}
  21005. * @description
  21006. * [en]Whether the element is visible or not.[/en]
  21007. * [ja]要素が見える場合に`true`。[/ja]
  21008. */
  21009. /**
  21010. * @property cancelable
  21011. * @type {Boolean}
  21012. * @description
  21013. * [en]
  21014. * A boolean value that specifies whether the popover is cancelable or not.
  21015. *
  21016. * When the popover is cancelable it can be closed by tapping the background or by pressing the back button on Android devices.
  21017. * [/en]
  21018. * [ja][/ja]
  21019. */
  21020. /**
  21021. * @property onDeviceBackButton
  21022. * @type {Object}
  21023. * @description
  21024. * [en]Back-button handler.[/en]
  21025. * [ja]バックボタンハンドラ。[/ja]
  21026. */
  21027. }, {
  21028. key: 'connectedCallback',
  21029. value: function connectedCallback() {
  21030. var _this4 = this;
  21031. get(PopoverElement.prototype.__proto__ || Object.getPrototypeOf(PopoverElement.prototype), 'connectedCallback', this).call(this);
  21032. window.addEventListener('resize', this._boundOnChange, false);
  21033. this._margin = this._margin || parseInt(window.getComputedStyle(this).getPropertyValue('top'));
  21034. this._margin = this._margin || 6; // Fix for iframes
  21035. contentReady(this, function () {
  21036. _this4._radius = parseInt(window.getComputedStyle(_this4._content).getPropertyValue('border-top-left-radius'));
  21037. });
  21038. }
  21039. }, {
  21040. key: 'disconnectedCallback',
  21041. value: function disconnectedCallback() {
  21042. get(PopoverElement.prototype.__proto__ || Object.getPrototypeOf(PopoverElement.prototype), 'disconnectedCallback', this).call(this);
  21043. window.removeEventListener('resize', this._boundOnChange, false);
  21044. }
  21045. }, {
  21046. key: 'attributeChangedCallback',
  21047. value: function attributeChangedCallback(name, last, current) {
  21048. if (name === 'direction') {
  21049. return this._boundOnChange();
  21050. } else if (name === 'modifier') {
  21051. this._currentDirection && util$1.addModifier(this, this._currentDirection);
  21052. }
  21053. get(PopoverElement.prototype.__proto__ || Object.getPrototypeOf(PopoverElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  21054. }
  21055. /**
  21056. * @param {String} name
  21057. * @param {PopoverAnimator} Animator
  21058. */
  21059. }, {
  21060. key: '_scheme',
  21061. get: function get$$1() {
  21062. return scheme$19;
  21063. }
  21064. }, {
  21065. key: '_mask',
  21066. get: function get$$1() {
  21067. return util$1.findChild(this, '.popover-mask');
  21068. }
  21069. }, {
  21070. key: '_popover',
  21071. get: function get$$1() {
  21072. return util$1.findChild(this, '.popover');
  21073. }
  21074. }, {
  21075. key: '_content',
  21076. get: function get$$1() {
  21077. return util$1.findChild(this._popover, '.popover__content');
  21078. }
  21079. }, {
  21080. key: '_arrow',
  21081. get: function get$$1() {
  21082. return util$1.findChild(this._popover, '.popover__arrow');
  21083. }
  21084. }], [{
  21085. key: 'registerAnimator',
  21086. value: function registerAnimator(name, Animator) {
  21087. if (!(Animator.prototype instanceof PopoverAnimator)) {
  21088. util$1.throwAnimator('Popover');
  21089. }
  21090. _animatorDict$6[name] = Animator;
  21091. }
  21092. }, {
  21093. key: 'observedAttributes',
  21094. get: function get$$1() {
  21095. return [].concat(toConsumableArray(get(PopoverElement.__proto__ || Object.getPrototypeOf(PopoverElement), 'observedAttributes', this)), ['direction']);
  21096. }
  21097. }, {
  21098. key: 'animators',
  21099. get: function get$$1() {
  21100. return _animatorDict$6;
  21101. }
  21102. }, {
  21103. key: 'PopoverAnimator',
  21104. get: function get$$1() {
  21105. return PopoverAnimator;
  21106. }
  21107. }]);
  21108. return PopoverElement;
  21109. }(BaseDialogElement);
  21110. onsElements.Popover = PopoverElement;
  21111. customElements.define('ons-popover', PopoverElement);
  21112. /*
  21113. Copyright 2013-2015 ASIAL CORPORATION
  21114. Licensed under the Apache License, Version 2.0 (the "License");
  21115. you may not use this file except in compliance with the License.
  21116. You may obtain a copy of the License at
  21117. http://www.apache.org/licenses/LICENSE-2.0
  21118. Unless required by applicable law or agreed to in writing, software
  21119. distributed under the License is distributed on an "AS IS" BASIS,
  21120. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21121. See the License for the specific language governing permissions and
  21122. limitations under the License.
  21123. */
  21124. var scheme$20 = {
  21125. '.progress-bar': 'progress-bar--*',
  21126. '.progress-bar__primary': 'progress-bar--*__primary',
  21127. '.progress-bar__secondary': 'progress-bar--*__secondary'
  21128. };
  21129. var template = util$1.createElement('\n <div class="progress-bar">\n <div class="progress-bar__secondary"></div>\n <div class="progress-bar__primary"></div>\n </div>\n');
  21130. var INDET = 'indeterminate';
  21131. /**
  21132. * @element ons-progress-bar
  21133. * @category visual
  21134. * @modifier material
  21135. * [en]Display a Material Design progress bar.[/en]
  21136. * [ja]マテリアルデザインのスタイルでプログレスバーを表示します。[/ja]
  21137. * @description
  21138. * [en]
  21139. * The component is used to display a linear progress bar. It can either display a progress bar that shows the user how much of a task has been completed. In the case where the percentage is not known it can be used to display an animated progress bar so the user can see that an operation is in progress.
  21140. * [/en]
  21141. * [ja][/ja]
  21142. * @codepen zvQbGj
  21143. * @tutorial vanilla/Reference/progress
  21144. * @seealso ons-progress-circular
  21145. * [en]The `<ons-progress-circular>` component displays a circular progress indicator.[/en]
  21146. * [ja][/ja]
  21147. * @example
  21148. * <ons-progress-bar
  21149. * value="55"
  21150. * secondary-value="87">
  21151. * </ons-progress-bar>
  21152. *
  21153. * <ons-progress-bar
  21154. * indeterminate>
  21155. * </ons-progress-bar>
  21156. */
  21157. var ProgressBarElement = function (_BaseElement) {
  21158. inherits(ProgressBarElement, _BaseElement);
  21159. /**
  21160. * @attribute modifier
  21161. * @type {String}
  21162. * @description
  21163. * [en]Change the appearance of the progress indicator.[/en]
  21164. * [ja]プログレスインジケータの見た目を変更します。[/ja]
  21165. */
  21166. /**
  21167. * @attribute value
  21168. * @type {Number}
  21169. * @description
  21170. * [en]Current progress. Should be a value between 0 and 100.[/en]
  21171. * [ja]現在の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21172. */
  21173. /**
  21174. * @attribute secondary-value
  21175. * @type {Number}
  21176. * @description
  21177. * [en]Current secondary progress. Should be a value between 0 and 100.[/en]
  21178. * [ja]現在の2番目の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21179. */
  21180. /**
  21181. * @attribute indeterminate
  21182. * @description
  21183. * [en]If this attribute is set, an infinite looping animation will be shown.[/en]
  21184. * [ja]この属性が設定された場合、ループするアニメーションが表示されます。[/ja]
  21185. */
  21186. function ProgressBarElement() {
  21187. classCallCheck(this, ProgressBarElement);
  21188. var _this = possibleConstructorReturn(this, (ProgressBarElement.__proto__ || Object.getPrototypeOf(ProgressBarElement)).call(this));
  21189. contentReady(_this, function () {
  21190. return _this._compile();
  21191. });
  21192. return _this;
  21193. }
  21194. createClass(ProgressBarElement, [{
  21195. key: '_compile',
  21196. value: function _compile() {
  21197. if (!this._isCompiled()) {
  21198. this._template = template.cloneNode(true);
  21199. } else {
  21200. this._template = util$1.findChild(this, '.progress-bar');
  21201. }
  21202. this._primary = util$1.findChild(this._template, '.progress-bar__primary');
  21203. this._secondary = util$1.findChild(this._template, '.progress-bar__secondary');
  21204. this._updateDeterminate();
  21205. this._updateValue();
  21206. this.appendChild(this._template);
  21207. autoStyle.prepare(this);
  21208. ModifierUtil.initModifier(this, scheme$20);
  21209. }
  21210. }, {
  21211. key: '_isCompiled',
  21212. value: function _isCompiled() {
  21213. if (!util$1.findChild(this, '.progress-bar')) {
  21214. return false;
  21215. }
  21216. var barElement = util$1.findChild(this, '.progress-bar');
  21217. if (!util$1.findChild(barElement, '.progress-bar__secondary')) {
  21218. return false;
  21219. }
  21220. if (!util$1.findChild(barElement, '.progress-bar__primary')) {
  21221. return false;
  21222. }
  21223. return true;
  21224. }
  21225. }, {
  21226. key: 'attributeChangedCallback',
  21227. value: function attributeChangedCallback(name, last, current) {
  21228. if (name === 'modifier') {
  21229. ModifierUtil.onModifierChanged(last, current, this, scheme$20);
  21230. this.hasAttribute(INDET) && this._updateDeterminate();
  21231. } else if (name === 'value' || name === 'secondary-value') {
  21232. this._updateValue();
  21233. } else if (name === INDET) {
  21234. this._updateDeterminate();
  21235. }
  21236. }
  21237. }, {
  21238. key: '_updateDeterminate',
  21239. value: function _updateDeterminate() {
  21240. var _this2 = this;
  21241. contentReady(this, function () {
  21242. return util$1.toggleModifier(_this2, INDET, { force: _this2.hasAttribute(INDET) });
  21243. });
  21244. }
  21245. }, {
  21246. key: '_updateValue',
  21247. value: function _updateValue() {
  21248. var _this3 = this;
  21249. contentReady(this, function () {
  21250. _this3._primary.style.width = _this3.hasAttribute('value') ? _this3.getAttribute('value') + '%' : '0%';
  21251. _this3._secondary.style.width = _this3.hasAttribute('secondary-value') ? _this3.getAttribute('secondary-value') + '%' : '0%';
  21252. });
  21253. }
  21254. /**
  21255. * @property value
  21256. * @type {Number}
  21257. * @description
  21258. * [en]Current progress. Should be a value between 0 and 100.[/en]
  21259. * [ja]現在の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21260. */
  21261. }, {
  21262. key: 'value',
  21263. set: function set$$1(value) {
  21264. if (typeof value !== 'number' || value < 0 || value > 100) {
  21265. util$1.throw('Invalid value');
  21266. }
  21267. this.setAttribute('value', Math.floor(value));
  21268. },
  21269. get: function get$$1() {
  21270. return parseInt(this.getAttribute('value') || '0');
  21271. }
  21272. /**
  21273. * @property secondaryValue
  21274. * @type {Number}
  21275. * @description
  21276. * [en]Current secondary progress. Should be a value between 0 and 100.[/en]
  21277. * [ja]現在の2番目の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21278. */
  21279. }, {
  21280. key: 'secondaryValue',
  21281. set: function set$$1(value) {
  21282. if (typeof value !== 'number' || value < 0 || value > 100) {
  21283. util$1.throw('Invalid value');
  21284. }
  21285. this.setAttribute('secondary-value', Math.floor(value));
  21286. },
  21287. get: function get$$1() {
  21288. return parseInt(this.getAttribute('secondary-value') || '0');
  21289. }
  21290. /**
  21291. * @property indeterminate
  21292. * @type {Boolean}
  21293. * @description
  21294. * [en]If this property is `true`, an infinite looping animation will be shown.[/en]
  21295. * [ja]この属性が設定された場合、ループするアニメーションが表示されます。[/ja]
  21296. */
  21297. }, {
  21298. key: 'indeterminate',
  21299. set: function set$$1(value) {
  21300. if (value) {
  21301. this.setAttribute(INDET, '');
  21302. } else {
  21303. this.removeAttribute(INDET);
  21304. }
  21305. },
  21306. get: function get$$1() {
  21307. return this.hasAttribute(INDET);
  21308. }
  21309. }], [{
  21310. key: 'observedAttributes',
  21311. get: function get$$1() {
  21312. return ['modifier', 'value', 'secondary-value', INDET];
  21313. }
  21314. }]);
  21315. return ProgressBarElement;
  21316. }(BaseElement);
  21317. onsElements.ProgressBar = ProgressBarElement;
  21318. customElements.define('ons-progress-bar', ProgressBarElement);
  21319. /*
  21320. Copyright 2013-2015 ASIAL CORPORATION
  21321. Licensed under the Apache License, Version 2.0 (the "License");
  21322. you may not use this file except in compliance with the License.
  21323. You may obtain a copy of the License at
  21324. http://www.apache.org/licenses/LICENSE-2.0
  21325. Unless required by applicable law or agreed to in writing, software
  21326. distributed under the License is distributed on an "AS IS" BASIS,
  21327. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21328. See the License for the specific language governing permissions and
  21329. limitations under the License.
  21330. */
  21331. var scheme$21 = {
  21332. '.progress-circular': 'progress-circular--*',
  21333. '.progress-circular__background': 'progress-circular--*__background',
  21334. '.progress-circular__primary': 'progress-circular--*__primary',
  21335. '.progress-circular__secondary': 'progress-circular--*__secondary'
  21336. };
  21337. var template$1 = util$1.createElement('\n <svg class="progress-circular">\n <circle class="progress-circular__background" />\n <circle class="progress-circular__secondary" cx="50%" cy="50%" r="40%" />\n <circle class="progress-circular__primary" cx="50%" cy="50%" r="40%" />\n </svg>\n');
  21338. var INDET$1 = 'indeterminate';
  21339. /**
  21340. * @element ons-progress-circular
  21341. * @category visual
  21342. * @description
  21343. * [en]
  21344. * This component displays a circular progress indicator. It can either be used to show how much of a task has been completed or to show a looping animation to indicate that an operation is currently running.
  21345. * [/en]
  21346. * [ja][/ja]
  21347. * @codepen EVzMjR
  21348. * @tutorial vanilla/Reference/progress-circular
  21349. * @seealso ons-progress-bar
  21350. * [en]The `<ons-progress-bar>` component displays a bar progress indicator.[/en]
  21351. * [ja][/ja]
  21352. * @example
  21353. * <ons-progress-circular
  21354. * value="55"
  21355. * secondary-value="87">
  21356. * </ons-progress-circular>
  21357. *
  21358. * <ons-progress-circular
  21359. * indeterminate>
  21360. * </ons-progress-circular>
  21361. */
  21362. var ProgressCircularElement = function (_BaseElement) {
  21363. inherits(ProgressCircularElement, _BaseElement);
  21364. /**
  21365. * @attribute modifier
  21366. * @type {String}
  21367. * @description
  21368. * [en]Change the appearance of the progress indicator.[/en]
  21369. * [ja]プログレスインジケータの見た目を変更します。[/ja]
  21370. */
  21371. /**
  21372. * @attribute value
  21373. * @type {Number}
  21374. * @description
  21375. * [en]Current progress. Should be a value between 0 and 100.[/en]
  21376. * [ja]現在の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21377. */
  21378. /**
  21379. * @attribute secondary-value
  21380. * @type {Number}
  21381. * @description
  21382. * [en]Current secondary progress. Should be a value between 0 and 100.[/en]
  21383. * [ja]現在の2番目の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21384. */
  21385. /**
  21386. * @attribute indeterminate
  21387. * @description
  21388. * [en]If this attribute is set, an infinite looping animation will be shown.[/en]
  21389. * [ja]この属性が設定された場合、ループするアニメーションが表示されます。[/ja]
  21390. */
  21391. function ProgressCircularElement() {
  21392. classCallCheck(this, ProgressCircularElement);
  21393. var _this = possibleConstructorReturn(this, (ProgressCircularElement.__proto__ || Object.getPrototypeOf(ProgressCircularElement)).call(this));
  21394. contentReady(_this, function () {
  21395. return _this._compile();
  21396. });
  21397. return _this;
  21398. }
  21399. createClass(ProgressCircularElement, [{
  21400. key: 'attributeChangedCallback',
  21401. value: function attributeChangedCallback(name, last, current) {
  21402. if (name === 'modifier') {
  21403. ModifierUtil.onModifierChanged(last, current, this, scheme$21);
  21404. this.hasAttribute(INDET$1) && this._updateDeterminate();
  21405. } else if (name === 'value' || name === 'secondary-value') {
  21406. this._updateValue();
  21407. } else if (name === INDET$1) {
  21408. this._updateDeterminate();
  21409. }
  21410. }
  21411. }, {
  21412. key: '_updateDeterminate',
  21413. value: function _updateDeterminate() {
  21414. var _this2 = this;
  21415. contentReady(this, function () {
  21416. return util$1.toggleModifier(_this2, INDET$1, { force: _this2.hasAttribute(INDET$1) });
  21417. });
  21418. }
  21419. }, {
  21420. key: '_updateValue',
  21421. value: function _updateValue() {
  21422. var _this3 = this;
  21423. if (this.hasAttribute('value')) {
  21424. contentReady(this, function () {
  21425. var per = Math.ceil(_this3.getAttribute('value') * 251.32 * 0.01);
  21426. _this3._primary.style['stroke-dasharray'] = per + '%, 251.32%';
  21427. });
  21428. }
  21429. if (this.hasAttribute('secondary-value')) {
  21430. contentReady(this, function () {
  21431. var per = Math.ceil(_this3.getAttribute('secondary-value') * 251.32 * 0.01);
  21432. _this3._secondary.style.display = null;
  21433. _this3._secondary.style['stroke-dasharray'] = per + '%, 251.32%';
  21434. });
  21435. } else {
  21436. contentReady(this, function () {
  21437. _this3._secondary.style.display = 'none';
  21438. });
  21439. }
  21440. }
  21441. /**
  21442. * @property value
  21443. * @type {Number}
  21444. * @description
  21445. * [en]Current progress. Should be a value between 0 and 100.[/en]
  21446. * [ja]現在の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21447. */
  21448. }, {
  21449. key: '_compile',
  21450. value: function _compile() {
  21451. if (this._isCompiled()) {
  21452. this._template = util$1.findChild(this, '.progress-circular');
  21453. } else {
  21454. this._template = template$1.cloneNode(true);
  21455. }
  21456. this._primary = util$1.findChild(this._template, '.progress-circular__primary');
  21457. this._secondary = util$1.findChild(this._template, '.progress-circular__secondary');
  21458. this._updateDeterminate();
  21459. this._updateValue();
  21460. this.appendChild(this._template);
  21461. autoStyle.prepare(this);
  21462. ModifierUtil.initModifier(this, scheme$21);
  21463. }
  21464. }, {
  21465. key: '_isCompiled',
  21466. value: function _isCompiled() {
  21467. if (!util$1.findChild(this, '.progress-circular')) {
  21468. return false;
  21469. }
  21470. var svg = util$1.findChild(this, '.progress-circular');
  21471. if (!util$1.findChild(svg, '.progress-circular__secondary')) {
  21472. return false;
  21473. }
  21474. if (!util$1.findChild(svg, '.progress-circular__primary')) {
  21475. return false;
  21476. }
  21477. return true;
  21478. }
  21479. }, {
  21480. key: 'value',
  21481. set: function set$$1(value) {
  21482. if (typeof value !== 'number' || value < 0 || value > 100) {
  21483. util$1.throw('Invalid value');
  21484. }
  21485. this.setAttribute('value', Math.floor(value));
  21486. },
  21487. get: function get$$1() {
  21488. return parseInt(this.getAttribute('value') || '0');
  21489. }
  21490. /**
  21491. * @property secondaryValue
  21492. * @type {Number}
  21493. * @description
  21494. * [en]Current secondary progress. Should be a value between 0 and 100.[/en]
  21495. * [ja]現在の2番目の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21496. */
  21497. }, {
  21498. key: 'secondaryValue',
  21499. set: function set$$1(value) {
  21500. if (typeof value !== 'number' || value < 0 || value > 100) {
  21501. util$1.throw('Invalid value');
  21502. }
  21503. this.setAttribute('secondary-value', Math.floor(value));
  21504. },
  21505. get: function get$$1() {
  21506. return parseInt(this.getAttribute('secondary-value') || '0');
  21507. }
  21508. /**
  21509. * @property indeterminate
  21510. * @type {Boolean}
  21511. * @description
  21512. * [en]If this property is `true`, an infinite looping animation will be shown.[/en]
  21513. * [ja]この属性が設定された場合、ループするアニメーションが表示されます。[/ja]
  21514. */
  21515. }, {
  21516. key: 'indeterminate',
  21517. set: function set$$1(value) {
  21518. if (value) {
  21519. this.setAttribute(INDET$1, '');
  21520. } else {
  21521. this.removeAttribute(INDET$1);
  21522. }
  21523. },
  21524. get: function get$$1() {
  21525. return this.hasAttribute(INDET$1);
  21526. }
  21527. }], [{
  21528. key: 'observedAttributes',
  21529. get: function get$$1() {
  21530. return ['modifier', 'value', 'secondary-value', INDET$1];
  21531. }
  21532. }]);
  21533. return ProgressCircularElement;
  21534. }(BaseElement);
  21535. onsElements.ProgressCircular = ProgressCircularElement;
  21536. customElements.define('ons-progress-circular', ProgressCircularElement);
  21537. /*
  21538. Copyright 2013-2015 ASIAL CORPORATION
  21539. Licensed under the Apache License, Version 2.0 (the "License");
  21540. you may not use this file except in compliance with the License.
  21541. You may obtain a copy of the License at
  21542. http://www.apache.org/licenses/LICENSE-2.0
  21543. Unless required by applicable law or agreed to in writing, software
  21544. distributed under the License is distributed on an "AS IS" BASIS,
  21545. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21546. See the License for the specific language governing permissions and
  21547. limitations under the License.
  21548. */
  21549. var STATE_INITIAL = 'initial';
  21550. var STATE_PREACTION = 'preaction';
  21551. var STATE_ACTION = 'action';
  21552. var throwType = function throwType(el, type) {
  21553. return util$1.throw('"' + el + '" must be ' + type);
  21554. };
  21555. /**
  21556. * @element ons-pull-hook
  21557. * @category control
  21558. * @description
  21559. * [en]
  21560. * Component that adds **Pull to refresh** functionality to an `<ons-page>` element.
  21561. *
  21562. * It can be used to perform a task when the user pulls down at the top of the page. A common usage is to refresh the data displayed in a page.
  21563. * [/en]
  21564. * [ja][/ja]
  21565. * @codepen WbJogM
  21566. * @tutorial vanilla/Reference/pull-hook
  21567. * @example
  21568. * <ons-page>
  21569. * <ons-pull-hook>
  21570. * Release to refresh
  21571. * </ons-pull-hook>
  21572. * </ons-page>
  21573. *
  21574. * <script>
  21575. * document.querySelector('ons-pull-hook').onAction = function(done) {
  21576. * setTimeout(done, 1000);
  21577. * };
  21578. * </script>
  21579. */
  21580. var PullHookElement = function (_BaseElement) {
  21581. inherits(PullHookElement, _BaseElement);
  21582. /**
  21583. * @event changestate
  21584. * @description
  21585. * [en]Fired when the state is changed. The state can be either "initial", "preaction" or "action".[/en]
  21586. * [ja]コンポーネントの状態が変わった場合に発火します。状態は、"initial", "preaction", "action"のいずれかです。[/ja]
  21587. * @param {Object} event
  21588. * [en]Event object.[/en]
  21589. * [ja]イベントオブジェクト。[/ja]
  21590. * @param {Object} event.pullHook
  21591. * [en]Component object.[/en]
  21592. * [ja]コンポーネントのオブジェクト。[/ja]
  21593. * @param {String} event.state
  21594. * [en]Current state.[/en]
  21595. * [ja]現在の状態名を参照できます。[/ja]
  21596. */
  21597. /**
  21598. * @attribute disabled
  21599. * @description
  21600. * [en]If this attribute is set the "pull-to-refresh" functionality is disabled.[/en]
  21601. * [ja]この属性がある時、disabled状態になりアクションが実行されなくなります[/ja]
  21602. */
  21603. /**
  21604. * @attribute height
  21605. * @type {String}
  21606. * @description
  21607. * [en]Specify the height of the component. When pulled down further than this value it will switch to the "preaction" state. The default value is "64px".[/en]
  21608. * [ja]コンポーネントの高さを指定します。この高さ以上にpull downすると"preaction"状態に移行します。デフォルトの値は"64px"です。[/ja]
  21609. */
  21610. /**
  21611. * @attribute threshold-height
  21612. * @type {String}
  21613. * @description
  21614. * [en]Specify the threshold height. The component automatically switches to the "action" state when pulled further than this value. The default value is "96px". A negative value will disable this property. If this value is lower than the height, it will skip "preaction" state.[/en]
  21615. * [ja]閾値となる高さを指定します。この値で指定した高さよりもpull downすると、このコンポーネントは自動的に"action"状態に移行します。[/ja]
  21616. */
  21617. /**
  21618. * @attribute fixed-content
  21619. * @description
  21620. * [en]If this attribute is set the content of the page will not move when pulling.[/en]
  21621. * [ja]この属性がある時、プルフックが引き出されている時にもコンテンツは動きません。[/ja]
  21622. */
  21623. function PullHookElement() {
  21624. classCallCheck(this, PullHookElement);
  21625. var _this = possibleConstructorReturn(this, (PullHookElement.__proto__ || Object.getPrototypeOf(PullHookElement)).call(this));
  21626. _this._shouldFixScroll = util$1.globals.isUIWebView;
  21627. _this._onDrag = _this._onDrag.bind(_this);
  21628. _this._onDragStart = _this._onDragStart.bind(_this);
  21629. _this._onDragEnd = _this._onDragEnd.bind(_this);
  21630. _this._onScroll = _this._onScroll.bind(_this);
  21631. _this._setState(STATE_INITIAL, true);
  21632. _this._hide(); // Fix for transparent toolbar transitions
  21633. return _this;
  21634. }
  21635. createClass(PullHookElement, [{
  21636. key: '_setStyle',
  21637. value: function _setStyle() {
  21638. var height = this.height + 'px';
  21639. styler(this, { height: height, lineHeight: height });
  21640. this.style.display === '' && this._show();
  21641. }
  21642. }, {
  21643. key: '_onScroll',
  21644. value: function _onScroll(event) {
  21645. var element = this._pageElement;
  21646. if (element.scrollTop < 0) {
  21647. element.scrollTop = 0;
  21648. }
  21649. }
  21650. }, {
  21651. key: '_canConsumeGesture',
  21652. value: function _canConsumeGesture(gesture) {
  21653. return gesture.direction === 'up' || gesture.direction === 'down';
  21654. }
  21655. }, {
  21656. key: '_onDragStart',
  21657. value: function _onDragStart(event) {
  21658. var _this2 = this;
  21659. if (!event.gesture || this.disabled) {
  21660. return;
  21661. }
  21662. var tapY = event.gesture.center.clientY + this._pageElement.scrollTop;
  21663. var maxY = window.innerHeight;
  21664. // Only use drags that start near the pullHook to reduce flickerings
  21665. var draggableAreaRatio = this._shouldFixScroll ? .8 : 1;
  21666. this._ignoreDrag = event.consumed || tapY > maxY * draggableAreaRatio;
  21667. if (!this._ignoreDrag) {
  21668. var consume = event.consume;
  21669. event.consume = function () {
  21670. consume && consume();
  21671. _this2._ignoreDrag = true;
  21672. // This elements resizes .page__content so it is safer
  21673. // to hide it when other components are dragged.
  21674. _this2._hide();
  21675. };
  21676. if (this._canConsumeGesture(event.gesture)) {
  21677. consume && consume();
  21678. event.consumed = true;
  21679. this._show(); // Not enough due to 'dragLockAxis'
  21680. }
  21681. }
  21682. this._startScroll = this._pageElement.scrollTop;
  21683. }
  21684. }, {
  21685. key: '_onDrag',
  21686. value: function _onDrag(event) {
  21687. var _this3 = this;
  21688. if (!event.gesture || this.disabled || this._ignoreDrag || !this._canConsumeGesture(event.gesture)) {
  21689. return;
  21690. }
  21691. // Necessary due to 'dragLockAxis' (25px)
  21692. if (this.style.display === 'none') {
  21693. this._show();
  21694. }
  21695. event.stopPropagation();
  21696. var tapY = event.gesture.center.clientY + this._pageElement.scrollTop;
  21697. var maxY = window.innerHeight;
  21698. // Hack to make it work on Android 4.4 WebView and iOS UIWebView. Scrolls manually
  21699. // near the top of the page so there will be no inertial scroll when scrolling down.
  21700. // Allowing default scrolling will kill all 'touchmove' events.
  21701. if (this._shouldFixScroll) {
  21702. this._pageElement.scrollTop = this._startScroll - event.gesture.deltaY;
  21703. // Allow inertia when scrolling down below 50% of the view to reduce flickerings
  21704. if (event.gesture.interimDirection !== 'up' || tapY <= maxY * .5) {
  21705. event.gesture.preventDefault();
  21706. }
  21707. }
  21708. var scroll = Math.max(event.gesture.deltaY - this._startScroll, 0);
  21709. if (scroll !== this._currentTranslation) {
  21710. var th = this.thresholdHeight;
  21711. if (th > 0 && scroll >= th) {
  21712. event.gesture.stopDetect();
  21713. setImmediate(function () {
  21714. return _this3._finish();
  21715. });
  21716. } else if (scroll >= this.height) {
  21717. this._setState(STATE_PREACTION);
  21718. } else {
  21719. this._setState(STATE_INITIAL);
  21720. }
  21721. this._translateTo(scroll);
  21722. }
  21723. }
  21724. }, {
  21725. key: '_onDragEnd',
  21726. value: function _onDragEnd(event) {
  21727. if (!event.gesture || this.disabled || this._ignoreDrag) {
  21728. return;
  21729. }
  21730. event.stopPropagation();
  21731. if (this._currentTranslation > 0) {
  21732. var scroll = this._currentTranslation;
  21733. if (scroll > this.height) {
  21734. this._finish();
  21735. } else {
  21736. this._translateTo(0, { animate: true });
  21737. }
  21738. }
  21739. }
  21740. /**
  21741. * @property onAction
  21742. * @type {Function}
  21743. * @description
  21744. * [en]This will be called in the `action` state if it exists. The function will be given a `done` callback as it's first argument.[/en]
  21745. * [ja][/ja]
  21746. */
  21747. }, {
  21748. key: '_finish',
  21749. value: function _finish() {
  21750. var _this4 = this;
  21751. this._setState(STATE_ACTION);
  21752. this._translateTo(this.height, { animate: true });
  21753. var action = this.onAction || function (done) {
  21754. return done();
  21755. };
  21756. action(function () {
  21757. _this4._translateTo(0, { animate: true });
  21758. _this4._setState(STATE_INITIAL);
  21759. });
  21760. }
  21761. /**
  21762. * @property height
  21763. * @type {Number}
  21764. * @description
  21765. * [en]The height of the pull hook in pixels. The default value is `64px`.[/en]
  21766. * [ja][/ja]
  21767. */
  21768. }, {
  21769. key: '_setState',
  21770. value: function _setState(state, noEvent) {
  21771. var lastState = this.state;
  21772. this.setAttribute('state', state);
  21773. if (!noEvent && lastState !== this.state) {
  21774. util$1.triggerElementEvent(this, 'changestate', {
  21775. pullHook: this,
  21776. state: state,
  21777. lastState: lastState
  21778. });
  21779. }
  21780. }
  21781. /**
  21782. * @property state
  21783. * @readonly
  21784. * @type {String}
  21785. * @description
  21786. * [en]Current state of the element.[/en]
  21787. * [ja][/ja]
  21788. */
  21789. }, {
  21790. key: '_show',
  21791. value: function _show() {
  21792. var _this5 = this;
  21793. // Run asyncrhonously to avoid conflicts with Animit's style clean
  21794. setImmediate(function () {
  21795. _this5.style.display = '';
  21796. if (_this5._pageElement) {
  21797. _this5._pageElement.style.marginTop = '-' + _this5.height + 'px';
  21798. }
  21799. });
  21800. }
  21801. }, {
  21802. key: '_hide',
  21803. value: function _hide() {
  21804. this.style.display = 'none';
  21805. if (this._pageElement) {
  21806. this._pageElement.style.marginTop = '';
  21807. }
  21808. }
  21809. /**
  21810. * @param {Number} scroll
  21811. * @param {Object} options
  21812. * @param {Function} [options.callback]
  21813. */
  21814. }, {
  21815. key: '_translateTo',
  21816. value: function _translateTo(scroll) {
  21817. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21818. if (this._currentTranslation == 0 && scroll == 0) {
  21819. return;
  21820. }
  21821. this._currentTranslation = scroll;
  21822. var opt = options.animate ? { duration: .3, timing: 'cubic-bezier(.1, .7, .1, 1)' } : {};
  21823. this._onPull && this._onPull((scroll / this.height).toFixed(2), opt);
  21824. var scrollElement = this.hasAttribute('fixed-content') ? this : this._pageElement;
  21825. Animit(scrollElement).queue({ transform: 'translate3d(0px, ' + scroll + 'px, 0px)' }, opt).play(function () {
  21826. scroll === 0 && styler.clear(scrollElement, 'transition transform');
  21827. options.callback instanceof Function && options.callback();
  21828. });
  21829. }
  21830. }, {
  21831. key: '_disableDragLock',
  21832. value: function _disableDragLock() {
  21833. // e2e tests need it
  21834. this._dragLockDisabled = true;
  21835. this._setupListeners(true);
  21836. }
  21837. }, {
  21838. key: '_setupListeners',
  21839. value: function _setupListeners(add) {
  21840. var _this6 = this;
  21841. var scrollToggle = function scrollToggle(action) {
  21842. return _this6._pageElement[action + 'EventListener']('scroll', _this6._onScroll, false);
  21843. };
  21844. var gdToggle = function gdToggle(action) {
  21845. var passive = { passive: true };
  21846. _this6._gestureDetector[action]('drag', _this6._onDrag, passive);
  21847. _this6._gestureDetector[action]('dragstart', _this6._onDragStart, passive);
  21848. _this6._gestureDetector[action]('dragend', _this6._onDragEnd, passive);
  21849. };
  21850. if (this._gestureDetector) {
  21851. gdToggle('off');
  21852. this._gestureDetector.dispose();
  21853. this._gestureDetector = null;
  21854. }
  21855. scrollToggle('remove');
  21856. if (add) {
  21857. this._gestureDetector = new GestureDetector(this._pageElement, {
  21858. dragMinDistance: 1,
  21859. dragDistanceCorrection: false,
  21860. dragLockToAxis: !this._dragLockDisabled,
  21861. passive: !this._shouldFixScroll
  21862. });
  21863. gdToggle('on');
  21864. scrollToggle('add');
  21865. }
  21866. }
  21867. }, {
  21868. key: 'connectedCallback',
  21869. value: function connectedCallback() {
  21870. this._currentTranslation = 0;
  21871. this._pageElement = this.parentNode;
  21872. this._setupListeners(true);
  21873. this._setStyle();
  21874. }
  21875. }, {
  21876. key: 'disconnectedCallback',
  21877. value: function disconnectedCallback() {
  21878. this._hide();
  21879. this._setupListeners(false);
  21880. }
  21881. }, {
  21882. key: 'attributeChangedCallback',
  21883. value: function attributeChangedCallback(name, last, current) {
  21884. if (name === 'height' && this._pageElement) {
  21885. this._setStyle();
  21886. }
  21887. }
  21888. }, {
  21889. key: 'onAction',
  21890. get: function get$$1() {
  21891. return this._onAction;
  21892. },
  21893. set: function set$$1(value) {
  21894. if (value && !(value instanceof Function)) {
  21895. throwType('onAction', 'function or null');
  21896. }
  21897. this._onAction = value;
  21898. }
  21899. /**
  21900. * @property onPull
  21901. * @type {Function}
  21902. * @description
  21903. * [en]Hook called whenever the user pulls the element. It gets the pulled distance ratio (scroll / height) and an animationOptions object as arguments.[/en]
  21904. * [ja][/ja]
  21905. */
  21906. }, {
  21907. key: 'onPull',
  21908. get: function get$$1() {
  21909. return this._onPull;
  21910. },
  21911. set: function set$$1(value) {
  21912. if (value && !(value instanceof Function)) {
  21913. throwType('onPull', 'function or null');
  21914. }
  21915. this._onPull = value;
  21916. }
  21917. }, {
  21918. key: 'height',
  21919. set: function set$$1(value) {
  21920. if (!util$1.isInteger(value)) {
  21921. throwType('height', 'integer');
  21922. }
  21923. this.setAttribute('height', value + 'px');
  21924. },
  21925. get: function get$$1() {
  21926. return parseInt(this.getAttribute('height') || '64', 10);
  21927. }
  21928. /**
  21929. * @property thresholdHeight
  21930. * @type {Number}
  21931. * @description
  21932. * [en]The thresholdHeight of the pull hook in pixels. The default value is `96px`.[/en]
  21933. * [ja][/ja]
  21934. */
  21935. }, {
  21936. key: 'thresholdHeight',
  21937. set: function set$$1(value) {
  21938. if (!util$1.isInteger(value)) {
  21939. throwType('thresholdHeight', 'integer');
  21940. }
  21941. this.setAttribute('threshold-height', value + 'px');
  21942. },
  21943. get: function get$$1() {
  21944. return parseInt(this.getAttribute('threshold-height') || '96', 10);
  21945. }
  21946. }, {
  21947. key: 'state',
  21948. get: function get$$1() {
  21949. return this.getAttribute('state');
  21950. }
  21951. /**
  21952. * @property pullDistance
  21953. * @readonly
  21954. * @type {Number}
  21955. * @description
  21956. * [en]The current number of pixels the pull hook has moved.[/en]
  21957. * [ja]現在のプルフックが引き出された距離をピクセル数。[/ja]
  21958. */
  21959. }, {
  21960. key: 'pullDistance',
  21961. get: function get$$1() {
  21962. return this._currentTranslation;
  21963. }
  21964. /**
  21965. * @property disabled
  21966. * @type {Boolean}
  21967. * @description
  21968. * [en]Whether the element is disabled or not.[/en]
  21969. * [ja]無効化されている場合に`true`。[/ja]
  21970. */
  21971. }, {
  21972. key: 'disabled',
  21973. set: function set$$1(value) {
  21974. return util$1.toggleAttribute(this, 'disabled', value);
  21975. },
  21976. get: function get$$1() {
  21977. return this.hasAttribute('disabled');
  21978. }
  21979. }], [{
  21980. key: 'observedAttributes',
  21981. get: function get$$1() {
  21982. return ['height'];
  21983. }
  21984. }, {
  21985. key: 'events',
  21986. get: function get$$1() {
  21987. return ['changestate'];
  21988. }
  21989. }]);
  21990. return PullHookElement;
  21991. }(BaseElement);
  21992. onsElements.PullHook = PullHookElement;
  21993. customElements.define('ons-pull-hook', PullHookElement);
  21994. /*
  21995. Copyright 2013-2015 ASIAL CORPORATION
  21996. Licensed under the Apache License, Version 2.0 (the "License");
  21997. you may not use this file except in compliance with the License.
  21998. You may obtain a copy of the License at
  21999. http://www.apache.org/licenses/LICENSE-2.0
  22000. Unless required by applicable law or agreed to in writing, software
  22001. distributed under the License is distributed on an "AS IS" BASIS,
  22002. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22003. See the License for the specific language governing permissions and
  22004. limitations under the License.
  22005. */
  22006. var scheme$22 = {
  22007. '': 'range--*',
  22008. '.range__input': 'range--*__input',
  22009. '.range__focus-ring': 'range--*__focus-ring'
  22010. };
  22011. var activeClassToken = 'range__input--active';
  22012. /**
  22013. * @element ons-range
  22014. * @category form
  22015. * @modifier material
  22016. * [en]Material Design slider[/en]
  22017. * [ja][/ja]
  22018. * @description
  22019. * [en]
  22020. * Range input component. Used to display a draggable slider.
  22021. *
  22022. * Works very similar to the `<input type="range">` element.
  22023. * [/en]
  22024. * [ja][/ja]
  22025. * @codepen xZQomM
  22026. * @tutorial vanilla/Reference/range
  22027. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  22028. * @seealso ons-input
  22029. * [en]The `<ons-input>` component is used to display text inputs, radio buttons and checkboxes.[/en]
  22030. * [ja][/ja]
  22031. * @example
  22032. * <ons-range value="20"></ons-range>
  22033. * <ons-range modifier="material" value="10"></range>
  22034. */
  22035. var RangeElement = function (_BaseInputElement) {
  22036. inherits(RangeElement, _BaseInputElement);
  22037. function RangeElement() {
  22038. classCallCheck(this, RangeElement);
  22039. var _this = possibleConstructorReturn(this, (RangeElement.__proto__ || Object.getPrototypeOf(RangeElement)).call(this));
  22040. _this._onMouseDown = _this._onMouseDown.bind(_this);
  22041. _this._onMouseUp = _this._onMouseUp.bind(_this);
  22042. _this._onTouchStart = _this._onTouchStart.bind(_this);
  22043. _this._onTouchEnd = _this._onTouchEnd.bind(_this);
  22044. _this._onInput = _this._update.bind(_this);
  22045. _this._onDragstart = _this._onDragstart.bind(_this);
  22046. _this._onDragend = _this._onDragend.bind(_this);
  22047. return _this;
  22048. }
  22049. createClass(RangeElement, [{
  22050. key: '_compile',
  22051. value: function _compile() {
  22052. get(RangeElement.prototype.__proto__ || Object.getPrototypeOf(RangeElement.prototype), '_compile', this).call(this);
  22053. this._updateDisabled(this.hasAttribute('disabled'));
  22054. }
  22055. /* Inherited props */
  22056. }, {
  22057. key: '_update',
  22058. value: function _update() {
  22059. var input = this._input;
  22060. var focusRing = this._focusRing;
  22061. input.style.backgroundSize = 100 * this._ratio + '% 2px';
  22062. focusRing.value = this.value;
  22063. // NOTE: "_zero" attribute is used for CSS styling.
  22064. if (input.min === '' && input.value === '0' || input.min === input.value) {
  22065. input.setAttribute('_zero', '');
  22066. } else {
  22067. input.removeAttribute('_zero');
  22068. }
  22069. ['min', 'max'].forEach(function (attr) {
  22070. return focusRing[attr] = input[attr];
  22071. });
  22072. }
  22073. }, {
  22074. key: '_onMouseDown',
  22075. /* Own props */
  22076. value: function _onMouseDown(e) {
  22077. var _this2 = this;
  22078. this._input.classList.add(activeClassToken);
  22079. setImmediate(function () {
  22080. return _this2._input.focus();
  22081. });
  22082. }
  22083. }, {
  22084. key: '_onTouchStart',
  22085. value: function _onTouchStart(e) {
  22086. this._onMouseDown();
  22087. }
  22088. }, {
  22089. key: '_onMouseUp',
  22090. value: function _onMouseUp(e) {
  22091. this._input.classList.remove(activeClassToken);
  22092. }
  22093. }, {
  22094. key: '_onTouchEnd',
  22095. value: function _onTouchEnd(e) {
  22096. this._onMouseUp(e);
  22097. }
  22098. }, {
  22099. key: '_onDragstart',
  22100. value: function _onDragstart(e) {
  22101. e.consumed = true;
  22102. e.gesture.stopPropagation();
  22103. this._input.classList.add(activeClassToken);
  22104. this.addEventListener('drag', this._onDrag);
  22105. }
  22106. }, {
  22107. key: '_onDrag',
  22108. value: function _onDrag(e) {
  22109. e.stopPropagation();
  22110. }
  22111. }, {
  22112. key: '_onDragend',
  22113. value: function _onDragend(e) {
  22114. this._input.classList.remove(activeClassToken);
  22115. this.removeEventListener('drag', this._onDrag);
  22116. }
  22117. }, {
  22118. key: 'attributeChangedCallback',
  22119. value: function attributeChangedCallback(name, last, current) {
  22120. if (name === 'disabled') {
  22121. this._updateDisabled(current);
  22122. }
  22123. get(RangeElement.prototype.__proto__ || Object.getPrototypeOf(RangeElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  22124. }
  22125. /**
  22126. * @param {boolean} disabled
  22127. */
  22128. }, {
  22129. key: '_updateDisabled',
  22130. value: function _updateDisabled(disabled) {
  22131. if (disabled) {
  22132. this.classList.add('range--disabled');
  22133. } else {
  22134. this.classList.remove('range--disabled');
  22135. }
  22136. }
  22137. }, {
  22138. key: 'connectedCallback',
  22139. value: function connectedCallback() {
  22140. this._setupListeners(true);
  22141. }
  22142. }, {
  22143. key: 'disconnectedCallback',
  22144. value: function disconnectedCallback() {
  22145. this._setupListeners(false);
  22146. }
  22147. }, {
  22148. key: '_setupListeners',
  22149. value: function _setupListeners(add) {
  22150. var action = (add ? 'add' : 'remove') + 'EventListener';
  22151. util$1[action](this, 'touchstart', this._onTouchStart, { passive: true });
  22152. this[action]('mousedown', this._onMouseDown);
  22153. this[action]('mouseup', this._onMouseUp);
  22154. this[action]('touchend', this._onTouchEnd);
  22155. this[action]('dragstart', this._onDragstart);
  22156. this[action]('dragend', this._onDragend);
  22157. this[action]('input', this._onInput);
  22158. }
  22159. /**
  22160. * @attribute disabled
  22161. * @description
  22162. * [en]Whether the element is disabled or not.[/en]
  22163. * [ja]無効化されている場合に`true`。[/ja]
  22164. */
  22165. /**
  22166. * @property disabled
  22167. * @type {Boolean}
  22168. * @description
  22169. * [en]Whether the element is disabled or not.[/en]
  22170. * [ja]無効化されている場合に`true`。[/ja]
  22171. */
  22172. /**
  22173. * @property value
  22174. * @type {Number}
  22175. * @description
  22176. * [en]Current value.[/en]
  22177. * [ja][/ja]
  22178. */
  22179. }, {
  22180. key: '_scheme',
  22181. get: function get$$1() {
  22182. return scheme$22;
  22183. }
  22184. }, {
  22185. key: '_template',
  22186. get: function get$$1() {
  22187. return '\n <input type="' + this.type + '" class="' + this._defaultClassName + '__input">\n <input type="range" class="range__focus-ring" tabIndex="-1">\n ';
  22188. }
  22189. }, {
  22190. key: '_defaultClassName',
  22191. get: function get$$1() {
  22192. return 'range';
  22193. }
  22194. }, {
  22195. key: 'type',
  22196. get: function get$$1() {
  22197. return 'range';
  22198. }
  22199. }, {
  22200. key: '_focusRing',
  22201. get: function get$$1() {
  22202. return this.children[1];
  22203. }
  22204. }, {
  22205. key: '_ratio',
  22206. get: function get$$1() {
  22207. // Returns the current ratio.
  22208. var min = this._input.min === '' ? 0 : parseInt(this._input.min);
  22209. var max = this._input.max === '' ? 100 : parseInt(this._input.max);
  22210. return (this.value - min) / (max - min);
  22211. }
  22212. }], [{
  22213. key: 'observedAttributes',
  22214. get: function get$$1() {
  22215. return ['disabled'].concat(toConsumableArray(BaseInputElement.observedAttributes));
  22216. }
  22217. }]);
  22218. return RangeElement;
  22219. }(BaseInputElement);
  22220. onsElements.Range = RangeElement;
  22221. customElements.define('ons-range', RangeElement);
  22222. /*
  22223. Copyright 2013-2016 ASIAL CORPORATION
  22224. Licensed under the Apache License, Version 2.0 (the "License");
  22225. you may not use this file except in compliance with the License.
  22226. You may obtain a copy of the License at
  22227. http://www.apache.org/licenses/LICENSE-2.0
  22228. Unless required by applicable law or agreed to in writing, software
  22229. distributed under the License is distributed on an "AS IS" BASIS,
  22230. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22231. See the License for the specific language governing permissions and
  22232. limitations under the License.
  22233. */
  22234. /**
  22235. * @class AnimatorCSS - implementation of Animator class using css transitions
  22236. */
  22237. var AnimatorCSS = function () {
  22238. createClass(AnimatorCSS, [{
  22239. key: 'animate',
  22240. /**
  22241. * @method animate
  22242. * @desc main animation function
  22243. * @param {Element} element
  22244. * @param {Object} finalCSS
  22245. * @param {number} [duration=200] - duration in milliseconds
  22246. * @return {Object} result
  22247. * @return {Function} result.then(callback) - sets a callback to be executed after the animation has stopped
  22248. * @return {Function} result.stop(options) - stops the animation; if options.stopNext is true then it doesn't call the callback
  22249. * @return {Function} result.finish(ms) - finishes the animation in the specified time in milliseconds
  22250. * @return {Function} result.speed(ms) - sets the animation speed so that it finishes as if the original duration was the one specified here
  22251. * @example
  22252. * ````
  22253. * var result = animator.animate(el, {opacity: 0.5}, 1000);
  22254. *
  22255. * el.addEventListener('click', function(e){
  22256. * result.speed(200).then(function(){
  22257. * console.log('done');
  22258. * });
  22259. * }, 300);
  22260. * ````
  22261. */
  22262. value: function animate(el, final) {
  22263. var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;
  22264. var start = new Date().getTime(),
  22265. initial = {},
  22266. stopped = false,
  22267. next = false,
  22268. timeout = false,
  22269. properties = Object.keys(final);
  22270. var updateStyles = function updateStyles() {
  22271. var s = window.getComputedStyle(el);
  22272. properties.forEach(s.getPropertyValue.bind(s));
  22273. s = el.offsetHeight;
  22274. };
  22275. var result = {
  22276. stop: function stop() {
  22277. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  22278. timeout && clearTimeout(timeout);
  22279. var k = Math.min(1, (new Date().getTime() - start) / duration);
  22280. properties.forEach(function (i) {
  22281. el.style[i] = (1 - k) * initial[i] + k * final[i] + (i == 'opacity' ? '' : 'px');
  22282. });
  22283. el.style.transitionDuration = '0s';
  22284. if (options.stopNext) {
  22285. next = false;
  22286. } else if (!stopped) {
  22287. stopped = true;
  22288. next && next();
  22289. }
  22290. return result;
  22291. },
  22292. then: function then(cb) {
  22293. next = cb;
  22294. if (stopped) {
  22295. next && next();
  22296. }
  22297. return result;
  22298. },
  22299. speed: function speed(newDuration) {
  22300. if (internal$1.config.animationsDisabled) {
  22301. newDuration = 0;
  22302. }
  22303. if (!stopped) {
  22304. timeout && clearTimeout(timeout);
  22305. var passed = new Date().getTime() - start;
  22306. var k = passed / duration;
  22307. var remaining = newDuration * (1 - k);
  22308. properties.forEach(function (i) {
  22309. el.style[i] = (1 - k) * initial[i] + k * final[i] + (i == 'opacity' ? '' : 'px');
  22310. });
  22311. updateStyles();
  22312. start = el.speedUpTime;
  22313. duration = remaining;
  22314. el.style.transitionDuration = duration / 1000 + 's';
  22315. properties.forEach(function (i) {
  22316. el.style[i] = final[i] + (i == 'opacity' ? '' : 'px');
  22317. });
  22318. timeout = setTimeout(result.stop, remaining);
  22319. }
  22320. return result;
  22321. },
  22322. finish: function finish() {
  22323. var milliseconds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 50;
  22324. var k = (new Date().getTime() - start) / duration;
  22325. result.speed(milliseconds / (1 - k));
  22326. return result;
  22327. }
  22328. };
  22329. if (el.hasAttribute('disabled') || stopped || internal$1.config.animationsDisabled) {
  22330. return result;
  22331. }
  22332. var style = window.getComputedStyle(el);
  22333. properties.forEach(function (e) {
  22334. var v = parseFloat(style.getPropertyValue(e));
  22335. initial[e] = isNaN(v) ? 0 : v;
  22336. });
  22337. if (!stopped) {
  22338. el.style.transitionProperty = properties.join(',');
  22339. el.style.transitionDuration = duration / 1000 + 's';
  22340. properties.forEach(function (e) {
  22341. el.style[e] = final[e] + (e == 'opacity' ? '' : 'px');
  22342. });
  22343. }
  22344. timeout = setTimeout(result.stop, duration);
  22345. this._onStopAnimations(el, result.stop);
  22346. return result;
  22347. }
  22348. }]);
  22349. function AnimatorCSS() {
  22350. classCallCheck(this, AnimatorCSS);
  22351. this._queue = [];
  22352. this._index = 0;
  22353. }
  22354. createClass(AnimatorCSS, [{
  22355. key: '_onStopAnimations',
  22356. value: function _onStopAnimations(el, listener) {
  22357. var queue = this._queue;
  22358. var i = this._index++;
  22359. queue[el] = queue[el] || [];
  22360. queue[el][i] = function (options) {
  22361. delete queue[el][i];
  22362. if (queue[el] && queue[el].length == 0) {
  22363. delete queue[el];
  22364. }
  22365. return listener(options);
  22366. };
  22367. }
  22368. /**
  22369. * @method stopAnimations
  22370. * @desc stops active animations on a specified element
  22371. * @param {Element|Array} element - element or array of elements
  22372. * @param {Object} [options={}]
  22373. * @param {Boolean} [options.stopNext] - the callbacks after the animations won't be called if this option is true
  22374. */
  22375. }, {
  22376. key: 'stopAnimations',
  22377. value: function stopAnimations(el) {
  22378. var _this = this;
  22379. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  22380. if (Array.isArray(el)) {
  22381. return el.forEach(function (el) {
  22382. _this.stopAnimations(el, options);
  22383. });
  22384. }
  22385. (this._queue[el] || []).forEach(function (e) {
  22386. e(options || {});
  22387. });
  22388. }
  22389. /**
  22390. * @method stopAll
  22391. * @desc stops all active animations
  22392. * @param {Object} [options={}]
  22393. * @param {Boolean} [options.stopNext] - the callbacks after the animations won't be called if this option is true
  22394. */
  22395. }, {
  22396. key: 'stopAll',
  22397. value: function stopAll() {
  22398. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  22399. this.stopAnimations(Object.keys(this._queue), options);
  22400. }
  22401. /**
  22402. * @method fade
  22403. * @desc fades the element (short version for animate(el, {opacity: 0}))
  22404. * @param {Element} element
  22405. * @param {number} [duration=200]
  22406. */
  22407. }, {
  22408. key: 'fade',
  22409. value: function fade(el) {
  22410. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
  22411. return this.animate(el, { opacity: 0 }, duration);
  22412. }
  22413. }]);
  22414. return AnimatorCSS;
  22415. }();
  22416. /*
  22417. Copyright 2013-2015 ASIAL CORPORATION
  22418. Licensed under the Apache License, Version 2.0 (the "License");
  22419. you may not use this file except in compliance with the License.
  22420. You may obtain a copy of the License at
  22421. http://www.apache.org/licenses/LICENSE-2.0
  22422. Unless required by applicable law or agreed to in writing, software
  22423. distributed under the License is distributed on an "AS IS" BASIS,
  22424. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22425. See the License for the specific language governing permissions and
  22426. limitations under the License.
  22427. */
  22428. var defaultClassName$11 = 'ripple';
  22429. var scheme$23 = {
  22430. '': 'ripple--*',
  22431. '.ripple__wave': 'ripple--*__wave',
  22432. '.ripple__background': 'ripple--*__background'
  22433. };
  22434. /**
  22435. * @element ons-ripple
  22436. * @category visual
  22437. * @description
  22438. * [en]
  22439. * Adds a Material Design "ripple" effect to an element. The ripple effect will spread from the position where the user taps.
  22440. *
  22441. * Some elements such as `<ons-button>` and `<ons-fab>` support a `ripple` attribute.
  22442. * [/en]
  22443. * [ja]マテリアルデザインのリップル効果をDOM要素に追加します。[/ja]
  22444. * @codepen wKQWdZ
  22445. * @tutorial vanilla/Reference/ripple
  22446. * @modifier light-gray
  22447. * [en]Change the color of effects to light gray.[/en]
  22448. * [ja]エフェクトの色が明るい灰色になります。[/ja]
  22449. * @guide theming.html#cross-platform-styling-autostyling
  22450. * [en]Cross platform styling[/en]
  22451. * [ja]Cross platform styling[/ja]
  22452. * @example
  22453. * <div class="my-div">
  22454. * <ons-ripple></ons-ripple>
  22455. * </div>
  22456. *
  22457. * @example
  22458. * <ons-button ripple>Click me!</ons-button>
  22459. */
  22460. var RippleElement = function (_BaseElement) {
  22461. inherits(RippleElement, _BaseElement);
  22462. /**
  22463. * @attribute color
  22464. * @type {String}
  22465. * @description
  22466. * [en]Color of the ripple effect.[/en]
  22467. * [ja]リップルエフェクトの色を指定します。[/ja]
  22468. */
  22469. /**
  22470. * @attribute modifier
  22471. * @type {String}
  22472. * @description
  22473. * [en]The appearance of the ripple effect.[/en]
  22474. * [ja]エフェクトの表現を指定します。[/ja]
  22475. */
  22476. /**
  22477. * @attribute background
  22478. * @type {String}
  22479. * @description
  22480. * [en]Color of the background.[/en]
  22481. * [ja]背景の色を設定します。[/ja]
  22482. */
  22483. /**
  22484. * @attribute size
  22485. * @type {String}
  22486. * @description
  22487. * [en]Sizing of the wave on ripple effect. Set "cover" or "contain". Default is "cover".[/en]
  22488. * [ja]エフェクトのサイズを指定します。"cover"もしくは"contain"を指定します。デフォルトは"cover"です。[/ja]
  22489. */
  22490. /**
  22491. * @attribute center
  22492. * @type {Boolean}
  22493. * @description
  22494. * [en]If this attribute presents, change the position of wave effect to center of the target element.[/en]
  22495. * [ja]この要素を設定すると、エフェクトの位置が要素の真ん中から始まります。[/ja]
  22496. */
  22497. /**
  22498. * @attribute disabled
  22499. * @description
  22500. * [en]If this attribute is set, the ripple effect will be disabled.[/en]
  22501. * [ja]この属性が設定された場合、リップルエフェクトは無効になります。[/ja]
  22502. */
  22503. function RippleElement() {
  22504. classCallCheck(this, RippleElement);
  22505. var _this = possibleConstructorReturn(this, (RippleElement.__proto__ || Object.getPrototypeOf(RippleElement)).call(this));
  22506. _this._onTap = _this._onTap.bind(_this);
  22507. _this._onHold = _this._onHold.bind(_this);
  22508. _this._onDragStart = _this._onDragStart.bind(_this);
  22509. _this._onRelease = _this._onRelease.bind(_this);
  22510. contentReady(_this, function () {
  22511. return _this._compile();
  22512. });
  22513. _this._animator = new AnimatorCSS();
  22514. ['color', 'center', 'start-radius', 'background', 'modifier'].forEach(function (e) {
  22515. _this.attributeChangedCallback(e, null, _this.getAttribute(e));
  22516. });
  22517. return _this;
  22518. }
  22519. createClass(RippleElement, [{
  22520. key: '_compile',
  22521. value: function _compile() {
  22522. this.classList.add(defaultClassName$11);
  22523. this._wave = this.getElementsByClassName('ripple__wave')[0];
  22524. this._background = this.getElementsByClassName('ripple__background')[0];
  22525. if (!(this._background && this._wave)) {
  22526. this._wave = util$1.create('.ripple__wave');
  22527. this._background = util$1.create('.ripple__background');
  22528. this.appendChild(this._wave);
  22529. this.appendChild(this._background);
  22530. }
  22531. ModifierUtil.initModifier(this, scheme$23);
  22532. }
  22533. }, {
  22534. key: '_getEffectSize',
  22535. value: function _getEffectSize() {
  22536. var sizes = ['cover', 'contain'];
  22537. if (this.hasAttribute('size')) {
  22538. var size = this.getAttribute('size');
  22539. if (sizes.indexOf(size) !== -1) {
  22540. return size;
  22541. }
  22542. }
  22543. return 'cover';
  22544. }
  22545. }, {
  22546. key: '_calculateCoords',
  22547. value: function _calculateCoords(e) {
  22548. var x = void 0,
  22549. y = void 0,
  22550. h = void 0,
  22551. w = void 0,
  22552. r = void 0;
  22553. var b = this.getBoundingClientRect();
  22554. var size = this._getEffectSize();
  22555. var error = function error() {
  22556. return util$1.throw('Ripple invalid state');
  22557. };
  22558. if (this._center) {
  22559. x = b.width / 2;
  22560. y = b.height / 2;
  22561. if (size === 'cover') {
  22562. r = Math.sqrt(x * x + y * y);
  22563. } else if (size === 'contain') {
  22564. r = Math.min(x, y);
  22565. } else {
  22566. error();
  22567. }
  22568. } else {
  22569. x = (typeof e.clientX === 'number' ? e.clientX : e.changedTouches[0].clientX) - b.left;
  22570. y = (typeof e.clientY === 'number' ? e.clientY : e.changedTouches[0].clientY) - b.top;
  22571. h = Math.max(y, b.height - y);
  22572. w = Math.max(x, b.width - x);
  22573. if (size === 'cover') {
  22574. r = Math.sqrt(h * h + w * w);
  22575. } else if (size === 'contain') {
  22576. r = Math.min(Math.round(h / 2), Math.round(w / 2));
  22577. } else {
  22578. error();
  22579. }
  22580. }
  22581. return { x: x, y: y, r: r };
  22582. }
  22583. }, {
  22584. key: '_rippleAnimation',
  22585. value: function _rippleAnimation(e) {
  22586. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
  22587. var _animator = this._animator,
  22588. _wave = this._wave,
  22589. _background = this._background,
  22590. _minR = this._minR;
  22591. var _calculateCoords2 = this._calculateCoords(e),
  22592. x = _calculateCoords2.x,
  22593. y = _calculateCoords2.y,
  22594. r = _calculateCoords2.r;
  22595. _animator.stopAll({ stopNext: 1 });
  22596. _animator.animate(_background, { opacity: 1 }, duration);
  22597. util$1.extend(_wave.style, {
  22598. opacity: 1,
  22599. top: y - _minR + 'px',
  22600. left: x - _minR + 'px',
  22601. width: 2 * _minR + 'px',
  22602. height: 2 * _minR + 'px'
  22603. });
  22604. return _animator.animate(_wave, {
  22605. top: y - r,
  22606. left: x - r,
  22607. height: 2 * r,
  22608. width: 2 * r
  22609. }, duration);
  22610. }
  22611. }, {
  22612. key: '_updateParent',
  22613. value: function _updateParent() {
  22614. if (!this._parentUpdated && this.parentNode) {
  22615. var computedStyle = window.getComputedStyle(this.parentNode);
  22616. if (computedStyle.getPropertyValue('position') === 'static') {
  22617. this.parentNode.style.position = 'relative';
  22618. }
  22619. this._parentUpdated = true;
  22620. }
  22621. }
  22622. }, {
  22623. key: '_onTap',
  22624. value: function _onTap(e) {
  22625. var _this2 = this;
  22626. if (!this.disabled && !e.ripple) {
  22627. e.ripple = true;
  22628. this._updateParent();
  22629. this._rippleAnimation(e.gesture.srcEvent).then(function () {
  22630. _this2._animator.fade(_this2._wave);
  22631. _this2._animator.fade(_this2._background);
  22632. });
  22633. }
  22634. }
  22635. }, {
  22636. key: '_onHold',
  22637. value: function _onHold(e) {
  22638. if (!this.disabled && !e.ripple) {
  22639. e.ripple = true;
  22640. this._updateParent();
  22641. this._holding = this._rippleAnimation(e.gesture.srcEvent, 2000);
  22642. document.addEventListener('release', this._onRelease);
  22643. }
  22644. }
  22645. }, {
  22646. key: '_onRelease',
  22647. value: function _onRelease(e) {
  22648. var _this3 = this;
  22649. if (this._holding && !e.ripple) {
  22650. e.ripple = true;
  22651. this._holding.speed(300).then(function () {
  22652. _this3._animator.stopAll({ stopNext: true });
  22653. _this3._animator.fade(_this3._wave);
  22654. _this3._animator.fade(_this3._background);
  22655. });
  22656. this._holding = false;
  22657. }
  22658. document.removeEventListener('release', this._onRelease);
  22659. }
  22660. }, {
  22661. key: '_onDragStart',
  22662. value: function _onDragStart(e) {
  22663. if (this._holding) {
  22664. return this._onRelease(e);
  22665. }
  22666. if (['left', 'right'].indexOf(e.gesture.direction) != -1) {
  22667. this._onTap(e);
  22668. }
  22669. }
  22670. }, {
  22671. key: 'connectedCallback',
  22672. value: function connectedCallback() {
  22673. this._parentNode = this.parentNode;
  22674. if (internal$1.config.animationsDisabled) {
  22675. this.disabled = true;
  22676. } else {
  22677. this._parentNode.addEventListener('tap', this._onTap);
  22678. this._parentNode.addEventListener('hold', this._onHold);
  22679. this._parentNode.addEventListener('dragstart', this._onDragStart);
  22680. }
  22681. }
  22682. }, {
  22683. key: 'disconnectedCallback',
  22684. value: function disconnectedCallback() {
  22685. var pn = this._parentNode || this.parentNode;
  22686. pn.removeEventListener('tap', this._onTap);
  22687. pn.removeEventListener('hold', this._onHold);
  22688. pn.removeEventListener('dragstart', this._onDragStart);
  22689. }
  22690. }, {
  22691. key: 'attributeChangedCallback',
  22692. value: function attributeChangedCallback(name, last, current) {
  22693. var _this4 = this;
  22694. switch (name) {
  22695. case 'class':
  22696. util$1.restoreClass(this, defaultClassName$11, scheme$23);
  22697. break;
  22698. case 'modifier':
  22699. ModifierUtil.onModifierChanged(last, current, this, scheme$23);
  22700. break;
  22701. case 'start-radius':
  22702. this._minR = Math.max(0, parseFloat(current) || 0);
  22703. break;
  22704. case 'color':
  22705. if (current) {
  22706. contentReady(this, function () {
  22707. _this4._wave.style.background = current;
  22708. if (!_this4.hasAttribute('background')) {
  22709. _this4._background.style.background = current;
  22710. }
  22711. });
  22712. }
  22713. break;
  22714. case 'background':
  22715. if (current || last) {
  22716. if (current === 'none') {
  22717. contentReady(this, function () {
  22718. _this4._background.setAttribute('disabled', 'disabled');
  22719. _this4._background.style.background = 'transparent';
  22720. });
  22721. } else {
  22722. contentReady(this, function () {
  22723. if (_this4._background.hasAttribute('disabled')) {
  22724. _this4._background.removeAttribute('disabled');
  22725. }
  22726. _this4._background.style.background = current;
  22727. });
  22728. }
  22729. }
  22730. break;
  22731. case 'center':
  22732. if (name === 'center') {
  22733. this._center = current != null && current != 'false';
  22734. }
  22735. break;
  22736. }
  22737. }
  22738. /**
  22739. * @property disabled
  22740. * @type {Boolean}
  22741. * @description
  22742. * [en]Whether the element is disabled or not.[/en]
  22743. * [ja]無効化されている場合に`true`。[/ja]
  22744. */
  22745. }, {
  22746. key: 'disabled',
  22747. set: function set$$1(value) {
  22748. return util$1.toggleAttribute(this, 'disabled', value);
  22749. },
  22750. get: function get$$1() {
  22751. return this.hasAttribute('disabled');
  22752. }
  22753. }], [{
  22754. key: 'observedAttributes',
  22755. get: function get$$1() {
  22756. return ['start-radius', 'color', 'background', 'center', 'class', 'modifier'];
  22757. }
  22758. }]);
  22759. return RippleElement;
  22760. }(BaseElement);
  22761. onsElements.Ripple = RippleElement;
  22762. customElements.define('ons-ripple', RippleElement);
  22763. /*
  22764. Copyright 2013-2015 ASIAL CORPORATION
  22765. Licensed under the Apache License, Version 2.0 (the "License");
  22766. you may not use this file except in compliance with the License.
  22767. You may obtain a copy of the License at
  22768. http://www.apache.org/licenses/LICENSE-2.0
  22769. Unless required by applicable law or agreed to in writing, software
  22770. distributed under the License is distributed on an "AS IS" BASIS,
  22771. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22772. See the License for the specific language governing permissions and
  22773. limitations under the License.
  22774. */
  22775. /**
  22776. * @element ons-row
  22777. * @category grid
  22778. * @description
  22779. * [en]Represents a row in the grid system. Use with `<ons-col>` to layout components.[/en]
  22780. * [ja]グリッドシステムにて行を定義します。ons-colとともに使用し、コンポーネントの配置に使用します。[/ja]
  22781. * @codepen GgujC {wide}
  22782. * @guide theming.html
  22783. * [en]Layouting guide[/en]
  22784. * [ja]レイアウト調整[/ja]
  22785. * @seealso ons-col
  22786. * [en]The `<ons-col>` component is used as children of `<ons-row>`.[/en]
  22787. * [ja]ons-colコンポーネント[/ja]
  22788. * @note
  22789. * [en]For Android 4.3 and earlier, and iOS6 and earlier, when using mixed alignment with ons-row and ons-col, they may not be displayed correctly. You can use only one vertical-align.[/en]
  22790. * [ja]Android 4.3以前、もしくはiOS 6以前のOSの場合、ons-rowとons-colを組み合わせてそれぞれのons-col要素のvertical-align属性の値に別々の値を指定すると、描画が崩れる場合があります。vertical-align属性の値には一つの値だけを指定できます。[/ja]
  22791. * @example
  22792. * <ons-row>
  22793. * <ons-col width="50px"><ons-icon icon="fa-twitter"></ons-icon></ons-col>
  22794. * <ons-col>Text</ons-col>
  22795. * </ons-row>
  22796. */
  22797. /**
  22798. * @attribute vertical-align
  22799. * @type {String}
  22800. * @description
  22801. * [en]Short hand attribute for aligning vertically. Valid values are top, bottom, and center.[/en]
  22802. * [ja]縦に整列するために指定します。top、bottom、centerのいずれかを指定できます。[/ja]
  22803. */
  22804. var RowElement = function (_BaseElement) {
  22805. inherits(RowElement, _BaseElement);
  22806. function RowElement() {
  22807. classCallCheck(this, RowElement);
  22808. return possibleConstructorReturn(this, (RowElement.__proto__ || Object.getPrototypeOf(RowElement)).apply(this, arguments));
  22809. }
  22810. return RowElement;
  22811. }(BaseElement);
  22812. onsElements.Row = RowElement;
  22813. customElements.define('ons-row', RowElement);
  22814. /*
  22815. Copyright 2013-2015 ASIAL CORPORATION
  22816. Licensed under the Apache License, Version 2.0 (the "License");
  22817. you may not use this file except in compliance with the License.
  22818. You may obtain a copy of the License at
  22819. http://www.apache.org/licenses/LICENSE-2.0
  22820. Unless required by applicable law or agreed to in writing, software
  22821. distributed under the License is distributed on an "AS IS" BASIS,
  22822. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22823. See the License for the specific language governing permissions and
  22824. limitations under the License.
  22825. */
  22826. var defaultClassName$12 = 'segment';
  22827. var scheme$24 = {
  22828. '': 'segment--*',
  22829. '.segment__item': 'segment--*__item',
  22830. '.segment__input': 'segment--*__input',
  22831. '.segment__button': 'segment--*__button'
  22832. };
  22833. var generateId$1 = function () {
  22834. var i = 0;
  22835. return function () {
  22836. return 'ons-segment-gen-' + i++;
  22837. };
  22838. }();
  22839. /**
  22840. * @element ons-segment
  22841. * @category control
  22842. * @modifier material
  22843. * [en]Material Design segment[/en]
  22844. * [ja][/ja]
  22845. * @description
  22846. * [en]
  22847. * Segment component. Use this component to have a button bar with automatic styles that switch on click of another button.
  22848. *
  22849. * Will automatically display as a Material Design segment on Android.
  22850. * [/en]
  22851. * [ja][/ja]
  22852. * @codepen hLayx
  22853. * @tutorial vanilla/Reference/segment
  22854. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  22855. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja]Information about cross platform styling[/ja]
  22856. * @example
  22857. * <ons-segment>
  22858. * <ons-button>Label 1</ons-button>
  22859. * <ons-button>Label 2</ons-button>
  22860. * <ons-button>Label 3</ons-button>
  22861. * </ons-segment>
  22862. */
  22863. var SegmentElement = function (_BaseElement) {
  22864. inherits(SegmentElement, _BaseElement);
  22865. /**
  22866. * @event postchange
  22867. * @description
  22868. * [en]Fires after the active button is changed.[/en]
  22869. * [ja][/ja]
  22870. * @param {Object} event
  22871. * [en]Event object.[/en]
  22872. * [ja][/ja]
  22873. * @param {Number} event.index
  22874. * [en]Tapped button index.[/en]
  22875. * [ja][/ja]
  22876. * @param {Object} event.segmentItem
  22877. * [en]Segment item object.[/en]
  22878. * [ja][/ja]
  22879. */
  22880. /**
  22881. * @attribute modifier
  22882. * @type {String}
  22883. * @description
  22884. * [en]The appearance of the segment.[/en]
  22885. * [ja][/ja]
  22886. */
  22887. /**
  22888. * @attribute tabbar-id
  22889. * @initonly
  22890. * @type {String}
  22891. * @description
  22892. * [en]ID of the tabbar element to "connect" to the segment. Must be inside the same page.[/en]
  22893. * [ja][/ja]
  22894. */
  22895. /**
  22896. * @attribute active-index
  22897. * @initonly
  22898. * @default 0
  22899. * @type {Number}
  22900. * @description
  22901. * [en]Index of the first active button, only works if there is no connected tabbar (in which case the active tab sets the active button).[/en]
  22902. * [ja][/ja]
  22903. */
  22904. /**
  22905. * @attribute disabled
  22906. * @description
  22907. * [en]Specify if segment should be disabled.[/en]
  22908. * [ja]ボタンを無効化する場合は指定します。[/ja]
  22909. */
  22910. function SegmentElement() {
  22911. classCallCheck(this, SegmentElement);
  22912. var _this = possibleConstructorReturn(this, (SegmentElement.__proto__ || Object.getPrototypeOf(SegmentElement)).call(this));
  22913. _this._segmentId = generateId$1();
  22914. _this._tabbar = null;
  22915. _this._onChange = _this._onChange.bind(_this);
  22916. _this._onTabbarPreChange = _this._onTabbarPreChange.bind(_this);
  22917. contentReady(_this, function () {
  22918. _this._compile();
  22919. setImmediate(function () {
  22920. return _this._lastActiveIndex = _this._tabbar ? _this._tabbar.getActiveTabIndex() : _this.getActiveButtonIndex();
  22921. });
  22922. });
  22923. return _this;
  22924. }
  22925. createClass(SegmentElement, [{
  22926. key: '_compile',
  22927. value: function _compile() {
  22928. autoStyle.prepare(this);
  22929. this.classList.add(defaultClassName$12);
  22930. for (var index = this.children.length - 1; index >= 0; index--) {
  22931. var item = this.children[index];
  22932. item.classList.add('segment__item');
  22933. var input = util$1.findChild(item, '.segment__input') || util$1.create('input.segment__input');
  22934. input.type = 'radio';
  22935. input.value = index;
  22936. input.name = input.name || this._segmentId;
  22937. input.checked = !this.hasAttribute('tabbar-id') && index === (parseInt(this.getAttribute('active-index')) || 0);
  22938. var button = util$1.findChild(item, '.segment__button') || util$1.create('.segment__button');
  22939. if (button.parentElement !== item) {
  22940. while (item.firstChild) {
  22941. button.appendChild(item.firstChild);
  22942. }
  22943. }
  22944. item.appendChild(input);
  22945. item.appendChild(button);
  22946. }
  22947. ModifierUtil.initModifier(this, scheme$24);
  22948. }
  22949. }, {
  22950. key: 'connectedCallback',
  22951. value: function connectedCallback() {
  22952. var _this2 = this;
  22953. contentReady(this, function () {
  22954. if (_this2.hasAttribute('tabbar-id')) {
  22955. var page = util$1.findParent(_this2, 'ons-page');
  22956. _this2._tabbar = page && page.querySelector('#' + _this2.getAttribute('tabbar-id'));
  22957. if (!_this2._tabbar || _this2._tabbar.tagName !== 'ONS-TABBAR') {
  22958. util$1.throw('No tabbar with id ' + _this2.getAttribute('tabbar-id') + ' was found.');
  22959. }
  22960. _this2._tabbar.setAttribute('hide-tabs', '');
  22961. setImmediate(function () {
  22962. return _this2._setChecked(_this2._tabbar.getActiveTabIndex());
  22963. });
  22964. _this2._tabbar.addEventListener('prechange', _this2._onTabbarPreChange);
  22965. }
  22966. });
  22967. this.addEventListener('change', this._onChange);
  22968. }
  22969. }, {
  22970. key: 'disconnectedCallback',
  22971. value: function disconnectedCallback() {
  22972. var _this3 = this;
  22973. contentReady(this, function () {
  22974. if (_this3._tabbar) {
  22975. _this3._tabbar.removeEventListener('prechange', _this3._onTabbarPreChange);
  22976. _this3._tabbar = null;
  22977. }
  22978. });
  22979. this.removeEventListener('change', this._onChange);
  22980. }
  22981. }, {
  22982. key: '_setChecked',
  22983. value: function _setChecked(index) {
  22984. this.children[index].firstElementChild.checked = true;
  22985. }
  22986. /**
  22987. * @method setActiveButton
  22988. * @signature setActiveButton(index, [options])
  22989. * @param {Number} index
  22990. * [en]Button index.[/en]
  22991. * [ja][/ja]
  22992. * @param {Object} [options]
  22993. * [en]Parameter object, works only if there is a connected tabbar. Supports the same options as `ons-tabbar`'s `setActiveTab` method.[/en]
  22994. * [ja][/ja]
  22995. * @description
  22996. * [en]Make button with the specified index active. If there is a connected tabbar it shows the corresponding tab page. In this case animations and their options can be specified by the second parameter.[/en]
  22997. * [ja][/ja]
  22998. * @return {Promise}
  22999. * [en]Resolves to the selected index or to the new page element if there is a connected tabbar.[/en]
  23000. * [ja][/ja]
  23001. */
  23002. }, {
  23003. key: 'setActiveButton',
  23004. value: function setActiveButton(index, options) {
  23005. if (this._tabbar) {
  23006. return this._tabbar.setActiveTab(index, options);
  23007. }
  23008. this._setChecked(index);
  23009. this._postChange(index);
  23010. return Promise.resolve(index);
  23011. }
  23012. /**
  23013. * @method getActiveButtonIndex
  23014. * @signature getActiveButtonIndex()
  23015. * @return {Number}
  23016. * [en]The index of the currently active button.[/en]
  23017. * [ja][/ja]
  23018. * @description
  23019. * [en]Returns button index of current active button. If active button is not found, returns -1.[/en]
  23020. * [ja][/ja]
  23021. */
  23022. }, {
  23023. key: 'getActiveButtonIndex',
  23024. value: function getActiveButtonIndex() {
  23025. for (var i = this.children.length - 1; i >= 0; i--) {
  23026. // Array.findIndex
  23027. if (this.children[i].firstElementChild.checked) {
  23028. return i;
  23029. }
  23030. }
  23031. return -1;
  23032. }
  23033. }, {
  23034. key: '_onChange',
  23035. value: function _onChange(event) {
  23036. event.stopPropagation();
  23037. this._tabbar ? this._tabbar.setActiveTab(this.getActiveButtonIndex(), { reject: false }) : this._postChange(this.getActiveButtonIndex());
  23038. }
  23039. }, {
  23040. key: '_onTabbarPreChange',
  23041. value: function _onTabbarPreChange(event) {
  23042. var _this4 = this;
  23043. setImmediate(function () {
  23044. if (!event.detail.canceled) {
  23045. _this4._setChecked(event.index);
  23046. _this4._postChange(event.index);
  23047. }
  23048. });
  23049. }
  23050. }, {
  23051. key: '_postChange',
  23052. value: function _postChange(index) {
  23053. util$1.triggerElementEvent(this, 'postchange', {
  23054. index: index,
  23055. activeIndex: index,
  23056. lastActiveIndex: this._lastActiveIndex,
  23057. segmentItem: this.children[index]
  23058. });
  23059. this._lastActiveIndex = index;
  23060. }
  23061. /**
  23062. * @property disabled
  23063. * @type {Boolean}
  23064. * @description
  23065. * [en]Whether the segment is disabled or not.[/en]
  23066. * [ja]無効化されている場合に`true`。[/ja]
  23067. */
  23068. }, {
  23069. key: 'attributeChangedCallback',
  23070. value: function attributeChangedCallback(name, last, current) {
  23071. switch (name) {
  23072. case 'class':
  23073. util$1.restoreClass(this, defaultClassName$12, scheme$24);
  23074. break;
  23075. case 'modifier':
  23076. ModifierUtil.onModifierChanged(last, current, this, scheme$24);
  23077. break;
  23078. }
  23079. }
  23080. }, {
  23081. key: 'disabled',
  23082. set: function set$$1(value) {
  23083. return util$1.toggleAttribute(this, 'disabled', value);
  23084. },
  23085. get: function get$$1() {
  23086. return this.hasAttribute('disabled');
  23087. }
  23088. }], [{
  23089. key: 'observedAttributes',
  23090. get: function get$$1() {
  23091. return ['class', 'modifier'];
  23092. }
  23093. }, {
  23094. key: 'events',
  23095. get: function get$$1() {
  23096. return ['postchange'];
  23097. }
  23098. }]);
  23099. return SegmentElement;
  23100. }(BaseElement);
  23101. onsElements.Segment = SegmentElement;
  23102. customElements.define('ons-segment', SegmentElement);
  23103. /*
  23104. Copyright 2013-2015 ASIAL CORPORATION
  23105. Licensed under the Apache License, Version 2.0 (the "License");
  23106. you may not use this file except in compliance with the License.
  23107. You may obtain a copy of the License at
  23108. http://www.apache.org/licenses/LICENSE-2.0
  23109. Unless required by applicable law or agreed to in writing, software
  23110. distributed under the License is distributed on an "AS IS" BASIS,
  23111. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23112. See the License for the specific language governing permissions and
  23113. limitations under the License.
  23114. */
  23115. var scheme$25 = {
  23116. '': 'select-* select--*',
  23117. '.select-input': 'select-input--*'
  23118. };
  23119. var defaultClassName$13 = 'select';
  23120. var INPUT_ATTRIBUTES$1 = ['autofocus', 'disabled', 'form', 'multiple', 'name', 'required', 'size'];
  23121. /**
  23122. * @element ons-select
  23123. * @category form
  23124. * @modifier material
  23125. * [en]Displays a Material Design select input.[/en]
  23126. * [ja][/ja]
  23127. * @modifier underbar
  23128. * [en]Displays a horizontal line underneath a select input.[/en]
  23129. * [ja][/ja]
  23130. * @description
  23131. * [en]
  23132. * Select component. If you want to place a select with an ID of `my-id` on a page, use `<ons-select select-id="my-id">`.
  23133. *
  23134. * The component will automatically display as a Material Design select on Android.
  23135. *
  23136. * Most attributes that can be used for a normal `<select>` element can also be used on the `<ons-select>` element.
  23137. * [/en]
  23138. * [ja]セレクトボックスを表示するコンポーネントです。`select` 要素に使用できる属性の多くが `ons-select` 要素でも利用できます。[/ja]
  23139. * @codepen hLayx
  23140. * @tutorial vanilla/Reference/select
  23141. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  23142. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja]Information about cross platform styling[/ja]
  23143. * @example
  23144. * <ons-select>
  23145. * <option value="1">1</option>
  23146. * <option value="2">2nd</option>
  23147. * <option value="3">3rd option</option>
  23148. * </ons-select>
  23149. */
  23150. var SelectElement = function (_BaseElement) {
  23151. inherits(SelectElement, _BaseElement);
  23152. /**
  23153. * @attribute autofocus
  23154. * @type {Boolean}
  23155. * @default false
  23156. * @description
  23157. * [en]Element automatically gains focus on page load.[/en]
  23158. * [ja]ページロード時にこのセレクトボックスにフォーカスが移るようにします。[/ja]
  23159. */
  23160. /**
  23161. * @attribute disabled
  23162. * @type {Boolean}
  23163. * @default false
  23164. * @description
  23165. * [en]Specify if select input should be disabled.[/en]
  23166. * [ja]このセレクトボックスを無効化する場合に指定します。[/ja]
  23167. */
  23168. /**
  23169. * @attribute form
  23170. * @type {String}
  23171. * @description
  23172. * [en]Associate a select element to an existing form on the page, even if not nested.[/en]
  23173. * [ja]このセレクトボックスを、指定した `form` 要素に紐付けます。セレクトボックスを `form` 要素の外側に配置する際に使用します。[/ja]
  23174. */
  23175. /**
  23176. * @attribute multiple
  23177. * @type {Boolean}
  23178. * @default false
  23179. * @description
  23180. * [en]If this attribute is defined, multiple options can be selected at once.[/en]
  23181. * [ja]選択肢の複数選択を有効にします。[/ja]
  23182. */
  23183. /**
  23184. * @attribute name
  23185. * @type {String}
  23186. * @description
  23187. * [en]Name the select element, useful for instance if it is part of a form.[/en]
  23188. * [ja]このセレクトボックスの名前を指定します。通常 `form` 要素と共に使用します。[/ja]
  23189. */
  23190. /**
  23191. * @attribute required
  23192. * @type {Boolean}
  23193. * @description
  23194. * [en]Make the select input required for submitting the form it is part of.[/en]
  23195. * [ja]このセレクトボックスを入力必須にする場合に指定します。通常 `form` 要素と共に使用します。[/ja]
  23196. */
  23197. /**
  23198. * @attribute select-id
  23199. * @type {String}
  23200. * @description
  23201. * [en]ID given to the inner select, useful for dynamic manipulation.[/en]
  23202. * [ja]このセレクトボックスが内部に持つ select 要素に与える ID を指定します。セレクトボックスの内容を動的に変更する必要がある場合に使用します。[/ja]
  23203. */
  23204. /**
  23205. * @attribute size
  23206. * @type {Number}
  23207. * @default 1
  23208. * @description
  23209. * [en]How many options are displayed; if there are more than the size then a scroll appears to navigate them.[/en]
  23210. * [ja]一度に表示する選択肢の個数を指定します。選択肢がこの属性で指定した個数よりも多い場合、スクロールが有効になります。[/ja]
  23211. */
  23212. function SelectElement() {
  23213. classCallCheck(this, SelectElement);
  23214. var _this = possibleConstructorReturn(this, (SelectElement.__proto__ || Object.getPrototypeOf(SelectElement)).call(this));
  23215. contentReady(_this, function () {
  23216. return _this._compile();
  23217. });
  23218. _this._deriveGetters();
  23219. return _this;
  23220. }
  23221. createClass(SelectElement, [{
  23222. key: 'attributeChangedCallback',
  23223. value: function attributeChangedCallback(name, last, current) {
  23224. var _this2 = this;
  23225. switch (name) {
  23226. case 'class':
  23227. util$1.restoreClass(this, defaultClassName$13, scheme$25);
  23228. break;
  23229. case 'modifier':
  23230. ModifierUtil.onModifierChanged(last, current, this, scheme$25);
  23231. break;
  23232. }
  23233. if (INPUT_ATTRIBUTES$1.indexOf(name) >= 0) {
  23234. contentReady(this, function () {
  23235. return _this2._updateBoundAttributes();
  23236. });
  23237. }
  23238. }
  23239. }, {
  23240. key: '_updateBoundAttributes',
  23241. value: function _updateBoundAttributes() {
  23242. var _this3 = this;
  23243. INPUT_ATTRIBUTES$1.forEach(function (attr) {
  23244. if (_this3.hasAttribute(attr)) {
  23245. _this3._select.setAttribute(attr, _this3.getAttribute(attr));
  23246. } else {
  23247. _this3._select.removeAttribute(attr);
  23248. }
  23249. });
  23250. }
  23251. /**
  23252. * @property length
  23253. * @description
  23254. * [en]Number of options in the select box.[/en]
  23255. * [ja]このセレクトボックスに含まれる選択肢の個数を返します。 `select` 要素[/ja]
  23256. */
  23257. /**
  23258. * @property options
  23259. * @description
  23260. * [en]Several options for handling the select DOM object.[/en]
  23261. * [ja]このセレクトボックスに含まれる `option` 要素の配列を返します。[/ja]
  23262. */
  23263. /**
  23264. * @property selectedIndex
  23265. * @description
  23266. * [en]Index of the currently selected option.[/en]
  23267. * [ja]現在選択されている選択肢のインデックスを返します。[/ja]
  23268. */
  23269. /**
  23270. * @property value
  23271. * @description
  23272. * [en]Value of the currently selected option.[/en]
  23273. * [ja]現在選択されている選択肢の値を返します。[/ja]
  23274. */
  23275. }, {
  23276. key: '_compile',
  23277. value: function _compile() {
  23278. autoStyle.prepare(this);
  23279. this.classList.add(defaultClassName$13);
  23280. var sel = this._select || document.createElement('select');
  23281. if (!sel.id && this.hasAttribute('select-id')) {
  23282. sel.id = this.getAttribute('select-id');
  23283. }
  23284. sel.classList.add('select-input');
  23285. if (!this._select) {
  23286. util$1.arrayFrom(this.childNodes).forEach(function (element) {
  23287. return sel.appendChild(element);
  23288. });
  23289. this.appendChild(sel);
  23290. }
  23291. ModifierUtil.initModifier(this, scheme$25);
  23292. }
  23293. }, {
  23294. key: '_deriveGetters',
  23295. value: function _deriveGetters() {
  23296. var _this4 = this;
  23297. ['disabled', 'length', 'multiple', 'name', 'options', 'selectedIndex', 'size', 'value', 'form', 'type'].forEach(function (key) {
  23298. Object.defineProperty(_this4, key, {
  23299. configurable: true,
  23300. enumerable: true,
  23301. get: function get$$1() {
  23302. return _this4._select[key];
  23303. },
  23304. set: ['form', 'type'].indexOf(key) === -1 ? function (value) {
  23305. return contentReady(_this4, function () {
  23306. return _this4._select[key] = value;
  23307. });
  23308. } : undefined
  23309. });
  23310. });
  23311. }
  23312. }, {
  23313. key: 'add',
  23314. value: function add(option) {
  23315. var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  23316. this._select.add(option, index);
  23317. }
  23318. }, {
  23319. key: 'remove',
  23320. value: function remove(index) {
  23321. this._select.remove(index);
  23322. }
  23323. }, {
  23324. key: '_select',
  23325. get: function get$$1() {
  23326. return this.querySelector('select');
  23327. }
  23328. }], [{
  23329. key: 'observedAttributes',
  23330. get: function get$$1() {
  23331. return ['modifier', 'class'].concat(INPUT_ATTRIBUTES$1);
  23332. }
  23333. }]);
  23334. return SelectElement;
  23335. }(BaseElement);
  23336. onsElements.Select = SelectElement;
  23337. customElements.define('ons-select', SelectElement);
  23338. /*
  23339. Copyright 2013-2015 ASIAL CORPORATION
  23340. Licensed under the Apache License, Version 2.0 (the "License");
  23341. you may not use this file except in compliance with the License.
  23342. You may obtain a copy of the License at
  23343. http://www.apache.org/licenses/LICENSE-2.0
  23344. Unless required by applicable law or agreed to in writing, software
  23345. distributed under the License is distributed on an "AS IS" BASIS,
  23346. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23347. See the License for the specific language governing permissions and
  23348. limitations under the License.
  23349. */
  23350. var defaultClassName$14 = 'fab fab--mini speed-dial__item';
  23351. var scheme$26 = {
  23352. '': 'fab--* speed-dial__item--*'
  23353. };
  23354. /**
  23355. * @element ons-speed-dial-item
  23356. * @category control
  23357. * @description
  23358. * [en]
  23359. * This component displays the child elements of the Material Design Speed dial component.
  23360. * [/en]
  23361. * [ja]
  23362. * Material DesignのSpeed dialの子要素を表現する要素です。
  23363. * [/ja]
  23364. * @codepen dYQYLg
  23365. * @tutorial vanilla/Reference/speed-dial
  23366. * @seealso ons-speed-dial
  23367. * [en]The `<ons-speed-dial>` component.[/en]
  23368. * [ja]ons-speed-dialコンポーネント[/ja]
  23369. * @seealso ons-fab
  23370. * [en]ons-fab component[/en]
  23371. * [ja]ons-fabコンポーネント[/ja]
  23372. * @example
  23373. * <ons-speed-dial position="left bottom">
  23374. * <ons-fab>
  23375. * <ons-icon icon="fa-twitter"></ons-icon>
  23376. * </ons-fab>
  23377. * <ons-speed-dial-item>A</ons-speed-dial-item>
  23378. * <ons-speed-dial-item>B</ons-speed-dial-item>
  23379. * <ons-speed-dial-item>C</ons-speed-dial-item>
  23380. * </ons-speed-dial>
  23381. */
  23382. var SpeedDialItemElement = function (_BaseElement) {
  23383. inherits(SpeedDialItemElement, _BaseElement);
  23384. /**
  23385. * @attribute modifier
  23386. * @type {String}
  23387. * @description
  23388. * [en]The appearance of the component.[/en]
  23389. * [ja]このコンポーネントの表現を指定します。[/ja]
  23390. */
  23391. /**
  23392. * @attribute ripple
  23393. * @description
  23394. * [en]If this attribute is defined, the button will have a ripple effect when tapped.[/en]
  23395. * [ja][/ja]
  23396. */
  23397. function SpeedDialItemElement() {
  23398. classCallCheck(this, SpeedDialItemElement);
  23399. var _this = possibleConstructorReturn(this, (SpeedDialItemElement.__proto__ || Object.getPrototypeOf(SpeedDialItemElement)).call(this));
  23400. _this._compile();
  23401. _this._boundOnClick = _this._onClick.bind(_this);
  23402. return _this;
  23403. }
  23404. createClass(SpeedDialItemElement, [{
  23405. key: 'attributeChangedCallback',
  23406. value: function attributeChangedCallback(name, last, current) {
  23407. switch (name) {
  23408. case 'class':
  23409. util$1.restoreClass(this, defaultClassName$14, scheme$26);
  23410. break;
  23411. case 'modifier':
  23412. ModifierUtil.onModifierChanged(last, current, this, scheme$26);
  23413. util$1.addModifier(this, 'mini');
  23414. break;
  23415. case 'ripple':
  23416. this._updateRipple();
  23417. }
  23418. }
  23419. }, {
  23420. key: 'connectedCallback',
  23421. value: function connectedCallback() {
  23422. this.addEventListener('click', this._boundOnClick, false);
  23423. }
  23424. }, {
  23425. key: 'disconnectedCallback',
  23426. value: function disconnectedCallback() {
  23427. this.removeEventListener('click', this._boundOnClick, false);
  23428. }
  23429. }, {
  23430. key: '_updateRipple',
  23431. value: function _updateRipple() {
  23432. util$1.updateRipple(this);
  23433. }
  23434. }, {
  23435. key: '_onClick',
  23436. value: function _onClick(e) {
  23437. e.stopPropagation();
  23438. }
  23439. }, {
  23440. key: '_compile',
  23441. value: function _compile() {
  23442. var _this2 = this;
  23443. autoStyle.prepare(this);
  23444. defaultClassName$14.split(/\s+/).forEach(function (token) {
  23445. return _this2.classList.add(token);
  23446. });
  23447. util$1.addModifier(this, 'mini');
  23448. this._updateRipple();
  23449. ModifierUtil.initModifier(this, scheme$26);
  23450. }
  23451. }], [{
  23452. key: 'observedAttributes',
  23453. get: function get$$1() {
  23454. return ['modifier', 'ripple', 'class'];
  23455. }
  23456. }]);
  23457. return SpeedDialItemElement;
  23458. }(BaseElement);
  23459. onsElements.SpeedDialItem = SpeedDialItemElement;
  23460. customElements.define('ons-speed-dial-item', SpeedDialItemElement);
  23461. /*
  23462. Copyright 2013-2015 ASIAL CORPORATION
  23463. Licensed under the Apache License, Version 2.0 (the "License");
  23464. you may not use this file except in compliance with the License.
  23465. You may obtain a copy of the License at
  23466. http://www.apache.org/licenses/LICENSE-2.0
  23467. Unless required by applicable law or agreed to in writing, software
  23468. distributed under the License is distributed on an "AS IS" BASIS,
  23469. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23470. See the License for the specific language governing permissions and
  23471. limitations under the License.
  23472. */
  23473. var defaultClassName$15 = 'speed-dial';
  23474. var scheme$27 = {
  23475. '': 'speed-dial--*'
  23476. };
  23477. /**
  23478. * @element ons-speed-dial
  23479. * @category control
  23480. * @description
  23481. * [en]
  23482. * Element that displays a Material Design Speed Dialog component. It is useful when there are more than one primary action that can be performed in a page.
  23483. *
  23484. * The Speed dial looks like a `<ons-fab>` element but will expand a menu when tapped.
  23485. * [/en]
  23486. * [ja][/ja]
  23487. * @codepen dYQYLg
  23488. * @tutorial vanilla/Reference/speed-dial
  23489. * @seealso ons-speed-dial-item
  23490. * [en]The `<ons-speed-dial-item>` represents a menu item.[/en]
  23491. * [ja]ons-speed-dial-itemコンポーネント[/ja]
  23492. * @seealso ons-fab
  23493. * [en]ons-fab component[/en]
  23494. * [ja]ons-fabコンポーネント[/ja]
  23495. * @example
  23496. * <ons-speed-dial position="left bottom">
  23497. * <ons-fab>
  23498. * <ons-icon icon="fa-twitter"></ons-icon>
  23499. * </ons-fab>
  23500. * <ons-speed-dial-item>A</ons-speed-dial-item>
  23501. * <ons-speed-dial-item>B</ons-speed-dial-item>
  23502. * <ons-speed-dial-item>C</ons-speed-dial-item>
  23503. * </ons-speed-dial>
  23504. */
  23505. var SpeedDialElement = function (_BaseElement) {
  23506. inherits(SpeedDialElement, _BaseElement);
  23507. /**
  23508. * @event open
  23509. * @description
  23510. * [en]Fired when the menu items are shown.[/en]
  23511. * [ja][/ja]
  23512. */
  23513. /**
  23514. * @event close
  23515. * @description
  23516. * [en]Fired when the menu items are hidden.[/en]
  23517. * [ja][/ja]
  23518. */
  23519. /**
  23520. * @attribute modifier
  23521. * @type {String}
  23522. * @description
  23523. * [en]The appearance of the component.[/en]
  23524. * [ja]このコンポーネントの表現を指定します。[/ja]
  23525. */
  23526. /**
  23527. * @attribute ripple
  23528. * @description
  23529. * [en]If this attribute is defined, the button will have a ripple effect when tapped.[/en]
  23530. * [ja][/ja]
  23531. */
  23532. /**
  23533. * @attribute position
  23534. * @type {String}
  23535. * @description
  23536. * [en]
  23537. * Specify the vertical and horizontal position of the component.
  23538. * I.e. to display it in the top right corner specify "right top".
  23539. * Choose from "right", "left", "top" and "bottom".
  23540. * [/en]
  23541. * [ja]
  23542. * この要素を表示する左右と上下の位置を指定します。
  23543. * 例えば、右上に表示する場合には"right top"を指定します。
  23544. * 左右と上下の位置の指定には、rightとleft、topとbottomがそれぞれ指定できます。
  23545. * [/ja]
  23546. */
  23547. /**
  23548. * @attribute direction
  23549. * @type {String}
  23550. * @description
  23551. * [en]Specify the direction the items are displayed. Possible values are "up", "down", "left" and "right".[/en]
  23552. * [ja]
  23553. * 要素が表示する方向を指定します。up, down, left, rightが指定できます。
  23554. * [/ja]
  23555. */
  23556. /**
  23557. * @attribute disabled
  23558. * @description
  23559. * [en]Specify if button should be disabled.[/en]
  23560. * [ja]無効化する場合に指定します。[/ja]
  23561. */
  23562. function SpeedDialElement() {
  23563. classCallCheck(this, SpeedDialElement);
  23564. var _this = possibleConstructorReturn(this, (SpeedDialElement.__proto__ || Object.getPrototypeOf(SpeedDialElement)).call(this));
  23565. contentReady(_this, function () {
  23566. _this._compile();
  23567. });
  23568. _this._itemShown = false;
  23569. _this._boundOnClick = _this._onClick.bind(_this);
  23570. return _this;
  23571. }
  23572. createClass(SpeedDialElement, [{
  23573. key: '_compile',
  23574. value: function _compile() {
  23575. this.classList.add(defaultClassName$15);
  23576. autoStyle.prepare(this);
  23577. this._updateRipple();
  23578. ModifierUtil.initModifier(this, scheme$27);
  23579. if (this.hasAttribute('direction')) {
  23580. this._updateDirection(this.getAttribute('direction'));
  23581. } else {
  23582. this._updateDirection('up');
  23583. }
  23584. this._updatePosition();
  23585. }
  23586. }, {
  23587. key: 'attributeChangedCallback',
  23588. value: function attributeChangedCallback(name, last, current) {
  23589. var _this2 = this;
  23590. switch (name) {
  23591. case 'class':
  23592. util$1.restoreClass(this, defaultClassName$15, scheme$27);
  23593. break;
  23594. case 'modifier':
  23595. ModifierUtil.onModifierChanged(last, current, this, scheme$27);
  23596. break;
  23597. case 'ripple':
  23598. contentReady(this, function () {
  23599. return _this2._updateRipple();
  23600. });
  23601. break;
  23602. case 'direction':
  23603. contentReady(this, function () {
  23604. return _this2._updateDirection(current);
  23605. });
  23606. break;
  23607. case 'position':
  23608. contentReady(this, function () {
  23609. return _this2._updatePosition();
  23610. });
  23611. break;
  23612. }
  23613. }
  23614. }, {
  23615. key: 'connectedCallback',
  23616. value: function connectedCallback() {
  23617. this.addEventListener('click', this._boundOnClick, false);
  23618. }
  23619. }, {
  23620. key: 'disconnectedCallback',
  23621. value: function disconnectedCallback() {
  23622. this.removeEventListener('click', this._boundOnClick, false);
  23623. }
  23624. }, {
  23625. key: '_onClick',
  23626. value: function _onClick(e) {
  23627. if (this.onClick) {
  23628. this.onClick.apply(this);
  23629. return Promise.resolve();
  23630. } else if (!this.disabled && this.visible) {
  23631. return this.toggleItems();
  23632. }
  23633. }
  23634. }, {
  23635. key: '_show',
  23636. value: function _show() {
  23637. if (!this.inline) {
  23638. return this.show();
  23639. }
  23640. return Promise.resolve();
  23641. }
  23642. }, {
  23643. key: '_hide',
  23644. value: function _hide() {
  23645. var _this3 = this;
  23646. return new Promise(function (resolve) {
  23647. if (!_this3.inline) {
  23648. setImmediate(function () {
  23649. return _this3.hide().then(resolve);
  23650. });
  23651. } else {
  23652. resolve();
  23653. }
  23654. });
  23655. }
  23656. }, {
  23657. key: '_updateRipple',
  23658. value: function _updateRipple() {
  23659. if (this._fab) {
  23660. this.hasAttribute('ripple') ? this._fab.setAttribute('ripple', '') : this._fab.removeAttribute('ripple');
  23661. }
  23662. }
  23663. }, {
  23664. key: '_updateDirection',
  23665. value: function _updateDirection(direction) {
  23666. var children = this.items;
  23667. for (var i = 0; i < children.length; i++) {
  23668. styler(children[i], {
  23669. transitionDelay: 25 * i + 'ms',
  23670. bottom: 'auto',
  23671. right: 'auto',
  23672. top: 'auto',
  23673. left: 'auto'
  23674. });
  23675. }
  23676. switch (direction) {
  23677. case 'up':
  23678. for (var _i = 0; _i < children.length; _i++) {
  23679. children[_i].style.bottom = 72 + 56 * _i + 'px';
  23680. children[_i].style.right = '8px';
  23681. }
  23682. break;
  23683. case 'down':
  23684. for (var _i2 = 0; _i2 < children.length; _i2++) {
  23685. children[_i2].style.top = 72 + 56 * _i2 + 'px';
  23686. children[_i2].style.left = '8px';
  23687. }
  23688. break;
  23689. case 'left':
  23690. for (var _i3 = 0; _i3 < children.length; _i3++) {
  23691. children[_i3].style.top = '8px';
  23692. children[_i3].style.right = 72 + 56 * _i3 + 'px';
  23693. }
  23694. break;
  23695. case 'right':
  23696. for (var _i4 = 0; _i4 < children.length; _i4++) {
  23697. children[_i4].style.top = '8px';
  23698. children[_i4].style.left = 72 + 56 * _i4 + 'px';
  23699. }
  23700. break;
  23701. default:
  23702. util$1.throw('Argument must be one of up, down, left or right.');
  23703. }
  23704. }
  23705. }, {
  23706. key: '_updatePosition',
  23707. value: function _updatePosition() {
  23708. var position = this.getAttribute('position');
  23709. this.classList.remove('fab--top__left', 'fab--bottom__right', 'fab--bottom__left', 'fab--top__right', 'fab--top__center', 'fab--bottom__center');
  23710. switch (position) {
  23711. case 'top right':
  23712. case 'right top':
  23713. this.classList.add('fab--top__right');
  23714. break;
  23715. case 'top left':
  23716. case 'left top':
  23717. this.classList.add('fab--top__left');
  23718. break;
  23719. case 'bottom right':
  23720. case 'right bottom':
  23721. this.classList.add('fab--bottom__right');
  23722. break;
  23723. case 'bottom left':
  23724. case 'left bottom':
  23725. this.classList.add('fab--bottom__left');
  23726. break;
  23727. case 'center top':
  23728. case 'top center':
  23729. this.classList.add('fab--top__center');
  23730. break;
  23731. case 'center bottom':
  23732. case 'bottom center':
  23733. this.classList.add('fab--bottom__center');
  23734. break;
  23735. default:
  23736. break;
  23737. }
  23738. }
  23739. }, {
  23740. key: '_getTranslate',
  23741. value: function _getTranslate() {
  23742. var isBottom = (this.getAttribute('position') || '').indexOf('bottom') >= 0;
  23743. var translate = isBottom ? 'translate3d(0px, -' + (util$1.globals.fabOffset || 0) + 'px, 0px) ' : '';
  23744. return translate;
  23745. }
  23746. /**
  23747. * @method show
  23748. * @signature show()
  23749. * @description
  23750. * [en]Show the speed dial.[/en]
  23751. * [ja]Speed dialを表示します。[/ja]
  23752. */
  23753. }, {
  23754. key: 'show',
  23755. value: function show() {
  23756. this._fab.show();
  23757. styler(this, { transform: this._getTranslate });
  23758. return Promise.resolve();
  23759. }
  23760. /**
  23761. * @method hide
  23762. * @signature hide()
  23763. * @description
  23764. * [en]Hide the speed dial.[/en]
  23765. * [ja]Speed dialを非表示にします。[/ja]
  23766. */
  23767. }, {
  23768. key: 'hide',
  23769. value: function hide() {
  23770. var _this4 = this;
  23771. return this.hideItems().then(function () {
  23772. return _this4._fab.hide();
  23773. });
  23774. }
  23775. /**
  23776. * @method showItems
  23777. * @signature showItems()
  23778. * @description
  23779. * [en]Show the speed dial items.[/en]
  23780. * [ja]Speed dialの子要素を表示します。[/ja]
  23781. */
  23782. }, {
  23783. key: 'showItems',
  23784. value: function showItems() {
  23785. if (this.hasAttribute('direction')) {
  23786. this._updateDirection(this.getAttribute('direction'));
  23787. } else {
  23788. this._updateDirection('up');
  23789. }
  23790. var totalDelay = 0;
  23791. if (!this._itemShown) {
  23792. var children = this.items;
  23793. for (var i = 0; i < children.length; i++) {
  23794. var delay = 25 * i;
  23795. totalDelay += delay;
  23796. styler(children[i], {
  23797. transform: 'scale(1)',
  23798. transitionDelay: delay + 'ms'
  23799. });
  23800. }
  23801. totalDelay += 50;
  23802. this._itemShown = true;
  23803. util$1.triggerElementEvent(this, 'open');
  23804. }
  23805. var deferred = util$1.defer();
  23806. setTimeout(deferred.resolve, totalDelay);
  23807. return deferred.promise;
  23808. }
  23809. /**
  23810. * @method hideItems
  23811. * @signature hideItems()
  23812. * @description
  23813. * [en]Hide the speed dial items.[/en]
  23814. * [ja]Speed dialの子要素を非表示にします。[/ja]
  23815. */
  23816. }, {
  23817. key: 'hideItems',
  23818. value: function hideItems() {
  23819. var totalDelay = 0;
  23820. if (this._itemShown) {
  23821. var children = this.items;
  23822. for (var i = 0; i < children.length; i++) {
  23823. var delay = 25 * (children.length - i);
  23824. totalDelay += delay;
  23825. styler(children[i], {
  23826. transform: 'scale(0)',
  23827. transitionDelay: delay + 'ms'
  23828. });
  23829. }
  23830. totalDelay += 50;
  23831. this._itemShown = false;
  23832. util$1.triggerElementEvent(this, 'close');
  23833. }
  23834. var deferred = util$1.defer();
  23835. setTimeout(deferred.resolve, totalDelay);
  23836. return deferred.promise;
  23837. }
  23838. /**
  23839. * @property disabled
  23840. * @type {Boolean}
  23841. * @description
  23842. * [en]Whether the element is disabled or not.[/en]
  23843. * [ja]無効化されている場合に`true`。[/ja]
  23844. */
  23845. }, {
  23846. key: 'isOpen',
  23847. /**
  23848. * @method isOpen
  23849. * @signature isOpen()
  23850. * @description
  23851. * [en]Returns whether the menu is open or not.[/en]
  23852. * [ja][/ja]
  23853. */
  23854. value: function isOpen() {
  23855. return this._itemShown;
  23856. }
  23857. /**
  23858. * @method toggle
  23859. * @signature toggle()
  23860. * @description
  23861. * [en]Toggle visibility.[/en]
  23862. * [ja]Speed dialの表示非表示を切り替えます。[/ja]
  23863. */
  23864. }, {
  23865. key: 'toggle',
  23866. value: function toggle() {
  23867. return this.visible ? this.hide() : this.show();
  23868. }
  23869. /**
  23870. * @method toggleItems
  23871. * @signature toggleItems()
  23872. * @description
  23873. * [en]Toggle item visibility.[/en]
  23874. * [ja]Speed dialの子要素の表示非表示を切り替えます。[/ja]
  23875. */
  23876. }, {
  23877. key: 'toggleItems',
  23878. value: function toggleItems() {
  23879. return this.isOpen() ? this.hideItems() : this.showItems();
  23880. }
  23881. }, {
  23882. key: 'items',
  23883. get: function get$$1() {
  23884. return util$1.arrayFrom(this.querySelectorAll('ons-speed-dial-item'));
  23885. }
  23886. }, {
  23887. key: '_fab',
  23888. get: function get$$1() {
  23889. return util$1.findChild(this, 'ons-fab');
  23890. }
  23891. }, {
  23892. key: 'disabled',
  23893. set: function set$$1(value) {
  23894. if (value) {
  23895. this.hideItems();
  23896. }
  23897. util$1.arrayFrom(this.children).forEach(function (e) {
  23898. util$1.match(e, '.fab') && util$1.toggleAttribute(e, 'disabled', value);
  23899. });
  23900. return util$1.toggleAttribute(this, 'disabled', value);
  23901. },
  23902. get: function get$$1() {
  23903. return this.hasAttribute('disabled');
  23904. }
  23905. /**
  23906. * @property inline
  23907. * @readonly
  23908. * @type {Boolean}
  23909. * @description
  23910. * [en]Whether the element is inline or not.[/en]
  23911. * [ja]インライン要素の場合に`true`。[/ja]
  23912. */
  23913. }, {
  23914. key: 'inline',
  23915. get: function get$$1() {
  23916. return this.hasAttribute('inline');
  23917. }
  23918. /**
  23919. * @property visible
  23920. * @readonly
  23921. * @type {Boolean}
  23922. * @description
  23923. * [en]Whether the element is visible or not.[/en]
  23924. * [ja]要素が見える場合に`true`。[/ja]
  23925. */
  23926. }, {
  23927. key: 'visible',
  23928. get: function get$$1() {
  23929. return this._fab.visible && this.style.display !== 'none';
  23930. }
  23931. }], [{
  23932. key: 'observedAttributes',
  23933. get: function get$$1() {
  23934. return ['class', 'modifier', 'ripple', 'direction', 'position'];
  23935. }
  23936. }, {
  23937. key: 'events',
  23938. get: function get$$1() {
  23939. return ['open', 'close'];
  23940. }
  23941. }]);
  23942. return SpeedDialElement;
  23943. }(BaseElement);
  23944. onsElements.SpeedDial = SpeedDialElement;
  23945. customElements.define('ons-speed-dial', SpeedDialElement);
  23946. /*
  23947. Copyright 2013-2015 ASIAL CORPORATION
  23948. Licensed under the Apache License, Version 2.0 (the "License");
  23949. you may not use this file except in compliance with the License.
  23950. You may obtain a copy of the License at
  23951. http://www.apache.org/licenses/LICENSE-2.0
  23952. Unless required by applicable law or agreed to in writing, software
  23953. distributed under the License is distributed on an "AS IS" BASIS,
  23954. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23955. See the License for the specific language governing permissions and
  23956. limitations under the License.
  23957. */
  23958. var rewritables$1 = {
  23959. /**
  23960. * @param {Element} element
  23961. * @param {Function} callback
  23962. */
  23963. ready: function ready(element, callback) {
  23964. setImmediate(callback);
  23965. }
  23966. };
  23967. /**
  23968. * @element ons-splitter-content
  23969. * @category menu
  23970. * @description
  23971. * [en]
  23972. * The `<ons-splitter-content>` element is used as a child element of `<ons-splitter>`.
  23973. *
  23974. * It contains the main content of the page while `<ons-splitter-side>` contains the list.
  23975. * [/en]
  23976. * [ja]ons-splitter-content要素は、ons-splitter要素の子要素として利用します。[/ja]
  23977. * @codepen rOQOML
  23978. * @tutorial vanilla/Reference/splitter
  23979. * @guide fundamentals.html#managing-pages
  23980. * [en]Managing multiple pages.[/en]
  23981. * [ja]複数のページを管理する[/ja]
  23982. * @seealso ons-splitter
  23983. * [en]The `<ons-splitter>` component is the parent element.[/en]
  23984. * [ja]ons-splitterコンポーネント[/ja]
  23985. * @seealso ons-splitter-side
  23986. * [en]The `<ons-splitter-side>` component contains the menu.[/en]
  23987. * [ja]ons-splitter-sideコンポーネント[/ja]
  23988. * @example
  23989. * <ons-splitter>
  23990. * <ons-splitter-content>
  23991. * ...
  23992. * </ons-splitter-content>
  23993. *
  23994. * <ons-splitter-side side="left" width="80%" collapse>
  23995. * ...
  23996. * </ons-splitter-side>
  23997. * </ons-splitter>
  23998. */
  23999. var SplitterContentElement = function (_BaseElement) {
  24000. inherits(SplitterContentElement, _BaseElement);
  24001. /**
  24002. * @attribute page
  24003. * @type {String}
  24004. * @description
  24005. * [en]
  24006. * The url of the content page. If this attribute is used the content will be loaded from a `<template>` tag or a remote file.
  24007. *
  24008. * It is also possible to put `<ons-page>` element as a child of the element.
  24009. * [/en]
  24010. * [ja]ons-splitter-content要素に表示するページのURLを指定します。[/ja]
  24011. */
  24012. function SplitterContentElement() {
  24013. classCallCheck(this, SplitterContentElement);
  24014. var _this = possibleConstructorReturn(this, (SplitterContentElement.__proto__ || Object.getPrototypeOf(SplitterContentElement)).call(this));
  24015. _this._page = null;
  24016. _this._pageLoader = defaultPageLoader;
  24017. contentReady(_this, function () {
  24018. rewritables$1.ready(_this, function () {
  24019. var page = _this._getPageTarget();
  24020. if (page) {
  24021. _this.load(page);
  24022. }
  24023. });
  24024. });
  24025. return _this;
  24026. }
  24027. createClass(SplitterContentElement, [{
  24028. key: 'connectedCallback',
  24029. value: function connectedCallback() {
  24030. if (!util$1.match(this.parentNode, 'ons-splitter')) {
  24031. util$1.throw('"ons-splitter-content" must have "ons-splitter" as parent');
  24032. }
  24033. }
  24034. }, {
  24035. key: '_getPageTarget',
  24036. value: function _getPageTarget() {
  24037. return this._page || this.getAttribute('page');
  24038. }
  24039. }, {
  24040. key: 'disconnectedCallback',
  24041. value: function disconnectedCallback() {}
  24042. }, {
  24043. key: 'attributeChangedCallback',
  24044. value: function attributeChangedCallback(name, last, current) {}
  24045. /**
  24046. * @property page
  24047. * @type {HTMLElement}
  24048. * @description
  24049. * [en]The page to load in the splitter content.[/en]
  24050. * [ja]この要素内に表示するページを指定します。[/ja]
  24051. */
  24052. }, {
  24053. key: 'load',
  24054. /**
  24055. * @method load
  24056. * @signature load(page, [options])
  24057. * @param {String} page, [options]
  24058. * [en]Page URL. Can be either an HTML document or an `<template>` id.[/en]
  24059. * [ja]pageのURLか、`<template>`で宣言したテンプレートのid属性の値を指定します。[/ja]
  24060. * @param {Object} [options]
  24061. * @param {Function} [options.callback]
  24062. * @description
  24063. * [en]Show the page specified in `page` in the content.[/en]
  24064. * [ja]指定したURLをメインページを読み込みます。[/ja]
  24065. * @return {Promise}
  24066. * [en]Resolves to the new `<ons-page>` element[/en]
  24067. * [ja]`<ons-page>`要素を解決するPromiseオブジェクトを返します。[/ja]
  24068. */
  24069. value: function load(page) {
  24070. var _this2 = this;
  24071. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  24072. this._page = page;
  24073. var callback = options.callback || function () {};
  24074. return new Promise(function (resolve) {
  24075. var oldContent = _this2._content || null;
  24076. _this2._pageLoader.load({ page: page, parent: _this2 }, function (pageElement) {
  24077. if (oldContent) {
  24078. _this2._pageLoader.unload(oldContent);
  24079. oldContent = null;
  24080. }
  24081. setImmediate(function () {
  24082. return _this2._show();
  24083. });
  24084. callback(pageElement);
  24085. resolve(pageElement);
  24086. });
  24087. });
  24088. }
  24089. }, {
  24090. key: '_show',
  24091. value: function _show() {
  24092. if (this._content) {
  24093. this._content._show();
  24094. }
  24095. }
  24096. }, {
  24097. key: '_hide',
  24098. value: function _hide() {
  24099. if (this._content) {
  24100. this._content._hide();
  24101. }
  24102. }
  24103. }, {
  24104. key: '_destroy',
  24105. value: function _destroy() {
  24106. if (this._content) {
  24107. this._pageLoader.unload(this._content);
  24108. }
  24109. this.remove();
  24110. }
  24111. }, {
  24112. key: 'page',
  24113. get: function get$$1() {
  24114. return this._page;
  24115. }
  24116. /**
  24117. * @param {*} page
  24118. */
  24119. ,
  24120. set: function set$$1(page) {
  24121. this._page = page;
  24122. }
  24123. }, {
  24124. key: '_content',
  24125. get: function get$$1() {
  24126. return this.children[0];
  24127. }
  24128. /**
  24129. * @property pageLoader
  24130. * @type {Function}
  24131. * @description
  24132. * [en]Page element loaded in the splitter content.[/en]
  24133. * [ja]この要素内に表示するページを指定します。[/ja]
  24134. */
  24135. }, {
  24136. key: 'pageLoader',
  24137. get: function get$$1() {
  24138. return this._pageLoader;
  24139. },
  24140. set: function set$$1(loader) {
  24141. if (!(loader instanceof PageLoader)) {
  24142. util$1.throwPageLoader();
  24143. }
  24144. this._pageLoader = loader;
  24145. }
  24146. }], [{
  24147. key: 'observedAttributes',
  24148. get: function get$$1() {
  24149. return [];
  24150. }
  24151. }, {
  24152. key: 'rewritables',
  24153. get: function get$$1() {
  24154. return rewritables$1;
  24155. }
  24156. }]);
  24157. return SplitterContentElement;
  24158. }(BaseElement);
  24159. onsElements.SplitterContent = SplitterContentElement;
  24160. customElements.define('ons-splitter-content', SplitterContentElement);
  24161. /*
  24162. Copyright 2013-2015 ASIAL CORPORATION
  24163. Licensed under the Apache License, Version 2.0 (the "License");
  24164. you may not use this file except in compliance with the License.
  24165. You may obtain a copy of the License at
  24166. http://www.apache.org/licenses/LICENSE-2.0
  24167. Unless required by applicable law or agreed to in writing, software
  24168. distributed under the License is distributed on an "AS IS" BASIS,
  24169. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24170. See the License for the specific language governing permissions and
  24171. limitations under the License.
  24172. */
  24173. var SplitterMaskElement = function (_BaseElement) {
  24174. inherits(SplitterMaskElement, _BaseElement);
  24175. function SplitterMaskElement() {
  24176. classCallCheck(this, SplitterMaskElement);
  24177. var _this = possibleConstructorReturn(this, (SplitterMaskElement.__proto__ || Object.getPrototypeOf(SplitterMaskElement)).call(this));
  24178. _this._boundOnClick = _this._onClick.bind(_this);
  24179. contentReady(_this, function () {
  24180. if (_this.parentNode._sides.every(function (side) {
  24181. return side.mode === 'split';
  24182. })) {
  24183. _this.setAttribute('style', 'display: none !important');
  24184. }
  24185. });
  24186. return _this;
  24187. }
  24188. createClass(SplitterMaskElement, [{
  24189. key: '_onClick',
  24190. value: function _onClick(event) {
  24191. if (this.onClick instanceof Function) {
  24192. this.onClick();
  24193. } else if (util$1.match(this.parentNode, 'ons-splitter')) {
  24194. this.parentNode._sides.forEach(function (side) {
  24195. return side.close('left').catch(function () {});
  24196. });
  24197. }
  24198. event.stopPropagation();
  24199. }
  24200. }, {
  24201. key: 'attributeChangedCallback',
  24202. value: function attributeChangedCallback(name, last, current) {}
  24203. }, {
  24204. key: 'connectedCallback',
  24205. value: function connectedCallback() {
  24206. this.addEventListener('click', this._boundOnClick);
  24207. util$1.iosMaskScrollFix(this, true);
  24208. }
  24209. }, {
  24210. key: 'disconnectedCallback',
  24211. value: function disconnectedCallback() {
  24212. this.removeEventListener('click', this._boundOnClick);
  24213. util$1.iosMaskScrollFix(this, false);
  24214. }
  24215. }], [{
  24216. key: 'observedAttributes',
  24217. get: function get$$1() {
  24218. return [];
  24219. }
  24220. }]);
  24221. return SplitterMaskElement;
  24222. }(BaseElement);
  24223. onsElements.SplitterMask = SplitterMaskElement;
  24224. customElements.define('ons-splitter-mask', SplitterMaskElement);
  24225. /*
  24226. Copyright 2013-2015 ASIAL CORPORATION
  24227. Licensed under the Apache License, Version 2.0 (the "License");
  24228. you may not use this file except in compliance with the License.
  24229. You may obtain a copy of the License at
  24230. http://www.apache.org/licenses/LICENSE-2.0
  24231. Unless required by applicable law or agreed to in writing, software
  24232. distributed under the License is distributed on an "AS IS" BASIS,
  24233. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24234. See the License for the specific language governing permissions and
  24235. limitations under the License.
  24236. */
  24237. var SplitterAnimator$1 = function (_BaseAnimator) {
  24238. inherits(SplitterAnimator, _BaseAnimator);
  24239. function SplitterAnimator() {
  24240. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  24241. _ref$timing = _ref.timing,
  24242. timing = _ref$timing === undefined ? 'cubic-bezier(.1, .7, .1, 1)' : _ref$timing,
  24243. _ref$duration = _ref.duration,
  24244. duration = _ref$duration === undefined ? 0.3 : _ref$duration,
  24245. _ref$delay = _ref.delay,
  24246. delay = _ref$delay === undefined ? 0 : _ref$delay;
  24247. classCallCheck(this, SplitterAnimator);
  24248. return possibleConstructorReturn(this, (SplitterAnimator.__proto__ || Object.getPrototypeOf(SplitterAnimator)).call(this, { timing: timing, duration: duration, delay: delay }));
  24249. }
  24250. createClass(SplitterAnimator, [{
  24251. key: 'updateOptions',
  24252. value: function updateOptions() {
  24253. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  24254. util$1.extend(this, {
  24255. timing: this.timing, duration: this.duration, delay: this.delay
  24256. }, options);
  24257. }
  24258. /**
  24259. * @param {Element} sideElement
  24260. */
  24261. }, {
  24262. key: 'activate',
  24263. value: function activate(sideElement) {
  24264. var _this2 = this;
  24265. var splitter = sideElement.parentNode;
  24266. contentReady(splitter, function () {
  24267. _this2._side = sideElement;
  24268. _this2._oppositeSide = splitter.right !== sideElement && splitter.right || splitter.left !== sideElement && splitter.left;
  24269. _this2._content = splitter.content;
  24270. _this2._mask = splitter.mask;
  24271. });
  24272. }
  24273. }, {
  24274. key: 'deactivate',
  24275. value: function deactivate() {
  24276. this.clearTransition();
  24277. this._mask && this.clearMask();
  24278. this._content = this._side = this._oppositeSide = this._mask = null;
  24279. }
  24280. }, {
  24281. key: 'clearTransition',
  24282. value: function clearTransition() {
  24283. var _this3 = this;
  24284. 'side mask content'.split(/\s+/).forEach(function (e) {
  24285. return _this3['_' + e] && styler.clear(_this3['_' + e], 'transform transition');
  24286. });
  24287. }
  24288. }, {
  24289. key: 'clearMask',
  24290. value: function clearMask() {
  24291. // Check if the other side needs the mask before clearing
  24292. if (!this._oppositeSide || this._oppositeSide.mode === 'split' || !this._oppositeSide.isOpen) {
  24293. this._mask.style.opacity = '';
  24294. this._mask.style.display = 'none';
  24295. }
  24296. }
  24297. /**
  24298. * @param {Number} distance
  24299. */
  24300. }, {
  24301. key: 'translate',
  24302. value: function translate(distance) {}
  24303. /**
  24304. * @param {Function} done
  24305. */
  24306. }, {
  24307. key: 'open',
  24308. value: function open(done) {
  24309. done();
  24310. }
  24311. /**
  24312. * @param {Function} done
  24313. */
  24314. }, {
  24315. key: 'close',
  24316. value: function close(done) {
  24317. done();
  24318. }
  24319. }, {
  24320. key: 'minus',
  24321. get: function get$$1() {
  24322. return this._side.side === 'right' ? '-' : '';
  24323. }
  24324. }]);
  24325. return SplitterAnimator;
  24326. }(BaseAnimator);
  24327. /*
  24328. Copyright 2013-2015 ASIAL CORPORATION
  24329. Licensed under the Apache License, Version 2.0 (the "License");
  24330. you may not use this file except in compliance with the License.
  24331. You may obtain a copy of the License at
  24332. http://www.apache.org/licenses/LICENSE-2.0
  24333. Unless required by applicable law or agreed to in writing, software
  24334. distributed under the License is distributed on an "AS IS" BASIS,
  24335. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24336. See the License for the specific language governing permissions and
  24337. limitations under the License.
  24338. */
  24339. var OverlaySplitterAnimator = function (_SplitterAnimator) {
  24340. inherits(OverlaySplitterAnimator, _SplitterAnimator);
  24341. function OverlaySplitterAnimator() {
  24342. classCallCheck(this, OverlaySplitterAnimator);
  24343. return possibleConstructorReturn(this, (OverlaySplitterAnimator.__proto__ || Object.getPrototypeOf(OverlaySplitterAnimator)).apply(this, arguments));
  24344. }
  24345. createClass(OverlaySplitterAnimator, [{
  24346. key: 'translate',
  24347. value: function translate(distance) {
  24348. this._mask.style.display = 'block'; // Avoid content clicks
  24349. Animit(this._side).queue({
  24350. transform: 'translate3d(' + (this.minus + distance) + 'px, 0, 0)'
  24351. }).play();
  24352. }
  24353. /**
  24354. * @param {Function} done
  24355. */
  24356. }, {
  24357. key: 'open',
  24358. value: function open(done) {
  24359. Animit.runAll(Animit(this._side).wait(this.delay).queue({
  24360. transform: 'translate3d(' + this.minus + '100%, 0, 0)'
  24361. }, this.def).queue(function (callback) {
  24362. callback();
  24363. done && done();
  24364. }), Animit(this._mask).wait(this.delay).queue({
  24365. display: 'block'
  24366. }).queue({
  24367. opacity: '1'
  24368. }, {
  24369. duration: this.duration,
  24370. timing: 'linear'
  24371. }));
  24372. }
  24373. /**
  24374. * @param {Function} done
  24375. */
  24376. }, {
  24377. key: 'close',
  24378. value: function close(done) {
  24379. Animit.runAll(Animit(this._side).wait(this.delay).queue({
  24380. transform: 'translate3d(0, 0, 0)'
  24381. }, this.def).queue(function (callback) {
  24382. done && done();
  24383. callback();
  24384. }), Animit(this._mask).wait(this.delay).queue({
  24385. opacity: '0'
  24386. }, {
  24387. duration: this.duration,
  24388. timing: 'linear'
  24389. }).queue({
  24390. display: 'none'
  24391. }));
  24392. }
  24393. }]);
  24394. return OverlaySplitterAnimator;
  24395. }(SplitterAnimator$1);
  24396. /*
  24397. Copyright 2013-2015 ASIAL CORPORATION
  24398. Licensed under the Apache License, Version 2.0 (the "License");
  24399. you may not use this file except in compliance with the License.
  24400. You may obtain a copy of the License at
  24401. http://www.apache.org/licenses/LICENSE-2.0
  24402. Unless required by applicable law or agreed to in writing, software
  24403. distributed under the License is distributed on an "AS IS" BASIS,
  24404. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24405. See the License for the specific language governing permissions and
  24406. limitations under the License.
  24407. */
  24408. var PushSplitterAnimator = function (_SplitterAnimator) {
  24409. inherits(PushSplitterAnimator, _SplitterAnimator);
  24410. function PushSplitterAnimator() {
  24411. classCallCheck(this, PushSplitterAnimator);
  24412. return possibleConstructorReturn(this, (PushSplitterAnimator.__proto__ || Object.getPrototypeOf(PushSplitterAnimator)).apply(this, arguments));
  24413. }
  24414. createClass(PushSplitterAnimator, [{
  24415. key: '_getSlidingElements',
  24416. value: function _getSlidingElements() {
  24417. var slidingElements = [this._side, this._content];
  24418. if (this._oppositeSide && this._oppositeSide.mode === 'split') {
  24419. slidingElements.push(this._oppositeSide);
  24420. }
  24421. return slidingElements;
  24422. }
  24423. }, {
  24424. key: 'translate',
  24425. value: function translate(distance) {
  24426. if (!this._slidingElements) {
  24427. this._slidingElements = this._getSlidingElements();
  24428. }
  24429. this._mask.style.display = 'block'; // Avoid content clicks
  24430. Animit(this._slidingElements).queue({
  24431. transform: 'translate3d(' + (this.minus + distance) + 'px, 0, 0)'
  24432. }).play();
  24433. }
  24434. /**
  24435. * @param {Function} done
  24436. */
  24437. }, {
  24438. key: 'open',
  24439. value: function open(done) {
  24440. var _this2 = this;
  24441. var max = this._side.offsetWidth;
  24442. this._slidingElements = this._getSlidingElements();
  24443. Animit.runAll(Animit(this._slidingElements).wait(this.delay).queue({
  24444. transform: 'translate3d(' + (this.minus + max) + 'px, 0, 0)'
  24445. }, this.def).queue(function (callback) {
  24446. _this2._slidingElements = null;
  24447. callback();
  24448. done && done();
  24449. }), Animit(this._mask).wait(this.delay).queue({
  24450. display: 'block'
  24451. }));
  24452. }
  24453. /**
  24454. * @param {Function} done
  24455. */
  24456. }, {
  24457. key: 'close',
  24458. value: function close(done) {
  24459. var _this3 = this;
  24460. this._slidingElements = this._getSlidingElements();
  24461. Animit.runAll(Animit(this._slidingElements).wait(this.delay).queue({
  24462. transform: 'translate3d(0, 0, 0)'
  24463. }, this.def).queue(function (callback) {
  24464. _this3._slidingElements = null;
  24465. get(PushSplitterAnimator.prototype.__proto__ || Object.getPrototypeOf(PushSplitterAnimator.prototype), 'clearTransition', _this3).call(_this3);
  24466. done && done();
  24467. callback();
  24468. }), Animit(this._mask).wait(this.delay).queue({
  24469. display: 'none'
  24470. }));
  24471. }
  24472. }]);
  24473. return PushSplitterAnimator;
  24474. }(SplitterAnimator$1);
  24475. /*
  24476. Copyright 2013-2015 ASIAL CORPORATION
  24477. Licensed under the Apache License, Version 2.0 (the "License");
  24478. you may not use this file except in compliance with the License.
  24479. You may obtain a copy of the License at
  24480. http://www.apache.org/licenses/LICENSE-2.0
  24481. Unless required by applicable law or agreed to in writing, software
  24482. distributed under the License is distributed on an "AS IS" BASIS,
  24483. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24484. See the License for the specific language governing permissions and
  24485. limitations under the License.
  24486. */
  24487. var RevealSplitterAnimator = function (_SplitterAnimator) {
  24488. inherits(RevealSplitterAnimator, _SplitterAnimator);
  24489. function RevealSplitterAnimator() {
  24490. classCallCheck(this, RevealSplitterAnimator);
  24491. return possibleConstructorReturn(this, (RevealSplitterAnimator.__proto__ || Object.getPrototypeOf(RevealSplitterAnimator)).apply(this, arguments));
  24492. }
  24493. createClass(RevealSplitterAnimator, [{
  24494. key: '_getSlidingElements',
  24495. value: function _getSlidingElements() {
  24496. var slidingElements = [this._content, this._mask];
  24497. if (this._oppositeSide && this._oppositeSide.mode === 'split') {
  24498. slidingElements.push(this._oppositeSide);
  24499. }
  24500. return slidingElements;
  24501. }
  24502. }, {
  24503. key: 'activate',
  24504. value: function activate(sideElement) {
  24505. get(RevealSplitterAnimator.prototype.__proto__ || Object.getPrototypeOf(RevealSplitterAnimator.prototype), 'activate', this).call(this, sideElement);
  24506. if (sideElement.mode === 'collapse') {
  24507. this._setStyles(sideElement);
  24508. }
  24509. }
  24510. }, {
  24511. key: 'deactivate',
  24512. value: function deactivate() {
  24513. this._side && this._unsetStyles(this._side);
  24514. get(RevealSplitterAnimator.prototype.__proto__ || Object.getPrototypeOf(RevealSplitterAnimator.prototype), 'deactivate', this).call(this);
  24515. }
  24516. }, {
  24517. key: '_setStyles',
  24518. value: function _setStyles(sideElement) {
  24519. styler(sideElement, {
  24520. left: sideElement.side === 'right' ? 'auto' : 0,
  24521. right: sideElement.side === 'right' ? 0 : 'auto',
  24522. zIndex: 0,
  24523. backgroundColor: 'black',
  24524. transform: this._generateBehindPageStyle(0).container.transform,
  24525. display: 'none'
  24526. });
  24527. var splitter = sideElement.parentElement;
  24528. contentReady(splitter, function () {
  24529. return splitter.content && styler(splitter.content, { boxShadow: '0 0 12px 0 rgba(0, 0, 0, 0.2)' });
  24530. });
  24531. }
  24532. }, {
  24533. key: '_unsetStyles',
  24534. value: function _unsetStyles(sideElement) {
  24535. styler.clear(sideElement, 'left right zIndex backgroundColor display');
  24536. if (sideElement._content) {
  24537. sideElement._content.style.opacity = '';
  24538. }
  24539. // Check if the other side needs the common styles
  24540. if (!this._oppositeSide || this._oppositeSide.mode === 'split') {
  24541. sideElement.parentElement.content && styler.clear(sideElement.parentElement.content, 'boxShadow');
  24542. }
  24543. }
  24544. }, {
  24545. key: '_generateBehindPageStyle',
  24546. value: function _generateBehindPageStyle(distance) {
  24547. var max = this.maxWidth;
  24548. var behindDistance = (distance - max) / max * 10;
  24549. behindDistance = isNaN(behindDistance) ? 0 : Math.max(Math.min(behindDistance, 0), -10);
  24550. var behindTransform = 'translate3d(' + (this.minus ? -1 : 1) * behindDistance + '%, 0, 0)';
  24551. var opacity = 1 + behindDistance / 100;
  24552. return {
  24553. content: {
  24554. opacity: opacity
  24555. },
  24556. container: {
  24557. transform: behindTransform
  24558. }
  24559. };
  24560. }
  24561. }, {
  24562. key: 'translate',
  24563. value: function translate(distance) {
  24564. this._side.style.display = '';
  24565. this._side.style.zIndex = 1;
  24566. this.maxWidth = this.maxWidth || this._getMaxWidth();
  24567. var menuStyle = this._generateBehindPageStyle(Math.min(distance, this.maxWidth));
  24568. if (!this._slidingElements) {
  24569. this._slidingElements = this._getSlidingElements();
  24570. }
  24571. this._mask.style.display = 'block'; // Avoid content clicks
  24572. Animit.runAll(Animit(this._slidingElements).queue({
  24573. transform: 'translate3d(' + (this.minus + distance) + 'px, 0, 0)'
  24574. }), Animit(this._side._content).queue(menuStyle.content), Animit(this._side).queue(menuStyle.container));
  24575. }
  24576. /**
  24577. * @param {Function} done
  24578. */
  24579. }, {
  24580. key: 'open',
  24581. value: function open(done) {
  24582. var _this2 = this;
  24583. this._side.style.display = '';
  24584. this._side.style.zIndex = 1;
  24585. this.maxWidth = this.maxWidth || this._getMaxWidth();
  24586. var menuStyle = this._generateBehindPageStyle(this.maxWidth);
  24587. this._slidingElements = this._getSlidingElements();
  24588. setTimeout(function () {
  24589. // Fix: Time to update previous translate3d after changing style.display
  24590. Animit.runAll(Animit(_this2._slidingElements).wait(_this2.delay).queue({
  24591. transform: 'translate3d(' + (_this2.minus + _this2.maxWidth) + 'px, 0, 0)'
  24592. }, _this2.def), Animit(_this2._mask).wait(_this2.delay).queue({
  24593. display: 'block'
  24594. }), Animit(_this2._side._content).wait(_this2.delay).queue(menuStyle.content, _this2.def), Animit(_this2._side).wait(_this2.delay).queue(menuStyle.container, _this2.def).queue(function (callback) {
  24595. _this2._slidingElements = null;
  24596. callback();
  24597. done && done();
  24598. }));
  24599. }, 1000 / 60);
  24600. }
  24601. /**
  24602. * @param {Function} done
  24603. */
  24604. }, {
  24605. key: 'close',
  24606. value: function close(done) {
  24607. var _this3 = this;
  24608. var menuStyle = this._generateBehindPageStyle(0);
  24609. this._slidingElements = this._getSlidingElements();
  24610. Animit.runAll(Animit(this._slidingElements).wait(this.delay).queue({
  24611. transform: 'translate3d(0, 0, 0)'
  24612. }, this.def), Animit(this._mask).wait(this.delay).queue({
  24613. display: 'none'
  24614. }), Animit(this._side._content).wait(this.delay).queue(menuStyle.content, this.def), Animit(this._side).wait(this.delay).queue(menuStyle.container, this.def).queue(function (callback) {
  24615. _this3._slidingElements = null;
  24616. _this3._side.style.zIndex = 0;
  24617. _this3._side.style.display = 'none';
  24618. _this3._side._content.style.opacity = '';
  24619. done && done();
  24620. callback();
  24621. }));
  24622. }
  24623. }, {
  24624. key: '_getMaxWidth',
  24625. value: function _getMaxWidth() {
  24626. return this._side.offsetWidth;
  24627. }
  24628. }]);
  24629. return RevealSplitterAnimator;
  24630. }(SplitterAnimator$1);
  24631. /*
  24632. Copyright 2013-2015 ASIAL CORPORATION
  24633. Licensed under the Apache License, Version 2.0 (the "License");
  24634. you may not use this file except in compliance with the License.
  24635. You may obtain a copy of the License at
  24636. http://www.apache.org/licenses/LICENSE-2.0
  24637. Unless required by applicable law or agreed to in writing, software
  24638. distributed under the License is distributed on an "AS IS" BASIS,
  24639. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24640. See the License for the specific language governing permissions and
  24641. limitations under the License.
  24642. */
  24643. var _animatorDict$7 = {
  24644. default: OverlaySplitterAnimator,
  24645. overlay: OverlaySplitterAnimator,
  24646. push: PushSplitterAnimator,
  24647. reveal: RevealSplitterAnimator
  24648. };
  24649. /**
  24650. * @element ons-splitter
  24651. * @category menu
  24652. * @description
  24653. * [en]
  24654. * A component that enables responsive layout by implementing both a two-column layout and a sliding menu layout.
  24655. *
  24656. * It can be configured to automatically expand into a column layout on large screens and collapse the menu on smaller screens. When the menu is collapsed the user can open it by swiping.
  24657. * [/en]
  24658. * [ja][/ja]
  24659. * @codepen rOQOML
  24660. * @tutorial vanilla/Reference/splitter
  24661. * @guide fundamentals.html#managing-pages
  24662. * [en]Managing multiple pages.[/en]
  24663. * [ja]複数のページを管理する[/ja]
  24664. * @seealso ons-splitter-content
  24665. * [en]The `<ons-splitter-content>` component contains the main content of the page.[/en]
  24666. * [ja]ons-splitter-contentコンポーネント[/ja]
  24667. * @seealso ons-splitter-side
  24668. * [en]The `<ons-splitter-side>` component contains the menu.[/en]
  24669. * [ja]ons-splitter-sideコンポーネント[/ja]
  24670. * @example
  24671. * <ons-splitter id="splitter">
  24672. * <ons-splitter-content>
  24673. * ...
  24674. * </ons-splitter-content>
  24675. *
  24676. * <ons-splitter-side side="left" width="80%" collapse swipeable>
  24677. * ...
  24678. * </ons-splitter-side>
  24679. * </ons-splitter>
  24680. *
  24681. * <script>
  24682. * var splitter = document.getElementById('splitter');
  24683. * splitter.left.open();
  24684. * </script>
  24685. */
  24686. var SplitterElement = function (_BaseElement) {
  24687. inherits(SplitterElement, _BaseElement);
  24688. createClass(SplitterElement, [{
  24689. key: '_getSide',
  24690. value: function _getSide(side) {
  24691. var element = util$1.findChild(this, function (e) {
  24692. return util$1.match(e, 'ons-splitter-side') && e.getAttribute('side') === side;
  24693. });
  24694. return element;
  24695. }
  24696. /**
  24697. * @property left
  24698. * @readonly
  24699. * @type {HTMLElement}
  24700. * @description
  24701. * [en]Left `<ons-splitter-side>` element.[/en]
  24702. * [ja][/ja]
  24703. */
  24704. }, {
  24705. key: '_onDeviceBackButton',
  24706. value: function _onDeviceBackButton(event) {
  24707. this._sides.some(function (s) {
  24708. return s.isOpen ? s.close() : false;
  24709. }) || event.callParentHandler();
  24710. }
  24711. }, {
  24712. key: '_onModeChange',
  24713. value: function _onModeChange(e) {
  24714. var _this2 = this;
  24715. if (e.target.parentNode) {
  24716. contentReady(this, function () {
  24717. _this2._layout();
  24718. });
  24719. }
  24720. }
  24721. }, {
  24722. key: '_layout',
  24723. value: function _layout() {
  24724. var _this3 = this;
  24725. this._sides.forEach(function (side) {
  24726. if (_this3.content) {
  24727. _this3.content.style[side.side] = side.mode === 'split' ? side.style.width : 0;
  24728. }
  24729. });
  24730. }
  24731. }, {
  24732. key: 'left',
  24733. get: function get$$1() {
  24734. return this._getSide('left');
  24735. }
  24736. /**
  24737. * @property right
  24738. * @readonly
  24739. * @type {HTMLElement}
  24740. * @description
  24741. * [en]Right `<ons-splitter-side>` element.[/en]
  24742. * [ja][/ja]
  24743. */
  24744. }, {
  24745. key: 'right',
  24746. get: function get$$1() {
  24747. return this._getSide('right');
  24748. }
  24749. /**
  24750. * @property side
  24751. * @readonly
  24752. * @type {HTMLElement}
  24753. * @description
  24754. * [en]First `<ons-splitter-side>` element regardless the actual side.[/en]
  24755. * [ja][/ja]
  24756. */
  24757. }, {
  24758. key: 'side',
  24759. get: function get$$1() {
  24760. return util$1.findChild(this, 'ons-splitter-side');
  24761. }
  24762. }, {
  24763. key: '_sides',
  24764. get: function get$$1() {
  24765. return [this.left, this.right].filter(function (e) {
  24766. return e;
  24767. });
  24768. }
  24769. /**
  24770. * @property content
  24771. * @readonly
  24772. * @type {HTMLElement}
  24773. * @description
  24774. * [en]The `<ons-splitter-content>` element.[/en]
  24775. * [ja][/ja]
  24776. */
  24777. }, {
  24778. key: 'content',
  24779. get: function get$$1() {
  24780. return util$1.findChild(this, 'ons-splitter-content');
  24781. }
  24782. }, {
  24783. key: 'topPage',
  24784. get: function get$$1() {
  24785. return this.content._content;
  24786. }
  24787. }, {
  24788. key: 'mask',
  24789. get: function get$$1() {
  24790. return util$1.findChild(this, 'ons-splitter-mask');
  24791. }
  24792. /**
  24793. * @property onDeviceBackButton
  24794. * @type {Object}
  24795. * @description
  24796. * [en]Back-button handler.[/en]
  24797. * [ja]バックボタンハンドラ。[/ja]
  24798. */
  24799. }, {
  24800. key: 'onDeviceBackButton',
  24801. get: function get$$1() {
  24802. return this._backButtonHandler;
  24803. },
  24804. set: function set$$1(callback) {
  24805. if (this._backButtonHandler) {
  24806. this._backButtonHandler.destroy();
  24807. }
  24808. this._backButtonHandler = deviceBackButtonDispatcher.createHandler(this, callback);
  24809. }
  24810. }]);
  24811. function SplitterElement() {
  24812. classCallCheck(this, SplitterElement);
  24813. var _this = possibleConstructorReturn(this, (SplitterElement.__proto__ || Object.getPrototypeOf(SplitterElement)).call(this));
  24814. _this._onModeChange = _this._onModeChange.bind(_this);
  24815. contentReady(_this, function () {
  24816. !_this.mask && _this.appendChild(document.createElement('ons-splitter-mask'));
  24817. _this._layout();
  24818. });
  24819. return _this;
  24820. }
  24821. createClass(SplitterElement, [{
  24822. key: 'connectedCallback',
  24823. value: function connectedCallback() {
  24824. this.onDeviceBackButton = this._onDeviceBackButton.bind(this);
  24825. this.addEventListener('modechange', this._onModeChange, false);
  24826. }
  24827. }, {
  24828. key: 'disconnectedCallback',
  24829. value: function disconnectedCallback() {
  24830. this._backButtonHandler.destroy();
  24831. this._backButtonHandler = null;
  24832. this.removeEventListener('modechange', this._onModeChange, false);
  24833. }
  24834. }, {
  24835. key: 'attributeChangedCallback',
  24836. value: function attributeChangedCallback(name, last, current) {}
  24837. }, {
  24838. key: '_show',
  24839. value: function _show() {
  24840. util$1.propagateAction(this, '_show');
  24841. }
  24842. }, {
  24843. key: '_hide',
  24844. value: function _hide() {
  24845. util$1.propagateAction(this, '_hide');
  24846. }
  24847. }, {
  24848. key: '_destroy',
  24849. value: function _destroy() {
  24850. util$1.propagateAction(this, '_destroy');
  24851. this.remove();
  24852. }
  24853. }], [{
  24854. key: 'registerAnimator',
  24855. value: function registerAnimator(name, Animator) {
  24856. if (!(Animator instanceof SplitterAnimator)) {
  24857. util$1.throwAnimator('Splitter');
  24858. }
  24859. _animatorDict$7[name] = Animator;
  24860. }
  24861. }, {
  24862. key: 'SplitterAnimator',
  24863. get: function get$$1() {
  24864. return SplitterAnimator;
  24865. }
  24866. }, {
  24867. key: 'animators',
  24868. get: function get$$1() {
  24869. return _animatorDict$7;
  24870. }
  24871. }]);
  24872. return SplitterElement;
  24873. }(BaseElement);
  24874. onsElements.Splitter = SplitterElement;
  24875. customElements.define('ons-splitter', SplitterElement);
  24876. /*
  24877. Copyright 2013-2015 ASIAL CORPORATION
  24878. Licensed under the Apache License, Version 2.0 (the "License");
  24879. you may not use this file except in compliance with the License.
  24880. You may obtain a copy of the License at
  24881. http://www.apache.org/licenses/LICENSE-2.0
  24882. Unless required by applicable law or agreed to in writing, software
  24883. distributed under the License is distributed on an "AS IS" BASIS,
  24884. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24885. See the License for the specific language governing permissions and
  24886. limitations under the License.
  24887. */
  24888. var SPLIT_MODE = 'split';
  24889. var COLLAPSE_MODE = 'collapse';
  24890. var CLOSED_STATE = 'closed';
  24891. var OPEN_STATE = 'open';
  24892. var CHANGING_STATE = 'changing';
  24893. var rewritables$2 = {
  24894. /**
  24895. * @param {Element} splitterSideElement
  24896. * @param {Function} callback
  24897. */
  24898. ready: function ready(splitterSideElement, callback) {
  24899. setImmediate(callback);
  24900. }
  24901. };
  24902. var CollapseDetection = function () {
  24903. function CollapseDetection(element, target) {
  24904. classCallCheck(this, CollapseDetection);
  24905. this._element = element;
  24906. this._onChange = this._onChange.bind(this);
  24907. target && this.changeTarget(target);
  24908. }
  24909. createClass(CollapseDetection, [{
  24910. key: 'changeTarget',
  24911. value: function changeTarget(target) {
  24912. this.disable();
  24913. this._target = target;
  24914. if (target) {
  24915. this._orientation = ['portrait', 'landscape'].indexOf(target) !== -1;
  24916. this.activate();
  24917. }
  24918. }
  24919. }, {
  24920. key: '_match',
  24921. value: function _match(value) {
  24922. if (this._orientation) {
  24923. return this._target === (value.isPortrait ? 'portrait' : 'landscape');
  24924. }
  24925. return value.matches;
  24926. }
  24927. }, {
  24928. key: '_onChange',
  24929. value: function _onChange(value) {
  24930. this._element._updateMode(this._match(value) ? COLLAPSE_MODE : SPLIT_MODE);
  24931. }
  24932. }, {
  24933. key: 'activate',
  24934. value: function activate() {
  24935. if (this._orientation) {
  24936. orientation.on('change', this._onChange);
  24937. this._onChange({ isPortrait: orientation.isPortrait() });
  24938. } else {
  24939. this._queryResult = window.matchMedia(this._target);
  24940. this._queryResult.addListener(this._onChange);
  24941. this._onChange(this._queryResult);
  24942. }
  24943. }
  24944. }, {
  24945. key: 'disable',
  24946. value: function disable() {
  24947. if (this._orientation) {
  24948. orientation.off('change', this._onChange);
  24949. } else if (this._queryResult) {
  24950. this._queryResult.removeListener(this._onChange);
  24951. this._queryResult = null;
  24952. }
  24953. }
  24954. }]);
  24955. return CollapseDetection;
  24956. }();
  24957. /**
  24958. * @element ons-splitter-side
  24959. * @category menu
  24960. * @description
  24961. * [en]
  24962. * The `<ons-splitter-side>` element is used as a child element of `<ons-splitter>`.
  24963. *
  24964. * It will be displayed on either the left or right side of the `<ons-splitter-content>` element.
  24965. *
  24966. * It supports two modes: collapsed and split. When it's in collapsed mode it will be hidden from view and can be displayed when the user swipes the screen or taps a button. In split mode the element is always shown. It can be configured to automatically switch between the two modes depending on the screen size.
  24967. * [/en]
  24968. * [ja]ons-splitter-side要素は、ons-splitter要素の子要素として利用します。[/ja]
  24969. * @codepen rOQOML
  24970. * @tutorial vanilla/Reference/splitter
  24971. * @guide fundamentals.html#managing-pages
  24972. * [en]Managing multiple pages.[/en]
  24973. * [ja]複数のページを管理する[/ja]
  24974. * @seealso ons-splitter
  24975. * [en]The `<ons-splitter>` is the parent component.[/en]
  24976. * [ja]ons-splitterコンポーネント[/ja]
  24977. * @seealso ons-splitter-content
  24978. * [en]The `<ons-splitter-content>` component contains the main content of the page.[/en]
  24979. * [ja]ons-splitter-contentコンポーネント[/ja]
  24980. * @example
  24981. * <ons-splitter>
  24982. * <ons-splitter-content>
  24983. * ...
  24984. * </ons-splitter-content>
  24985. *
  24986. * <ons-splitter-side side="left" width="80%" collapse>
  24987. * ...
  24988. * </ons-splitter-side>
  24989. * </ons-splitter>
  24990. */
  24991. var SplitterSideElement = function (_BaseElement) {
  24992. inherits(SplitterSideElement, _BaseElement);
  24993. /**
  24994. * @event modechange
  24995. * @description
  24996. * [en]Fired just after the component's mode changes.[/en]
  24997. * [ja]この要素のモードが変化した際に発火します。[/ja]
  24998. * @param {Object} event
  24999. * [en]Event object.[/en]
  25000. * [ja]イベントオブジェクトです。[/ja]
  25001. * @param {Object} event.side
  25002. * [en]Component object.[/en]
  25003. * [ja]コンポーネントのオブジェクト。[/ja]
  25004. * @param {String} event.mode
  25005. * [en]Returns the current mode. Can be either `"collapse"` or `"split"`.[/en]
  25006. * [ja]現在のモードを返します。[/ja]
  25007. */
  25008. /**
  25009. * @event preopen
  25010. * @description
  25011. * [en]Fired just before the sliding menu is opened.[/en]
  25012. * [ja]スライディングメニューが開く前に発火します。[/ja]
  25013. * @param {Object} event
  25014. * [en]Event object.[/en]
  25015. * [ja]イベントオブジェクトです。[/ja]
  25016. * @param {Function} event.cancel
  25017. * [en]Call to cancel opening sliding menu.[/en]
  25018. * [ja]スライディングメニューが開くのをキャンセルします。[/ja]
  25019. * @param {Object} event.side
  25020. * [en]Component object.[/en]
  25021. * [ja]コンポーネントのオブジェクト。[/ja]
  25022. */
  25023. /**
  25024. * @event postopen
  25025. * @description
  25026. * [en]Fired just after the sliding menu is opened.[/en]
  25027. * [ja]スライディングメニューが開いた後に発火します。[/ja]
  25028. * @param {Object} event
  25029. * [en]Event object.[/en]
  25030. * [ja]イベントオブジェクトです。[/ja]
  25031. * @param {Object} event.side
  25032. * [en]Component object.[/en]
  25033. * [ja]コンポーネントのオブジェクト。[/ja]
  25034. */
  25035. /**
  25036. * @event preclose
  25037. * @description
  25038. * [en]Fired just before the sliding menu is closed.[/en]
  25039. * [ja]スライディングメニューが閉じる前に発火します。[/ja]
  25040. * @param {Object} event
  25041. * [en]Event object.[/en]
  25042. * [ja]イベントオブジェクトです。[/ja]
  25043. * @param {Object} event.side
  25044. * [en]Component object.[/en]
  25045. * [ja]コンポーネントのオブジェクト。[/ja]
  25046. * @param {Function} event.cancel
  25047. * [en]Call to cancel opening sliding-menu.[/en]
  25048. * [ja]スライディングメニューが閉じるのをキャンセルします。[/ja]
  25049. */
  25050. /**
  25051. * @event postclose
  25052. * @description
  25053. * [en]Fired just after the sliding menu is closed.[/en]
  25054. * [ja]スライディングメニューが閉じた後に発火します。[/ja]
  25055. * @param {Object} event
  25056. * [en]Event object.[/en]
  25057. * [ja]イベントオブジェクトです。[/ja]
  25058. * @param {Object} event.side
  25059. * [en]Component object.[/en]
  25060. * [ja]コンポーネントのオブジェクト。[/ja]
  25061. */
  25062. /**
  25063. * @attribute animation
  25064. * @type {String}
  25065. * @default default
  25066. * @description
  25067. * [en]Specify the animation. Use one of `overlay`, `push`, `reveal` or `default`.[/en]
  25068. * [ja]アニメーションを指定します。"overlay", "push", "reveal", "default"のいずれかを指定できます。[/ja]
  25069. */
  25070. /**
  25071. * @attribute animation-options
  25072. * @type {Expression}
  25073. * @description
  25074. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  25075. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. {duration: 0.2, delay: 1, timing: 'ease-in'}[/ja]
  25076. */
  25077. /**
  25078. * @attribute open-threshold
  25079. * @type {Number}
  25080. * @default 0.3
  25081. * @description
  25082. * [en]Specify how much the menu needs to be swiped before opening. A value between `0` and `1`.[/en]
  25083. * [ja]どのくらいスワイプすればスライディングメニューを開くかどうかの割合を指定します。0から1の間の数値を指定します。スワイプの距離がここで指定した数値掛けるこの要素の幅よりも大きければ、スワイプが終わった時にこの要素を開きます。デフォルトは0.3です。[/ja]
  25084. */
  25085. /**
  25086. * @attribute collapse
  25087. * @type {String}
  25088. * @description
  25089. * [en]
  25090. * Specify the collapse behavior. Valid values are `"portrait"`, `"landscape"` or a media query.
  25091. * The strings `"portrait"` and `"landscape"` means the view will collapse when device is in landscape or portrait orientation.
  25092. * If the value is a media query, the view will collapse when the media query resolves to `true`.
  25093. * If the value is not defined, the view always be in `"collapse"` mode.
  25094. * [/en]
  25095. * [ja]
  25096. * 左側のページを非表示にする条件を指定します。portrait, landscape、width #pxもしくはメディアクエリの指定が可能です。
  25097. * portraitもしくはlandscapeを指定すると、デバイスの画面が縦向きもしくは横向きになった時に適用されます。
  25098. * メディアクエリを指定すると、指定したクエリに適合している場合に適用されます。
  25099. * 値に何も指定しない場合には、常にcollapseモードになります。
  25100. * [/ja]
  25101. */
  25102. /**
  25103. * @attribute swipe-target-width
  25104. * @type {String}
  25105. * @description
  25106. * [en]The width of swipeable area calculated from the edge (in pixels). Use this to enable swipe only when the finger touch on the screen edge.[/en]
  25107. * [ja]スワイプの判定領域をピクセル単位で指定します。画面の端から指定した距離に達するとページが表示されます。[/ja]
  25108. */
  25109. /**
  25110. * @attribute width
  25111. * @type {String}
  25112. * @description
  25113. * [en]Can be specified in either pixels or as a percentage, e.g. `90%` or `200px`.[/en]
  25114. * [ja]この要素の横幅を指定します。pxと%での指定が可能です。eg. 90%, 200px[/ja]
  25115. */
  25116. /**
  25117. * @attribute side
  25118. * @type {String}
  25119. * @default left
  25120. * @description
  25121. * [en]Specify which side of the screen the `<ons-splitter-side>` element is located. Possible values are `"left"` and `"right"`.[/en]
  25122. * [ja]この要素が左か右かを指定します。指定できる値は"left"か"right"のみです。[/ja]
  25123. */
  25124. /**
  25125. * @attribute mode
  25126. * @type {String}
  25127. * @description
  25128. * [en]Current mode. Possible values are `"collapse"` or `"split"`. This attribute is read only.[/en]
  25129. * [ja]現在のモードが設定されます。"collapse"もしくは"split"が指定されます。この属性は読み込み専用です。[/ja]
  25130. */
  25131. /**
  25132. * @attribute page
  25133. * @initonly
  25134. * @type {String}
  25135. * @description
  25136. * [en]The URL of the menu page.[/en]
  25137. * [ja]ons-splitter-side要素に表示するページのURLを指定します。[/ja]
  25138. */
  25139. /**
  25140. * @attribute swipeable
  25141. * @type {Boolean}
  25142. * @description
  25143. * [en]Whether to enable swipe interaction on collapse mode.[/en]
  25144. * [ja]collapseモード時にスワイプ操作を有効にする場合に指定します。[/ja]
  25145. */
  25146. function SplitterSideElement() {
  25147. classCallCheck(this, SplitterSideElement);
  25148. var _this = possibleConstructorReturn(this, (SplitterSideElement.__proto__ || Object.getPrototypeOf(SplitterSideElement)).call(this));
  25149. _this._page = null;
  25150. _this._state = CLOSED_STATE;
  25151. _this._lock = new DoorLock();
  25152. _this._pageLoader = defaultPageLoader;
  25153. _this._collapseDetection = new CollapseDetection(_this);
  25154. _this._animatorFactory = new AnimatorFactory({
  25155. animators: SplitterElement.animators,
  25156. baseClass: SplitterAnimator$1,
  25157. baseClassName: 'SplitterAnimator',
  25158. defaultAnimation: _this.getAttribute('animation')
  25159. });
  25160. contentReady(_this, function () {
  25161. // These attributes are used early by the parent element
  25162. _this.attributeChangedCallback('width');
  25163. if (!_this.hasAttribute('side')) {
  25164. _this.setAttribute('side', 'left');
  25165. }
  25166. rewritables$2.ready(_this, function () {
  25167. var page = _this._page || _this.getAttribute('page');
  25168. page && _this.load(page);
  25169. });
  25170. });
  25171. return _this;
  25172. }
  25173. createClass(SplitterSideElement, [{
  25174. key: 'connectedCallback',
  25175. value: function connectedCallback() {
  25176. var _this2 = this;
  25177. if (!util$1.match(this.parentNode, 'ons-splitter')) {
  25178. util$1.throw('Parent must be an ons-splitter element');
  25179. }
  25180. this._swipe = new SwipeReveal({
  25181. element: this,
  25182. elementHandler: this.parentElement,
  25183. swipeMax: function swipeMax() {
  25184. _this2._onSwipe && _this2._onSwipe(1, _this2._animationOpt);
  25185. _this2.open();
  25186. },
  25187. swipeMid: function swipeMid(distance, width) {
  25188. _this2._onSwipe && _this2._onSwipe(distance / width);
  25189. _this2._animator.translate(distance);
  25190. },
  25191. swipeMin: function swipeMin() {
  25192. _this2._onSwipe && _this2._onSwipe(0, _this2._animationOpt);
  25193. _this2.close();
  25194. },
  25195. getThreshold: function getThreshold() {
  25196. return Math.max(0, Math.min(1, parseFloat(_this2.getAttribute('open-threshold')) || 0.3));
  25197. },
  25198. getSide: function getSide() {
  25199. return _this2.side;
  25200. },
  25201. isInitialState: function isInitialState() {
  25202. var closed = _this2._state === CLOSED_STATE;
  25203. _this2._state = CHANGING_STATE;
  25204. return closed;
  25205. },
  25206. ignoreSwipe: function ignoreSwipe(event, distance) {
  25207. var isOpen = _this2.isOpen;
  25208. var validDrag = function validDrag(d) {
  25209. return _this2.side === 'left' ? d === 'left' && isOpen || d === 'right' && !isOpen : d === 'left' && !isOpen || d === 'right' && isOpen;
  25210. };
  25211. var area = Math.max(0, parseInt(_this2.getAttribute('swipe-target-width'), 10) || 0);
  25212. return _this2._mode === SPLIT_MODE || _this2._lock.isLocked() || _this2._isOtherSideOpen() || !validDrag(event.gesture.direction) || !isOpen && area !== 0 && distance > area;
  25213. }
  25214. });
  25215. this.attributeChangedCallback('swipeable');
  25216. contentReady(this, function () {
  25217. _this2.constructor.observedAttributes.forEach(function (attr) {
  25218. return _this2.attributeChangedCallback(attr, null, _this2.getAttribute(attr));
  25219. });
  25220. });
  25221. }
  25222. }, {
  25223. key: 'disconnectedCallback',
  25224. value: function disconnectedCallback() {
  25225. this._swipe && this._swipe.dispose();
  25226. this._animator = this._animationOpt = this._swipe = null;
  25227. }
  25228. }, {
  25229. key: 'attributeChangedCallback',
  25230. value: function attributeChangedCallback(name, last, current) {
  25231. switch (name) {
  25232. case 'swipeable':
  25233. this._swipe && this._swipe.update();
  25234. break;
  25235. case 'width':
  25236. current = this.getAttribute('width'); // Sometimes undefined. CE bug?
  25237. this.style.width = /^\d+(px|%)$/.test(current) ? current : '80%';
  25238. break;
  25239. default:
  25240. this[util$1.camelize('_update-' + name)](current);
  25241. }
  25242. }
  25243. }, {
  25244. key: '_emitEvent',
  25245. value: function _emitEvent(name) {
  25246. if (name.slice(0, 3) !== 'pre') {
  25247. return util$1.triggerElementEvent(this, name, { side: this });
  25248. }
  25249. var isCanceled = false;
  25250. util$1.triggerElementEvent(this, name, {
  25251. side: this,
  25252. cancel: function cancel() {
  25253. return isCanceled = true;
  25254. }
  25255. });
  25256. return isCanceled;
  25257. }
  25258. }, {
  25259. key: '_isOtherSideOpen',
  25260. value: function _isOtherSideOpen() {
  25261. var _this3 = this;
  25262. return !!util$1.findChild(this.parentElement, function (el) {
  25263. return el instanceof _this3.constructor && el !== _this3 && el._mode === COLLAPSE_MODE && el.isOpen;
  25264. });
  25265. }
  25266. }, {
  25267. key: '_updateCollapse',
  25268. value: function _updateCollapse() {
  25269. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getAttribute('collapse');
  25270. if (value === null || value === 'split') {
  25271. this._collapseDetection.disable();
  25272. return this._updateMode(SPLIT_MODE);
  25273. }
  25274. if (value === '' || value === 'collapse') {
  25275. this._collapseDetection.disable();
  25276. return this._updateMode(COLLAPSE_MODE);
  25277. }
  25278. this._collapseDetection.changeTarget(value);
  25279. }
  25280. }, {
  25281. key: '_updateMode',
  25282. value: function _updateMode(mode) {
  25283. if (mode !== this._mode) {
  25284. this._mode = mode;
  25285. this.setAttribute('mode', mode); // readonly attribute for the users
  25286. if (mode === SPLIT_MODE) {
  25287. this._animator && this._animator.deactivate();
  25288. this._state = CLOSED_STATE;
  25289. } else {
  25290. this._animator && this._animator.activate(this);
  25291. this._state === OPEN_STATE && this._animator.open();
  25292. }
  25293. util$1.triggerElementEvent(this, 'modechange', { side: this, mode: mode });
  25294. }
  25295. }
  25296. }, {
  25297. key: '_updateAnimation',
  25298. value: function _updateAnimation() {
  25299. var animation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getAttribute('animation');
  25300. if (this.parentNode) {
  25301. this._animator && this._animator.deactivate();
  25302. this._animator = this._animatorFactory.newAnimator({ animation: animation });
  25303. this._animator.activate(this);
  25304. this._animationOpt = {
  25305. timing: this._animator.duration,
  25306. duration: this._animator.duration
  25307. };
  25308. }
  25309. }
  25310. }, {
  25311. key: '_updateAnimationOptions',
  25312. value: function _updateAnimationOptions() {
  25313. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getAttribute('animation-options');
  25314. this._animator.updateOptions(AnimatorFactory.parseAnimationOptionsString(value));
  25315. }
  25316. /**
  25317. * @property page
  25318. * @type {*}
  25319. * @description
  25320. * [en]Page location to load in the splitter side.[/en]
  25321. * [ja]この要素内に表示するページを指定します。[/ja]
  25322. */
  25323. }, {
  25324. key: 'open',
  25325. /**
  25326. * @method open
  25327. * @signature open([options])
  25328. * @param {Object} [options]
  25329. * [en]Parameter object.[/en]
  25330. * [ja]オプションを指定するオブジェクト。[/ja]
  25331. * @param {Function} [options.callback]
  25332. * [en]This function will be called after the menu has been opened.[/en]
  25333. * [ja]メニューが開いた後に呼び出される関数オブジェクトを指定します。[/ja]
  25334. * @description
  25335. * [en]Open menu in collapse mode.[/en]
  25336. * [ja]collapseモードになっているons-splitter-side要素を開きます。[/ja]
  25337. * @return {Promise}
  25338. * [en]Resolves to the splitter side element or false if not in collapse mode[/en]
  25339. * [ja][/ja]
  25340. */
  25341. value: function open(options) {
  25342. return this.toggle(options, true);
  25343. }
  25344. /**
  25345. * @method close
  25346. * @signature close([options])
  25347. * @param {Object} [options]
  25348. * [en]Parameter object.[/en]
  25349. * [ja]オプションを指定するオブジェクト。[/ja]
  25350. * @param {Function} [options.callback]
  25351. * [en]This function will be called after the menu has been closed.[/en]
  25352. * [ja]メニューが閉じた後に呼び出される関数オブジェクトを指定します。[/ja]
  25353. * @description
  25354. * [en]Close menu in collapse mode.[/en]
  25355. * [ja]collapseモードになっているons-splitter-side要素を閉じます。[/ja]
  25356. * @return {Promise}
  25357. * [en]Resolves to the splitter side element or false if not in collapse mode[/en]
  25358. * [ja][/ja]
  25359. */
  25360. }, {
  25361. key: 'close',
  25362. value: function close(options) {
  25363. return this.toggle(options, false);
  25364. }
  25365. /**
  25366. * @method toggle
  25367. * @signature toggle([options])
  25368. * @param {Object} [options]
  25369. * @description
  25370. * [en]Opens if it's closed. Closes if it's open.[/en]
  25371. * [ja]開けている場合は要素を閉じますそして開けている場合は要素を開きます。[/ja]
  25372. * @return {Promise}
  25373. * [en]Resolves to the splitter side element or false if not in collapse mode[/en]
  25374. * [ja][/ja]
  25375. */
  25376. }, {
  25377. key: 'toggle',
  25378. value: function toggle() {
  25379. var _this4 = this;
  25380. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  25381. var force = arguments[1];
  25382. var shouldOpen = typeof force === 'boolean' ? force : !this.isOpen;
  25383. var action = shouldOpen ? 'open' : 'close';
  25384. var FINAL_STATE = shouldOpen ? OPEN_STATE : CLOSED_STATE;
  25385. if (this._mode === SPLIT_MODE) {
  25386. return Promise.resolve(false);
  25387. }
  25388. if (this._state === FINAL_STATE) {
  25389. return Promise.resolve(this);
  25390. }
  25391. if (this._lock.isLocked()) {
  25392. return Promise.reject('Another splitter-side action is already running.');
  25393. }
  25394. if (shouldOpen && this._isOtherSideOpen()) {
  25395. return Promise.reject('Another menu is already open.');
  25396. }
  25397. if (this._emitEvent('pre' + action)) {
  25398. return Promise.reject('Canceled in pre' + action + ' event.');
  25399. }
  25400. var unlock = this._lock.lock();
  25401. this._state = CHANGING_STATE;
  25402. if (options.animation) {
  25403. this._updateAnimation(options.animation);
  25404. }
  25405. return new Promise(function (resolve) {
  25406. _this4._animator[action](function () {
  25407. util$1.iosPageScrollFix(shouldOpen);
  25408. _this4._state = FINAL_STATE;
  25409. unlock();
  25410. _this4._emitEvent('post' + action);
  25411. options.callback instanceof Function && options.callback(_this4);
  25412. resolve(_this4);
  25413. });
  25414. });
  25415. }
  25416. /**
  25417. * @method load
  25418. * @signature load(page, [options])
  25419. * @param {String} page
  25420. * [en]Page URL. Can be either an HTML document or a `<template>`.[/en]
  25421. * [ja]pageのURLか、`<template>`で宣言したテンプレートのid属性の値を指定します。[/ja]
  25422. * @param {Object} [options]
  25423. * @param {Function} [options.callback]
  25424. * @description
  25425. * [en]Show the page specified in pageUrl in the right section[/en]
  25426. * [ja]指定したURLをメインページを読み込みます。[/ja]
  25427. * @return {Promise}
  25428. * [en]Resolves to the new page element[/en]
  25429. * [ja][/ja]
  25430. */
  25431. }, {
  25432. key: 'load',
  25433. value: function load(page) {
  25434. var _this5 = this;
  25435. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  25436. this._page = page;
  25437. var callback = options.callback || function () {};
  25438. return new Promise(function (resolve) {
  25439. var oldContent = _this5._content || null;
  25440. _this5._pageLoader.load({ page: page, parent: _this5 }, function (pageElement) {
  25441. if (oldContent) {
  25442. _this5._pageLoader.unload(oldContent);
  25443. oldContent = null;
  25444. }
  25445. setImmediate(function () {
  25446. return _this5._show();
  25447. });
  25448. callback(pageElement);
  25449. resolve(pageElement);
  25450. });
  25451. });
  25452. }
  25453. }, {
  25454. key: '_show',
  25455. value: function _show() {
  25456. if (this._content) {
  25457. this._content._show();
  25458. }
  25459. }
  25460. }, {
  25461. key: '_hide',
  25462. value: function _hide() {
  25463. if (this._content) {
  25464. this._content._hide();
  25465. }
  25466. }
  25467. }, {
  25468. key: '_destroy',
  25469. value: function _destroy() {
  25470. if (this._content) {
  25471. this._pageLoader.unload(this._content);
  25472. }
  25473. this.remove();
  25474. }
  25475. }, {
  25476. key: 'side',
  25477. get: function get$$1() {
  25478. return this.getAttribute('side') === 'right' ? 'right' : 'left';
  25479. }
  25480. }, {
  25481. key: 'page',
  25482. get: function get$$1() {
  25483. return this._page;
  25484. }
  25485. /**
  25486. * @param {*} page
  25487. */
  25488. ,
  25489. set: function set$$1(page) {
  25490. this._page = page;
  25491. }
  25492. }, {
  25493. key: '_content',
  25494. get: function get$$1() {
  25495. return this.children[0];
  25496. }
  25497. /**
  25498. * @property pageLoader
  25499. * @description
  25500. * [en][/en]
  25501. * [ja][/ja]
  25502. */
  25503. }, {
  25504. key: 'pageLoader',
  25505. get: function get$$1() {
  25506. return this._pageLoader;
  25507. },
  25508. set: function set$$1(loader) {
  25509. if (!(loader instanceof PageLoader)) {
  25510. util$1.throwPageLoader();
  25511. }
  25512. this._pageLoader = loader;
  25513. }
  25514. /**
  25515. * @property mode
  25516. * @readonly
  25517. * @type {String}
  25518. * @description
  25519. * [en]Current mode. Possible values are "split", "collapse", "closed", "open" or "changing".[/en]
  25520. * [ja][/ja]
  25521. */
  25522. }, {
  25523. key: 'mode',
  25524. get: function get$$1() {
  25525. return this._mode;
  25526. }
  25527. /**
  25528. * @property onSwipe
  25529. * @type {Function}
  25530. * @description
  25531. * [en]Hook called whenever the user slides the splitter. It gets a decimal ratio (0-1) and an animationOptions object as arguments.[/en]
  25532. * [ja][/ja]
  25533. */
  25534. }, {
  25535. key: 'onSwipe',
  25536. get: function get$$1() {
  25537. return this._onSwipe;
  25538. },
  25539. set: function set$$1(value) {
  25540. if (value && !(value instanceof Function)) {
  25541. util$1.throw('"onSwipe" must be a function');
  25542. }
  25543. this._onSwipe = value;
  25544. }
  25545. /**
  25546. * @property isOpen
  25547. * @type {Boolean}
  25548. * @readonly
  25549. * @description
  25550. * [en]This value is `true` when the menu is open.[/en]
  25551. * [ja][/ja]
  25552. */
  25553. }, {
  25554. key: 'isOpen',
  25555. get: function get$$1() {
  25556. return this._mode === COLLAPSE_MODE && this._state !== CLOSED_STATE;
  25557. }
  25558. }], [{
  25559. key: 'observedAttributes',
  25560. get: function get$$1() {
  25561. return ['animation', 'width', 'collapse', 'swipeable', 'animation-options'];
  25562. }
  25563. }, {
  25564. key: 'events',
  25565. get: function get$$1() {
  25566. return ['preopen', 'postopen', 'preclose', 'postclose', 'modechange'];
  25567. }
  25568. }, {
  25569. key: 'rewritables',
  25570. get: function get$$1() {
  25571. return rewritables$2;
  25572. }
  25573. }]);
  25574. return SplitterSideElement;
  25575. }(BaseElement);
  25576. onsElements.SplitterSide = SplitterSideElement;
  25577. customElements.define('ons-splitter-side', SplitterSideElement);
  25578. /*
  25579. Copyright 2013-2015 ASIAL CORPORATION
  25580. Licensed under the Apache License, Version 2.0 (the "License");
  25581. you may not use this file except in compliance with the License.
  25582. You may obtain a copy of the License at
  25583. http://www.apache.org/licenses/LICENSE-2.0
  25584. Unless required by applicable law or agreed to in writing, software
  25585. distributed under the License is distributed on an "AS IS" BASIS,
  25586. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  25587. See the License for the specific language governing permissions and
  25588. limitations under the License.
  25589. */
  25590. var scheme$28 = {
  25591. '': 'switch--*',
  25592. '.switch__input': 'switch--*__input',
  25593. '.switch__handle': 'switch--*__handle',
  25594. '.switch__toggle': 'switch--*__toggle'
  25595. };
  25596. var locations = {
  25597. ios: [1, 21],
  25598. material: [0, 16]
  25599. };
  25600. /**
  25601. * @element ons-switch
  25602. * @category form
  25603. * @description
  25604. * [en]
  25605. * Switch component. The switch can be toggled both by dragging and tapping.
  25606. *
  25607. * Will automatically displays a Material Design switch on Android devices.
  25608. * [/en]
  25609. * [ja]スイッチを表示するコンポーネントです。[/ja]
  25610. * @modifier material
  25611. * [en]Material Design switch[/en]
  25612. * [ja][/ja]
  25613. * @codepen LpXZQQ
  25614. * @tutorial vanilla/Reference/switch
  25615. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  25616. * @example
  25617. * <ons-switch checked></ons-switch>
  25618. * <ons-switch disabled></ons-switch>
  25619. * <ons-switch modifier="material"></ons-switch>
  25620. */
  25621. var SwitchElement = function (_BaseCheckboxElement) {
  25622. inherits(SwitchElement, _BaseCheckboxElement);
  25623. function SwitchElement() {
  25624. classCallCheck(this, SwitchElement);
  25625. var _this = possibleConstructorReturn(this, (SwitchElement.__proto__ || Object.getPrototypeOf(SwitchElement)).call(this));
  25626. contentReady(_this, function () {
  25627. _this.attributeChangedCallback('modifier', null, _this.getAttribute('modifier'));
  25628. });
  25629. _this._onChange = _this._onChange.bind(_this);
  25630. _this._onRelease = _this._onRelease.bind(_this);
  25631. _this._lastTimeStamp = 0;
  25632. return _this;
  25633. }
  25634. createClass(SwitchElement, [{
  25635. key: '_getPosition',
  25636. /* Own props */
  25637. value: function _getPosition(e) {
  25638. var l = this._locations;
  25639. return Math.min(l[1], Math.max(l[0], this._startX + e.gesture.deltaX));
  25640. }
  25641. }, {
  25642. key: '_emitChangeEvent',
  25643. value: function _emitChangeEvent() {
  25644. util$1.triggerElementEvent(this, 'change', {
  25645. value: this.checked,
  25646. switch: this,
  25647. isInteractive: true
  25648. });
  25649. }
  25650. }, {
  25651. key: '_onChange',
  25652. value: function _onChange(event) {
  25653. if (event && event.stopPropagation) {
  25654. event.stopPropagation();
  25655. }
  25656. this._emitChangeEvent();
  25657. }
  25658. }, {
  25659. key: '_onClick',
  25660. value: function _onClick(ev) {
  25661. if (ev.target.classList.contains(this.defaultElementClass + '__touch') || ev.timeStamp - this._lastTimeStamp < 50 // Prevent second click triggered by <label>
  25662. ) {
  25663. ev.preventDefault();
  25664. }
  25665. this._lastTimeStamp = ev.timeStamp;
  25666. }
  25667. }, {
  25668. key: '_onHold',
  25669. value: function _onHold(e) {
  25670. if (!this.disabled) {
  25671. ModifierUtil.addModifier(this, 'active');
  25672. document.addEventListener('release', this._onRelease);
  25673. }
  25674. }
  25675. }, {
  25676. key: '_onDragStart',
  25677. value: function _onDragStart(e) {
  25678. if (this.disabled || ['left', 'right'].indexOf(e.gesture.direction) === -1) {
  25679. ModifierUtil.removeModifier(this, 'active');
  25680. return;
  25681. }
  25682. e.consumed = true;
  25683. ModifierUtil.addModifier(this, 'active');
  25684. this._startX = this._locations[this.checked ? 1 : 0]; // - e.gesture.deltaX;
  25685. this.addEventListener('drag', this._onDrag);
  25686. document.addEventListener('release', this._onRelease);
  25687. }
  25688. }, {
  25689. key: '_onDrag',
  25690. value: function _onDrag(e) {
  25691. e.stopPropagation();
  25692. this._handle.style.left = this._getPosition(e) + 'px';
  25693. }
  25694. }, {
  25695. key: '_onRelease',
  25696. value: function _onRelease(e) {
  25697. var l = this._locations;
  25698. var position = this._getPosition(e);
  25699. var previousValue = this.checked;
  25700. this.checked = position >= (l[0] + l[1]) / 2;
  25701. if (this.checked !== previousValue) {
  25702. this._emitChangeEvent();
  25703. }
  25704. this.removeEventListener('drag', this._onDrag);
  25705. document.removeEventListener('release', this._onRelease);
  25706. this._handle.style.left = '';
  25707. ModifierUtil.removeModifier(this, 'active');
  25708. }
  25709. }, {
  25710. key: 'click',
  25711. value: function click() {
  25712. var ev = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  25713. if (!this.disabled) {
  25714. this.checked = !this.checked;
  25715. this._emitChangeEvent();
  25716. this._lastTimeStamp = ev.timeStamp || 0;
  25717. }
  25718. }
  25719. }, {
  25720. key: 'connectedCallback',
  25721. value: function connectedCallback() {
  25722. var _this2 = this;
  25723. contentReady(this, function () {
  25724. _this2._input.addEventListener('change', _this2._onChange);
  25725. });
  25726. this.addEventListener('dragstart', this._onDragStart);
  25727. this.addEventListener('hold', this._onHold);
  25728. this.addEventListener('tap', this.click);
  25729. this.addEventListener('click', this._onClick);
  25730. this._gestureDetector = new GestureDetector(this, { dragMinDistance: 1, holdTimeout: 251, passive: true });
  25731. }
  25732. }, {
  25733. key: 'disconnectedCallback',
  25734. value: function disconnectedCallback() {
  25735. var _this3 = this;
  25736. contentReady(this, function () {
  25737. _this3._input.removeEventListener('change', _this3._onChange);
  25738. });
  25739. this.removeEventListener('dragstart', this._onDragStart);
  25740. this.removeEventListener('hold', this._onHold);
  25741. this.removeEventListener('tap', this.click);
  25742. this.removeEventListener('click', this._onClick);
  25743. if (this._gestureDetector) {
  25744. this._gestureDetector.dispose();
  25745. }
  25746. }
  25747. }, {
  25748. key: 'attributeChangedCallback',
  25749. value: function attributeChangedCallback(name, last, current) {
  25750. if (name === 'modifier') {
  25751. var md = (current || '').indexOf('material') !== -1;
  25752. this._locations = locations[md ? 'material' : 'ios'];
  25753. }
  25754. get(SwitchElement.prototype.__proto__ || Object.getPrototypeOf(SwitchElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  25755. }
  25756. /**
  25757. * @event change
  25758. * @description
  25759. * [en]Fired when the switch is toggled.[/en]
  25760. * [ja]ON/OFFが変わった時に発火します。[/ja]
  25761. * @param {Object} event
  25762. * [en]Event object.[/en]
  25763. * [ja]イベントオブジェクト。[/ja]
  25764. * @param {Object} event.switch
  25765. * [en]Switch object.[/en]
  25766. * [ja]イベントが発火したSwitchオブジェクトを返します。[/ja]
  25767. * @param {Boolean} event.value
  25768. * [en]Current value.[/en]
  25769. * [ja]現在の値を返します。[/ja]
  25770. * @param {Boolean} event.isInteractive
  25771. * [en]True if the change was triggered by the user clicking on the switch.[/en]
  25772. * [ja]タップやクリックなどのユーザの操作によって変わった場合にはtrueを返します。[/ja]
  25773. */
  25774. /**
  25775. * @attribute modifier
  25776. * @type {String}
  25777. * @description
  25778. * [en]The appearance of the switch.[/en]
  25779. * [ja]スイッチの表現を指定します。[/ja]
  25780. */
  25781. /**
  25782. * @attribute disabled
  25783. * @description
  25784. * [en]Whether the switch is be disabled.[/en]
  25785. * [ja]スイッチを無効の状態にする場合に指定します。[/ja]
  25786. */
  25787. /**
  25788. * @attribute checked
  25789. * @description
  25790. * [en]Whether the switch is checked.[/en]
  25791. * [ja]スイッチがONの状態にするときに指定します。[/ja]
  25792. */
  25793. /**
  25794. * @attribute input-id
  25795. * @type {String}
  25796. * @description
  25797. * [en]Specify the `id` attribute of the inner `<input>` element. This is useful when using `<label for="...">` elements.[/en]
  25798. * [ja][/ja]
  25799. */
  25800. /**
  25801. * @property checked
  25802. * @type {Boolean}
  25803. * @description
  25804. * [en]This value is `true` if the switch is checked.[/en]
  25805. * [ja]スイッチがONの場合に`true`。[/ja]
  25806. */
  25807. /**
  25808. * @property value
  25809. * @type {String}
  25810. * @description
  25811. * [en]The current value of the input.[/en]
  25812. * [ja][/ja]
  25813. */
  25814. /**
  25815. * @property disabled
  25816. * @type {Boolean}
  25817. * @description
  25818. * [en]Whether the element is disabled or not.[/en]
  25819. * [ja]無効化されている場合に`true`。[/ja]
  25820. */
  25821. /**
  25822. * @property checkbox
  25823. * @readonly
  25824. * @type {HTMLElement}
  25825. * @description
  25826. * [en]The underlying checkbox element.[/en]
  25827. * [ja]コンポーネント内部のcheckbox要素になります。[/ja]
  25828. */
  25829. }, {
  25830. key: '_scheme',
  25831. get: function get$$1() {
  25832. return scheme$28;
  25833. }
  25834. }, {
  25835. key: '_defaultClassName',
  25836. get: function get$$1() {
  25837. return 'switch';
  25838. }
  25839. }, {
  25840. key: '_template',
  25841. get: function get$$1() {
  25842. return '\n <input type="' + this.type + '" class="' + this._defaultClassName + '__input">\n <div class="' + this._defaultClassName + '__toggle">\n <div class="' + this._defaultClassName + '__handle">\n <div class="' + this._defaultClassName + '__touch"></div>\n </div>\n </div>\n ';
  25843. }
  25844. }, {
  25845. key: 'type',
  25846. get: function get$$1() {
  25847. return 'checkbox';
  25848. }
  25849. }, {
  25850. key: '_handle',
  25851. get: function get$$1() {
  25852. return this.querySelector('.' + this._defaultClassName + '__handle');
  25853. }
  25854. }, {
  25855. key: 'checkbox',
  25856. get: function get$$1() {
  25857. return this._input;
  25858. }
  25859. }], [{
  25860. key: 'observedAttributes',
  25861. get: function get$$1() {
  25862. return [].concat(toConsumableArray(get(SwitchElement.__proto__ || Object.getPrototypeOf(SwitchElement), 'observedAttributes', this)), ['modifier']);
  25863. }
  25864. }]);
  25865. return SwitchElement;
  25866. }(BaseCheckboxElement);
  25867. onsElements.Switch = SwitchElement;
  25868. customElements.define('ons-switch', SwitchElement);
  25869. /*
  25870. Copyright 2013-2015 ASIAL CORPORATION
  25871. Licensed under the Apache License, Version 2.0 (the "License");
  25872. you may not use this file except in compliance with the License.
  25873. You may obtain a copy of the License at
  25874. http://www.apache.org/licenses/LICENSE-2.0
  25875. Unless required by applicable law or agreed to in writing, software
  25876. distributed under the License is distributed on an "AS IS" BASIS,
  25877. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  25878. See the License for the specific language governing permissions and
  25879. limitations under the License.
  25880. */
  25881. var scheme$30 = {
  25882. '.tabbar__content': 'tabbar--*__content',
  25883. '.tabbar__border': 'tabbar--*__border',
  25884. '.tabbar': 'tabbar--*'
  25885. };
  25886. var rewritables$3 = {
  25887. /**
  25888. * @param {Element} tabbarElement
  25889. * @param {Function} callback
  25890. */
  25891. ready: function ready(tabbarElement, callback) {
  25892. callback();
  25893. }
  25894. };
  25895. var lerp = function lerp(x0, x1, t) {
  25896. return (1 - t) * x0 + t * x1;
  25897. };
  25898. /**
  25899. * @element ons-tabbar
  25900. * @category tabbar
  25901. * @description
  25902. * [en]A component to display a tab bar on the bottom of a page. Used with `<ons-tab>` to manage pages using tabs.[/en]
  25903. * [ja]タブバーをページ下部に表示するためのコンポーネントです。ons-tabと組み合わせて使うことで、ページを管理できます。[/ja]
  25904. * @codepen pGuDL
  25905. * @tutorial vanilla/Reference/tabbar
  25906. * @modifier material
  25907. * [en]A tabbar in Material Design.[/en]
  25908. * [ja][/ja]
  25909. * @modifier autogrow
  25910. * [en]Tabs automatically grow depending on their content instead of having a fixed width.[/en]
  25911. * [ja][/ja]
  25912. * @modifier top-border
  25913. * [en]Shows a static border-bottom in tabs for iOS top tabbars.[/en]
  25914. * [ja][/ja]
  25915. * @guide fundamentals.html#managing-pages
  25916. * [en]Managing multiple pages.[/en]
  25917. * [ja]複数のページを管理する[/ja]
  25918. * @seealso ons-tab
  25919. * [en]The `<ons-tab>` component.[/en]
  25920. * [ja]ons-tabコンポーネント[/ja]
  25921. * @seealso ons-page
  25922. * [en]The `<ons-page>` component.[/en]
  25923. * [ja]ons-pageコンポーネント[/ja]
  25924. * @example
  25925. * <ons-tabbar>
  25926. * <ons-tab
  25927. * page="home.html"
  25928. * label="Home"
  25929. * active>
  25930. * </ons-tab>
  25931. * <ons-tab
  25932. * page="settings.html"
  25933. * label="Settings"
  25934. * active>
  25935. * </ons-tab>
  25936. * </ons-tabbar>
  25937. *
  25938. * <template id="home.html">
  25939. * ...
  25940. * </template>
  25941. *
  25942. * <template id="settings.html">
  25943. * ...
  25944. * </template>
  25945. */
  25946. var TabbarElement = function (_BaseElement) {
  25947. inherits(TabbarElement, _BaseElement);
  25948. /**
  25949. * @event prechange
  25950. * @description
  25951. * [en]Fires just before the tab is changed.[/en]
  25952. * [ja]アクティブなタブが変わる前に発火します。[/ja]
  25953. * @param {Object} event
  25954. * [en]Event object.[/en]
  25955. * [ja]イベントオブジェクト。[/ja]
  25956. * @param {Number} event.index
  25957. * [en]Current index.[/en]
  25958. * [ja]現在アクティブになっているons-tabのインデックスを返します。[/ja]
  25959. * @param {Object} event.tabItem
  25960. * [en]Tab item object.[/en]
  25961. * [ja]tabItemオブジェクト。[/ja]
  25962. * @param {Function} event.cancel
  25963. * [en]Call this function to cancel the change event.[/en]
  25964. * [ja]この関数を呼び出すと、アクティブなタブの変更がキャンセルされます。[/ja]
  25965. */
  25966. /**
  25967. * @event postchange
  25968. * @description
  25969. * [en]Fires just after the tab is changed.[/en]
  25970. * [ja]アクティブなタブが変わった後に発火します。[/ja]
  25971. * @param {Object} event
  25972. * [en]Event object.[/en]
  25973. * [ja]イベントオブジェクト。[/ja]
  25974. * @param {Number} event.index
  25975. * [en]Current index.[/en]
  25976. * [ja]現在アクティブになっているons-tabのインデックスを返します。[/ja]
  25977. * @param {Object} event.tabItem
  25978. * [en]Tab item object.[/en]
  25979. * [ja]tabItemオブジェクト。[/ja]
  25980. */
  25981. /**
  25982. * @event reactive
  25983. * @description
  25984. * [en]Fires if the already open tab is tapped again.[/en]
  25985. * [ja]すでにアクティブになっているタブがもう一度タップやクリックされた場合に発火します。[/ja]
  25986. * @param {Object} event
  25987. * [en]Event object.[/en]
  25988. * [ja]イベントオブジェクト。[/ja]
  25989. * @param {Number} event.index
  25990. * [en]Current index.[/en]
  25991. * [ja]現在アクティブになっているons-tabのインデックスを返します。[/ja]
  25992. * @param {Object} event.tabItem
  25993. * [en]Tab item object.[/en]
  25994. * [ja]tabItemオブジェクト。[/ja]
  25995. */
  25996. /**
  25997. * @attribute animation
  25998. * @type {String}
  25999. * @default none
  26000. * @description
  26001. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  26002. * [ja][/ja]
  26003. */
  26004. /**
  26005. * @attribute animation-options
  26006. * @type {Expression}
  26007. * @description
  26008. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  26009. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. {duration: 0.2, delay: 1, timing: 'ease-in'}[/ja]
  26010. */
  26011. /**
  26012. * @attribute position
  26013. * @initonly
  26014. * @type {String}
  26015. * @default bottom
  26016. * @description
  26017. * [en]Tabbar's position. Available values are `"bottom"` and `"top"`. Use `"auto"` to choose position depending on platform (bottom for iOS flat design, top for Material Design).[/en]
  26018. * [ja]タブバーの位置を指定します。"bottom"もしくは"top"を選択できます。デフォルトは"bottom"です。[/ja]
  26019. */
  26020. /**
  26021. * @attribute swipeable
  26022. * @description
  26023. * [en]If this attribute is set the tab bar can be scrolled by drag or swipe.[/en]
  26024. * [ja]この属性がある時、タブバーをスワイプやドラッグで移動できるようになります。[/ja]
  26025. */
  26026. /**
  26027. * @attribute ignore-edge-width
  26028. * @type {Number}
  26029. * @default 20
  26030. * @description
  26031. * [en]Distance in pixels from both edges. Swiping on these areas will prioritize parent components such as `ons-splitter` or `ons-navigator`.[/en]
  26032. * [ja][/ja]
  26033. */
  26034. /**
  26035. * @attribute hide-tabs
  26036. * @description
  26037. * [en]Whether to hide the tabs.[/en]
  26038. * [ja]タブを非表示にする場合に指定します。[/ja]
  26039. */
  26040. /**
  26041. * @attribute tab-border
  26042. * @description
  26043. * [en]If this attribute is set the tabs show a dynamic bottom border. Only works for iOS flat design since the border is always visible in Material Design.[/en]
  26044. * [ja][/ja]
  26045. */
  26046. /**
  26047. * @attribute modifier
  26048. * @type {String}
  26049. * @description
  26050. * [en]The appearance of the tabbar.[/en]
  26051. * [ja]タブバーの表現を指定します。[/ja]
  26052. */
  26053. function TabbarElement() {
  26054. classCallCheck(this, TabbarElement);
  26055. var _this = possibleConstructorReturn(this, (TabbarElement.__proto__ || Object.getPrototypeOf(TabbarElement)).call(this));
  26056. _this._loadInactive = util$1.defer(); // Improves #2324
  26057. contentReady(_this, function () {
  26058. return _this._compile();
  26059. });
  26060. return _this;
  26061. }
  26062. createClass(TabbarElement, [{
  26063. key: 'connectedCallback',
  26064. value: function connectedCallback() {
  26065. var _this2 = this;
  26066. if (!this._swiper) {
  26067. this._swiper = new Swiper({
  26068. getElement: function getElement() {
  26069. return _this2._contentElement;
  26070. },
  26071. getInitialIndex: function getInitialIndex() {
  26072. return _this2.getAttribute('activeIndex') || _this2.getAttribute('active-index');
  26073. },
  26074. getAutoScrollRatio: this._getAutoScrollRatio.bind(this),
  26075. getBubbleWidth: function getBubbleWidth() {
  26076. return parseInt(_this2.getAttribute('ignore-edge-width') || 25, 10);
  26077. },
  26078. isAutoScrollable: function isAutoScrollable() {
  26079. return true;
  26080. },
  26081. preChangeHook: this._onPreChange.bind(this),
  26082. postChangeHook: this._onPostChange.bind(this),
  26083. refreshHook: this._onRefresh.bind(this),
  26084. scrollHook: this._onScroll.bind(this)
  26085. });
  26086. contentReady(this, function () {
  26087. _this2._tabbarBorder = util$1.findChild(_this2._tabbarElement, '.tabbar__border');
  26088. _this2._swiper.init({ swipeable: _this2.hasAttribute('swipeable') });
  26089. });
  26090. }
  26091. contentReady(this, function () {
  26092. _this2._updatePosition();
  26093. if (!util$1.findParent(_this2, 'ons-page', function (p) {
  26094. return p === document.body;
  26095. })) {
  26096. _this2._show(); // This tabbar is the top component
  26097. }
  26098. });
  26099. }
  26100. }, {
  26101. key: 'disconnectedCallback',
  26102. value: function disconnectedCallback() {
  26103. if (this._swiper && this._swiper.initialized) {
  26104. this._swiper.dispose();
  26105. this._swiper = null;
  26106. this._tabbarBorder = null;
  26107. this._tabsRect = null;
  26108. }
  26109. }
  26110. }, {
  26111. key: '_normalizeEvent',
  26112. value: function _normalizeEvent(event) {
  26113. return _extends({}, event, { index: event.activeIndex, tabItem: this.tabs[event.activeIndex] });
  26114. }
  26115. }, {
  26116. key: '_onPostChange',
  26117. value: function _onPostChange(event) {
  26118. event = this._normalizeEvent(event);
  26119. util$1.triggerElementEvent(this, 'postchange', event);
  26120. var page = event.tabItem.pageElement;
  26121. page && page._show();
  26122. }
  26123. }, {
  26124. key: '_onPreChange',
  26125. value: function _onPreChange(event) {
  26126. event = this._normalizeEvent(event);
  26127. event.cancel = function () {
  26128. return event.canceled = true;
  26129. };
  26130. util$1.triggerElementEvent(this, 'prechange', event);
  26131. if (!event.canceled) {
  26132. var _event = event,
  26133. activeIndex = _event.activeIndex,
  26134. lastActiveIndex = _event.lastActiveIndex;
  26135. var tabs = this.tabs;
  26136. tabs[activeIndex].setActive(true);
  26137. if (lastActiveIndex >= 0) {
  26138. var prevTab = tabs[lastActiveIndex];
  26139. prevTab.setActive(false);
  26140. prevTab.pageElement && prevTab.pageElement._hide();
  26141. }
  26142. }
  26143. return event.canceled;
  26144. }
  26145. }, {
  26146. key: '_onScroll',
  26147. value: function _onScroll(index) {
  26148. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  26149. if (this._tabbarBorder) {
  26150. this._tabbarBorder.style.transition = 'all ' + (options.duration || 0) + 's ' + (options.timing || '');
  26151. if (this._autogrow && this._tabsRect.length > 0) {
  26152. var a = Math.floor(index),
  26153. b = Math.ceil(index),
  26154. r = index % 1;
  26155. this._tabbarBorder.style.width = lerp(this._tabsRect[a].width, this._tabsRect[b].width, r) + 'px';
  26156. this._tabbarBorder.style.transform = 'translate3d(' + lerp(this._tabsRect[a].left, this._tabsRect[b].left, r) + 'px, 0, 0)';
  26157. } else {
  26158. this._tabbarBorder.style.transform = 'translate3d(' + index * 100 + '%, 0, 0)';
  26159. }
  26160. }
  26161. this._onSwipe && this._onSwipe(index, options);
  26162. }
  26163. }, {
  26164. key: '_onRefresh',
  26165. value: function _onRefresh() {
  26166. this._autogrow = util$1.hasModifier(this, 'autogrow');
  26167. this._tabsRect = this.tabs.map(function (tab) {
  26168. return tab.getBoundingClientRect();
  26169. });
  26170. if (this._tabbarBorder) {
  26171. this._tabbarBorder.style.display = this.hasAttribute('tab-border') || util$1.hasModifier(this, 'material') ? 'block' : 'none';
  26172. var index = this.getActiveTabIndex();
  26173. if (this._tabsRect.length > 0 && index >= 0) {
  26174. this._tabbarBorder.style.width = this._tabsRect[index].width + 'px';
  26175. }
  26176. }
  26177. }
  26178. }, {
  26179. key: '_getAutoScrollRatio',
  26180. value: function _getAutoScrollRatio(matches, velocity, size) {
  26181. var ratio = .6; // Base ratio
  26182. var modifier = size / 300 * (matches ? -1 : 1); // Based on screen size
  26183. return Math.min(1, Math.max(0, ratio + velocity * modifier));
  26184. }
  26185. }, {
  26186. key: '_compile',
  26187. value: function _compile() {
  26188. autoStyle.prepare(this);
  26189. var content = this._contentElement || util$1.create('.tabbar__content');
  26190. content.classList.add('ons-tabbar__content');
  26191. var tabbar = this._tabbarElement || util$1.create('.tabbar');
  26192. tabbar.classList.add('ons-tabbar__footer');
  26193. if (!tabbar.parentNode) {
  26194. while (this.firstChild) {
  26195. tabbar.appendChild(this.firstChild);
  26196. }
  26197. }
  26198. var activeIndex = Number(this.getAttribute('activeIndex')); // 0 by default
  26199. if (tabbar.children.length > activeIndex && !util$1.findChild(tabbar, '[active]')) {
  26200. tabbar.children[activeIndex].setAttribute('active', '');
  26201. }
  26202. this._tabbarBorder = util$1.findChild(tabbar, '.tabbar__border') || util$1.create('.tabbar__border');
  26203. tabbar.appendChild(this._tabbarBorder);
  26204. tabbar.classList.add('ons-swiper-tabbar'); // Hides material border
  26205. !content.children[0] && content.appendChild(document.createElement('div'));
  26206. !content.children[1] && content.appendChild(document.createElement('div'));
  26207. content.appendChild = content.appendChild.bind(content.children[0]);
  26208. content.insertBefore = content.insertBefore.bind(content.children[0]);
  26209. this.appendChild(content);
  26210. this.appendChild(tabbar); // Triggers ons-tab connectedCallback
  26211. ModifierUtil.initModifier(this, scheme$30);
  26212. }
  26213. }, {
  26214. key: '_updatePosition',
  26215. value: function _updatePosition() {
  26216. var _this3 = this;
  26217. var position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getAttribute('position');
  26218. var top = this._top = position === 'top' || position === 'auto' && util$1.hasModifier(this, 'material');
  26219. var action = top ? util$1.addModifier : util$1.removeModifier;
  26220. action(this, 'top');
  26221. var page = util$1.findParent(this, 'ons-page');
  26222. if (page) {
  26223. contentReady(page, function () {
  26224. var p = 0;
  26225. if (page.children[0] && util$1.match(page.children[0], 'ons-toolbar')) {
  26226. action(page.children[0], 'noshadow');
  26227. p = 1; // Visual fix for some devices
  26228. }
  26229. var content = page._getContentElement();
  26230. var cs = window.getComputedStyle(page._getContentElement(), null);
  26231. _this3.style.top = top ? parseInt(cs.getPropertyValue('padding-top'), 10) - p + 'px' : '';
  26232. // Refresh content top - Fix for iOS 8
  26233. content.style.top = cs.top;
  26234. content.style.top = '';
  26235. });
  26236. }
  26237. internal$1.autoStatusBarFill(function () {
  26238. var filled = util$1.findParent(_this3, function (e) {
  26239. return e.hasAttribute('status-bar-fill');
  26240. });
  26241. util$1.toggleAttribute(_this3, 'status-bar-fill', top && !filled);
  26242. });
  26243. }
  26244. }, {
  26245. key: 'setActiveTab',
  26246. /**
  26247. * @method setActiveTab
  26248. * @signature setActiveTab(index, [options])
  26249. * @param {Number} index
  26250. * [en]Tab index.[/en]
  26251. * [ja]タブのインデックスを指定します。[/ja]
  26252. * @param {Object} [options]
  26253. * [en]Parameter object.[/en]
  26254. * [ja]オプションを指定するオブジェクト。[/ja]
  26255. * @param {Function} [options.callback]
  26256. * [en]Function that runs when the new page has loaded.[/en]
  26257. * [ja][/ja]
  26258. * @param {String} [options.animation]
  26259. * [en]If this option is "none", the transition won't slide.[/en]
  26260. * [ja][/ja]
  26261. * @param {String} [options.animationOptions]
  26262. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  26263. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  26264. * @description
  26265. * [en]Show specified tab page. Animations and their options can be specified by the second parameter.[/en]
  26266. * [ja]指定したインデックスのタブを表示します。アニメーションなどのオプションを指定できます。[/ja]
  26267. * @return {Promise}
  26268. * [en]A promise that resolves to the new page element.[/en]
  26269. * [ja][/ja]
  26270. */
  26271. value: function setActiveTab(nextIndex) {
  26272. var _this4 = this;
  26273. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  26274. var prevIndex = this.getActiveTabIndex();
  26275. var prevTab = this.tabs[prevIndex],
  26276. nextTab = this.tabs[nextIndex];
  26277. if (!nextTab) {
  26278. return Promise.reject('Specified index does not match any tab.');
  26279. }
  26280. if (nextIndex === prevIndex) {
  26281. util$1.triggerElementEvent(this, 'reactive', { index: nextIndex, activeIndex: nextIndex, tabItem: nextTab });
  26282. return Promise.resolve(nextTab.pageElement);
  26283. }
  26284. // FIXME: nextTab.loaded is broken in Zone.js promises (Angular2)
  26285. var nextPage = nextTab.pageElement;
  26286. return (nextPage ? Promise.resolve(nextPage) : nextTab.loaded).then(function (nextPage) {
  26287. return _this4._swiper.setActiveIndex(nextIndex, _extends({
  26288. reject: true
  26289. }, options, {
  26290. animation: prevTab && nextPage ? options.animation || _this4.getAttribute('animation') : 'none',
  26291. animationOptions: util$1.extend({ duration: .3, timing: 'cubic-bezier(.4, .7, .5, 1)' }, _this4.hasAttribute('animation-options') ? util$1.animationOptionsParse(_this4.getAttribute('animation-options')) : {}, options.animationOptions || {})
  26292. })).then(function () {
  26293. options.callback instanceof Function && options.callback(nextPage);
  26294. return nextPage;
  26295. });
  26296. });
  26297. }
  26298. /**
  26299. * @method setTabbarVisibility
  26300. * @signature setTabbarVisibility(visible)
  26301. * @param {Boolean} visible
  26302. * @description
  26303. * [en]Used to hide or show the tab bar.[/en]
  26304. * [ja][/ja]
  26305. */
  26306. }, {
  26307. key: 'setTabbarVisibility',
  26308. value: function setTabbarVisibility(visible) {
  26309. var _this5 = this;
  26310. contentReady(this, function () {
  26311. _this5._contentElement.style[_this5._top ? 'top' : 'bottom'] = visible ? '' : '0px';
  26312. _this5._tabbarElement.style.display = visible ? '' : 'none';
  26313. visible && _this5._onRefresh();
  26314. });
  26315. }
  26316. }, {
  26317. key: 'show',
  26318. value: function show() {
  26319. this.setTabbarVisibility(true);
  26320. }
  26321. }, {
  26322. key: 'hide',
  26323. value: function hide() {
  26324. this.setTabbarVisibility(false);
  26325. }
  26326. /**
  26327. * @property visible
  26328. * @readonly
  26329. * @type {Boolean}
  26330. * @description
  26331. * [en]Whether the tabbar is visible or not.[/en]
  26332. * [ja]タブバーが見える場合に`true`。[/ja]
  26333. */
  26334. }, {
  26335. key: 'getActiveTabIndex',
  26336. /**
  26337. * @method getActiveTabIndex
  26338. * @signature getActiveTabIndex()
  26339. * @return {Number}
  26340. * [en]The index of the currently active tab.[/en]
  26341. * [ja]現在アクティブになっているタブのインデックスを返します。[/ja]
  26342. * @description
  26343. * [en]Returns tab index on current active tab. If active tab is not found, returns -1.[/en]
  26344. * [ja]現在アクティブになっているタブのインデックスを返します。現在アクティブなタブがない場合には-1を返します。[/ja]
  26345. */
  26346. value: function getActiveTabIndex() {
  26347. var tabs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.tabs;
  26348. for (var i = 0; i < tabs.length; i++) {
  26349. if (tabs[i] && tabs[i].tagName === 'ONS-TAB' && tabs[i].isActive()) {
  26350. return i;
  26351. }
  26352. }
  26353. return -1;
  26354. }
  26355. }, {
  26356. key: '_show',
  26357. value: function _show() {
  26358. var _this6 = this;
  26359. this._swiper.show();
  26360. setImmediate(function () {
  26361. var tabs = _this6.tabs;
  26362. var activeIndex = _this6.getActiveTabIndex(tabs);
  26363. _this6._loadInactive.resolve();
  26364. if (tabs.length > 0 && activeIndex >= 0) {
  26365. tabs[activeIndex].loaded.then(function (el) {
  26366. return el && setImmediate(function () {
  26367. return el._show();
  26368. });
  26369. });
  26370. }
  26371. });
  26372. }
  26373. }, {
  26374. key: '_hide',
  26375. value: function _hide() {
  26376. this._swiper.hide();
  26377. var topPage = this.topPage;
  26378. topPage && topPage._hide();
  26379. }
  26380. }, {
  26381. key: '_destroy',
  26382. value: function _destroy() {
  26383. this.tabs.forEach(function (tab) {
  26384. return tab.remove();
  26385. });
  26386. this.remove();
  26387. }
  26388. }, {
  26389. key: 'attributeChangedCallback',
  26390. value: function attributeChangedCallback(name, last, current) {
  26391. if (name === 'modifier') {
  26392. ModifierUtil.onModifierChanged(last, current, this, scheme$30);
  26393. var isTop = function isTop(m) {
  26394. return (/(^|\s+)top($|\s+)/i.test(m)
  26395. );
  26396. };
  26397. isTop(last) !== isTop(current) && this._updatePosition();
  26398. } else if (name === 'position') {
  26399. util$1.isAttached(this) && this._updatePosition();
  26400. } else if (name === 'swipeable') {
  26401. this._swiper && this._swiper.updateSwipeable(this.hasAttribute('swipeable'));
  26402. } else if (name === 'hide-tabs') {
  26403. this.setTabbarVisibility(!this.hasAttribute('hide-tabs') || current === 'false');
  26404. }
  26405. }
  26406. }, {
  26407. key: '_tabbarElement',
  26408. get: function get$$1() {
  26409. return util$1.findChild(this, '.tabbar');
  26410. }
  26411. }, {
  26412. key: '_contentElement',
  26413. get: function get$$1() {
  26414. return util$1.findChild(this, '.tabbar__content');
  26415. }
  26416. }, {
  26417. key: '_targetElement',
  26418. get: function get$$1() {
  26419. var content = this._contentElement;
  26420. return content && content.children[0] || null;
  26421. }
  26422. }, {
  26423. key: 'topPage',
  26424. get: function get$$1() {
  26425. var tabs = this.tabs,
  26426. index = this.getActiveTabIndex();
  26427. return tabs[index] ? tabs[index].pageElement || this.pages[0] || null : null;
  26428. }
  26429. }, {
  26430. key: 'pages',
  26431. get: function get$$1() {
  26432. return util$1.arrayFrom(this._targetElement.children);
  26433. }
  26434. }, {
  26435. key: 'tabs',
  26436. get: function get$$1() {
  26437. return Array.prototype.filter.call(this._tabbarElement.children, function (e) {
  26438. return e.tagName === 'ONS-TAB';
  26439. });
  26440. }
  26441. }, {
  26442. key: 'visible',
  26443. get: function get$$1() {
  26444. return this._tabbarElement.style.display !== 'none';
  26445. }
  26446. /**
  26447. * @property swipeable
  26448. * @type {Boolean}
  26449. * @description
  26450. * [en]Enable swipe interaction.[/en]
  26451. * [ja]swipeableであればtrueを返します。[/ja]
  26452. */
  26453. }, {
  26454. key: 'swipeable',
  26455. get: function get$$1() {
  26456. return this.hasAttribute('swipeable');
  26457. },
  26458. set: function set$$1(value) {
  26459. return util$1.toggleAttribute(this, 'swipeable', value);
  26460. }
  26461. /**
  26462. * @property onSwipe
  26463. * @type {Function}
  26464. * @description
  26465. * [en]Hook called whenever the user slides the tabbar. It gets a decimal index and an animationOptions object as arguments.[/en]
  26466. * [ja][/ja]
  26467. */
  26468. }, {
  26469. key: 'onSwipe',
  26470. get: function get$$1() {
  26471. return this._onSwipe;
  26472. },
  26473. set: function set$$1(value) {
  26474. if (value && !(value instanceof Function)) {
  26475. util$1.throw('"onSwipe" must be a function');
  26476. }
  26477. this._onSwipe = value;
  26478. }
  26479. }], [{
  26480. key: 'observedAttributes',
  26481. get: function get$$1() {
  26482. return ['modifier', 'position', 'swipeable', 'tab-border', 'hide-tabs'];
  26483. }
  26484. }, {
  26485. key: 'rewritables',
  26486. get: function get$$1() {
  26487. return rewritables$3;
  26488. }
  26489. }, {
  26490. key: 'events',
  26491. get: function get$$1() {
  26492. return ['prechange', 'postchange', 'reactive'];
  26493. }
  26494. }]);
  26495. return TabbarElement;
  26496. }(BaseElement);
  26497. onsElements.Tabbar = TabbarElement;
  26498. customElements.define('ons-tabbar', TabbarElement);
  26499. /*
  26500. Copyright 2013-2015 ASIAL CORPORATION
  26501. Licensed under the Apache License, Version 2.0 (the "License");
  26502. you may not use this file except in compliance with the License.
  26503. You may obtain a copy of the License at
  26504. http://www.apache.org/licenses/LICENSE-2.0
  26505. Unless required by applicable law or agreed to in writing, software
  26506. distributed under the License is distributed on an "AS IS" BASIS,
  26507. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  26508. See the License for the specific language governing permissions and
  26509. limitations under the License.
  26510. */
  26511. var defaultClassName$16 = 'tabbar__item';
  26512. var scheme$29 = {
  26513. '': 'tabbar--*__item',
  26514. '.tabbar__button': 'tabbar--*__button'
  26515. };
  26516. /**
  26517. * @element ons-tab
  26518. * @category tabbar
  26519. * @description
  26520. * [en]Represents a tab inside tab bar. Each `<ons-tab>` represents a page.[/en]
  26521. * [ja]
  26522. * タブバーに配置される各アイテムのコンポーネントです。それぞれのons-tabはページを表します。
  26523. * ons-tab要素の中には、タブに表示されるコンテンツを直接記述することが出来ます。
  26524. * [/ja]
  26525. * @codepen pGuDL
  26526. * @tutorial vanilla/Reference/tabbar
  26527. * @guide fundamentals.html#managing-pages
  26528. * [en]Managing multiple pages.[/en]
  26529. * [ja]複数のページを管理する[/ja]]
  26530. * @guide appsize.html#removing-icon-packs [en]Removing icon packs.[/en][ja][/ja]
  26531. * @guide faq.html#how-can-i-use-custom-icon-packs [en]Adding custom icon packs.[/en][ja][/ja]
  26532. * @seealso ons-tabbar
  26533. * [en]ons-tabbar component[/en]
  26534. * [ja]ons-tabbarコンポーネント[/ja]
  26535. * @seealso ons-page
  26536. * [en]ons-page component[/en]
  26537. * [ja]ons-pageコンポーネント[/ja]
  26538. * @seealso ons-icon
  26539. * [en]ons-icon component[/en]
  26540. * [ja]ons-iconコンポーネント[/ja]
  26541. * @example
  26542. * <ons-tabbar>
  26543. * <ons-tab
  26544. * page="home.html"
  26545. * label="Home"
  26546. * active>
  26547. * </ons-tab>
  26548. * <ons-tab
  26549. * page="settings.html"
  26550. * label="Settings"
  26551. * active>
  26552. * </ons-tab>
  26553. * </ons-tabbar>
  26554. *
  26555. * <template id="home.html">
  26556. * ...
  26557. * </template>
  26558. *
  26559. * <template id="settings.html">
  26560. * ...
  26561. * </template>
  26562. */
  26563. var TabElement = function (_BaseElement) {
  26564. inherits(TabElement, _BaseElement);
  26565. /**
  26566. * @attribute page
  26567. * @initonly
  26568. * @type {String}
  26569. * @description
  26570. * [en]The page that is displayed when the tab is tapped.[/en]
  26571. * [ja]ons-tabが参照するページへのURLを指定します。[/ja]
  26572. */
  26573. /**
  26574. * @attribute icon
  26575. * @type {String}
  26576. * @description
  26577. * [en]
  26578. * The icon name for the tab. Can specify the same icon name as `<ons-icon>`. Check [See also](#seealso) section for more information.
  26579. * [/en]
  26580. * [ja]
  26581. * アイコン名を指定します。ons-iconと同じアイコン名を指定できます。
  26582. * 個別にアイコンをカスタマイズする場合は、background-imageなどのCSSスタイルを用いて指定できます。
  26583. * [/ja]
  26584. */
  26585. /**
  26586. * @attribute active-icon
  26587. * @type {String}
  26588. * @description
  26589. * [en]The name of the icon when the tab is active.[/en]
  26590. * [ja]アクティブの際のアイコン名を指定します。[/ja]
  26591. */
  26592. /**
  26593. * @attribute label
  26594. * @type {String}
  26595. * @description
  26596. * [en]The label of the tab item.[/en]
  26597. * [ja]アイコン下に表示されるラベルを指定します。[/ja]
  26598. */
  26599. /**
  26600. * @attribute badge
  26601. * @type {String}
  26602. * @description
  26603. * [en]Display a notification badge on top of the tab.[/en]
  26604. * [ja]バッジに表示する内容を指定します。[/ja]
  26605. */
  26606. /**
  26607. * @attribute active
  26608. * @description
  26609. * [en]This attribute should be set to the tab that is active by default.[/en]
  26610. * [ja][/ja]
  26611. */
  26612. function TabElement() {
  26613. classCallCheck(this, TabElement);
  26614. var _this = possibleConstructorReturn(this, (TabElement.__proto__ || Object.getPrototypeOf(TabElement)).call(this));
  26615. if (['label', 'icon', 'badge'].some(_this.hasAttribute.bind(_this))) {
  26616. _this._compile();
  26617. } else {
  26618. contentReady(_this, function () {
  26619. return _this._compile();
  26620. });
  26621. }
  26622. _this._pageLoader = defaultPageLoader;
  26623. _this._onClick = _this._onClick.bind(_this);
  26624. return _this;
  26625. }
  26626. createClass(TabElement, [{
  26627. key: '_compile',
  26628. value: function _compile() {
  26629. autoStyle.prepare(this);
  26630. this.classList.add(defaultClassName$16);
  26631. if (this._button) {
  26632. return;
  26633. }
  26634. var button = util$1.create('button.tabbar__button');
  26635. while (this.childNodes[0]) {
  26636. button.appendChild(this.childNodes[0]);
  26637. }
  26638. var input = util$1.create('input', { display: 'none' });
  26639. input.type = 'radio';
  26640. this.appendChild(input);
  26641. this.appendChild(button);
  26642. this._updateButtonContent();
  26643. ModifierUtil.initModifier(this, scheme$29);
  26644. this._updateRipple();
  26645. }
  26646. }, {
  26647. key: '_updateRipple',
  26648. value: function _updateRipple() {
  26649. this._button && util$1.updateRipple(this._button, this.hasAttribute('ripple'));
  26650. }
  26651. }, {
  26652. key: '_updateButtonContent',
  26653. value: function _updateButtonContent() {
  26654. var _this2 = this;
  26655. var button = this._button;
  26656. var iconWrapper = this._icon;
  26657. if (this.hasAttribute('icon')) {
  26658. iconWrapper = iconWrapper || util$1.createElement('<div class="tabbar__icon"><ons-icon></ons-icon></div>');
  26659. var icon = iconWrapper.children[0];
  26660. var fix = function (last) {
  26661. return function () {
  26662. return icon.attributeChangedCallback('icon', last, _this2.getAttribute('icon'));
  26663. };
  26664. }(icon.getAttribute('icon'));
  26665. icon.setAttribute('icon', this.getAttribute('icon'));
  26666. iconWrapper.parentElement !== button && button.insertBefore(iconWrapper, button.firstChild);
  26667. // dirty fix for https://github.com/OnsenUI/OnsenUI/issues/1654
  26668. icon.attributeChangedCallback instanceof Function ? fix() : setImmediate(function () {
  26669. return icon.attributeChangedCallback instanceof Function && fix();
  26670. });
  26671. } else {
  26672. iconWrapper && iconWrapper.remove();
  26673. }
  26674. ['label', 'badge'].forEach(function (attr, index) {
  26675. var prop = _this2.querySelector('.tabbar__' + attr);
  26676. if (_this2.hasAttribute(attr)) {
  26677. prop = prop || util$1.create('.tabbar__' + attr + (attr === 'badge' ? ' notification' : ''));
  26678. prop.textContent = _this2.getAttribute(attr);
  26679. prop.parentElement !== button && button.appendChild(prop);
  26680. } else {
  26681. prop && prop.remove();
  26682. }
  26683. });
  26684. }
  26685. }, {
  26686. key: '_onClick',
  26687. value: function _onClick() {
  26688. if (this.onClick instanceof Function) {
  26689. this.onClick();
  26690. } else {
  26691. this._tabbar.setActiveTab(this.index, { reject: false });
  26692. }
  26693. }
  26694. }, {
  26695. key: 'setActive',
  26696. value: function setActive() {
  26697. var active = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  26698. this._input.checked = active;
  26699. this.classList.toggle('active', active);
  26700. util$1.toggleAttribute(this, 'active', active);
  26701. if (this.hasAttribute('icon') && this.hasAttribute('active-icon')) {
  26702. this._icon.children[0].setAttribute('icon', this.getAttribute(active ? 'active-icon' : 'icon'));
  26703. }
  26704. }
  26705. }, {
  26706. key: '_loadPageElement',
  26707. value: function _loadPageElement(parent, page) {
  26708. var _this3 = this;
  26709. this._hasLoaded = true;
  26710. return new Promise(function (resolve) {
  26711. _this3._pageLoader.load({ parent: parent, page: page }, function (pageElement) {
  26712. parent.replaceChild(pageElement, parent.children[_this3.index]); // Ensure position
  26713. _this3._loadedPage = pageElement;
  26714. resolve(pageElement);
  26715. });
  26716. });
  26717. }
  26718. }, {
  26719. key: 'isActive',
  26720. /**
  26721. * @return {Boolean}
  26722. */
  26723. value: function isActive() {
  26724. return this.classList.contains('active');
  26725. }
  26726. }, {
  26727. key: 'disconnectedCallback',
  26728. value: function disconnectedCallback() {
  26729. this.removeEventListener('click', this._onClick, false);
  26730. if (this._loadedPage) {
  26731. this._hasLoaded = false;
  26732. this.loaded = null;
  26733. }
  26734. }
  26735. }, {
  26736. key: 'connectedCallback',
  26737. value: function connectedCallback() {
  26738. var _this4 = this;
  26739. this.addEventListener('click', this._onClick, false);
  26740. if (!util$1.isAttached(this) || this.loaded) {
  26741. return; // ons-tabbar compilation may trigger this
  26742. }
  26743. var deferred = util$1.defer();
  26744. this.loaded = deferred.promise;
  26745. contentReady(this, function () {
  26746. var index = _this4.index;
  26747. var tabbar = _this4._tabbar;
  26748. if (!tabbar) {
  26749. util$1.throw('Tab elements must be children of Tabbar');
  26750. }
  26751. if (tabbar.hasAttribute('modifier')) {
  26752. util$1.addModifier(_this4, tabbar.getAttribute('modifier'));
  26753. }
  26754. if (!_this4._hasLoaded) {
  26755. if (_this4.hasAttribute('active')) {
  26756. _this4.setActive(true);
  26757. tabbar.setAttribute('activeIndex', index);
  26758. }
  26759. if (index === tabbar.tabs.length - 1) {
  26760. tabbar._onRefresh();
  26761. setImmediate(function () {
  26762. return tabbar._onRefresh();
  26763. });
  26764. }
  26765. TabbarElement.rewritables.ready(tabbar, function () {
  26766. var pageTarget = _this4.page || _this4.getAttribute('page');
  26767. if (!_this4.pageElement && pageTarget) {
  26768. var parentTarget = tabbar._targetElement;
  26769. var dummyPage = util$1.create('div', { height: '100%', width: '100%', visibility: 'hidden' });
  26770. parentTarget.insertBefore(dummyPage, parentTarget.children[index]); // Ensure position
  26771. var load = function load() {
  26772. return _this4._loadPageElement(parentTarget, pageTarget).then(deferred.resolve);
  26773. };
  26774. return _this4.isActive() ? load() : tabbar._loadInactive.promise.then(load);
  26775. }
  26776. return deferred.resolve(_this4.pageElement);
  26777. });
  26778. }
  26779. });
  26780. }
  26781. }, {
  26782. key: 'attributeChangedCallback',
  26783. value: function attributeChangedCallback(name, last, current) {
  26784. var _this5 = this;
  26785. switch (name) {
  26786. case 'class':
  26787. util$1.restoreClass(this, defaultClassName$16, scheme$29);
  26788. break;
  26789. case 'modifier':
  26790. contentReady(this, function () {
  26791. return ModifierUtil.onModifierChanged(last, current, _this5, scheme$29);
  26792. });
  26793. break;
  26794. case 'ripple':
  26795. contentReady(this, function () {
  26796. return _this5._updateRipple();
  26797. });
  26798. break;
  26799. case 'icon':
  26800. case 'label':
  26801. case 'badge':
  26802. contentReady(this, function () {
  26803. return _this5._updateButtonContent();
  26804. });
  26805. break;
  26806. case 'page':
  26807. this.page = current || '';
  26808. break;
  26809. }
  26810. }
  26811. }, {
  26812. key: 'pageLoader',
  26813. set: function set$$1(loader) {
  26814. if (!(loader instanceof PageLoader)) {
  26815. util$1.throwPageLoader();
  26816. }
  26817. this._pageLoader = loader;
  26818. },
  26819. get: function get$$1() {
  26820. return this._pageLoader;
  26821. }
  26822. }, {
  26823. key: '_input',
  26824. get: function get$$1() {
  26825. return util$1.findChild(this, 'input');
  26826. }
  26827. }, {
  26828. key: '_button',
  26829. get: function get$$1() {
  26830. return util$1.findChild(this, '.tabbar__button');
  26831. }
  26832. }, {
  26833. key: '_icon',
  26834. get: function get$$1() {
  26835. return this.querySelector('.tabbar__icon');
  26836. }
  26837. }, {
  26838. key: '_tabbar',
  26839. get: function get$$1() {
  26840. return util$1.findParent(this, 'ons-tabbar');
  26841. }
  26842. }, {
  26843. key: 'index',
  26844. get: function get$$1() {
  26845. return Array.prototype.indexOf.call(this.parentElement.children, this);
  26846. }
  26847. }, {
  26848. key: 'pageElement',
  26849. get: function get$$1() {
  26850. // It has been loaded by ons-tab
  26851. if (this._loadedPage) {
  26852. return this._loadedPage;
  26853. }
  26854. // Manually attached to DOM, 1 per tab
  26855. var tabbar = this._tabbar;
  26856. if (tabbar.pages.length === tabbar.tabs.length) {
  26857. return tabbar.pages[this.index];
  26858. }
  26859. // Loaded in another way
  26860. return null;
  26861. }
  26862. }], [{
  26863. key: 'observedAttributes',
  26864. get: function get$$1() {
  26865. return ['modifier', 'ripple', 'icon', 'label', 'page', 'badge', 'class'];
  26866. }
  26867. }]);
  26868. return TabElement;
  26869. }(BaseElement);
  26870. onsElements.Tab = TabElement;
  26871. customElements.define('ons-tab', TabElement);
  26872. /*
  26873. Copyright 2013-2015 ASIAL CORPORATION
  26874. Licensed under the Apache License, Version 2.0 (the "License");
  26875. you may not use this file except in compliance with the License.
  26876. You may obtain a copy of the License at
  26877. http://www.apache.org/licenses/LICENSE-2.0
  26878. Unless required by applicable law or agreed to in writing, software
  26879. distributed under the License is distributed on an "AS IS" BASIS,
  26880. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  26881. See the License for the specific language governing permissions and
  26882. limitations under the License.
  26883. */
  26884. var ToastAnimator = function (_BaseAnimator) {
  26885. inherits(ToastAnimator, _BaseAnimator);
  26886. /**
  26887. * @param {Object} options
  26888. * @param {String} options.timing
  26889. * @param {Number} options.duration
  26890. * @param {Number} options.delay
  26891. */
  26892. function ToastAnimator() {
  26893. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  26894. _ref$timing = _ref.timing,
  26895. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  26896. _ref$delay = _ref.delay,
  26897. delay = _ref$delay === undefined ? 0 : _ref$delay,
  26898. _ref$duration = _ref.duration,
  26899. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  26900. classCallCheck(this, ToastAnimator);
  26901. return possibleConstructorReturn(this, (ToastAnimator.__proto__ || Object.getPrototypeOf(ToastAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  26902. }
  26903. /**
  26904. * @param {HTMLElement} modal
  26905. * @param {Function} callback
  26906. */
  26907. createClass(ToastAnimator, [{
  26908. key: 'show',
  26909. value: function show(modal, callback) {
  26910. callback();
  26911. }
  26912. /**
  26913. * @param {HTMLElement} modal
  26914. * @param {Function} callback
  26915. */
  26916. }, {
  26917. key: 'hide',
  26918. value: function hide(modal, callback) {
  26919. callback();
  26920. }
  26921. }]);
  26922. return ToastAnimator;
  26923. }(BaseAnimator);
  26924. /*
  26925. Copyright 2013-2015 ASIAL CORPORATION
  26926. Licensed under the Apache License, Version 2.0 (the "License");
  26927. you may not use this file except in compliance with the License.
  26928. You may obtain a copy of the License at
  26929. http://www.apache.org/licenses/LICENSE-2.0
  26930. Unless required by applicable law or agreed to in writing, software
  26931. distributed under the License is distributed on an "AS IS" BASIS,
  26932. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  26933. See the License for the specific language governing permissions and
  26934. limitations under the License.
  26935. */
  26936. /**
  26937. * iOS style animator for dialog.
  26938. */
  26939. var FadeToastAnimator = function (_ToastAnimator) {
  26940. inherits(FadeToastAnimator, _ToastAnimator);
  26941. function FadeToastAnimator() {
  26942. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  26943. _ref$timing = _ref.timing,
  26944. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  26945. _ref$delay = _ref.delay,
  26946. delay = _ref$delay === undefined ? 0 : _ref$delay,
  26947. _ref$duration = _ref.duration,
  26948. duration = _ref$duration === undefined ? 0.3 : _ref$duration;
  26949. classCallCheck(this, FadeToastAnimator);
  26950. return possibleConstructorReturn(this, (FadeToastAnimator.__proto__ || Object.getPrototypeOf(FadeToastAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  26951. }
  26952. /**
  26953. * @param {HTMLElement} toast
  26954. * @param {Function} callback
  26955. */
  26956. createClass(FadeToastAnimator, [{
  26957. key: 'show',
  26958. value: function show(toast, callback) {
  26959. callback = callback ? callback : function () {};
  26960. Animit(toast, this.def).default({ opacity: 0 }, { opacity: 1 }).queue(function (done) {
  26961. callback();
  26962. done();
  26963. }).play();
  26964. }
  26965. /**
  26966. * @param {HTMLElement} toast
  26967. * @param {Function} callback
  26968. */
  26969. }, {
  26970. key: 'hide',
  26971. value: function hide(toast, callback) {
  26972. callback = callback ? callback : function () {};
  26973. Animit(toast, this.def).default({ opacity: 1 }, { opacity: 0 }).queue(function (done) {
  26974. callback();
  26975. done();
  26976. }).play();
  26977. }
  26978. }]);
  26979. return FadeToastAnimator;
  26980. }(ToastAnimator);
  26981. /*
  26982. Copyright 2013-2015 ASIAL CORPORATION
  26983. Licensed under the Apache License, Version 2.0 (the "License");
  26984. you may not use this file except in compliance with the License.
  26985. You may obtain a copy of the License at
  26986. http://www.apache.org/licenses/LICENSE-2.0
  26987. Unless required by applicable law or agreed to in writing, software
  26988. distributed under the License is distributed on an "AS IS" BASIS,
  26989. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  26990. See the License for the specific language governing permissions and
  26991. limitations under the License.
  26992. */
  26993. /**
  26994. * Ascend Toast Animator.
  26995. */
  26996. var AscendToastAnimator = function (_ToastAnimator) {
  26997. inherits(AscendToastAnimator, _ToastAnimator);
  26998. function AscendToastAnimator() {
  26999. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27000. _ref$timing = _ref.timing,
  27001. timing = _ref$timing === undefined ? 'ease' : _ref$timing,
  27002. _ref$delay = _ref.delay,
  27003. delay = _ref$delay === undefined ? 0 : _ref$delay,
  27004. _ref$duration = _ref.duration,
  27005. duration = _ref$duration === undefined ? 0.25 : _ref$duration;
  27006. classCallCheck(this, AscendToastAnimator);
  27007. var _this = possibleConstructorReturn(this, (AscendToastAnimator.__proto__ || Object.getPrototypeOf(AscendToastAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  27008. _this.messageDelay = _this.duration * 0.4 + _this.delay; // Delay message opacity change
  27009. if (platform.isAndroid()) {
  27010. _this.ascension = 48; // Toasts are always 1 line
  27011. } else {
  27012. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  27013. _this.ascension = 98; // 64 + 34
  27014. } else if (iPhoneXPatch.isIPhoneXLandscapePatchActive()) {
  27015. _this.ascension = 85; // 64 + 21
  27016. } else {
  27017. _this.ascension = 64;
  27018. }
  27019. }
  27020. return _this;
  27021. }
  27022. /**
  27023. * @param {HTMLElement} toast
  27024. * @param {Function} callback
  27025. */
  27026. createClass(AscendToastAnimator, [{
  27027. key: 'show',
  27028. value: function show(toast, callback) {
  27029. toast = toast._toast;
  27030. util$1.globals.fabOffset = this.ascension;
  27031. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, ' + this.ascension + 'px, 0)' }, { transform: 'translate3d(0, 0, 0)' }).queue(function (done) {
  27032. callback && callback();
  27033. done();
  27034. }), Animit(this._getFabs()).wait(this.delay).queue({ transform: 'translate3d(0, -' + this.ascension + 'px, 0) scale(1)' }, this.def), Animit(util$1.arrayFrom(toast.children), this.def).default({ opacity: 0 }, { opacity: 1 }));
  27035. }
  27036. /**
  27037. * @param {HTMLElement} toast
  27038. * @param {Function} callback
  27039. */
  27040. }, {
  27041. key: 'hide',
  27042. value: function hide(toast, callback) {
  27043. toast = toast._toast;
  27044. util$1.globals.fabOffset = 0;
  27045. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(0, ' + this.ascension + 'px, 0)' }).queue(function (done) {
  27046. callback && callback();
  27047. done();
  27048. }), Animit(this._getFabs(), this.def).wait(this.delay).queue({ transform: 'translate3d(0, 0, 0) scale(1)' }, this.def), Animit(util$1.arrayFrom(toast.children), this.def).default({ opacity: 1 }, { opacity: 0 }));
  27049. }
  27050. }, {
  27051. key: '_getFabs',
  27052. value: function _getFabs() {
  27053. return util$1.arrayFrom(document.querySelectorAll('ons-fab[position~=bottom], ons-speed-dial[position~=bottom]')).filter(function (fab) {
  27054. return fab.visible;
  27055. });
  27056. }
  27057. }]);
  27058. return AscendToastAnimator;
  27059. }(ToastAnimator);
  27060. /*
  27061. Copyright 2013-2015 ASIAL CORPORATION
  27062. Licensed under the Apache License, Version 2.0 (the "License");
  27063. you may not use this file except in compliance with the License.
  27064. You may obtain a copy of the License at
  27065. http://www.apache.org/licenses/LICENSE-2.0
  27066. Unless required by applicable law or agreed to in writing, software
  27067. distributed under the License is distributed on an "AS IS" BASIS,
  27068. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  27069. See the License for the specific language governing permissions and
  27070. limitations under the License.
  27071. */
  27072. /**
  27073. * Lift-fade Toast Animator
  27074. */
  27075. var LiftToastAnimator = function (_ToastAnimator) {
  27076. inherits(LiftToastAnimator, _ToastAnimator);
  27077. function LiftToastAnimator() {
  27078. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27079. _ref$timing = _ref.timing,
  27080. timing = _ref$timing === undefined ? 'ease' : _ref$timing,
  27081. _ref$delay = _ref.delay,
  27082. delay = _ref$delay === undefined ? 0 : _ref$delay,
  27083. _ref$duration = _ref.duration,
  27084. duration = _ref$duration === undefined ? 0.35 : _ref$duration;
  27085. classCallCheck(this, LiftToastAnimator);
  27086. var _this = possibleConstructorReturn(this, (LiftToastAnimator.__proto__ || Object.getPrototypeOf(LiftToastAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  27087. _this.bodyHeight = document.body.clientHeight; // avoid Forced Synchronous Layout
  27088. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  27089. _this.liftAmount = 'calc(100% + 34px)';
  27090. } else if (iPhoneXPatch.isIPhoneXLandscapePatchActive()) {
  27091. _this.liftAmount = 'calc(100% + 21px)';
  27092. } else {
  27093. _this.liftAmount = '100%';
  27094. }
  27095. return _this;
  27096. }
  27097. /**
  27098. * @param {HTMLElement} toast
  27099. * @param {Function} callback
  27100. */
  27101. createClass(LiftToastAnimator, [{
  27102. key: 'show',
  27103. value: function show(toast, callback) {
  27104. toast = toast._toast;
  27105. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, ' + this.liftAmount + ', 0)', opacity: 0 }, { transform: 'translate3d(0, 0, 0)', opacity: 1 }).queue(function (done) {
  27106. callback && callback();
  27107. done();
  27108. }));
  27109. }
  27110. /**
  27111. * @param {HTMLElement} toast
  27112. * @param {Function} callback
  27113. */
  27114. }, {
  27115. key: 'hide',
  27116. value: function hide(toast, callback) {
  27117. toast = toast._toast;
  27118. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, 0, 0)', opacity: 1 }, { transform: 'translate3d(0, ' + this.liftAmount + ', 0)', opacity: 0 }).queue(function (done) {
  27119. callback && callback();
  27120. done();
  27121. }));
  27122. }
  27123. }, {
  27124. key: '_updatePosition',
  27125. value: function _updatePosition(toast) {
  27126. if (parseInt(toast.style.top, 10) === 0) {
  27127. toast.style.top = toast.style.bottom = '';
  27128. }
  27129. }
  27130. }]);
  27131. return LiftToastAnimator;
  27132. }(ToastAnimator);
  27133. /*
  27134. Copyright 2013-2015 ASIAL CORPORATION
  27135. Licensed under the Apache License, Version 2.0 (the "License");
  27136. you may not use this file except in compliance with the License.
  27137. You may obtain a copy of the License at
  27138. http://www.apache.org/licenses/LICENSE-2.0
  27139. Unless required by applicable law or agreed to in writing, software
  27140. distributed under the License is distributed on an "AS IS" BASIS,
  27141. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  27142. See the License for the specific language governing permissions and
  27143. limitations under the License.
  27144. */
  27145. /**
  27146. * Fall-fade Toast Animator
  27147. */
  27148. var FallToastAnimator = function (_ToastAnimator) {
  27149. inherits(FallToastAnimator, _ToastAnimator);
  27150. function FallToastAnimator() {
  27151. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27152. _ref$timing = _ref.timing,
  27153. timing = _ref$timing === undefined ? 'ease' : _ref$timing,
  27154. _ref$delay = _ref.delay,
  27155. delay = _ref$delay === undefined ? 0 : _ref$delay,
  27156. _ref$duration = _ref.duration,
  27157. duration = _ref$duration === undefined ? 0.35 : _ref$duration;
  27158. classCallCheck(this, FallToastAnimator);
  27159. var _this = possibleConstructorReturn(this, (FallToastAnimator.__proto__ || Object.getPrototypeOf(FallToastAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  27160. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  27161. _this.fallAmount = 'calc(-100% - 44px)';
  27162. } else {
  27163. _this.fallAmount = '-100%';
  27164. }
  27165. return _this;
  27166. }
  27167. /**
  27168. * @param {HTMLElement} toast
  27169. * @param {Function} callback
  27170. */
  27171. createClass(FallToastAnimator, [{
  27172. key: 'show',
  27173. value: function show(toast, callback) {
  27174. toast = toast._toast;
  27175. this._updatePosition(toast);
  27176. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, ' + this.fallAmount + ', 0)', opacity: 0 }, { transform: 'translate3d(0, 0, 0)', opacity: 1 }).queue(function (done) {
  27177. callback && callback();
  27178. done();
  27179. }));
  27180. }
  27181. /**
  27182. * @param {HTMLElement} toast
  27183. * @param {Function} callback
  27184. */
  27185. }, {
  27186. key: 'hide',
  27187. value: function hide(toast, callback) {
  27188. var _this2 = this;
  27189. toast = toast._toast;
  27190. this._updatePosition(toast);
  27191. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, 0, 0)', opacity: 1 }, { transform: 'translate3d(0, ' + this.fallAmount + ', 0)', opacity: 0 }).queue(function (done) {
  27192. _this2._updatePosition(toast, true);
  27193. callback && callback();
  27194. done();
  27195. }));
  27196. }
  27197. }, {
  27198. key: '_updatePosition',
  27199. value: function _updatePosition(toast, cleanUp) {
  27200. var correctTop = void 0;
  27201. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  27202. correctTop = '44px';
  27203. } else {
  27204. correctTop = '0';
  27205. }
  27206. if (toast.style.top !== correctTop) {
  27207. toast.style.top = correctTop;
  27208. toast.style.bottom = 'initial';
  27209. }
  27210. }
  27211. }]);
  27212. return FallToastAnimator;
  27213. }(ToastAnimator);
  27214. /*
  27215. Copyright 2013-2015 ASIAL CORPORATION
  27216. Licensed under the Apache License, Version 2.0 (the "License");
  27217. you may not use this file except in compliance with the License.
  27218. You may obtain a copy of the License at
  27219. http://www.apache.org/licenses/LICENSE-2.0
  27220. Unless required by applicable law or agreed to in writing, software
  27221. distributed under the License is distributed on an "AS IS" BASIS,
  27222. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  27223. See the License for the specific language governing permissions and
  27224. limitations under the License.
  27225. */
  27226. var scheme$31 = {
  27227. '.toast': 'toast--*',
  27228. '.toast__message': 'toast--*__message',
  27229. '.toast__button': 'toast--*__button'
  27230. };
  27231. var defaultClassName$17 = 'toast';
  27232. var _animatorDict$8 = {
  27233. 'default': platform.isAndroid() ? AscendToastAnimator : LiftToastAnimator,
  27234. 'fade': FadeToastAnimator,
  27235. 'ascend': AscendToastAnimator,
  27236. 'lift': LiftToastAnimator,
  27237. 'fall': FallToastAnimator,
  27238. 'none': ToastAnimator
  27239. };
  27240. /**
  27241. * @element ons-toast
  27242. * @category dialog
  27243. * @description
  27244. * [en]
  27245. * The Toast or Snackbar component is useful for displaying dismissable information or simple actions at (normally) the bottom of the page.
  27246. *
  27247. * This component does not block user input, allowing the app to continue its flow. For simple toasts, consider `ons.notification.toast` instead.
  27248. * [/en]
  27249. * [ja][/ja]
  27250. * @tutorial vanilla/Reference/toast
  27251. * @seealso ons-alert-dialog
  27252. * [en]The `<ons-alert-dialog>` component is preferred for displaying undismissable information.[/en]
  27253. * [ja][/ja]
  27254. */
  27255. var ToastElement = function (_BaseDialogElement) {
  27256. inherits(ToastElement, _BaseDialogElement);
  27257. /**
  27258. * @attribute animation
  27259. * @type {String}
  27260. * @default default
  27261. * @description
  27262. * [en]The animation used when showing and hiding the toast. Can be either `"default"`, `"ascend"` (Android), `"lift"` (iOS), `"fall"`, `"fade"` or `"none"`.[/en]
  27263. * [ja][/ja]
  27264. */
  27265. /**
  27266. * @attribute animation-options
  27267. * @type {Expression}
  27268. * @description
  27269. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  27270. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. <code>{duration: 0.2, delay: 1, timing: 'ease-in'}</code>[/ja]
  27271. */
  27272. function ToastElement() {
  27273. classCallCheck(this, ToastElement);
  27274. var _this = possibleConstructorReturn(this, (ToastElement.__proto__ || Object.getPrototypeOf(ToastElement)).call(this));
  27275. _this._defaultDBB = null;
  27276. contentReady(_this, function () {
  27277. return _this._compile();
  27278. });
  27279. return _this;
  27280. }
  27281. createClass(ToastElement, [{
  27282. key: '_updateAnimatorFactory',
  27283. value: function _updateAnimatorFactory() {
  27284. // Reset position style
  27285. this._toast && (this._toast.style.top = this._toast.style.bottom = '');
  27286. return new AnimatorFactory({
  27287. animators: _animatorDict$8,
  27288. baseClass: ToastAnimator,
  27289. baseClassName: 'ToastAnimator',
  27290. defaultAnimation: this.getAttribute('animation')
  27291. });
  27292. }
  27293. /**
  27294. * @property onDeviceBackButton
  27295. * @type {Object}
  27296. * @description
  27297. * [en]Back-button handler.[/en]
  27298. * [ja]バックボタンハンドラ。[/ja]
  27299. */
  27300. }, {
  27301. key: '_compile',
  27302. value: function _compile() {
  27303. autoStyle.prepare(this);
  27304. this.style.display = 'none';
  27305. this.style.zIndex = 10000; // Lower than dialogs
  27306. var messageClassName = 'toast__message';
  27307. var buttonClassName = 'toast__button';
  27308. var toast = util$1.findChild(this, '.' + defaultClassName$17);
  27309. if (!toast) {
  27310. toast = document.createElement('div');
  27311. toast.classList.add(defaultClassName$17);
  27312. while (this.childNodes[0]) {
  27313. toast.appendChild(this.childNodes[0]);
  27314. }
  27315. }
  27316. var button = util$1.findChild(toast, '.' + buttonClassName);
  27317. if (!button) {
  27318. button = util$1.findChild(toast, function (e) {
  27319. return util$1.match(e, '.button') || util$1.match(e, 'button');
  27320. });
  27321. if (button) {
  27322. button.classList.remove('button');
  27323. button.classList.add(buttonClassName);
  27324. toast.appendChild(button);
  27325. }
  27326. }
  27327. if (!util$1.findChild(toast, '.' + messageClassName)) {
  27328. var message = util$1.findChild(toast, '.message');
  27329. if (!message) {
  27330. message = document.createElement('div');
  27331. for (var i = toast.childNodes.length - 1; i >= 0; i--) {
  27332. if (toast.childNodes[i] !== button) {
  27333. message.insertBefore(toast.childNodes[i], message.firstChild);
  27334. }
  27335. }
  27336. }
  27337. message.classList.add(messageClassName);
  27338. toast.insertBefore(message, toast.firstChild);
  27339. }
  27340. if (toast.parentNode !== this) {
  27341. this.appendChild(toast);
  27342. }
  27343. ModifierUtil.initModifier(this, this._scheme);
  27344. }
  27345. /**
  27346. * @property visible
  27347. * @readonly
  27348. * @type {Boolean}
  27349. * @description
  27350. * [en]Whether the element is visible or not.[/en]
  27351. * [ja]要素が見える場合に`true`。[/ja]
  27352. */
  27353. /**
  27354. * @method show
  27355. * @signature show([options])
  27356. * @param {Object} [options]
  27357. * [en]Parameter object.[/en]
  27358. * [ja]オプションを指定するオブジェクト。[/ja]
  27359. * @param {String} [options.animation]
  27360. * [en]Animation name. Available animations are `"default"`, `"ascend"` (Android), `"lift"` (iOS), `"fall"`, `"fade"` or `"none"`.[/en]
  27361. * [ja][/ja]
  27362. * @param {String} [options.animationOptions]
  27363. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  27364. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  27365. * @description
  27366. * [en]Show the element.[/en]
  27367. * [ja][/ja]
  27368. * @return {Promise}
  27369. * [en]Resolves to the displayed element[/en]
  27370. * [ja][/ja]
  27371. */
  27372. /**
  27373. * @method toggle
  27374. * @signature toggle([options])
  27375. * @param {Object} [options]
  27376. * [en]Parameter object.[/en]
  27377. * [ja]オプションを指定するオブジェクト。[/ja]
  27378. * @param {String} [options.animation]
  27379. * [en]Animation name. Available animations are `"default"`, `"ascend"` (Android), `"lift"` (iOS), `"fall"`, `"fade"` or `"none"`.[/en]
  27380. * [ja][/ja]
  27381. * @param {String} [options.animationOptions]
  27382. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  27383. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  27384. * @description
  27385. * [en]Toggle toast visibility.[/en]
  27386. * [ja][/ja]
  27387. */
  27388. /**
  27389. * @method hide
  27390. * @signature hide([options])
  27391. * @param {Object} [options]
  27392. * [en]Parameter object.[/en]
  27393. * [ja]オプションを指定するオブジェクト。[/ja]
  27394. * @param {String} [options.animation]
  27395. * [en]Animation name. Available animations are `"default"`, `"ascend"` (Android), `"lift"` (iOS), `"fall"`, `"fade"` or `"none"`.[/en]
  27396. * [ja][/ja]
  27397. * @param {String} [options.animationOptions]
  27398. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  27399. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  27400. * @description
  27401. * [en]Hide toast.[/en]
  27402. * [ja][/ja]
  27403. * @return {Promise}
  27404. * [en]Resolves to the hidden element[/en]
  27405. * [ja][/ja]
  27406. */
  27407. /**
  27408. * @param {String} name
  27409. * @param {Function} Animator
  27410. */
  27411. }, {
  27412. key: '_scheme',
  27413. get: function get$$1() {
  27414. return scheme$31;
  27415. }
  27416. }, {
  27417. key: '_toast',
  27418. get: function get$$1() {
  27419. return util$1.findChild(this, '.' + defaultClassName$17);
  27420. }
  27421. }], [{
  27422. key: 'registerAnimator',
  27423. value: function registerAnimator(name, Animator) {
  27424. if (!(Animator.prototype instanceof ToastAnimator)) {
  27425. util$1.throw('"Animator" param must inherit OnsToastElement.ToastAnimator');
  27426. }
  27427. _animatorDict$8[name] = Animator;
  27428. }
  27429. }, {
  27430. key: 'animators',
  27431. get: function get$$1() {
  27432. return _animatorDict$8;
  27433. }
  27434. }, {
  27435. key: 'ToastAnimator',
  27436. get: function get$$1() {
  27437. return ToastAnimator;
  27438. }
  27439. }]);
  27440. return ToastElement;
  27441. }(BaseDialogElement);
  27442. onsElements.Toast = ToastElement;
  27443. customElements.define('ons-toast', ToastElement);
  27444. /*
  27445. Copyright 2013-2015 ASIAL CORPORATION
  27446. Licensed under the Apache License, Version 2.0 (the "License");
  27447. you may not use this file except in compliance with the License.
  27448. You may obtain a copy of the License at
  27449. http://www.apache.org/licenses/LICENSE-2.0
  27450. Unless required by applicable law or agreed to in writing, software
  27451. distributed under the License is distributed on an "AS IS" BASIS,
  27452. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  27453. See the License for the specific language governing permissions and
  27454. limitations under the License.
  27455. */
  27456. /**
  27457. * @element ons-toolbar-button
  27458. * @category page
  27459. * @modifier material
  27460. * [en]Material Design toolbar button.[/en]
  27461. * [ja][/ja]
  27462. * @modifier outline
  27463. * [en]A button with an outline.[/en]
  27464. * [ja]アウトラインをもったボタンを表示します。[/ja]
  27465. * @description
  27466. * [en]Button component for ons-toolbar and ons-bottom-toolbar.[/en]
  27467. * [ja]ons-toolbarあるいはons-bottom-toolbarに設置できるボタン用コンポーネントです。[/ja]
  27468. * @codepen aHmGL
  27469. * @tutorial vanilla/Reference/page
  27470. * @guide compilation.html#toolbar-compilation
  27471. * [en]Adding a toolbar[/en]
  27472. * [ja]ツールバーの追加[/ja]
  27473. * @seealso ons-toolbar
  27474. * [en]The `<ons-toolbar>` component displays a navigation bar at the top of a page.[/en]
  27475. * [ja]ons-toolbarコンポーネント[/ja]
  27476. * @seealso ons-back-button
  27477. * [en]The `<ons-back-button>` displays a back button in the navigation bar.[/en]
  27478. * [ja]ons-back-buttonコンポーネント[/ja]
  27479. * @example
  27480. * <ons-toolbar>
  27481. * <div class="left">
  27482. * <ons-toolbar-button>
  27483. * Button
  27484. * </ons-toolbar-button>
  27485. * </div>
  27486. * <div class="center">
  27487. * Title
  27488. * </div>
  27489. * <div class="right">
  27490. * <ons-toolbar-button>
  27491. * <ons-icon icon="ion-navicon" size="28px"></ons-icon>
  27492. * </ons-toolbar-button>
  27493. * </div>
  27494. * </ons-toolbar>
  27495. */
  27496. var ToolbarButtonElement = function (_BaseButtonElement) {
  27497. inherits(ToolbarButtonElement, _BaseButtonElement);
  27498. function ToolbarButtonElement() {
  27499. classCallCheck(this, ToolbarButtonElement);
  27500. return possibleConstructorReturn(this, (ToolbarButtonElement.__proto__ || Object.getPrototypeOf(ToolbarButtonElement)).apply(this, arguments));
  27501. }
  27502. createClass(ToolbarButtonElement, [{
  27503. key: '_scheme',
  27504. /**
  27505. * @attribute modifier
  27506. * @type {String}
  27507. * @description
  27508. * [en]The appearance of the button.[/en]
  27509. * [ja]ボタンの表現を指定します。[/ja]
  27510. */
  27511. /**
  27512. * @attribute icon
  27513. * @type {String}
  27514. * @description
  27515. * [en]Creates an `ons-icon` component with this string.[/en]
  27516. * [ja]`ons-icon`コンポーネントを悪性します。[/ja]
  27517. */
  27518. /**
  27519. * @attribute disabled
  27520. * @description
  27521. * [en]Specify if button should be disabled.[/en]
  27522. * [ja]ボタンを無効化する場合は指定してください。[/ja]
  27523. */
  27524. /**
  27525. * @property disabled
  27526. * @type {Boolean}
  27527. * @description
  27528. * [en]Whether the element is disabled or not.[/en]
  27529. * [ja]無効化されている場合に`true`。[/ja]
  27530. */
  27531. get: function get$$1() {
  27532. return { '': 'toolbar-button--*' };
  27533. }
  27534. }, {
  27535. key: '_defaultClassName',
  27536. get: function get$$1() {
  27537. return 'toolbar-button';
  27538. }
  27539. }, {
  27540. key: '_rippleOpt',
  27541. get: function get$$1() {
  27542. return [this, undefined, { center: '', 'size': 'contain', 'background': 'transparent' }];
  27543. }
  27544. }]);
  27545. return ToolbarButtonElement;
  27546. }(BaseButtonElement);
  27547. onsElements.ToolbarButton = ToolbarButtonElement;
  27548. customElements.define('ons-toolbar-button', ToolbarButtonElement);
  27549. // Add and register Custom Elements
  27550. setup$1(ons$1); // Setup initial listeners
  27551. window._superSecretOns = ons$1;
  27552. return ons$1;
  27553. })));
  27554. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib25zZW51aS5qcyIsInNvdXJjZXMiOlsiLi4vLi4vY29yZS9zcmMvb25zL2VsZW1lbnRzLmpzIiwiLi4vLi4vY29yZS9zcmMvb25zL3N0eWxlci5qcyIsIi4uLy4uL2NvcmUvc3JjL29ucy9wbGF0Zm9ybS5qcyIsIi4uLy4uL2NvcmUvc3JjL29ucy9wYWdlLWF0dHJpYnV0ZS1leHByZXNzaW9uLmpzIiwiLi4vLi4vY29yZS9zcmMvb25zL2ludGVybmFsL2ludGVybmFsLmpzIiwiLi4vLi4vY29yZS9zcmMvb25zL2ludGVybmFsL2FuaW1hdG9yLWZhY3RvcnkuanMiLCIuLi8uLi9jb3JlL3NyYy9vbnMvYXV0b3N0eWxlLmpzIiwiLi4vLi4vY29yZS9zcmMvb25zL2ludGVybmFsL21vZGlmaWVyLXV0aWwuanMiLCIuLi8uLi9jb3JlL3NyYy9vbnMvaW50ZXJuYWwvZGV2aWNlLWJhY2stYnV0dG9uLWRpc3BhdGNoZXI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xhdGlvbiA9IGZhbHNlLFxuICAgICAgY3VycmVudEluZGV4ID0gMDtcblxuICAgIGNvbnN0IHRva2VucyA9IFtdO1xuXG4gICAgaWYgKHBhcnQubGVuZ3RoID09PSAwKSB7XG4gICAgICBlcnJvcignVW5hYmxlIHRvIHBhcnNlIGVtcHR5IHN0cmluZycpO1xuICAgIH1cblxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGFydC5sZW5ndGg7IGkrKykge1xuICAgICAgYyA9IHBhcnQuY2hhckF0KGkpO1xuXG4gICAgICBpZiAoYyA9PT0gJyQnICYmIHBhcnQuY2hhckF0KGkgKyAxKSA9PT0gJ3snKSB7XG4gICAgICAgIGlmIChpbkludGVycG9sYXRpb24pIHtcbiAgICAgICAgICBlcnJvcignTmVzdGVkIGludGVycG9sYXRpb24gbm90IHN1cHBvcnRlZCcpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdG9rZW4gPSBwYXJ0LnN1YnN0cmluZyhjdXJyZW50SW5kZXgsIGkpO1xuICAgICAgICBpZiAodG9rZW4ubGVuZ3RoID4gMCkge1xuICAgICAgICAgIHRva2Vucy5wdXNoKHBhcnQuc3Vic3RyaW5nKGN1cnJlbnRJbmRleCwgaSkpO1xuICAgICAgICB9XG5cbiAgICAgICAgY3VycmVudEluZGV4ID0gaTtcbiAgICAgICAgaW5JbnRlcnBvbGF0aW9uID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGVsc2UgaWYgKGMgPT09ICd9Jykge1xuICAgICAgICBpZiAoIWluSW50ZXJwb2xhdGlvbikge1xuICAgICAgICAgIGVycm9yKCd9IG11c3QgYmUgcHJlY2VlZGVkIGJ5ICR7Jyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB0b2tlbiA9IHBhcnQuc3Vic3RyaW5nKGN1cnJlbnRJbmRleCwgaSArIDEpO1xuICAgICAgICBpZiAodG9rZW4ubGVuZ3RoID4gMCkge1xuICAgICAgICAgIHRva2Vucy5wdXNoK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mVudChwYXJlbnQpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9XG4gIH1cblxuICAvKipcbiAgICogQHJldHVybiB7T2JqZWN0fVxuICAgKi9cbiAgX2NhcHR1cmVUcmVlKCkge1xuICAgIHJldHVybiBjcmVhdGVUcmVlKGRvY3VtZW50LmJvZHkpO1xuXG4gICAgZnVuY3Rpb24gY3JlYXRlVHJlZShlbGVtZW50KSB7XG4gICAgICBjb25zdCB0cmVlID0ge1xuICAgICAgICBlbGVtZW50OiBlbGVtZW50LFxuICAgICAgICBjaGlsZHJlbjogQXJyYXkucHJvdG90eXBlLmNvbmNhdC5hcHBseShbXSwgYXJyYXlPZihlbGVtZW50LmNoaWxkcmVuKS5tYXAoZnVuY3Rpb24oY2hpbGRFbGVtZW50KSB7XG5cbiAgICAgICAgICBpZiAoY2hpbGRFbGVtZW50LnN0eWxlLmRpc3BsYXkgPT09ICdub25lJyB8fCBjaGlsZEVsZW1lbnQuX2lzU2hvd24gPT09IGZhbHNlKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGNoaWxkRWxlbWVudC5jaGlsZHJlbi5sZW5ndGggPT09IDAgJiYgIUhhbmRsZXJSZXBvc2l0b3J5LmhhcyhjaGlsZEVsZW1lbnQpKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29uc3QgcmVzdWx0ID0gY3JlYXRlVHJlZShjaGlsZEVsZW1lbnQpO1xuXG4gICAgICAgICAgaWYgKHJlc3VsdC5jaGlsZHJlbi5sZW5ndGggPT09IDAgJiYgIUhhbmRsZXJSZXBvc2l0b3J5LmhhcyhyZXN1bHQuZWxlbWVudCkpIHtcbiAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgIC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FtdLFxuICAgICAgICBjbGllbnRZID0gW10sXG4gICAgICAgIG1pbiA9IE1hdGgubWluLFxuICAgICAgICBtYXggPSBNYXRoLm1heDtcblxuICAgIC8vIG5vIG5lZWQgdG8gbG9vcCB3aGVuIG9ubHkgb25lIHRvdWNoXG4gICAgaWYgKHRvdWNoZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBwYWdlWDogdG91Y2hlc1swXS5wYWdlWCxcbiAgICAgICAgcGFnZVk6IHRvdWNoZXNbMF0ucGFnZVksXG4gICAgICAgIGNsaWVudFg6IHRvdWNoZXNbMF0uY2xpZW50WCxcbiAgICAgICAgY2xpZW50WTogdG91Y2hlc1swXS5jbGllbnRZXG4gICAgICB9O1xuICAgIH1cblxuICAgIFV0aWxzLmVhY2godG91Y2hlcywgZnVuY3Rpb24odG91Y2gpIHtcbiAgICAgIHBhZ2VYLnB1c2godG91Y2gucGFnZVgpO1xuICAgICAgcGFnZVkucHVzaCh0b3VjaC5wYWdlWSk7XG4gICAgICBjbGllbnRYLnB1c2godG91Y2guY2xpZW50WCk7XG4gICAgICBjbGllbnRZLnB1c2godG91Y2guY2xpZW50WSk7XG4gICAgfSk7XG5cbiAgICByZXR1cm4ge1xuICAgICAgcGFnZVg6IChtaW4uYXBwbHkoTWF0aCwgcGFnZVgpICsgbWF4LmFwcGx5KE1hdGgsIHBhZ2VYKSkgLyAyLFxuICAgICAgcGFnZVk6IChtaW4uYXBwbHkoTWF0aCwgcGFnZVkpICsgbWF4LmFwcGx5KE1hdGgsIHBhZ2VZKSkgLyAyLFxuICAgICAgY2xpZW50WDogKG1pbi5hcHBseShNYXRoLCBjbGllbnRYKSArIG1heC5hcHBseShNYXRoLCBjbGllbnRYKSkgLyAyLFxuICAgICAgY2xpZW50WTogKG1pbi5hcHBseShNYXRoLCBjbGllbnRZKSArIG1heC5hcHBseShNYXRoLCBjbGllbnRZKSkgLyAyXG4gICAgfTtcbiAgfSxcblxuICAvKipcb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1bmN0aW9uKCkge1xuICAgICAgICAgIGlmIChjdXJyZW50ICYmIGN1cnJlbnQubmFtZSA9PSBuYW1lKSB7XG4gICAgICAgICAgICBpbnN0LnRyaWdnZXIobmFtZSwgZXYpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSwgb3B0aW9ucy5ob2xkVGltZW91dCk7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIEVWRU5UX01PVkU6XG4gICAgICAgIGlmIChldi5kaXN0YW5jZSA+IG9wdGlvbnMuaG9sZFRocmVzaG9sZCkge1xuICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcik7XG4gICAgICAgIH1cbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgRVZFTlRfUkVMRUFTRTpcbiAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVyKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gICAgfVxuXG4gICAgR2VzdHVyZURldGVjdG9yLmdlc3R1cmVzLkhvbGQgPSB7XG4gICAgICBuYW1lOiBuYW1lLFxuICAgICAgaW5kZXg6IDEwLFxuICAgICAgZGVmYXVsdHM6IHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIEBwcm9wZXJ0eSBob2xkVGltZW91dFxuICAgICAgICAgKiBAdHlwZSB7TnVtYmVyfVxuICAgICAgICAgKiBAZGVmYXVsdCA1MDBcbiAgICAgICAgICovXG4gICAgICAgIGhvbGRUaW1lb3V0OiA1MDAsXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIG1vdmVtZW50IGFsbG93ZWQgd2hpbGUgaG9sZGluZ1xuICAgICAgICAgKiBAcHJvcGVydHkgaG9sZFRocmVzaG9sZFxuICAgICAgICAgKiBAdHlwZSB7TnVtYmVyfVxuICAgICAgICAgKiBAZGVmYXVsdCAyXG4gICAgICAgICAqL1xuICAgICAgICBob2xkVGhyZXNob2xkOiAyXG4gICAgICB9LFxuICAgICAgaGFuZGxlcjogaG9sZEdlc3R1cmVc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gXG4gICAqXG4gICAqIEBjbGFzcyBTd2lwZVxuICAgKiBAc3RhdGljXG4gICAqL1xuICAvKipcbiAgICogQGV2ZW50IHN3aXBlXG4gICAqIEBwYXJhbSB7T2JqZWN0fSBldlxuICAgKi9cbiAgLyoqXG4gICAqIEBldmVudCBzd2lwZWxlZnRcbiAgICogQHBhcmFtIHtPYmplY3R9IGV2XG4gICAqL1xuICAvKipcbiAgICogQGV2ZW50IHN3aXBlcmlnaHRcbiAgICogQHBhcmFtIHtPYmplY3R9IGV2XG4gICAqL1xuICAvKipcbiAgICogQGV2ZW50IHN3aXBldXBcbiAgICogQHBhcmFtIHtPYmplY3R9IGV2XG4gICAqL1xuICAvKipcbiAgICogQGV2ZW50IHN3aXBlZG93blxuICAgKiBAcGFyYW0ge09iamVjdH0gZXZcbiAgICovXG4gIEdlc3R1cmVEZXRlY3Rvci5nZXN0dXJlcy5Td2lwZSA9IHtcbiAgICBuYW1lOiAnc3dpcGUnLFxuICAgIGluZGV4OiA0MCxcbiAgICBkZWZhdWx0czoge1xuICAgICAgLyoqXG4gICAgICAgKiBAcHJvcGVydHkgc3dpcGVNaW5Ub3VjaGVzXG4gICAgICAgKiBAdHlwZSB7TnVtYmVyfVxuICAgICAgICogQGRlZmF1bHQgMVxuICAgICAgICovXG4gICAgICBzd2lwZU1pblRvdWNoZXM6IDEsXG5cbiAgICAgIC8qKlxuICAgICAgICogQHByb3BlcnR5IHN3aXBlTWF4VG91Y2hlc1xuICAgICAgICogQHR5cGUge051bWJlcn1cbiAgICAgICAqIEBkZWZhdWx0IDFcbiAgICAgICAqL1xuICAgICAgc3dpcGVNYXhUb3VjaGVzOiAxLFxuXG4gICAgICAvKipcbiAgICAgICAqIGhvcml6b250YWwgc3dpcGUgdmVsb2NpdHlcbiAgICAgICAqIEBwcm9wZXJ0eSBzd2lwZVZlbG9jaXR5WFxuICAgICAgICogQHR5cGUge051bWJlcn1cbiAgICAgICAqIEBkZWZhdWx0IDAuNlxuICAgICAgICovXG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xuICAgICAgICB9XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgIH1cblxuICAgIEdlc3R1cmVEZXRlY3Rvci5nZXN0dXJlcy5UYXAgPSB7XG4gICAgICBuYW1lOiBuYW1lLFxuICAgICAgaW5kZXg6IDEwMCxcbiAgICAgIGhhbmRsZXI6IHRhcEdlc3R1cmUsXG4gICAgICBkZWZhdWx0czoge1xuICAgICAgICAvKipcbiAgICAgICAgICogbWF4IHRpbWUgb2YgYSB0YXAsIHRoaXMgaXMgZm9yIHRoZSBzbG93IHRhcHBlcnNcbiAgICAgICAgICogQHByb3BlcnR5IHRhcE1heFRpbWVcbiAgICAgICAgICogQHR5cGUge051bWJlcn1cbiAgICAgICAgICogQGRlZmF1bHQgMjUwXG4gICAgICAgICAqL1xuICAgICAgICB0YXBNYXhUaW1lOiAyNTAsXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIG1heCBkaXN0YW5jZSBvZiBtb3ZlbWVudCBvZiBhIHRhcCwgdGhpcyBpcyBmb3IgdGhlIHNsb3cgdGFwcGVyc1xuICAgICAgICAgKiBAcHJvcGVydHkgdGFwTWF4RGlzdGFuY2VcbiAgICAgICAgICogQHR5cGUge051bWJlcn1cbiAgICAgICAgICogQGRlZmF1bHQgMTBcbiAgICAgICAgICovXG4gICAgICAgIHRhcE1heERpc3RhbmNlOiAxMCxcblxuICAgICAgICAvKipcbiAgICAgICAgICogYWx3YXlzIHRyaWdnZXIgdGhlIGB0YXBgIGV2ZW50LCBldmVuIHdoaWxlIGRvdWJsZS10YXBwaW5nXG4gICAgICAgICAqIEBwcm9wZXJ0eSB0YXBBbHdheXNcbiAgICAgICAgICogQHR5cGUge0Jvb2xlYW59XG4gICAgICAgICAqIEBkZWZhdWx0IHRydWVcbiAgICAgICAgICovXG4gICAgICAgIHRhcEFsd2F5czogdHJ1ZSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogbWF4IGRpc3RhbmNlIGJldHdlZW4gdHdvIHRhcHNcbiAgIC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5Y+O44KB44Gf44Kq44OW44K444Kn44Kv44OI44Gn44GZ44CCWy9qYV1cbiAqIEBleGFtcGxlXG4gKiBvbnMubm90aWZpY2F0aW9uLmFsZXJ0KCdIZWxsbywgd29ybGQhJyk7XG4gKlxuICogb25zLm5vdGlmaWNhdGlvbi5jb25maXJtKCdBcmUgeW91IHJlYWR5PycpXG4gKiAgIC50aGVuKFxuICogICAgIGZ1bmN0aW9uKGFuc3dlcikge1xuICogICAgICAgaWYgKGFuc3dlciA9PT0gMSkge1xuICogICAgICAgICBvbnMubm90aWZpY2F0aW9uLmFsZXJ0KCdMZXRcXCdzIGdvIScpO1xuICogICAgICAgfVxuICogICAgIH1cbiAqICAgKTtcbiAqXG4gKiBvbnMubm90aWZpY2F0aW9uLnByb21wdCgnSG93IG9sZCBhcmUgPycpXG4gKiAgIC50aGVuKFxuICogICAgIGZ1bmN0aW9uKGFnZSkge1xuICogICAgICAgb25zLm5vdGlmaWNhdGlvbi5hbGVydCgnWW91IGFyZSAnICsgYWdlICsgJyB5ZWFycyBvbGQuJyk7XG4gKiAgICAgfVxuICogICApO1xuICovXG5jb25zdCBub3RpZmljYXRpb24gPSB7fTtcblxubm90aWZpY2F0aW9uLl9jcmVhdGVBbGVydERpYWxvZyA9ICguLi5wYXJhbXMpID0+IG5ldyBQcm9taXNlKHJlc29sdmUgPT4ge1xuICBjb25zdCBvcHRpb25zID0gX25vcm1hbGl6ZUFyZ3VtZW50cyguLi5wYXJhbXMpO1xuICB1dGlsLmNoZWNrTWlzc2luZ0ltcG9ydCgnQWxlcnREaWFsb2cnLCAnQWxlcnREaWFsb2dCdXR0b24nKTtcblxuICAvLyBQcm9tcHQgaW5wdXQgc3RyaW5nXG4gIGxldCBpbnB1dFN0cmluZyA9ICcnO1xuICBpZiAob3B0aW9ucy5pc1Byb21wdCkge1xuICAgIGlucHV0U3RyaW5nID0gYFxuICAgICAgPGlucHV0XG4gICAgICAgIGNsYXNzPVwidGV4dC1pbnB1dCB0ZXh0LW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xheSBieSBkb2luZyBhIHNldFRpbWVvdXQuIHNldEltbWVkaWF0ZSB3YXMgdHJpZWQgaW5zdGVhZCwgYnV0IGluIEZpcmVmb3ggNyBpdCBnZW5lcmF0ZWQgYVxuICAgICAgICAgICAgLy8gXCJ0b28gbXVjaCByZWN1cnNpb25cIiBlcnJvci5cbiAgICAgICAgICAgIHNldFRpbWVvdXQocGFydGlhbGx5QXBwbGllZChydW5JZlByZXNlbnQsIGhhbmRsZSksIDApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIHRhc2sgPSB0YXNrc0J5SGFuZGxlW2hhbmRsZV07XG4gICAgICAgICAgICBpZiAodGFzaykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRseVJ1bm5pbmdBVGFzayA9IHRydWU7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdGFzaygpO1xuICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIGNsZWFySW1tZWRpYXRlKGhhbmRsZSk7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRseVJ1bm5pbmdBVGFzayA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGNsZWFySW1tZWRpYXRlKGhhbmRsZSkge1xuICAgICAgICBkZWxldGUgdGFza3NCeUhhbmRsZVtoYW5kbGVdO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGluc3RhbGxOZXh0VGlja0ltcGxlbWVudGF0aW9uKCkge1xuICAgICAgICBzZXRJbW1lZGlhdGUgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciBoYW5kbGUgPSBhZGRGcm9tU2V0SW1tZWRpYXRlQXJndW1lbnRzKGFyZ3VtZW50cyk7XG4gICAgICAgICAgICBwcm9jZXNzLm5leHRUaWNrKHBhcnRpYWxseUFwcGxp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44Gu6KaB57Sg44Gv44CBYDxib2R5PmDopoHntKDjgavnm7TmjqXjgqLjgr/jg4Pjg4HjgZXjgozjgovjgYvjgIHjgoLjgZfjgY/jga9gb25zLmNyZWF0ZUVsZW1lbnQodGVtcGxhdGUsIHsgYXBwZW5kOiB0cnVlIH0pYOOBqGA8dGVtcGxhdGU+YOOCv+OCsOOCkuS9v+OBo+OBpuODhuODs+ODl+ODrOODvOODiOOBi+OCieWLleeahOOBq+eUn+aIkOOBleOCjOOBvuOBmeOAglxuICpcbiAqICAgICDjgqLjgq/jgrfjg6fjg7Pjgrfjg7zjg4jjga/jgIHpgbjmip7ogqLjga7jg6rjgrnjg4jjgpLooajnpLrjgZfjgabjg6bjg7zjgrbjg7zjgavlsIvjga3jgovjga7jgavkvr/liKnjgafjgZnjgIJgb25zLWFjdGlvbi1zaGVldC1idXR0b25g44Gv44CB44GT44Gu6KaB57Sg44Gu5Lit44Gr572u44GP44Gf44KB44Gr5o+Q5L6b44GV44KM44Gm44GE44G+44GZ44GM44CB44Gd44KM5Lul5aSW44Gr44KC5LuW44Gu44Gp44Gu44KI44GG44Gq6KaB57Sg44KS5ZCr44KA44GT44Go44GM44Gn44GN44G+44GZ44CCXG4gKlxuICogICAgIEFuZHJvaWTjg4fjg5DjgqTjgrnjgaflrp/ooYzjgZXjgozjgovjgajjgY3jgavjga/jgIHoh6rli5XnmoTjgavjg57jg4bjg6rjgqLjg6vjg4fjgrbjgqTjg7Mo44Oc44OI44Og44K344O844OIKeOBqOOBl+OBpuihqOekuuOBleOCjOOBvuOBmeOAglxuICogICBbL2phXVxuICogQG1vZGlmaWVyIG1hdGVyaWFsXG4gKiAgIFtlbl1EaXNwbGF5IGEgTWF0ZXJpYWwgRGVzaWduIGJvdHRvbSBzaGVldC5bL2VuXVxuICogICBbamFd44Oe44OG44Oq44Ki44Or44OH44K244Kk44Oz44Gu44Oc44OI44Og44K344O844OI44KS6KGo56S644GX44G+44GZ44CCWy9qYV1cbiAqIEB0dXRvc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aXMuc3dpcGVTaGFkb3ddKVxuICAgICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgICB0cmFuc2Zvcm06IGB0cmFuc2xhdGUzZCgke2Rpc3RhbmNlfXB4LCAwLCAwKWBcbiAgICAgICAgICB9KSxcblxuICAgICAgICBhbmltaXQodGhpcy5kZWNvbXAubGVhdmUudG9vbGJhcilcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgb3BhY2l0eTogLTEgKiBzd2lwZVJhdGlvIC8vIDEgLT4gMFxuICAgICAgICAgIH0pLFxuXG4gICAgICAgIGFuaW1pdCh0aGlzLmRlY29tcC5sZWF2ZS50b29sYmFyQ2VudGVyKVxuICAgICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgICB0cmFuc2Zvcm06IGB0cmFuc2xhdGUzZCgkeygxICsgc3dpcGVSYXRpbykgKiAxMjV9JSwgMCwgMClgXG4gICAgICAgICAgfSksXG5cbiAgICAgICAgYW5pbWl0KHRoaXMuZGVjb21wLmxlYXZlLmJhY2tCdXR0b25MYWJlbClcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgb3BhY2l0eTogLTEgKiBzd2lwZVJhdGlvLCAvLyAxIC0+IDBcbiAgICAgICAgICAgIHRyYW5zZm9ybTogYHRyYW5zbGF0ZTNkKCR7dGhpcy5kZWx0YS50aXRsZSAqICgxICsgc3dpcGVSYXRpbyl9cHgsIDAsIDApYFxuICAgICAgICAgIH0pLFxuXG5cbiAgICAgICAgLyogT3RoZXIgKi9cblxuICAgICAgICBhbmltaXQodGhpcy5zd2lwZVNoYWRvdylcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgb3BhY2l0eTogLTEgKiBzd2lwZVJhdGlvIC8vIDEgLT4gMFxuICAgICAgICAgIH0pXG4gICAgICApO1xuXG5cbiAgICB9IGVsc2Uge1xuICAgICAgYW5pbWl0LnJ1bkFsbChcbiAgICAgICAgYW5pbWl0KGxlYXZlUGFnZSlcbiAgICAgICA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ICAgICAgICB9LCB0aGlzLm9wdFJlc3RvcmUpLFxuXG4gICAgICAgIGFuaW1pdCh0aGlzLmRlY29tcC5sZWF2ZS50b29sYmFyKVxuICAgICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgICBvcGFjaXR5OiAxXG4gICAgICAgICAgfSwgdGhpcy5vcHRSZXN0b3JlKSxcblxuICAgICAgICBhbmltaXQodGhpcy5kZWNvbXAubGVhdmUudG9vbGJhckNlbnRlcilcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgdHJhbnNmb3JtOiBgdHJhbnNsYXRlM2QoMCwgMCwgMClgXG4gICAgICAgICAgfSwgdGhpcy5vcHRSZXN0b3JlKSxcblxuICAgICAgICBhbmltaXQodGhpcy5kZWNvbXAubGVhdmUuYmFja0J1dHRvbkxhYmVsKVxuICAgICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgICBvcGFjaXR5OiAxLFxuICAgICAgICAgICAgdHJhbnNmb3JtOiBgdHJhbnNsYXRlM2QoMCwgMCwgMClgLFxuICAgICAgICAgICAgdHJhbnNpdGlvbjogYG9wYWNpdHkgJHt0aGlzLmR1cmF0aW9uUmVzdG9yZX1zIGxpbmVhciwgdHJhbnNmb3JtICR7dGhpcy5kdXJhdGlvblJlc3RvcmV9cyAke3RoaXMudGltaW5nU3dpcGV9YFxuICAgICAgICAgIH0pLFxuXG5cbiAgICAgICAgLyogT3RoZXIgKi9cblxuICAgICAgICBhbmltaXQodGhpcy5zd2lwZVNoYWRvdylcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgb3BhY2l0eTogMFxuICAgICAgICAgIH0sIHRoaXMub3B0UmVzdG9yZSlcbiAgICAgICAgICAucXVldWUoZG9uZSA9PiB7XG4gICAgICAgICAgICB0aGlzLl9yZXNldCh0aGlzLnRhcmdldC5lbnRlciwgdGhpcy50YXJnZXQubGVhdmUpO1xuICAgICAgICAgICAgZW50ZXJQYWdlLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG4gICAgICAgICAgICBjYWxsYmFjayAmJiBjYWxsYmFjaygpO1xuICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgIH0pXG4gICAgICApO1xuXG5cbiAgICB9IGVsc2Uge1xuICAgICAgYW5pbWl0LnJ1bkFsbChcblxuICAgICAgICBhbmltaXQoZW50ZXJQYWdlKVxuICAgICAgICAucXVldWUoe1xuICAgICAgICAgIHRyYW5zZm9ybTogJ3RyYW5zbGF0ZTNEKC0yNSUsIDAsIDApJyxcbiAgICAgICAgICBvcGFjaXR5OiAwLjlcbiAgICAgICAgfSwgdGhpcy5vcHRSZXN0b3JlKSxcblxuICAgICAgICBhbmltaXQobGVhdmVQYWdlKVxuICAgICAgICAucXVldWUoe1xuICAgICAgICAgIHRyYW5zZm9ybTogJ3RyYW5zbGF0ZTNEKDAsIDAsIDApJ1xuICAgICAgICB9LCB0aGlzLm9wdFJlc3RvcmUpXG4gICAgICAgIC5xdWV1ZShkb25lID0+IHtcbiAgICAgICAgICB0aGlzLl9yZXNldChlbnRlclBhZ2UsIGxlYXZlUGFnZSk7XG4gICAgICAgICAgZW50ZXJQYWdlLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG4gICAgICAgICAgY2FsbGJhY2sgJiYgY2FsbGJhY2soKTtcbiAgICAgICAgICBkb25lKCk7XG4gICAgICAgIH0pXG4gICAgICApO1xuICAgIH1cbiAgfVxuXG4gIHBvcFN3aXBlKGVudGVyUGFnZSwgbGVhdmVQYWdlLCBjYWxsYmFjaykge1xuICAgIGlmICh0aGlzLmlzRHJhZ1N0YXJ0KSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuc2hvdWxkQW5pbWF0ZVRvb2xiYXIpIHtcblxuICAgICAgYW5pbWl0LnJ1bkFsbChcblxuICAgICAgICAvKiBFbnRlciBwYWdlICovXG5cbiAgICAgICAgYW5pbWl0KFt0aGlzLmRlY29tcC5lbnRlci5jb250ZW50LCB0aGlzL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zvcm06IHRyYW5zbGF0ZTNkKCctMjUlJyksIG9wYWNpdHk6IDAuOSB9XG4gICAgICAgICAgICApXG4gICAgICAgICAgICAucXVldWUoZG9uZSA9PiB7XG4gICAgICAgICAgICAgIHRoaXMuYmFja2dyb3VuZE1hc2sucmVtb3ZlKCk7XG4gICAgICAgICAgICAgIHVuYmxvY2soKTtcbiAgICAgICAgICAgICAgY2FsbGJhY2soKTtcbiAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICBhbmltaXQobGVhdmVQYWdlRGVjb21wb3NpdGlvbi50b29sYmFyQ2VudGVyLCB0aGlzLmRlZilcbiAgICAgICAgICAgIC5kZWZhdWx0KFxuICAgICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoKSwgb3BhY2l0eTogMSB9LFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZChgLSR7ZGVsdGEudGl0bGV9cHhgKSxcbiAgICAgICAgICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICAgICAgICAgIHRyYW5zaXRpb246IGBvcGFjaXR5ICR7dGhpcy5kdXJhdGlvbn1zIGxpbmVhciwgdHJhbnNmb3JtICR7dGhpcy5kdXJhdGlvbn1zICR7dGhpcy50aW1pbmd9YFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgYW5pbWl0KGxlYXZlUGFnZURlY29tcG9zaXRpb24uYmFja0J1dHRvbkxhYmVsLCB0aGlzLmRlZilcbiAgICAgICAgICAgIC5kZWZhdWx0KFxuICAgICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoKSwgb3BhY2l0eTogMSB9LFxuICAgICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoYC0ke2RlbHRhLmxhYmVsfXB4YCksIG9wYWNpdHk6IDAgfVxuICAgICAgICAgICAg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9ybTogdHJhbnNsYXRlM2QoKSB9XG4gICAgICAgICAgKSxcblxuICAgICAgICBhbmltaXQoZW50ZXJQYWdlRGVjb21wb3NpdGlvbi5vdGhlciwgdGhpcy5kZWYpXG4gICAgICAgICAgLmRlZmF1bHQoXG4gICAgICAgICAgICB7IG9wYWNpdHk6IDAgfSxcbiAgICAgICAgICAgIHsgY3NzOiB7IG9wYWNpdHk6IDEgfSwgdGltaW5nOiAnbGluZWFyJyB9XG4gICAgICAgICAgKSxcblxuICAgICAgICBhbmltaXQoW2xlYXZlUGFnZURlY29tcG9zaXRpb24uY29udGVudCwgbGVhdmVQYWdlRGVjb21wb3NpdGlvbi5ib3R0b21Ub29sYmFyLCBsZWF2ZVBhZ2VEZWNvbXBvc2l0aW9uLmJhY2tncm91bmRdLCB0aGlzLmRlZilcbiAgICAgICAgICAuZGVmYXVsdChcbiAgICAgICAgICAgIHsgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZCgpIH0sXG4gICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoJzEwMCUnKSB9XG4gICAgICAgICAgKVxuICAgICAgICAgIC53YWl0KDApXG4gICAgICAgICAgLnF1ZXVlKGRvbmUgPT4ge1xuICAgICAgICAgICAgdGhpcy5iYWNrZ3JvdW5kTWFzay5yZW1vdmUoKTtcbiAgICAgICAgICAgIHVuYmxvY2soKTtcbiAgICAgICAgICAgIGNhbGxiYWNrKCk7XG4gICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgfSksXG5cbiAgICAgICAgYW5pbWl0KGxlYXZlUGFnZURlY29tcG9zaXRpb24udG9vbGJhciwgdGhpcy5kZWYpXG4gICAgICAgICAgLmRlZmF1bHQoXG4gICAgICAgICAgICB7IG9wYWNpdHk6IDEgfSxcbiAgICAgICAgICAgIHsgb3BhY2l0eTogMCB9XG4gICAgICAgICAgKSxcblxuICAgICAgICBhbmltaXQobGVhdmVQYWdlRGVjb21wb3NpdGlvbi50b29sYmFyQ2VudGVyLCB0aGlzLmRlZilcbiAgICAgICAgICAuZGVmYXVsdChcbiAgICAgICAgICAgIHsgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZCgpIH0sXG4gICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoJzEyNSUnKSB9XG4gICAgICAgICAgKSxcblxuICAgICAgICBhbmltaXQobGVhdmVQYWdlRGVjb21wb3NpdGlvbi5iYWNrQnV0dG9uTGFiZWwsIHRoaXMuZGVmKVxuICAgICAgICAgIC5kZWZhdWx0KFxuICAgICAgICAgICAgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCksIG9wYWNpdHk6IDEgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZChgJHtkZWx0YS50aXRsZX1weGApLFxuICAgICAgICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICAgICAgICB0cmFuc2l0aW9uOiBgb3BhY2l0eSAke3RoaXMuZHVyYXRpb259cyBsaW5lYXIsIHRyYW5zZm9ybSAke3RoaXMuZHVyYXRpb259cyAke3RoaXMudGltaW5nfWBcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApXG4gICAgICApO1xuICAgIH0gZWxzZSB7XG4gICAgICBhbmltaXQucnVuQWxsKFxuXG4gICAgICAgIGFuaW1pdChlbnRlclBhZ2UsIHRoaXMuZGVmKVxuICAgICAgICAgIC5kZWZhdWx0KFxuICAgICAgICAgICAgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCctMjUlJyksIG9wYWNpdHk6IC45IH0sXG4gICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoKSwgb3BhY2l0eTogMSB9XG4gICAgICAgICAgKSxcblxuICAgICAgICBhbmltaXQobGVhdmVQYWdlLCB0aGlzLmRlZilcbiAgICAgICAgICAuZGVmYXVsdChcbiAgICAgICAgICAgIHsgdHJhbnNmb3JtOiB0cmFuc2xhdGUz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bL2phXVxuICAgKi9cblxuICAvKipcbiAgICogQGV2ZW50IHBvc3Rwb3BcbiAgICogQGRlc2NyaXB0aW9uXG4gICAqICAgW2VuXUZpcmVkIGp1c3QgYWZ0ZXIgYSBwYWdlIGlzIHBvcHBlZC5bL2VuXVxuICAgKiAgIFtqYV1wYWdl44GMcG9w44GV44KM44Gm44Ki44OL44Oh44O844K344On44Oz44GM57WC44KP44Gj44Gf5b6M44Gr55m654Gr44GV44KM44G+44GZ44CCWy9qYV1cbiAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50IFtlbl1FdmVudCBvYmplY3QuWy9lbl1cbiAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50Lm5hdmlnYXRvclxuICAgKiAgIFtlbl1Db21wb25lbnQgb2JqZWN0LlsvZW5dXG4gICAqICAgW2phXeOCs+ODs+ODneODvOODjeODs+ODiOOBruOCquODluOCuOOCp+OCr+ODiOOAglsvamFdXG4gICAqIEBwYXJhbSB7T2JqZWN0fSBldmVudC5lbnRlclBhZ2VcbiAgICogICBbZW5dT2JqZWN0IG9mIHRoZSBuZXh0IHBhZ2UuWy9lbl1cbiAgICogICBbamFdcG9w44GV44KM44Gm6KGo56S644GV44KM44KL44Oa44O844K444Gu44Kq44OW44K444Kn44Kv44OI44CCWy9qYV1cbiAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50LmxlYXZlUGFnZVxuICAgKiAgIFtlbl1PYmplY3Qgb2YgdGhlIHByZXZpb3VzIHBhZ2UuWy9lbl1cbiAgICogICBbamFdcG9w44GV44KM44Gm5raI44GI44KL44Oa44O844K444Gu44Kq44OW44K444Kn44Kv44OI44CCWy9qYV1cbiAgICovXG5cbiAgZ2V0IGFuaW1hdG9yRmFjdG9yeSgpIHtcbiAgICByZXR1cm4gdGhpcy5fYW5pbWF0b3JGYWN0b3J5O1xuICB9XG5cbiAgY29uc3RydWN0b3IoKSB7XG4gICAgc3VwZXIoKTtcblxuICAgIHRoaXMuX2lzUnVubmluZyA9I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9vbGJhci1idXR0b24+YCBjb21wb25lbnQgZGlzcGxheXMgYSB0b29sYmFyIGJ1dHRvbiBpbnNpZGUgdGhlIHRvb2xiYXIuWy9lbl1cbiAqICAgW2phXW9ucy10b29sYmFyLWJ1dHRvbuOCs+ODs+ODneODvOODjeODs+ODiFsvamFdXG4gKiBAZXhhbXBsZVxuICogPG9ucy1wYWdlPlxuICogICA8b25zLXRvb2xiYXI+XG4gKiAgICAgPGRpdiBjbGFzcz1cImxlZnRcIj5cbiAqICAgICAgIDxvbnMtYmFjay1idXR0b24+XG4gKiAgICAgICAgIEJhY2tcbiAqICAgICAgIDwvb25zLWJhY2stYnV0dG9uPlxuICogICAgIDwvZGl2PlxuICogICAgIDxkaXYgY2xhc3M9XCJjZW50ZXJcIj5cbiAqICAgICAgIFRpdGxlXG4gKiAgICAgPC9kaXY+XG4gKiAgICAgPGRpdiBjbGFzcz1cInJpZ2h0XCI+XG4gKiAgICAgICA8b25zLXRvb2xiYXItYnV0dG9uPlxuICogICAgICAgICA8b25zLWljb24gaWNvbj1cIm1kLW1lbnVcIj48L29ucy1pY29uPlxuICogICAgICAgPC9vbnMtdG9vbGJhci1idXR0b24+XG4gKiAgICAgPC9kaXY+XG4gKiAgIDwvb25zLXRvb2xiYXI+XG4gKiA8L29ucy1wYWdlPlxuICovXG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFRvb2xiYXJFbGVtZW50IGV4dGVuZHMgQmFzZUVsZW1lbnQge1xuXG4gIC8qKlxuICAgKiBAYXR0cmlidXRlIGlubGluZVxuICAgKiBAaW5pdG9ubHlcbiAgICogQGRlc2NyaXB0aW9uXG4gICAqICAgW2VuXURpc3BsYXkgdGhlIHRvb2xiYXIgYXMgYW4gaW5saW5lIGVsZW1lbnQuWy9lbl1cbiAgICogICBbamFd44OE44O844Or44OQ44O844KS44Kk44Oz44Op44Kk44Oz44Gr572u44GN44G+44GZ44CC44K544Kv44Ot44O844Or6aCY5Z+f5YaF44Gr44Gd44Gu44G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wIGFuZCAxMDAuWy9lbl1cbiAgICogICBbamFd54++5Zyo44Gu6YCy6KGM54q25rOB44Gu5YCk44KS5oyH5a6a44GX44G+44GZ44CCMOOBi+OCiTEwMOOBrumWk+OBruWApOOCkuaMh+WumuOBl+OBpuS4i+OBleOBhOOAglsvamFdXG4gICAqL1xuXG4gIC8qKlxuICAgKiBAYXR0cmlidXRlIHNlY29uZGFyeS12YWx1ZVxuICAgKiBAdHlwZSB7TnVtYmVyfVxuICAgKiBAZGVzY3JpcHRpb25cbiAgICogICBbZW5dQ3VycmVudCBzZWNvbmRhcnkgcHJvZ3Jlc3MuIFNob3VsZCBiZSBhIHZhbHVlIGJldHdlZW4gMCBhbmQgMTAwLlsvZW5dXG4gICAqICAgW2phXeePvuWcqOOBru+8kueVquebruOBrumAsuihjOeKtuazgeOBruWApOOCkuaMh+WumuOBl+OBvuOBmeOAgjDjgYvjgokxMDDjga7plpPjga7lgKTjgpLmjIflrprjgZfjgabkuIvjgZXjgYTjgIJbL2phXVxuICAgKi9cblxuICAvKipcbiAgICogQGF0dHJpYnV0ZSBpbmRldGVybWluYXRlXG4gICAqIEBkZXNjcmlwdGlvblxuICAgKiAgIFtlbl1JZiB0aGlzIGF0dHJpYnV0ZSBpcyBzZXQsIGFuIGluZmluaXRlIGxvb3BpbmcgYW5pbWF0aW9uIHdpbGwgYmUgc2hvd24uWy9lbl1cbiAgICogICBbamFd44GT44Gu5bGe5oCn44GM6Kit5a6a44GV44KM44Gf5aC05ZCI44CB44Or44O844OX44GZ44KL44Ki44OL44Oh44O844K344On44Oz44GM6KGo56S644GV44KM44G+44GZ44CCWy9qYV1cbiAgICovXG5cbiAgY29uc3RydWN0b3IoKSB7XG4gICAgc3VwZXIoKTtcblxuICAgIGNvbnRlbnRSZWFkeSh0aGlzLCAoKSA9PiB0aGlzLl9jb21waWxlKCkpO1xuICB9XG5cbiAgX2NvbXBpbGUoKSB7XG4gICAgaWYgKCF0aGlzLl9pc0NvbXBpbGVkKCkpIHt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qIHggKyB5ICogeSk7XG4gICAgICB9IGVsc2UgaWYgKHNpemUgPT09ICdjb250YWluJykge1xuICAgICAgICByID0gTWF0aC5taW4oeCwgeSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBlcnJvcigpO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICB4ID0gKHR5cGVvZiBlLmNsaWVudFggPT09ICdudW1iZXInID8gZS5jbGllbnRYIDogZS5jaGFuZ2VkVG91Y2hlc1swXS5jbGllbnRYKSAtIGIubGVmdDtcbiAgICAgIHkgPSAodHlwZW9mIGUuY2xpZW50WSA9PT0gJ251bWJlcicgPyBlLmNsaWVudFkgOiBlLmNoYW5nZWRUb3VjaGVzWzBdLmNsaWVudFkpIC0gYi50b3A7XG4gICAgICBoID0gTWF0aC5tYXgoeSwgYi5oZWlnaHQgLSB5KTtcbiAgICAgIHcgPSBNYXRoLm1heCh4LCBiLndpZHRoIC0geCk7XG5cbiAgICAgIGlmIChzaXplID09PSAnY292ZXInKSB7XG4gICAgICAgIHIgPSBNYXRoLnNxcnQoaCAqIGggKyB3ICogdyk7XG4gICAgICB9IGVsc2UgaWYgKHNpemUgPT09ICdjb250YWluJykge1xuICAgICAgICByID0gTWF0aC5taW4oTWF0aC5yb3VuZChoIC8gMiksIE1hdGgucm91bmQodyAvIDIpKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGVycm9yKCk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIHt4LCB5LCByfTtcbiAgfVxuXG4gIF9yaXBwbGVBbmltYXRpb24oZSwgZHVyYXRpb24gPSAzMDApIHtcbiAgICBjb25zdCB7X2FuaW1hdG9yLCBfd2F2ZSwgX2JhY2tncm91bmQsIF9taW5SfSA9IHRoaXM7XG4gICAgY29uc3Qge3gsIHksIHJ9ID0gdGhpcy5fY2FsY3VsYXRlQ29vcmRzKGUpO1xuXG4gICAgX2FuaW1hdG9yLnN0b3BBbGwoe3N0b3BOZXh0OiAxfSk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06IGB0cmFuc2xhdGUzZCgke3RoaXMubWludXMgKyB0aGlzLm1heFdpZHRofXB4LCAwLCAwKWBcbiAgICAgICAgICB9LCB0aGlzLmRlZiksXG5cbiAgICAgICAgYW5pbWl0KHRoaXMuX21hc2spXG4gICAgICAgICAgLndhaXQodGhpcy5kZWxheSlcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgZGlzcGxheTogJ2Jsb2NrJ1xuICAgICAgICAgIH0pLFxuXG4gICAgICAgIGFuaW1pdCh0aGlzLl9zaWRlLl9jb250ZW50KVxuICAgICAgICAgIC53YWl0KHRoaXMuZGVsYXkpXG4gICAgICAgICAgLnF1ZXVlKG1lbnVTdHlsZS5jb250ZW50LCB0aGlzLmRlZiksXG5cbiAgICAgICAgYW5pbWl0KHRoaXMuX3NpZGUpXG4gICAgICAgICAgLndhaXQodGhpcy5kZWxheSlcbiAgICAgICAgICAucXVldWUobWVudVN0eWxlLmNvbnRhaW5lciwgdGhpcy5kZWYpXG4gICAgICAgICAgLnF1ZXVlKGNhbGxiYWNrID0+IHtcbiAgICAgICAgICAgIHRoaXMuX3NsaWRpbmdFbGVtZW50cyA9IG51bGw7XG4gICAgICAgICAgICBjYWxsYmFjaygpO1xuICAgICAgICAgICAgZG9uZSAmJiBkb25lKCk7XG4gICAgICAgICAgfSksXG4gICAgICApO1xuICAgIH0sIDEwMDAvNjApO1xuICB9XG5cbiAgLyoqXG4gICAqIEBwYXJhbSB7RnVuY3Rpb259IGRvbmVcbiAgICovXG4gIGNsb3NlKGRvbmUpIHtcbiAgICBjb25zdCBtZW51U3R5bGUgPSB0aGlzLl9nZW5lcmF0ZUJlaGluZFBhZ2VTdHlsZSgwKTtcbiAgICB0aGlzLl9zbGlkaW5nRWxlbWVudHMgPSB0aGlzLl9nZXRTbGlkaW5nRWxlbWVudHMoKTtcblxuICAgIGFuaW1pdC5ydW5BbGwoXG4gICAgICBhbmltaXQodGhpcy5fc2xpZGluZ0VsZW1lbnRzKVxuICAgICAgICAud2FpdCh0aGlzLmRlbGF5KVxuICAgICAgICAucXVldWUoe1xuICAgICAgICAgIHRyYW5zZm9ybTogJ3RyYW5zbGF0ZTNkKDAsIDAsIDApJ1xuICAgICAgICB9LCB0aGlzLmRlZiksXG5cbiAgICAgIGFuaW1pdCh0aGlzLl9tYXNrKVxuICAgICAgICAud2FpdCh0aGlzLmRlbGF5KVxuICAgICAgICAucXVldWUoe1xuICAgICAgICAgIGRpc3BsYXk6ICdub25lJ1xuICAgICAgICB9KSxcblxuICAgICAgYW5pbWl0KHRoaXMuX3NpZGUuX2NvbnRlbnQpXG4gICAgICAgIC53YWl0KHRoaXMuZGVsYXkpXG4gICAgICAgIC5xdWV1ZShtZW51U3R5bGUuY29udGVudCwgdGhpcy5kZWYpLFxuXG4gICAgICBhbmltaXQodGhpcy5fc2lkZSlcbiAgICAgICAgLndhaXQodGhpcy5kZWxheSlcbiAgICAgICAgLnF1ZXVlKG1lbnVTdHlsZS5jb250YWluZXIsIHRoaXMuZGVmKVxuICAgICAgICAucXVldWUoY2FsbGJhY2sgPT4ge1xuICAgICAgICAgIHRoaXMuX3NsaWRpbmdFbGVtZW50cyA9IG51bGw7XG4gICAgICAgICAgdGhpcy5fc2lkZS5zdHlsZS56SW5kZXggPSAwO1xuICAgICAgICAgIHRoaXMuX3NpZGUuc3R5bGUuZGlzcGxheSA9ICdub25lJztcbiAgICAgICAgICB0aGlzLl9zaWRlLl9jb250ZW50LnN0eWxlLm9wYWNpdHkgPSAnJztcbiAgICAgICAgICBkb25lICYmIGRvbmUoKTtcbiAgICAgICAgICBjYWxsYmFjaygpO1xuICAgICAgICB9KSxcbiAgICApO1xuICB9XG5cbiAgX2dldE1heFdpZHRoKCkge1xuICAgIHJldHVybiB0aGlzLl9zaWRlLm9mZnNldFdpZHRoO1xuICB9XG59XG4iLCIvKlxuQ29weXJpZ2h0IDIwMTMtMjAxNSBBU0lBTCBDT1JQT1JBVElPTlxuXG5MaWNlbnNlZCB1bmRlciB0aGUgQ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VuXVxuICAgKiAgIFtqYV3nj77lnKjjga7jg6Ljg7zjg4njgpLov5TjgZfjgb7jgZnjgIJbL2phXVxuICAgKi9cblxuICAvKipcbiAgICogQGV2ZW50IHByZW9wZW5cbiAgICogQGRlc2NyaXB0aW9uXG4gICAqICAgW2VuXUZpcmVkIGp1c3QgYmVmb3JlIHRoZSBzbGlkaW5nIG1lbnUgaXMgb3BlbmVkLlsvZW5dXG4gICAqICAgW2phXeOCueODqeOCpOODh+OCo+ODs+OCsOODoeODi+ODpeODvOOBjOmWi+OBj+WJjeOBq+eZuueBq+OBl+OBvuOBmeOAglsvamFdXG4gICAqIEBwYXJhbSB7T2JqZWN0fSBldmVudFxuICAgKiAgIFtlbl1FdmVudCBvYmplY3QuWy9lbl1cbiAgICogICBbamFd44Kk44OZ44Oz44OI44Kq44OW44K444Kn44Kv44OI44Gn44GZ44CCWy9qYV1cbiAgICogQHBhcmFtIHtGdW5jdGlvbn0gZXZlbnQuY2FuY2VsXG4gICAqICAgW2VuXUNhbGwgdG8gY2FuY2VsIG9wZW5pbmcgc2xpZGluZyBtZW51LlsvZW5dXG4gICAqICAgW2phXeOCueODqeOCpOODh+OCo+ODs+OCsOODoeODi+ODpeODvOOBjOmWi+OBj+OBruOCkuOCreODo+ODs+OCu+ODq+OBl+OBvuOBmeOAglsvamFdXG4gICAqIEBwYXJhbSB7T2JqZWN0fSBldmVudC5zaWRlXG4gICAqICAgW2VuXUNvbXBvbmVudCBvYmplY3QuWy9lbl1cbiAgICogICBbamFd44Kz44Oz44Od44O844ON44Oz44OI44Gu44Kq44OW44K444Kn44Kv44OI44CCWy9qYV1cbiAgICovXG5cbiAgLyoqXG4gICAqIEBldmVudCBwb3N0b3BlblxuICAgKiBAZGVzY3JpcHRpb25cbiAgICogICBbZW5dRmlyZWQganVzdCBhZnRlciB0aGUgc2xpZGluZyBtZW51IGlzIG9wZW5lZC5bL2VuXVxuICAgKiAgIFtqYV3jgrnjg6njgqTjg4fjgqPjg7PjgrDjg6Hjg4vjg6Xjg7zjgYzplovjgYTjgZ/lvozjgavnmbrngavjgZfjgb7jgZnjgIJbL2phXVxuICAgKiBAcGFyYW0ge09iamVjdH0gZXZlbnRcbiAgICogICBbZW5dRXZlbnQgb2JqZWN0LlsvZW5dXG4gICAqICAgW2phXeOCpOODmeODs+ODiOOCquODluOCuOOCp+OCr+ODiOOBp+OBmeOAglsvamFdXG4gICAqIEBwYXJhbSB7T2JqZWN0fSBldmVudC5zaWRlXG4gICAqICAgW2VuXUNvbXBvbmVudCBvYmplY3QuWy9lbl1cbiAgICogICBbamFd44Kz44Oz44Od44O844ON44Oz44OI44Gu44Kq44OW44K444Kn44Kv44OI44CCWy9qYV1cbiAgICovXG5cbiAgLyoqXG4gICAqIEBldmVudCBwcmVjbG9zZVxuICAgKiBAZGVzY3JpcHRpb25cbiAgICogICBbZW5dRmlyZWQganVzdCBiZWZvcmUgdGhlIHNsaWRpbmcgbWVudSBpcyBjbG9zZWQuWy9lbl1cbiAgICogICBbamFd44K544Op44Kk44OH44Kj44Oz44Kw44Oh44OL44Ol44O844GM6ZaJ44GY44KL5YmN44Gr55m654Gr44GX44G+44GZ44CCWy9qYV1cbiAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50XG4gICAqICAgW2VuXUV2ZW50IG9iamVjdC5bL2VuXVxuICAgKiAgIFtqYV3jgqTjg5njg7Pjg4jjgqrjg5bjgrjjgqfjgq/jg4jjgafjgZnjgIJbL2phXVxuICAgKiBAcGFyYW0ge09iamVjdH0gZXZlbnQuc2lkZVxuICAgKiAgIFtlbl1Db21wb25lbnQgb2JqZWN0LlsvZW5dXG4gICAqICAgW2phXeOCs+ODs+ODneODvOODjeODs+ODiOOBruOCquODluOCuOOCp+OCr+ODiOOAglsvamFdXG4gICAqIEBwYXJhbSB7RnVuY3Rpb259IGV2ZW50LmNhbmNlbFxuICAgKiAgIFtlbl1DYWxsIHRvIGNhbmNlbCBvcGVuaW5nIHNsaWRpbmctbWVudS5bL2VuXVxuIC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