app.js 4.3 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739108740108741108742108743108744108745108746108747108748108749108750108751108752108753108754108755108756108757108758108759108760108761108762108763108764108765108766108767108768108769108770108771108772108773108774108775108776108777108778108779108780108781108782108783108784108785108786108787108788108789108790108791108792108793108794108795108796108797108798108799108800108801108802108803108804108805108806108807108808108809108810108811108812108813108814108815108816108817108818108819108820108821108822108823108824108825108826108827108828108829108830108831108832108833108834108835108836108837108838108839108840108841108842108843108844108845108846108847108848108849108850108851108852108853108854108855108856108857108858108859108860108861108862108863108864108865108866108867108868108869108870108871108872108873108874108875108876108877108878108879108880108881108882108883108884108885108886108887108888108889108890108891108892108893108894108895108896108897108898108899108900108901108902108903108904108905108906108907108908108909108910108911108912108913108914108915108916108917108918108919108920108921108922108923108924108925108926108927108928108929108930108931108932108933108934108935108936108937108938108939108940108941108942108943108944108945108946108947108948108949108950108951108952108953108954108955108956108957108958108959108960108961108962108963108964108965108966108967108968108969108970108971108972108973108974108975108976108977108978108979108980108981108982108983108984108985108986108987108988108989108990108991108992108993108994108995108996108997108998108999109000109001109002109003109004109005109006109007109008109009109010109011109012109013109014109015109016109017109018109019109020109021109022109023109024109025109026109027109028109029109030109031109032109033109034109035109036109037109038109039109040109041109042109043109044109045109046109047109048109049109050109051109052109053109054109055109056109057109058109059109060109061109062109063109064109065109066109067109068109069109070109071109072109073109074109075109076109077109078109079109080109081109082109083109084109085109086109087109088109089109090109091109092109093109094109095109096109097109098109099109100109101109102109103109104109105109106109107109108109109109110109111109112109113109114109115109116109117109118109119109120109121109122109123109124109125109126109127109128109129109130109131109132109133109134109135109136109137109138109139109140109141109142109143109144109145109146109147109148109149109150109151109152109153109154109155109156109157109158109159109160109161109162109163109164109165109166109167109168109169109170109171109172109173109174109175109176109177109178109179109180109181109182109183109184109185109186109187109188109189109190109191109192109193109194109195109196109197109198109199109200109201109202109203109204109205109206109207109208109209109210109211109212109213109214109215109216109217109218109219109220109221109222109223109224109225109226109227109228109229109230109231109232109233109234109235109236109237109238109239109240109241109242109243109244109245109246109247109248109249109250109251109252109253109254109255109256109257109258109259109260109261109262109263109264109265109266109267109268109269109270109271109272109273109274109275109276109277109278109279109280109281109282109283109284109285109286109287109288109289109290109291109292109293109294109295109296109297109298109299109300109301109302109303109304109305109306109307109308109309109310109311109312109313109314109315109316109317109318109319109320109321109322109323109324109325109326109327109328109329109330109331109332109333109334109335109336109337109338109339109340109341109342109343109344109345109346109347109348109349109350109351109352109353109354109355109356109357109358109359109360109361109362109363109364109365109366109367109368109369109370109371109372109373109374109375109376109377109378109379109380109381109382109383109384109385109386109387109388109389109390109391109392109393109394109395109396109397109398109399109400109401109402109403109404109405109406109407109408109409109410109411109412109413109414109415109416109417109418109419109420109421109422109423109424109425109426109427109428109429109430109431109432109433109434109435109436109437109438109439109440109441109442109443109444109445109446109447109448109449109450109451109452109453109454109455109456109457109458109459109460109461109462109463109464109465109466109467109468109469109470109471109472109473109474109475109476109477109478109479109480109481109482109483109484109485109486109487109488109489109490109491109492109493109494109495109496109497109498109499109500109501109502109503109504109505109506109507109508109509109510109511109512109513109514109515109516109517109518109519109520109521109522109523109524109525109526109527109528109529109530109531109532109533109534109535109536109537109538109539109540109541109542109543109544109545109546109547109548109549109550109551109552109553109554109555109556109557109558109559109560109561109562109563109564109565109566109567109568109569109570109571109572109573109574109575109576109577109578109579109580109581109582109583109584109585109586109587109588109589109590109591109592109593109594109595109596109597109598109599109600109601109602109603109604109605109606109607109608109609109610109611109612109613109614109615109616109617109618109619109620109621109622109623109624109625109626109627109628109629109630109631109632109633109634109635109636109637109638109639109640109641109642109643109644109645109646109647109648109649109650109651109652109653109654109655109656109657109658109659109660109661109662109663109664109665109666109667109668109669109670109671109672109673109674109675109676109677109678109679109680109681109682109683109684109685109686109687109688109689109690109691109692109693109694109695109696109697109698109699109700109701109702109703109704109705109706109707109708109709109710109711109712109713109714109715109716109717109718109719109720109721109722109723109724109725109726109727109728109729109730109731109732109733109734109735109736109737109738109739109740109741109742109743109744109745109746109747109748109749109750109751109752109753109754109755109756109757109758109759109760109761109762109763109764109765109766109767109768109769109770109771109772109773109774109775109776109777109778109779109780109781109782109783109784109785109786109787109788109789109790109791109792109793109794109795109796109797109798109799109800109801109802109803109804109805109806109807109808109809109810109811109812109813109814109815109816109817109818109819109820109821109822109823109824109825109826109827109828109829109830109831109832109833109834109835109836109837109838109839109840109841109842109843109844109845109846109847109848109849109850109851109852109853109854109855109856109857109858109859109860109861109862109863109864109865109866109867109868109869109870109871109872109873109874109875109876109877109878109879109880109881109882109883109884109885109886109887109888109889109890109891109892109893109894109895109896109897109898109899109900109901109902109903109904109905109906109907109908109909109910109911109912109913109914109915109916109917109918109919109920109921109922109923109924109925109926109927109928109929109930109931109932109933109934109935109936109937109938109939109940109941109942109943109944109945109946109947109948109949109950109951109952109953109954109955109956109957109958109959109960109961109962109963109964109965109966109967109968109969109970109971109972109973109974109975109976109977109978109979109980109981109982109983109984109985109986109987109988109989109990109991109992109993109994109995109996109997109998109999110000110001110002110003110004110005110006110007110008110009110010110011110012110013110014110015110016110017110018110019110020110021110022110023110024110025110026110027110028110029110030110031110032110033110034110035110036110037110038110039110040110041110042110043110044110045110046110047110048110049110050110051110052110053110054110055110056110057110058110059110060110061110062110063110064110065110066110067110068110069110070110071110072110073110074110075110076110077110078110079110080110081110082110083110084110085110086110087110088110089110090110091110092110093110094110095110096110097110098110099110100110101110102110103110104110105110106110107110108110109110110110111110112110113110114110115110116110117110118110119110120110121110122110123110124110125110126110127110128110129110130110131110132110133110134110135110136110137110138110139110140110141110142110143110144110145110146110147110148110149110150110151110152110153110154110155110156110157110158110159110160110161110162110163110164110165110166110167110168110169110170110171110172110173110174110175110176110177110178110179110180110181110182110183110184110185110186110187110188110189110190110191110192110193110194110195110196110197110198110199110200110201110202110203110204110205110206110207110208110209110210110211110212110213110214110215110216110217110218110219110220110221110222110223110224110225110226110227110228110229110230110231110232110233110234110235110236110237110238110239110240110241110242110243110244110245110246110247110248110249110250110251110252110253110254110255110256110257110258110259110260110261110262110263110264110265110266110267110268110269110270110271110272110273110274110275110276110277110278110279110280110281110282110283110284110285110286110287110288110289110290110291110292110293110294110295110296110297110298110299110300110301110302110303110304110305110306110307110308110309110310110311110312110313110314110315110316110317110318110319110320110321110322110323110324110325110326110327110328110329110330110331110332110333110334110335110336110337110338110339110340110341110342110343110344110345110346110347110348110349110350110351110352110353110354110355110356110357110358110359110360110361110362110363110364110365110366110367110368110369110370110371110372110373110374110375110376110377110378110379110380110381110382110383110384110385110386110387110388110389110390110391110392110393110394110395110396110397110398110399110400110401110402110403110404110405110406110407110408110409110410110411110412110413110414110415110416110417110418110419110420110421110422110423110424110425110426110427110428110429110430110431110432110433110434110435110436110437110438110439110440110441110442110443110444110445110446110447110448110449110450110451110452110453110454110455110456110457110458110459110460110461110462110463110464110465110466110467110468110469110470110471110472110473110474110475110476110477110478110479110480110481110482110483110484110485110486110487110488110489110490110491110492110493110494110495110496110497110498110499110500110501110502110503110504110505110506110507110508110509110510110511110512110513110514110515110516110517110518110519110520110521110522110523110524110525110526110527110528110529110530110531110532110533110534110535110536110537110538110539110540110541110542110543110544110545110546110547110548110549110550110551110552110553110554110555110556110557110558110559110560110561110562110563110564110565110566110567110568110569110570110571110572110573110574110575110576110577110578110579110580110581110582110583110584110585110586110587110588110589110590110591110592110593110594110595110596110597110598110599110600110601110602110603110604110605110606110607110608110609110610110611110612110613110614110615110616110617110618110619110620110621110622110623110624110625110626110627110628110629110630110631110632110633110634110635110636110637110638110639110640110641110642110643110644110645110646110647110648110649110650110651110652110653110654110655110656110657110658110659110660110661110662110663110664110665110666110667110668110669110670110671110672110673110674110675110676110677110678110679110680110681110682110683110684110685110686110687110688110689110690110691110692110693110694110695110696110697110698110699110700110701110702110703110704110705110706110707110708110709110710110711110712110713110714110715110716110717110718110719110720110721110722110723110724110725110726110727110728110729110730110731110732110733110734110735110736110737110738110739110740110741110742110743110744110745110746110747110748110749110750110751110752110753110754110755110756110757110758110759110760110761110762110763110764110765110766110767110768110769110770110771110772110773110774110775110776110777110778110779110780110781110782110783110784110785110786110787110788110789110790110791110792110793110794110795110796110797110798110799110800110801110802110803110804110805110806110807110808110809110810110811110812110813110814110815110816110817110818110819110820110821110822110823110824110825110826110827110828110829110830110831110832110833110834110835110836110837110838110839110840110841110842110843110844110845110846110847110848110849110850110851110852110853110854110855110856110857110858110859110860110861110862110863110864110865110866110867110868110869110870110871110872110873110874110875110876110877110878110879110880110881110882110883110884110885110886110887110888110889110890110891110892110893110894110895110896110897110898110899110900110901110902110903110904110905110906110907110908110909110910110911110912110913110914110915110916110917110918110919110920110921110922110923110924110925110926110927110928110929110930110931110932110933110934110935110936110937110938110939110940110941110942110943110944110945110946110947110948110949110950110951110952110953110954110955110956110957110958110959110960110961110962110963110964110965110966110967110968110969110970110971110972110973110974110975110976110977110978110979110980110981110982110983110984110985110986110987110988110989110990110991110992110993110994110995110996110997110998110999111000111001111002111003111004111005111006111007111008111009111010111011111012111013111014111015111016111017111018111019111020111021111022111023111024111025111026111027111028111029111030111031111032111033111034111035111036111037111038111039111040111041111042111043111044111045111046111047111048111049111050111051111052111053111054111055111056111057111058111059111060111061111062111063111064111065111066111067111068111069111070111071111072111073111074111075111076111077111078111079111080111081111082111083111084111085111086111087111088111089111090111091111092111093111094111095111096111097111098111099111100111101111102111103111104111105111106111107111108111109111110111111111112111113111114111115111116111117111118111119111120111121111122111123111124111125111126111127111128111129111130111131111132111133111134111135111136111137111138111139111140111141111142111143111144111145111146111147111148111149111150111151111152111153111154111155111156111157111158111159111160111161111162111163111164111165111166111167111168111169111170111171111172111173111174111175111176111177111178111179111180111181111182111183111184111185111186111187111188111189111190111191111192111193111194111195111196111197111198111199111200111201111202111203111204111205111206111207111208111209111210111211111212111213111214111215111216111217111218111219111220111221111222111223111224111225111226111227111228111229111230111231111232111233111234111235111236111237111238111239111240111241111242111243111244111245111246111247111248111249111250111251111252111253111254111255111256111257111258111259111260111261111262111263111264111265111266111267111268111269111270111271111272111273111274111275111276111277111278111279111280111281111282111283111284111285111286111287111288111289111290111291111292111293111294111295111296111297111298111299111300111301111302111303111304111305111306111307111308111309111310111311111312111313111314111315111316111317111318111319111320111321111322111323111324111325111326111327111328111329111330111331111332111333111334111335111336111337111338111339111340111341111342111343111344111345111346111347111348111349111350111351111352111353111354111355111356111357111358111359111360111361111362111363111364111365111366111367111368111369111370111371111372111373111374111375111376111377111378111379111380111381111382111383111384111385111386111387111388111389111390111391111392111393111394111395111396111397111398111399111400111401111402111403111404111405111406111407111408111409111410111411111412111413111414111415111416111417111418111419111420111421111422111423111424111425111426111427111428111429111430111431111432111433111434111435111436111437111438111439111440111441111442111443111444111445111446111447111448111449111450111451111452111453111454111455111456111457111458111459111460111461111462111463111464111465111466111467111468111469111470111471111472111473111474111475111476111477111478111479111480111481111482111483111484111485111486111487111488111489111490111491111492111493111494111495111496111497111498111499111500111501111502111503111504111505111506111507111508111509111510111511111512111513111514111515111516111517111518111519111520111521111522111523111524111525111526111527111528111529111530111531111532111533111534111535111536111537111538111539111540111541111542111543111544111545111546111547111548111549111550111551111552111553111554111555111556111557111558111559111560111561111562111563111564111565111566111567111568111569111570111571111572111573111574111575111576111577111578111579111580111581111582111583111584111585111586111587111588111589111590111591111592111593111594111595111596111597111598111599111600111601111602111603111604111605111606111607111608111609111610111611111612111613111614111615111616111617111618111619111620111621111622111623111624111625111626111627111628111629111630111631111632111633111634111635111636111637111638111639111640111641111642111643111644111645111646111647111648111649111650111651111652111653111654111655111656111657111658111659111660111661111662111663111664111665111666111667111668111669111670111671111672111673111674111675111676111677111678111679111680111681111682111683111684111685111686111687111688111689111690111691111692111693111694111695111696111697111698111699111700111701111702111703111704111705111706111707111708111709111710111711111712111713111714111715111716111717111718111719111720111721111722111723111724111725111726111727111728111729111730111731111732111733111734111735111736111737111738111739111740111741111742111743111744111745111746111747111748111749111750111751111752111753111754111755111756111757111758111759111760111761111762111763111764111765111766111767111768111769111770111771111772111773111774111775111776111777111778111779111780111781111782111783111784111785111786111787111788111789111790111791111792111793111794111795111796111797111798111799111800111801111802111803111804111805111806111807111808111809111810111811111812111813111814111815111816111817111818111819111820111821111822111823111824111825111826111827111828111829111830111831111832111833111834111835111836111837111838111839111840111841111842111843111844111845111846111847111848111849111850111851111852111853111854111855111856111857111858111859111860111861111862111863111864111865111866111867111868111869111870111871111872111873111874111875111876111877111878111879111880111881111882111883111884111885111886111887111888111889111890111891111892111893111894111895111896111897111898111899111900111901111902111903111904111905111906111907111908111909111910111911111912111913111914111915111916111917111918111919111920111921111922111923111924111925111926111927111928111929111930111931111932111933111934111935111936111937111938111939111940111941111942111943111944111945111946111947111948111949111950111951111952111953111954111955111956111957111958111959111960111961111962111963111964111965111966111967111968111969111970111971111972111973111974111975111976111977111978111979111980111981111982111983111984111985111986111987111988111989111990111991111992111993111994111995111996111997111998111999112000112001112002112003112004112005112006112007112008112009112010112011112012112013112014112015112016112017112018112019112020112021112022112023112024112025112026112027112028112029112030112031112032112033112034112035112036112037112038112039112040112041112042112043112044112045112046112047112048112049112050112051112052112053112054112055112056112057112058112059112060112061112062112063112064112065112066112067112068112069112070112071112072112073112074112075112076112077112078112079112080112081112082112083112084112085112086112087112088112089112090112091112092112093112094112095112096112097112098112099112100112101112102112103112104112105112106112107112108112109112110112111112112112113112114112115112116112117112118112119112120112121112122112123112124112125112126112127112128112129112130112131112132112133112134112135112136112137112138112139112140112141112142112143112144112145112146112147112148112149112150112151112152112153112154112155112156112157112158112159112160112161112162112163112164112165112166112167112168112169112170112171112172112173112174112175112176112177112178112179112180112181112182112183112184112185112186112187112188112189112190112191112192112193112194112195112196112197112198112199112200112201112202112203112204112205112206112207112208112209112210112211112212112213112214112215112216112217112218112219112220112221112222112223112224112225112226112227112228112229112230112231112232112233112234112235112236112237112238112239112240112241112242112243112244112245112246112247112248112249112250112251112252112253112254112255112256112257112258112259112260112261112262112263112264112265112266112267112268112269112270112271112272112273112274112275112276112277112278112279112280112281112282112283112284112285112286112287112288112289112290112291112292112293112294112295112296112297112298112299112300112301112302112303112304112305112306112307112308112309112310112311112312112313112314112315112316112317112318112319112320112321112322112323112324112325112326112327112328112329112330112331112332112333112334112335112336112337112338112339112340112341112342112343112344112345112346112347112348112349112350112351112352112353112354112355112356112357112358112359112360112361112362112363112364112365112366112367112368112369112370112371112372112373112374112375112376112377112378112379112380112381112382112383112384112385112386112387112388112389112390112391112392112393112394112395112396112397112398112399112400112401112402112403112404112405112406112407112408112409112410112411112412112413112414112415112416112417112418112419112420112421112422112423112424112425112426112427112428112429112430112431112432112433112434112435112436112437112438112439112440112441112442112443112444112445112446112447112448112449112450112451112452112453112454112455112456112457112458112459112460112461112462112463112464112465112466112467112468112469112470112471112472112473112474112475112476112477112478112479112480112481112482112483112484112485112486112487112488112489112490112491112492112493112494112495112496112497112498112499112500112501112502112503112504112505112506112507112508112509112510112511112512112513112514112515112516112517112518112519112520112521112522112523112524112525112526112527112528112529112530112531112532112533112534112535112536112537112538112539112540112541112542112543112544112545112546112547112548112549112550112551112552112553112554112555112556112557112558112559112560112561112562112563112564112565112566112567112568112569112570112571112572112573112574112575112576112577112578112579112580112581112582112583112584112585112586112587112588112589112590112591112592112593112594112595112596112597112598112599112600112601112602112603112604112605112606112607112608112609112610112611112612112613112614112615112616112617112618112619112620112621112622112623112624112625112626112627112628112629112630112631112632112633112634112635112636112637112638112639112640112641112642112643112644112645112646112647112648112649112650112651112652112653112654112655112656112657112658112659112660112661112662112663112664112665112666112667112668112669112670112671112672112673112674112675112676112677112678112679112680112681112682112683112684112685112686112687112688112689112690112691112692112693112694112695112696112697112698112699112700112701112702112703112704112705112706112707112708112709112710112711112712112713112714112715112716112717112718112719112720112721112722112723112724112725112726112727112728112729112730112731112732112733112734112735112736112737112738112739112740112741112742112743112744112745112746112747112748112749112750112751112752112753112754112755112756112757112758112759112760112761112762112763112764112765112766112767112768112769112770112771112772112773112774112775112776112777112778112779112780112781112782112783112784112785112786112787112788112789112790112791112792112793112794112795112796112797112798112799112800112801112802112803112804112805112806112807112808112809112810112811112812112813112814112815112816112817112818112819112820112821112822112823112824112825112826112827112828112829112830112831112832112833112834112835112836112837112838112839112840112841112842112843112844112845112846112847112848112849112850112851112852112853112854112855112856112857112858112859112860112861112862112863112864112865112866112867112868112869112870112871112872112873112874112875112876112877112878112879112880112881112882112883112884112885112886112887112888112889112890112891112892112893112894112895112896112897112898112899112900112901112902112903112904112905112906112907112908112909112910112911112912112913112914112915112916112917112918112919112920112921112922112923112924112925112926112927112928112929112930112931112932112933112934112935112936112937112938112939112940112941112942112943112944112945112946112947112948112949112950112951112952112953112954112955112956112957112958112959112960112961112962112963112964112965112966112967112968112969112970112971112972112973112974112975112976112977112978112979112980112981112982112983112984112985112986112987112988112989112990112991112992112993112994112995112996112997112998112999113000113001113002113003113004113005113006113007113008113009113010113011113012113013113014113015113016113017113018113019113020113021113022113023113024113025113026113027113028113029113030113031113032113033113034113035113036113037113038113039113040113041113042113043113044113045113046113047113048113049113050113051113052113053113054113055113056113057113058113059113060113061113062113063113064113065113066113067113068113069113070113071113072113073113074113075113076113077113078113079113080113081113082113083113084113085113086113087113088113089113090113091113092113093113094113095113096113097113098113099113100113101113102113103113104113105113106113107113108113109113110113111113112113113113114113115113116113117113118113119113120113121113122113123113124113125113126113127113128113129113130113131113132113133113134113135113136113137113138113139113140113141113142113143113144113145113146113147113148113149113150113151113152113153113154113155113156113157113158113159113160113161113162113163113164113165113166113167113168113169113170113171113172113173113174113175113176113177113178113179113180113181113182113183113184113185113186113187113188113189113190113191113192113193113194113195113196113197113198113199113200113201113202113203113204113205113206113207113208113209113210113211113212113213113214113215113216113217113218113219113220113221113222113223113224113225113226113227113228113229113230113231113232113233113234113235113236113237113238113239113240113241113242113243113244113245113246113247113248113249113250113251113252113253113254113255113256113257113258113259113260113261113262113263113264113265113266113267113268113269113270113271113272113273113274113275113276113277113278113279113280113281113282113283113284113285113286113287113288113289113290113291113292113293113294113295113296113297113298113299113300113301113302113303113304113305113306113307113308113309113310113311113312113313113314113315113316113317113318113319113320113321113322113323113324113325113326113327113328113329113330113331113332113333113334113335113336113337113338113339113340113341113342113343113344113345113346113347113348113349113350113351113352113353113354113355113356113357113358113359113360113361113362113363113364113365113366113367113368113369113370113371113372113373113374113375113376113377113378113379113380113381113382113383113384113385113386113387113388113389113390113391113392113393113394113395113396113397113398113399113400113401113402113403113404113405113406113407113408113409113410113411113412113413113414113415113416113417113418113419113420113421113422113423113424113425113426113427113428113429113430113431113432113433113434113435113436113437113438113439113440113441113442113443113444113445113446113447113448113449113450113451113452113453113454113455113456113457113458113459113460113461113462113463113464113465113466113467113468113469113470113471113472113473113474113475113476113477113478113479113480113481113482113483113484113485113486113487113488113489113490113491113492113493113494113495113496113497113498113499113500113501113502113503113504113505113506113507113508113509113510113511113512113513113514113515113516113517113518113519113520113521113522113523113524113525113526113527113528113529113530113531113532113533113534113535113536113537113538113539113540113541113542113543113544113545113546113547113548113549113550113551113552113553113554113555113556113557113558113559113560113561113562113563113564113565113566113567113568113569113570113571113572113573113574113575113576113577113578113579113580113581113582113583113584113585113586113587113588113589113590113591113592113593113594113595113596113597113598113599113600113601113602113603113604113605113606113607113608113609113610113611113612113613113614113615113616113617113618113619113620113621113622113623113624113625113626113627113628113629113630113631113632113633113634113635113636113637113638113639113640113641113642113643113644113645113646113647113648113649113650113651113652113653113654113655113656113657113658113659113660113661113662113663113664113665113666113667113668113669113670113671113672113673113674113675113676113677113678113679113680113681113682113683113684113685113686113687113688113689113690113691113692113693113694113695113696113697113698113699113700113701113702113703113704113705113706113707113708113709113710113711113712113713113714113715113716113717113718113719113720113721113722113723113724113725113726113727113728113729113730113731113732113733113734113735113736113737113738113739113740113741113742113743113744113745113746113747113748113749113750113751113752113753113754113755113756113757113758113759113760113761113762113763113764113765113766113767113768113769113770113771113772113773113774113775113776113777113778113779113780113781113782113783113784113785113786113787113788113789113790113791113792113793113794113795113796113797113798113799113800113801113802113803113804113805113806113807113808113809113810113811113812113813113814113815113816113817113818113819113820113821113822113823113824113825113826113827113828113829113830113831113832113833113834113835113836113837113838113839113840113841113842113843113844113845113846113847113848113849113850113851113852113853113854113855113856113857113858113859113860113861113862113863113864113865113866113867113868113869113870113871113872113873113874113875113876113877113878113879113880113881113882113883113884113885113886113887113888113889113890113891113892113893113894113895113896113897113898113899113900113901113902113903113904113905113906113907113908113909113910113911113912113913113914113915113916113917113918113919113920113921113922113923113924113925113926113927113928113929113930113931113932113933113934113935113936113937113938113939113940113941113942113943113944113945113946113947113948113949113950113951113952113953113954113955113956113957113958113959113960113961113962113963113964113965113966113967113968113969113970113971113972113973113974113975113976113977113978113979113980113981113982113983113984113985113986113987113988113989113990113991113992113993113994113995113996113997113998113999114000114001114002114003114004114005114006114007114008114009114010114011114012114013114014114015114016114017114018114019114020114021114022114023114024114025114026114027114028114029114030114031114032114033114034114035114036114037114038114039114040114041114042114043114044114045114046114047114048114049114050114051114052114053114054114055114056114057114058114059114060114061114062114063114064114065114066114067114068114069114070114071114072114073114074114075114076114077114078114079114080114081114082114083114084114085114086114087114088114089114090114091114092114093114094114095114096114097114098114099114100114101114102114103114104114105114106114107114108114109114110114111114112114113114114114115114116114117114118114119114120114121114122114123114124114125114126114127114128114129114130114131114132114133114134114135114136114137114138114139114140114141114142114143114144114145114146114147114148114149114150114151114152114153114154114155114156114157114158114159114160114161114162114163114164114165114166114167114168114169114170114171114172114173114174114175114176114177114178114179114180114181114182114183114184114185114186114187114188114189114190114191114192114193114194114195114196114197114198114199114200114201114202114203114204114205114206114207114208114209114210114211114212114213114214114215114216114217114218114219114220114221114222114223114224114225114226114227114228114229114230114231114232114233114234114235114236114237114238114239114240114241114242114243114244114245114246114247114248114249114250114251114252114253114254114255114256114257114258114259114260114261114262114263114264114265114266114267114268114269114270114271114272114273114274114275114276114277114278114279114280114281114282114283114284114285114286114287114288114289114290114291114292114293114294114295114296114297114298114299114300114301114302114303114304114305114306114307114308114309114310114311114312114313114314114315114316114317114318114319114320114321114322114323114324114325114326114327114328114329114330114331114332114333114334114335114336114337114338114339114340114341114342114343114344114345114346114347114348114349114350114351114352114353114354114355114356114357114358114359114360114361114362114363114364114365114366114367114368114369114370114371114372114373114374114375114376114377114378114379114380114381114382114383114384114385114386114387114388114389114390114391114392114393114394114395114396114397114398114399114400114401114402114403114404114405114406114407114408114409114410114411114412114413114414114415114416114417114418114419114420114421114422114423114424114425114426114427114428114429114430114431114432114433114434114435114436114437114438114439114440114441114442114443114444114445114446114447114448114449114450114451114452114453114454114455114456114457114458114459114460114461114462114463114464114465114466114467114468114469114470114471114472114473114474114475114476114477114478114479114480114481114482114483114484114485114486114487114488114489114490114491114492114493114494114495114496114497114498114499114500114501114502114503114504114505114506114507114508114509114510114511114512114513114514114515114516114517114518114519114520114521114522114523114524114525114526114527114528114529114530114531114532114533114534114535114536114537114538114539114540114541114542114543114544114545114546114547114548114549114550114551114552114553114554114555114556114557114558114559114560114561114562114563114564114565114566114567114568114569114570114571114572114573114574114575114576114577114578114579114580114581114582114583114584114585114586114587114588114589114590114591114592114593114594114595114596114597114598114599114600114601114602114603114604114605114606114607114608114609114610114611114612114613114614114615114616114617114618114619114620114621114622114623114624114625114626114627114628114629114630114631114632114633114634114635114636114637114638114639114640114641114642114643114644114645114646114647114648114649114650114651114652114653114654114655114656114657114658114659114660114661114662114663114664114665114666114667114668114669114670114671114672114673114674114675114676114677114678114679114680114681114682114683114684114685114686114687114688114689114690114691114692114693114694114695114696114697114698114699114700114701114702114703114704114705114706114707114708114709114710114711114712114713114714114715114716114717114718114719114720114721114722114723114724114725114726114727114728114729114730114731114732114733114734114735114736114737114738114739114740114741114742114743114744114745114746114747114748114749114750114751114752114753114754114755114756114757114758114759114760114761114762114763114764114765114766114767114768114769114770114771114772114773114774114775114776114777114778114779114780114781114782114783114784114785114786114787114788114789114790114791114792114793114794114795114796114797114798114799114800114801114802114803114804114805114806114807114808114809114810114811114812114813114814114815114816114817114818114819114820114821114822114823114824114825114826114827114828114829114830114831114832114833114834114835114836114837114838114839114840114841114842114843114844114845114846114847114848114849114850114851114852114853114854114855114856114857114858114859114860114861114862114863114864114865114866114867114868114869114870114871114872114873114874114875114876114877114878114879114880114881114882114883114884114885114886114887114888114889114890114891114892114893114894114895114896114897114898114899114900114901114902114903114904114905114906114907114908114909114910114911114912114913114914114915114916114917114918114919114920114921114922114923114924114925114926114927114928114929114930114931114932114933114934114935114936114937114938114939114940114941114942114943114944114945114946114947114948114949114950114951114952114953114954114955114956114957114958114959114960114961114962114963114964114965114966114967114968114969114970114971114972114973114974114975114976114977114978114979114980114981114982114983114984114985114986114987114988114989114990114991114992114993114994114995114996114997114998114999115000115001115002115003115004115005115006115007115008115009115010115011115012115013115014115015115016115017115018115019115020115021115022115023115024115025115026115027115028115029115030115031115032115033115034115035115036115037115038115039115040115041115042115043115044115045115046115047115048115049115050115051115052115053115054115055115056115057115058115059115060115061115062115063115064115065115066115067115068115069115070115071115072115073115074115075115076115077115078115079115080115081115082115083115084115085115086115087115088115089115090115091115092115093115094115095115096115097115098115099115100115101115102115103115104115105115106115107115108115109115110115111115112115113115114115115115116115117115118115119115120115121115122115123115124115125115126115127115128115129115130115131115132115133115134115135115136115137115138115139115140115141115142115143115144115145115146115147115148115149115150115151115152115153115154115155115156115157115158115159115160115161115162115163115164115165115166115167115168115169115170115171115172115173115174115175115176115177115178115179115180115181115182115183115184115185115186115187115188115189115190115191115192115193115194115195115196115197115198115199115200115201115202115203115204115205115206115207115208115209115210115211115212115213115214115215115216115217115218115219115220115221115222115223115224115225115226115227115228115229115230115231115232115233115234115235115236115237115238115239115240115241115242115243115244115245115246115247115248115249115250115251115252115253115254115255115256115257115258115259115260115261115262115263115264115265115266115267115268115269115270115271115272115273115274115275115276115277115278115279115280115281115282115283115284115285115286115287115288115289115290115291115292115293115294115295115296115297115298115299115300115301115302115303115304115305115306115307115308115309115310115311115312115313115314115315115316115317115318115319115320115321115322115323115324115325115326115327115328115329115330115331115332115333115334115335115336115337115338115339115340115341115342115343115344115345115346115347115348115349115350115351115352115353115354115355115356115357115358115359115360115361115362115363115364115365115366115367115368115369115370115371115372115373115374115375115376115377115378115379115380115381115382115383115384115385115386115387115388115389115390115391115392115393115394115395115396115397115398115399115400115401115402115403115404115405115406115407115408115409115410115411115412115413115414115415115416115417115418115419115420115421115422115423115424115425115426115427115428115429115430115431115432115433115434115435115436115437115438115439115440115441115442115443115444115445115446115447115448115449115450115451115452115453115454115455115456115457115458115459115460115461115462115463115464115465115466115467115468115469115470115471115472115473115474115475115476115477115478115479115480115481115482115483115484115485115486115487115488115489115490115491115492115493115494115495115496115497115498115499115500115501115502115503115504115505115506115507115508115509115510115511115512115513115514115515115516115517115518115519115520115521115522115523115524115525115526115527115528115529115530115531115532115533115534115535115536115537115538115539115540115541115542115543115544115545115546115547115548115549115550115551115552115553115554115555115556115557115558115559115560115561115562115563115564115565115566115567115568115569115570115571115572115573115574115575115576115577115578115579115580115581115582115583115584115585115586115587115588115589115590115591115592115593115594115595115596115597115598115599115600115601115602115603115604115605115606115607115608115609115610115611115612115613115614115615115616115617115618115619115620115621115622115623115624115625115626115627115628115629115630115631115632115633115634115635115636115637115638115639115640115641115642115643115644115645115646115647115648115649115650115651115652115653115654115655115656115657115658115659115660115661115662115663115664115665115666115667115668115669115670115671115672115673115674115675115676115677115678115679115680115681115682115683115684115685115686115687115688115689115690115691115692115693115694115695115696115697115698115699115700115701115702115703115704115705115706115707115708115709115710115711115712115713115714115715115716115717115718115719115720115721115722115723115724115725115726115727115728115729115730115731115732115733115734115735115736115737115738115739115740115741115742115743115744115745115746115747115748115749115750115751115752115753115754115755115756115757115758115759115760115761115762115763115764115765115766115767115768115769115770115771115772115773115774115775115776115777115778115779115780115781115782115783115784115785115786115787115788115789115790115791115792115793115794115795115796115797115798115799115800115801115802115803115804115805115806115807115808115809115810115811115812115813115814115815115816115817115818115819115820115821115822115823115824115825115826115827115828115829115830115831115832115833115834115835115836115837115838115839115840115841115842115843115844115845115846115847115848115849115850115851115852115853115854115855115856115857115858115859115860115861115862115863115864115865115866115867115868115869115870115871115872115873115874115875115876115877115878115879115880115881115882115883115884115885115886115887115888115889115890115891115892115893115894115895115896115897115898115899115900115901115902115903115904115905115906115907115908115909115910115911115912115913115914115915115916115917115918115919115920115921115922115923115924115925115926115927115928115929115930115931115932115933115934115935115936115937115938115939115940115941115942115943115944115945115946115947115948115949115950115951115952115953115954115955115956115957115958115959115960115961115962115963115964115965115966115967115968115969115970115971115972115973115974115975115976115977115978115979115980115981115982115983115984115985115986115987115988115989115990115991115992115993115994115995115996115997115998115999116000116001116002116003116004116005116006116007116008116009116010116011116012116013116014116015116016116017116018116019116020116021116022116023116024116025116026116027116028116029116030116031116032116033116034116035116036116037116038116039116040116041116042116043116044116045116046116047116048116049116050116051116052116053116054116055116056116057116058116059116060116061116062116063116064116065116066116067116068116069116070116071116072116073116074116075116076116077116078116079116080116081116082116083116084116085116086116087116088116089116090116091116092116093116094116095116096116097116098116099116100116101116102116103116104116105116106116107116108116109116110116111116112116113116114116115116116116117116118116119116120116121116122116123116124116125116126116127116128116129116130116131116132116133116134116135116136116137116138116139116140116141116142116143116144116145116146116147116148116149116150116151116152116153116154116155116156116157116158116159116160116161116162116163116164116165116166116167116168116169116170116171116172116173116174116175116176116177116178116179116180116181116182116183116184116185116186116187116188116189116190116191116192116193116194116195116196116197116198116199116200116201116202116203116204116205116206116207116208116209116210116211116212116213116214116215116216116217116218116219116220116221116222116223116224116225116226116227116228116229116230116231116232116233116234116235116236116237116238116239116240116241116242116243116244116245116246116247116248116249116250116251116252116253116254116255116256116257116258116259116260116261116262116263116264116265116266116267116268116269116270116271116272116273116274116275116276116277116278116279116280116281116282116283116284116285116286116287116288116289116290116291116292116293116294116295116296116297116298116299116300116301116302116303116304116305116306116307116308116309116310116311116312116313116314116315116316116317116318116319116320116321116322116323116324116325116326116327116328116329116330116331116332116333116334116335116336116337116338116339116340116341116342116343116344116345116346116347116348116349116350116351116352116353116354116355116356116357116358116359116360116361116362116363116364116365116366116367116368116369116370116371116372116373116374116375116376116377116378116379116380116381116382116383116384116385116386116387116388116389116390116391116392116393116394116395116396116397116398116399116400116401116402116403116404116405116406116407116408116409116410116411116412116413116414116415116416116417116418116419116420116421116422116423116424116425116426116427116428116429116430116431116432116433116434116435116436116437116438116439116440116441116442116443116444116445116446116447116448116449116450116451116452116453116454116455116456116457116458116459116460116461116462116463116464116465116466116467116468116469116470116471116472116473116474116475116476116477116478116479116480116481116482116483116484116485116486116487116488116489116490116491116492116493116494116495116496116497116498116499116500116501116502116503116504116505116506116507116508116509116510116511116512116513116514116515116516116517116518116519116520116521116522116523116524116525116526116527116528116529116530116531116532116533116534116535116536116537116538116539116540116541116542116543116544116545116546116547116548116549116550116551116552116553116554116555116556116557116558116559116560116561116562116563116564116565116566116567116568116569116570116571116572116573116574116575116576116577116578116579116580116581116582116583116584116585116586116587116588116589116590116591116592116593116594116595116596116597116598116599116600116601116602116603116604116605116606116607116608116609116610116611116612116613116614116615116616116617116618116619116620116621116622116623116624116625116626116627116628116629116630116631116632116633116634116635116636116637116638116639116640116641116642116643116644116645116646116647116648116649116650116651116652116653116654116655116656116657116658116659116660116661116662116663116664116665116666116667116668116669116670116671116672116673116674116675116676116677116678116679116680116681116682116683116684116685116686116687116688116689116690116691116692116693116694116695116696116697116698116699116700116701116702116703116704116705116706116707116708116709116710116711116712116713116714116715116716116717116718116719116720116721116722116723116724116725116726116727116728116729116730116731116732116733116734116735116736116737116738116739116740116741116742116743116744116745116746116747116748116749116750116751116752116753116754116755116756116757116758116759116760116761116762116763116764116765116766116767116768116769116770116771116772116773116774116775116776116777116778116779116780116781116782116783116784116785116786116787116788116789116790116791116792116793116794116795116796116797116798116799116800116801116802116803116804116805116806116807116808116809116810116811116812116813116814116815116816116817116818116819116820116821116822116823116824116825116826116827116828116829116830116831116832116833116834116835116836116837116838116839116840116841116842116843116844116845116846116847116848116849116850116851116852116853116854116855116856116857116858116859116860116861116862116863116864116865116866116867116868116869116870116871116872116873116874116875116876116877116878116879116880116881116882116883116884116885116886116887116888116889116890116891116892116893116894116895116896116897116898116899116900116901116902116903116904116905116906116907116908116909116910116911116912116913116914116915116916116917116918116919116920116921116922116923116924116925116926116927116928116929116930116931116932116933116934116935116936116937116938116939116940116941116942116943116944116945116946116947116948116949116950116951116952116953116954116955116956116957116958116959116960116961116962116963116964116965116966116967116968116969116970116971116972116973116974116975116976116977116978116979116980116981116982116983116984116985116986116987116988116989116990116991116992116993116994116995116996116997116998116999117000117001117002117003117004117005117006117007117008117009117010117011117012117013117014117015117016117017117018117019117020117021117022117023117024117025117026117027117028117029117030117031117032117033117034117035117036117037117038117039117040117041117042117043117044117045117046117047117048117049117050117051117052117053117054117055117056117057117058117059117060117061117062117063117064117065117066117067117068117069117070117071117072117073117074117075117076117077117078117079117080117081117082117083117084117085117086117087117088117089117090117091117092117093117094117095117096117097117098117099117100117101117102117103117104117105117106117107117108117109117110117111117112117113117114117115117116117117117118117119117120117121117122117123117124117125117126117127117128117129117130117131117132117133117134117135117136117137117138117139117140117141117142117143117144117145117146117147117148117149117150117151117152117153117154117155117156117157117158117159117160117161117162117163117164117165117166117167117168117169117170117171117172117173117174117175117176117177117178117179117180117181117182117183117184117185117186117187117188117189117190117191117192117193117194117195117196117197117198117199117200117201117202117203117204117205117206117207117208117209117210117211117212117213117214117215117216117217117218117219117220117221117222117223117224117225117226117227117228117229117230117231117232117233117234117235117236117237117238117239117240117241117242117243117244117245117246117247117248117249117250117251117252117253117254117255117256117257117258117259117260117261117262117263117264117265117266117267117268117269117270117271117272117273117274117275117276117277117278117279117280117281117282117283117284117285117286117287117288117289117290117291117292117293117294117295117296117297117298117299117300117301117302117303117304117305117306117307117308117309117310117311117312117313117314117315117316117317117318117319117320117321117322117323117324117325117326117327117328117329117330117331117332117333117334117335117336117337117338117339117340117341117342117343117344117345117346117347117348117349117350117351117352117353117354117355117356117357117358117359117360117361117362117363117364117365117366117367117368117369117370117371117372117373117374117375117376117377117378117379117380117381117382117383117384117385117386117387117388117389117390117391117392117393117394117395117396117397117398117399117400117401117402117403117404117405117406117407117408117409117410117411117412117413117414117415117416117417117418117419117420117421117422117423117424117425117426117427117428117429117430117431117432117433117434117435117436117437117438117439117440117441117442117443117444117445117446117447117448117449117450117451117452117453117454117455117456117457117458117459117460117461117462117463117464117465117466117467117468117469117470117471117472117473117474117475117476117477117478117479117480117481117482117483117484117485117486117487117488117489117490117491117492117493117494117495117496117497117498117499117500117501117502117503117504117505117506117507117508117509117510117511117512117513117514117515117516117517117518117519117520117521117522117523117524117525117526117527117528117529117530117531117532117533117534117535117536117537117538117539117540117541117542117543117544117545117546117547117548117549117550117551117552117553117554117555117556117557117558117559117560117561117562117563117564117565117566117567117568117569117570117571117572117573117574117575117576117577117578117579117580117581117582117583117584117585117586117587117588117589117590117591117592117593117594117595117596117597117598117599117600117601117602117603117604117605117606117607117608117609117610117611117612117613117614117615117616117617117618117619117620117621117622117623117624117625117626117627117628117629117630117631117632117633117634117635117636117637117638117639117640117641117642117643117644117645117646117647117648117649117650117651117652117653117654117655117656117657117658117659117660117661117662117663117664117665117666117667117668117669117670117671117672117673117674117675117676117677117678117679117680117681117682117683117684117685117686117687117688117689117690117691117692117693117694117695117696117697117698117699117700117701117702117703117704117705117706117707117708117709117710117711117712117713117714117715117716117717117718117719117720117721117722117723117724117725117726117727117728117729117730117731117732117733117734117735117736117737117738117739117740117741117742117743117744117745117746117747117748117749117750117751117752117753117754117755117756117757117758117759117760117761117762117763117764117765117766117767117768117769117770117771117772117773117774117775117776117777117778117779117780117781117782117783117784117785117786117787117788117789117790117791117792117793117794117795117796117797117798117799117800117801117802117803117804117805117806117807117808117809117810117811117812117813117814117815117816117817117818117819117820117821117822117823117824117825117826117827117828117829117830117831117832117833117834117835117836117837117838117839117840117841117842117843117844117845117846117847117848117849117850117851117852117853117854117855117856117857117858117859117860117861117862117863117864117865117866117867117868117869117870117871117872117873117874117875117876117877117878117879117880117881117882117883117884117885117886117887117888117889117890117891117892117893117894117895117896117897117898117899117900117901117902117903117904117905117906117907117908117909117910117911117912117913117914117915117916117917117918117919117920117921117922117923117924117925117926117927117928117929117930117931117932117933117934117935117936117937117938117939117940117941117942117943117944117945117946117947117948117949117950117951117952117953117954117955117956117957117958117959117960117961117962117963117964117965117966117967117968117969117970117971117972117973117974117975117976117977117978117979117980117981117982117983117984117985117986117987117988117989117990117991117992117993117994117995117996117997117998117999118000118001118002118003118004118005118006118007118008118009118010118011118012118013118014118015118016118017118018118019118020118021118022118023118024118025118026118027118028118029118030118031118032118033118034118035118036118037118038118039118040118041118042118043118044118045118046118047118048118049118050118051118052118053118054118055118056118057118058118059118060118061118062118063118064118065118066118067118068118069118070118071118072118073118074118075118076118077118078118079118080118081118082118083118084118085118086118087118088118089118090118091118092118093118094118095118096118097118098118099118100118101118102118103118104118105118106118107118108118109118110118111118112118113118114118115118116118117118118118119118120118121118122118123118124118125118126118127118128118129118130118131118132118133118134118135118136118137118138118139118140118141118142118143118144118145118146118147118148118149118150118151118152118153118154118155118156118157118158118159118160118161118162118163118164118165118166118167118168118169118170118171118172118173118174118175118176118177118178118179118180118181118182118183118184118185118186118187118188118189118190118191118192118193118194118195118196118197118198118199118200118201118202118203118204118205118206118207118208118209118210118211118212118213118214118215118216118217118218118219118220118221118222118223118224118225118226118227118228118229118230118231118232118233118234118235118236118237118238118239118240118241118242118243118244118245118246118247118248118249118250118251118252118253118254118255118256118257118258118259118260118261118262118263118264118265118266118267118268118269118270118271118272118273118274118275118276118277118278118279118280118281118282118283118284118285118286118287118288118289118290118291118292118293118294118295118296118297118298118299118300118301118302118303118304118305118306118307118308118309118310118311118312118313118314118315118316118317118318118319118320118321118322118323118324118325118326118327118328118329118330118331118332118333118334118335118336118337118338118339118340118341118342118343118344118345118346118347118348118349118350118351118352118353118354118355118356118357118358118359118360118361118362118363118364118365118366118367118368118369118370118371118372118373118374118375118376118377118378118379118380118381118382118383118384118385118386118387118388118389118390118391118392118393118394118395118396118397118398118399118400118401118402118403118404118405118406118407118408118409118410118411118412118413118414118415118416118417118418118419118420118421118422118423118424118425118426118427118428118429118430118431118432118433118434118435118436118437118438118439118440118441118442118443118444118445118446118447118448118449118450118451118452118453118454118455118456118457118458118459118460118461118462118463118464118465118466118467118468118469118470118471118472118473118474118475118476118477118478118479118480118481118482118483118484118485118486118487118488118489118490118491118492118493118494118495118496118497118498118499118500118501118502118503118504118505118506118507118508118509118510118511118512118513118514118515118516118517118518118519118520118521118522118523118524118525118526118527118528118529118530118531118532118533118534118535118536118537118538118539118540118541118542118543118544118545118546118547118548118549118550118551118552118553118554118555118556118557118558118559118560118561118562118563118564118565118566118567118568118569118570118571118572118573118574118575118576118577118578118579118580118581118582118583118584118585118586118587118588118589118590118591118592118593118594118595118596118597118598118599118600118601118602118603118604118605118606118607118608118609118610118611118612118613118614118615118616118617118618118619118620118621118622118623118624118625118626118627118628118629118630118631118632118633118634118635118636118637118638118639118640118641118642118643118644118645118646118647118648118649118650118651118652118653118654118655118656118657118658118659118660118661118662118663118664118665118666118667118668118669118670118671118672118673118674118675118676118677118678118679118680118681118682118683118684118685118686118687118688118689118690118691118692118693118694118695118696118697118698118699118700118701118702118703118704118705118706118707118708118709118710118711118712118713118714118715118716118717118718118719118720118721118722118723118724118725118726118727118728118729118730118731118732118733118734118735118736118737118738118739118740118741118742118743118744118745118746118747118748118749118750118751118752118753118754118755118756118757118758118759118760118761118762118763118764118765118766118767118768118769118770118771118772118773118774118775118776118777118778118779118780118781118782118783118784118785118786118787118788118789118790118791118792118793118794118795118796118797118798118799118800118801118802118803118804118805118806118807118808118809118810118811118812118813118814118815118816118817118818118819118820118821118822118823118824118825118826118827118828118829118830118831118832118833118834118835118836118837118838118839118840118841118842118843118844118845118846118847118848118849118850118851118852118853118854118855118856118857118858118859118860118861118862118863118864118865118866118867118868118869118870118871118872118873118874118875118876118877118878118879118880118881118882118883118884118885118886118887118888118889118890118891118892118893118894118895118896118897118898118899118900118901118902118903118904118905118906118907118908118909118910118911118912118913118914118915118916118917118918118919118920118921118922118923118924118925118926118927118928118929118930118931118932118933118934118935118936118937118938118939118940118941118942118943118944118945118946118947118948118949118950118951118952118953118954118955118956118957118958118959118960118961118962118963118964118965118966118967118968118969118970118971118972118973118974118975118976118977118978118979118980118981118982118983118984118985118986118987118988118989118990118991118992118993118994118995118996118997118998118999119000119001119002119003119004119005119006119007119008119009119010119011119012119013119014119015119016119017119018119019119020119021119022119023119024119025119026119027119028119029119030119031119032119033119034119035119036119037119038119039119040119041119042119043119044119045119046119047119048119049119050119051119052119053119054119055119056119057119058119059119060119061119062119063119064119065119066119067119068119069119070119071119072119073119074119075119076119077119078119079119080119081119082119083119084119085119086119087119088119089119090119091119092119093119094119095119096119097119098119099119100119101119102119103119104119105119106119107119108119109119110119111119112119113119114119115119116119117119118119119119120119121119122119123119124119125119126119127119128119129119130119131119132119133119134119135119136119137119138119139119140119141119142119143119144119145119146119147119148119149119150119151119152119153119154119155119156119157119158119159119160119161119162119163119164119165119166119167119168119169119170119171119172119173119174119175119176119177119178119179119180119181119182119183119184119185119186119187119188119189119190119191119192119193119194119195119196119197119198119199119200119201119202119203119204119205119206119207119208119209119210119211119212119213119214119215119216119217119218119219119220119221119222119223119224119225119226119227119228119229119230119231119232119233119234119235119236119237119238119239119240119241119242119243119244119245119246119247119248119249119250119251119252119253119254119255119256119257119258119259119260119261119262119263119264119265119266119267119268119269119270119271119272119273119274119275119276119277119278119279119280119281119282119283119284119285119286119287119288119289119290119291119292119293119294119295119296119297119298119299119300119301119302119303119304119305119306119307119308119309119310119311119312119313119314119315119316119317119318119319119320119321119322119323119324119325119326119327119328119329119330119331119332119333119334119335119336119337119338119339119340119341119342119343119344119345119346119347119348119349119350119351119352119353119354119355119356119357119358119359119360119361119362119363119364119365119366119367119368119369119370119371119372119373119374119375119376119377119378119379119380119381119382119383119384119385119386119387119388119389119390119391119392119393119394119395119396119397119398119399119400119401119402119403119404119405119406119407119408119409119410119411119412119413119414119415119416119417119418119419119420119421119422119423119424119425119426119427119428119429119430119431119432119433119434119435119436119437119438119439119440119441119442119443119444119445119446119447119448119449119450119451119452119453119454119455119456119457119458119459119460119461119462119463119464119465119466119467119468119469119470119471119472119473119474119475119476119477119478119479119480119481119482119483119484119485119486119487119488119489119490119491119492119493119494119495119496119497119498119499119500119501119502119503119504119505119506119507119508119509119510119511119512119513119514119515119516119517119518119519119520119521119522119523119524119525119526119527119528119529119530119531119532119533119534119535119536119537119538119539119540119541119542119543119544119545119546119547119548119549119550119551119552119553119554119555119556119557119558119559119560119561119562119563119564119565119566119567119568119569119570119571119572119573119574119575119576119577119578119579119580119581119582119583119584119585119586119587119588119589119590119591119592119593119594119595119596119597119598119599119600119601119602119603119604119605119606119607119608119609119610119611119612119613119614119615119616119617119618119619119620119621119622119623119624119625119626119627119628119629119630119631119632119633119634119635119636119637119638119639119640119641119642119643119644119645119646119647119648119649119650119651119652119653119654119655119656119657119658119659119660119661119662119663119664119665119666119667119668119669119670119671119672119673119674119675119676119677119678119679119680119681119682119683119684119685119686119687119688119689119690119691119692119693119694119695119696119697119698119699119700119701119702119703119704119705119706119707119708119709119710119711119712119713119714119715119716119717119718119719119720119721119722119723119724119725119726119727119728119729119730119731119732119733119734119735119736119737119738119739119740119741119742119743119744119745119746119747119748119749119750119751119752119753119754119755119756119757119758119759119760119761119762119763119764119765119766119767119768119769119770119771119772119773119774119775119776119777119778119779119780119781119782119783119784119785119786119787119788119789119790119791119792119793119794119795119796119797119798119799119800119801119802119803119804119805119806119807119808119809119810119811119812119813119814119815119816119817119818119819119820119821119822119823119824119825119826119827119828119829119830119831119832119833119834119835119836119837119838119839119840119841119842119843119844119845119846119847119848119849119850119851119852119853119854119855119856119857119858119859119860119861119862119863119864119865119866119867119868119869119870119871119872119873119874119875119876119877119878119879119880119881119882119883119884119885119886119887119888119889119890119891119892119893119894119895119896119897119898119899119900119901119902119903119904119905119906119907119908119909119910119911119912119913119914119915119916119917119918119919119920119921119922119923119924119925119926119927119928119929119930119931119932119933119934119935119936119937119938119939119940119941119942119943119944119945119946119947119948119949119950119951119952119953119954119955119956119957119958119959119960119961119962119963119964119965119966119967119968119969119970119971119972119973119974119975119976119977119978119979119980119981119982119983119984119985119986119987119988119989119990119991119992119993119994119995119996119997119998119999120000120001120002120003120004120005120006120007120008120009120010120011120012120013120014120015120016120017120018120019120020120021120022120023120024120025120026120027120028120029120030120031120032120033120034120035120036120037120038120039120040120041120042120043120044120045120046120047120048120049120050120051120052120053120054120055120056120057120058120059120060120061120062120063120064120065120066120067120068120069120070120071120072120073120074120075120076120077120078120079120080120081120082120083120084120085120086120087120088120089120090120091120092120093120094120095120096120097120098120099120100120101120102120103120104120105120106120107120108120109120110120111120112120113120114120115120116120117120118120119120120120121120122120123120124120125120126120127120128120129120130120131120132120133120134120135120136120137120138120139120140120141120142120143120144120145120146120147120148120149120150120151120152120153120154120155120156120157120158120159120160120161120162120163120164120165120166120167120168120169120170120171120172120173120174120175120176120177120178120179120180120181120182120183120184120185120186120187120188120189120190120191120192120193120194120195120196120197120198120199120200120201120202120203120204120205120206120207120208120209120210120211120212120213120214120215120216120217120218120219120220120221120222120223120224120225120226120227120228120229120230120231120232120233120234120235120236120237120238120239120240120241120242120243120244120245120246120247120248120249120250120251120252120253120254120255120256120257120258120259120260120261120262120263120264120265120266120267120268120269120270120271120272120273120274120275120276120277120278120279120280120281120282120283120284120285120286120287120288120289120290120291120292120293120294120295120296120297120298120299120300120301120302120303120304120305120306120307120308120309120310120311120312120313120314120315120316120317120318120319120320120321120322120323120324120325120326120327120328120329120330120331120332120333120334120335120336120337120338120339120340120341120342120343120344120345120346120347120348120349120350120351120352120353120354120355120356120357120358120359120360120361120362120363120364120365120366120367120368120369120370120371120372120373120374120375120376120377120378120379120380120381120382120383120384120385120386120387120388120389120390120391120392120393120394120395120396120397120398120399120400120401120402120403120404120405120406120407120408120409120410120411120412120413120414120415120416120417120418120419120420120421120422120423120424120425120426120427120428120429120430120431120432120433120434120435120436120437120438120439120440120441120442120443120444120445120446120447120448120449120450120451120452120453120454120455120456120457120458120459120460120461120462120463120464120465120466120467120468120469120470120471120472120473120474120475120476120477120478120479120480120481120482120483120484120485120486120487120488120489120490120491120492120493120494120495120496120497120498120499120500120501120502120503120504120505120506120507120508120509120510120511120512120513120514120515120516120517120518120519120520120521120522120523120524120525120526120527120528120529120530120531120532120533120534120535120536120537120538120539120540120541120542120543120544120545120546120547120548120549120550120551120552120553120554120555120556120557120558120559120560120561120562120563120564120565120566120567120568120569120570120571120572120573120574120575120576120577120578120579120580120581120582120583120584120585120586120587120588120589120590120591120592120593120594120595120596120597120598120599120600120601120602120603120604120605120606120607120608120609120610120611120612120613120614120615120616120617120618120619120620120621120622120623120624120625120626120627120628120629120630120631120632120633120634120635120636120637120638120639120640120641120642120643120644120645120646120647120648120649120650120651120652120653120654120655120656120657120658120659120660120661120662120663120664120665120666120667120668120669120670120671120672120673120674120675120676120677120678120679120680120681120682120683120684120685120686120687120688120689120690120691120692120693120694120695120696120697120698120699120700120701120702120703120704120705120706120707120708120709120710120711120712120713120714120715120716120717120718120719120720120721120722120723120724120725120726120727120728120729120730120731120732120733120734120735120736120737120738120739120740120741120742120743120744120745120746120747120748120749120750120751120752120753120754120755120756120757120758120759120760120761120762120763120764120765120766120767120768120769120770120771120772120773120774120775120776120777120778120779120780120781120782120783120784120785120786120787120788120789120790120791120792120793120794120795120796120797120798120799120800120801120802120803120804120805120806120807120808120809120810120811120812120813120814120815120816120817120818120819120820120821120822120823120824120825120826120827120828120829120830120831120832120833120834120835120836120837120838120839120840120841120842120843120844120845120846120847120848120849120850120851120852120853120854120855120856120857120858120859120860120861120862120863120864120865120866120867120868120869120870120871120872120873120874120875120876120877120878120879120880120881120882120883120884120885120886120887120888120889120890120891120892120893120894120895120896120897120898120899120900120901120902120903120904120905120906120907120908120909120910120911120912120913120914120915120916120917120918120919120920120921120922120923120924120925120926120927120928120929120930120931120932120933120934120935120936120937120938120939120940120941120942120943120944120945120946120947120948120949120950120951120952120953120954120955120956120957120958120959120960120961120962120963120964120965120966120967120968120969120970120971120972120973120974120975120976120977120978120979120980120981120982120983120984120985120986120987120988120989120990120991120992120993120994120995120996120997120998120999121000121001121002121003121004121005121006121007121008121009121010121011121012121013121014121015121016121017121018121019121020121021121022121023121024121025121026121027121028121029121030121031121032121033121034121035121036121037121038121039121040121041121042121043121044121045121046121047121048121049121050121051121052121053121054121055121056121057121058121059121060121061121062121063121064121065121066121067121068121069121070121071121072121073121074121075121076121077121078121079121080121081121082121083121084121085121086121087121088121089121090121091121092121093121094121095121096121097121098121099121100121101121102121103121104121105121106121107121108121109121110121111121112121113121114121115121116121117121118121119121120121121121122121123121124121125121126121127121128121129121130121131121132121133121134121135121136121137121138121139121140121141121142121143121144121145121146121147121148121149121150121151121152121153121154121155121156121157121158121159121160121161121162121163121164121165121166121167121168121169121170121171121172121173121174121175121176121177121178121179121180121181121182121183121184121185121186121187121188121189121190121191121192121193121194121195121196121197121198121199121200121201121202121203121204121205121206121207121208121209121210121211121212121213121214121215121216121217121218121219121220121221121222121223121224121225121226121227121228121229121230121231121232121233121234121235121236121237121238121239121240121241121242121243121244121245121246121247121248121249121250121251121252121253121254121255121256121257121258121259121260121261121262121263121264121265121266121267121268121269121270121271121272121273121274121275121276121277121278121279121280121281121282121283121284121285121286121287121288121289121290121291121292121293121294121295121296121297121298121299121300121301121302121303121304121305121306121307121308121309121310121311121312121313121314121315121316121317121318121319121320121321121322121323121324121325121326121327121328121329121330121331121332121333121334121335121336121337121338121339121340121341121342121343121344121345121346121347121348121349121350121351121352121353121354121355121356121357121358121359121360121361121362121363121364121365121366121367121368121369121370121371121372121373121374121375121376121377121378121379121380121381121382121383121384121385121386121387121388121389121390121391121392121393121394121395121396121397121398121399121400121401121402121403121404121405121406121407121408121409121410121411121412121413121414121415121416121417121418121419121420121421121422121423121424121425121426121427121428121429121430121431121432121433121434121435121436121437121438121439121440121441121442121443121444121445121446121447121448121449121450121451121452121453121454121455121456121457121458121459121460121461121462121463121464121465121466121467121468121469121470121471121472121473121474121475121476121477121478121479121480121481121482121483121484121485121486121487121488121489121490121491121492121493121494121495121496121497121498121499121500121501121502121503121504121505121506121507121508121509121510121511121512121513121514121515121516121517121518121519121520121521121522121523121524121525121526121527121528121529121530121531121532121533121534121535121536121537121538121539121540121541121542121543121544121545121546121547121548121549121550121551121552121553121554121555121556121557121558121559121560121561121562121563121564121565121566121567121568121569121570121571121572121573121574121575121576121577121578121579121580121581121582121583121584121585121586121587121588121589121590121591121592121593121594121595121596121597121598121599121600121601121602121603121604121605121606121607121608121609121610121611121612121613121614121615121616121617121618121619121620121621121622121623121624121625121626121627121628121629121630121631121632121633121634121635121636121637121638121639121640121641121642121643121644121645121646121647121648121649121650121651121652121653121654121655121656121657121658121659121660121661121662121663121664121665121666121667121668121669121670121671121672121673121674121675121676121677121678121679121680121681121682121683121684121685121686121687121688121689121690121691121692121693121694121695121696121697121698121699121700121701121702121703121704121705121706121707121708121709121710121711121712121713121714121715121716121717121718121719121720121721121722121723121724121725121726121727121728121729121730121731121732121733121734121735121736121737121738121739121740121741121742121743121744121745121746121747121748121749121750121751121752121753121754121755121756121757121758121759121760121761121762121763121764121765121766121767121768121769121770121771121772121773121774121775121776121777121778121779121780121781121782121783121784121785121786121787121788121789121790121791121792121793121794121795121796121797121798121799121800121801121802121803121804121805121806121807121808121809121810121811121812121813121814121815121816121817121818121819121820121821121822121823121824121825121826121827121828121829121830121831121832121833121834121835121836121837121838121839121840121841121842121843121844121845121846121847121848121849121850121851121852121853121854121855121856121857121858121859121860121861121862121863121864121865121866121867121868121869121870121871121872121873121874121875121876121877121878121879121880121881121882121883121884121885121886121887121888121889121890121891121892121893121894121895121896121897121898121899121900121901121902121903121904121905121906121907121908121909121910121911121912121913121914121915121916121917121918121919121920121921121922121923121924121925121926121927121928121929121930121931121932121933121934121935121936121937121938121939121940121941121942121943121944121945121946121947121948121949121950121951121952121953121954121955121956121957121958121959121960121961121962121963121964121965121966121967121968121969121970121971121972121973121974121975121976121977121978121979121980121981121982121983121984121985121986121987121988121989121990121991121992121993121994121995121996121997121998121999122000122001122002122003122004122005122006122007122008122009122010122011122012122013122014122015122016122017122018122019122020122021122022122023122024122025122026122027122028122029122030122031122032122033122034122035122036122037122038122039122040122041122042122043122044122045122046122047122048122049122050122051122052122053122054122055122056122057122058122059122060122061122062122063122064122065122066122067122068122069122070122071122072122073122074122075122076122077122078122079122080122081122082122083122084122085122086122087122088122089122090122091122092122093122094122095122096122097122098122099122100122101122102122103122104122105122106122107122108122109122110122111122112122113122114122115122116122117122118122119122120122121122122122123122124122125122126122127122128122129122130122131122132122133122134122135122136122137122138122139122140122141122142122143122144122145122146122147122148122149122150122151122152122153122154122155122156122157122158122159122160122161122162122163122164122165122166122167122168122169122170122171122172122173122174122175122176122177122178122179122180122181122182122183122184122185122186122187122188122189122190122191122192122193122194122195122196122197122198122199122200122201122202122203122204122205122206122207122208122209122210122211122212122213122214122215122216122217122218122219122220122221122222122223122224122225122226122227122228122229122230122231122232122233122234122235122236122237122238122239122240122241122242122243122244122245122246122247122248122249122250122251122252122253122254122255122256122257122258122259122260122261122262122263122264122265122266122267122268122269122270122271122272122273122274122275122276122277122278122279122280122281122282122283122284122285122286122287122288122289122290122291122292122293122294122295122296122297122298122299122300122301122302122303122304122305122306122307122308122309122310122311122312122313122314122315122316122317122318122319122320122321122322122323122324122325122326122327122328122329122330122331122332122333122334122335122336122337122338122339122340122341122342122343122344122345122346122347122348122349122350122351122352122353122354122355122356122357122358122359122360122361122362122363122364122365122366122367122368122369122370122371122372122373122374122375122376122377122378122379122380122381122382122383122384122385122386122387122388122389122390122391122392122393122394122395122396122397122398122399122400122401122402122403122404122405122406122407122408122409122410122411122412122413122414122415122416122417122418122419122420122421122422122423122424122425122426122427122428122429122430122431122432122433122434122435122436122437122438122439122440122441122442122443122444122445122446122447122448122449122450122451122452122453122454122455122456122457122458122459122460122461122462122463122464122465122466122467122468122469122470122471122472122473122474122475122476122477122478122479122480122481122482122483122484122485122486122487122488122489122490122491122492122493122494122495122496122497122498122499122500122501122502122503122504122505122506122507122508122509122510122511122512122513122514122515122516122517122518122519122520122521122522122523122524122525122526122527122528122529122530122531122532122533122534122535122536122537122538122539122540122541122542122543122544122545122546122547122548122549122550122551122552122553122554122555122556122557122558122559122560122561122562122563122564122565122566122567122568122569122570122571122572122573122574122575122576122577122578122579122580122581122582122583122584122585122586122587122588122589122590122591122592122593122594122595122596122597122598122599122600122601122602122603122604122605122606122607122608122609122610122611122612122613122614122615122616122617122618122619122620122621122622122623122624122625122626122627122628122629122630122631122632122633122634122635122636122637122638122639122640122641122642122643122644122645122646122647122648122649122650122651122652122653122654122655122656122657122658122659122660122661122662122663122664122665122666122667122668122669122670122671122672122673122674122675122676122677122678122679122680122681122682122683122684122685122686122687122688122689122690122691122692122693122694122695122696122697122698122699122700122701122702122703122704122705122706122707122708122709122710122711122712122713122714122715122716122717122718122719122720122721122722122723122724122725122726122727122728122729122730122731122732122733122734122735122736122737122738122739122740122741122742122743122744122745122746122747122748122749122750122751122752122753122754122755122756122757122758122759122760122761122762122763122764122765122766122767122768122769122770122771122772122773122774122775122776122777122778122779122780122781122782122783122784122785122786122787122788122789122790122791122792122793122794122795122796122797122798122799122800122801122802122803122804122805122806122807122808122809122810122811122812122813122814122815122816122817122818122819122820122821122822122823122824122825122826122827122828122829122830122831122832122833122834122835122836122837122838122839122840122841122842122843122844122845122846122847122848122849122850122851122852122853122854122855122856122857122858122859122860122861122862122863122864122865122866122867122868122869122870122871122872122873122874122875122876122877122878122879122880122881122882122883122884122885122886122887122888122889122890122891122892122893122894122895122896122897122898122899122900122901122902122903122904122905122906122907122908122909122910122911122912122913122914122915122916122917122918122919122920122921122922122923122924122925122926122927122928122929122930122931122932122933122934122935122936122937122938122939122940122941122942122943122944122945122946122947122948122949122950122951122952122953122954122955122956122957122958122959122960122961122962122963122964122965122966122967122968122969122970122971122972122973122974122975122976122977122978122979122980122981122982122983122984122985122986122987122988122989122990122991122992122993122994122995122996122997122998122999123000123001123002123003123004123005123006123007123008123009123010123011123012123013123014123015123016123017123018123019123020123021123022123023123024123025123026123027123028123029123030123031123032123033123034123035123036123037123038123039123040123041123042123043123044123045123046123047123048123049123050123051123052123053123054123055123056123057123058123059123060123061123062123063123064123065123066123067123068123069123070123071123072123073123074123075123076123077123078123079123080123081123082123083123084123085123086123087123088123089123090123091123092123093123094123095123096123097123098123099123100123101123102123103123104123105123106123107123108123109123110123111123112123113123114123115123116123117123118123119123120123121123122123123123124123125123126123127123128123129123130123131123132123133123134123135123136123137123138123139123140123141123142123143123144123145123146123147123148123149123150123151123152123153123154123155123156123157123158123159123160123161123162123163123164123165123166123167123168123169123170123171123172123173123174123175123176123177123178123179123180123181123182123183123184123185123186123187123188123189123190123191123192123193123194123195123196123197123198123199123200123201123202123203123204123205123206123207123208123209123210123211123212123213123214123215123216123217123218123219123220123221123222123223123224123225123226123227123228123229123230123231123232123233123234123235123236123237123238123239123240123241123242123243123244123245123246123247123248123249123250123251123252123253123254123255123256123257123258123259123260123261123262123263123264123265123266123267123268123269123270123271123272123273123274123275123276123277123278123279123280123281123282123283123284123285123286123287123288123289123290123291123292123293123294123295123296123297123298123299123300123301123302123303123304123305123306123307123308123309123310123311123312123313123314123315123316123317123318123319123320123321123322123323123324123325123326123327123328123329123330123331123332123333123334123335123336123337123338123339123340123341123342123343123344123345123346123347123348123349123350123351123352123353123354123355123356123357123358123359123360123361123362123363123364123365123366123367123368123369123370123371123372123373123374123375123376123377123378123379123380123381123382123383123384123385123386123387123388123389123390123391123392123393123394123395123396123397123398123399123400123401123402123403123404123405123406123407123408123409123410123411123412123413123414123415123416123417123418123419123420123421123422123423123424123425123426123427123428123429123430123431123432123433123434123435123436123437123438123439123440123441123442123443123444123445123446123447123448123449123450123451123452123453123454123455123456123457123458123459123460123461123462123463123464123465123466123467123468123469123470123471123472123473123474123475123476123477123478123479123480123481123482123483123484123485123486123487123488123489123490123491123492123493123494123495123496123497123498123499123500123501123502123503123504123505123506123507123508123509123510123511123512123513123514123515123516123517123518123519123520123521123522123523123524123525123526123527123528123529123530123531123532123533123534123535123536123537123538123539123540123541123542123543123544123545123546123547123548123549123550123551123552123553123554123555123556123557123558123559123560123561123562123563123564123565123566123567123568123569123570123571123572123573123574123575123576123577123578123579123580123581123582123583123584123585123586123587123588123589123590123591123592123593123594123595123596123597123598123599123600123601123602123603123604123605123606123607123608123609123610123611123612123613123614123615123616123617123618123619123620123621123622123623123624123625123626123627123628123629123630123631123632123633123634123635123636123637123638123639123640123641123642123643123644123645123646123647123648123649123650123651123652123653123654123655123656123657123658123659123660123661123662123663123664123665123666123667123668123669123670123671123672123673123674123675123676123677123678123679123680123681123682123683123684123685123686123687123688123689123690123691123692123693123694123695123696123697123698123699123700123701123702123703123704123705123706123707123708123709123710123711123712123713123714123715123716123717123718123719123720123721123722123723123724123725123726123727123728123729123730123731123732123733123734123735123736123737123738123739123740123741123742123743123744123745123746123747123748123749123750123751123752123753123754123755123756123757123758123759123760123761123762123763123764123765123766123767123768123769123770123771123772123773123774123775123776123777123778123779123780123781123782123783123784123785123786123787123788123789123790123791123792123793123794123795123796123797123798123799123800123801123802123803123804123805123806123807123808123809123810123811123812123813123814123815123816123817123818123819123820123821123822123823123824123825123826123827123828123829123830123831123832123833123834123835123836123837123838123839123840123841123842123843123844123845123846123847123848123849123850123851123852123853123854123855123856123857123858123859123860123861123862123863123864123865123866123867123868123869123870123871123872123873123874123875123876123877123878123879123880123881123882123883123884123885123886123887123888123889123890123891123892123893123894123895123896123897123898123899123900123901123902123903123904123905123906123907123908123909123910123911123912123913123914123915123916123917123918123919123920123921123922123923123924123925123926123927123928123929123930123931123932123933123934123935123936123937123938123939123940123941123942123943123944123945123946123947123948123949123950123951123952123953123954123955123956123957123958123959123960123961123962123963123964123965123966123967123968123969123970123971123972123973123974123975123976123977123978123979123980123981123982123983123984123985123986123987123988123989123990123991123992123993123994123995123996123997123998123999124000124001124002124003124004124005124006124007124008124009124010124011124012124013124014124015124016124017124018124019124020124021124022124023124024124025124026124027124028124029124030124031124032124033124034124035124036124037124038124039124040124041124042124043124044124045124046124047124048124049124050124051124052124053124054124055124056124057124058124059124060124061124062124063124064124065124066124067124068124069124070124071124072124073124074124075124076124077124078124079124080124081124082124083124084124085124086124087124088124089124090124091124092124093124094124095124096124097124098124099124100124101124102124103124104124105124106124107124108124109124110124111124112124113124114124115124116124117124118124119124120124121124122124123124124124125124126124127124128124129124130124131124132124133124134124135124136124137124138124139124140124141124142124143124144124145124146124147124148124149124150124151124152124153124154124155124156124157124158124159124160124161124162124163124164124165124166124167124168124169124170124171124172124173124174124175124176124177124178124179124180124181124182124183124184124185124186124187124188124189124190124191124192124193124194124195124196124197124198124199124200124201124202124203124204124205124206124207124208124209124210124211124212124213124214124215124216124217124218124219124220124221124222124223124224124225124226124227124228124229124230124231124232124233124234124235124236124237124238124239124240124241124242124243124244124245124246124247124248124249124250124251124252124253124254124255124256124257124258124259124260124261124262124263124264124265124266124267124268124269124270124271124272124273124274124275124276124277124278124279124280124281124282124283124284124285124286124287124288124289124290124291124292124293124294124295124296124297124298124299124300124301124302124303124304124305124306124307124308124309124310124311124312124313124314124315124316124317124318124319124320124321124322124323124324124325124326124327124328124329124330124331124332124333124334124335124336124337124338124339124340124341124342124343124344124345124346124347124348124349124350124351124352124353124354124355124356124357124358124359124360124361124362124363124364124365124366124367124368124369124370124371124372124373124374124375124376124377124378124379124380124381124382124383124384124385124386124387124388124389124390124391124392124393124394124395124396124397124398124399124400124401124402124403124404124405124406124407124408124409124410124411124412124413124414124415124416124417124418124419124420124421124422124423124424124425124426124427124428124429124430124431124432124433124434124435124436124437124438124439124440124441124442124443124444124445124446124447124448124449124450124451124452124453124454124455124456124457124458124459124460124461124462124463124464124465124466124467124468124469124470124471124472124473124474124475124476124477124478124479124480124481124482124483124484124485124486124487124488124489124490124491124492124493124494124495124496124497124498124499124500124501124502124503124504124505124506124507124508124509124510124511124512124513124514124515124516124517124518124519124520124521124522124523124524124525124526124527124528124529124530124531124532124533124534124535124536124537124538124539124540124541124542124543124544124545124546124547124548124549124550124551124552124553124554124555124556124557124558124559124560124561124562124563124564124565124566124567124568124569124570124571124572124573124574124575124576124577124578124579124580124581124582124583124584124585124586124587124588124589124590124591124592124593124594124595124596124597124598124599124600124601124602124603124604124605124606124607124608124609124610124611124612124613124614124615124616124617124618124619124620124621124622124623124624124625124626124627124628124629124630124631124632124633124634124635124636124637124638124639124640124641124642124643124644124645124646124647124648124649124650124651124652124653124654124655124656124657124658124659124660124661124662124663124664124665124666124667124668124669124670124671124672124673124674124675124676124677124678124679124680124681124682124683124684124685124686124687124688124689124690124691124692124693124694124695124696124697124698124699124700124701124702124703124704124705124706124707124708124709124710124711124712124713124714124715124716124717124718124719124720124721124722124723124724124725124726124727124728124729124730124731124732124733124734124735124736124737124738124739124740124741124742124743124744124745124746124747124748124749124750124751124752124753124754124755124756124757124758124759124760124761124762124763124764124765124766124767124768124769124770124771124772124773124774124775124776124777124778124779124780124781124782124783124784124785124786124787124788124789124790124791124792124793124794124795124796124797124798124799124800124801124802124803124804124805124806124807124808124809124810124811124812124813124814124815124816124817124818124819124820124821124822124823124824124825124826124827124828124829124830124831124832124833124834124835124836124837124838124839124840124841124842124843124844124845124846124847124848124849124850124851124852124853124854124855124856124857124858124859124860124861124862124863124864124865124866124867124868124869124870124871124872124873124874124875124876124877124878124879124880124881124882124883124884124885124886124887124888124889124890124891124892124893124894124895124896124897124898124899124900124901124902124903124904124905124906124907124908124909124910124911124912124913124914124915124916124917124918124919124920124921124922124923124924124925124926124927124928124929124930124931124932124933124934124935124936124937124938124939124940124941124942124943124944124945124946124947124948124949124950124951124952124953124954124955124956124957124958124959124960124961124962124963124964124965124966124967124968124969124970124971124972124973124974124975124976124977124978124979124980124981124982124983124984124985124986124987124988124989124990124991124992124993124994124995124996124997124998124999125000125001125002125003125004125005125006125007125008125009125010125011125012125013125014125015125016125017125018125019125020125021125022125023125024125025125026125027125028125029125030125031125032125033125034125035125036125037125038125039125040125041125042125043125044125045125046125047125048125049125050125051125052125053125054125055125056125057125058125059125060125061125062125063125064125065125066125067125068125069125070125071125072125073125074125075125076125077125078125079125080125081125082125083125084125085125086125087125088125089125090125091125092125093125094125095125096125097125098125099125100125101125102125103125104125105125106125107125108125109125110125111125112125113125114125115125116125117125118125119125120125121125122125123125124125125125126125127125128125129125130125131125132125133125134125135125136125137125138125139125140125141125142125143125144125145125146125147125148125149125150125151125152125153125154125155125156125157125158125159125160125161125162125163125164125165125166125167125168125169125170125171125172125173125174125175125176125177125178125179125180125181125182125183125184125185125186125187125188125189125190125191125192125193125194125195125196125197125198125199125200125201125202125203125204125205125206125207125208125209125210125211125212125213125214125215125216125217125218125219125220125221125222125223125224125225125226125227125228125229125230125231125232125233125234125235125236125237125238125239125240125241125242125243125244125245125246125247125248125249125250125251125252125253125254125255125256125257125258125259125260125261125262125263125264125265125266125267125268125269125270125271125272125273125274125275125276125277125278125279125280125281125282125283125284125285125286125287125288125289125290125291125292125293125294125295125296125297125298125299125300125301125302125303125304125305125306125307125308125309125310125311125312125313125314125315125316125317125318125319125320125321125322125323125324125325125326125327125328125329125330125331125332125333125334125335125336125337125338125339125340125341125342125343125344125345125346125347125348125349125350125351125352125353125354125355125356125357125358125359125360125361125362125363125364125365125366125367125368125369125370125371125372125373125374125375125376125377125378125379125380125381125382125383125384125385125386125387125388125389125390125391125392125393125394125395125396125397125398125399125400125401125402125403125404125405125406125407125408125409125410125411125412125413125414125415125416125417125418125419125420125421125422125423125424125425125426125427125428125429125430125431125432125433125434125435125436125437125438125439125440125441125442125443125444125445125446125447125448125449125450125451125452125453125454125455125456125457125458125459125460125461125462125463125464125465125466125467125468125469125470125471125472125473125474125475125476125477125478125479125480125481125482125483125484125485125486125487125488125489125490125491125492125493125494125495125496125497125498125499125500125501125502125503125504125505125506125507125508125509125510125511125512125513125514125515125516125517125518125519125520125521125522125523125524125525125526125527125528125529125530125531125532125533125534125535125536125537125538125539125540125541125542125543125544125545125546125547125548125549125550125551125552125553125554125555125556125557125558125559125560125561125562125563125564125565125566125567125568125569125570125571125572125573125574125575125576125577125578125579125580125581125582125583125584125585125586125587125588125589125590125591125592125593125594125595125596125597125598125599125600125601125602125603125604125605125606125607125608125609125610125611125612125613125614125615125616125617125618125619125620125621125622125623125624125625125626125627125628125629125630125631125632125633125634125635125636125637125638125639125640125641125642125643125644125645125646125647125648125649125650125651125652125653125654125655125656125657125658125659125660125661125662125663125664125665125666125667125668125669125670125671125672125673125674125675125676125677125678125679125680125681125682125683125684125685125686125687125688125689125690125691125692125693125694125695125696125697125698125699125700125701125702125703125704125705125706125707125708125709125710125711125712125713125714125715125716125717125718125719125720125721125722125723125724125725125726125727125728125729125730125731125732125733125734125735125736125737125738125739125740125741125742125743125744125745125746125747125748125749125750125751125752125753125754125755125756125757125758125759125760125761125762125763125764125765125766125767125768125769125770125771125772125773125774125775125776125777125778125779125780125781125782125783125784125785125786125787125788125789125790125791125792125793125794125795125796125797125798125799125800125801125802125803125804125805125806125807125808125809125810125811125812125813125814125815125816125817125818125819125820125821125822125823125824125825125826125827125828125829125830125831125832125833125834125835125836125837125838125839125840125841125842125843125844125845125846125847125848125849125850125851125852125853125854125855125856125857125858125859125860125861125862125863125864125865125866125867125868125869125870125871125872125873125874125875125876125877125878125879125880125881125882125883125884125885125886125887125888125889125890125891125892125893125894125895125896125897125898125899125900125901125902125903125904125905125906125907125908125909125910125911125912125913125914125915125916125917125918125919125920125921125922125923125924125925125926125927125928125929125930125931125932125933125934125935125936125937125938125939125940125941125942125943125944125945125946125947125948125949125950125951125952125953125954125955125956125957125958125959125960125961125962125963125964125965125966125967125968125969125970125971125972125973125974125975125976125977125978125979125980125981125982125983125984125985125986125987125988125989125990125991125992125993125994125995125996125997125998125999126000126001126002126003126004126005126006126007126008126009126010126011126012126013126014126015126016126017126018126019126020126021126022126023126024126025126026126027126028126029126030126031126032126033126034126035126036126037126038126039126040126041126042126043126044126045126046126047126048126049126050126051126052126053126054126055126056126057126058126059126060126061126062126063126064126065126066126067126068126069126070126071126072126073126074126075126076126077126078126079126080126081126082126083126084126085126086126087126088126089126090126091126092126093126094126095126096126097126098126099126100126101126102126103126104126105126106126107126108126109126110126111126112126113126114126115126116126117126118126119126120126121126122126123126124126125126126126127126128126129126130126131126132126133126134126135126136126137126138126139126140126141126142126143126144126145126146126147126148126149126150126151126152126153126154126155126156126157126158126159126160126161126162126163126164126165126166126167126168126169126170126171126172126173126174126175126176126177126178126179126180126181126182126183126184126185126186126187126188126189126190126191126192126193126194126195126196126197126198126199126200126201126202126203126204126205126206126207126208126209126210126211126212126213126214126215126216126217126218126219126220126221126222126223126224126225126226126227126228126229126230126231126232126233126234126235126236126237126238126239126240126241126242126243126244126245126246126247126248126249126250126251126252126253126254126255126256126257126258126259126260126261126262126263126264126265126266126267126268126269126270126271126272126273126274126275126276126277126278126279126280126281126282126283126284126285126286126287126288126289126290126291126292126293126294126295126296126297126298126299126300126301126302126303126304126305126306126307126308126309126310126311126312126313126314126315126316126317126318126319126320126321126322126323126324126325126326126327126328126329126330126331126332126333126334126335126336126337126338126339126340126341126342126343126344126345126346126347126348126349126350126351126352126353126354126355126356126357126358126359126360126361126362126363126364126365126366126367126368126369126370126371126372126373126374126375126376126377126378126379126380126381126382126383126384126385126386126387126388126389126390126391126392126393126394126395126396126397126398126399126400126401126402126403126404126405126406126407126408126409126410126411126412126413126414126415126416126417126418126419126420126421126422126423126424126425126426126427126428126429126430126431126432126433126434126435126436126437126438126439126440126441126442126443126444126445126446126447126448126449126450126451126452126453126454126455126456126457126458126459126460126461126462126463126464126465126466126467126468126469126470126471126472126473126474126475126476126477126478126479126480126481126482126483126484126485126486126487126488126489126490126491126492126493126494126495126496126497126498126499126500126501126502126503126504126505126506126507126508126509126510126511126512126513126514126515126516126517126518126519126520126521126522126523126524126525126526126527126528126529126530126531126532126533126534126535126536126537126538126539126540126541126542126543126544126545126546126547126548126549126550126551126552126553126554126555126556126557126558126559126560126561126562126563126564126565126566126567126568126569126570126571126572126573126574126575126576126577126578126579126580126581126582126583126584126585126586126587126588126589126590126591126592126593126594126595126596126597126598126599126600126601126602126603126604126605126606126607126608126609126610126611126612126613126614126615126616126617126618126619126620126621126622126623126624126625126626126627126628126629126630126631126632126633126634126635126636126637126638126639126640126641126642126643126644126645126646126647126648126649126650126651126652126653126654126655126656126657126658126659126660126661126662126663126664126665126666126667126668126669126670126671126672126673126674126675126676126677126678126679126680126681126682126683126684126685126686126687126688126689126690126691126692126693126694126695126696126697126698126699126700126701126702126703126704126705126706126707126708126709126710126711126712126713126714126715126716126717126718126719126720126721126722126723126724126725126726126727126728126729126730126731126732126733126734126735126736126737126738126739126740126741126742126743126744126745126746126747126748126749126750126751126752126753126754126755126756126757126758126759126760126761126762126763126764126765126766126767126768126769126770126771126772126773126774126775126776126777126778126779126780126781126782126783126784126785126786126787126788126789126790126791126792126793126794126795126796126797126798126799126800126801126802126803126804126805126806126807126808126809126810126811126812126813126814126815126816126817126818126819126820126821126822126823126824126825126826126827126828126829126830126831126832126833126834126835126836126837126838126839126840126841126842126843126844126845126846126847126848126849126850126851126852126853126854126855126856126857126858126859126860126861126862126863126864126865126866126867126868126869126870126871126872126873126874126875126876126877126878126879126880126881126882126883126884126885126886126887126888126889126890126891126892126893126894126895126896126897126898126899126900126901126902126903126904126905126906126907126908126909126910126911126912126913126914126915126916126917126918126919126920126921126922126923126924126925126926126927126928126929126930126931126932126933126934126935126936126937126938126939126940126941126942126943126944126945126946126947126948126949126950126951126952126953126954126955126956126957126958126959126960126961126962126963126964126965126966126967126968126969126970126971126972126973126974126975126976126977126978126979126980126981126982126983126984126985126986126987126988126989126990126991126992126993126994126995126996126997126998126999127000127001127002127003127004127005127006127007127008127009127010127011127012127013127014127015127016127017127018127019127020127021127022127023127024127025127026127027127028127029127030127031127032127033127034127035127036127037127038127039127040127041127042127043127044127045127046127047127048127049127050127051127052127053127054127055127056127057127058127059127060127061127062127063127064127065127066127067127068127069127070127071127072127073127074127075127076127077127078127079127080127081127082127083127084127085127086127087127088127089127090127091127092127093127094127095127096127097127098127099127100127101127102127103127104127105127106127107127108127109127110127111127112127113127114127115127116127117127118127119127120127121127122127123127124127125127126127127127128127129127130127131127132127133127134127135127136127137127138127139127140127141127142127143127144127145127146127147127148127149127150127151127152127153127154127155127156127157127158127159127160127161127162127163127164127165127166127167127168127169127170127171127172127173127174127175127176127177127178127179127180127181127182127183127184127185127186127187127188127189127190127191127192127193127194127195127196127197127198127199127200127201127202127203127204127205127206127207127208127209127210127211127212127213127214127215127216127217127218127219127220127221127222127223127224127225127226127227127228127229127230127231127232127233127234127235127236127237127238127239127240127241127242127243127244127245127246127247127248127249127250127251127252127253127254127255127256127257127258127259127260127261127262127263127264127265127266127267127268127269127270127271127272127273127274127275127276127277127278127279127280127281127282127283127284127285127286127287127288127289127290127291127292127293127294127295127296127297127298127299127300127301127302127303127304127305127306127307127308127309127310127311127312127313127314127315127316127317127318127319127320127321127322127323127324127325127326127327127328127329127330127331127332127333127334127335127336127337127338127339127340127341127342127343127344127345127346127347127348127349127350127351127352127353127354127355127356127357127358127359127360127361127362127363127364127365127366127367127368127369127370127371127372127373127374127375127376127377127378127379127380127381127382127383127384127385127386127387127388127389127390127391127392127393127394127395127396127397127398127399127400127401127402127403127404127405127406127407127408127409127410127411127412127413127414127415127416127417127418127419127420127421127422127423127424127425127426127427127428127429127430127431127432127433127434127435127436127437127438127439127440127441127442127443127444127445127446127447127448127449127450127451127452127453127454127455127456127457127458127459127460127461127462127463127464127465127466127467127468127469127470127471127472127473127474127475127476127477127478127479127480127481127482127483127484127485127486127487127488127489127490127491127492127493127494127495127496127497127498127499127500127501127502127503127504127505127506127507127508127509127510127511127512127513127514127515127516127517127518127519127520127521127522127523127524127525127526127527127528127529127530127531127532127533127534127535127536127537127538127539127540127541127542127543127544127545127546127547127548127549127550127551127552127553127554127555127556127557127558127559127560127561127562127563127564127565127566127567127568127569127570127571127572127573127574127575127576127577127578127579127580127581127582127583127584127585127586127587127588127589127590127591127592127593127594127595127596127597127598127599127600127601127602127603127604127605127606127607127608127609127610127611127612127613127614127615127616127617127618127619127620127621127622127623127624127625127626127627127628127629127630127631127632127633127634127635127636127637127638127639127640127641127642127643127644127645127646127647127648127649127650127651127652127653127654127655127656127657127658127659127660127661127662127663127664127665127666127667127668127669127670127671127672127673127674127675
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // install a JSONP callback for chunk loading
  3. /******/ var parentJsonpFunction = window["webpackJsonp"];
  4. /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
  5. /******/ // add "moreModules" to the modules object,
  6. /******/ // then flag all "chunkIds" as loaded and fire callback
  7. /******/ var moduleId, chunkId, i = 0, resolves = [], result;
  8. /******/ for(;i < chunkIds.length; i++) {
  9. /******/ chunkId = chunkIds[i];
  10. /******/ if(installedChunks[chunkId]) {
  11. /******/ resolves.push(installedChunks[chunkId][0]);
  12. /******/ }
  13. /******/ installedChunks[chunkId] = 0;
  14. /******/ }
  15. /******/ for(moduleId in moreModules) {
  16. /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
  17. /******/ modules[moduleId] = moreModules[moduleId];
  18. /******/ }
  19. /******/ }
  20. /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
  21. /******/ while(resolves.length) {
  22. /******/ resolves.shift()();
  23. /******/ }
  24. /******/
  25. /******/ };
  26. /******/
  27. /******/ // The module cache
  28. /******/ var installedModules = {};
  29. /******/
  30. /******/ // objects to store loaded and loading chunks
  31. /******/ var installedChunks = {
  32. /******/ 16: 0
  33. /******/ };
  34. /******/
  35. /******/ // The require function
  36. /******/ function __webpack_require__(moduleId) {
  37. /******/
  38. /******/ // Check if module is in cache
  39. /******/ if(installedModules[moduleId]) {
  40. /******/ return installedModules[moduleId].exports;
  41. /******/ }
  42. /******/ // Create a new module (and put it into the cache)
  43. /******/ var module = installedModules[moduleId] = {
  44. /******/ i: moduleId,
  45. /******/ l: false,
  46. /******/ exports: {}
  47. /******/ };
  48. /******/
  49. /******/ // Execute the module function
  50. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  51. /******/
  52. /******/ // Flag the module as loaded
  53. /******/ module.l = true;
  54. /******/
  55. /******/ // Return the exports of the module
  56. /******/ return module.exports;
  57. /******/ }
  58. /******/
  59. /******/ // This file contains only the entry chunk.
  60. /******/ // The chunk loading function for additional chunks
  61. /******/ __webpack_require__.e = function requireEnsure(chunkId) {
  62. /******/ var installedChunkData = installedChunks[chunkId];
  63. /******/ if(installedChunkData === 0) {
  64. /******/ return new Promise(function(resolve) { resolve(); });
  65. /******/ }
  66. /******/
  67. /******/ // a Promise means "currently loading".
  68. /******/ if(installedChunkData) {
  69. /******/ return installedChunkData[2];
  70. /******/ }
  71. /******/
  72. /******/ // setup Promise in chunk cache
  73. /******/ var promise = new Promise(function(resolve, reject) {
  74. /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
  75. /******/ });
  76. /******/ installedChunkData[2] = promise;
  77. /******/
  78. /******/ // start chunk loading
  79. /******/ var head = document.getElementsByTagName('head')[0];
  80. /******/ var script = document.createElement('script');
  81. /******/ script.type = "text/javascript";
  82. /******/ script.charset = 'utf-8';
  83. /******/ script.async = true;
  84. /******/ script.timeout = 120000;
  85. /******/
  86. /******/ if (__webpack_require__.nc) {
  87. /******/ script.setAttribute("nonce", __webpack_require__.nc);
  88. /******/ }
  89. /******/ script.src = __webpack_require__.p + "js/build/" + ({}[chunkId]||chunkId) + ".js?" + "f9cd5b17" + "";
  90. /******/ var timeout = setTimeout(onScriptComplete, 120000);
  91. /******/ script.onerror = script.onload = onScriptComplete;
  92. /******/ function onScriptComplete() {
  93. /******/ // avoid mem leaks in IE.
  94. /******/ script.onerror = script.onload = null;
  95. /******/ clearTimeout(timeout);
  96. /******/ var chunk = installedChunks[chunkId];
  97. /******/ if(chunk !== 0) {
  98. /******/ if(chunk) {
  99. /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
  100. /******/ }
  101. /******/ installedChunks[chunkId] = undefined;
  102. /******/ }
  103. /******/ };
  104. /******/ head.appendChild(script);
  105. /******/
  106. /******/ return promise;
  107. /******/ };
  108. /******/
  109. /******/ // expose the modules object (__webpack_modules__)
  110. /******/ __webpack_require__.m = modules;
  111. /******/
  112. /******/ // expose the module cache
  113. /******/ __webpack_require__.c = installedModules;
  114. /******/
  115. /******/ // define getter function for harmony exports
  116. /******/ __webpack_require__.d = function(exports, name, getter) {
  117. /******/ if(!__webpack_require__.o(exports, name)) {
  118. /******/ Object.defineProperty(exports, name, {
  119. /******/ configurable: false,
  120. /******/ enumerable: true,
  121. /******/ get: getter
  122. /******/ });
  123. /******/ }
  124. /******/ };
  125. /******/
  126. /******/ // getDefaultExport function for compatibility with non-harmony modules
  127. /******/ __webpack_require__.n = function(module) {
  128. /******/ var getter = module && module.__esModule ?
  129. /******/ function getDefault() { return module['default']; } :
  130. /******/ function getModuleExports() { return module; };
  131. /******/ __webpack_require__.d(getter, 'a', getter);
  132. /******/ return getter;
  133. /******/ };
  134. /******/
  135. /******/ // Object.prototype.hasOwnProperty.call
  136. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  137. /******/
  138. /******/ // __webpack_public_path__
  139. /******/ __webpack_require__.p = "/";
  140. /******/
  141. /******/ // on error function for async loading
  142. /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
  143. /******/
  144. /******/ // Load entry module and return exports
  145. /******/ return __webpack_require__(__webpack_require__.s = 65);
  146. /******/ })
  147. /************************************************************************/
  148. /******/ ([
  149. /* 0 */
  150. /***/ (function(module, exports) {
  151. /*
  152. MIT License http://www.opensource.org/licenses/mit-license.php
  153. Author Tobias Koppers @sokra
  154. */
  155. // css base code, injected by the css-loader
  156. module.exports = function(useSourceMap) {
  157. var list = [];
  158. // return the list of modules as css string
  159. list.toString = function toString() {
  160. return this.map(function (item) {
  161. var content = cssWithMappingToString(item, useSourceMap);
  162. if(item[2]) {
  163. return "@media " + item[2] + "{" + content + "}";
  164. } else {
  165. return content;
  166. }
  167. }).join("");
  168. };
  169. // import a list of modules into the list
  170. list.i = function(modules, mediaQuery) {
  171. if(typeof modules === "string")
  172. modules = [[null, modules, ""]];
  173. var alreadyImportedModules = {};
  174. for(var i = 0; i < this.length; i++) {
  175. var id = this[i][0];
  176. if(typeof id === "number")
  177. alreadyImportedModules[id] = true;
  178. }
  179. for(i = 0; i < modules.length; i++) {
  180. var item = modules[i];
  181. // skip already imported module
  182. // this implementation is not 100% perfect for weird media query combinations
  183. // when a module is imported multiple times with different media queries.
  184. // I hope this will never occur (Hey this way we have smaller bundles)
  185. if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
  186. if(mediaQuery && !item[2]) {
  187. item[2] = mediaQuery;
  188. } else if(mediaQuery) {
  189. item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
  190. }
  191. list.push(item);
  192. }
  193. }
  194. };
  195. return list;
  196. };
  197. function cssWithMappingToString(item, useSourceMap) {
  198. var content = item[1] || '';
  199. var cssMapping = item[3];
  200. if (!cssMapping) {
  201. return content;
  202. }
  203. if (useSourceMap && typeof btoa === 'function') {
  204. var sourceMapping = toComment(cssMapping);
  205. var sourceURLs = cssMapping.sources.map(function (source) {
  206. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
  207. });
  208. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  209. }
  210. return [content].join('\n');
  211. }
  212. // Adapted from convert-source-map (MIT)
  213. function toComment(sourceMap) {
  214. // eslint-disable-next-line no-undef
  215. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  216. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  217. return '/*# ' + data + ' */';
  218. }
  219. /***/ }),
  220. /* 1 */
  221. /***/ (function(module, exports, __webpack_require__) {
  222. /*
  223. MIT License http://www.opensource.org/licenses/mit-license.php
  224. Author Tobias Koppers @sokra
  225. Modified by Evan You @yyx990803
  226. */
  227. var hasDocument = typeof document !== 'undefined'
  228. if (typeof DEBUG !== 'undefined' && DEBUG) {
  229. if (!hasDocument) {
  230. throw new Error(
  231. 'vue-style-loader cannot be used in a non-browser environment. ' +
  232. "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
  233. ) }
  234. }
  235. var listToStyles = __webpack_require__(72)
  236. /*
  237. type StyleObject = {
  238. id: number;
  239. parts: Array<StyleObjectPart>
  240. }
  241. type StyleObjectPart = {
  242. css: string;
  243. media: string;
  244. sourceMap: ?string
  245. }
  246. */
  247. var stylesInDom = {/*
  248. [id: number]: {
  249. id: number,
  250. refs: number,
  251. parts: Array<(obj?: StyleObjectPart) => void>
  252. }
  253. */}
  254. var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
  255. var singletonElement = null
  256. var singletonCounter = 0
  257. var isProduction = false
  258. var noop = function () {}
  259. var options = null
  260. var ssrIdKey = 'data-vue-ssr-id'
  261. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  262. // tags it will allow on a page
  263. var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
  264. module.exports = function (parentId, list, _isProduction, _options) {
  265. isProduction = _isProduction
  266. options = _options || {}
  267. var styles = listToStyles(parentId, list)
  268. addStylesToDom(styles)
  269. return function update (newList) {
  270. var mayRemove = []
  271. for (var i = 0; i < styles.length; i++) {
  272. var item = styles[i]
  273. var domStyle = stylesInDom[item.id]
  274. domStyle.refs--
  275. mayRemove.push(domStyle)
  276. }
  277. if (newList) {
  278. styles = listToStyles(parentId, newList)
  279. addStylesToDom(styles)
  280. } else {
  281. styles = []
  282. }
  283. for (var i = 0; i < mayRemove.length; i++) {
  284. var domStyle = mayRemove[i]
  285. if (domStyle.refs === 0) {
  286. for (var j = 0; j < domStyle.parts.length; j++) {
  287. domStyle.parts[j]()
  288. }
  289. delete stylesInDom[domStyle.id]
  290. }
  291. }
  292. }
  293. }
  294. function addStylesToDom (styles /* Array<StyleObject> */) {
  295. for (var i = 0; i < styles.length; i++) {
  296. var item = styles[i]
  297. var domStyle = stylesInDom[item.id]
  298. if (domStyle) {
  299. domStyle.refs++
  300. for (var j = 0; j < domStyle.parts.length; j++) {
  301. domStyle.parts[j](item.parts[j])
  302. }
  303. for (; j < item.parts.length; j++) {
  304. domStyle.parts.push(addStyle(item.parts[j]))
  305. }
  306. if (domStyle.parts.length > item.parts.length) {
  307. domStyle.parts.length = item.parts.length
  308. }
  309. } else {
  310. var parts = []
  311. for (var j = 0; j < item.parts.length; j++) {
  312. parts.push(addStyle(item.parts[j]))
  313. }
  314. stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
  315. }
  316. }
  317. }
  318. function createStyleElement () {
  319. var styleElement = document.createElement('style')
  320. styleElement.type = 'text/css'
  321. head.appendChild(styleElement)
  322. return styleElement
  323. }
  324. function addStyle (obj /* StyleObjectPart */) {
  325. var update, remove
  326. var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
  327. if (styleElement) {
  328. if (isProduction) {
  329. // has SSR styles and in production mode.
  330. // simply do nothing.
  331. return noop
  332. } else {
  333. // has SSR styles but in dev mode.
  334. // for some reason Chrome can't handle source map in server-rendered
  335. // style tags - source maps in <style> only works if the style tag is
  336. // created and inserted dynamically. So we remove the server rendered
  337. // styles and inject new ones.
  338. styleElement.parentNode.removeChild(styleElement)
  339. }
  340. }
  341. if (isOldIE) {
  342. // use singleton mode for IE9.
  343. var styleIndex = singletonCounter++
  344. styleElement = singletonElement || (singletonElement = createStyleElement())
  345. update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
  346. remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
  347. } else {
  348. // use multi-style-tag mode in all other cases
  349. styleElement = createStyleElement()
  350. update = applyToTag.bind(null, styleElement)
  351. remove = function () {
  352. styleElement.parentNode.removeChild(styleElement)
  353. }
  354. }
  355. update(obj)
  356. return function updateStyle (newObj /* StyleObjectPart */) {
  357. if (newObj) {
  358. if (newObj.css === obj.css &&
  359. newObj.media === obj.media &&
  360. newObj.sourceMap === obj.sourceMap) {
  361. return
  362. }
  363. update(obj = newObj)
  364. } else {
  365. remove()
  366. }
  367. }
  368. }
  369. var replaceText = (function () {
  370. var textStore = []
  371. return function (index, replacement) {
  372. textStore[index] = replacement
  373. return textStore.filter(Boolean).join('\n')
  374. }
  375. })()
  376. function applyToSingletonTag (styleElement, index, remove, obj) {
  377. var css = remove ? '' : obj.css
  378. if (styleElement.styleSheet) {
  379. styleElement.styleSheet.cssText = replaceText(index, css)
  380. } else {
  381. var cssNode = document.createTextNode(css)
  382. var childNodes = styleElement.childNodes
  383. if (childNodes[index]) styleElement.removeChild(childNodes[index])
  384. if (childNodes.length) {
  385. styleElement.insertBefore(cssNode, childNodes[index])
  386. } else {
  387. styleElement.appendChild(cssNode)
  388. }
  389. }
  390. }
  391. function applyToTag (styleElement, obj) {
  392. var css = obj.css
  393. var media = obj.media
  394. var sourceMap = obj.sourceMap
  395. if (media) {
  396. styleElement.setAttribute('media', media)
  397. }
  398. if (options.ssrId) {
  399. styleElement.setAttribute(ssrIdKey, obj.id)
  400. }
  401. if (sourceMap) {
  402. // https://developer.chrome.com/devtools/docs/javascript-debugging
  403. // this makes source maps inside style tags work properly in Chrome
  404. css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
  405. // http://stackoverflow.com/a/26603875
  406. css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
  407. }
  408. if (styleElement.styleSheet) {
  409. styleElement.styleSheet.cssText = css
  410. } else {
  411. while (styleElement.firstChild) {
  412. styleElement.removeChild(styleElement.firstChild)
  413. }
  414. styleElement.appendChild(document.createTextNode(css))
  415. }
  416. }
  417. /***/ }),
  418. /* 2 */
  419. /***/ (function(module, exports) {
  420. /* globals __VUE_SSR_CONTEXT__ */
  421. // IMPORTANT: Do NOT use ES2015 features in this file.
  422. // This module is a runtime utility for cleaner component module output and will
  423. // be included in the final webpack user bundle.
  424. module.exports = function normalizeComponent (
  425. rawScriptExports,
  426. compiledTemplate,
  427. functionalTemplate,
  428. injectStyles,
  429. scopeId,
  430. moduleIdentifier /* server only */
  431. ) {
  432. var esModule
  433. var scriptExports = rawScriptExports = rawScriptExports || {}
  434. // ES6 modules interop
  435. var type = typeof rawScriptExports.default
  436. if (type === 'object' || type === 'function') {
  437. esModule = rawScriptExports
  438. scriptExports = rawScriptExports.default
  439. }
  440. // Vue.extend constructor export interop
  441. var options = typeof scriptExports === 'function'
  442. ? scriptExports.options
  443. : scriptExports
  444. // render functions
  445. if (compiledTemplate) {
  446. options.render = compiledTemplate.render
  447. options.staticRenderFns = compiledTemplate.staticRenderFns
  448. options._compiled = true
  449. }
  450. // functional template
  451. if (functionalTemplate) {
  452. options.functional = true
  453. }
  454. // scopedId
  455. if (scopeId) {
  456. options._scopeId = scopeId
  457. }
  458. var hook
  459. if (moduleIdentifier) { // server build
  460. hook = function (context) {
  461. // 2.3 injection
  462. context =
  463. context || // cached call
  464. (this.$vnode && this.$vnode.ssrContext) || // stateful
  465. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  466. // 2.2 with runInNewContext: true
  467. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  468. context = __VUE_SSR_CONTEXT__
  469. }
  470. // inject component styles
  471. if (injectStyles) {
  472. injectStyles.call(this, context)
  473. }
  474. // register component module identifier for async chunk inferrence
  475. if (context && context._registeredComponents) {
  476. context._registeredComponents.add(moduleIdentifier)
  477. }
  478. }
  479. // used by ssr in case component is cached and beforeCreate
  480. // never gets called
  481. options._ssrRegister = hook
  482. } else if (injectStyles) {
  483. hook = injectStyles
  484. }
  485. if (hook) {
  486. var functional = options.functional
  487. var existing = functional
  488. ? options.render
  489. : options.beforeCreate
  490. if (!functional) {
  491. // inject component registration as beforeCreate hook
  492. options.beforeCreate = existing
  493. ? [].concat(existing, hook)
  494. : [hook]
  495. } else {
  496. // for template-only hot-reload because in that case the render fn doesn't
  497. // go through the normalizer
  498. options._injectStyles = hook
  499. // register for functioal component in vue file
  500. options.render = function renderWithStyleInjection (h, context) {
  501. hook.call(context)
  502. return existing(h, context)
  503. }
  504. }
  505. }
  506. return {
  507. esModule: esModule,
  508. exports: scriptExports,
  509. options: options
  510. }
  511. }
  512. /***/ }),
  513. /* 3 */
  514. /***/ (function(module, exports, __webpack_require__) {
  515. var freeGlobal = __webpack_require__(37);
  516. /** Detect free variable `self`. */
  517. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  518. /** Used as a reference to the global object. */
  519. var root = freeGlobal || freeSelf || Function('return this')();
  520. module.exports = root;
  521. /***/ }),
  522. /* 4 */
  523. /***/ (function(module, exports, __webpack_require__) {
  524. if (false) {
  525. module.exports = require('./vue.common.prod.js')
  526. } else {
  527. module.exports = __webpack_require__(67)
  528. }
  529. /***/ }),
  530. /* 5 */
  531. /***/ (function(module, exports, __webpack_require__) {
  532. var baseIsNative = __webpack_require__(153),
  533. getValue = __webpack_require__(156);
  534. /**
  535. * Gets the native function at `key` of `object`.
  536. *
  537. * @private
  538. * @param {Object} object The object to query.
  539. * @param {string} key The key of the method to get.
  540. * @returns {*} Returns the function if it's native, else `undefined`.
  541. */
  542. function getNative(object, key) {
  543. var value = getValue(object, key);
  544. return baseIsNative(value) ? value : undefined;
  545. }
  546. module.exports = getNative;
  547. /***/ }),
  548. /* 6 */
  549. /***/ (function(module, exports) {
  550. var g;
  551. // This works in non-strict mode
  552. g = (function() {
  553. return this;
  554. })();
  555. try {
  556. // This works if eval is allowed (see CSP)
  557. g = g || Function("return this")() || (1,eval)("this");
  558. } catch(e) {
  559. // This works if the window reference is available
  560. if(typeof window === "object")
  561. g = window;
  562. }
  563. // g can still be undefined, but nothing to do about it...
  564. // We return undefined, instead of nothing here, so it's
  565. // easier to handle this case. if(!global) { ...}
  566. module.exports = g;
  567. /***/ }),
  568. /* 7 */
  569. /***/ (function(module, exports, __webpack_require__) {
  570. var disposed = false
  571. function injectStyle (ssrContext) {
  572. if (disposed) return
  573. __webpack_require__(95)
  574. }
  575. var normalizeComponent = __webpack_require__(2)
  576. /* script */
  577. var __vue_script__ = __webpack_require__(97)
  578. /* template */
  579. var __vue_template__ = __webpack_require__(98)
  580. /* template functional */
  581. var __vue_template_functional__ = false
  582. /* styles */
  583. var __vue_styles__ = injectStyle
  584. /* scopeId */
  585. var __vue_scopeId__ = "data-v-329e9aed"
  586. /* moduleIdentifier (server only) */
  587. var __vue_module_identifier__ = null
  588. var Component = normalizeComponent(
  589. __vue_script__,
  590. __vue_template__,
  591. __vue_template_functional__,
  592. __vue_styles__,
  593. __vue_scopeId__,
  594. __vue_module_identifier__
  595. )
  596. Component.options.__file = "resources/assets/js/main/components/DrawerTabsContainer.vue"
  597. /* hot reload */
  598. if (false) {(function () {
  599. var hotAPI = require("vue-hot-reload-api")
  600. hotAPI.install(require("vue"), false)
  601. if (!hotAPI.compatible) return
  602. module.hot.accept()
  603. if (!module.hot.data) {
  604. hotAPI.createRecord("data-v-329e9aed", Component.options)
  605. } else {
  606. hotAPI.reload("data-v-329e9aed", Component.options)
  607. }
  608. module.hot.dispose(function (data) {
  609. disposed = true
  610. })
  611. })()}
  612. module.exports = Component.exports
  613. /***/ }),
  614. /* 8 */
  615. /***/ (function(module, exports) {
  616. /**
  617. * Checks if `value` is object-like. A value is object-like if it's not `null`
  618. * and has a `typeof` result of "object".
  619. *
  620. * @static
  621. * @memberOf _
  622. * @since 4.0.0
  623. * @category Lang
  624. * @param {*} value The value to check.
  625. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  626. * @example
  627. *
  628. * _.isObjectLike({});
  629. * // => true
  630. *
  631. * _.isObjectLike([1, 2, 3]);
  632. * // => true
  633. *
  634. * _.isObjectLike(_.noop);
  635. * // => false
  636. *
  637. * _.isObjectLike(null);
  638. * // => false
  639. */
  640. function isObjectLike(value) {
  641. return value != null && typeof value == 'object';
  642. }
  643. module.exports = isObjectLike;
  644. /***/ }),
  645. /* 9 */
  646. /***/ (function(module, exports) {
  647. /**
  648. * Checks if `value` is the
  649. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  650. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  651. *
  652. * @static
  653. * @memberOf _
  654. * @since 0.1.0
  655. * @category Lang
  656. * @param {*} value The value to check.
  657. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  658. * @example
  659. *
  660. * _.isObject({});
  661. * // => true
  662. *
  663. * _.isObject([1, 2, 3]);
  664. * // => true
  665. *
  666. * _.isObject(_.noop);
  667. * // => true
  668. *
  669. * _.isObject(null);
  670. * // => false
  671. */
  672. function isObject(value) {
  673. var type = typeof value;
  674. return value != null && (type == 'object' || type == 'function');
  675. }
  676. module.exports = isObject;
  677. /***/ }),
  678. /* 10 */
  679. /***/ (function(module, exports, __webpack_require__) {
  680. var Symbol = __webpack_require__(18),
  681. getRawTag = __webpack_require__(148),
  682. objectToString = __webpack_require__(149);
  683. /** `Object#toString` result references. */
  684. var nullTag = '[object Null]',
  685. undefinedTag = '[object Undefined]';
  686. /** Built-in value references. */
  687. var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  688. /**
  689. * The base implementation of `getTag` without fallbacks for buggy environments.
  690. *
  691. * @private
  692. * @param {*} value The value to query.
  693. * @returns {string} Returns the `toStringTag`.
  694. */
  695. function baseGetTag(value) {
  696. if (value == null) {
  697. return value === undefined ? undefinedTag : nullTag;
  698. }
  699. return (symToStringTag && symToStringTag in Object(value))
  700. ? getRawTag(value)
  701. : objectToString(value);
  702. }
  703. module.exports = baseGetTag;
  704. /***/ }),
  705. /* 11 */
  706. /***/ (function(module, exports, __webpack_require__) {
  707. var getNative = __webpack_require__(5);
  708. /* Built-in method references that are verified to be native. */
  709. var nativeCreate = getNative(Object, 'create');
  710. module.exports = nativeCreate;
  711. /***/ }),
  712. /* 12 */
  713. /***/ (function(module, exports, __webpack_require__) {
  714. var listCacheClear = __webpack_require__(161),
  715. listCacheDelete = __webpack_require__(162),
  716. listCacheGet = __webpack_require__(163),
  717. listCacheHas = __webpack_require__(164),
  718. listCacheSet = __webpack_require__(165);
  719. /**
  720. * Creates an list cache object.
  721. *
  722. * @private
  723. * @constructor
  724. * @param {Array} [entries] The key-value pairs to cache.
  725. */
  726. function ListCache(entries) {
  727. var index = -1,
  728. length = entries == null ? 0 : entries.length;
  729. this.clear();
  730. while (++index < length) {
  731. var entry = entries[index];
  732. this.set(entry[0], entry[1]);
  733. }
  734. }
  735. // Add methods to `ListCache`.
  736. ListCache.prototype.clear = listCacheClear;
  737. ListCache.prototype['delete'] = listCacheDelete;
  738. ListCache.prototype.get = listCacheGet;
  739. ListCache.prototype.has = listCacheHas;
  740. ListCache.prototype.set = listCacheSet;
  741. module.exports = ListCache;
  742. /***/ }),
  743. /* 13 */
  744. /***/ (function(module, exports, __webpack_require__) {
  745. var eq = __webpack_require__(33);
  746. /**
  747. * Gets the index at which the `key` is found in `array` of key-value pairs.
  748. *
  749. * @private
  750. * @param {Array} array The array to inspect.
  751. * @param {*} key The key to search for.
  752. * @returns {number} Returns the index of the matched value, else `-1`.
  753. */
  754. function assocIndexOf(array, key) {
  755. var length = array.length;
  756. while (length--) {
  757. if (eq(array[length][0], key)) {
  758. return length;
  759. }
  760. }
  761. return -1;
  762. }
  763. module.exports = assocIndexOf;
  764. /***/ }),
  765. /* 14 */
  766. /***/ (function(module, exports, __webpack_require__) {
  767. var isKeyable = __webpack_require__(167);
  768. /**
  769. * Gets the data for `map`.
  770. *
  771. * @private
  772. * @param {Object} map The map to query.
  773. * @param {string} key The reference key.
  774. * @returns {*} Returns the map data.
  775. */
  776. function getMapData(map, key) {
  777. var data = map.__data__;
  778. return isKeyable(key)
  779. ? data[typeof key == 'string' ? 'string' : 'hash']
  780. : data.map;
  781. }
  782. module.exports = getMapData;
  783. /***/ }),
  784. /* 15 */
  785. /***/ (function(module, exports, __webpack_require__) {
  786. var assignValue = __webpack_require__(45),
  787. baseAssignValue = __webpack_require__(46);
  788. /**
  789. * Copies properties of `source` to `object`.
  790. *
  791. * @private
  792. * @param {Object} source The object to copy properties from.
  793. * @param {Array} props The property identifiers to copy.
  794. * @param {Object} [object={}] The object to copy properties to.
  795. * @param {Function} [customizer] The function to customize copied values.
  796. * @returns {Object} Returns `object`.
  797. */
  798. function copyObject(source, props, object, customizer) {
  799. var isNew = !object;
  800. object || (object = {});
  801. var index = -1,
  802. length = props.length;
  803. while (++index < length) {
  804. var key = props[index];
  805. var newValue = customizer
  806. ? customizer(object[key], source[key], key, object, source)
  807. : undefined;
  808. if (newValue === undefined) {
  809. newValue = source[key];
  810. }
  811. if (isNew) {
  812. baseAssignValue(object, key, newValue);
  813. } else {
  814. assignValue(object, key, newValue);
  815. }
  816. }
  817. return object;
  818. }
  819. module.exports = copyObject;
  820. /***/ }),
  821. /* 16 */
  822. /***/ (function(module, exports) {
  823. /**
  824. * Checks if `value` is classified as an `Array` object.
  825. *
  826. * @static
  827. * @memberOf _
  828. * @since 0.1.0
  829. * @category Lang
  830. * @param {*} value The value to check.
  831. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  832. * @example
  833. *
  834. * _.isArray([1, 2, 3]);
  835. * // => true
  836. *
  837. * _.isArray(document.body.children);
  838. * // => false
  839. *
  840. * _.isArray('abc');
  841. * // => false
  842. *
  843. * _.isArray(_.noop);
  844. * // => false
  845. */
  846. var isArray = Array.isArray;
  847. module.exports = isArray;
  848. /***/ }),
  849. /* 17 */
  850. /***/ (function(module, exports, __webpack_require__) {
  851. var disposed = false
  852. function injectStyle (ssrContext) {
  853. if (disposed) return
  854. __webpack_require__(87)
  855. }
  856. var normalizeComponent = __webpack_require__(2)
  857. /* script */
  858. var __vue_script__ = __webpack_require__(89)
  859. /* template */
  860. var __vue_template__ = __webpack_require__(90)
  861. /* template functional */
  862. var __vue_template_functional__ = false
  863. /* styles */
  864. var __vue_styles__ = injectStyle
  865. /* scopeId */
  866. var __vue_scopeId__ = null
  867. /* moduleIdentifier (server only) */
  868. var __vue_module_identifier__ = null
  869. var Component = normalizeComponent(
  870. __vue_script__,
  871. __vue_template__,
  872. __vue_template_functional__,
  873. __vue_styles__,
  874. __vue_scopeId__,
  875. __vue_module_identifier__
  876. )
  877. Component.options.__file = "resources/assets/js/main/components/ImgUpload.vue"
  878. /* hot reload */
  879. if (false) {(function () {
  880. var hotAPI = require("vue-hot-reload-api")
  881. hotAPI.install(require("vue"), false)
  882. if (!hotAPI.compatible) return
  883. module.hot.accept()
  884. if (!module.hot.data) {
  885. hotAPI.createRecord("data-v-55c90fc2", Component.options)
  886. } else {
  887. hotAPI.reload("data-v-55c90fc2", Component.options)
  888. }
  889. module.hot.dispose(function (data) {
  890. disposed = true
  891. })
  892. })()}
  893. module.exports = Component.exports
  894. /***/ }),
  895. /* 18 */
  896. /***/ (function(module, exports, __webpack_require__) {
  897. var root = __webpack_require__(3);
  898. /** Built-in value references. */
  899. var Symbol = root.Symbol;
  900. module.exports = Symbol;
  901. /***/ }),
  902. /* 19 */
  903. /***/ (function(module, exports, __webpack_require__) {
  904. var arrayLikeKeys = __webpack_require__(43),
  905. baseKeys = __webpack_require__(181),
  906. isArrayLike = __webpack_require__(32);
  907. /**
  908. * Creates an array of the own enumerable property names of `object`.
  909. *
  910. * **Note:** Non-object values are coerced to objects. See the
  911. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  912. * for more details.
  913. *
  914. * @static
  915. * @since 0.1.0
  916. * @memberOf _
  917. * @category Object
  918. * @param {Object} object The object to query.
  919. * @returns {Array} Returns the array of property names.
  920. * @example
  921. *
  922. * function Foo() {
  923. * this.a = 1;
  924. * this.b = 2;
  925. * }
  926. *
  927. * Foo.prototype.c = 3;
  928. *
  929. * _.keys(new Foo);
  930. * // => ['a', 'b'] (iteration order is not guaranteed)
  931. *
  932. * _.keys('hi');
  933. * // => ['0', '1']
  934. */
  935. function keys(object) {
  936. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  937. }
  938. module.exports = keys;
  939. /***/ }),
  940. /* 20 */
  941. /***/ (function(module, exports) {
  942. /**
  943. * The base implementation of `_.unary` without support for storing metadata.
  944. *
  945. * @private
  946. * @param {Function} func The function to cap arguments for.
  947. * @returns {Function} Returns the new capped function.
  948. */
  949. function baseUnary(func) {
  950. return function(value) {
  951. return func(value);
  952. };
  953. }
  954. module.exports = baseUnary;
  955. /***/ }),
  956. /* 21 */
  957. /***/ (function(module, exports, __webpack_require__) {
  958. var DataView = __webpack_require__(183),
  959. Map = __webpack_require__(23),
  960. Promise = __webpack_require__(184),
  961. Set = __webpack_require__(185),
  962. WeakMap = __webpack_require__(186),
  963. baseGetTag = __webpack_require__(10),
  964. toSource = __webpack_require__(39);
  965. /** `Object#toString` result references. */
  966. var mapTag = '[object Map]',
  967. objectTag = '[object Object]',
  968. promiseTag = '[object Promise]',
  969. setTag = '[object Set]',
  970. weakMapTag = '[object WeakMap]';
  971. var dataViewTag = '[object DataView]';
  972. /** Used to detect maps, sets, and weakmaps. */
  973. var dataViewCtorString = toSource(DataView),
  974. mapCtorString = toSource(Map),
  975. promiseCtorString = toSource(Promise),
  976. setCtorString = toSource(Set),
  977. weakMapCtorString = toSource(WeakMap);
  978. /**
  979. * Gets the `toStringTag` of `value`.
  980. *
  981. * @private
  982. * @param {*} value The value to query.
  983. * @returns {string} Returns the `toStringTag`.
  984. */
  985. var getTag = baseGetTag;
  986. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  987. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  988. (Map && getTag(new Map) != mapTag) ||
  989. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  990. (Set && getTag(new Set) != setTag) ||
  991. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  992. getTag = function(value) {
  993. var result = baseGetTag(value),
  994. Ctor = result == objectTag ? value.constructor : undefined,
  995. ctorString = Ctor ? toSource(Ctor) : '';
  996. if (ctorString) {
  997. switch (ctorString) {
  998. case dataViewCtorString: return dataViewTag;
  999. case mapCtorString: return mapTag;
  1000. case promiseCtorString: return promiseTag;
  1001. case setCtorString: return setTag;
  1002. case weakMapCtorString: return weakMapTag;
  1003. }
  1004. }
  1005. return result;
  1006. };
  1007. }
  1008. module.exports = getTag;
  1009. /***/ }),
  1010. /* 22 */
  1011. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1012. "use strict";
  1013. /* harmony export (immutable) */ __webpack_exports__["e"] = oneOf;
  1014. /* unused harmony export camelcaseToHyphen */
  1015. /* harmony export (immutable) */ __webpack_exports__["d"] = getScrollBarSize;
  1016. /* unused harmony export getStyle */
  1017. /* unused harmony export firstUpperCase */
  1018. /* unused harmony export warnProp */
  1019. /* unused harmony export deepCopy */
  1020. /* unused harmony export scrollTop */
  1021. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return findComponentUpward; });
  1022. /* unused harmony export findComponentDownward */
  1023. /* unused harmony export findComponentsDownward */
  1024. /* harmony export (immutable) */ __webpack_exports__["c"] = findComponentsUpward;
  1025. /* harmony export (immutable) */ __webpack_exports__["a"] = findBrothersComponents;
  1026. /* unused harmony export hasClass */
  1027. /* unused harmony export addClass */
  1028. /* unused harmony export removeClass */
  1029. /* unused harmony export setMatchMedia */
  1030. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(4);
  1031. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__);
  1032. const isServer = __WEBPACK_IMPORTED_MODULE_0_vue___default.a.prototype.$isServer;
  1033. // 判断参数是否是其中之一
  1034. function oneOf (value, validList) {
  1035. for (let i = 0; i < validList.length; i++) {
  1036. if (value === validList[i]) {
  1037. return true;
  1038. }
  1039. }
  1040. return false;
  1041. }
  1042. function camelcaseToHyphen (str) {
  1043. return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
  1044. }
  1045. // For Modal scrollBar hidden
  1046. let cached;
  1047. function getScrollBarSize (fresh) {
  1048. if (isServer) return 0;
  1049. if (fresh || cached === undefined) {
  1050. const inner = document.createElement('div');
  1051. inner.style.width = '100%';
  1052. inner.style.height = '200px';
  1053. const outer = document.createElement('div');
  1054. const outerStyle = outer.style;
  1055. outerStyle.position = 'absolute';
  1056. outerStyle.top = 0;
  1057. outerStyle.left = 0;
  1058. outerStyle.pointerEvents = 'none';
  1059. outerStyle.visibility = 'hidden';
  1060. outerStyle.width = '200px';
  1061. outerStyle.height = '150px';
  1062. outerStyle.overflow = 'hidden';
  1063. outer.appendChild(inner);
  1064. document.body.appendChild(outer);
  1065. const widthContained = inner.offsetWidth;
  1066. outer.style.overflow = 'scroll';
  1067. let widthScroll = inner.offsetWidth;
  1068. if (widthContained === widthScroll) {
  1069. widthScroll = outer.clientWidth;
  1070. }
  1071. document.body.removeChild(outer);
  1072. cached = widthContained - widthScroll;
  1073. }
  1074. return cached;
  1075. }
  1076. // watch DOM change
  1077. const MutationObserver = isServer ? false : window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver || false;
  1078. /* unused harmony export MutationObserver */
  1079. const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
  1080. const MOZ_HACK_REGEXP = /^moz([A-Z])/;
  1081. function camelCase(name) {
  1082. return name.replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
  1083. return offset ? letter.toUpperCase() : letter;
  1084. }).replace(MOZ_HACK_REGEXP, 'Moz$1');
  1085. }
  1086. // getStyle
  1087. function getStyle (element, styleName) {
  1088. if (!element || !styleName) return null;
  1089. styleName = camelCase(styleName);
  1090. if (styleName === 'float') {
  1091. styleName = 'cssFloat';
  1092. }
  1093. try {
  1094. const computed = document.defaultView.getComputedStyle(element, '');
  1095. return element.style[styleName] || computed ? computed[styleName] : null;
  1096. } catch(e) {
  1097. return element.style[styleName];
  1098. }
  1099. }
  1100. // firstUpperCase
  1101. function firstUpperCase(str) {
  1102. return str.toString()[0].toUpperCase() + str.toString().slice(1);
  1103. }
  1104. // Warn
  1105. function warnProp(component, prop, correctType, wrongType) {
  1106. correctType = firstUpperCase(correctType);
  1107. wrongType = firstUpperCase(wrongType);
  1108. console.error(`[iView warn]: Invalid prop: type check failed for prop ${prop}. Expected ${correctType}, got ${wrongType}. (found in component: ${component})`); // eslint-disable-line
  1109. }
  1110. function typeOf(obj) {
  1111. const toString = Object.prototype.toString;
  1112. const map = {
  1113. '[object Boolean]' : 'boolean',
  1114. '[object Number]' : 'number',
  1115. '[object String]' : 'string',
  1116. '[object Function]' : 'function',
  1117. '[object Array]' : 'array',
  1118. '[object Date]' : 'date',
  1119. '[object RegExp]' : 'regExp',
  1120. '[object Undefined]': 'undefined',
  1121. '[object Null]' : 'null',
  1122. '[object Object]' : 'object'
  1123. };
  1124. return map[toString.call(obj)];
  1125. }
  1126. // deepCopy
  1127. function deepCopy(data) {
  1128. const t = typeOf(data);
  1129. let o;
  1130. if (t === 'array') {
  1131. o = [];
  1132. } else if ( t === 'object') {
  1133. o = {};
  1134. } else {
  1135. return data;
  1136. }
  1137. if (t === 'array') {
  1138. for (let i = 0; i < data.length; i++) {
  1139. o.push(deepCopy(data[i]));
  1140. }
  1141. } else if ( t === 'object') {
  1142. for (let i in data) {
  1143. o[i] = deepCopy(data[i]);
  1144. }
  1145. }
  1146. return o;
  1147. }
  1148. // scrollTop animation
  1149. function scrollTop(el, from = 0, to, duration = 500, endCallback) {
  1150. if (!window.requestAnimationFrame) {
  1151. window.requestAnimationFrame = (
  1152. window.webkitRequestAnimationFrame ||
  1153. window.mozRequestAnimationFrame ||
  1154. window.msRequestAnimationFrame ||
  1155. function (callback) {
  1156. return window.setTimeout(callback, 1000/60);
  1157. }
  1158. );
  1159. }
  1160. const difference = Math.abs(from - to);
  1161. const step = Math.ceil(difference / duration * 50);
  1162. function scroll(start, end, step) {
  1163. if (start === end) {
  1164. endCallback && endCallback();
  1165. return;
  1166. }
  1167. let d = (start + step > end) ? end : start + step;
  1168. if (start > end) {
  1169. d = (start - step < end) ? end : start - step;
  1170. }
  1171. if (el === window) {
  1172. window.scrollTo(d, d);
  1173. } else {
  1174. el.scrollTop = d;
  1175. }
  1176. window.requestAnimationFrame(() => scroll(d, end, step));
  1177. }
  1178. scroll(from, to, step);
  1179. }
  1180. // Find components upward
  1181. function findComponentUpward (context, componentName, componentNames) {
  1182. if (typeof componentName === 'string') {
  1183. componentNames = [componentName];
  1184. } else {
  1185. componentNames = componentName;
  1186. }
  1187. let parent = context.$parent;
  1188. let name = parent.$options.name;
  1189. while (parent && (!name || componentNames.indexOf(name) < 0)) {
  1190. parent = parent.$parent;
  1191. if (parent) name = parent.$options.name;
  1192. }
  1193. return parent;
  1194. }
  1195. // Find component downward
  1196. function findComponentDownward (context, componentName) {
  1197. const $children = context.$children;
  1198. let children = null;
  1199. if ($children.length) {
  1200. for (const child of $children) {
  1201. const name = child.$options.name;
  1202. if (name === componentName) {
  1203. children = child;
  1204. break;
  1205. } else {
  1206. children = findComponentDownward(child, componentName);
  1207. if (children) break;
  1208. }
  1209. }
  1210. }
  1211. return children;
  1212. }
  1213. // Find components downward
  1214. function findComponentsDownward (context, componentName) {
  1215. return context.$children.reduce((components, child) => {
  1216. if (child.$options.name === componentName) components.push(child);
  1217. const foundChilds = findComponentsDownward(child, componentName);
  1218. return components.concat(foundChilds);
  1219. }, []);
  1220. }
  1221. // Find components upward
  1222. function findComponentsUpward (context, componentName) {
  1223. let parents = [];
  1224. const parent = context.$parent;
  1225. if (parent) {
  1226. if (parent.$options.name === componentName) parents.push(parent);
  1227. return parents.concat(findComponentsUpward(parent, componentName));
  1228. } else {
  1229. return [];
  1230. }
  1231. }
  1232. // Find brothers components
  1233. function findBrothersComponents (context, componentName, exceptMe = true) {
  1234. let res = context.$parent.$children.filter(item => {
  1235. return item.$options.name === componentName;
  1236. });
  1237. let index = res.findIndex(item => item._uid === context._uid);
  1238. if (exceptMe) res.splice(index, 1);
  1239. return res;
  1240. }
  1241. /* istanbul ignore next */
  1242. const trim = function(string) {
  1243. return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
  1244. };
  1245. /* istanbul ignore next */
  1246. function hasClass(el, cls) {
  1247. if (!el || !cls) return false;
  1248. if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
  1249. if (el.classList) {
  1250. return el.classList.contains(cls);
  1251. } else {
  1252. return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
  1253. }
  1254. }
  1255. /* istanbul ignore next */
  1256. function addClass(el, cls) {
  1257. if (!el) return;
  1258. let curClass = el.className;
  1259. const classes = (cls || '').split(' ');
  1260. for (let i = 0, j = classes.length; i < j; i++) {
  1261. const clsName = classes[i];
  1262. if (!clsName) continue;
  1263. if (el.classList) {
  1264. el.classList.add(clsName);
  1265. } else {
  1266. if (!hasClass(el, clsName)) {
  1267. curClass += ' ' + clsName;
  1268. }
  1269. }
  1270. }
  1271. if (!el.classList) {
  1272. el.className = curClass;
  1273. }
  1274. }
  1275. /* istanbul ignore next */
  1276. function removeClass(el, cls) {
  1277. if (!el || !cls) return;
  1278. const classes = cls.split(' ');
  1279. let curClass = ' ' + el.className + ' ';
  1280. for (let i = 0, j = classes.length; i < j; i++) {
  1281. const clsName = classes[i];
  1282. if (!clsName) continue;
  1283. if (el.classList) {
  1284. el.classList.remove(clsName);
  1285. } else {
  1286. if (hasClass(el, clsName)) {
  1287. curClass = curClass.replace(' ' + clsName + ' ', ' ');
  1288. }
  1289. }
  1290. }
  1291. if (!el.classList) {
  1292. el.className = trim(curClass);
  1293. }
  1294. }
  1295. const dimensionMap = {
  1296. xs: '480px',
  1297. sm: '576px',
  1298. md: '768px',
  1299. lg: '992px',
  1300. xl: '1200px',
  1301. xxl: '1600px',
  1302. };
  1303. /* unused harmony export dimensionMap */
  1304. function setMatchMedia () {
  1305. if (typeof window !== 'undefined') {
  1306. const matchMediaPolyfill = mediaQuery => {
  1307. return {
  1308. media: mediaQuery,
  1309. matches: false,
  1310. on() {},
  1311. off() {},
  1312. };
  1313. };
  1314. window.matchMedia = window.matchMedia || matchMediaPolyfill;
  1315. }
  1316. }
  1317. const sharpMatcherRegx = /#([^#]+)$/;
  1318. /* unused harmony export sharpMatcherRegx */
  1319. /***/ }),
  1320. /* 23 */
  1321. /***/ (function(module, exports, __webpack_require__) {
  1322. var getNative = __webpack_require__(5),
  1323. root = __webpack_require__(3);
  1324. /* Built-in method references that are verified to be native. */
  1325. var Map = getNative(root, 'Map');
  1326. module.exports = Map;
  1327. /***/ }),
  1328. /* 24 */
  1329. /***/ (function(module, exports, __webpack_require__) {
  1330. var arrayFilter = __webpack_require__(176),
  1331. stubArray = __webpack_require__(42);
  1332. /** Used for built-in method references. */
  1333. var objectProto = Object.prototype;
  1334. /** Built-in value references. */
  1335. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  1336. /* Built-in method references for those with the same name as other `lodash` methods. */
  1337. var nativeGetSymbols = Object.getOwnPropertySymbols;
  1338. /**
  1339. * Creates an array of the own enumerable symbols of `object`.
  1340. *
  1341. * @private
  1342. * @param {Object} object The object to query.
  1343. * @returns {Array} Returns the array of symbols.
  1344. */
  1345. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  1346. if (object == null) {
  1347. return [];
  1348. }
  1349. object = Object(object);
  1350. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  1351. return propertyIsEnumerable.call(object, symbol);
  1352. });
  1353. };
  1354. module.exports = getSymbols;
  1355. /***/ }),
  1356. /* 25 */
  1357. /***/ (function(module, exports) {
  1358. module.exports = function(module) {
  1359. if(!module.webpackPolyfill) {
  1360. module.deprecate = function() {};
  1361. module.paths = [];
  1362. // module.parent = undefined by default
  1363. if(!module.children) module.children = [];
  1364. Object.defineProperty(module, "loaded", {
  1365. enumerable: true,
  1366. get: function() {
  1367. return module.l;
  1368. }
  1369. });
  1370. Object.defineProperty(module, "id", {
  1371. enumerable: true,
  1372. get: function() {
  1373. return module.i;
  1374. }
  1375. });
  1376. module.webpackPolyfill = 1;
  1377. }
  1378. return module;
  1379. };
  1380. /***/ }),
  1381. /* 26 */
  1382. /***/ (function(module, exports, __webpack_require__) {
  1383. /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(37);
  1384. /** Detect free variable `exports`. */
  1385. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  1386. /** Detect free variable `module`. */
  1387. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  1388. /** Detect the popular CommonJS extension `module.exports`. */
  1389. var moduleExports = freeModule && freeModule.exports === freeExports;
  1390. /** Detect free variable `process` from Node.js. */
  1391. var freeProcess = moduleExports && freeGlobal.process;
  1392. /** Used to access faster Node.js helpers. */
  1393. var nodeUtil = (function() {
  1394. try {
  1395. // Use `util.types` for Node.js 10+.
  1396. var types = freeModule && freeModule.require && freeModule.require('util').types;
  1397. if (types) {
  1398. return types;
  1399. }
  1400. // Legacy `process.binding('util')` for Node.js < 10.
  1401. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  1402. } catch (e) {}
  1403. }());
  1404. module.exports = nodeUtil;
  1405. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(25)(module)))
  1406. /***/ }),
  1407. /* 27 */
  1408. /***/ (function(module, exports) {
  1409. /** Used for built-in method references. */
  1410. var objectProto = Object.prototype;
  1411. /**
  1412. * Checks if `value` is likely a prototype object.
  1413. *
  1414. * @private
  1415. * @param {*} value The value to check.
  1416. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  1417. */
  1418. function isPrototype(value) {
  1419. var Ctor = value && value.constructor,
  1420. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  1421. return value === proto;
  1422. }
  1423. module.exports = isPrototype;
  1424. /***/ }),
  1425. /* 28 */
  1426. /***/ (function(module, exports, __webpack_require__) {
  1427. var arrayLikeKeys = __webpack_require__(43),
  1428. baseKeysIn = __webpack_require__(249),
  1429. isArrayLike = __webpack_require__(32);
  1430. /**
  1431. * Creates an array of the own and inherited enumerable property names of `object`.
  1432. *
  1433. * **Note:** Non-object values are coerced to objects.
  1434. *
  1435. * @static
  1436. * @memberOf _
  1437. * @since 3.0.0
  1438. * @category Object
  1439. * @param {Object} object The object to query.
  1440. * @returns {Array} Returns the array of property names.
  1441. * @example
  1442. *
  1443. * function Foo() {
  1444. * this.a = 1;
  1445. * this.b = 2;
  1446. * }
  1447. *
  1448. * Foo.prototype.c = 3;
  1449. *
  1450. * _.keysIn(new Foo);
  1451. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  1452. */
  1453. function keysIn(object) {
  1454. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  1455. }
  1456. module.exports = keysIn;
  1457. /***/ }),
  1458. /* 29 */
  1459. /***/ (function(module, exports, __webpack_require__) {
  1460. var Uint8Array = __webpack_require__(59);
  1461. /**
  1462. * Creates a clone of `arrayBuffer`.
  1463. *
  1464. * @private
  1465. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  1466. * @returns {ArrayBuffer} Returns the cloned array buffer.
  1467. */
  1468. function cloneArrayBuffer(arrayBuffer) {
  1469. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  1470. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  1471. return result;
  1472. }
  1473. module.exports = cloneArrayBuffer;
  1474. /***/ }),
  1475. /* 30 */
  1476. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1477. "use strict";
  1478. /* harmony default export */ __webpack_exports__["a"] = ({
  1479. methods: {
  1480. taskComplete: function taskComplete(taskDetail) {
  1481. var _this = this;
  1482. var complete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  1483. if (taskDetail['loadIng'] === true) {
  1484. return;
  1485. }
  1486. this.$set(taskDetail, 'loadIng', true);
  1487. this.$set(taskDetail, 'complete', !!complete);
  1488. $A.apiAjax({
  1489. url: 'project/task/edit',
  1490. method: 'post',
  1491. data: {
  1492. act: complete ? 'complete' : 'unfinished',
  1493. taskid: taskDetail.id
  1494. },
  1495. complete: function complete() {
  1496. _this.$set(taskDetail, 'loadIng', false);
  1497. },
  1498. error: function error() {
  1499. _this.$set(taskDetail, 'complete', !complete);
  1500. alert(_this.$L('网络繁忙,请稍后再试!'));
  1501. },
  1502. success: function success(res) {
  1503. if (res.ret === 1) {
  1504. _this.$Message.success(res.msg);
  1505. $A.triggerTaskInfoListener(complete ? 'complete' : 'unfinished', res.data);
  1506. $A.triggerTaskInfoChange(taskDetail.id);
  1507. } else {
  1508. _this.$set(taskDetail, 'complete', !complete);
  1509. _this.$Modal.error({ title: _this.$L('温馨提示'), content: res.msg });
  1510. }
  1511. }
  1512. });
  1513. },
  1514. renderTaskTitle: function renderTaskTitle(h, params) {
  1515. var _this2 = this;
  1516. return h('div', [h('Icon', {
  1517. props: { type: params.row.complete ? 'md-checkbox-outline' : 'md-square-outline' },
  1518. style: { marginRight: '4px', cursor: 'pointer', fontSize: '15px' },
  1519. on: {
  1520. click: function click() {
  1521. _this2.taskComplete(params.row, !params.row.complete);
  1522. }
  1523. }
  1524. }), h('span', {
  1525. style: { cursor: 'pointer', textDecoration: params.row.complete ? 'line-through' : '' },
  1526. on: {
  1527. click: function click() {
  1528. _this2.taskDetail(params.row);
  1529. }
  1530. }
  1531. }, params.row.title)]);
  1532. }
  1533. }
  1534. });
  1535. /***/ }),
  1536. /* 31 */
  1537. /***/ (function(module, exports, __webpack_require__) {
  1538. /* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
  1539. (typeof self !== "undefined" && self) ||
  1540. window;
  1541. var apply = Function.prototype.apply;
  1542. // DOM APIs, for completeness
  1543. exports.setTimeout = function() {
  1544. return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
  1545. };
  1546. exports.setInterval = function() {
  1547. return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
  1548. };
  1549. exports.clearTimeout =
  1550. exports.clearInterval = function(timeout) {
  1551. if (timeout) {
  1552. timeout.close();
  1553. }
  1554. };
  1555. function Timeout(id, clearFn) {
  1556. this._id = id;
  1557. this._clearFn = clearFn;
  1558. }
  1559. Timeout.prototype.unref = Timeout.prototype.ref = function() {};
  1560. Timeout.prototype.close = function() {
  1561. this._clearFn.call(scope, this._id);
  1562. };
  1563. // Does not start the time, just sets up the members needed.
  1564. exports.enroll = function(item, msecs) {
  1565. clearTimeout(item._idleTimeoutId);
  1566. item._idleTimeout = msecs;
  1567. };
  1568. exports.unenroll = function(item) {
  1569. clearTimeout(item._idleTimeoutId);
  1570. item._idleTimeout = -1;
  1571. };
  1572. exports._unrefActive = exports.active = function(item) {
  1573. clearTimeout(item._idleTimeoutId);
  1574. var msecs = item._idleTimeout;
  1575. if (msecs >= 0) {
  1576. item._idleTimeoutId = setTimeout(function onTimeout() {
  1577. if (item._onTimeout)
  1578. item._onTimeout();
  1579. }, msecs);
  1580. }
  1581. };
  1582. // setimmediate attaches itself to the global object
  1583. __webpack_require__(68);
  1584. // On some exotic environments, it's not clear which object `setimmediate` was
  1585. // able to install onto. Search each possibility in the same order as the
  1586. // `setimmediate` library.
  1587. exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
  1588. (typeof global !== "undefined" && global.setImmediate) ||
  1589. (this && this.setImmediate);
  1590. exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
  1591. (typeof global !== "undefined" && global.clearImmediate) ||
  1592. (this && this.clearImmediate);
  1593. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
  1594. /***/ }),
  1595. /* 32 */
  1596. /***/ (function(module, exports, __webpack_require__) {
  1597. var isFunction = __webpack_require__(38),
  1598. isLength = __webpack_require__(35);
  1599. /**
  1600. * Checks if `value` is array-like. A value is considered array-like if it's
  1601. * not a function and has a `value.length` that's an integer greater than or
  1602. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  1603. *
  1604. * @static
  1605. * @memberOf _
  1606. * @since 4.0.0
  1607. * @category Lang
  1608. * @param {*} value The value to check.
  1609. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  1610. * @example
  1611. *
  1612. * _.isArrayLike([1, 2, 3]);
  1613. * // => true
  1614. *
  1615. * _.isArrayLike(document.body.children);
  1616. * // => true
  1617. *
  1618. * _.isArrayLike('abc');
  1619. * // => true
  1620. *
  1621. * _.isArrayLike(_.noop);
  1622. * // => false
  1623. */
  1624. function isArrayLike(value) {
  1625. return value != null && isLength(value.length) && !isFunction(value);
  1626. }
  1627. module.exports = isArrayLike;
  1628. /***/ }),
  1629. /* 33 */
  1630. /***/ (function(module, exports) {
  1631. /**
  1632. * Performs a
  1633. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  1634. * comparison between two values to determine if they are equivalent.
  1635. *
  1636. * @static
  1637. * @memberOf _
  1638. * @since 4.0.0
  1639. * @category Lang
  1640. * @param {*} value The value to compare.
  1641. * @param {*} other The other value to compare.
  1642. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  1643. * @example
  1644. *
  1645. * var object = { 'a': 1 };
  1646. * var other = { 'a': 1 };
  1647. *
  1648. * _.eq(object, object);
  1649. * // => true
  1650. *
  1651. * _.eq(object, other);
  1652. * // => false
  1653. *
  1654. * _.eq('a', 'a');
  1655. * // => true
  1656. *
  1657. * _.eq('a', Object('a'));
  1658. * // => false
  1659. *
  1660. * _.eq(NaN, NaN);
  1661. * // => true
  1662. */
  1663. function eq(value, other) {
  1664. return value === other || (value !== value && other !== other);
  1665. }
  1666. module.exports = eq;
  1667. /***/ }),
  1668. /* 34 */
  1669. /***/ (function(module, exports, __webpack_require__) {
  1670. /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(3),
  1671. stubFalse = __webpack_require__(179);
  1672. /** Detect free variable `exports`. */
  1673. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  1674. /** Detect free variable `module`. */
  1675. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  1676. /** Detect the popular CommonJS extension `module.exports`. */
  1677. var moduleExports = freeModule && freeModule.exports === freeExports;
  1678. /** Built-in value references. */
  1679. var Buffer = moduleExports ? root.Buffer : undefined;
  1680. /* Built-in method references for those with the same name as other `lodash` methods. */
  1681. var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
  1682. /**
  1683. * Checks if `value` is a buffer.
  1684. *
  1685. * @static
  1686. * @memberOf _
  1687. * @since 4.3.0
  1688. * @category Lang
  1689. * @param {*} value The value to check.
  1690. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  1691. * @example
  1692. *
  1693. * _.isBuffer(new Buffer(2));
  1694. * // => true
  1695. *
  1696. * _.isBuffer(new Uint8Array(2));
  1697. * // => false
  1698. */
  1699. var isBuffer = nativeIsBuffer || stubFalse;
  1700. module.exports = isBuffer;
  1701. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(25)(module)))
  1702. /***/ }),
  1703. /* 35 */
  1704. /***/ (function(module, exports) {
  1705. /** Used as references for various `Number` constants. */
  1706. var MAX_SAFE_INTEGER = 9007199254740991;
  1707. /**
  1708. * Checks if `value` is a valid array-like length.
  1709. *
  1710. * **Note:** This method is loosely based on
  1711. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  1712. *
  1713. * @static
  1714. * @memberOf _
  1715. * @since 4.0.0
  1716. * @category Lang
  1717. * @param {*} value The value to check.
  1718. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  1719. * @example
  1720. *
  1721. * _.isLength(3);
  1722. * // => true
  1723. *
  1724. * _.isLength(Number.MIN_VALUE);
  1725. * // => false
  1726. *
  1727. * _.isLength(Infinity);
  1728. * // => false
  1729. *
  1730. * _.isLength('3');
  1731. * // => false
  1732. */
  1733. function isLength(value) {
  1734. return typeof value == 'number' &&
  1735. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  1736. }
  1737. module.exports = isLength;
  1738. /***/ }),
  1739. /* 36 */
  1740. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1741. "use strict";
  1742. function broadcast(componentName, eventName, params) {
  1743. this.$children.forEach(child => {
  1744. const name = child.$options.name;
  1745. if (name === componentName) {
  1746. child.$emit.apply(child, [eventName].concat(params));
  1747. } else {
  1748. // todo 如果 params 是空数组,接收到的会是 undefined
  1749. broadcast.apply(child, [componentName, eventName].concat([params]));
  1750. }
  1751. });
  1752. }
  1753. /* harmony default export */ __webpack_exports__["a"] = ({
  1754. methods: {
  1755. dispatch(componentName, eventName, params) {
  1756. let parent = this.$parent || this.$root;
  1757. let name = parent.$options.name;
  1758. while (parent && (!name || name !== componentName)) {
  1759. parent = parent.$parent;
  1760. if (parent) {
  1761. name = parent.$options.name;
  1762. }
  1763. }
  1764. if (parent) {
  1765. parent.$emit.apply(parent, [eventName].concat(params));
  1766. }
  1767. },
  1768. broadcast(componentName, eventName, params) {
  1769. broadcast.call(this, componentName, eventName, params);
  1770. }
  1771. }
  1772. });
  1773. /***/ }),
  1774. /* 37 */
  1775. /***/ (function(module, exports, __webpack_require__) {
  1776. /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
  1777. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  1778. module.exports = freeGlobal;
  1779. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
  1780. /***/ }),
  1781. /* 38 */
  1782. /***/ (function(module, exports, __webpack_require__) {
  1783. var baseGetTag = __webpack_require__(10),
  1784. isObject = __webpack_require__(9);
  1785. /** `Object#toString` result references. */
  1786. var asyncTag = '[object AsyncFunction]',
  1787. funcTag = '[object Function]',
  1788. genTag = '[object GeneratorFunction]',
  1789. proxyTag = '[object Proxy]';
  1790. /**
  1791. * Checks if `value` is classified as a `Function` object.
  1792. *
  1793. * @static
  1794. * @memberOf _
  1795. * @since 0.1.0
  1796. * @category Lang
  1797. * @param {*} value The value to check.
  1798. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  1799. * @example
  1800. *
  1801. * _.isFunction(_);
  1802. * // => true
  1803. *
  1804. * _.isFunction(/abc/);
  1805. * // => false
  1806. */
  1807. function isFunction(value) {
  1808. if (!isObject(value)) {
  1809. return false;
  1810. }
  1811. // The use of `Object#toString` avoids issues with the `typeof` operator
  1812. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  1813. var tag = baseGetTag(value);
  1814. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  1815. }
  1816. module.exports = isFunction;
  1817. /***/ }),
  1818. /* 39 */
  1819. /***/ (function(module, exports) {
  1820. /** Used for built-in method references. */
  1821. var funcProto = Function.prototype;
  1822. /** Used to resolve the decompiled source of functions. */
  1823. var funcToString = funcProto.toString;
  1824. /**
  1825. * Converts `func` to its source code.
  1826. *
  1827. * @private
  1828. * @param {Function} func The function to convert.
  1829. * @returns {string} Returns the source code.
  1830. */
  1831. function toSource(func) {
  1832. if (func != null) {
  1833. try {
  1834. return funcToString.call(func);
  1835. } catch (e) {}
  1836. try {
  1837. return (func + '');
  1838. } catch (e) {}
  1839. }
  1840. return '';
  1841. }
  1842. module.exports = toSource;
  1843. /***/ }),
  1844. /* 40 */
  1845. /***/ (function(module, exports, __webpack_require__) {
  1846. var arrayPush = __webpack_require__(41),
  1847. isArray = __webpack_require__(16);
  1848. /**
  1849. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  1850. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  1851. * symbols of `object`.
  1852. *
  1853. * @private
  1854. * @param {Object} object The object to query.
  1855. * @param {Function} keysFunc The function to get the keys of `object`.
  1856. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  1857. * @returns {Array} Returns the array of property names and symbols.
  1858. */
  1859. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  1860. var result = keysFunc(object);
  1861. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  1862. }
  1863. module.exports = baseGetAllKeys;
  1864. /***/ }),
  1865. /* 41 */
  1866. /***/ (function(module, exports) {
  1867. /**
  1868. * Appends the elements of `values` to `array`.
  1869. *
  1870. * @private
  1871. * @param {Array} array The array to modify.
  1872. * @param {Array} values The values to append.
  1873. * @returns {Array} Returns `array`.
  1874. */
  1875. function arrayPush(array, values) {
  1876. var index = -1,
  1877. length = values.length,
  1878. offset = array.length;
  1879. while (++index < length) {
  1880. array[offset + index] = values[index];
  1881. }
  1882. return array;
  1883. }
  1884. module.exports = arrayPush;
  1885. /***/ }),
  1886. /* 42 */
  1887. /***/ (function(module, exports) {
  1888. /**
  1889. * This method returns a new empty array.
  1890. *
  1891. * @static
  1892. * @memberOf _
  1893. * @since 4.13.0
  1894. * @category Util
  1895. * @returns {Array} Returns the new empty array.
  1896. * @example
  1897. *
  1898. * var arrays = _.times(2, _.stubArray);
  1899. *
  1900. * console.log(arrays);
  1901. * // => [[], []]
  1902. *
  1903. * console.log(arrays[0] === arrays[1]);
  1904. * // => false
  1905. */
  1906. function stubArray() {
  1907. return [];
  1908. }
  1909. module.exports = stubArray;
  1910. /***/ }),
  1911. /* 43 */
  1912. /***/ (function(module, exports, __webpack_require__) {
  1913. var baseTimes = __webpack_require__(177),
  1914. isArguments = __webpack_require__(61),
  1915. isArray = __webpack_require__(16),
  1916. isBuffer = __webpack_require__(34),
  1917. isIndex = __webpack_require__(62),
  1918. isTypedArray = __webpack_require__(63);
  1919. /** Used for built-in method references. */
  1920. var objectProto = Object.prototype;
  1921. /** Used to check objects for own properties. */
  1922. var hasOwnProperty = objectProto.hasOwnProperty;
  1923. /**
  1924. * Creates an array of the enumerable property names of the array-like `value`.
  1925. *
  1926. * @private
  1927. * @param {*} value The value to query.
  1928. * @param {boolean} inherited Specify returning inherited property names.
  1929. * @returns {Array} Returns the array of property names.
  1930. */
  1931. function arrayLikeKeys(value, inherited) {
  1932. var isArr = isArray(value),
  1933. isArg = !isArr && isArguments(value),
  1934. isBuff = !isArr && !isArg && isBuffer(value),
  1935. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  1936. skipIndexes = isArr || isArg || isBuff || isType,
  1937. result = skipIndexes ? baseTimes(value.length, String) : [],
  1938. length = result.length;
  1939. for (var key in value) {
  1940. if ((inherited || hasOwnProperty.call(value, key)) &&
  1941. !(skipIndexes && (
  1942. // Safari 9 has enumerable `arguments.length` in strict mode.
  1943. key == 'length' ||
  1944. // Node.js 0.10 has enumerable non-index properties on buffers.
  1945. (isBuff && (key == 'offset' || key == 'parent')) ||
  1946. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  1947. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  1948. // Skip index properties.
  1949. isIndex(key, length)
  1950. ))) {
  1951. result.push(key);
  1952. }
  1953. }
  1954. return result;
  1955. }
  1956. module.exports = arrayLikeKeys;
  1957. /***/ }),
  1958. /* 44 */
  1959. /***/ (function(module, exports) {
  1960. /**
  1961. * Creates a unary function that invokes `func` with its argument transformed.
  1962. *
  1963. * @private
  1964. * @param {Function} func The function to wrap.
  1965. * @param {Function} transform The argument transform.
  1966. * @returns {Function} Returns the new function.
  1967. */
  1968. function overArg(func, transform) {
  1969. return function(arg) {
  1970. return func(transform(arg));
  1971. };
  1972. }
  1973. module.exports = overArg;
  1974. /***/ }),
  1975. /* 45 */
  1976. /***/ (function(module, exports, __webpack_require__) {
  1977. var baseAssignValue = __webpack_require__(46),
  1978. eq = __webpack_require__(33);
  1979. /** Used for built-in method references. */
  1980. var objectProto = Object.prototype;
  1981. /** Used to check objects for own properties. */
  1982. var hasOwnProperty = objectProto.hasOwnProperty;
  1983. /**
  1984. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  1985. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  1986. * for equality comparisons.
  1987. *
  1988. * @private
  1989. * @param {Object} object The object to modify.
  1990. * @param {string} key The key of the property to assign.
  1991. * @param {*} value The value to assign.
  1992. */
  1993. function assignValue(object, key, value) {
  1994. var objValue = object[key];
  1995. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  1996. (value === undefined && !(key in object))) {
  1997. baseAssignValue(object, key, value);
  1998. }
  1999. }
  2000. module.exports = assignValue;
  2001. /***/ }),
  2002. /* 46 */
  2003. /***/ (function(module, exports, __webpack_require__) {
  2004. var defineProperty = __webpack_require__(246);
  2005. /**
  2006. * The base implementation of `assignValue` and `assignMergeValue` without
  2007. * value checks.
  2008. *
  2009. * @private
  2010. * @param {Object} object The object to modify.
  2011. * @param {string} key The key of the property to assign.
  2012. * @param {*} value The value to assign.
  2013. */
  2014. function baseAssignValue(object, key, value) {
  2015. if (key == '__proto__' && defineProperty) {
  2016. defineProperty(object, key, {
  2017. 'configurable': true,
  2018. 'enumerable': true,
  2019. 'value': value,
  2020. 'writable': true
  2021. });
  2022. } else {
  2023. object[key] = value;
  2024. }
  2025. }
  2026. module.exports = baseAssignValue;
  2027. /***/ }),
  2028. /* 47 */
  2029. /***/ (function(module, exports, __webpack_require__) {
  2030. var arrayPush = __webpack_require__(41),
  2031. getPrototype = __webpack_require__(48),
  2032. getSymbols = __webpack_require__(24),
  2033. stubArray = __webpack_require__(42);
  2034. /* Built-in method references for those with the same name as other `lodash` methods. */
  2035. var nativeGetSymbols = Object.getOwnPropertySymbols;
  2036. /**
  2037. * Creates an array of the own and inherited enumerable symbols of `object`.
  2038. *
  2039. * @private
  2040. * @param {Object} object The object to query.
  2041. * @returns {Array} Returns the array of symbols.
  2042. */
  2043. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  2044. var result = [];
  2045. while (object) {
  2046. arrayPush(result, getSymbols(object));
  2047. object = getPrototype(object);
  2048. }
  2049. return result;
  2050. };
  2051. module.exports = getSymbolsIn;
  2052. /***/ }),
  2053. /* 48 */
  2054. /***/ (function(module, exports, __webpack_require__) {
  2055. var overArg = __webpack_require__(44);
  2056. /** Built-in value references. */
  2057. var getPrototype = overArg(Object.getPrototypeOf, Object);
  2058. module.exports = getPrototype;
  2059. /***/ }),
  2060. /* 49 */
  2061. /***/ (function(module, exports, __webpack_require__) {
  2062. var disposed = false
  2063. var normalizeComponent = __webpack_require__(2)
  2064. /* script */
  2065. var __vue_script__ = __webpack_require__(125)
  2066. /* template */
  2067. var __vue_template__ = __webpack_require__(133)
  2068. /* template functional */
  2069. var __vue_template_functional__ = false
  2070. /* styles */
  2071. var __vue_styles__ = null
  2072. /* scopeId */
  2073. var __vue_scopeId__ = null
  2074. /* moduleIdentifier (server only) */
  2075. var __vue_module_identifier__ = null
  2076. var Component = normalizeComponent(
  2077. __vue_script__,
  2078. __vue_template__,
  2079. __vue_template_functional__,
  2080. __vue_styles__,
  2081. __vue_scopeId__,
  2082. __vue_module_identifier__
  2083. )
  2084. Component.options.__file = "resources/assets/js/main/components/iview/WDrawer.vue"
  2085. /* hot reload */
  2086. if (false) {(function () {
  2087. var hotAPI = require("vue-hot-reload-api")
  2088. hotAPI.install(require("vue"), false)
  2089. if (!hotAPI.compatible) return
  2090. module.hot.accept()
  2091. if (!module.hot.data) {
  2092. hotAPI.createRecord("data-v-37c31742", Component.options)
  2093. } else {
  2094. hotAPI.reload("data-v-37c31742", Component.options)
  2095. }
  2096. module.hot.dispose(function (data) {
  2097. disposed = true
  2098. })
  2099. })()}
  2100. module.exports = Component.exports
  2101. /***/ }),
  2102. /* 50 */
  2103. /***/ (function(module, exports, __webpack_require__) {
  2104. /*
  2105. MIT License http://www.opensource.org/licenses/mit-license.php
  2106. Author Tobias Koppers @sokra
  2107. */
  2108. var stylesInDom = {};
  2109. var memoize = function (fn) {
  2110. var memo;
  2111. return function () {
  2112. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  2113. return memo;
  2114. };
  2115. };
  2116. var isOldIE = memoize(function () {
  2117. // Test for IE <= 9 as proposed by Browserhacks
  2118. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  2119. // Tests for existence of standard globals is to allow style-loader
  2120. // to operate correctly into non-standard environments
  2121. // @see https://github.com/webpack-contrib/style-loader/issues/177
  2122. return window && document && document.all && !window.atob;
  2123. });
  2124. var getElement = (function (fn) {
  2125. var memo = {};
  2126. return function(selector) {
  2127. if (typeof memo[selector] === "undefined") {
  2128. memo[selector] = fn.call(this, selector);
  2129. }
  2130. return memo[selector]
  2131. };
  2132. })(function (target) {
  2133. return document.querySelector(target)
  2134. });
  2135. var singleton = null;
  2136. var singletonCounter = 0;
  2137. var stylesInsertedAtTop = [];
  2138. var fixUrls = __webpack_require__(187);
  2139. module.exports = function(list, options) {
  2140. if (typeof DEBUG !== "undefined" && DEBUG) {
  2141. if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  2142. }
  2143. options = options || {};
  2144. options.attrs = typeof options.attrs === "object" ? options.attrs : {};
  2145. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  2146. // tags it will allow on a page
  2147. if (!options.singleton) options.singleton = isOldIE();
  2148. // By default, add <style> tags to the <head> element
  2149. if (!options.insertInto) options.insertInto = "head";
  2150. // By default, add <style> tags to the bottom of the target
  2151. if (!options.insertAt) options.insertAt = "bottom";
  2152. var styles = listToStyles(list, options);
  2153. addStylesToDom(styles, options);
  2154. return function update (newList) {
  2155. var mayRemove = [];
  2156. for (var i = 0; i < styles.length; i++) {
  2157. var item = styles[i];
  2158. var domStyle = stylesInDom[item.id];
  2159. domStyle.refs--;
  2160. mayRemove.push(domStyle);
  2161. }
  2162. if(newList) {
  2163. var newStyles = listToStyles(newList, options);
  2164. addStylesToDom(newStyles, options);
  2165. }
  2166. for (var i = 0; i < mayRemove.length; i++) {
  2167. var domStyle = mayRemove[i];
  2168. if(domStyle.refs === 0) {
  2169. for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
  2170. delete stylesInDom[domStyle.id];
  2171. }
  2172. }
  2173. };
  2174. };
  2175. function addStylesToDom (styles, options) {
  2176. for (var i = 0; i < styles.length; i++) {
  2177. var item = styles[i];
  2178. var domStyle = stylesInDom[item.id];
  2179. if(domStyle) {
  2180. domStyle.refs++;
  2181. for(var j = 0; j < domStyle.parts.length; j++) {
  2182. domStyle.parts[j](item.parts[j]);
  2183. }
  2184. for(; j < item.parts.length; j++) {
  2185. domStyle.parts.push(addStyle(item.parts[j], options));
  2186. }
  2187. } else {
  2188. var parts = [];
  2189. for(var j = 0; j < item.parts.length; j++) {
  2190. parts.push(addStyle(item.parts[j], options));
  2191. }
  2192. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  2193. }
  2194. }
  2195. }
  2196. function listToStyles (list, options) {
  2197. var styles = [];
  2198. var newStyles = {};
  2199. for (var i = 0; i < list.length; i++) {
  2200. var item = list[i];
  2201. var id = options.base ? item[0] + options.base : item[0];
  2202. var css = item[1];
  2203. var media = item[2];
  2204. var sourceMap = item[3];
  2205. var part = {css: css, media: media, sourceMap: sourceMap};
  2206. if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
  2207. else newStyles[id].parts.push(part);
  2208. }
  2209. return styles;
  2210. }
  2211. function insertStyleElement (options, style) {
  2212. var target = getElement(options.insertInto)
  2213. if (!target) {
  2214. throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  2215. }
  2216. var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
  2217. if (options.insertAt === "top") {
  2218. if (!lastStyleElementInsertedAtTop) {
  2219. target.insertBefore(style, target.firstChild);
  2220. } else if (lastStyleElementInsertedAtTop.nextSibling) {
  2221. target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
  2222. } else {
  2223. target.appendChild(style);
  2224. }
  2225. stylesInsertedAtTop.push(style);
  2226. } else if (options.insertAt === "bottom") {
  2227. target.appendChild(style);
  2228. } else {
  2229. throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
  2230. }
  2231. }
  2232. function removeStyleElement (style) {
  2233. if (style.parentNode === null) return false;
  2234. style.parentNode.removeChild(style);
  2235. var idx = stylesInsertedAtTop.indexOf(style);
  2236. if(idx >= 0) {
  2237. stylesInsertedAtTop.splice(idx, 1);
  2238. }
  2239. }
  2240. function createStyleElement (options) {
  2241. var style = document.createElement("style");
  2242. options.attrs.type = "text/css";
  2243. addAttrs(style, options.attrs);
  2244. insertStyleElement(options, style);
  2245. return style;
  2246. }
  2247. function createLinkElement (options) {
  2248. var link = document.createElement("link");
  2249. options.attrs.type = "text/css";
  2250. options.attrs.rel = "stylesheet";
  2251. addAttrs(link, options.attrs);
  2252. insertStyleElement(options, link);
  2253. return link;
  2254. }
  2255. function addAttrs (el, attrs) {
  2256. Object.keys(attrs).forEach(function (key) {
  2257. el.setAttribute(key, attrs[key]);
  2258. });
  2259. }
  2260. function addStyle (obj, options) {
  2261. var style, update, remove, result;
  2262. // If a transform function was defined, run it on the css
  2263. if (options.transform && obj.css) {
  2264. result = options.transform(obj.css);
  2265. if (result) {
  2266. // If transform returns a value, use that instead of the original css.
  2267. // This allows running runtime transformations on the css.
  2268. obj.css = result;
  2269. } else {
  2270. // If the transform function returns a falsy value, don't add this css.
  2271. // This allows conditional loading of css
  2272. return function() {
  2273. // noop
  2274. };
  2275. }
  2276. }
  2277. if (options.singleton) {
  2278. var styleIndex = singletonCounter++;
  2279. style = singleton || (singleton = createStyleElement(options));
  2280. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  2281. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  2282. } else if (
  2283. obj.sourceMap &&
  2284. typeof URL === "function" &&
  2285. typeof URL.createObjectURL === "function" &&
  2286. typeof URL.revokeObjectURL === "function" &&
  2287. typeof Blob === "function" &&
  2288. typeof btoa === "function"
  2289. ) {
  2290. style = createLinkElement(options);
  2291. update = updateLink.bind(null, style, options);
  2292. remove = function () {
  2293. removeStyleElement(style);
  2294. if(style.href) URL.revokeObjectURL(style.href);
  2295. };
  2296. } else {
  2297. style = createStyleElement(options);
  2298. update = applyToTag.bind(null, style);
  2299. remove = function () {
  2300. removeStyleElement(style);
  2301. };
  2302. }
  2303. update(obj);
  2304. return function updateStyle (newObj) {
  2305. if (newObj) {
  2306. if (
  2307. newObj.css === obj.css &&
  2308. newObj.media === obj.media &&
  2309. newObj.sourceMap === obj.sourceMap
  2310. ) {
  2311. return;
  2312. }
  2313. update(obj = newObj);
  2314. } else {
  2315. remove();
  2316. }
  2317. };
  2318. }
  2319. var replaceText = (function () {
  2320. var textStore = [];
  2321. return function (index, replacement) {
  2322. textStore[index] = replacement;
  2323. return textStore.filter(Boolean).join('\n');
  2324. };
  2325. })();
  2326. function applyToSingletonTag (style, index, remove, obj) {
  2327. var css = remove ? "" : obj.css;
  2328. if (style.styleSheet) {
  2329. style.styleSheet.cssText = replaceText(index, css);
  2330. } else {
  2331. var cssNode = document.createTextNode(css);
  2332. var childNodes = style.childNodes;
  2333. if (childNodes[index]) style.removeChild(childNodes[index]);
  2334. if (childNodes.length) {
  2335. style.insertBefore(cssNode, childNodes[index]);
  2336. } else {
  2337. style.appendChild(cssNode);
  2338. }
  2339. }
  2340. }
  2341. function applyToTag (style, obj) {
  2342. var css = obj.css;
  2343. var media = obj.media;
  2344. if(media) {
  2345. style.setAttribute("media", media)
  2346. }
  2347. if(style.styleSheet) {
  2348. style.styleSheet.cssText = css;
  2349. } else {
  2350. while(style.firstChild) {
  2351. style.removeChild(style.firstChild);
  2352. }
  2353. style.appendChild(document.createTextNode(css));
  2354. }
  2355. }
  2356. function updateLink (link, options, obj) {
  2357. var css = obj.css;
  2358. var sourceMap = obj.sourceMap;
  2359. /*
  2360. If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
  2361. and there is no publicPath defined then lets turn convertToAbsoluteUrls
  2362. on by default. Otherwise default to the convertToAbsoluteUrls option
  2363. directly
  2364. */
  2365. var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
  2366. if (options.convertToAbsoluteUrls || autoFixUrls) {
  2367. css = fixUrls(css);
  2368. }
  2369. if (sourceMap) {
  2370. // http://stackoverflow.com/a/26603875
  2371. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  2372. }
  2373. var blob = new Blob([css], { type: "text/css" });
  2374. var oldSrc = link.href;
  2375. link.href = URL.createObjectURL(blob);
  2376. if(oldSrc) URL.revokeObjectURL(oldSrc);
  2377. }
  2378. /***/ }),
  2379. /* 51 */
  2380. /***/ (function(module, exports, __webpack_require__) {
  2381. (function webpackUniversalModuleDefinition(root, factory) {
  2382. if(true)
  2383. module.exports = factory(__webpack_require__(137));
  2384. else if(typeof define === 'function' && define.amd)
  2385. define(["sortablejs"], factory);
  2386. else if(typeof exports === 'object')
  2387. exports["vuedraggable"] = factory(require("sortablejs"));
  2388. else
  2389. root["vuedraggable"] = factory(root["Sortable"]);
  2390. })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE_a352__) {
  2391. return /******/ (function(modules) { // webpackBootstrap
  2392. /******/ // The module cache
  2393. /******/ var installedModules = {};
  2394. /******/
  2395. /******/ // The require function
  2396. /******/ function __webpack_require__(moduleId) {
  2397. /******/
  2398. /******/ // Check if module is in cache
  2399. /******/ if(installedModules[moduleId]) {
  2400. /******/ return installedModules[moduleId].exports;
  2401. /******/ }
  2402. /******/ // Create a new module (and put it into the cache)
  2403. /******/ var module = installedModules[moduleId] = {
  2404. /******/ i: moduleId,
  2405. /******/ l: false,
  2406. /******/ exports: {}
  2407. /******/ };
  2408. /******/
  2409. /******/ // Execute the module function
  2410. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  2411. /******/
  2412. /******/ // Flag the module as loaded
  2413. /******/ module.l = true;
  2414. /******/
  2415. /******/ // Return the exports of the module
  2416. /******/ return module.exports;
  2417. /******/ }
  2418. /******/
  2419. /******/
  2420. /******/ // expose the modules object (__webpack_modules__)
  2421. /******/ __webpack_require__.m = modules;
  2422. /******/
  2423. /******/ // expose the module cache
  2424. /******/ __webpack_require__.c = installedModules;
  2425. /******/
  2426. /******/ // define getter function for harmony exports
  2427. /******/ __webpack_require__.d = function(exports, name, getter) {
  2428. /******/ if(!__webpack_require__.o(exports, name)) {
  2429. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  2430. /******/ }
  2431. /******/ };
  2432. /******/
  2433. /******/ // define __esModule on exports
  2434. /******/ __webpack_require__.r = function(exports) {
  2435. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  2436. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  2437. /******/ }
  2438. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  2439. /******/ };
  2440. /******/
  2441. /******/ // create a fake namespace object
  2442. /******/ // mode & 1: value is a module id, require it
  2443. /******/ // mode & 2: merge all properties of value into the ns
  2444. /******/ // mode & 4: return value when already ns object
  2445. /******/ // mode & 8|1: behave like require
  2446. /******/ __webpack_require__.t = function(value, mode) {
  2447. /******/ if(mode & 1) value = __webpack_require__(value);
  2448. /******/ if(mode & 8) return value;
  2449. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  2450. /******/ var ns = Object.create(null);
  2451. /******/ __webpack_require__.r(ns);
  2452. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  2453. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  2454. /******/ return ns;
  2455. /******/ };
  2456. /******/
  2457. /******/ // getDefaultExport function for compatibility with non-harmony modules
  2458. /******/ __webpack_require__.n = function(module) {
  2459. /******/ var getter = module && module.__esModule ?
  2460. /******/ function getDefault() { return module['default']; } :
  2461. /******/ function getModuleExports() { return module; };
  2462. /******/ __webpack_require__.d(getter, 'a', getter);
  2463. /******/ return getter;
  2464. /******/ };
  2465. /******/
  2466. /******/ // Object.prototype.hasOwnProperty.call
  2467. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  2468. /******/
  2469. /******/ // __webpack_public_path__
  2470. /******/ __webpack_require__.p = "";
  2471. /******/
  2472. /******/
  2473. /******/ // Load entry module and return exports
  2474. /******/ return __webpack_require__(__webpack_require__.s = "fb15");
  2475. /******/ })
  2476. /************************************************************************/
  2477. /******/ ({
  2478. /***/ "01f9":
  2479. /***/ (function(module, exports, __webpack_require__) {
  2480. "use strict";
  2481. var LIBRARY = __webpack_require__("2d00");
  2482. var $export = __webpack_require__("5ca1");
  2483. var redefine = __webpack_require__("2aba");
  2484. var hide = __webpack_require__("32e9");
  2485. var Iterators = __webpack_require__("84f2");
  2486. var $iterCreate = __webpack_require__("41a0");
  2487. var setToStringTag = __webpack_require__("7f20");
  2488. var getPrototypeOf = __webpack_require__("38fd");
  2489. var ITERATOR = __webpack_require__("2b4c")('iterator');
  2490. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  2491. var FF_ITERATOR = '@@iterator';
  2492. var KEYS = 'keys';
  2493. var VALUES = 'values';
  2494. var returnThis = function () { return this; };
  2495. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  2496. $iterCreate(Constructor, NAME, next);
  2497. var getMethod = function (kind) {
  2498. if (!BUGGY && kind in proto) return proto[kind];
  2499. switch (kind) {
  2500. case KEYS: return function keys() { return new Constructor(this, kind); };
  2501. case VALUES: return function values() { return new Constructor(this, kind); };
  2502. } return function entries() { return new Constructor(this, kind); };
  2503. };
  2504. var TAG = NAME + ' Iterator';
  2505. var DEF_VALUES = DEFAULT == VALUES;
  2506. var VALUES_BUG = false;
  2507. var proto = Base.prototype;
  2508. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  2509. var $default = $native || getMethod(DEFAULT);
  2510. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  2511. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  2512. var methods, key, IteratorPrototype;
  2513. // Fix native
  2514. if ($anyNative) {
  2515. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  2516. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  2517. // Set @@toStringTag to native iterators
  2518. setToStringTag(IteratorPrototype, TAG, true);
  2519. // fix for some old engines
  2520. if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
  2521. }
  2522. }
  2523. // fix Array#{values, @@iterator}.name in V8 / FF
  2524. if (DEF_VALUES && $native && $native.name !== VALUES) {
  2525. VALUES_BUG = true;
  2526. $default = function values() { return $native.call(this); };
  2527. }
  2528. // Define iterator
  2529. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  2530. hide(proto, ITERATOR, $default);
  2531. }
  2532. // Plug for library
  2533. Iterators[NAME] = $default;
  2534. Iterators[TAG] = returnThis;
  2535. if (DEFAULT) {
  2536. methods = {
  2537. values: DEF_VALUES ? $default : getMethod(VALUES),
  2538. keys: IS_SET ? $default : getMethod(KEYS),
  2539. entries: $entries
  2540. };
  2541. if (FORCED) for (key in methods) {
  2542. if (!(key in proto)) redefine(proto, key, methods[key]);
  2543. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  2544. }
  2545. return methods;
  2546. };
  2547. /***/ }),
  2548. /***/ "02f4":
  2549. /***/ (function(module, exports, __webpack_require__) {
  2550. var toInteger = __webpack_require__("4588");
  2551. var defined = __webpack_require__("be13");
  2552. // true -> String#at
  2553. // false -> String#codePointAt
  2554. module.exports = function (TO_STRING) {
  2555. return function (that, pos) {
  2556. var s = String(defined(that));
  2557. var i = toInteger(pos);
  2558. var l = s.length;
  2559. var a, b;
  2560. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  2561. a = s.charCodeAt(i);
  2562. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  2563. ? TO_STRING ? s.charAt(i) : a
  2564. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  2565. };
  2566. };
  2567. /***/ }),
  2568. /***/ "0390":
  2569. /***/ (function(module, exports, __webpack_require__) {
  2570. "use strict";
  2571. var at = __webpack_require__("02f4")(true);
  2572. // `AdvanceStringIndex` abstract operation
  2573. // https://tc39.github.io/ecma262/#sec-advancestringindex
  2574. module.exports = function (S, index, unicode) {
  2575. return index + (unicode ? at(S, index).length : 1);
  2576. };
  2577. /***/ }),
  2578. /***/ "0bfb":
  2579. /***/ (function(module, exports, __webpack_require__) {
  2580. "use strict";
  2581. // 21.2.5.3 get RegExp.prototype.flags
  2582. var anObject = __webpack_require__("cb7c");
  2583. module.exports = function () {
  2584. var that = anObject(this);
  2585. var result = '';
  2586. if (that.global) result += 'g';
  2587. if (that.ignoreCase) result += 'i';
  2588. if (that.multiline) result += 'm';
  2589. if (that.unicode) result += 'u';
  2590. if (that.sticky) result += 'y';
  2591. return result;
  2592. };
  2593. /***/ }),
  2594. /***/ "0d58":
  2595. /***/ (function(module, exports, __webpack_require__) {
  2596. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  2597. var $keys = __webpack_require__("ce10");
  2598. var enumBugKeys = __webpack_require__("e11e");
  2599. module.exports = Object.keys || function keys(O) {
  2600. return $keys(O, enumBugKeys);
  2601. };
  2602. /***/ }),
  2603. /***/ "1495":
  2604. /***/ (function(module, exports, __webpack_require__) {
  2605. var dP = __webpack_require__("86cc");
  2606. var anObject = __webpack_require__("cb7c");
  2607. var getKeys = __webpack_require__("0d58");
  2608. module.exports = __webpack_require__("9e1e") ? Object.defineProperties : function defineProperties(O, Properties) {
  2609. anObject(O);
  2610. var keys = getKeys(Properties);
  2611. var length = keys.length;
  2612. var i = 0;
  2613. var P;
  2614. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  2615. return O;
  2616. };
  2617. /***/ }),
  2618. /***/ "214f":
  2619. /***/ (function(module, exports, __webpack_require__) {
  2620. "use strict";
  2621. __webpack_require__("b0c5");
  2622. var redefine = __webpack_require__("2aba");
  2623. var hide = __webpack_require__("32e9");
  2624. var fails = __webpack_require__("79e5");
  2625. var defined = __webpack_require__("be13");
  2626. var wks = __webpack_require__("2b4c");
  2627. var regexpExec = __webpack_require__("520a");
  2628. var SPECIES = wks('species');
  2629. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  2630. // #replace needs built-in support for named groups.
  2631. // #match works fine because it just return the exec results, even if it has
  2632. // a "grops" property.
  2633. var re = /./;
  2634. re.exec = function () {
  2635. var result = [];
  2636. result.groups = { a: '7' };
  2637. return result;
  2638. };
  2639. return ''.replace(re, '$<a>') !== '7';
  2640. });
  2641. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
  2642. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  2643. var re = /(?:)/;
  2644. var originalExec = re.exec;
  2645. re.exec = function () { return originalExec.apply(this, arguments); };
  2646. var result = 'ab'.split(re);
  2647. return result.length === 2 && result[0] === 'a' && result[1] === 'b';
  2648. })();
  2649. module.exports = function (KEY, length, exec) {
  2650. var SYMBOL = wks(KEY);
  2651. var DELEGATES_TO_SYMBOL = !fails(function () {
  2652. // String methods call symbol-named RegEp methods
  2653. var O = {};
  2654. O[SYMBOL] = function () { return 7; };
  2655. return ''[KEY](O) != 7;
  2656. });
  2657. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
  2658. // Symbol-named RegExp methods call .exec
  2659. var execCalled = false;
  2660. var re = /a/;
  2661. re.exec = function () { execCalled = true; return null; };
  2662. if (KEY === 'split') {
  2663. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  2664. // a new one. We need to return the patched regex when creating the new one.
  2665. re.constructor = {};
  2666. re.constructor[SPECIES] = function () { return re; };
  2667. }
  2668. re[SYMBOL]('');
  2669. return !execCalled;
  2670. }) : undefined;
  2671. if (
  2672. !DELEGATES_TO_SYMBOL ||
  2673. !DELEGATES_TO_EXEC ||
  2674. (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
  2675. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  2676. ) {
  2677. var nativeRegExpMethod = /./[SYMBOL];
  2678. var fns = exec(
  2679. defined,
  2680. SYMBOL,
  2681. ''[KEY],
  2682. function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
  2683. if (regexp.exec === regexpExec) {
  2684. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  2685. // The native String method already delegates to @@method (this
  2686. // polyfilled function), leasing to infinite recursion.
  2687. // We avoid it by directly calling the native @@method method.
  2688. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  2689. }
  2690. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  2691. }
  2692. return { done: false };
  2693. }
  2694. );
  2695. var strfn = fns[0];
  2696. var rxfn = fns[1];
  2697. redefine(String.prototype, KEY, strfn);
  2698. hide(RegExp.prototype, SYMBOL, length == 2
  2699. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  2700. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  2701. ? function (string, arg) { return rxfn.call(string, this, arg); }
  2702. // 21.2.5.6 RegExp.prototype[@@match](string)
  2703. // 21.2.5.9 RegExp.prototype[@@search](string)
  2704. : function (string) { return rxfn.call(string, this); }
  2705. );
  2706. }
  2707. };
  2708. /***/ }),
  2709. /***/ "230e":
  2710. /***/ (function(module, exports, __webpack_require__) {
  2711. var isObject = __webpack_require__("d3f4");
  2712. var document = __webpack_require__("7726").document;
  2713. // typeof document.createElement is 'object' in old IE
  2714. var is = isObject(document) && isObject(document.createElement);
  2715. module.exports = function (it) {
  2716. return is ? document.createElement(it) : {};
  2717. };
  2718. /***/ }),
  2719. /***/ "23c6":
  2720. /***/ (function(module, exports, __webpack_require__) {
  2721. // getting tag from 19.1.3.6 Object.prototype.toString()
  2722. var cof = __webpack_require__("2d95");
  2723. var TAG = __webpack_require__("2b4c")('toStringTag');
  2724. // ES3 wrong here
  2725. var ARG = cof(function () { return arguments; }()) == 'Arguments';
  2726. // fallback for IE11 Script Access Denied error
  2727. var tryGet = function (it, key) {
  2728. try {
  2729. return it[key];
  2730. } catch (e) { /* empty */ }
  2731. };
  2732. module.exports = function (it) {
  2733. var O, T, B;
  2734. return it === undefined ? 'Undefined' : it === null ? 'Null'
  2735. // @@toStringTag case
  2736. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  2737. // builtinTag case
  2738. : ARG ? cof(O)
  2739. // ES3 arguments fallback
  2740. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  2741. };
  2742. /***/ }),
  2743. /***/ "2621":
  2744. /***/ (function(module, exports) {
  2745. exports.f = Object.getOwnPropertySymbols;
  2746. /***/ }),
  2747. /***/ "2aba":
  2748. /***/ (function(module, exports, __webpack_require__) {
  2749. var global = __webpack_require__("7726");
  2750. var hide = __webpack_require__("32e9");
  2751. var has = __webpack_require__("69a8");
  2752. var SRC = __webpack_require__("ca5a")('src');
  2753. var $toString = __webpack_require__("fa5b");
  2754. var TO_STRING = 'toString';
  2755. var TPL = ('' + $toString).split(TO_STRING);
  2756. __webpack_require__("8378").inspectSource = function (it) {
  2757. return $toString.call(it);
  2758. };
  2759. (module.exports = function (O, key, val, safe) {
  2760. var isFunction = typeof val == 'function';
  2761. if (isFunction) has(val, 'name') || hide(val, 'name', key);
  2762. if (O[key] === val) return;
  2763. if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  2764. if (O === global) {
  2765. O[key] = val;
  2766. } else if (!safe) {
  2767. delete O[key];
  2768. hide(O, key, val);
  2769. } else if (O[key]) {
  2770. O[key] = val;
  2771. } else {
  2772. hide(O, key, val);
  2773. }
  2774. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  2775. })(Function.prototype, TO_STRING, function toString() {
  2776. return typeof this == 'function' && this[SRC] || $toString.call(this);
  2777. });
  2778. /***/ }),
  2779. /***/ "2aeb":
  2780. /***/ (function(module, exports, __webpack_require__) {
  2781. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  2782. var anObject = __webpack_require__("cb7c");
  2783. var dPs = __webpack_require__("1495");
  2784. var enumBugKeys = __webpack_require__("e11e");
  2785. var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  2786. var Empty = function () { /* empty */ };
  2787. var PROTOTYPE = 'prototype';
  2788. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  2789. var createDict = function () {
  2790. // Thrash, waste and sodomy: IE GC bug
  2791. var iframe = __webpack_require__("230e")('iframe');
  2792. var i = enumBugKeys.length;
  2793. var lt = '<';
  2794. var gt = '>';
  2795. var iframeDocument;
  2796. iframe.style.display = 'none';
  2797. __webpack_require__("fab2").appendChild(iframe);
  2798. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  2799. // createDict = iframe.contentWindow.Object;
  2800. // html.removeChild(iframe);
  2801. iframeDocument = iframe.contentWindow.document;
  2802. iframeDocument.open();
  2803. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  2804. iframeDocument.close();
  2805. createDict = iframeDocument.F;
  2806. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  2807. return createDict();
  2808. };
  2809. module.exports = Object.create || function create(O, Properties) {
  2810. var result;
  2811. if (O !== null) {
  2812. Empty[PROTOTYPE] = anObject(O);
  2813. result = new Empty();
  2814. Empty[PROTOTYPE] = null;
  2815. // add "__proto__" for Object.getPrototypeOf polyfill
  2816. result[IE_PROTO] = O;
  2817. } else result = createDict();
  2818. return Properties === undefined ? result : dPs(result, Properties);
  2819. };
  2820. /***/ }),
  2821. /***/ "2b4c":
  2822. /***/ (function(module, exports, __webpack_require__) {
  2823. var store = __webpack_require__("5537")('wks');
  2824. var uid = __webpack_require__("ca5a");
  2825. var Symbol = __webpack_require__("7726").Symbol;
  2826. var USE_SYMBOL = typeof Symbol == 'function';
  2827. var $exports = module.exports = function (name) {
  2828. return store[name] || (store[name] =
  2829. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  2830. };
  2831. $exports.store = store;
  2832. /***/ }),
  2833. /***/ "2d00":
  2834. /***/ (function(module, exports) {
  2835. module.exports = false;
  2836. /***/ }),
  2837. /***/ "2d95":
  2838. /***/ (function(module, exports) {
  2839. var toString = {}.toString;
  2840. module.exports = function (it) {
  2841. return toString.call(it).slice(8, -1);
  2842. };
  2843. /***/ }),
  2844. /***/ "2fdb":
  2845. /***/ (function(module, exports, __webpack_require__) {
  2846. "use strict";
  2847. // 21.1.3.7 String.prototype.includes(searchString, position = 0)
  2848. var $export = __webpack_require__("5ca1");
  2849. var context = __webpack_require__("d2c8");
  2850. var INCLUDES = 'includes';
  2851. $export($export.P + $export.F * __webpack_require__("5147")(INCLUDES), 'String', {
  2852. includes: function includes(searchString /* , position = 0 */) {
  2853. return !!~context(this, searchString, INCLUDES)
  2854. .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
  2855. }
  2856. });
  2857. /***/ }),
  2858. /***/ "32e9":
  2859. /***/ (function(module, exports, __webpack_require__) {
  2860. var dP = __webpack_require__("86cc");
  2861. var createDesc = __webpack_require__("4630");
  2862. module.exports = __webpack_require__("9e1e") ? function (object, key, value) {
  2863. return dP.f(object, key, createDesc(1, value));
  2864. } : function (object, key, value) {
  2865. object[key] = value;
  2866. return object;
  2867. };
  2868. /***/ }),
  2869. /***/ "38fd":
  2870. /***/ (function(module, exports, __webpack_require__) {
  2871. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  2872. var has = __webpack_require__("69a8");
  2873. var toObject = __webpack_require__("4bf8");
  2874. var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  2875. var ObjectProto = Object.prototype;
  2876. module.exports = Object.getPrototypeOf || function (O) {
  2877. O = toObject(O);
  2878. if (has(O, IE_PROTO)) return O[IE_PROTO];
  2879. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  2880. return O.constructor.prototype;
  2881. } return O instanceof Object ? ObjectProto : null;
  2882. };
  2883. /***/ }),
  2884. /***/ "41a0":
  2885. /***/ (function(module, exports, __webpack_require__) {
  2886. "use strict";
  2887. var create = __webpack_require__("2aeb");
  2888. var descriptor = __webpack_require__("4630");
  2889. var setToStringTag = __webpack_require__("7f20");
  2890. var IteratorPrototype = {};
  2891. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  2892. __webpack_require__("32e9")(IteratorPrototype, __webpack_require__("2b4c")('iterator'), function () { return this; });
  2893. module.exports = function (Constructor, NAME, next) {
  2894. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  2895. setToStringTag(Constructor, NAME + ' Iterator');
  2896. };
  2897. /***/ }),
  2898. /***/ "456d":
  2899. /***/ (function(module, exports, __webpack_require__) {
  2900. // 19.1.2.14 Object.keys(O)
  2901. var toObject = __webpack_require__("4bf8");
  2902. var $keys = __webpack_require__("0d58");
  2903. __webpack_require__("5eda")('keys', function () {
  2904. return function keys(it) {
  2905. return $keys(toObject(it));
  2906. };
  2907. });
  2908. /***/ }),
  2909. /***/ "4588":
  2910. /***/ (function(module, exports) {
  2911. // 7.1.4 ToInteger
  2912. var ceil = Math.ceil;
  2913. var floor = Math.floor;
  2914. module.exports = function (it) {
  2915. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  2916. };
  2917. /***/ }),
  2918. /***/ "4630":
  2919. /***/ (function(module, exports) {
  2920. module.exports = function (bitmap, value) {
  2921. return {
  2922. enumerable: !(bitmap & 1),
  2923. configurable: !(bitmap & 2),
  2924. writable: !(bitmap & 4),
  2925. value: value
  2926. };
  2927. };
  2928. /***/ }),
  2929. /***/ "4bf8":
  2930. /***/ (function(module, exports, __webpack_require__) {
  2931. // 7.1.13 ToObject(argument)
  2932. var defined = __webpack_require__("be13");
  2933. module.exports = function (it) {
  2934. return Object(defined(it));
  2935. };
  2936. /***/ }),
  2937. /***/ "5147":
  2938. /***/ (function(module, exports, __webpack_require__) {
  2939. var MATCH = __webpack_require__("2b4c")('match');
  2940. module.exports = function (KEY) {
  2941. var re = /./;
  2942. try {
  2943. '/./'[KEY](re);
  2944. } catch (e) {
  2945. try {
  2946. re[MATCH] = false;
  2947. return !'/./'[KEY](re);
  2948. } catch (f) { /* empty */ }
  2949. } return true;
  2950. };
  2951. /***/ }),
  2952. /***/ "520a":
  2953. /***/ (function(module, exports, __webpack_require__) {
  2954. "use strict";
  2955. var regexpFlags = __webpack_require__("0bfb");
  2956. var nativeExec = RegExp.prototype.exec;
  2957. // This always refers to the native implementation, because the
  2958. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  2959. // which loads this file before patching the method.
  2960. var nativeReplace = String.prototype.replace;
  2961. var patchedExec = nativeExec;
  2962. var LAST_INDEX = 'lastIndex';
  2963. var UPDATES_LAST_INDEX_WRONG = (function () {
  2964. var re1 = /a/,
  2965. re2 = /b*/g;
  2966. nativeExec.call(re1, 'a');
  2967. nativeExec.call(re2, 'a');
  2968. return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
  2969. })();
  2970. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  2971. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  2972. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
  2973. if (PATCH) {
  2974. patchedExec = function exec(str) {
  2975. var re = this;
  2976. var lastIndex, reCopy, match, i;
  2977. if (NPCG_INCLUDED) {
  2978. reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
  2979. }
  2980. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
  2981. match = nativeExec.call(re, str);
  2982. if (UPDATES_LAST_INDEX_WRONG && match) {
  2983. re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
  2984. }
  2985. if (NPCG_INCLUDED && match && match.length > 1) {
  2986. // Fix browsers whose `exec` methods don't consistently return `undefined`
  2987. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  2988. // eslint-disable-next-line no-loop-func
  2989. nativeReplace.call(match[0], reCopy, function () {
  2990. for (i = 1; i < arguments.length - 2; i++) {
  2991. if (arguments[i] === undefined) match[i] = undefined;
  2992. }
  2993. });
  2994. }
  2995. return match;
  2996. };
  2997. }
  2998. module.exports = patchedExec;
  2999. /***/ }),
  3000. /***/ "52a7":
  3001. /***/ (function(module, exports) {
  3002. exports.f = {}.propertyIsEnumerable;
  3003. /***/ }),
  3004. /***/ "5537":
  3005. /***/ (function(module, exports, __webpack_require__) {
  3006. var core = __webpack_require__("8378");
  3007. var global = __webpack_require__("7726");
  3008. var SHARED = '__core-js_shared__';
  3009. var store = global[SHARED] || (global[SHARED] = {});
  3010. (module.exports = function (key, value) {
  3011. return store[key] || (store[key] = value !== undefined ? value : {});
  3012. })('versions', []).push({
  3013. version: core.version,
  3014. mode: __webpack_require__("2d00") ? 'pure' : 'global',
  3015. copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
  3016. });
  3017. /***/ }),
  3018. /***/ "5ca1":
  3019. /***/ (function(module, exports, __webpack_require__) {
  3020. var global = __webpack_require__("7726");
  3021. var core = __webpack_require__("8378");
  3022. var hide = __webpack_require__("32e9");
  3023. var redefine = __webpack_require__("2aba");
  3024. var ctx = __webpack_require__("9b43");
  3025. var PROTOTYPE = 'prototype';
  3026. var $export = function (type, name, source) {
  3027. var IS_FORCED = type & $export.F;
  3028. var IS_GLOBAL = type & $export.G;
  3029. var IS_STATIC = type & $export.S;
  3030. var IS_PROTO = type & $export.P;
  3031. var IS_BIND = type & $export.B;
  3032. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  3033. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  3034. var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  3035. var key, own, out, exp;
  3036. if (IS_GLOBAL) source = name;
  3037. for (key in source) {
  3038. // contains in native
  3039. own = !IS_FORCED && target && target[key] !== undefined;
  3040. // export native or passed
  3041. out = (own ? target : source)[key];
  3042. // bind timers to global for call from export context
  3043. exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  3044. // extend global
  3045. if (target) redefine(target, key, out, type & $export.U);
  3046. // export
  3047. if (exports[key] != out) hide(exports, key, exp);
  3048. if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  3049. }
  3050. };
  3051. global.core = core;
  3052. // type bitmap
  3053. $export.F = 1; // forced
  3054. $export.G = 2; // global
  3055. $export.S = 4; // static
  3056. $export.P = 8; // proto
  3057. $export.B = 16; // bind
  3058. $export.W = 32; // wrap
  3059. $export.U = 64; // safe
  3060. $export.R = 128; // real proto method for `library`
  3061. module.exports = $export;
  3062. /***/ }),
  3063. /***/ "5eda":
  3064. /***/ (function(module, exports, __webpack_require__) {
  3065. // most Object methods by ES6 should accept primitives
  3066. var $export = __webpack_require__("5ca1");
  3067. var core = __webpack_require__("8378");
  3068. var fails = __webpack_require__("79e5");
  3069. module.exports = function (KEY, exec) {
  3070. var fn = (core.Object || {})[KEY] || Object[KEY];
  3071. var exp = {};
  3072. exp[KEY] = exec(fn);
  3073. $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
  3074. };
  3075. /***/ }),
  3076. /***/ "5f1b":
  3077. /***/ (function(module, exports, __webpack_require__) {
  3078. "use strict";
  3079. var classof = __webpack_require__("23c6");
  3080. var builtinExec = RegExp.prototype.exec;
  3081. // `RegExpExec` abstract operation
  3082. // https://tc39.github.io/ecma262/#sec-regexpexec
  3083. module.exports = function (R, S) {
  3084. var exec = R.exec;
  3085. if (typeof exec === 'function') {
  3086. var result = exec.call(R, S);
  3087. if (typeof result !== 'object') {
  3088. throw new TypeError('RegExp exec method returned something other than an Object or null');
  3089. }
  3090. return result;
  3091. }
  3092. if (classof(R) !== 'RegExp') {
  3093. throw new TypeError('RegExp#exec called on incompatible receiver');
  3094. }
  3095. return builtinExec.call(R, S);
  3096. };
  3097. /***/ }),
  3098. /***/ "613b":
  3099. /***/ (function(module, exports, __webpack_require__) {
  3100. var shared = __webpack_require__("5537")('keys');
  3101. var uid = __webpack_require__("ca5a");
  3102. module.exports = function (key) {
  3103. return shared[key] || (shared[key] = uid(key));
  3104. };
  3105. /***/ }),
  3106. /***/ "626a":
  3107. /***/ (function(module, exports, __webpack_require__) {
  3108. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  3109. var cof = __webpack_require__("2d95");
  3110. // eslint-disable-next-line no-prototype-builtins
  3111. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  3112. return cof(it) == 'String' ? it.split('') : Object(it);
  3113. };
  3114. /***/ }),
  3115. /***/ "6762":
  3116. /***/ (function(module, exports, __webpack_require__) {
  3117. "use strict";
  3118. // https://github.com/tc39/Array.prototype.includes
  3119. var $export = __webpack_require__("5ca1");
  3120. var $includes = __webpack_require__("c366")(true);
  3121. $export($export.P, 'Array', {
  3122. includes: function includes(el /* , fromIndex = 0 */) {
  3123. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  3124. }
  3125. });
  3126. __webpack_require__("9c6c")('includes');
  3127. /***/ }),
  3128. /***/ "6821":
  3129. /***/ (function(module, exports, __webpack_require__) {
  3130. // to indexed object, toObject with fallback for non-array-like ES3 strings
  3131. var IObject = __webpack_require__("626a");
  3132. var defined = __webpack_require__("be13");
  3133. module.exports = function (it) {
  3134. return IObject(defined(it));
  3135. };
  3136. /***/ }),
  3137. /***/ "69a8":
  3138. /***/ (function(module, exports) {
  3139. var hasOwnProperty = {}.hasOwnProperty;
  3140. module.exports = function (it, key) {
  3141. return hasOwnProperty.call(it, key);
  3142. };
  3143. /***/ }),
  3144. /***/ "6a99":
  3145. /***/ (function(module, exports, __webpack_require__) {
  3146. // 7.1.1 ToPrimitive(input [, PreferredType])
  3147. var isObject = __webpack_require__("d3f4");
  3148. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  3149. // and the second argument - flag - preferred type is a string
  3150. module.exports = function (it, S) {
  3151. if (!isObject(it)) return it;
  3152. var fn, val;
  3153. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  3154. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  3155. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  3156. throw TypeError("Can't convert object to primitive value");
  3157. };
  3158. /***/ }),
  3159. /***/ "7333":
  3160. /***/ (function(module, exports, __webpack_require__) {
  3161. "use strict";
  3162. // 19.1.2.1 Object.assign(target, source, ...)
  3163. var getKeys = __webpack_require__("0d58");
  3164. var gOPS = __webpack_require__("2621");
  3165. var pIE = __webpack_require__("52a7");
  3166. var toObject = __webpack_require__("4bf8");
  3167. var IObject = __webpack_require__("626a");
  3168. var $assign = Object.assign;
  3169. // should work with symbols and should have deterministic property order (V8 bug)
  3170. module.exports = !$assign || __webpack_require__("79e5")(function () {
  3171. var A = {};
  3172. var B = {};
  3173. // eslint-disable-next-line no-undef
  3174. var S = Symbol();
  3175. var K = 'abcdefghijklmnopqrst';
  3176. A[S] = 7;
  3177. K.split('').forEach(function (k) { B[k] = k; });
  3178. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  3179. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  3180. var T = toObject(target);
  3181. var aLen = arguments.length;
  3182. var index = 1;
  3183. var getSymbols = gOPS.f;
  3184. var isEnum = pIE.f;
  3185. while (aLen > index) {
  3186. var S = IObject(arguments[index++]);
  3187. var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
  3188. var length = keys.length;
  3189. var j = 0;
  3190. var key;
  3191. while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
  3192. } return T;
  3193. } : $assign;
  3194. /***/ }),
  3195. /***/ "7726":
  3196. /***/ (function(module, exports) {
  3197. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  3198. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  3199. ? window : typeof self != 'undefined' && self.Math == Math ? self
  3200. // eslint-disable-next-line no-new-func
  3201. : Function('return this')();
  3202. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  3203. /***/ }),
  3204. /***/ "77f1":
  3205. /***/ (function(module, exports, __webpack_require__) {
  3206. var toInteger = __webpack_require__("4588");
  3207. var max = Math.max;
  3208. var min = Math.min;
  3209. module.exports = function (index, length) {
  3210. index = toInteger(index);
  3211. return index < 0 ? max(index + length, 0) : min(index, length);
  3212. };
  3213. /***/ }),
  3214. /***/ "79e5":
  3215. /***/ (function(module, exports) {
  3216. module.exports = function (exec) {
  3217. try {
  3218. return !!exec();
  3219. } catch (e) {
  3220. return true;
  3221. }
  3222. };
  3223. /***/ }),
  3224. /***/ "7f20":
  3225. /***/ (function(module, exports, __webpack_require__) {
  3226. var def = __webpack_require__("86cc").f;
  3227. var has = __webpack_require__("69a8");
  3228. var TAG = __webpack_require__("2b4c")('toStringTag');
  3229. module.exports = function (it, tag, stat) {
  3230. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  3231. };
  3232. /***/ }),
  3233. /***/ "8378":
  3234. /***/ (function(module, exports) {
  3235. var core = module.exports = { version: '2.6.5' };
  3236. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  3237. /***/ }),
  3238. /***/ "84f2":
  3239. /***/ (function(module, exports) {
  3240. module.exports = {};
  3241. /***/ }),
  3242. /***/ "86cc":
  3243. /***/ (function(module, exports, __webpack_require__) {
  3244. var anObject = __webpack_require__("cb7c");
  3245. var IE8_DOM_DEFINE = __webpack_require__("c69a");
  3246. var toPrimitive = __webpack_require__("6a99");
  3247. var dP = Object.defineProperty;
  3248. exports.f = __webpack_require__("9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  3249. anObject(O);
  3250. P = toPrimitive(P, true);
  3251. anObject(Attributes);
  3252. if (IE8_DOM_DEFINE) try {
  3253. return dP(O, P, Attributes);
  3254. } catch (e) { /* empty */ }
  3255. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  3256. if ('value' in Attributes) O[P] = Attributes.value;
  3257. return O;
  3258. };
  3259. /***/ }),
  3260. /***/ "9b43":
  3261. /***/ (function(module, exports, __webpack_require__) {
  3262. // optional / simple context binding
  3263. var aFunction = __webpack_require__("d8e8");
  3264. module.exports = function (fn, that, length) {
  3265. aFunction(fn);
  3266. if (that === undefined) return fn;
  3267. switch (length) {
  3268. case 1: return function (a) {
  3269. return fn.call(that, a);
  3270. };
  3271. case 2: return function (a, b) {
  3272. return fn.call(that, a, b);
  3273. };
  3274. case 3: return function (a, b, c) {
  3275. return fn.call(that, a, b, c);
  3276. };
  3277. }
  3278. return function (/* ...args */) {
  3279. return fn.apply(that, arguments);
  3280. };
  3281. };
  3282. /***/ }),
  3283. /***/ "9c6c":
  3284. /***/ (function(module, exports, __webpack_require__) {
  3285. // 22.1.3.31 Array.prototype[@@unscopables]
  3286. var UNSCOPABLES = __webpack_require__("2b4c")('unscopables');
  3287. var ArrayProto = Array.prototype;
  3288. if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("32e9")(ArrayProto, UNSCOPABLES, {});
  3289. module.exports = function (key) {
  3290. ArrayProto[UNSCOPABLES][key] = true;
  3291. };
  3292. /***/ }),
  3293. /***/ "9def":
  3294. /***/ (function(module, exports, __webpack_require__) {
  3295. // 7.1.15 ToLength
  3296. var toInteger = __webpack_require__("4588");
  3297. var min = Math.min;
  3298. module.exports = function (it) {
  3299. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  3300. };
  3301. /***/ }),
  3302. /***/ "9e1e":
  3303. /***/ (function(module, exports, __webpack_require__) {
  3304. // Thank's IE8 for his funny defineProperty
  3305. module.exports = !__webpack_require__("79e5")(function () {
  3306. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  3307. });
  3308. /***/ }),
  3309. /***/ "a352":
  3310. /***/ (function(module, exports) {
  3311. module.exports = __WEBPACK_EXTERNAL_MODULE_a352__;
  3312. /***/ }),
  3313. /***/ "a481":
  3314. /***/ (function(module, exports, __webpack_require__) {
  3315. "use strict";
  3316. var anObject = __webpack_require__("cb7c");
  3317. var toObject = __webpack_require__("4bf8");
  3318. var toLength = __webpack_require__("9def");
  3319. var toInteger = __webpack_require__("4588");
  3320. var advanceStringIndex = __webpack_require__("0390");
  3321. var regExpExec = __webpack_require__("5f1b");
  3322. var max = Math.max;
  3323. var min = Math.min;
  3324. var floor = Math.floor;
  3325. var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
  3326. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
  3327. var maybeToString = function (it) {
  3328. return it === undefined ? it : String(it);
  3329. };
  3330. // @@replace logic
  3331. __webpack_require__("214f")('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
  3332. return [
  3333. // `String.prototype.replace` method
  3334. // https://tc39.github.io/ecma262/#sec-string.prototype.replace
  3335. function replace(searchValue, replaceValue) {
  3336. var O = defined(this);
  3337. var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
  3338. return fn !== undefined
  3339. ? fn.call(searchValue, O, replaceValue)
  3340. : $replace.call(String(O), searchValue, replaceValue);
  3341. },
  3342. // `RegExp.prototype[@@replace]` method
  3343. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
  3344. function (regexp, replaceValue) {
  3345. var res = maybeCallNative($replace, regexp, this, replaceValue);
  3346. if (res.done) return res.value;
  3347. var rx = anObject(regexp);
  3348. var S = String(this);
  3349. var functionalReplace = typeof replaceValue === 'function';
  3350. if (!functionalReplace) replaceValue = String(replaceValue);
  3351. var global = rx.global;
  3352. if (global) {
  3353. var fullUnicode = rx.unicode;
  3354. rx.lastIndex = 0;
  3355. }
  3356. var results = [];
  3357. while (true) {
  3358. var result = regExpExec(rx, S);
  3359. if (result === null) break;
  3360. results.push(result);
  3361. if (!global) break;
  3362. var matchStr = String(result[0]);
  3363. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  3364. }
  3365. var accumulatedResult = '';
  3366. var nextSourcePosition = 0;
  3367. for (var i = 0; i < results.length; i++) {
  3368. result = results[i];
  3369. var matched = String(result[0]);
  3370. var position = max(min(toInteger(result.index), S.length), 0);
  3371. var captures = [];
  3372. // NOTE: This is equivalent to
  3373. // captures = result.slice(1).map(maybeToString)
  3374. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  3375. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  3376. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  3377. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  3378. var namedCaptures = result.groups;
  3379. if (functionalReplace) {
  3380. var replacerArgs = [matched].concat(captures, position, S);
  3381. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  3382. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  3383. } else {
  3384. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  3385. }
  3386. if (position >= nextSourcePosition) {
  3387. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  3388. nextSourcePosition = position + matched.length;
  3389. }
  3390. }
  3391. return accumulatedResult + S.slice(nextSourcePosition);
  3392. }
  3393. ];
  3394. // https://tc39.github.io/ecma262/#sec-getsubstitution
  3395. function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
  3396. var tailPos = position + matched.length;
  3397. var m = captures.length;
  3398. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  3399. if (namedCaptures !== undefined) {
  3400. namedCaptures = toObject(namedCaptures);
  3401. symbols = SUBSTITUTION_SYMBOLS;
  3402. }
  3403. return $replace.call(replacement, symbols, function (match, ch) {
  3404. var capture;
  3405. switch (ch.charAt(0)) {
  3406. case '$': return '$';
  3407. case '&': return matched;
  3408. case '`': return str.slice(0, position);
  3409. case "'": return str.slice(tailPos);
  3410. case '<':
  3411. capture = namedCaptures[ch.slice(1, -1)];
  3412. break;
  3413. default: // \d\d?
  3414. var n = +ch;
  3415. if (n === 0) return match;
  3416. if (n > m) {
  3417. var f = floor(n / 10);
  3418. if (f === 0) return match;
  3419. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  3420. return match;
  3421. }
  3422. capture = captures[n - 1];
  3423. }
  3424. return capture === undefined ? '' : capture;
  3425. });
  3426. }
  3427. });
  3428. /***/ }),
  3429. /***/ "aae3":
  3430. /***/ (function(module, exports, __webpack_require__) {
  3431. // 7.2.8 IsRegExp(argument)
  3432. var isObject = __webpack_require__("d3f4");
  3433. var cof = __webpack_require__("2d95");
  3434. var MATCH = __webpack_require__("2b4c")('match');
  3435. module.exports = function (it) {
  3436. var isRegExp;
  3437. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
  3438. };
  3439. /***/ }),
  3440. /***/ "ac6a":
  3441. /***/ (function(module, exports, __webpack_require__) {
  3442. var $iterators = __webpack_require__("cadf");
  3443. var getKeys = __webpack_require__("0d58");
  3444. var redefine = __webpack_require__("2aba");
  3445. var global = __webpack_require__("7726");
  3446. var hide = __webpack_require__("32e9");
  3447. var Iterators = __webpack_require__("84f2");
  3448. var wks = __webpack_require__("2b4c");
  3449. var ITERATOR = wks('iterator');
  3450. var TO_STRING_TAG = wks('toStringTag');
  3451. var ArrayValues = Iterators.Array;
  3452. var DOMIterables = {
  3453. CSSRuleList: true, // TODO: Not spec compliant, should be false.
  3454. CSSStyleDeclaration: false,
  3455. CSSValueList: false,
  3456. ClientRectList: false,
  3457. DOMRectList: false,
  3458. DOMStringList: false,
  3459. DOMTokenList: true,
  3460. DataTransferItemList: false,
  3461. FileList: false,
  3462. HTMLAllCollection: false,
  3463. HTMLCollection: false,
  3464. HTMLFormElement: false,
  3465. HTMLSelectElement: false,
  3466. MediaList: true, // TODO: Not spec compliant, should be false.
  3467. MimeTypeArray: false,
  3468. NamedNodeMap: false,
  3469. NodeList: true,
  3470. PaintRequestList: false,
  3471. Plugin: false,
  3472. PluginArray: false,
  3473. SVGLengthList: false,
  3474. SVGNumberList: false,
  3475. SVGPathSegList: false,
  3476. SVGPointList: false,
  3477. SVGStringList: false,
  3478. SVGTransformList: false,
  3479. SourceBufferList: false,
  3480. StyleSheetList: true, // TODO: Not spec compliant, should be false.
  3481. TextTrackCueList: false,
  3482. TextTrackList: false,
  3483. TouchList: false
  3484. };
  3485. for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
  3486. var NAME = collections[i];
  3487. var explicit = DOMIterables[NAME];
  3488. var Collection = global[NAME];
  3489. var proto = Collection && Collection.prototype;
  3490. var key;
  3491. if (proto) {
  3492. if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
  3493. if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  3494. Iterators[NAME] = ArrayValues;
  3495. if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
  3496. }
  3497. }
  3498. /***/ }),
  3499. /***/ "b0c5":
  3500. /***/ (function(module, exports, __webpack_require__) {
  3501. "use strict";
  3502. var regexpExec = __webpack_require__("520a");
  3503. __webpack_require__("5ca1")({
  3504. target: 'RegExp',
  3505. proto: true,
  3506. forced: regexpExec !== /./.exec
  3507. }, {
  3508. exec: regexpExec
  3509. });
  3510. /***/ }),
  3511. /***/ "be13":
  3512. /***/ (function(module, exports) {
  3513. // 7.2.1 RequireObjectCoercible(argument)
  3514. module.exports = function (it) {
  3515. if (it == undefined) throw TypeError("Can't call method on " + it);
  3516. return it;
  3517. };
  3518. /***/ }),
  3519. /***/ "c366":
  3520. /***/ (function(module, exports, __webpack_require__) {
  3521. // false -> Array#indexOf
  3522. // true -> Array#includes
  3523. var toIObject = __webpack_require__("6821");
  3524. var toLength = __webpack_require__("9def");
  3525. var toAbsoluteIndex = __webpack_require__("77f1");
  3526. module.exports = function (IS_INCLUDES) {
  3527. return function ($this, el, fromIndex) {
  3528. var O = toIObject($this);
  3529. var length = toLength(O.length);
  3530. var index = toAbsoluteIndex(fromIndex, length);
  3531. var value;
  3532. // Array#includes uses SameValueZero equality algorithm
  3533. // eslint-disable-next-line no-self-compare
  3534. if (IS_INCLUDES && el != el) while (length > index) {
  3535. value = O[index++];
  3536. // eslint-disable-next-line no-self-compare
  3537. if (value != value) return true;
  3538. // Array#indexOf ignores holes, Array#includes - not
  3539. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  3540. if (O[index] === el) return IS_INCLUDES || index || 0;
  3541. } return !IS_INCLUDES && -1;
  3542. };
  3543. };
  3544. /***/ }),
  3545. /***/ "c649":
  3546. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3547. "use strict";
  3548. /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return insertNodeAt; });
  3549. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return camelize; });
  3550. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return console; });
  3551. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return removeNode; });
  3552. /* harmony import */ var core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a481");
  3553. /* harmony import */ var core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_0__);
  3554. function getConsole() {
  3555. if (typeof window !== "undefined") {
  3556. return window.console;
  3557. }
  3558. return global.console;
  3559. }
  3560. var console = getConsole();
  3561. function cached(fn) {
  3562. var cache = Object.create(null);
  3563. return function cachedFn(str) {
  3564. var hit = cache[str];
  3565. return hit || (cache[str] = fn(str));
  3566. };
  3567. }
  3568. var regex = /-(\w)/g;
  3569. var camelize = cached(function (str) {
  3570. return str.replace(regex, function (_, c) {
  3571. return c ? c.toUpperCase() : "";
  3572. });
  3573. });
  3574. function removeNode(node) {
  3575. if (node.parentElement !== null) {
  3576. node.parentElement.removeChild(node);
  3577. }
  3578. }
  3579. function insertNodeAt(fatherNode, node, position) {
  3580. var refNode = position === 0 ? fatherNode.children[0] : fatherNode.children[position - 1].nextSibling;
  3581. fatherNode.insertBefore(node, refNode);
  3582. }
  3583. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba")))
  3584. /***/ }),
  3585. /***/ "c69a":
  3586. /***/ (function(module, exports, __webpack_require__) {
  3587. module.exports = !__webpack_require__("9e1e") && !__webpack_require__("79e5")(function () {
  3588. return Object.defineProperty(__webpack_require__("230e")('div'), 'a', { get: function () { return 7; } }).a != 7;
  3589. });
  3590. /***/ }),
  3591. /***/ "c8ba":
  3592. /***/ (function(module, exports) {
  3593. var g;
  3594. // This works in non-strict mode
  3595. g = (function() {
  3596. return this;
  3597. })();
  3598. try {
  3599. // This works if eval is allowed (see CSP)
  3600. g = g || new Function("return this")();
  3601. } catch (e) {
  3602. // This works if the window reference is available
  3603. if (typeof window === "object") g = window;
  3604. }
  3605. // g can still be undefined, but nothing to do about it...
  3606. // We return undefined, instead of nothing here, so it's
  3607. // easier to handle this case. if(!global) { ...}
  3608. module.exports = g;
  3609. /***/ }),
  3610. /***/ "ca5a":
  3611. /***/ (function(module, exports) {
  3612. var id = 0;
  3613. var px = Math.random();
  3614. module.exports = function (key) {
  3615. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  3616. };
  3617. /***/ }),
  3618. /***/ "cadf":
  3619. /***/ (function(module, exports, __webpack_require__) {
  3620. "use strict";
  3621. var addToUnscopables = __webpack_require__("9c6c");
  3622. var step = __webpack_require__("d53b");
  3623. var Iterators = __webpack_require__("84f2");
  3624. var toIObject = __webpack_require__("6821");
  3625. // 22.1.3.4 Array.prototype.entries()
  3626. // 22.1.3.13 Array.prototype.keys()
  3627. // 22.1.3.29 Array.prototype.values()
  3628. // 22.1.3.30 Array.prototype[@@iterator]()
  3629. module.exports = __webpack_require__("01f9")(Array, 'Array', function (iterated, kind) {
  3630. this._t = toIObject(iterated); // target
  3631. this._i = 0; // next index
  3632. this._k = kind; // kind
  3633. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  3634. }, function () {
  3635. var O = this._t;
  3636. var kind = this._k;
  3637. var index = this._i++;
  3638. if (!O || index >= O.length) {
  3639. this._t = undefined;
  3640. return step(1);
  3641. }
  3642. if (kind == 'keys') return step(0, index);
  3643. if (kind == 'values') return step(0, O[index]);
  3644. return step(0, [index, O[index]]);
  3645. }, 'values');
  3646. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  3647. Iterators.Arguments = Iterators.Array;
  3648. addToUnscopables('keys');
  3649. addToUnscopables('values');
  3650. addToUnscopables('entries');
  3651. /***/ }),
  3652. /***/ "cb7c":
  3653. /***/ (function(module, exports, __webpack_require__) {
  3654. var isObject = __webpack_require__("d3f4");
  3655. module.exports = function (it) {
  3656. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  3657. return it;
  3658. };
  3659. /***/ }),
  3660. /***/ "ce10":
  3661. /***/ (function(module, exports, __webpack_require__) {
  3662. var has = __webpack_require__("69a8");
  3663. var toIObject = __webpack_require__("6821");
  3664. var arrayIndexOf = __webpack_require__("c366")(false);
  3665. var IE_PROTO = __webpack_require__("613b")('IE_PROTO');
  3666. module.exports = function (object, names) {
  3667. var O = toIObject(object);
  3668. var i = 0;
  3669. var result = [];
  3670. var key;
  3671. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  3672. // Don't enum bug & hidden keys
  3673. while (names.length > i) if (has(O, key = names[i++])) {
  3674. ~arrayIndexOf(result, key) || result.push(key);
  3675. }
  3676. return result;
  3677. };
  3678. /***/ }),
  3679. /***/ "d2c8":
  3680. /***/ (function(module, exports, __webpack_require__) {
  3681. // helper for String#{startsWith, endsWith, includes}
  3682. var isRegExp = __webpack_require__("aae3");
  3683. var defined = __webpack_require__("be13");
  3684. module.exports = function (that, searchString, NAME) {
  3685. if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
  3686. return String(defined(that));
  3687. };
  3688. /***/ }),
  3689. /***/ "d3f4":
  3690. /***/ (function(module, exports) {
  3691. module.exports = function (it) {
  3692. return typeof it === 'object' ? it !== null : typeof it === 'function';
  3693. };
  3694. /***/ }),
  3695. /***/ "d53b":
  3696. /***/ (function(module, exports) {
  3697. module.exports = function (done, value) {
  3698. return { value: value, done: !!done };
  3699. };
  3700. /***/ }),
  3701. /***/ "d8e8":
  3702. /***/ (function(module, exports) {
  3703. module.exports = function (it) {
  3704. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  3705. return it;
  3706. };
  3707. /***/ }),
  3708. /***/ "e11e":
  3709. /***/ (function(module, exports) {
  3710. // IE 8- don't enum bug keys
  3711. module.exports = (
  3712. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  3713. ).split(',');
  3714. /***/ }),
  3715. /***/ "f559":
  3716. /***/ (function(module, exports, __webpack_require__) {
  3717. "use strict";
  3718. // 21.1.3.18 String.prototype.startsWith(searchString [, position ])
  3719. var $export = __webpack_require__("5ca1");
  3720. var toLength = __webpack_require__("9def");
  3721. var context = __webpack_require__("d2c8");
  3722. var STARTS_WITH = 'startsWith';
  3723. var $startsWith = ''[STARTS_WITH];
  3724. $export($export.P + $export.F * __webpack_require__("5147")(STARTS_WITH), 'String', {
  3725. startsWith: function startsWith(searchString /* , position = 0 */) {
  3726. var that = context(this, searchString, STARTS_WITH);
  3727. var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  3728. var search = String(searchString);
  3729. return $startsWith
  3730. ? $startsWith.call(that, search, index)
  3731. : that.slice(index, index + search.length) === search;
  3732. }
  3733. });
  3734. /***/ }),
  3735. /***/ "f6fd":
  3736. /***/ (function(module, exports) {
  3737. // document.currentScript polyfill by Adam Miller
  3738. // MIT license
  3739. (function(document){
  3740. var currentScript = "currentScript",
  3741. scripts = document.getElementsByTagName('script'); // Live NodeList collection
  3742. // If browser needs currentScript polyfill, add get currentScript() to the document object
  3743. if (!(currentScript in document)) {
  3744. Object.defineProperty(document, currentScript, {
  3745. get: function(){
  3746. // IE 6-10 supports script readyState
  3747. // IE 10+ support stack trace
  3748. try { throw new Error(); }
  3749. catch (err) {
  3750. // Find the second match for the "at" string to get file src url from stack.
  3751. // Specifically works with the format of stack traces in IE.
  3752. var i, res = ((/.*at [^\(]*\((.*):.+:.+\)$/ig).exec(err.stack) || [false])[1];
  3753. // For all scripts on the page, if src matches or if ready state is interactive, return the script tag
  3754. for(i in scripts){
  3755. if(scripts[i].src == res || scripts[i].readyState == "interactive"){
  3756. return scripts[i];
  3757. }
  3758. }
  3759. // If no match, return null
  3760. return null;
  3761. }
  3762. }
  3763. });
  3764. }
  3765. })(document);
  3766. /***/ }),
  3767. /***/ "f751":
  3768. /***/ (function(module, exports, __webpack_require__) {
  3769. // 19.1.3.1 Object.assign(target, source)
  3770. var $export = __webpack_require__("5ca1");
  3771. $export($export.S + $export.F, 'Object', { assign: __webpack_require__("7333") });
  3772. /***/ }),
  3773. /***/ "fa5b":
  3774. /***/ (function(module, exports, __webpack_require__) {
  3775. module.exports = __webpack_require__("5537")('native-function-to-string', Function.toString);
  3776. /***/ }),
  3777. /***/ "fab2":
  3778. /***/ (function(module, exports, __webpack_require__) {
  3779. var document = __webpack_require__("7726").document;
  3780. module.exports = document && document.documentElement;
  3781. /***/ }),
  3782. /***/ "fb15":
  3783. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3784. "use strict";
  3785. // ESM COMPAT FLAG
  3786. __webpack_require__.r(__webpack_exports__);
  3787. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
  3788. // This file is imported into lib/wc client bundles.
  3789. if (typeof window !== 'undefined') {
  3790. if (true) {
  3791. __webpack_require__("f6fd")
  3792. }
  3793. var setPublicPath_i
  3794. if ((setPublicPath_i = window.document.currentScript) && (setPublicPath_i = setPublicPath_i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))) {
  3795. __webpack_require__.p = setPublicPath_i[1] // eslint-disable-line
  3796. }
  3797. }
  3798. // Indicate to webpack that this file can be concatenated
  3799. /* harmony default export */ var setPublicPath = (null);
  3800. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.assign.js
  3801. var es6_object_assign = __webpack_require__("f751");
  3802. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.string.starts-with.js
  3803. var es6_string_starts_with = __webpack_require__("f559");
  3804. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom.iterable.js
  3805. var web_dom_iterable = __webpack_require__("ac6a");
  3806. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.array.iterator.js
  3807. var es6_array_iterator = __webpack_require__("cadf");
  3808. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.object.keys.js
  3809. var es6_object_keys = __webpack_require__("456d");
  3810. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
  3811. function _arrayWithHoles(arr) {
  3812. if (Array.isArray(arr)) return arr;
  3813. }
  3814. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
  3815. function _iterableToArrayLimit(arr, i) {
  3816. if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
  3817. var _arr = [];
  3818. var _n = true;
  3819. var _d = false;
  3820. var _e = undefined;
  3821. try {
  3822. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  3823. _arr.push(_s.value);
  3824. if (i && _arr.length === i) break;
  3825. }
  3826. } catch (err) {
  3827. _d = true;
  3828. _e = err;
  3829. } finally {
  3830. try {
  3831. if (!_n && _i["return"] != null) _i["return"]();
  3832. } finally {
  3833. if (_d) throw _e;
  3834. }
  3835. }
  3836. return _arr;
  3837. }
  3838. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
  3839. function _arrayLikeToArray(arr, len) {
  3840. if (len == null || len > arr.length) len = arr.length;
  3841. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  3842. arr2[i] = arr[i];
  3843. }
  3844. return arr2;
  3845. }
  3846. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
  3847. function _unsupportedIterableToArray(o, minLen) {
  3848. if (!o) return;
  3849. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  3850. var n = Object.prototype.toString.call(o).slice(8, -1);
  3851. if (n === "Object" && o.constructor) n = o.constructor.name;
  3852. if (n === "Map" || n === "Set") return Array.from(o);
  3853. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  3854. }
  3855. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
  3856. function _nonIterableRest() {
  3857. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  3858. }
  3859. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
  3860. function _slicedToArray(arr, i) {
  3861. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  3862. }
  3863. // EXTERNAL MODULE: ./node_modules/core-js/modules/es7.array.includes.js
  3864. var es7_array_includes = __webpack_require__("6762");
  3865. // EXTERNAL MODULE: ./node_modules/core-js/modules/es6.string.includes.js
  3866. var es6_string_includes = __webpack_require__("2fdb");
  3867. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
  3868. function _arrayWithoutHoles(arr) {
  3869. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  3870. }
  3871. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
  3872. function _iterableToArray(iter) {
  3873. if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
  3874. }
  3875. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
  3876. function _nonIterableSpread() {
  3877. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  3878. }
  3879. // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
  3880. function _toConsumableArray(arr) {
  3881. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  3882. }
  3883. // EXTERNAL MODULE: external {"commonjs":"sortablejs","commonjs2":"sortablejs","amd":"sortablejs","root":"Sortable"}
  3884. var external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_ = __webpack_require__("a352");
  3885. var external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_);
  3886. // EXTERNAL MODULE: ./src/util/helper.js
  3887. var helper = __webpack_require__("c649");
  3888. // CONCATENATED MODULE: ./src/vuedraggable.js
  3889. function buildAttribute(object, propName, value) {
  3890. if (value === undefined) {
  3891. return object;
  3892. }
  3893. object = object || {};
  3894. object[propName] = value;
  3895. return object;
  3896. }
  3897. function computeVmIndex(vnodes, element) {
  3898. return vnodes.map(function (elt) {
  3899. return elt.elm;
  3900. }).indexOf(element);
  3901. }
  3902. function _computeIndexes(slots, children, isTransition, footerOffset) {
  3903. if (!slots) {
  3904. return [];
  3905. }
  3906. var elmFromNodes = slots.map(function (elt) {
  3907. return elt.elm;
  3908. });
  3909. var footerIndex = children.length - footerOffset;
  3910. var rawIndexes = _toConsumableArray(children).map(function (elt, idx) {
  3911. return idx >= footerIndex ? elmFromNodes.length : elmFromNodes.indexOf(elt);
  3912. });
  3913. return isTransition ? rawIndexes.filter(function (ind) {
  3914. return ind !== -1;
  3915. }) : rawIndexes;
  3916. }
  3917. function emit(evtName, evtData) {
  3918. var _this = this;
  3919. this.$nextTick(function () {
  3920. return _this.$emit(evtName.toLowerCase(), evtData);
  3921. });
  3922. }
  3923. function delegateAndEmit(evtName) {
  3924. var _this2 = this;
  3925. return function (evtData) {
  3926. if (_this2.realList !== null) {
  3927. _this2["onDrag" + evtName](evtData);
  3928. }
  3929. emit.call(_this2, evtName, evtData);
  3930. };
  3931. }
  3932. function isTransitionName(name) {
  3933. return ["transition-group", "TransitionGroup"].includes(name);
  3934. }
  3935. function vuedraggable_isTransition(slots) {
  3936. if (!slots || slots.length !== 1) {
  3937. return false;
  3938. }
  3939. var _slots = _slicedToArray(slots, 1),
  3940. componentOptions = _slots[0].componentOptions;
  3941. if (!componentOptions) {
  3942. return false;
  3943. }
  3944. return isTransitionName(componentOptions.tag);
  3945. }
  3946. function getSlot(slot, scopedSlot, key) {
  3947. return slot[key] || (scopedSlot[key] ? scopedSlot[key]() : undefined);
  3948. }
  3949. function computeChildrenAndOffsets(children, slot, scopedSlot) {
  3950. var headerOffset = 0;
  3951. var footerOffset = 0;
  3952. var header = getSlot(slot, scopedSlot, "header");
  3953. if (header) {
  3954. headerOffset = header.length;
  3955. children = children ? [].concat(_toConsumableArray(header), _toConsumableArray(children)) : _toConsumableArray(header);
  3956. }
  3957. var footer = getSlot(slot, scopedSlot, "footer");
  3958. if (footer) {
  3959. footerOffset = footer.length;
  3960. children = children ? [].concat(_toConsumableArray(children), _toConsumableArray(footer)) : _toConsumableArray(footer);
  3961. }
  3962. return {
  3963. children: children,
  3964. headerOffset: headerOffset,
  3965. footerOffset: footerOffset
  3966. };
  3967. }
  3968. function getComponentAttributes($attrs, componentData) {
  3969. var attributes = null;
  3970. var update = function update(name, value) {
  3971. attributes = buildAttribute(attributes, name, value);
  3972. };
  3973. var attrs = Object.keys($attrs).filter(function (key) {
  3974. return key === "id" || key.startsWith("data-");
  3975. }).reduce(function (res, key) {
  3976. res[key] = $attrs[key];
  3977. return res;
  3978. }, {});
  3979. update("attrs", attrs);
  3980. if (!componentData) {
  3981. return attributes;
  3982. }
  3983. var on = componentData.on,
  3984. props = componentData.props,
  3985. componentDataAttrs = componentData.attrs;
  3986. update("on", on);
  3987. update("props", props);
  3988. Object.assign(attributes.attrs, componentDataAttrs);
  3989. return attributes;
  3990. }
  3991. var eventsListened = ["Start", "Add", "Remove", "Update", "End"];
  3992. var eventsToEmit = ["Choose", "Unchoose", "Sort", "Filter", "Clone"];
  3993. var readonlyProperties = ["Move"].concat(eventsListened, eventsToEmit).map(function (evt) {
  3994. return "on" + evt;
  3995. });
  3996. var draggingElement = null;
  3997. var props = {
  3998. options: Object,
  3999. list: {
  4000. type: Array,
  4001. required: false,
  4002. default: null
  4003. },
  4004. value: {
  4005. type: Array,
  4006. required: false,
  4007. default: null
  4008. },
  4009. noTransitionOnDrag: {
  4010. type: Boolean,
  4011. default: false
  4012. },
  4013. clone: {
  4014. type: Function,
  4015. default: function _default(original) {
  4016. return original;
  4017. }
  4018. },
  4019. element: {
  4020. type: String,
  4021. default: "div"
  4022. },
  4023. tag: {
  4024. type: String,
  4025. default: null
  4026. },
  4027. move: {
  4028. type: Function,
  4029. default: null
  4030. },
  4031. componentData: {
  4032. type: Object,
  4033. required: false,
  4034. default: null
  4035. }
  4036. };
  4037. var draggableComponent = {
  4038. name: "draggable",
  4039. inheritAttrs: false,
  4040. props: props,
  4041. data: function data() {
  4042. return {
  4043. transitionMode: false,
  4044. noneFunctionalComponentMode: false
  4045. };
  4046. },
  4047. render: function render(h) {
  4048. var slots = this.$slots.default;
  4049. this.transitionMode = vuedraggable_isTransition(slots);
  4050. var _computeChildrenAndOf = computeChildrenAndOffsets(slots, this.$slots, this.$scopedSlots),
  4051. children = _computeChildrenAndOf.children,
  4052. headerOffset = _computeChildrenAndOf.headerOffset,
  4053. footerOffset = _computeChildrenAndOf.footerOffset;
  4054. this.headerOffset = headerOffset;
  4055. this.footerOffset = footerOffset;
  4056. var attributes = getComponentAttributes(this.$attrs, this.componentData);
  4057. return h(this.getTag(), attributes, children);
  4058. },
  4059. created: function created() {
  4060. if (this.list !== null && this.value !== null) {
  4061. helper["b" /* console */].error("Value and list props are mutually exclusive! Please set one or another.");
  4062. }
  4063. if (this.element !== "div") {
  4064. helper["b" /* console */].warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props");
  4065. }
  4066. if (this.options !== undefined) {
  4067. helper["b" /* console */].warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props");
  4068. }
  4069. },
  4070. mounted: function mounted() {
  4071. var _this3 = this;
  4072. this.noneFunctionalComponentMode = this.getTag().toLowerCase() !== this.$el.nodeName.toLowerCase() && !this.getIsFunctional();
  4073. if (this.noneFunctionalComponentMode && this.transitionMode) {
  4074. throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));
  4075. }
  4076. var optionsAdded = {};
  4077. eventsListened.forEach(function (elt) {
  4078. optionsAdded["on" + elt] = delegateAndEmit.call(_this3, elt);
  4079. });
  4080. eventsToEmit.forEach(function (elt) {
  4081. optionsAdded["on" + elt] = emit.bind(_this3, elt);
  4082. });
  4083. var attributes = Object.keys(this.$attrs).reduce(function (res, key) {
  4084. res[Object(helper["a" /* camelize */])(key)] = _this3.$attrs[key];
  4085. return res;
  4086. }, {});
  4087. var options = Object.assign({}, this.options, attributes, optionsAdded, {
  4088. onMove: function onMove(evt, originalEvent) {
  4089. return _this3.onDragMove(evt, originalEvent);
  4090. }
  4091. });
  4092. !("draggable" in options) && (options.draggable = ">*");
  4093. this._sortable = new external_commonjs_sortablejs_commonjs2_sortablejs_amd_sortablejs_root_Sortable_default.a(this.rootContainer, options);
  4094. this.computeIndexes();
  4095. },
  4096. beforeDestroy: function beforeDestroy() {
  4097. if (this._sortable !== undefined) this._sortable.destroy();
  4098. },
  4099. computed: {
  4100. rootContainer: function rootContainer() {
  4101. return this.transitionMode ? this.$el.children[0] : this.$el;
  4102. },
  4103. realList: function realList() {
  4104. return this.list ? this.list : this.value;
  4105. }
  4106. },
  4107. watch: {
  4108. options: {
  4109. handler: function handler(newOptionValue) {
  4110. this.updateOptions(newOptionValue);
  4111. },
  4112. deep: true
  4113. },
  4114. $attrs: {
  4115. handler: function handler(newOptionValue) {
  4116. this.updateOptions(newOptionValue);
  4117. },
  4118. deep: true
  4119. },
  4120. realList: function realList() {
  4121. this.computeIndexes();
  4122. }
  4123. },
  4124. methods: {
  4125. getIsFunctional: function getIsFunctional() {
  4126. var fnOptions = this._vnode.fnOptions;
  4127. return fnOptions && fnOptions.functional;
  4128. },
  4129. getTag: function getTag() {
  4130. return this.tag || this.element;
  4131. },
  4132. updateOptions: function updateOptions(newOptionValue) {
  4133. for (var property in newOptionValue) {
  4134. var value = Object(helper["a" /* camelize */])(property);
  4135. if (readonlyProperties.indexOf(value) === -1) {
  4136. this._sortable.option(value, newOptionValue[property]);
  4137. }
  4138. }
  4139. },
  4140. getChildrenNodes: function getChildrenNodes() {
  4141. if (this.noneFunctionalComponentMode) {
  4142. return this.$children[0].$slots.default;
  4143. }
  4144. var rawNodes = this.$slots.default;
  4145. return this.transitionMode ? rawNodes[0].child.$slots.default : rawNodes;
  4146. },
  4147. computeIndexes: function computeIndexes() {
  4148. var _this4 = this;
  4149. this.$nextTick(function () {
  4150. _this4.visibleIndexes = _computeIndexes(_this4.getChildrenNodes(), _this4.rootContainer.children, _this4.transitionMode, _this4.footerOffset);
  4151. });
  4152. },
  4153. getUnderlyingVm: function getUnderlyingVm(htmlElt) {
  4154. var index = computeVmIndex(this.getChildrenNodes() || [], htmlElt);
  4155. if (index === -1) {
  4156. //Edge case during move callback: related element might be
  4157. //an element different from collection
  4158. return null;
  4159. }
  4160. var element = this.realList[index];
  4161. return {
  4162. index: index,
  4163. element: element
  4164. };
  4165. },
  4166. getUnderlyingPotencialDraggableComponent: function getUnderlyingPotencialDraggableComponent(_ref) {
  4167. var vue = _ref.__vue__;
  4168. if (!vue || !vue.$options || !isTransitionName(vue.$options._componentTag)) {
  4169. if (!("realList" in vue) && vue.$children.length === 1 && "realList" in vue.$children[0]) return vue.$children[0];
  4170. return vue;
  4171. }
  4172. return vue.$parent;
  4173. },
  4174. emitChanges: function emitChanges(evt) {
  4175. var _this5 = this;
  4176. this.$nextTick(function () {
  4177. _this5.$emit("change", evt);
  4178. });
  4179. },
  4180. alterList: function alterList(onList) {
  4181. if (this.list) {
  4182. onList(this.list);
  4183. return;
  4184. }
  4185. var newList = _toConsumableArray(this.value);
  4186. onList(newList);
  4187. this.$emit("input", newList);
  4188. },
  4189. spliceList: function spliceList() {
  4190. var _arguments = arguments;
  4191. var spliceList = function spliceList(list) {
  4192. return list.splice.apply(list, _toConsumableArray(_arguments));
  4193. };
  4194. this.alterList(spliceList);
  4195. },
  4196. updatePosition: function updatePosition(oldIndex, newIndex) {
  4197. var updatePosition = function updatePosition(list) {
  4198. return list.splice(newIndex, 0, list.splice(oldIndex, 1)[0]);
  4199. };
  4200. this.alterList(updatePosition);
  4201. },
  4202. getRelatedContextFromMoveEvent: function getRelatedContextFromMoveEvent(_ref2) {
  4203. var to = _ref2.to,
  4204. related = _ref2.related;
  4205. var component = this.getUnderlyingPotencialDraggableComponent(to);
  4206. if (!component) {
  4207. return {
  4208. component: component
  4209. };
  4210. }
  4211. var list = component.realList;
  4212. var context = {
  4213. list: list,
  4214. component: component
  4215. };
  4216. if (to !== related && list && component.getUnderlyingVm) {
  4217. var destination = component.getUnderlyingVm(related);
  4218. if (destination) {
  4219. return Object.assign(destination, context);
  4220. }
  4221. }
  4222. return context;
  4223. },
  4224. getVmIndex: function getVmIndex(domIndex) {
  4225. var indexes = this.visibleIndexes;
  4226. var numberIndexes = indexes.length;
  4227. return domIndex > numberIndexes - 1 ? numberIndexes : indexes[domIndex];
  4228. },
  4229. getComponent: function getComponent() {
  4230. return this.$slots.default[0].componentInstance;
  4231. },
  4232. resetTransitionData: function resetTransitionData(index) {
  4233. if (!this.noTransitionOnDrag || !this.transitionMode) {
  4234. return;
  4235. }
  4236. var nodes = this.getChildrenNodes();
  4237. nodes[index].data = null;
  4238. var transitionContainer = this.getComponent();
  4239. transitionContainer.children = [];
  4240. transitionContainer.kept = undefined;
  4241. },
  4242. onDragStart: function onDragStart(evt) {
  4243. this.context = this.getUnderlyingVm(evt.item);
  4244. evt.item._underlying_vm_ = this.clone(this.context.element);
  4245. draggingElement = evt.item;
  4246. },
  4247. onDragAdd: function onDragAdd(evt) {
  4248. var element = evt.item._underlying_vm_;
  4249. if (element === undefined) {
  4250. return;
  4251. }
  4252. Object(helper["d" /* removeNode */])(evt.item);
  4253. var newIndex = this.getVmIndex(evt.newIndex);
  4254. this.spliceList(newIndex, 0, element);
  4255. this.computeIndexes();
  4256. var added = {
  4257. element: element,
  4258. newIndex: newIndex
  4259. };
  4260. this.emitChanges({
  4261. added: added
  4262. });
  4263. },
  4264. onDragRemove: function onDragRemove(evt) {
  4265. Object(helper["c" /* insertNodeAt */])(this.rootContainer, evt.item, evt.oldIndex);
  4266. if (evt.pullMode === "clone") {
  4267. Object(helper["d" /* removeNode */])(evt.clone);
  4268. return;
  4269. }
  4270. var oldIndex = this.context.index;
  4271. this.spliceList(oldIndex, 1);
  4272. var removed = {
  4273. element: this.context.element,
  4274. oldIndex: oldIndex
  4275. };
  4276. this.resetTransitionData(oldIndex);
  4277. this.emitChanges({
  4278. removed: removed
  4279. });
  4280. },
  4281. onDragUpdate: function onDragUpdate(evt) {
  4282. Object(helper["d" /* removeNode */])(evt.item);
  4283. Object(helper["c" /* insertNodeAt */])(evt.from, evt.item, evt.oldIndex);
  4284. var oldIndex = this.context.index;
  4285. var newIndex = this.getVmIndex(evt.newIndex);
  4286. this.updatePosition(oldIndex, newIndex);
  4287. var moved = {
  4288. element: this.context.element,
  4289. oldIndex: oldIndex,
  4290. newIndex: newIndex
  4291. };
  4292. this.emitChanges({
  4293. moved: moved
  4294. });
  4295. },
  4296. updateProperty: function updateProperty(evt, propertyName) {
  4297. evt.hasOwnProperty(propertyName) && (evt[propertyName] += this.headerOffset);
  4298. },
  4299. computeFutureIndex: function computeFutureIndex(relatedContext, evt) {
  4300. if (!relatedContext.element) {
  4301. return 0;
  4302. }
  4303. var domChildren = _toConsumableArray(evt.to.children).filter(function (el) {
  4304. return el.style["display"] !== "none";
  4305. });
  4306. var currentDOMIndex = domChildren.indexOf(evt.related);
  4307. var currentIndex = relatedContext.component.getVmIndex(currentDOMIndex);
  4308. var draggedInList = domChildren.indexOf(draggingElement) !== -1;
  4309. return draggedInList || !evt.willInsertAfter ? currentIndex : currentIndex + 1;
  4310. },
  4311. onDragMove: function onDragMove(evt, originalEvent) {
  4312. var onMove = this.move;
  4313. if (!onMove || !this.realList) {
  4314. return true;
  4315. }
  4316. var relatedContext = this.getRelatedContextFromMoveEvent(evt);
  4317. var draggedContext = this.context;
  4318. var futureIndex = this.computeFutureIndex(relatedContext, evt);
  4319. Object.assign(draggedContext, {
  4320. futureIndex: futureIndex
  4321. });
  4322. var sendEvt = Object.assign({}, evt, {
  4323. relatedContext: relatedContext,
  4324. draggedContext: draggedContext
  4325. });
  4326. return onMove(sendEvt, originalEvent);
  4327. },
  4328. onDragEnd: function onDragEnd() {
  4329. this.computeIndexes();
  4330. draggingElement = null;
  4331. }
  4332. }
  4333. };
  4334. if (typeof window !== "undefined" && "Vue" in window) {
  4335. window.Vue.component("draggable", draggableComponent);
  4336. }
  4337. /* harmony default export */ var vuedraggable = (draggableComponent);
  4338. // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
  4339. /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (vuedraggable);
  4340. /***/ })
  4341. /******/ })["default"];
  4342. });
  4343. //# sourceMappingURL=vuedraggable.umd.js.map
  4344. /***/ }),
  4345. /* 52 */
  4346. /***/ (function(module, exports) {
  4347. // shim for using process in browser
  4348. var process = module.exports = {};
  4349. // cached from whatever global is present so that test runners that stub it
  4350. // don't break things. But we need to wrap it in a try catch in case it is
  4351. // wrapped in strict mode code which doesn't define any globals. It's inside a
  4352. // function because try/catches deoptimize in certain engines.
  4353. var cachedSetTimeout;
  4354. var cachedClearTimeout;
  4355. function defaultSetTimout() {
  4356. throw new Error('setTimeout has not been defined');
  4357. }
  4358. function defaultClearTimeout () {
  4359. throw new Error('clearTimeout has not been defined');
  4360. }
  4361. (function () {
  4362. try {
  4363. if (typeof setTimeout === 'function') {
  4364. cachedSetTimeout = setTimeout;
  4365. } else {
  4366. cachedSetTimeout = defaultSetTimout;
  4367. }
  4368. } catch (e) {
  4369. cachedSetTimeout = defaultSetTimout;
  4370. }
  4371. try {
  4372. if (typeof clearTimeout === 'function') {
  4373. cachedClearTimeout = clearTimeout;
  4374. } else {
  4375. cachedClearTimeout = defaultClearTimeout;
  4376. }
  4377. } catch (e) {
  4378. cachedClearTimeout = defaultClearTimeout;
  4379. }
  4380. } ())
  4381. function runTimeout(fun) {
  4382. if (cachedSetTimeout === setTimeout) {
  4383. //normal enviroments in sane situations
  4384. return setTimeout(fun, 0);
  4385. }
  4386. // if setTimeout wasn't available but was latter defined
  4387. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  4388. cachedSetTimeout = setTimeout;
  4389. return setTimeout(fun, 0);
  4390. }
  4391. try {
  4392. // when when somebody has screwed with setTimeout but no I.E. maddness
  4393. return cachedSetTimeout(fun, 0);
  4394. } catch(e){
  4395. try {
  4396. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  4397. return cachedSetTimeout.call(null, fun, 0);
  4398. } catch(e){
  4399. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  4400. return cachedSetTimeout.call(this, fun, 0);
  4401. }
  4402. }
  4403. }
  4404. function runClearTimeout(marker) {
  4405. if (cachedClearTimeout === clearTimeout) {
  4406. //normal enviroments in sane situations
  4407. return clearTimeout(marker);
  4408. }
  4409. // if clearTimeout wasn't available but was latter defined
  4410. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  4411. cachedClearTimeout = clearTimeout;
  4412. return clearTimeout(marker);
  4413. }
  4414. try {
  4415. // when when somebody has screwed with setTimeout but no I.E. maddness
  4416. return cachedClearTimeout(marker);
  4417. } catch (e){
  4418. try {
  4419. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  4420. return cachedClearTimeout.call(null, marker);
  4421. } catch (e){
  4422. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  4423. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  4424. return cachedClearTimeout.call(this, marker);
  4425. }
  4426. }
  4427. }
  4428. var queue = [];
  4429. var draining = false;
  4430. var currentQueue;
  4431. var queueIndex = -1;
  4432. function cleanUpNextTick() {
  4433. if (!draining || !currentQueue) {
  4434. return;
  4435. }
  4436. draining = false;
  4437. if (currentQueue.length) {
  4438. queue = currentQueue.concat(queue);
  4439. } else {
  4440. queueIndex = -1;
  4441. }
  4442. if (queue.length) {
  4443. drainQueue();
  4444. }
  4445. }
  4446. function drainQueue() {
  4447. if (draining) {
  4448. return;
  4449. }
  4450. var timeout = runTimeout(cleanUpNextTick);
  4451. draining = true;
  4452. var len = queue.length;
  4453. while(len) {
  4454. currentQueue = queue;
  4455. queue = [];
  4456. while (++queueIndex < len) {
  4457. if (currentQueue) {
  4458. currentQueue[queueIndex].run();
  4459. }
  4460. }
  4461. queueIndex = -1;
  4462. len = queue.length;
  4463. }
  4464. currentQueue = null;
  4465. draining = false;
  4466. runClearTimeout(timeout);
  4467. }
  4468. process.nextTick = function (fun) {
  4469. var args = new Array(arguments.length - 1);
  4470. if (arguments.length > 1) {
  4471. for (var i = 1; i < arguments.length; i++) {
  4472. args[i - 1] = arguments[i];
  4473. }
  4474. }
  4475. queue.push(new Item(fun, args));
  4476. if (queue.length === 1 && !draining) {
  4477. runTimeout(drainQueue);
  4478. }
  4479. };
  4480. // v8 likes predictible objects
  4481. function Item(fun, array) {
  4482. this.fun = fun;
  4483. this.array = array;
  4484. }
  4485. Item.prototype.run = function () {
  4486. this.fun.apply(null, this.array);
  4487. };
  4488. process.title = 'browser';
  4489. process.browser = true;
  4490. process.env = {};
  4491. process.argv = [];
  4492. process.version = ''; // empty string to avoid regexp issues
  4493. process.versions = {};
  4494. function noop() {}
  4495. process.on = noop;
  4496. process.addListener = noop;
  4497. process.once = noop;
  4498. process.off = noop;
  4499. process.removeListener = noop;
  4500. process.removeAllListeners = noop;
  4501. process.emit = noop;
  4502. process.prependListener = noop;
  4503. process.prependOnceListener = noop;
  4504. process.listeners = function (name) { return [] }
  4505. process.binding = function (name) {
  4506. throw new Error('process.binding is not supported');
  4507. };
  4508. process.cwd = function () { return '/' };
  4509. process.chdir = function (dir) {
  4510. throw new Error('process.chdir is not supported');
  4511. };
  4512. process.umask = function() { return 0; };
  4513. /***/ }),
  4514. /* 53 */
  4515. /***/ (function(module, exports, __webpack_require__) {
  4516. /* WEBPACK VAR INJECTION */(function(global, setImmediate) {/**
  4517. * Copyright (c) Tiny Technologies, Inc. All rights reserved.
  4518. * Licensed under the LGPL or a commercial license.
  4519. * For LGPL see License.txt in the project root for license information.
  4520. * For commercial licenses see https://www.tiny.cloud/
  4521. *
  4522. * Version: 5.10.3 (2022-02-09)
  4523. */
  4524. (function () {
  4525. 'use strict';
  4526. var typeOf$1 = function (x) {
  4527. if (x === null) {
  4528. return 'null';
  4529. }
  4530. if (x === undefined) {
  4531. return 'undefined';
  4532. }
  4533. var t = typeof x;
  4534. if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
  4535. return 'array';
  4536. }
  4537. if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
  4538. return 'string';
  4539. }
  4540. return t;
  4541. };
  4542. var isEquatableType = function (x) {
  4543. return [
  4544. 'undefined',
  4545. 'boolean',
  4546. 'number',
  4547. 'string',
  4548. 'function',
  4549. 'xml',
  4550. 'null'
  4551. ].indexOf(x) !== -1;
  4552. };
  4553. var sort$1 = function (xs, compareFn) {
  4554. var clone = Array.prototype.slice.call(xs);
  4555. return clone.sort(compareFn);
  4556. };
  4557. var contramap = function (eqa, f) {
  4558. return eq$2(function (x, y) {
  4559. return eqa.eq(f(x), f(y));
  4560. });
  4561. };
  4562. var eq$2 = function (f) {
  4563. return { eq: f };
  4564. };
  4565. var tripleEq = eq$2(function (x, y) {
  4566. return x === y;
  4567. });
  4568. var eqString = tripleEq;
  4569. var eqArray = function (eqa) {
  4570. return eq$2(function (x, y) {
  4571. if (x.length !== y.length) {
  4572. return false;
  4573. }
  4574. var len = x.length;
  4575. for (var i = 0; i < len; i++) {
  4576. if (!eqa.eq(x[i], y[i])) {
  4577. return false;
  4578. }
  4579. }
  4580. return true;
  4581. });
  4582. };
  4583. var eqSortedArray = function (eqa, compareFn) {
  4584. return contramap(eqArray(eqa), function (xs) {
  4585. return sort$1(xs, compareFn);
  4586. });
  4587. };
  4588. var eqRecord = function (eqa) {
  4589. return eq$2(function (x, y) {
  4590. var kx = Object.keys(x);
  4591. var ky = Object.keys(y);
  4592. if (!eqSortedArray(eqString).eq(kx, ky)) {
  4593. return false;
  4594. }
  4595. var len = kx.length;
  4596. for (var i = 0; i < len; i++) {
  4597. var q = kx[i];
  4598. if (!eqa.eq(x[q], y[q])) {
  4599. return false;
  4600. }
  4601. }
  4602. return true;
  4603. });
  4604. };
  4605. var eqAny = eq$2(function (x, y) {
  4606. if (x === y) {
  4607. return true;
  4608. }
  4609. var tx = typeOf$1(x);
  4610. var ty = typeOf$1(y);
  4611. if (tx !== ty) {
  4612. return false;
  4613. }
  4614. if (isEquatableType(tx)) {
  4615. return x === y;
  4616. } else if (tx === 'array') {
  4617. return eqArray(eqAny).eq(x, y);
  4618. } else if (tx === 'object') {
  4619. return eqRecord(eqAny).eq(x, y);
  4620. }
  4621. return false;
  4622. });
  4623. var typeOf = function (x) {
  4624. var t = typeof x;
  4625. if (x === null) {
  4626. return 'null';
  4627. } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
  4628. return 'array';
  4629. } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
  4630. return 'string';
  4631. } else {
  4632. return t;
  4633. }
  4634. };
  4635. var isType$1 = function (type) {
  4636. return function (value) {
  4637. return typeOf(value) === type;
  4638. };
  4639. };
  4640. var isSimpleType = function (type) {
  4641. return function (value) {
  4642. return typeof value === type;
  4643. };
  4644. };
  4645. var eq$1 = function (t) {
  4646. return function (a) {
  4647. return t === a;
  4648. };
  4649. };
  4650. var isString$1 = isType$1('string');
  4651. var isObject = isType$1('object');
  4652. var isArray$1 = isType$1('array');
  4653. var isNull = eq$1(null);
  4654. var isBoolean = isSimpleType('boolean');
  4655. var isUndefined = eq$1(undefined);
  4656. var isNullable = function (a) {
  4657. return a === null || a === undefined;
  4658. };
  4659. var isNonNullable = function (a) {
  4660. return !isNullable(a);
  4661. };
  4662. var isFunction = isSimpleType('function');
  4663. var isNumber = isSimpleType('number');
  4664. var noop = function () {
  4665. };
  4666. var compose = function (fa, fb) {
  4667. return function () {
  4668. var args = [];
  4669. for (var _i = 0; _i < arguments.length; _i++) {
  4670. args[_i] = arguments[_i];
  4671. }
  4672. return fa(fb.apply(null, args));
  4673. };
  4674. };
  4675. var compose1 = function (fbc, fab) {
  4676. return function (a) {
  4677. return fbc(fab(a));
  4678. };
  4679. };
  4680. var constant = function (value) {
  4681. return function () {
  4682. return value;
  4683. };
  4684. };
  4685. var identity = function (x) {
  4686. return x;
  4687. };
  4688. var tripleEquals = function (a, b) {
  4689. return a === b;
  4690. };
  4691. function curry(fn) {
  4692. var initialArgs = [];
  4693. for (var _i = 1; _i < arguments.length; _i++) {
  4694. initialArgs[_i - 1] = arguments[_i];
  4695. }
  4696. return function () {
  4697. var restArgs = [];
  4698. for (var _i = 0; _i < arguments.length; _i++) {
  4699. restArgs[_i] = arguments[_i];
  4700. }
  4701. var all = initialArgs.concat(restArgs);
  4702. return fn.apply(null, all);
  4703. };
  4704. }
  4705. var not = function (f) {
  4706. return function (t) {
  4707. return !f(t);
  4708. };
  4709. };
  4710. var die = function (msg) {
  4711. return function () {
  4712. throw new Error(msg);
  4713. };
  4714. };
  4715. var apply = function (f) {
  4716. return f();
  4717. };
  4718. var call = function (f) {
  4719. f();
  4720. };
  4721. var never = constant(false);
  4722. var always = constant(true);
  4723. var none = function () {
  4724. return NONE;
  4725. };
  4726. var NONE = function () {
  4727. var call = function (thunk) {
  4728. return thunk();
  4729. };
  4730. var id = identity;
  4731. var me = {
  4732. fold: function (n, _s) {
  4733. return n();
  4734. },
  4735. isSome: never,
  4736. isNone: always,
  4737. getOr: id,
  4738. getOrThunk: call,
  4739. getOrDie: function (msg) {
  4740. throw new Error(msg || 'error: getOrDie called on none.');
  4741. },
  4742. getOrNull: constant(null),
  4743. getOrUndefined: constant(undefined),
  4744. or: id,
  4745. orThunk: call,
  4746. map: none,
  4747. each: noop,
  4748. bind: none,
  4749. exists: never,
  4750. forall: always,
  4751. filter: function () {
  4752. return none();
  4753. },
  4754. toArray: function () {
  4755. return [];
  4756. },
  4757. toString: constant('none()')
  4758. };
  4759. return me;
  4760. }();
  4761. var some = function (a) {
  4762. var constant_a = constant(a);
  4763. var self = function () {
  4764. return me;
  4765. };
  4766. var bind = function (f) {
  4767. return f(a);
  4768. };
  4769. var me = {
  4770. fold: function (n, s) {
  4771. return s(a);
  4772. },
  4773. isSome: always,
  4774. isNone: never,
  4775. getOr: constant_a,
  4776. getOrThunk: constant_a,
  4777. getOrDie: constant_a,
  4778. getOrNull: constant_a,
  4779. getOrUndefined: constant_a,
  4780. or: self,
  4781. orThunk: self,
  4782. map: function (f) {
  4783. return some(f(a));
  4784. },
  4785. each: function (f) {
  4786. f(a);
  4787. },
  4788. bind: bind,
  4789. exists: bind,
  4790. forall: bind,
  4791. filter: function (f) {
  4792. return f(a) ? me : NONE;
  4793. },
  4794. toArray: function () {
  4795. return [a];
  4796. },
  4797. toString: function () {
  4798. return 'some(' + a + ')';
  4799. }
  4800. };
  4801. return me;
  4802. };
  4803. var from$1 = function (value) {
  4804. return value === null || value === undefined ? NONE : some(value);
  4805. };
  4806. var Optional = {
  4807. some: some,
  4808. none: none,
  4809. from: from$1
  4810. };
  4811. var nativeSlice = Array.prototype.slice;
  4812. var nativeIndexOf = Array.prototype.indexOf;
  4813. var nativePush = Array.prototype.push;
  4814. var rawIndexOf = function (ts, t) {
  4815. return nativeIndexOf.call(ts, t);
  4816. };
  4817. var indexOf$2 = function (xs, x) {
  4818. var r = rawIndexOf(xs, x);
  4819. return r === -1 ? Optional.none() : Optional.some(r);
  4820. };
  4821. var contains$3 = function (xs, x) {
  4822. return rawIndexOf(xs, x) > -1;
  4823. };
  4824. var exists = function (xs, pred) {
  4825. for (var i = 0, len = xs.length; i < len; i++) {
  4826. var x = xs[i];
  4827. if (pred(x, i)) {
  4828. return true;
  4829. }
  4830. }
  4831. return false;
  4832. };
  4833. var map$3 = function (xs, f) {
  4834. var len = xs.length;
  4835. var r = new Array(len);
  4836. for (var i = 0; i < len; i++) {
  4837. var x = xs[i];
  4838. r[i] = f(x, i);
  4839. }
  4840. return r;
  4841. };
  4842. var each$k = function (xs, f) {
  4843. for (var i = 0, len = xs.length; i < len; i++) {
  4844. var x = xs[i];
  4845. f(x, i);
  4846. }
  4847. };
  4848. var eachr = function (xs, f) {
  4849. for (var i = xs.length - 1; i >= 0; i--) {
  4850. var x = xs[i];
  4851. f(x, i);
  4852. }
  4853. };
  4854. var partition = function (xs, pred) {
  4855. var pass = [];
  4856. var fail = [];
  4857. for (var i = 0, len = xs.length; i < len; i++) {
  4858. var x = xs[i];
  4859. var arr = pred(x, i) ? pass : fail;
  4860. arr.push(x);
  4861. }
  4862. return {
  4863. pass: pass,
  4864. fail: fail
  4865. };
  4866. };
  4867. var filter$4 = function (xs, pred) {
  4868. var r = [];
  4869. for (var i = 0, len = xs.length; i < len; i++) {
  4870. var x = xs[i];
  4871. if (pred(x, i)) {
  4872. r.push(x);
  4873. }
  4874. }
  4875. return r;
  4876. };
  4877. var foldr = function (xs, f, acc) {
  4878. eachr(xs, function (x, i) {
  4879. acc = f(acc, x, i);
  4880. });
  4881. return acc;
  4882. };
  4883. var foldl = function (xs, f, acc) {
  4884. each$k(xs, function (x, i) {
  4885. acc = f(acc, x, i);
  4886. });
  4887. return acc;
  4888. };
  4889. var findUntil$1 = function (xs, pred, until) {
  4890. for (var i = 0, len = xs.length; i < len; i++) {
  4891. var x = xs[i];
  4892. if (pred(x, i)) {
  4893. return Optional.some(x);
  4894. } else if (until(x, i)) {
  4895. break;
  4896. }
  4897. }
  4898. return Optional.none();
  4899. };
  4900. var find$3 = function (xs, pred) {
  4901. return findUntil$1(xs, pred, never);
  4902. };
  4903. var findIndex$2 = function (xs, pred) {
  4904. for (var i = 0, len = xs.length; i < len; i++) {
  4905. var x = xs[i];
  4906. if (pred(x, i)) {
  4907. return Optional.some(i);
  4908. }
  4909. }
  4910. return Optional.none();
  4911. };
  4912. var flatten = function (xs) {
  4913. var r = [];
  4914. for (var i = 0, len = xs.length; i < len; ++i) {
  4915. if (!isArray$1(xs[i])) {
  4916. throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
  4917. }
  4918. nativePush.apply(r, xs[i]);
  4919. }
  4920. return r;
  4921. };
  4922. var bind = function (xs, f) {
  4923. return flatten(map$3(xs, f));
  4924. };
  4925. var forall = function (xs, pred) {
  4926. for (var i = 0, len = xs.length; i < len; ++i) {
  4927. var x = xs[i];
  4928. if (pred(x, i) !== true) {
  4929. return false;
  4930. }
  4931. }
  4932. return true;
  4933. };
  4934. var reverse = function (xs) {
  4935. var r = nativeSlice.call(xs, 0);
  4936. r.reverse();
  4937. return r;
  4938. };
  4939. var difference = function (a1, a2) {
  4940. return filter$4(a1, function (x) {
  4941. return !contains$3(a2, x);
  4942. });
  4943. };
  4944. var mapToObject = function (xs, f) {
  4945. var r = {};
  4946. for (var i = 0, len = xs.length; i < len; i++) {
  4947. var x = xs[i];
  4948. r[String(x)] = f(x, i);
  4949. }
  4950. return r;
  4951. };
  4952. var sort = function (xs, comparator) {
  4953. var copy = nativeSlice.call(xs, 0);
  4954. copy.sort(comparator);
  4955. return copy;
  4956. };
  4957. var get$a = function (xs, i) {
  4958. return i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
  4959. };
  4960. var head = function (xs) {
  4961. return get$a(xs, 0);
  4962. };
  4963. var last$2 = function (xs) {
  4964. return get$a(xs, xs.length - 1);
  4965. };
  4966. var from = isFunction(Array.from) ? Array.from : function (x) {
  4967. return nativeSlice.call(x);
  4968. };
  4969. var findMap = function (arr, f) {
  4970. for (var i = 0; i < arr.length; i++) {
  4971. var r = f(arr[i], i);
  4972. if (r.isSome()) {
  4973. return r;
  4974. }
  4975. }
  4976. return Optional.none();
  4977. };
  4978. var keys = Object.keys;
  4979. var hasOwnProperty$1 = Object.hasOwnProperty;
  4980. var each$j = function (obj, f) {
  4981. var props = keys(obj);
  4982. for (var k = 0, len = props.length; k < len; k++) {
  4983. var i = props[k];
  4984. var x = obj[i];
  4985. f(x, i);
  4986. }
  4987. };
  4988. var map$2 = function (obj, f) {
  4989. return tupleMap(obj, function (x, i) {
  4990. return {
  4991. k: i,
  4992. v: f(x, i)
  4993. };
  4994. });
  4995. };
  4996. var tupleMap = function (obj, f) {
  4997. var r = {};
  4998. each$j(obj, function (x, i) {
  4999. var tuple = f(x, i);
  5000. r[tuple.k] = tuple.v;
  5001. });
  5002. return r;
  5003. };
  5004. var objAcc = function (r) {
  5005. return function (x, i) {
  5006. r[i] = x;
  5007. };
  5008. };
  5009. var internalFilter = function (obj, pred, onTrue, onFalse) {
  5010. var r = {};
  5011. each$j(obj, function (x, i) {
  5012. (pred(x, i) ? onTrue : onFalse)(x, i);
  5013. });
  5014. return r;
  5015. };
  5016. var bifilter = function (obj, pred) {
  5017. var t = {};
  5018. var f = {};
  5019. internalFilter(obj, pred, objAcc(t), objAcc(f));
  5020. return {
  5021. t: t,
  5022. f: f
  5023. };
  5024. };
  5025. var filter$3 = function (obj, pred) {
  5026. var t = {};
  5027. internalFilter(obj, pred, objAcc(t), noop);
  5028. return t;
  5029. };
  5030. var mapToArray = function (obj, f) {
  5031. var r = [];
  5032. each$j(obj, function (value, name) {
  5033. r.push(f(value, name));
  5034. });
  5035. return r;
  5036. };
  5037. var values = function (obj) {
  5038. return mapToArray(obj, identity);
  5039. };
  5040. var get$9 = function (obj, key) {
  5041. return has$2(obj, key) ? Optional.from(obj[key]) : Optional.none();
  5042. };
  5043. var has$2 = function (obj, key) {
  5044. return hasOwnProperty$1.call(obj, key);
  5045. };
  5046. var hasNonNullableKey = function (obj, key) {
  5047. return has$2(obj, key) && obj[key] !== undefined && obj[key] !== null;
  5048. };
  5049. var equal$1 = function (a1, a2, eq) {
  5050. if (eq === void 0) {
  5051. eq = eqAny;
  5052. }
  5053. return eqRecord(eq).eq(a1, a2);
  5054. };
  5055. var isArray = Array.isArray;
  5056. var toArray$1 = function (obj) {
  5057. if (!isArray(obj)) {
  5058. var array = [];
  5059. for (var i = 0, l = obj.length; i < l; i++) {
  5060. array[i] = obj[i];
  5061. }
  5062. return array;
  5063. } else {
  5064. return obj;
  5065. }
  5066. };
  5067. var each$i = function (o, cb, s) {
  5068. var n, l;
  5069. if (!o) {
  5070. return false;
  5071. }
  5072. s = s || o;
  5073. if (o.length !== undefined) {
  5074. for (n = 0, l = o.length; n < l; n++) {
  5075. if (cb.call(s, o[n], n, o) === false) {
  5076. return false;
  5077. }
  5078. }
  5079. } else {
  5080. for (n in o) {
  5081. if (has$2(o, n)) {
  5082. if (cb.call(s, o[n], n, o) === false) {
  5083. return false;
  5084. }
  5085. }
  5086. }
  5087. }
  5088. return true;
  5089. };
  5090. var map$1 = function (array, callback) {
  5091. var out = [];
  5092. each$i(array, function (item, index) {
  5093. out.push(callback(item, index, array));
  5094. });
  5095. return out;
  5096. };
  5097. var filter$2 = function (a, f) {
  5098. var o = [];
  5099. each$i(a, function (v, index) {
  5100. if (!f || f(v, index, a)) {
  5101. o.push(v);
  5102. }
  5103. });
  5104. return o;
  5105. };
  5106. var indexOf$1 = function (a, v) {
  5107. if (a) {
  5108. for (var i = 0, l = a.length; i < l; i++) {
  5109. if (a[i] === v) {
  5110. return i;
  5111. }
  5112. }
  5113. }
  5114. return -1;
  5115. };
  5116. var reduce = function (collection, iteratee, accumulator, thisArg) {
  5117. var acc = isUndefined(accumulator) ? collection[0] : accumulator;
  5118. for (var i = 0; i < collection.length; i++) {
  5119. acc = iteratee.call(thisArg, acc, collection[i], i);
  5120. }
  5121. return acc;
  5122. };
  5123. var findIndex$1 = function (array, predicate, thisArg) {
  5124. var i, l;
  5125. for (i = 0, l = array.length; i < l; i++) {
  5126. if (predicate.call(thisArg, array[i], i, array)) {
  5127. return i;
  5128. }
  5129. }
  5130. return -1;
  5131. };
  5132. var last$1 = function (collection) {
  5133. return collection[collection.length - 1];
  5134. };
  5135. var __assign = function () {
  5136. __assign = Object.assign || function __assign(t) {
  5137. for (var s, i = 1, n = arguments.length; i < n; i++) {
  5138. s = arguments[i];
  5139. for (var p in s)
  5140. if (Object.prototype.hasOwnProperty.call(s, p))
  5141. t[p] = s[p];
  5142. }
  5143. return t;
  5144. };
  5145. return __assign.apply(this, arguments);
  5146. };
  5147. function __rest(s, e) {
  5148. var t = {};
  5149. for (var p in s)
  5150. if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  5151. t[p] = s[p];
  5152. if (s != null && typeof Object.getOwnPropertySymbols === 'function')
  5153. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  5154. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
  5155. t[p[i]] = s[p[i]];
  5156. }
  5157. return t;
  5158. }
  5159. function __spreadArray(to, from, pack) {
  5160. if (pack || arguments.length === 2)
  5161. for (var i = 0, l = from.length, ar; i < l; i++) {
  5162. if (ar || !(i in from)) {
  5163. if (!ar)
  5164. ar = Array.prototype.slice.call(from, 0, i);
  5165. ar[i] = from[i];
  5166. }
  5167. }
  5168. return to.concat(ar || Array.prototype.slice.call(from));
  5169. }
  5170. var cached = function (f) {
  5171. var called = false;
  5172. var r;
  5173. return function () {
  5174. var args = [];
  5175. for (var _i = 0; _i < arguments.length; _i++) {
  5176. args[_i] = arguments[_i];
  5177. }
  5178. if (!called) {
  5179. called = true;
  5180. r = f.apply(null, args);
  5181. }
  5182. return r;
  5183. };
  5184. };
  5185. var DeviceType = function (os, browser, userAgent, mediaMatch) {
  5186. var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
  5187. var isiPhone = os.isiOS() && !isiPad;
  5188. var isMobile = os.isiOS() || os.isAndroid();
  5189. var isTouch = isMobile || mediaMatch('(pointer:coarse)');
  5190. var isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
  5191. var isPhone = isiPhone || isMobile && !isTablet;
  5192. var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
  5193. var isDesktop = !isPhone && !isTablet && !iOSwebview;
  5194. return {
  5195. isiPad: constant(isiPad),
  5196. isiPhone: constant(isiPhone),
  5197. isTablet: constant(isTablet),
  5198. isPhone: constant(isPhone),
  5199. isTouch: constant(isTouch),
  5200. isAndroid: os.isAndroid,
  5201. isiOS: os.isiOS,
  5202. isWebView: constant(iOSwebview),
  5203. isDesktop: constant(isDesktop)
  5204. };
  5205. };
  5206. var firstMatch = function (regexes, s) {
  5207. for (var i = 0; i < regexes.length; i++) {
  5208. var x = regexes[i];
  5209. if (x.test(s)) {
  5210. return x;
  5211. }
  5212. }
  5213. return undefined;
  5214. };
  5215. var find$2 = function (regexes, agent) {
  5216. var r = firstMatch(regexes, agent);
  5217. if (!r) {
  5218. return {
  5219. major: 0,
  5220. minor: 0
  5221. };
  5222. }
  5223. var group = function (i) {
  5224. return Number(agent.replace(r, '$' + i));
  5225. };
  5226. return nu$4(group(1), group(2));
  5227. };
  5228. var detect$3 = function (versionRegexes, agent) {
  5229. var cleanedAgent = String(agent).toLowerCase();
  5230. if (versionRegexes.length === 0) {
  5231. return unknown$2();
  5232. }
  5233. return find$2(versionRegexes, cleanedAgent);
  5234. };
  5235. var unknown$2 = function () {
  5236. return nu$4(0, 0);
  5237. };
  5238. var nu$4 = function (major, minor) {
  5239. return {
  5240. major: major,
  5241. minor: minor
  5242. };
  5243. };
  5244. var Version = {
  5245. nu: nu$4,
  5246. detect: detect$3,
  5247. unknown: unknown$2
  5248. };
  5249. var detectBrowser$1 = function (browsers, userAgentData) {
  5250. return findMap(userAgentData.brands, function (uaBrand) {
  5251. var lcBrand = uaBrand.brand.toLowerCase();
  5252. return find$3(browsers, function (browser) {
  5253. var _a;
  5254. return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase());
  5255. }).map(function (info) {
  5256. return {
  5257. current: info.name,
  5258. version: Version.nu(parseInt(uaBrand.version, 10), 0)
  5259. };
  5260. });
  5261. });
  5262. };
  5263. var detect$2 = function (candidates, userAgent) {
  5264. var agent = String(userAgent).toLowerCase();
  5265. return find$3(candidates, function (candidate) {
  5266. return candidate.search(agent);
  5267. });
  5268. };
  5269. var detectBrowser = function (browsers, userAgent) {
  5270. return detect$2(browsers, userAgent).map(function (browser) {
  5271. var version = Version.detect(browser.versionRegexes, userAgent);
  5272. return {
  5273. current: browser.name,
  5274. version: version
  5275. };
  5276. });
  5277. };
  5278. var detectOs = function (oses, userAgent) {
  5279. return detect$2(oses, userAgent).map(function (os) {
  5280. var version = Version.detect(os.versionRegexes, userAgent);
  5281. return {
  5282. current: os.name,
  5283. version: version
  5284. };
  5285. });
  5286. };
  5287. var removeFromStart = function (str, numChars) {
  5288. return str.substring(numChars);
  5289. };
  5290. var checkRange = function (str, substr, start) {
  5291. return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
  5292. };
  5293. var removeLeading = function (str, prefix) {
  5294. return startsWith(str, prefix) ? removeFromStart(str, prefix.length) : str;
  5295. };
  5296. var contains$2 = function (str, substr) {
  5297. return str.indexOf(substr) !== -1;
  5298. };
  5299. var startsWith = function (str, prefix) {
  5300. return checkRange(str, prefix, 0);
  5301. };
  5302. var blank = function (r) {
  5303. return function (s) {
  5304. return s.replace(r, '');
  5305. };
  5306. };
  5307. var trim$4 = blank(/^\s+|\s+$/g);
  5308. var lTrim = blank(/^\s+/g);
  5309. var rTrim = blank(/\s+$/g);
  5310. var isNotEmpty = function (s) {
  5311. return s.length > 0;
  5312. };
  5313. var isEmpty$3 = function (s) {
  5314. return !isNotEmpty(s);
  5315. };
  5316. var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
  5317. var checkContains = function (target) {
  5318. return function (uastring) {
  5319. return contains$2(uastring, target);
  5320. };
  5321. };
  5322. var browsers = [
  5323. {
  5324. name: 'Edge',
  5325. versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
  5326. search: function (uastring) {
  5327. return contains$2(uastring, 'edge/') && contains$2(uastring, 'chrome') && contains$2(uastring, 'safari') && contains$2(uastring, 'applewebkit');
  5328. }
  5329. },
  5330. {
  5331. name: 'Chrome',
  5332. brand: 'Chromium',
  5333. versionRegexes: [
  5334. /.*?chrome\/([0-9]+)\.([0-9]+).*/,
  5335. normalVersionRegex
  5336. ],
  5337. search: function (uastring) {
  5338. return contains$2(uastring, 'chrome') && !contains$2(uastring, 'chromeframe');
  5339. }
  5340. },
  5341. {
  5342. name: 'IE',
  5343. versionRegexes: [
  5344. /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
  5345. /.*?rv:([0-9]+)\.([0-9]+).*/
  5346. ],
  5347. search: function (uastring) {
  5348. return contains$2(uastring, 'msie') || contains$2(uastring, 'trident');
  5349. }
  5350. },
  5351. {
  5352. name: 'Opera',
  5353. versionRegexes: [
  5354. normalVersionRegex,
  5355. /.*?opera\/([0-9]+)\.([0-9]+).*/
  5356. ],
  5357. search: checkContains('opera')
  5358. },
  5359. {
  5360. name: 'Firefox',
  5361. versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
  5362. search: checkContains('firefox')
  5363. },
  5364. {
  5365. name: 'Safari',
  5366. versionRegexes: [
  5367. normalVersionRegex,
  5368. /.*?cpu os ([0-9]+)_([0-9]+).*/
  5369. ],
  5370. search: function (uastring) {
  5371. return (contains$2(uastring, 'safari') || contains$2(uastring, 'mobile/')) && contains$2(uastring, 'applewebkit');
  5372. }
  5373. }
  5374. ];
  5375. var oses = [
  5376. {
  5377. name: 'Windows',
  5378. search: checkContains('win'),
  5379. versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
  5380. },
  5381. {
  5382. name: 'iOS',
  5383. search: function (uastring) {
  5384. return contains$2(uastring, 'iphone') || contains$2(uastring, 'ipad');
  5385. },
  5386. versionRegexes: [
  5387. /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
  5388. /.*cpu os ([0-9]+)_([0-9]+).*/,
  5389. /.*cpu iphone os ([0-9]+)_([0-9]+).*/
  5390. ]
  5391. },
  5392. {
  5393. name: 'Android',
  5394. search: checkContains('android'),
  5395. versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
  5396. },
  5397. {
  5398. name: 'OSX',
  5399. search: checkContains('mac os x'),
  5400. versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
  5401. },
  5402. {
  5403. name: 'Linux',
  5404. search: checkContains('linux'),
  5405. versionRegexes: []
  5406. },
  5407. {
  5408. name: 'Solaris',
  5409. search: checkContains('sunos'),
  5410. versionRegexes: []
  5411. },
  5412. {
  5413. name: 'FreeBSD',
  5414. search: checkContains('freebsd'),
  5415. versionRegexes: []
  5416. },
  5417. {
  5418. name: 'ChromeOS',
  5419. search: checkContains('cros'),
  5420. versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
  5421. }
  5422. ];
  5423. var PlatformInfo = {
  5424. browsers: constant(browsers),
  5425. oses: constant(oses)
  5426. };
  5427. var edge = 'Edge';
  5428. var chrome = 'Chrome';
  5429. var ie$1 = 'IE';
  5430. var opera = 'Opera';
  5431. var firefox = 'Firefox';
  5432. var safari = 'Safari';
  5433. var unknown$1 = function () {
  5434. return nu$3({
  5435. current: undefined,
  5436. version: Version.unknown()
  5437. });
  5438. };
  5439. var nu$3 = function (info) {
  5440. var current = info.current;
  5441. var version = info.version;
  5442. var isBrowser = function (name) {
  5443. return function () {
  5444. return current === name;
  5445. };
  5446. };
  5447. return {
  5448. current: current,
  5449. version: version,
  5450. isEdge: isBrowser(edge),
  5451. isChrome: isBrowser(chrome),
  5452. isIE: isBrowser(ie$1),
  5453. isOpera: isBrowser(opera),
  5454. isFirefox: isBrowser(firefox),
  5455. isSafari: isBrowser(safari)
  5456. };
  5457. };
  5458. var Browser = {
  5459. unknown: unknown$1,
  5460. nu: nu$3,
  5461. edge: constant(edge),
  5462. chrome: constant(chrome),
  5463. ie: constant(ie$1),
  5464. opera: constant(opera),
  5465. firefox: constant(firefox),
  5466. safari: constant(safari)
  5467. };
  5468. var windows = 'Windows';
  5469. var ios = 'iOS';
  5470. var android = 'Android';
  5471. var linux = 'Linux';
  5472. var osx = 'OSX';
  5473. var solaris = 'Solaris';
  5474. var freebsd = 'FreeBSD';
  5475. var chromeos = 'ChromeOS';
  5476. var unknown = function () {
  5477. return nu$2({
  5478. current: undefined,
  5479. version: Version.unknown()
  5480. });
  5481. };
  5482. var nu$2 = function (info) {
  5483. var current = info.current;
  5484. var version = info.version;
  5485. var isOS = function (name) {
  5486. return function () {
  5487. return current === name;
  5488. };
  5489. };
  5490. return {
  5491. current: current,
  5492. version: version,
  5493. isWindows: isOS(windows),
  5494. isiOS: isOS(ios),
  5495. isAndroid: isOS(android),
  5496. isOSX: isOS(osx),
  5497. isLinux: isOS(linux),
  5498. isSolaris: isOS(solaris),
  5499. isFreeBSD: isOS(freebsd),
  5500. isChromeOS: isOS(chromeos)
  5501. };
  5502. };
  5503. var OperatingSystem = {
  5504. unknown: unknown,
  5505. nu: nu$2,
  5506. windows: constant(windows),
  5507. ios: constant(ios),
  5508. android: constant(android),
  5509. linux: constant(linux),
  5510. osx: constant(osx),
  5511. solaris: constant(solaris),
  5512. freebsd: constant(freebsd),
  5513. chromeos: constant(chromeos)
  5514. };
  5515. var detect$1 = function (userAgent, userAgentDataOpt, mediaMatch) {
  5516. var browsers = PlatformInfo.browsers();
  5517. var oses = PlatformInfo.oses();
  5518. var browser = userAgentDataOpt.bind(function (userAgentData) {
  5519. return detectBrowser$1(browsers, userAgentData);
  5520. }).orThunk(function () {
  5521. return detectBrowser(browsers, userAgent);
  5522. }).fold(Browser.unknown, Browser.nu);
  5523. var os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
  5524. var deviceType = DeviceType(os, browser, userAgent, mediaMatch);
  5525. return {
  5526. browser: browser,
  5527. os: os,
  5528. deviceType: deviceType
  5529. };
  5530. };
  5531. var PlatformDetection = { detect: detect$1 };
  5532. var mediaMatch = function (query) {
  5533. return window.matchMedia(query).matches;
  5534. };
  5535. var platform$2 = cached(function () {
  5536. return PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch);
  5537. });
  5538. var detect = function () {
  5539. return platform$2();
  5540. };
  5541. var userAgent = navigator.userAgent;
  5542. var platform$1 = detect();
  5543. var browser$4 = platform$1.browser;
  5544. var os = platform$1.os;
  5545. var deviceType = platform$1.deviceType;
  5546. var webkit = /WebKit/.test(userAgent) && !browser$4.isEdge();
  5547. var fileApi = 'FormData' in window && 'FileReader' in window && 'URL' in window && !!URL.createObjectURL;
  5548. var windowsPhone = userAgent.indexOf('Windows Phone') !== -1;
  5549. var Env = {
  5550. opera: browser$4.isOpera(),
  5551. webkit: webkit,
  5552. ie: browser$4.isIE() || browser$4.isEdge() ? browser$4.version.major : false,
  5553. gecko: browser$4.isFirefox(),
  5554. mac: os.isOSX() || os.isiOS(),
  5555. iOS: deviceType.isiPad() || deviceType.isiPhone(),
  5556. android: os.isAndroid(),
  5557. contentEditable: true,
  5558. transparentSrc: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
  5559. caretAfter: true,
  5560. range: window.getSelection && 'Range' in window,
  5561. documentMode: browser$4.isIE() ? document.documentMode || 7 : 10,
  5562. fileApi: fileApi,
  5563. ceFalse: true,
  5564. cacheSuffix: null,
  5565. container: null,
  5566. experimentalShadowDom: false,
  5567. canHaveCSP: !browser$4.isIE(),
  5568. desktop: deviceType.isDesktop(),
  5569. windowsPhone: windowsPhone,
  5570. browser: {
  5571. current: browser$4.current,
  5572. version: browser$4.version,
  5573. isChrome: browser$4.isChrome,
  5574. isEdge: browser$4.isEdge,
  5575. isFirefox: browser$4.isFirefox,
  5576. isIE: browser$4.isIE,
  5577. isOpera: browser$4.isOpera,
  5578. isSafari: browser$4.isSafari
  5579. },
  5580. os: {
  5581. current: os.current,
  5582. version: os.version,
  5583. isAndroid: os.isAndroid,
  5584. isChromeOS: os.isChromeOS,
  5585. isFreeBSD: os.isFreeBSD,
  5586. isiOS: os.isiOS,
  5587. isLinux: os.isLinux,
  5588. isOSX: os.isOSX,
  5589. isSolaris: os.isSolaris,
  5590. isWindows: os.isWindows
  5591. },
  5592. deviceType: {
  5593. isDesktop: deviceType.isDesktop,
  5594. isiPad: deviceType.isiPad,
  5595. isiPhone: deviceType.isiPhone,
  5596. isPhone: deviceType.isPhone,
  5597. isTablet: deviceType.isTablet,
  5598. isTouch: deviceType.isTouch,
  5599. isWebView: deviceType.isWebView
  5600. }
  5601. };
  5602. var whiteSpaceRegExp$2 = /^\s*|\s*$/g;
  5603. var trim$3 = function (str) {
  5604. return str === null || str === undefined ? '' : ('' + str).replace(whiteSpaceRegExp$2, '');
  5605. };
  5606. var is$3 = function (obj, type) {
  5607. if (!type) {
  5608. return obj !== undefined;
  5609. }
  5610. if (type === 'array' && isArray(obj)) {
  5611. return true;
  5612. }
  5613. return typeof obj === type;
  5614. };
  5615. var makeMap$4 = function (items, delim, map) {
  5616. var i;
  5617. items = items || [];
  5618. delim = delim || ',';
  5619. if (typeof items === 'string') {
  5620. items = items.split(delim);
  5621. }
  5622. map = map || {};
  5623. i = items.length;
  5624. while (i--) {
  5625. map[items[i]] = {};
  5626. }
  5627. return map;
  5628. };
  5629. var hasOwnProperty = has$2;
  5630. var create$9 = function (s, p, root) {
  5631. var self = this;
  5632. var sp, scn, c, de = 0;
  5633. s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s);
  5634. var cn = s[3].match(/(^|\.)(\w+)$/i)[2];
  5635. var ns = self.createNS(s[3].replace(/\.\w+$/, ''), root);
  5636. if (ns[cn]) {
  5637. return;
  5638. }
  5639. if (s[2] === 'static') {
  5640. ns[cn] = p;
  5641. if (this.onCreate) {
  5642. this.onCreate(s[2], s[3], ns[cn]);
  5643. }
  5644. return;
  5645. }
  5646. if (!p[cn]) {
  5647. p[cn] = function () {
  5648. };
  5649. de = 1;
  5650. }
  5651. ns[cn] = p[cn];
  5652. self.extend(ns[cn].prototype, p);
  5653. if (s[5]) {
  5654. sp = self.resolve(s[5]).prototype;
  5655. scn = s[5].match(/\.(\w+)$/i)[1];
  5656. c = ns[cn];
  5657. if (de) {
  5658. ns[cn] = function () {
  5659. return sp[scn].apply(this, arguments);
  5660. };
  5661. } else {
  5662. ns[cn] = function () {
  5663. this.parent = sp[scn];
  5664. return c.apply(this, arguments);
  5665. };
  5666. }
  5667. ns[cn].prototype[cn] = ns[cn];
  5668. self.each(sp, function (f, n) {
  5669. ns[cn].prototype[n] = sp[n];
  5670. });
  5671. self.each(p, function (f, n) {
  5672. if (sp[n]) {
  5673. ns[cn].prototype[n] = function () {
  5674. this.parent = sp[n];
  5675. return f.apply(this, arguments);
  5676. };
  5677. } else {
  5678. if (n !== cn) {
  5679. ns[cn].prototype[n] = f;
  5680. }
  5681. }
  5682. });
  5683. }
  5684. self.each(p.static, function (f, n) {
  5685. ns[cn][n] = f;
  5686. });
  5687. };
  5688. var extend$6 = function (obj) {
  5689. var exts = [];
  5690. for (var _i = 1; _i < arguments.length; _i++) {
  5691. exts[_i - 1] = arguments[_i];
  5692. }
  5693. for (var i = 0; i < exts.length; i++) {
  5694. var ext = exts[i];
  5695. for (var name_1 in ext) {
  5696. if (has$2(ext, name_1)) {
  5697. var value = ext[name_1];
  5698. if (value !== undefined) {
  5699. obj[name_1] = value;
  5700. }
  5701. }
  5702. }
  5703. }
  5704. return obj;
  5705. };
  5706. var walk$3 = function (o, f, n, s) {
  5707. s = s || this;
  5708. if (o) {
  5709. if (n) {
  5710. o = o[n];
  5711. }
  5712. each$i(o, function (o, i) {
  5713. if (f.call(s, o, i, n) === false) {
  5714. return false;
  5715. }
  5716. walk$3(o, f, n, s);
  5717. });
  5718. }
  5719. };
  5720. var createNS = function (n, o) {
  5721. var i, v;
  5722. o = o || window;
  5723. n = n.split('.');
  5724. for (i = 0; i < n.length; i++) {
  5725. v = n[i];
  5726. if (!o[v]) {
  5727. o[v] = {};
  5728. }
  5729. o = o[v];
  5730. }
  5731. return o;
  5732. };
  5733. var resolve$3 = function (n, o) {
  5734. var i, l;
  5735. o = o || window;
  5736. n = n.split('.');
  5737. for (i = 0, l = n.length; i < l; i++) {
  5738. o = o[n[i]];
  5739. if (!o) {
  5740. break;
  5741. }
  5742. }
  5743. return o;
  5744. };
  5745. var explode$4 = function (s, d) {
  5746. if (!s || is$3(s, 'array')) {
  5747. return s;
  5748. }
  5749. return map$1(s.split(d || ','), trim$3);
  5750. };
  5751. var _addCacheSuffix = function (url) {
  5752. var cacheSuffix = Env.cacheSuffix;
  5753. if (cacheSuffix) {
  5754. url += (url.indexOf('?') === -1 ? '?' : '&') + cacheSuffix;
  5755. }
  5756. return url;
  5757. };
  5758. var Tools = {
  5759. trim: trim$3,
  5760. isArray: isArray,
  5761. is: is$3,
  5762. toArray: toArray$1,
  5763. makeMap: makeMap$4,
  5764. each: each$i,
  5765. map: map$1,
  5766. grep: filter$2,
  5767. inArray: indexOf$1,
  5768. hasOwn: hasOwnProperty,
  5769. extend: extend$6,
  5770. create: create$9,
  5771. walk: walk$3,
  5772. createNS: createNS,
  5773. resolve: resolve$3,
  5774. explode: explode$4,
  5775. _addCacheSuffix: _addCacheSuffix
  5776. };
  5777. var fromHtml$1 = function (html, scope) {
  5778. var doc = scope || document;
  5779. var div = doc.createElement('div');
  5780. div.innerHTML = html;
  5781. if (!div.hasChildNodes() || div.childNodes.length > 1) {
  5782. console.error('HTML does not have a single root node', html);
  5783. throw new Error('HTML must have a single root node');
  5784. }
  5785. return fromDom$2(div.childNodes[0]);
  5786. };
  5787. var fromTag = function (tag, scope) {
  5788. var doc = scope || document;
  5789. var node = doc.createElement(tag);
  5790. return fromDom$2(node);
  5791. };
  5792. var fromText = function (text, scope) {
  5793. var doc = scope || document;
  5794. var node = doc.createTextNode(text);
  5795. return fromDom$2(node);
  5796. };
  5797. var fromDom$2 = function (node) {
  5798. if (node === null || node === undefined) {
  5799. throw new Error('Node cannot be null or undefined');
  5800. }
  5801. return { dom: node };
  5802. };
  5803. var fromPoint$1 = function (docElm, x, y) {
  5804. return Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom$2);
  5805. };
  5806. var SugarElement = {
  5807. fromHtml: fromHtml$1,
  5808. fromTag: fromTag,
  5809. fromText: fromText,
  5810. fromDom: fromDom$2,
  5811. fromPoint: fromPoint$1
  5812. };
  5813. var toArray = function (target, f) {
  5814. var r = [];
  5815. var recurse = function (e) {
  5816. r.push(e);
  5817. return f(e);
  5818. };
  5819. var cur = f(target);
  5820. do {
  5821. cur = cur.bind(recurse);
  5822. } while (cur.isSome());
  5823. return r;
  5824. };
  5825. var compareDocumentPosition = function (a, b, match) {
  5826. return (a.compareDocumentPosition(b) & match) !== 0;
  5827. };
  5828. var documentPositionContainedBy = function (a, b) {
  5829. return compareDocumentPosition(a, b, Node.DOCUMENT_POSITION_CONTAINED_BY);
  5830. };
  5831. var COMMENT = 8;
  5832. var DOCUMENT = 9;
  5833. var DOCUMENT_FRAGMENT = 11;
  5834. var ELEMENT = 1;
  5835. var TEXT = 3;
  5836. var is$2 = function (element, selector) {
  5837. var dom = element.dom;
  5838. if (dom.nodeType !== ELEMENT) {
  5839. return false;
  5840. } else {
  5841. var elem = dom;
  5842. if (elem.matches !== undefined) {
  5843. return elem.matches(selector);
  5844. } else if (elem.msMatchesSelector !== undefined) {
  5845. return elem.msMatchesSelector(selector);
  5846. } else if (elem.webkitMatchesSelector !== undefined) {
  5847. return elem.webkitMatchesSelector(selector);
  5848. } else if (elem.mozMatchesSelector !== undefined) {
  5849. return elem.mozMatchesSelector(selector);
  5850. } else {
  5851. throw new Error('Browser lacks native selectors');
  5852. }
  5853. }
  5854. };
  5855. var bypassSelector = function (dom) {
  5856. return dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;
  5857. };
  5858. var all = function (selector, scope) {
  5859. var base = scope === undefined ? document : scope.dom;
  5860. return bypassSelector(base) ? [] : map$3(base.querySelectorAll(selector), SugarElement.fromDom);
  5861. };
  5862. var one = function (selector, scope) {
  5863. var base = scope === undefined ? document : scope.dom;
  5864. return bypassSelector(base) ? Optional.none() : Optional.from(base.querySelector(selector)).map(SugarElement.fromDom);
  5865. };
  5866. var eq = function (e1, e2) {
  5867. return e1.dom === e2.dom;
  5868. };
  5869. var regularContains = function (e1, e2) {
  5870. var d1 = e1.dom;
  5871. var d2 = e2.dom;
  5872. return d1 === d2 ? false : d1.contains(d2);
  5873. };
  5874. var ieContains = function (e1, e2) {
  5875. return documentPositionContainedBy(e1.dom, e2.dom);
  5876. };
  5877. var contains$1 = function (e1, e2) {
  5878. return detect().browser.isIE() ? ieContains(e1, e2) : regularContains(e1, e2);
  5879. };
  5880. typeof window !== 'undefined' ? window : Function('return this;')();
  5881. var name = function (element) {
  5882. var r = element.dom.nodeName;
  5883. return r.toLowerCase();
  5884. };
  5885. var type = function (element) {
  5886. return element.dom.nodeType;
  5887. };
  5888. var isType = function (t) {
  5889. return function (element) {
  5890. return type(element) === t;
  5891. };
  5892. };
  5893. var isComment$1 = function (element) {
  5894. return type(element) === COMMENT || name(element) === '#comment';
  5895. };
  5896. var isElement$6 = isType(ELEMENT);
  5897. var isText$8 = isType(TEXT);
  5898. var isDocument$2 = isType(DOCUMENT);
  5899. var isDocumentFragment$1 = isType(DOCUMENT_FRAGMENT);
  5900. var isTag = function (tag) {
  5901. return function (e) {
  5902. return isElement$6(e) && name(e) === tag;
  5903. };
  5904. };
  5905. var owner$1 = function (element) {
  5906. return SugarElement.fromDom(element.dom.ownerDocument);
  5907. };
  5908. var documentOrOwner = function (dos) {
  5909. return isDocument$2(dos) ? dos : owner$1(dos);
  5910. };
  5911. var documentElement = function (element) {
  5912. return SugarElement.fromDom(documentOrOwner(element).dom.documentElement);
  5913. };
  5914. var defaultView = function (element) {
  5915. return SugarElement.fromDom(documentOrOwner(element).dom.defaultView);
  5916. };
  5917. var parent = function (element) {
  5918. return Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
  5919. };
  5920. var parents$1 = function (element, isRoot) {
  5921. var stop = isFunction(isRoot) ? isRoot : never;
  5922. var dom = element.dom;
  5923. var ret = [];
  5924. while (dom.parentNode !== null && dom.parentNode !== undefined) {
  5925. var rawParent = dom.parentNode;
  5926. var p = SugarElement.fromDom(rawParent);
  5927. ret.push(p);
  5928. if (stop(p) === true) {
  5929. break;
  5930. } else {
  5931. dom = rawParent;
  5932. }
  5933. }
  5934. return ret;
  5935. };
  5936. var siblings = function (element) {
  5937. var filterSelf = function (elements) {
  5938. return filter$4(elements, function (x) {
  5939. return !eq(element, x);
  5940. });
  5941. };
  5942. return parent(element).map(children).map(filterSelf).getOr([]);
  5943. };
  5944. var prevSibling = function (element) {
  5945. return Optional.from(element.dom.previousSibling).map(SugarElement.fromDom);
  5946. };
  5947. var nextSibling = function (element) {
  5948. return Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);
  5949. };
  5950. var prevSiblings = function (element) {
  5951. return reverse(toArray(element, prevSibling));
  5952. };
  5953. var nextSiblings = function (element) {
  5954. return toArray(element, nextSibling);
  5955. };
  5956. var children = function (element) {
  5957. return map$3(element.dom.childNodes, SugarElement.fromDom);
  5958. };
  5959. var child$1 = function (element, index) {
  5960. var cs = element.dom.childNodes;
  5961. return Optional.from(cs[index]).map(SugarElement.fromDom);
  5962. };
  5963. var firstChild = function (element) {
  5964. return child$1(element, 0);
  5965. };
  5966. var lastChild = function (element) {
  5967. return child$1(element, element.dom.childNodes.length - 1);
  5968. };
  5969. var childNodesCount = function (element) {
  5970. return element.dom.childNodes.length;
  5971. };
  5972. var getHead = function (doc) {
  5973. var b = doc.dom.head;
  5974. if (b === null || b === undefined) {
  5975. throw new Error('Head is not available yet');
  5976. }
  5977. return SugarElement.fromDom(b);
  5978. };
  5979. var isShadowRoot = function (dos) {
  5980. return isDocumentFragment$1(dos) && isNonNullable(dos.dom.host);
  5981. };
  5982. var supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);
  5983. var isSupported$1 = constant(supported);
  5984. var getRootNode = supported ? function (e) {
  5985. return SugarElement.fromDom(e.dom.getRootNode());
  5986. } : documentOrOwner;
  5987. var getStyleContainer = function (dos) {
  5988. return isShadowRoot(dos) ? dos : getHead(documentOrOwner(dos));
  5989. };
  5990. var getShadowRoot = function (e) {
  5991. var r = getRootNode(e);
  5992. return isShadowRoot(r) ? Optional.some(r) : Optional.none();
  5993. };
  5994. var getShadowHost = function (e) {
  5995. return SugarElement.fromDom(e.dom.host);
  5996. };
  5997. var getOriginalEventTarget = function (event) {
  5998. if (isSupported$1() && isNonNullable(event.target)) {
  5999. var el = SugarElement.fromDom(event.target);
  6000. if (isElement$6(el) && isOpenShadowHost(el)) {
  6001. if (event.composed && event.composedPath) {
  6002. var composedPath = event.composedPath();
  6003. if (composedPath) {
  6004. return head(composedPath);
  6005. }
  6006. }
  6007. }
  6008. }
  6009. return Optional.from(event.target);
  6010. };
  6011. var isOpenShadowHost = function (element) {
  6012. return isNonNullable(element.dom.shadowRoot);
  6013. };
  6014. var before$4 = function (marker, element) {
  6015. var parent$1 = parent(marker);
  6016. parent$1.each(function (v) {
  6017. v.dom.insertBefore(element.dom, marker.dom);
  6018. });
  6019. };
  6020. var after$3 = function (marker, element) {
  6021. var sibling = nextSibling(marker);
  6022. sibling.fold(function () {
  6023. var parent$1 = parent(marker);
  6024. parent$1.each(function (v) {
  6025. append$1(v, element);
  6026. });
  6027. }, function (v) {
  6028. before$4(v, element);
  6029. });
  6030. };
  6031. var prepend = function (parent, element) {
  6032. var firstChild$1 = firstChild(parent);
  6033. firstChild$1.fold(function () {
  6034. append$1(parent, element);
  6035. }, function (v) {
  6036. parent.dom.insertBefore(element.dom, v.dom);
  6037. });
  6038. };
  6039. var append$1 = function (parent, element) {
  6040. parent.dom.appendChild(element.dom);
  6041. };
  6042. var wrap$3 = function (element, wrapper) {
  6043. before$4(element, wrapper);
  6044. append$1(wrapper, element);
  6045. };
  6046. var before$3 = function (marker, elements) {
  6047. each$k(elements, function (x) {
  6048. before$4(marker, x);
  6049. });
  6050. };
  6051. var append = function (parent, elements) {
  6052. each$k(elements, function (x) {
  6053. append$1(parent, x);
  6054. });
  6055. };
  6056. var empty = function (element) {
  6057. element.dom.textContent = '';
  6058. each$k(children(element), function (rogue) {
  6059. remove$7(rogue);
  6060. });
  6061. };
  6062. var remove$7 = function (element) {
  6063. var dom = element.dom;
  6064. if (dom.parentNode !== null) {
  6065. dom.parentNode.removeChild(dom);
  6066. }
  6067. };
  6068. var unwrap = function (wrapper) {
  6069. var children$1 = children(wrapper);
  6070. if (children$1.length > 0) {
  6071. before$3(wrapper, children$1);
  6072. }
  6073. remove$7(wrapper);
  6074. };
  6075. var inBody = function (element) {
  6076. var dom = isText$8(element) ? element.dom.parentNode : element.dom;
  6077. if (dom === undefined || dom === null || dom.ownerDocument === null) {
  6078. return false;
  6079. }
  6080. var doc = dom.ownerDocument;
  6081. return getShadowRoot(SugarElement.fromDom(dom)).fold(function () {
  6082. return doc.body.contains(dom);
  6083. }, compose1(inBody, getShadowHost));
  6084. };
  6085. var r = function (left, top) {
  6086. var translate = function (x, y) {
  6087. return r(left + x, top + y);
  6088. };
  6089. return {
  6090. left: left,
  6091. top: top,
  6092. translate: translate
  6093. };
  6094. };
  6095. var SugarPosition = r;
  6096. var boxPosition = function (dom) {
  6097. var box = dom.getBoundingClientRect();
  6098. return SugarPosition(box.left, box.top);
  6099. };
  6100. var firstDefinedOrZero = function (a, b) {
  6101. if (a !== undefined) {
  6102. return a;
  6103. } else {
  6104. return b !== undefined ? b : 0;
  6105. }
  6106. };
  6107. var absolute = function (element) {
  6108. var doc = element.dom.ownerDocument;
  6109. var body = doc.body;
  6110. var win = doc.defaultView;
  6111. var html = doc.documentElement;
  6112. if (body === element.dom) {
  6113. return SugarPosition(body.offsetLeft, body.offsetTop);
  6114. }
  6115. var scrollTop = firstDefinedOrZero(win === null || win === void 0 ? void 0 : win.pageYOffset, html.scrollTop);
  6116. var scrollLeft = firstDefinedOrZero(win === null || win === void 0 ? void 0 : win.pageXOffset, html.scrollLeft);
  6117. var clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);
  6118. var clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);
  6119. return viewport(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);
  6120. };
  6121. var viewport = function (element) {
  6122. var dom = element.dom;
  6123. var doc = dom.ownerDocument;
  6124. var body = doc.body;
  6125. if (body === dom) {
  6126. return SugarPosition(body.offsetLeft, body.offsetTop);
  6127. }
  6128. if (!inBody(element)) {
  6129. return SugarPosition(0, 0);
  6130. }
  6131. return boxPosition(dom);
  6132. };
  6133. var get$8 = function (_DOC) {
  6134. var doc = _DOC !== undefined ? _DOC.dom : document;
  6135. var x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
  6136. var y = doc.body.scrollTop || doc.documentElement.scrollTop;
  6137. return SugarPosition(x, y);
  6138. };
  6139. var to = function (x, y, _DOC) {
  6140. var doc = _DOC !== undefined ? _DOC.dom : document;
  6141. var win = doc.defaultView;
  6142. if (win) {
  6143. win.scrollTo(x, y);
  6144. }
  6145. };
  6146. var intoView = function (element, alignToTop) {
  6147. var isSafari = detect().browser.isSafari();
  6148. if (isSafari && isFunction(element.dom.scrollIntoViewIfNeeded)) {
  6149. element.dom.scrollIntoViewIfNeeded(false);
  6150. } else {
  6151. element.dom.scrollIntoView(alignToTop);
  6152. }
  6153. };
  6154. var get$7 = function (_win) {
  6155. var win = _win === undefined ? window : _win;
  6156. if (detect().browser.isFirefox()) {
  6157. return Optional.none();
  6158. } else {
  6159. return Optional.from(win['visualViewport']);
  6160. }
  6161. };
  6162. var bounds = function (x, y, width, height) {
  6163. return {
  6164. x: x,
  6165. y: y,
  6166. width: width,
  6167. height: height,
  6168. right: x + width,
  6169. bottom: y + height
  6170. };
  6171. };
  6172. var getBounds = function (_win) {
  6173. var win = _win === undefined ? window : _win;
  6174. var doc = win.document;
  6175. var scroll = get$8(SugarElement.fromDom(doc));
  6176. return get$7(win).fold(function () {
  6177. var html = win.document.documentElement;
  6178. var width = html.clientWidth;
  6179. var height = html.clientHeight;
  6180. return bounds(scroll.left, scroll.top, width, height);
  6181. }, function (visualViewport) {
  6182. return bounds(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height);
  6183. });
  6184. };
  6185. var isNodeType = function (type) {
  6186. return function (node) {
  6187. return !!node && node.nodeType === type;
  6188. };
  6189. };
  6190. var isRestrictedNode = function (node) {
  6191. return !!node && !Object.getPrototypeOf(node);
  6192. };
  6193. var isElement$5 = isNodeType(1);
  6194. var matchNodeNames = function (names) {
  6195. var lowercasedNames = names.map(function (s) {
  6196. return s.toLowerCase();
  6197. });
  6198. return function (node) {
  6199. if (node && node.nodeName) {
  6200. var nodeName = node.nodeName.toLowerCase();
  6201. return contains$3(lowercasedNames, nodeName);
  6202. }
  6203. return false;
  6204. };
  6205. };
  6206. var matchStyleValues = function (name, values) {
  6207. var items = values.toLowerCase().split(' ');
  6208. return function (node) {
  6209. if (isElement$5(node)) {
  6210. for (var i = 0; i < items.length; i++) {
  6211. var computed = node.ownerDocument.defaultView.getComputedStyle(node, null);
  6212. var cssValue = computed ? computed.getPropertyValue(name) : null;
  6213. if (cssValue === items[i]) {
  6214. return true;
  6215. }
  6216. }
  6217. }
  6218. return false;
  6219. };
  6220. };
  6221. var hasAttribute = function (attrName) {
  6222. return function (node) {
  6223. return isElement$5(node) && node.hasAttribute(attrName);
  6224. };
  6225. };
  6226. var hasAttributeValue = function (attrName, attrValue) {
  6227. return function (node) {
  6228. return isElement$5(node) && node.getAttribute(attrName) === attrValue;
  6229. };
  6230. };
  6231. var isBogus$2 = function (node) {
  6232. return isElement$5(node) && node.hasAttribute('data-mce-bogus');
  6233. };
  6234. var isBogusAll$1 = function (node) {
  6235. return isElement$5(node) && node.getAttribute('data-mce-bogus') === 'all';
  6236. };
  6237. var isTable$3 = function (node) {
  6238. return isElement$5(node) && node.tagName === 'TABLE';
  6239. };
  6240. var hasContentEditableState = function (value) {
  6241. return function (node) {
  6242. if (isElement$5(node)) {
  6243. if (node.contentEditable === value) {
  6244. return true;
  6245. }
  6246. if (node.getAttribute('data-mce-contenteditable') === value) {
  6247. return true;
  6248. }
  6249. }
  6250. return false;
  6251. };
  6252. };
  6253. var isTextareaOrInput = matchNodeNames([
  6254. 'textarea',
  6255. 'input'
  6256. ]);
  6257. var isText$7 = isNodeType(3);
  6258. var isComment = isNodeType(8);
  6259. var isDocument$1 = isNodeType(9);
  6260. var isDocumentFragment = isNodeType(11);
  6261. var isBr$5 = matchNodeNames(['br']);
  6262. var isImg = matchNodeNames(['img']);
  6263. var isContentEditableTrue$4 = hasContentEditableState('true');
  6264. var isContentEditableFalse$b = hasContentEditableState('false');
  6265. var isTableCell$5 = matchNodeNames([
  6266. 'td',
  6267. 'th'
  6268. ]);
  6269. var isMedia$2 = matchNodeNames([
  6270. 'video',
  6271. 'audio',
  6272. 'object',
  6273. 'embed'
  6274. ]);
  6275. var is$1 = function (lhs, rhs, comparator) {
  6276. if (comparator === void 0) {
  6277. comparator = tripleEquals;
  6278. }
  6279. return lhs.exists(function (left) {
  6280. return comparator(left, rhs);
  6281. });
  6282. };
  6283. var cat = function (arr) {
  6284. var r = [];
  6285. var push = function (x) {
  6286. r.push(x);
  6287. };
  6288. for (var i = 0; i < arr.length; i++) {
  6289. arr[i].each(push);
  6290. }
  6291. return r;
  6292. };
  6293. var lift2 = function (oa, ob, f) {
  6294. return oa.isSome() && ob.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie())) : Optional.none();
  6295. };
  6296. var lift3 = function (oa, ob, oc, f) {
  6297. return oa.isSome() && ob.isSome() && oc.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie(), oc.getOrDie())) : Optional.none();
  6298. };
  6299. var someIf = function (b, a) {
  6300. return b ? Optional.some(a) : Optional.none();
  6301. };
  6302. var isSupported = function (dom) {
  6303. return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
  6304. };
  6305. var rawSet = function (dom, key, value) {
  6306. if (isString$1(value) || isBoolean(value) || isNumber(value)) {
  6307. dom.setAttribute(key, value + '');
  6308. } else {
  6309. console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);
  6310. throw new Error('Attribute value was not simple');
  6311. }
  6312. };
  6313. var set$1 = function (element, key, value) {
  6314. rawSet(element.dom, key, value);
  6315. };
  6316. var setAll$1 = function (element, attrs) {
  6317. var dom = element.dom;
  6318. each$j(attrs, function (v, k) {
  6319. rawSet(dom, k, v);
  6320. });
  6321. };
  6322. var get$6 = function (element, key) {
  6323. var v = element.dom.getAttribute(key);
  6324. return v === null ? undefined : v;
  6325. };
  6326. var getOpt = function (element, key) {
  6327. return Optional.from(get$6(element, key));
  6328. };
  6329. var has$1 = function (element, key) {
  6330. var dom = element.dom;
  6331. return dom && dom.hasAttribute ? dom.hasAttribute(key) : false;
  6332. };
  6333. var remove$6 = function (element, key) {
  6334. element.dom.removeAttribute(key);
  6335. };
  6336. var clone$3 = function (element) {
  6337. return foldl(element.dom.attributes, function (acc, attr) {
  6338. acc[attr.name] = attr.value;
  6339. return acc;
  6340. }, {});
  6341. };
  6342. var internalSet = function (dom, property, value) {
  6343. if (!isString$1(value)) {
  6344. console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
  6345. throw new Error('CSS value must be a string: ' + value);
  6346. }
  6347. if (isSupported(dom)) {
  6348. dom.style.setProperty(property, value);
  6349. }
  6350. };
  6351. var setAll = function (element, css) {
  6352. var dom = element.dom;
  6353. each$j(css, function (v, k) {
  6354. internalSet(dom, k, v);
  6355. });
  6356. };
  6357. var get$5 = function (element, property) {
  6358. var dom = element.dom;
  6359. var styles = window.getComputedStyle(dom);
  6360. var r = styles.getPropertyValue(property);
  6361. return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
  6362. };
  6363. var getUnsafeProperty = function (dom, property) {
  6364. return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
  6365. };
  6366. var getRaw = function (element, property) {
  6367. var dom = element.dom;
  6368. var raw = getUnsafeProperty(dom, property);
  6369. return Optional.from(raw).filter(function (r) {
  6370. return r.length > 0;
  6371. });
  6372. };
  6373. var getAllRaw = function (element) {
  6374. var css = {};
  6375. var dom = element.dom;
  6376. if (isSupported(dom)) {
  6377. for (var i = 0; i < dom.style.length; i++) {
  6378. var ruleName = dom.style.item(i);
  6379. css[ruleName] = dom.style[ruleName];
  6380. }
  6381. }
  6382. return css;
  6383. };
  6384. var reflow = function (e) {
  6385. return e.dom.offsetWidth;
  6386. };
  6387. var browser$3 = detect().browser;
  6388. var firstElement = function (nodes) {
  6389. return find$3(nodes, isElement$6);
  6390. };
  6391. var getTableCaptionDeltaY = function (elm) {
  6392. if (browser$3.isFirefox() && name(elm) === 'table') {
  6393. return firstElement(children(elm)).filter(function (elm) {
  6394. return name(elm) === 'caption';
  6395. }).bind(function (caption) {
  6396. return firstElement(nextSiblings(caption)).map(function (body) {
  6397. var bodyTop = body.dom.offsetTop;
  6398. var captionTop = caption.dom.offsetTop;
  6399. var captionHeight = caption.dom.offsetHeight;
  6400. return bodyTop <= captionTop ? -captionHeight : 0;
  6401. });
  6402. }).getOr(0);
  6403. } else {
  6404. return 0;
  6405. }
  6406. };
  6407. var hasChild = function (elm, child) {
  6408. return elm.children && contains$3(elm.children, child);
  6409. };
  6410. var getPos = function (body, elm, rootElm) {
  6411. var x = 0, y = 0;
  6412. var doc = body.ownerDocument;
  6413. rootElm = rootElm ? rootElm : body;
  6414. if (elm) {
  6415. if (rootElm === body && elm.getBoundingClientRect && get$5(SugarElement.fromDom(body), 'position') === 'static') {
  6416. var pos = elm.getBoundingClientRect();
  6417. x = pos.left + (doc.documentElement.scrollLeft || body.scrollLeft) - doc.documentElement.clientLeft;
  6418. y = pos.top + (doc.documentElement.scrollTop || body.scrollTop) - doc.documentElement.clientTop;
  6419. return {
  6420. x: x,
  6421. y: y
  6422. };
  6423. }
  6424. var offsetParent = elm;
  6425. while (offsetParent && offsetParent !== rootElm && offsetParent.nodeType && !hasChild(offsetParent, rootElm)) {
  6426. var castOffsetParent = offsetParent;
  6427. x += castOffsetParent.offsetLeft || 0;
  6428. y += castOffsetParent.offsetTop || 0;
  6429. offsetParent = castOffsetParent.offsetParent;
  6430. }
  6431. offsetParent = elm.parentNode;
  6432. while (offsetParent && offsetParent !== rootElm && offsetParent.nodeType && !hasChild(offsetParent, rootElm)) {
  6433. x -= offsetParent.scrollLeft || 0;
  6434. y -= offsetParent.scrollTop || 0;
  6435. offsetParent = offsetParent.parentNode;
  6436. }
  6437. y += getTableCaptionDeltaY(SugarElement.fromDom(elm));
  6438. }
  6439. return {
  6440. x: x,
  6441. y: y
  6442. };
  6443. };
  6444. var exports$1 = {}, module$1 = { exports: exports$1 };
  6445. (function (define, exports, module, require) {
  6446. (function (global, factory) {
  6447. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EphoxContactWrapper = factory());
  6448. }(this, function () {
  6449. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  6450. var promise = { exports: {} };
  6451. (function (module) {
  6452. (function (root) {
  6453. var setTimeoutFunc = setTimeout;
  6454. function noop() {
  6455. }
  6456. function bind(fn, thisArg) {
  6457. return function () {
  6458. fn.apply(thisArg, arguments);
  6459. };
  6460. }
  6461. function Promise(fn) {
  6462. if (typeof this !== 'object')
  6463. throw new TypeError('Promises must be constructed via new');
  6464. if (typeof fn !== 'function')
  6465. throw new TypeError('not a function');
  6466. this._state = 0;
  6467. this._handled = false;
  6468. this._value = undefined;
  6469. this._deferreds = [];
  6470. doResolve(fn, this);
  6471. }
  6472. function handle(self, deferred) {
  6473. while (self._state === 3) {
  6474. self = self._value;
  6475. }
  6476. if (self._state === 0) {
  6477. self._deferreds.push(deferred);
  6478. return;
  6479. }
  6480. self._handled = true;
  6481. Promise._immediateFn(function () {
  6482. var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
  6483. if (cb === null) {
  6484. (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
  6485. return;
  6486. }
  6487. var ret;
  6488. try {
  6489. ret = cb(self._value);
  6490. } catch (e) {
  6491. reject(deferred.promise, e);
  6492. return;
  6493. }
  6494. resolve(deferred.promise, ret);
  6495. });
  6496. }
  6497. function resolve(self, newValue) {
  6498. try {
  6499. if (newValue === self)
  6500. throw new TypeError('A promise cannot be resolved with itself.');
  6501. if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
  6502. var then = newValue.then;
  6503. if (newValue instanceof Promise) {
  6504. self._state = 3;
  6505. self._value = newValue;
  6506. finale(self);
  6507. return;
  6508. } else if (typeof then === 'function') {
  6509. doResolve(bind(then, newValue), self);
  6510. return;
  6511. }
  6512. }
  6513. self._state = 1;
  6514. self._value = newValue;
  6515. finale(self);
  6516. } catch (e) {
  6517. reject(self, e);
  6518. }
  6519. }
  6520. function reject(self, newValue) {
  6521. self._state = 2;
  6522. self._value = newValue;
  6523. finale(self);
  6524. }
  6525. function finale(self) {
  6526. if (self._state === 2 && self._deferreds.length === 0) {
  6527. Promise._immediateFn(function () {
  6528. if (!self._handled) {
  6529. Promise._unhandledRejectionFn(self._value);
  6530. }
  6531. });
  6532. }
  6533. for (var i = 0, len = self._deferreds.length; i < len; i++) {
  6534. handle(self, self._deferreds[i]);
  6535. }
  6536. self._deferreds = null;
  6537. }
  6538. function Handler(onFulfilled, onRejected, promise) {
  6539. this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
  6540. this.onRejected = typeof onRejected === 'function' ? onRejected : null;
  6541. this.promise = promise;
  6542. }
  6543. function doResolve(fn, self) {
  6544. var done = false;
  6545. try {
  6546. fn(function (value) {
  6547. if (done)
  6548. return;
  6549. done = true;
  6550. resolve(self, value);
  6551. }, function (reason) {
  6552. if (done)
  6553. return;
  6554. done = true;
  6555. reject(self, reason);
  6556. });
  6557. } catch (ex) {
  6558. if (done)
  6559. return;
  6560. done = true;
  6561. reject(self, ex);
  6562. }
  6563. }
  6564. Promise.prototype['catch'] = function (onRejected) {
  6565. return this.then(null, onRejected);
  6566. };
  6567. Promise.prototype.then = function (onFulfilled, onRejected) {
  6568. var prom = new this.constructor(noop);
  6569. handle(this, new Handler(onFulfilled, onRejected, prom));
  6570. return prom;
  6571. };
  6572. Promise.all = function (arr) {
  6573. var args = Array.prototype.slice.call(arr);
  6574. return new Promise(function (resolve, reject) {
  6575. if (args.length === 0)
  6576. return resolve([]);
  6577. var remaining = args.length;
  6578. function res(i, val) {
  6579. try {
  6580. if (val && (typeof val === 'object' || typeof val === 'function')) {
  6581. var then = val.then;
  6582. if (typeof then === 'function') {
  6583. then.call(val, function (val) {
  6584. res(i, val);
  6585. }, reject);
  6586. return;
  6587. }
  6588. }
  6589. args[i] = val;
  6590. if (--remaining === 0) {
  6591. resolve(args);
  6592. }
  6593. } catch (ex) {
  6594. reject(ex);
  6595. }
  6596. }
  6597. for (var i = 0; i < args.length; i++) {
  6598. res(i, args[i]);
  6599. }
  6600. });
  6601. };
  6602. Promise.resolve = function (value) {
  6603. if (value && typeof value === 'object' && value.constructor === Promise) {
  6604. return value;
  6605. }
  6606. return new Promise(function (resolve) {
  6607. resolve(value);
  6608. });
  6609. };
  6610. Promise.reject = function (value) {
  6611. return new Promise(function (resolve, reject) {
  6612. reject(value);
  6613. });
  6614. };
  6615. Promise.race = function (values) {
  6616. return new Promise(function (resolve, reject) {
  6617. for (var i = 0, len = values.length; i < len; i++) {
  6618. values[i].then(resolve, reject);
  6619. }
  6620. });
  6621. };
  6622. Promise._immediateFn = typeof setImmediate === 'function' ? function (fn) {
  6623. setImmediate(fn);
  6624. } : function (fn) {
  6625. setTimeoutFunc(fn, 0);
  6626. };
  6627. Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
  6628. if (typeof console !== 'undefined' && console) {
  6629. console.warn('Possible Unhandled Promise Rejection:', err);
  6630. }
  6631. };
  6632. Promise._setImmediateFn = function _setImmediateFn(fn) {
  6633. Promise._immediateFn = fn;
  6634. };
  6635. Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
  6636. Promise._unhandledRejectionFn = fn;
  6637. };
  6638. if (module.exports) {
  6639. module.exports = Promise;
  6640. } else if (!root.Promise) {
  6641. root.Promise = Promise;
  6642. }
  6643. }(commonjsGlobal));
  6644. }(promise));
  6645. var promisePolyfill = promise.exports;
  6646. var Global = function () {
  6647. if (typeof window !== 'undefined') {
  6648. return window;
  6649. } else {
  6650. return Function('return this;')();
  6651. }
  6652. }();
  6653. var promisePolyfill_1 = { boltExport: Global.Promise || promisePolyfill };
  6654. return promisePolyfill_1;
  6655. }));
  6656. }(undefined, exports$1, module$1));
  6657. var Promise$1 = module$1.exports.boltExport;
  6658. var nu$1 = function (baseFn) {
  6659. var data = Optional.none();
  6660. var callbacks = [];
  6661. var map = function (f) {
  6662. return nu$1(function (nCallback) {
  6663. get(function (data) {
  6664. nCallback(f(data));
  6665. });
  6666. });
  6667. };
  6668. var get = function (nCallback) {
  6669. if (isReady()) {
  6670. call(nCallback);
  6671. } else {
  6672. callbacks.push(nCallback);
  6673. }
  6674. };
  6675. var set = function (x) {
  6676. if (!isReady()) {
  6677. data = Optional.some(x);
  6678. run(callbacks);
  6679. callbacks = [];
  6680. }
  6681. };
  6682. var isReady = function () {
  6683. return data.isSome();
  6684. };
  6685. var run = function (cbs) {
  6686. each$k(cbs, call);
  6687. };
  6688. var call = function (cb) {
  6689. data.each(function (x) {
  6690. setTimeout(function () {
  6691. cb(x);
  6692. }, 0);
  6693. });
  6694. };
  6695. baseFn(set);
  6696. return {
  6697. get: get,
  6698. map: map,
  6699. isReady: isReady
  6700. };
  6701. };
  6702. var pure$1 = function (a) {
  6703. return nu$1(function (callback) {
  6704. callback(a);
  6705. });
  6706. };
  6707. var LazyValue = {
  6708. nu: nu$1,
  6709. pure: pure$1
  6710. };
  6711. var errorReporter = function (err) {
  6712. setTimeout(function () {
  6713. throw err;
  6714. }, 0);
  6715. };
  6716. var make = function (run) {
  6717. var get = function (callback) {
  6718. run().then(callback, errorReporter);
  6719. };
  6720. var map = function (fab) {
  6721. return make(function () {
  6722. return run().then(fab);
  6723. });
  6724. };
  6725. var bind = function (aFutureB) {
  6726. return make(function () {
  6727. return run().then(function (v) {
  6728. return aFutureB(v).toPromise();
  6729. });
  6730. });
  6731. };
  6732. var anonBind = function (futureB) {
  6733. return make(function () {
  6734. return run().then(function () {
  6735. return futureB.toPromise();
  6736. });
  6737. });
  6738. };
  6739. var toLazy = function () {
  6740. return LazyValue.nu(get);
  6741. };
  6742. var toCached = function () {
  6743. var cache = null;
  6744. return make(function () {
  6745. if (cache === null) {
  6746. cache = run();
  6747. }
  6748. return cache;
  6749. });
  6750. };
  6751. var toPromise = run;
  6752. return {
  6753. map: map,
  6754. bind: bind,
  6755. anonBind: anonBind,
  6756. toLazy: toLazy,
  6757. toCached: toCached,
  6758. toPromise: toPromise,
  6759. get: get
  6760. };
  6761. };
  6762. var nu = function (baseFn) {
  6763. return make(function () {
  6764. return new Promise$1(baseFn);
  6765. });
  6766. };
  6767. var pure = function (a) {
  6768. return make(function () {
  6769. return Promise$1.resolve(a);
  6770. });
  6771. };
  6772. var Future = {
  6773. nu: nu,
  6774. pure: pure
  6775. };
  6776. var par$1 = function (asyncValues, nu) {
  6777. return nu(function (callback) {
  6778. var r = [];
  6779. var count = 0;
  6780. var cb = function (i) {
  6781. return function (value) {
  6782. r[i] = value;
  6783. count++;
  6784. if (count >= asyncValues.length) {
  6785. callback(r);
  6786. }
  6787. };
  6788. };
  6789. if (asyncValues.length === 0) {
  6790. callback([]);
  6791. } else {
  6792. each$k(asyncValues, function (asyncValue, i) {
  6793. asyncValue.get(cb(i));
  6794. });
  6795. }
  6796. });
  6797. };
  6798. var par = function (futures) {
  6799. return par$1(futures, Future.nu);
  6800. };
  6801. var value$1 = function (o) {
  6802. var or = function (_opt) {
  6803. return value$1(o);
  6804. };
  6805. var orThunk = function (_f) {
  6806. return value$1(o);
  6807. };
  6808. var map = function (f) {
  6809. return value$1(f(o));
  6810. };
  6811. var mapError = function (_f) {
  6812. return value$1(o);
  6813. };
  6814. var each = function (f) {
  6815. f(o);
  6816. };
  6817. var bind = function (f) {
  6818. return f(o);
  6819. };
  6820. var fold = function (_, onValue) {
  6821. return onValue(o);
  6822. };
  6823. var exists = function (f) {
  6824. return f(o);
  6825. };
  6826. var forall = function (f) {
  6827. return f(o);
  6828. };
  6829. var toOptional = function () {
  6830. return Optional.some(o);
  6831. };
  6832. return {
  6833. isValue: always,
  6834. isError: never,
  6835. getOr: constant(o),
  6836. getOrThunk: constant(o),
  6837. getOrDie: constant(o),
  6838. or: or,
  6839. orThunk: orThunk,
  6840. fold: fold,
  6841. map: map,
  6842. mapError: mapError,
  6843. each: each,
  6844. bind: bind,
  6845. exists: exists,
  6846. forall: forall,
  6847. toOptional: toOptional
  6848. };
  6849. };
  6850. var error = function (message) {
  6851. var getOrThunk = function (f) {
  6852. return f();
  6853. };
  6854. var getOrDie = function () {
  6855. return die(String(message))();
  6856. };
  6857. var or = identity;
  6858. var orThunk = function (f) {
  6859. return f();
  6860. };
  6861. var map = function (_f) {
  6862. return error(message);
  6863. };
  6864. var mapError = function (f) {
  6865. return error(f(message));
  6866. };
  6867. var bind = function (_f) {
  6868. return error(message);
  6869. };
  6870. var fold = function (onError, _) {
  6871. return onError(message);
  6872. };
  6873. return {
  6874. isValue: never,
  6875. isError: always,
  6876. getOr: identity,
  6877. getOrThunk: getOrThunk,
  6878. getOrDie: getOrDie,
  6879. or: or,
  6880. orThunk: orThunk,
  6881. fold: fold,
  6882. map: map,
  6883. mapError: mapError,
  6884. each: noop,
  6885. bind: bind,
  6886. exists: never,
  6887. forall: always,
  6888. toOptional: Optional.none
  6889. };
  6890. };
  6891. var fromOption = function (opt, err) {
  6892. return opt.fold(function () {
  6893. return error(err);
  6894. }, value$1);
  6895. };
  6896. var Result = {
  6897. value: value$1,
  6898. error: error,
  6899. fromOption: fromOption
  6900. };
  6901. var generate$1 = function (cases) {
  6902. if (!isArray$1(cases)) {
  6903. throw new Error('cases must be an array');
  6904. }
  6905. if (cases.length === 0) {
  6906. throw new Error('there must be at least one case');
  6907. }
  6908. var constructors = [];
  6909. var adt = {};
  6910. each$k(cases, function (acase, count) {
  6911. var keys$1 = keys(acase);
  6912. if (keys$1.length !== 1) {
  6913. throw new Error('one and only one name per case');
  6914. }
  6915. var key = keys$1[0];
  6916. var value = acase[key];
  6917. if (adt[key] !== undefined) {
  6918. throw new Error('duplicate key detected:' + key);
  6919. } else if (key === 'cata') {
  6920. throw new Error('cannot have a case named cata (sorry)');
  6921. } else if (!isArray$1(value)) {
  6922. throw new Error('case arguments must be an array');
  6923. }
  6924. constructors.push(key);
  6925. adt[key] = function () {
  6926. var args = [];
  6927. for (var _i = 0; _i < arguments.length; _i++) {
  6928. args[_i] = arguments[_i];
  6929. }
  6930. var argLength = args.length;
  6931. if (argLength !== value.length) {
  6932. throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);
  6933. }
  6934. var match = function (branches) {
  6935. var branchKeys = keys(branches);
  6936. if (constructors.length !== branchKeys.length) {
  6937. throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\nActual: ' + branchKeys.join(','));
  6938. }
  6939. var allReqd = forall(constructors, function (reqKey) {
  6940. return contains$3(branchKeys, reqKey);
  6941. });
  6942. if (!allReqd) {
  6943. throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\nRequired: ' + constructors.join(', '));
  6944. }
  6945. return branches[key].apply(null, args);
  6946. };
  6947. return {
  6948. fold: function () {
  6949. var foldArgs = [];
  6950. for (var _i = 0; _i < arguments.length; _i++) {
  6951. foldArgs[_i] = arguments[_i];
  6952. }
  6953. if (foldArgs.length !== cases.length) {
  6954. throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + foldArgs.length);
  6955. }
  6956. var target = foldArgs[count];
  6957. return target.apply(null, args);
  6958. },
  6959. match: match,
  6960. log: function (label) {
  6961. console.log(label, {
  6962. constructors: constructors,
  6963. constructor: key,
  6964. params: args
  6965. });
  6966. }
  6967. };
  6968. };
  6969. });
  6970. return adt;
  6971. };
  6972. var Adt = { generate: generate$1 };
  6973. Adt.generate([
  6974. {
  6975. bothErrors: [
  6976. 'error1',
  6977. 'error2'
  6978. ]
  6979. },
  6980. {
  6981. firstError: [
  6982. 'error1',
  6983. 'value2'
  6984. ]
  6985. },
  6986. {
  6987. secondError: [
  6988. 'value1',
  6989. 'error2'
  6990. ]
  6991. },
  6992. {
  6993. bothValues: [
  6994. 'value1',
  6995. 'value2'
  6996. ]
  6997. }
  6998. ]);
  6999. var unite = function (result) {
  7000. return result.fold(identity, identity);
  7001. };
  7002. function ClosestOrAncestor (is, ancestor, scope, a, isRoot) {
  7003. if (is(scope, a)) {
  7004. return Optional.some(scope);
  7005. } else if (isFunction(isRoot) && isRoot(scope)) {
  7006. return Optional.none();
  7007. } else {
  7008. return ancestor(scope, a, isRoot);
  7009. }
  7010. }
  7011. var ancestor$3 = function (scope, predicate, isRoot) {
  7012. var element = scope.dom;
  7013. var stop = isFunction(isRoot) ? isRoot : never;
  7014. while (element.parentNode) {
  7015. element = element.parentNode;
  7016. var el = SugarElement.fromDom(element);
  7017. if (predicate(el)) {
  7018. return Optional.some(el);
  7019. } else if (stop(el)) {
  7020. break;
  7021. }
  7022. }
  7023. return Optional.none();
  7024. };
  7025. var closest$3 = function (scope, predicate, isRoot) {
  7026. var is = function (s, test) {
  7027. return test(s);
  7028. };
  7029. return ClosestOrAncestor(is, ancestor$3, scope, predicate, isRoot);
  7030. };
  7031. var sibling$2 = function (scope, predicate) {
  7032. var element = scope.dom;
  7033. if (!element.parentNode) {
  7034. return Optional.none();
  7035. }
  7036. return child(SugarElement.fromDom(element.parentNode), function (x) {
  7037. return !eq(scope, x) && predicate(x);
  7038. });
  7039. };
  7040. var child = function (scope, predicate) {
  7041. var pred = function (node) {
  7042. return predicate(SugarElement.fromDom(node));
  7043. };
  7044. var result = find$3(scope.dom.childNodes, pred);
  7045. return result.map(SugarElement.fromDom);
  7046. };
  7047. var ancestor$2 = function (scope, selector, isRoot) {
  7048. return ancestor$3(scope, function (e) {
  7049. return is$2(e, selector);
  7050. }, isRoot);
  7051. };
  7052. var descendant = function (scope, selector) {
  7053. return one(selector, scope);
  7054. };
  7055. var closest$2 = function (scope, selector, isRoot) {
  7056. var is = function (element, selector) {
  7057. return is$2(element, selector);
  7058. };
  7059. return ClosestOrAncestor(is, ancestor$2, scope, selector, isRoot);
  7060. };
  7061. var promiseObj = window.Promise ? window.Promise : Promise$1;
  7062. var requestAnimationFramePromise;
  7063. var requestAnimationFrame = function (callback, element) {
  7064. var requestAnimationFrameFunc = window.requestAnimationFrame;
  7065. var vendors = [
  7066. 'ms',
  7067. 'moz',
  7068. 'webkit'
  7069. ];
  7070. var featurefill = function (cb) {
  7071. window.setTimeout(cb, 0);
  7072. };
  7073. for (var i = 0; i < vendors.length && !requestAnimationFrameFunc; i++) {
  7074. requestAnimationFrameFunc = window[vendors[i] + 'RequestAnimationFrame'];
  7075. }
  7076. if (!requestAnimationFrameFunc) {
  7077. requestAnimationFrameFunc = featurefill;
  7078. }
  7079. requestAnimationFrameFunc(callback, element);
  7080. };
  7081. var wrappedSetTimeout = function (callback, time) {
  7082. if (typeof time !== 'number') {
  7083. time = 0;
  7084. }
  7085. return setTimeout(callback, time);
  7086. };
  7087. var wrappedSetInterval = function (callback, time) {
  7088. if (typeof time !== 'number') {
  7089. time = 1;
  7090. }
  7091. return setInterval(callback, time);
  7092. };
  7093. var wrappedClearTimeout = function (id) {
  7094. return clearTimeout(id);
  7095. };
  7096. var wrappedClearInterval = function (id) {
  7097. return clearInterval(id);
  7098. };
  7099. var debounce = function (callback, time) {
  7100. var timer;
  7101. var func = function () {
  7102. var args = [];
  7103. for (var _i = 0; _i < arguments.length; _i++) {
  7104. args[_i] = arguments[_i];
  7105. }
  7106. clearTimeout(timer);
  7107. timer = wrappedSetTimeout(function () {
  7108. callback.apply(this, args);
  7109. }, time);
  7110. };
  7111. func.stop = function () {
  7112. clearTimeout(timer);
  7113. };
  7114. return func;
  7115. };
  7116. var Delay = {
  7117. requestAnimationFrame: function (callback, element) {
  7118. if (requestAnimationFramePromise) {
  7119. requestAnimationFramePromise.then(callback);
  7120. return;
  7121. }
  7122. requestAnimationFramePromise = new promiseObj(function (resolve) {
  7123. if (!element) {
  7124. element = document.body;
  7125. }
  7126. requestAnimationFrame(resolve, element);
  7127. }).then(callback);
  7128. },
  7129. setTimeout: wrappedSetTimeout,
  7130. setInterval: wrappedSetInterval,
  7131. setEditorTimeout: function (editor, callback, time) {
  7132. return wrappedSetTimeout(function () {
  7133. if (!editor.removed) {
  7134. callback();
  7135. }
  7136. }, time);
  7137. },
  7138. setEditorInterval: function (editor, callback, time) {
  7139. var timer = wrappedSetInterval(function () {
  7140. if (!editor.removed) {
  7141. callback();
  7142. } else {
  7143. clearInterval(timer);
  7144. }
  7145. }, time);
  7146. return timer;
  7147. },
  7148. debounce: debounce,
  7149. throttle: debounce,
  7150. clearInterval: wrappedClearInterval,
  7151. clearTimeout: wrappedClearTimeout
  7152. };
  7153. var StyleSheetLoader = function (documentOrShadowRoot, settings) {
  7154. if (settings === void 0) {
  7155. settings = {};
  7156. }
  7157. var idCount = 0;
  7158. var loadedStates = {};
  7159. var edos = SugarElement.fromDom(documentOrShadowRoot);
  7160. var doc = documentOrOwner(edos);
  7161. var maxLoadTime = settings.maxLoadTime || 5000;
  7162. var _setReferrerPolicy = function (referrerPolicy) {
  7163. settings.referrerPolicy = referrerPolicy;
  7164. };
  7165. var addStyle = function (element) {
  7166. append$1(getStyleContainer(edos), element);
  7167. };
  7168. var removeStyle = function (id) {
  7169. var styleContainer = getStyleContainer(edos);
  7170. descendant(styleContainer, '#' + id).each(remove$7);
  7171. };
  7172. var getOrCreateState = function (url) {
  7173. return get$9(loadedStates, url).getOrThunk(function () {
  7174. return {
  7175. id: 'mce-u' + idCount++,
  7176. passed: [],
  7177. failed: [],
  7178. count: 0
  7179. };
  7180. });
  7181. };
  7182. var load = function (url, success, failure) {
  7183. var link;
  7184. var urlWithSuffix = Tools._addCacheSuffix(url);
  7185. var state = getOrCreateState(urlWithSuffix);
  7186. loadedStates[urlWithSuffix] = state;
  7187. state.count++;
  7188. var resolve = function (callbacks, status) {
  7189. var i = callbacks.length;
  7190. while (i--) {
  7191. callbacks[i]();
  7192. }
  7193. state.status = status;
  7194. state.passed = [];
  7195. state.failed = [];
  7196. if (link) {
  7197. link.onload = null;
  7198. link.onerror = null;
  7199. link = null;
  7200. }
  7201. };
  7202. var passed = function () {
  7203. return resolve(state.passed, 2);
  7204. };
  7205. var failed = function () {
  7206. return resolve(state.failed, 3);
  7207. };
  7208. var wait = function (testCallback, waitCallback) {
  7209. if (!testCallback()) {
  7210. if (Date.now() - startTime < maxLoadTime) {
  7211. Delay.setTimeout(waitCallback);
  7212. } else {
  7213. failed();
  7214. }
  7215. }
  7216. };
  7217. var waitForWebKitLinkLoaded = function () {
  7218. wait(function () {
  7219. var styleSheets = documentOrShadowRoot.styleSheets;
  7220. var i = styleSheets.length;
  7221. while (i--) {
  7222. var styleSheet = styleSheets[i];
  7223. var owner = styleSheet.ownerNode;
  7224. if (owner && owner.id === link.id) {
  7225. passed();
  7226. return true;
  7227. }
  7228. }
  7229. return false;
  7230. }, waitForWebKitLinkLoaded);
  7231. };
  7232. if (success) {
  7233. state.passed.push(success);
  7234. }
  7235. if (failure) {
  7236. state.failed.push(failure);
  7237. }
  7238. if (state.status === 1) {
  7239. return;
  7240. }
  7241. if (state.status === 2) {
  7242. passed();
  7243. return;
  7244. }
  7245. if (state.status === 3) {
  7246. failed();
  7247. return;
  7248. }
  7249. state.status = 1;
  7250. var linkElem = SugarElement.fromTag('link', doc.dom);
  7251. setAll$1(linkElem, {
  7252. rel: 'stylesheet',
  7253. type: 'text/css',
  7254. id: state.id
  7255. });
  7256. var startTime = Date.now();
  7257. if (settings.contentCssCors) {
  7258. set$1(linkElem, 'crossOrigin', 'anonymous');
  7259. }
  7260. if (settings.referrerPolicy) {
  7261. set$1(linkElem, 'referrerpolicy', settings.referrerPolicy);
  7262. }
  7263. link = linkElem.dom;
  7264. link.onload = waitForWebKitLinkLoaded;
  7265. link.onerror = failed;
  7266. addStyle(linkElem);
  7267. set$1(linkElem, 'href', urlWithSuffix);
  7268. };
  7269. var loadF = function (url) {
  7270. return Future.nu(function (resolve) {
  7271. load(url, compose(resolve, constant(Result.value(url))), compose(resolve, constant(Result.error(url))));
  7272. });
  7273. };
  7274. var loadAll = function (urls, success, failure) {
  7275. par(map$3(urls, loadF)).get(function (result) {
  7276. var parts = partition(result, function (r) {
  7277. return r.isValue();
  7278. });
  7279. if (parts.fail.length > 0) {
  7280. failure(parts.fail.map(unite));
  7281. } else {
  7282. success(parts.pass.map(unite));
  7283. }
  7284. });
  7285. };
  7286. var unload = function (url) {
  7287. var urlWithSuffix = Tools._addCacheSuffix(url);
  7288. get$9(loadedStates, urlWithSuffix).each(function (state) {
  7289. var count = --state.count;
  7290. if (count === 0) {
  7291. delete loadedStates[urlWithSuffix];
  7292. removeStyle(state.id);
  7293. }
  7294. });
  7295. };
  7296. var unloadAll = function (urls) {
  7297. each$k(urls, function (url) {
  7298. unload(url);
  7299. });
  7300. };
  7301. return {
  7302. load: load,
  7303. loadAll: loadAll,
  7304. unload: unload,
  7305. unloadAll: unloadAll,
  7306. _setReferrerPolicy: _setReferrerPolicy
  7307. };
  7308. };
  7309. var create$8 = function () {
  7310. var map = new WeakMap();
  7311. var forElement = function (referenceElement, settings) {
  7312. var root = getRootNode(referenceElement);
  7313. var rootDom = root.dom;
  7314. return Optional.from(map.get(rootDom)).getOrThunk(function () {
  7315. var sl = StyleSheetLoader(rootDom, settings);
  7316. map.set(rootDom, sl);
  7317. return sl;
  7318. });
  7319. };
  7320. return { forElement: forElement };
  7321. };
  7322. var instance = create$8();
  7323. var DomTreeWalker = function () {
  7324. function DomTreeWalker(startNode, rootNode) {
  7325. this.node = startNode;
  7326. this.rootNode = rootNode;
  7327. this.current = this.current.bind(this);
  7328. this.next = this.next.bind(this);
  7329. this.prev = this.prev.bind(this);
  7330. this.prev2 = this.prev2.bind(this);
  7331. }
  7332. DomTreeWalker.prototype.current = function () {
  7333. return this.node;
  7334. };
  7335. DomTreeWalker.prototype.next = function (shallow) {
  7336. this.node = this.findSibling(this.node, 'firstChild', 'nextSibling', shallow);
  7337. return this.node;
  7338. };
  7339. DomTreeWalker.prototype.prev = function (shallow) {
  7340. this.node = this.findSibling(this.node, 'lastChild', 'previousSibling', shallow);
  7341. return this.node;
  7342. };
  7343. DomTreeWalker.prototype.prev2 = function (shallow) {
  7344. this.node = this.findPreviousNode(this.node, 'lastChild', 'previousSibling', shallow);
  7345. return this.node;
  7346. };
  7347. DomTreeWalker.prototype.findSibling = function (node, startName, siblingName, shallow) {
  7348. var sibling, parent;
  7349. if (node) {
  7350. if (!shallow && node[startName]) {
  7351. return node[startName];
  7352. }
  7353. if (node !== this.rootNode) {
  7354. sibling = node[siblingName];
  7355. if (sibling) {
  7356. return sibling;
  7357. }
  7358. for (parent = node.parentNode; parent && parent !== this.rootNode; parent = parent.parentNode) {
  7359. sibling = parent[siblingName];
  7360. if (sibling) {
  7361. return sibling;
  7362. }
  7363. }
  7364. }
  7365. }
  7366. };
  7367. DomTreeWalker.prototype.findPreviousNode = function (node, startName, siblingName, shallow) {
  7368. var sibling, parent, child;
  7369. if (node) {
  7370. sibling = node[siblingName];
  7371. if (this.rootNode && sibling === this.rootNode) {
  7372. return;
  7373. }
  7374. if (sibling) {
  7375. if (!shallow) {
  7376. for (child = sibling[startName]; child; child = child[startName]) {
  7377. if (!child[startName]) {
  7378. return child;
  7379. }
  7380. }
  7381. }
  7382. return sibling;
  7383. }
  7384. parent = node.parentNode;
  7385. if (parent && parent !== this.rootNode) {
  7386. return parent;
  7387. }
  7388. }
  7389. };
  7390. return DomTreeWalker;
  7391. }();
  7392. var blocks = [
  7393. 'article',
  7394. 'aside',
  7395. 'details',
  7396. 'div',
  7397. 'dt',
  7398. 'figcaption',
  7399. 'footer',
  7400. 'form',
  7401. 'fieldset',
  7402. 'header',
  7403. 'hgroup',
  7404. 'html',
  7405. 'main',
  7406. 'nav',
  7407. 'section',
  7408. 'summary',
  7409. 'body',
  7410. 'p',
  7411. 'dl',
  7412. 'multicol',
  7413. 'dd',
  7414. 'figure',
  7415. 'address',
  7416. 'center',
  7417. 'blockquote',
  7418. 'h1',
  7419. 'h2',
  7420. 'h3',
  7421. 'h4',
  7422. 'h5',
  7423. 'h6',
  7424. 'listing',
  7425. 'xmp',
  7426. 'pre',
  7427. 'plaintext',
  7428. 'menu',
  7429. 'dir',
  7430. 'ul',
  7431. 'ol',
  7432. 'li',
  7433. 'hr',
  7434. 'table',
  7435. 'tbody',
  7436. 'thead',
  7437. 'tfoot',
  7438. 'th',
  7439. 'tr',
  7440. 'td',
  7441. 'caption'
  7442. ];
  7443. var tableCells = [
  7444. 'td',
  7445. 'th'
  7446. ];
  7447. var tableSections = [
  7448. 'thead',
  7449. 'tbody',
  7450. 'tfoot'
  7451. ];
  7452. var textBlocks = [
  7453. 'h1',
  7454. 'h2',
  7455. 'h3',
  7456. 'h4',
  7457. 'h5',
  7458. 'h6',
  7459. 'p',
  7460. 'div',
  7461. 'address',
  7462. 'pre',
  7463. 'form',
  7464. 'blockquote',
  7465. 'center',
  7466. 'dir',
  7467. 'fieldset',
  7468. 'header',
  7469. 'footer',
  7470. 'article',
  7471. 'section',
  7472. 'hgroup',
  7473. 'aside',
  7474. 'nav',
  7475. 'figure'
  7476. ];
  7477. var headings = [
  7478. 'h1',
  7479. 'h2',
  7480. 'h3',
  7481. 'h4',
  7482. 'h5',
  7483. 'h6'
  7484. ];
  7485. var listItems$1 = [
  7486. 'li',
  7487. 'dd',
  7488. 'dt'
  7489. ];
  7490. var lists = [
  7491. 'ul',
  7492. 'ol',
  7493. 'dl'
  7494. ];
  7495. var wsElements = [
  7496. 'pre',
  7497. 'script',
  7498. 'textarea',
  7499. 'style'
  7500. ];
  7501. var lazyLookup = function (items) {
  7502. var lookup;
  7503. return function (node) {
  7504. lookup = lookup ? lookup : mapToObject(items, always);
  7505. return has$2(lookup, name(node));
  7506. };
  7507. };
  7508. var isHeading = lazyLookup(headings);
  7509. var isBlock$2 = lazyLookup(blocks);
  7510. var isTable$2 = function (node) {
  7511. return name(node) === 'table';
  7512. };
  7513. var isInline$1 = function (node) {
  7514. return isElement$6(node) && !isBlock$2(node);
  7515. };
  7516. var isBr$4 = function (node) {
  7517. return isElement$6(node) && name(node) === 'br';
  7518. };
  7519. var isTextBlock$2 = lazyLookup(textBlocks);
  7520. var isList = lazyLookup(lists);
  7521. var isListItem = lazyLookup(listItems$1);
  7522. var isTableSection = lazyLookup(tableSections);
  7523. var isTableCell$4 = lazyLookup(tableCells);
  7524. var isWsPreserveElement = lazyLookup(wsElements);
  7525. var ancestor$1 = function (scope, selector, isRoot) {
  7526. return ancestor$2(scope, selector, isRoot).isSome();
  7527. };
  7528. var zeroWidth = '\uFEFF';
  7529. var nbsp = '\xA0';
  7530. var isZwsp$1 = function (char) {
  7531. return char === zeroWidth;
  7532. };
  7533. var removeZwsp = function (s) {
  7534. return s.replace(/\uFEFF/g, '');
  7535. };
  7536. var ZWSP$1 = zeroWidth;
  7537. var isZwsp = isZwsp$1;
  7538. var trim$2 = removeZwsp;
  7539. var isElement$4 = isElement$5;
  7540. var isText$6 = isText$7;
  7541. var isCaretContainerBlock$1 = function (node) {
  7542. if (isText$6(node)) {
  7543. node = node.parentNode;
  7544. }
  7545. return isElement$4(node) && node.hasAttribute('data-mce-caret');
  7546. };
  7547. var isCaretContainerInline = function (node) {
  7548. return isText$6(node) && isZwsp(node.data);
  7549. };
  7550. var isCaretContainer$2 = function (node) {
  7551. return isCaretContainerBlock$1(node) || isCaretContainerInline(node);
  7552. };
  7553. var hasContent = function (node) {
  7554. return node.firstChild !== node.lastChild || !isBr$5(node.firstChild);
  7555. };
  7556. var insertInline$1 = function (node, before) {
  7557. var doc = node.ownerDocument;
  7558. var textNode = doc.createTextNode(ZWSP$1);
  7559. var parentNode = node.parentNode;
  7560. if (!before) {
  7561. var sibling = node.nextSibling;
  7562. if (isText$6(sibling)) {
  7563. if (isCaretContainer$2(sibling)) {
  7564. return sibling;
  7565. }
  7566. if (startsWithCaretContainer$1(sibling)) {
  7567. sibling.splitText(1);
  7568. return sibling;
  7569. }
  7570. }
  7571. if (node.nextSibling) {
  7572. parentNode.insertBefore(textNode, node.nextSibling);
  7573. } else {
  7574. parentNode.appendChild(textNode);
  7575. }
  7576. } else {
  7577. var sibling = node.previousSibling;
  7578. if (isText$6(sibling)) {
  7579. if (isCaretContainer$2(sibling)) {
  7580. return sibling;
  7581. }
  7582. if (endsWithCaretContainer$1(sibling)) {
  7583. return sibling.splitText(sibling.data.length - 1);
  7584. }
  7585. }
  7586. parentNode.insertBefore(textNode, node);
  7587. }
  7588. return textNode;
  7589. };
  7590. var isBeforeInline = function (pos) {
  7591. var container = pos.container();
  7592. if (!isText$7(container)) {
  7593. return false;
  7594. }
  7595. return container.data.charAt(pos.offset()) === ZWSP$1 || pos.isAtStart() && isCaretContainerInline(container.previousSibling);
  7596. };
  7597. var isAfterInline = function (pos) {
  7598. var container = pos.container();
  7599. if (!isText$7(container)) {
  7600. return false;
  7601. }
  7602. return container.data.charAt(pos.offset() - 1) === ZWSP$1 || pos.isAtEnd() && isCaretContainerInline(container.nextSibling);
  7603. };
  7604. var createBogusBr = function () {
  7605. var br = document.createElement('br');
  7606. br.setAttribute('data-mce-bogus', '1');
  7607. return br;
  7608. };
  7609. var insertBlock$1 = function (blockName, node, before) {
  7610. var doc = node.ownerDocument;
  7611. var blockNode = doc.createElement(blockName);
  7612. blockNode.setAttribute('data-mce-caret', before ? 'before' : 'after');
  7613. blockNode.setAttribute('data-mce-bogus', 'all');
  7614. blockNode.appendChild(createBogusBr());
  7615. var parentNode = node.parentNode;
  7616. if (!before) {
  7617. if (node.nextSibling) {
  7618. parentNode.insertBefore(blockNode, node.nextSibling);
  7619. } else {
  7620. parentNode.appendChild(blockNode);
  7621. }
  7622. } else {
  7623. parentNode.insertBefore(blockNode, node);
  7624. }
  7625. return blockNode;
  7626. };
  7627. var startsWithCaretContainer$1 = function (node) {
  7628. return isText$6(node) && node.data[0] === ZWSP$1;
  7629. };
  7630. var endsWithCaretContainer$1 = function (node) {
  7631. return isText$6(node) && node.data[node.data.length - 1] === ZWSP$1;
  7632. };
  7633. var trimBogusBr = function (elm) {
  7634. var brs = elm.getElementsByTagName('br');
  7635. var lastBr = brs[brs.length - 1];
  7636. if (isBogus$2(lastBr)) {
  7637. lastBr.parentNode.removeChild(lastBr);
  7638. }
  7639. };
  7640. var showCaretContainerBlock = function (caretContainer) {
  7641. if (caretContainer && caretContainer.hasAttribute('data-mce-caret')) {
  7642. trimBogusBr(caretContainer);
  7643. caretContainer.removeAttribute('data-mce-caret');
  7644. caretContainer.removeAttribute('data-mce-bogus');
  7645. caretContainer.removeAttribute('style');
  7646. caretContainer.removeAttribute('_moz_abspos');
  7647. return caretContainer;
  7648. }
  7649. return null;
  7650. };
  7651. var isRangeInCaretContainerBlock = function (range) {
  7652. return isCaretContainerBlock$1(range.startContainer);
  7653. };
  7654. var isContentEditableTrue$3 = isContentEditableTrue$4;
  7655. var isContentEditableFalse$a = isContentEditableFalse$b;
  7656. var isBr$3 = isBr$5;
  7657. var isText$5 = isText$7;
  7658. var isInvalidTextElement = matchNodeNames([
  7659. 'script',
  7660. 'style',
  7661. 'textarea'
  7662. ]);
  7663. var isAtomicInline = matchNodeNames([
  7664. 'img',
  7665. 'input',
  7666. 'textarea',
  7667. 'hr',
  7668. 'iframe',
  7669. 'video',
  7670. 'audio',
  7671. 'object',
  7672. 'embed'
  7673. ]);
  7674. var isTable$1 = matchNodeNames(['table']);
  7675. var isCaretContainer$1 = isCaretContainer$2;
  7676. var isCaretCandidate$3 = function (node) {
  7677. if (isCaretContainer$1(node)) {
  7678. return false;
  7679. }
  7680. if (isText$5(node)) {
  7681. return !isInvalidTextElement(node.parentNode);
  7682. }
  7683. return isAtomicInline(node) || isBr$3(node) || isTable$1(node) || isNonUiContentEditableFalse(node);
  7684. };
  7685. var isUnselectable = function (node) {
  7686. return isElement$5(node) && node.getAttribute('unselectable') === 'true';
  7687. };
  7688. var isNonUiContentEditableFalse = function (node) {
  7689. return isUnselectable(node) === false && isContentEditableFalse$a(node);
  7690. };
  7691. var isInEditable = function (node, root) {
  7692. for (node = node.parentNode; node && node !== root; node = node.parentNode) {
  7693. if (isNonUiContentEditableFalse(node)) {
  7694. return false;
  7695. }
  7696. if (isContentEditableTrue$3(node)) {
  7697. return true;
  7698. }
  7699. }
  7700. return true;
  7701. };
  7702. var isAtomicContentEditableFalse = function (node) {
  7703. if (!isNonUiContentEditableFalse(node)) {
  7704. return false;
  7705. }
  7706. return foldl(from(node.getElementsByTagName('*')), function (result, elm) {
  7707. return result || isContentEditableTrue$3(elm);
  7708. }, false) !== true;
  7709. };
  7710. var isAtomic$1 = function (node) {
  7711. return isAtomicInline(node) || isAtomicContentEditableFalse(node);
  7712. };
  7713. var isEditableCaretCandidate$1 = function (node, root) {
  7714. return isCaretCandidate$3(node) && isInEditable(node, root);
  7715. };
  7716. var whiteSpaceRegExp$1 = /^[ \t\r\n]*$/;
  7717. var isWhitespaceText = function (text) {
  7718. return whiteSpaceRegExp$1.test(text);
  7719. };
  7720. var hasWhitespacePreserveParent = function (node, rootNode) {
  7721. var rootElement = SugarElement.fromDom(rootNode);
  7722. var startNode = SugarElement.fromDom(node);
  7723. return ancestor$1(startNode, 'pre,code', curry(eq, rootElement));
  7724. };
  7725. var isWhitespace = function (node, rootNode) {
  7726. return isText$7(node) && isWhitespaceText(node.data) && hasWhitespacePreserveParent(node, rootNode) === false;
  7727. };
  7728. var isNamedAnchor = function (node) {
  7729. return isElement$5(node) && node.nodeName === 'A' && !node.hasAttribute('href') && (node.hasAttribute('name') || node.hasAttribute('id'));
  7730. };
  7731. var isContent$1 = function (node, rootNode) {
  7732. return isCaretCandidate$3(node) && isWhitespace(node, rootNode) === false || isNamedAnchor(node) || isBookmark(node);
  7733. };
  7734. var isBookmark = hasAttribute('data-mce-bookmark');
  7735. var isBogus$1 = hasAttribute('data-mce-bogus');
  7736. var isBogusAll = hasAttributeValue('data-mce-bogus', 'all');
  7737. var isEmptyNode = function (targetNode, skipBogus) {
  7738. var brCount = 0;
  7739. if (isContent$1(targetNode, targetNode)) {
  7740. return false;
  7741. } else {
  7742. var node = targetNode.firstChild;
  7743. if (!node) {
  7744. return true;
  7745. }
  7746. var walker = new DomTreeWalker(node, targetNode);
  7747. do {
  7748. if (skipBogus) {
  7749. if (isBogusAll(node)) {
  7750. node = walker.next(true);
  7751. continue;
  7752. }
  7753. if (isBogus$1(node)) {
  7754. node = walker.next();
  7755. continue;
  7756. }
  7757. }
  7758. if (isBr$5(node)) {
  7759. brCount++;
  7760. node = walker.next();
  7761. continue;
  7762. }
  7763. if (isContent$1(node, targetNode)) {
  7764. return false;
  7765. }
  7766. node = walker.next();
  7767. } while (node);
  7768. return brCount <= 1;
  7769. }
  7770. };
  7771. var isEmpty$2 = function (elm, skipBogus) {
  7772. if (skipBogus === void 0) {
  7773. skipBogus = true;
  7774. }
  7775. return isEmptyNode(elm.dom, skipBogus);
  7776. };
  7777. var isSpan = function (node) {
  7778. return node.nodeName.toLowerCase() === 'span';
  7779. };
  7780. var isInlineContent = function (node, root) {
  7781. return isNonNullable(node) && (isContent$1(node, root) || isInline$1(SugarElement.fromDom(node)));
  7782. };
  7783. var surroundedByInlineContent = function (node, root) {
  7784. var prev = new DomTreeWalker(node, root).prev(false);
  7785. var next = new DomTreeWalker(node, root).next(false);
  7786. var prevIsInline = isUndefined(prev) || isInlineContent(prev, root);
  7787. var nextIsInline = isUndefined(next) || isInlineContent(next, root);
  7788. return prevIsInline && nextIsInline;
  7789. };
  7790. var isBookmarkNode$2 = function (node) {
  7791. return isSpan(node) && node.getAttribute('data-mce-type') === 'bookmark';
  7792. };
  7793. var isKeepTextNode = function (node, root) {
  7794. return isText$7(node) && node.data.length > 0 && surroundedByInlineContent(node, root);
  7795. };
  7796. var isKeepElement = function (node) {
  7797. return isElement$5(node) ? node.childNodes.length > 0 : false;
  7798. };
  7799. var isDocument = function (node) {
  7800. return isDocumentFragment(node) || isDocument$1(node);
  7801. };
  7802. var trimNode = function (dom, node, root) {
  7803. var rootNode = root || node;
  7804. if (isElement$5(node) && isBookmarkNode$2(node)) {
  7805. return node;
  7806. }
  7807. var children = node.childNodes;
  7808. for (var i = children.length - 1; i >= 0; i--) {
  7809. trimNode(dom, children[i], rootNode);
  7810. }
  7811. if (isElement$5(node)) {
  7812. var currentChildren = node.childNodes;
  7813. if (currentChildren.length === 1 && isBookmarkNode$2(currentChildren[0])) {
  7814. node.parentNode.insertBefore(currentChildren[0], node);
  7815. }
  7816. }
  7817. if (!isDocument(node) && !isContent$1(node, rootNode) && !isKeepElement(node) && !isKeepTextNode(node, rootNode)) {
  7818. dom.remove(node);
  7819. }
  7820. return node;
  7821. };
  7822. var makeMap$3 = Tools.makeMap;
  7823. var attrsCharsRegExp = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  7824. var textCharsRegExp = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  7825. var rawCharsRegExp = /[<>&\"\']/g;
  7826. var entityRegExp = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi;
  7827. var asciiMap = {
  7828. 128: '\u20AC',
  7829. 130: '\u201A',
  7830. 131: '\u0192',
  7831. 132: '\u201E',
  7832. 133: '\u2026',
  7833. 134: '\u2020',
  7834. 135: '\u2021',
  7835. 136: '\u02c6',
  7836. 137: '\u2030',
  7837. 138: '\u0160',
  7838. 139: '\u2039',
  7839. 140: '\u0152',
  7840. 142: '\u017d',
  7841. 145: '\u2018',
  7842. 146: '\u2019',
  7843. 147: '\u201C',
  7844. 148: '\u201D',
  7845. 149: '\u2022',
  7846. 150: '\u2013',
  7847. 151: '\u2014',
  7848. 152: '\u02DC',
  7849. 153: '\u2122',
  7850. 154: '\u0161',
  7851. 155: '\u203A',
  7852. 156: '\u0153',
  7853. 158: '\u017e',
  7854. 159: '\u0178'
  7855. };
  7856. var baseEntities = {
  7857. '"': '&quot;',
  7858. '\'': '&#39;',
  7859. '<': '&lt;',
  7860. '>': '&gt;',
  7861. '&': '&amp;',
  7862. '`': '&#96;'
  7863. };
  7864. var reverseEntities = {
  7865. '&lt;': '<',
  7866. '&gt;': '>',
  7867. '&amp;': '&',
  7868. '&quot;': '"',
  7869. '&apos;': '\''
  7870. };
  7871. var nativeDecode = function (text) {
  7872. var elm = SugarElement.fromTag('div').dom;
  7873. elm.innerHTML = text;
  7874. return elm.textContent || elm.innerText || text;
  7875. };
  7876. var buildEntitiesLookup = function (items, radix) {
  7877. var i, chr, entity;
  7878. var lookup = {};
  7879. if (items) {
  7880. items = items.split(',');
  7881. radix = radix || 10;
  7882. for (i = 0; i < items.length; i += 2) {
  7883. chr = String.fromCharCode(parseInt(items[i], radix));
  7884. if (!baseEntities[chr]) {
  7885. entity = '&' + items[i + 1] + ';';
  7886. lookup[chr] = entity;
  7887. lookup[entity] = chr;
  7888. }
  7889. }
  7890. return lookup;
  7891. }
  7892. };
  7893. var namedEntities = buildEntitiesLookup('50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,' + '5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,' + '5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,' + '5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,' + '68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,' + '6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,' + '6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,' + '75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,' + '7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,' + '7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,' + 'sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,' + 'st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,' + 't9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,' + 'tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,' + 'u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,' + '81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,' + '8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,' + '8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,' + '8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,' + '8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,' + 'nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,' + 'rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,' + 'Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,' + '80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,' + '811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro', 32);
  7894. var encodeRaw = function (text, attr) {
  7895. return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
  7896. return baseEntities[chr] || chr;
  7897. });
  7898. };
  7899. var encodeAllRaw = function (text) {
  7900. return ('' + text).replace(rawCharsRegExp, function (chr) {
  7901. return baseEntities[chr] || chr;
  7902. });
  7903. };
  7904. var encodeNumeric = function (text, attr) {
  7905. return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
  7906. if (chr.length > 1) {
  7907. return '&#' + ((chr.charCodeAt(0) - 55296) * 1024 + (chr.charCodeAt(1) - 56320) + 65536) + ';';
  7908. }
  7909. return baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';';
  7910. });
  7911. };
  7912. var encodeNamed = function (text, attr, entities) {
  7913. entities = entities || namedEntities;
  7914. return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
  7915. return baseEntities[chr] || entities[chr] || chr;
  7916. });
  7917. };
  7918. var getEncodeFunc = function (name, entities) {
  7919. var entitiesMap = buildEntitiesLookup(entities) || namedEntities;
  7920. var encodeNamedAndNumeric = function (text, attr) {
  7921. return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function (chr) {
  7922. if (baseEntities[chr] !== undefined) {
  7923. return baseEntities[chr];
  7924. }
  7925. if (entitiesMap[chr] !== undefined) {
  7926. return entitiesMap[chr];
  7927. }
  7928. if (chr.length > 1) {
  7929. return '&#' + ((chr.charCodeAt(0) - 55296) * 1024 + (chr.charCodeAt(1) - 56320) + 65536) + ';';
  7930. }
  7931. return '&#' + chr.charCodeAt(0) + ';';
  7932. });
  7933. };
  7934. var encodeCustomNamed = function (text, attr) {
  7935. return encodeNamed(text, attr, entitiesMap);
  7936. };
  7937. var nameMap = makeMap$3(name.replace(/\+/g, ','));
  7938. if (nameMap.named && nameMap.numeric) {
  7939. return encodeNamedAndNumeric;
  7940. }
  7941. if (nameMap.named) {
  7942. if (entities) {
  7943. return encodeCustomNamed;
  7944. }
  7945. return encodeNamed;
  7946. }
  7947. if (nameMap.numeric) {
  7948. return encodeNumeric;
  7949. }
  7950. return encodeRaw;
  7951. };
  7952. var decode = function (text) {
  7953. return text.replace(entityRegExp, function (all, numeric) {
  7954. if (numeric) {
  7955. if (numeric.charAt(0).toLowerCase() === 'x') {
  7956. numeric = parseInt(numeric.substr(1), 16);
  7957. } else {
  7958. numeric = parseInt(numeric, 10);
  7959. }
  7960. if (numeric > 65535) {
  7961. numeric -= 65536;
  7962. return String.fromCharCode(55296 + (numeric >> 10), 56320 + (numeric & 1023));
  7963. }
  7964. return asciiMap[numeric] || String.fromCharCode(numeric);
  7965. }
  7966. return reverseEntities[all] || namedEntities[all] || nativeDecode(all);
  7967. });
  7968. };
  7969. var Entities = {
  7970. encodeRaw: encodeRaw,
  7971. encodeAllRaw: encodeAllRaw,
  7972. encodeNumeric: encodeNumeric,
  7973. encodeNamed: encodeNamed,
  7974. getEncodeFunc: getEncodeFunc,
  7975. decode: decode
  7976. };
  7977. var mapCache = {}, dummyObj = {};
  7978. var makeMap$2 = Tools.makeMap, each$h = Tools.each, extend$5 = Tools.extend, explode$3 = Tools.explode, inArray$2 = Tools.inArray;
  7979. var split$1 = function (items, delim) {
  7980. items = Tools.trim(items);
  7981. return items ? items.split(delim || ' ') : [];
  7982. };
  7983. var compileSchema = function (type) {
  7984. var schema = {};
  7985. var globalAttributes, blockContent;
  7986. var phrasingContent, flowContent, html4BlockContent, html4PhrasingContent;
  7987. var add = function (name, attributes, children) {
  7988. var ni, attributesOrder, element;
  7989. var arrayToMap = function (array, obj) {
  7990. var map = {};
  7991. var i, l;
  7992. for (i = 0, l = array.length; i < l; i++) {
  7993. map[array[i]] = obj || {};
  7994. }
  7995. return map;
  7996. };
  7997. children = children || [];
  7998. attributes = attributes || '';
  7999. if (typeof children === 'string') {
  8000. children = split$1(children);
  8001. }
  8002. var names = split$1(name);
  8003. ni = names.length;
  8004. while (ni--) {
  8005. attributesOrder = split$1([
  8006. globalAttributes,
  8007. attributes
  8008. ].join(' '));
  8009. element = {
  8010. attributes: arrayToMap(attributesOrder),
  8011. attributesOrder: attributesOrder,
  8012. children: arrayToMap(children, dummyObj)
  8013. };
  8014. schema[names[ni]] = element;
  8015. }
  8016. };
  8017. var addAttrs = function (name, attributes) {
  8018. var ni, schemaItem, i, l;
  8019. var names = split$1(name);
  8020. ni = names.length;
  8021. var attrs = split$1(attributes);
  8022. while (ni--) {
  8023. schemaItem = schema[names[ni]];
  8024. for (i = 0, l = attrs.length; i < l; i++) {
  8025. schemaItem.attributes[attrs[i]] = {};
  8026. schemaItem.attributesOrder.push(attrs[i]);
  8027. }
  8028. }
  8029. };
  8030. if (mapCache[type]) {
  8031. return mapCache[type];
  8032. }
  8033. globalAttributes = 'id accesskey class dir lang style tabindex title role';
  8034. blockContent = 'address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul';
  8035. phrasingContent = 'a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd ' + 'label map noscript object q s samp script select small span strong sub sup ' + 'textarea u var #text #comment';
  8036. if (type !== 'html4') {
  8037. globalAttributes += ' contenteditable contextmenu draggable dropzone ' + 'hidden spellcheck translate';
  8038. blockContent += ' article aside details dialog figure main header footer hgroup section nav';
  8039. phrasingContent += ' audio canvas command datalist mark meter output picture ' + 'progress time wbr video ruby bdi keygen';
  8040. }
  8041. if (type !== 'html5-strict') {
  8042. globalAttributes += ' xml:lang';
  8043. html4PhrasingContent = 'acronym applet basefont big font strike tt';
  8044. phrasingContent = [
  8045. phrasingContent,
  8046. html4PhrasingContent
  8047. ].join(' ');
  8048. each$h(split$1(html4PhrasingContent), function (name) {
  8049. add(name, '', phrasingContent);
  8050. });
  8051. html4BlockContent = 'center dir isindex noframes';
  8052. blockContent = [
  8053. blockContent,
  8054. html4BlockContent
  8055. ].join(' ');
  8056. flowContent = [
  8057. blockContent,
  8058. phrasingContent
  8059. ].join(' ');
  8060. each$h(split$1(html4BlockContent), function (name) {
  8061. add(name, '', flowContent);
  8062. });
  8063. }
  8064. flowContent = flowContent || [
  8065. blockContent,
  8066. phrasingContent
  8067. ].join(' ');
  8068. add('html', 'manifest', 'head body');
  8069. add('head', '', 'base command link meta noscript script style title');
  8070. add('title hr noscript br');
  8071. add('base', 'href target');
  8072. add('link', 'href rel media hreflang type sizes hreflang');
  8073. add('meta', 'name http-equiv content charset');
  8074. add('style', 'media type scoped');
  8075. add('script', 'src async defer type charset');
  8076. add('body', 'onafterprint onbeforeprint onbeforeunload onblur onerror onfocus ' + 'onhashchange onload onmessage onoffline ononline onpagehide onpageshow ' + 'onpopstate onresize onscroll onstorage onunload', flowContent);
  8077. add('address dt dd div caption', '', flowContent);
  8078. add('h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn', '', phrasingContent);
  8079. add('blockquote', 'cite', flowContent);
  8080. add('ol', 'reversed start type', 'li');
  8081. add('ul', '', 'li');
  8082. add('li', 'value', flowContent);
  8083. add('dl', '', 'dt dd');
  8084. add('a', 'href target rel media hreflang type', phrasingContent);
  8085. add('q', 'cite', phrasingContent);
  8086. add('ins del', 'cite datetime', flowContent);
  8087. add('img', 'src sizes srcset alt usemap ismap width height');
  8088. add('iframe', 'src name width height', flowContent);
  8089. add('embed', 'src type width height');
  8090. add('object', 'data type typemustmatch name usemap form width height', [
  8091. flowContent,
  8092. 'param'
  8093. ].join(' '));
  8094. add('param', 'name value');
  8095. add('map', 'name', [
  8096. flowContent,
  8097. 'area'
  8098. ].join(' '));
  8099. add('area', 'alt coords shape href target rel media hreflang type');
  8100. add('table', 'border', 'caption colgroup thead tfoot tbody tr' + (type === 'html4' ? ' col' : ''));
  8101. add('colgroup', 'span', 'col');
  8102. add('col', 'span');
  8103. add('tbody thead tfoot', '', 'tr');
  8104. add('tr', '', 'td th');
  8105. add('td', 'colspan rowspan headers', flowContent);
  8106. add('th', 'colspan rowspan headers scope abbr', flowContent);
  8107. add('form', 'accept-charset action autocomplete enctype method name novalidate target', flowContent);
  8108. add('fieldset', 'disabled form name', [
  8109. flowContent,
  8110. 'legend'
  8111. ].join(' '));
  8112. add('label', 'form for', phrasingContent);
  8113. add('input', 'accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate ' + 'formtarget height list max maxlength min multiple name pattern readonly required size src step type value width');
  8114. add('button', 'disabled form formaction formenctype formmethod formnovalidate formtarget name type value', type === 'html4' ? flowContent : phrasingContent);
  8115. add('select', 'disabled form multiple name required size', 'option optgroup');
  8116. add('optgroup', 'disabled label', 'option');
  8117. add('option', 'disabled label selected value');
  8118. add('textarea', 'cols dirname disabled form maxlength name readonly required rows wrap');
  8119. add('menu', 'type label', [
  8120. flowContent,
  8121. 'li'
  8122. ].join(' '));
  8123. add('noscript', '', flowContent);
  8124. if (type !== 'html4') {
  8125. add('wbr');
  8126. add('ruby', '', [
  8127. phrasingContent,
  8128. 'rt rp'
  8129. ].join(' '));
  8130. add('figcaption', '', flowContent);
  8131. add('mark rt rp summary bdi', '', phrasingContent);
  8132. add('canvas', 'width height', flowContent);
  8133. add('video', 'src crossorigin poster preload autoplay mediagroup loop ' + 'muted controls width height buffered', [
  8134. flowContent,
  8135. 'track source'
  8136. ].join(' '));
  8137. add('audio', 'src crossorigin preload autoplay mediagroup loop muted controls ' + 'buffered volume', [
  8138. flowContent,
  8139. 'track source'
  8140. ].join(' '));
  8141. add('picture', '', 'img source');
  8142. add('source', 'src srcset type media sizes');
  8143. add('track', 'kind src srclang label default');
  8144. add('datalist', '', [
  8145. phrasingContent,
  8146. 'option'
  8147. ].join(' '));
  8148. add('article section nav aside main header footer', '', flowContent);
  8149. add('hgroup', '', 'h1 h2 h3 h4 h5 h6');
  8150. add('figure', '', [
  8151. flowContent,
  8152. 'figcaption'
  8153. ].join(' '));
  8154. add('time', 'datetime', phrasingContent);
  8155. add('dialog', 'open', flowContent);
  8156. add('command', 'type label icon disabled checked radiogroup command');
  8157. add('output', 'for form name', phrasingContent);
  8158. add('progress', 'value max', phrasingContent);
  8159. add('meter', 'value min max low high optimum', phrasingContent);
  8160. add('details', 'open', [
  8161. flowContent,
  8162. 'summary'
  8163. ].join(' '));
  8164. add('keygen', 'autofocus challenge disabled form keytype name');
  8165. }
  8166. if (type !== 'html5-strict') {
  8167. addAttrs('script', 'language xml:space');
  8168. addAttrs('style', 'xml:space');
  8169. addAttrs('object', 'declare classid code codebase codetype archive standby align border hspace vspace');
  8170. addAttrs('embed', 'align name hspace vspace');
  8171. addAttrs('param', 'valuetype type');
  8172. addAttrs('a', 'charset name rev shape coords');
  8173. addAttrs('br', 'clear');
  8174. addAttrs('applet', 'codebase archive code object alt name width height align hspace vspace');
  8175. addAttrs('img', 'name longdesc align border hspace vspace');
  8176. addAttrs('iframe', 'longdesc frameborder marginwidth marginheight scrolling align');
  8177. addAttrs('font basefont', 'size color face');
  8178. addAttrs('input', 'usemap align');
  8179. addAttrs('select');
  8180. addAttrs('textarea');
  8181. addAttrs('h1 h2 h3 h4 h5 h6 div p legend caption', 'align');
  8182. addAttrs('ul', 'type compact');
  8183. addAttrs('li', 'type');
  8184. addAttrs('ol dl menu dir', 'compact');
  8185. addAttrs('pre', 'width xml:space');
  8186. addAttrs('hr', 'align noshade size width');
  8187. addAttrs('isindex', 'prompt');
  8188. addAttrs('table', 'summary width frame rules cellspacing cellpadding align bgcolor');
  8189. addAttrs('col', 'width align char charoff valign');
  8190. addAttrs('colgroup', 'width align char charoff valign');
  8191. addAttrs('thead', 'align char charoff valign');
  8192. addAttrs('tr', 'align char charoff valign bgcolor');
  8193. addAttrs('th', 'axis align char charoff valign nowrap bgcolor width height');
  8194. addAttrs('form', 'accept');
  8195. addAttrs('td', 'abbr axis scope align char charoff valign nowrap bgcolor width height');
  8196. addAttrs('tfoot', 'align char charoff valign');
  8197. addAttrs('tbody', 'align char charoff valign');
  8198. addAttrs('area', 'nohref');
  8199. addAttrs('body', 'background bgcolor text link vlink alink');
  8200. }
  8201. if (type !== 'html4') {
  8202. addAttrs('input button select textarea', 'autofocus');
  8203. addAttrs('input textarea', 'placeholder');
  8204. addAttrs('a', 'download');
  8205. addAttrs('link script img', 'crossorigin');
  8206. addAttrs('img', 'loading');
  8207. addAttrs('iframe', 'sandbox seamless allowfullscreen loading');
  8208. }
  8209. each$h(split$1('a form meter progress dfn'), function (name) {
  8210. if (schema[name]) {
  8211. delete schema[name].children[name];
  8212. }
  8213. });
  8214. delete schema.caption.children.table;
  8215. delete schema.script;
  8216. mapCache[type] = schema;
  8217. return schema;
  8218. };
  8219. var compileElementMap = function (value, mode) {
  8220. var styles;
  8221. if (value) {
  8222. styles = {};
  8223. if (typeof value === 'string') {
  8224. value = { '*': value };
  8225. }
  8226. each$h(value, function (value, key) {
  8227. styles[key] = styles[key.toUpperCase()] = mode === 'map' ? makeMap$2(value, /[, ]/) : explode$3(value, /[, ]/);
  8228. });
  8229. }
  8230. return styles;
  8231. };
  8232. var Schema = function (settings) {
  8233. var elements = {};
  8234. var children = {};
  8235. var patternElements = [];
  8236. var customElementsMap = {}, specialElements = {};
  8237. var createLookupTable = function (option, defaultValue, extendWith) {
  8238. var value = settings[option];
  8239. if (!value) {
  8240. value = mapCache[option];
  8241. if (!value) {
  8242. value = makeMap$2(defaultValue, ' ', makeMap$2(defaultValue.toUpperCase(), ' '));
  8243. value = extend$5(value, extendWith);
  8244. mapCache[option] = value;
  8245. }
  8246. } else {
  8247. value = makeMap$2(value, /[, ]/, makeMap$2(value.toUpperCase(), /[, ]/));
  8248. }
  8249. return value;
  8250. };
  8251. settings = settings || {};
  8252. var schemaItems = compileSchema(settings.schema);
  8253. if (settings.verify_html === false) {
  8254. settings.valid_elements = '*[*]';
  8255. }
  8256. var validStyles = compileElementMap(settings.valid_styles);
  8257. var invalidStyles = compileElementMap(settings.invalid_styles, 'map');
  8258. var validClasses = compileElementMap(settings.valid_classes, 'map');
  8259. var whiteSpaceElementsMap = createLookupTable('whitespace_elements', 'pre script noscript style textarea video audio iframe object code');
  8260. var selfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');
  8261. var shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link ' + 'meta param embed source wbr track');
  8262. var boolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize ' + 'noshade nowrap readonly selected autoplay loop controls');
  8263. var nonEmptyOrMoveCaretBeforeOnEnter = 'td th iframe video audio object script code';
  8264. var nonEmptyElementsMap = createLookupTable('non_empty_elements', nonEmptyOrMoveCaretBeforeOnEnter + ' pre', shortEndedElementsMap);
  8265. var moveCaretBeforeOnEnterElementsMap = createLookupTable('move_caret_before_on_enter_elements', nonEmptyOrMoveCaretBeforeOnEnter + ' table', shortEndedElementsMap);
  8266. var textBlockElementsMap = createLookupTable('text_block_elements', 'h1 h2 h3 h4 h5 h6 p div address pre form ' + 'blockquote center dir fieldset header footer article section hgroup aside main nav figure');
  8267. var blockElementsMap = createLookupTable('block_elements', 'hr table tbody thead tfoot ' + 'th tr td li ol ul caption dl dt dd noscript menu isindex option ' + 'datalist select optgroup figcaption details summary', textBlockElementsMap);
  8268. var textInlineElementsMap = createLookupTable('text_inline_elements', 'span strong b em i font strike u var cite ' + 'dfn code mark q sup sub samp');
  8269. each$h((settings.special || 'script noscript iframe noframes noembed title style textarea xmp').split(' '), function (name) {
  8270. specialElements[name] = new RegExp('</' + name + '[^>]*>', 'gi');
  8271. });
  8272. var patternToRegExp = function (str) {
  8273. return new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$');
  8274. };
  8275. var addValidElements = function (validElements) {
  8276. var ei, el, ai, al, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder, prefix, outputName, globalAttributes, globalAttributesOrder, value;
  8277. var elementRuleRegExp = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/, attrRuleRegExp = /^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/, hasPatternsRegExp = /[*?+]/;
  8278. if (validElements) {
  8279. var validElementsArr = split$1(validElements, ',');
  8280. if (elements['@']) {
  8281. globalAttributes = elements['@'].attributes;
  8282. globalAttributesOrder = elements['@'].attributesOrder;
  8283. }
  8284. for (ei = 0, el = validElementsArr.length; ei < el; ei++) {
  8285. matches = elementRuleRegExp.exec(validElementsArr[ei]);
  8286. if (matches) {
  8287. prefix = matches[1];
  8288. elementName = matches[2];
  8289. outputName = matches[3];
  8290. attrData = matches[5];
  8291. attributes = {};
  8292. attributesOrder = [];
  8293. element = {
  8294. attributes: attributes,
  8295. attributesOrder: attributesOrder
  8296. };
  8297. if (prefix === '#') {
  8298. element.paddEmpty = true;
  8299. }
  8300. if (prefix === '-') {
  8301. element.removeEmpty = true;
  8302. }
  8303. if (matches[4] === '!') {
  8304. element.removeEmptyAttrs = true;
  8305. }
  8306. if (globalAttributes) {
  8307. each$j(globalAttributes, function (value, key) {
  8308. attributes[key] = value;
  8309. });
  8310. attributesOrder.push.apply(attributesOrder, globalAttributesOrder);
  8311. }
  8312. if (attrData) {
  8313. attrData = split$1(attrData, '|');
  8314. for (ai = 0, al = attrData.length; ai < al; ai++) {
  8315. matches = attrRuleRegExp.exec(attrData[ai]);
  8316. if (matches) {
  8317. attr = {};
  8318. attrType = matches[1];
  8319. attrName = matches[2].replace(/[\\:]:/g, ':');
  8320. prefix = matches[3];
  8321. value = matches[4];
  8322. if (attrType === '!') {
  8323. element.attributesRequired = element.attributesRequired || [];
  8324. element.attributesRequired.push(attrName);
  8325. attr.required = true;
  8326. }
  8327. if (attrType === '-') {
  8328. delete attributes[attrName];
  8329. attributesOrder.splice(inArray$2(attributesOrder, attrName), 1);
  8330. continue;
  8331. }
  8332. if (prefix) {
  8333. if (prefix === '=') {
  8334. element.attributesDefault = element.attributesDefault || [];
  8335. element.attributesDefault.push({
  8336. name: attrName,
  8337. value: value
  8338. });
  8339. attr.defaultValue = value;
  8340. }
  8341. if (prefix === ':') {
  8342. element.attributesForced = element.attributesForced || [];
  8343. element.attributesForced.push({
  8344. name: attrName,
  8345. value: value
  8346. });
  8347. attr.forcedValue = value;
  8348. }
  8349. if (prefix === '<') {
  8350. attr.validValues = makeMap$2(value, '?');
  8351. }
  8352. }
  8353. if (hasPatternsRegExp.test(attrName)) {
  8354. element.attributePatterns = element.attributePatterns || [];
  8355. attr.pattern = patternToRegExp(attrName);
  8356. element.attributePatterns.push(attr);
  8357. } else {
  8358. if (!attributes[attrName]) {
  8359. attributesOrder.push(attrName);
  8360. }
  8361. attributes[attrName] = attr;
  8362. }
  8363. }
  8364. }
  8365. }
  8366. if (!globalAttributes && elementName === '@') {
  8367. globalAttributes = attributes;
  8368. globalAttributesOrder = attributesOrder;
  8369. }
  8370. if (outputName) {
  8371. element.outputName = elementName;
  8372. elements[outputName] = element;
  8373. }
  8374. if (hasPatternsRegExp.test(elementName)) {
  8375. element.pattern = patternToRegExp(elementName);
  8376. patternElements.push(element);
  8377. } else {
  8378. elements[elementName] = element;
  8379. }
  8380. }
  8381. }
  8382. }
  8383. };
  8384. var setValidElements = function (validElements) {
  8385. elements = {};
  8386. patternElements = [];
  8387. addValidElements(validElements);
  8388. each$h(schemaItems, function (element, name) {
  8389. children[name] = element.children;
  8390. });
  8391. };
  8392. var addCustomElements = function (customElements) {
  8393. var customElementRegExp = /^(~)?(.+)$/;
  8394. if (customElements) {
  8395. mapCache.text_block_elements = mapCache.block_elements = null;
  8396. each$h(split$1(customElements, ','), function (rule) {
  8397. var matches = customElementRegExp.exec(rule), inline = matches[1] === '~', cloneName = inline ? 'span' : 'div', name = matches[2];
  8398. children[name] = children[cloneName];
  8399. customElementsMap[name] = cloneName;
  8400. if (!inline) {
  8401. blockElementsMap[name.toUpperCase()] = {};
  8402. blockElementsMap[name] = {};
  8403. }
  8404. if (!elements[name]) {
  8405. var customRule = elements[cloneName];
  8406. customRule = extend$5({}, customRule);
  8407. delete customRule.removeEmptyAttrs;
  8408. delete customRule.removeEmpty;
  8409. elements[name] = customRule;
  8410. }
  8411. each$h(children, function (element, elmName) {
  8412. if (element[cloneName]) {
  8413. children[elmName] = element = extend$5({}, children[elmName]);
  8414. element[name] = element[cloneName];
  8415. }
  8416. });
  8417. });
  8418. }
  8419. };
  8420. var addValidChildren = function (validChildren) {
  8421. var childRuleRegExp = /^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;
  8422. mapCache[settings.schema] = null;
  8423. if (validChildren) {
  8424. each$h(split$1(validChildren, ','), function (rule) {
  8425. var matches = childRuleRegExp.exec(rule);
  8426. var parent, prefix;
  8427. if (matches) {
  8428. prefix = matches[1];
  8429. if (prefix) {
  8430. parent = children[matches[2]];
  8431. } else {
  8432. parent = children[matches[2]] = { '#comment': {} };
  8433. }
  8434. parent = children[matches[2]];
  8435. each$h(split$1(matches[3], '|'), function (child) {
  8436. if (prefix === '-') {
  8437. delete parent[child];
  8438. } else {
  8439. parent[child] = {};
  8440. }
  8441. });
  8442. }
  8443. });
  8444. }
  8445. };
  8446. var getElementRule = function (name) {
  8447. var element = elements[name], i;
  8448. if (element) {
  8449. return element;
  8450. }
  8451. i = patternElements.length;
  8452. while (i--) {
  8453. element = patternElements[i];
  8454. if (element.pattern.test(name)) {
  8455. return element;
  8456. }
  8457. }
  8458. };
  8459. if (!settings.valid_elements) {
  8460. each$h(schemaItems, function (element, name) {
  8461. elements[name] = {
  8462. attributes: element.attributes,
  8463. attributesOrder: element.attributesOrder
  8464. };
  8465. children[name] = element.children;
  8466. });
  8467. if (settings.schema !== 'html5') {
  8468. each$h(split$1('strong/b em/i'), function (item) {
  8469. var items = split$1(item, '/');
  8470. elements[items[1]].outputName = items[0];
  8471. });
  8472. }
  8473. each$h(split$1('ol ul sub sup blockquote span font a table tbody strong em b i'), function (name) {
  8474. if (elements[name]) {
  8475. elements[name].removeEmpty = true;
  8476. }
  8477. });
  8478. each$h(split$1('p h1 h2 h3 h4 h5 h6 th td pre div address caption li'), function (name) {
  8479. elements[name].paddEmpty = true;
  8480. });
  8481. each$h(split$1('span'), function (name) {
  8482. elements[name].removeEmptyAttrs = true;
  8483. });
  8484. } else {
  8485. setValidElements(settings.valid_elements);
  8486. }
  8487. addCustomElements(settings.custom_elements);
  8488. addValidChildren(settings.valid_children);
  8489. addValidElements(settings.extended_valid_elements);
  8490. addValidChildren('+ol[ul|ol],+ul[ul|ol]');
  8491. each$h({
  8492. dd: 'dl',
  8493. dt: 'dl',
  8494. li: 'ul ol',
  8495. td: 'tr',
  8496. th: 'tr',
  8497. tr: 'tbody thead tfoot',
  8498. tbody: 'table',
  8499. thead: 'table',
  8500. tfoot: 'table',
  8501. legend: 'fieldset',
  8502. area: 'map',
  8503. param: 'video audio object'
  8504. }, function (parents, item) {
  8505. if (elements[item]) {
  8506. elements[item].parentsRequired = split$1(parents);
  8507. }
  8508. });
  8509. if (settings.invalid_elements) {
  8510. each$h(explode$3(settings.invalid_elements), function (item) {
  8511. if (elements[item]) {
  8512. delete elements[item];
  8513. }
  8514. });
  8515. }
  8516. if (!getElementRule('span')) {
  8517. addValidElements('span[!data-mce-type|*]');
  8518. }
  8519. var getValidStyles = constant(validStyles);
  8520. var getInvalidStyles = constant(invalidStyles);
  8521. var getValidClasses = constant(validClasses);
  8522. var getBoolAttrs = constant(boolAttrMap);
  8523. var getBlockElements = constant(blockElementsMap);
  8524. var getTextBlockElements = constant(textBlockElementsMap);
  8525. var getTextInlineElements = constant(textInlineElementsMap);
  8526. var getShortEndedElements = constant(shortEndedElementsMap);
  8527. var getSelfClosingElements = constant(selfClosingElementsMap);
  8528. var getNonEmptyElements = constant(nonEmptyElementsMap);
  8529. var getMoveCaretBeforeOnEnterElements = constant(moveCaretBeforeOnEnterElementsMap);
  8530. var getWhiteSpaceElements = constant(whiteSpaceElementsMap);
  8531. var getSpecialElements = constant(specialElements);
  8532. var isValidChild = function (name, child) {
  8533. var parent = children[name.toLowerCase()];
  8534. return !!(parent && parent[child.toLowerCase()]);
  8535. };
  8536. var isValid = function (name, attr) {
  8537. var attrPatterns, i;
  8538. var rule = getElementRule(name);
  8539. if (rule) {
  8540. if (attr) {
  8541. if (rule.attributes[attr]) {
  8542. return true;
  8543. }
  8544. attrPatterns = rule.attributePatterns;
  8545. if (attrPatterns) {
  8546. i = attrPatterns.length;
  8547. while (i--) {
  8548. if (attrPatterns[i].pattern.test(name)) {
  8549. return true;
  8550. }
  8551. }
  8552. }
  8553. } else {
  8554. return true;
  8555. }
  8556. }
  8557. return false;
  8558. };
  8559. var getCustomElements = constant(customElementsMap);
  8560. return {
  8561. children: children,
  8562. elements: elements,
  8563. getValidStyles: getValidStyles,
  8564. getValidClasses: getValidClasses,
  8565. getBlockElements: getBlockElements,
  8566. getInvalidStyles: getInvalidStyles,
  8567. getShortEndedElements: getShortEndedElements,
  8568. getTextBlockElements: getTextBlockElements,
  8569. getTextInlineElements: getTextInlineElements,
  8570. getBoolAttrs: getBoolAttrs,
  8571. getElementRule: getElementRule,
  8572. getSelfClosingElements: getSelfClosingElements,
  8573. getNonEmptyElements: getNonEmptyElements,
  8574. getMoveCaretBeforeOnEnterElements: getMoveCaretBeforeOnEnterElements,
  8575. getWhiteSpaceElements: getWhiteSpaceElements,
  8576. getSpecialElements: getSpecialElements,
  8577. isValidChild: isValidChild,
  8578. isValid: isValid,
  8579. getCustomElements: getCustomElements,
  8580. addValidElements: addValidElements,
  8581. setValidElements: setValidElements,
  8582. addCustomElements: addCustomElements,
  8583. addValidChildren: addValidChildren
  8584. };
  8585. };
  8586. var toHex = function (match, r, g, b) {
  8587. var hex = function (val) {
  8588. val = parseInt(val, 10).toString(16);
  8589. return val.length > 1 ? val : '0' + val;
  8590. };
  8591. return '#' + hex(r) + hex(g) + hex(b);
  8592. };
  8593. var Styles = function (settings, schema) {
  8594. var _this = this;
  8595. var rgbRegExp = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi;
  8596. var urlOrStrRegExp = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi;
  8597. var styleRegExp = /\s*([^:]+):\s*([^;]+);?/g;
  8598. var trimRightRegExp = /\s+$/;
  8599. var i;
  8600. var encodingLookup = {};
  8601. var validStyles;
  8602. var invalidStyles;
  8603. var invisibleChar = zeroWidth;
  8604. settings = settings || {};
  8605. if (schema) {
  8606. validStyles = schema.getValidStyles();
  8607. invalidStyles = schema.getInvalidStyles();
  8608. }
  8609. var encodingItems = ('\\" \\\' \\; \\: ; : ' + invisibleChar).split(' ');
  8610. for (i = 0; i < encodingItems.length; i++) {
  8611. encodingLookup[encodingItems[i]] = invisibleChar + i;
  8612. encodingLookup[invisibleChar + i] = encodingItems[i];
  8613. }
  8614. return {
  8615. toHex: function (color) {
  8616. return color.replace(rgbRegExp, toHex);
  8617. },
  8618. parse: function (css) {
  8619. var styles = {};
  8620. var matches, name, value, isEncoded;
  8621. var urlConverter = settings.url_converter;
  8622. var urlConverterScope = settings.url_converter_scope || _this;
  8623. var compress = function (prefix, suffix, noJoin) {
  8624. var top = styles[prefix + '-top' + suffix];
  8625. if (!top) {
  8626. return;
  8627. }
  8628. var right = styles[prefix + '-right' + suffix];
  8629. if (!right) {
  8630. return;
  8631. }
  8632. var bottom = styles[prefix + '-bottom' + suffix];
  8633. if (!bottom) {
  8634. return;
  8635. }
  8636. var left = styles[prefix + '-left' + suffix];
  8637. if (!left) {
  8638. return;
  8639. }
  8640. var box = [
  8641. top,
  8642. right,
  8643. bottom,
  8644. left
  8645. ];
  8646. i = box.length - 1;
  8647. while (i--) {
  8648. if (box[i] !== box[i + 1]) {
  8649. break;
  8650. }
  8651. }
  8652. if (i > -1 && noJoin) {
  8653. return;
  8654. }
  8655. styles[prefix + suffix] = i === -1 ? box[0] : box.join(' ');
  8656. delete styles[prefix + '-top' + suffix];
  8657. delete styles[prefix + '-right' + suffix];
  8658. delete styles[prefix + '-bottom' + suffix];
  8659. delete styles[prefix + '-left' + suffix];
  8660. };
  8661. var canCompress = function (key) {
  8662. var value = styles[key], i;
  8663. if (!value) {
  8664. return;
  8665. }
  8666. value = value.split(' ');
  8667. i = value.length;
  8668. while (i--) {
  8669. if (value[i] !== value[0]) {
  8670. return false;
  8671. }
  8672. }
  8673. styles[key] = value[0];
  8674. return true;
  8675. };
  8676. var compress2 = function (target, a, b, c) {
  8677. if (!canCompress(a)) {
  8678. return;
  8679. }
  8680. if (!canCompress(b)) {
  8681. return;
  8682. }
  8683. if (!canCompress(c)) {
  8684. return;
  8685. }
  8686. styles[target] = styles[a] + ' ' + styles[b] + ' ' + styles[c];
  8687. delete styles[a];
  8688. delete styles[b];
  8689. delete styles[c];
  8690. };
  8691. var encode = function (str) {
  8692. isEncoded = true;
  8693. return encodingLookup[str];
  8694. };
  8695. var decode = function (str, keepSlashes) {
  8696. if (isEncoded) {
  8697. str = str.replace(/\uFEFF[0-9]/g, function (str) {
  8698. return encodingLookup[str];
  8699. });
  8700. }
  8701. if (!keepSlashes) {
  8702. str = str.replace(/\\([\'\";:])/g, '$1');
  8703. }
  8704. return str;
  8705. };
  8706. var decodeSingleHexSequence = function (escSeq) {
  8707. return String.fromCharCode(parseInt(escSeq.slice(1), 16));
  8708. };
  8709. var decodeHexSequences = function (value) {
  8710. return value.replace(/\\[0-9a-f]+/gi, decodeSingleHexSequence);
  8711. };
  8712. var processUrl = function (match, url, url2, url3, str, str2) {
  8713. str = str || str2;
  8714. if (str) {
  8715. str = decode(str);
  8716. return '\'' + str.replace(/\'/g, '\\\'') + '\'';
  8717. }
  8718. url = decode(url || url2 || url3);
  8719. if (!settings.allow_script_urls) {
  8720. var scriptUrl = url.replace(/[\s\r\n]+/g, '');
  8721. if (/(java|vb)script:/i.test(scriptUrl)) {
  8722. return '';
  8723. }
  8724. if (!settings.allow_svg_data_urls && /^data:image\/svg/i.test(scriptUrl)) {
  8725. return '';
  8726. }
  8727. }
  8728. if (urlConverter) {
  8729. url = urlConverter.call(urlConverterScope, url, 'style');
  8730. }
  8731. return 'url(\'' + url.replace(/\'/g, '\\\'') + '\')';
  8732. };
  8733. if (css) {
  8734. css = css.replace(/[\u0000-\u001F]/g, '');
  8735. css = css.replace(/\\[\"\';:\uFEFF]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function (str) {
  8736. return str.replace(/[;:]/g, encode);
  8737. });
  8738. while (matches = styleRegExp.exec(css)) {
  8739. styleRegExp.lastIndex = matches.index + matches[0].length;
  8740. name = matches[1].replace(trimRightRegExp, '').toLowerCase();
  8741. value = matches[2].replace(trimRightRegExp, '');
  8742. if (name && value) {
  8743. name = decodeHexSequences(name);
  8744. value = decodeHexSequences(value);
  8745. if (name.indexOf(invisibleChar) !== -1 || name.indexOf('"') !== -1) {
  8746. continue;
  8747. }
  8748. if (!settings.allow_script_urls && (name === 'behavior' || /expression\s*\(|\/\*|\*\//.test(value))) {
  8749. continue;
  8750. }
  8751. if (name === 'font-weight' && value === '700') {
  8752. value = 'bold';
  8753. } else if (name === 'color' || name === 'background-color') {
  8754. value = value.toLowerCase();
  8755. }
  8756. value = value.replace(rgbRegExp, toHex);
  8757. value = value.replace(urlOrStrRegExp, processUrl);
  8758. styles[name] = isEncoded ? decode(value, true) : value;
  8759. }
  8760. }
  8761. compress('border', '', true);
  8762. compress('border', '-width');
  8763. compress('border', '-color');
  8764. compress('border', '-style');
  8765. compress('padding', '');
  8766. compress('margin', '');
  8767. compress2('border', 'border-width', 'border-style', 'border-color');
  8768. if (styles.border === 'medium none') {
  8769. delete styles.border;
  8770. }
  8771. if (styles['border-image'] === 'none') {
  8772. delete styles['border-image'];
  8773. }
  8774. }
  8775. return styles;
  8776. },
  8777. serialize: function (styles, elementName) {
  8778. var css = '';
  8779. var serializeStyles = function (name) {
  8780. var value;
  8781. var styleList = validStyles[name];
  8782. if (styleList) {
  8783. for (var i_1 = 0, l = styleList.length; i_1 < l; i_1++) {
  8784. name = styleList[i_1];
  8785. value = styles[name];
  8786. if (value) {
  8787. css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';
  8788. }
  8789. }
  8790. }
  8791. };
  8792. var isValid = function (name, elementName) {
  8793. var styleMap = invalidStyles['*'];
  8794. if (styleMap && styleMap[name]) {
  8795. return false;
  8796. }
  8797. styleMap = invalidStyles[elementName];
  8798. return !(styleMap && styleMap[name]);
  8799. };
  8800. if (elementName && validStyles) {
  8801. serializeStyles('*');
  8802. serializeStyles(elementName);
  8803. } else {
  8804. each$j(styles, function (value, name) {
  8805. if (value && (!invalidStyles || isValid(name, elementName))) {
  8806. css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';
  8807. }
  8808. });
  8809. }
  8810. return css;
  8811. }
  8812. };
  8813. };
  8814. var deprecated = {
  8815. keyLocation: true,
  8816. layerX: true,
  8817. layerY: true,
  8818. returnValue: true,
  8819. webkitMovementX: true,
  8820. webkitMovementY: true,
  8821. keyIdentifier: true,
  8822. mozPressure: true
  8823. };
  8824. var isNativeEvent = function (event) {
  8825. return event instanceof Event || isFunction(event.initEvent);
  8826. };
  8827. var hasIsDefaultPrevented = function (event) {
  8828. return event.isDefaultPrevented === always || event.isDefaultPrevented === never;
  8829. };
  8830. var needsNormalizing = function (event) {
  8831. return isNullable(event.preventDefault) || isNativeEvent(event);
  8832. };
  8833. var clone$2 = function (originalEvent, data) {
  8834. var event = data !== null && data !== void 0 ? data : {};
  8835. for (var name_1 in originalEvent) {
  8836. if (!has$2(deprecated, name_1)) {
  8837. event[name_1] = originalEvent[name_1];
  8838. }
  8839. }
  8840. if (isNonNullable(event.composedPath)) {
  8841. event.composedPath = function () {
  8842. return originalEvent.composedPath();
  8843. };
  8844. }
  8845. return event;
  8846. };
  8847. var normalize$3 = function (type, originalEvent, fallbackTarget, data) {
  8848. var _a;
  8849. var event = clone$2(originalEvent, data);
  8850. event.type = type;
  8851. if (isNullable(event.target)) {
  8852. event.target = (_a = event.srcElement) !== null && _a !== void 0 ? _a : fallbackTarget;
  8853. }
  8854. if (needsNormalizing(originalEvent)) {
  8855. event.preventDefault = function () {
  8856. event.defaultPrevented = true;
  8857. event.isDefaultPrevented = always;
  8858. if (isFunction(originalEvent.preventDefault)) {
  8859. originalEvent.preventDefault();
  8860. } else if (isNativeEvent(originalEvent)) {
  8861. originalEvent.returnValue = false;
  8862. }
  8863. };
  8864. event.stopPropagation = function () {
  8865. event.cancelBubble = true;
  8866. event.isPropagationStopped = always;
  8867. if (isFunction(originalEvent.stopPropagation)) {
  8868. originalEvent.stopPropagation();
  8869. } else if (isNativeEvent(originalEvent)) {
  8870. originalEvent.cancelBubble = true;
  8871. }
  8872. };
  8873. event.stopImmediatePropagation = function () {
  8874. event.isImmediatePropagationStopped = always;
  8875. event.stopPropagation();
  8876. };
  8877. if (!hasIsDefaultPrevented(event)) {
  8878. event.isDefaultPrevented = event.defaultPrevented === true ? always : never;
  8879. event.isPropagationStopped = event.cancelBubble === true ? always : never;
  8880. event.isImmediatePropagationStopped = never;
  8881. }
  8882. }
  8883. return event;
  8884. };
  8885. var eventExpandoPrefix = 'mce-data-';
  8886. var mouseEventRe = /^(?:mouse|contextmenu)|click/;
  8887. var addEvent = function (target, name, callback, capture) {
  8888. if (target.addEventListener) {
  8889. target.addEventListener(name, callback, capture || false);
  8890. } else if (target.attachEvent) {
  8891. target.attachEvent('on' + name, callback);
  8892. }
  8893. };
  8894. var removeEvent = function (target, name, callback, capture) {
  8895. if (target.removeEventListener) {
  8896. target.removeEventListener(name, callback, capture || false);
  8897. } else if (target.detachEvent) {
  8898. target.detachEvent('on' + name, callback);
  8899. }
  8900. };
  8901. var isMouseEvent = function (event) {
  8902. return isNonNullable(event) && mouseEventRe.test(event.type);
  8903. };
  8904. var fix = function (originalEvent, data) {
  8905. var event = normalize$3(originalEvent.type, originalEvent, document, data);
  8906. if (isMouseEvent(originalEvent) && isUndefined(originalEvent.pageX) && !isUndefined(originalEvent.clientX)) {
  8907. var eventDoc = event.target.ownerDocument || document;
  8908. var doc = eventDoc.documentElement;
  8909. var body = eventDoc.body;
  8910. var mouseEvent = event;
  8911. mouseEvent.pageX = originalEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
  8912. mouseEvent.pageY = originalEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
  8913. }
  8914. if (isUndefined(event.metaKey)) {
  8915. event.metaKey = false;
  8916. }
  8917. return event;
  8918. };
  8919. var bindOnReady = function (win, callback, eventUtils) {
  8920. var doc = win.document, event = { type: 'ready' };
  8921. if (eventUtils.domLoaded) {
  8922. callback(event);
  8923. return;
  8924. }
  8925. var isDocReady = function () {
  8926. return doc.readyState === 'complete' || doc.readyState === 'interactive' && doc.body;
  8927. };
  8928. var readyHandler = function () {
  8929. removeEvent(win, 'DOMContentLoaded', readyHandler);
  8930. removeEvent(win, 'load', readyHandler);
  8931. if (!eventUtils.domLoaded) {
  8932. eventUtils.domLoaded = true;
  8933. callback(event);
  8934. }
  8935. win = null;
  8936. };
  8937. if (isDocReady()) {
  8938. readyHandler();
  8939. } else {
  8940. addEvent(win, 'DOMContentLoaded', readyHandler);
  8941. }
  8942. if (!eventUtils.domLoaded) {
  8943. addEvent(win, 'load', readyHandler);
  8944. }
  8945. };
  8946. var EventUtils = function () {
  8947. function EventUtils() {
  8948. this.domLoaded = false;
  8949. this.events = {};
  8950. this.count = 1;
  8951. this.expando = eventExpandoPrefix + (+new Date()).toString(32);
  8952. this.hasMouseEnterLeave = 'onmouseenter' in document.documentElement;
  8953. this.hasFocusIn = 'onfocusin' in document.documentElement;
  8954. this.count = 1;
  8955. }
  8956. EventUtils.prototype.bind = function (target, names, callback, scope) {
  8957. var self = this;
  8958. var id, callbackList, i, name, fakeName, nativeHandler, capture;
  8959. var win = window;
  8960. var defaultNativeHandler = function (evt) {
  8961. self.executeHandlers(fix(evt || win.event), id);
  8962. };
  8963. if (!target || target.nodeType === 3 || target.nodeType === 8) {
  8964. return;
  8965. }
  8966. if (!target[self.expando]) {
  8967. id = self.count++;
  8968. target[self.expando] = id;
  8969. self.events[id] = {};
  8970. } else {
  8971. id = target[self.expando];
  8972. }
  8973. scope = scope || target;
  8974. var namesList = names.split(' ');
  8975. i = namesList.length;
  8976. while (i--) {
  8977. name = namesList[i];
  8978. nativeHandler = defaultNativeHandler;
  8979. fakeName = capture = false;
  8980. if (name === 'DOMContentLoaded') {
  8981. name = 'ready';
  8982. }
  8983. if (self.domLoaded && name === 'ready' && target.readyState === 'complete') {
  8984. callback.call(scope, fix({ type: name }));
  8985. continue;
  8986. }
  8987. if (!self.hasMouseEnterLeave) {
  8988. fakeName = self.mouseEnterLeave[name];
  8989. if (fakeName) {
  8990. nativeHandler = function (evt) {
  8991. var current = evt.currentTarget;
  8992. var related = evt.relatedTarget;
  8993. if (related && current.contains) {
  8994. related = current.contains(related);
  8995. } else {
  8996. while (related && related !== current) {
  8997. related = related.parentNode;
  8998. }
  8999. }
  9000. if (!related) {
  9001. evt = fix(evt || win.event);
  9002. evt.type = evt.type === 'mouseout' ? 'mouseleave' : 'mouseenter';
  9003. evt.target = current;
  9004. self.executeHandlers(evt, id);
  9005. }
  9006. };
  9007. }
  9008. }
  9009. if (!self.hasFocusIn && (name === 'focusin' || name === 'focusout')) {
  9010. capture = true;
  9011. fakeName = name === 'focusin' ? 'focus' : 'blur';
  9012. nativeHandler = function (evt) {
  9013. evt = fix(evt || win.event);
  9014. evt.type = evt.type === 'focus' ? 'focusin' : 'focusout';
  9015. self.executeHandlers(evt, id);
  9016. };
  9017. }
  9018. callbackList = self.events[id][name];
  9019. if (!callbackList) {
  9020. self.events[id][name] = callbackList = [{
  9021. func: callback,
  9022. scope: scope
  9023. }];
  9024. callbackList.fakeName = fakeName;
  9025. callbackList.capture = capture;
  9026. callbackList.nativeHandler = nativeHandler;
  9027. if (name === 'ready') {
  9028. bindOnReady(target, nativeHandler, self);
  9029. } else {
  9030. addEvent(target, fakeName || name, nativeHandler, capture);
  9031. }
  9032. } else {
  9033. if (name === 'ready' && self.domLoaded) {
  9034. callback(fix({ type: name }));
  9035. } else {
  9036. callbackList.push({
  9037. func: callback,
  9038. scope: scope
  9039. });
  9040. }
  9041. }
  9042. }
  9043. target = callbackList = null;
  9044. return callback;
  9045. };
  9046. EventUtils.prototype.unbind = function (target, names, callback) {
  9047. var callbackList, i, ci, name, eventMap;
  9048. if (!target || target.nodeType === 3 || target.nodeType === 8) {
  9049. return this;
  9050. }
  9051. var id = target[this.expando];
  9052. if (id) {
  9053. eventMap = this.events[id];
  9054. if (names) {
  9055. var namesList = names.split(' ');
  9056. i = namesList.length;
  9057. while (i--) {
  9058. name = namesList[i];
  9059. callbackList = eventMap[name];
  9060. if (callbackList) {
  9061. if (callback) {
  9062. ci = callbackList.length;
  9063. while (ci--) {
  9064. if (callbackList[ci].func === callback) {
  9065. var nativeHandler = callbackList.nativeHandler;
  9066. var fakeName = callbackList.fakeName, capture = callbackList.capture;
  9067. callbackList = callbackList.slice(0, ci).concat(callbackList.slice(ci + 1));
  9068. callbackList.nativeHandler = nativeHandler;
  9069. callbackList.fakeName = fakeName;
  9070. callbackList.capture = capture;
  9071. eventMap[name] = callbackList;
  9072. }
  9073. }
  9074. }
  9075. if (!callback || callbackList.length === 0) {
  9076. delete eventMap[name];
  9077. removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);
  9078. }
  9079. }
  9080. }
  9081. } else {
  9082. each$j(eventMap, function (callbackList, name) {
  9083. removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);
  9084. });
  9085. eventMap = {};
  9086. }
  9087. for (name in eventMap) {
  9088. if (has$2(eventMap, name)) {
  9089. return this;
  9090. }
  9091. }
  9092. delete this.events[id];
  9093. try {
  9094. delete target[this.expando];
  9095. } catch (ex) {
  9096. target[this.expando] = null;
  9097. }
  9098. }
  9099. return this;
  9100. };
  9101. EventUtils.prototype.fire = function (target, name, args) {
  9102. var id;
  9103. if (!target || target.nodeType === 3 || target.nodeType === 8) {
  9104. return this;
  9105. }
  9106. var event = fix({
  9107. type: name,
  9108. target: target
  9109. }, args);
  9110. do {
  9111. id = target[this.expando];
  9112. if (id) {
  9113. this.executeHandlers(event, id);
  9114. }
  9115. target = target.parentNode || target.ownerDocument || target.defaultView || target.parentWindow;
  9116. } while (target && !event.isPropagationStopped());
  9117. return this;
  9118. };
  9119. EventUtils.prototype.clean = function (target) {
  9120. var i, children;
  9121. if (!target || target.nodeType === 3 || target.nodeType === 8) {
  9122. return this;
  9123. }
  9124. if (target[this.expando]) {
  9125. this.unbind(target);
  9126. }
  9127. if (!target.getElementsByTagName) {
  9128. target = target.document;
  9129. }
  9130. if (target && target.getElementsByTagName) {
  9131. this.unbind(target);
  9132. children = target.getElementsByTagName('*');
  9133. i = children.length;
  9134. while (i--) {
  9135. target = children[i];
  9136. if (target[this.expando]) {
  9137. this.unbind(target);
  9138. }
  9139. }
  9140. }
  9141. return this;
  9142. };
  9143. EventUtils.prototype.destroy = function () {
  9144. this.events = {};
  9145. };
  9146. EventUtils.prototype.cancel = function (e) {
  9147. if (e) {
  9148. e.preventDefault();
  9149. e.stopImmediatePropagation();
  9150. }
  9151. return false;
  9152. };
  9153. EventUtils.prototype.executeHandlers = function (evt, id) {
  9154. var container = this.events[id];
  9155. var callbackList = container && container[evt.type];
  9156. if (callbackList) {
  9157. for (var i = 0, l = callbackList.length; i < l; i++) {
  9158. var callback = callbackList[i];
  9159. if (callback && callback.func.call(callback.scope, evt) === false) {
  9160. evt.preventDefault();
  9161. }
  9162. if (evt.isImmediatePropagationStopped()) {
  9163. return;
  9164. }
  9165. }
  9166. }
  9167. };
  9168. EventUtils.Event = new EventUtils();
  9169. return EventUtils;
  9170. }();
  9171. var support, Expr, getText, isXML, tokenize, compile, select$1, outermostContext, sortInput, hasDuplicate, setDocument, document$1, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, expando = 'sizzle' + -new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function (a, b) {
  9172. if (a === b) {
  9173. hasDuplicate = true;
  9174. }
  9175. return 0;
  9176. }, strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, hasOwn = {}.hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push$1 = arr.push, slice$1 = arr.slice, indexOf = arr.indexOf || function (elem) {
  9177. var i = 0, len = this.length;
  9178. for (; i < len; i++) {
  9179. if (this[i] === elem) {
  9180. return i;
  9181. }
  9182. }
  9183. return -1;
  9184. }, booleans = 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped', whitespace = '[\\x20\\t\\r\\n\\f]', identifier = '(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+', attributes = '\\[' + whitespace + '*(' + identifier + ')(?:' + whitespace + '*([*^$|!~]?=)' + whitespace + '*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' + identifier + '))|)' + whitespace + '*\\]', pseudos = ':(' + identifier + ')(?:\\((' + '(\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|' + '((?:\\\\.|[^\\\\()[\\]]|' + attributes + ')*)|' + '.*' + ')\\)|)', rtrim = new RegExp('^' + whitespace + '+|((?:^|[^\\\\])(?:\\\\.)*)' + whitespace + '+$', 'g'), rcomma = new RegExp('^' + whitespace + '*,' + whitespace + '*'), rcombinators = new RegExp('^' + whitespace + '*([>+~]|' + whitespace + ')' + whitespace + '*'), rattributeQuotes = new RegExp('=' + whitespace + '*([^\\]\'"]*?)' + whitespace + '*\\]', 'g'), rpseudo = new RegExp(pseudos), ridentifier = new RegExp('^' + identifier + '$'), matchExpr = {
  9185. ID: new RegExp('^#(' + identifier + ')'),
  9186. CLASS: new RegExp('^\\.(' + identifier + ')'),
  9187. TAG: new RegExp('^(' + identifier + '|[*])'),
  9188. ATTR: new RegExp('^' + attributes),
  9189. PSEUDO: new RegExp('^' + pseudos),
  9190. CHILD: new RegExp('^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' + whitespace + '*(even|odd|(([+-]|)(\\d*)n|)' + whitespace + '*(?:([+-]|)' + whitespace + '*(\\d+)|))' + whitespace + '*\\)|)', 'i'),
  9191. bool: new RegExp('^(?:' + booleans + ')$', 'i'),
  9192. needsContext: new RegExp('^' + whitespace + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + whitespace + '*((?:-\\d)?\\d*)' + whitespace + '*\\)|)(?=[^-]|$)', 'i')
  9193. }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, rquickExpr$1 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, rescape = /'|\\/g, runescape = new RegExp('\\\\([\\da-f]{1,6}' + whitespace + '?|(' + whitespace + ')|.)', 'ig'), funescape = function (_, escaped, escapedWhitespace) {
  9194. var high = '0x' + escaped - 65536;
  9195. return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
  9196. };
  9197. try {
  9198. push$1.apply(arr = slice$1.call(preferredDoc.childNodes), preferredDoc.childNodes);
  9199. arr[preferredDoc.childNodes.length].nodeType;
  9200. } catch (e) {
  9201. push$1 = {
  9202. apply: arr.length ? function (target, els) {
  9203. push_native.apply(target, slice$1.call(els));
  9204. } : function (target, els) {
  9205. var j = target.length, i = 0;
  9206. while (target[j++] = els[i++]) {
  9207. }
  9208. target.length = j - 1;
  9209. }
  9210. };
  9211. }
  9212. var Sizzle = function (selector, context, results, seed) {
  9213. var match, elem, m, nodeType, i, groups, old, nid, newContext, newSelector;
  9214. if ((context ? context.ownerDocument || context : preferredDoc) !== document$1) {
  9215. setDocument(context);
  9216. }
  9217. context = context || document$1;
  9218. results = results || [];
  9219. if (!selector || typeof selector !== 'string') {
  9220. return results;
  9221. }
  9222. if ((nodeType = context.nodeType) !== 1 && nodeType !== 9) {
  9223. return [];
  9224. }
  9225. if (documentIsHTML && !seed) {
  9226. if (match = rquickExpr$1.exec(selector)) {
  9227. if (m = match[1]) {
  9228. if (nodeType === 9) {
  9229. elem = context.getElementById(m);
  9230. if (elem && elem.parentNode) {
  9231. if (elem.id === m) {
  9232. results.push(elem);
  9233. return results;
  9234. }
  9235. } else {
  9236. return results;
  9237. }
  9238. } else {
  9239. if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) && contains(context, elem) && elem.id === m) {
  9240. results.push(elem);
  9241. return results;
  9242. }
  9243. }
  9244. } else if (match[2]) {
  9245. push$1.apply(results, context.getElementsByTagName(selector));
  9246. return results;
  9247. } else if ((m = match[3]) && support.getElementsByClassName) {
  9248. push$1.apply(results, context.getElementsByClassName(m));
  9249. return results;
  9250. }
  9251. }
  9252. if (support.qsa && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
  9253. nid = old = expando;
  9254. newContext = context;
  9255. newSelector = nodeType === 9 && selector;
  9256. if (nodeType === 1 && context.nodeName.toLowerCase() !== 'object') {
  9257. groups = tokenize(selector);
  9258. if (old = context.getAttribute('id')) {
  9259. nid = old.replace(rescape, '\\$&');
  9260. } else {
  9261. context.setAttribute('id', nid);
  9262. }
  9263. nid = '[id=\'' + nid + '\'] ';
  9264. i = groups.length;
  9265. while (i--) {
  9266. groups[i] = nid + toSelector(groups[i]);
  9267. }
  9268. newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
  9269. newSelector = groups.join(',');
  9270. }
  9271. if (newSelector) {
  9272. try {
  9273. push$1.apply(results, newContext.querySelectorAll(newSelector));
  9274. return results;
  9275. } catch (qsaError) {
  9276. } finally {
  9277. if (!old) {
  9278. context.removeAttribute('id');
  9279. }
  9280. }
  9281. }
  9282. }
  9283. }
  9284. return select$1(selector.replace(rtrim, '$1'), context, results, seed);
  9285. };
  9286. function createCache() {
  9287. var keys = [];
  9288. function cache(key, value) {
  9289. if (keys.push(key + ' ') > Expr.cacheLength) {
  9290. delete cache[keys.shift()];
  9291. }
  9292. return cache[key + ' '] = value;
  9293. }
  9294. return cache;
  9295. }
  9296. function markFunction(fn) {
  9297. fn[expando] = true;
  9298. return fn;
  9299. }
  9300. function siblingCheck(a, b) {
  9301. var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE);
  9302. if (diff) {
  9303. return diff;
  9304. }
  9305. if (cur) {
  9306. while (cur = cur.nextSibling) {
  9307. if (cur === b) {
  9308. return -1;
  9309. }
  9310. }
  9311. }
  9312. return a ? 1 : -1;
  9313. }
  9314. function createInputPseudo(type) {
  9315. return function (elem) {
  9316. var name = elem.nodeName.toLowerCase();
  9317. return name === 'input' && elem.type === type;
  9318. };
  9319. }
  9320. function createButtonPseudo(type) {
  9321. return function (elem) {
  9322. var name = elem.nodeName.toLowerCase();
  9323. return (name === 'input' || name === 'button') && elem.type === type;
  9324. };
  9325. }
  9326. function createPositionalPseudo(fn) {
  9327. return markFunction(function (argument) {
  9328. argument = +argument;
  9329. return markFunction(function (seed, matches) {
  9330. var j, matchIndexes = fn([], seed.length, argument), i = matchIndexes.length;
  9331. while (i--) {
  9332. if (seed[j = matchIndexes[i]]) {
  9333. seed[j] = !(matches[j] = seed[j]);
  9334. }
  9335. }
  9336. });
  9337. });
  9338. }
  9339. function testContext(context) {
  9340. return context && typeof context.getElementsByTagName !== strundefined && context;
  9341. }
  9342. support = Sizzle.support = {};
  9343. isXML = Sizzle.isXML = function (elem) {
  9344. var documentElement = elem && (elem.ownerDocument || elem).documentElement;
  9345. return documentElement ? documentElement.nodeName !== 'HTML' : false;
  9346. };
  9347. setDocument = Sizzle.setDocument = function (node) {
  9348. var hasCompare, doc = node ? node.ownerDocument || node : preferredDoc, parent = doc.defaultView;
  9349. function getTop(win) {
  9350. try {
  9351. return win.top;
  9352. } catch (ex) {
  9353. }
  9354. return null;
  9355. }
  9356. if (doc === document$1 || doc.nodeType !== 9 || !doc.documentElement) {
  9357. return document$1;
  9358. }
  9359. document$1 = doc;
  9360. docElem = doc.documentElement;
  9361. documentIsHTML = !isXML(doc);
  9362. if (parent && parent !== getTop(parent)) {
  9363. if (parent.addEventListener) {
  9364. parent.addEventListener('unload', function () {
  9365. setDocument();
  9366. }, false);
  9367. } else if (parent.attachEvent) {
  9368. parent.attachEvent('onunload', function () {
  9369. setDocument();
  9370. });
  9371. }
  9372. }
  9373. support.attributes = true;
  9374. support.getElementsByTagName = true;
  9375. support.getElementsByClassName = rnative.test(doc.getElementsByClassName);
  9376. support.getById = true;
  9377. Expr.find.ID = function (id, context) {
  9378. if (typeof context.getElementById !== strundefined && documentIsHTML) {
  9379. var m = context.getElementById(id);
  9380. return m && m.parentNode ? [m] : [];
  9381. }
  9382. };
  9383. Expr.filter.ID = function (id) {
  9384. var attrId = id.replace(runescape, funescape);
  9385. return function (elem) {
  9386. return elem.getAttribute('id') === attrId;
  9387. };
  9388. };
  9389. Expr.find.TAG = support.getElementsByTagName ? function (tag, context) {
  9390. if (typeof context.getElementsByTagName !== strundefined) {
  9391. return context.getElementsByTagName(tag);
  9392. }
  9393. } : function (tag, context) {
  9394. var elem, tmp = [], i = 0, results = context.getElementsByTagName(tag);
  9395. if (tag === '*') {
  9396. while (elem = results[i++]) {
  9397. if (elem.nodeType === 1) {
  9398. tmp.push(elem);
  9399. }
  9400. }
  9401. return tmp;
  9402. }
  9403. return results;
  9404. };
  9405. Expr.find.CLASS = support.getElementsByClassName && function (className, context) {
  9406. if (documentIsHTML) {
  9407. return context.getElementsByClassName(className);
  9408. }
  9409. };
  9410. rbuggyMatches = [];
  9411. rbuggyQSA = [];
  9412. support.disconnectedMatch = true;
  9413. rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join('|'));
  9414. rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join('|'));
  9415. hasCompare = rnative.test(docElem.compareDocumentPosition);
  9416. contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) {
  9417. var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode;
  9418. return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
  9419. } : function (a, b) {
  9420. if (b) {
  9421. while (b = b.parentNode) {
  9422. if (b === a) {
  9423. return true;
  9424. }
  9425. }
  9426. }
  9427. return false;
  9428. };
  9429. sortOrder = hasCompare ? function (a, b) {
  9430. if (a === b) {
  9431. hasDuplicate = true;
  9432. return 0;
  9433. }
  9434. var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
  9435. if (compare) {
  9436. return compare;
  9437. }
  9438. compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1;
  9439. if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
  9440. if (a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) {
  9441. return -1;
  9442. }
  9443. if (b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) {
  9444. return 1;
  9445. }
  9446. return sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0;
  9447. }
  9448. return compare & 4 ? -1 : 1;
  9449. } : function (a, b) {
  9450. if (a === b) {
  9451. hasDuplicate = true;
  9452. return 0;
  9453. }
  9454. var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [a], bp = [b];
  9455. if (!aup || !bup) {
  9456. return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0;
  9457. } else if (aup === bup) {
  9458. return siblingCheck(a, b);
  9459. }
  9460. cur = a;
  9461. while (cur = cur.parentNode) {
  9462. ap.unshift(cur);
  9463. }
  9464. cur = b;
  9465. while (cur = cur.parentNode) {
  9466. bp.unshift(cur);
  9467. }
  9468. while (ap[i] === bp[i]) {
  9469. i++;
  9470. }
  9471. return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;
  9472. };
  9473. return doc;
  9474. };
  9475. Sizzle.matches = function (expr, elements) {
  9476. return Sizzle(expr, null, null, elements);
  9477. };
  9478. Sizzle.matchesSelector = function (elem, expr) {
  9479. if ((elem.ownerDocument || elem) !== document$1) {
  9480. setDocument(elem);
  9481. }
  9482. expr = expr.replace(rattributeQuotes, '=\'$1\']');
  9483. if (support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
  9484. try {
  9485. var ret = matches.call(elem, expr);
  9486. if (ret || support.disconnectedMatch || elem.document && elem.document.nodeType !== 11) {
  9487. return ret;
  9488. }
  9489. } catch (e) {
  9490. }
  9491. }
  9492. return Sizzle(expr, document$1, null, [elem]).length > 0;
  9493. };
  9494. Sizzle.contains = function (context, elem) {
  9495. if ((context.ownerDocument || context) !== document$1) {
  9496. setDocument(context);
  9497. }
  9498. return contains(context, elem);
  9499. };
  9500. Sizzle.attr = function (elem, name) {
  9501. if ((elem.ownerDocument || elem) !== document$1) {
  9502. setDocument(elem);
  9503. }
  9504. var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;
  9505. return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
  9506. };
  9507. Sizzle.error = function (msg) {
  9508. throw new Error('Syntax error, unrecognized expression: ' + msg);
  9509. };
  9510. Sizzle.uniqueSort = function (results) {
  9511. var elem, duplicates = [], j = 0, i = 0;
  9512. hasDuplicate = !support.detectDuplicates;
  9513. sortInput = !support.sortStable && results.slice(0);
  9514. results.sort(sortOrder);
  9515. if (hasDuplicate) {
  9516. while (elem = results[i++]) {
  9517. if (elem === results[i]) {
  9518. j = duplicates.push(i);
  9519. }
  9520. }
  9521. while (j--) {
  9522. results.splice(duplicates[j], 1);
  9523. }
  9524. }
  9525. sortInput = null;
  9526. return results;
  9527. };
  9528. getText = Sizzle.getText = function (elem) {
  9529. var node, ret = '', i = 0, nodeType = elem.nodeType;
  9530. if (!nodeType) {
  9531. while (node = elem[i++]) {
  9532. ret += getText(node);
  9533. }
  9534. } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
  9535. if (typeof elem.textContent === 'string') {
  9536. return elem.textContent;
  9537. } else {
  9538. for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
  9539. ret += getText(elem);
  9540. }
  9541. }
  9542. } else if (nodeType === 3 || nodeType === 4) {
  9543. return elem.nodeValue;
  9544. }
  9545. return ret;
  9546. };
  9547. Expr = Sizzle.selectors = {
  9548. cacheLength: 50,
  9549. createPseudo: markFunction,
  9550. match: matchExpr,
  9551. attrHandle: {},
  9552. find: {},
  9553. relative: {
  9554. '>': {
  9555. dir: 'parentNode',
  9556. first: true
  9557. },
  9558. ' ': { dir: 'parentNode' },
  9559. '+': {
  9560. dir: 'previousSibling',
  9561. first: true
  9562. },
  9563. '~': { dir: 'previousSibling' }
  9564. },
  9565. preFilter: {
  9566. ATTR: function (match) {
  9567. match[1] = match[1].replace(runescape, funescape);
  9568. match[3] = (match[3] || match[4] || match[5] || '').replace(runescape, funescape);
  9569. if (match[2] === '~=') {
  9570. match[3] = ' ' + match[3] + ' ';
  9571. }
  9572. return match.slice(0, 4);
  9573. },
  9574. CHILD: function (match) {
  9575. match[1] = match[1].toLowerCase();
  9576. if (match[1].slice(0, 3) === 'nth') {
  9577. if (!match[3]) {
  9578. Sizzle.error(match[0]);
  9579. }
  9580. match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === 'even' || match[3] === 'odd'));
  9581. match[5] = +(match[7] + match[8] || match[3] === 'odd');
  9582. } else if (match[3]) {
  9583. Sizzle.error(match[0]);
  9584. }
  9585. return match;
  9586. },
  9587. PSEUDO: function (match) {
  9588. var excess, unquoted = !match[6] && match[2];
  9589. if (matchExpr.CHILD.test(match[0])) {
  9590. return null;
  9591. }
  9592. if (match[3]) {
  9593. match[2] = match[4] || match[5] || '';
  9594. } else if (unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(')', unquoted.length - excess) - unquoted.length)) {
  9595. match[0] = match[0].slice(0, excess);
  9596. match[2] = unquoted.slice(0, excess);
  9597. }
  9598. return match.slice(0, 3);
  9599. }
  9600. },
  9601. filter: {
  9602. TAG: function (nodeNameSelector) {
  9603. var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
  9604. return nodeNameSelector === '*' ? function () {
  9605. return true;
  9606. } : function (elem) {
  9607. return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
  9608. };
  9609. },
  9610. CLASS: function (className) {
  9611. var pattern = classCache[className + ' '];
  9612. return pattern || (pattern = new RegExp('(^|' + whitespace + ')' + className + '(' + whitespace + '|$)')) && classCache(className, function (elem) {
  9613. return pattern.test(typeof elem.className === 'string' && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute('class') || '');
  9614. });
  9615. },
  9616. ATTR: function (name, operator, check) {
  9617. return function (elem) {
  9618. var result = Sizzle.attr(elem, name);
  9619. if (result == null) {
  9620. return operator === '!=';
  9621. }
  9622. if (!operator) {
  9623. return true;
  9624. }
  9625. result += '';
  9626. return operator === '=' ? result === check : operator === '!=' ? result !== check : operator === '^=' ? check && result.indexOf(check) === 0 : operator === '*=' ? check && result.indexOf(check) > -1 : operator === '$=' ? check && result.slice(-check.length) === check : operator === '~=' ? (' ' + result + ' ').indexOf(check) > -1 : operator === '|=' ? result === check || result.slice(0, check.length + 1) === check + '-' : false;
  9627. };
  9628. },
  9629. CHILD: function (type, what, argument, first, last) {
  9630. var simple = type.slice(0, 3) !== 'nth', forward = type.slice(-4) !== 'last', ofType = what === 'of-type';
  9631. return first === 1 && last === 0 ? function (elem) {
  9632. return !!elem.parentNode;
  9633. } : function (elem, context, xml) {
  9634. var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? 'nextSibling' : 'previousSibling', parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType;
  9635. if (parent) {
  9636. if (simple) {
  9637. while (dir) {
  9638. node = elem;
  9639. while (node = node[dir]) {
  9640. if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
  9641. return false;
  9642. }
  9643. }
  9644. start = dir = type === 'only' && !start && 'nextSibling';
  9645. }
  9646. return true;
  9647. }
  9648. start = [forward ? parent.firstChild : parent.lastChild];
  9649. if (forward && useCache) {
  9650. outerCache = parent[expando] || (parent[expando] = {});
  9651. cache = outerCache[type] || [];
  9652. nodeIndex = cache[0] === dirruns && cache[1];
  9653. diff = cache[0] === dirruns && cache[2];
  9654. node = nodeIndex && parent.childNodes[nodeIndex];
  9655. while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
  9656. if (node.nodeType === 1 && ++diff && node === elem) {
  9657. outerCache[type] = [
  9658. dirruns,
  9659. nodeIndex,
  9660. diff
  9661. ];
  9662. break;
  9663. }
  9664. }
  9665. } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
  9666. diff = cache[1];
  9667. } else {
  9668. while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
  9669. if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
  9670. if (useCache) {
  9671. (node[expando] || (node[expando] = {}))[type] = [
  9672. dirruns,
  9673. diff
  9674. ];
  9675. }
  9676. if (node === elem) {
  9677. break;
  9678. }
  9679. }
  9680. }
  9681. }
  9682. diff -= last;
  9683. return diff === first || diff % first === 0 && diff / first >= 0;
  9684. }
  9685. };
  9686. },
  9687. PSEUDO: function (pseudo, argument) {
  9688. var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error('unsupported pseudo: ' + pseudo);
  9689. if (fn[expando]) {
  9690. return fn(argument);
  9691. }
  9692. if (fn.length > 1) {
  9693. args = [
  9694. pseudo,
  9695. pseudo,
  9696. '',
  9697. argument
  9698. ];
  9699. return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {
  9700. var idx, matched = fn(seed, argument), i = matched.length;
  9701. while (i--) {
  9702. idx = indexOf.call(seed, matched[i]);
  9703. seed[idx] = !(matches[idx] = matched[i]);
  9704. }
  9705. }) : function (elem) {
  9706. return fn(elem, 0, args);
  9707. };
  9708. }
  9709. return fn;
  9710. }
  9711. },
  9712. pseudos: {
  9713. not: markFunction(function (selector) {
  9714. var input = [], results = [], matcher = compile(selector.replace(rtrim, '$1'));
  9715. return matcher[expando] ? markFunction(function (seed, matches, context, xml) {
  9716. var elem, unmatched = matcher(seed, null, xml, []), i = seed.length;
  9717. while (i--) {
  9718. if (elem = unmatched[i]) {
  9719. seed[i] = !(matches[i] = elem);
  9720. }
  9721. }
  9722. }) : function (elem, context, xml) {
  9723. input[0] = elem;
  9724. matcher(input, null, xml, results);
  9725. input[0] = null;
  9726. return !results.pop();
  9727. };
  9728. }),
  9729. has: markFunction(function (selector) {
  9730. return function (elem) {
  9731. return Sizzle(selector, elem).length > 0;
  9732. };
  9733. }),
  9734. contains: markFunction(function (text) {
  9735. text = text.replace(runescape, funescape);
  9736. return function (elem) {
  9737. return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1;
  9738. };
  9739. }),
  9740. lang: markFunction(function (lang) {
  9741. if (!ridentifier.test(lang || '')) {
  9742. Sizzle.error('unsupported lang: ' + lang);
  9743. }
  9744. lang = lang.replace(runescape, funescape).toLowerCase();
  9745. return function (elem) {
  9746. var elemLang;
  9747. do {
  9748. if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute('xml:lang') || elem.getAttribute('lang')) {
  9749. elemLang = elemLang.toLowerCase();
  9750. return elemLang === lang || elemLang.indexOf(lang + '-') === 0;
  9751. }
  9752. } while ((elem = elem.parentNode) && elem.nodeType === 1);
  9753. return false;
  9754. };
  9755. }),
  9756. target: function (elem) {
  9757. var hash = window.location && window.location.hash;
  9758. return hash && hash.slice(1) === elem.id;
  9759. },
  9760. root: function (elem) {
  9761. return elem === docElem;
  9762. },
  9763. focus: function (elem) {
  9764. return elem === document$1.activeElement && (!document$1.hasFocus || document$1.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
  9765. },
  9766. enabled: function (elem) {
  9767. return elem.disabled === false;
  9768. },
  9769. disabled: function (elem) {
  9770. return elem.disabled === true;
  9771. },
  9772. checked: function (elem) {
  9773. var nodeName = elem.nodeName.toLowerCase();
  9774. return nodeName === 'input' && !!elem.checked || nodeName === 'option' && !!elem.selected;
  9775. },
  9776. selected: function (elem) {
  9777. if (elem.parentNode) {
  9778. elem.parentNode.selectedIndex;
  9779. }
  9780. return elem.selected === true;
  9781. },
  9782. empty: function (elem) {
  9783. for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
  9784. if (elem.nodeType < 6) {
  9785. return false;
  9786. }
  9787. }
  9788. return true;
  9789. },
  9790. parent: function (elem) {
  9791. return !Expr.pseudos.empty(elem);
  9792. },
  9793. header: function (elem) {
  9794. return rheader.test(elem.nodeName);
  9795. },
  9796. input: function (elem) {
  9797. return rinputs.test(elem.nodeName);
  9798. },
  9799. button: function (elem) {
  9800. var name = elem.nodeName.toLowerCase();
  9801. return name === 'input' && elem.type === 'button' || name === 'button';
  9802. },
  9803. text: function (elem) {
  9804. var attr;
  9805. return elem.nodeName.toLowerCase() === 'input' && elem.type === 'text' && ((attr = elem.getAttribute('type')) == null || attr.toLowerCase() === 'text');
  9806. },
  9807. first: createPositionalPseudo(function () {
  9808. return [0];
  9809. }),
  9810. last: createPositionalPseudo(function (matchIndexes, length) {
  9811. return [length - 1];
  9812. }),
  9813. eq: createPositionalPseudo(function (matchIndexes, length, argument) {
  9814. return [argument < 0 ? argument + length : argument];
  9815. }),
  9816. even: createPositionalPseudo(function (matchIndexes, length) {
  9817. var i = 0;
  9818. for (; i < length; i += 2) {
  9819. matchIndexes.push(i);
  9820. }
  9821. return matchIndexes;
  9822. }),
  9823. odd: createPositionalPseudo(function (matchIndexes, length) {
  9824. var i = 1;
  9825. for (; i < length; i += 2) {
  9826. matchIndexes.push(i);
  9827. }
  9828. return matchIndexes;
  9829. }),
  9830. lt: createPositionalPseudo(function (matchIndexes, length, argument) {
  9831. var i = argument < 0 ? argument + length : argument;
  9832. for (; --i >= 0;) {
  9833. matchIndexes.push(i);
  9834. }
  9835. return matchIndexes;
  9836. }),
  9837. gt: createPositionalPseudo(function (matchIndexes, length, argument) {
  9838. var i = argument < 0 ? argument + length : argument;
  9839. for (; ++i < length;) {
  9840. matchIndexes.push(i);
  9841. }
  9842. return matchIndexes;
  9843. })
  9844. }
  9845. };
  9846. Expr.pseudos.nth = Expr.pseudos.eq;
  9847. each$k([
  9848. 'radio',
  9849. 'checkbox',
  9850. 'file',
  9851. 'password',
  9852. 'image'
  9853. ], function (i) {
  9854. Expr.pseudos[i] = createInputPseudo(i);
  9855. });
  9856. each$k([
  9857. 'submit',
  9858. 'reset'
  9859. ], function (i) {
  9860. Expr.pseudos[i] = createButtonPseudo(i);
  9861. });
  9862. function setFilters() {
  9863. }
  9864. setFilters.prototype = Expr.filters = Expr.pseudos;
  9865. Expr.setFilters = new setFilters();
  9866. tokenize = Sizzle.tokenize = function (selector, parseOnly) {
  9867. var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + ' '];
  9868. if (cached) {
  9869. return parseOnly ? 0 : cached.slice(0);
  9870. }
  9871. soFar = selector;
  9872. groups = [];
  9873. preFilters = Expr.preFilter;
  9874. while (soFar) {
  9875. if (!matched || (match = rcomma.exec(soFar))) {
  9876. if (match) {
  9877. soFar = soFar.slice(match[0].length) || soFar;
  9878. }
  9879. groups.push(tokens = []);
  9880. }
  9881. matched = false;
  9882. if (match = rcombinators.exec(soFar)) {
  9883. matched = match.shift();
  9884. tokens.push({
  9885. value: matched,
  9886. type: match[0].replace(rtrim, ' ')
  9887. });
  9888. soFar = soFar.slice(matched.length);
  9889. }
  9890. for (type in Expr.filter) {
  9891. if (!Expr.filter.hasOwnProperty(type)) {
  9892. continue;
  9893. }
  9894. if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
  9895. matched = match.shift();
  9896. tokens.push({
  9897. value: matched,
  9898. type: type,
  9899. matches: match
  9900. });
  9901. soFar = soFar.slice(matched.length);
  9902. }
  9903. }
  9904. if (!matched) {
  9905. break;
  9906. }
  9907. }
  9908. return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0);
  9909. };
  9910. function toSelector(tokens) {
  9911. var i = 0, len = tokens.length, selector = '';
  9912. for (; i < len; i++) {
  9913. selector += tokens[i].value;
  9914. }
  9915. return selector;
  9916. }
  9917. function addCombinator(matcher, combinator, base) {
  9918. var dir = combinator.dir, checkNonElements = base && dir === 'parentNode', doneName = done++;
  9919. return combinator.first ? function (elem, context, xml) {
  9920. while (elem = elem[dir]) {
  9921. if (elem.nodeType === 1 || checkNonElements) {
  9922. return matcher(elem, context, xml);
  9923. }
  9924. }
  9925. } : function (elem, context, xml) {
  9926. var oldCache, outerCache, newCache = [
  9927. dirruns,
  9928. doneName
  9929. ];
  9930. if (xml) {
  9931. while (elem = elem[dir]) {
  9932. if (elem.nodeType === 1 || checkNonElements) {
  9933. if (matcher(elem, context, xml)) {
  9934. return true;
  9935. }
  9936. }
  9937. }
  9938. } else {
  9939. while (elem = elem[dir]) {
  9940. if (elem.nodeType === 1 || checkNonElements) {
  9941. outerCache = elem[expando] || (elem[expando] = {});
  9942. if ((oldCache = outerCache[dir]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
  9943. return newCache[2] = oldCache[2];
  9944. } else {
  9945. outerCache[dir] = newCache;
  9946. if (newCache[2] = matcher(elem, context, xml)) {
  9947. return true;
  9948. }
  9949. }
  9950. }
  9951. }
  9952. }
  9953. };
  9954. }
  9955. function elementMatcher(matchers) {
  9956. return matchers.length > 1 ? function (elem, context, xml) {
  9957. var i = matchers.length;
  9958. while (i--) {
  9959. if (!matchers[i](elem, context, xml)) {
  9960. return false;
  9961. }
  9962. }
  9963. return true;
  9964. } : matchers[0];
  9965. }
  9966. function multipleContexts(selector, contexts, results) {
  9967. var i = 0, len = contexts.length;
  9968. for (; i < len; i++) {
  9969. Sizzle(selector, contexts[i], results);
  9970. }
  9971. return results;
  9972. }
  9973. function condense(unmatched, map, filter, context, xml) {
  9974. var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null;
  9975. for (; i < len; i++) {
  9976. if (elem = unmatched[i]) {
  9977. if (!filter || filter(elem, context, xml)) {
  9978. newUnmatched.push(elem);
  9979. if (mapped) {
  9980. map.push(i);
  9981. }
  9982. }
  9983. }
  9984. }
  9985. return newUnmatched;
  9986. }
  9987. function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
  9988. if (postFilter && !postFilter[expando]) {
  9989. postFilter = setMatcher(postFilter);
  9990. }
  9991. if (postFinder && !postFinder[expando]) {
  9992. postFinder = setMatcher(postFinder, postSelector);
  9993. }
  9994. return markFunction(function (seed, results, context, xml) {
  9995. var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(selector || '*', context.nodeType ? [context] : context, []), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems, matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn;
  9996. if (matcher) {
  9997. matcher(matcherIn, matcherOut, context, xml);
  9998. }
  9999. if (postFilter) {
  10000. temp = condense(matcherOut, postMap);
  10001. postFilter(temp, [], context, xml);
  10002. i = temp.length;
  10003. while (i--) {
  10004. if (elem = temp[i]) {
  10005. matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
  10006. }
  10007. }
  10008. }
  10009. if (seed) {
  10010. if (postFinder || preFilter) {
  10011. if (postFinder) {
  10012. temp = [];
  10013. i = matcherOut.length;
  10014. while (i--) {
  10015. if (elem = matcherOut[i]) {
  10016. temp.push(matcherIn[i] = elem);
  10017. }
  10018. }
  10019. postFinder(null, matcherOut = [], temp, xml);
  10020. }
  10021. i = matcherOut.length;
  10022. while (i--) {
  10023. if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i]) > -1) {
  10024. seed[temp] = !(results[temp] = elem);
  10025. }
  10026. }
  10027. }
  10028. } else {
  10029. matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
  10030. if (postFinder) {
  10031. postFinder(null, results, matcherOut, xml);
  10032. } else {
  10033. push$1.apply(results, matcherOut);
  10034. }
  10035. }
  10036. });
  10037. }
  10038. function matcherFromTokens(tokens) {
  10039. var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[' '], i = leadingRelative ? 1 : 0, matchContext = addCombinator(function (elem) {
  10040. return elem === checkContext;
  10041. }, implicitRelative, true), matchAnyContext = addCombinator(function (elem) {
  10042. return indexOf.call(checkContext, elem) > -1;
  10043. }, implicitRelative, true), matchers = [function (elem, context, xml) {
  10044. var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
  10045. checkContext = null;
  10046. return ret;
  10047. }];
  10048. for (; i < len; i++) {
  10049. if (matcher = Expr.relative[tokens[i].type]) {
  10050. matchers = [addCombinator(elementMatcher(matchers), matcher)];
  10051. } else {
  10052. matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
  10053. if (matcher[expando]) {
  10054. j = ++i;
  10055. for (; j < len; j++) {
  10056. if (Expr.relative[tokens[j].type]) {
  10057. break;
  10058. }
  10059. }
  10060. return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1).concat({ value: tokens[i - 2].type === ' ' ? '*' : '' })).replace(rtrim, '$1'), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
  10061. }
  10062. matchers.push(matcher);
  10063. }
  10064. }
  10065. return elementMatcher(matchers);
  10066. }
  10067. function matcherFromGroupMatchers(elementMatchers, setMatchers) {
  10068. var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function (seed, context, xml, results, outermost) {
  10069. var elem, j, matcher, matchedCount = 0, i = '0', unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG('*', outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length;
  10070. if (outermost) {
  10071. outermostContext = context !== document$1 && context;
  10072. }
  10073. for (; i !== len && (elem = elems[i]) != null; i++) {
  10074. if (byElement && elem) {
  10075. j = 0;
  10076. while (matcher = elementMatchers[j++]) {
  10077. if (matcher(elem, context, xml)) {
  10078. results.push(elem);
  10079. break;
  10080. }
  10081. }
  10082. if (outermost) {
  10083. dirruns = dirrunsUnique;
  10084. }
  10085. }
  10086. if (bySet) {
  10087. if (elem = !matcher && elem) {
  10088. matchedCount--;
  10089. }
  10090. if (seed) {
  10091. unmatched.push(elem);
  10092. }
  10093. }
  10094. }
  10095. matchedCount += i;
  10096. if (bySet && i !== matchedCount) {
  10097. j = 0;
  10098. while (matcher = setMatchers[j++]) {
  10099. matcher(unmatched, setMatched, context, xml);
  10100. }
  10101. if (seed) {
  10102. if (matchedCount > 0) {
  10103. while (i--) {
  10104. if (!(unmatched[i] || setMatched[i])) {
  10105. setMatched[i] = pop.call(results);
  10106. }
  10107. }
  10108. }
  10109. setMatched = condense(setMatched);
  10110. }
  10111. push$1.apply(results, setMatched);
  10112. if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
  10113. Sizzle.uniqueSort(results);
  10114. }
  10115. }
  10116. if (outermost) {
  10117. dirruns = dirrunsUnique;
  10118. outermostContext = contextBackup;
  10119. }
  10120. return unmatched;
  10121. };
  10122. return bySet ? markFunction(superMatcher) : superMatcher;
  10123. }
  10124. compile = Sizzle.compile = function (selector, match) {
  10125. var i, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + ' '];
  10126. if (!cached) {
  10127. if (!match) {
  10128. match = tokenize(selector);
  10129. }
  10130. i = match.length;
  10131. while (i--) {
  10132. cached = matcherFromTokens(match[i]);
  10133. if (cached[expando]) {
  10134. setMatchers.push(cached);
  10135. } else {
  10136. elementMatchers.push(cached);
  10137. }
  10138. }
  10139. cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
  10140. cached.selector = selector;
  10141. }
  10142. return cached;
  10143. };
  10144. select$1 = Sizzle.select = function (selector, context, results, seed) {
  10145. var i, tokens, token, type, find, compiled = typeof selector === 'function' && selector, match = !seed && tokenize(selector = compiled.selector || selector);
  10146. results = results || [];
  10147. if (match.length === 1) {
  10148. tokens = match[0] = match[0].slice(0);
  10149. if (tokens.length > 2 && (token = tokens[0]).type === 'ID' && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
  10150. context = (Expr.find.ID(token.matches[0].replace(runescape, funescape), context) || [])[0];
  10151. if (!context) {
  10152. return results;
  10153. } else if (compiled) {
  10154. context = context.parentNode;
  10155. }
  10156. selector = selector.slice(tokens.shift().value.length);
  10157. }
  10158. i = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
  10159. while (i--) {
  10160. token = tokens[i];
  10161. if (Expr.relative[type = token.type]) {
  10162. break;
  10163. }
  10164. if (find = Expr.find[type]) {
  10165. if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {
  10166. tokens.splice(i, 1);
  10167. selector = seed.length && toSelector(tokens);
  10168. if (!selector) {
  10169. push$1.apply(results, seed);
  10170. return results;
  10171. }
  10172. break;
  10173. }
  10174. }
  10175. }
  10176. }
  10177. (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, rsibling.test(selector) && testContext(context.parentNode) || context);
  10178. return results;
  10179. };
  10180. support.sortStable = expando.split('').sort(sortOrder).join('') === expando;
  10181. support.detectDuplicates = !!hasDuplicate;
  10182. setDocument();
  10183. support.sortDetached = true;
  10184. var doc = document;
  10185. var push = Array.prototype.push;
  10186. var slice = Array.prototype.slice;
  10187. var rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/;
  10188. var Event$1 = EventUtils.Event;
  10189. var skipUniques = Tools.makeMap('children,contents,next,prev');
  10190. var isDefined = function (obj) {
  10191. return typeof obj !== 'undefined';
  10192. };
  10193. var isString = function (obj) {
  10194. return typeof obj === 'string';
  10195. };
  10196. var isWindow = function (obj) {
  10197. return obj && obj === obj.window;
  10198. };
  10199. var createFragment$1 = function (html, fragDoc) {
  10200. fragDoc = fragDoc || doc;
  10201. var container = fragDoc.createElement('div');
  10202. var frag = fragDoc.createDocumentFragment();
  10203. container.innerHTML = html;
  10204. var node;
  10205. while (node = container.firstChild) {
  10206. frag.appendChild(node);
  10207. }
  10208. return frag;
  10209. };
  10210. var domManipulate = function (targetNodes, sourceItem, callback, reverse) {
  10211. var i;
  10212. if (isString(sourceItem)) {
  10213. sourceItem = createFragment$1(sourceItem, getElementDocument(targetNodes[0]));
  10214. } else if (sourceItem.length && !sourceItem.nodeType) {
  10215. sourceItem = DomQuery.makeArray(sourceItem);
  10216. if (reverse) {
  10217. for (i = sourceItem.length - 1; i >= 0; i--) {
  10218. domManipulate(targetNodes, sourceItem[i], callback, reverse);
  10219. }
  10220. } else {
  10221. for (i = 0; i < sourceItem.length; i++) {
  10222. domManipulate(targetNodes, sourceItem[i], callback, reverse);
  10223. }
  10224. }
  10225. return targetNodes;
  10226. }
  10227. if (sourceItem.nodeType) {
  10228. i = targetNodes.length;
  10229. while (i--) {
  10230. callback.call(targetNodes[i], sourceItem);
  10231. }
  10232. }
  10233. return targetNodes;
  10234. };
  10235. var hasClass = function (node, className) {
  10236. return node && className && (' ' + node.className + ' ').indexOf(' ' + className + ' ') !== -1;
  10237. };
  10238. var wrap$2 = function (elements, wrapper, all) {
  10239. var lastParent, newWrapper;
  10240. wrapper = DomQuery(wrapper)[0];
  10241. elements.each(function () {
  10242. var self = this;
  10243. if (!all || lastParent !== self.parentNode) {
  10244. lastParent = self.parentNode;
  10245. newWrapper = wrapper.cloneNode(false);
  10246. self.parentNode.insertBefore(newWrapper, self);
  10247. newWrapper.appendChild(self);
  10248. } else {
  10249. newWrapper.appendChild(self);
  10250. }
  10251. });
  10252. return elements;
  10253. };
  10254. var numericCssMap = Tools.makeMap('fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom', ' ');
  10255. var booleanMap = Tools.makeMap('checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected', ' ');
  10256. var propFix = {
  10257. for: 'htmlFor',
  10258. class: 'className',
  10259. readonly: 'readOnly'
  10260. };
  10261. var cssFix = { float: 'cssFloat' };
  10262. var attrHooks = {}, cssHooks = {};
  10263. var DomQueryConstructor = function (selector, context) {
  10264. return new DomQuery.fn.init(selector, context);
  10265. };
  10266. var inArray$1 = function (item, array) {
  10267. var i;
  10268. if (array.indexOf) {
  10269. return array.indexOf(item);
  10270. }
  10271. i = array.length;
  10272. while (i--) {
  10273. if (array[i] === item) {
  10274. return i;
  10275. }
  10276. }
  10277. return -1;
  10278. };
  10279. var whiteSpaceRegExp = /^\s*|\s*$/g;
  10280. var trim$1 = function (str) {
  10281. return str === null || str === undefined ? '' : ('' + str).replace(whiteSpaceRegExp, '');
  10282. };
  10283. var each$g = function (obj, callback) {
  10284. var length, key, i, value;
  10285. if (obj) {
  10286. length = obj.length;
  10287. if (length === undefined) {
  10288. for (key in obj) {
  10289. if (obj.hasOwnProperty(key)) {
  10290. value = obj[key];
  10291. if (callback.call(value, key, value) === false) {
  10292. break;
  10293. }
  10294. }
  10295. }
  10296. } else {
  10297. for (i = 0; i < length; i++) {
  10298. value = obj[i];
  10299. if (callback.call(value, i, value) === false) {
  10300. break;
  10301. }
  10302. }
  10303. }
  10304. }
  10305. return obj;
  10306. };
  10307. var grep$2 = function (array, callback) {
  10308. var out = [];
  10309. each$g(array, function (i, item) {
  10310. if (callback(item, i)) {
  10311. out.push(item);
  10312. }
  10313. });
  10314. return out;
  10315. };
  10316. var getElementDocument = function (element) {
  10317. if (!element) {
  10318. return doc;
  10319. }
  10320. if (element.nodeType === 9) {
  10321. return element;
  10322. }
  10323. return element.ownerDocument;
  10324. };
  10325. DomQueryConstructor.fn = DomQueryConstructor.prototype = {
  10326. constructor: DomQueryConstructor,
  10327. selector: '',
  10328. context: null,
  10329. length: 0,
  10330. init: function (selector, context) {
  10331. var self = this;
  10332. var match, node;
  10333. if (!selector) {
  10334. return self;
  10335. }
  10336. if (selector.nodeType) {
  10337. self.context = self[0] = selector;
  10338. self.length = 1;
  10339. return self;
  10340. }
  10341. if (context && context.nodeType) {
  10342. self.context = context;
  10343. } else {
  10344. if (context) {
  10345. return DomQuery(selector).attr(context);
  10346. }
  10347. self.context = context = document;
  10348. }
  10349. if (isString(selector)) {
  10350. self.selector = selector;
  10351. if (selector.charAt(0) === '<' && selector.charAt(selector.length - 1) === '>' && selector.length >= 3) {
  10352. match = [
  10353. null,
  10354. selector,
  10355. null
  10356. ];
  10357. } else {
  10358. match = rquickExpr.exec(selector);
  10359. }
  10360. if (match) {
  10361. if (match[1]) {
  10362. node = createFragment$1(selector, getElementDocument(context)).firstChild;
  10363. while (node) {
  10364. push.call(self, node);
  10365. node = node.nextSibling;
  10366. }
  10367. } else {
  10368. node = getElementDocument(context).getElementById(match[2]);
  10369. if (!node) {
  10370. return self;
  10371. }
  10372. if (node.id !== match[2]) {
  10373. return self.find(selector);
  10374. }
  10375. self.length = 1;
  10376. self[0] = node;
  10377. }
  10378. } else {
  10379. return DomQuery(context).find(selector);
  10380. }
  10381. } else {
  10382. this.add(selector, false);
  10383. }
  10384. return self;
  10385. },
  10386. toArray: function () {
  10387. return Tools.toArray(this);
  10388. },
  10389. add: function (items, sort) {
  10390. var self = this;
  10391. var nodes, i;
  10392. if (isString(items)) {
  10393. return self.add(DomQuery(items));
  10394. }
  10395. if (sort !== false) {
  10396. nodes = DomQuery.unique(self.toArray().concat(DomQuery.makeArray(items)));
  10397. self.length = nodes.length;
  10398. for (i = 0; i < nodes.length; i++) {
  10399. self[i] = nodes[i];
  10400. }
  10401. } else {
  10402. push.apply(self, DomQuery.makeArray(items));
  10403. }
  10404. return self;
  10405. },
  10406. attr: function (name, value) {
  10407. var self = this;
  10408. var hook;
  10409. if (typeof name === 'object') {
  10410. each$g(name, function (name, value) {
  10411. self.attr(name, value);
  10412. });
  10413. } else if (isDefined(value)) {
  10414. this.each(function () {
  10415. var hook;
  10416. if (this.nodeType === 1) {
  10417. hook = attrHooks[name];
  10418. if (hook && hook.set) {
  10419. hook.set(this, value);
  10420. return;
  10421. }
  10422. if (value === null) {
  10423. this.removeAttribute(name, 2);
  10424. } else {
  10425. this.setAttribute(name, value, 2);
  10426. }
  10427. }
  10428. });
  10429. } else {
  10430. if (self[0] && self[0].nodeType === 1) {
  10431. hook = attrHooks[name];
  10432. if (hook && hook.get) {
  10433. return hook.get(self[0], name);
  10434. }
  10435. if (booleanMap[name]) {
  10436. return self.prop(name) ? name : undefined;
  10437. }
  10438. value = self[0].getAttribute(name, 2);
  10439. if (value === null) {
  10440. value = undefined;
  10441. }
  10442. }
  10443. return value;
  10444. }
  10445. return self;
  10446. },
  10447. removeAttr: function (name) {
  10448. return this.attr(name, null);
  10449. },
  10450. prop: function (name, value) {
  10451. var self = this;
  10452. name = propFix[name] || name;
  10453. if (typeof name === 'object') {
  10454. each$g(name, function (name, value) {
  10455. self.prop(name, value);
  10456. });
  10457. } else if (isDefined(value)) {
  10458. this.each(function () {
  10459. if (this.nodeType === 1) {
  10460. this[name] = value;
  10461. }
  10462. });
  10463. } else {
  10464. if (self[0] && self[0].nodeType && name in self[0]) {
  10465. return self[0][name];
  10466. }
  10467. return value;
  10468. }
  10469. return self;
  10470. },
  10471. css: function (name, value) {
  10472. var self = this;
  10473. var elm, hook;
  10474. var camel = function (name) {
  10475. return name.replace(/-(\D)/g, function (a, b) {
  10476. return b.toUpperCase();
  10477. });
  10478. };
  10479. var dashed = function (name) {
  10480. return name.replace(/[A-Z]/g, function (a) {
  10481. return '-' + a;
  10482. });
  10483. };
  10484. if (typeof name === 'object') {
  10485. each$g(name, function (name, value) {
  10486. self.css(name, value);
  10487. });
  10488. } else {
  10489. if (isDefined(value)) {
  10490. name = camel(name);
  10491. if (typeof value === 'number' && !numericCssMap[name]) {
  10492. value = value.toString() + 'px';
  10493. }
  10494. self.each(function () {
  10495. var style = this.style;
  10496. hook = cssHooks[name];
  10497. if (hook && hook.set) {
  10498. hook.set(this, value);
  10499. return;
  10500. }
  10501. try {
  10502. this.style[cssFix[name] || name] = value;
  10503. } catch (ex) {
  10504. }
  10505. if (value === null || value === '') {
  10506. if (style.removeProperty) {
  10507. style.removeProperty(dashed(name));
  10508. } else {
  10509. style.removeAttribute(name);
  10510. }
  10511. }
  10512. });
  10513. } else {
  10514. elm = self[0];
  10515. hook = cssHooks[name];
  10516. if (hook && hook.get) {
  10517. return hook.get(elm);
  10518. }
  10519. if (elm.ownerDocument.defaultView) {
  10520. try {
  10521. return elm.ownerDocument.defaultView.getComputedStyle(elm, null).getPropertyValue(dashed(name));
  10522. } catch (ex) {
  10523. return undefined;
  10524. }
  10525. } else if (elm.currentStyle) {
  10526. return elm.currentStyle[camel(name)];
  10527. } else {
  10528. return '';
  10529. }
  10530. }
  10531. }
  10532. return self;
  10533. },
  10534. remove: function () {
  10535. var self = this;
  10536. var node, i = this.length;
  10537. while (i--) {
  10538. node = self[i];
  10539. Event$1.clean(node);
  10540. if (node.parentNode) {
  10541. node.parentNode.removeChild(node);
  10542. }
  10543. }
  10544. return this;
  10545. },
  10546. empty: function () {
  10547. var self = this;
  10548. var node, i = this.length;
  10549. while (i--) {
  10550. node = self[i];
  10551. while (node.firstChild) {
  10552. node.removeChild(node.firstChild);
  10553. }
  10554. }
  10555. return this;
  10556. },
  10557. html: function (value) {
  10558. var self = this;
  10559. var i;
  10560. if (isDefined(value)) {
  10561. i = self.length;
  10562. try {
  10563. while (i--) {
  10564. self[i].innerHTML = value;
  10565. }
  10566. } catch (ex) {
  10567. DomQuery(self[i]).empty().append(value);
  10568. }
  10569. return self;
  10570. }
  10571. return self[0] ? self[0].innerHTML : '';
  10572. },
  10573. text: function (value) {
  10574. var self = this;
  10575. var i;
  10576. if (isDefined(value)) {
  10577. i = self.length;
  10578. while (i--) {
  10579. if ('innerText' in self[i]) {
  10580. self[i].innerText = value;
  10581. } else {
  10582. self[0].textContent = value;
  10583. }
  10584. }
  10585. return self;
  10586. }
  10587. return self[0] ? self[0].innerText || self[0].textContent : '';
  10588. },
  10589. append: function () {
  10590. return domManipulate(this, arguments, function (node) {
  10591. if (this.nodeType === 1 || this.host && this.host.nodeType === 1) {
  10592. this.appendChild(node);
  10593. }
  10594. });
  10595. },
  10596. prepend: function () {
  10597. return domManipulate(this, arguments, function (node) {
  10598. if (this.nodeType === 1 || this.host && this.host.nodeType === 1) {
  10599. this.insertBefore(node, this.firstChild);
  10600. }
  10601. }, true);
  10602. },
  10603. before: function () {
  10604. var self = this;
  10605. if (self[0] && self[0].parentNode) {
  10606. return domManipulate(self, arguments, function (node) {
  10607. this.parentNode.insertBefore(node, this);
  10608. });
  10609. }
  10610. return self;
  10611. },
  10612. after: function () {
  10613. var self = this;
  10614. if (self[0] && self[0].parentNode) {
  10615. return domManipulate(self, arguments, function (node) {
  10616. this.parentNode.insertBefore(node, this.nextSibling);
  10617. }, true);
  10618. }
  10619. return self;
  10620. },
  10621. appendTo: function (val) {
  10622. DomQuery(val).append(this);
  10623. return this;
  10624. },
  10625. prependTo: function (val) {
  10626. DomQuery(val).prepend(this);
  10627. return this;
  10628. },
  10629. replaceWith: function (content) {
  10630. return this.before(content).remove();
  10631. },
  10632. wrap: function (content) {
  10633. return wrap$2(this, content);
  10634. },
  10635. wrapAll: function (content) {
  10636. return wrap$2(this, content, true);
  10637. },
  10638. wrapInner: function (content) {
  10639. this.each(function () {
  10640. DomQuery(this).contents().wrapAll(content);
  10641. });
  10642. return this;
  10643. },
  10644. unwrap: function () {
  10645. return this.parent().each(function () {
  10646. DomQuery(this).replaceWith(this.childNodes);
  10647. });
  10648. },
  10649. clone: function () {
  10650. var result = [];
  10651. this.each(function () {
  10652. result.push(this.cloneNode(true));
  10653. });
  10654. return DomQuery(result);
  10655. },
  10656. addClass: function (className) {
  10657. return this.toggleClass(className, true);
  10658. },
  10659. removeClass: function (className) {
  10660. return this.toggleClass(className, false);
  10661. },
  10662. toggleClass: function (className, state) {
  10663. var self = this;
  10664. if (typeof className !== 'string') {
  10665. return self;
  10666. }
  10667. if (className.indexOf(' ') !== -1) {
  10668. each$g(className.split(' '), function () {
  10669. self.toggleClass(this, state);
  10670. });
  10671. } else {
  10672. self.each(function (index, node) {
  10673. var classState = hasClass(node, className);
  10674. if (classState !== state) {
  10675. var existingClassName = node.className;
  10676. if (classState) {
  10677. node.className = trim$1((' ' + existingClassName + ' ').replace(' ' + className + ' ', ' '));
  10678. } else {
  10679. node.className += existingClassName ? ' ' + className : className;
  10680. }
  10681. }
  10682. });
  10683. }
  10684. return self;
  10685. },
  10686. hasClass: function (className) {
  10687. return hasClass(this[0], className);
  10688. },
  10689. each: function (callback) {
  10690. return each$g(this, callback);
  10691. },
  10692. on: function (name, callback) {
  10693. return this.each(function () {
  10694. Event$1.bind(this, name, callback);
  10695. });
  10696. },
  10697. off: function (name, callback) {
  10698. return this.each(function () {
  10699. Event$1.unbind(this, name, callback);
  10700. });
  10701. },
  10702. trigger: function (name) {
  10703. return this.each(function () {
  10704. if (typeof name === 'object') {
  10705. Event$1.fire(this, name.type, name);
  10706. } else {
  10707. Event$1.fire(this, name);
  10708. }
  10709. });
  10710. },
  10711. show: function () {
  10712. return this.css('display', '');
  10713. },
  10714. hide: function () {
  10715. return this.css('display', 'none');
  10716. },
  10717. slice: function () {
  10718. return DomQuery(slice.apply(this, arguments));
  10719. },
  10720. eq: function (index) {
  10721. return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
  10722. },
  10723. first: function () {
  10724. return this.eq(0);
  10725. },
  10726. last: function () {
  10727. return this.eq(-1);
  10728. },
  10729. find: function (selector) {
  10730. var i, l;
  10731. var ret = [];
  10732. for (i = 0, l = this.length; i < l; i++) {
  10733. DomQuery.find(selector, this[i], ret);
  10734. }
  10735. return DomQuery(ret);
  10736. },
  10737. filter: function (selector) {
  10738. if (typeof selector === 'function') {
  10739. return DomQuery(grep$2(this.toArray(), function (item, i) {
  10740. return selector(i, item);
  10741. }));
  10742. }
  10743. return DomQuery(DomQuery.filter(selector, this.toArray()));
  10744. },
  10745. closest: function (selector) {
  10746. var result = [];
  10747. if (selector instanceof DomQuery) {
  10748. selector = selector[0];
  10749. }
  10750. this.each(function (i, node) {
  10751. while (node) {
  10752. if (typeof selector === 'string' && DomQuery(node).is(selector)) {
  10753. result.push(node);
  10754. break;
  10755. } else if (node === selector) {
  10756. result.push(node);
  10757. break;
  10758. }
  10759. node = node.parentNode;
  10760. }
  10761. });
  10762. return DomQuery(result);
  10763. },
  10764. offset: function (offset) {
  10765. var elm, doc, docElm;
  10766. var x = 0, y = 0, pos;
  10767. if (!offset) {
  10768. elm = this[0];
  10769. if (elm) {
  10770. doc = elm.ownerDocument;
  10771. docElm = doc.documentElement;
  10772. if (elm.getBoundingClientRect) {
  10773. pos = elm.getBoundingClientRect();
  10774. x = pos.left + (docElm.scrollLeft || doc.body.scrollLeft) - docElm.clientLeft;
  10775. y = pos.top + (docElm.scrollTop || doc.body.scrollTop) - docElm.clientTop;
  10776. }
  10777. }
  10778. return {
  10779. left: x,
  10780. top: y
  10781. };
  10782. }
  10783. return this.css(offset);
  10784. },
  10785. push: push,
  10786. sort: Array.prototype.sort,
  10787. splice: Array.prototype.splice
  10788. };
  10789. Tools.extend(DomQueryConstructor, {
  10790. extend: Tools.extend,
  10791. makeArray: function (object) {
  10792. if (isWindow(object) || object.nodeType) {
  10793. return [object];
  10794. }
  10795. return Tools.toArray(object);
  10796. },
  10797. inArray: inArray$1,
  10798. isArray: Tools.isArray,
  10799. each: each$g,
  10800. trim: trim$1,
  10801. grep: grep$2,
  10802. find: Sizzle,
  10803. expr: Sizzle.selectors,
  10804. unique: Sizzle.uniqueSort,
  10805. text: Sizzle.getText,
  10806. contains: Sizzle.contains,
  10807. filter: function (expr, elems, not) {
  10808. var i = elems.length;
  10809. if (not) {
  10810. expr = ':not(' + expr + ')';
  10811. }
  10812. while (i--) {
  10813. if (elems[i].nodeType !== 1) {
  10814. elems.splice(i, 1);
  10815. }
  10816. }
  10817. if (elems.length === 1) {
  10818. elems = DomQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [];
  10819. } else {
  10820. elems = DomQuery.find.matches(expr, elems);
  10821. }
  10822. return elems;
  10823. }
  10824. });
  10825. var dir = function (el, prop, until) {
  10826. var matched = [];
  10827. var cur = el[prop];
  10828. if (typeof until !== 'string' && until instanceof DomQuery) {
  10829. until = until[0];
  10830. }
  10831. while (cur && cur.nodeType !== 9) {
  10832. if (until !== undefined) {
  10833. if (cur === until) {
  10834. break;
  10835. }
  10836. if (typeof until === 'string' && DomQuery(cur).is(until)) {
  10837. break;
  10838. }
  10839. }
  10840. if (cur.nodeType === 1) {
  10841. matched.push(cur);
  10842. }
  10843. cur = cur[prop];
  10844. }
  10845. return matched;
  10846. };
  10847. var sibling$1 = function (node, siblingName, nodeType, until) {
  10848. var result = [];
  10849. if (until instanceof DomQuery) {
  10850. until = until[0];
  10851. }
  10852. for (; node; node = node[siblingName]) {
  10853. if (nodeType && node.nodeType !== nodeType) {
  10854. continue;
  10855. }
  10856. if (until !== undefined) {
  10857. if (node === until) {
  10858. break;
  10859. }
  10860. if (typeof until === 'string' && DomQuery(node).is(until)) {
  10861. break;
  10862. }
  10863. }
  10864. result.push(node);
  10865. }
  10866. return result;
  10867. };
  10868. var firstSibling = function (node, siblingName, nodeType) {
  10869. for (node = node[siblingName]; node; node = node[siblingName]) {
  10870. if (node.nodeType === nodeType) {
  10871. return node;
  10872. }
  10873. }
  10874. return null;
  10875. };
  10876. each$g({
  10877. parent: function (node) {
  10878. var parent = node.parentNode;
  10879. return parent && parent.nodeType !== 11 ? parent : null;
  10880. },
  10881. parents: function (node) {
  10882. return dir(node, 'parentNode');
  10883. },
  10884. next: function (node) {
  10885. return firstSibling(node, 'nextSibling', 1);
  10886. },
  10887. prev: function (node) {
  10888. return firstSibling(node, 'previousSibling', 1);
  10889. },
  10890. children: function (node) {
  10891. return sibling$1(node.firstChild, 'nextSibling', 1);
  10892. },
  10893. contents: function (node) {
  10894. return Tools.toArray((node.nodeName === 'iframe' ? node.contentDocument || node.contentWindow.document : node).childNodes);
  10895. }
  10896. }, function (name, fn) {
  10897. DomQueryConstructor.fn[name] = function (selector) {
  10898. var self = this;
  10899. var result = [];
  10900. self.each(function () {
  10901. var nodes = fn.call(result, this, selector, result);
  10902. if (nodes) {
  10903. if (DomQuery.isArray(nodes)) {
  10904. result.push.apply(result, nodes);
  10905. } else {
  10906. result.push(nodes);
  10907. }
  10908. }
  10909. });
  10910. if (this.length > 1) {
  10911. if (!skipUniques[name]) {
  10912. result = DomQuery.unique(result);
  10913. }
  10914. if (name.indexOf('parents') === 0) {
  10915. result = result.reverse();
  10916. }
  10917. }
  10918. var wrappedResult = DomQuery(result);
  10919. if (selector) {
  10920. return wrappedResult.filter(selector);
  10921. }
  10922. return wrappedResult;
  10923. };
  10924. });
  10925. each$g({
  10926. parentsUntil: function (node, until) {
  10927. return dir(node, 'parentNode', until);
  10928. },
  10929. nextUntil: function (node, until) {
  10930. return sibling$1(node, 'nextSibling', 1, until).slice(1);
  10931. },
  10932. prevUntil: function (node, until) {
  10933. return sibling$1(node, 'previousSibling', 1, until).slice(1);
  10934. }
  10935. }, function (name, fn) {
  10936. DomQueryConstructor.fn[name] = function (selector, filter) {
  10937. var self = this;
  10938. var result = [];
  10939. self.each(function () {
  10940. var nodes = fn.call(result, this, selector, result);
  10941. if (nodes) {
  10942. if (DomQuery.isArray(nodes)) {
  10943. result.push.apply(result, nodes);
  10944. } else {
  10945. result.push(nodes);
  10946. }
  10947. }
  10948. });
  10949. if (this.length > 1) {
  10950. result = DomQuery.unique(result);
  10951. if (name.indexOf('parents') === 0 || name === 'prevUntil') {
  10952. result = result.reverse();
  10953. }
  10954. }
  10955. var wrappedResult = DomQuery(result);
  10956. if (filter) {
  10957. return wrappedResult.filter(filter);
  10958. }
  10959. return wrappedResult;
  10960. };
  10961. });
  10962. DomQueryConstructor.fn.is = function (selector) {
  10963. return !!selector && this.filter(selector).length > 0;
  10964. };
  10965. DomQueryConstructor.fn.init.prototype = DomQueryConstructor.fn;
  10966. DomQueryConstructor.overrideDefaults = function (callback) {
  10967. var defaults;
  10968. var sub = function (selector, context) {
  10969. defaults = defaults || callback();
  10970. if (arguments.length === 0) {
  10971. selector = defaults.element;
  10972. }
  10973. if (!context) {
  10974. context = defaults.context;
  10975. }
  10976. return new sub.fn.init(selector, context);
  10977. };
  10978. DomQuery.extend(sub, this);
  10979. return sub;
  10980. };
  10981. DomQueryConstructor.attrHooks = attrHooks;
  10982. DomQueryConstructor.cssHooks = cssHooks;
  10983. var DomQuery = DomQueryConstructor;
  10984. var each$f = Tools.each;
  10985. var grep$1 = Tools.grep;
  10986. var isIE = Env.ie;
  10987. var simpleSelectorRe = /^([a-z0-9],?)+$/i;
  10988. var setupAttrHooks = function (styles, settings, getContext) {
  10989. var keepValues = settings.keep_values;
  10990. var keepUrlHook = {
  10991. set: function ($elm, value, name) {
  10992. if (settings.url_converter && value !== null) {
  10993. value = settings.url_converter.call(settings.url_converter_scope || getContext(), value, name, $elm[0]);
  10994. }
  10995. $elm.attr('data-mce-' + name, value).attr(name, value);
  10996. },
  10997. get: function ($elm, name) {
  10998. return $elm.attr('data-mce-' + name) || $elm.attr(name);
  10999. }
  11000. };
  11001. var attrHooks = {
  11002. style: {
  11003. set: function ($elm, value) {
  11004. if (value !== null && typeof value === 'object') {
  11005. $elm.css(value);
  11006. return;
  11007. }
  11008. if (keepValues) {
  11009. $elm.attr('data-mce-style', value);
  11010. }
  11011. if (value !== null && typeof value === 'string') {
  11012. $elm.removeAttr('style');
  11013. $elm.css(styles.parse(value));
  11014. } else {
  11015. $elm.attr('style', value);
  11016. }
  11017. },
  11018. get: function ($elm) {
  11019. var value = $elm.attr('data-mce-style') || $elm.attr('style');
  11020. value = styles.serialize(styles.parse(value), $elm[0].nodeName);
  11021. return value;
  11022. }
  11023. }
  11024. };
  11025. if (keepValues) {
  11026. attrHooks.href = attrHooks.src = keepUrlHook;
  11027. }
  11028. return attrHooks;
  11029. };
  11030. var updateInternalStyleAttr = function (styles, $elm) {
  11031. var rawValue = $elm.attr('style');
  11032. var value = styles.serialize(styles.parse(rawValue), $elm[0].nodeName);
  11033. if (!value) {
  11034. value = null;
  11035. }
  11036. $elm.attr('data-mce-style', value);
  11037. };
  11038. var findNodeIndex = function (node, normalized) {
  11039. var idx = 0, lastNodeType, nodeType;
  11040. if (node) {
  11041. for (lastNodeType = node.nodeType, node = node.previousSibling; node; node = node.previousSibling) {
  11042. nodeType = node.nodeType;
  11043. if (normalized && nodeType === 3) {
  11044. if (nodeType === lastNodeType || !node.nodeValue.length) {
  11045. continue;
  11046. }
  11047. }
  11048. idx++;
  11049. lastNodeType = nodeType;
  11050. }
  11051. }
  11052. return idx;
  11053. };
  11054. var DOMUtils = function (doc, settings) {
  11055. if (settings === void 0) {
  11056. settings = {};
  11057. }
  11058. var addedStyles = {};
  11059. var win = window;
  11060. var files = {};
  11061. var counter = 0;
  11062. var stdMode = true;
  11063. var boxModel = true;
  11064. var styleSheetLoader = instance.forElement(SugarElement.fromDom(doc), {
  11065. contentCssCors: settings.contentCssCors,
  11066. referrerPolicy: settings.referrerPolicy
  11067. });
  11068. var boundEvents = [];
  11069. var schema = settings.schema ? settings.schema : Schema({});
  11070. var styles = Styles({
  11071. url_converter: settings.url_converter,
  11072. url_converter_scope: settings.url_converter_scope
  11073. }, settings.schema);
  11074. var events = settings.ownEvents ? new EventUtils() : EventUtils.Event;
  11075. var blockElementsMap = schema.getBlockElements();
  11076. var $ = DomQuery.overrideDefaults(function () {
  11077. return {
  11078. context: doc,
  11079. element: self.getRoot()
  11080. };
  11081. });
  11082. var isBlock = function (node) {
  11083. if (typeof node === 'string') {
  11084. return !!blockElementsMap[node];
  11085. } else if (node) {
  11086. var type = node.nodeType;
  11087. if (type) {
  11088. return !!(type === 1 && blockElementsMap[node.nodeName]);
  11089. }
  11090. }
  11091. return false;
  11092. };
  11093. var get = function (elm) {
  11094. return elm && doc && isString$1(elm) ? doc.getElementById(elm) : elm;
  11095. };
  11096. var $$ = function (elm) {
  11097. return $(typeof elm === 'string' ? get(elm) : elm);
  11098. };
  11099. var getAttrib = function (elm, name, defaultVal) {
  11100. var hook, value;
  11101. var $elm = $$(elm);
  11102. if ($elm.length) {
  11103. hook = attrHooks[name];
  11104. if (hook && hook.get) {
  11105. value = hook.get($elm, name);
  11106. } else {
  11107. value = $elm.attr(name);
  11108. }
  11109. }
  11110. if (typeof value === 'undefined') {
  11111. value = defaultVal || '';
  11112. }
  11113. return value;
  11114. };
  11115. var getAttribs = function (elm) {
  11116. var node = get(elm);
  11117. if (!node) {
  11118. return [];
  11119. }
  11120. return node.attributes;
  11121. };
  11122. var setAttrib = function (elm, name, value) {
  11123. if (value === '') {
  11124. value = null;
  11125. }
  11126. var $elm = $$(elm);
  11127. var originalValue = $elm.attr(name);
  11128. if (!$elm.length) {
  11129. return;
  11130. }
  11131. var hook = attrHooks[name];
  11132. if (hook && hook.set) {
  11133. hook.set($elm, value, name);
  11134. } else {
  11135. $elm.attr(name, value);
  11136. }
  11137. if (originalValue !== value && settings.onSetAttrib) {
  11138. settings.onSetAttrib({
  11139. attrElm: $elm,
  11140. attrName: name,
  11141. attrValue: value
  11142. });
  11143. }
  11144. };
  11145. var clone = function (node, deep) {
  11146. if (!isIE || node.nodeType !== 1 || deep) {
  11147. return node.cloneNode(deep);
  11148. } else {
  11149. var clone_1 = doc.createElement(node.nodeName);
  11150. each$f(getAttribs(node), function (attr) {
  11151. setAttrib(clone_1, attr.nodeName, getAttrib(node, attr.nodeName));
  11152. });
  11153. return clone_1;
  11154. }
  11155. };
  11156. var getRoot = function () {
  11157. return settings.root_element || doc.body;
  11158. };
  11159. var getViewPort = function (argWin) {
  11160. var vp = getBounds(argWin);
  11161. return {
  11162. x: vp.x,
  11163. y: vp.y,
  11164. w: vp.width,
  11165. h: vp.height
  11166. };
  11167. };
  11168. var getPos$1 = function (elm, rootElm) {
  11169. return getPos(doc.body, get(elm), rootElm);
  11170. };
  11171. var setStyle = function (elm, name, value) {
  11172. var $elm = isString$1(name) ? $$(elm).css(name, value) : $$(elm).css(name);
  11173. if (settings.update_styles) {
  11174. updateInternalStyleAttr(styles, $elm);
  11175. }
  11176. };
  11177. var setStyles = function (elm, stylesArg) {
  11178. var $elm = $$(elm).css(stylesArg);
  11179. if (settings.update_styles) {
  11180. updateInternalStyleAttr(styles, $elm);
  11181. }
  11182. };
  11183. var getStyle = function (elm, name, computed) {
  11184. var $elm = $$(elm);
  11185. if (computed) {
  11186. return $elm.css(name);
  11187. }
  11188. name = name.replace(/-(\D)/g, function (a, b) {
  11189. return b.toUpperCase();
  11190. });
  11191. if (name === 'float') {
  11192. name = Env.browser.isIE() ? 'styleFloat' : 'cssFloat';
  11193. }
  11194. return $elm[0] && $elm[0].style ? $elm[0].style[name] : undefined;
  11195. };
  11196. var getSize = function (elm) {
  11197. var w, h;
  11198. elm = get(elm);
  11199. w = getStyle(elm, 'width');
  11200. h = getStyle(elm, 'height');
  11201. if (w.indexOf('px') === -1) {
  11202. w = 0;
  11203. }
  11204. if (h.indexOf('px') === -1) {
  11205. h = 0;
  11206. }
  11207. return {
  11208. w: parseInt(w, 10) || elm.offsetWidth || elm.clientWidth,
  11209. h: parseInt(h, 10) || elm.offsetHeight || elm.clientHeight
  11210. };
  11211. };
  11212. var getRect = function (elm) {
  11213. elm = get(elm);
  11214. var pos = getPos$1(elm);
  11215. var size = getSize(elm);
  11216. return {
  11217. x: pos.x,
  11218. y: pos.y,
  11219. w: size.w,
  11220. h: size.h
  11221. };
  11222. };
  11223. var is = function (elm, selector) {
  11224. var i;
  11225. if (!elm) {
  11226. return false;
  11227. }
  11228. if (!Array.isArray(elm)) {
  11229. if (selector === '*') {
  11230. return elm.nodeType === 1;
  11231. }
  11232. if (simpleSelectorRe.test(selector)) {
  11233. var selectors = selector.toLowerCase().split(/,/);
  11234. var elmName = elm.nodeName.toLowerCase();
  11235. for (i = selectors.length - 1; i >= 0; i--) {
  11236. if (selectors[i] === elmName) {
  11237. return true;
  11238. }
  11239. }
  11240. return false;
  11241. }
  11242. if (elm.nodeType && elm.nodeType !== 1) {
  11243. return false;
  11244. }
  11245. }
  11246. var elms = !Array.isArray(elm) ? [elm] : elm;
  11247. return Sizzle(selector, elms[0].ownerDocument || elms[0], null, elms).length > 0;
  11248. };
  11249. var getParents = function (elm, selector, root, collect) {
  11250. var result = [];
  11251. var selectorVal;
  11252. var node = get(elm);
  11253. collect = collect === undefined;
  11254. root = root || (getRoot().nodeName !== 'BODY' ? getRoot().parentNode : null);
  11255. if (Tools.is(selector, 'string')) {
  11256. selectorVal = selector;
  11257. if (selector === '*') {
  11258. selector = function (node) {
  11259. return node.nodeType === 1;
  11260. };
  11261. } else {
  11262. selector = function (node) {
  11263. return is(node, selectorVal);
  11264. };
  11265. }
  11266. }
  11267. while (node) {
  11268. if (node === root || isNullable(node.nodeType) || isDocument$1(node) || isDocumentFragment(node)) {
  11269. break;
  11270. }
  11271. if (!selector || typeof selector === 'function' && selector(node)) {
  11272. if (collect) {
  11273. result.push(node);
  11274. } else {
  11275. return [node];
  11276. }
  11277. }
  11278. node = node.parentNode;
  11279. }
  11280. return collect ? result : null;
  11281. };
  11282. var getParent = function (node, selector, root) {
  11283. var parents = getParents(node, selector, root, false);
  11284. return parents && parents.length > 0 ? parents[0] : null;
  11285. };
  11286. var _findSib = function (node, selector, name) {
  11287. var func = selector;
  11288. if (node) {
  11289. if (typeof selector === 'string') {
  11290. func = function (node) {
  11291. return is(node, selector);
  11292. };
  11293. }
  11294. for (node = node[name]; node; node = node[name]) {
  11295. if (typeof func === 'function' && func(node)) {
  11296. return node;
  11297. }
  11298. }
  11299. }
  11300. return null;
  11301. };
  11302. var getNext = function (node, selector) {
  11303. return _findSib(node, selector, 'nextSibling');
  11304. };
  11305. var getPrev = function (node, selector) {
  11306. return _findSib(node, selector, 'previousSibling');
  11307. };
  11308. var select = function (selector, scope) {
  11309. return Sizzle(selector, get(scope) || settings.root_element || doc, []);
  11310. };
  11311. var run = function (elm, func, scope) {
  11312. var result;
  11313. var node = typeof elm === 'string' ? get(elm) : elm;
  11314. if (!node) {
  11315. return false;
  11316. }
  11317. if (Tools.isArray(node) && (node.length || node.length === 0)) {
  11318. result = [];
  11319. each$f(node, function (elm, i) {
  11320. if (elm) {
  11321. result.push(func.call(scope, typeof elm === 'string' ? get(elm) : elm, i));
  11322. }
  11323. });
  11324. return result;
  11325. }
  11326. var context = scope ? scope : this;
  11327. return func.call(context, node);
  11328. };
  11329. var setAttribs = function (elm, attrs) {
  11330. $$(elm).each(function (i, node) {
  11331. each$f(attrs, function (value, name) {
  11332. setAttrib(node, name, value);
  11333. });
  11334. });
  11335. };
  11336. var setHTML = function (elm, html) {
  11337. var $elm = $$(elm);
  11338. if (isIE) {
  11339. $elm.each(function (i, target) {
  11340. if (target.canHaveHTML === false) {
  11341. return;
  11342. }
  11343. while (target.firstChild) {
  11344. target.removeChild(target.firstChild);
  11345. }
  11346. try {
  11347. target.innerHTML = '<br>' + html;
  11348. target.removeChild(target.firstChild);
  11349. } catch (ex) {
  11350. DomQuery('<div></div>').html('<br>' + html).contents().slice(1).appendTo(target);
  11351. }
  11352. return html;
  11353. });
  11354. } else {
  11355. $elm.html(html);
  11356. }
  11357. };
  11358. var add = function (parentElm, name, attrs, html, create) {
  11359. return run(parentElm, function (parentElm) {
  11360. var newElm = typeof name === 'string' ? doc.createElement(name) : name;
  11361. setAttribs(newElm, attrs);
  11362. if (html) {
  11363. if (typeof html !== 'string' && html.nodeType) {
  11364. newElm.appendChild(html);
  11365. } else if (typeof html === 'string') {
  11366. setHTML(newElm, html);
  11367. }
  11368. }
  11369. return !create ? parentElm.appendChild(newElm) : newElm;
  11370. });
  11371. };
  11372. var create = function (name, attrs, html) {
  11373. return add(doc.createElement(name), name, attrs, html, true);
  11374. };
  11375. var decode = Entities.decode;
  11376. var encode = Entities.encodeAllRaw;
  11377. var createHTML = function (name, attrs, html) {
  11378. var outHtml = '', key;
  11379. outHtml += '<' + name;
  11380. for (key in attrs) {
  11381. if (hasNonNullableKey(attrs, key)) {
  11382. outHtml += ' ' + key + '="' + encode(attrs[key]) + '"';
  11383. }
  11384. }
  11385. if (typeof html !== 'undefined') {
  11386. return outHtml + '>' + html + '</' + name + '>';
  11387. }
  11388. return outHtml + ' />';
  11389. };
  11390. var createFragment = function (html) {
  11391. var node;
  11392. var container = doc.createElement('div');
  11393. var frag = doc.createDocumentFragment();
  11394. frag.appendChild(container);
  11395. if (html) {
  11396. container.innerHTML = html;
  11397. }
  11398. while (node = container.firstChild) {
  11399. frag.appendChild(node);
  11400. }
  11401. frag.removeChild(container);
  11402. return frag;
  11403. };
  11404. var remove = function (node, keepChildren) {
  11405. var $node = $$(node);
  11406. if (keepChildren) {
  11407. $node.each(function () {
  11408. var child;
  11409. while (child = this.firstChild) {
  11410. if (child.nodeType === 3 && child.data.length === 0) {
  11411. this.removeChild(child);
  11412. } else {
  11413. this.parentNode.insertBefore(child, this);
  11414. }
  11415. }
  11416. }).remove();
  11417. } else {
  11418. $node.remove();
  11419. }
  11420. return $node.length > 1 ? $node.toArray() : $node[0];
  11421. };
  11422. var removeAllAttribs = function (e) {
  11423. return run(e, function (e) {
  11424. var i;
  11425. var attrs = e.attributes;
  11426. for (i = attrs.length - 1; i >= 0; i--) {
  11427. e.removeAttributeNode(attrs.item(i));
  11428. }
  11429. });
  11430. };
  11431. var parseStyle = function (cssText) {
  11432. return styles.parse(cssText);
  11433. };
  11434. var serializeStyle = function (stylesArg, name) {
  11435. return styles.serialize(stylesArg, name);
  11436. };
  11437. var addStyle = function (cssText) {
  11438. var head, styleElm;
  11439. if (self !== DOMUtils.DOM && doc === document) {
  11440. if (addedStyles[cssText]) {
  11441. return;
  11442. }
  11443. addedStyles[cssText] = true;
  11444. }
  11445. styleElm = doc.getElementById('mceDefaultStyles');
  11446. if (!styleElm) {
  11447. styleElm = doc.createElement('style');
  11448. styleElm.id = 'mceDefaultStyles';
  11449. styleElm.type = 'text/css';
  11450. head = doc.getElementsByTagName('head')[0];
  11451. if (head.firstChild) {
  11452. head.insertBefore(styleElm, head.firstChild);
  11453. } else {
  11454. head.appendChild(styleElm);
  11455. }
  11456. }
  11457. if (styleElm.styleSheet) {
  11458. styleElm.styleSheet.cssText += cssText;
  11459. } else {
  11460. styleElm.appendChild(doc.createTextNode(cssText));
  11461. }
  11462. };
  11463. var loadCSS = function (urls) {
  11464. if (!urls) {
  11465. urls = '';
  11466. }
  11467. each$k(urls.split(','), function (url) {
  11468. files[url] = true;
  11469. styleSheetLoader.load(url, noop);
  11470. });
  11471. };
  11472. var toggleClass = function (elm, cls, state) {
  11473. $$(elm).toggleClass(cls, state).each(function () {
  11474. if (this.className === '') {
  11475. DomQuery(this).attr('class', null);
  11476. }
  11477. });
  11478. };
  11479. var addClass = function (elm, cls) {
  11480. $$(elm).addClass(cls);
  11481. };
  11482. var removeClass = function (elm, cls) {
  11483. toggleClass(elm, cls, false);
  11484. };
  11485. var hasClass = function (elm, cls) {
  11486. return $$(elm).hasClass(cls);
  11487. };
  11488. var show = function (elm) {
  11489. $$(elm).show();
  11490. };
  11491. var hide = function (elm) {
  11492. $$(elm).hide();
  11493. };
  11494. var isHidden = function (elm) {
  11495. return $$(elm).css('display') === 'none';
  11496. };
  11497. var uniqueId = function (prefix) {
  11498. return (!prefix ? 'mce_' : prefix) + counter++;
  11499. };
  11500. var getOuterHTML = function (elm) {
  11501. var node = typeof elm === 'string' ? get(elm) : elm;
  11502. return isElement$5(node) ? node.outerHTML : DomQuery('<div></div>').append(DomQuery(node).clone()).html();
  11503. };
  11504. var setOuterHTML = function (elm, html) {
  11505. $$(elm).each(function () {
  11506. try {
  11507. if ('outerHTML' in this) {
  11508. this.outerHTML = html;
  11509. return;
  11510. }
  11511. } catch (ex) {
  11512. }
  11513. remove(DomQuery(this).html(html), true);
  11514. });
  11515. };
  11516. var insertAfter = function (node, reference) {
  11517. var referenceNode = get(reference);
  11518. return run(node, function (node) {
  11519. var parent = referenceNode.parentNode;
  11520. var nextSibling = referenceNode.nextSibling;
  11521. if (nextSibling) {
  11522. parent.insertBefore(node, nextSibling);
  11523. } else {
  11524. parent.appendChild(node);
  11525. }
  11526. return node;
  11527. });
  11528. };
  11529. var replace = function (newElm, oldElm, keepChildren) {
  11530. return run(oldElm, function (oldElm) {
  11531. if (Tools.is(oldElm, 'array')) {
  11532. newElm = newElm.cloneNode(true);
  11533. }
  11534. if (keepChildren) {
  11535. each$f(grep$1(oldElm.childNodes), function (node) {
  11536. newElm.appendChild(node);
  11537. });
  11538. }
  11539. return oldElm.parentNode.replaceChild(newElm, oldElm);
  11540. });
  11541. };
  11542. var rename = function (elm, name) {
  11543. var newElm;
  11544. if (elm.nodeName !== name.toUpperCase()) {
  11545. newElm = create(name);
  11546. each$f(getAttribs(elm), function (attrNode) {
  11547. setAttrib(newElm, attrNode.nodeName, getAttrib(elm, attrNode.nodeName));
  11548. });
  11549. replace(newElm, elm, true);
  11550. }
  11551. return newElm || elm;
  11552. };
  11553. var findCommonAncestor = function (a, b) {
  11554. var ps = a, pe;
  11555. while (ps) {
  11556. pe = b;
  11557. while (pe && ps !== pe) {
  11558. pe = pe.parentNode;
  11559. }
  11560. if (ps === pe) {
  11561. break;
  11562. }
  11563. ps = ps.parentNode;
  11564. }
  11565. if (!ps && a.ownerDocument) {
  11566. return a.ownerDocument.documentElement;
  11567. }
  11568. return ps;
  11569. };
  11570. var toHex = function (rgbVal) {
  11571. return styles.toHex(Tools.trim(rgbVal));
  11572. };
  11573. var isNonEmptyElement = function (node) {
  11574. if (isElement$5(node)) {
  11575. var isNamedAnchor = node.nodeName.toLowerCase() === 'a' && !getAttrib(node, 'href') && getAttrib(node, 'id');
  11576. if (getAttrib(node, 'name') || getAttrib(node, 'data-mce-bookmark') || isNamedAnchor) {
  11577. return true;
  11578. }
  11579. }
  11580. return false;
  11581. };
  11582. var isEmpty = function (node, elements) {
  11583. var type, name, brCount = 0;
  11584. if (isNonEmptyElement(node)) {
  11585. return false;
  11586. }
  11587. node = node.firstChild;
  11588. if (node) {
  11589. var walker = new DomTreeWalker(node, node.parentNode);
  11590. var whitespace = schema ? schema.getWhiteSpaceElements() : {};
  11591. elements = elements || (schema ? schema.getNonEmptyElements() : null);
  11592. do {
  11593. type = node.nodeType;
  11594. if (isElement$5(node)) {
  11595. var bogusVal = node.getAttribute('data-mce-bogus');
  11596. if (bogusVal) {
  11597. node = walker.next(bogusVal === 'all');
  11598. continue;
  11599. }
  11600. name = node.nodeName.toLowerCase();
  11601. if (elements && elements[name]) {
  11602. if (name === 'br') {
  11603. brCount++;
  11604. node = walker.next();
  11605. continue;
  11606. }
  11607. return false;
  11608. }
  11609. if (isNonEmptyElement(node)) {
  11610. return false;
  11611. }
  11612. }
  11613. if (type === 8) {
  11614. return false;
  11615. }
  11616. if (type === 3 && !isWhitespaceText(node.nodeValue)) {
  11617. return false;
  11618. }
  11619. if (type === 3 && node.parentNode && whitespace[node.parentNode.nodeName] && isWhitespaceText(node.nodeValue)) {
  11620. return false;
  11621. }
  11622. node = walker.next();
  11623. } while (node);
  11624. }
  11625. return brCount <= 1;
  11626. };
  11627. var createRng = function () {
  11628. return doc.createRange();
  11629. };
  11630. var split = function (parentElm, splitElm, replacementElm) {
  11631. var range = createRng();
  11632. var beforeFragment;
  11633. var afterFragment;
  11634. var parentNode;
  11635. if (parentElm && splitElm) {
  11636. range.setStart(parentElm.parentNode, findNodeIndex(parentElm));
  11637. range.setEnd(splitElm.parentNode, findNodeIndex(splitElm));
  11638. beforeFragment = range.extractContents();
  11639. range = createRng();
  11640. range.setStart(splitElm.parentNode, findNodeIndex(splitElm) + 1);
  11641. range.setEnd(parentElm.parentNode, findNodeIndex(parentElm) + 1);
  11642. afterFragment = range.extractContents();
  11643. parentNode = parentElm.parentNode;
  11644. parentNode.insertBefore(trimNode(self, beforeFragment), parentElm);
  11645. if (replacementElm) {
  11646. parentNode.insertBefore(replacementElm, parentElm);
  11647. } else {
  11648. parentNode.insertBefore(splitElm, parentElm);
  11649. }
  11650. parentNode.insertBefore(trimNode(self, afterFragment), parentElm);
  11651. remove(parentElm);
  11652. return replacementElm || splitElm;
  11653. }
  11654. };
  11655. var bind = function (target, name, func, scope) {
  11656. if (Tools.isArray(target)) {
  11657. var i = target.length;
  11658. var rv = [];
  11659. while (i--) {
  11660. rv[i] = bind(target[i], name, func, scope);
  11661. }
  11662. return rv;
  11663. }
  11664. if (settings.collect && (target === doc || target === win)) {
  11665. boundEvents.push([
  11666. target,
  11667. name,
  11668. func,
  11669. scope
  11670. ]);
  11671. }
  11672. var output = events.bind(target, name, func, scope || self);
  11673. return output;
  11674. };
  11675. var unbind = function (target, name, func) {
  11676. if (Tools.isArray(target)) {
  11677. var i = target.length;
  11678. var rv = [];
  11679. while (i--) {
  11680. rv[i] = unbind(target[i], name, func);
  11681. }
  11682. return rv;
  11683. } else {
  11684. if (boundEvents.length > 0 && (target === doc || target === win)) {
  11685. var i = boundEvents.length;
  11686. while (i--) {
  11687. var item = boundEvents[i];
  11688. if (target === item[0] && (!name || name === item[1]) && (!func || func === item[2])) {
  11689. events.unbind(item[0], item[1], item[2]);
  11690. }
  11691. }
  11692. }
  11693. return events.unbind(target, name, func);
  11694. }
  11695. };
  11696. var fire = function (target, name, evt) {
  11697. return events.fire(target, name, evt);
  11698. };
  11699. var getContentEditable = function (node) {
  11700. if (node && isElement$5(node)) {
  11701. var contentEditable = node.getAttribute('data-mce-contenteditable');
  11702. if (contentEditable && contentEditable !== 'inherit') {
  11703. return contentEditable;
  11704. }
  11705. return node.contentEditable !== 'inherit' ? node.contentEditable : null;
  11706. } else {
  11707. return null;
  11708. }
  11709. };
  11710. var getContentEditableParent = function (node) {
  11711. var root = getRoot();
  11712. var state = null;
  11713. for (; node && node !== root; node = node.parentNode) {
  11714. state = getContentEditable(node);
  11715. if (state !== null) {
  11716. break;
  11717. }
  11718. }
  11719. return state;
  11720. };
  11721. var destroy = function () {
  11722. if (boundEvents.length > 0) {
  11723. var i = boundEvents.length;
  11724. while (i--) {
  11725. var item = boundEvents[i];
  11726. events.unbind(item[0], item[1], item[2]);
  11727. }
  11728. }
  11729. each$j(files, function (_, url) {
  11730. styleSheetLoader.unload(url);
  11731. delete files[url];
  11732. });
  11733. if (Sizzle.setDocument) {
  11734. Sizzle.setDocument();
  11735. }
  11736. };
  11737. var isChildOf = function (node, parent) {
  11738. if (!isIE) {
  11739. return node === parent || parent.contains(node);
  11740. } else {
  11741. while (node) {
  11742. if (parent === node) {
  11743. return true;
  11744. }
  11745. node = node.parentNode;
  11746. }
  11747. return false;
  11748. }
  11749. };
  11750. var dumpRng = function (r) {
  11751. return 'startContainer: ' + r.startContainer.nodeName + ', startOffset: ' + r.startOffset + ', endContainer: ' + r.endContainer.nodeName + ', endOffset: ' + r.endOffset;
  11752. };
  11753. var self = {
  11754. doc: doc,
  11755. settings: settings,
  11756. win: win,
  11757. files: files,
  11758. stdMode: stdMode,
  11759. boxModel: boxModel,
  11760. styleSheetLoader: styleSheetLoader,
  11761. boundEvents: boundEvents,
  11762. styles: styles,
  11763. schema: schema,
  11764. events: events,
  11765. isBlock: isBlock,
  11766. $: $,
  11767. $$: $$,
  11768. root: null,
  11769. clone: clone,
  11770. getRoot: getRoot,
  11771. getViewPort: getViewPort,
  11772. getRect: getRect,
  11773. getSize: getSize,
  11774. getParent: getParent,
  11775. getParents: getParents,
  11776. get: get,
  11777. getNext: getNext,
  11778. getPrev: getPrev,
  11779. select: select,
  11780. is: is,
  11781. add: add,
  11782. create: create,
  11783. createHTML: createHTML,
  11784. createFragment: createFragment,
  11785. remove: remove,
  11786. setStyle: setStyle,
  11787. getStyle: getStyle,
  11788. setStyles: setStyles,
  11789. removeAllAttribs: removeAllAttribs,
  11790. setAttrib: setAttrib,
  11791. setAttribs: setAttribs,
  11792. getAttrib: getAttrib,
  11793. getPos: getPos$1,
  11794. parseStyle: parseStyle,
  11795. serializeStyle: serializeStyle,
  11796. addStyle: addStyle,
  11797. loadCSS: loadCSS,
  11798. addClass: addClass,
  11799. removeClass: removeClass,
  11800. hasClass: hasClass,
  11801. toggleClass: toggleClass,
  11802. show: show,
  11803. hide: hide,
  11804. isHidden: isHidden,
  11805. uniqueId: uniqueId,
  11806. setHTML: setHTML,
  11807. getOuterHTML: getOuterHTML,
  11808. setOuterHTML: setOuterHTML,
  11809. decode: decode,
  11810. encode: encode,
  11811. insertAfter: insertAfter,
  11812. replace: replace,
  11813. rename: rename,
  11814. findCommonAncestor: findCommonAncestor,
  11815. toHex: toHex,
  11816. run: run,
  11817. getAttribs: getAttribs,
  11818. isEmpty: isEmpty,
  11819. createRng: createRng,
  11820. nodeIndex: findNodeIndex,
  11821. split: split,
  11822. bind: bind,
  11823. unbind: unbind,
  11824. fire: fire,
  11825. getContentEditable: getContentEditable,
  11826. getContentEditableParent: getContentEditableParent,
  11827. destroy: destroy,
  11828. isChildOf: isChildOf,
  11829. dumpRng: dumpRng
  11830. };
  11831. var attrHooks = setupAttrHooks(styles, settings, constant(self));
  11832. return self;
  11833. };
  11834. DOMUtils.DOM = DOMUtils(document);
  11835. DOMUtils.nodeIndex = findNodeIndex;
  11836. var DOM$a = DOMUtils.DOM;
  11837. var each$e = Tools.each, grep = Tools.grep;
  11838. var QUEUED = 0;
  11839. var LOADING = 1;
  11840. var LOADED = 2;
  11841. var FAILED = 3;
  11842. var ScriptLoader = function () {
  11843. function ScriptLoader(settings) {
  11844. if (settings === void 0) {
  11845. settings = {};
  11846. }
  11847. this.states = {};
  11848. this.queue = [];
  11849. this.scriptLoadedCallbacks = {};
  11850. this.queueLoadedCallbacks = [];
  11851. this.loading = 0;
  11852. this.settings = settings;
  11853. }
  11854. ScriptLoader.prototype._setReferrerPolicy = function (referrerPolicy) {
  11855. this.settings.referrerPolicy = referrerPolicy;
  11856. };
  11857. ScriptLoader.prototype.loadScript = function (url, success, failure) {
  11858. var dom = DOM$a;
  11859. var elm;
  11860. var cleanup = function () {
  11861. dom.remove(id);
  11862. if (elm) {
  11863. elm.onerror = elm.onload = elm = null;
  11864. }
  11865. };
  11866. var done = function () {
  11867. cleanup();
  11868. success();
  11869. };
  11870. var error = function () {
  11871. cleanup();
  11872. if (isFunction(failure)) {
  11873. failure();
  11874. } else {
  11875. if (typeof console !== 'undefined' && console.log) {
  11876. console.log('Failed to load script: ' + url);
  11877. }
  11878. }
  11879. };
  11880. var id = dom.uniqueId();
  11881. elm = document.createElement('script');
  11882. elm.id = id;
  11883. elm.type = 'text/javascript';
  11884. elm.src = Tools._addCacheSuffix(url);
  11885. if (this.settings.referrerPolicy) {
  11886. dom.setAttrib(elm, 'referrerpolicy', this.settings.referrerPolicy);
  11887. }
  11888. elm.onload = done;
  11889. elm.onerror = error;
  11890. (document.getElementsByTagName('head')[0] || document.body).appendChild(elm);
  11891. };
  11892. ScriptLoader.prototype.isDone = function (url) {
  11893. return this.states[url] === LOADED;
  11894. };
  11895. ScriptLoader.prototype.markDone = function (url) {
  11896. this.states[url] = LOADED;
  11897. };
  11898. ScriptLoader.prototype.add = function (url, success, scope, failure) {
  11899. var state = this.states[url];
  11900. this.queue.push(url);
  11901. if (state === undefined) {
  11902. this.states[url] = QUEUED;
  11903. }
  11904. if (success) {
  11905. if (!this.scriptLoadedCallbacks[url]) {
  11906. this.scriptLoadedCallbacks[url] = [];
  11907. }
  11908. this.scriptLoadedCallbacks[url].push({
  11909. success: success,
  11910. failure: failure,
  11911. scope: scope || this
  11912. });
  11913. }
  11914. };
  11915. ScriptLoader.prototype.load = function (url, success, scope, failure) {
  11916. return this.add(url, success, scope, failure);
  11917. };
  11918. ScriptLoader.prototype.remove = function (url) {
  11919. delete this.states[url];
  11920. delete this.scriptLoadedCallbacks[url];
  11921. };
  11922. ScriptLoader.prototype.loadQueue = function (success, scope, failure) {
  11923. this.loadScripts(this.queue, success, scope, failure);
  11924. };
  11925. ScriptLoader.prototype.loadScripts = function (scripts, success, scope, failure) {
  11926. var self = this;
  11927. var failures = [];
  11928. var execCallbacks = function (name, url) {
  11929. each$e(self.scriptLoadedCallbacks[url], function (callback) {
  11930. if (isFunction(callback[name])) {
  11931. callback[name].call(callback.scope);
  11932. }
  11933. });
  11934. self.scriptLoadedCallbacks[url] = undefined;
  11935. };
  11936. self.queueLoadedCallbacks.push({
  11937. success: success,
  11938. failure: failure,
  11939. scope: scope || this
  11940. });
  11941. var loadScripts = function () {
  11942. var loadingScripts = grep(scripts);
  11943. scripts.length = 0;
  11944. each$e(loadingScripts, function (url) {
  11945. if (self.states[url] === LOADED) {
  11946. execCallbacks('success', url);
  11947. return;
  11948. }
  11949. if (self.states[url] === FAILED) {
  11950. execCallbacks('failure', url);
  11951. return;
  11952. }
  11953. if (self.states[url] !== LOADING) {
  11954. self.states[url] = LOADING;
  11955. self.loading++;
  11956. self.loadScript(url, function () {
  11957. self.states[url] = LOADED;
  11958. self.loading--;
  11959. execCallbacks('success', url);
  11960. loadScripts();
  11961. }, function () {
  11962. self.states[url] = FAILED;
  11963. self.loading--;
  11964. failures.push(url);
  11965. execCallbacks('failure', url);
  11966. loadScripts();
  11967. });
  11968. }
  11969. });
  11970. if (!self.loading) {
  11971. var notifyCallbacks = self.queueLoadedCallbacks.slice(0);
  11972. self.queueLoadedCallbacks.length = 0;
  11973. each$e(notifyCallbacks, function (callback) {
  11974. if (failures.length === 0) {
  11975. if (isFunction(callback.success)) {
  11976. callback.success.call(callback.scope);
  11977. }
  11978. } else {
  11979. if (isFunction(callback.failure)) {
  11980. callback.failure.call(callback.scope, failures);
  11981. }
  11982. }
  11983. });
  11984. }
  11985. };
  11986. loadScripts();
  11987. };
  11988. ScriptLoader.ScriptLoader = new ScriptLoader();
  11989. return ScriptLoader;
  11990. }();
  11991. var Cell = function (initial) {
  11992. var value = initial;
  11993. var get = function () {
  11994. return value;
  11995. };
  11996. var set = function (v) {
  11997. value = v;
  11998. };
  11999. return {
  12000. get: get,
  12001. set: set
  12002. };
  12003. };
  12004. var isRaw = function (str) {
  12005. return isObject(str) && has$2(str, 'raw');
  12006. };
  12007. var isTokenised = function (str) {
  12008. return isArray$1(str) && str.length > 1;
  12009. };
  12010. var data = {};
  12011. var currentCode = Cell('en');
  12012. var getLanguageData = function () {
  12013. return get$9(data, currentCode.get());
  12014. };
  12015. var getData = function () {
  12016. return map$2(data, function (value) {
  12017. return __assign({}, value);
  12018. });
  12019. };
  12020. var setCode = function (newCode) {
  12021. if (newCode) {
  12022. currentCode.set(newCode);
  12023. }
  12024. };
  12025. var getCode = function () {
  12026. return currentCode.get();
  12027. };
  12028. var add$4 = function (code, items) {
  12029. var langData = data[code];
  12030. if (!langData) {
  12031. data[code] = langData = {};
  12032. }
  12033. each$j(items, function (translation, name) {
  12034. langData[name.toLowerCase()] = translation;
  12035. });
  12036. };
  12037. var translate = function (text) {
  12038. var langData = getLanguageData().getOr({});
  12039. var toString = function (obj) {
  12040. if (isFunction(obj)) {
  12041. return Object.prototype.toString.call(obj);
  12042. }
  12043. return !isEmpty(obj) ? '' + obj : '';
  12044. };
  12045. var isEmpty = function (text) {
  12046. return text === '' || text === null || text === undefined;
  12047. };
  12048. var getLangData = function (text) {
  12049. var textstr = toString(text);
  12050. return get$9(langData, textstr.toLowerCase()).map(toString).getOr(textstr);
  12051. };
  12052. var removeContext = function (str) {
  12053. return str.replace(/{context:\w+}$/, '');
  12054. };
  12055. if (isEmpty(text)) {
  12056. return '';
  12057. }
  12058. if (isRaw(text)) {
  12059. return toString(text.raw);
  12060. }
  12061. if (isTokenised(text)) {
  12062. var values_1 = text.slice(1);
  12063. var substitued = getLangData(text[0]).replace(/\{([0-9]+)\}/g, function ($1, $2) {
  12064. return has$2(values_1, $2) ? toString(values_1[$2]) : $1;
  12065. });
  12066. return removeContext(substitued);
  12067. }
  12068. return removeContext(getLangData(text));
  12069. };
  12070. var isRtl$1 = function () {
  12071. return getLanguageData().bind(function (items) {
  12072. return get$9(items, '_dir');
  12073. }).exists(function (dir) {
  12074. return dir === 'rtl';
  12075. });
  12076. };
  12077. var hasCode = function (code) {
  12078. return has$2(data, code);
  12079. };
  12080. var I18n = {
  12081. getData: getData,
  12082. setCode: setCode,
  12083. getCode: getCode,
  12084. add: add$4,
  12085. translate: translate,
  12086. isRtl: isRtl$1,
  12087. hasCode: hasCode
  12088. };
  12089. var AddOnManager = function () {
  12090. var items = [];
  12091. var urls = {};
  12092. var lookup = {};
  12093. var _listeners = [];
  12094. var runListeners = function (name, state) {
  12095. var matchedListeners = filter$4(_listeners, function (listener) {
  12096. return listener.name === name && listener.state === state;
  12097. });
  12098. each$k(matchedListeners, function (listener) {
  12099. return listener.callback();
  12100. });
  12101. };
  12102. var get = function (name) {
  12103. if (lookup[name]) {
  12104. return lookup[name].instance;
  12105. }
  12106. return undefined;
  12107. };
  12108. var dependencies = function (name) {
  12109. var result;
  12110. if (lookup[name]) {
  12111. result = lookup[name].dependencies;
  12112. }
  12113. return result || [];
  12114. };
  12115. var requireLangPack = function (name, languages) {
  12116. if (AddOnManager.languageLoad !== false) {
  12117. waitFor(name, function () {
  12118. var language = I18n.getCode();
  12119. var wrappedLanguages = ',' + (languages || '') + ',';
  12120. if (!language || languages && wrappedLanguages.indexOf(',' + language + ',') === -1) {
  12121. return;
  12122. }
  12123. ScriptLoader.ScriptLoader.add(urls[name] + '/langs/' + language + '.js');
  12124. }, 'loaded');
  12125. }
  12126. };
  12127. var add = function (id, addOn, dependencies) {
  12128. var addOnConstructor = addOn;
  12129. items.push(addOnConstructor);
  12130. lookup[id] = {
  12131. instance: addOnConstructor,
  12132. dependencies: dependencies
  12133. };
  12134. runListeners(id, 'added');
  12135. return addOnConstructor;
  12136. };
  12137. var remove = function (name) {
  12138. delete urls[name];
  12139. delete lookup[name];
  12140. };
  12141. var createUrl = function (baseUrl, dep) {
  12142. if (typeof dep === 'object') {
  12143. return dep;
  12144. }
  12145. return typeof baseUrl === 'string' ? {
  12146. prefix: '',
  12147. resource: dep,
  12148. suffix: ''
  12149. } : {
  12150. prefix: baseUrl.prefix,
  12151. resource: dep,
  12152. suffix: baseUrl.suffix
  12153. };
  12154. };
  12155. var addComponents = function (pluginName, scripts) {
  12156. var pluginUrl = urls[pluginName];
  12157. each$k(scripts, function (script) {
  12158. ScriptLoader.ScriptLoader.add(pluginUrl + '/' + script);
  12159. });
  12160. };
  12161. var loadDependencies = function (name, addOnUrl, success, scope) {
  12162. var deps = dependencies(name);
  12163. each$k(deps, function (dep) {
  12164. var newUrl = createUrl(addOnUrl, dep);
  12165. load(newUrl.resource, newUrl, undefined, undefined);
  12166. });
  12167. if (success) {
  12168. if (scope) {
  12169. success.call(scope);
  12170. } else {
  12171. success.call(ScriptLoader);
  12172. }
  12173. }
  12174. };
  12175. var load = function (name, addOnUrl, success, scope, failure) {
  12176. if (urls[name]) {
  12177. return;
  12178. }
  12179. var urlString = typeof addOnUrl === 'string' ? addOnUrl : addOnUrl.prefix + addOnUrl.resource + addOnUrl.suffix;
  12180. if (urlString.indexOf('/') !== 0 && urlString.indexOf('://') === -1) {
  12181. urlString = AddOnManager.baseURL + '/' + urlString;
  12182. }
  12183. urls[name] = urlString.substring(0, urlString.lastIndexOf('/'));
  12184. var done = function () {
  12185. runListeners(name, 'loaded');
  12186. loadDependencies(name, addOnUrl, success, scope);
  12187. };
  12188. if (lookup[name]) {
  12189. done();
  12190. } else {
  12191. ScriptLoader.ScriptLoader.add(urlString, done, scope, failure);
  12192. }
  12193. };
  12194. var waitFor = function (name, callback, state) {
  12195. if (state === void 0) {
  12196. state = 'added';
  12197. }
  12198. if (has$2(lookup, name) && state === 'added') {
  12199. callback();
  12200. } else if (has$2(urls, name) && state === 'loaded') {
  12201. callback();
  12202. } else {
  12203. _listeners.push({
  12204. name: name,
  12205. state: state,
  12206. callback: callback
  12207. });
  12208. }
  12209. };
  12210. return {
  12211. items: items,
  12212. urls: urls,
  12213. lookup: lookup,
  12214. _listeners: _listeners,
  12215. get: get,
  12216. dependencies: dependencies,
  12217. requireLangPack: requireLangPack,
  12218. add: add,
  12219. remove: remove,
  12220. createUrl: createUrl,
  12221. addComponents: addComponents,
  12222. load: load,
  12223. waitFor: waitFor
  12224. };
  12225. };
  12226. AddOnManager.languageLoad = true;
  12227. AddOnManager.baseURL = '';
  12228. AddOnManager.PluginManager = AddOnManager();
  12229. AddOnManager.ThemeManager = AddOnManager();
  12230. var singleton = function (doRevoke) {
  12231. var subject = Cell(Optional.none());
  12232. var revoke = function () {
  12233. return subject.get().each(doRevoke);
  12234. };
  12235. var clear = function () {
  12236. revoke();
  12237. subject.set(Optional.none());
  12238. };
  12239. var isSet = function () {
  12240. return subject.get().isSome();
  12241. };
  12242. var get = function () {
  12243. return subject.get();
  12244. };
  12245. var set = function (s) {
  12246. revoke();
  12247. subject.set(Optional.some(s));
  12248. };
  12249. return {
  12250. clear: clear,
  12251. isSet: isSet,
  12252. get: get,
  12253. set: set
  12254. };
  12255. };
  12256. var value = function () {
  12257. var subject = singleton(noop);
  12258. var on = function (f) {
  12259. return subject.get().each(f);
  12260. };
  12261. return __assign(__assign({}, subject), { on: on });
  12262. };
  12263. var first = function (fn, rate) {
  12264. var timer = null;
  12265. var cancel = function () {
  12266. if (!isNull(timer)) {
  12267. clearTimeout(timer);
  12268. timer = null;
  12269. }
  12270. };
  12271. var throttle = function () {
  12272. var args = [];
  12273. for (var _i = 0; _i < arguments.length; _i++) {
  12274. args[_i] = arguments[_i];
  12275. }
  12276. if (isNull(timer)) {
  12277. timer = setTimeout(function () {
  12278. timer = null;
  12279. fn.apply(null, args);
  12280. }, rate);
  12281. }
  12282. };
  12283. return {
  12284. cancel: cancel,
  12285. throttle: throttle
  12286. };
  12287. };
  12288. var last = function (fn, rate) {
  12289. var timer = null;
  12290. var cancel = function () {
  12291. if (!isNull(timer)) {
  12292. clearTimeout(timer);
  12293. timer = null;
  12294. }
  12295. };
  12296. var throttle = function () {
  12297. var args = [];
  12298. for (var _i = 0; _i < arguments.length; _i++) {
  12299. args[_i] = arguments[_i];
  12300. }
  12301. cancel();
  12302. timer = setTimeout(function () {
  12303. timer = null;
  12304. fn.apply(null, args);
  12305. }, rate);
  12306. };
  12307. return {
  12308. cancel: cancel,
  12309. throttle: throttle
  12310. };
  12311. };
  12312. var read$4 = function (element, attr) {
  12313. var value = get$6(element, attr);
  12314. return value === undefined || value === '' ? [] : value.split(' ');
  12315. };
  12316. var add$3 = function (element, attr, id) {
  12317. var old = read$4(element, attr);
  12318. var nu = old.concat([id]);
  12319. set$1(element, attr, nu.join(' '));
  12320. return true;
  12321. };
  12322. var remove$5 = function (element, attr, id) {
  12323. var nu = filter$4(read$4(element, attr), function (v) {
  12324. return v !== id;
  12325. });
  12326. if (nu.length > 0) {
  12327. set$1(element, attr, nu.join(' '));
  12328. } else {
  12329. remove$6(element, attr);
  12330. }
  12331. return false;
  12332. };
  12333. var supports = function (element) {
  12334. return element.dom.classList !== undefined;
  12335. };
  12336. var get$4 = function (element) {
  12337. return read$4(element, 'class');
  12338. };
  12339. var add$2 = function (element, clazz) {
  12340. return add$3(element, 'class', clazz);
  12341. };
  12342. var remove$4 = function (element, clazz) {
  12343. return remove$5(element, 'class', clazz);
  12344. };
  12345. var add$1 = function (element, clazz) {
  12346. if (supports(element)) {
  12347. element.dom.classList.add(clazz);
  12348. } else {
  12349. add$2(element, clazz);
  12350. }
  12351. };
  12352. var cleanClass = function (element) {
  12353. var classList = supports(element) ? element.dom.classList : get$4(element);
  12354. if (classList.length === 0) {
  12355. remove$6(element, 'class');
  12356. }
  12357. };
  12358. var remove$3 = function (element, clazz) {
  12359. if (supports(element)) {
  12360. var classList = element.dom.classList;
  12361. classList.remove(clazz);
  12362. } else {
  12363. remove$4(element, clazz);
  12364. }
  12365. cleanClass(element);
  12366. };
  12367. var has = function (element, clazz) {
  12368. return supports(element) && element.dom.classList.contains(clazz);
  12369. };
  12370. var descendants$1 = function (scope, predicate) {
  12371. var result = [];
  12372. each$k(children(scope), function (x) {
  12373. if (predicate(x)) {
  12374. result = result.concat([x]);
  12375. }
  12376. result = result.concat(descendants$1(x, predicate));
  12377. });
  12378. return result;
  12379. };
  12380. var descendants = function (scope, selector) {
  12381. return all(selector, scope);
  12382. };
  12383. var annotation = constant('mce-annotation');
  12384. var dataAnnotation = constant('data-mce-annotation');
  12385. var dataAnnotationId = constant('data-mce-annotation-uid');
  12386. var identify = function (editor, annotationName) {
  12387. var rng = editor.selection.getRng();
  12388. var start = SugarElement.fromDom(rng.startContainer);
  12389. var root = SugarElement.fromDom(editor.getBody());
  12390. var selector = annotationName.fold(function () {
  12391. return '.' + annotation();
  12392. }, function (an) {
  12393. return '[' + dataAnnotation() + '="' + an + '"]';
  12394. });
  12395. var newStart = child$1(start, rng.startOffset).getOr(start);
  12396. var closest = closest$2(newStart, selector, function (n) {
  12397. return eq(n, root);
  12398. });
  12399. var getAttr = function (c, property) {
  12400. if (has$1(c, property)) {
  12401. return Optional.some(get$6(c, property));
  12402. } else {
  12403. return Optional.none();
  12404. }
  12405. };
  12406. return closest.bind(function (c) {
  12407. return getAttr(c, '' + dataAnnotationId()).bind(function (uid) {
  12408. return getAttr(c, '' + dataAnnotation()).map(function (name) {
  12409. var elements = findMarkers(editor, uid);
  12410. return {
  12411. uid: uid,
  12412. name: name,
  12413. elements: elements
  12414. };
  12415. });
  12416. });
  12417. });
  12418. };
  12419. var isAnnotation = function (elem) {
  12420. return isElement$6(elem) && has(elem, annotation());
  12421. };
  12422. var findMarkers = function (editor, uid) {
  12423. var body = SugarElement.fromDom(editor.getBody());
  12424. return descendants(body, '[' + dataAnnotationId() + '="' + uid + '"]');
  12425. };
  12426. var findAll = function (editor, name) {
  12427. var body = SugarElement.fromDom(editor.getBody());
  12428. var markers = descendants(body, '[' + dataAnnotation() + '="' + name + '"]');
  12429. var directory = {};
  12430. each$k(markers, function (m) {
  12431. var uid = get$6(m, dataAnnotationId());
  12432. var nodesAlready = get$9(directory, uid).getOr([]);
  12433. directory[uid] = nodesAlready.concat([m]);
  12434. });
  12435. return directory;
  12436. };
  12437. var setup$n = function (editor, _registry) {
  12438. var changeCallbacks = Cell({});
  12439. var initData = function () {
  12440. return {
  12441. listeners: [],
  12442. previous: value()
  12443. };
  12444. };
  12445. var withCallbacks = function (name, f) {
  12446. updateCallbacks(name, function (data) {
  12447. f(data);
  12448. return data;
  12449. });
  12450. };
  12451. var updateCallbacks = function (name, f) {
  12452. var callbackMap = changeCallbacks.get();
  12453. var data = get$9(callbackMap, name).getOrThunk(initData);
  12454. var outputData = f(data);
  12455. callbackMap[name] = outputData;
  12456. changeCallbacks.set(callbackMap);
  12457. };
  12458. var fireCallbacks = function (name, uid, elements) {
  12459. withCallbacks(name, function (data) {
  12460. each$k(data.listeners, function (f) {
  12461. return f(true, name, {
  12462. uid: uid,
  12463. nodes: map$3(elements, function (elem) {
  12464. return elem.dom;
  12465. })
  12466. });
  12467. });
  12468. });
  12469. };
  12470. var fireNoAnnotation = function (name) {
  12471. withCallbacks(name, function (data) {
  12472. each$k(data.listeners, function (f) {
  12473. return f(false, name);
  12474. });
  12475. });
  12476. };
  12477. var onNodeChange = last(function () {
  12478. var callbackMap = changeCallbacks.get();
  12479. var annotations = sort(keys(callbackMap));
  12480. each$k(annotations, function (name) {
  12481. updateCallbacks(name, function (data) {
  12482. var prev = data.previous.get();
  12483. identify(editor, Optional.some(name)).fold(function () {
  12484. if (prev.isSome()) {
  12485. fireNoAnnotation(name);
  12486. data.previous.clear();
  12487. }
  12488. }, function (_a) {
  12489. var uid = _a.uid, name = _a.name, elements = _a.elements;
  12490. if (!is$1(prev, uid)) {
  12491. fireCallbacks(name, uid, elements);
  12492. data.previous.set(uid);
  12493. }
  12494. });
  12495. return {
  12496. previous: data.previous,
  12497. listeners: data.listeners
  12498. };
  12499. });
  12500. });
  12501. }, 30);
  12502. editor.on('remove', function () {
  12503. onNodeChange.cancel();
  12504. });
  12505. editor.on('NodeChange', function () {
  12506. onNodeChange.throttle();
  12507. });
  12508. var addListener = function (name, f) {
  12509. updateCallbacks(name, function (data) {
  12510. return {
  12511. previous: data.previous,
  12512. listeners: data.listeners.concat([f])
  12513. };
  12514. });
  12515. };
  12516. return { addListener: addListener };
  12517. };
  12518. var setup$m = function (editor, registry) {
  12519. var identifyParserNode = function (span) {
  12520. return Optional.from(span.attr(dataAnnotation())).bind(registry.lookup);
  12521. };
  12522. editor.on('init', function () {
  12523. editor.serializer.addNodeFilter('span', function (spans) {
  12524. each$k(spans, function (span) {
  12525. identifyParserNode(span).each(function (settings) {
  12526. if (settings.persistent === false) {
  12527. span.unwrap();
  12528. }
  12529. });
  12530. });
  12531. });
  12532. });
  12533. };
  12534. var create$7 = function () {
  12535. var annotations = {};
  12536. var register = function (name, settings) {
  12537. annotations[name] = {
  12538. name: name,
  12539. settings: settings
  12540. };
  12541. };
  12542. var lookup = function (name) {
  12543. return get$9(annotations, name).map(function (a) {
  12544. return a.settings;
  12545. });
  12546. };
  12547. return {
  12548. register: register,
  12549. lookup: lookup
  12550. };
  12551. };
  12552. var unique = 0;
  12553. var generate = function (prefix) {
  12554. var date = new Date();
  12555. var time = date.getTime();
  12556. var random = Math.floor(Math.random() * 1000000000);
  12557. unique++;
  12558. return prefix + '_' + random + unique + String(time);
  12559. };
  12560. var add = function (element, classes) {
  12561. each$k(classes, function (x) {
  12562. add$1(element, x);
  12563. });
  12564. };
  12565. var fromHtml = function (html, scope) {
  12566. var doc = scope || document;
  12567. var div = doc.createElement('div');
  12568. div.innerHTML = html;
  12569. return children(SugarElement.fromDom(div));
  12570. };
  12571. var fromDom$1 = function (nodes) {
  12572. return map$3(nodes, SugarElement.fromDom);
  12573. };
  12574. var get$3 = function (element) {
  12575. return element.dom.innerHTML;
  12576. };
  12577. var set = function (element, content) {
  12578. var owner = owner$1(element);
  12579. var docDom = owner.dom;
  12580. var fragment = SugarElement.fromDom(docDom.createDocumentFragment());
  12581. var contentElements = fromHtml(content, docDom);
  12582. append(fragment, contentElements);
  12583. empty(element);
  12584. append$1(element, fragment);
  12585. };
  12586. var clone$1 = function (original, isDeep) {
  12587. return SugarElement.fromDom(original.dom.cloneNode(isDeep));
  12588. };
  12589. var shallow = function (original) {
  12590. return clone$1(original, false);
  12591. };
  12592. var deep$1 = function (original) {
  12593. return clone$1(original, true);
  12594. };
  12595. var TextWalker = function (startNode, rootNode, isBoundary) {
  12596. if (isBoundary === void 0) {
  12597. isBoundary = never;
  12598. }
  12599. var walker = new DomTreeWalker(startNode, rootNode);
  12600. var walk = function (direction) {
  12601. var next;
  12602. do {
  12603. next = walker[direction]();
  12604. } while (next && !isText$7(next) && !isBoundary(next));
  12605. return Optional.from(next).filter(isText$7);
  12606. };
  12607. return {
  12608. current: function () {
  12609. return Optional.from(walker.current()).filter(isText$7);
  12610. },
  12611. next: function () {
  12612. return walk('next');
  12613. },
  12614. prev: function () {
  12615. return walk('prev');
  12616. },
  12617. prev2: function () {
  12618. return walk('prev2');
  12619. }
  12620. };
  12621. };
  12622. var TextSeeker = function (dom, isBoundary) {
  12623. var isBlockBoundary = isBoundary ? isBoundary : function (node) {
  12624. return dom.isBlock(node) || isBr$5(node) || isContentEditableFalse$b(node);
  12625. };
  12626. var walk = function (node, offset, walker, process) {
  12627. if (isText$7(node)) {
  12628. var newOffset = process(node, offset, node.data);
  12629. if (newOffset !== -1) {
  12630. return Optional.some({
  12631. container: node,
  12632. offset: newOffset
  12633. });
  12634. }
  12635. }
  12636. return walker().bind(function (next) {
  12637. return walk(next.container, next.offset, walker, process);
  12638. });
  12639. };
  12640. var backwards = function (node, offset, process, root) {
  12641. var walker = TextWalker(node, root, isBlockBoundary);
  12642. return walk(node, offset, function () {
  12643. return walker.prev().map(function (prev) {
  12644. return {
  12645. container: prev,
  12646. offset: prev.length
  12647. };
  12648. });
  12649. }, process).getOrNull();
  12650. };
  12651. var forwards = function (node, offset, process, root) {
  12652. var walker = TextWalker(node, root, isBlockBoundary);
  12653. return walk(node, offset, function () {
  12654. return walker.next().map(function (next) {
  12655. return {
  12656. container: next,
  12657. offset: 0
  12658. };
  12659. });
  12660. }, process).getOrNull();
  12661. };
  12662. return {
  12663. backwards: backwards,
  12664. forwards: forwards
  12665. };
  12666. };
  12667. var round$2 = Math.round;
  12668. var clone = function (rect) {
  12669. if (!rect) {
  12670. return {
  12671. left: 0,
  12672. top: 0,
  12673. bottom: 0,
  12674. right: 0,
  12675. width: 0,
  12676. height: 0
  12677. };
  12678. }
  12679. return {
  12680. left: round$2(rect.left),
  12681. top: round$2(rect.top),
  12682. bottom: round$2(rect.bottom),
  12683. right: round$2(rect.right),
  12684. width: round$2(rect.width),
  12685. height: round$2(rect.height)
  12686. };
  12687. };
  12688. var collapse = function (rect, toStart) {
  12689. rect = clone(rect);
  12690. if (toStart) {
  12691. rect.right = rect.left;
  12692. } else {
  12693. rect.left = rect.left + rect.width;
  12694. rect.right = rect.left;
  12695. }
  12696. rect.width = 0;
  12697. return rect;
  12698. };
  12699. var isEqual = function (rect1, rect2) {
  12700. return rect1.left === rect2.left && rect1.top === rect2.top && rect1.bottom === rect2.bottom && rect1.right === rect2.right;
  12701. };
  12702. var isValidOverflow = function (overflowY, rect1, rect2) {
  12703. return overflowY >= 0 && overflowY <= Math.min(rect1.height, rect2.height) / 2;
  12704. };
  12705. var isAbove$1 = function (rect1, rect2) {
  12706. var halfHeight = Math.min(rect2.height / 2, rect1.height / 2);
  12707. if (rect1.bottom - halfHeight < rect2.top) {
  12708. return true;
  12709. }
  12710. if (rect1.top > rect2.bottom) {
  12711. return false;
  12712. }
  12713. return isValidOverflow(rect2.top - rect1.bottom, rect1, rect2);
  12714. };
  12715. var isBelow$1 = function (rect1, rect2) {
  12716. if (rect1.top > rect2.bottom) {
  12717. return true;
  12718. }
  12719. if (rect1.bottom < rect2.top) {
  12720. return false;
  12721. }
  12722. return isValidOverflow(rect2.bottom - rect1.top, rect1, rect2);
  12723. };
  12724. var containsXY = function (rect, clientX, clientY) {
  12725. return clientX >= rect.left && clientX <= rect.right && clientY >= rect.top && clientY <= rect.bottom;
  12726. };
  12727. var clamp$2 = function (value, min, max) {
  12728. return Math.min(Math.max(value, min), max);
  12729. };
  12730. var getSelectedNode = function (range) {
  12731. var startContainer = range.startContainer, startOffset = range.startOffset;
  12732. if (startContainer.hasChildNodes() && range.endOffset === startOffset + 1) {
  12733. return startContainer.childNodes[startOffset];
  12734. }
  12735. return null;
  12736. };
  12737. var getNode$1 = function (container, offset) {
  12738. if (isElement$5(container) && container.hasChildNodes()) {
  12739. var childNodes = container.childNodes;
  12740. var safeOffset = clamp$2(offset, 0, childNodes.length - 1);
  12741. return childNodes[safeOffset];
  12742. } else {
  12743. return container;
  12744. }
  12745. };
  12746. var getNodeUnsafe = function (container, offset) {
  12747. if (offset < 0 && isElement$5(container) && container.hasChildNodes()) {
  12748. return undefined;
  12749. } else {
  12750. return getNode$1(container, offset);
  12751. }
  12752. };
  12753. var extendingChars = new RegExp('[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a' + '\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0' + '\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c' + '\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3' + '\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc' + '\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57' + '\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56' + '\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44' + '\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9' + '\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97' + '\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074' + '\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5' + '\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18' + '\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1ABE\u1b00-\u1b03\u1b34' + '\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9' + '\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9' + '\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20DD-\u20E0\u20e1\u20E2-\u20E4\u20e5-\u20f0\u2cef-\u2cf1' + '\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\uA670-\uA672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1' + '\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc' + '\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1' + '\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]');
  12754. var isExtendingChar = function (ch) {
  12755. return typeof ch === 'string' && ch.charCodeAt(0) >= 768 && extendingChars.test(ch);
  12756. };
  12757. var or = function () {
  12758. var args = [];
  12759. for (var _i = 0; _i < arguments.length; _i++) {
  12760. args[_i] = arguments[_i];
  12761. }
  12762. return function (x) {
  12763. for (var i = 0; i < args.length; i++) {
  12764. if (args[i](x)) {
  12765. return true;
  12766. }
  12767. }
  12768. return false;
  12769. };
  12770. };
  12771. var and = function () {
  12772. var args = [];
  12773. for (var _i = 0; _i < arguments.length; _i++) {
  12774. args[_i] = arguments[_i];
  12775. }
  12776. return function (x) {
  12777. for (var i = 0; i < args.length; i++) {
  12778. if (!args[i](x)) {
  12779. return false;
  12780. }
  12781. }
  12782. return true;
  12783. };
  12784. };
  12785. var isElement$3 = isElement$5;
  12786. var isCaretCandidate$2 = isCaretCandidate$3;
  12787. var isBlock$1 = matchStyleValues('display', 'block table');
  12788. var isFloated = matchStyleValues('float', 'left right');
  12789. var isValidElementCaretCandidate = and(isElement$3, isCaretCandidate$2, not(isFloated));
  12790. var isNotPre = not(matchStyleValues('white-space', 'pre pre-line pre-wrap'));
  12791. var isText$4 = isText$7;
  12792. var isBr$2 = isBr$5;
  12793. var nodeIndex$1 = DOMUtils.nodeIndex;
  12794. var resolveIndex$1 = getNodeUnsafe;
  12795. var createRange$1 = function (doc) {
  12796. return 'createRange' in doc ? doc.createRange() : DOMUtils.DOM.createRng();
  12797. };
  12798. var isWhiteSpace$1 = function (chr) {
  12799. return chr && /[\r\n\t ]/.test(chr);
  12800. };
  12801. var isRange = function (rng) {
  12802. return !!rng.setStart && !!rng.setEnd;
  12803. };
  12804. var isHiddenWhiteSpaceRange = function (range) {
  12805. var container = range.startContainer;
  12806. var offset = range.startOffset;
  12807. if (isWhiteSpace$1(range.toString()) && isNotPre(container.parentNode) && isText$7(container)) {
  12808. var text = container.data;
  12809. if (isWhiteSpace$1(text[offset - 1]) || isWhiteSpace$1(text[offset + 1])) {
  12810. return true;
  12811. }
  12812. }
  12813. return false;
  12814. };
  12815. var getBrClientRect = function (brNode) {
  12816. var doc = brNode.ownerDocument;
  12817. var rng = createRange$1(doc);
  12818. var nbsp$1 = doc.createTextNode(nbsp);
  12819. var parentNode = brNode.parentNode;
  12820. parentNode.insertBefore(nbsp$1, brNode);
  12821. rng.setStart(nbsp$1, 0);
  12822. rng.setEnd(nbsp$1, 1);
  12823. var clientRect = clone(rng.getBoundingClientRect());
  12824. parentNode.removeChild(nbsp$1);
  12825. return clientRect;
  12826. };
  12827. var getBoundingClientRectWebKitText = function (rng) {
  12828. var sc = rng.startContainer;
  12829. var ec = rng.endContainer;
  12830. var so = rng.startOffset;
  12831. var eo = rng.endOffset;
  12832. if (sc === ec && isText$7(ec) && so === 0 && eo === 1) {
  12833. var newRng = rng.cloneRange();
  12834. newRng.setEndAfter(ec);
  12835. return getBoundingClientRect$1(newRng);
  12836. } else {
  12837. return null;
  12838. }
  12839. };
  12840. var isZeroRect = function (r) {
  12841. return r.left === 0 && r.right === 0 && r.top === 0 && r.bottom === 0;
  12842. };
  12843. var getBoundingClientRect$1 = function (item) {
  12844. var clientRect;
  12845. var clientRects = item.getClientRects();
  12846. if (clientRects.length > 0) {
  12847. clientRect = clone(clientRects[0]);
  12848. } else {
  12849. clientRect = clone(item.getBoundingClientRect());
  12850. }
  12851. if (!isRange(item) && isBr$2(item) && isZeroRect(clientRect)) {
  12852. return getBrClientRect(item);
  12853. }
  12854. if (isZeroRect(clientRect) && isRange(item)) {
  12855. return getBoundingClientRectWebKitText(item);
  12856. }
  12857. return clientRect;
  12858. };
  12859. var collapseAndInflateWidth = function (clientRect, toStart) {
  12860. var newClientRect = collapse(clientRect, toStart);
  12861. newClientRect.width = 1;
  12862. newClientRect.right = newClientRect.left + 1;
  12863. return newClientRect;
  12864. };
  12865. var getCaretPositionClientRects = function (caretPosition) {
  12866. var clientRects = [];
  12867. var addUniqueAndValidRect = function (clientRect) {
  12868. if (clientRect.height === 0) {
  12869. return;
  12870. }
  12871. if (clientRects.length > 0) {
  12872. if (isEqual(clientRect, clientRects[clientRects.length - 1])) {
  12873. return;
  12874. }
  12875. }
  12876. clientRects.push(clientRect);
  12877. };
  12878. var addCharacterOffset = function (container, offset) {
  12879. var range = createRange$1(container.ownerDocument);
  12880. if (offset < container.data.length) {
  12881. if (isExtendingChar(container.data[offset])) {
  12882. return clientRects;
  12883. }
  12884. if (isExtendingChar(container.data[offset - 1])) {
  12885. range.setStart(container, offset);
  12886. range.setEnd(container, offset + 1);
  12887. if (!isHiddenWhiteSpaceRange(range)) {
  12888. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(range), false));
  12889. return clientRects;
  12890. }
  12891. }
  12892. }
  12893. if (offset > 0) {
  12894. range.setStart(container, offset - 1);
  12895. range.setEnd(container, offset);
  12896. if (!isHiddenWhiteSpaceRange(range)) {
  12897. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(range), false));
  12898. }
  12899. }
  12900. if (offset < container.data.length) {
  12901. range.setStart(container, offset);
  12902. range.setEnd(container, offset + 1);
  12903. if (!isHiddenWhiteSpaceRange(range)) {
  12904. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(range), true));
  12905. }
  12906. }
  12907. };
  12908. var container = caretPosition.container();
  12909. var offset = caretPosition.offset();
  12910. if (isText$4(container)) {
  12911. addCharacterOffset(container, offset);
  12912. return clientRects;
  12913. }
  12914. if (isElement$3(container)) {
  12915. if (caretPosition.isAtEnd()) {
  12916. var node = resolveIndex$1(container, offset);
  12917. if (isText$4(node)) {
  12918. addCharacterOffset(node, node.data.length);
  12919. }
  12920. if (isValidElementCaretCandidate(node) && !isBr$2(node)) {
  12921. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(node), false));
  12922. }
  12923. } else {
  12924. var node = resolveIndex$1(container, offset);
  12925. if (isText$4(node)) {
  12926. addCharacterOffset(node, 0);
  12927. }
  12928. if (isValidElementCaretCandidate(node) && caretPosition.isAtEnd()) {
  12929. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(node), false));
  12930. return clientRects;
  12931. }
  12932. var beforeNode = resolveIndex$1(caretPosition.container(), caretPosition.offset() - 1);
  12933. if (isValidElementCaretCandidate(beforeNode) && !isBr$2(beforeNode)) {
  12934. if (isBlock$1(beforeNode) || isBlock$1(node) || !isValidElementCaretCandidate(node)) {
  12935. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(beforeNode), false));
  12936. }
  12937. }
  12938. if (isValidElementCaretCandidate(node)) {
  12939. addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(node), true));
  12940. }
  12941. }
  12942. }
  12943. return clientRects;
  12944. };
  12945. var CaretPosition = function (container, offset, clientRects) {
  12946. var isAtStart = function () {
  12947. if (isText$4(container)) {
  12948. return offset === 0;
  12949. }
  12950. return offset === 0;
  12951. };
  12952. var isAtEnd = function () {
  12953. if (isText$4(container)) {
  12954. return offset >= container.data.length;
  12955. }
  12956. return offset >= container.childNodes.length;
  12957. };
  12958. var toRange = function () {
  12959. var range = createRange$1(container.ownerDocument);
  12960. range.setStart(container, offset);
  12961. range.setEnd(container, offset);
  12962. return range;
  12963. };
  12964. var getClientRects = function () {
  12965. if (!clientRects) {
  12966. clientRects = getCaretPositionClientRects(CaretPosition(container, offset));
  12967. }
  12968. return clientRects;
  12969. };
  12970. var isVisible = function () {
  12971. return getClientRects().length > 0;
  12972. };
  12973. var isEqual = function (caretPosition) {
  12974. return caretPosition && container === caretPosition.container() && offset === caretPosition.offset();
  12975. };
  12976. var getNode = function (before) {
  12977. return resolveIndex$1(container, before ? offset - 1 : offset);
  12978. };
  12979. return {
  12980. container: constant(container),
  12981. offset: constant(offset),
  12982. toRange: toRange,
  12983. getClientRects: getClientRects,
  12984. isVisible: isVisible,
  12985. isAtStart: isAtStart,
  12986. isAtEnd: isAtEnd,
  12987. isEqual: isEqual,
  12988. getNode: getNode
  12989. };
  12990. };
  12991. CaretPosition.fromRangeStart = function (range) {
  12992. return CaretPosition(range.startContainer, range.startOffset);
  12993. };
  12994. CaretPosition.fromRangeEnd = function (range) {
  12995. return CaretPosition(range.endContainer, range.endOffset);
  12996. };
  12997. CaretPosition.after = function (node) {
  12998. return CaretPosition(node.parentNode, nodeIndex$1(node) + 1);
  12999. };
  13000. CaretPosition.before = function (node) {
  13001. return CaretPosition(node.parentNode, nodeIndex$1(node));
  13002. };
  13003. CaretPosition.isAbove = function (pos1, pos2) {
  13004. return lift2(head(pos2.getClientRects()), last$2(pos1.getClientRects()), isAbove$1).getOr(false);
  13005. };
  13006. CaretPosition.isBelow = function (pos1, pos2) {
  13007. return lift2(last$2(pos2.getClientRects()), head(pos1.getClientRects()), isBelow$1).getOr(false);
  13008. };
  13009. CaretPosition.isAtStart = function (pos) {
  13010. return pos ? pos.isAtStart() : false;
  13011. };
  13012. CaretPosition.isAtEnd = function (pos) {
  13013. return pos ? pos.isAtEnd() : false;
  13014. };
  13015. CaretPosition.isTextPosition = function (pos) {
  13016. return pos ? isText$7(pos.container()) : false;
  13017. };
  13018. CaretPosition.isElementPosition = function (pos) {
  13019. return CaretPosition.isTextPosition(pos) === false;
  13020. };
  13021. var trimEmptyTextNode$1 = function (dom, node) {
  13022. if (isText$7(node) && node.data.length === 0) {
  13023. dom.remove(node);
  13024. }
  13025. };
  13026. var insertNode = function (dom, rng, node) {
  13027. rng.insertNode(node);
  13028. trimEmptyTextNode$1(dom, node.previousSibling);
  13029. trimEmptyTextNode$1(dom, node.nextSibling);
  13030. };
  13031. var insertFragment = function (dom, rng, frag) {
  13032. var firstChild = Optional.from(frag.firstChild);
  13033. var lastChild = Optional.from(frag.lastChild);
  13034. rng.insertNode(frag);
  13035. firstChild.each(function (child) {
  13036. return trimEmptyTextNode$1(dom, child.previousSibling);
  13037. });
  13038. lastChild.each(function (child) {
  13039. return trimEmptyTextNode$1(dom, child.nextSibling);
  13040. });
  13041. };
  13042. var rangeInsertNode = function (dom, rng, node) {
  13043. if (isDocumentFragment(node)) {
  13044. insertFragment(dom, rng, node);
  13045. } else {
  13046. insertNode(dom, rng, node);
  13047. }
  13048. };
  13049. var isText$3 = isText$7;
  13050. var isBogus = isBogus$2;
  13051. var nodeIndex = DOMUtils.nodeIndex;
  13052. var normalizedParent = function (node) {
  13053. var parentNode = node.parentNode;
  13054. if (isBogus(parentNode)) {
  13055. return normalizedParent(parentNode);
  13056. }
  13057. return parentNode;
  13058. };
  13059. var getChildNodes = function (node) {
  13060. if (!node) {
  13061. return [];
  13062. }
  13063. return reduce(node.childNodes, function (result, node) {
  13064. if (isBogus(node) && node.nodeName !== 'BR') {
  13065. result = result.concat(getChildNodes(node));
  13066. } else {
  13067. result.push(node);
  13068. }
  13069. return result;
  13070. }, []);
  13071. };
  13072. var normalizedTextOffset = function (node, offset) {
  13073. while (node = node.previousSibling) {
  13074. if (!isText$3(node)) {
  13075. break;
  13076. }
  13077. offset += node.data.length;
  13078. }
  13079. return offset;
  13080. };
  13081. var equal = function (a) {
  13082. return function (b) {
  13083. return a === b;
  13084. };
  13085. };
  13086. var normalizedNodeIndex = function (node) {
  13087. var nodes, index;
  13088. nodes = getChildNodes(normalizedParent(node));
  13089. index = findIndex$1(nodes, equal(node), node);
  13090. nodes = nodes.slice(0, index + 1);
  13091. var numTextFragments = reduce(nodes, function (result, node, i) {
  13092. if (isText$3(node) && isText$3(nodes[i - 1])) {
  13093. result++;
  13094. }
  13095. return result;
  13096. }, 0);
  13097. nodes = filter$2(nodes, matchNodeNames([node.nodeName]));
  13098. index = findIndex$1(nodes, equal(node), node);
  13099. return index - numTextFragments;
  13100. };
  13101. var createPathItem = function (node) {
  13102. var name;
  13103. if (isText$3(node)) {
  13104. name = 'text()';
  13105. } else {
  13106. name = node.nodeName.toLowerCase();
  13107. }
  13108. return name + '[' + normalizedNodeIndex(node) + ']';
  13109. };
  13110. var parentsUntil$1 = function (root, node, predicate) {
  13111. var parents = [];
  13112. for (node = node.parentNode; node !== root; node = node.parentNode) {
  13113. if (predicate && predicate(node)) {
  13114. break;
  13115. }
  13116. parents.push(node);
  13117. }
  13118. return parents;
  13119. };
  13120. var create$6 = function (root, caretPosition) {
  13121. var container, offset, path = [], outputOffset, childNodes, parents;
  13122. container = caretPosition.container();
  13123. offset = caretPosition.offset();
  13124. if (isText$3(container)) {
  13125. outputOffset = normalizedTextOffset(container, offset);
  13126. } else {
  13127. childNodes = container.childNodes;
  13128. if (offset >= childNodes.length) {
  13129. outputOffset = 'after';
  13130. offset = childNodes.length - 1;
  13131. } else {
  13132. outputOffset = 'before';
  13133. }
  13134. container = childNodes[offset];
  13135. }
  13136. path.push(createPathItem(container));
  13137. parents = parentsUntil$1(root, container);
  13138. parents = filter$2(parents, not(isBogus$2));
  13139. path = path.concat(map$1(parents, function (node) {
  13140. return createPathItem(node);
  13141. }));
  13142. return path.reverse().join('/') + ',' + outputOffset;
  13143. };
  13144. var resolvePathItem = function (node, name, index) {
  13145. var nodes = getChildNodes(node);
  13146. nodes = filter$2(nodes, function (node, index) {
  13147. return !isText$3(node) || !isText$3(nodes[index - 1]);
  13148. });
  13149. nodes = filter$2(nodes, matchNodeNames([name]));
  13150. return nodes[index];
  13151. };
  13152. var findTextPosition = function (container, offset) {
  13153. var node = container, targetOffset = 0, dataLen;
  13154. while (isText$3(node)) {
  13155. dataLen = node.data.length;
  13156. if (offset >= targetOffset && offset <= targetOffset + dataLen) {
  13157. container = node;
  13158. offset = offset - targetOffset;
  13159. break;
  13160. }
  13161. if (!isText$3(node.nextSibling)) {
  13162. container = node;
  13163. offset = dataLen;
  13164. break;
  13165. }
  13166. targetOffset += dataLen;
  13167. node = node.nextSibling;
  13168. }
  13169. if (isText$3(container) && offset > container.data.length) {
  13170. offset = container.data.length;
  13171. }
  13172. return CaretPosition(container, offset);
  13173. };
  13174. var resolve$2 = function (root, path) {
  13175. var offset;
  13176. if (!path) {
  13177. return null;
  13178. }
  13179. var parts = path.split(',');
  13180. var paths = parts[0].split('/');
  13181. offset = parts.length > 1 ? parts[1] : 'before';
  13182. var container = reduce(paths, function (result, value) {
  13183. var match = /([\w\-\(\)]+)\[([0-9]+)\]/.exec(value);
  13184. if (!match) {
  13185. return null;
  13186. }
  13187. if (match[1] === 'text()') {
  13188. match[1] = '#text';
  13189. }
  13190. return resolvePathItem(result, match[1], parseInt(match[2], 10));
  13191. }, root);
  13192. if (!container) {
  13193. return null;
  13194. }
  13195. if (!isText$3(container)) {
  13196. if (offset === 'after') {
  13197. offset = nodeIndex(container) + 1;
  13198. } else {
  13199. offset = nodeIndex(container);
  13200. }
  13201. return CaretPosition(container.parentNode, offset);
  13202. }
  13203. return findTextPosition(container, parseInt(offset, 10));
  13204. };
  13205. var isContentEditableFalse$9 = isContentEditableFalse$b;
  13206. var getNormalizedTextOffset = function (trim, container, offset) {
  13207. var node, trimmedOffset;
  13208. trimmedOffset = trim(container.data.slice(0, offset)).length;
  13209. for (node = container.previousSibling; node && isText$7(node); node = node.previousSibling) {
  13210. trimmedOffset += trim(node.data).length;
  13211. }
  13212. return trimmedOffset;
  13213. };
  13214. var getPoint = function (dom, trim, normalized, rng, start) {
  13215. var container = rng[start ? 'startContainer' : 'endContainer'];
  13216. var offset = rng[start ? 'startOffset' : 'endOffset'];
  13217. var point = [];
  13218. var childNodes, after = 0;
  13219. var root = dom.getRoot();
  13220. if (isText$7(container)) {
  13221. point.push(normalized ? getNormalizedTextOffset(trim, container, offset) : offset);
  13222. } else {
  13223. childNodes = container.childNodes;
  13224. if (offset >= childNodes.length && childNodes.length) {
  13225. after = 1;
  13226. offset = Math.max(0, childNodes.length - 1);
  13227. }
  13228. point.push(dom.nodeIndex(childNodes[offset], normalized) + after);
  13229. }
  13230. for (; container && container !== root; container = container.parentNode) {
  13231. point.push(dom.nodeIndex(container, normalized));
  13232. }
  13233. return point;
  13234. };
  13235. var getLocation = function (trim, selection, normalized, rng) {
  13236. var dom = selection.dom, bookmark = {};
  13237. bookmark.start = getPoint(dom, trim, normalized, rng, true);
  13238. if (!selection.isCollapsed()) {
  13239. bookmark.end = getPoint(dom, trim, normalized, rng, false);
  13240. }
  13241. if (isRangeInCaretContainerBlock(rng)) {
  13242. bookmark.isFakeCaret = true;
  13243. }
  13244. return bookmark;
  13245. };
  13246. var findIndex = function (dom, name, element) {
  13247. var count = 0;
  13248. Tools.each(dom.select(name), function (node) {
  13249. if (node.getAttribute('data-mce-bogus') === 'all') {
  13250. return;
  13251. }
  13252. if (node === element) {
  13253. return false;
  13254. }
  13255. count++;
  13256. });
  13257. return count;
  13258. };
  13259. var moveEndPoint$1 = function (rng, start) {
  13260. var container, offset, childNodes;
  13261. var prefix = start ? 'start' : 'end';
  13262. container = rng[prefix + 'Container'];
  13263. offset = rng[prefix + 'Offset'];
  13264. if (isElement$5(container) && container.nodeName === 'TR') {
  13265. childNodes = container.childNodes;
  13266. container = childNodes[Math.min(start ? offset : offset - 1, childNodes.length - 1)];
  13267. if (container) {
  13268. offset = start ? 0 : container.childNodes.length;
  13269. rng['set' + (start ? 'Start' : 'End')](container, offset);
  13270. }
  13271. }
  13272. };
  13273. var normalizeTableCellSelection = function (rng) {
  13274. moveEndPoint$1(rng, true);
  13275. moveEndPoint$1(rng, false);
  13276. return rng;
  13277. };
  13278. var findSibling = function (node, offset) {
  13279. var sibling;
  13280. if (isElement$5(node)) {
  13281. node = getNode$1(node, offset);
  13282. if (isContentEditableFalse$9(node)) {
  13283. return node;
  13284. }
  13285. }
  13286. if (isCaretContainer$2(node)) {
  13287. if (isText$7(node) && isCaretContainerBlock$1(node)) {
  13288. node = node.parentNode;
  13289. }
  13290. sibling = node.previousSibling;
  13291. if (isContentEditableFalse$9(sibling)) {
  13292. return sibling;
  13293. }
  13294. sibling = node.nextSibling;
  13295. if (isContentEditableFalse$9(sibling)) {
  13296. return sibling;
  13297. }
  13298. }
  13299. };
  13300. var findAdjacentContentEditableFalseElm = function (rng) {
  13301. return findSibling(rng.startContainer, rng.startOffset) || findSibling(rng.endContainer, rng.endOffset);
  13302. };
  13303. var getOffsetBookmark = function (trim, normalized, selection) {
  13304. var element = selection.getNode();
  13305. var name = element ? element.nodeName : null;
  13306. var rng = selection.getRng();
  13307. if (isContentEditableFalse$9(element) || name === 'IMG') {
  13308. return {
  13309. name: name,
  13310. index: findIndex(selection.dom, name, element)
  13311. };
  13312. }
  13313. var sibling = findAdjacentContentEditableFalseElm(rng);
  13314. if (sibling) {
  13315. name = sibling.tagName;
  13316. return {
  13317. name: name,
  13318. index: findIndex(selection.dom, name, sibling)
  13319. };
  13320. }
  13321. return getLocation(trim, selection, normalized, rng);
  13322. };
  13323. var getCaretBookmark = function (selection) {
  13324. var rng = selection.getRng();
  13325. return {
  13326. start: create$6(selection.dom.getRoot(), CaretPosition.fromRangeStart(rng)),
  13327. end: create$6(selection.dom.getRoot(), CaretPosition.fromRangeEnd(rng))
  13328. };
  13329. };
  13330. var getRangeBookmark = function (selection) {
  13331. return { rng: selection.getRng() };
  13332. };
  13333. var createBookmarkSpan = function (dom, id, filled) {
  13334. var args = {
  13335. 'data-mce-type': 'bookmark',
  13336. id: id,
  13337. 'style': 'overflow:hidden;line-height:0px'
  13338. };
  13339. return filled ? dom.create('span', args, '&#xFEFF;') : dom.create('span', args);
  13340. };
  13341. var getPersistentBookmark = function (selection, filled) {
  13342. var dom = selection.dom;
  13343. var rng = selection.getRng();
  13344. var id = dom.uniqueId();
  13345. var collapsed = selection.isCollapsed();
  13346. var element = selection.getNode();
  13347. var name = element.nodeName;
  13348. if (name === 'IMG') {
  13349. return {
  13350. name: name,
  13351. index: findIndex(dom, name, element)
  13352. };
  13353. }
  13354. var rng2 = normalizeTableCellSelection(rng.cloneRange());
  13355. if (!collapsed) {
  13356. rng2.collapse(false);
  13357. var endBookmarkNode = createBookmarkSpan(dom, id + '_end', filled);
  13358. rangeInsertNode(dom, rng2, endBookmarkNode);
  13359. }
  13360. rng = normalizeTableCellSelection(rng);
  13361. rng.collapse(true);
  13362. var startBookmarkNode = createBookmarkSpan(dom, id + '_start', filled);
  13363. rangeInsertNode(dom, rng, startBookmarkNode);
  13364. selection.moveToBookmark({
  13365. id: id,
  13366. keep: true
  13367. });
  13368. return { id: id };
  13369. };
  13370. var getBookmark$2 = function (selection, type, normalized) {
  13371. if (type === 2) {
  13372. return getOffsetBookmark(trim$2, normalized, selection);
  13373. } else if (type === 3) {
  13374. return getCaretBookmark(selection);
  13375. } else if (type) {
  13376. return getRangeBookmark(selection);
  13377. } else {
  13378. return getPersistentBookmark(selection, false);
  13379. }
  13380. };
  13381. var getUndoBookmark = curry(getOffsetBookmark, identity, true);
  13382. var DOM$9 = DOMUtils.DOM;
  13383. var defaultPreviewStyles = 'font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow';
  13384. var getBodySetting = function (editor, name, defaultValue) {
  13385. var value = editor.getParam(name, defaultValue);
  13386. if (value.indexOf('=') !== -1) {
  13387. var bodyObj = editor.getParam(name, '', 'hash');
  13388. return get$9(bodyObj, editor.id).getOr(defaultValue);
  13389. } else {
  13390. return value;
  13391. }
  13392. };
  13393. var getIframeAttrs = function (editor) {
  13394. return editor.getParam('iframe_attrs', {});
  13395. };
  13396. var getDocType = function (editor) {
  13397. return editor.getParam('doctype', '<!DOCTYPE html>');
  13398. };
  13399. var getDocumentBaseUrl = function (editor) {
  13400. return editor.getParam('document_base_url', '');
  13401. };
  13402. var getBodyId = function (editor) {
  13403. return getBodySetting(editor, 'body_id', 'tinymce');
  13404. };
  13405. var getBodyClass = function (editor) {
  13406. return getBodySetting(editor, 'body_class', '');
  13407. };
  13408. var getContentSecurityPolicy = function (editor) {
  13409. return editor.getParam('content_security_policy', '');
  13410. };
  13411. var shouldPutBrInPre$1 = function (editor) {
  13412. return editor.getParam('br_in_pre', true);
  13413. };
  13414. var getForcedRootBlock = function (editor) {
  13415. if (editor.getParam('force_p_newlines', false)) {
  13416. return 'p';
  13417. }
  13418. var block = editor.getParam('forced_root_block', 'p');
  13419. if (block === false) {
  13420. return '';
  13421. } else if (block === true) {
  13422. return 'p';
  13423. } else {
  13424. return block;
  13425. }
  13426. };
  13427. var getForcedRootBlockAttrs = function (editor) {
  13428. return editor.getParam('forced_root_block_attrs', {});
  13429. };
  13430. var getBrNewLineSelector = function (editor) {
  13431. return editor.getParam('br_newline_selector', '.mce-toc h2,figcaption,caption');
  13432. };
  13433. var getNoNewLineSelector = function (editor) {
  13434. return editor.getParam('no_newline_selector', '');
  13435. };
  13436. var shouldKeepStyles = function (editor) {
  13437. return editor.getParam('keep_styles', true);
  13438. };
  13439. var shouldEndContainerOnEmptyBlock = function (editor) {
  13440. return editor.getParam('end_container_on_empty_block', false);
  13441. };
  13442. var getFontStyleValues = function (editor) {
  13443. return Tools.explode(editor.getParam('font_size_style_values', 'xx-small,x-small,small,medium,large,x-large,xx-large'));
  13444. };
  13445. var getFontSizeClasses = function (editor) {
  13446. return Tools.explode(editor.getParam('font_size_classes', ''));
  13447. };
  13448. var getImagesDataImgFilter = function (editor) {
  13449. return editor.getParam('images_dataimg_filter', always, 'function');
  13450. };
  13451. var isAutomaticUploadsEnabled = function (editor) {
  13452. return editor.getParam('automatic_uploads', true, 'boolean');
  13453. };
  13454. var shouldReuseFileName = function (editor) {
  13455. return editor.getParam('images_reuse_filename', false, 'boolean');
  13456. };
  13457. var shouldReplaceBlobUris = function (editor) {
  13458. return editor.getParam('images_replace_blob_uris', true, 'boolean');
  13459. };
  13460. var getIconPackName = function (editor) {
  13461. return editor.getParam('icons', '', 'string');
  13462. };
  13463. var getIconsUrl = function (editor) {
  13464. return editor.getParam('icons_url', '', 'string');
  13465. };
  13466. var getImageUploadUrl = function (editor) {
  13467. return editor.getParam('images_upload_url', '', 'string');
  13468. };
  13469. var getImageUploadBasePath = function (editor) {
  13470. return editor.getParam('images_upload_base_path', '', 'string');
  13471. };
  13472. var getImagesUploadCredentials = function (editor) {
  13473. return editor.getParam('images_upload_credentials', false, 'boolean');
  13474. };
  13475. var getImagesUploadHandler = function (editor) {
  13476. return editor.getParam('images_upload_handler', null, 'function');
  13477. };
  13478. var shouldUseContentCssCors = function (editor) {
  13479. return editor.getParam('content_css_cors', false, 'boolean');
  13480. };
  13481. var getReferrerPolicy = function (editor) {
  13482. return editor.getParam('referrer_policy', '', 'string');
  13483. };
  13484. var getLanguageCode = function (editor) {
  13485. return editor.getParam('language', 'en', 'string');
  13486. };
  13487. var getLanguageUrl = function (editor) {
  13488. return editor.getParam('language_url', '', 'string');
  13489. };
  13490. var shouldIndentUseMargin = function (editor) {
  13491. return editor.getParam('indent_use_margin', false);
  13492. };
  13493. var getIndentation = function (editor) {
  13494. return editor.getParam('indentation', '40px', 'string');
  13495. };
  13496. var getContentCss = function (editor) {
  13497. var contentCss = editor.getParam('content_css');
  13498. if (isString$1(contentCss)) {
  13499. return map$3(contentCss.split(','), trim$4);
  13500. } else if (isArray$1(contentCss)) {
  13501. return contentCss;
  13502. } else if (contentCss === false || editor.inline) {
  13503. return [];
  13504. } else {
  13505. return ['default'];
  13506. }
  13507. };
  13508. var getFontCss = function (editor) {
  13509. var fontCss = editor.getParam('font_css', []);
  13510. return isArray$1(fontCss) ? fontCss : map$3(fontCss.split(','), trim$4);
  13511. };
  13512. var getDirectionality = function (editor) {
  13513. return editor.getParam('directionality', I18n.isRtl() ? 'rtl' : undefined);
  13514. };
  13515. var getInlineBoundarySelector = function (editor) {
  13516. return editor.getParam('inline_boundaries_selector', 'a[href],code,.mce-annotation', 'string');
  13517. };
  13518. var getObjectResizing = function (editor) {
  13519. var selector = editor.getParam('object_resizing');
  13520. if (selector === false || Env.iOS) {
  13521. return false;
  13522. } else {
  13523. return isString$1(selector) ? selector : 'table,img,figure.image,div,video,iframe';
  13524. }
  13525. };
  13526. var getResizeImgProportional = function (editor) {
  13527. return editor.getParam('resize_img_proportional', true, 'boolean');
  13528. };
  13529. var getPlaceholder = function (editor) {
  13530. return editor.getParam('placeholder', DOM$9.getAttrib(editor.getElement(), 'placeholder'), 'string');
  13531. };
  13532. var getEventRoot = function (editor) {
  13533. return editor.getParam('event_root');
  13534. };
  13535. var getServiceMessage = function (editor) {
  13536. return editor.getParam('service_message');
  13537. };
  13538. var getTheme = function (editor) {
  13539. return editor.getParam('theme');
  13540. };
  13541. var shouldValidate = function (editor) {
  13542. return editor.getParam('validate');
  13543. };
  13544. var isInlineBoundariesEnabled = function (editor) {
  13545. return editor.getParam('inline_boundaries') !== false;
  13546. };
  13547. var getFormats = function (editor) {
  13548. return editor.getParam('formats');
  13549. };
  13550. var getPreviewStyles = function (editor) {
  13551. var style = editor.getParam('preview_styles', defaultPreviewStyles);
  13552. if (isString$1(style)) {
  13553. return style;
  13554. } else {
  13555. return '';
  13556. }
  13557. };
  13558. var canFormatEmptyLines = function (editor) {
  13559. return editor.getParam('format_empty_lines', false, 'boolean');
  13560. };
  13561. var getCustomUiSelector = function (editor) {
  13562. return editor.getParam('custom_ui_selector', '', 'string');
  13563. };
  13564. var getThemeUrl = function (editor) {
  13565. return editor.getParam('theme_url');
  13566. };
  13567. var isInline = function (editor) {
  13568. return editor.getParam('inline');
  13569. };
  13570. var hasHiddenInput = function (editor) {
  13571. return editor.getParam('hidden_input');
  13572. };
  13573. var shouldPatchSubmit = function (editor) {
  13574. return editor.getParam('submit_patch');
  13575. };
  13576. var isEncodingXml = function (editor) {
  13577. return editor.getParam('encoding') === 'xml';
  13578. };
  13579. var shouldAddFormSubmitTrigger = function (editor) {
  13580. return editor.getParam('add_form_submit_trigger');
  13581. };
  13582. var shouldAddUnloadTrigger = function (editor) {
  13583. return editor.getParam('add_unload_trigger');
  13584. };
  13585. var hasForcedRootBlock = function (editor) {
  13586. return getForcedRootBlock(editor) !== '';
  13587. };
  13588. var getCustomUndoRedoLevels = function (editor) {
  13589. return editor.getParam('custom_undo_redo_levels', 0, 'number');
  13590. };
  13591. var shouldDisableNodeChange = function (editor) {
  13592. return editor.getParam('disable_nodechange');
  13593. };
  13594. var isReadOnly$1 = function (editor) {
  13595. return editor.getParam('readonly');
  13596. };
  13597. var hasContentCssCors = function (editor) {
  13598. return editor.getParam('content_css_cors');
  13599. };
  13600. var getPlugins = function (editor) {
  13601. return editor.getParam('plugins', '', 'string');
  13602. };
  13603. var getExternalPlugins$1 = function (editor) {
  13604. return editor.getParam('external_plugins');
  13605. };
  13606. var shouldBlockUnsupportedDrop = function (editor) {
  13607. return editor.getParam('block_unsupported_drop', true, 'boolean');
  13608. };
  13609. var isVisualAidsEnabled = function (editor) {
  13610. return editor.getParam('visual', true, 'boolean');
  13611. };
  13612. var getVisualAidsTableClass = function (editor) {
  13613. return editor.getParam('visual_table_class', 'mce-item-table', 'string');
  13614. };
  13615. var getVisualAidsAnchorClass = function (editor) {
  13616. return editor.getParam('visual_anchor_class', 'mce-item-anchor', 'string');
  13617. };
  13618. var getIframeAriaText = function (editor) {
  13619. return editor.getParam('iframe_aria_text', 'Rich Text Area. Press ALT-0 for help.', 'string');
  13620. };
  13621. var isElement$2 = isElement$5;
  13622. var isText$2 = isText$7;
  13623. var removeNode$1 = function (node) {
  13624. var parentNode = node.parentNode;
  13625. if (parentNode) {
  13626. parentNode.removeChild(node);
  13627. }
  13628. };
  13629. var trimCount = function (text) {
  13630. var trimmedText = trim$2(text);
  13631. return {
  13632. count: text.length - trimmedText.length,
  13633. text: trimmedText
  13634. };
  13635. };
  13636. var deleteZwspChars = function (caretContainer) {
  13637. var idx;
  13638. while ((idx = caretContainer.data.lastIndexOf(ZWSP$1)) !== -1) {
  13639. caretContainer.deleteData(idx, 1);
  13640. }
  13641. };
  13642. var removeUnchanged = function (caretContainer, pos) {
  13643. remove$2(caretContainer);
  13644. return pos;
  13645. };
  13646. var removeTextAndReposition = function (caretContainer, pos) {
  13647. var before = trimCount(caretContainer.data.substr(0, pos.offset()));
  13648. var after = trimCount(caretContainer.data.substr(pos.offset()));
  13649. var text = before.text + after.text;
  13650. if (text.length > 0) {
  13651. deleteZwspChars(caretContainer);
  13652. return CaretPosition(caretContainer, pos.offset() - before.count);
  13653. } else {
  13654. return pos;
  13655. }
  13656. };
  13657. var removeElementAndReposition = function (caretContainer, pos) {
  13658. var parentNode = pos.container();
  13659. var newPosition = indexOf$2(from(parentNode.childNodes), caretContainer).map(function (index) {
  13660. return index < pos.offset() ? CaretPosition(parentNode, pos.offset() - 1) : pos;
  13661. }).getOr(pos);
  13662. remove$2(caretContainer);
  13663. return newPosition;
  13664. };
  13665. var removeTextCaretContainer = function (caretContainer, pos) {
  13666. return isText$2(caretContainer) && pos.container() === caretContainer ? removeTextAndReposition(caretContainer, pos) : removeUnchanged(caretContainer, pos);
  13667. };
  13668. var removeElementCaretContainer = function (caretContainer, pos) {
  13669. return pos.container() === caretContainer.parentNode ? removeElementAndReposition(caretContainer, pos) : removeUnchanged(caretContainer, pos);
  13670. };
  13671. var removeAndReposition = function (container, pos) {
  13672. return CaretPosition.isTextPosition(pos) ? removeTextCaretContainer(container, pos) : removeElementCaretContainer(container, pos);
  13673. };
  13674. var remove$2 = function (caretContainerNode) {
  13675. if (isElement$2(caretContainerNode) && isCaretContainer$2(caretContainerNode)) {
  13676. if (hasContent(caretContainerNode)) {
  13677. caretContainerNode.removeAttribute('data-mce-caret');
  13678. } else {
  13679. removeNode$1(caretContainerNode);
  13680. }
  13681. }
  13682. if (isText$2(caretContainerNode)) {
  13683. deleteZwspChars(caretContainerNode);
  13684. if (caretContainerNode.data.length === 0) {
  13685. removeNode$1(caretContainerNode);
  13686. }
  13687. }
  13688. };
  13689. var browser$2 = detect().browser;
  13690. var isContentEditableFalse$8 = isContentEditableFalse$b;
  13691. var isMedia$1 = isMedia$2;
  13692. var isTableCell$3 = isTableCell$5;
  13693. var inlineFakeCaretSelector = '*[contentEditable=false],video,audio,embed,object';
  13694. var getAbsoluteClientRect = function (root, element, before) {
  13695. var clientRect = collapse(element.getBoundingClientRect(), before);
  13696. var scrollX;
  13697. var scrollY;
  13698. if (root.tagName === 'BODY') {
  13699. var docElm = root.ownerDocument.documentElement;
  13700. scrollX = root.scrollLeft || docElm.scrollLeft;
  13701. scrollY = root.scrollTop || docElm.scrollTop;
  13702. } else {
  13703. var rootRect = root.getBoundingClientRect();
  13704. scrollX = root.scrollLeft - rootRect.left;
  13705. scrollY = root.scrollTop - rootRect.top;
  13706. }
  13707. clientRect.left += scrollX;
  13708. clientRect.right += scrollX;
  13709. clientRect.top += scrollY;
  13710. clientRect.bottom += scrollY;
  13711. clientRect.width = 1;
  13712. var margin = element.offsetWidth - element.clientWidth;
  13713. if (margin > 0) {
  13714. if (before) {
  13715. margin *= -1;
  13716. }
  13717. clientRect.left += margin;
  13718. clientRect.right += margin;
  13719. }
  13720. return clientRect;
  13721. };
  13722. var trimInlineCaretContainers = function (root) {
  13723. var fakeCaretTargetNodes = descendants(SugarElement.fromDom(root), inlineFakeCaretSelector);
  13724. for (var i = 0; i < fakeCaretTargetNodes.length; i++) {
  13725. var node = fakeCaretTargetNodes[i].dom;
  13726. var sibling = node.previousSibling;
  13727. if (endsWithCaretContainer$1(sibling)) {
  13728. var data = sibling.data;
  13729. if (data.length === 1) {
  13730. sibling.parentNode.removeChild(sibling);
  13731. } else {
  13732. sibling.deleteData(data.length - 1, 1);
  13733. }
  13734. }
  13735. sibling = node.nextSibling;
  13736. if (startsWithCaretContainer$1(sibling)) {
  13737. var data = sibling.data;
  13738. if (data.length === 1) {
  13739. sibling.parentNode.removeChild(sibling);
  13740. } else {
  13741. sibling.deleteData(0, 1);
  13742. }
  13743. }
  13744. }
  13745. };
  13746. var FakeCaret = function (editor, root, isBlock, hasFocus) {
  13747. var lastVisualCaret = value();
  13748. var cursorInterval;
  13749. var caretContainerNode;
  13750. var rootBlock = getForcedRootBlock(editor);
  13751. var caretBlock = rootBlock.length > 0 ? rootBlock : 'p';
  13752. var show = function (before, element) {
  13753. var rng;
  13754. hide();
  13755. if (isTableCell$3(element)) {
  13756. return null;
  13757. }
  13758. if (isBlock(element)) {
  13759. caretContainerNode = insertBlock$1(caretBlock, element, before);
  13760. var clientRect = getAbsoluteClientRect(root, element, before);
  13761. DomQuery(caretContainerNode).css('top', clientRect.top);
  13762. var caret = DomQuery('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(__assign({}, clientRect)).appendTo(root)[0];
  13763. lastVisualCaret.set({
  13764. caret: caret,
  13765. element: element,
  13766. before: before
  13767. });
  13768. if (before) {
  13769. DomQuery(caret).addClass('mce-visual-caret-before');
  13770. }
  13771. startBlink();
  13772. rng = element.ownerDocument.createRange();
  13773. rng.setStart(caretContainerNode, 0);
  13774. rng.setEnd(caretContainerNode, 0);
  13775. } else {
  13776. caretContainerNode = insertInline$1(element, before);
  13777. rng = element.ownerDocument.createRange();
  13778. if (isInlineFakeCaretTarget(caretContainerNode.nextSibling)) {
  13779. rng.setStart(caretContainerNode, 0);
  13780. rng.setEnd(caretContainerNode, 0);
  13781. } else {
  13782. rng.setStart(caretContainerNode, 1);
  13783. rng.setEnd(caretContainerNode, 1);
  13784. }
  13785. return rng;
  13786. }
  13787. return rng;
  13788. };
  13789. var hide = function () {
  13790. trimInlineCaretContainers(root);
  13791. if (caretContainerNode) {
  13792. remove$2(caretContainerNode);
  13793. caretContainerNode = null;
  13794. }
  13795. lastVisualCaret.on(function (caretState) {
  13796. DomQuery(caretState.caret).remove();
  13797. lastVisualCaret.clear();
  13798. });
  13799. if (cursorInterval) {
  13800. Delay.clearInterval(cursorInterval);
  13801. cursorInterval = undefined;
  13802. }
  13803. };
  13804. var startBlink = function () {
  13805. cursorInterval = Delay.setInterval(function () {
  13806. if (hasFocus()) {
  13807. DomQuery('div.mce-visual-caret', root).toggleClass('mce-visual-caret-hidden');
  13808. } else {
  13809. DomQuery('div.mce-visual-caret', root).addClass('mce-visual-caret-hidden');
  13810. }
  13811. }, 500);
  13812. };
  13813. var reposition = function () {
  13814. lastVisualCaret.on(function (caretState) {
  13815. var clientRect = getAbsoluteClientRect(root, caretState.element, caretState.before);
  13816. DomQuery(caretState.caret).css(__assign({}, clientRect));
  13817. });
  13818. };
  13819. var destroy = function () {
  13820. return Delay.clearInterval(cursorInterval);
  13821. };
  13822. var getCss = function () {
  13823. return '.mce-visual-caret {' + 'position: absolute;' + 'background-color: black;' + 'background-color: currentcolor;' + '}' + '.mce-visual-caret-hidden {' + 'display: none;' + '}' + '*[data-mce-caret] {' + 'position: absolute;' + 'left: -1000px;' + 'right: auto;' + 'top: 0;' + 'margin: 0;' + 'padding: 0;' + '}';
  13824. };
  13825. return {
  13826. show: show,
  13827. hide: hide,
  13828. getCss: getCss,
  13829. reposition: reposition,
  13830. destroy: destroy
  13831. };
  13832. };
  13833. var isFakeCaretTableBrowser = function () {
  13834. return browser$2.isIE() || browser$2.isEdge() || browser$2.isFirefox();
  13835. };
  13836. var isInlineFakeCaretTarget = function (node) {
  13837. return isContentEditableFalse$8(node) || isMedia$1(node);
  13838. };
  13839. var isFakeCaretTarget = function (node) {
  13840. return isInlineFakeCaretTarget(node) || isTable$3(node) && isFakeCaretTableBrowser();
  13841. };
  13842. var isContentEditableFalse$7 = isContentEditableFalse$b;
  13843. var isMedia = isMedia$2;
  13844. var isBlockLike = matchStyleValues('display', 'block table table-cell table-caption list-item');
  13845. var isCaretContainer = isCaretContainer$2;
  13846. var isCaretContainerBlock = isCaretContainerBlock$1;
  13847. var isElement$1 = isElement$5;
  13848. var isCaretCandidate$1 = isCaretCandidate$3;
  13849. var isForwards = function (direction) {
  13850. return direction > 0;
  13851. };
  13852. var isBackwards = function (direction) {
  13853. return direction < 0;
  13854. };
  13855. var skipCaretContainers = function (walk, shallow) {
  13856. var node;
  13857. while (node = walk(shallow)) {
  13858. if (!isCaretContainerBlock(node)) {
  13859. return node;
  13860. }
  13861. }
  13862. return null;
  13863. };
  13864. var findNode$1 = function (node, direction, predicateFn, rootNode, shallow) {
  13865. var walker = new DomTreeWalker(node, rootNode);
  13866. var isCefOrCaretContainer = isContentEditableFalse$7(node) || isCaretContainerBlock(node);
  13867. if (isBackwards(direction)) {
  13868. if (isCefOrCaretContainer) {
  13869. node = skipCaretContainers(walker.prev.bind(walker), true);
  13870. if (predicateFn(node)) {
  13871. return node;
  13872. }
  13873. }
  13874. while (node = skipCaretContainers(walker.prev.bind(walker), shallow)) {
  13875. if (predicateFn(node)) {
  13876. return node;
  13877. }
  13878. }
  13879. }
  13880. if (isForwards(direction)) {
  13881. if (isCefOrCaretContainer) {
  13882. node = skipCaretContainers(walker.next.bind(walker), true);
  13883. if (predicateFn(node)) {
  13884. return node;
  13885. }
  13886. }
  13887. while (node = skipCaretContainers(walker.next.bind(walker), shallow)) {
  13888. if (predicateFn(node)) {
  13889. return node;
  13890. }
  13891. }
  13892. }
  13893. return null;
  13894. };
  13895. var getParentBlock$2 = function (node, rootNode) {
  13896. while (node && node !== rootNode) {
  13897. if (isBlockLike(node)) {
  13898. return node;
  13899. }
  13900. node = node.parentNode;
  13901. }
  13902. return null;
  13903. };
  13904. var isInSameBlock = function (caretPosition1, caretPosition2, rootNode) {
  13905. return getParentBlock$2(caretPosition1.container(), rootNode) === getParentBlock$2(caretPosition2.container(), rootNode);
  13906. };
  13907. var getChildNodeAtRelativeOffset = function (relativeOffset, caretPosition) {
  13908. if (!caretPosition) {
  13909. return null;
  13910. }
  13911. var container = caretPosition.container();
  13912. var offset = caretPosition.offset();
  13913. if (!isElement$1(container)) {
  13914. return null;
  13915. }
  13916. return container.childNodes[offset + relativeOffset];
  13917. };
  13918. var beforeAfter = function (before, node) {
  13919. var range = node.ownerDocument.createRange();
  13920. if (before) {
  13921. range.setStartBefore(node);
  13922. range.setEndBefore(node);
  13923. } else {
  13924. range.setStartAfter(node);
  13925. range.setEndAfter(node);
  13926. }
  13927. return range;
  13928. };
  13929. var isNodesInSameBlock = function (root, node1, node2) {
  13930. return getParentBlock$2(node1, root) === getParentBlock$2(node2, root);
  13931. };
  13932. var lean = function (left, root, node) {
  13933. var siblingName = left ? 'previousSibling' : 'nextSibling';
  13934. while (node && node !== root) {
  13935. var sibling = node[siblingName];
  13936. if (isCaretContainer(sibling)) {
  13937. sibling = sibling[siblingName];
  13938. }
  13939. if (isContentEditableFalse$7(sibling) || isMedia(sibling)) {
  13940. if (isNodesInSameBlock(root, sibling, node)) {
  13941. return sibling;
  13942. }
  13943. break;
  13944. }
  13945. if (isCaretCandidate$1(sibling)) {
  13946. break;
  13947. }
  13948. node = node.parentNode;
  13949. }
  13950. return null;
  13951. };
  13952. var before$2 = curry(beforeAfter, true);
  13953. var after$2 = curry(beforeAfter, false);
  13954. var normalizeRange = function (direction, root, range) {
  13955. var node;
  13956. var leanLeft = curry(lean, true, root);
  13957. var leanRight = curry(lean, false, root);
  13958. var container = range.startContainer;
  13959. var offset = range.startOffset;
  13960. if (isCaretContainerBlock$1(container)) {
  13961. if (!isElement$1(container)) {
  13962. container = container.parentNode;
  13963. }
  13964. var location_1 = container.getAttribute('data-mce-caret');
  13965. if (location_1 === 'before') {
  13966. node = container.nextSibling;
  13967. if (isFakeCaretTarget(node)) {
  13968. return before$2(node);
  13969. }
  13970. }
  13971. if (location_1 === 'after') {
  13972. node = container.previousSibling;
  13973. if (isFakeCaretTarget(node)) {
  13974. return after$2(node);
  13975. }
  13976. }
  13977. }
  13978. if (!range.collapsed) {
  13979. return range;
  13980. }
  13981. if (isText$7(container)) {
  13982. if (isCaretContainer(container)) {
  13983. if (direction === 1) {
  13984. node = leanRight(container);
  13985. if (node) {
  13986. return before$2(node);
  13987. }
  13988. node = leanLeft(container);
  13989. if (node) {
  13990. return after$2(node);
  13991. }
  13992. }
  13993. if (direction === -1) {
  13994. node = leanLeft(container);
  13995. if (node) {
  13996. return after$2(node);
  13997. }
  13998. node = leanRight(container);
  13999. if (node) {
  14000. return before$2(node);
  14001. }
  14002. }
  14003. return range;
  14004. }
  14005. if (endsWithCaretContainer$1(container) && offset >= container.data.length - 1) {
  14006. if (direction === 1) {
  14007. node = leanRight(container);
  14008. if (node) {
  14009. return before$2(node);
  14010. }
  14011. }
  14012. return range;
  14013. }
  14014. if (startsWithCaretContainer$1(container) && offset <= 1) {
  14015. if (direction === -1) {
  14016. node = leanLeft(container);
  14017. if (node) {
  14018. return after$2(node);
  14019. }
  14020. }
  14021. return range;
  14022. }
  14023. if (offset === container.data.length) {
  14024. node = leanRight(container);
  14025. if (node) {
  14026. return before$2(node);
  14027. }
  14028. return range;
  14029. }
  14030. if (offset === 0) {
  14031. node = leanLeft(container);
  14032. if (node) {
  14033. return after$2(node);
  14034. }
  14035. return range;
  14036. }
  14037. }
  14038. return range;
  14039. };
  14040. var getRelativeCefElm = function (forward, caretPosition) {
  14041. return Optional.from(getChildNodeAtRelativeOffset(forward ? 0 : -1, caretPosition)).filter(isContentEditableFalse$7);
  14042. };
  14043. var getNormalizedRangeEndPoint = function (direction, root, range) {
  14044. var normalizedRange = normalizeRange(direction, root, range);
  14045. if (direction === -1) {
  14046. return CaretPosition.fromRangeStart(normalizedRange);
  14047. }
  14048. return CaretPosition.fromRangeEnd(normalizedRange);
  14049. };
  14050. var getElementFromPosition = function (pos) {
  14051. return Optional.from(pos.getNode()).map(SugarElement.fromDom);
  14052. };
  14053. var getElementFromPrevPosition = function (pos) {
  14054. return Optional.from(pos.getNode(true)).map(SugarElement.fromDom);
  14055. };
  14056. var getVisualCaretPosition = function (walkFn, caretPosition) {
  14057. while (caretPosition = walkFn(caretPosition)) {
  14058. if (caretPosition.isVisible()) {
  14059. return caretPosition;
  14060. }
  14061. }
  14062. return caretPosition;
  14063. };
  14064. var isMoveInsideSameBlock = function (from, to) {
  14065. var inSameBlock = isInSameBlock(from, to);
  14066. if (!inSameBlock && isBr$5(from.getNode())) {
  14067. return true;
  14068. }
  14069. return inSameBlock;
  14070. };
  14071. var HDirection;
  14072. (function (HDirection) {
  14073. HDirection[HDirection['Backwards'] = -1] = 'Backwards';
  14074. HDirection[HDirection['Forwards'] = 1] = 'Forwards';
  14075. }(HDirection || (HDirection = {})));
  14076. var isContentEditableFalse$6 = isContentEditableFalse$b;
  14077. var isText$1 = isText$7;
  14078. var isElement = isElement$5;
  14079. var isBr$1 = isBr$5;
  14080. var isCaretCandidate = isCaretCandidate$3;
  14081. var isAtomic = isAtomic$1;
  14082. var isEditableCaretCandidate = isEditableCaretCandidate$1;
  14083. var getParents$3 = function (node, root) {
  14084. var parents = [];
  14085. while (node && node !== root) {
  14086. parents.push(node);
  14087. node = node.parentNode;
  14088. }
  14089. return parents;
  14090. };
  14091. var nodeAtIndex = function (container, offset) {
  14092. if (container.hasChildNodes() && offset < container.childNodes.length) {
  14093. return container.childNodes[offset];
  14094. }
  14095. return null;
  14096. };
  14097. var getCaretCandidatePosition = function (direction, node) {
  14098. if (isForwards(direction)) {
  14099. if (isCaretCandidate(node.previousSibling) && !isText$1(node.previousSibling)) {
  14100. return CaretPosition.before(node);
  14101. }
  14102. if (isText$1(node)) {
  14103. return CaretPosition(node, 0);
  14104. }
  14105. }
  14106. if (isBackwards(direction)) {
  14107. if (isCaretCandidate(node.nextSibling) && !isText$1(node.nextSibling)) {
  14108. return CaretPosition.after(node);
  14109. }
  14110. if (isText$1(node)) {
  14111. return CaretPosition(node, node.data.length);
  14112. }
  14113. }
  14114. if (isBackwards(direction)) {
  14115. if (isBr$1(node)) {
  14116. return CaretPosition.before(node);
  14117. }
  14118. return CaretPosition.after(node);
  14119. }
  14120. return CaretPosition.before(node);
  14121. };
  14122. var moveForwardFromBr = function (root, nextNode) {
  14123. var nextSibling = nextNode.nextSibling;
  14124. if (nextSibling && isCaretCandidate(nextSibling)) {
  14125. if (isText$1(nextSibling)) {
  14126. return CaretPosition(nextSibling, 0);
  14127. } else {
  14128. return CaretPosition.before(nextSibling);
  14129. }
  14130. } else {
  14131. return findCaretPosition$1(HDirection.Forwards, CaretPosition.after(nextNode), root);
  14132. }
  14133. };
  14134. var findCaretPosition$1 = function (direction, startPos, root) {
  14135. var node;
  14136. var nextNode;
  14137. var innerNode;
  14138. var caretPosition;
  14139. if (!isElement(root) || !startPos) {
  14140. return null;
  14141. }
  14142. if (startPos.isEqual(CaretPosition.after(root)) && root.lastChild) {
  14143. caretPosition = CaretPosition.after(root.lastChild);
  14144. if (isBackwards(direction) && isCaretCandidate(root.lastChild) && isElement(root.lastChild)) {
  14145. return isBr$1(root.lastChild) ? CaretPosition.before(root.lastChild) : caretPosition;
  14146. }
  14147. } else {
  14148. caretPosition = startPos;
  14149. }
  14150. var container = caretPosition.container();
  14151. var offset = caretPosition.offset();
  14152. if (isText$1(container)) {
  14153. if (isBackwards(direction) && offset > 0) {
  14154. return CaretPosition(container, --offset);
  14155. }
  14156. if (isForwards(direction) && offset < container.length) {
  14157. return CaretPosition(container, ++offset);
  14158. }
  14159. node = container;
  14160. } else {
  14161. if (isBackwards(direction) && offset > 0) {
  14162. nextNode = nodeAtIndex(container, offset - 1);
  14163. if (isCaretCandidate(nextNode)) {
  14164. if (!isAtomic(nextNode)) {
  14165. innerNode = findNode$1(nextNode, direction, isEditableCaretCandidate, nextNode);
  14166. if (innerNode) {
  14167. if (isText$1(innerNode)) {
  14168. return CaretPosition(innerNode, innerNode.data.length);
  14169. }
  14170. return CaretPosition.after(innerNode);
  14171. }
  14172. }
  14173. if (isText$1(nextNode)) {
  14174. return CaretPosition(nextNode, nextNode.data.length);
  14175. }
  14176. return CaretPosition.before(nextNode);
  14177. }
  14178. }
  14179. if (isForwards(direction) && offset < container.childNodes.length) {
  14180. nextNode = nodeAtIndex(container, offset);
  14181. if (isCaretCandidate(nextNode)) {
  14182. if (isBr$1(nextNode)) {
  14183. return moveForwardFromBr(root, nextNode);
  14184. }
  14185. if (!isAtomic(nextNode)) {
  14186. innerNode = findNode$1(nextNode, direction, isEditableCaretCandidate, nextNode);
  14187. if (innerNode) {
  14188. if (isText$1(innerNode)) {
  14189. return CaretPosition(innerNode, 0);
  14190. }
  14191. return CaretPosition.before(innerNode);
  14192. }
  14193. }
  14194. if (isText$1(nextNode)) {
  14195. return CaretPosition(nextNode, 0);
  14196. }
  14197. return CaretPosition.after(nextNode);
  14198. }
  14199. }
  14200. node = nextNode ? nextNode : caretPosition.getNode();
  14201. }
  14202. if (isForwards(direction) && caretPosition.isAtEnd() || isBackwards(direction) && caretPosition.isAtStart()) {
  14203. node = findNode$1(node, direction, always, root, true);
  14204. if (isEditableCaretCandidate(node, root)) {
  14205. return getCaretCandidatePosition(direction, node);
  14206. }
  14207. }
  14208. nextNode = findNode$1(node, direction, isEditableCaretCandidate, root);
  14209. var rootContentEditableFalseElm = last$1(filter$4(getParents$3(container, root), isContentEditableFalse$6));
  14210. if (rootContentEditableFalseElm && (!nextNode || !rootContentEditableFalseElm.contains(nextNode))) {
  14211. if (isForwards(direction)) {
  14212. caretPosition = CaretPosition.after(rootContentEditableFalseElm);
  14213. } else {
  14214. caretPosition = CaretPosition.before(rootContentEditableFalseElm);
  14215. }
  14216. return caretPosition;
  14217. }
  14218. if (nextNode) {
  14219. return getCaretCandidatePosition(direction, nextNode);
  14220. }
  14221. return null;
  14222. };
  14223. var CaretWalker = function (root) {
  14224. return {
  14225. next: function (caretPosition) {
  14226. return findCaretPosition$1(HDirection.Forwards, caretPosition, root);
  14227. },
  14228. prev: function (caretPosition) {
  14229. return findCaretPosition$1(HDirection.Backwards, caretPosition, root);
  14230. }
  14231. };
  14232. };
  14233. var walkToPositionIn = function (forward, root, start) {
  14234. var position = forward ? CaretPosition.before(start) : CaretPosition.after(start);
  14235. return fromPosition(forward, root, position);
  14236. };
  14237. var afterElement = function (node) {
  14238. return isBr$5(node) ? CaretPosition.before(node) : CaretPosition.after(node);
  14239. };
  14240. var isBeforeOrStart = function (position) {
  14241. if (CaretPosition.isTextPosition(position)) {
  14242. return position.offset() === 0;
  14243. } else {
  14244. return isCaretCandidate$3(position.getNode());
  14245. }
  14246. };
  14247. var isAfterOrEnd = function (position) {
  14248. if (CaretPosition.isTextPosition(position)) {
  14249. var container = position.container();
  14250. return position.offset() === container.data.length;
  14251. } else {
  14252. return isCaretCandidate$3(position.getNode(true));
  14253. }
  14254. };
  14255. var isBeforeAfterSameElement = function (from, to) {
  14256. return !CaretPosition.isTextPosition(from) && !CaretPosition.isTextPosition(to) && from.getNode() === to.getNode(true);
  14257. };
  14258. var isAtBr = function (position) {
  14259. return !CaretPosition.isTextPosition(position) && isBr$5(position.getNode());
  14260. };
  14261. var shouldSkipPosition = function (forward, from, to) {
  14262. if (forward) {
  14263. return !isBeforeAfterSameElement(from, to) && !isAtBr(from) && isAfterOrEnd(from) && isBeforeOrStart(to);
  14264. } else {
  14265. return !isBeforeAfterSameElement(to, from) && isBeforeOrStart(from) && isAfterOrEnd(to);
  14266. }
  14267. };
  14268. var fromPosition = function (forward, root, pos) {
  14269. var walker = CaretWalker(root);
  14270. return Optional.from(forward ? walker.next(pos) : walker.prev(pos));
  14271. };
  14272. var navigate = function (forward, root, from) {
  14273. return fromPosition(forward, root, from).bind(function (to) {
  14274. if (isInSameBlock(from, to, root) && shouldSkipPosition(forward, from, to)) {
  14275. return fromPosition(forward, root, to);
  14276. } else {
  14277. return Optional.some(to);
  14278. }
  14279. });
  14280. };
  14281. var navigateIgnore = function (forward, root, from, ignoreFilter) {
  14282. return navigate(forward, root, from).bind(function (pos) {
  14283. return ignoreFilter(pos) ? navigateIgnore(forward, root, pos, ignoreFilter) : Optional.some(pos);
  14284. });
  14285. };
  14286. var positionIn = function (forward, element) {
  14287. var startNode = forward ? element.firstChild : element.lastChild;
  14288. if (isText$7(startNode)) {
  14289. return Optional.some(CaretPosition(startNode, forward ? 0 : startNode.data.length));
  14290. } else if (startNode) {
  14291. if (isCaretCandidate$3(startNode)) {
  14292. return Optional.some(forward ? CaretPosition.before(startNode) : afterElement(startNode));
  14293. } else {
  14294. return walkToPositionIn(forward, element, startNode);
  14295. }
  14296. } else {
  14297. return Optional.none();
  14298. }
  14299. };
  14300. var nextPosition = curry(fromPosition, true);
  14301. var prevPosition = curry(fromPosition, false);
  14302. var firstPositionIn = curry(positionIn, true);
  14303. var lastPositionIn = curry(positionIn, false);
  14304. var CARET_ID$1 = '_mce_caret';
  14305. var isCaretNode = function (node) {
  14306. return isElement$5(node) && node.id === CARET_ID$1;
  14307. };
  14308. var getParentCaretContainer = function (body, node) {
  14309. while (node && node !== body) {
  14310. if (node.id === CARET_ID$1) {
  14311. return node;
  14312. }
  14313. node = node.parentNode;
  14314. }
  14315. return null;
  14316. };
  14317. var isStringPathBookmark = function (bookmark) {
  14318. return isString$1(bookmark.start);
  14319. };
  14320. var isRangeBookmark = function (bookmark) {
  14321. return has$2(bookmark, 'rng');
  14322. };
  14323. var isIdBookmark = function (bookmark) {
  14324. return has$2(bookmark, 'id');
  14325. };
  14326. var isIndexBookmark = function (bookmark) {
  14327. return has$2(bookmark, 'name');
  14328. };
  14329. var isPathBookmark = function (bookmark) {
  14330. return Tools.isArray(bookmark.start);
  14331. };
  14332. var addBogus = function (dom, node) {
  14333. if (isElement$5(node) && dom.isBlock(node) && !node.innerHTML && !Env.ie) {
  14334. node.innerHTML = '<br data-mce-bogus="1" />';
  14335. }
  14336. return node;
  14337. };
  14338. var resolveCaretPositionBookmark = function (dom, bookmark) {
  14339. var pos;
  14340. var rng = dom.createRng();
  14341. pos = resolve$2(dom.getRoot(), bookmark.start);
  14342. rng.setStart(pos.container(), pos.offset());
  14343. pos = resolve$2(dom.getRoot(), bookmark.end);
  14344. rng.setEnd(pos.container(), pos.offset());
  14345. return rng;
  14346. };
  14347. var insertZwsp = function (node, rng) {
  14348. var textNode = node.ownerDocument.createTextNode(ZWSP$1);
  14349. node.appendChild(textNode);
  14350. rng.setStart(textNode, 0);
  14351. rng.setEnd(textNode, 0);
  14352. };
  14353. var isEmpty$1 = function (node) {
  14354. return node.hasChildNodes() === false;
  14355. };
  14356. var tryFindRangePosition = function (node, rng) {
  14357. return lastPositionIn(node).fold(never, function (pos) {
  14358. rng.setStart(pos.container(), pos.offset());
  14359. rng.setEnd(pos.container(), pos.offset());
  14360. return true;
  14361. });
  14362. };
  14363. var padEmptyCaretContainer = function (root, node, rng) {
  14364. if (isEmpty$1(node) && getParentCaretContainer(root, node)) {
  14365. insertZwsp(node, rng);
  14366. return true;
  14367. } else {
  14368. return false;
  14369. }
  14370. };
  14371. var setEndPoint = function (dom, start, bookmark, rng) {
  14372. var point = bookmark[start ? 'start' : 'end'];
  14373. var i, node, offset, children;
  14374. var root = dom.getRoot();
  14375. if (point) {
  14376. offset = point[0];
  14377. for (node = root, i = point.length - 1; i >= 1; i--) {
  14378. children = node.childNodes;
  14379. if (padEmptyCaretContainer(root, node, rng)) {
  14380. return true;
  14381. }
  14382. if (point[i] > children.length - 1) {
  14383. if (padEmptyCaretContainer(root, node, rng)) {
  14384. return true;
  14385. }
  14386. return tryFindRangePosition(node, rng);
  14387. }
  14388. node = children[point[i]];
  14389. }
  14390. if (node.nodeType === 3) {
  14391. offset = Math.min(point[0], node.nodeValue.length);
  14392. }
  14393. if (node.nodeType === 1) {
  14394. offset = Math.min(point[0], node.childNodes.length);
  14395. }
  14396. if (start) {
  14397. rng.setStart(node, offset);
  14398. } else {
  14399. rng.setEnd(node, offset);
  14400. }
  14401. }
  14402. return true;
  14403. };
  14404. var isValidTextNode = function (node) {
  14405. return isText$7(node) && node.data.length > 0;
  14406. };
  14407. var restoreEndPoint = function (dom, suffix, bookmark) {
  14408. var marker = dom.get(bookmark.id + '_' + suffix), node, idx, next, prev;
  14409. var keep = bookmark.keep;
  14410. var container, offset;
  14411. if (marker) {
  14412. node = marker.parentNode;
  14413. if (suffix === 'start') {
  14414. if (!keep) {
  14415. idx = dom.nodeIndex(marker);
  14416. } else {
  14417. if (marker.hasChildNodes()) {
  14418. node = marker.firstChild;
  14419. idx = 1;
  14420. } else if (isValidTextNode(marker.nextSibling)) {
  14421. node = marker.nextSibling;
  14422. idx = 0;
  14423. } else if (isValidTextNode(marker.previousSibling)) {
  14424. node = marker.previousSibling;
  14425. idx = marker.previousSibling.data.length;
  14426. } else {
  14427. node = marker.parentNode;
  14428. idx = dom.nodeIndex(marker) + 1;
  14429. }
  14430. }
  14431. container = node;
  14432. offset = idx;
  14433. } else {
  14434. if (!keep) {
  14435. idx = dom.nodeIndex(marker);
  14436. } else {
  14437. if (marker.hasChildNodes()) {
  14438. node = marker.firstChild;
  14439. idx = 1;
  14440. } else if (isValidTextNode(marker.previousSibling)) {
  14441. node = marker.previousSibling;
  14442. idx = marker.previousSibling.data.length;
  14443. } else {
  14444. node = marker.parentNode;
  14445. idx = dom.nodeIndex(marker);
  14446. }
  14447. }
  14448. container = node;
  14449. offset = idx;
  14450. }
  14451. if (!keep) {
  14452. prev = marker.previousSibling;
  14453. next = marker.nextSibling;
  14454. Tools.each(Tools.grep(marker.childNodes), function (node) {
  14455. if (isText$7(node)) {
  14456. node.nodeValue = node.nodeValue.replace(/\uFEFF/g, '');
  14457. }
  14458. });
  14459. while (marker = dom.get(bookmark.id + '_' + suffix)) {
  14460. dom.remove(marker, true);
  14461. }
  14462. if (prev && next && prev.nodeType === next.nodeType && isText$7(prev) && !Env.opera) {
  14463. idx = prev.nodeValue.length;
  14464. prev.appendData(next.nodeValue);
  14465. dom.remove(next);
  14466. container = prev;
  14467. offset = idx;
  14468. }
  14469. }
  14470. return Optional.some(CaretPosition(container, offset));
  14471. } else {
  14472. return Optional.none();
  14473. }
  14474. };
  14475. var resolvePaths = function (dom, bookmark) {
  14476. var rng = dom.createRng();
  14477. if (setEndPoint(dom, true, bookmark, rng) && setEndPoint(dom, false, bookmark, rng)) {
  14478. return Optional.some(rng);
  14479. } else {
  14480. return Optional.none();
  14481. }
  14482. };
  14483. var resolveId = function (dom, bookmark) {
  14484. var startPos = restoreEndPoint(dom, 'start', bookmark);
  14485. var endPos = restoreEndPoint(dom, 'end', bookmark);
  14486. return lift2(startPos, endPos.or(startPos), function (spos, epos) {
  14487. var rng = dom.createRng();
  14488. rng.setStart(addBogus(dom, spos.container()), spos.offset());
  14489. rng.setEnd(addBogus(dom, epos.container()), epos.offset());
  14490. return rng;
  14491. });
  14492. };
  14493. var resolveIndex = function (dom, bookmark) {
  14494. return Optional.from(dom.select(bookmark.name)[bookmark.index]).map(function (elm) {
  14495. var rng = dom.createRng();
  14496. rng.selectNode(elm);
  14497. return rng;
  14498. });
  14499. };
  14500. var resolve$1 = function (selection, bookmark) {
  14501. var dom = selection.dom;
  14502. if (bookmark) {
  14503. if (isPathBookmark(bookmark)) {
  14504. return resolvePaths(dom, bookmark);
  14505. } else if (isStringPathBookmark(bookmark)) {
  14506. return Optional.some(resolveCaretPositionBookmark(dom, bookmark));
  14507. } else if (isIdBookmark(bookmark)) {
  14508. return resolveId(dom, bookmark);
  14509. } else if (isIndexBookmark(bookmark)) {
  14510. return resolveIndex(dom, bookmark);
  14511. } else if (isRangeBookmark(bookmark)) {
  14512. return Optional.some(bookmark.rng);
  14513. }
  14514. }
  14515. return Optional.none();
  14516. };
  14517. var getBookmark$1 = function (selection, type, normalized) {
  14518. return getBookmark$2(selection, type, normalized);
  14519. };
  14520. var moveToBookmark = function (selection, bookmark) {
  14521. resolve$1(selection, bookmark).each(function (rng) {
  14522. selection.setRng(rng);
  14523. });
  14524. };
  14525. var isBookmarkNode$1 = function (node) {
  14526. return isElement$5(node) && node.tagName === 'SPAN' && node.getAttribute('data-mce-type') === 'bookmark';
  14527. };
  14528. var is = function (expected) {
  14529. return function (actual) {
  14530. return expected === actual;
  14531. };
  14532. };
  14533. var isNbsp = is(nbsp);
  14534. var isWhiteSpace = function (chr) {
  14535. return chr !== '' && ' \f\n\r\t\x0B'.indexOf(chr) !== -1;
  14536. };
  14537. var isContent = function (chr) {
  14538. return !isWhiteSpace(chr) && !isNbsp(chr);
  14539. };
  14540. var isNode = function (node) {
  14541. return !!node.nodeType;
  14542. };
  14543. var isInlineBlock = function (node) {
  14544. return node && /^(IMG)$/.test(node.nodeName);
  14545. };
  14546. var moveStart = function (dom, selection, rng) {
  14547. var offset = rng.startOffset;
  14548. var container = rng.startContainer;
  14549. if (container === rng.endContainer) {
  14550. if (isInlineBlock(container.childNodes[offset])) {
  14551. return;
  14552. }
  14553. }
  14554. if (isElement$5(container)) {
  14555. var nodes = container.childNodes;
  14556. var walker = void 0;
  14557. if (offset < nodes.length) {
  14558. container = nodes[offset];
  14559. walker = new DomTreeWalker(container, dom.getParent(container, dom.isBlock));
  14560. } else {
  14561. container = nodes[nodes.length - 1];
  14562. walker = new DomTreeWalker(container, dom.getParent(container, dom.isBlock));
  14563. walker.next(true);
  14564. }
  14565. for (var node = walker.current(); node; node = walker.next()) {
  14566. if (isText$7(node) && !isWhiteSpaceNode$1(node)) {
  14567. rng.setStart(node, 0);
  14568. selection.setRng(rng);
  14569. return;
  14570. }
  14571. }
  14572. }
  14573. };
  14574. var getNonWhiteSpaceSibling = function (node, next, inc) {
  14575. if (node) {
  14576. var nextName = next ? 'nextSibling' : 'previousSibling';
  14577. for (node = inc ? node : node[nextName]; node; node = node[nextName]) {
  14578. if (isElement$5(node) || !isWhiteSpaceNode$1(node)) {
  14579. return node;
  14580. }
  14581. }
  14582. }
  14583. };
  14584. var isTextBlock$1 = function (editor, name) {
  14585. if (isNode(name)) {
  14586. name = name.nodeName;
  14587. }
  14588. return !!editor.schema.getTextBlockElements()[name.toLowerCase()];
  14589. };
  14590. var isValid = function (ed, parent, child) {
  14591. return ed.schema.isValidChild(parent, child);
  14592. };
  14593. var isWhiteSpaceNode$1 = function (node, allowSpaces) {
  14594. if (allowSpaces === void 0) {
  14595. allowSpaces = false;
  14596. }
  14597. if (isNonNullable(node) && isText$7(node)) {
  14598. var data = allowSpaces ? node.data.replace(/ /g, '\xA0') : node.data;
  14599. return isWhitespaceText(data);
  14600. } else {
  14601. return false;
  14602. }
  14603. };
  14604. var isEmptyTextNode$1 = function (node) {
  14605. return isNonNullable(node) && isText$7(node) && node.length === 0;
  14606. };
  14607. var replaceVars = function (value, vars) {
  14608. if (isFunction(value)) {
  14609. value = value(vars);
  14610. } else if (isNonNullable(vars)) {
  14611. value = value.replace(/%(\w+)/g, function (str, name) {
  14612. return vars[name] || str;
  14613. });
  14614. }
  14615. return value;
  14616. };
  14617. var isEq$5 = function (str1, str2) {
  14618. str1 = str1 || '';
  14619. str2 = str2 || '';
  14620. str1 = '' + (str1.nodeName || str1);
  14621. str2 = '' + (str2.nodeName || str2);
  14622. return str1.toLowerCase() === str2.toLowerCase();
  14623. };
  14624. var normalizeStyleValue = function (dom, value, name) {
  14625. if (name === 'color' || name === 'backgroundColor') {
  14626. value = dom.toHex(value);
  14627. }
  14628. if (name === 'fontWeight' && value === 700) {
  14629. value = 'bold';
  14630. }
  14631. if (name === 'fontFamily') {
  14632. value = value.replace(/[\'\"]/g, '').replace(/,\s+/g, ',');
  14633. }
  14634. return '' + value;
  14635. };
  14636. var getStyle = function (dom, node, name) {
  14637. return normalizeStyleValue(dom, dom.getStyle(node, name), name);
  14638. };
  14639. var getTextDecoration = function (dom, node) {
  14640. var decoration;
  14641. dom.getParent(node, function (n) {
  14642. decoration = dom.getStyle(n, 'text-decoration');
  14643. return decoration && decoration !== 'none';
  14644. });
  14645. return decoration;
  14646. };
  14647. var getParents$2 = function (dom, node, selector) {
  14648. return dom.getParents(node, selector, dom.getRoot());
  14649. };
  14650. var isVariableFormatName = function (editor, formatName) {
  14651. var hasVariableValues = function (format) {
  14652. var isVariableValue = function (val) {
  14653. return val.length > 1 && val.charAt(0) === '%';
  14654. };
  14655. return exists([
  14656. 'styles',
  14657. 'attributes'
  14658. ], function (key) {
  14659. return get$9(format, key).exists(function (field) {
  14660. var fieldValues = isArray$1(field) ? field : values(field);
  14661. return exists(fieldValues, isVariableValue);
  14662. });
  14663. });
  14664. };
  14665. return exists(editor.formatter.get(formatName), hasVariableValues);
  14666. };
  14667. var areSimilarFormats = function (editor, formatName, otherFormatName) {
  14668. var validKeys = [
  14669. 'inline',
  14670. 'block',
  14671. 'selector',
  14672. 'attributes',
  14673. 'styles',
  14674. 'classes'
  14675. ];
  14676. var filterObj = function (format) {
  14677. return filter$3(format, function (_, key) {
  14678. return exists(validKeys, function (validKey) {
  14679. return validKey === key;
  14680. });
  14681. });
  14682. };
  14683. return exists(editor.formatter.get(formatName), function (fmt1) {
  14684. var filteredFmt1 = filterObj(fmt1);
  14685. return exists(editor.formatter.get(otherFormatName), function (fmt2) {
  14686. var filteredFmt2 = filterObj(fmt2);
  14687. return equal$1(filteredFmt1, filteredFmt2);
  14688. });
  14689. });
  14690. };
  14691. var isBlockFormat = function (format) {
  14692. return hasNonNullableKey(format, 'block');
  14693. };
  14694. var isSelectorFormat = function (format) {
  14695. return hasNonNullableKey(format, 'selector');
  14696. };
  14697. var isInlineFormat = function (format) {
  14698. return hasNonNullableKey(format, 'inline');
  14699. };
  14700. var isMixedFormat = function (format) {
  14701. return isSelectorFormat(format) && isInlineFormat(format) && is$1(get$9(format, 'mixed'), true);
  14702. };
  14703. var shouldExpandToSelector = function (format) {
  14704. return isSelectorFormat(format) && format.expand !== false && !isInlineFormat(format);
  14705. };
  14706. var isBookmarkNode = isBookmarkNode$1;
  14707. var getParents$1 = getParents$2;
  14708. var isWhiteSpaceNode = isWhiteSpaceNode$1;
  14709. var isTextBlock = isTextBlock$1;
  14710. var isBogusBr = function (node) {
  14711. return isBr$5(node) && node.getAttribute('data-mce-bogus') && !node.nextSibling;
  14712. };
  14713. var findParentContentEditable = function (dom, node) {
  14714. var parent = node;
  14715. while (parent) {
  14716. if (isElement$5(parent) && dom.getContentEditable(parent)) {
  14717. return dom.getContentEditable(parent) === 'false' ? parent : node;
  14718. }
  14719. parent = parent.parentNode;
  14720. }
  14721. return node;
  14722. };
  14723. var walkText = function (start, node, offset, predicate) {
  14724. var str = node.data;
  14725. for (var i = offset; start ? i >= 0 : i < str.length; start ? i-- : i++) {
  14726. if (predicate(str.charAt(i))) {
  14727. return start ? i + 1 : i;
  14728. }
  14729. }
  14730. return -1;
  14731. };
  14732. var findSpace = function (start, node, offset) {
  14733. return walkText(start, node, offset, function (c) {
  14734. return isNbsp(c) || isWhiteSpace(c);
  14735. });
  14736. };
  14737. var findContent = function (start, node, offset) {
  14738. return walkText(start, node, offset, isContent);
  14739. };
  14740. var findWordEndPoint = function (dom, body, container, offset, start, includeTrailingSpaces) {
  14741. var lastTextNode;
  14742. var rootNode = dom.getParent(container, dom.isBlock) || body;
  14743. var walk = function (container, offset, pred) {
  14744. var textSeeker = TextSeeker(dom);
  14745. var walker = start ? textSeeker.backwards : textSeeker.forwards;
  14746. return Optional.from(walker(container, offset, function (text, textOffset) {
  14747. if (isBookmarkNode(text.parentNode)) {
  14748. return -1;
  14749. } else {
  14750. lastTextNode = text;
  14751. return pred(start, text, textOffset);
  14752. }
  14753. }, rootNode));
  14754. };
  14755. var spaceResult = walk(container, offset, findSpace);
  14756. return spaceResult.bind(function (result) {
  14757. return includeTrailingSpaces ? walk(result.container, result.offset + (start ? -1 : 0), findContent) : Optional.some(result);
  14758. }).orThunk(function () {
  14759. return lastTextNode ? Optional.some({
  14760. container: lastTextNode,
  14761. offset: start ? 0 : lastTextNode.length
  14762. }) : Optional.none();
  14763. });
  14764. };
  14765. var findSelectorEndPoint = function (dom, formatList, rng, container, siblingName) {
  14766. if (isText$7(container) && isEmpty$3(container.data) && container[siblingName]) {
  14767. container = container[siblingName];
  14768. }
  14769. var parents = getParents$1(dom, container);
  14770. for (var i = 0; i < parents.length; i++) {
  14771. for (var y = 0; y < formatList.length; y++) {
  14772. var curFormat = formatList[y];
  14773. if (isNonNullable(curFormat.collapsed) && curFormat.collapsed !== rng.collapsed) {
  14774. continue;
  14775. }
  14776. if (isSelectorFormat(curFormat) && dom.is(parents[i], curFormat.selector)) {
  14777. return parents[i];
  14778. }
  14779. }
  14780. }
  14781. return container;
  14782. };
  14783. var findBlockEndPoint = function (editor, formatList, container, siblingName) {
  14784. var node = container;
  14785. var dom = editor.dom;
  14786. var root = dom.getRoot();
  14787. var format = formatList[0];
  14788. if (isBlockFormat(format)) {
  14789. node = format.wrapper ? null : dom.getParent(container, format.block, root);
  14790. }
  14791. if (!node) {
  14792. var scopeRoot = dom.getParent(container, 'LI,TD,TH');
  14793. node = dom.getParent(isText$7(container) ? container.parentNode : container, function (node) {
  14794. return node !== root && isTextBlock(editor, node);
  14795. }, scopeRoot);
  14796. }
  14797. if (node && isBlockFormat(format) && format.wrapper) {
  14798. node = getParents$1(dom, node, 'ul,ol').reverse()[0] || node;
  14799. }
  14800. if (!node) {
  14801. node = container;
  14802. while (node[siblingName] && !dom.isBlock(node[siblingName])) {
  14803. node = node[siblingName];
  14804. if (isEq$5(node, 'br')) {
  14805. break;
  14806. }
  14807. }
  14808. }
  14809. return node || container;
  14810. };
  14811. var isAtBlockBoundary$1 = function (dom, root, container, siblingName) {
  14812. var parent = container.parentNode;
  14813. if (isNonNullable(container[siblingName])) {
  14814. return false;
  14815. } else if (parent === root || isNullable(parent) || dom.isBlock(parent)) {
  14816. return true;
  14817. } else {
  14818. return isAtBlockBoundary$1(dom, root, parent, siblingName);
  14819. }
  14820. };
  14821. var findParentContainer = function (dom, formatList, container, offset, start) {
  14822. var parent = container;
  14823. var siblingName = start ? 'previousSibling' : 'nextSibling';
  14824. var root = dom.getRoot();
  14825. if (isText$7(container) && !isWhiteSpaceNode(container)) {
  14826. if (start ? offset > 0 : offset < container.data.length) {
  14827. return container;
  14828. }
  14829. }
  14830. while (true) {
  14831. if (!formatList[0].block_expand && dom.isBlock(parent)) {
  14832. return parent;
  14833. }
  14834. for (var sibling = parent[siblingName]; sibling; sibling = sibling[siblingName]) {
  14835. var allowSpaces = isText$7(sibling) && !isAtBlockBoundary$1(dom, root, sibling, siblingName);
  14836. if (!isBookmarkNode(sibling) && !isBogusBr(sibling) && !isWhiteSpaceNode(sibling, allowSpaces)) {
  14837. return parent;
  14838. }
  14839. }
  14840. if (parent === root || parent.parentNode === root) {
  14841. container = parent;
  14842. break;
  14843. }
  14844. parent = parent.parentNode;
  14845. }
  14846. return container;
  14847. };
  14848. var isSelfOrParentBookmark = function (container) {
  14849. return isBookmarkNode(container.parentNode) || isBookmarkNode(container);
  14850. };
  14851. var expandRng = function (editor, rng, formatList, includeTrailingSpace) {
  14852. if (includeTrailingSpace === void 0) {
  14853. includeTrailingSpace = false;
  14854. }
  14855. var startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, endOffset = rng.endOffset;
  14856. var dom = editor.dom;
  14857. var format = formatList[0];
  14858. if (isElement$5(startContainer) && startContainer.hasChildNodes()) {
  14859. startContainer = getNode$1(startContainer, startOffset);
  14860. if (isText$7(startContainer)) {
  14861. startOffset = 0;
  14862. }
  14863. }
  14864. if (isElement$5(endContainer) && endContainer.hasChildNodes()) {
  14865. endContainer = getNode$1(endContainer, rng.collapsed ? endOffset : endOffset - 1);
  14866. if (isText$7(endContainer)) {
  14867. endOffset = endContainer.nodeValue.length;
  14868. }
  14869. }
  14870. startContainer = findParentContentEditable(dom, startContainer);
  14871. endContainer = findParentContentEditable(dom, endContainer);
  14872. if (isSelfOrParentBookmark(startContainer)) {
  14873. startContainer = isBookmarkNode(startContainer) ? startContainer : startContainer.parentNode;
  14874. if (rng.collapsed) {
  14875. startContainer = startContainer.previousSibling || startContainer;
  14876. } else {
  14877. startContainer = startContainer.nextSibling || startContainer;
  14878. }
  14879. if (isText$7(startContainer)) {
  14880. startOffset = rng.collapsed ? startContainer.length : 0;
  14881. }
  14882. }
  14883. if (isSelfOrParentBookmark(endContainer)) {
  14884. endContainer = isBookmarkNode(endContainer) ? endContainer : endContainer.parentNode;
  14885. if (rng.collapsed) {
  14886. endContainer = endContainer.nextSibling || endContainer;
  14887. } else {
  14888. endContainer = endContainer.previousSibling || endContainer;
  14889. }
  14890. if (isText$7(endContainer)) {
  14891. endOffset = rng.collapsed ? 0 : endContainer.length;
  14892. }
  14893. }
  14894. if (rng.collapsed) {
  14895. var startPoint = findWordEndPoint(dom, editor.getBody(), startContainer, startOffset, true, includeTrailingSpace);
  14896. startPoint.each(function (_a) {
  14897. var container = _a.container, offset = _a.offset;
  14898. startContainer = container;
  14899. startOffset = offset;
  14900. });
  14901. var endPoint = findWordEndPoint(dom, editor.getBody(), endContainer, endOffset, false, includeTrailingSpace);
  14902. endPoint.each(function (_a) {
  14903. var container = _a.container, offset = _a.offset;
  14904. endContainer = container;
  14905. endOffset = offset;
  14906. });
  14907. }
  14908. if (isInlineFormat(format) || format.block_expand) {
  14909. if (!isInlineFormat(format) || (!isText$7(startContainer) || startOffset === 0)) {
  14910. startContainer = findParentContainer(dom, formatList, startContainer, startOffset, true);
  14911. }
  14912. if (!isInlineFormat(format) || (!isText$7(endContainer) || endOffset === endContainer.nodeValue.length)) {
  14913. endContainer = findParentContainer(dom, formatList, endContainer, endOffset, false);
  14914. }
  14915. }
  14916. if (shouldExpandToSelector(format)) {
  14917. startContainer = findSelectorEndPoint(dom, formatList, rng, startContainer, 'previousSibling');
  14918. endContainer = findSelectorEndPoint(dom, formatList, rng, endContainer, 'nextSibling');
  14919. }
  14920. if (isBlockFormat(format) || isSelectorFormat(format)) {
  14921. startContainer = findBlockEndPoint(editor, formatList, startContainer, 'previousSibling');
  14922. endContainer = findBlockEndPoint(editor, formatList, endContainer, 'nextSibling');
  14923. if (isBlockFormat(format)) {
  14924. if (!dom.isBlock(startContainer)) {
  14925. startContainer = findParentContainer(dom, formatList, startContainer, startOffset, true);
  14926. }
  14927. if (!dom.isBlock(endContainer)) {
  14928. endContainer = findParentContainer(dom, formatList, endContainer, endOffset, false);
  14929. }
  14930. }
  14931. }
  14932. if (isElement$5(startContainer)) {
  14933. startOffset = dom.nodeIndex(startContainer);
  14934. startContainer = startContainer.parentNode;
  14935. }
  14936. if (isElement$5(endContainer)) {
  14937. endOffset = dom.nodeIndex(endContainer) + 1;
  14938. endContainer = endContainer.parentNode;
  14939. }
  14940. return {
  14941. startContainer: startContainer,
  14942. startOffset: startOffset,
  14943. endContainer: endContainer,
  14944. endOffset: endOffset
  14945. };
  14946. };
  14947. var walk$2 = function (dom, rng, callback) {
  14948. var startOffset = rng.startOffset;
  14949. var startContainer = getNode$1(rng.startContainer, startOffset);
  14950. var endOffset = rng.endOffset;
  14951. var endContainer = getNode$1(rng.endContainer, endOffset - 1);
  14952. var exclude = function (nodes) {
  14953. var firstNode = nodes[0];
  14954. if (isText$7(firstNode) && firstNode === startContainer && startOffset >= firstNode.data.length) {
  14955. nodes.splice(0, 1);
  14956. }
  14957. var lastNode = nodes[nodes.length - 1];
  14958. if (endOffset === 0 && nodes.length > 0 && lastNode === endContainer && isText$7(lastNode)) {
  14959. nodes.splice(nodes.length - 1, 1);
  14960. }
  14961. return nodes;
  14962. };
  14963. var collectSiblings = function (node, name, endNode) {
  14964. var siblings = [];
  14965. for (; node && node !== endNode; node = node[name]) {
  14966. siblings.push(node);
  14967. }
  14968. return siblings;
  14969. };
  14970. var findEndPoint = function (node, root) {
  14971. return dom.getParent(node, function (node) {
  14972. return node.parentNode === root;
  14973. }, root);
  14974. };
  14975. var walkBoundary = function (startNode, endNode, next) {
  14976. var siblingName = next ? 'nextSibling' : 'previousSibling';
  14977. for (var node = startNode, parent_1 = node.parentNode; node && node !== endNode; node = parent_1) {
  14978. parent_1 = node.parentNode;
  14979. var siblings_1 = collectSiblings(node === startNode ? node : node[siblingName], siblingName);
  14980. if (siblings_1.length) {
  14981. if (!next) {
  14982. siblings_1.reverse();
  14983. }
  14984. callback(exclude(siblings_1));
  14985. }
  14986. }
  14987. };
  14988. if (startContainer === endContainer) {
  14989. return callback(exclude([startContainer]));
  14990. }
  14991. var ancestor = dom.findCommonAncestor(startContainer, endContainer);
  14992. if (dom.isChildOf(startContainer, endContainer)) {
  14993. return walkBoundary(startContainer, ancestor, true);
  14994. }
  14995. if (dom.isChildOf(endContainer, startContainer)) {
  14996. return walkBoundary(endContainer, ancestor);
  14997. }
  14998. var startPoint = findEndPoint(startContainer, ancestor) || startContainer;
  14999. var endPoint = findEndPoint(endContainer, ancestor) || endContainer;
  15000. walkBoundary(startContainer, startPoint, true);
  15001. var siblings = collectSiblings(startPoint === startContainer ? startPoint : startPoint.nextSibling, 'nextSibling', endPoint === endContainer ? endPoint.nextSibling : endPoint);
  15002. if (siblings.length) {
  15003. callback(exclude(siblings));
  15004. }
  15005. walkBoundary(endContainer, endPoint);
  15006. };
  15007. var getRanges = function (selection) {
  15008. var ranges = [];
  15009. if (selection) {
  15010. for (var i = 0; i < selection.rangeCount; i++) {
  15011. ranges.push(selection.getRangeAt(i));
  15012. }
  15013. }
  15014. return ranges;
  15015. };
  15016. var getSelectedNodes = function (ranges) {
  15017. return bind(ranges, function (range) {
  15018. var node = getSelectedNode(range);
  15019. return node ? [SugarElement.fromDom(node)] : [];
  15020. });
  15021. };
  15022. var hasMultipleRanges = function (selection) {
  15023. return getRanges(selection).length > 1;
  15024. };
  15025. var getCellsFromRanges = function (ranges) {
  15026. return filter$4(getSelectedNodes(ranges), isTableCell$4);
  15027. };
  15028. var getCellsFromElement = function (elm) {
  15029. return descendants(elm, 'td[data-mce-selected],th[data-mce-selected]');
  15030. };
  15031. var getCellsFromElementOrRanges = function (ranges, element) {
  15032. var selectedCells = getCellsFromElement(element);
  15033. return selectedCells.length > 0 ? selectedCells : getCellsFromRanges(ranges);
  15034. };
  15035. var getCellsFromEditor = function (editor) {
  15036. return getCellsFromElementOrRanges(getRanges(editor.selection.getSel()), SugarElement.fromDom(editor.getBody()));
  15037. };
  15038. var getClosestTable = function (cell, isRoot) {
  15039. return ancestor$2(cell, 'table', isRoot);
  15040. };
  15041. var getStartNode = function (rng) {
  15042. var sc = rng.startContainer, so = rng.startOffset;
  15043. if (isText$7(sc)) {
  15044. return so === 0 ? Optional.some(SugarElement.fromDom(sc)) : Optional.none();
  15045. } else {
  15046. return Optional.from(sc.childNodes[so]).map(SugarElement.fromDom);
  15047. }
  15048. };
  15049. var getEndNode = function (rng) {
  15050. var ec = rng.endContainer, eo = rng.endOffset;
  15051. if (isText$7(ec)) {
  15052. return eo === ec.data.length ? Optional.some(SugarElement.fromDom(ec)) : Optional.none();
  15053. } else {
  15054. return Optional.from(ec.childNodes[eo - 1]).map(SugarElement.fromDom);
  15055. }
  15056. };
  15057. var getFirstChildren = function (node) {
  15058. return firstChild(node).fold(constant([node]), function (child) {
  15059. return [node].concat(getFirstChildren(child));
  15060. });
  15061. };
  15062. var getLastChildren$1 = function (node) {
  15063. return lastChild(node).fold(constant([node]), function (child) {
  15064. if (name(child) === 'br') {
  15065. return prevSibling(child).map(function (sibling) {
  15066. return [node].concat(getLastChildren$1(sibling));
  15067. }).getOr([]);
  15068. } else {
  15069. return [node].concat(getLastChildren$1(child));
  15070. }
  15071. });
  15072. };
  15073. var hasAllContentsSelected = function (elm, rng) {
  15074. return lift2(getStartNode(rng), getEndNode(rng), function (startNode, endNode) {
  15075. var start = find$3(getFirstChildren(elm), curry(eq, startNode));
  15076. var end = find$3(getLastChildren$1(elm), curry(eq, endNode));
  15077. return start.isSome() && end.isSome();
  15078. }).getOr(false);
  15079. };
  15080. var moveEndPoint = function (dom, rng, node, start) {
  15081. var root = node, walker = new DomTreeWalker(node, root);
  15082. var moveCaretBeforeOnEnterElementsMap = filter$3(dom.schema.getMoveCaretBeforeOnEnterElements(), function (_, name) {
  15083. return !contains$3([
  15084. 'td',
  15085. 'th',
  15086. 'table'
  15087. ], name.toLowerCase());
  15088. });
  15089. do {
  15090. if (isText$7(node) && Tools.trim(node.nodeValue).length !== 0) {
  15091. if (start) {
  15092. rng.setStart(node, 0);
  15093. } else {
  15094. rng.setEnd(node, node.nodeValue.length);
  15095. }
  15096. return;
  15097. }
  15098. if (moveCaretBeforeOnEnterElementsMap[node.nodeName]) {
  15099. if (start) {
  15100. rng.setStartBefore(node);
  15101. } else {
  15102. if (node.nodeName === 'BR') {
  15103. rng.setEndBefore(node);
  15104. } else {
  15105. rng.setEndAfter(node);
  15106. }
  15107. }
  15108. return;
  15109. }
  15110. } while (node = start ? walker.next() : walker.prev());
  15111. if (root.nodeName === 'BODY') {
  15112. if (start) {
  15113. rng.setStart(root, 0);
  15114. } else {
  15115. rng.setEnd(root, root.childNodes.length);
  15116. }
  15117. }
  15118. };
  15119. var hasAnyRanges = function (editor) {
  15120. var sel = editor.selection.getSel();
  15121. return sel && sel.rangeCount > 0;
  15122. };
  15123. var runOnRanges = function (editor, executor) {
  15124. var fakeSelectionNodes = getCellsFromEditor(editor);
  15125. if (fakeSelectionNodes.length > 0) {
  15126. each$k(fakeSelectionNodes, function (elem) {
  15127. var node = elem.dom;
  15128. var fakeNodeRng = editor.dom.createRng();
  15129. fakeNodeRng.setStartBefore(node);
  15130. fakeNodeRng.setEndAfter(node);
  15131. executor(fakeNodeRng, true);
  15132. });
  15133. } else {
  15134. executor(editor.selection.getRng(), false);
  15135. }
  15136. };
  15137. var preserve = function (selection, fillBookmark, executor) {
  15138. var bookmark = getPersistentBookmark(selection, fillBookmark);
  15139. executor(bookmark);
  15140. selection.moveToBookmark(bookmark);
  15141. };
  15142. var NodeValue = function (is, name) {
  15143. var get = function (element) {
  15144. if (!is(element)) {
  15145. throw new Error('Can only get ' + name + ' value of a ' + name + ' node');
  15146. }
  15147. return getOption(element).getOr('');
  15148. };
  15149. var getOption = function (element) {
  15150. return is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();
  15151. };
  15152. var set = function (element, value) {
  15153. if (!is(element)) {
  15154. throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');
  15155. }
  15156. element.dom.nodeValue = value;
  15157. };
  15158. return {
  15159. get: get,
  15160. getOption: getOption,
  15161. set: set
  15162. };
  15163. };
  15164. var api$1 = NodeValue(isText$8, 'text');
  15165. var get$2 = function (element) {
  15166. return api$1.get(element);
  15167. };
  15168. var isZeroWidth = function (elem) {
  15169. return isText$8(elem) && get$2(elem) === ZWSP$1;
  15170. };
  15171. var context = function (editor, elem, wrapName, nodeName) {
  15172. return parent(elem).fold(function () {
  15173. return 'skipping';
  15174. }, function (parent) {
  15175. if (nodeName === 'br' || isZeroWidth(elem)) {
  15176. return 'valid';
  15177. } else if (isAnnotation(elem)) {
  15178. return 'existing';
  15179. } else if (isCaretNode(elem.dom)) {
  15180. return 'caret';
  15181. } else if (!isValid(editor, wrapName, nodeName) || !isValid(editor, name(parent), wrapName)) {
  15182. return 'invalid-child';
  15183. } else {
  15184. return 'valid';
  15185. }
  15186. });
  15187. };
  15188. var applyWordGrab = function (editor, rng) {
  15189. var r = expandRng(editor, rng, [{ inline: 'span' }]);
  15190. rng.setStart(r.startContainer, r.startOffset);
  15191. rng.setEnd(r.endContainer, r.endOffset);
  15192. editor.selection.setRng(rng);
  15193. };
  15194. var makeAnnotation = function (eDoc, _a, annotationName, decorate) {
  15195. var _b = _a.uid, uid = _b === void 0 ? generate('mce-annotation') : _b, data = __rest(_a, ['uid']);
  15196. var master = SugarElement.fromTag('span', eDoc);
  15197. add$1(master, annotation());
  15198. set$1(master, '' + dataAnnotationId(), uid);
  15199. set$1(master, '' + dataAnnotation(), annotationName);
  15200. var _c = decorate(uid, data), _d = _c.attributes, attributes = _d === void 0 ? {} : _d, _e = _c.classes, classes = _e === void 0 ? [] : _e;
  15201. setAll$1(master, attributes);
  15202. add(master, classes);
  15203. return master;
  15204. };
  15205. var annotate = function (editor, rng, annotationName, decorate, data) {
  15206. var newWrappers = [];
  15207. var master = makeAnnotation(editor.getDoc(), data, annotationName, decorate);
  15208. var wrapper = value();
  15209. var finishWrapper = function () {
  15210. wrapper.clear();
  15211. };
  15212. var getOrOpenWrapper = function () {
  15213. return wrapper.get().getOrThunk(function () {
  15214. var nu = shallow(master);
  15215. newWrappers.push(nu);
  15216. wrapper.set(nu);
  15217. return nu;
  15218. });
  15219. };
  15220. var processElements = function (elems) {
  15221. each$k(elems, processElement);
  15222. };
  15223. var processElement = function (elem) {
  15224. var ctx = context(editor, elem, 'span', name(elem));
  15225. switch (ctx) {
  15226. case 'invalid-child': {
  15227. finishWrapper();
  15228. var children$1 = children(elem);
  15229. processElements(children$1);
  15230. finishWrapper();
  15231. break;
  15232. }
  15233. case 'valid': {
  15234. var w = getOrOpenWrapper();
  15235. wrap$3(elem, w);
  15236. break;
  15237. }
  15238. }
  15239. };
  15240. var processNodes = function (nodes) {
  15241. var elems = map$3(nodes, SugarElement.fromDom);
  15242. processElements(elems);
  15243. };
  15244. walk$2(editor.dom, rng, function (nodes) {
  15245. finishWrapper();
  15246. processNodes(nodes);
  15247. });
  15248. return newWrappers;
  15249. };
  15250. var annotateWithBookmark = function (editor, name, settings, data) {
  15251. editor.undoManager.transact(function () {
  15252. var selection = editor.selection;
  15253. var initialRng = selection.getRng();
  15254. var hasFakeSelection = getCellsFromEditor(editor).length > 0;
  15255. if (initialRng.collapsed && !hasFakeSelection) {
  15256. applyWordGrab(editor, initialRng);
  15257. }
  15258. if (selection.getRng().collapsed && !hasFakeSelection) {
  15259. var wrapper = makeAnnotation(editor.getDoc(), data, name, settings.decorate);
  15260. set(wrapper, nbsp);
  15261. selection.getRng().insertNode(wrapper.dom);
  15262. selection.select(wrapper.dom);
  15263. } else {
  15264. preserve(selection, false, function () {
  15265. runOnRanges(editor, function (selectionRng) {
  15266. annotate(editor, selectionRng, name, settings.decorate, data);
  15267. });
  15268. });
  15269. }
  15270. });
  15271. };
  15272. var Annotator = function (editor) {
  15273. var registry = create$7();
  15274. setup$m(editor, registry);
  15275. var changes = setup$n(editor);
  15276. return {
  15277. register: function (name, settings) {
  15278. registry.register(name, settings);
  15279. },
  15280. annotate: function (name, data) {
  15281. registry.lookup(name).each(function (settings) {
  15282. annotateWithBookmark(editor, name, settings, data);
  15283. });
  15284. },
  15285. annotationChanged: function (name, callback) {
  15286. changes.addListener(name, callback);
  15287. },
  15288. remove: function (name) {
  15289. identify(editor, Optional.some(name)).each(function (_a) {
  15290. var elements = _a.elements;
  15291. each$k(elements, unwrap);
  15292. });
  15293. },
  15294. getAll: function (name) {
  15295. var directory = findAll(editor, name);
  15296. return map$2(directory, function (elems) {
  15297. return map$3(elems, function (elem) {
  15298. return elem.dom;
  15299. });
  15300. });
  15301. }
  15302. };
  15303. };
  15304. var BookmarkManager = function (selection) {
  15305. return {
  15306. getBookmark: curry(getBookmark$1, selection),
  15307. moveToBookmark: curry(moveToBookmark, selection)
  15308. };
  15309. };
  15310. BookmarkManager.isBookmarkNode = isBookmarkNode$1;
  15311. var getContentEditableRoot$1 = function (root, node) {
  15312. while (node && node !== root) {
  15313. if (isContentEditableTrue$4(node) || isContentEditableFalse$b(node)) {
  15314. return node;
  15315. }
  15316. node = node.parentNode;
  15317. }
  15318. return null;
  15319. };
  15320. var isXYWithinRange = function (clientX, clientY, range) {
  15321. if (range.collapsed) {
  15322. return false;
  15323. }
  15324. if (Env.browser.isIE() && range.startOffset === range.endOffset - 1 && range.startContainer === range.endContainer) {
  15325. var elm = range.startContainer.childNodes[range.startOffset];
  15326. if (isElement$5(elm)) {
  15327. return exists(elm.getClientRects(), function (rect) {
  15328. return containsXY(rect, clientX, clientY);
  15329. });
  15330. }
  15331. }
  15332. return exists(range.getClientRects(), function (rect) {
  15333. return containsXY(rect, clientX, clientY);
  15334. });
  15335. };
  15336. var firePreProcess = function (editor, args) {
  15337. return editor.fire('PreProcess', args);
  15338. };
  15339. var firePostProcess = function (editor, args) {
  15340. return editor.fire('PostProcess', args);
  15341. };
  15342. var fireRemove = function (editor) {
  15343. return editor.fire('remove');
  15344. };
  15345. var fireDetach = function (editor) {
  15346. return editor.fire('detach');
  15347. };
  15348. var fireSwitchMode = function (editor, mode) {
  15349. return editor.fire('SwitchMode', { mode: mode });
  15350. };
  15351. var fireObjectResizeStart = function (editor, target, width, height, origin) {
  15352. editor.fire('ObjectResizeStart', {
  15353. target: target,
  15354. width: width,
  15355. height: height,
  15356. origin: origin
  15357. });
  15358. };
  15359. var fireObjectResized = function (editor, target, width, height, origin) {
  15360. editor.fire('ObjectResized', {
  15361. target: target,
  15362. width: width,
  15363. height: height,
  15364. origin: origin
  15365. });
  15366. };
  15367. var firePreInit = function (editor) {
  15368. return editor.fire('PreInit');
  15369. };
  15370. var firePostRender = function (editor) {
  15371. return editor.fire('PostRender');
  15372. };
  15373. var fireInit = function (editor) {
  15374. return editor.fire('Init');
  15375. };
  15376. var firePlaceholderToggle = function (editor, state) {
  15377. return editor.fire('PlaceholderToggle', { state: state });
  15378. };
  15379. var fireError = function (editor, errorType, error) {
  15380. return editor.fire(errorType, error);
  15381. };
  15382. var fireFormatApply = function (editor, format, node, vars) {
  15383. return editor.fire('FormatApply', {
  15384. format: format,
  15385. node: node,
  15386. vars: vars
  15387. });
  15388. };
  15389. var fireFormatRemove = function (editor, format, node, vars) {
  15390. return editor.fire('FormatRemove', {
  15391. format: format,
  15392. node: node,
  15393. vars: vars
  15394. });
  15395. };
  15396. var VK = {
  15397. BACKSPACE: 8,
  15398. DELETE: 46,
  15399. DOWN: 40,
  15400. ENTER: 13,
  15401. ESC: 27,
  15402. LEFT: 37,
  15403. RIGHT: 39,
  15404. SPACEBAR: 32,
  15405. TAB: 9,
  15406. UP: 38,
  15407. PAGE_UP: 33,
  15408. PAGE_DOWN: 34,
  15409. END: 35,
  15410. HOME: 36,
  15411. modifierPressed: function (e) {
  15412. return e.shiftKey || e.ctrlKey || e.altKey || VK.metaKeyPressed(e);
  15413. },
  15414. metaKeyPressed: function (e) {
  15415. return Env.mac ? e.metaKey : e.ctrlKey && !e.altKey;
  15416. }
  15417. };
  15418. var isContentEditableFalse$5 = isContentEditableFalse$b;
  15419. var ControlSelection = function (selection, editor) {
  15420. var elementSelectionAttr = 'data-mce-selected';
  15421. var dom = editor.dom, each = Tools.each;
  15422. var selectedElm, selectedElmGhost, resizeHelper, selectedHandle, resizeBackdrop;
  15423. var startX, startY, selectedElmX, selectedElmY, startW, startH, ratio, resizeStarted;
  15424. var width, height;
  15425. var editableDoc = editor.getDoc(), rootDocument = document;
  15426. var abs = Math.abs, round = Math.round, rootElement = editor.getBody();
  15427. var startScrollWidth, startScrollHeight;
  15428. var resizeHandles = {
  15429. nw: [
  15430. 0,
  15431. 0,
  15432. -1,
  15433. -1
  15434. ],
  15435. ne: [
  15436. 1,
  15437. 0,
  15438. 1,
  15439. -1
  15440. ],
  15441. se: [
  15442. 1,
  15443. 1,
  15444. 1,
  15445. 1
  15446. ],
  15447. sw: [
  15448. 0,
  15449. 1,
  15450. -1,
  15451. 1
  15452. ]
  15453. };
  15454. var isImage = function (elm) {
  15455. return elm && (elm.nodeName === 'IMG' || editor.dom.is(elm, 'figure.image'));
  15456. };
  15457. var isMedia = function (elm) {
  15458. return isMedia$2(elm) || dom.hasClass(elm, 'mce-preview-object');
  15459. };
  15460. var isEventOnImageOutsideRange = function (evt, range) {
  15461. if (evt.type === 'longpress' || evt.type.indexOf('touch') === 0) {
  15462. var touch = evt.touches[0];
  15463. return isImage(evt.target) && !isXYWithinRange(touch.clientX, touch.clientY, range);
  15464. } else {
  15465. return isImage(evt.target) && !isXYWithinRange(evt.clientX, evt.clientY, range);
  15466. }
  15467. };
  15468. var contextMenuSelectImage = function (evt) {
  15469. var target = evt.target;
  15470. if (isEventOnImageOutsideRange(evt, editor.selection.getRng()) && !evt.isDefaultPrevented()) {
  15471. editor.selection.select(target);
  15472. }
  15473. };
  15474. var getResizeTargets = function (elm) {
  15475. if (dom.is(elm, 'figure.image')) {
  15476. return [elm.querySelector('img')];
  15477. } else if (dom.hasClass(elm, 'mce-preview-object') && isNonNullable(elm.firstElementChild)) {
  15478. return [
  15479. elm,
  15480. elm.firstElementChild
  15481. ];
  15482. } else {
  15483. return [elm];
  15484. }
  15485. };
  15486. var isResizable = function (elm) {
  15487. var selector = getObjectResizing(editor);
  15488. if (!selector) {
  15489. return false;
  15490. }
  15491. if (elm.getAttribute('data-mce-resize') === 'false') {
  15492. return false;
  15493. }
  15494. if (elm === editor.getBody()) {
  15495. return false;
  15496. }
  15497. if (dom.hasClass(elm, 'mce-preview-object')) {
  15498. return is$2(SugarElement.fromDom(elm.firstElementChild), selector);
  15499. } else {
  15500. return is$2(SugarElement.fromDom(elm), selector);
  15501. }
  15502. };
  15503. var createGhostElement = function (elm) {
  15504. if (isMedia(elm)) {
  15505. return dom.create('img', { src: Env.transparentSrc });
  15506. } else {
  15507. return elm.cloneNode(true);
  15508. }
  15509. };
  15510. var setSizeProp = function (element, name, value) {
  15511. if (isNonNullable(value)) {
  15512. var targets = getResizeTargets(element);
  15513. each$k(targets, function (target) {
  15514. if (target.style[name] || !editor.schema.isValid(target.nodeName.toLowerCase(), name)) {
  15515. dom.setStyle(target, name, value);
  15516. } else {
  15517. dom.setAttrib(target, name, '' + value);
  15518. }
  15519. });
  15520. }
  15521. };
  15522. var setGhostElmSize = function (ghostElm, width, height) {
  15523. setSizeProp(ghostElm, 'width', width);
  15524. setSizeProp(ghostElm, 'height', height);
  15525. };
  15526. var resizeGhostElement = function (e) {
  15527. var deltaX, deltaY, proportional;
  15528. var resizeHelperX, resizeHelperY;
  15529. deltaX = e.screenX - startX;
  15530. deltaY = e.screenY - startY;
  15531. width = deltaX * selectedHandle[2] + startW;
  15532. height = deltaY * selectedHandle[3] + startH;
  15533. width = width < 5 ? 5 : width;
  15534. height = height < 5 ? 5 : height;
  15535. if ((isImage(selectedElm) || isMedia(selectedElm)) && getResizeImgProportional(editor) !== false) {
  15536. proportional = !VK.modifierPressed(e);
  15537. } else {
  15538. proportional = VK.modifierPressed(e);
  15539. }
  15540. if (proportional) {
  15541. if (abs(deltaX) > abs(deltaY)) {
  15542. height = round(width * ratio);
  15543. width = round(height / ratio);
  15544. } else {
  15545. width = round(height / ratio);
  15546. height = round(width * ratio);
  15547. }
  15548. }
  15549. setGhostElmSize(selectedElmGhost, width, height);
  15550. resizeHelperX = selectedHandle.startPos.x + deltaX;
  15551. resizeHelperY = selectedHandle.startPos.y + deltaY;
  15552. resizeHelperX = resizeHelperX > 0 ? resizeHelperX : 0;
  15553. resizeHelperY = resizeHelperY > 0 ? resizeHelperY : 0;
  15554. dom.setStyles(resizeHelper, {
  15555. left: resizeHelperX,
  15556. top: resizeHelperY,
  15557. display: 'block'
  15558. });
  15559. resizeHelper.innerHTML = width + ' &times; ' + height;
  15560. if (selectedHandle[2] < 0 && selectedElmGhost.clientWidth <= width) {
  15561. dom.setStyle(selectedElmGhost, 'left', selectedElmX + (startW - width));
  15562. }
  15563. if (selectedHandle[3] < 0 && selectedElmGhost.clientHeight <= height) {
  15564. dom.setStyle(selectedElmGhost, 'top', selectedElmY + (startH - height));
  15565. }
  15566. deltaX = rootElement.scrollWidth - startScrollWidth;
  15567. deltaY = rootElement.scrollHeight - startScrollHeight;
  15568. if (deltaX + deltaY !== 0) {
  15569. dom.setStyles(resizeHelper, {
  15570. left: resizeHelperX - deltaX,
  15571. top: resizeHelperY - deltaY
  15572. });
  15573. }
  15574. if (!resizeStarted) {
  15575. fireObjectResizeStart(editor, selectedElm, startW, startH, 'corner-' + selectedHandle.name);
  15576. resizeStarted = true;
  15577. }
  15578. };
  15579. var endGhostResize = function () {
  15580. var wasResizeStarted = resizeStarted;
  15581. resizeStarted = false;
  15582. if (wasResizeStarted) {
  15583. setSizeProp(selectedElm, 'width', width);
  15584. setSizeProp(selectedElm, 'height', height);
  15585. }
  15586. dom.unbind(editableDoc, 'mousemove', resizeGhostElement);
  15587. dom.unbind(editableDoc, 'mouseup', endGhostResize);
  15588. if (rootDocument !== editableDoc) {
  15589. dom.unbind(rootDocument, 'mousemove', resizeGhostElement);
  15590. dom.unbind(rootDocument, 'mouseup', endGhostResize);
  15591. }
  15592. dom.remove(selectedElmGhost);
  15593. dom.remove(resizeHelper);
  15594. dom.remove(resizeBackdrop);
  15595. showResizeRect(selectedElm);
  15596. if (wasResizeStarted) {
  15597. fireObjectResized(editor, selectedElm, width, height, 'corner-' + selectedHandle.name);
  15598. dom.setAttrib(selectedElm, 'style', dom.getAttrib(selectedElm, 'style'));
  15599. }
  15600. editor.nodeChanged();
  15601. };
  15602. var showResizeRect = function (targetElm) {
  15603. unbindResizeHandleEvents();
  15604. var position = dom.getPos(targetElm, rootElement);
  15605. var selectedElmX = position.x;
  15606. var selectedElmY = position.y;
  15607. var rect = targetElm.getBoundingClientRect();
  15608. var targetWidth = rect.width || rect.right - rect.left;
  15609. var targetHeight = rect.height || rect.bottom - rect.top;
  15610. if (selectedElm !== targetElm) {
  15611. hideResizeRect();
  15612. selectedElm = targetElm;
  15613. width = height = 0;
  15614. }
  15615. var e = editor.fire('ObjectSelected', { target: targetElm });
  15616. var selectedValue = dom.getAttrib(selectedElm, elementSelectionAttr, '1');
  15617. if (isResizable(targetElm) && !e.isDefaultPrevented()) {
  15618. each(resizeHandles, function (handle, name) {
  15619. var handleElm;
  15620. var startDrag = function (e) {
  15621. var target = getResizeTargets(selectedElm)[0];
  15622. startX = e.screenX;
  15623. startY = e.screenY;
  15624. startW = target.clientWidth;
  15625. startH = target.clientHeight;
  15626. ratio = startH / startW;
  15627. selectedHandle = handle;
  15628. selectedHandle.name = name;
  15629. selectedHandle.startPos = {
  15630. x: targetWidth * handle[0] + selectedElmX,
  15631. y: targetHeight * handle[1] + selectedElmY
  15632. };
  15633. startScrollWidth = rootElement.scrollWidth;
  15634. startScrollHeight = rootElement.scrollHeight;
  15635. resizeBackdrop = dom.add(rootElement, 'div', {
  15636. 'class': 'mce-resize-backdrop',
  15637. 'data-mce-bogus': 'all'
  15638. });
  15639. dom.setStyles(resizeBackdrop, {
  15640. position: 'fixed',
  15641. left: '0',
  15642. top: '0',
  15643. width: '100%',
  15644. height: '100%'
  15645. });
  15646. selectedElmGhost = createGhostElement(selectedElm);
  15647. dom.addClass(selectedElmGhost, 'mce-clonedresizable');
  15648. dom.setAttrib(selectedElmGhost, 'data-mce-bogus', 'all');
  15649. selectedElmGhost.contentEditable = 'false';
  15650. dom.setStyles(selectedElmGhost, {
  15651. left: selectedElmX,
  15652. top: selectedElmY,
  15653. margin: 0
  15654. });
  15655. setGhostElmSize(selectedElmGhost, targetWidth, targetHeight);
  15656. selectedElmGhost.removeAttribute(elementSelectionAttr);
  15657. rootElement.appendChild(selectedElmGhost);
  15658. dom.bind(editableDoc, 'mousemove', resizeGhostElement);
  15659. dom.bind(editableDoc, 'mouseup', endGhostResize);
  15660. if (rootDocument !== editableDoc) {
  15661. dom.bind(rootDocument, 'mousemove', resizeGhostElement);
  15662. dom.bind(rootDocument, 'mouseup', endGhostResize);
  15663. }
  15664. resizeHelper = dom.add(rootElement, 'div', {
  15665. 'class': 'mce-resize-helper',
  15666. 'data-mce-bogus': 'all'
  15667. }, startW + ' &times; ' + startH);
  15668. };
  15669. handleElm = dom.get('mceResizeHandle' + name);
  15670. if (handleElm) {
  15671. dom.remove(handleElm);
  15672. }
  15673. handleElm = dom.add(rootElement, 'div', {
  15674. 'id': 'mceResizeHandle' + name,
  15675. 'data-mce-bogus': 'all',
  15676. 'class': 'mce-resizehandle',
  15677. 'unselectable': true,
  15678. 'style': 'cursor:' + name + '-resize; margin:0; padding:0'
  15679. });
  15680. if (Env.ie === 11) {
  15681. handleElm.contentEditable = false;
  15682. }
  15683. dom.bind(handleElm, 'mousedown', function (e) {
  15684. e.stopImmediatePropagation();
  15685. e.preventDefault();
  15686. startDrag(e);
  15687. });
  15688. handle.elm = handleElm;
  15689. dom.setStyles(handleElm, {
  15690. left: targetWidth * handle[0] + selectedElmX - handleElm.offsetWidth / 2,
  15691. top: targetHeight * handle[1] + selectedElmY - handleElm.offsetHeight / 2
  15692. });
  15693. });
  15694. } else {
  15695. hideResizeRect();
  15696. }
  15697. if (!dom.getAttrib(selectedElm, elementSelectionAttr)) {
  15698. selectedElm.setAttribute(elementSelectionAttr, selectedValue);
  15699. }
  15700. };
  15701. var hideResizeRect = function () {
  15702. unbindResizeHandleEvents();
  15703. if (selectedElm) {
  15704. selectedElm.removeAttribute(elementSelectionAttr);
  15705. }
  15706. each$j(resizeHandles, function (value, name) {
  15707. var handleElm = dom.get('mceResizeHandle' + name);
  15708. if (handleElm) {
  15709. dom.unbind(handleElm);
  15710. dom.remove(handleElm);
  15711. }
  15712. });
  15713. };
  15714. var updateResizeRect = function (e) {
  15715. var startElm, controlElm;
  15716. var isChildOrEqual = function (node, parent) {
  15717. if (node) {
  15718. do {
  15719. if (node === parent) {
  15720. return true;
  15721. }
  15722. } while (node = node.parentNode);
  15723. }
  15724. };
  15725. if (resizeStarted || editor.removed) {
  15726. return;
  15727. }
  15728. each(dom.select('img[data-mce-selected],hr[data-mce-selected]'), function (img) {
  15729. img.removeAttribute(elementSelectionAttr);
  15730. });
  15731. controlElm = e.type === 'mousedown' ? e.target : selection.getNode();
  15732. controlElm = dom.$(controlElm).closest('table,img,figure.image,hr,video,span.mce-preview-object')[0];
  15733. if (isChildOrEqual(controlElm, rootElement)) {
  15734. disableGeckoResize();
  15735. startElm = selection.getStart(true);
  15736. if (isChildOrEqual(startElm, controlElm) && isChildOrEqual(selection.getEnd(true), controlElm)) {
  15737. showResizeRect(controlElm);
  15738. return;
  15739. }
  15740. }
  15741. hideResizeRect();
  15742. };
  15743. var isWithinContentEditableFalse = function (elm) {
  15744. return isContentEditableFalse$5(getContentEditableRoot$1(editor.getBody(), elm));
  15745. };
  15746. var unbindResizeHandleEvents = function () {
  15747. each$j(resizeHandles, function (handle) {
  15748. if (handle.elm) {
  15749. dom.unbind(handle.elm);
  15750. delete handle.elm;
  15751. }
  15752. });
  15753. };
  15754. var disableGeckoResize = function () {
  15755. try {
  15756. editor.getDoc().execCommand('enableObjectResizing', false, 'false');
  15757. } catch (ex) {
  15758. }
  15759. };
  15760. editor.on('init', function () {
  15761. disableGeckoResize();
  15762. if (Env.browser.isIE() || Env.browser.isEdge()) {
  15763. editor.on('mousedown click', function (e) {
  15764. var target = e.target, nodeName = target.nodeName;
  15765. if (!resizeStarted && /^(TABLE|IMG|HR)$/.test(nodeName) && !isWithinContentEditableFalse(target)) {
  15766. if (e.button !== 2) {
  15767. editor.selection.select(target, nodeName === 'TABLE');
  15768. }
  15769. if (e.type === 'mousedown') {
  15770. editor.nodeChanged();
  15771. }
  15772. }
  15773. });
  15774. var handleMSControlSelect_1 = function (e) {
  15775. var delayedSelect = function (node) {
  15776. Delay.setEditorTimeout(editor, function () {
  15777. return editor.selection.select(node);
  15778. });
  15779. };
  15780. if (isWithinContentEditableFalse(e.target) || isMedia$2(e.target)) {
  15781. e.preventDefault();
  15782. delayedSelect(e.target);
  15783. return;
  15784. }
  15785. if (/^(TABLE|IMG|HR)$/.test(e.target.nodeName)) {
  15786. e.preventDefault();
  15787. if (e.target.tagName === 'IMG') {
  15788. delayedSelect(e.target);
  15789. }
  15790. }
  15791. };
  15792. dom.bind(rootElement, 'mscontrolselect', handleMSControlSelect_1);
  15793. editor.on('remove', function () {
  15794. return dom.unbind(rootElement, 'mscontrolselect', handleMSControlSelect_1);
  15795. });
  15796. }
  15797. var throttledUpdateResizeRect = Delay.throttle(function (e) {
  15798. if (!editor.composing) {
  15799. updateResizeRect(e);
  15800. }
  15801. });
  15802. editor.on('nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged', throttledUpdateResizeRect);
  15803. editor.on('keyup compositionend', function (e) {
  15804. if (selectedElm && selectedElm.nodeName === 'TABLE') {
  15805. throttledUpdateResizeRect(e);
  15806. }
  15807. });
  15808. editor.on('hide blur', hideResizeRect);
  15809. editor.on('contextmenu longpress', contextMenuSelectImage, true);
  15810. });
  15811. editor.on('remove', unbindResizeHandleEvents);
  15812. var destroy = function () {
  15813. selectedElm = selectedElmGhost = resizeBackdrop = null;
  15814. };
  15815. return {
  15816. isResizable: isResizable,
  15817. showResizeRect: showResizeRect,
  15818. hideResizeRect: hideResizeRect,
  15819. updateResizeRect: updateResizeRect,
  15820. destroy: destroy
  15821. };
  15822. };
  15823. var hasCeProperty = function (node) {
  15824. return isContentEditableTrue$4(node) || isContentEditableFalse$b(node);
  15825. };
  15826. var findParent$1 = function (node, rootNode, predicate) {
  15827. while (node && node !== rootNode) {
  15828. if (predicate(node)) {
  15829. return node;
  15830. }
  15831. node = node.parentNode;
  15832. }
  15833. return null;
  15834. };
  15835. var findClosestIeRange = function (clientX, clientY, doc) {
  15836. var rects;
  15837. var element = doc.elementFromPoint(clientX, clientY);
  15838. var rng = doc.body.createTextRange();
  15839. if (!element || element.tagName === 'HTML') {
  15840. element = doc.body;
  15841. }
  15842. rng.moveToElementText(element);
  15843. rects = Tools.toArray(rng.getClientRects());
  15844. rects = rects.sort(function (a, b) {
  15845. a = Math.abs(Math.max(a.top - clientY, a.bottom - clientY));
  15846. b = Math.abs(Math.max(b.top - clientY, b.bottom - clientY));
  15847. return a - b;
  15848. });
  15849. if (rects.length > 0) {
  15850. clientY = (rects[0].bottom + rects[0].top) / 2;
  15851. try {
  15852. rng.moveToPoint(clientX, clientY);
  15853. rng.collapse(true);
  15854. return rng;
  15855. } catch (ex) {
  15856. }
  15857. }
  15858. return null;
  15859. };
  15860. var moveOutOfContentEditableFalse = function (rng, rootNode) {
  15861. var parentElement = rng && rng.parentElement ? rng.parentElement() : null;
  15862. return isContentEditableFalse$b(findParent$1(parentElement, rootNode, hasCeProperty)) ? null : rng;
  15863. };
  15864. var fromPoint = function (clientX, clientY, doc) {
  15865. var rng, point;
  15866. var pointDoc = doc;
  15867. if (pointDoc.caretPositionFromPoint) {
  15868. point = pointDoc.caretPositionFromPoint(clientX, clientY);
  15869. if (point) {
  15870. rng = doc.createRange();
  15871. rng.setStart(point.offsetNode, point.offset);
  15872. rng.collapse(true);
  15873. }
  15874. } else if (pointDoc.caretRangeFromPoint) {
  15875. rng = pointDoc.caretRangeFromPoint(clientX, clientY);
  15876. } else if (pointDoc.body.createTextRange) {
  15877. rng = pointDoc.body.createTextRange();
  15878. try {
  15879. rng.moveToPoint(clientX, clientY);
  15880. rng.collapse(true);
  15881. } catch (ex) {
  15882. rng = findClosestIeRange(clientX, clientY, doc);
  15883. }
  15884. return moveOutOfContentEditableFalse(rng, doc.body);
  15885. }
  15886. return rng;
  15887. };
  15888. var isEq$4 = function (rng1, rng2) {
  15889. return rng1 && rng2 && (rng1.startContainer === rng2.startContainer && rng1.startOffset === rng2.startOffset) && (rng1.endContainer === rng2.endContainer && rng1.endOffset === rng2.endOffset);
  15890. };
  15891. var findParent = function (node, rootNode, predicate) {
  15892. while (node && node !== rootNode) {
  15893. if (predicate(node)) {
  15894. return node;
  15895. }
  15896. node = node.parentNode;
  15897. }
  15898. return null;
  15899. };
  15900. var hasParent$1 = function (node, rootNode, predicate) {
  15901. return findParent(node, rootNode, predicate) !== null;
  15902. };
  15903. var hasParentWithName = function (node, rootNode, name) {
  15904. return hasParent$1(node, rootNode, function (node) {
  15905. return node.nodeName === name;
  15906. });
  15907. };
  15908. var isTable = function (node) {
  15909. return node && node.nodeName === 'TABLE';
  15910. };
  15911. var isTableCell$2 = function (node) {
  15912. return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
  15913. };
  15914. var isCeFalseCaretContainer = function (node, rootNode) {
  15915. return isCaretContainer$2(node) && hasParent$1(node, rootNode, isCaretNode) === false;
  15916. };
  15917. var hasBrBeforeAfter = function (dom, node, left) {
  15918. var walker = new DomTreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || dom.getRoot());
  15919. while (node = walker[left ? 'prev' : 'next']()) {
  15920. if (isBr$5(node)) {
  15921. return true;
  15922. }
  15923. }
  15924. };
  15925. var isPrevNode = function (node, name) {
  15926. return node.previousSibling && node.previousSibling.nodeName === name;
  15927. };
  15928. var hasContentEditableFalseParent = function (body, node) {
  15929. while (node && node !== body) {
  15930. if (isContentEditableFalse$b(node)) {
  15931. return true;
  15932. }
  15933. node = node.parentNode;
  15934. }
  15935. return false;
  15936. };
  15937. var findTextNodeRelative = function (dom, isAfterNode, collapsed, left, startNode) {
  15938. var lastInlineElement;
  15939. var body = dom.getRoot();
  15940. var node;
  15941. var nonEmptyElementsMap = dom.schema.getNonEmptyElements();
  15942. var parentBlockContainer = dom.getParent(startNode.parentNode, dom.isBlock) || body;
  15943. if (left && isBr$5(startNode) && isAfterNode && dom.isEmpty(parentBlockContainer)) {
  15944. return Optional.some(CaretPosition(startNode.parentNode, dom.nodeIndex(startNode)));
  15945. }
  15946. var walker = new DomTreeWalker(startNode, parentBlockContainer);
  15947. while (node = walker[left ? 'prev' : 'next']()) {
  15948. if (dom.getContentEditableParent(node) === 'false' || isCeFalseCaretContainer(node, body)) {
  15949. return Optional.none();
  15950. }
  15951. if (isText$7(node) && node.nodeValue.length > 0) {
  15952. if (hasParentWithName(node, body, 'A') === false) {
  15953. return Optional.some(CaretPosition(node, left ? node.nodeValue.length : 0));
  15954. }
  15955. return Optional.none();
  15956. }
  15957. if (dom.isBlock(node) || nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
  15958. return Optional.none();
  15959. }
  15960. lastInlineElement = node;
  15961. }
  15962. if (collapsed && lastInlineElement) {
  15963. return Optional.some(CaretPosition(lastInlineElement, 0));
  15964. }
  15965. return Optional.none();
  15966. };
  15967. var normalizeEndPoint = function (dom, collapsed, start, rng) {
  15968. var container, offset;
  15969. var body = dom.getRoot();
  15970. var node;
  15971. var directionLeft, normalized = false;
  15972. container = rng[(start ? 'start' : 'end') + 'Container'];
  15973. offset = rng[(start ? 'start' : 'end') + 'Offset'];
  15974. var isAfterNode = isElement$5(container) && offset === container.childNodes.length;
  15975. var nonEmptyElementsMap = dom.schema.getNonEmptyElements();
  15976. directionLeft = start;
  15977. if (isCaretContainer$2(container)) {
  15978. return Optional.none();
  15979. }
  15980. if (isElement$5(container) && offset > container.childNodes.length - 1) {
  15981. directionLeft = false;
  15982. }
  15983. if (isDocument$1(container)) {
  15984. container = body;
  15985. offset = 0;
  15986. }
  15987. if (container === body) {
  15988. if (directionLeft) {
  15989. node = container.childNodes[offset > 0 ? offset - 1 : 0];
  15990. if (node) {
  15991. if (isCaretContainer$2(node)) {
  15992. return Optional.none();
  15993. }
  15994. if (nonEmptyElementsMap[node.nodeName] || isTable(node)) {
  15995. return Optional.none();
  15996. }
  15997. }
  15998. }
  15999. if (container.hasChildNodes()) {
  16000. offset = Math.min(!directionLeft && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1);
  16001. container = container.childNodes[offset];
  16002. offset = isText$7(container) && isAfterNode ? container.data.length : 0;
  16003. if (!collapsed && container === body.lastChild && isTable(container)) {
  16004. return Optional.none();
  16005. }
  16006. if (hasContentEditableFalseParent(body, container) || isCaretContainer$2(container)) {
  16007. return Optional.none();
  16008. }
  16009. if (container.hasChildNodes() && isTable(container) === false) {
  16010. node = container;
  16011. var walker = new DomTreeWalker(container, body);
  16012. do {
  16013. if (isContentEditableFalse$b(node) || isCaretContainer$2(node)) {
  16014. normalized = false;
  16015. break;
  16016. }
  16017. if (isText$7(node) && node.nodeValue.length > 0) {
  16018. offset = directionLeft ? 0 : node.nodeValue.length;
  16019. container = node;
  16020. normalized = true;
  16021. break;
  16022. }
  16023. if (nonEmptyElementsMap[node.nodeName.toLowerCase()] && !isTableCell$2(node)) {
  16024. offset = dom.nodeIndex(node);
  16025. container = node.parentNode;
  16026. if (!directionLeft) {
  16027. offset++;
  16028. }
  16029. normalized = true;
  16030. break;
  16031. }
  16032. } while (node = directionLeft ? walker.next() : walker.prev());
  16033. }
  16034. }
  16035. }
  16036. if (collapsed) {
  16037. if (isText$7(container) && offset === 0) {
  16038. findTextNodeRelative(dom, isAfterNode, collapsed, true, container).each(function (pos) {
  16039. container = pos.container();
  16040. offset = pos.offset();
  16041. normalized = true;
  16042. });
  16043. }
  16044. if (isElement$5(container)) {
  16045. node = container.childNodes[offset];
  16046. if (!node) {
  16047. node = container.childNodes[offset - 1];
  16048. }
  16049. if (node && isBr$5(node) && !isPrevNode(node, 'A') && !hasBrBeforeAfter(dom, node, false) && !hasBrBeforeAfter(dom, node, true)) {
  16050. findTextNodeRelative(dom, isAfterNode, collapsed, true, node).each(function (pos) {
  16051. container = pos.container();
  16052. offset = pos.offset();
  16053. normalized = true;
  16054. });
  16055. }
  16056. }
  16057. }
  16058. if (directionLeft && !collapsed && isText$7(container) && offset === container.nodeValue.length) {
  16059. findTextNodeRelative(dom, isAfterNode, collapsed, false, container).each(function (pos) {
  16060. container = pos.container();
  16061. offset = pos.offset();
  16062. normalized = true;
  16063. });
  16064. }
  16065. return normalized ? Optional.some(CaretPosition(container, offset)) : Optional.none();
  16066. };
  16067. var normalize$2 = function (dom, rng) {
  16068. var collapsed = rng.collapsed, normRng = rng.cloneRange();
  16069. var startPos = CaretPosition.fromRangeStart(rng);
  16070. normalizeEndPoint(dom, collapsed, true, normRng).each(function (pos) {
  16071. if (!collapsed || !CaretPosition.isAbove(startPos, pos)) {
  16072. normRng.setStart(pos.container(), pos.offset());
  16073. }
  16074. });
  16075. if (!collapsed) {
  16076. normalizeEndPoint(dom, collapsed, false, normRng).each(function (pos) {
  16077. normRng.setEnd(pos.container(), pos.offset());
  16078. });
  16079. }
  16080. if (collapsed) {
  16081. normRng.collapse(true);
  16082. }
  16083. return isEq$4(rng, normRng) ? Optional.none() : Optional.some(normRng);
  16084. };
  16085. var splitText = function (node, offset) {
  16086. return node.splitText(offset);
  16087. };
  16088. var split = function (rng) {
  16089. var startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, endOffset = rng.endOffset;
  16090. if (startContainer === endContainer && isText$7(startContainer)) {
  16091. if (startOffset > 0 && startOffset < startContainer.nodeValue.length) {
  16092. endContainer = splitText(startContainer, startOffset);
  16093. startContainer = endContainer.previousSibling;
  16094. if (endOffset > startOffset) {
  16095. endOffset = endOffset - startOffset;
  16096. startContainer = endContainer = splitText(endContainer, endOffset).previousSibling;
  16097. endOffset = endContainer.nodeValue.length;
  16098. startOffset = 0;
  16099. } else {
  16100. endOffset = 0;
  16101. }
  16102. }
  16103. } else {
  16104. if (isText$7(startContainer) && startOffset > 0 && startOffset < startContainer.nodeValue.length) {
  16105. startContainer = splitText(startContainer, startOffset);
  16106. startOffset = 0;
  16107. }
  16108. if (isText$7(endContainer) && endOffset > 0 && endOffset < endContainer.nodeValue.length) {
  16109. endContainer = splitText(endContainer, endOffset).previousSibling;
  16110. endOffset = endContainer.nodeValue.length;
  16111. }
  16112. }
  16113. return {
  16114. startContainer: startContainer,
  16115. startOffset: startOffset,
  16116. endContainer: endContainer,
  16117. endOffset: endOffset
  16118. };
  16119. };
  16120. var RangeUtils = function (dom) {
  16121. var walk = function (rng, callback) {
  16122. return walk$2(dom, rng, callback);
  16123. };
  16124. var split$1 = split;
  16125. var normalize = function (rng) {
  16126. return normalize$2(dom, rng).fold(never, function (normalizedRng) {
  16127. rng.setStart(normalizedRng.startContainer, normalizedRng.startOffset);
  16128. rng.setEnd(normalizedRng.endContainer, normalizedRng.endOffset);
  16129. return true;
  16130. });
  16131. };
  16132. return {
  16133. walk: walk,
  16134. split: split$1,
  16135. normalize: normalize
  16136. };
  16137. };
  16138. RangeUtils.compareRanges = isEq$4;
  16139. RangeUtils.getCaretRangeFromPoint = fromPoint;
  16140. RangeUtils.getSelectedNode = getSelectedNode;
  16141. RangeUtils.getNode = getNode$1;
  16142. var Dimension = function (name, getOffset) {
  16143. var set = function (element, h) {
  16144. if (!isNumber(h) && !h.match(/^[0-9]+$/)) {
  16145. throw new Error(name + '.set accepts only positive integer values. Value was ' + h);
  16146. }
  16147. var dom = element.dom;
  16148. if (isSupported(dom)) {
  16149. dom.style[name] = h + 'px';
  16150. }
  16151. };
  16152. var get = function (element) {
  16153. var r = getOffset(element);
  16154. if (r <= 0 || r === null) {
  16155. var css = get$5(element, name);
  16156. return parseFloat(css) || 0;
  16157. }
  16158. return r;
  16159. };
  16160. var getOuter = get;
  16161. var aggregate = function (element, properties) {
  16162. return foldl(properties, function (acc, property) {
  16163. var val = get$5(element, property);
  16164. var value = val === undefined ? 0 : parseInt(val, 10);
  16165. return isNaN(value) ? acc : acc + value;
  16166. }, 0);
  16167. };
  16168. var max = function (element, value, properties) {
  16169. var cumulativeInclusions = aggregate(element, properties);
  16170. var absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;
  16171. return absoluteMax;
  16172. };
  16173. return {
  16174. set: set,
  16175. get: get,
  16176. getOuter: getOuter,
  16177. aggregate: aggregate,
  16178. max: max
  16179. };
  16180. };
  16181. var api = Dimension('height', function (element) {
  16182. var dom = element.dom;
  16183. return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;
  16184. });
  16185. var get$1 = function (element) {
  16186. return api.get(element);
  16187. };
  16188. var walkUp = function (navigation, doc) {
  16189. var frame = navigation.view(doc);
  16190. return frame.fold(constant([]), function (f) {
  16191. var parent = navigation.owner(f);
  16192. var rest = walkUp(navigation, parent);
  16193. return [f].concat(rest);
  16194. });
  16195. };
  16196. var pathTo = function (element, navigation) {
  16197. var d = navigation.owner(element);
  16198. return walkUp(navigation, d);
  16199. };
  16200. var view = function (doc) {
  16201. var _a;
  16202. var element = doc.dom === document ? Optional.none() : Optional.from((_a = doc.dom.defaultView) === null || _a === void 0 ? void 0 : _a.frameElement);
  16203. return element.map(SugarElement.fromDom);
  16204. };
  16205. var owner = function (element) {
  16206. return documentOrOwner(element);
  16207. };
  16208. var Navigation = /*#__PURE__*/Object.freeze({
  16209. __proto__: null,
  16210. view: view,
  16211. owner: owner
  16212. });
  16213. var find$1 = function (element) {
  16214. var doc = SugarElement.fromDom(document);
  16215. var scroll = get$8(doc);
  16216. var frames = pathTo(element, Navigation);
  16217. var offset = viewport(element);
  16218. var r = foldr(frames, function (b, a) {
  16219. var loc = viewport(a);
  16220. return {
  16221. left: b.left + loc.left,
  16222. top: b.top + loc.top
  16223. };
  16224. }, {
  16225. left: 0,
  16226. top: 0
  16227. });
  16228. return SugarPosition(r.left + offset.left + scroll.left, r.top + offset.top + scroll.top);
  16229. };
  16230. var excludeFromDescend = function (element) {
  16231. return name(element) === 'textarea';
  16232. };
  16233. var fireScrollIntoViewEvent = function (editor, data) {
  16234. var scrollEvent = editor.fire('ScrollIntoView', data);
  16235. return scrollEvent.isDefaultPrevented();
  16236. };
  16237. var fireAfterScrollIntoViewEvent = function (editor, data) {
  16238. editor.fire('AfterScrollIntoView', data);
  16239. };
  16240. var descend = function (element, offset) {
  16241. var children$1 = children(element);
  16242. if (children$1.length === 0 || excludeFromDescend(element)) {
  16243. return {
  16244. element: element,
  16245. offset: offset
  16246. };
  16247. } else if (offset < children$1.length && !excludeFromDescend(children$1[offset])) {
  16248. return {
  16249. element: children$1[offset],
  16250. offset: 0
  16251. };
  16252. } else {
  16253. var last = children$1[children$1.length - 1];
  16254. if (excludeFromDescend(last)) {
  16255. return {
  16256. element: element,
  16257. offset: offset
  16258. };
  16259. } else {
  16260. if (name(last) === 'img') {
  16261. return {
  16262. element: last,
  16263. offset: 1
  16264. };
  16265. } else if (isText$8(last)) {
  16266. return {
  16267. element: last,
  16268. offset: get$2(last).length
  16269. };
  16270. } else {
  16271. return {
  16272. element: last,
  16273. offset: children(last).length
  16274. };
  16275. }
  16276. }
  16277. }
  16278. };
  16279. var markerInfo = function (element, cleanupFun) {
  16280. var pos = absolute(element);
  16281. var height = get$1(element);
  16282. return {
  16283. element: element,
  16284. bottom: pos.top + height,
  16285. height: height,
  16286. pos: pos,
  16287. cleanup: cleanupFun
  16288. };
  16289. };
  16290. var createMarker = function (element, offset) {
  16291. var startPoint = descend(element, offset);
  16292. var span = SugarElement.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">' + ZWSP$1 + '</span>');
  16293. before$4(startPoint.element, span);
  16294. return markerInfo(span, function () {
  16295. return remove$7(span);
  16296. });
  16297. };
  16298. var elementMarker = function (element) {
  16299. return markerInfo(SugarElement.fromDom(element), noop);
  16300. };
  16301. var withMarker = function (editor, f, rng, alignToTop) {
  16302. preserveWith(editor, function (_s, _e) {
  16303. return applyWithMarker(editor, f, rng, alignToTop);
  16304. }, rng);
  16305. };
  16306. var withScrollEvents = function (editor, doc, f, marker, alignToTop) {
  16307. var data = {
  16308. elm: marker.element.dom,
  16309. alignToTop: alignToTop
  16310. };
  16311. if (fireScrollIntoViewEvent(editor, data)) {
  16312. return;
  16313. }
  16314. var scrollTop = get$8(doc).top;
  16315. f(doc, scrollTop, marker, alignToTop);
  16316. fireAfterScrollIntoViewEvent(editor, data);
  16317. };
  16318. var applyWithMarker = function (editor, f, rng, alignToTop) {
  16319. var body = SugarElement.fromDom(editor.getBody());
  16320. var doc = SugarElement.fromDom(editor.getDoc());
  16321. reflow(body);
  16322. var marker = createMarker(SugarElement.fromDom(rng.startContainer), rng.startOffset);
  16323. withScrollEvents(editor, doc, f, marker, alignToTop);
  16324. marker.cleanup();
  16325. };
  16326. var withElement = function (editor, element, f, alignToTop) {
  16327. var doc = SugarElement.fromDom(editor.getDoc());
  16328. withScrollEvents(editor, doc, f, elementMarker(element), alignToTop);
  16329. };
  16330. var preserveWith = function (editor, f, rng) {
  16331. var startElement = rng.startContainer;
  16332. var startOffset = rng.startOffset;
  16333. var endElement = rng.endContainer;
  16334. var endOffset = rng.endOffset;
  16335. f(SugarElement.fromDom(startElement), SugarElement.fromDom(endElement));
  16336. var newRng = editor.dom.createRng();
  16337. newRng.setStart(startElement, startOffset);
  16338. newRng.setEnd(endElement, endOffset);
  16339. editor.selection.setRng(rng);
  16340. };
  16341. var scrollToMarker = function (marker, viewHeight, alignToTop, doc) {
  16342. var pos = marker.pos;
  16343. if (alignToTop) {
  16344. to(pos.left, pos.top, doc);
  16345. } else {
  16346. var y = pos.top - viewHeight + marker.height;
  16347. to(pos.left, y, doc);
  16348. }
  16349. };
  16350. var intoWindowIfNeeded = function (doc, scrollTop, viewHeight, marker, alignToTop) {
  16351. var viewportBottom = viewHeight + scrollTop;
  16352. var markerTop = marker.pos.top;
  16353. var markerBottom = marker.bottom;
  16354. var largerThanViewport = markerBottom - markerTop >= viewHeight;
  16355. if (markerTop < scrollTop) {
  16356. scrollToMarker(marker, viewHeight, alignToTop !== false, doc);
  16357. } else if (markerTop > viewportBottom) {
  16358. var align = largerThanViewport ? alignToTop !== false : alignToTop === true;
  16359. scrollToMarker(marker, viewHeight, align, doc);
  16360. } else if (markerBottom > viewportBottom && !largerThanViewport) {
  16361. scrollToMarker(marker, viewHeight, alignToTop === true, doc);
  16362. }
  16363. };
  16364. var intoWindow = function (doc, scrollTop, marker, alignToTop) {
  16365. var viewHeight = doc.dom.defaultView.innerHeight;
  16366. intoWindowIfNeeded(doc, scrollTop, viewHeight, marker, alignToTop);
  16367. };
  16368. var intoFrame = function (doc, scrollTop, marker, alignToTop) {
  16369. var frameViewHeight = doc.dom.defaultView.innerHeight;
  16370. intoWindowIfNeeded(doc, scrollTop, frameViewHeight, marker, alignToTop);
  16371. var op = find$1(marker.element);
  16372. var viewportBounds = getBounds(window);
  16373. if (op.top < viewportBounds.y) {
  16374. intoView(marker.element, alignToTop !== false);
  16375. } else if (op.top > viewportBounds.bottom) {
  16376. intoView(marker.element, alignToTop === true);
  16377. }
  16378. };
  16379. var rangeIntoWindow = function (editor, rng, alignToTop) {
  16380. return withMarker(editor, intoWindow, rng, alignToTop);
  16381. };
  16382. var elementIntoWindow = function (editor, element, alignToTop) {
  16383. return withElement(editor, element, intoWindow, alignToTop);
  16384. };
  16385. var rangeIntoFrame = function (editor, rng, alignToTop) {
  16386. return withMarker(editor, intoFrame, rng, alignToTop);
  16387. };
  16388. var elementIntoFrame = function (editor, element, alignToTop) {
  16389. return withElement(editor, element, intoFrame, alignToTop);
  16390. };
  16391. var scrollElementIntoView = function (editor, element, alignToTop) {
  16392. var scroller = editor.inline ? elementIntoWindow : elementIntoFrame;
  16393. scroller(editor, element, alignToTop);
  16394. };
  16395. var scrollRangeIntoView = function (editor, rng, alignToTop) {
  16396. var scroller = editor.inline ? rangeIntoWindow : rangeIntoFrame;
  16397. scroller(editor, rng, alignToTop);
  16398. };
  16399. var getDocument = function () {
  16400. return SugarElement.fromDom(document);
  16401. };
  16402. var focus$1 = function (element) {
  16403. return element.dom.focus();
  16404. };
  16405. var hasFocus$1 = function (element) {
  16406. var root = getRootNode(element).dom;
  16407. return element.dom === root.activeElement;
  16408. };
  16409. var active = function (root) {
  16410. if (root === void 0) {
  16411. root = getDocument();
  16412. }
  16413. return Optional.from(root.dom.activeElement).map(SugarElement.fromDom);
  16414. };
  16415. var search = function (element) {
  16416. return active(getRootNode(element)).filter(function (e) {
  16417. return element.dom.contains(e.dom);
  16418. });
  16419. };
  16420. var create$5 = function (start, soffset, finish, foffset) {
  16421. return {
  16422. start: start,
  16423. soffset: soffset,
  16424. finish: finish,
  16425. foffset: foffset
  16426. };
  16427. };
  16428. var SimRange = { create: create$5 };
  16429. var adt$1 = Adt.generate([
  16430. { before: ['element'] },
  16431. {
  16432. on: [
  16433. 'element',
  16434. 'offset'
  16435. ]
  16436. },
  16437. { after: ['element'] }
  16438. ]);
  16439. var cata = function (subject, onBefore, onOn, onAfter) {
  16440. return subject.fold(onBefore, onOn, onAfter);
  16441. };
  16442. var getStart$2 = function (situ) {
  16443. return situ.fold(identity, identity, identity);
  16444. };
  16445. var before$1 = adt$1.before;
  16446. var on = adt$1.on;
  16447. var after$1 = adt$1.after;
  16448. var Situ = {
  16449. before: before$1,
  16450. on: on,
  16451. after: after$1,
  16452. cata: cata,
  16453. getStart: getStart$2
  16454. };
  16455. var adt = Adt.generate([
  16456. { domRange: ['rng'] },
  16457. {
  16458. relative: [
  16459. 'startSitu',
  16460. 'finishSitu'
  16461. ]
  16462. },
  16463. {
  16464. exact: [
  16465. 'start',
  16466. 'soffset',
  16467. 'finish',
  16468. 'foffset'
  16469. ]
  16470. }
  16471. ]);
  16472. var exactFromRange = function (simRange) {
  16473. return adt.exact(simRange.start, simRange.soffset, simRange.finish, simRange.foffset);
  16474. };
  16475. var getStart$1 = function (selection) {
  16476. return selection.match({
  16477. domRange: function (rng) {
  16478. return SugarElement.fromDom(rng.startContainer);
  16479. },
  16480. relative: function (startSitu, _finishSitu) {
  16481. return Situ.getStart(startSitu);
  16482. },
  16483. exact: function (start, _soffset, _finish, _foffset) {
  16484. return start;
  16485. }
  16486. });
  16487. };
  16488. var domRange = adt.domRange;
  16489. var relative = adt.relative;
  16490. var exact = adt.exact;
  16491. var getWin = function (selection) {
  16492. var start = getStart$1(selection);
  16493. return defaultView(start);
  16494. };
  16495. var range = SimRange.create;
  16496. var SimSelection = {
  16497. domRange: domRange,
  16498. relative: relative,
  16499. exact: exact,
  16500. exactFromRange: exactFromRange,
  16501. getWin: getWin,
  16502. range: range
  16503. };
  16504. var browser$1 = detect().browser;
  16505. var clamp$1 = function (offset, element) {
  16506. var max = isText$8(element) ? get$2(element).length : children(element).length + 1;
  16507. if (offset > max) {
  16508. return max;
  16509. } else if (offset < 0) {
  16510. return 0;
  16511. }
  16512. return offset;
  16513. };
  16514. var normalizeRng = function (rng) {
  16515. return SimSelection.range(rng.start, clamp$1(rng.soffset, rng.start), rng.finish, clamp$1(rng.foffset, rng.finish));
  16516. };
  16517. var isOrContains = function (root, elm) {
  16518. return !isRestrictedNode(elm.dom) && (contains$1(root, elm) || eq(root, elm));
  16519. };
  16520. var isRngInRoot = function (root) {
  16521. return function (rng) {
  16522. return isOrContains(root, rng.start) && isOrContains(root, rng.finish);
  16523. };
  16524. };
  16525. var shouldStore = function (editor) {
  16526. return editor.inline === true || browser$1.isIE();
  16527. };
  16528. var nativeRangeToSelectionRange = function (r) {
  16529. return SimSelection.range(SugarElement.fromDom(r.startContainer), r.startOffset, SugarElement.fromDom(r.endContainer), r.endOffset);
  16530. };
  16531. var readRange = function (win) {
  16532. var selection = win.getSelection();
  16533. var rng = !selection || selection.rangeCount === 0 ? Optional.none() : Optional.from(selection.getRangeAt(0));
  16534. return rng.map(nativeRangeToSelectionRange);
  16535. };
  16536. var getBookmark = function (root) {
  16537. var win = defaultView(root);
  16538. return readRange(win.dom).filter(isRngInRoot(root));
  16539. };
  16540. var validate = function (root, bookmark) {
  16541. return Optional.from(bookmark).filter(isRngInRoot(root)).map(normalizeRng);
  16542. };
  16543. var bookmarkToNativeRng = function (bookmark) {
  16544. var rng = document.createRange();
  16545. try {
  16546. rng.setStart(bookmark.start.dom, bookmark.soffset);
  16547. rng.setEnd(bookmark.finish.dom, bookmark.foffset);
  16548. return Optional.some(rng);
  16549. } catch (_) {
  16550. return Optional.none();
  16551. }
  16552. };
  16553. var store = function (editor) {
  16554. var newBookmark = shouldStore(editor) ? getBookmark(SugarElement.fromDom(editor.getBody())) : Optional.none();
  16555. editor.bookmark = newBookmark.isSome() ? newBookmark : editor.bookmark;
  16556. };
  16557. var storeNative = function (editor, rng) {
  16558. var root = SugarElement.fromDom(editor.getBody());
  16559. var range = shouldStore(editor) ? Optional.from(rng) : Optional.none();
  16560. var newBookmark = range.map(nativeRangeToSelectionRange).filter(isRngInRoot(root));
  16561. editor.bookmark = newBookmark.isSome() ? newBookmark : editor.bookmark;
  16562. };
  16563. var getRng = function (editor) {
  16564. var bookmark = editor.bookmark ? editor.bookmark : Optional.none();
  16565. return bookmark.bind(function (x) {
  16566. return validate(SugarElement.fromDom(editor.getBody()), x);
  16567. }).bind(bookmarkToNativeRng);
  16568. };
  16569. var restore = function (editor) {
  16570. getRng(editor).each(function (rng) {
  16571. return editor.selection.setRng(rng);
  16572. });
  16573. };
  16574. var isEditorUIElement$1 = function (elm) {
  16575. var className = elm.className.toString();
  16576. return className.indexOf('tox-') !== -1 || className.indexOf('mce-') !== -1;
  16577. };
  16578. var FocusManager = { isEditorUIElement: isEditorUIElement$1 };
  16579. var isManualNodeChange = function (e) {
  16580. return e.type === 'nodechange' && e.selectionChange;
  16581. };
  16582. var registerPageMouseUp = function (editor, throttledStore) {
  16583. var mouseUpPage = function () {
  16584. throttledStore.throttle();
  16585. };
  16586. DOMUtils.DOM.bind(document, 'mouseup', mouseUpPage);
  16587. editor.on('remove', function () {
  16588. DOMUtils.DOM.unbind(document, 'mouseup', mouseUpPage);
  16589. });
  16590. };
  16591. var registerFocusOut = function (editor) {
  16592. editor.on('focusout', function () {
  16593. store(editor);
  16594. });
  16595. };
  16596. var registerMouseUp = function (editor, throttledStore) {
  16597. editor.on('mouseup touchend', function (_e) {
  16598. throttledStore.throttle();
  16599. });
  16600. };
  16601. var registerEditorEvents = function (editor, throttledStore) {
  16602. var browser = detect().browser;
  16603. if (browser.isIE()) {
  16604. registerFocusOut(editor);
  16605. } else {
  16606. registerMouseUp(editor, throttledStore);
  16607. }
  16608. editor.on('keyup NodeChange', function (e) {
  16609. if (!isManualNodeChange(e)) {
  16610. store(editor);
  16611. }
  16612. });
  16613. };
  16614. var register$3 = function (editor) {
  16615. var throttledStore = first(function () {
  16616. store(editor);
  16617. }, 0);
  16618. editor.on('init', function () {
  16619. if (editor.inline) {
  16620. registerPageMouseUp(editor, throttledStore);
  16621. }
  16622. registerEditorEvents(editor, throttledStore);
  16623. });
  16624. editor.on('remove', function () {
  16625. throttledStore.cancel();
  16626. });
  16627. };
  16628. var documentFocusInHandler;
  16629. var DOM$8 = DOMUtils.DOM;
  16630. var isEditorUIElement = function (elm) {
  16631. return FocusManager.isEditorUIElement(elm);
  16632. };
  16633. var isEditorContentAreaElement = function (elm) {
  16634. var classList = elm.classList;
  16635. if (classList !== undefined) {
  16636. return classList.contains('tox-edit-area') || classList.contains('tox-edit-area__iframe') || classList.contains('mce-content-body');
  16637. } else {
  16638. return false;
  16639. }
  16640. };
  16641. var isUIElement = function (editor, elm) {
  16642. var customSelector = getCustomUiSelector(editor);
  16643. var parent = DOM$8.getParent(elm, function (elm) {
  16644. return isEditorUIElement(elm) || (customSelector ? editor.dom.is(elm, customSelector) : false);
  16645. });
  16646. return parent !== null;
  16647. };
  16648. var getActiveElement = function (editor) {
  16649. try {
  16650. var root = getRootNode(SugarElement.fromDom(editor.getElement()));
  16651. return active(root).fold(function () {
  16652. return document.body;
  16653. }, function (x) {
  16654. return x.dom;
  16655. });
  16656. } catch (ex) {
  16657. return document.body;
  16658. }
  16659. };
  16660. var registerEvents$1 = function (editorManager, e) {
  16661. var editor = e.editor;
  16662. register$3(editor);
  16663. editor.on('focusin', function () {
  16664. var focusedEditor = editorManager.focusedEditor;
  16665. if (focusedEditor !== editor) {
  16666. if (focusedEditor) {
  16667. focusedEditor.fire('blur', { focusedEditor: editor });
  16668. }
  16669. editorManager.setActive(editor);
  16670. editorManager.focusedEditor = editor;
  16671. editor.fire('focus', { blurredEditor: focusedEditor });
  16672. editor.focus(true);
  16673. }
  16674. });
  16675. editor.on('focusout', function () {
  16676. Delay.setEditorTimeout(editor, function () {
  16677. var focusedEditor = editorManager.focusedEditor;
  16678. if (!isUIElement(editor, getActiveElement(editor)) && focusedEditor === editor) {
  16679. editor.fire('blur', { focusedEditor: null });
  16680. editorManager.focusedEditor = null;
  16681. }
  16682. });
  16683. });
  16684. if (!documentFocusInHandler) {
  16685. documentFocusInHandler = function (e) {
  16686. var activeEditor = editorManager.activeEditor;
  16687. if (activeEditor) {
  16688. getOriginalEventTarget(e).each(function (target) {
  16689. if (target.ownerDocument === document) {
  16690. if (target !== document.body && !isUIElement(activeEditor, target) && editorManager.focusedEditor === activeEditor) {
  16691. activeEditor.fire('blur', { focusedEditor: null });
  16692. editorManager.focusedEditor = null;
  16693. }
  16694. }
  16695. });
  16696. }
  16697. };
  16698. DOM$8.bind(document, 'focusin', documentFocusInHandler);
  16699. }
  16700. };
  16701. var unregisterDocumentEvents = function (editorManager, e) {
  16702. if (editorManager.focusedEditor === e.editor) {
  16703. editorManager.focusedEditor = null;
  16704. }
  16705. if (!editorManager.activeEditor) {
  16706. DOM$8.unbind(document, 'focusin', documentFocusInHandler);
  16707. documentFocusInHandler = null;
  16708. }
  16709. };
  16710. var setup$l = function (editorManager) {
  16711. editorManager.on('AddEditor', curry(registerEvents$1, editorManager));
  16712. editorManager.on('RemoveEditor', curry(unregisterDocumentEvents, editorManager));
  16713. };
  16714. var getContentEditableHost = function (editor, node) {
  16715. return editor.dom.getParent(node, function (node) {
  16716. return editor.dom.getContentEditable(node) === 'true';
  16717. });
  16718. };
  16719. var getCollapsedNode = function (rng) {
  16720. return rng.collapsed ? Optional.from(getNode$1(rng.startContainer, rng.startOffset)).map(SugarElement.fromDom) : Optional.none();
  16721. };
  16722. var getFocusInElement = function (root, rng) {
  16723. return getCollapsedNode(rng).bind(function (node) {
  16724. if (isTableSection(node)) {
  16725. return Optional.some(node);
  16726. } else if (contains$1(root, node) === false) {
  16727. return Optional.some(root);
  16728. } else {
  16729. return Optional.none();
  16730. }
  16731. });
  16732. };
  16733. var normalizeSelection$1 = function (editor, rng) {
  16734. getFocusInElement(SugarElement.fromDom(editor.getBody()), rng).bind(function (elm) {
  16735. return firstPositionIn(elm.dom);
  16736. }).fold(function () {
  16737. editor.selection.normalize();
  16738. return;
  16739. }, function (caretPos) {
  16740. return editor.selection.setRng(caretPos.toRange());
  16741. });
  16742. };
  16743. var focusBody = function (body) {
  16744. if (body.setActive) {
  16745. try {
  16746. body.setActive();
  16747. } catch (ex) {
  16748. body.focus();
  16749. }
  16750. } else {
  16751. body.focus();
  16752. }
  16753. };
  16754. var hasElementFocus = function (elm) {
  16755. return hasFocus$1(elm) || search(elm).isSome();
  16756. };
  16757. var hasIframeFocus = function (editor) {
  16758. return editor.iframeElement && hasFocus$1(SugarElement.fromDom(editor.iframeElement));
  16759. };
  16760. var hasInlineFocus = function (editor) {
  16761. var rawBody = editor.getBody();
  16762. return rawBody && hasElementFocus(SugarElement.fromDom(rawBody));
  16763. };
  16764. var hasUiFocus = function (editor) {
  16765. var dos = getRootNode(SugarElement.fromDom(editor.getElement()));
  16766. return active(dos).filter(function (elem) {
  16767. return !isEditorContentAreaElement(elem.dom) && isUIElement(editor, elem.dom);
  16768. }).isSome();
  16769. };
  16770. var hasFocus = function (editor) {
  16771. return editor.inline ? hasInlineFocus(editor) : hasIframeFocus(editor);
  16772. };
  16773. var hasEditorOrUiFocus = function (editor) {
  16774. return hasFocus(editor) || hasUiFocus(editor);
  16775. };
  16776. var focusEditor = function (editor) {
  16777. var selection = editor.selection;
  16778. var body = editor.getBody();
  16779. var rng = selection.getRng();
  16780. editor.quirks.refreshContentEditable();
  16781. if (editor.bookmark !== undefined && hasFocus(editor) === false) {
  16782. getRng(editor).each(function (bookmarkRng) {
  16783. editor.selection.setRng(bookmarkRng);
  16784. rng = bookmarkRng;
  16785. });
  16786. }
  16787. var contentEditableHost = getContentEditableHost(editor, selection.getNode());
  16788. if (editor.$.contains(body, contentEditableHost)) {
  16789. focusBody(contentEditableHost);
  16790. normalizeSelection$1(editor, rng);
  16791. activateEditor(editor);
  16792. return;
  16793. }
  16794. if (!editor.inline) {
  16795. if (!Env.opera) {
  16796. focusBody(body);
  16797. }
  16798. editor.getWin().focus();
  16799. }
  16800. if (Env.gecko || editor.inline) {
  16801. focusBody(body);
  16802. normalizeSelection$1(editor, rng);
  16803. }
  16804. activateEditor(editor);
  16805. };
  16806. var activateEditor = function (editor) {
  16807. return editor.editorManager.setActive(editor);
  16808. };
  16809. var focus = function (editor, skipFocus) {
  16810. if (editor.removed) {
  16811. return;
  16812. }
  16813. if (skipFocus) {
  16814. activateEditor(editor);
  16815. } else {
  16816. focusEditor(editor);
  16817. }
  16818. };
  16819. var getEndpointElement = function (root, rng, start, real, resolve) {
  16820. var container = start ? rng.startContainer : rng.endContainer;
  16821. var offset = start ? rng.startOffset : rng.endOffset;
  16822. return Optional.from(container).map(SugarElement.fromDom).map(function (elm) {
  16823. return !real || !rng.collapsed ? child$1(elm, resolve(elm, offset)).getOr(elm) : elm;
  16824. }).bind(function (elm) {
  16825. return isElement$6(elm) ? Optional.some(elm) : parent(elm).filter(isElement$6);
  16826. }).map(function (elm) {
  16827. return elm.dom;
  16828. }).getOr(root);
  16829. };
  16830. var getStart = function (root, rng, real) {
  16831. return getEndpointElement(root, rng, true, real, function (elm, offset) {
  16832. return Math.min(childNodesCount(elm), offset);
  16833. });
  16834. };
  16835. var getEnd = function (root, rng, real) {
  16836. return getEndpointElement(root, rng, false, real, function (elm, offset) {
  16837. return offset > 0 ? offset - 1 : offset;
  16838. });
  16839. };
  16840. var skipEmptyTextNodes = function (node, forwards) {
  16841. var orig = node;
  16842. while (node && isText$7(node) && node.length === 0) {
  16843. node = forwards ? node.nextSibling : node.previousSibling;
  16844. }
  16845. return node || orig;
  16846. };
  16847. var getNode = function (root, rng) {
  16848. var elm, startContainer, endContainer;
  16849. if (!rng) {
  16850. return root;
  16851. }
  16852. startContainer = rng.startContainer;
  16853. endContainer = rng.endContainer;
  16854. var startOffset = rng.startOffset;
  16855. var endOffset = rng.endOffset;
  16856. elm = rng.commonAncestorContainer;
  16857. if (!rng.collapsed) {
  16858. if (startContainer === endContainer) {
  16859. if (endOffset - startOffset < 2) {
  16860. if (startContainer.hasChildNodes()) {
  16861. elm = startContainer.childNodes[startOffset];
  16862. }
  16863. }
  16864. }
  16865. if (startContainer.nodeType === 3 && endContainer.nodeType === 3) {
  16866. if (startContainer.length === startOffset) {
  16867. startContainer = skipEmptyTextNodes(startContainer.nextSibling, true);
  16868. } else {
  16869. startContainer = startContainer.parentNode;
  16870. }
  16871. if (endOffset === 0) {
  16872. endContainer = skipEmptyTextNodes(endContainer.previousSibling, false);
  16873. } else {
  16874. endContainer = endContainer.parentNode;
  16875. }
  16876. if (startContainer && startContainer === endContainer) {
  16877. return startContainer;
  16878. }
  16879. }
  16880. }
  16881. if (elm && elm.nodeType === 3) {
  16882. return elm.parentNode;
  16883. }
  16884. return elm;
  16885. };
  16886. var getSelectedBlocks = function (dom, rng, startElm, endElm) {
  16887. var node;
  16888. var selectedBlocks = [];
  16889. var root = dom.getRoot();
  16890. startElm = dom.getParent(startElm || getStart(root, rng, rng.collapsed), dom.isBlock);
  16891. endElm = dom.getParent(endElm || getEnd(root, rng, rng.collapsed), dom.isBlock);
  16892. if (startElm && startElm !== root) {
  16893. selectedBlocks.push(startElm);
  16894. }
  16895. if (startElm && endElm && startElm !== endElm) {
  16896. node = startElm;
  16897. var walker = new DomTreeWalker(startElm, root);
  16898. while ((node = walker.next()) && node !== endElm) {
  16899. if (dom.isBlock(node)) {
  16900. selectedBlocks.push(node);
  16901. }
  16902. }
  16903. }
  16904. if (endElm && startElm !== endElm && endElm !== root) {
  16905. selectedBlocks.push(endElm);
  16906. }
  16907. return selectedBlocks;
  16908. };
  16909. var select = function (dom, node, content) {
  16910. return Optional.from(node).map(function (node) {
  16911. var idx = dom.nodeIndex(node);
  16912. var rng = dom.createRng();
  16913. rng.setStart(node.parentNode, idx);
  16914. rng.setEnd(node.parentNode, idx + 1);
  16915. if (content) {
  16916. moveEndPoint(dom, rng, node, true);
  16917. moveEndPoint(dom, rng, node, false);
  16918. }
  16919. return rng;
  16920. });
  16921. };
  16922. var processRanges = function (editor, ranges) {
  16923. return map$3(ranges, function (range) {
  16924. var evt = editor.fire('GetSelectionRange', { range: range });
  16925. return evt.range !== range ? evt.range : range;
  16926. });
  16927. };
  16928. var typeLookup = {
  16929. '#text': 3,
  16930. '#comment': 8,
  16931. '#cdata': 4,
  16932. '#pi': 7,
  16933. '#doctype': 10,
  16934. '#document-fragment': 11
  16935. };
  16936. var walk$1 = function (node, root, prev) {
  16937. var startName = prev ? 'lastChild' : 'firstChild';
  16938. var siblingName = prev ? 'prev' : 'next';
  16939. if (node[startName]) {
  16940. return node[startName];
  16941. }
  16942. if (node !== root) {
  16943. var sibling = node[siblingName];
  16944. if (sibling) {
  16945. return sibling;
  16946. }
  16947. for (var parent_1 = node.parent; parent_1 && parent_1 !== root; parent_1 = parent_1.parent) {
  16948. sibling = parent_1[siblingName];
  16949. if (sibling) {
  16950. return sibling;
  16951. }
  16952. }
  16953. }
  16954. };
  16955. var isEmptyTextNode = function (node) {
  16956. if (!isWhitespaceText(node.value)) {
  16957. return false;
  16958. }
  16959. var parentNode = node.parent;
  16960. if (parentNode && (parentNode.name !== 'span' || parentNode.attr('style')) && /^[ ]+$/.test(node.value)) {
  16961. return false;
  16962. }
  16963. return true;
  16964. };
  16965. var isNonEmptyElement = function (node) {
  16966. var isNamedAnchor = node.name === 'a' && !node.attr('href') && node.attr('id');
  16967. return node.attr('name') || node.attr('id') && !node.firstChild || node.attr('data-mce-bookmark') || isNamedAnchor;
  16968. };
  16969. var AstNode = function () {
  16970. function AstNode(name, type) {
  16971. this.name = name;
  16972. this.type = type;
  16973. if (type === 1) {
  16974. this.attributes = [];
  16975. this.attributes.map = {};
  16976. }
  16977. }
  16978. AstNode.create = function (name, attrs) {
  16979. var node = new AstNode(name, typeLookup[name] || 1);
  16980. if (attrs) {
  16981. each$j(attrs, function (value, attrName) {
  16982. node.attr(attrName, value);
  16983. });
  16984. }
  16985. return node;
  16986. };
  16987. AstNode.prototype.replace = function (node) {
  16988. var self = this;
  16989. if (node.parent) {
  16990. node.remove();
  16991. }
  16992. self.insert(node, self);
  16993. self.remove();
  16994. return self;
  16995. };
  16996. AstNode.prototype.attr = function (name, value) {
  16997. var self = this;
  16998. var attrs;
  16999. if (typeof name !== 'string') {
  17000. if (name !== undefined && name !== null) {
  17001. each$j(name, function (value, key) {
  17002. self.attr(key, value);
  17003. });
  17004. }
  17005. return self;
  17006. }
  17007. if (attrs = self.attributes) {
  17008. if (value !== undefined) {
  17009. if (value === null) {
  17010. if (name in attrs.map) {
  17011. delete attrs.map[name];
  17012. var i = attrs.length;
  17013. while (i--) {
  17014. if (attrs[i].name === name) {
  17015. attrs.splice(i, 1);
  17016. return self;
  17017. }
  17018. }
  17019. }
  17020. return self;
  17021. }
  17022. if (name in attrs.map) {
  17023. var i = attrs.length;
  17024. while (i--) {
  17025. if (attrs[i].name === name) {
  17026. attrs[i].value = value;
  17027. break;
  17028. }
  17029. }
  17030. } else {
  17031. attrs.push({
  17032. name: name,
  17033. value: value
  17034. });
  17035. }
  17036. attrs.map[name] = value;
  17037. return self;
  17038. }
  17039. return attrs.map[name];
  17040. }
  17041. };
  17042. AstNode.prototype.clone = function () {
  17043. var self = this;
  17044. var clone = new AstNode(self.name, self.type);
  17045. var selfAttrs;
  17046. if (selfAttrs = self.attributes) {
  17047. var cloneAttrs = [];
  17048. cloneAttrs.map = {};
  17049. for (var i = 0, l = selfAttrs.length; i < l; i++) {
  17050. var selfAttr = selfAttrs[i];
  17051. if (selfAttr.name !== 'id') {
  17052. cloneAttrs[cloneAttrs.length] = {
  17053. name: selfAttr.name,
  17054. value: selfAttr.value
  17055. };
  17056. cloneAttrs.map[selfAttr.name] = selfAttr.value;
  17057. }
  17058. }
  17059. clone.attributes = cloneAttrs;
  17060. }
  17061. clone.value = self.value;
  17062. clone.shortEnded = self.shortEnded;
  17063. return clone;
  17064. };
  17065. AstNode.prototype.wrap = function (wrapper) {
  17066. var self = this;
  17067. self.parent.insert(wrapper, self);
  17068. wrapper.append(self);
  17069. return self;
  17070. };
  17071. AstNode.prototype.unwrap = function () {
  17072. var self = this;
  17073. for (var node = self.firstChild; node;) {
  17074. var next = node.next;
  17075. self.insert(node, self, true);
  17076. node = next;
  17077. }
  17078. self.remove();
  17079. };
  17080. AstNode.prototype.remove = function () {
  17081. var self = this, parent = self.parent, next = self.next, prev = self.prev;
  17082. if (parent) {
  17083. if (parent.firstChild === self) {
  17084. parent.firstChild = next;
  17085. if (next) {
  17086. next.prev = null;
  17087. }
  17088. } else {
  17089. prev.next = next;
  17090. }
  17091. if (parent.lastChild === self) {
  17092. parent.lastChild = prev;
  17093. if (prev) {
  17094. prev.next = null;
  17095. }
  17096. } else {
  17097. next.prev = prev;
  17098. }
  17099. self.parent = self.next = self.prev = null;
  17100. }
  17101. return self;
  17102. };
  17103. AstNode.prototype.append = function (node) {
  17104. var self = this;
  17105. if (node.parent) {
  17106. node.remove();
  17107. }
  17108. var last = self.lastChild;
  17109. if (last) {
  17110. last.next = node;
  17111. node.prev = last;
  17112. self.lastChild = node;
  17113. } else {
  17114. self.lastChild = self.firstChild = node;
  17115. }
  17116. node.parent = self;
  17117. return node;
  17118. };
  17119. AstNode.prototype.insert = function (node, refNode, before) {
  17120. if (node.parent) {
  17121. node.remove();
  17122. }
  17123. var parent = refNode.parent || this;
  17124. if (before) {
  17125. if (refNode === parent.firstChild) {
  17126. parent.firstChild = node;
  17127. } else {
  17128. refNode.prev.next = node;
  17129. }
  17130. node.prev = refNode.prev;
  17131. node.next = refNode;
  17132. refNode.prev = node;
  17133. } else {
  17134. if (refNode === parent.lastChild) {
  17135. parent.lastChild = node;
  17136. } else {
  17137. refNode.next.prev = node;
  17138. }
  17139. node.next = refNode.next;
  17140. node.prev = refNode;
  17141. refNode.next = node;
  17142. }
  17143. node.parent = parent;
  17144. return node;
  17145. };
  17146. AstNode.prototype.getAll = function (name) {
  17147. var self = this;
  17148. var collection = [];
  17149. for (var node = self.firstChild; node; node = walk$1(node, self)) {
  17150. if (node.name === name) {
  17151. collection.push(node);
  17152. }
  17153. }
  17154. return collection;
  17155. };
  17156. AstNode.prototype.children = function () {
  17157. var self = this;
  17158. var collection = [];
  17159. for (var node = self.firstChild; node; node = node.next) {
  17160. collection.push(node);
  17161. }
  17162. return collection;
  17163. };
  17164. AstNode.prototype.empty = function () {
  17165. var self = this;
  17166. if (self.firstChild) {
  17167. var nodes = [];
  17168. for (var node = self.firstChild; node; node = walk$1(node, self)) {
  17169. nodes.push(node);
  17170. }
  17171. var i = nodes.length;
  17172. while (i--) {
  17173. var node = nodes[i];
  17174. node.parent = node.firstChild = node.lastChild = node.next = node.prev = null;
  17175. }
  17176. }
  17177. self.firstChild = self.lastChild = null;
  17178. return self;
  17179. };
  17180. AstNode.prototype.isEmpty = function (elements, whitespace, predicate) {
  17181. if (whitespace === void 0) {
  17182. whitespace = {};
  17183. }
  17184. var self = this;
  17185. var node = self.firstChild;
  17186. if (isNonEmptyElement(self)) {
  17187. return false;
  17188. }
  17189. if (node) {
  17190. do {
  17191. if (node.type === 1) {
  17192. if (node.attr('data-mce-bogus')) {
  17193. continue;
  17194. }
  17195. if (elements[node.name]) {
  17196. return false;
  17197. }
  17198. if (isNonEmptyElement(node)) {
  17199. return false;
  17200. }
  17201. }
  17202. if (node.type === 8) {
  17203. return false;
  17204. }
  17205. if (node.type === 3 && !isEmptyTextNode(node)) {
  17206. return false;
  17207. }
  17208. if (node.type === 3 && node.parent && whitespace[node.parent.name] && isWhitespaceText(node.value)) {
  17209. return false;
  17210. }
  17211. if (predicate && predicate(node)) {
  17212. return false;
  17213. }
  17214. } while (node = walk$1(node, self));
  17215. }
  17216. return true;
  17217. };
  17218. AstNode.prototype.walk = function (prev) {
  17219. return walk$1(this, null, prev);
  17220. };
  17221. return AstNode;
  17222. }();
  17223. var extractBase64DataUris = function (html) {
  17224. var dataImageUri = /data:[^;]+;base64,([a-z0-9\+\/=\s]+)/gi;
  17225. var chunks = [];
  17226. var uris = {};
  17227. var prefix = generate('img');
  17228. var matches;
  17229. var index = 0;
  17230. var count = 0;
  17231. while (matches = dataImageUri.exec(html)) {
  17232. var uri = matches[0];
  17233. var imageId = prefix + '_' + count++;
  17234. uris[imageId] = uri;
  17235. if (index < matches.index) {
  17236. chunks.push(html.substr(index, matches.index - index));
  17237. }
  17238. chunks.push(imageId);
  17239. index = matches.index + uri.length;
  17240. }
  17241. var re = new RegExp(prefix + '_[0-9]+', 'g');
  17242. if (index === 0) {
  17243. return {
  17244. prefix: prefix,
  17245. uris: uris,
  17246. html: html,
  17247. re: re
  17248. };
  17249. } else {
  17250. if (index < html.length) {
  17251. chunks.push(html.substr(index));
  17252. }
  17253. return {
  17254. prefix: prefix,
  17255. uris: uris,
  17256. html: chunks.join(''),
  17257. re: re
  17258. };
  17259. }
  17260. };
  17261. var restoreDataUris = function (html, result) {
  17262. return html.replace(result.re, function (imageId) {
  17263. return get$9(result.uris, imageId).getOr(imageId);
  17264. });
  17265. };
  17266. var parseDataUri$1 = function (uri) {
  17267. var matches = /data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(uri);
  17268. if (matches) {
  17269. return Optional.some({
  17270. type: matches[1],
  17271. data: decodeURIComponent(matches[2])
  17272. });
  17273. } else {
  17274. return Optional.none();
  17275. }
  17276. };
  17277. var each$d = Tools.each, trim = Tools.trim;
  17278. var queryParts = 'source protocol authority userInfo user password host port relative path directory file query anchor'.split(' ');
  17279. var DEFAULT_PORTS = {
  17280. ftp: 21,
  17281. http: 80,
  17282. https: 443,
  17283. mailto: 25
  17284. };
  17285. var safeSvgDataUrlElements = [
  17286. 'img',
  17287. 'video'
  17288. ];
  17289. var blockSvgDataUris = function (allowSvgDataUrls, tagName) {
  17290. if (isNonNullable(allowSvgDataUrls)) {
  17291. return !allowSvgDataUrls;
  17292. } else {
  17293. return isNonNullable(tagName) ? !contains$3(safeSvgDataUrlElements, tagName) : true;
  17294. }
  17295. };
  17296. var isInvalidUri = function (settings, uri, tagName) {
  17297. if (settings.allow_html_data_urls) {
  17298. return false;
  17299. } else if (/^data:image\//i.test(uri)) {
  17300. return blockSvgDataUris(settings.allow_svg_data_urls, tagName) && /^data:image\/svg\+xml/i.test(uri);
  17301. } else {
  17302. return /^data:/i.test(uri);
  17303. }
  17304. };
  17305. var URI = function () {
  17306. function URI(url, settings) {
  17307. url = trim(url);
  17308. this.settings = settings || {};
  17309. var baseUri = this.settings.base_uri;
  17310. var self = this;
  17311. if (/^([\w\-]+):([^\/]{2})/i.test(url) || /^\s*#/.test(url)) {
  17312. self.source = url;
  17313. return;
  17314. }
  17315. var isProtocolRelative = url.indexOf('//') === 0;
  17316. if (url.indexOf('/') === 0 && !isProtocolRelative) {
  17317. url = (baseUri ? baseUri.protocol || 'http' : 'http') + '://mce_host' + url;
  17318. }
  17319. if (!/^[\w\-]*:?\/\//.test(url)) {
  17320. var baseUrl = this.settings.base_uri ? this.settings.base_uri.path : new URI(document.location.href).directory;
  17321. if (this.settings.base_uri && this.settings.base_uri.protocol == '') {
  17322. url = '//mce_host' + self.toAbsPath(baseUrl, url);
  17323. } else {
  17324. var match = /([^#?]*)([#?]?.*)/.exec(url);
  17325. url = (baseUri && baseUri.protocol || 'http') + '://mce_host' + self.toAbsPath(baseUrl, match[1]) + match[2];
  17326. }
  17327. }
  17328. url = url.replace(/@@/g, '(mce_at)');
  17329. var urlMatch = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url);
  17330. each$d(queryParts, function (v, i) {
  17331. var part = urlMatch[i];
  17332. if (part) {
  17333. part = part.replace(/\(mce_at\)/g, '@@');
  17334. }
  17335. self[v] = part;
  17336. });
  17337. if (baseUri) {
  17338. if (!self.protocol) {
  17339. self.protocol = baseUri.protocol;
  17340. }
  17341. if (!self.userInfo) {
  17342. self.userInfo = baseUri.userInfo;
  17343. }
  17344. if (!self.port && self.host === 'mce_host') {
  17345. self.port = baseUri.port;
  17346. }
  17347. if (!self.host || self.host === 'mce_host') {
  17348. self.host = baseUri.host;
  17349. }
  17350. self.source = '';
  17351. }
  17352. if (isProtocolRelative) {
  17353. self.protocol = '';
  17354. }
  17355. }
  17356. URI.parseDataUri = function (uri) {
  17357. var type;
  17358. var uriComponents = decodeURIComponent(uri).split(',');
  17359. var matches = /data:([^;]+)/.exec(uriComponents[0]);
  17360. if (matches) {
  17361. type = matches[1];
  17362. }
  17363. return {
  17364. type: type,
  17365. data: uriComponents[1]
  17366. };
  17367. };
  17368. URI.isDomSafe = function (uri, context, options) {
  17369. if (options === void 0) {
  17370. options = {};
  17371. }
  17372. if (options.allow_script_urls) {
  17373. return true;
  17374. } else {
  17375. var decodedUri = Entities.decode(uri).replace(/[\s\u0000-\u001F]+/g, '');
  17376. try {
  17377. decodedUri = decodeURIComponent(decodedUri);
  17378. } catch (ex) {
  17379. decodedUri = unescape(decodedUri);
  17380. }
  17381. if (/((java|vb)script|mhtml):/i.test(decodedUri)) {
  17382. return false;
  17383. }
  17384. return !isInvalidUri(options, decodedUri, context);
  17385. }
  17386. };
  17387. URI.getDocumentBaseUrl = function (loc) {
  17388. var baseUrl;
  17389. if (loc.protocol.indexOf('http') !== 0 && loc.protocol !== 'file:') {
  17390. baseUrl = loc.href;
  17391. } else {
  17392. baseUrl = loc.protocol + '//' + loc.host + loc.pathname;
  17393. }
  17394. if (/^[^:]+:\/\/\/?[^\/]+\//.test(baseUrl)) {
  17395. baseUrl = baseUrl.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, '');
  17396. if (!/[\/\\]$/.test(baseUrl)) {
  17397. baseUrl += '/';
  17398. }
  17399. }
  17400. return baseUrl;
  17401. };
  17402. URI.prototype.setPath = function (path) {
  17403. var pathMatch = /^(.*?)\/?(\w+)?$/.exec(path);
  17404. this.path = pathMatch[0];
  17405. this.directory = pathMatch[1];
  17406. this.file = pathMatch[2];
  17407. this.source = '';
  17408. this.getURI();
  17409. };
  17410. URI.prototype.toRelative = function (uri) {
  17411. var output;
  17412. if (uri === './') {
  17413. return uri;
  17414. }
  17415. var relativeUri = new URI(uri, { base_uri: this });
  17416. if (relativeUri.host !== 'mce_host' && this.host !== relativeUri.host && relativeUri.host || this.port !== relativeUri.port || this.protocol !== relativeUri.protocol && relativeUri.protocol !== '') {
  17417. return relativeUri.getURI();
  17418. }
  17419. var tu = this.getURI(), uu = relativeUri.getURI();
  17420. if (tu === uu || tu.charAt(tu.length - 1) === '/' && tu.substr(0, tu.length - 1) === uu) {
  17421. return tu;
  17422. }
  17423. output = this.toRelPath(this.path, relativeUri.path);
  17424. if (relativeUri.query) {
  17425. output += '?' + relativeUri.query;
  17426. }
  17427. if (relativeUri.anchor) {
  17428. output += '#' + relativeUri.anchor;
  17429. }
  17430. return output;
  17431. };
  17432. URI.prototype.toAbsolute = function (uri, noHost) {
  17433. var absoluteUri = new URI(uri, { base_uri: this });
  17434. return absoluteUri.getURI(noHost && this.isSameOrigin(absoluteUri));
  17435. };
  17436. URI.prototype.isSameOrigin = function (uri) {
  17437. if (this.host == uri.host && this.protocol == uri.protocol) {
  17438. if (this.port == uri.port) {
  17439. return true;
  17440. }
  17441. var defaultPort = DEFAULT_PORTS[this.protocol];
  17442. if (defaultPort && (this.port || defaultPort) == (uri.port || defaultPort)) {
  17443. return true;
  17444. }
  17445. }
  17446. return false;
  17447. };
  17448. URI.prototype.toRelPath = function (base, path) {
  17449. var breakPoint = 0, out = '', i, l;
  17450. var normalizedBase = base.substring(0, base.lastIndexOf('/')).split('/');
  17451. var items = path.split('/');
  17452. if (normalizedBase.length >= items.length) {
  17453. for (i = 0, l = normalizedBase.length; i < l; i++) {
  17454. if (i >= items.length || normalizedBase[i] !== items[i]) {
  17455. breakPoint = i + 1;
  17456. break;
  17457. }
  17458. }
  17459. }
  17460. if (normalizedBase.length < items.length) {
  17461. for (i = 0, l = items.length; i < l; i++) {
  17462. if (i >= normalizedBase.length || normalizedBase[i] !== items[i]) {
  17463. breakPoint = i + 1;
  17464. break;
  17465. }
  17466. }
  17467. }
  17468. if (breakPoint === 1) {
  17469. return path;
  17470. }
  17471. for (i = 0, l = normalizedBase.length - (breakPoint - 1); i < l; i++) {
  17472. out += '../';
  17473. }
  17474. for (i = breakPoint - 1, l = items.length; i < l; i++) {
  17475. if (i !== breakPoint - 1) {
  17476. out += '/' + items[i];
  17477. } else {
  17478. out += items[i];
  17479. }
  17480. }
  17481. return out;
  17482. };
  17483. URI.prototype.toAbsPath = function (base, path) {
  17484. var i, nb = 0, o = [], outPath;
  17485. var tr = /\/$/.test(path) ? '/' : '';
  17486. var normalizedBase = base.split('/');
  17487. var normalizedPath = path.split('/');
  17488. each$d(normalizedBase, function (k) {
  17489. if (k) {
  17490. o.push(k);
  17491. }
  17492. });
  17493. normalizedBase = o;
  17494. for (i = normalizedPath.length - 1, o = []; i >= 0; i--) {
  17495. if (normalizedPath[i].length === 0 || normalizedPath[i] === '.') {
  17496. continue;
  17497. }
  17498. if (normalizedPath[i] === '..') {
  17499. nb++;
  17500. continue;
  17501. }
  17502. if (nb > 0) {
  17503. nb--;
  17504. continue;
  17505. }
  17506. o.push(normalizedPath[i]);
  17507. }
  17508. i = normalizedBase.length - nb;
  17509. if (i <= 0) {
  17510. outPath = reverse(o).join('/');
  17511. } else {
  17512. outPath = normalizedBase.slice(0, i).join('/') + '/' + reverse(o).join('/');
  17513. }
  17514. if (outPath.indexOf('/') !== 0) {
  17515. outPath = '/' + outPath;
  17516. }
  17517. if (tr && outPath.lastIndexOf('/') !== outPath.length - 1) {
  17518. outPath += tr;
  17519. }
  17520. return outPath;
  17521. };
  17522. URI.prototype.getURI = function (noProtoHost) {
  17523. if (noProtoHost === void 0) {
  17524. noProtoHost = false;
  17525. }
  17526. var s;
  17527. if (!this.source || noProtoHost) {
  17528. s = '';
  17529. if (!noProtoHost) {
  17530. if (this.protocol) {
  17531. s += this.protocol + '://';
  17532. } else {
  17533. s += '//';
  17534. }
  17535. if (this.userInfo) {
  17536. s += this.userInfo + '@';
  17537. }
  17538. if (this.host) {
  17539. s += this.host;
  17540. }
  17541. if (this.port) {
  17542. s += ':' + this.port;
  17543. }
  17544. }
  17545. if (this.path) {
  17546. s += this.path;
  17547. }
  17548. if (this.query) {
  17549. s += '?' + this.query;
  17550. }
  17551. if (this.anchor) {
  17552. s += '#' + this.anchor;
  17553. }
  17554. this.source = s;
  17555. }
  17556. return this.source;
  17557. };
  17558. return URI;
  17559. }();
  17560. var filteredClobberElements = Tools.makeMap('button,fieldset,form,iframe,img,image,input,object,output,select,textarea');
  17561. var isValidPrefixAttrName = function (name) {
  17562. return name.indexOf('data-') === 0 || name.indexOf('aria-') === 0;
  17563. };
  17564. var findMatchingEndTagIndex = function (schema, html, startIndex) {
  17565. var startTagRegExp = /<([!?\/])?([A-Za-z0-9\-_:.]+)/g;
  17566. var endTagRegExp = /(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g;
  17567. var shortEndedElements = schema.getShortEndedElements();
  17568. var count = 1, index = startIndex;
  17569. while (count !== 0) {
  17570. startTagRegExp.lastIndex = index;
  17571. while (true) {
  17572. var startMatch = startTagRegExp.exec(html);
  17573. if (startMatch === null) {
  17574. return index;
  17575. } else if (startMatch[1] === '!') {
  17576. if (startsWith(startMatch[2], '--')) {
  17577. index = findCommentEndIndex(html, false, startMatch.index + '!--'.length);
  17578. } else {
  17579. index = findCommentEndIndex(html, true, startMatch.index + 1);
  17580. }
  17581. break;
  17582. } else {
  17583. endTagRegExp.lastIndex = startTagRegExp.lastIndex;
  17584. var endMatch = endTagRegExp.exec(html);
  17585. if (isNull(endMatch) || endMatch.index !== startTagRegExp.lastIndex) {
  17586. continue;
  17587. }
  17588. if (startMatch[1] === '/') {
  17589. count -= 1;
  17590. } else if (!has$2(shortEndedElements, startMatch[2])) {
  17591. count += 1;
  17592. }
  17593. index = startTagRegExp.lastIndex + endMatch[0].length;
  17594. break;
  17595. }
  17596. }
  17597. }
  17598. return index;
  17599. };
  17600. var isConditionalComment = function (html, startIndex) {
  17601. return /^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(html.substr(startIndex));
  17602. };
  17603. var findCommentEndIndex = function (html, isBogus, startIndex) {
  17604. if (startIndex === void 0) {
  17605. startIndex = 0;
  17606. }
  17607. var lcHtml = html.toLowerCase();
  17608. if (lcHtml.indexOf('[if ', startIndex) !== -1 && isConditionalComment(lcHtml, startIndex)) {
  17609. var endIfIndex = lcHtml.indexOf('[endif]', startIndex);
  17610. return lcHtml.indexOf('>', endIfIndex);
  17611. } else {
  17612. if (isBogus) {
  17613. var endIndex = lcHtml.indexOf('>', startIndex);
  17614. return endIndex !== -1 ? endIndex : lcHtml.length;
  17615. } else {
  17616. var endCommentRegexp = /--!?>/g;
  17617. endCommentRegexp.lastIndex = startIndex;
  17618. var match = endCommentRegexp.exec(html);
  17619. return match ? match.index + match[0].length : lcHtml.length;
  17620. }
  17621. }
  17622. };
  17623. var checkBogusAttribute = function (regExp, attrString) {
  17624. var matches = regExp.exec(attrString);
  17625. if (matches) {
  17626. var name_1 = matches[1];
  17627. var value = matches[2];
  17628. return typeof name_1 === 'string' && name_1.toLowerCase() === 'data-mce-bogus' ? value : null;
  17629. } else {
  17630. return null;
  17631. }
  17632. };
  17633. var SaxParser = function (settings, schema) {
  17634. var _a;
  17635. if (schema === void 0) {
  17636. schema = Schema();
  17637. }
  17638. settings = settings || {};
  17639. var doc = (_a = settings.document) !== null && _a !== void 0 ? _a : document;
  17640. var form = doc.createElement('form');
  17641. if (settings.fix_self_closing !== false) {
  17642. settings.fix_self_closing = true;
  17643. }
  17644. var comment = settings.comment ? settings.comment : noop;
  17645. var cdata = settings.cdata ? settings.cdata : noop;
  17646. var text = settings.text ? settings.text : noop;
  17647. var start = settings.start ? settings.start : noop;
  17648. var end = settings.end ? settings.end : noop;
  17649. var pi = settings.pi ? settings.pi : noop;
  17650. var doctype = settings.doctype ? settings.doctype : noop;
  17651. var parseInternal = function (base64Extract, format) {
  17652. if (format === void 0) {
  17653. format = 'html';
  17654. }
  17655. var html = base64Extract.html;
  17656. var matches, index = 0, value, endRegExp;
  17657. var stack = [];
  17658. var attrList, i, textData, name;
  17659. var isInternalElement, isShortEnded;
  17660. var elementRule, isValidElement, attr, attribsValue, validAttributesMap, validAttributePatterns;
  17661. var attributesRequired, attributesDefault, attributesForced;
  17662. var anyAttributesRequired, attrValue, idCount = 0;
  17663. var decode = Entities.decode;
  17664. var filteredUrlAttrs = Tools.makeMap('src,href,data,background,action,formaction,poster,xlink:href');
  17665. var parsingMode = format === 'html' ? 0 : 1;
  17666. var processEndTag = function (name) {
  17667. var pos, i;
  17668. pos = stack.length;
  17669. while (pos--) {
  17670. if (stack[pos].name === name) {
  17671. break;
  17672. }
  17673. }
  17674. if (pos >= 0) {
  17675. for (i = stack.length - 1; i >= pos; i--) {
  17676. name = stack[i];
  17677. if (name.valid) {
  17678. end(name.name);
  17679. }
  17680. }
  17681. stack.length = pos;
  17682. }
  17683. };
  17684. var processText = function (value, raw) {
  17685. return text(restoreDataUris(value, base64Extract), raw);
  17686. };
  17687. var processComment = function (value) {
  17688. if (value === '') {
  17689. return;
  17690. }
  17691. if (value.charAt(0) === '>') {
  17692. value = ' ' + value;
  17693. }
  17694. if (!settings.allow_conditional_comments && value.substr(0, 3).toLowerCase() === '[if') {
  17695. value = ' ' + value;
  17696. }
  17697. comment(restoreDataUris(value, base64Extract));
  17698. };
  17699. var processAttr = function (value) {
  17700. return restoreDataUris(value, base64Extract);
  17701. };
  17702. var processMalformedComment = function (value, startIndex) {
  17703. var startTag = value || '';
  17704. var isBogus = !startsWith(startTag, '--');
  17705. var endIndex = findCommentEndIndex(html, isBogus, startIndex);
  17706. value = html.substr(startIndex, endIndex - startIndex);
  17707. processComment(isBogus ? startTag + value : value);
  17708. return endIndex + 1;
  17709. };
  17710. var parseAttribute = function (tagName, name, value, val2, val3) {
  17711. name = name.toLowerCase();
  17712. value = processAttr(name in fillAttrsMap ? name : decode(value || val2 || val3 || ''));
  17713. if (validate && !isInternalElement && isValidPrefixAttrName(name) === false) {
  17714. var attrRule = validAttributesMap[name];
  17715. if (!attrRule && validAttributePatterns) {
  17716. var i_1 = validAttributePatterns.length;
  17717. while (i_1--) {
  17718. attrRule = validAttributePatterns[i_1];
  17719. if (attrRule.pattern.test(name)) {
  17720. break;
  17721. }
  17722. }
  17723. if (i_1 === -1) {
  17724. attrRule = null;
  17725. }
  17726. }
  17727. if (!attrRule) {
  17728. return;
  17729. }
  17730. if (attrRule.validValues && !(value in attrRule.validValues)) {
  17731. return;
  17732. }
  17733. }
  17734. var isNameOrId = name === 'name' || name === 'id';
  17735. if (isNameOrId && tagName in filteredClobberElements && (value in doc || value in form)) {
  17736. return;
  17737. }
  17738. if (filteredUrlAttrs[name] && !URI.isDomSafe(value, tagName, settings)) {
  17739. return;
  17740. }
  17741. if (isInternalElement && (name in filteredUrlAttrs || name.indexOf('on') === 0)) {
  17742. return;
  17743. }
  17744. attrList.map[name] = value;
  17745. attrList.push({
  17746. name: name,
  17747. value: value
  17748. });
  17749. };
  17750. var tokenRegExp = new RegExp('<(?:' + '(?:!--([\\w\\W]*?)--!?>)|' + '(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|' + '(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|' + '(?:!(--)?)|' + '(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|' + '(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|' + '(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^\'">]+(?:"[^"]*"|\'[^\']*\'))*[^"\'>]*(?:"[^">]*|\'[^\'>]*)?|\\s*|\\/)>)' + ')', 'g');
  17751. var attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;
  17752. var shortEndedElements = schema.getShortEndedElements();
  17753. var selfClosing = settings.self_closing_elements || schema.getSelfClosingElements();
  17754. var fillAttrsMap = schema.getBoolAttrs();
  17755. var validate = settings.validate;
  17756. var removeInternalElements = settings.remove_internals;
  17757. var fixSelfClosing = settings.fix_self_closing;
  17758. var specialElements = schema.getSpecialElements();
  17759. var processHtml = html + '>';
  17760. while (matches = tokenRegExp.exec(processHtml)) {
  17761. var matchText = matches[0];
  17762. if (index < matches.index) {
  17763. processText(decode(html.substr(index, matches.index - index)));
  17764. }
  17765. if (value = matches[7]) {
  17766. value = value.toLowerCase();
  17767. if (value.charAt(0) === ':') {
  17768. value = value.substr(1);
  17769. }
  17770. processEndTag(value);
  17771. } else if (value = matches[8]) {
  17772. if (matches.index + matchText.length > html.length) {
  17773. processText(decode(html.substr(matches.index)));
  17774. index = matches.index + matchText.length;
  17775. continue;
  17776. }
  17777. value = value.toLowerCase();
  17778. if (value.charAt(0) === ':') {
  17779. value = value.substr(1);
  17780. }
  17781. isShortEnded = value in shortEndedElements;
  17782. if (fixSelfClosing && selfClosing[value] && stack.length > 0 && stack[stack.length - 1].name === value) {
  17783. processEndTag(value);
  17784. }
  17785. var bogusValue = checkBogusAttribute(attrRegExp, matches[9]);
  17786. if (bogusValue !== null) {
  17787. if (bogusValue === 'all') {
  17788. index = findMatchingEndTagIndex(schema, html, tokenRegExp.lastIndex);
  17789. tokenRegExp.lastIndex = index;
  17790. continue;
  17791. }
  17792. isValidElement = false;
  17793. }
  17794. if (!validate || (elementRule = schema.getElementRule(value))) {
  17795. isValidElement = true;
  17796. if (validate) {
  17797. validAttributesMap = elementRule.attributes;
  17798. validAttributePatterns = elementRule.attributePatterns;
  17799. }
  17800. if (attribsValue = matches[9]) {
  17801. isInternalElement = attribsValue.indexOf('data-mce-type') !== -1;
  17802. if (isInternalElement && removeInternalElements) {
  17803. isValidElement = false;
  17804. }
  17805. attrList = [];
  17806. attrList.map = {};
  17807. attribsValue.replace(attrRegExp, function (match, name, val, val2, val3) {
  17808. parseAttribute(value, name, val, val2, val3);
  17809. return '';
  17810. });
  17811. } else {
  17812. attrList = [];
  17813. attrList.map = {};
  17814. }
  17815. if (validate && !isInternalElement) {
  17816. attributesRequired = elementRule.attributesRequired;
  17817. attributesDefault = elementRule.attributesDefault;
  17818. attributesForced = elementRule.attributesForced;
  17819. anyAttributesRequired = elementRule.removeEmptyAttrs;
  17820. if (anyAttributesRequired && !attrList.length) {
  17821. isValidElement = false;
  17822. }
  17823. if (attributesForced) {
  17824. i = attributesForced.length;
  17825. while (i--) {
  17826. attr = attributesForced[i];
  17827. name = attr.name;
  17828. attrValue = attr.value;
  17829. if (attrValue === '{$uid}') {
  17830. attrValue = 'mce_' + idCount++;
  17831. }
  17832. attrList.map[name] = attrValue;
  17833. attrList.push({
  17834. name: name,
  17835. value: attrValue
  17836. });
  17837. }
  17838. }
  17839. if (attributesDefault) {
  17840. i = attributesDefault.length;
  17841. while (i--) {
  17842. attr = attributesDefault[i];
  17843. name = attr.name;
  17844. if (!(name in attrList.map)) {
  17845. attrValue = attr.value;
  17846. if (attrValue === '{$uid}') {
  17847. attrValue = 'mce_' + idCount++;
  17848. }
  17849. attrList.map[name] = attrValue;
  17850. attrList.push({
  17851. name: name,
  17852. value: attrValue
  17853. });
  17854. }
  17855. }
  17856. }
  17857. if (attributesRequired) {
  17858. i = attributesRequired.length;
  17859. while (i--) {
  17860. if (attributesRequired[i] in attrList.map) {
  17861. break;
  17862. }
  17863. }
  17864. if (i === -1) {
  17865. isValidElement = false;
  17866. }
  17867. }
  17868. if (attr = attrList.map['data-mce-bogus']) {
  17869. if (attr === 'all') {
  17870. index = findMatchingEndTagIndex(schema, html, tokenRegExp.lastIndex);
  17871. tokenRegExp.lastIndex = index;
  17872. continue;
  17873. }
  17874. isValidElement = false;
  17875. }
  17876. }
  17877. if (isValidElement) {
  17878. start(value, attrList, isShortEnded);
  17879. }
  17880. } else {
  17881. isValidElement = false;
  17882. }
  17883. if (endRegExp = specialElements[value]) {
  17884. endRegExp.lastIndex = index = matches.index + matchText.length;
  17885. if (matches = endRegExp.exec(html)) {
  17886. if (isValidElement) {
  17887. textData = html.substr(index, matches.index - index);
  17888. }
  17889. index = matches.index + matches[0].length;
  17890. } else {
  17891. textData = html.substr(index);
  17892. index = html.length;
  17893. }
  17894. if (isValidElement) {
  17895. if (textData.length > 0) {
  17896. processText(textData, true);
  17897. }
  17898. end(value);
  17899. }
  17900. tokenRegExp.lastIndex = index;
  17901. continue;
  17902. }
  17903. if (!isShortEnded) {
  17904. if (!attribsValue || attribsValue.indexOf('/') !== attribsValue.length - 1) {
  17905. stack.push({
  17906. name: value,
  17907. valid: isValidElement
  17908. });
  17909. } else if (isValidElement) {
  17910. end(value);
  17911. }
  17912. }
  17913. } else if (value = matches[1]) {
  17914. processComment(value);
  17915. } else if (value = matches[2]) {
  17916. var isValidCdataSection = parsingMode === 1 || settings.preserve_cdata || stack.length > 0 && schema.isValidChild(stack[stack.length - 1].name, '#cdata');
  17917. if (isValidCdataSection) {
  17918. cdata(value);
  17919. } else {
  17920. index = processMalformedComment('', matches.index + 2);
  17921. tokenRegExp.lastIndex = index;
  17922. continue;
  17923. }
  17924. } else if (value = matches[3]) {
  17925. doctype(value);
  17926. } else if ((value = matches[4]) || matchText === '<!') {
  17927. index = processMalformedComment(value, matches.index + matchText.length);
  17928. tokenRegExp.lastIndex = index;
  17929. continue;
  17930. } else if (value = matches[5]) {
  17931. if (parsingMode === 1) {
  17932. pi(value, matches[6]);
  17933. } else {
  17934. index = processMalformedComment('?', matches.index + 2);
  17935. tokenRegExp.lastIndex = index;
  17936. continue;
  17937. }
  17938. }
  17939. index = matches.index + matchText.length;
  17940. }
  17941. if (index < html.length) {
  17942. processText(decode(html.substr(index)));
  17943. }
  17944. for (i = stack.length - 1; i >= 0; i--) {
  17945. value = stack[i];
  17946. if (value.valid) {
  17947. end(value.name);
  17948. }
  17949. }
  17950. };
  17951. var parse = function (html, format) {
  17952. if (format === void 0) {
  17953. format = 'html';
  17954. }
  17955. parseInternal(extractBase64DataUris(html), format);
  17956. };
  17957. return { parse: parse };
  17958. };
  17959. SaxParser.findEndTag = findMatchingEndTagIndex;
  17960. var trimHtml = function (tempAttrs, html) {
  17961. var trimContentRegExp = new RegExp(['\\s?(' + tempAttrs.join('|') + ')="[^"]+"'].join('|'), 'gi');
  17962. return html.replace(trimContentRegExp, '');
  17963. };
  17964. var trimInternal = function (serializer, html) {
  17965. var bogusAllRegExp = /<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g;
  17966. var schema = serializer.schema;
  17967. var content = trimHtml(serializer.getTempAttrs(), html);
  17968. var shortEndedElements = schema.getShortEndedElements();
  17969. var matches;
  17970. while (matches = bogusAllRegExp.exec(content)) {
  17971. var index = bogusAllRegExp.lastIndex;
  17972. var matchLength = matches[0].length;
  17973. var endTagIndex = void 0;
  17974. if (shortEndedElements[matches[1]]) {
  17975. endTagIndex = index;
  17976. } else {
  17977. endTagIndex = SaxParser.findEndTag(schema, content, index);
  17978. }
  17979. content = content.substring(0, index - matchLength) + content.substring(endTagIndex);
  17980. bogusAllRegExp.lastIndex = index - matchLength;
  17981. }
  17982. return trim$2(content);
  17983. };
  17984. var trimExternal = trimInternal;
  17985. var trimEmptyContents = function (editor, html) {
  17986. var blockName = getForcedRootBlock(editor);
  17987. var emptyRegExp = new RegExp('^(<' + blockName + '[^>]*>(&nbsp;|&#160;|\\s|\xA0|<br \\/>|)<\\/' + blockName + '>[\r\n]*|<br \\/>[\r\n]*)$');
  17988. return html.replace(emptyRegExp, '');
  17989. };
  17990. var setupArgs$3 = function (args, format) {
  17991. return __assign(__assign({}, args), {
  17992. format: format,
  17993. get: true,
  17994. getInner: true
  17995. });
  17996. };
  17997. var getContentFromBody = function (editor, args, format, body) {
  17998. var defaultedArgs = setupArgs$3(args, format);
  17999. var updatedArgs = args.no_events ? defaultedArgs : editor.fire('BeforeGetContent', defaultedArgs);
  18000. var content;
  18001. if (updatedArgs.format === 'raw') {
  18002. content = Tools.trim(trimExternal(editor.serializer, body.innerHTML));
  18003. } else if (updatedArgs.format === 'text') {
  18004. content = editor.dom.isEmpty(body) ? '' : trim$2(body.innerText || body.textContent);
  18005. } else if (updatedArgs.format === 'tree') {
  18006. content = editor.serializer.serialize(body, updatedArgs);
  18007. } else {
  18008. content = trimEmptyContents(editor, editor.serializer.serialize(body, updatedArgs));
  18009. }
  18010. if (!contains$3([
  18011. 'text',
  18012. 'tree'
  18013. ], updatedArgs.format) && !isWsPreserveElement(SugarElement.fromDom(body))) {
  18014. updatedArgs.content = Tools.trim(content);
  18015. } else {
  18016. updatedArgs.content = content;
  18017. }
  18018. if (updatedArgs.no_events) {
  18019. return updatedArgs.content;
  18020. } else {
  18021. return editor.fire('GetContent', updatedArgs).content;
  18022. }
  18023. };
  18024. var getContentInternal = function (editor, args, format) {
  18025. return Optional.from(editor.getBody()).fold(constant(args.format === 'tree' ? new AstNode('body', 11) : ''), function (body) {
  18026. return getContentFromBody(editor, args, format, body);
  18027. });
  18028. };
  18029. var each$c = Tools.each;
  18030. var ElementUtils = function (dom) {
  18031. var compare = function (node1, node2) {
  18032. if (node1.nodeName !== node2.nodeName) {
  18033. return false;
  18034. }
  18035. var getAttribs = function (node) {
  18036. var attribs = {};
  18037. each$c(dom.getAttribs(node), function (attr) {
  18038. var name = attr.nodeName.toLowerCase();
  18039. if (name.indexOf('_') !== 0 && name !== 'style' && name.indexOf('data-') !== 0) {
  18040. attribs[name] = dom.getAttrib(node, name);
  18041. }
  18042. });
  18043. return attribs;
  18044. };
  18045. var compareObjects = function (obj1, obj2) {
  18046. var value, name;
  18047. for (name in obj1) {
  18048. if (has$2(obj1, name)) {
  18049. value = obj2[name];
  18050. if (typeof value === 'undefined') {
  18051. return false;
  18052. }
  18053. if (obj1[name] !== value) {
  18054. return false;
  18055. }
  18056. delete obj2[name];
  18057. }
  18058. }
  18059. for (name in obj2) {
  18060. if (has$2(obj2, name)) {
  18061. return false;
  18062. }
  18063. }
  18064. return true;
  18065. };
  18066. if (!compareObjects(getAttribs(node1), getAttribs(node2))) {
  18067. return false;
  18068. }
  18069. if (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style')))) {
  18070. return false;
  18071. }
  18072. return !isBookmarkNode$1(node1) && !isBookmarkNode$1(node2);
  18073. };
  18074. return { compare: compare };
  18075. };
  18076. var makeMap$1 = Tools.makeMap;
  18077. var Writer = function (settings) {
  18078. var html = [];
  18079. settings = settings || {};
  18080. var indent = settings.indent;
  18081. var indentBefore = makeMap$1(settings.indent_before || '');
  18082. var indentAfter = makeMap$1(settings.indent_after || '');
  18083. var encode = Entities.getEncodeFunc(settings.entity_encoding || 'raw', settings.entities);
  18084. var htmlOutput = settings.element_format === 'html';
  18085. return {
  18086. start: function (name, attrs, empty) {
  18087. var i, l, attr, value;
  18088. if (indent && indentBefore[name] && html.length > 0) {
  18089. value = html[html.length - 1];
  18090. if (value.length > 0 && value !== '\n') {
  18091. html.push('\n');
  18092. }
  18093. }
  18094. html.push('<', name);
  18095. if (attrs) {
  18096. for (i = 0, l = attrs.length; i < l; i++) {
  18097. attr = attrs[i];
  18098. html.push(' ', attr.name, '="', encode(attr.value, true), '"');
  18099. }
  18100. }
  18101. if (!empty || htmlOutput) {
  18102. html[html.length] = '>';
  18103. } else {
  18104. html[html.length] = ' />';
  18105. }
  18106. if (empty && indent && indentAfter[name] && html.length > 0) {
  18107. value = html[html.length - 1];
  18108. if (value.length > 0 && value !== '\n') {
  18109. html.push('\n');
  18110. }
  18111. }
  18112. },
  18113. end: function (name) {
  18114. var value;
  18115. html.push('</', name, '>');
  18116. if (indent && indentAfter[name] && html.length > 0) {
  18117. value = html[html.length - 1];
  18118. if (value.length > 0 && value !== '\n') {
  18119. html.push('\n');
  18120. }
  18121. }
  18122. },
  18123. text: function (text, raw) {
  18124. if (text.length > 0) {
  18125. html[html.length] = raw ? text : encode(text);
  18126. }
  18127. },
  18128. cdata: function (text) {
  18129. html.push('<![CDATA[', text, ']]>');
  18130. },
  18131. comment: function (text) {
  18132. html.push('<!--', text, '-->');
  18133. },
  18134. pi: function (name, text) {
  18135. if (text) {
  18136. html.push('<?', name, ' ', encode(text), '?>');
  18137. } else {
  18138. html.push('<?', name, '?>');
  18139. }
  18140. if (indent) {
  18141. html.push('\n');
  18142. }
  18143. },
  18144. doctype: function (text) {
  18145. html.push('<!DOCTYPE', text, '>', indent ? '\n' : '');
  18146. },
  18147. reset: function () {
  18148. html.length = 0;
  18149. },
  18150. getContent: function () {
  18151. return html.join('').replace(/\n$/, '');
  18152. }
  18153. };
  18154. };
  18155. var HtmlSerializer = function (settings, schema) {
  18156. if (schema === void 0) {
  18157. schema = Schema();
  18158. }
  18159. var writer = Writer(settings);
  18160. settings = settings || {};
  18161. settings.validate = 'validate' in settings ? settings.validate : true;
  18162. var serialize = function (node) {
  18163. var validate = settings.validate;
  18164. var handlers = {
  18165. 3: function (node) {
  18166. writer.text(node.value, node.raw);
  18167. },
  18168. 8: function (node) {
  18169. writer.comment(node.value);
  18170. },
  18171. 7: function (node) {
  18172. writer.pi(node.name, node.value);
  18173. },
  18174. 10: function (node) {
  18175. writer.doctype(node.value);
  18176. },
  18177. 4: function (node) {
  18178. writer.cdata(node.value);
  18179. },
  18180. 11: function (node) {
  18181. if (node = node.firstChild) {
  18182. do {
  18183. walk(node);
  18184. } while (node = node.next);
  18185. }
  18186. }
  18187. };
  18188. writer.reset();
  18189. var walk = function (node) {
  18190. var handler = handlers[node.type];
  18191. if (!handler) {
  18192. var name_1 = node.name;
  18193. var isEmpty = node.shortEnded;
  18194. var attrs = node.attributes;
  18195. if (validate && attrs && attrs.length > 1) {
  18196. var sortedAttrs = [];
  18197. sortedAttrs.map = {};
  18198. var elementRule = schema.getElementRule(node.name);
  18199. if (elementRule) {
  18200. for (var i = 0, l = elementRule.attributesOrder.length; i < l; i++) {
  18201. var attrName = elementRule.attributesOrder[i];
  18202. if (attrName in attrs.map) {
  18203. var attrValue = attrs.map[attrName];
  18204. sortedAttrs.map[attrName] = attrValue;
  18205. sortedAttrs.push({
  18206. name: attrName,
  18207. value: attrValue
  18208. });
  18209. }
  18210. }
  18211. for (var i = 0, l = attrs.length; i < l; i++) {
  18212. var attrName = attrs[i].name;
  18213. if (!(attrName in sortedAttrs.map)) {
  18214. var attrValue = attrs.map[attrName];
  18215. sortedAttrs.map[attrName] = attrValue;
  18216. sortedAttrs.push({
  18217. name: attrName,
  18218. value: attrValue
  18219. });
  18220. }
  18221. }
  18222. attrs = sortedAttrs;
  18223. }
  18224. }
  18225. writer.start(node.name, attrs, isEmpty);
  18226. if (!isEmpty) {
  18227. if (node = node.firstChild) {
  18228. do {
  18229. walk(node);
  18230. } while (node = node.next);
  18231. }
  18232. writer.end(name_1);
  18233. }
  18234. } else {
  18235. handler(node);
  18236. }
  18237. };
  18238. if (node.type === 1 && !settings.inner) {
  18239. walk(node);
  18240. } else {
  18241. handlers[11](node);
  18242. }
  18243. return writer.getContent();
  18244. };
  18245. return { serialize: serialize };
  18246. };
  18247. var nonInheritableStyles = new Set();
  18248. (function () {
  18249. var nonInheritableStylesArr = [
  18250. 'margin',
  18251. 'margin-left',
  18252. 'margin-right',
  18253. 'margin-top',
  18254. 'margin-bottom',
  18255. 'padding',
  18256. 'padding-left',
  18257. 'padding-right',
  18258. 'padding-top',
  18259. 'padding-bottom',
  18260. 'border',
  18261. 'border-width',
  18262. 'border-style',
  18263. 'border-color',
  18264. 'background',
  18265. 'background-attachment',
  18266. 'background-clip',
  18267. 'background-color',
  18268. 'background-image',
  18269. 'background-origin',
  18270. 'background-position',
  18271. 'background-repeat',
  18272. 'background-size',
  18273. 'float',
  18274. 'position',
  18275. 'left',
  18276. 'right',
  18277. 'top',
  18278. 'bottom',
  18279. 'z-index',
  18280. 'display',
  18281. 'transform',
  18282. 'width',
  18283. 'max-width',
  18284. 'min-width',
  18285. 'height',
  18286. 'max-height',
  18287. 'min-height',
  18288. 'overflow',
  18289. 'overflow-x',
  18290. 'overflow-y',
  18291. 'text-overflow',
  18292. 'vertical-align',
  18293. 'transition',
  18294. 'transition-delay',
  18295. 'transition-duration',
  18296. 'transition-property',
  18297. 'transition-timing-function'
  18298. ];
  18299. each$k(nonInheritableStylesArr, function (style) {
  18300. nonInheritableStyles.add(style);
  18301. });
  18302. }());
  18303. var shorthandStyleProps = [
  18304. 'font',
  18305. 'text-decoration',
  18306. 'text-emphasis'
  18307. ];
  18308. var getStyleProps = function (dom, node) {
  18309. return keys(dom.parseStyle(dom.getAttrib(node, 'style')));
  18310. };
  18311. var isNonInheritableStyle = function (style) {
  18312. return nonInheritableStyles.has(style);
  18313. };
  18314. var hasInheritableStyles = function (dom, node) {
  18315. return forall(getStyleProps(dom, node), function (style) {
  18316. return !isNonInheritableStyle(style);
  18317. });
  18318. };
  18319. var getLonghandStyleProps = function (styles) {
  18320. return filter$4(styles, function (style) {
  18321. return exists(shorthandStyleProps, function (prop) {
  18322. return startsWith(style, prop);
  18323. });
  18324. });
  18325. };
  18326. var hasStyleConflict = function (dom, node, parentNode) {
  18327. var nodeStyleProps = getStyleProps(dom, node);
  18328. var parentNodeStyleProps = getStyleProps(dom, parentNode);
  18329. var valueMismatch = function (prop) {
  18330. var nodeValue = dom.getStyle(node, prop);
  18331. var parentValue = dom.getStyle(parentNode, prop);
  18332. return isNotEmpty(nodeValue) && isNotEmpty(parentValue) && nodeValue !== parentValue;
  18333. };
  18334. return exists(nodeStyleProps, function (nodeStyleProp) {
  18335. var propExists = function (props) {
  18336. return exists(props, function (prop) {
  18337. return prop === nodeStyleProp;
  18338. });
  18339. };
  18340. if (!propExists(parentNodeStyleProps) && propExists(shorthandStyleProps)) {
  18341. var longhandProps = getLonghandStyleProps(parentNodeStyleProps);
  18342. return exists(longhandProps, valueMismatch);
  18343. } else {
  18344. return valueMismatch(nodeStyleProp);
  18345. }
  18346. });
  18347. };
  18348. var isChar = function (forward, predicate, pos) {
  18349. return Optional.from(pos.container()).filter(isText$7).exists(function (text) {
  18350. var delta = forward ? 0 : -1;
  18351. return predicate(text.data.charAt(pos.offset() + delta));
  18352. });
  18353. };
  18354. var isBeforeSpace = curry(isChar, true, isWhiteSpace);
  18355. var isAfterSpace = curry(isChar, false, isWhiteSpace);
  18356. var isEmptyText = function (pos) {
  18357. var container = pos.container();
  18358. return isText$7(container) && (container.data.length === 0 || isZwsp(container.data) && BookmarkManager.isBookmarkNode(container.parentNode));
  18359. };
  18360. var matchesElementPosition = function (before, predicate) {
  18361. return function (pos) {
  18362. return Optional.from(getChildNodeAtRelativeOffset(before ? 0 : -1, pos)).filter(predicate).isSome();
  18363. };
  18364. };
  18365. var isImageBlock = function (node) {
  18366. return isImg(node) && get$5(SugarElement.fromDom(node), 'display') === 'block';
  18367. };
  18368. var isCefNode = function (node) {
  18369. return isContentEditableFalse$b(node) && !isBogusAll$1(node);
  18370. };
  18371. var isBeforeImageBlock = matchesElementPosition(true, isImageBlock);
  18372. var isAfterImageBlock = matchesElementPosition(false, isImageBlock);
  18373. var isBeforeMedia = matchesElementPosition(true, isMedia$2);
  18374. var isAfterMedia = matchesElementPosition(false, isMedia$2);
  18375. var isBeforeTable = matchesElementPosition(true, isTable$3);
  18376. var isAfterTable = matchesElementPosition(false, isTable$3);
  18377. var isBeforeContentEditableFalse = matchesElementPosition(true, isCefNode);
  18378. var isAfterContentEditableFalse = matchesElementPosition(false, isCefNode);
  18379. var getLastChildren = function (elm) {
  18380. var children = [];
  18381. var rawNode = elm.dom;
  18382. while (rawNode) {
  18383. children.push(SugarElement.fromDom(rawNode));
  18384. rawNode = rawNode.lastChild;
  18385. }
  18386. return children;
  18387. };
  18388. var removeTrailingBr = function (elm) {
  18389. var allBrs = descendants(elm, 'br');
  18390. var brs = filter$4(getLastChildren(elm).slice(-1), isBr$4);
  18391. if (allBrs.length === brs.length) {
  18392. each$k(brs, remove$7);
  18393. }
  18394. };
  18395. var fillWithPaddingBr = function (elm) {
  18396. empty(elm);
  18397. append$1(elm, SugarElement.fromHtml('<br data-mce-bogus="1">'));
  18398. };
  18399. var trimBlockTrailingBr = function (elm) {
  18400. lastChild(elm).each(function (lastChild) {
  18401. prevSibling(lastChild).each(function (lastChildPrevSibling) {
  18402. if (isBlock$2(elm) && isBr$4(lastChild) && isBlock$2(lastChildPrevSibling)) {
  18403. remove$7(lastChild);
  18404. }
  18405. });
  18406. });
  18407. };
  18408. var dropLast = function (xs) {
  18409. return xs.slice(0, -1);
  18410. };
  18411. var parentsUntil = function (start, root, predicate) {
  18412. if (contains$1(root, start)) {
  18413. return dropLast(parents$1(start, function (elm) {
  18414. return predicate(elm) || eq(elm, root);
  18415. }));
  18416. } else {
  18417. return [];
  18418. }
  18419. };
  18420. var parents = function (start, root) {
  18421. return parentsUntil(start, root, never);
  18422. };
  18423. var parentsAndSelf = function (start, root) {
  18424. return [start].concat(parents(start, root));
  18425. };
  18426. var navigateIgnoreEmptyTextNodes = function (forward, root, from) {
  18427. return navigateIgnore(forward, root, from, isEmptyText);
  18428. };
  18429. var getClosestBlock$1 = function (root, pos) {
  18430. return find$3(parentsAndSelf(SugarElement.fromDom(pos.container()), root), isBlock$2);
  18431. };
  18432. var isAtBeforeAfterBlockBoundary = function (forward, root, pos) {
  18433. return navigateIgnoreEmptyTextNodes(forward, root.dom, pos).forall(function (newPos) {
  18434. return getClosestBlock$1(root, pos).fold(function () {
  18435. return isInSameBlock(newPos, pos, root.dom) === false;
  18436. }, function (fromBlock) {
  18437. return isInSameBlock(newPos, pos, root.dom) === false && contains$1(fromBlock, SugarElement.fromDom(newPos.container()));
  18438. });
  18439. });
  18440. };
  18441. var isAtBlockBoundary = function (forward, root, pos) {
  18442. return getClosestBlock$1(root, pos).fold(function () {
  18443. return navigateIgnoreEmptyTextNodes(forward, root.dom, pos).forall(function (newPos) {
  18444. return isInSameBlock(newPos, pos, root.dom) === false;
  18445. });
  18446. }, function (parent) {
  18447. return navigateIgnoreEmptyTextNodes(forward, parent.dom, pos).isNone();
  18448. });
  18449. };
  18450. var isAtStartOfBlock = curry(isAtBlockBoundary, false);
  18451. var isAtEndOfBlock = curry(isAtBlockBoundary, true);
  18452. var isBeforeBlock = curry(isAtBeforeAfterBlockBoundary, false);
  18453. var isAfterBlock = curry(isAtBeforeAfterBlockBoundary, true);
  18454. var isBr = function (pos) {
  18455. return getElementFromPosition(pos).exists(isBr$4);
  18456. };
  18457. var findBr = function (forward, root, pos) {
  18458. var parentBlocks = filter$4(parentsAndSelf(SugarElement.fromDom(pos.container()), root), isBlock$2);
  18459. var scope = head(parentBlocks).getOr(root);
  18460. return fromPosition(forward, scope.dom, pos).filter(isBr);
  18461. };
  18462. var isBeforeBr$1 = function (root, pos) {
  18463. return getElementFromPosition(pos).exists(isBr$4) || findBr(true, root, pos).isSome();
  18464. };
  18465. var isAfterBr = function (root, pos) {
  18466. return getElementFromPrevPosition(pos).exists(isBr$4) || findBr(false, root, pos).isSome();
  18467. };
  18468. var findPreviousBr = curry(findBr, false);
  18469. var findNextBr = curry(findBr, true);
  18470. var isInMiddleOfText = function (pos) {
  18471. return CaretPosition.isTextPosition(pos) && !pos.isAtStart() && !pos.isAtEnd();
  18472. };
  18473. var getClosestBlock = function (root, pos) {
  18474. var parentBlocks = filter$4(parentsAndSelf(SugarElement.fromDom(pos.container()), root), isBlock$2);
  18475. return head(parentBlocks).getOr(root);
  18476. };
  18477. var hasSpaceBefore = function (root, pos) {
  18478. if (isInMiddleOfText(pos)) {
  18479. return isAfterSpace(pos);
  18480. } else {
  18481. return isAfterSpace(pos) || prevPosition(getClosestBlock(root, pos).dom, pos).exists(isAfterSpace);
  18482. }
  18483. };
  18484. var hasSpaceAfter = function (root, pos) {
  18485. if (isInMiddleOfText(pos)) {
  18486. return isBeforeSpace(pos);
  18487. } else {
  18488. return isBeforeSpace(pos) || nextPosition(getClosestBlock(root, pos).dom, pos).exists(isBeforeSpace);
  18489. }
  18490. };
  18491. var isPreValue = function (value) {
  18492. return contains$3([
  18493. 'pre',
  18494. 'pre-wrap'
  18495. ], value);
  18496. };
  18497. var isInPre = function (pos) {
  18498. return getElementFromPosition(pos).bind(function (elm) {
  18499. return closest$3(elm, isElement$6);
  18500. }).exists(function (elm) {
  18501. return isPreValue(get$5(elm, 'white-space'));
  18502. });
  18503. };
  18504. var isAtBeginningOfBody = function (root, pos) {
  18505. return prevPosition(root.dom, pos).isNone();
  18506. };
  18507. var isAtEndOfBody = function (root, pos) {
  18508. return nextPosition(root.dom, pos).isNone();
  18509. };
  18510. var isAtLineBoundary = function (root, pos) {
  18511. return isAtBeginningOfBody(root, pos) || isAtEndOfBody(root, pos) || isAtStartOfBlock(root, pos) || isAtEndOfBlock(root, pos) || isAfterBr(root, pos) || isBeforeBr$1(root, pos);
  18512. };
  18513. var needsToHaveNbsp = function (root, pos) {
  18514. if (isInPre(pos)) {
  18515. return false;
  18516. } else {
  18517. return isAtLineBoundary(root, pos) || hasSpaceBefore(root, pos) || hasSpaceAfter(root, pos);
  18518. }
  18519. };
  18520. var needsToBeNbspLeft = function (root, pos) {
  18521. if (isInPre(pos)) {
  18522. return false;
  18523. } else {
  18524. return isAtStartOfBlock(root, pos) || isBeforeBlock(root, pos) || isAfterBr(root, pos) || hasSpaceBefore(root, pos);
  18525. }
  18526. };
  18527. var leanRight = function (pos) {
  18528. var container = pos.container();
  18529. var offset = pos.offset();
  18530. if (isText$7(container) && offset < container.data.length) {
  18531. return CaretPosition(container, offset + 1);
  18532. } else {
  18533. return pos;
  18534. }
  18535. };
  18536. var needsToBeNbspRight = function (root, pos) {
  18537. if (isInPre(pos)) {
  18538. return false;
  18539. } else {
  18540. return isAtEndOfBlock(root, pos) || isAfterBlock(root, pos) || isBeforeBr$1(root, pos) || hasSpaceAfter(root, pos);
  18541. }
  18542. };
  18543. var needsToBeNbsp = function (root, pos) {
  18544. return needsToBeNbspLeft(root, pos) || needsToBeNbspRight(root, leanRight(pos));
  18545. };
  18546. var isNbspAt = function (text, offset) {
  18547. return isNbsp(text.charAt(offset));
  18548. };
  18549. var hasNbsp = function (pos) {
  18550. var container = pos.container();
  18551. return isText$7(container) && contains$2(container.data, nbsp);
  18552. };
  18553. var normalizeNbspMiddle = function (text) {
  18554. var chars = text.split('');
  18555. return map$3(chars, function (chr, i) {
  18556. if (isNbsp(chr) && i > 0 && i < chars.length - 1 && isContent(chars[i - 1]) && isContent(chars[i + 1])) {
  18557. return ' ';
  18558. } else {
  18559. return chr;
  18560. }
  18561. }).join('');
  18562. };
  18563. var normalizeNbspAtStart = function (root, node) {
  18564. var text = node.data;
  18565. var firstPos = CaretPosition(node, 0);
  18566. if (isNbspAt(text, 0) && !needsToBeNbsp(root, firstPos)) {
  18567. node.data = ' ' + text.slice(1);
  18568. return true;
  18569. } else {
  18570. return false;
  18571. }
  18572. };
  18573. var normalizeNbspInMiddleOfTextNode = function (node) {
  18574. var text = node.data;
  18575. var newText = normalizeNbspMiddle(text);
  18576. if (newText !== text) {
  18577. node.data = newText;
  18578. return true;
  18579. } else {
  18580. return false;
  18581. }
  18582. };
  18583. var normalizeNbspAtEnd = function (root, node) {
  18584. var text = node.data;
  18585. var lastPos = CaretPosition(node, text.length - 1);
  18586. if (isNbspAt(text, text.length - 1) && !needsToBeNbsp(root, lastPos)) {
  18587. node.data = text.slice(0, -1) + ' ';
  18588. return true;
  18589. } else {
  18590. return false;
  18591. }
  18592. };
  18593. var normalizeNbsps = function (root, pos) {
  18594. return Optional.some(pos).filter(hasNbsp).bind(function (pos) {
  18595. var container = pos.container();
  18596. var normalized = normalizeNbspAtStart(root, container) || normalizeNbspInMiddleOfTextNode(container) || normalizeNbspAtEnd(root, container);
  18597. return normalized ? Optional.some(pos) : Optional.none();
  18598. });
  18599. };
  18600. var normalizeNbspsInEditor = function (editor) {
  18601. var root = SugarElement.fromDom(editor.getBody());
  18602. if (editor.selection.isCollapsed()) {
  18603. normalizeNbsps(root, CaretPosition.fromRangeStart(editor.selection.getRng())).each(function (pos) {
  18604. editor.selection.setRng(pos.toRange());
  18605. });
  18606. }
  18607. };
  18608. var normalizeContent = function (content, isStartOfContent, isEndOfContent) {
  18609. var result = foldl(content, function (acc, c) {
  18610. if (isWhiteSpace(c) || isNbsp(c)) {
  18611. if (acc.previousCharIsSpace || acc.str === '' && isStartOfContent || acc.str.length === content.length - 1 && isEndOfContent) {
  18612. return {
  18613. previousCharIsSpace: false,
  18614. str: acc.str + nbsp
  18615. };
  18616. } else {
  18617. return {
  18618. previousCharIsSpace: true,
  18619. str: acc.str + ' '
  18620. };
  18621. }
  18622. } else {
  18623. return {
  18624. previousCharIsSpace: false,
  18625. str: acc.str + c
  18626. };
  18627. }
  18628. }, {
  18629. previousCharIsSpace: false,
  18630. str: ''
  18631. });
  18632. return result.str;
  18633. };
  18634. var normalize$1 = function (node, offset, count) {
  18635. if (count === 0) {
  18636. return;
  18637. }
  18638. var elm = SugarElement.fromDom(node);
  18639. var root = ancestor$3(elm, isBlock$2).getOr(elm);
  18640. var whitespace = node.data.slice(offset, offset + count);
  18641. var isEndOfContent = offset + count >= node.data.length && needsToBeNbspRight(root, CaretPosition(node, node.data.length));
  18642. var isStartOfContent = offset === 0 && needsToBeNbspLeft(root, CaretPosition(node, 0));
  18643. node.replaceData(offset, count, normalizeContent(whitespace, isStartOfContent, isEndOfContent));
  18644. };
  18645. var normalizeWhitespaceAfter = function (node, offset) {
  18646. var content = node.data.slice(offset);
  18647. var whitespaceCount = content.length - lTrim(content).length;
  18648. normalize$1(node, offset, whitespaceCount);
  18649. };
  18650. var normalizeWhitespaceBefore = function (node, offset) {
  18651. var content = node.data.slice(0, offset);
  18652. var whitespaceCount = content.length - rTrim(content).length;
  18653. normalize$1(node, offset - whitespaceCount, whitespaceCount);
  18654. };
  18655. var mergeTextNodes = function (prevNode, nextNode, normalizeWhitespace, mergeToPrev) {
  18656. if (mergeToPrev === void 0) {
  18657. mergeToPrev = true;
  18658. }
  18659. var whitespaceOffset = rTrim(prevNode.data).length;
  18660. var newNode = mergeToPrev ? prevNode : nextNode;
  18661. var removeNode = mergeToPrev ? nextNode : prevNode;
  18662. if (mergeToPrev) {
  18663. newNode.appendData(removeNode.data);
  18664. } else {
  18665. newNode.insertData(0, removeNode.data);
  18666. }
  18667. remove$7(SugarElement.fromDom(removeNode));
  18668. if (normalizeWhitespace) {
  18669. normalizeWhitespaceAfter(newNode, whitespaceOffset);
  18670. }
  18671. return newNode;
  18672. };
  18673. var needsReposition = function (pos, elm) {
  18674. var container = pos.container();
  18675. var offset = pos.offset();
  18676. return CaretPosition.isTextPosition(pos) === false && container === elm.parentNode && offset > CaretPosition.before(elm).offset();
  18677. };
  18678. var reposition = function (elm, pos) {
  18679. return needsReposition(pos, elm) ? CaretPosition(pos.container(), pos.offset() - 1) : pos;
  18680. };
  18681. var beforeOrStartOf = function (node) {
  18682. return isText$7(node) ? CaretPosition(node, 0) : CaretPosition.before(node);
  18683. };
  18684. var afterOrEndOf = function (node) {
  18685. return isText$7(node) ? CaretPosition(node, node.data.length) : CaretPosition.after(node);
  18686. };
  18687. var getPreviousSiblingCaretPosition = function (elm) {
  18688. if (isCaretCandidate$3(elm.previousSibling)) {
  18689. return Optional.some(afterOrEndOf(elm.previousSibling));
  18690. } else {
  18691. return elm.previousSibling ? lastPositionIn(elm.previousSibling) : Optional.none();
  18692. }
  18693. };
  18694. var getNextSiblingCaretPosition = function (elm) {
  18695. if (isCaretCandidate$3(elm.nextSibling)) {
  18696. return Optional.some(beforeOrStartOf(elm.nextSibling));
  18697. } else {
  18698. return elm.nextSibling ? firstPositionIn(elm.nextSibling) : Optional.none();
  18699. }
  18700. };
  18701. var findCaretPositionBackwardsFromElm = function (rootElement, elm) {
  18702. var startPosition = CaretPosition.before(elm.previousSibling ? elm.previousSibling : elm.parentNode);
  18703. return prevPosition(rootElement, startPosition).fold(function () {
  18704. return nextPosition(rootElement, CaretPosition.after(elm));
  18705. }, Optional.some);
  18706. };
  18707. var findCaretPositionForwardsFromElm = function (rootElement, elm) {
  18708. return nextPosition(rootElement, CaretPosition.after(elm)).fold(function () {
  18709. return prevPosition(rootElement, CaretPosition.before(elm));
  18710. }, Optional.some);
  18711. };
  18712. var findCaretPositionBackwards = function (rootElement, elm) {
  18713. return getPreviousSiblingCaretPosition(elm).orThunk(function () {
  18714. return getNextSiblingCaretPosition(elm);
  18715. }).orThunk(function () {
  18716. return findCaretPositionBackwardsFromElm(rootElement, elm);
  18717. });
  18718. };
  18719. var findCaretPositionForward = function (rootElement, elm) {
  18720. return getNextSiblingCaretPosition(elm).orThunk(function () {
  18721. return getPreviousSiblingCaretPosition(elm);
  18722. }).orThunk(function () {
  18723. return findCaretPositionForwardsFromElm(rootElement, elm);
  18724. });
  18725. };
  18726. var findCaretPosition = function (forward, rootElement, elm) {
  18727. return forward ? findCaretPositionForward(rootElement, elm) : findCaretPositionBackwards(rootElement, elm);
  18728. };
  18729. var findCaretPosOutsideElmAfterDelete = function (forward, rootElement, elm) {
  18730. return findCaretPosition(forward, rootElement, elm).map(curry(reposition, elm));
  18731. };
  18732. var setSelection$1 = function (editor, forward, pos) {
  18733. pos.fold(function () {
  18734. editor.focus();
  18735. }, function (pos) {
  18736. editor.selection.setRng(pos.toRange(), forward);
  18737. });
  18738. };
  18739. var eqRawNode = function (rawNode) {
  18740. return function (elm) {
  18741. return elm.dom === rawNode;
  18742. };
  18743. };
  18744. var isBlock = function (editor, elm) {
  18745. return elm && has$2(editor.schema.getBlockElements(), name(elm));
  18746. };
  18747. var paddEmptyBlock = function (elm) {
  18748. if (isEmpty$2(elm)) {
  18749. var br = SugarElement.fromHtml('<br data-mce-bogus="1">');
  18750. empty(elm);
  18751. append$1(elm, br);
  18752. return Optional.some(CaretPosition.before(br.dom));
  18753. } else {
  18754. return Optional.none();
  18755. }
  18756. };
  18757. var deleteNormalized = function (elm, afterDeletePosOpt, normalizeWhitespace) {
  18758. var prevTextOpt = prevSibling(elm).filter(isText$8);
  18759. var nextTextOpt = nextSibling(elm).filter(isText$8);
  18760. remove$7(elm);
  18761. return lift3(prevTextOpt, nextTextOpt, afterDeletePosOpt, function (prev, next, pos) {
  18762. var prevNode = prev.dom, nextNode = next.dom;
  18763. var offset = prevNode.data.length;
  18764. mergeTextNodes(prevNode, nextNode, normalizeWhitespace);
  18765. return pos.container() === nextNode ? CaretPosition(prevNode, offset) : pos;
  18766. }).orThunk(function () {
  18767. if (normalizeWhitespace) {
  18768. prevTextOpt.each(function (elm) {
  18769. return normalizeWhitespaceBefore(elm.dom, elm.dom.length);
  18770. });
  18771. nextTextOpt.each(function (elm) {
  18772. return normalizeWhitespaceAfter(elm.dom, 0);
  18773. });
  18774. }
  18775. return afterDeletePosOpt;
  18776. });
  18777. };
  18778. var isInlineElement = function (editor, element) {
  18779. return has$2(editor.schema.getTextInlineElements(), name(element));
  18780. };
  18781. var deleteElement$2 = function (editor, forward, elm, moveCaret) {
  18782. if (moveCaret === void 0) {
  18783. moveCaret = true;
  18784. }
  18785. var afterDeletePos = findCaretPosOutsideElmAfterDelete(forward, editor.getBody(), elm.dom);
  18786. var parentBlock = ancestor$3(elm, curry(isBlock, editor), eqRawNode(editor.getBody()));
  18787. var normalizedAfterDeletePos = deleteNormalized(elm, afterDeletePos, isInlineElement(editor, elm));
  18788. if (editor.dom.isEmpty(editor.getBody())) {
  18789. editor.setContent('');
  18790. editor.selection.setCursorLocation();
  18791. } else {
  18792. parentBlock.bind(paddEmptyBlock).fold(function () {
  18793. if (moveCaret) {
  18794. setSelection$1(editor, forward, normalizedAfterDeletePos);
  18795. }
  18796. }, function (paddPos) {
  18797. if (moveCaret) {
  18798. setSelection$1(editor, forward, Optional.some(paddPos));
  18799. }
  18800. });
  18801. }
  18802. };
  18803. var isRootFromElement = function (root) {
  18804. return function (cur) {
  18805. return eq(root, cur);
  18806. };
  18807. };
  18808. var getTableCells = function (table) {
  18809. return descendants(table, 'td,th');
  18810. };
  18811. var getTableDetailsFromRange = function (rng, isRoot) {
  18812. var getTable = function (node) {
  18813. return getClosestTable(SugarElement.fromDom(node), isRoot);
  18814. };
  18815. var startTable = getTable(rng.startContainer);
  18816. var endTable = getTable(rng.endContainer);
  18817. var isStartInTable = startTable.isSome();
  18818. var isEndInTable = endTable.isSome();
  18819. var isSameTable = lift2(startTable, endTable, eq).getOr(false);
  18820. var isMultiTable = !isSameTable && isStartInTable && isEndInTable;
  18821. return {
  18822. startTable: startTable,
  18823. endTable: endTable,
  18824. isStartInTable: isStartInTable,
  18825. isEndInTable: isEndInTable,
  18826. isSameTable: isSameTable,
  18827. isMultiTable: isMultiTable
  18828. };
  18829. };
  18830. var tableCellRng = function (start, end) {
  18831. return {
  18832. start: start,
  18833. end: end
  18834. };
  18835. };
  18836. var tableSelection = function (rng, table, cells) {
  18837. return {
  18838. rng: rng,
  18839. table: table,
  18840. cells: cells
  18841. };
  18842. };
  18843. var deleteAction = Adt.generate([
  18844. {
  18845. singleCellTable: [
  18846. 'rng',
  18847. 'cell'
  18848. ]
  18849. },
  18850. { fullTable: ['table'] },
  18851. {
  18852. partialTable: [
  18853. 'cells',
  18854. 'outsideDetails'
  18855. ]
  18856. },
  18857. {
  18858. multiTable: [
  18859. 'startTableCells',
  18860. 'endTableCells',
  18861. 'betweenRng'
  18862. ]
  18863. }
  18864. ]);
  18865. var getClosestCell$1 = function (container, isRoot) {
  18866. return closest$2(SugarElement.fromDom(container), 'td,th', isRoot);
  18867. };
  18868. var isExpandedCellRng = function (cellRng) {
  18869. return !eq(cellRng.start, cellRng.end);
  18870. };
  18871. var getTableFromCellRng = function (cellRng, isRoot) {
  18872. return getClosestTable(cellRng.start, isRoot).bind(function (startParentTable) {
  18873. return getClosestTable(cellRng.end, isRoot).bind(function (endParentTable) {
  18874. return someIf(eq(startParentTable, endParentTable), startParentTable);
  18875. });
  18876. });
  18877. };
  18878. var isSingleCellTable = function (cellRng, isRoot) {
  18879. return !isExpandedCellRng(cellRng) && getTableFromCellRng(cellRng, isRoot).exists(function (table) {
  18880. var rows = table.dom.rows;
  18881. return rows.length === 1 && rows[0].cells.length === 1;
  18882. });
  18883. };
  18884. var getCellRng = function (rng, isRoot) {
  18885. var startCell = getClosestCell$1(rng.startContainer, isRoot);
  18886. var endCell = getClosestCell$1(rng.endContainer, isRoot);
  18887. return lift2(startCell, endCell, tableCellRng);
  18888. };
  18889. var getCellRangeFromStartTable = function (isRoot) {
  18890. return function (startCell) {
  18891. return getClosestTable(startCell, isRoot).bind(function (table) {
  18892. return last$2(getTableCells(table)).map(function (endCell) {
  18893. return tableCellRng(startCell, endCell);
  18894. });
  18895. });
  18896. };
  18897. };
  18898. var getCellRangeFromEndTable = function (isRoot) {
  18899. return function (endCell) {
  18900. return getClosestTable(endCell, isRoot).bind(function (table) {
  18901. return head(getTableCells(table)).map(function (startCell) {
  18902. return tableCellRng(startCell, endCell);
  18903. });
  18904. });
  18905. };
  18906. };
  18907. var getTableSelectionFromCellRng = function (isRoot) {
  18908. return function (cellRng) {
  18909. return getTableFromCellRng(cellRng, isRoot).map(function (table) {
  18910. return tableSelection(cellRng, table, getTableCells(table));
  18911. });
  18912. };
  18913. };
  18914. var getTableSelections = function (cellRng, selectionDetails, rng, isRoot) {
  18915. if (rng.collapsed || !cellRng.forall(isExpandedCellRng)) {
  18916. return Optional.none();
  18917. } else if (selectionDetails.isSameTable) {
  18918. var sameTableSelection = cellRng.bind(getTableSelectionFromCellRng(isRoot));
  18919. return Optional.some({
  18920. start: sameTableSelection,
  18921. end: sameTableSelection
  18922. });
  18923. } else {
  18924. var startCell = getClosestCell$1(rng.startContainer, isRoot);
  18925. var endCell = getClosestCell$1(rng.endContainer, isRoot);
  18926. var startTableSelection = startCell.bind(getCellRangeFromStartTable(isRoot)).bind(getTableSelectionFromCellRng(isRoot));
  18927. var endTableSelection = endCell.bind(getCellRangeFromEndTable(isRoot)).bind(getTableSelectionFromCellRng(isRoot));
  18928. return Optional.some({
  18929. start: startTableSelection,
  18930. end: endTableSelection
  18931. });
  18932. }
  18933. };
  18934. var getCellIndex = function (cells, cell) {
  18935. return findIndex$2(cells, function (x) {
  18936. return eq(x, cell);
  18937. });
  18938. };
  18939. var getSelectedCells = function (tableSelection) {
  18940. return lift2(getCellIndex(tableSelection.cells, tableSelection.rng.start), getCellIndex(tableSelection.cells, tableSelection.rng.end), function (startIndex, endIndex) {
  18941. return tableSelection.cells.slice(startIndex, endIndex + 1);
  18942. });
  18943. };
  18944. var isSingleCellTableContentSelected = function (optCellRng, rng, isRoot) {
  18945. return optCellRng.exists(function (cellRng) {
  18946. return isSingleCellTable(cellRng, isRoot) && hasAllContentsSelected(cellRng.start, rng);
  18947. });
  18948. };
  18949. var unselectCells = function (rng, selectionDetails) {
  18950. var startTable = selectionDetails.startTable, endTable = selectionDetails.endTable;
  18951. var otherContentRng = rng.cloneRange();
  18952. startTable.each(function (table) {
  18953. return otherContentRng.setStartAfter(table.dom);
  18954. });
  18955. endTable.each(function (table) {
  18956. return otherContentRng.setEndBefore(table.dom);
  18957. });
  18958. return otherContentRng;
  18959. };
  18960. var handleSingleTable = function (cellRng, selectionDetails, rng, isRoot) {
  18961. return getTableSelections(cellRng, selectionDetails, rng, isRoot).bind(function (_a) {
  18962. var start = _a.start, end = _a.end;
  18963. return start.or(end);
  18964. }).bind(function (tableSelection) {
  18965. var isSameTable = selectionDetails.isSameTable;
  18966. var selectedCells = getSelectedCells(tableSelection).getOr([]);
  18967. if (isSameTable && tableSelection.cells.length === selectedCells.length) {
  18968. return Optional.some(deleteAction.fullTable(tableSelection.table));
  18969. } else if (selectedCells.length > 0) {
  18970. if (isSameTable) {
  18971. return Optional.some(deleteAction.partialTable(selectedCells, Optional.none()));
  18972. } else {
  18973. var otherContentRng = unselectCells(rng, selectionDetails);
  18974. return Optional.some(deleteAction.partialTable(selectedCells, Optional.some(__assign(__assign({}, selectionDetails), { rng: otherContentRng }))));
  18975. }
  18976. } else {
  18977. return Optional.none();
  18978. }
  18979. });
  18980. };
  18981. var handleMultiTable = function (cellRng, selectionDetails, rng, isRoot) {
  18982. return getTableSelections(cellRng, selectionDetails, rng, isRoot).bind(function (_a) {
  18983. var start = _a.start, end = _a.end;
  18984. var startTableSelectedCells = start.bind(getSelectedCells).getOr([]);
  18985. var endTableSelectedCells = end.bind(getSelectedCells).getOr([]);
  18986. if (startTableSelectedCells.length > 0 && endTableSelectedCells.length > 0) {
  18987. var otherContentRng = unselectCells(rng, selectionDetails);
  18988. return Optional.some(deleteAction.multiTable(startTableSelectedCells, endTableSelectedCells, otherContentRng));
  18989. } else {
  18990. return Optional.none();
  18991. }
  18992. });
  18993. };
  18994. var getActionFromRange = function (root, rng) {
  18995. var isRoot = isRootFromElement(root);
  18996. var optCellRng = getCellRng(rng, isRoot);
  18997. var selectionDetails = getTableDetailsFromRange(rng, isRoot);
  18998. if (isSingleCellTableContentSelected(optCellRng, rng, isRoot)) {
  18999. return optCellRng.map(function (cellRng) {
  19000. return deleteAction.singleCellTable(rng, cellRng.start);
  19001. });
  19002. } else if (selectionDetails.isMultiTable) {
  19003. return handleMultiTable(optCellRng, selectionDetails, rng, isRoot);
  19004. } else {
  19005. return handleSingleTable(optCellRng, selectionDetails, rng, isRoot);
  19006. }
  19007. };
  19008. var freefallRtl = function (root) {
  19009. var child = isComment$1(root) ? prevSibling(root) : lastChild(root);
  19010. return child.bind(freefallRtl).orThunk(function () {
  19011. return Optional.some(root);
  19012. });
  19013. };
  19014. var cleanCells = function (cells) {
  19015. return each$k(cells, function (cell) {
  19016. remove$6(cell, 'contenteditable');
  19017. fillWithPaddingBr(cell);
  19018. });
  19019. };
  19020. var getOutsideBlock = function (editor, container) {
  19021. return Optional.from(editor.dom.getParent(container, editor.dom.isBlock)).map(SugarElement.fromDom);
  19022. };
  19023. var handleEmptyBlock = function (editor, startInTable, emptyBlock) {
  19024. emptyBlock.each(function (block) {
  19025. if (startInTable) {
  19026. remove$7(block);
  19027. } else {
  19028. fillWithPaddingBr(block);
  19029. editor.selection.setCursorLocation(block.dom, 0);
  19030. }
  19031. });
  19032. };
  19033. var deleteContentInsideCell = function (editor, cell, rng, isFirstCellInSelection) {
  19034. var insideTableRng = rng.cloneRange();
  19035. if (isFirstCellInSelection) {
  19036. insideTableRng.setStart(rng.startContainer, rng.startOffset);
  19037. insideTableRng.setEndAfter(cell.dom.lastChild);
  19038. } else {
  19039. insideTableRng.setStartBefore(cell.dom.firstChild);
  19040. insideTableRng.setEnd(rng.endContainer, rng.endOffset);
  19041. }
  19042. deleteCellContents(editor, insideTableRng, cell, false);
  19043. };
  19044. var collapseAndRestoreCellSelection = function (editor) {
  19045. var selectedCells = getCellsFromEditor(editor);
  19046. var selectedNode = SugarElement.fromDom(editor.selection.getNode());
  19047. if (isTableCell$5(selectedNode.dom) && isEmpty$2(selectedNode)) {
  19048. editor.selection.setCursorLocation(selectedNode.dom, 0);
  19049. } else {
  19050. editor.selection.collapse(true);
  19051. }
  19052. if (selectedCells.length > 1 && exists(selectedCells, function (cell) {
  19053. return eq(cell, selectedNode);
  19054. })) {
  19055. set$1(selectedNode, 'data-mce-selected', '1');
  19056. }
  19057. };
  19058. var emptySingleTableCells = function (editor, cells, outsideDetails) {
  19059. var editorRng = editor.selection.getRng();
  19060. var cellsToClean = outsideDetails.bind(function (_a) {
  19061. var rng = _a.rng, isStartInTable = _a.isStartInTable;
  19062. var outsideBlock = getOutsideBlock(editor, isStartInTable ? rng.endContainer : rng.startContainer);
  19063. rng.deleteContents();
  19064. handleEmptyBlock(editor, isStartInTable, outsideBlock.filter(isEmpty$2));
  19065. var endPointCell = isStartInTable ? cells[0] : cells[cells.length - 1];
  19066. deleteContentInsideCell(editor, endPointCell, editorRng, isStartInTable);
  19067. if (!isEmpty$2(endPointCell)) {
  19068. return Optional.some(isStartInTable ? cells.slice(1) : cells.slice(0, -1));
  19069. } else {
  19070. return Optional.none();
  19071. }
  19072. }).getOr(cells);
  19073. cleanCells(cellsToClean);
  19074. collapseAndRestoreCellSelection(editor);
  19075. return true;
  19076. };
  19077. var emptyMultiTableCells = function (editor, startTableCells, endTableCells, betweenRng) {
  19078. var rng = editor.selection.getRng();
  19079. var startCell = startTableCells[0];
  19080. var endCell = endTableCells[endTableCells.length - 1];
  19081. deleteContentInsideCell(editor, startCell, rng, true);
  19082. deleteContentInsideCell(editor, endCell, rng, false);
  19083. var startTableCellsToClean = isEmpty$2(startCell) ? startTableCells : startTableCells.slice(1);
  19084. var endTableCellsToClean = isEmpty$2(endCell) ? endTableCells : endTableCells.slice(0, -1);
  19085. cleanCells(startTableCellsToClean.concat(endTableCellsToClean));
  19086. betweenRng.deleteContents();
  19087. collapseAndRestoreCellSelection(editor);
  19088. return true;
  19089. };
  19090. var deleteCellContents = function (editor, rng, cell, moveSelection) {
  19091. if (moveSelection === void 0) {
  19092. moveSelection = true;
  19093. }
  19094. rng.deleteContents();
  19095. var lastNode = freefallRtl(cell).getOr(cell);
  19096. var lastBlock = SugarElement.fromDom(editor.dom.getParent(lastNode.dom, editor.dom.isBlock));
  19097. if (isEmpty$2(lastBlock)) {
  19098. fillWithPaddingBr(lastBlock);
  19099. if (moveSelection) {
  19100. editor.selection.setCursorLocation(lastBlock.dom, 0);
  19101. }
  19102. }
  19103. if (!eq(cell, lastBlock)) {
  19104. var additionalCleanupNodes = is$1(parent(lastBlock), cell) ? [] : siblings(lastBlock);
  19105. each$k(additionalCleanupNodes.concat(children(cell)), function (node) {
  19106. if (!eq(node, lastBlock) && !contains$1(node, lastBlock) && isEmpty$2(node)) {
  19107. remove$7(node);
  19108. }
  19109. });
  19110. }
  19111. return true;
  19112. };
  19113. var deleteTableElement = function (editor, table) {
  19114. deleteElement$2(editor, false, table);
  19115. return true;
  19116. };
  19117. var deleteCellRange = function (editor, rootElm, rng) {
  19118. return getActionFromRange(rootElm, rng).map(function (action) {
  19119. return action.fold(curry(deleteCellContents, editor), curry(deleteTableElement, editor), curry(emptySingleTableCells, editor), curry(emptyMultiTableCells, editor));
  19120. });
  19121. };
  19122. var deleteCaptionRange = function (editor, caption) {
  19123. return emptyElement(editor, caption);
  19124. };
  19125. var deleteTableRange = function (editor, rootElm, rng, startElm) {
  19126. return getParentCaption(rootElm, startElm).fold(function () {
  19127. return deleteCellRange(editor, rootElm, rng);
  19128. }, function (caption) {
  19129. return deleteCaptionRange(editor, caption);
  19130. }).getOr(false);
  19131. };
  19132. var deleteRange$2 = function (editor, startElm, selectedCells) {
  19133. var rootNode = SugarElement.fromDom(editor.getBody());
  19134. var rng = editor.selection.getRng();
  19135. return selectedCells.length !== 0 ? emptySingleTableCells(editor, selectedCells, Optional.none()) : deleteTableRange(editor, rootNode, rng, startElm);
  19136. };
  19137. var getParentCell = function (rootElm, elm) {
  19138. return find$3(parentsAndSelf(elm, rootElm), isTableCell$4);
  19139. };
  19140. var getParentCaption = function (rootElm, elm) {
  19141. return find$3(parentsAndSelf(elm, rootElm), isTag('caption'));
  19142. };
  19143. var deleteBetweenCells = function (editor, rootElm, forward, fromCell, from) {
  19144. return navigate(forward, editor.getBody(), from).bind(function (to) {
  19145. return getParentCell(rootElm, SugarElement.fromDom(to.getNode())).map(function (toCell) {
  19146. return eq(toCell, fromCell) === false;
  19147. });
  19148. });
  19149. };
  19150. var emptyElement = function (editor, elm) {
  19151. fillWithPaddingBr(elm);
  19152. editor.selection.setCursorLocation(elm.dom, 0);
  19153. return Optional.some(true);
  19154. };
  19155. var isDeleteOfLastCharPos = function (fromCaption, forward, from, to) {
  19156. return firstPositionIn(fromCaption.dom).bind(function (first) {
  19157. return lastPositionIn(fromCaption.dom).map(function (last) {
  19158. return forward ? from.isEqual(first) && to.isEqual(last) : from.isEqual(last) && to.isEqual(first);
  19159. });
  19160. }).getOr(true);
  19161. };
  19162. var emptyCaretCaption = function (editor, elm) {
  19163. return emptyElement(editor, elm);
  19164. };
  19165. var validateCaretCaption = function (rootElm, fromCaption, to) {
  19166. return getParentCaption(rootElm, SugarElement.fromDom(to.getNode())).map(function (toCaption) {
  19167. return eq(toCaption, fromCaption) === false;
  19168. });
  19169. };
  19170. var deleteCaretInsideCaption = function (editor, rootElm, forward, fromCaption, from) {
  19171. return navigate(forward, editor.getBody(), from).bind(function (to) {
  19172. return isDeleteOfLastCharPos(fromCaption, forward, from, to) ? emptyCaretCaption(editor, fromCaption) : validateCaretCaption(rootElm, fromCaption, to);
  19173. }).or(Optional.some(true));
  19174. };
  19175. var deleteCaretCells = function (editor, forward, rootElm, startElm) {
  19176. var from = CaretPosition.fromRangeStart(editor.selection.getRng());
  19177. return getParentCell(rootElm, startElm).bind(function (fromCell) {
  19178. return isEmpty$2(fromCell) ? emptyElement(editor, fromCell) : deleteBetweenCells(editor, rootElm, forward, fromCell, from);
  19179. }).getOr(false);
  19180. };
  19181. var deleteCaretCaption = function (editor, forward, rootElm, fromCaption) {
  19182. var from = CaretPosition.fromRangeStart(editor.selection.getRng());
  19183. return isEmpty$2(fromCaption) ? emptyElement(editor, fromCaption) : deleteCaretInsideCaption(editor, rootElm, forward, fromCaption, from);
  19184. };
  19185. var isNearTable = function (forward, pos) {
  19186. return forward ? isBeforeTable(pos) : isAfterTable(pos);
  19187. };
  19188. var isBeforeOrAfterTable = function (editor, forward) {
  19189. var fromPos = CaretPosition.fromRangeStart(editor.selection.getRng());
  19190. return isNearTable(forward, fromPos) || fromPosition(forward, editor.getBody(), fromPos).exists(function (pos) {
  19191. return isNearTable(forward, pos);
  19192. });
  19193. };
  19194. var deleteCaret$3 = function (editor, forward, startElm) {
  19195. var rootElm = SugarElement.fromDom(editor.getBody());
  19196. return getParentCaption(rootElm, startElm).fold(function () {
  19197. return deleteCaretCells(editor, forward, rootElm, startElm) || isBeforeOrAfterTable(editor, forward);
  19198. }, function (fromCaption) {
  19199. return deleteCaretCaption(editor, forward, rootElm, fromCaption).getOr(false);
  19200. });
  19201. };
  19202. var backspaceDelete$9 = function (editor, forward) {
  19203. var startElm = SugarElement.fromDom(editor.selection.getStart(true));
  19204. var cells = getCellsFromEditor(editor);
  19205. return editor.selection.isCollapsed() && cells.length === 0 ? deleteCaret$3(editor, forward, startElm) : deleteRange$2(editor, startElm, cells);
  19206. };
  19207. var createRange = function (sc, so, ec, eo) {
  19208. var rng = document.createRange();
  19209. rng.setStart(sc, so);
  19210. rng.setEnd(ec, eo);
  19211. return rng;
  19212. };
  19213. var normalizeBlockSelectionRange = function (rng) {
  19214. var startPos = CaretPosition.fromRangeStart(rng);
  19215. var endPos = CaretPosition.fromRangeEnd(rng);
  19216. var rootNode = rng.commonAncestorContainer;
  19217. return fromPosition(false, rootNode, endPos).map(function (newEndPos) {
  19218. if (!isInSameBlock(startPos, endPos, rootNode) && isInSameBlock(startPos, newEndPos, rootNode)) {
  19219. return createRange(startPos.container(), startPos.offset(), newEndPos.container(), newEndPos.offset());
  19220. } else {
  19221. return rng;
  19222. }
  19223. }).getOr(rng);
  19224. };
  19225. var normalize = function (rng) {
  19226. return rng.collapsed ? rng : normalizeBlockSelectionRange(rng);
  19227. };
  19228. var hasOnlyOneChild$1 = function (node) {
  19229. return node.firstChild && node.firstChild === node.lastChild;
  19230. };
  19231. var isPaddingNode = function (node) {
  19232. return node.name === 'br' || node.value === nbsp;
  19233. };
  19234. var isPaddedEmptyBlock = function (schema, node) {
  19235. var blockElements = schema.getBlockElements();
  19236. return blockElements[node.name] && hasOnlyOneChild$1(node) && isPaddingNode(node.firstChild);
  19237. };
  19238. var isEmptyFragmentElement = function (schema, node) {
  19239. var nonEmptyElements = schema.getNonEmptyElements();
  19240. return node && (node.isEmpty(nonEmptyElements) || isPaddedEmptyBlock(schema, node));
  19241. };
  19242. var isListFragment = function (schema, fragment) {
  19243. var firstChild = fragment.firstChild;
  19244. var lastChild = fragment.lastChild;
  19245. if (firstChild && firstChild.name === 'meta') {
  19246. firstChild = firstChild.next;
  19247. }
  19248. if (lastChild && lastChild.attr('id') === 'mce_marker') {
  19249. lastChild = lastChild.prev;
  19250. }
  19251. if (isEmptyFragmentElement(schema, lastChild)) {
  19252. lastChild = lastChild.prev;
  19253. }
  19254. if (!firstChild || firstChild !== lastChild) {
  19255. return false;
  19256. }
  19257. return firstChild.name === 'ul' || firstChild.name === 'ol';
  19258. };
  19259. var cleanupDomFragment = function (domFragment) {
  19260. var firstChild = domFragment.firstChild;
  19261. var lastChild = domFragment.lastChild;
  19262. if (firstChild && firstChild.nodeName === 'META') {
  19263. firstChild.parentNode.removeChild(firstChild);
  19264. }
  19265. if (lastChild && lastChild.id === 'mce_marker') {
  19266. lastChild.parentNode.removeChild(lastChild);
  19267. }
  19268. return domFragment;
  19269. };
  19270. var toDomFragment = function (dom, serializer, fragment) {
  19271. var html = serializer.serialize(fragment);
  19272. var domFragment = dom.createFragment(html);
  19273. return cleanupDomFragment(domFragment);
  19274. };
  19275. var listItems = function (elm) {
  19276. return filter$4(elm.childNodes, function (child) {
  19277. return child.nodeName === 'LI';
  19278. });
  19279. };
  19280. var isPadding = function (node) {
  19281. return node.data === nbsp || isBr$5(node);
  19282. };
  19283. var isListItemPadded = function (node) {
  19284. return node && node.firstChild && node.firstChild === node.lastChild && isPadding(node.firstChild);
  19285. };
  19286. var isEmptyOrPadded = function (elm) {
  19287. return !elm.firstChild || isListItemPadded(elm);
  19288. };
  19289. var trimListItems = function (elms) {
  19290. return elms.length > 0 && isEmptyOrPadded(elms[elms.length - 1]) ? elms.slice(0, -1) : elms;
  19291. };
  19292. var getParentLi = function (dom, node) {
  19293. var parentBlock = dom.getParent(node, dom.isBlock);
  19294. return parentBlock && parentBlock.nodeName === 'LI' ? parentBlock : null;
  19295. };
  19296. var isParentBlockLi = function (dom, node) {
  19297. return !!getParentLi(dom, node);
  19298. };
  19299. var getSplit = function (parentNode, rng) {
  19300. var beforeRng = rng.cloneRange();
  19301. var afterRng = rng.cloneRange();
  19302. beforeRng.setStartBefore(parentNode);
  19303. afterRng.setEndAfter(parentNode);
  19304. return [
  19305. beforeRng.cloneContents(),
  19306. afterRng.cloneContents()
  19307. ];
  19308. };
  19309. var findFirstIn = function (node, rootNode) {
  19310. var caretPos = CaretPosition.before(node);
  19311. var caretWalker = CaretWalker(rootNode);
  19312. var newCaretPos = caretWalker.next(caretPos);
  19313. return newCaretPos ? newCaretPos.toRange() : null;
  19314. };
  19315. var findLastOf = function (node, rootNode) {
  19316. var caretPos = CaretPosition.after(node);
  19317. var caretWalker = CaretWalker(rootNode);
  19318. var newCaretPos = caretWalker.prev(caretPos);
  19319. return newCaretPos ? newCaretPos.toRange() : null;
  19320. };
  19321. var insertMiddle = function (target, elms, rootNode, rng) {
  19322. var parts = getSplit(target, rng);
  19323. var parentElm = target.parentNode;
  19324. parentElm.insertBefore(parts[0], target);
  19325. Tools.each(elms, function (li) {
  19326. parentElm.insertBefore(li, target);
  19327. });
  19328. parentElm.insertBefore(parts[1], target);
  19329. parentElm.removeChild(target);
  19330. return findLastOf(elms[elms.length - 1], rootNode);
  19331. };
  19332. var insertBefore$1 = function (target, elms, rootNode) {
  19333. var parentElm = target.parentNode;
  19334. Tools.each(elms, function (elm) {
  19335. parentElm.insertBefore(elm, target);
  19336. });
  19337. return findFirstIn(target, rootNode);
  19338. };
  19339. var insertAfter$1 = function (target, elms, rootNode, dom) {
  19340. dom.insertAfter(elms.reverse(), target);
  19341. return findLastOf(elms[0], rootNode);
  19342. };
  19343. var insertAtCaret$1 = function (serializer, dom, rng, fragment) {
  19344. var domFragment = toDomFragment(dom, serializer, fragment);
  19345. var liTarget = getParentLi(dom, rng.startContainer);
  19346. var liElms = trimListItems(listItems(domFragment.firstChild));
  19347. var BEGINNING = 1, END = 2;
  19348. var rootNode = dom.getRoot();
  19349. var isAt = function (location) {
  19350. var caretPos = CaretPosition.fromRangeStart(rng);
  19351. var caretWalker = CaretWalker(dom.getRoot());
  19352. var newPos = location === BEGINNING ? caretWalker.prev(caretPos) : caretWalker.next(caretPos);
  19353. return newPos ? getParentLi(dom, newPos.getNode()) !== liTarget : true;
  19354. };
  19355. if (isAt(BEGINNING)) {
  19356. return insertBefore$1(liTarget, liElms, rootNode);
  19357. } else if (isAt(END)) {
  19358. return insertAfter$1(liTarget, liElms, rootNode, dom);
  19359. }
  19360. return insertMiddle(liTarget, liElms, rootNode, rng);
  19361. };
  19362. var trimOrPadLeftRight = function (dom, rng, html) {
  19363. var root = SugarElement.fromDom(dom.getRoot());
  19364. if (needsToBeNbspLeft(root, CaretPosition.fromRangeStart(rng))) {
  19365. html = html.replace(/^ /, '&nbsp;');
  19366. } else {
  19367. html = html.replace(/^&nbsp;/, ' ');
  19368. }
  19369. if (needsToBeNbspRight(root, CaretPosition.fromRangeEnd(rng))) {
  19370. html = html.replace(/(&nbsp;| )(<br( \/)>)?$/, '&nbsp;');
  19371. } else {
  19372. html = html.replace(/&nbsp;(<br( \/)?>)?$/, ' ');
  19373. }
  19374. return html;
  19375. };
  19376. var isTableCell$1 = isTableCell$5;
  19377. var isTableCellContentSelected = function (dom, rng, cell) {
  19378. if (cell !== null) {
  19379. var endCell = dom.getParent(rng.endContainer, isTableCell$1);
  19380. return cell === endCell && hasAllContentsSelected(SugarElement.fromDom(cell), rng);
  19381. } else {
  19382. return false;
  19383. }
  19384. };
  19385. var validInsertion = function (editor, value, parentNode) {
  19386. if (parentNode.getAttribute('data-mce-bogus') === 'all') {
  19387. parentNode.parentNode.insertBefore(editor.dom.createFragment(value), parentNode);
  19388. } else {
  19389. var node = parentNode.firstChild;
  19390. var node2 = parentNode.lastChild;
  19391. if (!node || node === node2 && node.nodeName === 'BR') {
  19392. editor.dom.setHTML(parentNode, value);
  19393. } else {
  19394. editor.selection.setContent(value);
  19395. }
  19396. }
  19397. };
  19398. var trimBrsFromTableCell = function (dom, elm) {
  19399. Optional.from(dom.getParent(elm, 'td,th')).map(SugarElement.fromDom).each(trimBlockTrailingBr);
  19400. };
  19401. var reduceInlineTextElements = function (editor, merge) {
  19402. var textInlineElements = editor.schema.getTextInlineElements();
  19403. var dom = editor.dom;
  19404. if (merge) {
  19405. var root_1 = editor.getBody();
  19406. var elementUtils_1 = ElementUtils(dom);
  19407. Tools.each(dom.select('*[data-mce-fragment]'), function (node) {
  19408. var isInline = isNonNullable(textInlineElements[node.nodeName.toLowerCase()]);
  19409. if (isInline && hasInheritableStyles(dom, node)) {
  19410. for (var parentNode = node.parentNode; isNonNullable(parentNode) && parentNode !== root_1; parentNode = parentNode.parentNode) {
  19411. var styleConflict = hasStyleConflict(dom, node, parentNode);
  19412. if (styleConflict) {
  19413. break;
  19414. }
  19415. if (elementUtils_1.compare(parentNode, node)) {
  19416. dom.remove(node, true);
  19417. break;
  19418. }
  19419. }
  19420. }
  19421. });
  19422. }
  19423. };
  19424. var markFragmentElements = function (fragment) {
  19425. var node = fragment;
  19426. while (node = node.walk()) {
  19427. if (node.type === 1) {
  19428. node.attr('data-mce-fragment', '1');
  19429. }
  19430. }
  19431. };
  19432. var unmarkFragmentElements = function (elm) {
  19433. Tools.each(elm.getElementsByTagName('*'), function (elm) {
  19434. elm.removeAttribute('data-mce-fragment');
  19435. });
  19436. };
  19437. var isPartOfFragment = function (node) {
  19438. return !!node.getAttribute('data-mce-fragment');
  19439. };
  19440. var canHaveChildren = function (editor, node) {
  19441. return node && !editor.schema.getShortEndedElements()[node.nodeName];
  19442. };
  19443. var moveSelectionToMarker = function (editor, marker) {
  19444. var nextRng;
  19445. var dom = editor.dom;
  19446. var selection = editor.selection;
  19447. if (!marker) {
  19448. return;
  19449. }
  19450. selection.scrollIntoView(marker);
  19451. var parentEditableElm = getContentEditableRoot$1(editor.getBody(), marker);
  19452. if (dom.getContentEditable(parentEditableElm) === 'false') {
  19453. dom.remove(marker);
  19454. selection.select(parentEditableElm);
  19455. return;
  19456. }
  19457. var rng = dom.createRng();
  19458. var node = marker.previousSibling;
  19459. if (isText$7(node)) {
  19460. rng.setStart(node, node.nodeValue.length);
  19461. if (!Env.ie) {
  19462. var node2 = marker.nextSibling;
  19463. if (isText$7(node2)) {
  19464. node.appendData(node2.data);
  19465. node2.parentNode.removeChild(node2);
  19466. }
  19467. }
  19468. } else {
  19469. rng.setStartBefore(marker);
  19470. rng.setEndBefore(marker);
  19471. }
  19472. var findNextCaretRng = function (rng) {
  19473. var caretPos = CaretPosition.fromRangeStart(rng);
  19474. var caretWalker = CaretWalker(editor.getBody());
  19475. caretPos = caretWalker.next(caretPos);
  19476. if (caretPos) {
  19477. return caretPos.toRange();
  19478. }
  19479. };
  19480. var parentBlock = dom.getParent(marker, dom.isBlock);
  19481. dom.remove(marker);
  19482. if (parentBlock && dom.isEmpty(parentBlock)) {
  19483. editor.$(parentBlock).empty();
  19484. rng.setStart(parentBlock, 0);
  19485. rng.setEnd(parentBlock, 0);
  19486. if (!isTableCell$1(parentBlock) && !isPartOfFragment(parentBlock) && (nextRng = findNextCaretRng(rng))) {
  19487. rng = nextRng;
  19488. dom.remove(parentBlock);
  19489. } else {
  19490. dom.add(parentBlock, dom.create('br', { 'data-mce-bogus': '1' }));
  19491. }
  19492. }
  19493. selection.setRng(rng);
  19494. };
  19495. var deleteSelectedContent = function (editor) {
  19496. var dom = editor.dom;
  19497. var rng = normalize(editor.selection.getRng());
  19498. editor.selection.setRng(rng);
  19499. var startCell = dom.getParent(rng.startContainer, isTableCell$1);
  19500. if (isTableCellContentSelected(dom, rng, startCell)) {
  19501. deleteCellContents(editor, rng, SugarElement.fromDom(startCell));
  19502. } else {
  19503. editor.getDoc().execCommand('Delete', false, null);
  19504. }
  19505. };
  19506. var insertHtmlAtCaret = function (editor, value, details) {
  19507. var parentNode;
  19508. var rng, node;
  19509. var selection = editor.selection;
  19510. var dom = editor.dom;
  19511. if (/^ | $/.test(value)) {
  19512. value = trimOrPadLeftRight(dom, selection.getRng(), value);
  19513. }
  19514. var parser = editor.parser;
  19515. var merge = details.merge;
  19516. var serializer = HtmlSerializer({ validate: shouldValidate(editor) }, editor.schema);
  19517. var bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>';
  19518. var args = editor.fire('BeforeSetContent', {
  19519. content: value,
  19520. format: 'html',
  19521. selection: true,
  19522. paste: details.paste
  19523. });
  19524. if (args.isDefaultPrevented()) {
  19525. editor.fire('SetContent', {
  19526. content: args.content,
  19527. format: 'html',
  19528. selection: true,
  19529. paste: details.paste
  19530. });
  19531. return;
  19532. }
  19533. value = args.content;
  19534. if (value.indexOf('{$caret}') === -1) {
  19535. value += '{$caret}';
  19536. }
  19537. value = value.replace(/\{\$caret\}/, bookmarkHtml);
  19538. rng = selection.getRng();
  19539. var caretElement = rng.startContainer || (rng.parentElement ? rng.parentElement() : null);
  19540. var body = editor.getBody();
  19541. if (caretElement === body && selection.isCollapsed()) {
  19542. if (dom.isBlock(body.firstChild) && canHaveChildren(editor, body.firstChild) && dom.isEmpty(body.firstChild)) {
  19543. rng = dom.createRng();
  19544. rng.setStart(body.firstChild, 0);
  19545. rng.setEnd(body.firstChild, 0);
  19546. selection.setRng(rng);
  19547. }
  19548. }
  19549. if (!selection.isCollapsed()) {
  19550. deleteSelectedContent(editor);
  19551. }
  19552. parentNode = selection.getNode();
  19553. var parserArgs = {
  19554. context: parentNode.nodeName.toLowerCase(),
  19555. data: details.data,
  19556. insert: true
  19557. };
  19558. var fragment = parser.parse(value, parserArgs);
  19559. if (details.paste === true && isListFragment(editor.schema, fragment) && isParentBlockLi(dom, parentNode)) {
  19560. rng = insertAtCaret$1(serializer, dom, selection.getRng(), fragment);
  19561. selection.setRng(rng);
  19562. editor.fire('SetContent', args);
  19563. return;
  19564. }
  19565. markFragmentElements(fragment);
  19566. node = fragment.lastChild;
  19567. if (node.attr('id') === 'mce_marker') {
  19568. var marker = node;
  19569. for (node = node.prev; node; node = node.walk(true)) {
  19570. if (node.type === 3 || !dom.isBlock(node.name)) {
  19571. if (editor.schema.isValidChild(node.parent.name, 'span')) {
  19572. node.parent.insert(marker, node, node.name === 'br');
  19573. }
  19574. break;
  19575. }
  19576. }
  19577. }
  19578. editor._selectionOverrides.showBlockCaretContainer(parentNode);
  19579. if (!parserArgs.invalid) {
  19580. value = serializer.serialize(fragment);
  19581. validInsertion(editor, value, parentNode);
  19582. } else {
  19583. editor.selection.setContent(bookmarkHtml);
  19584. parentNode = selection.getNode();
  19585. var rootNode = editor.getBody();
  19586. if (parentNode.nodeType === 9) {
  19587. parentNode = node = rootNode;
  19588. } else {
  19589. node = parentNode;
  19590. }
  19591. while (node !== rootNode) {
  19592. parentNode = node;
  19593. node = node.parentNode;
  19594. }
  19595. value = parentNode === rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode);
  19596. value = serializer.serialize(parser.parse(value.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i, function () {
  19597. return serializer.serialize(fragment);
  19598. })));
  19599. if (parentNode === rootNode) {
  19600. dom.setHTML(rootNode, value);
  19601. } else {
  19602. dom.setOuterHTML(parentNode, value);
  19603. }
  19604. }
  19605. reduceInlineTextElements(editor, merge);
  19606. moveSelectionToMarker(editor, dom.get('mce_marker'));
  19607. unmarkFragmentElements(editor.getBody());
  19608. trimBrsFromTableCell(dom, selection.getStart());
  19609. editor.fire('SetContent', args);
  19610. editor.addVisual();
  19611. };
  19612. var traverse = function (node, fn) {
  19613. fn(node);
  19614. if (node.firstChild) {
  19615. traverse(node.firstChild, fn);
  19616. }
  19617. if (node.next) {
  19618. traverse(node.next, fn);
  19619. }
  19620. };
  19621. var findMatchingNodes = function (nodeFilters, attributeFilters, node) {
  19622. var nodeMatches = {};
  19623. var attrMatches = {};
  19624. var matches = [];
  19625. if (node.firstChild) {
  19626. traverse(node.firstChild, function (node) {
  19627. each$k(nodeFilters, function (filter) {
  19628. if (filter.name === node.name) {
  19629. if (nodeMatches[filter.name]) {
  19630. nodeMatches[filter.name].nodes.push(node);
  19631. } else {
  19632. nodeMatches[filter.name] = {
  19633. filter: filter,
  19634. nodes: [node]
  19635. };
  19636. }
  19637. }
  19638. });
  19639. each$k(attributeFilters, function (filter) {
  19640. if (typeof node.attr(filter.name) === 'string') {
  19641. if (attrMatches[filter.name]) {
  19642. attrMatches[filter.name].nodes.push(node);
  19643. } else {
  19644. attrMatches[filter.name] = {
  19645. filter: filter,
  19646. nodes: [node]
  19647. };
  19648. }
  19649. }
  19650. });
  19651. });
  19652. }
  19653. for (var name_1 in nodeMatches) {
  19654. if (has$2(nodeMatches, name_1)) {
  19655. matches.push(nodeMatches[name_1]);
  19656. }
  19657. }
  19658. for (var name_2 in attrMatches) {
  19659. if (has$2(attrMatches, name_2)) {
  19660. matches.push(attrMatches[name_2]);
  19661. }
  19662. }
  19663. return matches;
  19664. };
  19665. var filter$1 = function (nodeFilters, attributeFilters, node) {
  19666. var matches = findMatchingNodes(nodeFilters, attributeFilters, node);
  19667. each$k(matches, function (match) {
  19668. each$k(match.filter.callbacks, function (callback) {
  19669. callback(match.nodes, match.filter.name, {});
  19670. });
  19671. });
  19672. };
  19673. var defaultFormat$1 = 'html';
  19674. var isTreeNode = function (content) {
  19675. return content instanceof AstNode;
  19676. };
  19677. var moveSelection = function (editor) {
  19678. if (hasFocus(editor)) {
  19679. firstPositionIn(editor.getBody()).each(function (pos) {
  19680. var node = pos.getNode();
  19681. var caretPos = isTable$3(node) ? firstPositionIn(node).getOr(pos) : pos;
  19682. editor.selection.setRng(caretPos.toRange());
  19683. });
  19684. }
  19685. };
  19686. var setEditorHtml = function (editor, html, noSelection) {
  19687. editor.dom.setHTML(editor.getBody(), html);
  19688. if (noSelection !== true) {
  19689. moveSelection(editor);
  19690. }
  19691. };
  19692. var setContentString = function (editor, body, content, args) {
  19693. if (content.length === 0 || /^\s+$/.test(content)) {
  19694. var padd = '<br data-mce-bogus="1">';
  19695. if (body.nodeName === 'TABLE') {
  19696. content = '<tr><td>' + padd + '</td></tr>';
  19697. } else if (/^(UL|OL)$/.test(body.nodeName)) {
  19698. content = '<li>' + padd + '</li>';
  19699. }
  19700. var forcedRootBlockName = getForcedRootBlock(editor);
  19701. if (forcedRootBlockName && editor.schema.isValidChild(body.nodeName.toLowerCase(), forcedRootBlockName.toLowerCase())) {
  19702. content = padd;
  19703. content = editor.dom.createHTML(forcedRootBlockName, getForcedRootBlockAttrs(editor), content);
  19704. } else if (!content) {
  19705. content = '<br data-mce-bogus="1">';
  19706. }
  19707. setEditorHtml(editor, content, args.no_selection);
  19708. editor.fire('SetContent', args);
  19709. } else {
  19710. if (args.format !== 'raw') {
  19711. content = HtmlSerializer({ validate: editor.validate }, editor.schema).serialize(editor.parser.parse(content, {
  19712. isRootContent: true,
  19713. insert: true
  19714. }));
  19715. }
  19716. args.content = isWsPreserveElement(SugarElement.fromDom(body)) ? content : Tools.trim(content);
  19717. setEditorHtml(editor, args.content, args.no_selection);
  19718. if (!args.no_events) {
  19719. editor.fire('SetContent', args);
  19720. }
  19721. }
  19722. return args.content;
  19723. };
  19724. var setContentTree = function (editor, body, content, args) {
  19725. filter$1(editor.parser.getNodeFilters(), editor.parser.getAttributeFilters(), content);
  19726. var html = HtmlSerializer({ validate: editor.validate }, editor.schema).serialize(content);
  19727. args.content = isWsPreserveElement(SugarElement.fromDom(body)) ? html : Tools.trim(html);
  19728. setEditorHtml(editor, args.content, args.no_selection);
  19729. if (!args.no_events) {
  19730. editor.fire('SetContent', args);
  19731. }
  19732. return content;
  19733. };
  19734. var setupArgs$2 = function (args, content) {
  19735. return __assign(__assign({ format: defaultFormat$1 }, args), {
  19736. set: true,
  19737. content: isTreeNode(content) ? '' : content
  19738. });
  19739. };
  19740. var setContentInternal = function (editor, content, args) {
  19741. var defaultedArgs = setupArgs$2(args, content);
  19742. var updatedArgs = args.no_events ? defaultedArgs : editor.fire('BeforeSetContent', defaultedArgs);
  19743. if (!isTreeNode(content)) {
  19744. content = updatedArgs.content;
  19745. }
  19746. return Optional.from(editor.getBody()).fold(constant(content), function (body) {
  19747. return isTreeNode(content) ? setContentTree(editor, body, content, updatedArgs) : setContentString(editor, body, content, updatedArgs);
  19748. });
  19749. };
  19750. var sibling = function (scope, predicate) {
  19751. return sibling$2(scope, predicate).isSome();
  19752. };
  19753. var ensureIsRoot = function (isRoot) {
  19754. return isFunction(isRoot) ? isRoot : never;
  19755. };
  19756. var ancestor = function (scope, transform, isRoot) {
  19757. var element = scope.dom;
  19758. var stop = ensureIsRoot(isRoot);
  19759. while (element.parentNode) {
  19760. element = element.parentNode;
  19761. var el = SugarElement.fromDom(element);
  19762. var transformed = transform(el);
  19763. if (transformed.isSome()) {
  19764. return transformed;
  19765. } else if (stop(el)) {
  19766. break;
  19767. }
  19768. }
  19769. return Optional.none();
  19770. };
  19771. var closest$1 = function (scope, transform, isRoot) {
  19772. var current = transform(scope);
  19773. var stop = ensureIsRoot(isRoot);
  19774. return current.orThunk(function () {
  19775. return stop(scope) ? Optional.none() : ancestor(scope, transform, stop);
  19776. });
  19777. };
  19778. var isEq$3 = isEq$5;
  19779. var matchesUnInheritedFormatSelector = function (ed, node, name) {
  19780. var formatList = ed.formatter.get(name);
  19781. if (formatList) {
  19782. for (var i = 0; i < formatList.length; i++) {
  19783. var format = formatList[i];
  19784. if (isSelectorFormat(format) && format.inherit === false && ed.dom.is(node, format.selector)) {
  19785. return true;
  19786. }
  19787. }
  19788. }
  19789. return false;
  19790. };
  19791. var matchParents = function (editor, node, name, vars, similar) {
  19792. var root = editor.dom.getRoot();
  19793. if (node === root) {
  19794. return false;
  19795. }
  19796. node = editor.dom.getParent(node, function (node) {
  19797. if (matchesUnInheritedFormatSelector(editor, node, name)) {
  19798. return true;
  19799. }
  19800. return node.parentNode === root || !!matchNode(editor, node, name, vars, true);
  19801. });
  19802. return !!matchNode(editor, node, name, vars, similar);
  19803. };
  19804. var matchName$1 = function (dom, node, format) {
  19805. if (isEq$3(node, format.inline)) {
  19806. return true;
  19807. }
  19808. if (isEq$3(node, format.block)) {
  19809. return true;
  19810. }
  19811. if (format.selector) {
  19812. return node.nodeType === 1 && dom.is(node, format.selector);
  19813. }
  19814. };
  19815. var matchItems = function (dom, node, format, itemName, similar, vars) {
  19816. var items = format[itemName];
  19817. if (isFunction(format.onmatch)) {
  19818. return format.onmatch(node, format, itemName);
  19819. }
  19820. if (items) {
  19821. if (isUndefined(items.length)) {
  19822. for (var key in items) {
  19823. if (has$2(items, key)) {
  19824. var value = itemName === 'attributes' ? dom.getAttrib(node, key) : getStyle(dom, node, key);
  19825. var expectedValue = replaceVars(items[key], vars);
  19826. var isEmptyValue = isNullable(value) || isEmpty$3(value);
  19827. if (isEmptyValue && isNullable(expectedValue)) {
  19828. continue;
  19829. }
  19830. if (similar && isEmptyValue && !format.exact) {
  19831. return false;
  19832. }
  19833. if ((!similar || format.exact) && !isEq$3(value, normalizeStyleValue(dom, expectedValue, key))) {
  19834. return false;
  19835. }
  19836. }
  19837. }
  19838. } else {
  19839. for (var i = 0; i < items.length; i++) {
  19840. if (itemName === 'attributes' ? dom.getAttrib(node, items[i]) : getStyle(dom, node, items[i])) {
  19841. return true;
  19842. }
  19843. }
  19844. }
  19845. }
  19846. return true;
  19847. };
  19848. var matchNode = function (ed, node, name, vars, similar) {
  19849. var formatList = ed.formatter.get(name);
  19850. var dom = ed.dom;
  19851. if (formatList && node) {
  19852. for (var i = 0; i < formatList.length; i++) {
  19853. var format = formatList[i];
  19854. if (matchName$1(ed.dom, node, format) && matchItems(dom, node, format, 'attributes', similar, vars) && matchItems(dom, node, format, 'styles', similar, vars)) {
  19855. var classes = format.classes;
  19856. if (classes) {
  19857. for (var x = 0; x < classes.length; x++) {
  19858. if (!ed.dom.hasClass(node, replaceVars(classes[x], vars))) {
  19859. return;
  19860. }
  19861. }
  19862. }
  19863. return format;
  19864. }
  19865. }
  19866. }
  19867. };
  19868. var match$2 = function (editor, name, vars, node, similar) {
  19869. if (node) {
  19870. return matchParents(editor, node, name, vars, similar);
  19871. }
  19872. node = editor.selection.getNode();
  19873. if (matchParents(editor, node, name, vars, similar)) {
  19874. return true;
  19875. }
  19876. var startNode = editor.selection.getStart();
  19877. if (startNode !== node) {
  19878. if (matchParents(editor, startNode, name, vars, similar)) {
  19879. return true;
  19880. }
  19881. }
  19882. return false;
  19883. };
  19884. var matchAll = function (editor, names, vars) {
  19885. var matchedFormatNames = [];
  19886. var checkedMap = {};
  19887. var startElement = editor.selection.getStart();
  19888. editor.dom.getParent(startElement, function (node) {
  19889. for (var i = 0; i < names.length; i++) {
  19890. var name_1 = names[i];
  19891. if (!checkedMap[name_1] && matchNode(editor, node, name_1, vars)) {
  19892. checkedMap[name_1] = true;
  19893. matchedFormatNames.push(name_1);
  19894. }
  19895. }
  19896. }, editor.dom.getRoot());
  19897. return matchedFormatNames;
  19898. };
  19899. var closest = function (editor, names) {
  19900. var isRoot = function (elm) {
  19901. return eq(elm, SugarElement.fromDom(editor.getBody()));
  19902. };
  19903. var match = function (elm, name) {
  19904. return matchNode(editor, elm.dom, name) ? Optional.some(name) : Optional.none();
  19905. };
  19906. return Optional.from(editor.selection.getStart(true)).bind(function (rawElm) {
  19907. return closest$1(SugarElement.fromDom(rawElm), function (elm) {
  19908. return findMap(names, function (name) {
  19909. return match(elm, name);
  19910. });
  19911. }, isRoot);
  19912. }).getOrNull();
  19913. };
  19914. var canApply = function (editor, name) {
  19915. var formatList = editor.formatter.get(name);
  19916. var dom = editor.dom;
  19917. if (formatList) {
  19918. var startNode = editor.selection.getStart();
  19919. var parents = getParents$2(dom, startNode);
  19920. for (var x = formatList.length - 1; x >= 0; x--) {
  19921. var format = formatList[x];
  19922. if (!isSelectorFormat(format) || isNonNullable(format.defaultBlock)) {
  19923. return true;
  19924. }
  19925. for (var i = parents.length - 1; i >= 0; i--) {
  19926. if (dom.is(parents[i], format.selector)) {
  19927. return true;
  19928. }
  19929. }
  19930. }
  19931. }
  19932. return false;
  19933. };
  19934. var matchAllOnNode = function (editor, node, formatNames) {
  19935. return foldl(formatNames, function (acc, name) {
  19936. var matchSimilar = isVariableFormatName(editor, name);
  19937. if (editor.formatter.matchNode(node, name, {}, matchSimilar)) {
  19938. return acc.concat([name]);
  19939. } else {
  19940. return acc;
  19941. }
  19942. }, []);
  19943. };
  19944. var ZWSP = ZWSP$1, CARET_ID = '_mce_caret';
  19945. var importNode = function (ownerDocument, node) {
  19946. return ownerDocument.importNode(node, true);
  19947. };
  19948. var getEmptyCaretContainers = function (node) {
  19949. var nodes = [];
  19950. while (node) {
  19951. if (node.nodeType === 3 && node.nodeValue !== ZWSP || node.childNodes.length > 1) {
  19952. return [];
  19953. }
  19954. if (node.nodeType === 1) {
  19955. nodes.push(node);
  19956. }
  19957. node = node.firstChild;
  19958. }
  19959. return nodes;
  19960. };
  19961. var isCaretContainerEmpty = function (node) {
  19962. return getEmptyCaretContainers(node).length > 0;
  19963. };
  19964. var findFirstTextNode = function (node) {
  19965. if (node) {
  19966. var walker = new DomTreeWalker(node, node);
  19967. for (node = walker.current(); node; node = walker.next()) {
  19968. if (isText$7(node)) {
  19969. return node;
  19970. }
  19971. }
  19972. }
  19973. return null;
  19974. };
  19975. var createCaretContainer = function (fill) {
  19976. var caretContainer = SugarElement.fromTag('span');
  19977. setAll$1(caretContainer, {
  19978. 'id': CARET_ID,
  19979. 'data-mce-bogus': '1',
  19980. 'data-mce-type': 'format-caret'
  19981. });
  19982. if (fill) {
  19983. append$1(caretContainer, SugarElement.fromText(ZWSP));
  19984. }
  19985. return caretContainer;
  19986. };
  19987. var trimZwspFromCaretContainer = function (caretContainerNode) {
  19988. var textNode = findFirstTextNode(caretContainerNode);
  19989. if (textNode && textNode.nodeValue.charAt(0) === ZWSP) {
  19990. textNode.deleteData(0, 1);
  19991. }
  19992. return textNode;
  19993. };
  19994. var removeCaretContainerNode = function (editor, node, moveCaret) {
  19995. if (moveCaret === void 0) {
  19996. moveCaret = true;
  19997. }
  19998. var dom = editor.dom, selection = editor.selection;
  19999. if (isCaretContainerEmpty(node)) {
  20000. deleteElement$2(editor, false, SugarElement.fromDom(node), moveCaret);
  20001. } else {
  20002. var rng = selection.getRng();
  20003. var block = dom.getParent(node, dom.isBlock);
  20004. var startContainer = rng.startContainer;
  20005. var startOffset = rng.startOffset;
  20006. var endContainer = rng.endContainer;
  20007. var endOffset = rng.endOffset;
  20008. var textNode = trimZwspFromCaretContainer(node);
  20009. dom.remove(node, true);
  20010. if (startContainer === textNode && startOffset > 0) {
  20011. rng.setStart(textNode, startOffset - 1);
  20012. }
  20013. if (endContainer === textNode && endOffset > 0) {
  20014. rng.setEnd(textNode, endOffset - 1);
  20015. }
  20016. if (block && dom.isEmpty(block)) {
  20017. fillWithPaddingBr(SugarElement.fromDom(block));
  20018. }
  20019. selection.setRng(rng);
  20020. }
  20021. };
  20022. var removeCaretContainer = function (editor, node, moveCaret) {
  20023. if (moveCaret === void 0) {
  20024. moveCaret = true;
  20025. }
  20026. var dom = editor.dom, selection = editor.selection;
  20027. if (!node) {
  20028. node = getParentCaretContainer(editor.getBody(), selection.getStart());
  20029. if (!node) {
  20030. while (node = dom.get(CARET_ID)) {
  20031. removeCaretContainerNode(editor, node, false);
  20032. }
  20033. }
  20034. } else {
  20035. removeCaretContainerNode(editor, node, moveCaret);
  20036. }
  20037. };
  20038. var insertCaretContainerNode = function (editor, caretContainer, formatNode) {
  20039. var dom = editor.dom, block = dom.getParent(formatNode, curry(isTextBlock$1, editor));
  20040. if (block && dom.isEmpty(block)) {
  20041. formatNode.parentNode.replaceChild(caretContainer, formatNode);
  20042. } else {
  20043. removeTrailingBr(SugarElement.fromDom(formatNode));
  20044. if (dom.isEmpty(formatNode)) {
  20045. formatNode.parentNode.replaceChild(caretContainer, formatNode);
  20046. } else {
  20047. dom.insertAfter(caretContainer, formatNode);
  20048. }
  20049. }
  20050. };
  20051. var appendNode = function (parentNode, node) {
  20052. parentNode.appendChild(node);
  20053. return node;
  20054. };
  20055. var insertFormatNodesIntoCaretContainer = function (formatNodes, caretContainer) {
  20056. var innerMostFormatNode = foldr(formatNodes, function (parentNode, formatNode) {
  20057. return appendNode(parentNode, formatNode.cloneNode(false));
  20058. }, caretContainer);
  20059. return appendNode(innerMostFormatNode, innerMostFormatNode.ownerDocument.createTextNode(ZWSP));
  20060. };
  20061. var cleanFormatNode = function (editor, caretContainer, formatNode, name, vars, similar) {
  20062. var formatter = editor.formatter;
  20063. var dom = editor.dom;
  20064. var validFormats = filter$4(keys(formatter.get()), function (formatName) {
  20065. return formatName !== name && !contains$2(formatName, 'removeformat');
  20066. });
  20067. var matchedFormats = matchAllOnNode(editor, formatNode, validFormats);
  20068. var uniqueFormats = filter$4(matchedFormats, function (fmtName) {
  20069. return !areSimilarFormats(editor, fmtName, name);
  20070. });
  20071. if (uniqueFormats.length > 0) {
  20072. var clonedFormatNode = formatNode.cloneNode(false);
  20073. dom.add(caretContainer, clonedFormatNode);
  20074. formatter.remove(name, vars, clonedFormatNode, similar);
  20075. dom.remove(clonedFormatNode);
  20076. return Optional.some(clonedFormatNode);
  20077. } else {
  20078. return Optional.none();
  20079. }
  20080. };
  20081. var applyCaretFormat = function (editor, name, vars) {
  20082. var caretContainer, textNode;
  20083. var selection = editor.selection;
  20084. var selectionRng = selection.getRng();
  20085. var offset = selectionRng.startOffset;
  20086. var container = selectionRng.startContainer;
  20087. var text = container.nodeValue;
  20088. caretContainer = getParentCaretContainer(editor.getBody(), selection.getStart());
  20089. if (caretContainer) {
  20090. textNode = findFirstTextNode(caretContainer);
  20091. }
  20092. var wordcharRegex = /[^\s\u00a0\u00ad\u200b\ufeff]/;
  20093. if (text && offset > 0 && offset < text.length && wordcharRegex.test(text.charAt(offset)) && wordcharRegex.test(text.charAt(offset - 1))) {
  20094. var bookmark = selection.getBookmark();
  20095. selectionRng.collapse(true);
  20096. var rng = expandRng(editor, selectionRng, editor.formatter.get(name));
  20097. rng = split(rng);
  20098. editor.formatter.apply(name, vars, rng);
  20099. selection.moveToBookmark(bookmark);
  20100. } else {
  20101. if (!caretContainer || textNode.nodeValue !== ZWSP) {
  20102. caretContainer = importNode(editor.getDoc(), createCaretContainer(true).dom);
  20103. textNode = caretContainer.firstChild;
  20104. selectionRng.insertNode(caretContainer);
  20105. offset = 1;
  20106. editor.formatter.apply(name, vars, caretContainer);
  20107. } else {
  20108. editor.formatter.apply(name, vars, caretContainer);
  20109. }
  20110. selection.setCursorLocation(textNode, offset);
  20111. }
  20112. };
  20113. var removeCaretFormat = function (editor, name, vars, similar) {
  20114. var dom = editor.dom;
  20115. var selection = editor.selection;
  20116. var hasContentAfter, node, formatNode;
  20117. var parents = [];
  20118. var rng = selection.getRng();
  20119. var container = rng.startContainer;
  20120. var offset = rng.startOffset;
  20121. node = container;
  20122. if (container.nodeType === 3) {
  20123. if (offset !== container.nodeValue.length) {
  20124. hasContentAfter = true;
  20125. }
  20126. node = node.parentNode;
  20127. }
  20128. while (node) {
  20129. if (matchNode(editor, node, name, vars, similar)) {
  20130. formatNode = node;
  20131. break;
  20132. }
  20133. if (node.nextSibling) {
  20134. hasContentAfter = true;
  20135. }
  20136. parents.push(node);
  20137. node = node.parentNode;
  20138. }
  20139. if (!formatNode) {
  20140. return;
  20141. }
  20142. if (hasContentAfter) {
  20143. var bookmark = selection.getBookmark();
  20144. rng.collapse(true);
  20145. var expandedRng = expandRng(editor, rng, editor.formatter.get(name), true);
  20146. expandedRng = split(expandedRng);
  20147. editor.formatter.remove(name, vars, expandedRng, similar);
  20148. selection.moveToBookmark(bookmark);
  20149. } else {
  20150. var caretContainer = getParentCaretContainer(editor.getBody(), formatNode);
  20151. var newCaretContainer = createCaretContainer(false).dom;
  20152. insertCaretContainerNode(editor, newCaretContainer, caretContainer !== null ? caretContainer : formatNode);
  20153. var cleanedFormatNode = cleanFormatNode(editor, newCaretContainer, formatNode, name, vars, similar);
  20154. var caretTextNode = insertFormatNodesIntoCaretContainer(parents.concat(cleanedFormatNode.toArray()), newCaretContainer);
  20155. removeCaretContainerNode(editor, caretContainer, false);
  20156. selection.setCursorLocation(caretTextNode, 1);
  20157. if (dom.isEmpty(formatNode)) {
  20158. dom.remove(formatNode);
  20159. }
  20160. }
  20161. };
  20162. var disableCaretContainer = function (editor, keyCode) {
  20163. var selection = editor.selection, body = editor.getBody();
  20164. removeCaretContainer(editor, null, false);
  20165. if ((keyCode === 8 || keyCode === 46) && selection.isCollapsed() && selection.getStart().innerHTML === ZWSP) {
  20166. removeCaretContainer(editor, getParentCaretContainer(body, selection.getStart()));
  20167. }
  20168. if (keyCode === 37 || keyCode === 39) {
  20169. removeCaretContainer(editor, getParentCaretContainer(body, selection.getStart()));
  20170. }
  20171. };
  20172. var setup$k = function (editor) {
  20173. editor.on('mouseup keydown', function (e) {
  20174. disableCaretContainer(editor, e.keyCode);
  20175. });
  20176. };
  20177. var replaceWithCaretFormat = function (targetNode, formatNodes) {
  20178. var caretContainer = createCaretContainer(false);
  20179. var innerMost = insertFormatNodesIntoCaretContainer(formatNodes, caretContainer.dom);
  20180. before$4(SugarElement.fromDom(targetNode), caretContainer);
  20181. remove$7(SugarElement.fromDom(targetNode));
  20182. return CaretPosition(innerMost, 0);
  20183. };
  20184. var isFormatElement = function (editor, element) {
  20185. var inlineElements = editor.schema.getTextInlineElements();
  20186. return has$2(inlineElements, name(element)) && !isCaretNode(element.dom) && !isBogus$2(element.dom);
  20187. };
  20188. var isEmptyCaretFormatElement = function (element) {
  20189. return isCaretNode(element.dom) && isCaretContainerEmpty(element.dom);
  20190. };
  20191. var postProcessHooks = {};
  20192. var filter = filter$2;
  20193. var each$b = each$i;
  20194. var addPostProcessHook = function (name, hook) {
  20195. var hooks = postProcessHooks[name];
  20196. if (!hooks) {
  20197. postProcessHooks[name] = [];
  20198. }
  20199. postProcessHooks[name].push(hook);
  20200. };
  20201. var postProcess$1 = function (name, editor) {
  20202. each$b(postProcessHooks[name], function (hook) {
  20203. hook(editor);
  20204. });
  20205. };
  20206. addPostProcessHook('pre', function (editor) {
  20207. var rng = editor.selection.getRng();
  20208. var blocks;
  20209. var hasPreSibling = function (pre) {
  20210. return isPre(pre.previousSibling) && indexOf$1(blocks, pre.previousSibling) !== -1;
  20211. };
  20212. var joinPre = function (pre1, pre2) {
  20213. DomQuery(pre2).remove();
  20214. DomQuery(pre1).append('<br><br>').append(pre2.childNodes);
  20215. };
  20216. var isPre = matchNodeNames(['pre']);
  20217. if (!rng.collapsed) {
  20218. blocks = editor.selection.getSelectedBlocks();
  20219. each$b(filter(filter(blocks, isPre), hasPreSibling), function (pre) {
  20220. joinPre(pre.previousSibling, pre);
  20221. });
  20222. }
  20223. });
  20224. var each$a = Tools.each;
  20225. var isElementNode$1 = function (node) {
  20226. return isElement$5(node) && !isBookmarkNode$1(node) && !isCaretNode(node) && !isBogus$2(node);
  20227. };
  20228. var findElementSibling = function (node, siblingName) {
  20229. for (var sibling = node; sibling; sibling = sibling[siblingName]) {
  20230. if (isText$7(sibling) && isNotEmpty(sibling.data)) {
  20231. return node;
  20232. }
  20233. if (isElement$5(sibling) && !isBookmarkNode$1(sibling)) {
  20234. return sibling;
  20235. }
  20236. }
  20237. return node;
  20238. };
  20239. var mergeSiblingsNodes = function (dom, prev, next) {
  20240. var elementUtils = ElementUtils(dom);
  20241. if (prev && next) {
  20242. prev = findElementSibling(prev, 'previousSibling');
  20243. next = findElementSibling(next, 'nextSibling');
  20244. if (elementUtils.compare(prev, next)) {
  20245. for (var sibling = prev.nextSibling; sibling && sibling !== next;) {
  20246. var tmpSibling = sibling;
  20247. sibling = sibling.nextSibling;
  20248. prev.appendChild(tmpSibling);
  20249. }
  20250. dom.remove(next);
  20251. Tools.each(Tools.grep(next.childNodes), function (node) {
  20252. prev.appendChild(node);
  20253. });
  20254. return prev;
  20255. }
  20256. }
  20257. return next;
  20258. };
  20259. var mergeSiblings = function (dom, format, vars, node) {
  20260. if (node && format.merge_siblings !== false) {
  20261. var newNode = mergeSiblingsNodes(dom, getNonWhiteSpaceSibling(node), node);
  20262. mergeSiblingsNodes(dom, newNode, getNonWhiteSpaceSibling(newNode, true));
  20263. }
  20264. };
  20265. var clearChildStyles = function (dom, format, node) {
  20266. if (format.clear_child_styles) {
  20267. var selector = format.links ? '*:not(a)' : '*';
  20268. each$a(dom.select(selector, node), function (node) {
  20269. if (isElementNode$1(node)) {
  20270. each$a(format.styles, function (value, name) {
  20271. dom.setStyle(node, name, '');
  20272. });
  20273. }
  20274. });
  20275. }
  20276. };
  20277. var processChildElements = function (node, filter, process) {
  20278. each$a(node.childNodes, function (node) {
  20279. if (isElementNode$1(node)) {
  20280. if (filter(node)) {
  20281. process(node);
  20282. }
  20283. if (node.hasChildNodes()) {
  20284. processChildElements(node, filter, process);
  20285. }
  20286. }
  20287. });
  20288. };
  20289. var unwrapEmptySpan = function (dom, node) {
  20290. if (node.nodeName === 'SPAN' && dom.getAttribs(node).length === 0) {
  20291. dom.remove(node, true);
  20292. }
  20293. };
  20294. var hasStyle = function (dom, name) {
  20295. return function (node) {
  20296. return !!(node && getStyle(dom, node, name));
  20297. };
  20298. };
  20299. var applyStyle = function (dom, name, value) {
  20300. return function (node) {
  20301. dom.setStyle(node, name, value);
  20302. if (node.getAttribute('style') === '') {
  20303. node.removeAttribute('style');
  20304. }
  20305. unwrapEmptySpan(dom, node);
  20306. };
  20307. };
  20308. var removeResult = Adt.generate([
  20309. { keep: [] },
  20310. { rename: ['name'] },
  20311. { removed: [] }
  20312. ]);
  20313. var MCE_ATTR_RE = /^(src|href|style)$/;
  20314. var each$9 = Tools.each;
  20315. var isEq$2 = isEq$5;
  20316. var isTableCellOrRow = function (node) {
  20317. return /^(TR|TH|TD)$/.test(node.nodeName);
  20318. };
  20319. var isChildOfInlineParent = function (dom, node, parent) {
  20320. return dom.isChildOf(node, parent) && node !== parent && !dom.isBlock(parent);
  20321. };
  20322. var getContainer = function (ed, rng, start) {
  20323. var container = rng[start ? 'startContainer' : 'endContainer'];
  20324. var offset = rng[start ? 'startOffset' : 'endOffset'];
  20325. if (isElement$5(container)) {
  20326. var lastIdx = container.childNodes.length - 1;
  20327. if (!start && offset) {
  20328. offset--;
  20329. }
  20330. container = container.childNodes[offset > lastIdx ? lastIdx : offset];
  20331. }
  20332. if (isText$7(container) && start && offset >= container.nodeValue.length) {
  20333. container = new DomTreeWalker(container, ed.getBody()).next() || container;
  20334. }
  20335. if (isText$7(container) && !start && offset === 0) {
  20336. container = new DomTreeWalker(container, ed.getBody()).prev() || container;
  20337. }
  20338. return container;
  20339. };
  20340. var normalizeTableSelection = function (node, start) {
  20341. var prop = start ? 'firstChild' : 'lastChild';
  20342. if (isTableCellOrRow(node) && node[prop]) {
  20343. var childNode = node[prop];
  20344. if (node.nodeName === 'TR') {
  20345. return childNode[prop] || childNode;
  20346. } else {
  20347. return childNode;
  20348. }
  20349. }
  20350. return node;
  20351. };
  20352. var wrap$1 = function (dom, node, name, attrs) {
  20353. var wrapper = dom.create(name, attrs);
  20354. node.parentNode.insertBefore(wrapper, node);
  20355. wrapper.appendChild(node);
  20356. return wrapper;
  20357. };
  20358. var wrapWithSiblings = function (dom, node, next, name, attrs) {
  20359. var start = SugarElement.fromDom(node);
  20360. var wrapper = SugarElement.fromDom(dom.create(name, attrs));
  20361. var siblings = next ? nextSiblings(start) : prevSiblings(start);
  20362. append(wrapper, siblings);
  20363. if (next) {
  20364. before$4(start, wrapper);
  20365. prepend(wrapper, start);
  20366. } else {
  20367. after$3(start, wrapper);
  20368. append$1(wrapper, start);
  20369. }
  20370. return wrapper.dom;
  20371. };
  20372. var matchName = function (dom, node, format) {
  20373. if (isInlineFormat(format) && isEq$2(node, format.inline)) {
  20374. return true;
  20375. }
  20376. if (isBlockFormat(format) && isEq$2(node, format.block)) {
  20377. return true;
  20378. }
  20379. if (isSelectorFormat(format)) {
  20380. return isElement$5(node) && dom.is(node, format.selector);
  20381. }
  20382. };
  20383. var isColorFormatAndAnchor = function (node, format) {
  20384. return format.links && node.nodeName === 'A';
  20385. };
  20386. var find = function (dom, node, next, inc) {
  20387. var sibling = getNonWhiteSpaceSibling(node, next, inc);
  20388. return isNullable(sibling) || sibling.nodeName === 'BR' || dom.isBlock(sibling);
  20389. };
  20390. var removeNode = function (ed, node, format) {
  20391. var parentNode = node.parentNode;
  20392. var rootBlockElm;
  20393. var dom = ed.dom, forcedRootBlock = getForcedRootBlock(ed);
  20394. if (isBlockFormat(format)) {
  20395. if (!forcedRootBlock) {
  20396. if (dom.isBlock(node) && !dom.isBlock(parentNode)) {
  20397. if (!find(dom, node, false) && !find(dom, node.firstChild, true, true)) {
  20398. node.insertBefore(dom.create('br'), node.firstChild);
  20399. }
  20400. if (!find(dom, node, true) && !find(dom, node.lastChild, false, true)) {
  20401. node.appendChild(dom.create('br'));
  20402. }
  20403. }
  20404. } else {
  20405. if (parentNode === dom.getRoot()) {
  20406. if (!format.list_block || !isEq$2(node, format.list_block)) {
  20407. each$k(from(node.childNodes), function (node) {
  20408. if (isValid(ed, forcedRootBlock, node.nodeName.toLowerCase())) {
  20409. if (!rootBlockElm) {
  20410. rootBlockElm = wrap$1(dom, node, forcedRootBlock);
  20411. dom.setAttribs(rootBlockElm, ed.settings.forced_root_block_attrs);
  20412. } else {
  20413. rootBlockElm.appendChild(node);
  20414. }
  20415. } else {
  20416. rootBlockElm = null;
  20417. }
  20418. });
  20419. }
  20420. }
  20421. }
  20422. }
  20423. if (isMixedFormat(format) && !isEq$2(format.inline, node)) {
  20424. return;
  20425. }
  20426. dom.remove(node, true);
  20427. };
  20428. var removeFormatInternal = function (ed, format, vars, node, compareNode) {
  20429. var stylesModified;
  20430. var dom = ed.dom;
  20431. if (!matchName(dom, node, format) && !isColorFormatAndAnchor(node, format)) {
  20432. return removeResult.keep();
  20433. }
  20434. var elm = node;
  20435. if (isInlineFormat(format) && format.remove === 'all' && isArray$1(format.preserve_attributes)) {
  20436. var attrsToPreserve = filter$4(dom.getAttribs(elm), function (attr) {
  20437. return contains$3(format.preserve_attributes, attr.name.toLowerCase());
  20438. });
  20439. dom.removeAllAttribs(elm);
  20440. each$k(attrsToPreserve, function (attr) {
  20441. return dom.setAttrib(elm, attr.name, attr.value);
  20442. });
  20443. if (attrsToPreserve.length > 0) {
  20444. return removeResult.rename('span');
  20445. }
  20446. }
  20447. if (format.remove !== 'all') {
  20448. each$9(format.styles, function (value, name) {
  20449. value = normalizeStyleValue(dom, replaceVars(value, vars), name + '');
  20450. if (isNumber(name)) {
  20451. name = value;
  20452. compareNode = null;
  20453. }
  20454. if (format.remove_similar || (!compareNode || isEq$2(getStyle(dom, compareNode, name), value))) {
  20455. dom.setStyle(elm, name, '');
  20456. }
  20457. stylesModified = true;
  20458. });
  20459. if (stylesModified && dom.getAttrib(elm, 'style') === '') {
  20460. elm.removeAttribute('style');
  20461. elm.removeAttribute('data-mce-style');
  20462. }
  20463. each$9(format.attributes, function (value, name) {
  20464. var valueOut;
  20465. value = replaceVars(value, vars);
  20466. if (isNumber(name)) {
  20467. name = value;
  20468. compareNode = null;
  20469. }
  20470. if (format.remove_similar || (!compareNode || isEq$2(dom.getAttrib(compareNode, name), value))) {
  20471. if (name === 'class') {
  20472. value = dom.getAttrib(elm, name);
  20473. if (value) {
  20474. valueOut = '';
  20475. each$k(value.split(/\s+/), function (cls) {
  20476. if (/mce\-\w+/.test(cls)) {
  20477. valueOut += (valueOut ? ' ' : '') + cls;
  20478. }
  20479. });
  20480. if (valueOut) {
  20481. dom.setAttrib(elm, name, valueOut);
  20482. return;
  20483. }
  20484. }
  20485. }
  20486. if (MCE_ATTR_RE.test(name)) {
  20487. elm.removeAttribute('data-mce-' + name);
  20488. }
  20489. if (name === 'style' && matchNodeNames(['li'])(elm) && dom.getStyle(elm, 'list-style-type') === 'none') {
  20490. elm.removeAttribute(name);
  20491. dom.setStyle(elm, 'list-style-type', 'none');
  20492. return;
  20493. }
  20494. if (name === 'class') {
  20495. elm.removeAttribute('className');
  20496. }
  20497. elm.removeAttribute(name);
  20498. }
  20499. });
  20500. each$9(format.classes, function (value) {
  20501. value = replaceVars(value, vars);
  20502. if (!compareNode || dom.hasClass(compareNode, value)) {
  20503. dom.removeClass(elm, value);
  20504. }
  20505. });
  20506. var attrs = dom.getAttribs(elm);
  20507. for (var i = 0; i < attrs.length; i++) {
  20508. var attrName = attrs[i].nodeName;
  20509. if (attrName.indexOf('_') !== 0 && attrName.indexOf('data-') !== 0) {
  20510. return removeResult.keep();
  20511. }
  20512. }
  20513. }
  20514. if (format.remove !== 'none') {
  20515. removeNode(ed, elm, format);
  20516. return removeResult.removed();
  20517. }
  20518. return removeResult.keep();
  20519. };
  20520. var removeFormat$1 = function (ed, format, vars, node, compareNode) {
  20521. return removeFormatInternal(ed, format, vars, node, compareNode).fold(never, function (newName) {
  20522. ed.dom.rename(node, newName);
  20523. return true;
  20524. }, always);
  20525. };
  20526. var findFormatRoot = function (editor, container, name, vars, similar) {
  20527. var formatRoot;
  20528. each$k(getParents$2(editor.dom, container.parentNode).reverse(), function (parent) {
  20529. if (!formatRoot && parent.id !== '_start' && parent.id !== '_end') {
  20530. var format = matchNode(editor, parent, name, vars, similar);
  20531. if (format && format.split !== false) {
  20532. formatRoot = parent;
  20533. }
  20534. }
  20535. });
  20536. return formatRoot;
  20537. };
  20538. var removeFormatFromClone = function (editor, format, vars, clone) {
  20539. return removeFormatInternal(editor, format, vars, clone, clone).fold(constant(clone), function (newName) {
  20540. var fragment = editor.dom.createFragment();
  20541. fragment.appendChild(clone);
  20542. return editor.dom.rename(clone, newName);
  20543. }, constant(null));
  20544. };
  20545. var wrapAndSplit = function (editor, formatList, formatRoot, container, target, split, format, vars) {
  20546. var clone, lastClone, firstClone;
  20547. var dom = editor.dom;
  20548. if (formatRoot) {
  20549. var formatRootParent = formatRoot.parentNode;
  20550. for (var parent_1 = container.parentNode; parent_1 && parent_1 !== formatRootParent; parent_1 = parent_1.parentNode) {
  20551. clone = dom.clone(parent_1, false);
  20552. for (var i = 0; i < formatList.length; i++) {
  20553. clone = removeFormatFromClone(editor, formatList[i], vars, clone);
  20554. if (clone === null) {
  20555. break;
  20556. }
  20557. }
  20558. if (clone) {
  20559. if (lastClone) {
  20560. clone.appendChild(lastClone);
  20561. }
  20562. if (!firstClone) {
  20563. firstClone = clone;
  20564. }
  20565. lastClone = clone;
  20566. }
  20567. }
  20568. if (split && (!format.mixed || !dom.isBlock(formatRoot))) {
  20569. container = dom.split(formatRoot, container);
  20570. }
  20571. if (lastClone) {
  20572. target.parentNode.insertBefore(lastClone, target);
  20573. firstClone.appendChild(target);
  20574. if (isInlineFormat(format)) {
  20575. mergeSiblings(dom, format, vars, lastClone);
  20576. }
  20577. }
  20578. }
  20579. return container;
  20580. };
  20581. var remove$1 = function (ed, name, vars, node, similar) {
  20582. var formatList = ed.formatter.get(name);
  20583. var format = formatList[0];
  20584. var contentEditable = true;
  20585. var dom = ed.dom;
  20586. var selection = ed.selection;
  20587. var splitToFormatRoot = function (container) {
  20588. var formatRoot = findFormatRoot(ed, container, name, vars, similar);
  20589. return wrapAndSplit(ed, formatList, formatRoot, container, container, true, format, vars);
  20590. };
  20591. var isRemoveBookmarkNode = function (node) {
  20592. return isBookmarkNode$1(node) && isElement$5(node) && (node.id === '_start' || node.id === '_end');
  20593. };
  20594. var removeNodeFormat = function (node) {
  20595. return exists(formatList, function (fmt) {
  20596. return removeFormat$1(ed, fmt, vars, node, node);
  20597. });
  20598. };
  20599. var process = function (node) {
  20600. var lastContentEditable = true;
  20601. var hasContentEditableState = false;
  20602. if (isElement$5(node) && dom.getContentEditable(node)) {
  20603. lastContentEditable = contentEditable;
  20604. contentEditable = dom.getContentEditable(node) === 'true';
  20605. hasContentEditableState = true;
  20606. }
  20607. var children = from(node.childNodes);
  20608. if (contentEditable && !hasContentEditableState) {
  20609. var removed = removeNodeFormat(node);
  20610. var currentNodeMatches = removed || exists(formatList, function (f) {
  20611. return matchName$1(dom, node, f);
  20612. });
  20613. var parentNode = node.parentNode;
  20614. if (!currentNodeMatches && isNonNullable(parentNode) && shouldExpandToSelector(format)) {
  20615. removeNodeFormat(parentNode);
  20616. }
  20617. }
  20618. if (format.deep) {
  20619. if (children.length) {
  20620. for (var i = 0; i < children.length; i++) {
  20621. process(children[i]);
  20622. }
  20623. if (hasContentEditableState) {
  20624. contentEditable = lastContentEditable;
  20625. }
  20626. }
  20627. }
  20628. var textDecorations = [
  20629. 'underline',
  20630. 'line-through',
  20631. 'overline'
  20632. ];
  20633. each$k(textDecorations, function (decoration) {
  20634. if (isElement$5(node) && ed.dom.getStyle(node, 'text-decoration') === decoration && node.parentNode && getTextDecoration(dom, node.parentNode) === decoration) {
  20635. removeFormat$1(ed, {
  20636. deep: false,
  20637. exact: true,
  20638. inline: 'span',
  20639. styles: { textDecoration: decoration }
  20640. }, null, node);
  20641. }
  20642. });
  20643. };
  20644. var unwrap = function (start) {
  20645. var node = dom.get(start ? '_start' : '_end');
  20646. var out = node[start ? 'firstChild' : 'lastChild'];
  20647. if (isRemoveBookmarkNode(out)) {
  20648. out = out[start ? 'firstChild' : 'lastChild'];
  20649. }
  20650. if (isText$7(out) && out.data.length === 0) {
  20651. out = start ? node.previousSibling || node.nextSibling : node.nextSibling || node.previousSibling;
  20652. }
  20653. dom.remove(node, true);
  20654. return out;
  20655. };
  20656. var removeRngStyle = function (rng) {
  20657. var startContainer, endContainer;
  20658. var expandedRng = expandRng(ed, rng, formatList, rng.collapsed);
  20659. if (format.split) {
  20660. expandedRng = split(expandedRng);
  20661. startContainer = getContainer(ed, expandedRng, true);
  20662. endContainer = getContainer(ed, expandedRng);
  20663. if (startContainer !== endContainer) {
  20664. startContainer = normalizeTableSelection(startContainer, true);
  20665. endContainer = normalizeTableSelection(endContainer, false);
  20666. if (isChildOfInlineParent(dom, startContainer, endContainer)) {
  20667. var marker = Optional.from(startContainer.firstChild).getOr(startContainer);
  20668. splitToFormatRoot(wrapWithSiblings(dom, marker, true, 'span', {
  20669. 'id': '_start',
  20670. 'data-mce-type': 'bookmark'
  20671. }));
  20672. unwrap(true);
  20673. return;
  20674. }
  20675. if (isChildOfInlineParent(dom, endContainer, startContainer)) {
  20676. var marker = Optional.from(endContainer.lastChild).getOr(endContainer);
  20677. splitToFormatRoot(wrapWithSiblings(dom, marker, false, 'span', {
  20678. 'id': '_end',
  20679. 'data-mce-type': 'bookmark'
  20680. }));
  20681. unwrap(false);
  20682. return;
  20683. }
  20684. startContainer = wrap$1(dom, startContainer, 'span', {
  20685. 'id': '_start',
  20686. 'data-mce-type': 'bookmark'
  20687. });
  20688. endContainer = wrap$1(dom, endContainer, 'span', {
  20689. 'id': '_end',
  20690. 'data-mce-type': 'bookmark'
  20691. });
  20692. var newRng = dom.createRng();
  20693. newRng.setStartAfter(startContainer);
  20694. newRng.setEndBefore(endContainer);
  20695. walk$2(dom, newRng, function (nodes) {
  20696. each$k(nodes, function (n) {
  20697. if (!isBookmarkNode$1(n) && !isBookmarkNode$1(n.parentNode)) {
  20698. splitToFormatRoot(n);
  20699. }
  20700. });
  20701. });
  20702. splitToFormatRoot(startContainer);
  20703. splitToFormatRoot(endContainer);
  20704. startContainer = unwrap(true);
  20705. endContainer = unwrap();
  20706. } else {
  20707. startContainer = endContainer = splitToFormatRoot(startContainer);
  20708. }
  20709. expandedRng.startContainer = startContainer.parentNode ? startContainer.parentNode : startContainer;
  20710. expandedRng.startOffset = dom.nodeIndex(startContainer);
  20711. expandedRng.endContainer = endContainer.parentNode ? endContainer.parentNode : endContainer;
  20712. expandedRng.endOffset = dom.nodeIndex(endContainer) + 1;
  20713. }
  20714. walk$2(dom, expandedRng, function (nodes) {
  20715. each$k(nodes, process);
  20716. });
  20717. };
  20718. if (node) {
  20719. if (isNode(node)) {
  20720. var rng = dom.createRng();
  20721. rng.setStartBefore(node);
  20722. rng.setEndAfter(node);
  20723. removeRngStyle(rng);
  20724. } else {
  20725. removeRngStyle(node);
  20726. }
  20727. fireFormatRemove(ed, name, node, vars);
  20728. return;
  20729. }
  20730. if (dom.getContentEditable(selection.getNode()) === 'false') {
  20731. node = selection.getNode();
  20732. for (var i = 0; i < formatList.length; i++) {
  20733. if (formatList[i].ceFalseOverride) {
  20734. if (removeFormat$1(ed, formatList[i], vars, node, node)) {
  20735. break;
  20736. }
  20737. }
  20738. }
  20739. fireFormatRemove(ed, name, node, vars);
  20740. return;
  20741. }
  20742. if (!selection.isCollapsed() || !isInlineFormat(format) || getCellsFromEditor(ed).length) {
  20743. preserve(selection, true, function () {
  20744. runOnRanges(ed, removeRngStyle);
  20745. });
  20746. if (isInlineFormat(format) && match$2(ed, name, vars, selection.getStart())) {
  20747. moveStart(dom, selection, selection.getRng());
  20748. }
  20749. ed.nodeChanged();
  20750. } else {
  20751. removeCaretFormat(ed, name, vars, similar);
  20752. }
  20753. fireFormatRemove(ed, name, node, vars);
  20754. };
  20755. var each$8 = Tools.each;
  20756. var mergeTextDecorationsAndColor = function (dom, format, vars, node) {
  20757. var processTextDecorationsAndColor = function (n) {
  20758. if (n.nodeType === 1 && n.parentNode && n.parentNode.nodeType === 1) {
  20759. var textDecoration = getTextDecoration(dom, n.parentNode);
  20760. if (dom.getStyle(n, 'color') && textDecoration) {
  20761. dom.setStyle(n, 'text-decoration', textDecoration);
  20762. } else if (dom.getStyle(n, 'text-decoration') === textDecoration) {
  20763. dom.setStyle(n, 'text-decoration', null);
  20764. }
  20765. }
  20766. };
  20767. if (format.styles && (format.styles.color || format.styles.textDecoration)) {
  20768. Tools.walk(node, processTextDecorationsAndColor, 'childNodes');
  20769. processTextDecorationsAndColor(node);
  20770. }
  20771. };
  20772. var mergeBackgroundColorAndFontSize = function (dom, format, vars, node) {
  20773. if (format.styles && format.styles.backgroundColor) {
  20774. processChildElements(node, hasStyle(dom, 'fontSize'), applyStyle(dom, 'backgroundColor', replaceVars(format.styles.backgroundColor, vars)));
  20775. }
  20776. };
  20777. var mergeSubSup = function (dom, format, vars, node) {
  20778. if (isInlineFormat(format) && (format.inline === 'sub' || format.inline === 'sup')) {
  20779. processChildElements(node, hasStyle(dom, 'fontSize'), applyStyle(dom, 'fontSize', ''));
  20780. dom.remove(dom.select(format.inline === 'sup' ? 'sub' : 'sup', node), true);
  20781. }
  20782. };
  20783. var mergeWithChildren = function (editor, formatList, vars, node) {
  20784. each$8(formatList, function (format) {
  20785. if (isInlineFormat(format)) {
  20786. each$8(editor.dom.select(format.inline, node), function (child) {
  20787. if (!isElementNode$1(child)) {
  20788. return;
  20789. }
  20790. removeFormat$1(editor, format, vars, child, format.exact ? child : null);
  20791. });
  20792. }
  20793. clearChildStyles(editor.dom, format, node);
  20794. });
  20795. };
  20796. var mergeWithParents = function (editor, format, name, vars, node) {
  20797. if (matchNode(editor, node.parentNode, name, vars)) {
  20798. if (removeFormat$1(editor, format, vars, node)) {
  20799. return;
  20800. }
  20801. }
  20802. if (format.merge_with_parents) {
  20803. editor.dom.getParent(node.parentNode, function (parent) {
  20804. if (matchNode(editor, parent, name, vars)) {
  20805. removeFormat$1(editor, format, vars, node);
  20806. return true;
  20807. }
  20808. });
  20809. }
  20810. };
  20811. var each$7 = Tools.each;
  20812. var isElementNode = function (node) {
  20813. return isElement$5(node) && !isBookmarkNode$1(node) && !isCaretNode(node) && !isBogus$2(node);
  20814. };
  20815. var canFormatBR = function (editor, format, node, parentName) {
  20816. if (canFormatEmptyLines(editor) && isInlineFormat(format)) {
  20817. var validBRParentElements = __assign(__assign({}, editor.schema.getTextBlockElements()), {
  20818. td: {},
  20819. th: {},
  20820. li: {},
  20821. dt: {},
  20822. dd: {},
  20823. figcaption: {},
  20824. caption: {},
  20825. details: {},
  20826. summary: {}
  20827. });
  20828. var hasCaretNodeSibling = sibling(SugarElement.fromDom(node), function (sibling) {
  20829. return isCaretNode(sibling.dom);
  20830. });
  20831. return hasNonNullableKey(validBRParentElements, parentName) && isEmpty$2(SugarElement.fromDom(node.parentNode), false) && !hasCaretNodeSibling;
  20832. } else {
  20833. return false;
  20834. }
  20835. };
  20836. var applyFormat$1 = function (ed, name, vars, node) {
  20837. var formatList = ed.formatter.get(name);
  20838. var format = formatList[0];
  20839. var isCollapsed = !node && ed.selection.isCollapsed();
  20840. var dom = ed.dom;
  20841. var selection = ed.selection;
  20842. var setElementFormat = function (elm, fmt) {
  20843. if (fmt === void 0) {
  20844. fmt = format;
  20845. }
  20846. if (isFunction(fmt.onformat)) {
  20847. fmt.onformat(elm, fmt, vars, node);
  20848. }
  20849. each$7(fmt.styles, function (value, name) {
  20850. dom.setStyle(elm, name, replaceVars(value, vars));
  20851. });
  20852. if (fmt.styles) {
  20853. var styleVal = dom.getAttrib(elm, 'style');
  20854. if (styleVal) {
  20855. dom.setAttrib(elm, 'data-mce-style', styleVal);
  20856. }
  20857. }
  20858. each$7(fmt.attributes, function (value, name) {
  20859. dom.setAttrib(elm, name, replaceVars(value, vars));
  20860. });
  20861. each$7(fmt.classes, function (value) {
  20862. value = replaceVars(value, vars);
  20863. if (!dom.hasClass(elm, value)) {
  20864. dom.addClass(elm, value);
  20865. }
  20866. });
  20867. };
  20868. var applyNodeStyle = function (formatList, node) {
  20869. var found = false;
  20870. each$7(formatList, function (format) {
  20871. if (!isSelectorFormat(format)) {
  20872. return false;
  20873. }
  20874. if (isNonNullable(format.collapsed) && format.collapsed !== isCollapsed) {
  20875. return;
  20876. }
  20877. if (dom.is(node, format.selector) && !isCaretNode(node)) {
  20878. setElementFormat(node, format);
  20879. found = true;
  20880. return false;
  20881. }
  20882. });
  20883. return found;
  20884. };
  20885. var createWrapElement = function (wrapName) {
  20886. if (isString$1(wrapName)) {
  20887. var wrapElm = dom.create(wrapName);
  20888. setElementFormat(wrapElm);
  20889. return wrapElm;
  20890. } else {
  20891. return null;
  20892. }
  20893. };
  20894. var applyRngStyle = function (dom, rng, nodeSpecific) {
  20895. var newWrappers = [];
  20896. var contentEditable = true;
  20897. var wrapName = format.inline || format.block;
  20898. var wrapElm = createWrapElement(wrapName);
  20899. walk$2(dom, rng, function (nodes) {
  20900. var currentWrapElm;
  20901. var process = function (node) {
  20902. var hasContentEditableState = false;
  20903. var lastContentEditable = contentEditable;
  20904. var nodeName = node.nodeName.toLowerCase();
  20905. var parentNode = node.parentNode;
  20906. var parentName = parentNode.nodeName.toLowerCase();
  20907. if (isElement$5(node) && dom.getContentEditable(node)) {
  20908. lastContentEditable = contentEditable;
  20909. contentEditable = dom.getContentEditable(node) === 'true';
  20910. hasContentEditableState = true;
  20911. }
  20912. if (isBr$5(node) && !canFormatBR(ed, format, node, parentName)) {
  20913. currentWrapElm = null;
  20914. if (isBlockFormat(format)) {
  20915. dom.remove(node);
  20916. }
  20917. return;
  20918. }
  20919. if (isBlockFormat(format) && format.wrapper && matchNode(ed, node, name, vars)) {
  20920. currentWrapElm = null;
  20921. return;
  20922. }
  20923. if (contentEditable && !hasContentEditableState && isBlockFormat(format) && !format.wrapper && isTextBlock$1(ed, nodeName) && isValid(ed, parentName, wrapName)) {
  20924. var elm = dom.rename(node, wrapName);
  20925. setElementFormat(elm);
  20926. newWrappers.push(elm);
  20927. currentWrapElm = null;
  20928. return;
  20929. }
  20930. if (isSelectorFormat(format)) {
  20931. var found = applyNodeStyle(formatList, node);
  20932. if (!found && isNonNullable(parentNode) && shouldExpandToSelector(format)) {
  20933. found = applyNodeStyle(formatList, parentNode);
  20934. }
  20935. if (!isInlineFormat(format) || found) {
  20936. currentWrapElm = null;
  20937. return;
  20938. }
  20939. }
  20940. if (contentEditable && !hasContentEditableState && isValid(ed, wrapName, nodeName) && isValid(ed, parentName, wrapName) && !(!nodeSpecific && isText$7(node) && isZwsp(node.data)) && !isCaretNode(node) && (!isInlineFormat(format) || !dom.isBlock(node))) {
  20941. if (!currentWrapElm) {
  20942. currentWrapElm = dom.clone(wrapElm, false);
  20943. node.parentNode.insertBefore(currentWrapElm, node);
  20944. newWrappers.push(currentWrapElm);
  20945. }
  20946. currentWrapElm.appendChild(node);
  20947. } else {
  20948. currentWrapElm = null;
  20949. each$k(from(node.childNodes), process);
  20950. if (hasContentEditableState) {
  20951. contentEditable = lastContentEditable;
  20952. }
  20953. currentWrapElm = null;
  20954. }
  20955. };
  20956. each$k(nodes, process);
  20957. });
  20958. if (format.links === true) {
  20959. each$k(newWrappers, function (node) {
  20960. var process = function (node) {
  20961. if (node.nodeName === 'A') {
  20962. setElementFormat(node, format);
  20963. }
  20964. each$k(from(node.childNodes), process);
  20965. };
  20966. process(node);
  20967. });
  20968. }
  20969. each$k(newWrappers, function (node) {
  20970. var getChildCount = function (node) {
  20971. var count = 0;
  20972. each$k(node.childNodes, function (node) {
  20973. if (!isEmptyTextNode$1(node) && !isBookmarkNode$1(node)) {
  20974. count++;
  20975. }
  20976. });
  20977. return count;
  20978. };
  20979. var mergeStyles = function (node) {
  20980. var childElement = find$3(node.childNodes, isElementNode).filter(function (child) {
  20981. return matchName$1(dom, child, format);
  20982. });
  20983. return childElement.map(function (child) {
  20984. var clone = dom.clone(child, false);
  20985. setElementFormat(clone);
  20986. dom.replace(clone, node, true);
  20987. dom.remove(child, true);
  20988. return clone;
  20989. }).getOr(node);
  20990. };
  20991. var childCount = getChildCount(node);
  20992. if ((newWrappers.length > 1 || !dom.isBlock(node)) && childCount === 0) {
  20993. dom.remove(node, true);
  20994. return;
  20995. }
  20996. if (isInlineFormat(format) || isBlockFormat(format) && format.wrapper) {
  20997. if (!format.exact && childCount === 1) {
  20998. node = mergeStyles(node);
  20999. }
  21000. mergeWithChildren(ed, formatList, vars, node);
  21001. mergeWithParents(ed, format, name, vars, node);
  21002. mergeBackgroundColorAndFontSize(dom, format, vars, node);
  21003. mergeTextDecorationsAndColor(dom, format, vars, node);
  21004. mergeSubSup(dom, format, vars, node);
  21005. mergeSiblings(dom, format, vars, node);
  21006. }
  21007. });
  21008. };
  21009. if (dom.getContentEditable(selection.getNode()) === 'false') {
  21010. node = selection.getNode();
  21011. for (var i = 0, l = formatList.length; i < l; i++) {
  21012. var formatItem = formatList[i];
  21013. if (formatItem.ceFalseOverride && isSelectorFormat(formatItem) && dom.is(node, formatItem.selector)) {
  21014. setElementFormat(node, formatItem);
  21015. break;
  21016. }
  21017. }
  21018. fireFormatApply(ed, name, node, vars);
  21019. return;
  21020. }
  21021. if (format) {
  21022. if (node) {
  21023. if (isNode(node)) {
  21024. if (!applyNodeStyle(formatList, node)) {
  21025. var rng = dom.createRng();
  21026. rng.setStartBefore(node);
  21027. rng.setEndAfter(node);
  21028. applyRngStyle(dom, expandRng(ed, rng, formatList), true);
  21029. }
  21030. } else {
  21031. applyRngStyle(dom, node, true);
  21032. }
  21033. } else {
  21034. if (!isCollapsed || !isInlineFormat(format) || getCellsFromEditor(ed).length) {
  21035. var curSelNode = selection.getNode();
  21036. var firstFormat = formatList[0];
  21037. if (!ed.settings.forced_root_block && firstFormat.defaultBlock && !dom.getParent(curSelNode, dom.isBlock)) {
  21038. applyFormat$1(ed, firstFormat.defaultBlock);
  21039. }
  21040. selection.setRng(normalize(selection.getRng()));
  21041. preserve(selection, true, function () {
  21042. runOnRanges(ed, function (selectionRng, fake) {
  21043. var expandedRng = fake ? selectionRng : expandRng(ed, selectionRng, formatList);
  21044. applyRngStyle(dom, expandedRng, false);
  21045. });
  21046. });
  21047. moveStart(dom, selection, selection.getRng());
  21048. ed.nodeChanged();
  21049. } else {
  21050. applyCaretFormat(ed, name, vars);
  21051. }
  21052. }
  21053. postProcess$1(name, ed);
  21054. }
  21055. fireFormatApply(ed, name, node, vars);
  21056. };
  21057. var hasVars = function (value) {
  21058. return has$2(value, 'vars');
  21059. };
  21060. var setup$j = function (registeredFormatListeners, editor) {
  21061. registeredFormatListeners.set({});
  21062. editor.on('NodeChange', function (e) {
  21063. updateAndFireChangeCallbacks(editor, e.element, registeredFormatListeners.get());
  21064. });
  21065. editor.on('FormatApply FormatRemove', function (e) {
  21066. var element = Optional.from(e.node).map(function (nodeOrRange) {
  21067. return isNode(nodeOrRange) ? nodeOrRange : nodeOrRange.startContainer;
  21068. }).bind(function (node) {
  21069. return isElement$5(node) ? Optional.some(node) : Optional.from(node.parentElement);
  21070. }).getOrThunk(function () {
  21071. return fallbackElement(editor);
  21072. });
  21073. updateAndFireChangeCallbacks(editor, element, registeredFormatListeners.get());
  21074. });
  21075. };
  21076. var fallbackElement = function (editor) {
  21077. return editor.selection.getStart();
  21078. };
  21079. var matchingNode = function (editor, parents, format, similar, vars) {
  21080. var isMatchingNode = function (node) {
  21081. var matchingFormat = editor.formatter.matchNode(node, format, vars !== null && vars !== void 0 ? vars : {}, similar);
  21082. return !isUndefined(matchingFormat);
  21083. };
  21084. var isUnableToMatch = function (node) {
  21085. if (matchesUnInheritedFormatSelector(editor, node, format)) {
  21086. return true;
  21087. } else {
  21088. if (!similar) {
  21089. return isNonNullable(editor.formatter.matchNode(node, format, vars, true));
  21090. } else {
  21091. return false;
  21092. }
  21093. }
  21094. };
  21095. return findUntil$1(parents, isMatchingNode, isUnableToMatch);
  21096. };
  21097. var getParents = function (editor, elm) {
  21098. var element = elm !== null && elm !== void 0 ? elm : fallbackElement(editor);
  21099. return filter$4(getParents$2(editor.dom, element), function (node) {
  21100. return isElement$5(node) && !isBogus$2(node);
  21101. });
  21102. };
  21103. var updateAndFireChangeCallbacks = function (editor, elm, registeredCallbacks) {
  21104. var parents = getParents(editor, elm);
  21105. each$j(registeredCallbacks, function (data, format) {
  21106. var runIfChanged = function (spec) {
  21107. var match = matchingNode(editor, parents, format, spec.similar, hasVars(spec) ? spec.vars : undefined);
  21108. var isSet = match.isSome();
  21109. if (spec.state.get() !== isSet) {
  21110. spec.state.set(isSet);
  21111. var node_1 = match.getOr(elm);
  21112. if (hasVars(spec)) {
  21113. spec.callback(isSet, {
  21114. node: node_1,
  21115. format: format,
  21116. parents: parents
  21117. });
  21118. } else {
  21119. each$k(spec.callbacks, function (callback) {
  21120. return callback(isSet, {
  21121. node: node_1,
  21122. format: format,
  21123. parents: parents
  21124. });
  21125. });
  21126. }
  21127. }
  21128. };
  21129. each$k([
  21130. data.withSimilar,
  21131. data.withoutSimilar
  21132. ], runIfChanged);
  21133. each$k(data.withVars, runIfChanged);
  21134. });
  21135. };
  21136. var addListeners = function (editor, registeredFormatListeners, formats, callback, similar, vars) {
  21137. var formatChangeItems = registeredFormatListeners.get();
  21138. each$k(formats.split(','), function (format) {
  21139. var group = get$9(formatChangeItems, format).getOrThunk(function () {
  21140. var base = {
  21141. withSimilar: {
  21142. state: Cell(false),
  21143. similar: true,
  21144. callbacks: []
  21145. },
  21146. withoutSimilar: {
  21147. state: Cell(false),
  21148. similar: false,
  21149. callbacks: []
  21150. },
  21151. withVars: []
  21152. };
  21153. formatChangeItems[format] = base;
  21154. return base;
  21155. });
  21156. var getCurrent = function () {
  21157. var parents = getParents(editor);
  21158. return matchingNode(editor, parents, format, similar, vars).isSome();
  21159. };
  21160. if (isUndefined(vars)) {
  21161. var toAppendTo = similar ? group.withSimilar : group.withoutSimilar;
  21162. toAppendTo.callbacks.push(callback);
  21163. if (toAppendTo.callbacks.length === 1) {
  21164. toAppendTo.state.set(getCurrent());
  21165. }
  21166. } else {
  21167. group.withVars.push({
  21168. state: Cell(getCurrent()),
  21169. similar: similar,
  21170. vars: vars,
  21171. callback: callback
  21172. });
  21173. }
  21174. });
  21175. registeredFormatListeners.set(formatChangeItems);
  21176. };
  21177. var removeListeners = function (registeredFormatListeners, formats, callback) {
  21178. var formatChangeItems = registeredFormatListeners.get();
  21179. each$k(formats.split(','), function (format) {
  21180. return get$9(formatChangeItems, format).each(function (group) {
  21181. formatChangeItems[format] = {
  21182. withSimilar: __assign(__assign({}, group.withSimilar), {
  21183. callbacks: filter$4(group.withSimilar.callbacks, function (cb) {
  21184. return cb !== callback;
  21185. })
  21186. }),
  21187. withoutSimilar: __assign(__assign({}, group.withoutSimilar), {
  21188. callbacks: filter$4(group.withoutSimilar.callbacks, function (cb) {
  21189. return cb !== callback;
  21190. })
  21191. }),
  21192. withVars: filter$4(group.withVars, function (item) {
  21193. return item.callback !== callback;
  21194. })
  21195. };
  21196. });
  21197. });
  21198. registeredFormatListeners.set(formatChangeItems);
  21199. };
  21200. var formatChangedInternal = function (editor, registeredFormatListeners, formats, callback, similar, vars) {
  21201. if (registeredFormatListeners.get() === null) {
  21202. setup$j(registeredFormatListeners, editor);
  21203. }
  21204. addListeners(editor, registeredFormatListeners, formats, callback, similar, vars);
  21205. return {
  21206. unbind: function () {
  21207. return removeListeners(registeredFormatListeners, formats, callback);
  21208. }
  21209. };
  21210. };
  21211. var toggle = function (editor, name, vars, node) {
  21212. var fmt = editor.formatter.get(name);
  21213. if (match$2(editor, name, vars, node) && (!('toggle' in fmt[0]) || fmt[0].toggle)) {
  21214. remove$1(editor, name, vars, node);
  21215. } else {
  21216. applyFormat$1(editor, name, vars, node);
  21217. }
  21218. };
  21219. var fromElements = function (elements, scope) {
  21220. var doc = scope || document;
  21221. var fragment = doc.createDocumentFragment();
  21222. each$k(elements, function (element) {
  21223. fragment.appendChild(element.dom);
  21224. });
  21225. return SugarElement.fromDom(fragment);
  21226. };
  21227. var tableModel = function (element, width, rows) {
  21228. return {
  21229. element: element,
  21230. width: width,
  21231. rows: rows
  21232. };
  21233. };
  21234. var tableRow = function (element, cells) {
  21235. return {
  21236. element: element,
  21237. cells: cells
  21238. };
  21239. };
  21240. var cellPosition = function (x, y) {
  21241. return {
  21242. x: x,
  21243. y: y
  21244. };
  21245. };
  21246. var getSpan = function (td, key) {
  21247. var value = parseInt(get$6(td, key), 10);
  21248. return isNaN(value) ? 1 : value;
  21249. };
  21250. var fillout = function (table, x, y, tr, td) {
  21251. var rowspan = getSpan(td, 'rowspan');
  21252. var colspan = getSpan(td, 'colspan');
  21253. var rows = table.rows;
  21254. for (var y2 = y; y2 < y + rowspan; y2++) {
  21255. if (!rows[y2]) {
  21256. rows[y2] = tableRow(deep$1(tr), []);
  21257. }
  21258. for (var x2 = x; x2 < x + colspan; x2++) {
  21259. var cells = rows[y2].cells;
  21260. cells[x2] = y2 === y && x2 === x ? td : shallow(td);
  21261. }
  21262. }
  21263. };
  21264. var cellExists = function (table, x, y) {
  21265. var rows = table.rows;
  21266. var cells = rows[y] ? rows[y].cells : [];
  21267. return !!cells[x];
  21268. };
  21269. var skipCellsX = function (table, x, y) {
  21270. while (cellExists(table, x, y)) {
  21271. x++;
  21272. }
  21273. return x;
  21274. };
  21275. var getWidth = function (rows) {
  21276. return foldl(rows, function (acc, row) {
  21277. return row.cells.length > acc ? row.cells.length : acc;
  21278. }, 0);
  21279. };
  21280. var findElementPos = function (table, element) {
  21281. var rows = table.rows;
  21282. for (var y = 0; y < rows.length; y++) {
  21283. var cells = rows[y].cells;
  21284. for (var x = 0; x < cells.length; x++) {
  21285. if (eq(cells[x], element)) {
  21286. return Optional.some(cellPosition(x, y));
  21287. }
  21288. }
  21289. }
  21290. return Optional.none();
  21291. };
  21292. var extractRows = function (table, sx, sy, ex, ey) {
  21293. var newRows = [];
  21294. var rows = table.rows;
  21295. for (var y = sy; y <= ey; y++) {
  21296. var cells = rows[y].cells;
  21297. var slice = sx < ex ? cells.slice(sx, ex + 1) : cells.slice(ex, sx + 1);
  21298. newRows.push(tableRow(rows[y].element, slice));
  21299. }
  21300. return newRows;
  21301. };
  21302. var subTable = function (table, startPos, endPos) {
  21303. var sx = startPos.x, sy = startPos.y;
  21304. var ex = endPos.x, ey = endPos.y;
  21305. var newRows = sy < ey ? extractRows(table, sx, sy, ex, ey) : extractRows(table, sx, ey, ex, sy);
  21306. return tableModel(table.element, getWidth(newRows), newRows);
  21307. };
  21308. var createDomTable = function (table, rows) {
  21309. var tableElement = shallow(table.element);
  21310. var tableBody = SugarElement.fromTag('tbody');
  21311. append(tableBody, rows);
  21312. append$1(tableElement, tableBody);
  21313. return tableElement;
  21314. };
  21315. var modelRowsToDomRows = function (table) {
  21316. return map$3(table.rows, function (row) {
  21317. var cells = map$3(row.cells, function (cell) {
  21318. var td = deep$1(cell);
  21319. remove$6(td, 'colspan');
  21320. remove$6(td, 'rowspan');
  21321. return td;
  21322. });
  21323. var tr = shallow(row.element);
  21324. append(tr, cells);
  21325. return tr;
  21326. });
  21327. };
  21328. var fromDom = function (tableElm) {
  21329. var table = tableModel(shallow(tableElm), 0, []);
  21330. each$k(descendants(tableElm, 'tr'), function (tr, y) {
  21331. each$k(descendants(tr, 'td,th'), function (td, x) {
  21332. fillout(table, skipCellsX(table, x, y), y, tr, td);
  21333. });
  21334. });
  21335. return tableModel(table.element, getWidth(table.rows), table.rows);
  21336. };
  21337. var toDom = function (table) {
  21338. return createDomTable(table, modelRowsToDomRows(table));
  21339. };
  21340. var subsection = function (table, startElement, endElement) {
  21341. return findElementPos(table, startElement).bind(function (startPos) {
  21342. return findElementPos(table, endElement).map(function (endPos) {
  21343. return subTable(table, startPos, endPos);
  21344. });
  21345. });
  21346. };
  21347. var findParentListContainer = function (parents) {
  21348. return find$3(parents, function (elm) {
  21349. return name(elm) === 'ul' || name(elm) === 'ol';
  21350. });
  21351. };
  21352. var getFullySelectedListWrappers = function (parents, rng) {
  21353. return find$3(parents, function (elm) {
  21354. return name(elm) === 'li' && hasAllContentsSelected(elm, rng);
  21355. }).fold(constant([]), function (_li) {
  21356. return findParentListContainer(parents).map(function (listCont) {
  21357. var listElm = SugarElement.fromTag(name(listCont));
  21358. var listStyles = filter$3(getAllRaw(listCont), function (_style, name) {
  21359. return startsWith(name, 'list-style');
  21360. });
  21361. setAll(listElm, listStyles);
  21362. return [
  21363. SugarElement.fromTag('li'),
  21364. listElm
  21365. ];
  21366. }).getOr([]);
  21367. });
  21368. };
  21369. var wrap = function (innerElm, elms) {
  21370. var wrapped = foldl(elms, function (acc, elm) {
  21371. append$1(elm, acc);
  21372. return elm;
  21373. }, innerElm);
  21374. return elms.length > 0 ? fromElements([wrapped]) : wrapped;
  21375. };
  21376. var directListWrappers = function (commonAnchorContainer) {
  21377. if (isListItem(commonAnchorContainer)) {
  21378. return parent(commonAnchorContainer).filter(isList).fold(constant([]), function (listElm) {
  21379. return [
  21380. commonAnchorContainer,
  21381. listElm
  21382. ];
  21383. });
  21384. } else {
  21385. return isList(commonAnchorContainer) ? [commonAnchorContainer] : [];
  21386. }
  21387. };
  21388. var getWrapElements = function (rootNode, rng) {
  21389. var commonAnchorContainer = SugarElement.fromDom(rng.commonAncestorContainer);
  21390. var parents = parentsAndSelf(commonAnchorContainer, rootNode);
  21391. var wrapElements = filter$4(parents, function (elm) {
  21392. return isInline$1(elm) || isHeading(elm);
  21393. });
  21394. var listWrappers = getFullySelectedListWrappers(parents, rng);
  21395. var allWrappers = wrapElements.concat(listWrappers.length ? listWrappers : directListWrappers(commonAnchorContainer));
  21396. return map$3(allWrappers, shallow);
  21397. };
  21398. var emptyFragment = function () {
  21399. return fromElements([]);
  21400. };
  21401. var getFragmentFromRange = function (rootNode, rng) {
  21402. return wrap(SugarElement.fromDom(rng.cloneContents()), getWrapElements(rootNode, rng));
  21403. };
  21404. var getParentTable = function (rootElm, cell) {
  21405. return ancestor$2(cell, 'table', curry(eq, rootElm));
  21406. };
  21407. var getTableFragment = function (rootNode, selectedTableCells) {
  21408. return getParentTable(rootNode, selectedTableCells[0]).bind(function (tableElm) {
  21409. var firstCell = selectedTableCells[0];
  21410. var lastCell = selectedTableCells[selectedTableCells.length - 1];
  21411. var fullTableModel = fromDom(tableElm);
  21412. return subsection(fullTableModel, firstCell, lastCell).map(function (sectionedTableModel) {
  21413. return fromElements([toDom(sectionedTableModel)]);
  21414. });
  21415. }).getOrThunk(emptyFragment);
  21416. };
  21417. var getSelectionFragment = function (rootNode, ranges) {
  21418. return ranges.length > 0 && ranges[0].collapsed ? emptyFragment() : getFragmentFromRange(rootNode, ranges[0]);
  21419. };
  21420. var read$3 = function (rootNode, ranges) {
  21421. var selectedCells = getCellsFromElementOrRanges(ranges, rootNode);
  21422. return selectedCells.length > 0 ? getTableFragment(rootNode, selectedCells) : getSelectionFragment(rootNode, ranges);
  21423. };
  21424. var trimLeadingCollapsibleText = function (text) {
  21425. return text.replace(/^[ \f\n\r\t\v]+/, '');
  21426. };
  21427. var isCollapsibleWhitespace = function (text, index) {
  21428. return index >= 0 && index < text.length && isWhiteSpace(text.charAt(index));
  21429. };
  21430. var getInnerText = function (bin, shouldTrim) {
  21431. var text = trim$2(bin.innerText);
  21432. return shouldTrim ? trimLeadingCollapsibleText(text) : text;
  21433. };
  21434. var getContextNodeName = function (parentBlockOpt) {
  21435. return parentBlockOpt.map(function (block) {
  21436. return block.nodeName;
  21437. }).getOr('div').toLowerCase();
  21438. };
  21439. var getTextContent = function (editor) {
  21440. return Optional.from(editor.selection.getRng()).map(function (rng) {
  21441. var parentBlockOpt = Optional.from(editor.dom.getParent(rng.commonAncestorContainer, editor.dom.isBlock));
  21442. var body = editor.getBody();
  21443. var contextNodeName = getContextNodeName(parentBlockOpt);
  21444. var shouldTrimSpaces = Env.browser.isIE() && contextNodeName !== 'pre';
  21445. var bin = editor.dom.add(body, contextNodeName, {
  21446. 'data-mce-bogus': 'all',
  21447. 'style': 'overflow: hidden; opacity: 0;'
  21448. }, rng.cloneContents());
  21449. var text = getInnerText(bin, shouldTrimSpaces);
  21450. var nonRenderedText = trim$2(bin.textContent);
  21451. editor.dom.remove(bin);
  21452. if (isCollapsibleWhitespace(nonRenderedText, 0) || isCollapsibleWhitespace(nonRenderedText, nonRenderedText.length - 1)) {
  21453. var parentBlock = parentBlockOpt.getOr(body);
  21454. var parentBlockText = getInnerText(parentBlock, shouldTrimSpaces);
  21455. var textIndex = parentBlockText.indexOf(text);
  21456. if (textIndex === -1) {
  21457. return text;
  21458. } else {
  21459. var hasProceedingSpace = isCollapsibleWhitespace(parentBlockText, textIndex - 1);
  21460. var hasTrailingSpace = isCollapsibleWhitespace(parentBlockText, textIndex + text.length);
  21461. return (hasProceedingSpace ? ' ' : '') + text + (hasTrailingSpace ? ' ' : '');
  21462. }
  21463. } else {
  21464. return text;
  21465. }
  21466. }).getOr('');
  21467. };
  21468. var getSerializedContent = function (editor, args) {
  21469. var rng = editor.selection.getRng(), tmpElm = editor.dom.create('body');
  21470. var sel = editor.selection.getSel();
  21471. var ranges = processRanges(editor, getRanges(sel));
  21472. var fragment = args.contextual ? read$3(SugarElement.fromDom(editor.getBody()), ranges).dom : rng.cloneContents();
  21473. if (fragment) {
  21474. tmpElm.appendChild(fragment);
  21475. }
  21476. return editor.selection.serializer.serialize(tmpElm, args);
  21477. };
  21478. var setupArgs$1 = function (args, format) {
  21479. return __assign(__assign({}, args), {
  21480. format: format,
  21481. get: true,
  21482. selection: true
  21483. });
  21484. };
  21485. var getSelectedContentInternal = function (editor, format, args) {
  21486. if (args === void 0) {
  21487. args = {};
  21488. }
  21489. var defaultedArgs = setupArgs$1(args, format);
  21490. var updatedArgs = editor.fire('BeforeGetContent', defaultedArgs);
  21491. if (updatedArgs.isDefaultPrevented()) {
  21492. editor.fire('GetContent', updatedArgs);
  21493. return updatedArgs.content;
  21494. }
  21495. if (updatedArgs.format === 'text') {
  21496. return getTextContent(editor);
  21497. } else {
  21498. updatedArgs.getInner = true;
  21499. var content = getSerializedContent(editor, updatedArgs);
  21500. if (updatedArgs.format === 'tree') {
  21501. return content;
  21502. } else {
  21503. updatedArgs.content = editor.selection.isCollapsed() ? '' : content;
  21504. editor.fire('GetContent', updatedArgs);
  21505. return updatedArgs.content;
  21506. }
  21507. }
  21508. };
  21509. var KEEP = 0, INSERT = 1, DELETE = 2;
  21510. var diff = function (left, right) {
  21511. var size = left.length + right.length + 2;
  21512. var vDown = new Array(size);
  21513. var vUp = new Array(size);
  21514. var snake = function (start, end, diag) {
  21515. return {
  21516. start: start,
  21517. end: end,
  21518. diag: diag
  21519. };
  21520. };
  21521. var buildScript = function (start1, end1, start2, end2, script) {
  21522. var middle = getMiddleSnake(start1, end1, start2, end2);
  21523. if (middle === null || middle.start === end1 && middle.diag === end1 - end2 || middle.end === start1 && middle.diag === start1 - start2) {
  21524. var i = start1;
  21525. var j = start2;
  21526. while (i < end1 || j < end2) {
  21527. if (i < end1 && j < end2 && left[i] === right[j]) {
  21528. script.push([
  21529. KEEP,
  21530. left[i]
  21531. ]);
  21532. ++i;
  21533. ++j;
  21534. } else {
  21535. if (end1 - start1 > end2 - start2) {
  21536. script.push([
  21537. DELETE,
  21538. left[i]
  21539. ]);
  21540. ++i;
  21541. } else {
  21542. script.push([
  21543. INSERT,
  21544. right[j]
  21545. ]);
  21546. ++j;
  21547. }
  21548. }
  21549. }
  21550. } else {
  21551. buildScript(start1, middle.start, start2, middle.start - middle.diag, script);
  21552. for (var i2 = middle.start; i2 < middle.end; ++i2) {
  21553. script.push([
  21554. KEEP,
  21555. left[i2]
  21556. ]);
  21557. }
  21558. buildScript(middle.end, end1, middle.end - middle.diag, end2, script);
  21559. }
  21560. };
  21561. var buildSnake = function (start, diag, end1, end2) {
  21562. var end = start;
  21563. while (end - diag < end2 && end < end1 && left[end] === right[end - diag]) {
  21564. ++end;
  21565. }
  21566. return snake(start, end, diag);
  21567. };
  21568. var getMiddleSnake = function (start1, end1, start2, end2) {
  21569. var m = end1 - start1;
  21570. var n = end2 - start2;
  21571. if (m === 0 || n === 0) {
  21572. return null;
  21573. }
  21574. var delta = m - n;
  21575. var sum = n + m;
  21576. var offset = (sum % 2 === 0 ? sum : sum + 1) / 2;
  21577. vDown[1 + offset] = start1;
  21578. vUp[1 + offset] = end1 + 1;
  21579. var d, k, i, x, y;
  21580. for (d = 0; d <= offset; ++d) {
  21581. for (k = -d; k <= d; k += 2) {
  21582. i = k + offset;
  21583. if (k === -d || k !== d && vDown[i - 1] < vDown[i + 1]) {
  21584. vDown[i] = vDown[i + 1];
  21585. } else {
  21586. vDown[i] = vDown[i - 1] + 1;
  21587. }
  21588. x = vDown[i];
  21589. y = x - start1 + start2 - k;
  21590. while (x < end1 && y < end2 && left[x] === right[y]) {
  21591. vDown[i] = ++x;
  21592. ++y;
  21593. }
  21594. if (delta % 2 !== 0 && delta - d <= k && k <= delta + d) {
  21595. if (vUp[i - delta] <= vDown[i]) {
  21596. return buildSnake(vUp[i - delta], k + start1 - start2, end1, end2);
  21597. }
  21598. }
  21599. }
  21600. for (k = delta - d; k <= delta + d; k += 2) {
  21601. i = k + offset - delta;
  21602. if (k === delta - d || k !== delta + d && vUp[i + 1] <= vUp[i - 1]) {
  21603. vUp[i] = vUp[i + 1] - 1;
  21604. } else {
  21605. vUp[i] = vUp[i - 1];
  21606. }
  21607. x = vUp[i] - 1;
  21608. y = x - start1 + start2 - k;
  21609. while (x >= start1 && y >= start2 && left[x] === right[y]) {
  21610. vUp[i] = x--;
  21611. y--;
  21612. }
  21613. if (delta % 2 === 0 && -d <= k && k <= d) {
  21614. if (vUp[i] <= vDown[i + delta]) {
  21615. return buildSnake(vUp[i], k + start1 - start2, end1, end2);
  21616. }
  21617. }
  21618. }
  21619. }
  21620. };
  21621. var script = [];
  21622. buildScript(0, left.length, 0, right.length, script);
  21623. return script;
  21624. };
  21625. var getOuterHtml = function (elm) {
  21626. if (isElement$5(elm)) {
  21627. return elm.outerHTML;
  21628. } else if (isText$7(elm)) {
  21629. return Entities.encodeRaw(elm.data, false);
  21630. } else if (isComment(elm)) {
  21631. return '<!--' + elm.data + '-->';
  21632. }
  21633. return '';
  21634. };
  21635. var createFragment = function (html) {
  21636. var node;
  21637. var container = document.createElement('div');
  21638. var frag = document.createDocumentFragment();
  21639. if (html) {
  21640. container.innerHTML = html;
  21641. }
  21642. while (node = container.firstChild) {
  21643. frag.appendChild(node);
  21644. }
  21645. return frag;
  21646. };
  21647. var insertAt = function (elm, html, index) {
  21648. var fragment = createFragment(html);
  21649. if (elm.hasChildNodes() && index < elm.childNodes.length) {
  21650. var target = elm.childNodes[index];
  21651. target.parentNode.insertBefore(fragment, target);
  21652. } else {
  21653. elm.appendChild(fragment);
  21654. }
  21655. };
  21656. var removeAt = function (elm, index) {
  21657. if (elm.hasChildNodes() && index < elm.childNodes.length) {
  21658. var target = elm.childNodes[index];
  21659. target.parentNode.removeChild(target);
  21660. }
  21661. };
  21662. var applyDiff = function (diff, elm) {
  21663. var index = 0;
  21664. each$k(diff, function (action) {
  21665. if (action[0] === KEEP) {
  21666. index++;
  21667. } else if (action[0] === INSERT) {
  21668. insertAt(elm, action[1], index);
  21669. index++;
  21670. } else if (action[0] === DELETE) {
  21671. removeAt(elm, index);
  21672. }
  21673. });
  21674. };
  21675. var read$2 = function (elm) {
  21676. return filter$4(map$3(from(elm.childNodes), getOuterHtml), function (item) {
  21677. return item.length > 0;
  21678. });
  21679. };
  21680. var write = function (fragments, elm) {
  21681. var currentFragments = map$3(from(elm.childNodes), getOuterHtml);
  21682. applyDiff(diff(currentFragments, fragments), elm);
  21683. return elm;
  21684. };
  21685. var lazyTempDocument = cached(function () {
  21686. return document.implementation.createHTMLDocument('undo');
  21687. });
  21688. var hasIframes = function (html) {
  21689. return html.indexOf('</iframe>') !== -1;
  21690. };
  21691. var createFragmentedLevel = function (fragments) {
  21692. return {
  21693. type: 'fragmented',
  21694. fragments: fragments,
  21695. content: '',
  21696. bookmark: null,
  21697. beforeBookmark: null
  21698. };
  21699. };
  21700. var createCompleteLevel = function (content) {
  21701. return {
  21702. type: 'complete',
  21703. fragments: null,
  21704. content: content,
  21705. bookmark: null,
  21706. beforeBookmark: null
  21707. };
  21708. };
  21709. var createFromEditor = function (editor) {
  21710. var fragments = read$2(editor.getBody());
  21711. var trimmedFragments = bind(fragments, function (html) {
  21712. var trimmed = trimInternal(editor.serializer, html);
  21713. return trimmed.length > 0 ? [trimmed] : [];
  21714. });
  21715. var content = trimmedFragments.join('');
  21716. return hasIframes(content) ? createFragmentedLevel(trimmedFragments) : createCompleteLevel(content);
  21717. };
  21718. var applyToEditor = function (editor, level, before) {
  21719. var bookmark = before ? level.beforeBookmark : level.bookmark;
  21720. if (level.type === 'fragmented') {
  21721. write(level.fragments, editor.getBody());
  21722. } else {
  21723. editor.setContent(level.content, {
  21724. format: 'raw',
  21725. no_selection: isNonNullable(bookmark) && isPathBookmark(bookmark) ? !bookmark.isFakeCaret : true
  21726. });
  21727. }
  21728. editor.selection.moveToBookmark(bookmark);
  21729. };
  21730. var getLevelContent = function (level) {
  21731. return level.type === 'fragmented' ? level.fragments.join('') : level.content;
  21732. };
  21733. var getCleanLevelContent = function (level) {
  21734. var elm = SugarElement.fromTag('body', lazyTempDocument());
  21735. set(elm, getLevelContent(level));
  21736. each$k(descendants(elm, '*[data-mce-bogus]'), unwrap);
  21737. return get$3(elm);
  21738. };
  21739. var hasEqualContent = function (level1, level2) {
  21740. return getLevelContent(level1) === getLevelContent(level2);
  21741. };
  21742. var hasEqualCleanedContent = function (level1, level2) {
  21743. return getCleanLevelContent(level1) === getCleanLevelContent(level2);
  21744. };
  21745. var isEq$1 = function (level1, level2) {
  21746. if (!level1 || !level2) {
  21747. return false;
  21748. } else if (hasEqualContent(level1, level2)) {
  21749. return true;
  21750. } else {
  21751. return hasEqualCleanedContent(level1, level2);
  21752. }
  21753. };
  21754. var isUnlocked = function (locks) {
  21755. return locks.get() === 0;
  21756. };
  21757. var setTyping = function (undoManager, typing, locks) {
  21758. if (isUnlocked(locks)) {
  21759. undoManager.typing = typing;
  21760. }
  21761. };
  21762. var endTyping = function (undoManager, locks) {
  21763. if (undoManager.typing) {
  21764. setTyping(undoManager, false, locks);
  21765. undoManager.add();
  21766. }
  21767. };
  21768. var endTypingLevelIgnoreLocks = function (undoManager) {
  21769. if (undoManager.typing) {
  21770. undoManager.typing = false;
  21771. undoManager.add();
  21772. }
  21773. };
  21774. var beforeChange$1 = function (editor, locks, beforeBookmark) {
  21775. if (isUnlocked(locks)) {
  21776. beforeBookmark.set(getUndoBookmark(editor.selection));
  21777. }
  21778. };
  21779. var addUndoLevel$1 = function (editor, undoManager, index, locks, beforeBookmark, level, event) {
  21780. var currentLevel = createFromEditor(editor);
  21781. level = level || {};
  21782. level = Tools.extend(level, currentLevel);
  21783. if (isUnlocked(locks) === false || editor.removed) {
  21784. return null;
  21785. }
  21786. var lastLevel = undoManager.data[index.get()];
  21787. if (editor.fire('BeforeAddUndo', {
  21788. level: level,
  21789. lastLevel: lastLevel,
  21790. originalEvent: event
  21791. }).isDefaultPrevented()) {
  21792. return null;
  21793. }
  21794. if (lastLevel && isEq$1(lastLevel, level)) {
  21795. return null;
  21796. }
  21797. if (undoManager.data[index.get()]) {
  21798. beforeBookmark.get().each(function (bm) {
  21799. undoManager.data[index.get()].beforeBookmark = bm;
  21800. });
  21801. }
  21802. var customUndoRedoLevels = getCustomUndoRedoLevels(editor);
  21803. if (customUndoRedoLevels) {
  21804. if (undoManager.data.length > customUndoRedoLevels) {
  21805. for (var i = 0; i < undoManager.data.length - 1; i++) {
  21806. undoManager.data[i] = undoManager.data[i + 1];
  21807. }
  21808. undoManager.data.length--;
  21809. index.set(undoManager.data.length);
  21810. }
  21811. }
  21812. level.bookmark = getUndoBookmark(editor.selection);
  21813. if (index.get() < undoManager.data.length - 1) {
  21814. undoManager.data.length = index.get() + 1;
  21815. }
  21816. undoManager.data.push(level);
  21817. index.set(undoManager.data.length - 1);
  21818. var args = {
  21819. level: level,
  21820. lastLevel: lastLevel,
  21821. originalEvent: event
  21822. };
  21823. if (index.get() > 0) {
  21824. editor.setDirty(true);
  21825. editor.fire('AddUndo', args);
  21826. editor.fire('change', args);
  21827. } else {
  21828. editor.fire('AddUndo', args);
  21829. }
  21830. return level;
  21831. };
  21832. var clear$1 = function (editor, undoManager, index) {
  21833. undoManager.data = [];
  21834. index.set(0);
  21835. undoManager.typing = false;
  21836. editor.fire('ClearUndos');
  21837. };
  21838. var extra$1 = function (editor, undoManager, index, callback1, callback2) {
  21839. if (undoManager.transact(callback1)) {
  21840. var bookmark = undoManager.data[index.get()].bookmark;
  21841. var lastLevel = undoManager.data[index.get() - 1];
  21842. applyToEditor(editor, lastLevel, true);
  21843. if (undoManager.transact(callback2)) {
  21844. undoManager.data[index.get() - 1].beforeBookmark = bookmark;
  21845. }
  21846. }
  21847. };
  21848. var redo$1 = function (editor, index, data) {
  21849. var level;
  21850. if (index.get() < data.length - 1) {
  21851. index.set(index.get() + 1);
  21852. level = data[index.get()];
  21853. applyToEditor(editor, level, false);
  21854. editor.setDirty(true);
  21855. editor.fire('Redo', { level: level });
  21856. }
  21857. return level;
  21858. };
  21859. var undo$1 = function (editor, undoManager, locks, index) {
  21860. var level;
  21861. if (undoManager.typing) {
  21862. undoManager.add();
  21863. undoManager.typing = false;
  21864. setTyping(undoManager, false, locks);
  21865. }
  21866. if (index.get() > 0) {
  21867. index.set(index.get() - 1);
  21868. level = undoManager.data[index.get()];
  21869. applyToEditor(editor, level, true);
  21870. editor.setDirty(true);
  21871. editor.fire('Undo', { level: level });
  21872. }
  21873. return level;
  21874. };
  21875. var reset$1 = function (undoManager) {
  21876. undoManager.clear();
  21877. undoManager.add();
  21878. };
  21879. var hasUndo$1 = function (editor, undoManager, index) {
  21880. return index.get() > 0 || undoManager.typing && undoManager.data[0] && !isEq$1(createFromEditor(editor), undoManager.data[0]);
  21881. };
  21882. var hasRedo$1 = function (undoManager, index) {
  21883. return index.get() < undoManager.data.length - 1 && !undoManager.typing;
  21884. };
  21885. var transact$1 = function (undoManager, locks, callback) {
  21886. endTyping(undoManager, locks);
  21887. undoManager.beforeChange();
  21888. undoManager.ignore(callback);
  21889. return undoManager.add();
  21890. };
  21891. var ignore$1 = function (locks, callback) {
  21892. try {
  21893. locks.set(locks.get() + 1);
  21894. callback();
  21895. } finally {
  21896. locks.set(locks.get() - 1);
  21897. }
  21898. };
  21899. var addVisualInternal = function (editor, elm) {
  21900. var dom = editor.dom;
  21901. var scope = isNonNullable(elm) ? elm : editor.getBody();
  21902. if (isUndefined(editor.hasVisual)) {
  21903. editor.hasVisual = isVisualAidsEnabled(editor);
  21904. }
  21905. each$k(dom.select('table,a', scope), function (matchedElm) {
  21906. switch (matchedElm.nodeName) {
  21907. case 'TABLE':
  21908. var cls = getVisualAidsTableClass(editor);
  21909. var value = dom.getAttrib(matchedElm, 'border');
  21910. if ((!value || value === '0') && editor.hasVisual) {
  21911. dom.addClass(matchedElm, cls);
  21912. } else {
  21913. dom.removeClass(matchedElm, cls);
  21914. }
  21915. break;
  21916. case 'A':
  21917. if (!dom.getAttrib(matchedElm, 'href')) {
  21918. var value_1 = dom.getAttrib(matchedElm, 'name') || matchedElm.id;
  21919. var cls_1 = getVisualAidsAnchorClass(editor);
  21920. if (value_1 && editor.hasVisual) {
  21921. dom.addClass(matchedElm, cls_1);
  21922. } else {
  21923. dom.removeClass(matchedElm, cls_1);
  21924. }
  21925. }
  21926. break;
  21927. }
  21928. });
  21929. editor.fire('VisualAid', {
  21930. element: elm,
  21931. hasVisual: editor.hasVisual
  21932. });
  21933. };
  21934. var makePlainAdaptor = function (editor) {
  21935. return {
  21936. undoManager: {
  21937. beforeChange: function (locks, beforeBookmark) {
  21938. return beforeChange$1(editor, locks, beforeBookmark);
  21939. },
  21940. add: function (undoManager, index, locks, beforeBookmark, level, event) {
  21941. return addUndoLevel$1(editor, undoManager, index, locks, beforeBookmark, level, event);
  21942. },
  21943. undo: function (undoManager, locks, index) {
  21944. return undo$1(editor, undoManager, locks, index);
  21945. },
  21946. redo: function (index, data) {
  21947. return redo$1(editor, index, data);
  21948. },
  21949. clear: function (undoManager, index) {
  21950. return clear$1(editor, undoManager, index);
  21951. },
  21952. reset: function (undoManager) {
  21953. return reset$1(undoManager);
  21954. },
  21955. hasUndo: function (undoManager, index) {
  21956. return hasUndo$1(editor, undoManager, index);
  21957. },
  21958. hasRedo: function (undoManager, index) {
  21959. return hasRedo$1(undoManager, index);
  21960. },
  21961. transact: function (undoManager, locks, callback) {
  21962. return transact$1(undoManager, locks, callback);
  21963. },
  21964. ignore: function (locks, callback) {
  21965. return ignore$1(locks, callback);
  21966. },
  21967. extra: function (undoManager, index, callback1, callback2) {
  21968. return extra$1(editor, undoManager, index, callback1, callback2);
  21969. }
  21970. },
  21971. formatter: {
  21972. match: function (name, vars, node, similar) {
  21973. return match$2(editor, name, vars, node, similar);
  21974. },
  21975. matchAll: function (names, vars) {
  21976. return matchAll(editor, names, vars);
  21977. },
  21978. matchNode: function (node, name, vars, similar) {
  21979. return matchNode(editor, node, name, vars, similar);
  21980. },
  21981. canApply: function (name) {
  21982. return canApply(editor, name);
  21983. },
  21984. closest: function (names) {
  21985. return closest(editor, names);
  21986. },
  21987. apply: function (name, vars, node) {
  21988. return applyFormat$1(editor, name, vars, node);
  21989. },
  21990. remove: function (name, vars, node, similar) {
  21991. return remove$1(editor, name, vars, node, similar);
  21992. },
  21993. toggle: function (name, vars, node) {
  21994. return toggle(editor, name, vars, node);
  21995. },
  21996. formatChanged: function (registeredFormatListeners, formats, callback, similar, vars) {
  21997. return formatChangedInternal(editor, registeredFormatListeners, formats, callback, similar, vars);
  21998. }
  21999. },
  22000. editor: {
  22001. getContent: function (args, format) {
  22002. return getContentInternal(editor, args, format);
  22003. },
  22004. setContent: function (content, args) {
  22005. return setContentInternal(editor, content, args);
  22006. },
  22007. insertContent: function (value, details) {
  22008. return insertHtmlAtCaret(editor, value, details);
  22009. },
  22010. addVisual: function (elm) {
  22011. return addVisualInternal(editor, elm);
  22012. }
  22013. },
  22014. selection: {
  22015. getContent: function (format, args) {
  22016. return getSelectedContentInternal(editor, format, args);
  22017. }
  22018. },
  22019. raw: {
  22020. getModel: function () {
  22021. return Optional.none();
  22022. }
  22023. }
  22024. };
  22025. };
  22026. var makeRtcAdaptor = function (rtcEditor) {
  22027. var defaultVars = function (vars) {
  22028. return isObject(vars) ? vars : {};
  22029. };
  22030. var undoManager = rtcEditor.undoManager, formatter = rtcEditor.formatter, editor = rtcEditor.editor, selection = rtcEditor.selection, raw = rtcEditor.raw;
  22031. return {
  22032. undoManager: {
  22033. beforeChange: undoManager.beforeChange,
  22034. add: undoManager.add,
  22035. undo: undoManager.undo,
  22036. redo: undoManager.redo,
  22037. clear: undoManager.clear,
  22038. reset: undoManager.reset,
  22039. hasUndo: undoManager.hasUndo,
  22040. hasRedo: undoManager.hasRedo,
  22041. transact: function (_undoManager, _locks, fn) {
  22042. return undoManager.transact(fn);
  22043. },
  22044. ignore: function (_locks, callback) {
  22045. return undoManager.ignore(callback);
  22046. },
  22047. extra: function (_undoManager, _index, callback1, callback2) {
  22048. return undoManager.extra(callback1, callback2);
  22049. }
  22050. },
  22051. formatter: {
  22052. match: function (name, vars, _node, similar) {
  22053. return formatter.match(name, defaultVars(vars), similar);
  22054. },
  22055. matchAll: formatter.matchAll,
  22056. matchNode: formatter.matchNode,
  22057. canApply: function (name) {
  22058. return formatter.canApply(name);
  22059. },
  22060. closest: function (names) {
  22061. return formatter.closest(names);
  22062. },
  22063. apply: function (name, vars, _node) {
  22064. return formatter.apply(name, defaultVars(vars));
  22065. },
  22066. remove: function (name, vars, _node, _similar) {
  22067. return formatter.remove(name, defaultVars(vars));
  22068. },
  22069. toggle: function (name, vars, _node) {
  22070. return formatter.toggle(name, defaultVars(vars));
  22071. },
  22072. formatChanged: function (_rfl, formats, callback, similar, vars) {
  22073. return formatter.formatChanged(formats, callback, similar, vars);
  22074. }
  22075. },
  22076. editor: {
  22077. getContent: function (args, _format) {
  22078. return editor.getContent(args);
  22079. },
  22080. setContent: function (content, args) {
  22081. return editor.setContent(content, args);
  22082. },
  22083. insertContent: function (content, _details) {
  22084. return editor.insertContent(content);
  22085. },
  22086. addVisual: editor.addVisual
  22087. },
  22088. selection: {
  22089. getContent: function (_format, args) {
  22090. return selection.getContent(args);
  22091. }
  22092. },
  22093. raw: {
  22094. getModel: function () {
  22095. return Optional.some(raw.getRawModel());
  22096. }
  22097. }
  22098. };
  22099. };
  22100. var makeNoopAdaptor = function () {
  22101. var nul = constant(null);
  22102. var empty = constant('');
  22103. return {
  22104. undoManager: {
  22105. beforeChange: noop,
  22106. add: nul,
  22107. undo: nul,
  22108. redo: nul,
  22109. clear: noop,
  22110. reset: noop,
  22111. hasUndo: never,
  22112. hasRedo: never,
  22113. transact: nul,
  22114. ignore: noop,
  22115. extra: noop
  22116. },
  22117. formatter: {
  22118. match: never,
  22119. matchAll: constant([]),
  22120. matchNode: constant(undefined),
  22121. canApply: never,
  22122. closest: empty,
  22123. apply: noop,
  22124. remove: noop,
  22125. toggle: noop,
  22126. formatChanged: constant({ unbind: noop })
  22127. },
  22128. editor: {
  22129. getContent: empty,
  22130. setContent: empty,
  22131. insertContent: noop,
  22132. addVisual: noop
  22133. },
  22134. selection: { getContent: empty },
  22135. raw: { getModel: constant(Optional.none()) }
  22136. };
  22137. };
  22138. var isRtc = function (editor) {
  22139. return has$2(editor.plugins, 'rtc');
  22140. };
  22141. var getRtcSetup = function (editor) {
  22142. return get$9(editor.plugins, 'rtc').bind(function (rtcPlugin) {
  22143. return Optional.from(rtcPlugin.setup);
  22144. });
  22145. };
  22146. var setup$i = function (editor) {
  22147. var editorCast = editor;
  22148. return getRtcSetup(editor).fold(function () {
  22149. editorCast.rtcInstance = makePlainAdaptor(editor);
  22150. return Optional.none();
  22151. }, function (setup) {
  22152. editorCast.rtcInstance = makeNoopAdaptor();
  22153. return Optional.some(function () {
  22154. return setup().then(function (rtcEditor) {
  22155. editorCast.rtcInstance = makeRtcAdaptor(rtcEditor);
  22156. return rtcEditor.rtc.isRemote;
  22157. });
  22158. });
  22159. });
  22160. };
  22161. var getRtcInstanceWithFallback = function (editor) {
  22162. return editor.rtcInstance ? editor.rtcInstance : makePlainAdaptor(editor);
  22163. };
  22164. var getRtcInstanceWithError = function (editor) {
  22165. var rtcInstance = editor.rtcInstance;
  22166. if (!rtcInstance) {
  22167. throw new Error('Failed to get RTC instance not yet initialized.');
  22168. } else {
  22169. return rtcInstance;
  22170. }
  22171. };
  22172. var beforeChange = function (editor, locks, beforeBookmark) {
  22173. getRtcInstanceWithError(editor).undoManager.beforeChange(locks, beforeBookmark);
  22174. };
  22175. var addUndoLevel = function (editor, undoManager, index, locks, beforeBookmark, level, event) {
  22176. return getRtcInstanceWithError(editor).undoManager.add(undoManager, index, locks, beforeBookmark, level, event);
  22177. };
  22178. var undo = function (editor, undoManager, locks, index) {
  22179. return getRtcInstanceWithError(editor).undoManager.undo(undoManager, locks, index);
  22180. };
  22181. var redo = function (editor, index, data) {
  22182. return getRtcInstanceWithError(editor).undoManager.redo(index, data);
  22183. };
  22184. var clear = function (editor, undoManager, index) {
  22185. getRtcInstanceWithError(editor).undoManager.clear(undoManager, index);
  22186. };
  22187. var reset = function (editor, undoManager) {
  22188. getRtcInstanceWithError(editor).undoManager.reset(undoManager);
  22189. };
  22190. var hasUndo = function (editor, undoManager, index) {
  22191. return getRtcInstanceWithError(editor).undoManager.hasUndo(undoManager, index);
  22192. };
  22193. var hasRedo = function (editor, undoManager, index) {
  22194. return getRtcInstanceWithError(editor).undoManager.hasRedo(undoManager, index);
  22195. };
  22196. var transact = function (editor, undoManager, locks, callback) {
  22197. return getRtcInstanceWithError(editor).undoManager.transact(undoManager, locks, callback);
  22198. };
  22199. var ignore = function (editor, locks, callback) {
  22200. getRtcInstanceWithError(editor).undoManager.ignore(locks, callback);
  22201. };
  22202. var extra = function (editor, undoManager, index, callback1, callback2) {
  22203. getRtcInstanceWithError(editor).undoManager.extra(undoManager, index, callback1, callback2);
  22204. };
  22205. var matchFormat = function (editor, name, vars, node, similar) {
  22206. return getRtcInstanceWithError(editor).formatter.match(name, vars, node, similar);
  22207. };
  22208. var matchAllFormats = function (editor, names, vars) {
  22209. return getRtcInstanceWithError(editor).formatter.matchAll(names, vars);
  22210. };
  22211. var matchNodeFormat = function (editor, node, name, vars, similar) {
  22212. return getRtcInstanceWithError(editor).formatter.matchNode(node, name, vars, similar);
  22213. };
  22214. var canApplyFormat = function (editor, name) {
  22215. return getRtcInstanceWithError(editor).formatter.canApply(name);
  22216. };
  22217. var closestFormat = function (editor, names) {
  22218. return getRtcInstanceWithError(editor).formatter.closest(names);
  22219. };
  22220. var applyFormat = function (editor, name, vars, node) {
  22221. getRtcInstanceWithError(editor).formatter.apply(name, vars, node);
  22222. };
  22223. var removeFormat = function (editor, name, vars, node, similar) {
  22224. getRtcInstanceWithError(editor).formatter.remove(name, vars, node, similar);
  22225. };
  22226. var toggleFormat = function (editor, name, vars, node) {
  22227. getRtcInstanceWithError(editor).formatter.toggle(name, vars, node);
  22228. };
  22229. var formatChanged = function (editor, registeredFormatListeners, formats, callback, similar, vars) {
  22230. return getRtcInstanceWithError(editor).formatter.formatChanged(registeredFormatListeners, formats, callback, similar, vars);
  22231. };
  22232. var getContent$2 = function (editor, args, format) {
  22233. return getRtcInstanceWithFallback(editor).editor.getContent(args, format);
  22234. };
  22235. var setContent$2 = function (editor, content, args) {
  22236. return getRtcInstanceWithFallback(editor).editor.setContent(content, args);
  22237. };
  22238. var insertContent = function (editor, value, details) {
  22239. return getRtcInstanceWithFallback(editor).editor.insertContent(value, details);
  22240. };
  22241. var getSelectedContent = function (editor, format, args) {
  22242. return getRtcInstanceWithError(editor).selection.getContent(format, args);
  22243. };
  22244. var addVisual$1 = function (editor, elm) {
  22245. return getRtcInstanceWithError(editor).editor.addVisual(elm);
  22246. };
  22247. var getContent$1 = function (editor, args) {
  22248. if (args === void 0) {
  22249. args = {};
  22250. }
  22251. var format = args.format ? args.format : 'html';
  22252. return getSelectedContent(editor, format, args);
  22253. };
  22254. var removeEmpty = function (text) {
  22255. if (text.dom.length === 0) {
  22256. remove$7(text);
  22257. return Optional.none();
  22258. } else {
  22259. return Optional.some(text);
  22260. }
  22261. };
  22262. var walkPastBookmark = function (node, start) {
  22263. return node.filter(function (elm) {
  22264. return BookmarkManager.isBookmarkNode(elm.dom);
  22265. }).bind(start ? nextSibling : prevSibling);
  22266. };
  22267. var merge = function (outer, inner, rng, start) {
  22268. var outerElm = outer.dom;
  22269. var innerElm = inner.dom;
  22270. var oldLength = start ? outerElm.length : innerElm.length;
  22271. if (start) {
  22272. mergeTextNodes(outerElm, innerElm, false, !start);
  22273. rng.setStart(innerElm, oldLength);
  22274. } else {
  22275. mergeTextNodes(innerElm, outerElm, false, !start);
  22276. rng.setEnd(innerElm, oldLength);
  22277. }
  22278. };
  22279. var normalizeTextIfRequired = function (inner, start) {
  22280. parent(inner).each(function (root) {
  22281. var text = inner.dom;
  22282. if (start && needsToBeNbspLeft(root, CaretPosition(text, 0))) {
  22283. normalizeWhitespaceAfter(text, 0);
  22284. } else if (!start && needsToBeNbspRight(root, CaretPosition(text, text.length))) {
  22285. normalizeWhitespaceBefore(text, text.length);
  22286. }
  22287. });
  22288. };
  22289. var mergeAndNormalizeText = function (outerNode, innerNode, rng, start) {
  22290. outerNode.bind(function (outer) {
  22291. var normalizer = start ? normalizeWhitespaceBefore : normalizeWhitespaceAfter;
  22292. normalizer(outer.dom, start ? outer.dom.length : 0);
  22293. return innerNode.filter(isText$8).map(function (inner) {
  22294. return merge(outer, inner, rng, start);
  22295. });
  22296. }).orThunk(function () {
  22297. var innerTextNode = walkPastBookmark(innerNode, start).or(innerNode).filter(isText$8);
  22298. return innerTextNode.map(function (inner) {
  22299. return normalizeTextIfRequired(inner, start);
  22300. });
  22301. });
  22302. };
  22303. var rngSetContent = function (rng, fragment) {
  22304. var firstChild = Optional.from(fragment.firstChild).map(SugarElement.fromDom);
  22305. var lastChild = Optional.from(fragment.lastChild).map(SugarElement.fromDom);
  22306. rng.deleteContents();
  22307. rng.insertNode(fragment);
  22308. var prevText = firstChild.bind(prevSibling).filter(isText$8).bind(removeEmpty);
  22309. var nextText = lastChild.bind(nextSibling).filter(isText$8).bind(removeEmpty);
  22310. mergeAndNormalizeText(prevText, firstChild, rng, true);
  22311. mergeAndNormalizeText(nextText, lastChild, rng, false);
  22312. rng.collapse(false);
  22313. };
  22314. var setupArgs = function (args, content) {
  22315. return __assign(__assign({ format: 'html' }, args), {
  22316. set: true,
  22317. selection: true,
  22318. content: content
  22319. });
  22320. };
  22321. var cleanContent = function (editor, args) {
  22322. if (args.format !== 'raw') {
  22323. var rng = editor.selection.getRng();
  22324. var contextBlock = editor.dom.getParent(rng.commonAncestorContainer, editor.dom.isBlock);
  22325. var contextArgs = contextBlock ? { context: contextBlock.nodeName.toLowerCase() } : {};
  22326. var node = editor.parser.parse(args.content, __assign(__assign({
  22327. isRootContent: true,
  22328. forced_root_block: false
  22329. }, contextArgs), args));
  22330. return HtmlSerializer({ validate: editor.validate }, editor.schema).serialize(node);
  22331. } else {
  22332. return args.content;
  22333. }
  22334. };
  22335. var setContent$1 = function (editor, content, args) {
  22336. if (args === void 0) {
  22337. args = {};
  22338. }
  22339. var defaultedArgs = setupArgs(args, content);
  22340. var updatedArgs = defaultedArgs;
  22341. if (!defaultedArgs.no_events) {
  22342. var eventArgs = editor.fire('BeforeSetContent', defaultedArgs);
  22343. if (eventArgs.isDefaultPrevented()) {
  22344. editor.fire('SetContent', eventArgs);
  22345. return;
  22346. } else {
  22347. updatedArgs = eventArgs;
  22348. }
  22349. }
  22350. updatedArgs.content = cleanContent(editor, updatedArgs);
  22351. var rng = editor.selection.getRng();
  22352. rngSetContent(rng, rng.createContextualFragment(updatedArgs.content));
  22353. editor.selection.setRng(rng);
  22354. scrollRangeIntoView(editor, rng);
  22355. if (!updatedArgs.no_events) {
  22356. editor.fire('SetContent', updatedArgs);
  22357. }
  22358. };
  22359. var deleteFromCallbackMap = function (callbackMap, selector, callback) {
  22360. if (callbackMap && has$2(callbackMap, selector)) {
  22361. var newCallbacks = filter$4(callbackMap[selector], function (cb) {
  22362. return cb !== callback;
  22363. });
  22364. if (newCallbacks.length === 0) {
  22365. delete callbackMap[selector];
  22366. } else {
  22367. callbackMap[selector] = newCallbacks;
  22368. }
  22369. }
  22370. };
  22371. function SelectorChanged (dom, editor) {
  22372. var selectorChangedData;
  22373. var currentSelectors;
  22374. var findMatchingNode = function (selector, nodes) {
  22375. return find$3(nodes, function (node) {
  22376. return dom.is(node, selector);
  22377. });
  22378. };
  22379. var getParents = function (elem) {
  22380. return dom.getParents(elem, null, dom.getRoot());
  22381. };
  22382. return {
  22383. selectorChangedWithUnbind: function (selector, callback) {
  22384. if (!selectorChangedData) {
  22385. selectorChangedData = {};
  22386. currentSelectors = {};
  22387. editor.on('NodeChange', function (e) {
  22388. var node = e.element;
  22389. var parents = getParents(node);
  22390. var matchedSelectors = {};
  22391. Tools.each(selectorChangedData, function (callbacks, selector) {
  22392. findMatchingNode(selector, parents).each(function (node) {
  22393. if (!currentSelectors[selector]) {
  22394. each$k(callbacks, function (callback) {
  22395. callback(true, {
  22396. node: node,
  22397. selector: selector,
  22398. parents: parents
  22399. });
  22400. });
  22401. currentSelectors[selector] = callbacks;
  22402. }
  22403. matchedSelectors[selector] = callbacks;
  22404. });
  22405. });
  22406. Tools.each(currentSelectors, function (callbacks, selector) {
  22407. if (!matchedSelectors[selector]) {
  22408. delete currentSelectors[selector];
  22409. Tools.each(callbacks, function (callback) {
  22410. callback(false, {
  22411. node: node,
  22412. selector: selector,
  22413. parents: parents
  22414. });
  22415. });
  22416. }
  22417. });
  22418. });
  22419. }
  22420. if (!selectorChangedData[selector]) {
  22421. selectorChangedData[selector] = [];
  22422. }
  22423. selectorChangedData[selector].push(callback);
  22424. findMatchingNode(selector, getParents(editor.selection.getStart())).each(function () {
  22425. currentSelectors[selector] = selectorChangedData[selector];
  22426. });
  22427. return {
  22428. unbind: function () {
  22429. deleteFromCallbackMap(selectorChangedData, selector, callback);
  22430. deleteFromCallbackMap(currentSelectors, selector, callback);
  22431. }
  22432. };
  22433. }
  22434. };
  22435. }
  22436. var isNativeIeSelection = function (rng) {
  22437. return !!rng.select;
  22438. };
  22439. var isAttachedToDom = function (node) {
  22440. return !!(node && node.ownerDocument) && contains$1(SugarElement.fromDom(node.ownerDocument), SugarElement.fromDom(node));
  22441. };
  22442. var isValidRange = function (rng) {
  22443. if (!rng) {
  22444. return false;
  22445. } else if (isNativeIeSelection(rng)) {
  22446. return true;
  22447. } else {
  22448. return isAttachedToDom(rng.startContainer) && isAttachedToDom(rng.endContainer);
  22449. }
  22450. };
  22451. var EditorSelection = function (dom, win, serializer, editor) {
  22452. var selectedRange;
  22453. var explicitRange;
  22454. var selectorChangedWithUnbind = SelectorChanged(dom, editor).selectorChangedWithUnbind;
  22455. var setCursorLocation = function (node, offset) {
  22456. var rng = dom.createRng();
  22457. if (isNonNullable(node) && isNonNullable(offset)) {
  22458. rng.setStart(node, offset);
  22459. rng.setEnd(node, offset);
  22460. setRng(rng);
  22461. collapse(false);
  22462. } else {
  22463. moveEndPoint(dom, rng, editor.getBody(), true);
  22464. setRng(rng);
  22465. }
  22466. };
  22467. var getContent = function (args) {
  22468. return getContent$1(editor, args);
  22469. };
  22470. var setContent = function (content, args) {
  22471. return setContent$1(editor, content, args);
  22472. };
  22473. var getStart$1 = function (real) {
  22474. return getStart(editor.getBody(), getRng$1(), real);
  22475. };
  22476. var getEnd$1 = function (real) {
  22477. return getEnd(editor.getBody(), getRng$1(), real);
  22478. };
  22479. var getBookmark = function (type, normalized) {
  22480. return bookmarkManager.getBookmark(type, normalized);
  22481. };
  22482. var moveToBookmark = function (bookmark) {
  22483. return bookmarkManager.moveToBookmark(bookmark);
  22484. };
  22485. var select$1 = function (node, content) {
  22486. select(dom, node, content).each(setRng);
  22487. return node;
  22488. };
  22489. var isCollapsed = function () {
  22490. var rng = getRng$1(), sel = getSel();
  22491. if (!rng || rng.item) {
  22492. return false;
  22493. }
  22494. if (rng.compareEndPoints) {
  22495. return rng.compareEndPoints('StartToEnd', rng) === 0;
  22496. }
  22497. return !sel || rng.collapsed;
  22498. };
  22499. var collapse = function (toStart) {
  22500. var rng = getRng$1();
  22501. rng.collapse(!!toStart);
  22502. setRng(rng);
  22503. };
  22504. var getSel = function () {
  22505. return win.getSelection ? win.getSelection() : win.document.selection;
  22506. };
  22507. var getRng$1 = function () {
  22508. var selection, rng, elm;
  22509. var tryCompareBoundaryPoints = function (how, sourceRange, destinationRange) {
  22510. try {
  22511. return sourceRange.compareBoundaryPoints(how, destinationRange);
  22512. } catch (ex) {
  22513. return -1;
  22514. }
  22515. };
  22516. var doc = win.document;
  22517. if (editor.bookmark !== undefined && hasFocus(editor) === false) {
  22518. var bookmark = getRng(editor);
  22519. if (bookmark.isSome()) {
  22520. return bookmark.map(function (r) {
  22521. return processRanges(editor, [r])[0];
  22522. }).getOr(doc.createRange());
  22523. }
  22524. }
  22525. try {
  22526. if ((selection = getSel()) && !isRestrictedNode(selection.anchorNode)) {
  22527. if (selection.rangeCount > 0) {
  22528. rng = selection.getRangeAt(0);
  22529. } else {
  22530. rng = selection.createRange ? selection.createRange() : doc.createRange();
  22531. }
  22532. rng = processRanges(editor, [rng])[0];
  22533. }
  22534. } catch (ex) {
  22535. }
  22536. if (!rng) {
  22537. rng = doc.createRange ? doc.createRange() : doc.body.createTextRange();
  22538. }
  22539. if (rng.setStart && rng.startContainer.nodeType === 9 && rng.collapsed) {
  22540. elm = dom.getRoot();
  22541. rng.setStart(elm, 0);
  22542. rng.setEnd(elm, 0);
  22543. }
  22544. if (selectedRange && explicitRange) {
  22545. if (tryCompareBoundaryPoints(rng.START_TO_START, rng, selectedRange) === 0 && tryCompareBoundaryPoints(rng.END_TO_END, rng, selectedRange) === 0) {
  22546. rng = explicitRange;
  22547. } else {
  22548. selectedRange = null;
  22549. explicitRange = null;
  22550. }
  22551. }
  22552. return rng;
  22553. };
  22554. var setRng = function (rng, forward) {
  22555. var node;
  22556. if (!isValidRange(rng)) {
  22557. return;
  22558. }
  22559. var ieRange = isNativeIeSelection(rng) ? rng : null;
  22560. if (ieRange) {
  22561. explicitRange = null;
  22562. try {
  22563. ieRange.select();
  22564. } catch (ex) {
  22565. }
  22566. return;
  22567. }
  22568. var sel = getSel();
  22569. var evt = editor.fire('SetSelectionRange', {
  22570. range: rng,
  22571. forward: forward
  22572. });
  22573. rng = evt.range;
  22574. if (sel) {
  22575. explicitRange = rng;
  22576. try {
  22577. sel.removeAllRanges();
  22578. sel.addRange(rng);
  22579. } catch (ex) {
  22580. }
  22581. if (forward === false && sel.extend) {
  22582. sel.collapse(rng.endContainer, rng.endOffset);
  22583. sel.extend(rng.startContainer, rng.startOffset);
  22584. }
  22585. selectedRange = sel.rangeCount > 0 ? sel.getRangeAt(0) : null;
  22586. }
  22587. if (!rng.collapsed && rng.startContainer === rng.endContainer && sel.setBaseAndExtent && !Env.ie) {
  22588. if (rng.endOffset - rng.startOffset < 2) {
  22589. if (rng.startContainer.hasChildNodes()) {
  22590. node = rng.startContainer.childNodes[rng.startOffset];
  22591. if (node && node.tagName === 'IMG') {
  22592. sel.setBaseAndExtent(rng.startContainer, rng.startOffset, rng.endContainer, rng.endOffset);
  22593. if (sel.anchorNode !== rng.startContainer || sel.focusNode !== rng.endContainer) {
  22594. sel.setBaseAndExtent(node, 0, node, 1);
  22595. }
  22596. }
  22597. }
  22598. }
  22599. }
  22600. editor.fire('AfterSetSelectionRange', {
  22601. range: rng,
  22602. forward: forward
  22603. });
  22604. };
  22605. var setNode = function (elm) {
  22606. setContent(dom.getOuterHTML(elm));
  22607. return elm;
  22608. };
  22609. var getNode$1 = function () {
  22610. return getNode(editor.getBody(), getRng$1());
  22611. };
  22612. var getSelectedBlocks$1 = function (startElm, endElm) {
  22613. return getSelectedBlocks(dom, getRng$1(), startElm, endElm);
  22614. };
  22615. var isForward = function () {
  22616. var sel = getSel();
  22617. var anchorNode = sel === null || sel === void 0 ? void 0 : sel.anchorNode;
  22618. var focusNode = sel === null || sel === void 0 ? void 0 : sel.focusNode;
  22619. if (!sel || !anchorNode || !focusNode || isRestrictedNode(anchorNode) || isRestrictedNode(focusNode)) {
  22620. return true;
  22621. }
  22622. var anchorRange = dom.createRng();
  22623. anchorRange.setStart(anchorNode, sel.anchorOffset);
  22624. anchorRange.collapse(true);
  22625. var focusRange = dom.createRng();
  22626. focusRange.setStart(focusNode, sel.focusOffset);
  22627. focusRange.collapse(true);
  22628. return anchorRange.compareBoundaryPoints(anchorRange.START_TO_START, focusRange) <= 0;
  22629. };
  22630. var normalize = function () {
  22631. var rng = getRng$1();
  22632. var sel = getSel();
  22633. if (!hasMultipleRanges(sel) && hasAnyRanges(editor)) {
  22634. var normRng = normalize$2(dom, rng);
  22635. normRng.each(function (normRng) {
  22636. setRng(normRng, isForward());
  22637. });
  22638. return normRng.getOr(rng);
  22639. }
  22640. return rng;
  22641. };
  22642. var selectorChanged = function (selector, callback) {
  22643. selectorChangedWithUnbind(selector, callback);
  22644. return exports;
  22645. };
  22646. var getScrollContainer = function () {
  22647. var scrollContainer;
  22648. var node = dom.getRoot();
  22649. while (node && node.nodeName !== 'BODY') {
  22650. if (node.scrollHeight > node.clientHeight) {
  22651. scrollContainer = node;
  22652. break;
  22653. }
  22654. node = node.parentNode;
  22655. }
  22656. return scrollContainer;
  22657. };
  22658. var scrollIntoView = function (elm, alignToTop) {
  22659. if (isNonNullable(elm)) {
  22660. scrollElementIntoView(editor, elm, alignToTop);
  22661. } else {
  22662. scrollRangeIntoView(editor, getRng$1(), alignToTop);
  22663. }
  22664. };
  22665. var placeCaretAt = function (clientX, clientY) {
  22666. return setRng(fromPoint(clientX, clientY, editor.getDoc()));
  22667. };
  22668. var getBoundingClientRect = function () {
  22669. var rng = getRng$1();
  22670. return rng.collapsed ? CaretPosition.fromRangeStart(rng).getClientRects()[0] : rng.getBoundingClientRect();
  22671. };
  22672. var destroy = function () {
  22673. win = selectedRange = explicitRange = null;
  22674. controlSelection.destroy();
  22675. };
  22676. var exports = {
  22677. bookmarkManager: null,
  22678. controlSelection: null,
  22679. dom: dom,
  22680. win: win,
  22681. serializer: serializer,
  22682. editor: editor,
  22683. collapse: collapse,
  22684. setCursorLocation: setCursorLocation,
  22685. getContent: getContent,
  22686. setContent: setContent,
  22687. getBookmark: getBookmark,
  22688. moveToBookmark: moveToBookmark,
  22689. select: select$1,
  22690. isCollapsed: isCollapsed,
  22691. isForward: isForward,
  22692. setNode: setNode,
  22693. getNode: getNode$1,
  22694. getSel: getSel,
  22695. setRng: setRng,
  22696. getRng: getRng$1,
  22697. getStart: getStart$1,
  22698. getEnd: getEnd$1,
  22699. getSelectedBlocks: getSelectedBlocks$1,
  22700. normalize: normalize,
  22701. selectorChanged: selectorChanged,
  22702. selectorChangedWithUnbind: selectorChangedWithUnbind,
  22703. getScrollContainer: getScrollContainer,
  22704. scrollIntoView: scrollIntoView,
  22705. placeCaretAt: placeCaretAt,
  22706. getBoundingClientRect: getBoundingClientRect,
  22707. destroy: destroy
  22708. };
  22709. var bookmarkManager = BookmarkManager(exports);
  22710. var controlSelection = ControlSelection(exports, editor);
  22711. exports.bookmarkManager = bookmarkManager;
  22712. exports.controlSelection = controlSelection;
  22713. return exports;
  22714. };
  22715. var removeAttrs = function (node, names) {
  22716. each$k(names, function (name) {
  22717. node.attr(name, null);
  22718. });
  22719. };
  22720. var addFontToSpansFilter = function (domParser, styles, fontSizes) {
  22721. domParser.addNodeFilter('font', function (nodes) {
  22722. each$k(nodes, function (node) {
  22723. var props = styles.parse(node.attr('style'));
  22724. var color = node.attr('color');
  22725. var face = node.attr('face');
  22726. var size = node.attr('size');
  22727. if (color) {
  22728. props.color = color;
  22729. }
  22730. if (face) {
  22731. props['font-family'] = face;
  22732. }
  22733. if (size) {
  22734. props['font-size'] = fontSizes[parseInt(node.attr('size'), 10) - 1];
  22735. }
  22736. node.name = 'span';
  22737. node.attr('style', styles.serialize(props));
  22738. removeAttrs(node, [
  22739. 'color',
  22740. 'face',
  22741. 'size'
  22742. ]);
  22743. });
  22744. });
  22745. };
  22746. var addStrikeToSpanFilter = function (domParser, styles) {
  22747. domParser.addNodeFilter('strike', function (nodes) {
  22748. each$k(nodes, function (node) {
  22749. var props = styles.parse(node.attr('style'));
  22750. props['text-decoration'] = 'line-through';
  22751. node.name = 'span';
  22752. node.attr('style', styles.serialize(props));
  22753. });
  22754. });
  22755. };
  22756. var addFilters = function (domParser, settings) {
  22757. var styles = Styles();
  22758. if (settings.convert_fonts_to_spans) {
  22759. addFontToSpansFilter(domParser, styles, Tools.explode(settings.font_size_legacy_values));
  22760. }
  22761. addStrikeToSpanFilter(domParser, styles);
  22762. };
  22763. var register$2 = function (domParser, settings) {
  22764. if (settings.inline_styles) {
  22765. addFilters(domParser, settings);
  22766. }
  22767. };
  22768. var blobUriToBlob = function (url) {
  22769. return new promiseObj(function (resolve, reject) {
  22770. var rejectWithError = function () {
  22771. reject('Cannot convert ' + url + ' to Blob. Resource might not exist or is inaccessible.');
  22772. };
  22773. try {
  22774. var xhr_1 = new XMLHttpRequest();
  22775. xhr_1.open('GET', url, true);
  22776. xhr_1.responseType = 'blob';
  22777. xhr_1.onload = function () {
  22778. if (xhr_1.status === 200) {
  22779. resolve(xhr_1.response);
  22780. } else {
  22781. rejectWithError();
  22782. }
  22783. };
  22784. xhr_1.onerror = rejectWithError;
  22785. xhr_1.send();
  22786. } catch (ex) {
  22787. rejectWithError();
  22788. }
  22789. });
  22790. };
  22791. var parseDataUri = function (uri) {
  22792. var type;
  22793. var uriParts = decodeURIComponent(uri).split(',');
  22794. var matches = /data:([^;]+)/.exec(uriParts[0]);
  22795. if (matches) {
  22796. type = matches[1];
  22797. }
  22798. return {
  22799. type: type,
  22800. data: uriParts[1]
  22801. };
  22802. };
  22803. var buildBlob = function (type, data) {
  22804. var str;
  22805. try {
  22806. str = atob(data);
  22807. } catch (e) {
  22808. return Optional.none();
  22809. }
  22810. var arr = new Uint8Array(str.length);
  22811. for (var i = 0; i < arr.length; i++) {
  22812. arr[i] = str.charCodeAt(i);
  22813. }
  22814. return Optional.some(new Blob([arr], { type: type }));
  22815. };
  22816. var dataUriToBlob = function (uri) {
  22817. return new promiseObj(function (resolve) {
  22818. var _a = parseDataUri(uri), type = _a.type, data = _a.data;
  22819. buildBlob(type, data).fold(function () {
  22820. return resolve(new Blob([]));
  22821. }, resolve);
  22822. });
  22823. };
  22824. var uriToBlob = function (url) {
  22825. if (url.indexOf('blob:') === 0) {
  22826. return blobUriToBlob(url);
  22827. }
  22828. if (url.indexOf('data:') === 0) {
  22829. return dataUriToBlob(url);
  22830. }
  22831. return null;
  22832. };
  22833. var blobToDataUri = function (blob) {
  22834. return new promiseObj(function (resolve) {
  22835. var reader = new FileReader();
  22836. reader.onloadend = function () {
  22837. resolve(reader.result);
  22838. };
  22839. reader.readAsDataURL(blob);
  22840. });
  22841. };
  22842. var count$1 = 0;
  22843. var uniqueId = function (prefix) {
  22844. return (prefix || 'blobid') + count$1++;
  22845. };
  22846. var imageToBlobInfo = function (blobCache, img, resolve, reject) {
  22847. var base64, blobInfo;
  22848. if (img.src.indexOf('blob:') === 0) {
  22849. blobInfo = blobCache.getByUri(img.src);
  22850. if (blobInfo) {
  22851. resolve({
  22852. image: img,
  22853. blobInfo: blobInfo
  22854. });
  22855. } else {
  22856. uriToBlob(img.src).then(function (blob) {
  22857. blobToDataUri(blob).then(function (dataUri) {
  22858. base64 = parseDataUri(dataUri).data;
  22859. blobInfo = blobCache.create(uniqueId(), blob, base64);
  22860. blobCache.add(blobInfo);
  22861. resolve({
  22862. image: img,
  22863. blobInfo: blobInfo
  22864. });
  22865. });
  22866. }, function (err) {
  22867. reject(err);
  22868. });
  22869. }
  22870. return;
  22871. }
  22872. var _a = parseDataUri(img.src), data = _a.data, type = _a.type;
  22873. base64 = data;
  22874. blobInfo = blobCache.getByData(base64, type);
  22875. if (blobInfo) {
  22876. resolve({
  22877. image: img,
  22878. blobInfo: blobInfo
  22879. });
  22880. } else {
  22881. uriToBlob(img.src).then(function (blob) {
  22882. blobInfo = blobCache.create(uniqueId(), blob, base64);
  22883. blobCache.add(blobInfo);
  22884. resolve({
  22885. image: img,
  22886. blobInfo: blobInfo
  22887. });
  22888. }, function (err) {
  22889. reject(err);
  22890. });
  22891. }
  22892. };
  22893. var getAllImages = function (elm) {
  22894. return elm ? from(elm.getElementsByTagName('img')) : [];
  22895. };
  22896. var ImageScanner = function (uploadStatus, blobCache) {
  22897. var cachedPromises = {};
  22898. var findAll = function (elm, predicate) {
  22899. if (!predicate) {
  22900. predicate = always;
  22901. }
  22902. var images = filter$4(getAllImages(elm), function (img) {
  22903. var src = img.src;
  22904. if (!Env.fileApi) {
  22905. return false;
  22906. }
  22907. if (img.hasAttribute('data-mce-bogus')) {
  22908. return false;
  22909. }
  22910. if (img.hasAttribute('data-mce-placeholder')) {
  22911. return false;
  22912. }
  22913. if (!src || src === Env.transparentSrc) {
  22914. return false;
  22915. }
  22916. if (src.indexOf('blob:') === 0) {
  22917. return !uploadStatus.isUploaded(src) && predicate(img);
  22918. }
  22919. if (src.indexOf('data:') === 0) {
  22920. return predicate(img);
  22921. }
  22922. return false;
  22923. });
  22924. var promises = map$3(images, function (img) {
  22925. if (cachedPromises[img.src] !== undefined) {
  22926. return new promiseObj(function (resolve) {
  22927. cachedPromises[img.src].then(function (imageInfo) {
  22928. if (typeof imageInfo === 'string') {
  22929. return imageInfo;
  22930. }
  22931. resolve({
  22932. image: img,
  22933. blobInfo: imageInfo.blobInfo
  22934. });
  22935. });
  22936. });
  22937. }
  22938. var newPromise = new promiseObj(function (resolve, reject) {
  22939. imageToBlobInfo(blobCache, img, resolve, reject);
  22940. }).then(function (result) {
  22941. delete cachedPromises[result.image.src];
  22942. return result;
  22943. }).catch(function (error) {
  22944. delete cachedPromises[img.src];
  22945. return error;
  22946. });
  22947. cachedPromises[img.src] = newPromise;
  22948. return newPromise;
  22949. });
  22950. return promiseObj.all(promises);
  22951. };
  22952. return { findAll: findAll };
  22953. };
  22954. var paddEmptyNode = function (settings, args, blockElements, node) {
  22955. var brPreferred = settings.padd_empty_with_br || args.insert;
  22956. if (brPreferred && blockElements[node.name]) {
  22957. node.empty().append(new AstNode('br', 1)).shortEnded = true;
  22958. } else {
  22959. node.empty().append(new AstNode('#text', 3)).value = nbsp;
  22960. }
  22961. };
  22962. var isPaddedWithNbsp = function (node) {
  22963. return hasOnlyChild(node, '#text') && node.firstChild.value === nbsp;
  22964. };
  22965. var hasOnlyChild = function (node, name) {
  22966. return node && node.firstChild && node.firstChild === node.lastChild && node.firstChild.name === name;
  22967. };
  22968. var isPadded = function (schema, node) {
  22969. var rule = schema.getElementRule(node.name);
  22970. return rule && rule.paddEmpty;
  22971. };
  22972. var isEmpty = function (schema, nonEmptyElements, whitespaceElements, node) {
  22973. return node.isEmpty(nonEmptyElements, whitespaceElements, function (node) {
  22974. return isPadded(schema, node);
  22975. });
  22976. };
  22977. var isLineBreakNode = function (node, blockElements) {
  22978. return node && (has$2(blockElements, node.name) || node.name === 'br');
  22979. };
  22980. var isBogusImage = function (img) {
  22981. return isNonNullable(img.attr('data-mce-bogus'));
  22982. };
  22983. var isInternalImageSource = function (img) {
  22984. return img.attr('src') === Env.transparentSrc || isNonNullable(img.attr('data-mce-placeholder'));
  22985. };
  22986. var isValidDataImg = function (img, settings) {
  22987. if (settings.images_dataimg_filter) {
  22988. var imgElem_1 = new Image();
  22989. imgElem_1.src = img.attr('src');
  22990. each$j(img.attributes.map, function (value, key) {
  22991. imgElem_1.setAttribute(key, value);
  22992. });
  22993. return settings.images_dataimg_filter(imgElem_1);
  22994. } else {
  22995. return true;
  22996. }
  22997. };
  22998. var registerBase64ImageFilter = function (parser, settings) {
  22999. var blobCache = settings.blob_cache;
  23000. var processImage = function (img) {
  23001. var inputSrc = img.attr('src');
  23002. if (isInternalImageSource(img) || isBogusImage(img)) {
  23003. return;
  23004. }
  23005. parseDataUri$1(inputSrc).filter(function () {
  23006. return isValidDataImg(img, settings);
  23007. }).bind(function (_a) {
  23008. var type = _a.type, data = _a.data;
  23009. return Optional.from(blobCache.getByData(data, type)).orThunk(function () {
  23010. return buildBlob(type, data).map(function (blob) {
  23011. var blobInfo = blobCache.create(uniqueId(), blob, data);
  23012. blobCache.add(blobInfo);
  23013. return blobInfo;
  23014. });
  23015. });
  23016. }).each(function (blobInfo) {
  23017. img.attr('src', blobInfo.blobUri());
  23018. });
  23019. };
  23020. if (blobCache) {
  23021. parser.addAttributeFilter('src', function (nodes) {
  23022. return each$k(nodes, processImage);
  23023. });
  23024. }
  23025. };
  23026. var register$1 = function (parser, settings) {
  23027. var schema = parser.schema;
  23028. if (settings.remove_trailing_brs) {
  23029. parser.addNodeFilter('br', function (nodes, _, args) {
  23030. var i;
  23031. var l = nodes.length;
  23032. var node;
  23033. var blockElements = Tools.extend({}, schema.getBlockElements());
  23034. var nonEmptyElements = schema.getNonEmptyElements();
  23035. var parent, lastParent, prev, prevName;
  23036. var whiteSpaceElements = schema.getWhiteSpaceElements();
  23037. var elementRule, textNode;
  23038. blockElements.body = 1;
  23039. for (i = 0; i < l; i++) {
  23040. node = nodes[i];
  23041. parent = node.parent;
  23042. if (blockElements[node.parent.name] && node === parent.lastChild) {
  23043. prev = node.prev;
  23044. while (prev) {
  23045. prevName = prev.name;
  23046. if (prevName !== 'span' || prev.attr('data-mce-type') !== 'bookmark') {
  23047. if (prevName === 'br') {
  23048. node = null;
  23049. }
  23050. break;
  23051. }
  23052. prev = prev.prev;
  23053. }
  23054. if (node) {
  23055. node.remove();
  23056. if (isEmpty(schema, nonEmptyElements, whiteSpaceElements, parent)) {
  23057. elementRule = schema.getElementRule(parent.name);
  23058. if (elementRule) {
  23059. if (elementRule.removeEmpty) {
  23060. parent.remove();
  23061. } else if (elementRule.paddEmpty) {
  23062. paddEmptyNode(settings, args, blockElements, parent);
  23063. }
  23064. }
  23065. }
  23066. }
  23067. } else {
  23068. lastParent = node;
  23069. while (parent && parent.firstChild === lastParent && parent.lastChild === lastParent) {
  23070. lastParent = parent;
  23071. if (blockElements[parent.name]) {
  23072. break;
  23073. }
  23074. parent = parent.parent;
  23075. }
  23076. if (lastParent === parent && settings.padd_empty_with_br !== true) {
  23077. textNode = new AstNode('#text', 3);
  23078. textNode.value = nbsp;
  23079. node.replace(textNode);
  23080. }
  23081. }
  23082. }
  23083. });
  23084. }
  23085. parser.addAttributeFilter('href', function (nodes) {
  23086. var i = nodes.length;
  23087. var appendRel = function (rel) {
  23088. var parts = rel.split(' ').filter(function (p) {
  23089. return p.length > 0;
  23090. });
  23091. return parts.concat(['noopener']).sort().join(' ');
  23092. };
  23093. var addNoOpener = function (rel) {
  23094. var newRel = rel ? Tools.trim(rel) : '';
  23095. if (!/\b(noopener)\b/g.test(newRel)) {
  23096. return appendRel(newRel);
  23097. } else {
  23098. return newRel;
  23099. }
  23100. };
  23101. if (!settings.allow_unsafe_link_target) {
  23102. while (i--) {
  23103. var node = nodes[i];
  23104. if (node.name === 'a' && node.attr('target') === '_blank') {
  23105. node.attr('rel', addNoOpener(node.attr('rel')));
  23106. }
  23107. }
  23108. }
  23109. });
  23110. if (!settings.allow_html_in_named_anchor) {
  23111. parser.addAttributeFilter('id,name', function (nodes) {
  23112. var i = nodes.length, sibling, prevSibling, parent, node;
  23113. while (i--) {
  23114. node = nodes[i];
  23115. if (node.name === 'a' && node.firstChild && !node.attr('href')) {
  23116. parent = node.parent;
  23117. sibling = node.lastChild;
  23118. do {
  23119. prevSibling = sibling.prev;
  23120. parent.insert(sibling, node);
  23121. sibling = prevSibling;
  23122. } while (sibling);
  23123. }
  23124. }
  23125. });
  23126. }
  23127. if (settings.fix_list_elements) {
  23128. parser.addNodeFilter('ul,ol', function (nodes) {
  23129. var i = nodes.length, node, parentNode;
  23130. while (i--) {
  23131. node = nodes[i];
  23132. parentNode = node.parent;
  23133. if (parentNode.name === 'ul' || parentNode.name === 'ol') {
  23134. if (node.prev && node.prev.name === 'li') {
  23135. node.prev.append(node);
  23136. } else {
  23137. var li = new AstNode('li', 1);
  23138. li.attr('style', 'list-style-type: none');
  23139. node.wrap(li);
  23140. }
  23141. }
  23142. }
  23143. });
  23144. }
  23145. if (settings.validate && schema.getValidClasses()) {
  23146. parser.addAttributeFilter('class', function (nodes) {
  23147. var validClasses = schema.getValidClasses();
  23148. var i = nodes.length;
  23149. while (i--) {
  23150. var node = nodes[i];
  23151. var classList = node.attr('class').split(' ');
  23152. var classValue = '';
  23153. for (var ci = 0; ci < classList.length; ci++) {
  23154. var className = classList[ci];
  23155. var valid = false;
  23156. var validClassesMap = validClasses['*'];
  23157. if (validClassesMap && validClassesMap[className]) {
  23158. valid = true;
  23159. }
  23160. validClassesMap = validClasses[node.name];
  23161. if (!valid && validClassesMap && validClassesMap[className]) {
  23162. valid = true;
  23163. }
  23164. if (valid) {
  23165. if (classValue) {
  23166. classValue += ' ';
  23167. }
  23168. classValue += className;
  23169. }
  23170. }
  23171. if (!classValue.length) {
  23172. classValue = null;
  23173. }
  23174. node.attr('class', classValue);
  23175. }
  23176. });
  23177. }
  23178. registerBase64ImageFilter(parser, settings);
  23179. };
  23180. var makeMap = Tools.makeMap, each$6 = Tools.each, explode$2 = Tools.explode, extend$4 = Tools.extend;
  23181. var DomParser = function (settings, schema) {
  23182. if (schema === void 0) {
  23183. schema = Schema();
  23184. }
  23185. var nodeFilters = {};
  23186. var attributeFilters = [];
  23187. var matchedNodes = {};
  23188. var matchedAttributes = {};
  23189. settings = settings || {};
  23190. settings.validate = 'validate' in settings ? settings.validate : true;
  23191. settings.root_name = settings.root_name || 'body';
  23192. var fixInvalidChildren = function (nodes) {
  23193. var nonSplitableElements = makeMap('tr,td,th,tbody,thead,tfoot,table');
  23194. var nonEmptyElements = schema.getNonEmptyElements();
  23195. var whitespaceElements = schema.getWhiteSpaceElements();
  23196. var textBlockElements = schema.getTextBlockElements();
  23197. var specialElements = schema.getSpecialElements();
  23198. var removeOrUnwrapInvalidNode = function (node, originalNodeParent) {
  23199. if (originalNodeParent === void 0) {
  23200. originalNodeParent = node.parent;
  23201. }
  23202. if (specialElements[node.name]) {
  23203. node.empty().remove();
  23204. } else {
  23205. var children = node.children();
  23206. for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {
  23207. var childNode = children_1[_i];
  23208. if (!schema.isValidChild(originalNodeParent.name, childNode.name)) {
  23209. removeOrUnwrapInvalidNode(childNode, originalNodeParent);
  23210. }
  23211. }
  23212. node.unwrap();
  23213. }
  23214. };
  23215. for (var ni = 0; ni < nodes.length; ni++) {
  23216. var node = nodes[ni];
  23217. var parent_1 = void 0, newParent = void 0, tempNode = void 0;
  23218. if (!node.parent || node.fixed) {
  23219. continue;
  23220. }
  23221. if (textBlockElements[node.name] && node.parent.name === 'li') {
  23222. var sibling = node.next;
  23223. while (sibling) {
  23224. if (textBlockElements[sibling.name]) {
  23225. sibling.name = 'li';
  23226. sibling.fixed = true;
  23227. node.parent.insert(sibling, node.parent);
  23228. } else {
  23229. break;
  23230. }
  23231. sibling = sibling.next;
  23232. }
  23233. node.unwrap();
  23234. continue;
  23235. }
  23236. var parents = [node];
  23237. for (parent_1 = node.parent; parent_1 && !schema.isValidChild(parent_1.name, node.name) && !nonSplitableElements[parent_1.name]; parent_1 = parent_1.parent) {
  23238. parents.push(parent_1);
  23239. }
  23240. if (parent_1 && parents.length > 1) {
  23241. if (schema.isValidChild(parent_1.name, node.name)) {
  23242. parents.reverse();
  23243. newParent = filterNode(parents[0].clone());
  23244. var currentNode = newParent;
  23245. for (var i = 0; i < parents.length - 1; i++) {
  23246. if (schema.isValidChild(currentNode.name, parents[i].name)) {
  23247. tempNode = filterNode(parents[i].clone());
  23248. currentNode.append(tempNode);
  23249. } else {
  23250. tempNode = currentNode;
  23251. }
  23252. for (var childNode = parents[i].firstChild; childNode && childNode !== parents[i + 1];) {
  23253. var nextNode = childNode.next;
  23254. tempNode.append(childNode);
  23255. childNode = nextNode;
  23256. }
  23257. currentNode = tempNode;
  23258. }
  23259. if (!isEmpty(schema, nonEmptyElements, whitespaceElements, newParent)) {
  23260. parent_1.insert(newParent, parents[0], true);
  23261. parent_1.insert(node, newParent);
  23262. } else {
  23263. parent_1.insert(node, parents[0], true);
  23264. }
  23265. parent_1 = parents[0];
  23266. if (isEmpty(schema, nonEmptyElements, whitespaceElements, parent_1) || hasOnlyChild(parent_1, 'br')) {
  23267. parent_1.empty().remove();
  23268. }
  23269. } else {
  23270. removeOrUnwrapInvalidNode(node);
  23271. }
  23272. } else if (node.parent) {
  23273. if (node.name === 'li') {
  23274. var sibling = node.prev;
  23275. if (sibling && (sibling.name === 'ul' || sibling.name === 'ol')) {
  23276. sibling.append(node);
  23277. continue;
  23278. }
  23279. sibling = node.next;
  23280. if (sibling && (sibling.name === 'ul' || sibling.name === 'ol')) {
  23281. sibling.insert(node, sibling.firstChild, true);
  23282. continue;
  23283. }
  23284. node.wrap(filterNode(new AstNode('ul', 1)));
  23285. continue;
  23286. }
  23287. if (schema.isValidChild(node.parent.name, 'div') && schema.isValidChild('div', node.name)) {
  23288. node.wrap(filterNode(new AstNode('div', 1)));
  23289. } else {
  23290. removeOrUnwrapInvalidNode(node);
  23291. }
  23292. }
  23293. }
  23294. };
  23295. var filterNode = function (node) {
  23296. var name = node.name;
  23297. if (name in nodeFilters) {
  23298. var list = matchedNodes[name];
  23299. if (list) {
  23300. list.push(node);
  23301. } else {
  23302. matchedNodes[name] = [node];
  23303. }
  23304. }
  23305. var i = attributeFilters.length;
  23306. while (i--) {
  23307. var attrName = attributeFilters[i].name;
  23308. if (attrName in node.attributes.map) {
  23309. var list = matchedAttributes[attrName];
  23310. if (list) {
  23311. list.push(node);
  23312. } else {
  23313. matchedAttributes[attrName] = [node];
  23314. }
  23315. }
  23316. }
  23317. return node;
  23318. };
  23319. var addNodeFilter = function (name, callback) {
  23320. each$6(explode$2(name), function (name) {
  23321. var list = nodeFilters[name];
  23322. if (!list) {
  23323. nodeFilters[name] = list = [];
  23324. }
  23325. list.push(callback);
  23326. });
  23327. };
  23328. var getNodeFilters = function () {
  23329. var out = [];
  23330. for (var name_1 in nodeFilters) {
  23331. if (has$2(nodeFilters, name_1)) {
  23332. out.push({
  23333. name: name_1,
  23334. callbacks: nodeFilters[name_1]
  23335. });
  23336. }
  23337. }
  23338. return out;
  23339. };
  23340. var addAttributeFilter = function (name, callback) {
  23341. each$6(explode$2(name), function (name) {
  23342. var i;
  23343. for (i = 0; i < attributeFilters.length; i++) {
  23344. if (attributeFilters[i].name === name) {
  23345. attributeFilters[i].callbacks.push(callback);
  23346. return;
  23347. }
  23348. }
  23349. attributeFilters.push({
  23350. name: name,
  23351. callbacks: [callback]
  23352. });
  23353. });
  23354. };
  23355. var getAttributeFilters = function () {
  23356. return [].concat(attributeFilters);
  23357. };
  23358. var parse = function (html, args) {
  23359. var nodes, i, l, fi, fl, list, name;
  23360. var invalidChildren = [];
  23361. var node;
  23362. var getRootBlockName = function (name) {
  23363. if (name === false) {
  23364. return '';
  23365. } else if (name === true) {
  23366. return 'p';
  23367. } else {
  23368. return name;
  23369. }
  23370. };
  23371. args = args || {};
  23372. matchedNodes = {};
  23373. matchedAttributes = {};
  23374. var blockElements = extend$4(makeMap('script,style,head,html,body,title,meta,param'), schema.getBlockElements());
  23375. var nonEmptyElements = schema.getNonEmptyElements();
  23376. var children = schema.children;
  23377. var validate = settings.validate;
  23378. var forcedRootBlockName = 'forced_root_block' in args ? args.forced_root_block : settings.forced_root_block;
  23379. var rootBlockName = getRootBlockName(forcedRootBlockName);
  23380. var whiteSpaceElements = schema.getWhiteSpaceElements();
  23381. var startWhiteSpaceRegExp = /^[ \t\r\n]+/;
  23382. var endWhiteSpaceRegExp = /[ \t\r\n]+$/;
  23383. var allWhiteSpaceRegExp = /[ \t\r\n]+/g;
  23384. var isAllWhiteSpaceRegExp = /^[ \t\r\n]+$/;
  23385. var isInWhiteSpacePreservedElement = has$2(whiteSpaceElements, args.context) || has$2(whiteSpaceElements, settings.root_name);
  23386. var addRootBlocks = function () {
  23387. var node = rootNode.firstChild, rootBlockNode = null;
  23388. var trim = function (rootBlock) {
  23389. if (rootBlock) {
  23390. node = rootBlock.firstChild;
  23391. if (node && node.type === 3) {
  23392. node.value = node.value.replace(startWhiteSpaceRegExp, '');
  23393. }
  23394. node = rootBlock.lastChild;
  23395. if (node && node.type === 3) {
  23396. node.value = node.value.replace(endWhiteSpaceRegExp, '');
  23397. }
  23398. }
  23399. };
  23400. if (!schema.isValidChild(rootNode.name, rootBlockName.toLowerCase())) {
  23401. return;
  23402. }
  23403. while (node) {
  23404. var next = node.next;
  23405. if (node.type === 3 || node.type === 1 && node.name !== 'p' && !blockElements[node.name] && !node.attr('data-mce-type')) {
  23406. if (!rootBlockNode) {
  23407. rootBlockNode = createNode(rootBlockName, 1);
  23408. rootBlockNode.attr(settings.forced_root_block_attrs);
  23409. rootNode.insert(rootBlockNode, node);
  23410. rootBlockNode.append(node);
  23411. } else {
  23412. rootBlockNode.append(node);
  23413. }
  23414. } else {
  23415. trim(rootBlockNode);
  23416. rootBlockNode = null;
  23417. }
  23418. node = next;
  23419. }
  23420. trim(rootBlockNode);
  23421. };
  23422. var createNode = function (name, type) {
  23423. var node = new AstNode(name, type);
  23424. var list;
  23425. if (name in nodeFilters) {
  23426. list = matchedNodes[name];
  23427. if (list) {
  23428. list.push(node);
  23429. } else {
  23430. matchedNodes[name] = [node];
  23431. }
  23432. }
  23433. return node;
  23434. };
  23435. var removeWhitespaceBefore = function (node) {
  23436. var blockElements = schema.getBlockElements();
  23437. for (var textNode = node.prev; textNode && textNode.type === 3;) {
  23438. var textVal = textNode.value.replace(endWhiteSpaceRegExp, '');
  23439. if (textVal.length > 0) {
  23440. textNode.value = textVal;
  23441. return;
  23442. }
  23443. var textNodeNext = textNode.next;
  23444. if (textNodeNext) {
  23445. if (textNodeNext.type === 3 && textNodeNext.value.length) {
  23446. textNode = textNode.prev;
  23447. continue;
  23448. }
  23449. if (!blockElements[textNodeNext.name] && textNodeNext.name !== 'script' && textNodeNext.name !== 'style') {
  23450. textNode = textNode.prev;
  23451. continue;
  23452. }
  23453. }
  23454. var sibling = textNode.prev;
  23455. textNode.remove();
  23456. textNode = sibling;
  23457. }
  23458. };
  23459. var cloneAndExcludeBlocks = function (input) {
  23460. var output = {};
  23461. for (var name_2 in input) {
  23462. if (name_2 !== 'li' && name_2 !== 'p') {
  23463. output[name_2] = input[name_2];
  23464. }
  23465. }
  23466. return output;
  23467. };
  23468. var parser = SaxParser({
  23469. validate: validate,
  23470. document: settings.document,
  23471. allow_html_data_urls: settings.allow_html_data_urls,
  23472. allow_svg_data_urls: settings.allow_svg_data_urls,
  23473. allow_script_urls: settings.allow_script_urls,
  23474. allow_conditional_comments: settings.allow_conditional_comments,
  23475. preserve_cdata: settings.preserve_cdata,
  23476. self_closing_elements: cloneAndExcludeBlocks(schema.getSelfClosingElements()),
  23477. cdata: function (text) {
  23478. node.append(createNode('#cdata', 4)).value = text;
  23479. },
  23480. text: function (text, raw) {
  23481. var textNode;
  23482. if (!isInWhiteSpacePreservedElement) {
  23483. text = text.replace(allWhiteSpaceRegExp, ' ');
  23484. if (isLineBreakNode(node.lastChild, blockElements)) {
  23485. text = text.replace(startWhiteSpaceRegExp, '');
  23486. }
  23487. }
  23488. if (text.length !== 0) {
  23489. textNode = createNode('#text', 3);
  23490. textNode.raw = !!raw;
  23491. node.append(textNode).value = text;
  23492. }
  23493. },
  23494. comment: function (text) {
  23495. node.append(createNode('#comment', 8)).value = text;
  23496. },
  23497. pi: function (name, text) {
  23498. node.append(createNode(name, 7)).value = text;
  23499. removeWhitespaceBefore(node);
  23500. },
  23501. doctype: function (text) {
  23502. var newNode = node.append(createNode('#doctype', 10));
  23503. newNode.value = text;
  23504. removeWhitespaceBefore(node);
  23505. },
  23506. start: function (name, attrs, empty) {
  23507. var elementRule = validate ? schema.getElementRule(name) : {};
  23508. if (elementRule) {
  23509. var newNode = createNode(elementRule.outputName || name, 1);
  23510. newNode.attributes = attrs;
  23511. newNode.shortEnded = empty;
  23512. node.append(newNode);
  23513. var parent_2 = children[node.name];
  23514. if (parent_2 && children[newNode.name] && !parent_2[newNode.name]) {
  23515. invalidChildren.push(newNode);
  23516. }
  23517. var attrFiltersLen = attributeFilters.length;
  23518. while (attrFiltersLen--) {
  23519. var attrName = attributeFilters[attrFiltersLen].name;
  23520. if (attrName in attrs.map) {
  23521. list = matchedAttributes[attrName];
  23522. if (list) {
  23523. list.push(newNode);
  23524. } else {
  23525. matchedAttributes[attrName] = [newNode];
  23526. }
  23527. }
  23528. }
  23529. if (blockElements[name]) {
  23530. removeWhitespaceBefore(newNode);
  23531. }
  23532. if (!empty) {
  23533. node = newNode;
  23534. }
  23535. if (!isInWhiteSpacePreservedElement && whiteSpaceElements[name]) {
  23536. isInWhiteSpacePreservedElement = true;
  23537. }
  23538. }
  23539. },
  23540. end: function (name) {
  23541. var textNode, text, sibling, tempNode;
  23542. var elementRule = validate ? schema.getElementRule(name) : {};
  23543. if (elementRule) {
  23544. if (blockElements[name]) {
  23545. if (!isInWhiteSpacePreservedElement) {
  23546. textNode = node.firstChild;
  23547. if (textNode && textNode.type === 3) {
  23548. text = textNode.value.replace(startWhiteSpaceRegExp, '');
  23549. if (text.length > 0) {
  23550. textNode.value = text;
  23551. textNode = textNode.next;
  23552. } else {
  23553. sibling = textNode.next;
  23554. textNode.remove();
  23555. textNode = sibling;
  23556. while (textNode && textNode.type === 3) {
  23557. text = textNode.value;
  23558. sibling = textNode.next;
  23559. if (text.length === 0 || isAllWhiteSpaceRegExp.test(text)) {
  23560. textNode.remove();
  23561. textNode = sibling;
  23562. }
  23563. textNode = sibling;
  23564. }
  23565. }
  23566. }
  23567. textNode = node.lastChild;
  23568. if (textNode && textNode.type === 3) {
  23569. text = textNode.value.replace(endWhiteSpaceRegExp, '');
  23570. if (text.length > 0) {
  23571. textNode.value = text;
  23572. textNode = textNode.prev;
  23573. } else {
  23574. sibling = textNode.prev;
  23575. textNode.remove();
  23576. textNode = sibling;
  23577. while (textNode && textNode.type === 3) {
  23578. text = textNode.value;
  23579. sibling = textNode.prev;
  23580. if (text.length === 0 || isAllWhiteSpaceRegExp.test(text)) {
  23581. textNode.remove();
  23582. textNode = sibling;
  23583. }
  23584. textNode = sibling;
  23585. }
  23586. }
  23587. }
  23588. }
  23589. }
  23590. if (isInWhiteSpacePreservedElement && whiteSpaceElements[name]) {
  23591. isInWhiteSpacePreservedElement = false;
  23592. }
  23593. if (elementRule.removeEmpty && isEmpty(schema, nonEmptyElements, whiteSpaceElements, node)) {
  23594. tempNode = node.parent;
  23595. if (blockElements[node.name]) {
  23596. node.empty().remove();
  23597. } else {
  23598. node.unwrap();
  23599. }
  23600. node = tempNode;
  23601. return;
  23602. }
  23603. if (elementRule.paddEmpty && (isPaddedWithNbsp(node) || isEmpty(schema, nonEmptyElements, whiteSpaceElements, node))) {
  23604. paddEmptyNode(settings, args, blockElements, node);
  23605. }
  23606. node = node.parent;
  23607. }
  23608. }
  23609. }, schema);
  23610. var rootNode = node = new AstNode(args.context || settings.root_name, 11);
  23611. parser.parse(html, args.format);
  23612. if (validate && invalidChildren.length) {
  23613. if (!args.context) {
  23614. fixInvalidChildren(invalidChildren);
  23615. } else {
  23616. args.invalid = true;
  23617. }
  23618. }
  23619. if (rootBlockName && (rootNode.name === 'body' || args.isRootContent)) {
  23620. addRootBlocks();
  23621. }
  23622. if (!args.invalid) {
  23623. for (name in matchedNodes) {
  23624. if (!has$2(matchedNodes, name)) {
  23625. continue;
  23626. }
  23627. list = nodeFilters[name];
  23628. nodes = matchedNodes[name];
  23629. fi = nodes.length;
  23630. while (fi--) {
  23631. if (!nodes[fi].parent) {
  23632. nodes.splice(fi, 1);
  23633. }
  23634. }
  23635. for (i = 0, l = list.length; i < l; i++) {
  23636. list[i](nodes, name, args);
  23637. }
  23638. }
  23639. for (i = 0, l = attributeFilters.length; i < l; i++) {
  23640. list = attributeFilters[i];
  23641. if (list.name in matchedAttributes) {
  23642. nodes = matchedAttributes[list.name];
  23643. fi = nodes.length;
  23644. while (fi--) {
  23645. if (!nodes[fi].parent) {
  23646. nodes.splice(fi, 1);
  23647. }
  23648. }
  23649. for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) {
  23650. list.callbacks[fi](nodes, list.name, args);
  23651. }
  23652. }
  23653. }
  23654. }
  23655. return rootNode;
  23656. };
  23657. var exports = {
  23658. schema: schema,
  23659. addAttributeFilter: addAttributeFilter,
  23660. getAttributeFilters: getAttributeFilters,
  23661. addNodeFilter: addNodeFilter,
  23662. getNodeFilters: getNodeFilters,
  23663. filterNode: filterNode,
  23664. parse: parse
  23665. };
  23666. register$1(exports, settings);
  23667. register$2(exports, settings);
  23668. return exports;
  23669. };
  23670. var register = function (htmlParser, settings, dom) {
  23671. htmlParser.addAttributeFilter('data-mce-tabindex', function (nodes, name) {
  23672. var i = nodes.length;
  23673. while (i--) {
  23674. var node = nodes[i];
  23675. node.attr('tabindex', node.attr('data-mce-tabindex'));
  23676. node.attr(name, null);
  23677. }
  23678. });
  23679. htmlParser.addAttributeFilter('src,href,style', function (nodes, name) {
  23680. var internalName = 'data-mce-' + name;
  23681. var urlConverter = settings.url_converter;
  23682. var urlConverterScope = settings.url_converter_scope;
  23683. var i = nodes.length;
  23684. while (i--) {
  23685. var node = nodes[i];
  23686. var value = node.attr(internalName);
  23687. if (value !== undefined) {
  23688. node.attr(name, value.length > 0 ? value : null);
  23689. node.attr(internalName, null);
  23690. } else {
  23691. value = node.attr(name);
  23692. if (name === 'style') {
  23693. value = dom.serializeStyle(dom.parseStyle(value), node.name);
  23694. } else if (urlConverter) {
  23695. value = urlConverter.call(urlConverterScope, value, name, node.name);
  23696. }
  23697. node.attr(name, value.length > 0 ? value : null);
  23698. }
  23699. }
  23700. });
  23701. htmlParser.addAttributeFilter('class', function (nodes) {
  23702. var i = nodes.length;
  23703. while (i--) {
  23704. var node = nodes[i];
  23705. var value = node.attr('class');
  23706. if (value) {
  23707. value = node.attr('class').replace(/(?:^|\s)mce-item-\w+(?!\S)/g, '');
  23708. node.attr('class', value.length > 0 ? value : null);
  23709. }
  23710. }
  23711. });
  23712. htmlParser.addAttributeFilter('data-mce-type', function (nodes, name, args) {
  23713. var i = nodes.length;
  23714. while (i--) {
  23715. var node = nodes[i];
  23716. if (node.attr('data-mce-type') === 'bookmark' && !args.cleanup) {
  23717. var hasChildren = Optional.from(node.firstChild).exists(function (firstChild) {
  23718. return !isZwsp(firstChild.value);
  23719. });
  23720. if (hasChildren) {
  23721. node.unwrap();
  23722. } else {
  23723. node.remove();
  23724. }
  23725. }
  23726. }
  23727. });
  23728. htmlParser.addNodeFilter('noscript', function (nodes) {
  23729. var i = nodes.length;
  23730. while (i--) {
  23731. var node = nodes[i].firstChild;
  23732. if (node) {
  23733. node.value = Entities.decode(node.value);
  23734. }
  23735. }
  23736. });
  23737. htmlParser.addNodeFilter('script,style', function (nodes, name) {
  23738. var trim = function (value) {
  23739. return value.replace(/(<!--\[CDATA\[|\]\]-->)/g, '\n').replace(/^[\r\n]*|[\r\n]*$/g, '').replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi, '').replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g, '');
  23740. };
  23741. var i = nodes.length;
  23742. while (i--) {
  23743. var node = nodes[i];
  23744. var value = node.firstChild ? node.firstChild.value : '';
  23745. if (name === 'script') {
  23746. var type = node.attr('type');
  23747. if (type) {
  23748. node.attr('type', type === 'mce-no/type' ? null : type.replace(/^mce\-/, ''));
  23749. }
  23750. if (settings.element_format === 'xhtml' && value.length > 0) {
  23751. node.firstChild.value = '// <![CDATA[\n' + trim(value) + '\n// ]]>';
  23752. }
  23753. } else {
  23754. if (settings.element_format === 'xhtml' && value.length > 0) {
  23755. node.firstChild.value = '<!--\n' + trim(value) + '\n-->';
  23756. }
  23757. }
  23758. }
  23759. });
  23760. htmlParser.addNodeFilter('#comment', function (nodes) {
  23761. var i = nodes.length;
  23762. while (i--) {
  23763. var node = nodes[i];
  23764. if (settings.preserve_cdata && node.value.indexOf('[CDATA[') === 0) {
  23765. node.name = '#cdata';
  23766. node.type = 4;
  23767. node.value = dom.decode(node.value.replace(/^\[CDATA\[|\]\]$/g, ''));
  23768. } else if (node.value.indexOf('mce:protected ') === 0) {
  23769. node.name = '#text';
  23770. node.type = 3;
  23771. node.raw = true;
  23772. node.value = unescape(node.value).substr(14);
  23773. }
  23774. }
  23775. });
  23776. htmlParser.addNodeFilter('xml:namespace,input', function (nodes, name) {
  23777. var i = nodes.length;
  23778. while (i--) {
  23779. var node = nodes[i];
  23780. if (node.type === 7) {
  23781. node.remove();
  23782. } else if (node.type === 1) {
  23783. if (name === 'input' && !node.attr('type')) {
  23784. node.attr('type', 'text');
  23785. }
  23786. }
  23787. }
  23788. });
  23789. htmlParser.addAttributeFilter('data-mce-type', function (nodes) {
  23790. each$k(nodes, function (node) {
  23791. if (node.attr('data-mce-type') === 'format-caret') {
  23792. if (node.isEmpty(htmlParser.schema.getNonEmptyElements())) {
  23793. node.remove();
  23794. } else {
  23795. node.unwrap();
  23796. }
  23797. }
  23798. });
  23799. });
  23800. htmlParser.addAttributeFilter('data-mce-src,data-mce-href,data-mce-style,' + 'data-mce-selected,data-mce-expando,' + 'data-mce-type,data-mce-resize,data-mce-placeholder', function (nodes, name) {
  23801. var i = nodes.length;
  23802. while (i--) {
  23803. nodes[i].attr(name, null);
  23804. }
  23805. });
  23806. };
  23807. var trimTrailingBr = function (rootNode) {
  23808. var isBr = function (node) {
  23809. return node && node.name === 'br';
  23810. };
  23811. var brNode1 = rootNode.lastChild;
  23812. if (isBr(brNode1)) {
  23813. var brNode2 = brNode1.prev;
  23814. if (isBr(brNode2)) {
  23815. brNode1.remove();
  23816. brNode2.remove();
  23817. }
  23818. }
  23819. };
  23820. var preProcess = function (editor, node, args) {
  23821. var oldDoc;
  23822. var dom = editor.dom;
  23823. var clonedNode = node.cloneNode(true);
  23824. var impl = document.implementation;
  23825. if (impl.createHTMLDocument) {
  23826. var doc_1 = impl.createHTMLDocument('');
  23827. Tools.each(clonedNode.nodeName === 'BODY' ? clonedNode.childNodes : [clonedNode], function (node) {
  23828. doc_1.body.appendChild(doc_1.importNode(node, true));
  23829. });
  23830. if (clonedNode.nodeName !== 'BODY') {
  23831. clonedNode = doc_1.body.firstChild;
  23832. } else {
  23833. clonedNode = doc_1.body;
  23834. }
  23835. oldDoc = dom.doc;
  23836. dom.doc = doc_1;
  23837. }
  23838. firePreProcess(editor, __assign(__assign({}, args), { node: clonedNode }));
  23839. if (oldDoc) {
  23840. dom.doc = oldDoc;
  23841. }
  23842. return clonedNode;
  23843. };
  23844. var shouldFireEvent = function (editor, args) {
  23845. return editor && editor.hasEventListeners('PreProcess') && !args.no_events;
  23846. };
  23847. var process = function (editor, node, args) {
  23848. return shouldFireEvent(editor, args) ? preProcess(editor, node, args) : node;
  23849. };
  23850. var addTempAttr = function (htmlParser, tempAttrs, name) {
  23851. if (Tools.inArray(tempAttrs, name) === -1) {
  23852. htmlParser.addAttributeFilter(name, function (nodes, name) {
  23853. var i = nodes.length;
  23854. while (i--) {
  23855. nodes[i].attr(name, null);
  23856. }
  23857. });
  23858. tempAttrs.push(name);
  23859. }
  23860. };
  23861. var postProcess = function (editor, args, content) {
  23862. if (!args.no_events && editor) {
  23863. var outArgs = firePostProcess(editor, __assign(__assign({}, args), { content: content }));
  23864. return outArgs.content;
  23865. } else {
  23866. return content;
  23867. }
  23868. };
  23869. var getHtmlFromNode = function (dom, node, args) {
  23870. var html = trim$2(args.getInner ? node.innerHTML : dom.getOuterHTML(node));
  23871. return args.selection || isWsPreserveElement(SugarElement.fromDom(node)) ? html : Tools.trim(html);
  23872. };
  23873. var parseHtml = function (htmlParser, html, args) {
  23874. var parserArgs = args.selection ? __assign({ forced_root_block: false }, args) : args;
  23875. var rootNode = htmlParser.parse(html, parserArgs);
  23876. trimTrailingBr(rootNode);
  23877. return rootNode;
  23878. };
  23879. var serializeNode = function (settings, schema, node) {
  23880. var htmlSerializer = HtmlSerializer(settings, schema);
  23881. return htmlSerializer.serialize(node);
  23882. };
  23883. var toHtml = function (editor, settings, schema, rootNode, args) {
  23884. var content = serializeNode(settings, schema, rootNode);
  23885. return postProcess(editor, args, content);
  23886. };
  23887. var DomSerializerImpl = function (settings, editor) {
  23888. var tempAttrs = ['data-mce-selected'];
  23889. var dom = editor && editor.dom ? editor.dom : DOMUtils.DOM;
  23890. var schema = editor && editor.schema ? editor.schema : Schema(settings);
  23891. settings.entity_encoding = settings.entity_encoding || 'named';
  23892. settings.remove_trailing_brs = 'remove_trailing_brs' in settings ? settings.remove_trailing_brs : true;
  23893. var htmlParser = DomParser(settings, schema);
  23894. register(htmlParser, settings, dom);
  23895. var serialize = function (node, parserArgs) {
  23896. if (parserArgs === void 0) {
  23897. parserArgs = {};
  23898. }
  23899. var args = __assign({ format: 'html' }, parserArgs);
  23900. var targetNode = process(editor, node, args);
  23901. var html = getHtmlFromNode(dom, targetNode, args);
  23902. var rootNode = parseHtml(htmlParser, html, args);
  23903. return args.format === 'tree' ? rootNode : toHtml(editor, settings, schema, rootNode, args);
  23904. };
  23905. return {
  23906. schema: schema,
  23907. addNodeFilter: htmlParser.addNodeFilter,
  23908. addAttributeFilter: htmlParser.addAttributeFilter,
  23909. serialize: serialize,
  23910. addRules: schema.addValidElements,
  23911. setRules: schema.setValidElements,
  23912. addTempAttr: curry(addTempAttr, htmlParser, tempAttrs),
  23913. getTempAttrs: constant(tempAttrs),
  23914. getNodeFilters: htmlParser.getNodeFilters,
  23915. getAttributeFilters: htmlParser.getAttributeFilters
  23916. };
  23917. };
  23918. var DomSerializer = function (settings, editor) {
  23919. var domSerializer = DomSerializerImpl(settings, editor);
  23920. return {
  23921. schema: domSerializer.schema,
  23922. addNodeFilter: domSerializer.addNodeFilter,
  23923. addAttributeFilter: domSerializer.addAttributeFilter,
  23924. serialize: domSerializer.serialize,
  23925. addRules: domSerializer.addRules,
  23926. setRules: domSerializer.setRules,
  23927. addTempAttr: domSerializer.addTempAttr,
  23928. getTempAttrs: domSerializer.getTempAttrs,
  23929. getNodeFilters: domSerializer.getNodeFilters,
  23930. getAttributeFilters: domSerializer.getAttributeFilters
  23931. };
  23932. };
  23933. var defaultFormat = 'html';
  23934. var getContent = function (editor, args) {
  23935. if (args === void 0) {
  23936. args = {};
  23937. }
  23938. var format = args.format ? args.format : defaultFormat;
  23939. return getContent$2(editor, args, format);
  23940. };
  23941. var setContent = function (editor, content, args) {
  23942. if (args === void 0) {
  23943. args = {};
  23944. }
  23945. return setContent$2(editor, content, args);
  23946. };
  23947. var DOM$7 = DOMUtils.DOM;
  23948. var restoreOriginalStyles = function (editor) {
  23949. DOM$7.setStyle(editor.id, 'display', editor.orgDisplay);
  23950. };
  23951. var safeDestroy = function (x) {
  23952. return Optional.from(x).each(function (x) {
  23953. return x.destroy();
  23954. });
  23955. };
  23956. var clearDomReferences = function (editor) {
  23957. editor.contentAreaContainer = editor.formElement = editor.container = editor.editorContainer = null;
  23958. editor.bodyElement = editor.contentDocument = editor.contentWindow = null;
  23959. editor.iframeElement = editor.targetElm = null;
  23960. if (editor.selection) {
  23961. editor.selection = editor.selection.win = editor.selection.dom = editor.selection.dom.doc = null;
  23962. }
  23963. };
  23964. var restoreForm = function (editor) {
  23965. var form = editor.formElement;
  23966. if (form) {
  23967. if (form._mceOldSubmit) {
  23968. form.submit = form._mceOldSubmit;
  23969. form._mceOldSubmit = null;
  23970. }
  23971. DOM$7.unbind(form, 'submit reset', editor.formEventDelegate);
  23972. }
  23973. };
  23974. var remove = function (editor) {
  23975. if (!editor.removed) {
  23976. var _selectionOverrides = editor._selectionOverrides, editorUpload = editor.editorUpload;
  23977. var body = editor.getBody();
  23978. var element = editor.getElement();
  23979. if (body) {
  23980. editor.save({ is_removing: true });
  23981. }
  23982. editor.removed = true;
  23983. editor.unbindAllNativeEvents();
  23984. if (editor.hasHiddenInput && element) {
  23985. DOM$7.remove(element.nextSibling);
  23986. }
  23987. fireRemove(editor);
  23988. editor.editorManager.remove(editor);
  23989. if (!editor.inline && body) {
  23990. restoreOriginalStyles(editor);
  23991. }
  23992. fireDetach(editor);
  23993. DOM$7.remove(editor.getContainer());
  23994. safeDestroy(_selectionOverrides);
  23995. safeDestroy(editorUpload);
  23996. editor.destroy();
  23997. }
  23998. };
  23999. var destroy = function (editor, automatic) {
  24000. var selection = editor.selection, dom = editor.dom;
  24001. if (editor.destroyed) {
  24002. return;
  24003. }
  24004. if (!automatic && !editor.removed) {
  24005. editor.remove();
  24006. return;
  24007. }
  24008. if (!automatic) {
  24009. editor.editorManager.off('beforeunload', editor._beforeUnload);
  24010. if (editor.theme && editor.theme.destroy) {
  24011. editor.theme.destroy();
  24012. }
  24013. safeDestroy(selection);
  24014. safeDestroy(dom);
  24015. }
  24016. restoreForm(editor);
  24017. clearDomReferences(editor);
  24018. editor.destroyed = true;
  24019. };
  24020. var deep = function (old, nu) {
  24021. var bothObjects = isObject(old) && isObject(nu);
  24022. return bothObjects ? deepMerge(old, nu) : nu;
  24023. };
  24024. var baseMerge = function (merger) {
  24025. return function () {
  24026. var objects = [];
  24027. for (var _i = 0; _i < arguments.length; _i++) {
  24028. objects[_i] = arguments[_i];
  24029. }
  24030. if (objects.length === 0) {
  24031. throw new Error('Can\'t merge zero objects');
  24032. }
  24033. var ret = {};
  24034. for (var j = 0; j < objects.length; j++) {
  24035. var curObject = objects[j];
  24036. for (var key in curObject) {
  24037. if (has$2(curObject, key)) {
  24038. ret[key] = merger(ret[key], curObject[key]);
  24039. }
  24040. }
  24041. }
  24042. return ret;
  24043. };
  24044. };
  24045. var deepMerge = baseMerge(deep);
  24046. var deprecatedSettings = ('autoresize_on_init,content_editable_state,convert_fonts_to_spans,inline_styles,padd_empty_with_br,block_elements,' + 'boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,' + 'force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,' + 'non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,' + 'tab_focus,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,' + 'paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists').split(',');
  24047. var deprecatedPlugins = 'bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor'.split(',');
  24048. var movedToPremiumPlugins = 'imagetools,toc'.split(',');
  24049. var getDeprecatedSettings = function (settings) {
  24050. var settingNames = filter$4(deprecatedSettings, function (setting) {
  24051. return has$2(settings, setting);
  24052. });
  24053. var forcedRootBlock = settings.forced_root_block;
  24054. if (forcedRootBlock === false || forcedRootBlock === '') {
  24055. settingNames.push('forced_root_block (false only)');
  24056. }
  24057. return sort(settingNames);
  24058. };
  24059. var getDeprecatedPlugins = function (settings) {
  24060. var plugins = Tools.makeMap(settings.plugins, ' ');
  24061. var hasPlugin = function (plugin) {
  24062. return has$2(plugins, plugin);
  24063. };
  24064. var pluginNames = __spreadArray(__spreadArray([], filter$4(deprecatedPlugins, hasPlugin), true), bind(movedToPremiumPlugins, function (plugin) {
  24065. return hasPlugin(plugin) ? [plugin + ' (moving to premium)'] : [];
  24066. }), true);
  24067. return sort(pluginNames);
  24068. };
  24069. var logDeprecationsWarning = function (rawSettings, finalSettings) {
  24070. var deprecatedSettings = getDeprecatedSettings(rawSettings);
  24071. var deprecatedPlugins = getDeprecatedPlugins(finalSettings);
  24072. var hasDeprecatedPlugins = deprecatedPlugins.length > 0;
  24073. var hasDeprecatedSettings = deprecatedSettings.length > 0;
  24074. var isLegacyMobileTheme = finalSettings.theme === 'mobile';
  24075. if (hasDeprecatedPlugins || hasDeprecatedSettings || isLegacyMobileTheme) {
  24076. var listJoiner = '\n- ';
  24077. var themesMessage = isLegacyMobileTheme ? '\n\nThemes:' + listJoiner + 'mobile' : '';
  24078. var pluginsMessage = hasDeprecatedPlugins ? '\n\nPlugins:' + listJoiner + deprecatedPlugins.join(listJoiner) : '';
  24079. var settingsMessage = hasDeprecatedSettings ? '\n\nSettings:' + listJoiner + deprecatedSettings.join(listJoiner) : '';
  24080. console.warn('The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. ' + 'See https://www.tiny.cloud/docs/release-notes/6.0-upcoming-changes/ for more information.' + themesMessage + pluginsMessage + settingsMessage);
  24081. }
  24082. };
  24083. var sectionResult = function (sections, settings) {
  24084. return {
  24085. sections: constant(sections),
  24086. settings: constant(settings)
  24087. };
  24088. };
  24089. var deviceDetection = detect().deviceType;
  24090. var isTouch = deviceDetection.isTouch();
  24091. var isPhone = deviceDetection.isPhone();
  24092. var isTablet = deviceDetection.isTablet();
  24093. var legacyMobilePlugins = [
  24094. 'lists',
  24095. 'autolink',
  24096. 'autosave'
  24097. ];
  24098. var defaultTouchSettings = {
  24099. table_grid: false,
  24100. object_resizing: false,
  24101. resize: false
  24102. };
  24103. var normalizePlugins = function (plugins) {
  24104. var pluginNames = isArray$1(plugins) ? plugins.join(' ') : plugins;
  24105. var trimmedPlugins = map$3(isString$1(pluginNames) ? pluginNames.split(' ') : [], trim$4);
  24106. return filter$4(trimmedPlugins, function (item) {
  24107. return item.length > 0;
  24108. });
  24109. };
  24110. var filterLegacyMobilePlugins = function (plugins) {
  24111. return filter$4(plugins, curry(contains$3, legacyMobilePlugins));
  24112. };
  24113. var extractSections = function (keys, settings) {
  24114. var result = bifilter(settings, function (value, key) {
  24115. return contains$3(keys, key);
  24116. });
  24117. return sectionResult(result.t, result.f);
  24118. };
  24119. var getSection = function (sectionResult, name, defaults) {
  24120. if (defaults === void 0) {
  24121. defaults = {};
  24122. }
  24123. var sections = sectionResult.sections();
  24124. var sectionSettings = get$9(sections, name).getOr({});
  24125. return Tools.extend({}, defaults, sectionSettings);
  24126. };
  24127. var hasSection = function (sectionResult, name) {
  24128. return has$2(sectionResult.sections(), name);
  24129. };
  24130. var isSectionTheme = function (sectionResult, name, theme) {
  24131. var section = sectionResult.sections();
  24132. return hasSection(sectionResult, name) && section[name].theme === theme;
  24133. };
  24134. var getSectionConfig = function (sectionResult, name) {
  24135. return hasSection(sectionResult, name) ? sectionResult.sections()[name] : {};
  24136. };
  24137. var getToolbarMode = function (settings, defaultVal) {
  24138. return get$9(settings, 'toolbar_mode').orThunk(function () {
  24139. return get$9(settings, 'toolbar_drawer').map(function (val) {
  24140. return val === false ? 'wrap' : val;
  24141. });
  24142. }).getOr(defaultVal);
  24143. };
  24144. var getDefaultSettings = function (settings, id, documentBaseUrl, isTouch, editor) {
  24145. var baseDefaults = {
  24146. id: id,
  24147. theme: 'silver',
  24148. toolbar_mode: getToolbarMode(settings, 'floating'),
  24149. plugins: '',
  24150. document_base_url: documentBaseUrl,
  24151. add_form_submit_trigger: true,
  24152. submit_patch: true,
  24153. add_unload_trigger: true,
  24154. convert_urls: true,
  24155. relative_urls: true,
  24156. remove_script_host: true,
  24157. object_resizing: true,
  24158. doctype: '<!DOCTYPE html>',
  24159. visual: true,
  24160. font_size_legacy_values: 'xx-small,small,medium,large,x-large,xx-large,300%',
  24161. forced_root_block: 'p',
  24162. hidden_input: true,
  24163. inline_styles: true,
  24164. convert_fonts_to_spans: true,
  24165. indent: true,
  24166. indent_before: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,' + 'tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist',
  24167. indent_after: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,' + 'tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist',
  24168. entity_encoding: 'named',
  24169. url_converter: editor.convertURL,
  24170. url_converter_scope: editor
  24171. };
  24172. return __assign(__assign({}, baseDefaults), isTouch ? defaultTouchSettings : {});
  24173. };
  24174. var getDefaultMobileSettings = function (mobileSettings, isPhone) {
  24175. var defaultMobileSettings = {
  24176. resize: false,
  24177. toolbar_mode: getToolbarMode(mobileSettings, 'scrolling'),
  24178. toolbar_sticky: false
  24179. };
  24180. var defaultPhoneSettings = { menubar: false };
  24181. return __assign(__assign(__assign({}, defaultTouchSettings), defaultMobileSettings), isPhone ? defaultPhoneSettings : {});
  24182. };
  24183. var getExternalPlugins = function (overrideSettings, settings) {
  24184. var userDefinedExternalPlugins = settings.external_plugins ? settings.external_plugins : {};
  24185. if (overrideSettings && overrideSettings.external_plugins) {
  24186. return Tools.extend({}, overrideSettings.external_plugins, userDefinedExternalPlugins);
  24187. } else {
  24188. return userDefinedExternalPlugins;
  24189. }
  24190. };
  24191. var combinePlugins = function (forcedPlugins, plugins) {
  24192. return [].concat(normalizePlugins(forcedPlugins)).concat(normalizePlugins(plugins));
  24193. };
  24194. var getPlatformPlugins = function (isMobileDevice, sectionResult, desktopPlugins, mobilePlugins) {
  24195. if (isMobileDevice && isSectionTheme(sectionResult, 'mobile', 'mobile')) {
  24196. return filterLegacyMobilePlugins(mobilePlugins);
  24197. } else if (isMobileDevice && hasSection(sectionResult, 'mobile')) {
  24198. return mobilePlugins;
  24199. } else {
  24200. return desktopPlugins;
  24201. }
  24202. };
  24203. var processPlugins = function (isMobileDevice, sectionResult, defaultOverrideSettings, settings) {
  24204. var forcedPlugins = normalizePlugins(defaultOverrideSettings.forced_plugins);
  24205. var desktopPlugins = normalizePlugins(settings.plugins);
  24206. var mobileConfig = getSectionConfig(sectionResult, 'mobile');
  24207. var mobilePlugins = mobileConfig.plugins ? normalizePlugins(mobileConfig.plugins) : desktopPlugins;
  24208. var platformPlugins = getPlatformPlugins(isMobileDevice, sectionResult, desktopPlugins, mobilePlugins);
  24209. var combinedPlugins = combinePlugins(forcedPlugins, platformPlugins);
  24210. if (Env.browser.isIE() && contains$3(combinedPlugins, 'rtc')) {
  24211. throw new Error('RTC plugin is not supported on IE 11.');
  24212. }
  24213. return Tools.extend(settings, { plugins: combinedPlugins.join(' ') });
  24214. };
  24215. var isOnMobile = function (isMobileDevice, sectionResult) {
  24216. return isMobileDevice && hasSection(sectionResult, 'mobile');
  24217. };
  24218. var combineSettings = function (isMobileDevice, isPhone, defaultSettings, defaultOverrideSettings, settings) {
  24219. var defaultDeviceSettings = isMobileDevice ? { mobile: getDefaultMobileSettings(settings.mobile || {}, isPhone) } : {};
  24220. var sectionResult = extractSections(['mobile'], deepMerge(defaultDeviceSettings, settings));
  24221. var extendedSettings = Tools.extend(defaultSettings, defaultOverrideSettings, sectionResult.settings(), isOnMobile(isMobileDevice, sectionResult) ? getSection(sectionResult, 'mobile') : {}, {
  24222. validate: true,
  24223. external_plugins: getExternalPlugins(defaultOverrideSettings, sectionResult.settings())
  24224. });
  24225. return processPlugins(isMobileDevice, sectionResult, defaultOverrideSettings, extendedSettings);
  24226. };
  24227. var getEditorSettings = function (editor, id, documentBaseUrl, defaultOverrideSettings, settings) {
  24228. var defaultSettings = getDefaultSettings(settings, id, documentBaseUrl, isTouch, editor);
  24229. var finalSettings = combineSettings(isPhone || isTablet, isPhone, defaultSettings, defaultOverrideSettings, settings);
  24230. if (finalSettings.deprecation_warnings !== false) {
  24231. logDeprecationsWarning(settings, finalSettings);
  24232. }
  24233. return finalSettings;
  24234. };
  24235. var getFiltered = function (predicate, editor, name) {
  24236. return Optional.from(editor.settings[name]).filter(predicate);
  24237. };
  24238. var getParamObject = function (value) {
  24239. var output = {};
  24240. if (typeof value === 'string') {
  24241. each$k(value.indexOf('=') > 0 ? value.split(/[;,](?![^=;,]*(?:[;,]|$))/) : value.split(','), function (val) {
  24242. var arr = val.split('=');
  24243. if (arr.length > 1) {
  24244. output[Tools.trim(arr[0])] = Tools.trim(arr[1]);
  24245. } else {
  24246. output[Tools.trim(arr[0])] = Tools.trim(arr[0]);
  24247. }
  24248. });
  24249. } else {
  24250. output = value;
  24251. }
  24252. return output;
  24253. };
  24254. var isArrayOf = function (p) {
  24255. return function (a) {
  24256. return isArray$1(a) && forall(a, p);
  24257. };
  24258. };
  24259. var getParam = function (editor, name, defaultVal, type) {
  24260. var value = name in editor.settings ? editor.settings[name] : defaultVal;
  24261. if (type === 'hash') {
  24262. return getParamObject(value);
  24263. } else if (type === 'string') {
  24264. return getFiltered(isString$1, editor, name).getOr(defaultVal);
  24265. } else if (type === 'number') {
  24266. return getFiltered(isNumber, editor, name).getOr(defaultVal);
  24267. } else if (type === 'boolean') {
  24268. return getFiltered(isBoolean, editor, name).getOr(defaultVal);
  24269. } else if (type === 'object') {
  24270. return getFiltered(isObject, editor, name).getOr(defaultVal);
  24271. } else if (type === 'array') {
  24272. return getFiltered(isArray$1, editor, name).getOr(defaultVal);
  24273. } else if (type === 'string[]') {
  24274. return getFiltered(isArrayOf(isString$1), editor, name).getOr(defaultVal);
  24275. } else if (type === 'function') {
  24276. return getFiltered(isFunction, editor, name).getOr(defaultVal);
  24277. } else {
  24278. return value;
  24279. }
  24280. };
  24281. var CreateIconManager = function () {
  24282. var lookup = {};
  24283. var add = function (id, iconPack) {
  24284. lookup[id] = iconPack;
  24285. };
  24286. var get = function (id) {
  24287. if (lookup[id]) {
  24288. return lookup[id];
  24289. }
  24290. return { icons: {} };
  24291. };
  24292. var has = function (id) {
  24293. return has$2(lookup, id);
  24294. };
  24295. return {
  24296. add: add,
  24297. get: get,
  24298. has: has
  24299. };
  24300. };
  24301. var IconManager = CreateIconManager();
  24302. var getProp = function (propName, elm) {
  24303. var rawElm = elm.dom;
  24304. return rawElm[propName];
  24305. };
  24306. var getComputedSizeProp = function (propName, elm) {
  24307. return parseInt(get$5(elm, propName), 10);
  24308. };
  24309. var getClientWidth = curry(getProp, 'clientWidth');
  24310. var getClientHeight = curry(getProp, 'clientHeight');
  24311. var getMarginTop = curry(getComputedSizeProp, 'margin-top');
  24312. var getMarginLeft = curry(getComputedSizeProp, 'margin-left');
  24313. var getBoundingClientRect = function (elm) {
  24314. return elm.dom.getBoundingClientRect();
  24315. };
  24316. var isInsideElementContentArea = function (bodyElm, clientX, clientY) {
  24317. var clientWidth = getClientWidth(bodyElm);
  24318. var clientHeight = getClientHeight(bodyElm);
  24319. return clientX >= 0 && clientY >= 0 && clientX <= clientWidth && clientY <= clientHeight;
  24320. };
  24321. var transpose = function (inline, elm, clientX, clientY) {
  24322. var clientRect = getBoundingClientRect(elm);
  24323. var deltaX = inline ? clientRect.left + elm.dom.clientLeft + getMarginLeft(elm) : 0;
  24324. var deltaY = inline ? clientRect.top + elm.dom.clientTop + getMarginTop(elm) : 0;
  24325. var x = clientX - deltaX;
  24326. var y = clientY - deltaY;
  24327. return {
  24328. x: x,
  24329. y: y
  24330. };
  24331. };
  24332. var isXYInContentArea = function (editor, clientX, clientY) {
  24333. var bodyElm = SugarElement.fromDom(editor.getBody());
  24334. var targetElm = editor.inline ? bodyElm : documentElement(bodyElm);
  24335. var transposedPoint = transpose(editor.inline, targetElm, clientX, clientY);
  24336. return isInsideElementContentArea(targetElm, transposedPoint.x, transposedPoint.y);
  24337. };
  24338. var fromDomSafe = function (node) {
  24339. return Optional.from(node).map(SugarElement.fromDom);
  24340. };
  24341. var isEditorAttachedToDom = function (editor) {
  24342. var rawContainer = editor.inline ? editor.getBody() : editor.getContentAreaContainer();
  24343. return fromDomSafe(rawContainer).map(inBody).getOr(false);
  24344. };
  24345. var NotificationManagerImpl = function () {
  24346. var unimplemented = function () {
  24347. throw new Error('Theme did not provide a NotificationManager implementation.');
  24348. };
  24349. return {
  24350. open: unimplemented,
  24351. close: unimplemented,
  24352. reposition: unimplemented,
  24353. getArgs: unimplemented
  24354. };
  24355. };
  24356. var NotificationManager = function (editor) {
  24357. var notifications = [];
  24358. var getImplementation = function () {
  24359. var theme = editor.theme;
  24360. return theme && theme.getNotificationManagerImpl ? theme.getNotificationManagerImpl() : NotificationManagerImpl();
  24361. };
  24362. var getTopNotification = function () {
  24363. return Optional.from(notifications[0]);
  24364. };
  24365. var isEqual = function (a, b) {
  24366. return a.type === b.type && a.text === b.text && !a.progressBar && !a.timeout && !b.progressBar && !b.timeout;
  24367. };
  24368. var reposition = function () {
  24369. if (notifications.length > 0) {
  24370. getImplementation().reposition(notifications);
  24371. }
  24372. };
  24373. var addNotification = function (notification) {
  24374. notifications.push(notification);
  24375. };
  24376. var closeNotification = function (notification) {
  24377. findIndex$2(notifications, function (otherNotification) {
  24378. return otherNotification === notification;
  24379. }).each(function (index) {
  24380. notifications.splice(index, 1);
  24381. });
  24382. };
  24383. var open = function (spec, fireEvent) {
  24384. if (fireEvent === void 0) {
  24385. fireEvent = true;
  24386. }
  24387. if (editor.removed || !isEditorAttachedToDom(editor)) {
  24388. return;
  24389. }
  24390. if (fireEvent) {
  24391. editor.fire('BeforeOpenNotification', { notification: spec });
  24392. }
  24393. return find$3(notifications, function (notification) {
  24394. return isEqual(getImplementation().getArgs(notification), spec);
  24395. }).getOrThunk(function () {
  24396. editor.editorManager.setActive(editor);
  24397. var notification = getImplementation().open(spec, function () {
  24398. closeNotification(notification);
  24399. reposition();
  24400. getTopNotification().fold(function () {
  24401. return editor.focus();
  24402. }, function (top) {
  24403. return focus$1(SugarElement.fromDom(top.getEl()));
  24404. });
  24405. });
  24406. addNotification(notification);
  24407. reposition();
  24408. editor.fire('OpenNotification', { notification: __assign({}, notification) });
  24409. return notification;
  24410. });
  24411. };
  24412. var close = function () {
  24413. getTopNotification().each(function (notification) {
  24414. getImplementation().close(notification);
  24415. closeNotification(notification);
  24416. reposition();
  24417. });
  24418. };
  24419. var getNotifications = constant(notifications);
  24420. var registerEvents = function (editor) {
  24421. editor.on('SkinLoaded', function () {
  24422. var serviceMessage = getServiceMessage(editor);
  24423. if (serviceMessage) {
  24424. open({
  24425. text: serviceMessage,
  24426. type: 'warning',
  24427. timeout: 0
  24428. }, false);
  24429. }
  24430. reposition();
  24431. });
  24432. editor.on('show ResizeEditor ResizeWindow NodeChange', function () {
  24433. Delay.requestAnimationFrame(reposition);
  24434. });
  24435. editor.on('remove', function () {
  24436. each$k(notifications.slice(), function (notification) {
  24437. getImplementation().close(notification);
  24438. });
  24439. });
  24440. };
  24441. registerEvents(editor);
  24442. return {
  24443. open: open,
  24444. close: close,
  24445. getNotifications: getNotifications
  24446. };
  24447. };
  24448. var PluginManager = AddOnManager.PluginManager;
  24449. var ThemeManager = AddOnManager.ThemeManager;
  24450. function WindowManagerImpl () {
  24451. var unimplemented = function () {
  24452. throw new Error('Theme did not provide a WindowManager implementation.');
  24453. };
  24454. return {
  24455. open: unimplemented,
  24456. openUrl: unimplemented,
  24457. alert: unimplemented,
  24458. confirm: unimplemented,
  24459. close: unimplemented,
  24460. getParams: unimplemented,
  24461. setParams: unimplemented
  24462. };
  24463. }
  24464. var WindowManager = function (editor) {
  24465. var dialogs = [];
  24466. var getImplementation = function () {
  24467. var theme = editor.theme;
  24468. return theme && theme.getWindowManagerImpl ? theme.getWindowManagerImpl() : WindowManagerImpl();
  24469. };
  24470. var funcBind = function (scope, f) {
  24471. return function () {
  24472. var args = [];
  24473. for (var _i = 0; _i < arguments.length; _i++) {
  24474. args[_i] = arguments[_i];
  24475. }
  24476. return f ? f.apply(scope, args) : undefined;
  24477. };
  24478. };
  24479. var fireOpenEvent = function (dialog) {
  24480. editor.fire('OpenWindow', { dialog: dialog });
  24481. };
  24482. var fireCloseEvent = function (dialog) {
  24483. editor.fire('CloseWindow', { dialog: dialog });
  24484. };
  24485. var addDialog = function (dialog) {
  24486. dialogs.push(dialog);
  24487. fireOpenEvent(dialog);
  24488. };
  24489. var closeDialog = function (dialog) {
  24490. fireCloseEvent(dialog);
  24491. dialogs = filter$4(dialogs, function (otherDialog) {
  24492. return otherDialog !== dialog;
  24493. });
  24494. if (dialogs.length === 0) {
  24495. editor.focus();
  24496. }
  24497. };
  24498. var getTopDialog = function () {
  24499. return Optional.from(dialogs[dialogs.length - 1]);
  24500. };
  24501. var storeSelectionAndOpenDialog = function (openDialog) {
  24502. editor.editorManager.setActive(editor);
  24503. store(editor);
  24504. var dialog = openDialog();
  24505. addDialog(dialog);
  24506. return dialog;
  24507. };
  24508. var open = function (args, params) {
  24509. return storeSelectionAndOpenDialog(function () {
  24510. return getImplementation().open(args, params, closeDialog);
  24511. });
  24512. };
  24513. var openUrl = function (args) {
  24514. return storeSelectionAndOpenDialog(function () {
  24515. return getImplementation().openUrl(args, closeDialog);
  24516. });
  24517. };
  24518. var alert = function (message, callback, scope) {
  24519. var windowManagerImpl = getImplementation();
  24520. windowManagerImpl.alert(message, funcBind(scope ? scope : windowManagerImpl, callback));
  24521. };
  24522. var confirm = function (message, callback, scope) {
  24523. var windowManagerImpl = getImplementation();
  24524. windowManagerImpl.confirm(message, funcBind(scope ? scope : windowManagerImpl, callback));
  24525. };
  24526. var close = function () {
  24527. getTopDialog().each(function (dialog) {
  24528. getImplementation().close(dialog);
  24529. closeDialog(dialog);
  24530. });
  24531. };
  24532. editor.on('remove', function () {
  24533. each$k(dialogs, function (dialog) {
  24534. getImplementation().close(dialog);
  24535. });
  24536. });
  24537. return {
  24538. open: open,
  24539. openUrl: openUrl,
  24540. alert: alert,
  24541. confirm: confirm,
  24542. close: close
  24543. };
  24544. };
  24545. var displayNotification = function (editor, message) {
  24546. editor.notificationManager.open({
  24547. type: 'error',
  24548. text: message
  24549. });
  24550. };
  24551. var displayError = function (editor, message) {
  24552. if (editor._skinLoaded) {
  24553. displayNotification(editor, message);
  24554. } else {
  24555. editor.on('SkinLoaded', function () {
  24556. displayNotification(editor, message);
  24557. });
  24558. }
  24559. };
  24560. var uploadError = function (editor, message) {
  24561. displayError(editor, I18n.translate([
  24562. 'Failed to upload image: {0}',
  24563. message
  24564. ]));
  24565. };
  24566. var logError = function (editor, errorType, msg) {
  24567. fireError(editor, errorType, { message: msg });
  24568. console.error(msg);
  24569. };
  24570. var createLoadError = function (type, url, name) {
  24571. return name ? 'Failed to load ' + type + ': ' + name + ' from url ' + url : 'Failed to load ' + type + ' url: ' + url;
  24572. };
  24573. var pluginLoadError = function (editor, url, name) {
  24574. logError(editor, 'PluginLoadError', createLoadError('plugin', url, name));
  24575. };
  24576. var iconsLoadError = function (editor, url, name) {
  24577. logError(editor, 'IconsLoadError', createLoadError('icons', url, name));
  24578. };
  24579. var languageLoadError = function (editor, url, name) {
  24580. logError(editor, 'LanguageLoadError', createLoadError('language', url, name));
  24581. };
  24582. var pluginInitError = function (editor, name, err) {
  24583. var message = I18n.translate([
  24584. 'Failed to initialize plugin: {0}',
  24585. name
  24586. ]);
  24587. fireError(editor, 'PluginLoadError', { message: message });
  24588. initError(message, err);
  24589. displayError(editor, message);
  24590. };
  24591. var initError = function (message) {
  24592. var x = [];
  24593. for (var _i = 1; _i < arguments.length; _i++) {
  24594. x[_i - 1] = arguments[_i];
  24595. }
  24596. var console = window.console;
  24597. if (console) {
  24598. if (console.error) {
  24599. console.error.apply(console, __spreadArray([message], x, false));
  24600. } else {
  24601. console.log.apply(console, __spreadArray([message], x, false));
  24602. }
  24603. }
  24604. };
  24605. var isContentCssSkinName = function (url) {
  24606. return /^[a-z0-9\-]+$/i.test(url);
  24607. };
  24608. var getContentCssUrls = function (editor) {
  24609. return transformToUrls(editor, getContentCss(editor));
  24610. };
  24611. var getFontCssUrls = function (editor) {
  24612. return transformToUrls(editor, getFontCss(editor));
  24613. };
  24614. var transformToUrls = function (editor, cssLinks) {
  24615. var skinUrl = editor.editorManager.baseURL + '/skins/content';
  24616. var suffix = editor.editorManager.suffix;
  24617. var contentCssFile = 'content' + suffix + '.css';
  24618. var inline = editor.inline === true;
  24619. return map$3(cssLinks, function (url) {
  24620. if (isContentCssSkinName(url) && !inline) {
  24621. return skinUrl + '/' + url + '/' + contentCssFile;
  24622. } else {
  24623. return editor.documentBaseURI.toAbsolute(url);
  24624. }
  24625. });
  24626. };
  24627. var appendContentCssFromSettings = function (editor) {
  24628. editor.contentCSS = editor.contentCSS.concat(getContentCssUrls(editor), getFontCssUrls(editor));
  24629. };
  24630. var UploadStatus = function () {
  24631. var PENDING = 1, UPLOADED = 2;
  24632. var blobUriStatuses = {};
  24633. var createStatus = function (status, resultUri) {
  24634. return {
  24635. status: status,
  24636. resultUri: resultUri
  24637. };
  24638. };
  24639. var hasBlobUri = function (blobUri) {
  24640. return blobUri in blobUriStatuses;
  24641. };
  24642. var getResultUri = function (blobUri) {
  24643. var result = blobUriStatuses[blobUri];
  24644. return result ? result.resultUri : null;
  24645. };
  24646. var isPending = function (blobUri) {
  24647. return hasBlobUri(blobUri) ? blobUriStatuses[blobUri].status === PENDING : false;
  24648. };
  24649. var isUploaded = function (blobUri) {
  24650. return hasBlobUri(blobUri) ? blobUriStatuses[blobUri].status === UPLOADED : false;
  24651. };
  24652. var markPending = function (blobUri) {
  24653. blobUriStatuses[blobUri] = createStatus(PENDING, null);
  24654. };
  24655. var markUploaded = function (blobUri, resultUri) {
  24656. blobUriStatuses[blobUri] = createStatus(UPLOADED, resultUri);
  24657. };
  24658. var removeFailed = function (blobUri) {
  24659. delete blobUriStatuses[blobUri];
  24660. };
  24661. var destroy = function () {
  24662. blobUriStatuses = {};
  24663. };
  24664. return {
  24665. hasBlobUri: hasBlobUri,
  24666. getResultUri: getResultUri,
  24667. isPending: isPending,
  24668. isUploaded: isUploaded,
  24669. markPending: markPending,
  24670. markUploaded: markUploaded,
  24671. removeFailed: removeFailed,
  24672. destroy: destroy
  24673. };
  24674. };
  24675. var count = 0;
  24676. var seed = function () {
  24677. var rnd = function () {
  24678. return Math.round(Math.random() * 4294967295).toString(36);
  24679. };
  24680. var now = new Date().getTime();
  24681. return 's' + now.toString(36) + rnd() + rnd() + rnd();
  24682. };
  24683. var uuid = function (prefix) {
  24684. return prefix + count++ + seed();
  24685. };
  24686. var BlobCache = function () {
  24687. var cache = [];
  24688. var mimeToExt = function (mime) {
  24689. var mimes = {
  24690. 'image/jpeg': 'jpg',
  24691. 'image/jpg': 'jpg',
  24692. 'image/gif': 'gif',
  24693. 'image/png': 'png',
  24694. 'image/apng': 'apng',
  24695. 'image/avif': 'avif',
  24696. 'image/svg+xml': 'svg',
  24697. 'image/webp': 'webp',
  24698. 'image/bmp': 'bmp',
  24699. 'image/tiff': 'tiff'
  24700. };
  24701. return mimes[mime.toLowerCase()] || 'dat';
  24702. };
  24703. var create = function (o, blob, base64, name, filename) {
  24704. if (isString$1(o)) {
  24705. var id = o;
  24706. return toBlobInfo({
  24707. id: id,
  24708. name: name,
  24709. filename: filename,
  24710. blob: blob,
  24711. base64: base64
  24712. });
  24713. } else if (isObject(o)) {
  24714. return toBlobInfo(o);
  24715. } else {
  24716. throw new Error('Unknown input type');
  24717. }
  24718. };
  24719. var toBlobInfo = function (o) {
  24720. if (!o.blob || !o.base64) {
  24721. throw new Error('blob and base64 representations of the image are required for BlobInfo to be created');
  24722. }
  24723. var id = o.id || uuid('blobid');
  24724. var name = o.name || id;
  24725. var blob = o.blob;
  24726. return {
  24727. id: constant(id),
  24728. name: constant(name),
  24729. filename: constant(o.filename || name + '.' + mimeToExt(blob.type)),
  24730. blob: constant(blob),
  24731. base64: constant(o.base64),
  24732. blobUri: constant(o.blobUri || URL.createObjectURL(blob)),
  24733. uri: constant(o.uri)
  24734. };
  24735. };
  24736. var add = function (blobInfo) {
  24737. if (!get(blobInfo.id())) {
  24738. cache.push(blobInfo);
  24739. }
  24740. };
  24741. var findFirst = function (predicate) {
  24742. return find$3(cache, predicate).getOrUndefined();
  24743. };
  24744. var get = function (id) {
  24745. return findFirst(function (cachedBlobInfo) {
  24746. return cachedBlobInfo.id() === id;
  24747. });
  24748. };
  24749. var getByUri = function (blobUri) {
  24750. return findFirst(function (blobInfo) {
  24751. return blobInfo.blobUri() === blobUri;
  24752. });
  24753. };
  24754. var getByData = function (base64, type) {
  24755. return findFirst(function (blobInfo) {
  24756. return blobInfo.base64() === base64 && blobInfo.blob().type === type;
  24757. });
  24758. };
  24759. var removeByUri = function (blobUri) {
  24760. cache = filter$4(cache, function (blobInfo) {
  24761. if (blobInfo.blobUri() === blobUri) {
  24762. URL.revokeObjectURL(blobInfo.blobUri());
  24763. return false;
  24764. }
  24765. return true;
  24766. });
  24767. };
  24768. var destroy = function () {
  24769. each$k(cache, function (cachedBlobInfo) {
  24770. URL.revokeObjectURL(cachedBlobInfo.blobUri());
  24771. });
  24772. cache = [];
  24773. };
  24774. return {
  24775. create: create,
  24776. add: add,
  24777. get: get,
  24778. getByUri: getByUri,
  24779. getByData: getByData,
  24780. findFirst: findFirst,
  24781. removeByUri: removeByUri,
  24782. destroy: destroy
  24783. };
  24784. };
  24785. var Uploader = function (uploadStatus, settings) {
  24786. var pendingPromises = {};
  24787. var pathJoin = function (path1, path2) {
  24788. if (path1) {
  24789. return path1.replace(/\/$/, '') + '/' + path2.replace(/^\//, '');
  24790. }
  24791. return path2;
  24792. };
  24793. var defaultHandler = function (blobInfo, success, failure, progress) {
  24794. var xhr = new XMLHttpRequest();
  24795. xhr.open('POST', settings.url);
  24796. xhr.withCredentials = settings.credentials;
  24797. xhr.upload.onprogress = function (e) {
  24798. progress(e.loaded / e.total * 100);
  24799. };
  24800. xhr.onerror = function () {
  24801. failure('Image upload failed due to a XHR Transport error. Code: ' + xhr.status);
  24802. };
  24803. xhr.onload = function () {
  24804. if (xhr.status < 200 || xhr.status >= 300) {
  24805. failure('HTTP Error: ' + xhr.status);
  24806. return;
  24807. }
  24808. var json = JSON.parse(xhr.responseText);
  24809. if (!json || typeof json.location !== 'string') {
  24810. failure('Invalid JSON: ' + xhr.responseText);
  24811. return;
  24812. }
  24813. success(pathJoin(settings.basePath, json.location));
  24814. };
  24815. var formData = new FormData();
  24816. formData.append('file', blobInfo.blob(), blobInfo.filename());
  24817. xhr.send(formData);
  24818. };
  24819. var noUpload = function () {
  24820. return new promiseObj(function (resolve) {
  24821. resolve([]);
  24822. });
  24823. };
  24824. var handlerSuccess = function (blobInfo, url) {
  24825. return {
  24826. url: url,
  24827. blobInfo: blobInfo,
  24828. status: true
  24829. };
  24830. };
  24831. var handlerFailure = function (blobInfo, message, options) {
  24832. return {
  24833. url: '',
  24834. blobInfo: blobInfo,
  24835. status: false,
  24836. error: {
  24837. message: message,
  24838. options: options
  24839. }
  24840. };
  24841. };
  24842. var resolvePending = function (blobUri, result) {
  24843. Tools.each(pendingPromises[blobUri], function (resolve) {
  24844. resolve(result);
  24845. });
  24846. delete pendingPromises[blobUri];
  24847. };
  24848. var uploadBlobInfo = function (blobInfo, handler, openNotification) {
  24849. uploadStatus.markPending(blobInfo.blobUri());
  24850. return new promiseObj(function (resolve) {
  24851. var notification, progress;
  24852. try {
  24853. var closeNotification_1 = function () {
  24854. if (notification) {
  24855. notification.close();
  24856. progress = noop;
  24857. }
  24858. };
  24859. var success = function (url) {
  24860. closeNotification_1();
  24861. uploadStatus.markUploaded(blobInfo.blobUri(), url);
  24862. resolvePending(blobInfo.blobUri(), handlerSuccess(blobInfo, url));
  24863. resolve(handlerSuccess(blobInfo, url));
  24864. };
  24865. var failure = function (error, options) {
  24866. var failureOptions = options ? options : {};
  24867. closeNotification_1();
  24868. uploadStatus.removeFailed(blobInfo.blobUri());
  24869. resolvePending(blobInfo.blobUri(), handlerFailure(blobInfo, error, failureOptions));
  24870. resolve(handlerFailure(blobInfo, error, failureOptions));
  24871. };
  24872. progress = function (percent) {
  24873. if (percent < 0 || percent > 100) {
  24874. return;
  24875. }
  24876. Optional.from(notification).orThunk(function () {
  24877. return Optional.from(openNotification).map(apply);
  24878. }).each(function (n) {
  24879. notification = n;
  24880. n.progressBar.value(percent);
  24881. });
  24882. };
  24883. handler(blobInfo, success, failure, progress);
  24884. } catch (ex) {
  24885. resolve(handlerFailure(blobInfo, ex.message, {}));
  24886. }
  24887. });
  24888. };
  24889. var isDefaultHandler = function (handler) {
  24890. return handler === defaultHandler;
  24891. };
  24892. var pendingUploadBlobInfo = function (blobInfo) {
  24893. var blobUri = blobInfo.blobUri();
  24894. return new promiseObj(function (resolve) {
  24895. pendingPromises[blobUri] = pendingPromises[blobUri] || [];
  24896. pendingPromises[blobUri].push(resolve);
  24897. });
  24898. };
  24899. var uploadBlobs = function (blobInfos, openNotification) {
  24900. blobInfos = Tools.grep(blobInfos, function (blobInfo) {
  24901. return !uploadStatus.isUploaded(blobInfo.blobUri());
  24902. });
  24903. return promiseObj.all(Tools.map(blobInfos, function (blobInfo) {
  24904. return uploadStatus.isPending(blobInfo.blobUri()) ? pendingUploadBlobInfo(blobInfo) : uploadBlobInfo(blobInfo, settings.handler, openNotification);
  24905. }));
  24906. };
  24907. var upload = function (blobInfos, openNotification) {
  24908. return !settings.url && isDefaultHandler(settings.handler) ? noUpload() : uploadBlobs(blobInfos, openNotification);
  24909. };
  24910. if (isFunction(settings.handler) === false) {
  24911. settings.handler = defaultHandler;
  24912. }
  24913. return { upload: upload };
  24914. };
  24915. var openNotification = function (editor) {
  24916. return function () {
  24917. return editor.notificationManager.open({
  24918. text: editor.translate('Image uploading...'),
  24919. type: 'info',
  24920. timeout: -1,
  24921. progressBar: true
  24922. });
  24923. };
  24924. };
  24925. var createUploader = function (editor, uploadStatus) {
  24926. return Uploader(uploadStatus, {
  24927. url: getImageUploadUrl(editor),
  24928. basePath: getImageUploadBasePath(editor),
  24929. credentials: getImagesUploadCredentials(editor),
  24930. handler: getImagesUploadHandler(editor)
  24931. });
  24932. };
  24933. var ImageUploader = function (editor) {
  24934. var uploadStatus = UploadStatus();
  24935. var uploader = createUploader(editor, uploadStatus);
  24936. return {
  24937. upload: function (blobInfos, showNotification) {
  24938. if (showNotification === void 0) {
  24939. showNotification = true;
  24940. }
  24941. return uploader.upload(blobInfos, showNotification ? openNotification(editor) : undefined);
  24942. }
  24943. };
  24944. };
  24945. var UploadChangeHandler = function (editor) {
  24946. var lastChangedLevel = Cell(null);
  24947. editor.on('change AddUndo', function (e) {
  24948. lastChangedLevel.set(__assign({}, e.level));
  24949. });
  24950. var fireIfChanged = function () {
  24951. var data = editor.undoManager.data;
  24952. last$2(data).filter(function (level) {
  24953. return !isEq$1(lastChangedLevel.get(), level);
  24954. }).each(function (level) {
  24955. editor.setDirty(true);
  24956. editor.fire('change', {
  24957. level: level,
  24958. lastLevel: get$a(data, data.length - 2).getOrNull()
  24959. });
  24960. });
  24961. };
  24962. return { fireIfChanged: fireIfChanged };
  24963. };
  24964. var EditorUpload = function (editor) {
  24965. var blobCache = BlobCache();
  24966. var uploader, imageScanner;
  24967. var uploadStatus = UploadStatus();
  24968. var urlFilters = [];
  24969. var changeHandler = UploadChangeHandler(editor);
  24970. var aliveGuard = function (callback) {
  24971. return function (result) {
  24972. if (editor.selection) {
  24973. return callback(result);
  24974. }
  24975. return [];
  24976. };
  24977. };
  24978. var cacheInvalidator = function (url) {
  24979. return url + (url.indexOf('?') === -1 ? '?' : '&') + new Date().getTime();
  24980. };
  24981. var replaceString = function (content, search, replace) {
  24982. var index = 0;
  24983. do {
  24984. index = content.indexOf(search, index);
  24985. if (index !== -1) {
  24986. content = content.substring(0, index) + replace + content.substr(index + search.length);
  24987. index += replace.length - search.length + 1;
  24988. }
  24989. } while (index !== -1);
  24990. return content;
  24991. };
  24992. var replaceImageUrl = function (content, targetUrl, replacementUrl) {
  24993. var replacementString = 'src="' + replacementUrl + '"' + (replacementUrl === Env.transparentSrc ? ' data-mce-placeholder="1"' : '');
  24994. content = replaceString(content, 'src="' + targetUrl + '"', replacementString);
  24995. content = replaceString(content, 'data-mce-src="' + targetUrl + '"', 'data-mce-src="' + replacementUrl + '"');
  24996. return content;
  24997. };
  24998. var replaceUrlInUndoStack = function (targetUrl, replacementUrl) {
  24999. each$k(editor.undoManager.data, function (level) {
  25000. if (level.type === 'fragmented') {
  25001. level.fragments = map$3(level.fragments, function (fragment) {
  25002. return replaceImageUrl(fragment, targetUrl, replacementUrl);
  25003. });
  25004. } else {
  25005. level.content = replaceImageUrl(level.content, targetUrl, replacementUrl);
  25006. }
  25007. });
  25008. };
  25009. var replaceImageUriInView = function (image, resultUri) {
  25010. var src = editor.convertURL(resultUri, 'src');
  25011. replaceUrlInUndoStack(image.src, resultUri);
  25012. editor.$(image).attr({
  25013. 'src': shouldReuseFileName(editor) ? cacheInvalidator(resultUri) : resultUri,
  25014. 'data-mce-src': src
  25015. });
  25016. };
  25017. var uploadImages = function (callback) {
  25018. if (!uploader) {
  25019. uploader = createUploader(editor, uploadStatus);
  25020. }
  25021. return scanForImages().then(aliveGuard(function (imageInfos) {
  25022. var blobInfos = map$3(imageInfos, function (imageInfo) {
  25023. return imageInfo.blobInfo;
  25024. });
  25025. return uploader.upload(blobInfos, openNotification(editor)).then(aliveGuard(function (result) {
  25026. var imagesToRemove = [];
  25027. var filteredResult = map$3(result, function (uploadInfo, index) {
  25028. var blobInfo = imageInfos[index].blobInfo;
  25029. var image = imageInfos[index].image;
  25030. if (uploadInfo.status && shouldReplaceBlobUris(editor)) {
  25031. blobCache.removeByUri(image.src);
  25032. if (isRtc(editor)) ; else {
  25033. replaceImageUriInView(image, uploadInfo.url);
  25034. }
  25035. } else if (uploadInfo.error) {
  25036. if (uploadInfo.error.options.remove) {
  25037. replaceUrlInUndoStack(image.getAttribute('src'), Env.transparentSrc);
  25038. imagesToRemove.push(image);
  25039. }
  25040. uploadError(editor, uploadInfo.error.message);
  25041. }
  25042. return {
  25043. element: image,
  25044. status: uploadInfo.status,
  25045. uploadUri: uploadInfo.url,
  25046. blobInfo: blobInfo
  25047. };
  25048. });
  25049. if (filteredResult.length > 0) {
  25050. changeHandler.fireIfChanged();
  25051. }
  25052. if (imagesToRemove.length > 0) {
  25053. if (isRtc(editor)) {
  25054. console.error('Removing images on failed uploads is currently unsupported for RTC');
  25055. } else {
  25056. editor.undoManager.transact(function () {
  25057. each$k(imagesToRemove, function (element) {
  25058. editor.dom.remove(element);
  25059. blobCache.removeByUri(element.src);
  25060. });
  25061. });
  25062. }
  25063. }
  25064. if (callback) {
  25065. callback(filteredResult);
  25066. }
  25067. return filteredResult;
  25068. }));
  25069. }));
  25070. };
  25071. var uploadImagesAuto = function (callback) {
  25072. if (isAutomaticUploadsEnabled(editor)) {
  25073. return uploadImages(callback);
  25074. }
  25075. };
  25076. var isValidDataUriImage = function (imgElm) {
  25077. if (forall(urlFilters, function (filter) {
  25078. return filter(imgElm);
  25079. }) === false) {
  25080. return false;
  25081. }
  25082. if (imgElm.getAttribute('src').indexOf('data:') === 0) {
  25083. var dataImgFilter = getImagesDataImgFilter(editor);
  25084. return dataImgFilter(imgElm);
  25085. }
  25086. return true;
  25087. };
  25088. var addFilter = function (filter) {
  25089. urlFilters.push(filter);
  25090. };
  25091. var scanForImages = function () {
  25092. if (!imageScanner) {
  25093. imageScanner = ImageScanner(uploadStatus, blobCache);
  25094. }
  25095. return imageScanner.findAll(editor.getBody(), isValidDataUriImage).then(aliveGuard(function (result) {
  25096. result = filter$4(result, function (resultItem) {
  25097. if (typeof resultItem === 'string') {
  25098. displayError(editor, resultItem);
  25099. return false;
  25100. }
  25101. return true;
  25102. });
  25103. if (isRtc(editor)) ; else {
  25104. each$k(result, function (resultItem) {
  25105. replaceUrlInUndoStack(resultItem.image.src, resultItem.blobInfo.blobUri());
  25106. resultItem.image.src = resultItem.blobInfo.blobUri();
  25107. resultItem.image.removeAttribute('data-mce-src');
  25108. });
  25109. }
  25110. return result;
  25111. }));
  25112. };
  25113. var destroy = function () {
  25114. blobCache.destroy();
  25115. uploadStatus.destroy();
  25116. imageScanner = uploader = null;
  25117. };
  25118. var replaceBlobUris = function (content) {
  25119. return content.replace(/src="(blob:[^"]+)"/g, function (match, blobUri) {
  25120. var resultUri = uploadStatus.getResultUri(blobUri);
  25121. if (resultUri) {
  25122. return 'src="' + resultUri + '"';
  25123. }
  25124. var blobInfo = blobCache.getByUri(blobUri);
  25125. if (!blobInfo) {
  25126. blobInfo = foldl(editor.editorManager.get(), function (result, editor) {
  25127. return result || editor.editorUpload && editor.editorUpload.blobCache.getByUri(blobUri);
  25128. }, null);
  25129. }
  25130. if (blobInfo) {
  25131. var blob = blobInfo.blob();
  25132. return 'src="data:' + blob.type + ';base64,' + blobInfo.base64() + '"';
  25133. }
  25134. return match;
  25135. });
  25136. };
  25137. editor.on('SetContent', function () {
  25138. if (isAutomaticUploadsEnabled(editor)) {
  25139. uploadImagesAuto();
  25140. } else {
  25141. scanForImages();
  25142. }
  25143. });
  25144. editor.on('RawSaveContent', function (e) {
  25145. e.content = replaceBlobUris(e.content);
  25146. });
  25147. editor.on('GetContent', function (e) {
  25148. if (e.source_view || e.format === 'raw' || e.format === 'tree') {
  25149. return;
  25150. }
  25151. e.content = replaceBlobUris(e.content);
  25152. });
  25153. editor.on('PostRender', function () {
  25154. editor.parser.addNodeFilter('img', function (images) {
  25155. each$k(images, function (img) {
  25156. var src = img.attr('src');
  25157. if (blobCache.getByUri(src)) {
  25158. return;
  25159. }
  25160. var resultUri = uploadStatus.getResultUri(src);
  25161. if (resultUri) {
  25162. img.attr('src', resultUri);
  25163. }
  25164. });
  25165. });
  25166. });
  25167. return {
  25168. blobCache: blobCache,
  25169. addFilter: addFilter,
  25170. uploadImages: uploadImages,
  25171. uploadImagesAuto: uploadImagesAuto,
  25172. scanForImages: scanForImages,
  25173. destroy: destroy
  25174. };
  25175. };
  25176. var get = function (dom) {
  25177. var formats = {
  25178. valigntop: [{
  25179. selector: 'td,th',
  25180. styles: { verticalAlign: 'top' }
  25181. }],
  25182. valignmiddle: [{
  25183. selector: 'td,th',
  25184. styles: { verticalAlign: 'middle' }
  25185. }],
  25186. valignbottom: [{
  25187. selector: 'td,th',
  25188. styles: { verticalAlign: 'bottom' }
  25189. }],
  25190. alignleft: [
  25191. {
  25192. selector: 'figure.image',
  25193. collapsed: false,
  25194. classes: 'align-left',
  25195. ceFalseOverride: true,
  25196. preview: 'font-family font-size'
  25197. },
  25198. {
  25199. selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
  25200. styles: { textAlign: 'left' },
  25201. inherit: false,
  25202. preview: false,
  25203. defaultBlock: 'div'
  25204. },
  25205. {
  25206. selector: 'img,table,audio,video',
  25207. collapsed: false,
  25208. styles: { float: 'left' },
  25209. preview: 'font-family font-size'
  25210. }
  25211. ],
  25212. aligncenter: [
  25213. {
  25214. selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
  25215. styles: { textAlign: 'center' },
  25216. inherit: false,
  25217. preview: 'font-family font-size',
  25218. defaultBlock: 'div'
  25219. },
  25220. {
  25221. selector: 'figure.image',
  25222. collapsed: false,
  25223. classes: 'align-center',
  25224. ceFalseOverride: true,
  25225. preview: 'font-family font-size'
  25226. },
  25227. {
  25228. selector: 'img,audio,video',
  25229. collapsed: false,
  25230. styles: {
  25231. display: 'block',
  25232. marginLeft: 'auto',
  25233. marginRight: 'auto'
  25234. },
  25235. preview: false
  25236. },
  25237. {
  25238. selector: 'table',
  25239. collapsed: false,
  25240. styles: {
  25241. marginLeft: 'auto',
  25242. marginRight: 'auto'
  25243. },
  25244. preview: 'font-family font-size'
  25245. }
  25246. ],
  25247. alignright: [
  25248. {
  25249. selector: 'figure.image',
  25250. collapsed: false,
  25251. classes: 'align-right',
  25252. ceFalseOverride: true,
  25253. preview: 'font-family font-size'
  25254. },
  25255. {
  25256. selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
  25257. styles: { textAlign: 'right' },
  25258. inherit: false,
  25259. preview: 'font-family font-size',
  25260. defaultBlock: 'div'
  25261. },
  25262. {
  25263. selector: 'img,table,audio,video',
  25264. collapsed: false,
  25265. styles: { float: 'right' },
  25266. preview: 'font-family font-size'
  25267. }
  25268. ],
  25269. alignjustify: [{
  25270. selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li',
  25271. styles: { textAlign: 'justify' },
  25272. inherit: false,
  25273. defaultBlock: 'div',
  25274. preview: 'font-family font-size'
  25275. }],
  25276. bold: [
  25277. {
  25278. inline: 'strong',
  25279. remove: 'all',
  25280. preserve_attributes: [
  25281. 'class',
  25282. 'style'
  25283. ]
  25284. },
  25285. {
  25286. inline: 'span',
  25287. styles: { fontWeight: 'bold' }
  25288. },
  25289. {
  25290. inline: 'b',
  25291. remove: 'all',
  25292. preserve_attributes: [
  25293. 'class',
  25294. 'style'
  25295. ]
  25296. }
  25297. ],
  25298. italic: [
  25299. {
  25300. inline: 'em',
  25301. remove: 'all',
  25302. preserve_attributes: [
  25303. 'class',
  25304. 'style'
  25305. ]
  25306. },
  25307. {
  25308. inline: 'span',
  25309. styles: { fontStyle: 'italic' }
  25310. },
  25311. {
  25312. inline: 'i',
  25313. remove: 'all',
  25314. preserve_attributes: [
  25315. 'class',
  25316. 'style'
  25317. ]
  25318. }
  25319. ],
  25320. underline: [
  25321. {
  25322. inline: 'span',
  25323. styles: { textDecoration: 'underline' },
  25324. exact: true
  25325. },
  25326. {
  25327. inline: 'u',
  25328. remove: 'all',
  25329. preserve_attributes: [
  25330. 'class',
  25331. 'style'
  25332. ]
  25333. }
  25334. ],
  25335. strikethrough: [
  25336. {
  25337. inline: 'span',
  25338. styles: { textDecoration: 'line-through' },
  25339. exact: true
  25340. },
  25341. {
  25342. inline: 'strike',
  25343. remove: 'all',
  25344. preserve_attributes: [
  25345. 'class',
  25346. 'style'
  25347. ]
  25348. },
  25349. {
  25350. inline: 's',
  25351. remove: 'all',
  25352. preserve_attributes: [
  25353. 'class',
  25354. 'style'
  25355. ]
  25356. }
  25357. ],
  25358. forecolor: {
  25359. inline: 'span',
  25360. styles: { color: '%value' },
  25361. links: true,
  25362. remove_similar: true,
  25363. clear_child_styles: true
  25364. },
  25365. hilitecolor: {
  25366. inline: 'span',
  25367. styles: { backgroundColor: '%value' },
  25368. links: true,
  25369. remove_similar: true,
  25370. clear_child_styles: true
  25371. },
  25372. fontname: {
  25373. inline: 'span',
  25374. toggle: false,
  25375. styles: { fontFamily: '%value' },
  25376. clear_child_styles: true
  25377. },
  25378. fontsize: {
  25379. inline: 'span',
  25380. toggle: false,
  25381. styles: { fontSize: '%value' },
  25382. clear_child_styles: true
  25383. },
  25384. lineheight: {
  25385. selector: 'h1,h2,h3,h4,h5,h6,p,li,td,th,div',
  25386. defaultBlock: 'p',
  25387. styles: { lineHeight: '%value' }
  25388. },
  25389. fontsize_class: {
  25390. inline: 'span',
  25391. attributes: { class: '%value' }
  25392. },
  25393. blockquote: {
  25394. block: 'blockquote',
  25395. wrapper: true,
  25396. remove: 'all'
  25397. },
  25398. subscript: { inline: 'sub' },
  25399. superscript: { inline: 'sup' },
  25400. code: { inline: 'code' },
  25401. link: {
  25402. inline: 'a',
  25403. selector: 'a',
  25404. remove: 'all',
  25405. split: true,
  25406. deep: true,
  25407. onmatch: function (node, _fmt, _itemName) {
  25408. return isElement$5(node) && node.hasAttribute('href');
  25409. },
  25410. onformat: function (elm, _fmt, vars) {
  25411. Tools.each(vars, function (value, key) {
  25412. dom.setAttrib(elm, key, value);
  25413. });
  25414. }
  25415. },
  25416. lang: {
  25417. inline: 'span',
  25418. clear_child_styles: true,
  25419. remove_similar: true,
  25420. attributes: {
  25421. 'lang': '%value',
  25422. 'data-mce-lang': function (vars) {
  25423. var _a;
  25424. return (_a = vars === null || vars === void 0 ? void 0 : vars.customValue) !== null && _a !== void 0 ? _a : null;
  25425. }
  25426. }
  25427. },
  25428. removeformat: [
  25429. {
  25430. selector: 'b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small',
  25431. remove: 'all',
  25432. split: true,
  25433. expand: false,
  25434. block_expand: true,
  25435. deep: true
  25436. },
  25437. {
  25438. selector: 'span',
  25439. attributes: [
  25440. 'style',
  25441. 'class'
  25442. ],
  25443. remove: 'empty',
  25444. split: true,
  25445. expand: false,
  25446. deep: true
  25447. },
  25448. {
  25449. selector: '*',
  25450. attributes: [
  25451. 'style',
  25452. 'class'
  25453. ],
  25454. split: false,
  25455. expand: false,
  25456. deep: true
  25457. }
  25458. ]
  25459. };
  25460. Tools.each('p h1 h2 h3 h4 h5 h6 div address pre dt dd samp'.split(/\s/), function (name) {
  25461. formats[name] = {
  25462. block: name,
  25463. remove: 'all'
  25464. };
  25465. });
  25466. return formats;
  25467. };
  25468. var FormatRegistry = function (editor) {
  25469. var formats = {};
  25470. var get$1 = function (name) {
  25471. return isNonNullable(name) ? formats[name] : formats;
  25472. };
  25473. var has = function (name) {
  25474. return has$2(formats, name);
  25475. };
  25476. var register = function (name, format) {
  25477. if (name) {
  25478. if (!isString$1(name)) {
  25479. each$j(name, function (format, name) {
  25480. register(name, format);
  25481. });
  25482. } else {
  25483. if (!isArray$1(format)) {
  25484. format = [format];
  25485. }
  25486. each$k(format, function (format) {
  25487. if (isUndefined(format.deep)) {
  25488. format.deep = !isSelectorFormat(format);
  25489. }
  25490. if (isUndefined(format.split)) {
  25491. format.split = !isSelectorFormat(format) || isInlineFormat(format);
  25492. }
  25493. if (isUndefined(format.remove) && isSelectorFormat(format) && !isInlineFormat(format)) {
  25494. format.remove = 'none';
  25495. }
  25496. if (isSelectorFormat(format) && isInlineFormat(format)) {
  25497. format.mixed = true;
  25498. format.block_expand = true;
  25499. }
  25500. if (isString$1(format.classes)) {
  25501. format.classes = format.classes.split(/\s+/);
  25502. }
  25503. });
  25504. formats[name] = format;
  25505. }
  25506. }
  25507. };
  25508. var unregister = function (name) {
  25509. if (name && formats[name]) {
  25510. delete formats[name];
  25511. }
  25512. return formats;
  25513. };
  25514. register(get(editor.dom));
  25515. register(getFormats(editor));
  25516. return {
  25517. get: get$1,
  25518. has: has,
  25519. register: register,
  25520. unregister: unregister
  25521. };
  25522. };
  25523. var each$5 = Tools.each;
  25524. var dom = DOMUtils.DOM;
  25525. var parsedSelectorToHtml = function (ancestry, editor) {
  25526. var elm, item, fragment;
  25527. var schema = editor && editor.schema || Schema({});
  25528. var decorate = function (elm, item) {
  25529. if (item.classes.length) {
  25530. dom.addClass(elm, item.classes.join(' '));
  25531. }
  25532. dom.setAttribs(elm, item.attrs);
  25533. };
  25534. var createElement = function (sItem) {
  25535. item = typeof sItem === 'string' ? {
  25536. name: sItem,
  25537. classes: [],
  25538. attrs: {}
  25539. } : sItem;
  25540. var elm = dom.create(item.name);
  25541. decorate(elm, item);
  25542. return elm;
  25543. };
  25544. var getRequiredParent = function (elm, candidate) {
  25545. var name = typeof elm !== 'string' ? elm.nodeName.toLowerCase() : elm;
  25546. var elmRule = schema.getElementRule(name);
  25547. var parentsRequired = elmRule && elmRule.parentsRequired;
  25548. if (parentsRequired && parentsRequired.length) {
  25549. return candidate && Tools.inArray(parentsRequired, candidate) !== -1 ? candidate : parentsRequired[0];
  25550. } else {
  25551. return false;
  25552. }
  25553. };
  25554. var wrapInHtml = function (elm, ancestry, siblings) {
  25555. var parent, parentCandidate;
  25556. var ancestor = ancestry.length > 0 && ancestry[0];
  25557. var ancestorName = ancestor && ancestor.name;
  25558. var parentRequired = getRequiredParent(elm, ancestorName);
  25559. if (parentRequired) {
  25560. if (ancestorName === parentRequired) {
  25561. parentCandidate = ancestry[0];
  25562. ancestry = ancestry.slice(1);
  25563. } else {
  25564. parentCandidate = parentRequired;
  25565. }
  25566. } else if (ancestor) {
  25567. parentCandidate = ancestry[0];
  25568. ancestry = ancestry.slice(1);
  25569. } else if (!siblings) {
  25570. return elm;
  25571. }
  25572. if (parentCandidate) {
  25573. parent = createElement(parentCandidate);
  25574. parent.appendChild(elm);
  25575. }
  25576. if (siblings) {
  25577. if (!parent) {
  25578. parent = dom.create('div');
  25579. parent.appendChild(elm);
  25580. }
  25581. Tools.each(siblings, function (sibling) {
  25582. var siblingElm = createElement(sibling);
  25583. parent.insertBefore(siblingElm, elm);
  25584. });
  25585. }
  25586. return wrapInHtml(parent, ancestry, parentCandidate && parentCandidate.siblings);
  25587. };
  25588. if (ancestry && ancestry.length) {
  25589. item = ancestry[0];
  25590. elm = createElement(item);
  25591. fragment = dom.create('div');
  25592. fragment.appendChild(wrapInHtml(elm, ancestry.slice(1), item.siblings));
  25593. return fragment;
  25594. } else {
  25595. return '';
  25596. }
  25597. };
  25598. var parseSelectorItem = function (item) {
  25599. var tagName;
  25600. var obj = {
  25601. classes: [],
  25602. attrs: {}
  25603. };
  25604. item = obj.selector = Tools.trim(item);
  25605. if (item !== '*') {
  25606. tagName = item.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g, function ($0, $1, $2, $3, $4) {
  25607. switch ($1) {
  25608. case '#':
  25609. obj.attrs.id = $2;
  25610. break;
  25611. case '.':
  25612. obj.classes.push($2);
  25613. break;
  25614. case ':':
  25615. if (Tools.inArray('checked disabled enabled read-only required'.split(' '), $2) !== -1) {
  25616. obj.attrs[$2] = $2;
  25617. }
  25618. break;
  25619. }
  25620. if ($3 === '[') {
  25621. var m = $4.match(/([\w\-]+)(?:\=\"([^\"]+))?/);
  25622. if (m) {
  25623. obj.attrs[m[1]] = m[2];
  25624. }
  25625. }
  25626. return '';
  25627. });
  25628. }
  25629. obj.name = tagName || 'div';
  25630. return obj;
  25631. };
  25632. var parseSelector = function (selector) {
  25633. if (!selector || typeof selector !== 'string') {
  25634. return [];
  25635. }
  25636. selector = selector.split(/\s*,\s*/)[0];
  25637. selector = selector.replace(/\s*(~\+|~|\+|>)\s*/g, '$1');
  25638. return Tools.map(selector.split(/(?:>|\s+(?![^\[\]]+\]))/), function (item) {
  25639. var siblings = Tools.map(item.split(/(?:~\+|~|\+)/), parseSelectorItem);
  25640. var obj = siblings.pop();
  25641. if (siblings.length) {
  25642. obj.siblings = siblings;
  25643. }
  25644. return obj;
  25645. }).reverse();
  25646. };
  25647. var getCssText = function (editor, format) {
  25648. var name, previewFrag;
  25649. var previewCss = '', parentFontSize;
  25650. var previewStyles = getPreviewStyles(editor);
  25651. if (previewStyles === '') {
  25652. return '';
  25653. }
  25654. var removeVars = function (val) {
  25655. return val.replace(/%(\w+)/g, '');
  25656. };
  25657. if (typeof format === 'string') {
  25658. format = editor.formatter.get(format);
  25659. if (!format) {
  25660. return;
  25661. }
  25662. format = format[0];
  25663. }
  25664. if ('preview' in format) {
  25665. var previewOpt = get$9(format, 'preview');
  25666. if (is$1(previewOpt, false)) {
  25667. return '';
  25668. } else {
  25669. previewStyles = previewOpt.getOr(previewStyles);
  25670. }
  25671. }
  25672. name = format.block || format.inline || 'span';
  25673. var items = parseSelector(format.selector);
  25674. if (items.length) {
  25675. if (!items[0].name) {
  25676. items[0].name = name;
  25677. }
  25678. name = format.selector;
  25679. previewFrag = parsedSelectorToHtml(items, editor);
  25680. } else {
  25681. previewFrag = parsedSelectorToHtml([name], editor);
  25682. }
  25683. var previewElm = dom.select(name, previewFrag)[0] || previewFrag.firstChild;
  25684. each$5(format.styles, function (value, name) {
  25685. var newValue = removeVars(value);
  25686. if (newValue) {
  25687. dom.setStyle(previewElm, name, newValue);
  25688. }
  25689. });
  25690. each$5(format.attributes, function (value, name) {
  25691. var newValue = removeVars(value);
  25692. if (newValue) {
  25693. dom.setAttrib(previewElm, name, newValue);
  25694. }
  25695. });
  25696. each$5(format.classes, function (value) {
  25697. var newValue = removeVars(value);
  25698. if (!dom.hasClass(previewElm, newValue)) {
  25699. dom.addClass(previewElm, newValue);
  25700. }
  25701. });
  25702. editor.fire('PreviewFormats');
  25703. dom.setStyles(previewFrag, {
  25704. position: 'absolute',
  25705. left: -65535
  25706. });
  25707. editor.getBody().appendChild(previewFrag);
  25708. parentFontSize = dom.getStyle(editor.getBody(), 'fontSize', true);
  25709. parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;
  25710. each$5(previewStyles.split(' '), function (name) {
  25711. var value = dom.getStyle(previewElm, name, true);
  25712. if (name === 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) {
  25713. value = dom.getStyle(editor.getBody(), name, true);
  25714. if (dom.toHex(value).toLowerCase() === '#ffffff') {
  25715. return;
  25716. }
  25717. }
  25718. if (name === 'color') {
  25719. if (dom.toHex(value).toLowerCase() === '#000000') {
  25720. return;
  25721. }
  25722. }
  25723. if (name === 'font-size') {
  25724. if (/em|%$/.test(value)) {
  25725. if (parentFontSize === 0) {
  25726. return;
  25727. }
  25728. var numValue = parseFloat(value) / (/%$/.test(value) ? 100 : 1);
  25729. value = numValue * parentFontSize + 'px';
  25730. }
  25731. }
  25732. if (name === 'border' && value) {
  25733. previewCss += 'padding:0 2px;';
  25734. }
  25735. previewCss += name + ':' + value + ';';
  25736. });
  25737. editor.fire('AfterPreviewFormats');
  25738. dom.remove(previewFrag);
  25739. return previewCss;
  25740. };
  25741. var setup$h = function (editor) {
  25742. editor.addShortcut('meta+b', '', 'Bold');
  25743. editor.addShortcut('meta+i', '', 'Italic');
  25744. editor.addShortcut('meta+u', '', 'Underline');
  25745. for (var i = 1; i <= 6; i++) {
  25746. editor.addShortcut('access+' + i, '', [
  25747. 'FormatBlock',
  25748. false,
  25749. 'h' + i
  25750. ]);
  25751. }
  25752. editor.addShortcut('access+7', '', [
  25753. 'FormatBlock',
  25754. false,
  25755. 'p'
  25756. ]);
  25757. editor.addShortcut('access+8', '', [
  25758. 'FormatBlock',
  25759. false,
  25760. 'div'
  25761. ]);
  25762. editor.addShortcut('access+9', '', [
  25763. 'FormatBlock',
  25764. false,
  25765. 'address'
  25766. ]);
  25767. };
  25768. var Formatter = function (editor) {
  25769. var formats = FormatRegistry(editor);
  25770. var formatChangeState = Cell(null);
  25771. setup$h(editor);
  25772. setup$k(editor);
  25773. return {
  25774. get: formats.get,
  25775. has: formats.has,
  25776. register: formats.register,
  25777. unregister: formats.unregister,
  25778. apply: function (name, vars, node) {
  25779. applyFormat(editor, name, vars, node);
  25780. },
  25781. remove: function (name, vars, node, similar) {
  25782. removeFormat(editor, name, vars, node, similar);
  25783. },
  25784. toggle: function (name, vars, node) {
  25785. toggleFormat(editor, name, vars, node);
  25786. },
  25787. match: function (name, vars, node, similar) {
  25788. return matchFormat(editor, name, vars, node, similar);
  25789. },
  25790. closest: function (names) {
  25791. return closestFormat(editor, names);
  25792. },
  25793. matchAll: function (names, vars) {
  25794. return matchAllFormats(editor, names, vars);
  25795. },
  25796. matchNode: function (node, name, vars, similar) {
  25797. return matchNodeFormat(editor, node, name, vars, similar);
  25798. },
  25799. canApply: function (name) {
  25800. return canApplyFormat(editor, name);
  25801. },
  25802. formatChanged: function (formats, callback, similar, vars) {
  25803. return formatChanged(editor, formatChangeState, formats, callback, similar, vars);
  25804. },
  25805. getCssText: curry(getCssText, editor)
  25806. };
  25807. };
  25808. var shouldIgnoreCommand = function (cmd) {
  25809. switch (cmd.toLowerCase()) {
  25810. case 'undo':
  25811. case 'redo':
  25812. case 'mcerepaint':
  25813. case 'mcefocus':
  25814. return true;
  25815. default:
  25816. return false;
  25817. }
  25818. };
  25819. var registerEvents = function (editor, undoManager, locks) {
  25820. var isFirstTypedCharacter = Cell(false);
  25821. var addNonTypingUndoLevel = function (e) {
  25822. setTyping(undoManager, false, locks);
  25823. undoManager.add({}, e);
  25824. };
  25825. editor.on('init', function () {
  25826. undoManager.add();
  25827. });
  25828. editor.on('BeforeExecCommand', function (e) {
  25829. var cmd = e.command;
  25830. if (!shouldIgnoreCommand(cmd)) {
  25831. endTyping(undoManager, locks);
  25832. undoManager.beforeChange();
  25833. }
  25834. });
  25835. editor.on('ExecCommand', function (e) {
  25836. var cmd = e.command;
  25837. if (!shouldIgnoreCommand(cmd)) {
  25838. addNonTypingUndoLevel(e);
  25839. }
  25840. });
  25841. editor.on('ObjectResizeStart cut', function () {
  25842. undoManager.beforeChange();
  25843. });
  25844. editor.on('SaveContent ObjectResized blur', addNonTypingUndoLevel);
  25845. editor.on('dragend', addNonTypingUndoLevel);
  25846. editor.on('keyup', function (e) {
  25847. var keyCode = e.keyCode;
  25848. if (e.isDefaultPrevented()) {
  25849. return;
  25850. }
  25851. if (keyCode >= 33 && keyCode <= 36 || keyCode >= 37 && keyCode <= 40 || keyCode === 45 || e.ctrlKey) {
  25852. addNonTypingUndoLevel();
  25853. editor.nodeChanged();
  25854. }
  25855. if (keyCode === 46 || keyCode === 8) {
  25856. editor.nodeChanged();
  25857. }
  25858. if (isFirstTypedCharacter.get() && undoManager.typing && isEq$1(createFromEditor(editor), undoManager.data[0]) === false) {
  25859. if (editor.isDirty() === false) {
  25860. editor.setDirty(true);
  25861. editor.fire('change', {
  25862. level: undoManager.data[0],
  25863. lastLevel: null
  25864. });
  25865. }
  25866. editor.fire('TypingUndo');
  25867. isFirstTypedCharacter.set(false);
  25868. editor.nodeChanged();
  25869. }
  25870. });
  25871. editor.on('keydown', function (e) {
  25872. var keyCode = e.keyCode;
  25873. if (e.isDefaultPrevented()) {
  25874. return;
  25875. }
  25876. if (keyCode >= 33 && keyCode <= 36 || keyCode >= 37 && keyCode <= 40 || keyCode === 45) {
  25877. if (undoManager.typing) {
  25878. addNonTypingUndoLevel(e);
  25879. }
  25880. return;
  25881. }
  25882. var modKey = e.ctrlKey && !e.altKey || e.metaKey;
  25883. if ((keyCode < 16 || keyCode > 20) && keyCode !== 224 && keyCode !== 91 && !undoManager.typing && !modKey) {
  25884. undoManager.beforeChange();
  25885. setTyping(undoManager, true, locks);
  25886. undoManager.add({}, e);
  25887. isFirstTypedCharacter.set(true);
  25888. }
  25889. });
  25890. editor.on('mousedown', function (e) {
  25891. if (undoManager.typing) {
  25892. addNonTypingUndoLevel(e);
  25893. }
  25894. });
  25895. var isInsertReplacementText = function (event) {
  25896. return event.inputType === 'insertReplacementText';
  25897. };
  25898. var isInsertTextDataNull = function (event) {
  25899. return event.inputType === 'insertText' && event.data === null;
  25900. };
  25901. var isInsertFromPasteOrDrop = function (event) {
  25902. return event.inputType === 'insertFromPaste' || event.inputType === 'insertFromDrop';
  25903. };
  25904. editor.on('input', function (e) {
  25905. if (e.inputType && (isInsertReplacementText(e) || isInsertTextDataNull(e) || isInsertFromPasteOrDrop(e))) {
  25906. addNonTypingUndoLevel(e);
  25907. }
  25908. });
  25909. editor.on('AddUndo Undo Redo ClearUndos', function (e) {
  25910. if (!e.isDefaultPrevented()) {
  25911. editor.nodeChanged();
  25912. }
  25913. });
  25914. };
  25915. var addKeyboardShortcuts = function (editor) {
  25916. editor.addShortcut('meta+z', '', 'Undo');
  25917. editor.addShortcut('meta+y,meta+shift+z', '', 'Redo');
  25918. };
  25919. var UndoManager = function (editor) {
  25920. var beforeBookmark = value();
  25921. var locks = Cell(0);
  25922. var index = Cell(0);
  25923. var undoManager = {
  25924. data: [],
  25925. typing: false,
  25926. beforeChange: function () {
  25927. beforeChange(editor, locks, beforeBookmark);
  25928. },
  25929. add: function (level, event) {
  25930. return addUndoLevel(editor, undoManager, index, locks, beforeBookmark, level, event);
  25931. },
  25932. undo: function () {
  25933. return undo(editor, undoManager, locks, index);
  25934. },
  25935. redo: function () {
  25936. return redo(editor, index, undoManager.data);
  25937. },
  25938. clear: function () {
  25939. clear(editor, undoManager, index);
  25940. },
  25941. reset: function () {
  25942. reset(editor, undoManager);
  25943. },
  25944. hasUndo: function () {
  25945. return hasUndo(editor, undoManager, index);
  25946. },
  25947. hasRedo: function () {
  25948. return hasRedo(editor, undoManager, index);
  25949. },
  25950. transact: function (callback) {
  25951. return transact(editor, undoManager, locks, callback);
  25952. },
  25953. ignore: function (callback) {
  25954. ignore(editor, locks, callback);
  25955. },
  25956. extra: function (callback1, callback2) {
  25957. extra(editor, undoManager, index, callback1, callback2);
  25958. }
  25959. };
  25960. if (!isRtc(editor)) {
  25961. registerEvents(editor, undoManager, locks);
  25962. }
  25963. addKeyboardShortcuts(editor);
  25964. return undoManager;
  25965. };
  25966. var nonTypingKeycodes = [
  25967. 9,
  25968. 27,
  25969. VK.HOME,
  25970. VK.END,
  25971. 19,
  25972. 20,
  25973. 44,
  25974. 144,
  25975. 145,
  25976. 33,
  25977. 34,
  25978. 45,
  25979. 16,
  25980. 17,
  25981. 18,
  25982. 91,
  25983. 92,
  25984. 93,
  25985. VK.DOWN,
  25986. VK.UP,
  25987. VK.LEFT,
  25988. VK.RIGHT
  25989. ].concat(Env.browser.isFirefox() ? [224] : []);
  25990. var placeholderAttr = 'data-mce-placeholder';
  25991. var isKeyboardEvent = function (e) {
  25992. return e.type === 'keydown' || e.type === 'keyup';
  25993. };
  25994. var isDeleteEvent = function (e) {
  25995. var keyCode = e.keyCode;
  25996. return keyCode === VK.BACKSPACE || keyCode === VK.DELETE;
  25997. };
  25998. var isNonTypingKeyboardEvent = function (e) {
  25999. if (isKeyboardEvent(e)) {
  26000. var keyCode = e.keyCode;
  26001. return !isDeleteEvent(e) && (VK.metaKeyPressed(e) || e.altKey || keyCode >= 112 && keyCode <= 123 || contains$3(nonTypingKeycodes, keyCode));
  26002. } else {
  26003. return false;
  26004. }
  26005. };
  26006. var isTypingKeyboardEvent = function (e) {
  26007. return isKeyboardEvent(e) && !(isDeleteEvent(e) || e.type === 'keyup' && e.keyCode === 229);
  26008. };
  26009. var isVisuallyEmpty = function (dom, rootElm, forcedRootBlock) {
  26010. if (isEmpty$2(SugarElement.fromDom(rootElm), false)) {
  26011. var isForcedRootBlockFalse = forcedRootBlock === '';
  26012. var firstElement = rootElm.firstElementChild;
  26013. if (!firstElement) {
  26014. return true;
  26015. } else if (dom.getStyle(rootElm.firstElementChild, 'padding-left') || dom.getStyle(rootElm.firstElementChild, 'padding-right')) {
  26016. return false;
  26017. } else {
  26018. return isForcedRootBlockFalse ? !dom.isBlock(firstElement) : forcedRootBlock === firstElement.nodeName.toLowerCase();
  26019. }
  26020. } else {
  26021. return false;
  26022. }
  26023. };
  26024. var setup$g = function (editor) {
  26025. var dom = editor.dom;
  26026. var rootBlock = getForcedRootBlock(editor);
  26027. var placeholder = getPlaceholder(editor);
  26028. var updatePlaceholder = function (e, initial) {
  26029. if (isNonTypingKeyboardEvent(e)) {
  26030. return;
  26031. }
  26032. var body = editor.getBody();
  26033. var showPlaceholder = isTypingKeyboardEvent(e) ? false : isVisuallyEmpty(dom, body, rootBlock);
  26034. var isPlaceholderShown = dom.getAttrib(body, placeholderAttr) !== '';
  26035. if (isPlaceholderShown !== showPlaceholder || initial) {
  26036. dom.setAttrib(body, placeholderAttr, showPlaceholder ? placeholder : null);
  26037. dom.setAttrib(body, 'aria-placeholder', showPlaceholder ? placeholder : null);
  26038. firePlaceholderToggle(editor, showPlaceholder);
  26039. editor.on(showPlaceholder ? 'keydown' : 'keyup', updatePlaceholder);
  26040. editor.off(showPlaceholder ? 'keyup' : 'keydown', updatePlaceholder);
  26041. }
  26042. };
  26043. if (placeholder) {
  26044. editor.on('init', function (e) {
  26045. updatePlaceholder(e, true);
  26046. editor.on('change SetContent ExecCommand', updatePlaceholder);
  26047. editor.on('paste', function (e) {
  26048. return Delay.setEditorTimeout(editor, function () {
  26049. return updatePlaceholder(e);
  26050. });
  26051. });
  26052. });
  26053. }
  26054. };
  26055. var strongRtl = /[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/;
  26056. var hasStrongRtl = function (text) {
  26057. return strongRtl.test(text);
  26058. };
  26059. var isInlineTarget = function (editor, elm) {
  26060. return is$2(SugarElement.fromDom(elm), getInlineBoundarySelector(editor));
  26061. };
  26062. var isRtl = function (element) {
  26063. return DOMUtils.DOM.getStyle(element, 'direction', true) === 'rtl' || hasStrongRtl(element.textContent);
  26064. };
  26065. var findInlineParents = function (isInlineTarget, rootNode, pos) {
  26066. return filter$4(DOMUtils.DOM.getParents(pos.container(), '*', rootNode), isInlineTarget);
  26067. };
  26068. var findRootInline = function (isInlineTarget, rootNode, pos) {
  26069. var parents = findInlineParents(isInlineTarget, rootNode, pos);
  26070. return Optional.from(parents[parents.length - 1]);
  26071. };
  26072. var hasSameParentBlock = function (rootNode, node1, node2) {
  26073. var block1 = getParentBlock$2(node1, rootNode);
  26074. var block2 = getParentBlock$2(node2, rootNode);
  26075. return block1 && block1 === block2;
  26076. };
  26077. var isAtZwsp = function (pos) {
  26078. return isBeforeInline(pos) || isAfterInline(pos);
  26079. };
  26080. var normalizePosition = function (forward, pos) {
  26081. if (!pos) {
  26082. return pos;
  26083. }
  26084. var container = pos.container(), offset = pos.offset();
  26085. if (forward) {
  26086. if (isCaretContainerInline(container)) {
  26087. if (isText$7(container.nextSibling)) {
  26088. return CaretPosition(container.nextSibling, 0);
  26089. } else {
  26090. return CaretPosition.after(container);
  26091. }
  26092. } else {
  26093. return isBeforeInline(pos) ? CaretPosition(container, offset + 1) : pos;
  26094. }
  26095. } else {
  26096. if (isCaretContainerInline(container)) {
  26097. if (isText$7(container.previousSibling)) {
  26098. return CaretPosition(container.previousSibling, container.previousSibling.data.length);
  26099. } else {
  26100. return CaretPosition.before(container);
  26101. }
  26102. } else {
  26103. return isAfterInline(pos) ? CaretPosition(container, offset - 1) : pos;
  26104. }
  26105. }
  26106. };
  26107. var normalizeForwards = curry(normalizePosition, true);
  26108. var normalizeBackwards = curry(normalizePosition, false);
  26109. var isBeforeRoot = function (rootNode) {
  26110. return function (elm) {
  26111. return eq(rootNode, SugarElement.fromDom(elm.dom.parentNode));
  26112. };
  26113. };
  26114. var isTextBlockOrListItem = function (element) {
  26115. return isTextBlock$2(element) || isListItem(element);
  26116. };
  26117. var getParentBlock$1 = function (rootNode, elm) {
  26118. if (contains$1(rootNode, elm)) {
  26119. return closest$3(elm, isTextBlockOrListItem, isBeforeRoot(rootNode));
  26120. } else {
  26121. return Optional.none();
  26122. }
  26123. };
  26124. var placeCaretInEmptyBody = function (editor) {
  26125. var body = editor.getBody();
  26126. var node = body.firstChild && editor.dom.isBlock(body.firstChild) ? body.firstChild : body;
  26127. editor.selection.setCursorLocation(node, 0);
  26128. };
  26129. var paddEmptyBody = function (editor) {
  26130. if (editor.dom.isEmpty(editor.getBody())) {
  26131. editor.setContent('');
  26132. placeCaretInEmptyBody(editor);
  26133. }
  26134. };
  26135. var willDeleteLastPositionInElement = function (forward, fromPos, elm) {
  26136. return lift2(firstPositionIn(elm), lastPositionIn(elm), function (firstPos, lastPos) {
  26137. var normalizedFirstPos = normalizePosition(true, firstPos);
  26138. var normalizedLastPos = normalizePosition(false, lastPos);
  26139. var normalizedFromPos = normalizePosition(false, fromPos);
  26140. if (forward) {
  26141. return nextPosition(elm, normalizedFromPos).exists(function (nextPos) {
  26142. return nextPos.isEqual(normalizedLastPos) && fromPos.isEqual(normalizedFirstPos);
  26143. });
  26144. } else {
  26145. return prevPosition(elm, normalizedFromPos).exists(function (prevPos) {
  26146. return prevPos.isEqual(normalizedFirstPos) && fromPos.isEqual(normalizedLastPos);
  26147. });
  26148. }
  26149. }).getOr(true);
  26150. };
  26151. var blockPosition = function (block, position) {
  26152. return {
  26153. block: block,
  26154. position: position
  26155. };
  26156. };
  26157. var blockBoundary = function (from, to) {
  26158. return {
  26159. from: from,
  26160. to: to
  26161. };
  26162. };
  26163. var getBlockPosition = function (rootNode, pos) {
  26164. var rootElm = SugarElement.fromDom(rootNode);
  26165. var containerElm = SugarElement.fromDom(pos.container());
  26166. return getParentBlock$1(rootElm, containerElm).map(function (block) {
  26167. return blockPosition(block, pos);
  26168. });
  26169. };
  26170. var isDifferentBlocks = function (blockBoundary) {
  26171. return eq(blockBoundary.from.block, blockBoundary.to.block) === false;
  26172. };
  26173. var hasSameParent = function (blockBoundary) {
  26174. return parent(blockBoundary.from.block).bind(function (parent1) {
  26175. return parent(blockBoundary.to.block).filter(function (parent2) {
  26176. return eq(parent1, parent2);
  26177. });
  26178. }).isSome();
  26179. };
  26180. var isEditable$1 = function (blockBoundary) {
  26181. return isContentEditableFalse$b(blockBoundary.from.block.dom) === false && isContentEditableFalse$b(blockBoundary.to.block.dom) === false;
  26182. };
  26183. var skipLastBr = function (rootNode, forward, blockPosition) {
  26184. if (isBr$5(blockPosition.position.getNode()) && isEmpty$2(blockPosition.block) === false) {
  26185. return positionIn(false, blockPosition.block.dom).bind(function (lastPositionInBlock) {
  26186. if (lastPositionInBlock.isEqual(blockPosition.position)) {
  26187. return fromPosition(forward, rootNode, lastPositionInBlock).bind(function (to) {
  26188. return getBlockPosition(rootNode, to);
  26189. });
  26190. } else {
  26191. return Optional.some(blockPosition);
  26192. }
  26193. }).getOr(blockPosition);
  26194. } else {
  26195. return blockPosition;
  26196. }
  26197. };
  26198. var readFromRange = function (rootNode, forward, rng) {
  26199. var fromBlockPos = getBlockPosition(rootNode, CaretPosition.fromRangeStart(rng));
  26200. var toBlockPos = fromBlockPos.bind(function (blockPos) {
  26201. return fromPosition(forward, rootNode, blockPos.position).bind(function (to) {
  26202. return getBlockPosition(rootNode, to).map(function (blockPos) {
  26203. return skipLastBr(rootNode, forward, blockPos);
  26204. });
  26205. });
  26206. });
  26207. return lift2(fromBlockPos, toBlockPos, blockBoundary).filter(function (blockBoundary) {
  26208. return isDifferentBlocks(blockBoundary) && hasSameParent(blockBoundary) && isEditable$1(blockBoundary);
  26209. });
  26210. };
  26211. var read$1 = function (rootNode, forward, rng) {
  26212. return rng.collapsed ? readFromRange(rootNode, forward, rng) : Optional.none();
  26213. };
  26214. var getChildrenUntilBlockBoundary = function (block) {
  26215. var children$1 = children(block);
  26216. return findIndex$2(children$1, isBlock$2).fold(constant(children$1), function (index) {
  26217. return children$1.slice(0, index);
  26218. });
  26219. };
  26220. var extractChildren = function (block) {
  26221. var children = getChildrenUntilBlockBoundary(block);
  26222. each$k(children, remove$7);
  26223. return children;
  26224. };
  26225. var removeEmptyRoot = function (rootNode, block) {
  26226. var parents = parentsAndSelf(block, rootNode);
  26227. return find$3(parents.reverse(), function (element) {
  26228. return isEmpty$2(element);
  26229. }).each(remove$7);
  26230. };
  26231. var isEmptyBefore = function (el) {
  26232. return filter$4(prevSiblings(el), function (el) {
  26233. return !isEmpty$2(el);
  26234. }).length === 0;
  26235. };
  26236. var nestedBlockMerge = function (rootNode, fromBlock, toBlock, insertionPoint) {
  26237. if (isEmpty$2(toBlock)) {
  26238. fillWithPaddingBr(toBlock);
  26239. return firstPositionIn(toBlock.dom);
  26240. }
  26241. if (isEmptyBefore(insertionPoint) && isEmpty$2(fromBlock)) {
  26242. before$4(insertionPoint, SugarElement.fromTag('br'));
  26243. }
  26244. var position = prevPosition(toBlock.dom, CaretPosition.before(insertionPoint.dom));
  26245. each$k(extractChildren(fromBlock), function (child) {
  26246. before$4(insertionPoint, child);
  26247. });
  26248. removeEmptyRoot(rootNode, fromBlock);
  26249. return position;
  26250. };
  26251. var sidelongBlockMerge = function (rootNode, fromBlock, toBlock) {
  26252. if (isEmpty$2(toBlock)) {
  26253. remove$7(toBlock);
  26254. if (isEmpty$2(fromBlock)) {
  26255. fillWithPaddingBr(fromBlock);
  26256. }
  26257. return firstPositionIn(fromBlock.dom);
  26258. }
  26259. var position = lastPositionIn(toBlock.dom);
  26260. each$k(extractChildren(fromBlock), function (child) {
  26261. append$1(toBlock, child);
  26262. });
  26263. removeEmptyRoot(rootNode, fromBlock);
  26264. return position;
  26265. };
  26266. var findInsertionPoint = function (toBlock, block) {
  26267. var parentsAndSelf$1 = parentsAndSelf(block, toBlock);
  26268. return Optional.from(parentsAndSelf$1[parentsAndSelf$1.length - 1]);
  26269. };
  26270. var getInsertionPoint = function (fromBlock, toBlock) {
  26271. return contains$1(toBlock, fromBlock) ? findInsertionPoint(toBlock, fromBlock) : Optional.none();
  26272. };
  26273. var trimBr = function (first, block) {
  26274. positionIn(first, block.dom).map(function (position) {
  26275. return position.getNode();
  26276. }).map(SugarElement.fromDom).filter(isBr$4).each(remove$7);
  26277. };
  26278. var mergeBlockInto = function (rootNode, fromBlock, toBlock) {
  26279. trimBr(true, fromBlock);
  26280. trimBr(false, toBlock);
  26281. return getInsertionPoint(fromBlock, toBlock).fold(curry(sidelongBlockMerge, rootNode, fromBlock, toBlock), curry(nestedBlockMerge, rootNode, fromBlock, toBlock));
  26282. };
  26283. var mergeBlocks = function (rootNode, forward, block1, block2) {
  26284. return forward ? mergeBlockInto(rootNode, block2, block1) : mergeBlockInto(rootNode, block1, block2);
  26285. };
  26286. var backspaceDelete$8 = function (editor, forward) {
  26287. var rootNode = SugarElement.fromDom(editor.getBody());
  26288. var position = read$1(rootNode.dom, forward, editor.selection.getRng()).bind(function (blockBoundary) {
  26289. return mergeBlocks(rootNode, forward, blockBoundary.from.block, blockBoundary.to.block);
  26290. });
  26291. position.each(function (pos) {
  26292. editor.selection.setRng(pos.toRange());
  26293. });
  26294. return position.isSome();
  26295. };
  26296. var deleteRangeMergeBlocks = function (rootNode, selection) {
  26297. var rng = selection.getRng();
  26298. return lift2(getParentBlock$1(rootNode, SugarElement.fromDom(rng.startContainer)), getParentBlock$1(rootNode, SugarElement.fromDom(rng.endContainer)), function (block1, block2) {
  26299. if (eq(block1, block2) === false) {
  26300. rng.deleteContents();
  26301. mergeBlocks(rootNode, true, block1, block2).each(function (pos) {
  26302. selection.setRng(pos.toRange());
  26303. });
  26304. return true;
  26305. } else {
  26306. return false;
  26307. }
  26308. }).getOr(false);
  26309. };
  26310. var isRawNodeInTable = function (root, rawNode) {
  26311. var node = SugarElement.fromDom(rawNode);
  26312. var isRoot = curry(eq, root);
  26313. return ancestor$3(node, isTableCell$4, isRoot).isSome();
  26314. };
  26315. var isSelectionInTable = function (root, rng) {
  26316. return isRawNodeInTable(root, rng.startContainer) || isRawNodeInTable(root, rng.endContainer);
  26317. };
  26318. var isEverythingSelected = function (root, rng) {
  26319. var noPrevious = prevPosition(root.dom, CaretPosition.fromRangeStart(rng)).isNone();
  26320. var noNext = nextPosition(root.dom, CaretPosition.fromRangeEnd(rng)).isNone();
  26321. return !isSelectionInTable(root, rng) && noPrevious && noNext;
  26322. };
  26323. var emptyEditor = function (editor) {
  26324. editor.setContent('');
  26325. editor.selection.setCursorLocation();
  26326. return true;
  26327. };
  26328. var deleteRange$1 = function (editor) {
  26329. var rootNode = SugarElement.fromDom(editor.getBody());
  26330. var rng = editor.selection.getRng();
  26331. return isEverythingSelected(rootNode, rng) ? emptyEditor(editor) : deleteRangeMergeBlocks(rootNode, editor.selection);
  26332. };
  26333. var backspaceDelete$7 = function (editor, _forward) {
  26334. return editor.selection.isCollapsed() ? false : deleteRange$1(editor);
  26335. };
  26336. var isContentEditableTrue$2 = isContentEditableTrue$4;
  26337. var isContentEditableFalse$4 = isContentEditableFalse$b;
  26338. var showCaret = function (direction, editor, node, before, scrollIntoView) {
  26339. return Optional.from(editor._selectionOverrides.showCaret(direction, node, before, scrollIntoView));
  26340. };
  26341. var getNodeRange = function (node) {
  26342. var rng = node.ownerDocument.createRange();
  26343. rng.selectNode(node);
  26344. return rng;
  26345. };
  26346. var selectNode = function (editor, node) {
  26347. var e = editor.fire('BeforeObjectSelected', { target: node });
  26348. if (e.isDefaultPrevented()) {
  26349. return Optional.none();
  26350. }
  26351. return Optional.some(getNodeRange(node));
  26352. };
  26353. var renderCaretAtRange = function (editor, range, scrollIntoView) {
  26354. var normalizedRange = normalizeRange(1, editor.getBody(), range);
  26355. var caretPosition = CaretPosition.fromRangeStart(normalizedRange);
  26356. var caretPositionNode = caretPosition.getNode();
  26357. if (isInlineFakeCaretTarget(caretPositionNode)) {
  26358. return showCaret(1, editor, caretPositionNode, !caretPosition.isAtEnd(), false);
  26359. }
  26360. var caretPositionBeforeNode = caretPosition.getNode(true);
  26361. if (isInlineFakeCaretTarget(caretPositionBeforeNode)) {
  26362. return showCaret(1, editor, caretPositionBeforeNode, false, false);
  26363. }
  26364. var ceRoot = editor.dom.getParent(caretPosition.getNode(), function (node) {
  26365. return isContentEditableFalse$4(node) || isContentEditableTrue$2(node);
  26366. });
  26367. if (isInlineFakeCaretTarget(ceRoot)) {
  26368. return showCaret(1, editor, ceRoot, false, scrollIntoView);
  26369. }
  26370. return Optional.none();
  26371. };
  26372. var renderRangeCaret = function (editor, range, scrollIntoView) {
  26373. return range.collapsed ? renderCaretAtRange(editor, range, scrollIntoView).getOr(range) : range;
  26374. };
  26375. var isBeforeBoundary = function (pos) {
  26376. return isBeforeContentEditableFalse(pos) || isBeforeMedia(pos);
  26377. };
  26378. var isAfterBoundary = function (pos) {
  26379. return isAfterContentEditableFalse(pos) || isAfterMedia(pos);
  26380. };
  26381. var trimEmptyTextNode = function (dom, node) {
  26382. if (isText$7(node) && node.data.length === 0) {
  26383. dom.remove(node);
  26384. }
  26385. };
  26386. var deleteContentAndShowCaret = function (editor, range, node, direction, forward, peekCaretPosition) {
  26387. showCaret(direction, editor, peekCaretPosition.getNode(!forward), forward, true).each(function (caretRange) {
  26388. if (range.collapsed) {
  26389. var deleteRange = range.cloneRange();
  26390. if (forward) {
  26391. deleteRange.setEnd(caretRange.startContainer, caretRange.startOffset);
  26392. } else {
  26393. deleteRange.setStart(caretRange.endContainer, caretRange.endOffset);
  26394. }
  26395. deleteRange.deleteContents();
  26396. } else {
  26397. range.deleteContents();
  26398. }
  26399. editor.selection.setRng(caretRange);
  26400. });
  26401. trimEmptyTextNode(editor.dom, node);
  26402. return true;
  26403. };
  26404. var deleteBoundaryText = function (editor, forward) {
  26405. var range = editor.selection.getRng();
  26406. if (!isText$7(range.commonAncestorContainer)) {
  26407. return false;
  26408. }
  26409. var direction = forward ? HDirection.Forwards : HDirection.Backwards;
  26410. var caretWalker = CaretWalker(editor.getBody());
  26411. var getNextPosFn = curry(getVisualCaretPosition, forward ? caretWalker.next : caretWalker.prev);
  26412. var isBeforeFn = forward ? isBeforeBoundary : isAfterBoundary;
  26413. var caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);
  26414. var nextCaretPosition = normalizePosition(forward, getNextPosFn(caretPosition));
  26415. if (!nextCaretPosition || !isMoveInsideSameBlock(caretPosition, nextCaretPosition)) {
  26416. return false;
  26417. } else if (isBeforeFn(nextCaretPosition)) {
  26418. return deleteContentAndShowCaret(editor, range, caretPosition.getNode(), direction, forward, nextCaretPosition);
  26419. }
  26420. var peekCaretPosition = getNextPosFn(nextCaretPosition);
  26421. if (peekCaretPosition && isBeforeFn(peekCaretPosition)) {
  26422. if (isMoveInsideSameBlock(nextCaretPosition, peekCaretPosition)) {
  26423. return deleteContentAndShowCaret(editor, range, caretPosition.getNode(), direction, forward, peekCaretPosition);
  26424. }
  26425. }
  26426. return false;
  26427. };
  26428. var backspaceDelete$6 = function (editor, forward) {
  26429. return deleteBoundaryText(editor, forward);
  26430. };
  26431. var isCompoundElement = function (node) {
  26432. return isTableCell$4(SugarElement.fromDom(node)) || isListItem(SugarElement.fromDom(node));
  26433. };
  26434. var DeleteAction = Adt.generate([
  26435. { remove: ['element'] },
  26436. { moveToElement: ['element'] },
  26437. { moveToPosition: ['position'] }
  26438. ]);
  26439. var isAtContentEditableBlockCaret = function (forward, from) {
  26440. var elm = from.getNode(forward === false);
  26441. var caretLocation = forward ? 'after' : 'before';
  26442. return isElement$5(elm) && elm.getAttribute('data-mce-caret') === caretLocation;
  26443. };
  26444. var isDeleteFromCefDifferentBlocks = function (root, forward, from, to) {
  26445. var inSameBlock = function (elm) {
  26446. return isInline$1(SugarElement.fromDom(elm)) && !isInSameBlock(from, to, root);
  26447. };
  26448. return getRelativeCefElm(!forward, from).fold(function () {
  26449. return getRelativeCefElm(forward, to).fold(never, inSameBlock);
  26450. }, inSameBlock);
  26451. };
  26452. var deleteEmptyBlockOrMoveToCef = function (root, forward, from, to) {
  26453. var toCefElm = to.getNode(forward === false);
  26454. return getParentBlock$1(SugarElement.fromDom(root), SugarElement.fromDom(from.getNode())).map(function (blockElm) {
  26455. return isEmpty$2(blockElm) ? DeleteAction.remove(blockElm.dom) : DeleteAction.moveToElement(toCefElm);
  26456. }).orThunk(function () {
  26457. return Optional.some(DeleteAction.moveToElement(toCefElm));
  26458. });
  26459. };
  26460. var findCefPosition = function (root, forward, from) {
  26461. return fromPosition(forward, root, from).bind(function (to) {
  26462. if (isCompoundElement(to.getNode())) {
  26463. return Optional.none();
  26464. } else if (isDeleteFromCefDifferentBlocks(root, forward, from, to)) {
  26465. return Optional.none();
  26466. } else if (forward && isContentEditableFalse$b(to.getNode())) {
  26467. return deleteEmptyBlockOrMoveToCef(root, forward, from, to);
  26468. } else if (forward === false && isContentEditableFalse$b(to.getNode(true))) {
  26469. return deleteEmptyBlockOrMoveToCef(root, forward, from, to);
  26470. } else if (forward && isAfterContentEditableFalse(from)) {
  26471. return Optional.some(DeleteAction.moveToPosition(to));
  26472. } else if (forward === false && isBeforeContentEditableFalse(from)) {
  26473. return Optional.some(DeleteAction.moveToPosition(to));
  26474. } else {
  26475. return Optional.none();
  26476. }
  26477. });
  26478. };
  26479. var getContentEditableBlockAction = function (forward, elm) {
  26480. if (forward && isContentEditableFalse$b(elm.nextSibling)) {
  26481. return Optional.some(DeleteAction.moveToElement(elm.nextSibling));
  26482. } else if (forward === false && isContentEditableFalse$b(elm.previousSibling)) {
  26483. return Optional.some(DeleteAction.moveToElement(elm.previousSibling));
  26484. } else {
  26485. return Optional.none();
  26486. }
  26487. };
  26488. var skipMoveToActionFromInlineCefToContent = function (root, from, deleteAction) {
  26489. return deleteAction.fold(function (elm) {
  26490. return Optional.some(DeleteAction.remove(elm));
  26491. }, function (elm) {
  26492. return Optional.some(DeleteAction.moveToElement(elm));
  26493. }, function (to) {
  26494. if (isInSameBlock(from, to, root)) {
  26495. return Optional.none();
  26496. } else {
  26497. return Optional.some(DeleteAction.moveToPosition(to));
  26498. }
  26499. });
  26500. };
  26501. var getContentEditableAction = function (root, forward, from) {
  26502. if (isAtContentEditableBlockCaret(forward, from)) {
  26503. return getContentEditableBlockAction(forward, from.getNode(forward === false)).fold(function () {
  26504. return findCefPosition(root, forward, from);
  26505. }, Optional.some);
  26506. } else {
  26507. return findCefPosition(root, forward, from).bind(function (deleteAction) {
  26508. return skipMoveToActionFromInlineCefToContent(root, from, deleteAction);
  26509. });
  26510. }
  26511. };
  26512. var read = function (root, forward, rng) {
  26513. var normalizedRange = normalizeRange(forward ? 1 : -1, root, rng);
  26514. var from = CaretPosition.fromRangeStart(normalizedRange);
  26515. var rootElement = SugarElement.fromDom(root);
  26516. if (forward === false && isAfterContentEditableFalse(from)) {
  26517. return Optional.some(DeleteAction.remove(from.getNode(true)));
  26518. } else if (forward && isBeforeContentEditableFalse(from)) {
  26519. return Optional.some(DeleteAction.remove(from.getNode()));
  26520. } else if (forward === false && isBeforeContentEditableFalse(from) && isAfterBr(rootElement, from)) {
  26521. return findPreviousBr(rootElement, from).map(function (br) {
  26522. return DeleteAction.remove(br.getNode());
  26523. });
  26524. } else if (forward && isAfterContentEditableFalse(from) && isBeforeBr$1(rootElement, from)) {
  26525. return findNextBr(rootElement, from).map(function (br) {
  26526. return DeleteAction.remove(br.getNode());
  26527. });
  26528. } else {
  26529. return getContentEditableAction(root, forward, from);
  26530. }
  26531. };
  26532. var deleteElement$1 = function (editor, forward) {
  26533. return function (element) {
  26534. editor._selectionOverrides.hideFakeCaret();
  26535. deleteElement$2(editor, forward, SugarElement.fromDom(element));
  26536. return true;
  26537. };
  26538. };
  26539. var moveToElement = function (editor, forward) {
  26540. return function (element) {
  26541. var pos = forward ? CaretPosition.before(element) : CaretPosition.after(element);
  26542. editor.selection.setRng(pos.toRange());
  26543. return true;
  26544. };
  26545. };
  26546. var moveToPosition = function (editor) {
  26547. return function (pos) {
  26548. editor.selection.setRng(pos.toRange());
  26549. return true;
  26550. };
  26551. };
  26552. var getAncestorCe = function (editor, node) {
  26553. return Optional.from(getContentEditableRoot$1(editor.getBody(), node));
  26554. };
  26555. var backspaceDeleteCaret = function (editor, forward) {
  26556. var selectedNode = editor.selection.getNode();
  26557. return getAncestorCe(editor, selectedNode).filter(isContentEditableFalse$b).fold(function () {
  26558. return read(editor.getBody(), forward, editor.selection.getRng()).exists(function (deleteAction) {
  26559. return deleteAction.fold(deleteElement$1(editor, forward), moveToElement(editor, forward), moveToPosition(editor));
  26560. });
  26561. }, always);
  26562. };
  26563. var deleteOffscreenSelection = function (rootElement) {
  26564. each$k(descendants(rootElement, '.mce-offscreen-selection'), remove$7);
  26565. };
  26566. var backspaceDeleteRange = function (editor, forward) {
  26567. var selectedNode = editor.selection.getNode();
  26568. if (isContentEditableFalse$b(selectedNode) && !isTableCell$5(selectedNode)) {
  26569. var hasCefAncestor = getAncestorCe(editor, selectedNode.parentNode).filter(isContentEditableFalse$b);
  26570. return hasCefAncestor.fold(function () {
  26571. deleteOffscreenSelection(SugarElement.fromDom(editor.getBody()));
  26572. deleteElement$2(editor, forward, SugarElement.fromDom(editor.selection.getNode()));
  26573. paddEmptyBody(editor);
  26574. return true;
  26575. }, always);
  26576. }
  26577. return false;
  26578. };
  26579. var paddEmptyElement = function (editor) {
  26580. var dom = editor.dom, selection = editor.selection;
  26581. var ceRoot = getContentEditableRoot$1(editor.getBody(), selection.getNode());
  26582. if (isContentEditableTrue$4(ceRoot) && dom.isBlock(ceRoot) && dom.isEmpty(ceRoot)) {
  26583. var br = dom.create('br', { 'data-mce-bogus': '1' });
  26584. dom.setHTML(ceRoot, '');
  26585. ceRoot.appendChild(br);
  26586. selection.setRng(CaretPosition.before(br).toRange());
  26587. }
  26588. return true;
  26589. };
  26590. var backspaceDelete$5 = function (editor, forward) {
  26591. if (editor.selection.isCollapsed()) {
  26592. return backspaceDeleteCaret(editor, forward);
  26593. } else {
  26594. return backspaceDeleteRange(editor, forward);
  26595. }
  26596. };
  26597. var deleteCaret$2 = function (editor, forward) {
  26598. var fromPos = CaretPosition.fromRangeStart(editor.selection.getRng());
  26599. return fromPosition(forward, editor.getBody(), fromPos).filter(function (pos) {
  26600. return forward ? isBeforeImageBlock(pos) : isAfterImageBlock(pos);
  26601. }).bind(function (pos) {
  26602. return Optional.from(getChildNodeAtRelativeOffset(forward ? 0 : -1, pos));
  26603. }).exists(function (elm) {
  26604. editor.selection.select(elm);
  26605. return true;
  26606. });
  26607. };
  26608. var backspaceDelete$4 = function (editor, forward) {
  26609. return editor.selection.isCollapsed() ? deleteCaret$2(editor, forward) : false;
  26610. };
  26611. var isText = isText$7;
  26612. var startsWithCaretContainer = function (node) {
  26613. return isText(node) && node.data[0] === ZWSP$1;
  26614. };
  26615. var endsWithCaretContainer = function (node) {
  26616. return isText(node) && node.data[node.data.length - 1] === ZWSP$1;
  26617. };
  26618. var createZwsp = function (node) {
  26619. return node.ownerDocument.createTextNode(ZWSP$1);
  26620. };
  26621. var insertBefore = function (node) {
  26622. if (isText(node.previousSibling)) {
  26623. if (endsWithCaretContainer(node.previousSibling)) {
  26624. return node.previousSibling;
  26625. } else {
  26626. node.previousSibling.appendData(ZWSP$1);
  26627. return node.previousSibling;
  26628. }
  26629. } else if (isText(node)) {
  26630. if (startsWithCaretContainer(node)) {
  26631. return node;
  26632. } else {
  26633. node.insertData(0, ZWSP$1);
  26634. return node;
  26635. }
  26636. } else {
  26637. var newNode = createZwsp(node);
  26638. node.parentNode.insertBefore(newNode, node);
  26639. return newNode;
  26640. }
  26641. };
  26642. var insertAfter = function (node) {
  26643. if (isText(node.nextSibling)) {
  26644. if (startsWithCaretContainer(node.nextSibling)) {
  26645. return node.nextSibling;
  26646. } else {
  26647. node.nextSibling.insertData(0, ZWSP$1);
  26648. return node.nextSibling;
  26649. }
  26650. } else if (isText(node)) {
  26651. if (endsWithCaretContainer(node)) {
  26652. return node;
  26653. } else {
  26654. node.appendData(ZWSP$1);
  26655. return node;
  26656. }
  26657. } else {
  26658. var newNode = createZwsp(node);
  26659. if (node.nextSibling) {
  26660. node.parentNode.insertBefore(newNode, node.nextSibling);
  26661. } else {
  26662. node.parentNode.appendChild(newNode);
  26663. }
  26664. return newNode;
  26665. }
  26666. };
  26667. var insertInline = function (before, node) {
  26668. return before ? insertBefore(node) : insertAfter(node);
  26669. };
  26670. var insertInlineBefore = curry(insertInline, true);
  26671. var insertInlineAfter = curry(insertInline, false);
  26672. var insertInlinePos = function (pos, before) {
  26673. if (isText$7(pos.container())) {
  26674. return insertInline(before, pos.container());
  26675. } else {
  26676. return insertInline(before, pos.getNode());
  26677. }
  26678. };
  26679. var isPosCaretContainer = function (pos, caret) {
  26680. var caretNode = caret.get();
  26681. return caretNode && pos.container() === caretNode && isCaretContainerInline(caretNode);
  26682. };
  26683. var renderCaret = function (caret, location) {
  26684. return location.fold(function (element) {
  26685. remove$2(caret.get());
  26686. var text = insertInlineBefore(element);
  26687. caret.set(text);
  26688. return Optional.some(CaretPosition(text, text.length - 1));
  26689. }, function (element) {
  26690. return firstPositionIn(element).map(function (pos) {
  26691. if (!isPosCaretContainer(pos, caret)) {
  26692. remove$2(caret.get());
  26693. var text = insertInlinePos(pos, true);
  26694. caret.set(text);
  26695. return CaretPosition(text, 1);
  26696. } else {
  26697. return CaretPosition(caret.get(), 1);
  26698. }
  26699. });
  26700. }, function (element) {
  26701. return lastPositionIn(element).map(function (pos) {
  26702. if (!isPosCaretContainer(pos, caret)) {
  26703. remove$2(caret.get());
  26704. var text = insertInlinePos(pos, false);
  26705. caret.set(text);
  26706. return CaretPosition(text, text.length - 1);
  26707. } else {
  26708. return CaretPosition(caret.get(), caret.get().length - 1);
  26709. }
  26710. });
  26711. }, function (element) {
  26712. remove$2(caret.get());
  26713. var text = insertInlineAfter(element);
  26714. caret.set(text);
  26715. return Optional.some(CaretPosition(text, 1));
  26716. });
  26717. };
  26718. var evaluateUntil = function (fns, args) {
  26719. for (var i = 0; i < fns.length; i++) {
  26720. var result = fns[i].apply(null, args);
  26721. if (result.isSome()) {
  26722. return result;
  26723. }
  26724. }
  26725. return Optional.none();
  26726. };
  26727. var Location = Adt.generate([
  26728. { before: ['element'] },
  26729. { start: ['element'] },
  26730. { end: ['element'] },
  26731. { after: ['element'] }
  26732. ]);
  26733. var rescope$1 = function (rootNode, node) {
  26734. var parentBlock = getParentBlock$2(node, rootNode);
  26735. return parentBlock ? parentBlock : rootNode;
  26736. };
  26737. var before = function (isInlineTarget, rootNode, pos) {
  26738. var nPos = normalizeForwards(pos);
  26739. var scope = rescope$1(rootNode, nPos.container());
  26740. return findRootInline(isInlineTarget, scope, nPos).fold(function () {
  26741. return nextPosition(scope, nPos).bind(curry(findRootInline, isInlineTarget, scope)).map(function (inline) {
  26742. return Location.before(inline);
  26743. });
  26744. }, Optional.none);
  26745. };
  26746. var isNotInsideFormatCaretContainer = function (rootNode, elm) {
  26747. return getParentCaretContainer(rootNode, elm) === null;
  26748. };
  26749. var findInsideRootInline = function (isInlineTarget, rootNode, pos) {
  26750. return findRootInline(isInlineTarget, rootNode, pos).filter(curry(isNotInsideFormatCaretContainer, rootNode));
  26751. };
  26752. var start$1 = function (isInlineTarget, rootNode, pos) {
  26753. var nPos = normalizeBackwards(pos);
  26754. return findInsideRootInline(isInlineTarget, rootNode, nPos).bind(function (inline) {
  26755. var prevPos = prevPosition(inline, nPos);
  26756. return prevPos.isNone() ? Optional.some(Location.start(inline)) : Optional.none();
  26757. });
  26758. };
  26759. var end = function (isInlineTarget, rootNode, pos) {
  26760. var nPos = normalizeForwards(pos);
  26761. return findInsideRootInline(isInlineTarget, rootNode, nPos).bind(function (inline) {
  26762. var nextPos = nextPosition(inline, nPos);
  26763. return nextPos.isNone() ? Optional.some(Location.end(inline)) : Optional.none();
  26764. });
  26765. };
  26766. var after = function (isInlineTarget, rootNode, pos) {
  26767. var nPos = normalizeBackwards(pos);
  26768. var scope = rescope$1(rootNode, nPos.container());
  26769. return findRootInline(isInlineTarget, scope, nPos).fold(function () {
  26770. return prevPosition(scope, nPos).bind(curry(findRootInline, isInlineTarget, scope)).map(function (inline) {
  26771. return Location.after(inline);
  26772. });
  26773. }, Optional.none);
  26774. };
  26775. var isValidLocation = function (location) {
  26776. return isRtl(getElement(location)) === false;
  26777. };
  26778. var readLocation = function (isInlineTarget, rootNode, pos) {
  26779. var location = evaluateUntil([
  26780. before,
  26781. start$1,
  26782. end,
  26783. after
  26784. ], [
  26785. isInlineTarget,
  26786. rootNode,
  26787. pos
  26788. ]);
  26789. return location.filter(isValidLocation);
  26790. };
  26791. var getElement = function (location) {
  26792. return location.fold(identity, identity, identity, identity);
  26793. };
  26794. var getName = function (location) {
  26795. return location.fold(constant('before'), constant('start'), constant('end'), constant('after'));
  26796. };
  26797. var outside = function (location) {
  26798. return location.fold(Location.before, Location.before, Location.after, Location.after);
  26799. };
  26800. var inside = function (location) {
  26801. return location.fold(Location.start, Location.start, Location.end, Location.end);
  26802. };
  26803. var isEq = function (location1, location2) {
  26804. return getName(location1) === getName(location2) && getElement(location1) === getElement(location2);
  26805. };
  26806. var betweenInlines = function (forward, isInlineTarget, rootNode, from, to, location) {
  26807. return lift2(findRootInline(isInlineTarget, rootNode, from), findRootInline(isInlineTarget, rootNode, to), function (fromInline, toInline) {
  26808. if (fromInline !== toInline && hasSameParentBlock(rootNode, fromInline, toInline)) {
  26809. return Location.after(forward ? fromInline : toInline);
  26810. } else {
  26811. return location;
  26812. }
  26813. }).getOr(location);
  26814. };
  26815. var skipNoMovement = function (fromLocation, toLocation) {
  26816. return fromLocation.fold(always, function (fromLocation) {
  26817. return !isEq(fromLocation, toLocation);
  26818. });
  26819. };
  26820. var findLocationTraverse = function (forward, isInlineTarget, rootNode, fromLocation, pos) {
  26821. var from = normalizePosition(forward, pos);
  26822. var to = fromPosition(forward, rootNode, from).map(curry(normalizePosition, forward));
  26823. var location = to.fold(function () {
  26824. return fromLocation.map(outside);
  26825. }, function (to) {
  26826. return readLocation(isInlineTarget, rootNode, to).map(curry(betweenInlines, forward, isInlineTarget, rootNode, from, to)).filter(curry(skipNoMovement, fromLocation));
  26827. });
  26828. return location.filter(isValidLocation);
  26829. };
  26830. var findLocationSimple = function (forward, location) {
  26831. if (forward) {
  26832. return location.fold(compose(Optional.some, Location.start), Optional.none, compose(Optional.some, Location.after), Optional.none);
  26833. } else {
  26834. return location.fold(Optional.none, compose(Optional.some, Location.before), Optional.none, compose(Optional.some, Location.end));
  26835. }
  26836. };
  26837. var findLocation$1 = function (forward, isInlineTarget, rootNode, pos) {
  26838. var from = normalizePosition(forward, pos);
  26839. var fromLocation = readLocation(isInlineTarget, rootNode, from);
  26840. return readLocation(isInlineTarget, rootNode, from).bind(curry(findLocationSimple, forward)).orThunk(function () {
  26841. return findLocationTraverse(forward, isInlineTarget, rootNode, fromLocation, pos);
  26842. });
  26843. };
  26844. curry(findLocation$1, false);
  26845. curry(findLocation$1, true);
  26846. var hasSelectionModifyApi = function (editor) {
  26847. return isFunction(editor.selection.getSel().modify);
  26848. };
  26849. var moveRel = function (forward, selection, pos) {
  26850. var delta = forward ? 1 : -1;
  26851. selection.setRng(CaretPosition(pos.container(), pos.offset() + delta).toRange());
  26852. selection.getSel().modify('move', forward ? 'forward' : 'backward', 'word');
  26853. return true;
  26854. };
  26855. var moveByWord = function (forward, editor) {
  26856. var rng = editor.selection.getRng();
  26857. var pos = forward ? CaretPosition.fromRangeEnd(rng) : CaretPosition.fromRangeStart(rng);
  26858. if (!hasSelectionModifyApi(editor)) {
  26859. return false;
  26860. } else if (forward && isBeforeInline(pos)) {
  26861. return moveRel(true, editor.selection, pos);
  26862. } else if (!forward && isAfterInline(pos)) {
  26863. return moveRel(false, editor.selection, pos);
  26864. } else {
  26865. return false;
  26866. }
  26867. };
  26868. var BreakType;
  26869. (function (BreakType) {
  26870. BreakType[BreakType['Br'] = 0] = 'Br';
  26871. BreakType[BreakType['Block'] = 1] = 'Block';
  26872. BreakType[BreakType['Wrap'] = 2] = 'Wrap';
  26873. BreakType[BreakType['Eol'] = 3] = 'Eol';
  26874. }(BreakType || (BreakType = {})));
  26875. var flip = function (direction, positions) {
  26876. return direction === HDirection.Backwards ? reverse(positions) : positions;
  26877. };
  26878. var walk = function (direction, caretWalker, pos) {
  26879. return direction === HDirection.Forwards ? caretWalker.next(pos) : caretWalker.prev(pos);
  26880. };
  26881. var getBreakType = function (scope, direction, currentPos, nextPos) {
  26882. if (isBr$5(nextPos.getNode(direction === HDirection.Forwards))) {
  26883. return BreakType.Br;
  26884. } else if (isInSameBlock(currentPos, nextPos) === false) {
  26885. return BreakType.Block;
  26886. } else {
  26887. return BreakType.Wrap;
  26888. }
  26889. };
  26890. var getPositionsUntil = function (predicate, direction, scope, start) {
  26891. var caretWalker = CaretWalker(scope);
  26892. var currentPos = start;
  26893. var positions = [];
  26894. while (currentPos) {
  26895. var nextPos = walk(direction, caretWalker, currentPos);
  26896. if (!nextPos) {
  26897. break;
  26898. }
  26899. if (isBr$5(nextPos.getNode(false))) {
  26900. if (direction === HDirection.Forwards) {
  26901. return {
  26902. positions: flip(direction, positions).concat([nextPos]),
  26903. breakType: BreakType.Br,
  26904. breakAt: Optional.some(nextPos)
  26905. };
  26906. } else {
  26907. return {
  26908. positions: flip(direction, positions),
  26909. breakType: BreakType.Br,
  26910. breakAt: Optional.some(nextPos)
  26911. };
  26912. }
  26913. }
  26914. if (!nextPos.isVisible()) {
  26915. currentPos = nextPos;
  26916. continue;
  26917. }
  26918. if (predicate(currentPos, nextPos)) {
  26919. var breakType = getBreakType(scope, direction, currentPos, nextPos);
  26920. return {
  26921. positions: flip(direction, positions),
  26922. breakType: breakType,
  26923. breakAt: Optional.some(nextPos)
  26924. };
  26925. }
  26926. positions.push(nextPos);
  26927. currentPos = nextPos;
  26928. }
  26929. return {
  26930. positions: flip(direction, positions),
  26931. breakType: BreakType.Eol,
  26932. breakAt: Optional.none()
  26933. };
  26934. };
  26935. var getAdjacentLinePositions = function (direction, getPositionsUntilBreak, scope, start) {
  26936. return getPositionsUntilBreak(scope, start).breakAt.map(function (pos) {
  26937. var positions = getPositionsUntilBreak(scope, pos).positions;
  26938. return direction === HDirection.Backwards ? positions.concat(pos) : [pos].concat(positions);
  26939. }).getOr([]);
  26940. };
  26941. var findClosestHorizontalPositionFromPoint = function (positions, x) {
  26942. return foldl(positions, function (acc, newPos) {
  26943. return acc.fold(function () {
  26944. return Optional.some(newPos);
  26945. }, function (lastPos) {
  26946. return lift2(head(lastPos.getClientRects()), head(newPos.getClientRects()), function (lastRect, newRect) {
  26947. var lastDist = Math.abs(x - lastRect.left);
  26948. var newDist = Math.abs(x - newRect.left);
  26949. return newDist <= lastDist ? newPos : lastPos;
  26950. }).or(acc);
  26951. });
  26952. }, Optional.none());
  26953. };
  26954. var findClosestHorizontalPosition = function (positions, pos) {
  26955. return head(pos.getClientRects()).bind(function (targetRect) {
  26956. return findClosestHorizontalPositionFromPoint(positions, targetRect.left);
  26957. });
  26958. };
  26959. var getPositionsUntilPreviousLine = curry(getPositionsUntil, CaretPosition.isAbove, -1);
  26960. var getPositionsUntilNextLine = curry(getPositionsUntil, CaretPosition.isBelow, 1);
  26961. var getPositionsAbove = curry(getAdjacentLinePositions, -1, getPositionsUntilPreviousLine);
  26962. var getPositionsBelow = curry(getAdjacentLinePositions, 1, getPositionsUntilNextLine);
  26963. var isAtFirstLine = function (scope, pos) {
  26964. return getPositionsUntilPreviousLine(scope, pos).breakAt.isNone();
  26965. };
  26966. var isAtLastLine = function (scope, pos) {
  26967. return getPositionsUntilNextLine(scope, pos).breakAt.isNone();
  26968. };
  26969. var getFirstLinePositions = function (scope) {
  26970. return firstPositionIn(scope).map(function (pos) {
  26971. return [pos].concat(getPositionsUntilNextLine(scope, pos).positions);
  26972. }).getOr([]);
  26973. };
  26974. var getLastLinePositions = function (scope) {
  26975. return lastPositionIn(scope).map(function (pos) {
  26976. return getPositionsUntilPreviousLine(scope, pos).positions.concat(pos);
  26977. }).getOr([]);
  26978. };
  26979. var getNodeClientRects = function (node) {
  26980. var toArrayWithNode = function (clientRects) {
  26981. return map$3(clientRects, function (rect) {
  26982. var clientRect = clone(rect);
  26983. clientRect.node = node;
  26984. return clientRect;
  26985. });
  26986. };
  26987. if (isElement$5(node)) {
  26988. return toArrayWithNode(node.getClientRects());
  26989. }
  26990. if (isText$7(node)) {
  26991. var rng = node.ownerDocument.createRange();
  26992. rng.setStart(node, 0);
  26993. rng.setEnd(node, node.data.length);
  26994. return toArrayWithNode(rng.getClientRects());
  26995. }
  26996. };
  26997. var getClientRects = function (nodes) {
  26998. return bind(nodes, getNodeClientRects);
  26999. };
  27000. var VDirection;
  27001. (function (VDirection) {
  27002. VDirection[VDirection['Up'] = -1] = 'Up';
  27003. VDirection[VDirection['Down'] = 1] = 'Down';
  27004. }(VDirection || (VDirection = {})));
  27005. var findUntil = function (direction, root, predicateFn, node) {
  27006. while (node = findNode$1(node, direction, isEditableCaretCandidate$1, root)) {
  27007. if (predicateFn(node)) {
  27008. return;
  27009. }
  27010. }
  27011. };
  27012. var walkUntil$1 = function (direction, isAboveFn, isBeflowFn, root, predicateFn, caretPosition) {
  27013. var line = 0;
  27014. var result = [];
  27015. var add = function (node) {
  27016. var clientRects = getClientRects([node]);
  27017. if (direction === -1) {
  27018. clientRects = clientRects.reverse();
  27019. }
  27020. for (var i = 0; i < clientRects.length; i++) {
  27021. var clientRect = clientRects[i];
  27022. if (isBeflowFn(clientRect, targetClientRect)) {
  27023. continue;
  27024. }
  27025. if (result.length > 0 && isAboveFn(clientRect, last$1(result))) {
  27026. line++;
  27027. }
  27028. clientRect.line = line;
  27029. if (predicateFn(clientRect)) {
  27030. return true;
  27031. }
  27032. result.push(clientRect);
  27033. }
  27034. };
  27035. var targetClientRect = last$1(caretPosition.getClientRects());
  27036. if (!targetClientRect) {
  27037. return result;
  27038. }
  27039. var node = caretPosition.getNode();
  27040. add(node);
  27041. findUntil(direction, root, add, node);
  27042. return result;
  27043. };
  27044. var aboveLineNumber = function (lineNumber, clientRect) {
  27045. return clientRect.line > lineNumber;
  27046. };
  27047. var isLineNumber = function (lineNumber, clientRect) {
  27048. return clientRect.line === lineNumber;
  27049. };
  27050. var upUntil = curry(walkUntil$1, VDirection.Up, isAbove$1, isBelow$1);
  27051. var downUntil = curry(walkUntil$1, VDirection.Down, isBelow$1, isAbove$1);
  27052. var positionsUntil = function (direction, root, predicateFn, node) {
  27053. var caretWalker = CaretWalker(root);
  27054. var walkFn;
  27055. var isBelowFn;
  27056. var isAboveFn;
  27057. var caretPosition;
  27058. var result = [];
  27059. var line = 0;
  27060. var getClientRect = function (caretPosition) {
  27061. if (direction === 1) {
  27062. return last$1(caretPosition.getClientRects());
  27063. }
  27064. return last$1(caretPosition.getClientRects());
  27065. };
  27066. if (direction === 1) {
  27067. walkFn = caretWalker.next;
  27068. isBelowFn = isBelow$1;
  27069. isAboveFn = isAbove$1;
  27070. caretPosition = CaretPosition.after(node);
  27071. } else {
  27072. walkFn = caretWalker.prev;
  27073. isBelowFn = isAbove$1;
  27074. isAboveFn = isBelow$1;
  27075. caretPosition = CaretPosition.before(node);
  27076. }
  27077. var targetClientRect = getClientRect(caretPosition);
  27078. do {
  27079. if (!caretPosition.isVisible()) {
  27080. continue;
  27081. }
  27082. var rect = getClientRect(caretPosition);
  27083. if (isAboveFn(rect, targetClientRect)) {
  27084. continue;
  27085. }
  27086. if (result.length > 0 && isBelowFn(rect, last$1(result))) {
  27087. line++;
  27088. }
  27089. var clientRect = clone(rect);
  27090. clientRect.position = caretPosition;
  27091. clientRect.line = line;
  27092. if (predicateFn(clientRect)) {
  27093. return result;
  27094. }
  27095. result.push(clientRect);
  27096. } while (caretPosition = walkFn(caretPosition));
  27097. return result;
  27098. };
  27099. var isAboveLine = function (lineNumber) {
  27100. return function (clientRect) {
  27101. return aboveLineNumber(lineNumber, clientRect);
  27102. };
  27103. };
  27104. var isLine = function (lineNumber) {
  27105. return function (clientRect) {
  27106. return isLineNumber(lineNumber, clientRect);
  27107. };
  27108. };
  27109. var isContentEditableFalse$3 = isContentEditableFalse$b;
  27110. var findNode = findNode$1;
  27111. var distanceToRectLeft = function (clientRect, clientX) {
  27112. return Math.abs(clientRect.left - clientX);
  27113. };
  27114. var distanceToRectRight = function (clientRect, clientX) {
  27115. return Math.abs(clientRect.right - clientX);
  27116. };
  27117. var isInsideX = function (clientX, clientRect) {
  27118. return clientX >= clientRect.left && clientX <= clientRect.right;
  27119. };
  27120. var isInsideY = function (clientY, clientRect) {
  27121. return clientY >= clientRect.top && clientY <= clientRect.bottom;
  27122. };
  27123. var isNodeClientRect = function (rect) {
  27124. return hasNonNullableKey(rect, 'node');
  27125. };
  27126. var findClosestClientRect = function (clientRects, clientX, allowInside) {
  27127. if (allowInside === void 0) {
  27128. allowInside = always;
  27129. }
  27130. return reduce(clientRects, function (oldClientRect, clientRect) {
  27131. if (isInsideX(clientX, clientRect)) {
  27132. return allowInside(clientRect) ? clientRect : oldClientRect;
  27133. }
  27134. if (isInsideX(clientX, oldClientRect)) {
  27135. return allowInside(oldClientRect) ? oldClientRect : clientRect;
  27136. }
  27137. var oldDistance = Math.min(distanceToRectLeft(oldClientRect, clientX), distanceToRectRight(oldClientRect, clientX));
  27138. var newDistance = Math.min(distanceToRectLeft(clientRect, clientX), distanceToRectRight(clientRect, clientX));
  27139. if (newDistance === oldDistance && isNodeClientRect(clientRect) && isContentEditableFalse$3(clientRect.node)) {
  27140. return clientRect;
  27141. }
  27142. if (newDistance < oldDistance) {
  27143. return clientRect;
  27144. }
  27145. return oldClientRect;
  27146. });
  27147. };
  27148. var walkUntil = function (direction, root, predicateFn, startNode, includeChildren) {
  27149. var node = findNode(startNode, direction, isEditableCaretCandidate$1, root, !includeChildren);
  27150. do {
  27151. if (!node || predicateFn(node)) {
  27152. return;
  27153. }
  27154. } while (node = findNode(node, direction, isEditableCaretCandidate$1, root));
  27155. };
  27156. var findLineNodeRects = function (root, targetNodeRect, includeChildren) {
  27157. if (includeChildren === void 0) {
  27158. includeChildren = true;
  27159. }
  27160. var clientRects = [];
  27161. var collect = function (checkPosFn, node) {
  27162. var lineRects = filter$4(getClientRects([node]), function (clientRect) {
  27163. return !checkPosFn(clientRect, targetNodeRect);
  27164. });
  27165. clientRects = clientRects.concat(lineRects);
  27166. return lineRects.length === 0;
  27167. };
  27168. clientRects.push(targetNodeRect);
  27169. walkUntil(VDirection.Up, root, curry(collect, isAbove$1), targetNodeRect.node, includeChildren);
  27170. walkUntil(VDirection.Down, root, curry(collect, isBelow$1), targetNodeRect.node, includeChildren);
  27171. return clientRects;
  27172. };
  27173. var getFakeCaretTargets = function (root) {
  27174. return filter$4(from(root.getElementsByTagName('*')), isFakeCaretTarget);
  27175. };
  27176. var caretInfo = function (clientRect, clientX) {
  27177. return {
  27178. node: clientRect.node,
  27179. before: distanceToRectLeft(clientRect, clientX) < distanceToRectRight(clientRect, clientX)
  27180. };
  27181. };
  27182. var closestFakeCaret = function (root, clientX, clientY) {
  27183. var fakeTargetNodeRects = getClientRects(getFakeCaretTargets(root));
  27184. var targetNodeRects = filter$4(fakeTargetNodeRects, curry(isInsideY, clientY));
  27185. var checkInside = function (clientRect) {
  27186. return !isTable$3(clientRect.node) && !isMedia$2(clientRect.node);
  27187. };
  27188. var closestNodeRect = findClosestClientRect(targetNodeRects, clientX, checkInside);
  27189. if (closestNodeRect) {
  27190. var includeChildren = checkInside(closestNodeRect);
  27191. closestNodeRect = findClosestClientRect(findLineNodeRects(root, closestNodeRect, includeChildren), clientX, checkInside);
  27192. if (closestNodeRect && isFakeCaretTarget(closestNodeRect.node)) {
  27193. return caretInfo(closestNodeRect, clientX);
  27194. }
  27195. }
  27196. return null;
  27197. };
  27198. var moveToRange = function (editor, rng) {
  27199. editor.selection.setRng(rng);
  27200. scrollRangeIntoView(editor, editor.selection.getRng());
  27201. };
  27202. var renderRangeCaretOpt = function (editor, range, scrollIntoView) {
  27203. return Optional.some(renderRangeCaret(editor, range, scrollIntoView));
  27204. };
  27205. var moveHorizontally = function (editor, direction, range, isBefore, isAfter, isElement) {
  27206. var forwards = direction === HDirection.Forwards;
  27207. var caretWalker = CaretWalker(editor.getBody());
  27208. var getNextPosFn = curry(getVisualCaretPosition, forwards ? caretWalker.next : caretWalker.prev);
  27209. var isBeforeFn = forwards ? isBefore : isAfter;
  27210. if (!range.collapsed) {
  27211. var node = getSelectedNode(range);
  27212. if (isElement(node)) {
  27213. return showCaret(direction, editor, node, direction === HDirection.Backwards, false);
  27214. }
  27215. }
  27216. var caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);
  27217. if (isBeforeFn(caretPosition)) {
  27218. return selectNode(editor, caretPosition.getNode(!forwards));
  27219. }
  27220. var nextCaretPosition = normalizePosition(forwards, getNextPosFn(caretPosition));
  27221. var rangeIsInContainerBlock = isRangeInCaretContainerBlock(range);
  27222. if (!nextCaretPosition) {
  27223. return rangeIsInContainerBlock ? Optional.some(range) : Optional.none();
  27224. }
  27225. if (isBeforeFn(nextCaretPosition)) {
  27226. return showCaret(direction, editor, nextCaretPosition.getNode(!forwards), forwards, false);
  27227. }
  27228. var peekCaretPosition = getNextPosFn(nextCaretPosition);
  27229. if (peekCaretPosition && isBeforeFn(peekCaretPosition)) {
  27230. if (isMoveInsideSameBlock(nextCaretPosition, peekCaretPosition)) {
  27231. return showCaret(direction, editor, peekCaretPosition.getNode(!forwards), forwards, false);
  27232. }
  27233. }
  27234. if (rangeIsInContainerBlock) {
  27235. return renderRangeCaretOpt(editor, nextCaretPosition.toRange(), false);
  27236. }
  27237. return Optional.none();
  27238. };
  27239. var moveVertically = function (editor, direction, range, isBefore, isAfter, isElement) {
  27240. var caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);
  27241. var caretClientRect = last$1(caretPosition.getClientRects());
  27242. var forwards = direction === VDirection.Down;
  27243. if (!caretClientRect) {
  27244. return Optional.none();
  27245. }
  27246. var walkerFn = forwards ? downUntil : upUntil;
  27247. var linePositions = walkerFn(editor.getBody(), isAboveLine(1), caretPosition);
  27248. var nextLinePositions = filter$4(linePositions, isLine(1));
  27249. var clientX = caretClientRect.left;
  27250. var nextLineRect = findClosestClientRect(nextLinePositions, clientX);
  27251. if (nextLineRect && isElement(nextLineRect.node)) {
  27252. var dist1 = Math.abs(clientX - nextLineRect.left);
  27253. var dist2 = Math.abs(clientX - nextLineRect.right);
  27254. return showCaret(direction, editor, nextLineRect.node, dist1 < dist2, false);
  27255. }
  27256. var currentNode;
  27257. if (isBefore(caretPosition)) {
  27258. currentNode = caretPosition.getNode();
  27259. } else if (isAfter(caretPosition)) {
  27260. currentNode = caretPosition.getNode(true);
  27261. } else {
  27262. currentNode = getSelectedNode(range);
  27263. }
  27264. if (currentNode) {
  27265. var caretPositions = positionsUntil(direction, editor.getBody(), isAboveLine(1), currentNode);
  27266. var closestNextLineRect = findClosestClientRect(filter$4(caretPositions, isLine(1)), clientX);
  27267. if (closestNextLineRect) {
  27268. return renderRangeCaretOpt(editor, closestNextLineRect.position.toRange(), false);
  27269. }
  27270. closestNextLineRect = last$1(filter$4(caretPositions, isLine(0)));
  27271. if (closestNextLineRect) {
  27272. return renderRangeCaretOpt(editor, closestNextLineRect.position.toRange(), false);
  27273. }
  27274. }
  27275. if (nextLinePositions.length === 0) {
  27276. return getLineEndPoint(editor, forwards).filter(forwards ? isAfter : isBefore).map(function (pos) {
  27277. return renderRangeCaret(editor, pos.toRange(), false);
  27278. });
  27279. }
  27280. return Optional.none();
  27281. };
  27282. var getLineEndPoint = function (editor, forward) {
  27283. var rng = editor.selection.getRng();
  27284. var body = editor.getBody();
  27285. if (forward) {
  27286. var from = CaretPosition.fromRangeEnd(rng);
  27287. var result = getPositionsUntilNextLine(body, from);
  27288. return last$2(result.positions);
  27289. } else {
  27290. var from = CaretPosition.fromRangeStart(rng);
  27291. var result = getPositionsUntilPreviousLine(body, from);
  27292. return head(result.positions);
  27293. }
  27294. };
  27295. var moveToLineEndPoint$3 = function (editor, forward, isElementPosition) {
  27296. return getLineEndPoint(editor, forward).filter(isElementPosition).exists(function (pos) {
  27297. editor.selection.setRng(pos.toRange());
  27298. return true;
  27299. });
  27300. };
  27301. var setCaretPosition = function (editor, pos) {
  27302. var rng = editor.dom.createRng();
  27303. rng.setStart(pos.container(), pos.offset());
  27304. rng.setEnd(pos.container(), pos.offset());
  27305. editor.selection.setRng(rng);
  27306. };
  27307. var setSelected = function (state, elm) {
  27308. if (state) {
  27309. elm.setAttribute('data-mce-selected', 'inline-boundary');
  27310. } else {
  27311. elm.removeAttribute('data-mce-selected');
  27312. }
  27313. };
  27314. var renderCaretLocation = function (editor, caret, location) {
  27315. return renderCaret(caret, location).map(function (pos) {
  27316. setCaretPosition(editor, pos);
  27317. return location;
  27318. });
  27319. };
  27320. var findLocation = function (editor, caret, forward) {
  27321. var rootNode = editor.getBody();
  27322. var from = CaretPosition.fromRangeStart(editor.selection.getRng());
  27323. var isInlineTarget$1 = curry(isInlineTarget, editor);
  27324. var location = findLocation$1(forward, isInlineTarget$1, rootNode, from);
  27325. return location.bind(function (location) {
  27326. return renderCaretLocation(editor, caret, location);
  27327. });
  27328. };
  27329. var toggleInlines = function (isInlineTarget, dom, elms) {
  27330. var inlineBoundaries = map$3(descendants(SugarElement.fromDom(dom.getRoot()), '*[data-mce-selected="inline-boundary"]'), function (e) {
  27331. return e.dom;
  27332. });
  27333. var selectedInlines = filter$4(inlineBoundaries, isInlineTarget);
  27334. var targetInlines = filter$4(elms, isInlineTarget);
  27335. each$k(difference(selectedInlines, targetInlines), curry(setSelected, false));
  27336. each$k(difference(targetInlines, selectedInlines), curry(setSelected, true));
  27337. };
  27338. var safeRemoveCaretContainer = function (editor, caret) {
  27339. if (editor.selection.isCollapsed() && editor.composing !== true && caret.get()) {
  27340. var pos = CaretPosition.fromRangeStart(editor.selection.getRng());
  27341. if (CaretPosition.isTextPosition(pos) && isAtZwsp(pos) === false) {
  27342. setCaretPosition(editor, removeAndReposition(caret.get(), pos));
  27343. caret.set(null);
  27344. }
  27345. }
  27346. };
  27347. var renderInsideInlineCaret = function (isInlineTarget, editor, caret, elms) {
  27348. if (editor.selection.isCollapsed()) {
  27349. var inlines = filter$4(elms, isInlineTarget);
  27350. each$k(inlines, function (_inline) {
  27351. var pos = CaretPosition.fromRangeStart(editor.selection.getRng());
  27352. readLocation(isInlineTarget, editor.getBody(), pos).bind(function (location) {
  27353. return renderCaretLocation(editor, caret, location);
  27354. });
  27355. });
  27356. }
  27357. };
  27358. var move$2 = function (editor, caret, forward) {
  27359. return isInlineBoundariesEnabled(editor) ? findLocation(editor, caret, forward).isSome() : false;
  27360. };
  27361. var moveWord = function (forward, editor, _caret) {
  27362. return isInlineBoundariesEnabled(editor) ? moveByWord(forward, editor) : false;
  27363. };
  27364. var setupSelectedState = function (editor) {
  27365. var caret = Cell(null);
  27366. var isInlineTarget$1 = curry(isInlineTarget, editor);
  27367. editor.on('NodeChange', function (e) {
  27368. if (isInlineBoundariesEnabled(editor) && !(Env.browser.isIE() && e.initial)) {
  27369. toggleInlines(isInlineTarget$1, editor.dom, e.parents);
  27370. safeRemoveCaretContainer(editor, caret);
  27371. renderInsideInlineCaret(isInlineTarget$1, editor, caret, e.parents);
  27372. }
  27373. });
  27374. return caret;
  27375. };
  27376. var moveNextWord = curry(moveWord, true);
  27377. var movePrevWord = curry(moveWord, false);
  27378. var moveToLineEndPoint$2 = function (editor, forward, caret) {
  27379. if (isInlineBoundariesEnabled(editor)) {
  27380. var linePoint = getLineEndPoint(editor, forward).getOrThunk(function () {
  27381. var rng = editor.selection.getRng();
  27382. return forward ? CaretPosition.fromRangeEnd(rng) : CaretPosition.fromRangeStart(rng);
  27383. });
  27384. return readLocation(curry(isInlineTarget, editor), editor.getBody(), linePoint).exists(function (loc) {
  27385. var outsideLoc = outside(loc);
  27386. return renderCaret(caret, outsideLoc).exists(function (pos) {
  27387. setCaretPosition(editor, pos);
  27388. return true;
  27389. });
  27390. });
  27391. } else {
  27392. return false;
  27393. }
  27394. };
  27395. var rangeFromPositions = function (from, to) {
  27396. var range = document.createRange();
  27397. range.setStart(from.container(), from.offset());
  27398. range.setEnd(to.container(), to.offset());
  27399. return range;
  27400. };
  27401. var hasOnlyTwoOrLessPositionsLeft = function (elm) {
  27402. return lift2(firstPositionIn(elm), lastPositionIn(elm), function (firstPos, lastPos) {
  27403. var normalizedFirstPos = normalizePosition(true, firstPos);
  27404. var normalizedLastPos = normalizePosition(false, lastPos);
  27405. return nextPosition(elm, normalizedFirstPos).forall(function (pos) {
  27406. return pos.isEqual(normalizedLastPos);
  27407. });
  27408. }).getOr(true);
  27409. };
  27410. var setCaretLocation = function (editor, caret) {
  27411. return function (location) {
  27412. return renderCaret(caret, location).exists(function (pos) {
  27413. setCaretPosition(editor, pos);
  27414. return true;
  27415. });
  27416. };
  27417. };
  27418. var deleteFromTo = function (editor, caret, from, to) {
  27419. var rootNode = editor.getBody();
  27420. var isInlineTarget$1 = curry(isInlineTarget, editor);
  27421. editor.undoManager.ignore(function () {
  27422. editor.selection.setRng(rangeFromPositions(from, to));
  27423. editor.execCommand('Delete');
  27424. readLocation(isInlineTarget$1, rootNode, CaretPosition.fromRangeStart(editor.selection.getRng())).map(inside).map(setCaretLocation(editor, caret));
  27425. });
  27426. editor.nodeChanged();
  27427. };
  27428. var rescope = function (rootNode, node) {
  27429. var parentBlock = getParentBlock$2(node, rootNode);
  27430. return parentBlock ? parentBlock : rootNode;
  27431. };
  27432. var backspaceDeleteCollapsed = function (editor, caret, forward, from) {
  27433. var rootNode = rescope(editor.getBody(), from.container());
  27434. var isInlineTarget$1 = curry(isInlineTarget, editor);
  27435. var fromLocation = readLocation(isInlineTarget$1, rootNode, from);
  27436. return fromLocation.bind(function (location) {
  27437. if (forward) {
  27438. return location.fold(constant(Optional.some(inside(location))), Optional.none, constant(Optional.some(outside(location))), Optional.none);
  27439. } else {
  27440. return location.fold(Optional.none, constant(Optional.some(outside(location))), Optional.none, constant(Optional.some(inside(location))));
  27441. }
  27442. }).map(setCaretLocation(editor, caret)).getOrThunk(function () {
  27443. var toPosition = navigate(forward, rootNode, from);
  27444. var toLocation = toPosition.bind(function (pos) {
  27445. return readLocation(isInlineTarget$1, rootNode, pos);
  27446. });
  27447. return lift2(fromLocation, toLocation, function () {
  27448. return findRootInline(isInlineTarget$1, rootNode, from).exists(function (elm) {
  27449. if (hasOnlyTwoOrLessPositionsLeft(elm)) {
  27450. deleteElement$2(editor, forward, SugarElement.fromDom(elm));
  27451. return true;
  27452. } else {
  27453. return false;
  27454. }
  27455. });
  27456. }).orThunk(function () {
  27457. return toLocation.bind(function (_) {
  27458. return toPosition.map(function (to) {
  27459. if (forward) {
  27460. deleteFromTo(editor, caret, from, to);
  27461. } else {
  27462. deleteFromTo(editor, caret, to, from);
  27463. }
  27464. return true;
  27465. });
  27466. });
  27467. }).getOr(false);
  27468. });
  27469. };
  27470. var backspaceDelete$3 = function (editor, caret, forward) {
  27471. if (editor.selection.isCollapsed() && isInlineBoundariesEnabled(editor)) {
  27472. var from = CaretPosition.fromRangeStart(editor.selection.getRng());
  27473. return backspaceDeleteCollapsed(editor, caret, forward, from);
  27474. }
  27475. return false;
  27476. };
  27477. var getParentInlines = function (rootElm, startElm) {
  27478. var parents = parentsAndSelf(startElm, rootElm);
  27479. return findIndex$2(parents, isBlock$2).fold(constant(parents), function (index) {
  27480. return parents.slice(0, index);
  27481. });
  27482. };
  27483. var hasOnlyOneChild = function (elm) {
  27484. return childNodesCount(elm) === 1;
  27485. };
  27486. var deleteLastPosition = function (forward, editor, target, parentInlines) {
  27487. var isFormatElement$1 = curry(isFormatElement, editor);
  27488. var formatNodes = map$3(filter$4(parentInlines, isFormatElement$1), function (elm) {
  27489. return elm.dom;
  27490. });
  27491. if (formatNodes.length === 0) {
  27492. deleteElement$2(editor, forward, target);
  27493. } else {
  27494. var pos = replaceWithCaretFormat(target.dom, formatNodes);
  27495. editor.selection.setRng(pos.toRange());
  27496. }
  27497. };
  27498. var deleteCaret$1 = function (editor, forward) {
  27499. var rootElm = SugarElement.fromDom(editor.getBody());
  27500. var startElm = SugarElement.fromDom(editor.selection.getStart());
  27501. var parentInlines = filter$4(getParentInlines(rootElm, startElm), hasOnlyOneChild);
  27502. return last$2(parentInlines).exists(function (target) {
  27503. var fromPos = CaretPosition.fromRangeStart(editor.selection.getRng());
  27504. if (willDeleteLastPositionInElement(forward, fromPos, target.dom) && !isEmptyCaretFormatElement(target)) {
  27505. deleteLastPosition(forward, editor, target, parentInlines);
  27506. return true;
  27507. } else {
  27508. return false;
  27509. }
  27510. });
  27511. };
  27512. var backspaceDelete$2 = function (editor, forward) {
  27513. return editor.selection.isCollapsed() ? deleteCaret$1(editor, forward) : false;
  27514. };
  27515. var deleteElement = function (editor, forward, element) {
  27516. editor._selectionOverrides.hideFakeCaret();
  27517. deleteElement$2(editor, forward, SugarElement.fromDom(element));
  27518. return true;
  27519. };
  27520. var deleteCaret = function (editor, forward) {
  27521. var isNearMedia = forward ? isBeforeMedia : isAfterMedia;
  27522. var direction = forward ? HDirection.Forwards : HDirection.Backwards;
  27523. var fromPos = getNormalizedRangeEndPoint(direction, editor.getBody(), editor.selection.getRng());
  27524. if (isNearMedia(fromPos)) {
  27525. return deleteElement(editor, forward, fromPos.getNode(!forward));
  27526. } else {
  27527. return Optional.from(normalizePosition(forward, fromPos)).filter(function (pos) {
  27528. return isNearMedia(pos) && isMoveInsideSameBlock(fromPos, pos);
  27529. }).exists(function (pos) {
  27530. return deleteElement(editor, forward, pos.getNode(!forward));
  27531. });
  27532. }
  27533. };
  27534. var deleteRange = function (editor, forward) {
  27535. var selectedNode = editor.selection.getNode();
  27536. return isMedia$2(selectedNode) ? deleteElement(editor, forward, selectedNode) : false;
  27537. };
  27538. var backspaceDelete$1 = function (editor, forward) {
  27539. return editor.selection.isCollapsed() ? deleteCaret(editor, forward) : deleteRange(editor, forward);
  27540. };
  27541. var isEditable = function (target) {
  27542. return closest$3(target, function (elm) {
  27543. return isContentEditableTrue$4(elm.dom) || isContentEditableFalse$b(elm.dom);
  27544. }).exists(function (elm) {
  27545. return isContentEditableTrue$4(elm.dom);
  27546. });
  27547. };
  27548. var parseIndentValue = function (value) {
  27549. var number = parseInt(value, 10);
  27550. return isNaN(number) ? 0 : number;
  27551. };
  27552. var getIndentStyleName = function (useMargin, element) {
  27553. var indentStyleName = useMargin || isTable$2(element) ? 'margin' : 'padding';
  27554. var suffix = get$5(element, 'direction') === 'rtl' ? '-right' : '-left';
  27555. return indentStyleName + suffix;
  27556. };
  27557. var indentElement = function (dom, command, useMargin, value, unit, element) {
  27558. var indentStyleName = getIndentStyleName(useMargin, SugarElement.fromDom(element));
  27559. if (command === 'outdent') {
  27560. var styleValue = Math.max(0, parseIndentValue(element.style[indentStyleName]) - value);
  27561. dom.setStyle(element, indentStyleName, styleValue ? styleValue + unit : '');
  27562. } else {
  27563. var styleValue = parseIndentValue(element.style[indentStyleName]) + value + unit;
  27564. dom.setStyle(element, indentStyleName, styleValue);
  27565. }
  27566. };
  27567. var validateBlocks = function (editor, blocks) {
  27568. return forall(blocks, function (block) {
  27569. var indentStyleName = getIndentStyleName(shouldIndentUseMargin(editor), block);
  27570. var intentValue = getRaw(block, indentStyleName).map(parseIndentValue).getOr(0);
  27571. var contentEditable = editor.dom.getContentEditable(block.dom);
  27572. return contentEditable !== 'false' && intentValue > 0;
  27573. });
  27574. };
  27575. var canOutdent = function (editor) {
  27576. var blocks = getBlocksToIndent(editor);
  27577. return !editor.mode.isReadOnly() && (blocks.length > 1 || validateBlocks(editor, blocks));
  27578. };
  27579. var isListComponent = function (el) {
  27580. return isList(el) || isListItem(el);
  27581. };
  27582. var parentIsListComponent = function (el) {
  27583. return parent(el).exists(isListComponent);
  27584. };
  27585. var getBlocksToIndent = function (editor) {
  27586. return filter$4(fromDom$1(editor.selection.getSelectedBlocks()), function (el) {
  27587. return !isListComponent(el) && !parentIsListComponent(el) && isEditable(el);
  27588. });
  27589. };
  27590. var handle = function (editor, command) {
  27591. var dom = editor.dom, selection = editor.selection, formatter = editor.formatter;
  27592. var indentation = getIndentation(editor);
  27593. var indentUnit = /[a-z%]+$/i.exec(indentation)[0];
  27594. var indentValue = parseInt(indentation, 10);
  27595. var useMargin = shouldIndentUseMargin(editor);
  27596. var forcedRootBlock = getForcedRootBlock(editor);
  27597. if (!editor.queryCommandState('InsertUnorderedList') && !editor.queryCommandState('InsertOrderedList')) {
  27598. if (forcedRootBlock === '' && !dom.getParent(selection.getNode(), dom.isBlock)) {
  27599. formatter.apply('div');
  27600. }
  27601. }
  27602. each$k(getBlocksToIndent(editor), function (block) {
  27603. indentElement(dom, command, useMargin, indentValue, indentUnit, block.dom);
  27604. });
  27605. };
  27606. var backspaceDelete = function (editor, _forward) {
  27607. if (editor.selection.isCollapsed() && canOutdent(editor)) {
  27608. var dom = editor.dom;
  27609. var rng = editor.selection.getRng();
  27610. var pos = CaretPosition.fromRangeStart(rng);
  27611. var block = dom.getParent(rng.startContainer, dom.isBlock);
  27612. if (block !== null && isAtStartOfBlock(SugarElement.fromDom(block), pos)) {
  27613. handle(editor, 'outdent');
  27614. return true;
  27615. }
  27616. }
  27617. return false;
  27618. };
  27619. var nativeCommand = function (editor, command) {
  27620. editor.getDoc().execCommand(command, false, null);
  27621. };
  27622. var deleteCommand = function (editor, caret) {
  27623. if (backspaceDelete(editor)) {
  27624. return;
  27625. } else if (backspaceDelete$5(editor, false)) {
  27626. return;
  27627. } else if (backspaceDelete$6(editor, false)) {
  27628. return;
  27629. } else if (backspaceDelete$3(editor, caret, false)) {
  27630. return;
  27631. } else if (backspaceDelete$8(editor, false)) {
  27632. return;
  27633. } else if (backspaceDelete$9(editor)) {
  27634. return;
  27635. } else if (backspaceDelete$4(editor, false)) {
  27636. return;
  27637. } else if (backspaceDelete$1(editor, false)) {
  27638. return;
  27639. } else if (backspaceDelete$7(editor)) {
  27640. return;
  27641. } else if (backspaceDelete$2(editor, false)) {
  27642. return;
  27643. } else {
  27644. nativeCommand(editor, 'Delete');
  27645. paddEmptyBody(editor);
  27646. }
  27647. };
  27648. var forwardDeleteCommand = function (editor, caret) {
  27649. if (backspaceDelete$5(editor, true)) {
  27650. return;
  27651. } else if (backspaceDelete$6(editor, true)) {
  27652. return;
  27653. } else if (backspaceDelete$3(editor, caret, true)) {
  27654. return;
  27655. } else if (backspaceDelete$8(editor, true)) {
  27656. return;
  27657. } else if (backspaceDelete$9(editor)) {
  27658. return;
  27659. } else if (backspaceDelete$4(editor, true)) {
  27660. return;
  27661. } else if (backspaceDelete$1(editor, true)) {
  27662. return;
  27663. } else if (backspaceDelete$7(editor)) {
  27664. return;
  27665. } else if (backspaceDelete$2(editor, true)) {
  27666. return;
  27667. } else {
  27668. nativeCommand(editor, 'ForwardDelete');
  27669. }
  27670. };
  27671. var setup$f = function (editor, caret) {
  27672. editor.addCommand('delete', function () {
  27673. deleteCommand(editor, caret);
  27674. });
  27675. editor.addCommand('forwardDelete', function () {
  27676. forwardDeleteCommand(editor, caret);
  27677. });
  27678. };
  27679. var SIGNIFICANT_MOVE = 5;
  27680. var LONGPRESS_DELAY = 400;
  27681. var getTouch = function (event) {
  27682. if (event.touches === undefined || event.touches.length !== 1) {
  27683. return Optional.none();
  27684. }
  27685. return Optional.some(event.touches[0]);
  27686. };
  27687. var isFarEnough = function (touch, data) {
  27688. var distX = Math.abs(touch.clientX - data.x);
  27689. var distY = Math.abs(touch.clientY - data.y);
  27690. return distX > SIGNIFICANT_MOVE || distY > SIGNIFICANT_MOVE;
  27691. };
  27692. var setup$e = function (editor) {
  27693. var startData = value();
  27694. var longpressFired = Cell(false);
  27695. var debounceLongpress = last(function (e) {
  27696. editor.fire('longpress', __assign(__assign({}, e), { type: 'longpress' }));
  27697. longpressFired.set(true);
  27698. }, LONGPRESS_DELAY);
  27699. editor.on('touchstart', function (e) {
  27700. getTouch(e).each(function (touch) {
  27701. debounceLongpress.cancel();
  27702. var data = {
  27703. x: touch.clientX,
  27704. y: touch.clientY,
  27705. target: e.target
  27706. };
  27707. debounceLongpress.throttle(e);
  27708. longpressFired.set(false);
  27709. startData.set(data);
  27710. });
  27711. }, true);
  27712. editor.on('touchmove', function (e) {
  27713. debounceLongpress.cancel();
  27714. getTouch(e).each(function (touch) {
  27715. startData.on(function (data) {
  27716. if (isFarEnough(touch, data)) {
  27717. startData.clear();
  27718. longpressFired.set(false);
  27719. editor.fire('longpresscancel');
  27720. }
  27721. });
  27722. });
  27723. }, true);
  27724. editor.on('touchend touchcancel', function (e) {
  27725. debounceLongpress.cancel();
  27726. if (e.type === 'touchcancel') {
  27727. return;
  27728. }
  27729. startData.get().filter(function (data) {
  27730. return data.target.isEqualNode(e.target);
  27731. }).each(function () {
  27732. if (longpressFired.get()) {
  27733. e.preventDefault();
  27734. } else {
  27735. editor.fire('tap', __assign(__assign({}, e), { type: 'tap' }));
  27736. }
  27737. });
  27738. }, true);
  27739. };
  27740. var isBlockElement = function (blockElements, node) {
  27741. return has$2(blockElements, node.nodeName);
  27742. };
  27743. var isValidTarget = function (blockElements, node) {
  27744. if (isText$7(node)) {
  27745. return true;
  27746. } else if (isElement$5(node)) {
  27747. return !isBlockElement(blockElements, node) && !isBookmarkNode$1(node);
  27748. } else {
  27749. return false;
  27750. }
  27751. };
  27752. var hasBlockParent = function (blockElements, root, node) {
  27753. return exists(parents(SugarElement.fromDom(node), SugarElement.fromDom(root)), function (elm) {
  27754. return isBlockElement(blockElements, elm.dom);
  27755. });
  27756. };
  27757. var shouldRemoveTextNode = function (blockElements, node) {
  27758. if (isText$7(node)) {
  27759. if (node.nodeValue.length === 0) {
  27760. return true;
  27761. } else if (/^\s+$/.test(node.nodeValue) && (!node.nextSibling || isBlockElement(blockElements, node.nextSibling))) {
  27762. return true;
  27763. }
  27764. }
  27765. return false;
  27766. };
  27767. var addRootBlocks = function (editor) {
  27768. var dom = editor.dom, selection = editor.selection;
  27769. var schema = editor.schema, blockElements = schema.getBlockElements();
  27770. var node = selection.getStart();
  27771. var rootNode = editor.getBody();
  27772. var rootBlockNode, tempNode, wrapped;
  27773. var forcedRootBlock = getForcedRootBlock(editor);
  27774. if (!node || !isElement$5(node) || !forcedRootBlock) {
  27775. return;
  27776. }
  27777. var rootNodeName = rootNode.nodeName.toLowerCase();
  27778. if (!schema.isValidChild(rootNodeName, forcedRootBlock.toLowerCase()) || hasBlockParent(blockElements, rootNode, node)) {
  27779. return;
  27780. }
  27781. var rng = selection.getRng();
  27782. var startContainer = rng.startContainer;
  27783. var startOffset = rng.startOffset;
  27784. var endContainer = rng.endContainer;
  27785. var endOffset = rng.endOffset;
  27786. var restoreSelection = hasFocus(editor);
  27787. node = rootNode.firstChild;
  27788. while (node) {
  27789. if (isValidTarget(blockElements, node)) {
  27790. if (shouldRemoveTextNode(blockElements, node)) {
  27791. tempNode = node;
  27792. node = node.nextSibling;
  27793. dom.remove(tempNode);
  27794. continue;
  27795. }
  27796. if (!rootBlockNode) {
  27797. rootBlockNode = dom.create(forcedRootBlock, getForcedRootBlockAttrs(editor));
  27798. node.parentNode.insertBefore(rootBlockNode, node);
  27799. wrapped = true;
  27800. }
  27801. tempNode = node;
  27802. node = node.nextSibling;
  27803. rootBlockNode.appendChild(tempNode);
  27804. } else {
  27805. rootBlockNode = null;
  27806. node = node.nextSibling;
  27807. }
  27808. }
  27809. if (wrapped && restoreSelection) {
  27810. rng.setStart(startContainer, startOffset);
  27811. rng.setEnd(endContainer, endOffset);
  27812. selection.setRng(rng);
  27813. editor.nodeChanged();
  27814. }
  27815. };
  27816. var setup$d = function (editor) {
  27817. if (getForcedRootBlock(editor)) {
  27818. editor.on('NodeChange', curry(addRootBlocks, editor));
  27819. }
  27820. };
  27821. var findBlockCaretContainer = function (editor) {
  27822. return descendant(SugarElement.fromDom(editor.getBody()), '*[data-mce-caret]').map(function (elm) {
  27823. return elm.dom;
  27824. }).getOrNull();
  27825. };
  27826. var removeIeControlRect = function (editor) {
  27827. editor.selection.setRng(editor.selection.getRng());
  27828. };
  27829. var showBlockCaretContainer = function (editor, blockCaretContainer) {
  27830. if (blockCaretContainer.hasAttribute('data-mce-caret')) {
  27831. showCaretContainerBlock(blockCaretContainer);
  27832. removeIeControlRect(editor);
  27833. editor.selection.scrollIntoView(blockCaretContainer);
  27834. }
  27835. };
  27836. var handleBlockContainer = function (editor, e) {
  27837. var blockCaretContainer = findBlockCaretContainer(editor);
  27838. if (!blockCaretContainer) {
  27839. return;
  27840. }
  27841. if (e.type === 'compositionstart') {
  27842. e.preventDefault();
  27843. e.stopPropagation();
  27844. showBlockCaretContainer(editor, blockCaretContainer);
  27845. return;
  27846. }
  27847. if (hasContent(blockCaretContainer)) {
  27848. showBlockCaretContainer(editor, blockCaretContainer);
  27849. editor.undoManager.add();
  27850. }
  27851. };
  27852. var setup$c = function (editor) {
  27853. editor.on('keyup compositionstart', curry(handleBlockContainer, editor));
  27854. };
  27855. var isContentEditableFalse$2 = isContentEditableFalse$b;
  27856. var moveToCeFalseHorizontally = function (direction, editor, range) {
  27857. return moveHorizontally(editor, direction, range, isBeforeContentEditableFalse, isAfterContentEditableFalse, isContentEditableFalse$2);
  27858. };
  27859. var moveToCeFalseVertically = function (direction, editor, range) {
  27860. var isBefore = function (caretPosition) {
  27861. return isBeforeContentEditableFalse(caretPosition) || isBeforeTable(caretPosition);
  27862. };
  27863. var isAfter = function (caretPosition) {
  27864. return isAfterContentEditableFalse(caretPosition) || isAfterTable(caretPosition);
  27865. };
  27866. return moveVertically(editor, direction, range, isBefore, isAfter, isContentEditableFalse$2);
  27867. };
  27868. var createTextBlock = function (editor) {
  27869. var textBlock = editor.dom.create(getForcedRootBlock(editor));
  27870. if (!Env.ie || Env.ie >= 11) {
  27871. textBlock.innerHTML = '<br data-mce-bogus="1">';
  27872. }
  27873. return textBlock;
  27874. };
  27875. var exitPreBlock = function (editor, direction, range) {
  27876. var caretWalker = CaretWalker(editor.getBody());
  27877. var getVisualCaretPosition$1 = curry(getVisualCaretPosition, direction === 1 ? caretWalker.next : caretWalker.prev);
  27878. if (range.collapsed && hasForcedRootBlock(editor)) {
  27879. var pre = editor.dom.getParent(range.startContainer, 'PRE');
  27880. if (!pre) {
  27881. return;
  27882. }
  27883. var caretPos = getVisualCaretPosition$1(CaretPosition.fromRangeStart(range));
  27884. if (!caretPos) {
  27885. var newBlock = createTextBlock(editor);
  27886. if (direction === 1) {
  27887. editor.$(pre).after(newBlock);
  27888. } else {
  27889. editor.$(pre).before(newBlock);
  27890. }
  27891. editor.selection.select(newBlock, true);
  27892. editor.selection.collapse();
  27893. }
  27894. }
  27895. };
  27896. var getHorizontalRange = function (editor, forward) {
  27897. var direction = forward ? HDirection.Forwards : HDirection.Backwards;
  27898. var range = editor.selection.getRng();
  27899. return moveToCeFalseHorizontally(direction, editor, range).orThunk(function () {
  27900. exitPreBlock(editor, direction, range);
  27901. return Optional.none();
  27902. });
  27903. };
  27904. var getVerticalRange = function (editor, down) {
  27905. var direction = down ? 1 : -1;
  27906. var range = editor.selection.getRng();
  27907. return moveToCeFalseVertically(direction, editor, range).orThunk(function () {
  27908. exitPreBlock(editor, direction, range);
  27909. return Optional.none();
  27910. });
  27911. };
  27912. var moveH$2 = function (editor, forward) {
  27913. return getHorizontalRange(editor, forward).exists(function (newRange) {
  27914. moveToRange(editor, newRange);
  27915. return true;
  27916. });
  27917. };
  27918. var moveV$3 = function (editor, down) {
  27919. return getVerticalRange(editor, down).exists(function (newRange) {
  27920. moveToRange(editor, newRange);
  27921. return true;
  27922. });
  27923. };
  27924. var moveToLineEndPoint$1 = function (editor, forward) {
  27925. var isCefPosition = forward ? isAfterContentEditableFalse : isBeforeContentEditableFalse;
  27926. return moveToLineEndPoint$3(editor, forward, isCefPosition);
  27927. };
  27928. var isTarget = function (node) {
  27929. return contains$3(['figcaption'], name(node));
  27930. };
  27931. var rangeBefore = function (target) {
  27932. var rng = document.createRange();
  27933. rng.setStartBefore(target.dom);
  27934. rng.setEndBefore(target.dom);
  27935. return rng;
  27936. };
  27937. var insertElement = function (root, elm, forward) {
  27938. if (forward) {
  27939. append$1(root, elm);
  27940. } else {
  27941. prepend(root, elm);
  27942. }
  27943. };
  27944. var insertBr = function (root, forward) {
  27945. var br = SugarElement.fromTag('br');
  27946. insertElement(root, br, forward);
  27947. return rangeBefore(br);
  27948. };
  27949. var insertBlock = function (root, forward, blockName, attrs) {
  27950. var block = SugarElement.fromTag(blockName);
  27951. var br = SugarElement.fromTag('br');
  27952. setAll$1(block, attrs);
  27953. append$1(block, br);
  27954. insertElement(root, block, forward);
  27955. return rangeBefore(br);
  27956. };
  27957. var insertEmptyLine = function (root, rootBlockName, attrs, forward) {
  27958. if (rootBlockName === '') {
  27959. return insertBr(root, forward);
  27960. } else {
  27961. return insertBlock(root, forward, rootBlockName, attrs);
  27962. }
  27963. };
  27964. var getClosestTargetBlock = function (pos, root) {
  27965. var isRoot = curry(eq, root);
  27966. return closest$3(SugarElement.fromDom(pos.container()), isBlock$2, isRoot).filter(isTarget);
  27967. };
  27968. var isAtFirstOrLastLine = function (root, forward, pos) {
  27969. return forward ? isAtLastLine(root.dom, pos) : isAtFirstLine(root.dom, pos);
  27970. };
  27971. var moveCaretToNewEmptyLine = function (editor, forward) {
  27972. var root = SugarElement.fromDom(editor.getBody());
  27973. var pos = CaretPosition.fromRangeStart(editor.selection.getRng());
  27974. var rootBlock = getForcedRootBlock(editor);
  27975. var rootBlockAttrs = getForcedRootBlockAttrs(editor);
  27976. return getClosestTargetBlock(pos, root).exists(function () {
  27977. if (isAtFirstOrLastLine(root, forward, pos)) {
  27978. var rng = insertEmptyLine(root, rootBlock, rootBlockAttrs, forward);
  27979. editor.selection.setRng(rng);
  27980. return true;
  27981. } else {
  27982. return false;
  27983. }
  27984. });
  27985. };
  27986. var moveV$2 = function (editor, forward) {
  27987. if (editor.selection.isCollapsed()) {
  27988. return moveCaretToNewEmptyLine(editor, forward);
  27989. } else {
  27990. return false;
  27991. }
  27992. };
  27993. var defaultPatterns = function (patterns) {
  27994. return map$3(patterns, function (pattern) {
  27995. return __assign({
  27996. shiftKey: false,
  27997. altKey: false,
  27998. ctrlKey: false,
  27999. metaKey: false,
  28000. keyCode: 0,
  28001. action: noop
  28002. }, pattern);
  28003. });
  28004. };
  28005. var matchesEvent = function (pattern, evt) {
  28006. return evt.keyCode === pattern.keyCode && evt.shiftKey === pattern.shiftKey && evt.altKey === pattern.altKey && evt.ctrlKey === pattern.ctrlKey && evt.metaKey === pattern.metaKey;
  28007. };
  28008. var match$1 = function (patterns, evt) {
  28009. return bind(defaultPatterns(patterns), function (pattern) {
  28010. return matchesEvent(pattern, evt) ? [pattern] : [];
  28011. });
  28012. };
  28013. var action = function (f) {
  28014. var x = [];
  28015. for (var _i = 1; _i < arguments.length; _i++) {
  28016. x[_i - 1] = arguments[_i];
  28017. }
  28018. return function () {
  28019. return f.apply(null, x);
  28020. };
  28021. };
  28022. var execute = function (patterns, evt) {
  28023. return find$3(match$1(patterns, evt), function (pattern) {
  28024. return pattern.action();
  28025. });
  28026. };
  28027. var moveH$1 = function (editor, forward) {
  28028. var direction = forward ? HDirection.Forwards : HDirection.Backwards;
  28029. var range = editor.selection.getRng();
  28030. return moveHorizontally(editor, direction, range, isBeforeMedia, isAfterMedia, isMedia$2).exists(function (newRange) {
  28031. moveToRange(editor, newRange);
  28032. return true;
  28033. });
  28034. };
  28035. var moveV$1 = function (editor, down) {
  28036. var direction = down ? 1 : -1;
  28037. var range = editor.selection.getRng();
  28038. return moveVertically(editor, direction, range, isBeforeMedia, isAfterMedia, isMedia$2).exists(function (newRange) {
  28039. moveToRange(editor, newRange);
  28040. return true;
  28041. });
  28042. };
  28043. var moveToLineEndPoint = function (editor, forward) {
  28044. var isNearMedia = forward ? isAfterMedia : isBeforeMedia;
  28045. return moveToLineEndPoint$3(editor, forward, isNearMedia);
  28046. };
  28047. var deflate = function (rect, delta) {
  28048. return {
  28049. left: rect.left - delta,
  28050. top: rect.top - delta,
  28051. right: rect.right + delta * 2,
  28052. bottom: rect.bottom + delta * 2,
  28053. width: rect.width + delta,
  28054. height: rect.height + delta
  28055. };
  28056. };
  28057. var getCorners = function (getYAxisValue, tds) {
  28058. return bind(tds, function (td) {
  28059. var rect = deflate(clone(td.getBoundingClientRect()), -1);
  28060. return [
  28061. {
  28062. x: rect.left,
  28063. y: getYAxisValue(rect),
  28064. cell: td
  28065. },
  28066. {
  28067. x: rect.right,
  28068. y: getYAxisValue(rect),
  28069. cell: td
  28070. }
  28071. ];
  28072. });
  28073. };
  28074. var findClosestCorner = function (corners, x, y) {
  28075. return foldl(corners, function (acc, newCorner) {
  28076. return acc.fold(function () {
  28077. return Optional.some(newCorner);
  28078. }, function (oldCorner) {
  28079. var oldDist = Math.sqrt(Math.abs(oldCorner.x - x) + Math.abs(oldCorner.y - y));
  28080. var newDist = Math.sqrt(Math.abs(newCorner.x - x) + Math.abs(newCorner.y - y));
  28081. return Optional.some(newDist < oldDist ? newCorner : oldCorner);
  28082. });
  28083. }, Optional.none());
  28084. };
  28085. var getClosestCell = function (getYAxisValue, isTargetCorner, table, x, y) {
  28086. var cells = descendants(SugarElement.fromDom(table), 'td,th,caption').map(function (e) {
  28087. return e.dom;
  28088. });
  28089. var corners = filter$4(getCorners(getYAxisValue, cells), function (corner) {
  28090. return isTargetCorner(corner, y);
  28091. });
  28092. return findClosestCorner(corners, x, y).map(function (corner) {
  28093. return corner.cell;
  28094. });
  28095. };
  28096. var getBottomValue = function (rect) {
  28097. return rect.bottom;
  28098. };
  28099. var getTopValue = function (rect) {
  28100. return rect.top;
  28101. };
  28102. var isAbove = function (corner, y) {
  28103. return corner.y < y;
  28104. };
  28105. var isBelow = function (corner, y) {
  28106. return corner.y > y;
  28107. };
  28108. var getClosestCellAbove = curry(getClosestCell, getBottomValue, isAbove);
  28109. var getClosestCellBelow = curry(getClosestCell, getTopValue, isBelow);
  28110. var findClosestPositionInAboveCell = function (table, pos) {
  28111. return head(pos.getClientRects()).bind(function (rect) {
  28112. return getClosestCellAbove(table, rect.left, rect.top);
  28113. }).bind(function (cell) {
  28114. return findClosestHorizontalPosition(getLastLinePositions(cell), pos);
  28115. });
  28116. };
  28117. var findClosestPositionInBelowCell = function (table, pos) {
  28118. return last$2(pos.getClientRects()).bind(function (rect) {
  28119. return getClosestCellBelow(table, rect.left, rect.top);
  28120. }).bind(function (cell) {
  28121. return findClosestHorizontalPosition(getFirstLinePositions(cell), pos);
  28122. });
  28123. };
  28124. var hasNextBreak = function (getPositionsUntil, scope, lineInfo) {
  28125. return lineInfo.breakAt.exists(function (breakPos) {
  28126. return getPositionsUntil(scope, breakPos).breakAt.isSome();
  28127. });
  28128. };
  28129. var startsWithWrapBreak = function (lineInfo) {
  28130. return lineInfo.breakType === BreakType.Wrap && lineInfo.positions.length === 0;
  28131. };
  28132. var startsWithBrBreak = function (lineInfo) {
  28133. return lineInfo.breakType === BreakType.Br && lineInfo.positions.length === 1;
  28134. };
  28135. var isAtTableCellLine = function (getPositionsUntil, scope, pos) {
  28136. var lineInfo = getPositionsUntil(scope, pos);
  28137. if (startsWithWrapBreak(lineInfo) || !isBr$5(pos.getNode()) && startsWithBrBreak(lineInfo)) {
  28138. return !hasNextBreak(getPositionsUntil, scope, lineInfo);
  28139. } else {
  28140. return lineInfo.breakAt.isNone();
  28141. }
  28142. };
  28143. var isAtFirstTableCellLine = curry(isAtTableCellLine, getPositionsUntilPreviousLine);
  28144. var isAtLastTableCellLine = curry(isAtTableCellLine, getPositionsUntilNextLine);
  28145. var isCaretAtStartOrEndOfTable = function (forward, rng, table) {
  28146. var caretPos = CaretPosition.fromRangeStart(rng);
  28147. return positionIn(!forward, table).exists(function (pos) {
  28148. return pos.isEqual(caretPos);
  28149. });
  28150. };
  28151. var navigateHorizontally = function (editor, forward, table, _td) {
  28152. var rng = editor.selection.getRng();
  28153. var direction = forward ? 1 : -1;
  28154. if (isFakeCaretTableBrowser() && isCaretAtStartOrEndOfTable(forward, rng, table)) {
  28155. showCaret(direction, editor, table, !forward, false).each(function (newRng) {
  28156. moveToRange(editor, newRng);
  28157. });
  28158. return true;
  28159. }
  28160. return false;
  28161. };
  28162. var getClosestAbovePosition = function (root, table, start) {
  28163. return findClosestPositionInAboveCell(table, start).orThunk(function () {
  28164. return head(start.getClientRects()).bind(function (rect) {
  28165. return findClosestHorizontalPositionFromPoint(getPositionsAbove(root, CaretPosition.before(table)), rect.left);
  28166. });
  28167. }).getOr(CaretPosition.before(table));
  28168. };
  28169. var getClosestBelowPosition = function (root, table, start) {
  28170. return findClosestPositionInBelowCell(table, start).orThunk(function () {
  28171. return head(start.getClientRects()).bind(function (rect) {
  28172. return findClosestHorizontalPositionFromPoint(getPositionsBelow(root, CaretPosition.after(table)), rect.left);
  28173. });
  28174. }).getOr(CaretPosition.after(table));
  28175. };
  28176. var getTable = function (previous, pos) {
  28177. var node = pos.getNode(previous);
  28178. return isElement$5(node) && node.nodeName === 'TABLE' ? Optional.some(node) : Optional.none();
  28179. };
  28180. var renderBlock = function (down, editor, table, pos) {
  28181. var forcedRootBlock = getForcedRootBlock(editor);
  28182. if (forcedRootBlock) {
  28183. editor.undoManager.transact(function () {
  28184. var element = SugarElement.fromTag(forcedRootBlock);
  28185. setAll$1(element, getForcedRootBlockAttrs(editor));
  28186. append$1(element, SugarElement.fromTag('br'));
  28187. if (down) {
  28188. after$3(SugarElement.fromDom(table), element);
  28189. } else {
  28190. before$4(SugarElement.fromDom(table), element);
  28191. }
  28192. var rng = editor.dom.createRng();
  28193. rng.setStart(element.dom, 0);
  28194. rng.setEnd(element.dom, 0);
  28195. moveToRange(editor, rng);
  28196. });
  28197. } else {
  28198. moveToRange(editor, pos.toRange());
  28199. }
  28200. };
  28201. var moveCaret = function (editor, down, pos) {
  28202. var table = down ? getTable(true, pos) : getTable(false, pos);
  28203. var last = down === false;
  28204. table.fold(function () {
  28205. return moveToRange(editor, pos.toRange());
  28206. }, function (table) {
  28207. return positionIn(last, editor.getBody()).filter(function (lastPos) {
  28208. return lastPos.isEqual(pos);
  28209. }).fold(function () {
  28210. return moveToRange(editor, pos.toRange());
  28211. }, function (_) {
  28212. return renderBlock(down, editor, table, pos);
  28213. });
  28214. });
  28215. };
  28216. var navigateVertically = function (editor, down, table, td) {
  28217. var rng = editor.selection.getRng();
  28218. var pos = CaretPosition.fromRangeStart(rng);
  28219. var root = editor.getBody();
  28220. if (!down && isAtFirstTableCellLine(td, pos)) {
  28221. var newPos = getClosestAbovePosition(root, table, pos);
  28222. moveCaret(editor, down, newPos);
  28223. return true;
  28224. } else if (down && isAtLastTableCellLine(td, pos)) {
  28225. var newPos = getClosestBelowPosition(root, table, pos);
  28226. moveCaret(editor, down, newPos);
  28227. return true;
  28228. } else {
  28229. return false;
  28230. }
  28231. };
  28232. var move$1 = function (editor, forward, mover) {
  28233. return Optional.from(editor.dom.getParent(editor.selection.getNode(), 'td,th')).bind(function (td) {
  28234. return Optional.from(editor.dom.getParent(td, 'table')).map(function (table) {
  28235. return mover(editor, forward, table, td);
  28236. });
  28237. }).getOr(false);
  28238. };
  28239. var moveH = function (editor, forward) {
  28240. return move$1(editor, forward, navigateHorizontally);
  28241. };
  28242. var moveV = function (editor, forward) {
  28243. return move$1(editor, forward, navigateVertically);
  28244. };
  28245. var executeKeydownOverride$3 = function (editor, caret, evt) {
  28246. var os = detect().os;
  28247. execute([
  28248. {
  28249. keyCode: VK.RIGHT,
  28250. action: action(moveH$2, editor, true)
  28251. },
  28252. {
  28253. keyCode: VK.LEFT,
  28254. action: action(moveH$2, editor, false)
  28255. },
  28256. {
  28257. keyCode: VK.UP,
  28258. action: action(moveV$3, editor, false)
  28259. },
  28260. {
  28261. keyCode: VK.DOWN,
  28262. action: action(moveV$3, editor, true)
  28263. },
  28264. {
  28265. keyCode: VK.RIGHT,
  28266. action: action(moveH, editor, true)
  28267. },
  28268. {
  28269. keyCode: VK.LEFT,
  28270. action: action(moveH, editor, false)
  28271. },
  28272. {
  28273. keyCode: VK.UP,
  28274. action: action(moveV, editor, false)
  28275. },
  28276. {
  28277. keyCode: VK.DOWN,
  28278. action: action(moveV, editor, true)
  28279. },
  28280. {
  28281. keyCode: VK.RIGHT,
  28282. action: action(moveH$1, editor, true)
  28283. },
  28284. {
  28285. keyCode: VK.LEFT,
  28286. action: action(moveH$1, editor, false)
  28287. },
  28288. {
  28289. keyCode: VK.UP,
  28290. action: action(moveV$1, editor, false)
  28291. },
  28292. {
  28293. keyCode: VK.DOWN,
  28294. action: action(moveV$1, editor, true)
  28295. },
  28296. {
  28297. keyCode: VK.RIGHT,
  28298. action: action(move$2, editor, caret, true)
  28299. },
  28300. {
  28301. keyCode: VK.LEFT,
  28302. action: action(move$2, editor, caret, false)
  28303. },
  28304. {
  28305. keyCode: VK.RIGHT,
  28306. ctrlKey: !os.isOSX(),
  28307. altKey: os.isOSX(),
  28308. action: action(moveNextWord, editor, caret)
  28309. },
  28310. {
  28311. keyCode: VK.LEFT,
  28312. ctrlKey: !os.isOSX(),
  28313. altKey: os.isOSX(),
  28314. action: action(movePrevWord, editor, caret)
  28315. },
  28316. {
  28317. keyCode: VK.UP,
  28318. action: action(moveV$2, editor, false)
  28319. },
  28320. {
  28321. keyCode: VK.DOWN,
  28322. action: action(moveV$2, editor, true)
  28323. }
  28324. ], evt).each(function (_) {
  28325. evt.preventDefault();
  28326. });
  28327. };
  28328. var setup$b = function (editor, caret) {
  28329. editor.on('keydown', function (evt) {
  28330. if (evt.isDefaultPrevented() === false) {
  28331. executeKeydownOverride$3(editor, caret, evt);
  28332. }
  28333. });
  28334. };
  28335. var executeKeydownOverride$2 = function (editor, caret, evt) {
  28336. execute([
  28337. {
  28338. keyCode: VK.BACKSPACE,
  28339. action: action(backspaceDelete, editor, false)
  28340. },
  28341. {
  28342. keyCode: VK.BACKSPACE,
  28343. action: action(backspaceDelete$5, editor, false)
  28344. },
  28345. {
  28346. keyCode: VK.DELETE,
  28347. action: action(backspaceDelete$5, editor, true)
  28348. },
  28349. {
  28350. keyCode: VK.BACKSPACE,
  28351. action: action(backspaceDelete$6, editor, false)
  28352. },
  28353. {
  28354. keyCode: VK.DELETE,
  28355. action: action(backspaceDelete$6, editor, true)
  28356. },
  28357. {
  28358. keyCode: VK.BACKSPACE,
  28359. action: action(backspaceDelete$3, editor, caret, false)
  28360. },
  28361. {
  28362. keyCode: VK.DELETE,
  28363. action: action(backspaceDelete$3, editor, caret, true)
  28364. },
  28365. {
  28366. keyCode: VK.BACKSPACE,
  28367. action: action(backspaceDelete$9, editor, false)
  28368. },
  28369. {
  28370. keyCode: VK.DELETE,
  28371. action: action(backspaceDelete$9, editor, true)
  28372. },
  28373. {
  28374. keyCode: VK.BACKSPACE,
  28375. action: action(backspaceDelete$4, editor, false)
  28376. },
  28377. {
  28378. keyCode: VK.DELETE,
  28379. action: action(backspaceDelete$4, editor, true)
  28380. },
  28381. {
  28382. keyCode: VK.BACKSPACE,
  28383. action: action(backspaceDelete$1, editor, false)
  28384. },
  28385. {
  28386. keyCode: VK.DELETE,
  28387. action: action(backspaceDelete$1, editor, true)
  28388. },
  28389. {
  28390. keyCode: VK.BACKSPACE,
  28391. action: action(backspaceDelete$7, editor, false)
  28392. },
  28393. {
  28394. keyCode: VK.DELETE,
  28395. action: action(backspaceDelete$7, editor, true)
  28396. },
  28397. {
  28398. keyCode: VK.BACKSPACE,
  28399. action: action(backspaceDelete$8, editor, false)
  28400. },
  28401. {
  28402. keyCode: VK.DELETE,
  28403. action: action(backspaceDelete$8, editor, true)
  28404. },
  28405. {
  28406. keyCode: VK.BACKSPACE,
  28407. action: action(backspaceDelete$2, editor, false)
  28408. },
  28409. {
  28410. keyCode: VK.DELETE,
  28411. action: action(backspaceDelete$2, editor, true)
  28412. }
  28413. ], evt).each(function (_) {
  28414. evt.preventDefault();
  28415. });
  28416. };
  28417. var executeKeyupOverride = function (editor, evt) {
  28418. execute([
  28419. {
  28420. keyCode: VK.BACKSPACE,
  28421. action: action(paddEmptyElement, editor)
  28422. },
  28423. {
  28424. keyCode: VK.DELETE,
  28425. action: action(paddEmptyElement, editor)
  28426. }
  28427. ], evt);
  28428. };
  28429. var setup$a = function (editor, caret) {
  28430. editor.on('keydown', function (evt) {
  28431. if (evt.isDefaultPrevented() === false) {
  28432. executeKeydownOverride$2(editor, caret, evt);
  28433. }
  28434. });
  28435. editor.on('keyup', function (evt) {
  28436. if (evt.isDefaultPrevented() === false) {
  28437. executeKeyupOverride(editor, evt);
  28438. }
  28439. });
  28440. };
  28441. var firstNonWhiteSpaceNodeSibling = function (node) {
  28442. while (node) {
  28443. if (node.nodeType === 1 || node.nodeType === 3 && node.data && /[\r\n\s]/.test(node.data)) {
  28444. return node;
  28445. }
  28446. node = node.nextSibling;
  28447. }
  28448. };
  28449. var moveToCaretPosition = function (editor, root) {
  28450. var node, lastNode = root;
  28451. var dom = editor.dom;
  28452. var moveCaretBeforeOnEnterElementsMap = editor.schema.getMoveCaretBeforeOnEnterElements();
  28453. if (!root) {
  28454. return;
  28455. }
  28456. if (/^(LI|DT|DD)$/.test(root.nodeName)) {
  28457. var firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);
  28458. if (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) {
  28459. root.insertBefore(dom.doc.createTextNode(nbsp), root.firstChild);
  28460. }
  28461. }
  28462. var rng = dom.createRng();
  28463. root.normalize();
  28464. if (root.hasChildNodes()) {
  28465. var walker = new DomTreeWalker(root, root);
  28466. while (node = walker.current()) {
  28467. if (isText$7(node)) {
  28468. rng.setStart(node, 0);
  28469. rng.setEnd(node, 0);
  28470. break;
  28471. }
  28472. if (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {
  28473. rng.setStartBefore(node);
  28474. rng.setEndBefore(node);
  28475. break;
  28476. }
  28477. lastNode = node;
  28478. node = walker.next();
  28479. }
  28480. if (!node) {
  28481. rng.setStart(lastNode, 0);
  28482. rng.setEnd(lastNode, 0);
  28483. }
  28484. } else {
  28485. if (isBr$5(root)) {
  28486. if (root.nextSibling && dom.isBlock(root.nextSibling)) {
  28487. rng.setStartBefore(root);
  28488. rng.setEndBefore(root);
  28489. } else {
  28490. rng.setStartAfter(root);
  28491. rng.setEndAfter(root);
  28492. }
  28493. } else {
  28494. rng.setStart(root, 0);
  28495. rng.setEnd(root, 0);
  28496. }
  28497. }
  28498. editor.selection.setRng(rng);
  28499. scrollRangeIntoView(editor, rng);
  28500. };
  28501. var getEditableRoot$1 = function (dom, node) {
  28502. var root = dom.getRoot();
  28503. var parent, editableRoot;
  28504. parent = node;
  28505. while (parent !== root && dom.getContentEditable(parent) !== 'false') {
  28506. if (dom.getContentEditable(parent) === 'true') {
  28507. editableRoot = parent;
  28508. }
  28509. parent = parent.parentNode;
  28510. }
  28511. return parent !== root ? editableRoot : root;
  28512. };
  28513. var getParentBlock = function (editor) {
  28514. return Optional.from(editor.dom.getParent(editor.selection.getStart(true), editor.dom.isBlock));
  28515. };
  28516. var getParentBlockName = function (editor) {
  28517. return getParentBlock(editor).fold(constant(''), function (parentBlock) {
  28518. return parentBlock.nodeName.toUpperCase();
  28519. });
  28520. };
  28521. var isListItemParentBlock = function (editor) {
  28522. return getParentBlock(editor).filter(function (elm) {
  28523. return isListItem(SugarElement.fromDom(elm));
  28524. }).isSome();
  28525. };
  28526. var hasFirstChild = function (elm, name) {
  28527. return elm.firstChild && elm.firstChild.nodeName === name;
  28528. };
  28529. var isFirstChild = function (elm) {
  28530. var _a;
  28531. return ((_a = elm.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) === elm;
  28532. };
  28533. var hasParent = function (elm, parentName) {
  28534. return elm && elm.parentNode && elm.parentNode.nodeName === parentName;
  28535. };
  28536. var isListBlock = function (elm) {
  28537. return elm && /^(OL|UL|LI)$/.test(elm.nodeName);
  28538. };
  28539. var isNestedList = function (elm) {
  28540. return isListBlock(elm) && isListBlock(elm.parentNode);
  28541. };
  28542. var getContainerBlock = function (containerBlock) {
  28543. var containerBlockParent = containerBlock.parentNode;
  28544. if (/^(LI|DT|DD)$/.test(containerBlockParent.nodeName)) {
  28545. return containerBlockParent;
  28546. }
  28547. return containerBlock;
  28548. };
  28549. var isFirstOrLastLi = function (containerBlock, parentBlock, first) {
  28550. var node = containerBlock[first ? 'firstChild' : 'lastChild'];
  28551. while (node) {
  28552. if (isElement$5(node)) {
  28553. break;
  28554. }
  28555. node = node[first ? 'nextSibling' : 'previousSibling'];
  28556. }
  28557. return node === parentBlock;
  28558. };
  28559. var insert$3 = function (editor, createNewBlock, containerBlock, parentBlock, newBlockName) {
  28560. var dom = editor.dom;
  28561. var rng = editor.selection.getRng();
  28562. if (containerBlock === editor.getBody()) {
  28563. return;
  28564. }
  28565. if (isNestedList(containerBlock)) {
  28566. newBlockName = 'LI';
  28567. }
  28568. var newBlock = newBlockName ? createNewBlock(newBlockName) : dom.create('BR');
  28569. if (isFirstOrLastLi(containerBlock, parentBlock, true) && isFirstOrLastLi(containerBlock, parentBlock, false)) {
  28570. if (hasParent(containerBlock, 'LI')) {
  28571. var containerBlockParent = getContainerBlock(containerBlock);
  28572. dom.insertAfter(newBlock, containerBlockParent);
  28573. if (isFirstChild(containerBlock)) {
  28574. dom.remove(containerBlockParent);
  28575. } else {
  28576. dom.remove(containerBlock);
  28577. }
  28578. } else {
  28579. dom.replace(newBlock, containerBlock);
  28580. }
  28581. } else if (isFirstOrLastLi(containerBlock, parentBlock, true)) {
  28582. if (hasParent(containerBlock, 'LI')) {
  28583. dom.insertAfter(newBlock, getContainerBlock(containerBlock));
  28584. newBlock.appendChild(dom.doc.createTextNode(' '));
  28585. newBlock.appendChild(containerBlock);
  28586. } else {
  28587. containerBlock.parentNode.insertBefore(newBlock, containerBlock);
  28588. }
  28589. dom.remove(parentBlock);
  28590. } else if (isFirstOrLastLi(containerBlock, parentBlock, false)) {
  28591. dom.insertAfter(newBlock, getContainerBlock(containerBlock));
  28592. dom.remove(parentBlock);
  28593. } else {
  28594. containerBlock = getContainerBlock(containerBlock);
  28595. var tmpRng = rng.cloneRange();
  28596. tmpRng.setStartAfter(parentBlock);
  28597. tmpRng.setEndAfter(containerBlock);
  28598. var fragment = tmpRng.extractContents();
  28599. if (newBlockName === 'LI' && hasFirstChild(fragment, 'LI')) {
  28600. newBlock = fragment.firstChild;
  28601. dom.insertAfter(fragment, containerBlock);
  28602. } else {
  28603. dom.insertAfter(fragment, containerBlock);
  28604. dom.insertAfter(newBlock, containerBlock);
  28605. }
  28606. dom.remove(parentBlock);
  28607. }
  28608. moveToCaretPosition(editor, newBlock);
  28609. };
  28610. var trimZwsp = function (fragment) {
  28611. each$k(descendants$1(SugarElement.fromDom(fragment), isText$8), function (text) {
  28612. var rawNode = text.dom;
  28613. rawNode.nodeValue = trim$2(rawNode.nodeValue);
  28614. });
  28615. };
  28616. var isEmptyAnchor = function (dom, elm) {
  28617. return elm && elm.nodeName === 'A' && dom.isEmpty(elm);
  28618. };
  28619. var isTableCell = function (node) {
  28620. return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
  28621. };
  28622. var emptyBlock = function (elm) {
  28623. elm.innerHTML = '<br data-mce-bogus="1">';
  28624. };
  28625. var containerAndSiblingName = function (container, nodeName) {
  28626. return container.nodeName === nodeName || container.previousSibling && container.previousSibling.nodeName === nodeName;
  28627. };
  28628. var canSplitBlock = function (dom, node) {
  28629. return node && dom.isBlock(node) && !/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName) && !/^(fixed|absolute)/i.test(node.style.position) && dom.getContentEditable(node) !== 'true';
  28630. };
  28631. var trimInlineElementsOnLeftSideOfBlock = function (dom, nonEmptyElementsMap, block) {
  28632. var node = block;
  28633. var firstChilds = [];
  28634. var i;
  28635. if (!node) {
  28636. return;
  28637. }
  28638. while (node = node.firstChild) {
  28639. if (dom.isBlock(node)) {
  28640. return;
  28641. }
  28642. if (isElement$5(node) && !nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
  28643. firstChilds.push(node);
  28644. }
  28645. }
  28646. i = firstChilds.length;
  28647. while (i--) {
  28648. node = firstChilds[i];
  28649. if (!node.hasChildNodes() || node.firstChild === node.lastChild && node.firstChild.nodeValue === '') {
  28650. dom.remove(node);
  28651. } else {
  28652. if (isEmptyAnchor(dom, node)) {
  28653. dom.remove(node);
  28654. }
  28655. }
  28656. }
  28657. };
  28658. var normalizeZwspOffset = function (start, container, offset) {
  28659. if (isText$7(container) === false) {
  28660. return offset;
  28661. } else if (start) {
  28662. return offset === 1 && container.data.charAt(offset - 1) === ZWSP$1 ? 0 : offset;
  28663. } else {
  28664. return offset === container.data.length - 1 && container.data.charAt(offset) === ZWSP$1 ? container.data.length : offset;
  28665. }
  28666. };
  28667. var includeZwspInRange = function (rng) {
  28668. var newRng = rng.cloneRange();
  28669. newRng.setStart(rng.startContainer, normalizeZwspOffset(true, rng.startContainer, rng.startOffset));
  28670. newRng.setEnd(rng.endContainer, normalizeZwspOffset(false, rng.endContainer, rng.endOffset));
  28671. return newRng;
  28672. };
  28673. var trimLeadingLineBreaks = function (node) {
  28674. do {
  28675. if (isText$7(node)) {
  28676. node.nodeValue = node.nodeValue.replace(/^[\r\n]+/, '');
  28677. }
  28678. node = node.firstChild;
  28679. } while (node);
  28680. };
  28681. var getEditableRoot = function (dom, node) {
  28682. var root = dom.getRoot();
  28683. var parent, editableRoot;
  28684. parent = node;
  28685. while (parent !== root && dom.getContentEditable(parent) !== 'false') {
  28686. if (dom.getContentEditable(parent) === 'true') {
  28687. editableRoot = parent;
  28688. }
  28689. parent = parent.parentNode;
  28690. }
  28691. return parent !== root ? editableRoot : root;
  28692. };
  28693. var applyAttributes = function (editor, node, forcedRootBlockAttrs) {
  28694. var dom = editor.dom;
  28695. Optional.from(forcedRootBlockAttrs.style).map(dom.parseStyle).each(function (attrStyles) {
  28696. var currentStyles = getAllRaw(SugarElement.fromDom(node));
  28697. var newStyles = __assign(__assign({}, currentStyles), attrStyles);
  28698. dom.setStyles(node, newStyles);
  28699. });
  28700. var attrClassesOpt = Optional.from(forcedRootBlockAttrs.class).map(function (attrClasses) {
  28701. return attrClasses.split(/\s+/);
  28702. });
  28703. var currentClassesOpt = Optional.from(node.className).map(function (currentClasses) {
  28704. return filter$4(currentClasses.split(/\s+/), function (clazz) {
  28705. return clazz !== '';
  28706. });
  28707. });
  28708. lift2(attrClassesOpt, currentClassesOpt, function (attrClasses, currentClasses) {
  28709. var filteredClasses = filter$4(currentClasses, function (clazz) {
  28710. return !contains$3(attrClasses, clazz);
  28711. });
  28712. var newClasses = __spreadArray(__spreadArray([], attrClasses, true), filteredClasses, true);
  28713. dom.setAttrib(node, 'class', newClasses.join(' '));
  28714. });
  28715. var appliedAttrs = [
  28716. 'style',
  28717. 'class'
  28718. ];
  28719. var remainingAttrs = filter$3(forcedRootBlockAttrs, function (_, attrs) {
  28720. return !contains$3(appliedAttrs, attrs);
  28721. });
  28722. dom.setAttribs(node, remainingAttrs);
  28723. };
  28724. var setForcedBlockAttrs = function (editor, node) {
  28725. var forcedRootBlockName = getForcedRootBlock(editor);
  28726. if (forcedRootBlockName && forcedRootBlockName.toLowerCase() === node.tagName.toLowerCase()) {
  28727. var forcedRootBlockAttrs = getForcedRootBlockAttrs(editor);
  28728. applyAttributes(editor, node, forcedRootBlockAttrs);
  28729. }
  28730. };
  28731. var wrapSelfAndSiblingsInDefaultBlock = function (editor, newBlockName, rng, container, offset) {
  28732. var newBlock, parentBlock, startNode, node, next, rootBlockName;
  28733. var blockName = newBlockName || 'P';
  28734. var dom = editor.dom, editableRoot = getEditableRoot(dom, container);
  28735. parentBlock = dom.getParent(container, dom.isBlock);
  28736. if (!parentBlock || !canSplitBlock(dom, parentBlock)) {
  28737. parentBlock = parentBlock || editableRoot;
  28738. if (parentBlock === editor.getBody() || isTableCell(parentBlock)) {
  28739. rootBlockName = parentBlock.nodeName.toLowerCase();
  28740. } else {
  28741. rootBlockName = parentBlock.parentNode.nodeName.toLowerCase();
  28742. }
  28743. if (!parentBlock.hasChildNodes()) {
  28744. newBlock = dom.create(blockName);
  28745. setForcedBlockAttrs(editor, newBlock);
  28746. parentBlock.appendChild(newBlock);
  28747. rng.setStart(newBlock, 0);
  28748. rng.setEnd(newBlock, 0);
  28749. return newBlock;
  28750. }
  28751. node = container;
  28752. while (node.parentNode !== parentBlock) {
  28753. node = node.parentNode;
  28754. }
  28755. while (node && !dom.isBlock(node)) {
  28756. startNode = node;
  28757. node = node.previousSibling;
  28758. }
  28759. if (startNode && editor.schema.isValidChild(rootBlockName, blockName.toLowerCase())) {
  28760. newBlock = dom.create(blockName);
  28761. setForcedBlockAttrs(editor, newBlock);
  28762. startNode.parentNode.insertBefore(newBlock, startNode);
  28763. node = startNode;
  28764. while (node && !dom.isBlock(node)) {
  28765. next = node.nextSibling;
  28766. newBlock.appendChild(node);
  28767. node = next;
  28768. }
  28769. rng.setStart(container, offset);
  28770. rng.setEnd(container, offset);
  28771. }
  28772. }
  28773. return container;
  28774. };
  28775. var addBrToBlockIfNeeded = function (dom, block) {
  28776. block.normalize();
  28777. var lastChild = block.lastChild;
  28778. if (!lastChild || /^(left|right)$/gi.test(dom.getStyle(lastChild, 'float', true))) {
  28779. dom.add(block, 'br');
  28780. }
  28781. };
  28782. var insert$2 = function (editor, evt) {
  28783. var tmpRng, container, offset, parentBlock;
  28784. var newBlock, fragment, containerBlock, parentBlockName, newBlockName, isAfterLastNodeInContainer;
  28785. var dom = editor.dom;
  28786. var schema = editor.schema, nonEmptyElementsMap = schema.getNonEmptyElements();
  28787. var rng = editor.selection.getRng();
  28788. var createNewBlock = function (name) {
  28789. var node = container, block, clonedNode, caretNode;
  28790. var textInlineElements = schema.getTextInlineElements();
  28791. if (name || parentBlockName === 'TABLE' || parentBlockName === 'HR') {
  28792. block = dom.create(name || newBlockName);
  28793. } else {
  28794. block = parentBlock.cloneNode(false);
  28795. }
  28796. caretNode = block;
  28797. if (shouldKeepStyles(editor) === false) {
  28798. dom.setAttrib(block, 'style', null);
  28799. dom.setAttrib(block, 'class', null);
  28800. } else {
  28801. do {
  28802. if (textInlineElements[node.nodeName]) {
  28803. if (isCaretNode(node) || isBookmarkNode$1(node)) {
  28804. continue;
  28805. }
  28806. clonedNode = node.cloneNode(false);
  28807. dom.setAttrib(clonedNode, 'id', '');
  28808. if (block.hasChildNodes()) {
  28809. clonedNode.appendChild(block.firstChild);
  28810. block.appendChild(clonedNode);
  28811. } else {
  28812. caretNode = clonedNode;
  28813. block.appendChild(clonedNode);
  28814. }
  28815. }
  28816. } while ((node = node.parentNode) && node !== editableRoot);
  28817. }
  28818. setForcedBlockAttrs(editor, block);
  28819. emptyBlock(caretNode);
  28820. return block;
  28821. };
  28822. var isCaretAtStartOrEndOfBlock = function (start) {
  28823. var node, name;
  28824. var normalizedOffset = normalizeZwspOffset(start, container, offset);
  28825. if (isText$7(container) && (start ? normalizedOffset > 0 : normalizedOffset < container.nodeValue.length)) {
  28826. return false;
  28827. }
  28828. if (container.parentNode === parentBlock && isAfterLastNodeInContainer && !start) {
  28829. return true;
  28830. }
  28831. if (start && isElement$5(container) && container === parentBlock.firstChild) {
  28832. return true;
  28833. }
  28834. if (containerAndSiblingName(container, 'TABLE') || containerAndSiblingName(container, 'HR')) {
  28835. return isAfterLastNodeInContainer && !start || !isAfterLastNodeInContainer && start;
  28836. }
  28837. var walker = new DomTreeWalker(container, parentBlock);
  28838. if (isText$7(container)) {
  28839. if (start && normalizedOffset === 0) {
  28840. walker.prev();
  28841. } else if (!start && normalizedOffset === container.nodeValue.length) {
  28842. walker.next();
  28843. }
  28844. }
  28845. while (node = walker.current()) {
  28846. if (isElement$5(node)) {
  28847. if (!node.getAttribute('data-mce-bogus')) {
  28848. name = node.nodeName.toLowerCase();
  28849. if (nonEmptyElementsMap[name] && name !== 'br') {
  28850. return false;
  28851. }
  28852. }
  28853. } else if (isText$7(node) && !isWhitespaceText(node.nodeValue)) {
  28854. return false;
  28855. }
  28856. if (start) {
  28857. walker.prev();
  28858. } else {
  28859. walker.next();
  28860. }
  28861. }
  28862. return true;
  28863. };
  28864. var insertNewBlockAfter = function () {
  28865. if (/^(H[1-6]|PRE|FIGURE)$/.test(parentBlockName) && containerBlockName !== 'HGROUP') {
  28866. newBlock = createNewBlock(newBlockName);
  28867. } else {
  28868. newBlock = createNewBlock();
  28869. }
  28870. if (shouldEndContainerOnEmptyBlock(editor) && canSplitBlock(dom, containerBlock) && dom.isEmpty(parentBlock)) {
  28871. newBlock = dom.split(containerBlock, parentBlock);
  28872. } else {
  28873. dom.insertAfter(newBlock, parentBlock);
  28874. }
  28875. moveToCaretPosition(editor, newBlock);
  28876. };
  28877. normalize$2(dom, rng).each(function (normRng) {
  28878. rng.setStart(normRng.startContainer, normRng.startOffset);
  28879. rng.setEnd(normRng.endContainer, normRng.endOffset);
  28880. });
  28881. container = rng.startContainer;
  28882. offset = rng.startOffset;
  28883. newBlockName = getForcedRootBlock(editor);
  28884. var shiftKey = !!(evt && evt.shiftKey);
  28885. var ctrlKey = !!(evt && evt.ctrlKey);
  28886. if (isElement$5(container) && container.hasChildNodes()) {
  28887. isAfterLastNodeInContainer = offset > container.childNodes.length - 1;
  28888. container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
  28889. if (isAfterLastNodeInContainer && isText$7(container)) {
  28890. offset = container.nodeValue.length;
  28891. } else {
  28892. offset = 0;
  28893. }
  28894. }
  28895. var editableRoot = getEditableRoot(dom, container);
  28896. if (!editableRoot) {
  28897. return;
  28898. }
  28899. if (newBlockName && !shiftKey || !newBlockName && shiftKey) {
  28900. container = wrapSelfAndSiblingsInDefaultBlock(editor, newBlockName, rng, container, offset);
  28901. }
  28902. parentBlock = dom.getParent(container, dom.isBlock);
  28903. containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;
  28904. parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : '';
  28905. var containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : '';
  28906. if (containerBlockName === 'LI' && !ctrlKey) {
  28907. parentBlock = containerBlock;
  28908. containerBlock = containerBlock.parentNode;
  28909. parentBlockName = containerBlockName;
  28910. }
  28911. if (/^(LI|DT|DD)$/.test(parentBlockName)) {
  28912. if (dom.isEmpty(parentBlock)) {
  28913. insert$3(editor, createNewBlock, containerBlock, parentBlock, newBlockName);
  28914. return;
  28915. }
  28916. }
  28917. if (newBlockName && parentBlock === editor.getBody()) {
  28918. return;
  28919. }
  28920. newBlockName = newBlockName || 'P';
  28921. if (isCaretContainerBlock$1(parentBlock)) {
  28922. newBlock = showCaretContainerBlock(parentBlock);
  28923. if (dom.isEmpty(parentBlock)) {
  28924. emptyBlock(parentBlock);
  28925. }
  28926. setForcedBlockAttrs(editor, newBlock);
  28927. moveToCaretPosition(editor, newBlock);
  28928. } else if (isCaretAtStartOrEndOfBlock()) {
  28929. insertNewBlockAfter();
  28930. } else if (isCaretAtStartOrEndOfBlock(true)) {
  28931. newBlock = parentBlock.parentNode.insertBefore(createNewBlock(), parentBlock);
  28932. moveToCaretPosition(editor, containerAndSiblingName(parentBlock, 'HR') ? newBlock : parentBlock);
  28933. } else {
  28934. tmpRng = includeZwspInRange(rng).cloneRange();
  28935. tmpRng.setEndAfter(parentBlock);
  28936. fragment = tmpRng.extractContents();
  28937. trimZwsp(fragment);
  28938. trimLeadingLineBreaks(fragment);
  28939. newBlock = fragment.firstChild;
  28940. dom.insertAfter(fragment, parentBlock);
  28941. trimInlineElementsOnLeftSideOfBlock(dom, nonEmptyElementsMap, newBlock);
  28942. addBrToBlockIfNeeded(dom, parentBlock);
  28943. if (dom.isEmpty(parentBlock)) {
  28944. emptyBlock(parentBlock);
  28945. }
  28946. newBlock.normalize();
  28947. if (dom.isEmpty(newBlock)) {
  28948. dom.remove(newBlock);
  28949. insertNewBlockAfter();
  28950. } else {
  28951. setForcedBlockAttrs(editor, newBlock);
  28952. moveToCaretPosition(editor, newBlock);
  28953. }
  28954. }
  28955. dom.setAttrib(newBlock, 'id', '');
  28956. editor.fire('NewBlock', { newBlock: newBlock });
  28957. };
  28958. var hasRightSideContent = function (schema, container, parentBlock) {
  28959. var walker = new DomTreeWalker(container, parentBlock);
  28960. var node;
  28961. var nonEmptyElementsMap = schema.getNonEmptyElements();
  28962. while (node = walker.next()) {
  28963. if (nonEmptyElementsMap[node.nodeName.toLowerCase()] || node.length > 0) {
  28964. return true;
  28965. }
  28966. }
  28967. };
  28968. var moveSelectionToBr = function (editor, brElm, extraBr) {
  28969. var rng = editor.dom.createRng();
  28970. if (!extraBr) {
  28971. rng.setStartAfter(brElm);
  28972. rng.setEndAfter(brElm);
  28973. } else {
  28974. rng.setStartBefore(brElm);
  28975. rng.setEndBefore(brElm);
  28976. }
  28977. editor.selection.setRng(rng);
  28978. scrollRangeIntoView(editor, rng);
  28979. };
  28980. var insertBrAtCaret = function (editor, evt) {
  28981. var selection = editor.selection;
  28982. var dom = editor.dom;
  28983. var rng = selection.getRng();
  28984. var brElm;
  28985. var extraBr;
  28986. normalize$2(dom, rng).each(function (normRng) {
  28987. rng.setStart(normRng.startContainer, normRng.startOffset);
  28988. rng.setEnd(normRng.endContainer, normRng.endOffset);
  28989. });
  28990. var offset = rng.startOffset;
  28991. var container = rng.startContainer;
  28992. if (container.nodeType === 1 && container.hasChildNodes()) {
  28993. var isAfterLastNodeInContainer = offset > container.childNodes.length - 1;
  28994. container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
  28995. if (isAfterLastNodeInContainer && container.nodeType === 3) {
  28996. offset = container.nodeValue.length;
  28997. } else {
  28998. offset = 0;
  28999. }
  29000. }
  29001. var parentBlock = dom.getParent(container, dom.isBlock);
  29002. var containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;
  29003. var containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : '';
  29004. var isControlKey = !!(evt && evt.ctrlKey);
  29005. if (containerBlockName === 'LI' && !isControlKey) {
  29006. parentBlock = containerBlock;
  29007. }
  29008. if (container && container.nodeType === 3 && offset >= container.nodeValue.length) {
  29009. if (!hasRightSideContent(editor.schema, container, parentBlock)) {
  29010. brElm = dom.create('br');
  29011. rng.insertNode(brElm);
  29012. rng.setStartAfter(brElm);
  29013. rng.setEndAfter(brElm);
  29014. extraBr = true;
  29015. }
  29016. }
  29017. brElm = dom.create('br');
  29018. rangeInsertNode(dom, rng, brElm);
  29019. moveSelectionToBr(editor, brElm, extraBr);
  29020. editor.undoManager.add();
  29021. };
  29022. var insertBrBefore = function (editor, inline) {
  29023. var br = SugarElement.fromTag('br');
  29024. before$4(SugarElement.fromDom(inline), br);
  29025. editor.undoManager.add();
  29026. };
  29027. var insertBrAfter = function (editor, inline) {
  29028. if (!hasBrAfter(editor.getBody(), inline)) {
  29029. after$3(SugarElement.fromDom(inline), SugarElement.fromTag('br'));
  29030. }
  29031. var br = SugarElement.fromTag('br');
  29032. after$3(SugarElement.fromDom(inline), br);
  29033. moveSelectionToBr(editor, br.dom, false);
  29034. editor.undoManager.add();
  29035. };
  29036. var isBeforeBr = function (pos) {
  29037. return isBr$5(pos.getNode());
  29038. };
  29039. var hasBrAfter = function (rootNode, startNode) {
  29040. if (isBeforeBr(CaretPosition.after(startNode))) {
  29041. return true;
  29042. } else {
  29043. return nextPosition(rootNode, CaretPosition.after(startNode)).map(function (pos) {
  29044. return isBr$5(pos.getNode());
  29045. }).getOr(false);
  29046. }
  29047. };
  29048. var isAnchorLink = function (elm) {
  29049. return elm && elm.nodeName === 'A' && 'href' in elm;
  29050. };
  29051. var isInsideAnchor = function (location) {
  29052. return location.fold(never, isAnchorLink, isAnchorLink, never);
  29053. };
  29054. var readInlineAnchorLocation = function (editor) {
  29055. var isInlineTarget$1 = curry(isInlineTarget, editor);
  29056. var position = CaretPosition.fromRangeStart(editor.selection.getRng());
  29057. return readLocation(isInlineTarget$1, editor.getBody(), position).filter(isInsideAnchor);
  29058. };
  29059. var insertBrOutsideAnchor = function (editor, location) {
  29060. location.fold(noop, curry(insertBrBefore, editor), curry(insertBrAfter, editor), noop);
  29061. };
  29062. var insert$1 = function (editor, evt) {
  29063. var anchorLocation = readInlineAnchorLocation(editor);
  29064. if (anchorLocation.isSome()) {
  29065. anchorLocation.each(curry(insertBrOutsideAnchor, editor));
  29066. } else {
  29067. insertBrAtCaret(editor, evt);
  29068. }
  29069. };
  29070. var matchesSelector = function (editor, selector) {
  29071. return getParentBlock(editor).filter(function (parentBlock) {
  29072. return selector.length > 0 && is$2(SugarElement.fromDom(parentBlock), selector);
  29073. }).isSome();
  29074. };
  29075. var shouldInsertBr = function (editor) {
  29076. return matchesSelector(editor, getBrNewLineSelector(editor));
  29077. };
  29078. var shouldBlockNewLine$1 = function (editor) {
  29079. return matchesSelector(editor, getNoNewLineSelector(editor));
  29080. };
  29081. var newLineAction = Adt.generate([
  29082. { br: [] },
  29083. { block: [] },
  29084. { none: [] }
  29085. ]);
  29086. var shouldBlockNewLine = function (editor, _shiftKey) {
  29087. return shouldBlockNewLine$1(editor);
  29088. };
  29089. var isBrMode = function (requiredState) {
  29090. return function (editor, _shiftKey) {
  29091. var brMode = getForcedRootBlock(editor) === '';
  29092. return brMode === requiredState;
  29093. };
  29094. };
  29095. var inListBlock = function (requiredState) {
  29096. return function (editor, _shiftKey) {
  29097. return isListItemParentBlock(editor) === requiredState;
  29098. };
  29099. };
  29100. var inBlock = function (blockName, requiredState) {
  29101. return function (editor, _shiftKey) {
  29102. var state = getParentBlockName(editor) === blockName.toUpperCase();
  29103. return state === requiredState;
  29104. };
  29105. };
  29106. var inPreBlock = function (requiredState) {
  29107. return inBlock('pre', requiredState);
  29108. };
  29109. var inSummaryBlock = function () {
  29110. return inBlock('summary', true);
  29111. };
  29112. var shouldPutBrInPre = function (requiredState) {
  29113. return function (editor, _shiftKey) {
  29114. return shouldPutBrInPre$1(editor) === requiredState;
  29115. };
  29116. };
  29117. var inBrContext = function (editor, _shiftKey) {
  29118. return shouldInsertBr(editor);
  29119. };
  29120. var hasShiftKey = function (_editor, shiftKey) {
  29121. return shiftKey;
  29122. };
  29123. var canInsertIntoEditableRoot = function (editor) {
  29124. var forcedRootBlock = getForcedRootBlock(editor);
  29125. var rootEditable = getEditableRoot$1(editor.dom, editor.selection.getStart());
  29126. return rootEditable && editor.schema.isValidChild(rootEditable.nodeName, forcedRootBlock ? forcedRootBlock : 'P');
  29127. };
  29128. var match = function (predicates, action) {
  29129. return function (editor, shiftKey) {
  29130. var isMatch = foldl(predicates, function (res, p) {
  29131. return res && p(editor, shiftKey);
  29132. }, true);
  29133. return isMatch ? Optional.some(action) : Optional.none();
  29134. };
  29135. };
  29136. var getAction = function (editor, evt) {
  29137. return evaluateUntil([
  29138. match([shouldBlockNewLine], newLineAction.none()),
  29139. match([inSummaryBlock()], newLineAction.br()),
  29140. match([
  29141. inPreBlock(true),
  29142. shouldPutBrInPre(false),
  29143. hasShiftKey
  29144. ], newLineAction.br()),
  29145. match([
  29146. inPreBlock(true),
  29147. shouldPutBrInPre(false)
  29148. ], newLineAction.block()),
  29149. match([
  29150. inPreBlock(true),
  29151. shouldPutBrInPre(true),
  29152. hasShiftKey
  29153. ], newLineAction.block()),
  29154. match([
  29155. inPreBlock(true),
  29156. shouldPutBrInPre(true)
  29157. ], newLineAction.br()),
  29158. match([
  29159. inListBlock(true),
  29160. hasShiftKey
  29161. ], newLineAction.br()),
  29162. match([inListBlock(true)], newLineAction.block()),
  29163. match([
  29164. isBrMode(true),
  29165. hasShiftKey,
  29166. canInsertIntoEditableRoot
  29167. ], newLineAction.block()),
  29168. match([isBrMode(true)], newLineAction.br()),
  29169. match([inBrContext], newLineAction.br()),
  29170. match([
  29171. isBrMode(false),
  29172. hasShiftKey
  29173. ], newLineAction.br()),
  29174. match([canInsertIntoEditableRoot], newLineAction.block())
  29175. ], [
  29176. editor,
  29177. !!(evt && evt.shiftKey)
  29178. ]).getOr(newLineAction.none());
  29179. };
  29180. var insert = function (editor, evt) {
  29181. getAction(editor, evt).fold(function () {
  29182. insert$1(editor, evt);
  29183. }, function () {
  29184. insert$2(editor, evt);
  29185. }, noop);
  29186. };
  29187. var handleEnterKeyEvent = function (editor, event) {
  29188. if (event.isDefaultPrevented()) {
  29189. return;
  29190. }
  29191. event.preventDefault();
  29192. endTypingLevelIgnoreLocks(editor.undoManager);
  29193. editor.undoManager.transact(function () {
  29194. if (editor.selection.isCollapsed() === false) {
  29195. editor.execCommand('Delete');
  29196. }
  29197. insert(editor, event);
  29198. });
  29199. };
  29200. var setup$9 = function (editor) {
  29201. editor.on('keydown', function (event) {
  29202. if (event.keyCode === VK.ENTER) {
  29203. handleEnterKeyEvent(editor, event);
  29204. }
  29205. });
  29206. };
  29207. var executeKeydownOverride$1 = function (editor, caret, evt) {
  29208. execute([
  29209. {
  29210. keyCode: VK.END,
  29211. action: action(moveToLineEndPoint$1, editor, true)
  29212. },
  29213. {
  29214. keyCode: VK.HOME,
  29215. action: action(moveToLineEndPoint$1, editor, false)
  29216. },
  29217. {
  29218. keyCode: VK.END,
  29219. action: action(moveToLineEndPoint, editor, true)
  29220. },
  29221. {
  29222. keyCode: VK.HOME,
  29223. action: action(moveToLineEndPoint, editor, false)
  29224. },
  29225. {
  29226. keyCode: VK.END,
  29227. action: action(moveToLineEndPoint$2, editor, true, caret)
  29228. },
  29229. {
  29230. keyCode: VK.HOME,
  29231. action: action(moveToLineEndPoint$2, editor, false, caret)
  29232. }
  29233. ], evt).each(function (_) {
  29234. evt.preventDefault();
  29235. });
  29236. };
  29237. var setup$8 = function (editor, caret) {
  29238. editor.on('keydown', function (evt) {
  29239. if (evt.isDefaultPrevented() === false) {
  29240. executeKeydownOverride$1(editor, caret, evt);
  29241. }
  29242. });
  29243. };
  29244. var browser = detect().browser;
  29245. var setupIeInput = function (editor) {
  29246. var keypressThrotter = first(function () {
  29247. if (!editor.composing) {
  29248. normalizeNbspsInEditor(editor);
  29249. }
  29250. }, 0);
  29251. if (browser.isIE()) {
  29252. editor.on('keypress', function (_e) {
  29253. keypressThrotter.throttle();
  29254. });
  29255. editor.on('remove', function (_e) {
  29256. keypressThrotter.cancel();
  29257. });
  29258. }
  29259. };
  29260. var setup$7 = function (editor) {
  29261. setupIeInput(editor);
  29262. editor.on('input', function (e) {
  29263. if (e.isComposing === false) {
  29264. normalizeNbspsInEditor(editor);
  29265. }
  29266. });
  29267. };
  29268. var platform = detect();
  29269. var executeKeyupAction = function (editor, caret, evt) {
  29270. execute([
  29271. {
  29272. keyCode: VK.PAGE_UP,
  29273. action: action(moveToLineEndPoint$2, editor, false, caret)
  29274. },
  29275. {
  29276. keyCode: VK.PAGE_DOWN,
  29277. action: action(moveToLineEndPoint$2, editor, true, caret)
  29278. }
  29279. ], evt);
  29280. };
  29281. var stopImmediatePropagation = function (e) {
  29282. return e.stopImmediatePropagation();
  29283. };
  29284. var isPageUpDown = function (evt) {
  29285. return evt.keyCode === VK.PAGE_UP || evt.keyCode === VK.PAGE_DOWN;
  29286. };
  29287. var setNodeChangeBlocker = function (blocked, editor, block) {
  29288. if (block && !blocked.get()) {
  29289. editor.on('NodeChange', stopImmediatePropagation, true);
  29290. } else if (!block && blocked.get()) {
  29291. editor.off('NodeChange', stopImmediatePropagation);
  29292. }
  29293. blocked.set(block);
  29294. };
  29295. var setup$6 = function (editor, caret) {
  29296. if (platform.os.isOSX()) {
  29297. return;
  29298. }
  29299. var blocked = Cell(false);
  29300. editor.on('keydown', function (evt) {
  29301. if (isPageUpDown(evt)) {
  29302. setNodeChangeBlocker(blocked, editor, true);
  29303. }
  29304. });
  29305. editor.on('keyup', function (evt) {
  29306. if (evt.isDefaultPrevented() === false) {
  29307. executeKeyupAction(editor, caret, evt);
  29308. }
  29309. if (isPageUpDown(evt) && blocked.get()) {
  29310. setNodeChangeBlocker(blocked, editor, false);
  29311. editor.nodeChanged();
  29312. }
  29313. });
  29314. };
  29315. var insertTextAtPosition = function (text, pos) {
  29316. var container = pos.container();
  29317. var offset = pos.offset();
  29318. if (isText$7(container)) {
  29319. container.insertData(offset, text);
  29320. return Optional.some(CaretPosition(container, offset + text.length));
  29321. } else {
  29322. return getElementFromPosition(pos).map(function (elm) {
  29323. var textNode = SugarElement.fromText(text);
  29324. if (pos.isAtEnd()) {
  29325. after$3(elm, textNode);
  29326. } else {
  29327. before$4(elm, textNode);
  29328. }
  29329. return CaretPosition(textNode.dom, text.length);
  29330. });
  29331. }
  29332. };
  29333. var insertNbspAtPosition = curry(insertTextAtPosition, nbsp);
  29334. var insertSpaceAtPosition = curry(insertTextAtPosition, ' ');
  29335. var locationToCaretPosition = function (root) {
  29336. return function (location) {
  29337. return location.fold(function (element) {
  29338. return prevPosition(root.dom, CaretPosition.before(element));
  29339. }, function (element) {
  29340. return firstPositionIn(element);
  29341. }, function (element) {
  29342. return lastPositionIn(element);
  29343. }, function (element) {
  29344. return nextPosition(root.dom, CaretPosition.after(element));
  29345. });
  29346. };
  29347. };
  29348. var insertInlineBoundarySpaceOrNbsp = function (root, pos) {
  29349. return function (checkPos) {
  29350. return needsToHaveNbsp(root, checkPos) ? insertNbspAtPosition(pos) : insertSpaceAtPosition(pos);
  29351. };
  29352. };
  29353. var setSelection = function (editor) {
  29354. return function (pos) {
  29355. editor.selection.setRng(pos.toRange());
  29356. editor.nodeChanged();
  29357. return true;
  29358. };
  29359. };
  29360. var insertSpaceOrNbspAtSelection = function (editor) {
  29361. var pos = CaretPosition.fromRangeStart(editor.selection.getRng());
  29362. var root = SugarElement.fromDom(editor.getBody());
  29363. if (editor.selection.isCollapsed()) {
  29364. var isInlineTarget$1 = curry(isInlineTarget, editor);
  29365. var caretPosition = CaretPosition.fromRangeStart(editor.selection.getRng());
  29366. return readLocation(isInlineTarget$1, editor.getBody(), caretPosition).bind(locationToCaretPosition(root)).bind(insertInlineBoundarySpaceOrNbsp(root, pos)).exists(setSelection(editor));
  29367. } else {
  29368. return false;
  29369. }
  29370. };
  29371. var executeKeydownOverride = function (editor, evt) {
  29372. execute([{
  29373. keyCode: VK.SPACEBAR,
  29374. action: action(insertSpaceOrNbspAtSelection, editor)
  29375. }], evt).each(function (_) {
  29376. evt.preventDefault();
  29377. });
  29378. };
  29379. var setup$5 = function (editor) {
  29380. editor.on('keydown', function (evt) {
  29381. if (evt.isDefaultPrevented() === false) {
  29382. executeKeydownOverride(editor, evt);
  29383. }
  29384. });
  29385. };
  29386. var registerKeyboardOverrides = function (editor) {
  29387. var caret = setupSelectedState(editor);
  29388. setup$c(editor);
  29389. setup$b(editor, caret);
  29390. setup$a(editor, caret);
  29391. setup$9(editor);
  29392. setup$5(editor);
  29393. setup$7(editor);
  29394. setup$8(editor, caret);
  29395. setup$6(editor, caret);
  29396. return caret;
  29397. };
  29398. var setup$4 = function (editor) {
  29399. if (!isRtc(editor)) {
  29400. return registerKeyboardOverrides(editor);
  29401. } else {
  29402. return Cell(null);
  29403. }
  29404. };
  29405. var NodeChange = function () {
  29406. function NodeChange(editor) {
  29407. this.lastPath = [];
  29408. this.editor = editor;
  29409. var lastRng;
  29410. var self = this;
  29411. if (!('onselectionchange' in editor.getDoc())) {
  29412. editor.on('NodeChange click mouseup keyup focus', function (e) {
  29413. var nativeRng = editor.selection.getRng();
  29414. var fakeRng = {
  29415. startContainer: nativeRng.startContainer,
  29416. startOffset: nativeRng.startOffset,
  29417. endContainer: nativeRng.endContainer,
  29418. endOffset: nativeRng.endOffset
  29419. };
  29420. if (e.type === 'nodechange' || !isEq$4(fakeRng, lastRng)) {
  29421. editor.fire('SelectionChange');
  29422. }
  29423. lastRng = fakeRng;
  29424. });
  29425. }
  29426. editor.on('contextmenu', function () {
  29427. editor.fire('SelectionChange');
  29428. });
  29429. editor.on('SelectionChange', function () {
  29430. var startElm = editor.selection.getStart(true);
  29431. if (!startElm || !Env.range && editor.selection.isCollapsed()) {
  29432. return;
  29433. }
  29434. if (hasAnyRanges(editor) && !self.isSameElementPath(startElm) && editor.dom.isChildOf(startElm, editor.getBody())) {
  29435. editor.nodeChanged({ selectionChange: true });
  29436. }
  29437. });
  29438. editor.on('mouseup', function (e) {
  29439. if (!e.isDefaultPrevented() && hasAnyRanges(editor)) {
  29440. if (editor.selection.getNode().nodeName === 'IMG') {
  29441. Delay.setEditorTimeout(editor, function () {
  29442. editor.nodeChanged();
  29443. });
  29444. } else {
  29445. editor.nodeChanged();
  29446. }
  29447. }
  29448. });
  29449. }
  29450. NodeChange.prototype.nodeChanged = function (args) {
  29451. var selection = this.editor.selection;
  29452. var node, parents, root;
  29453. if (this.editor.initialized && selection && !shouldDisableNodeChange(this.editor) && !this.editor.mode.isReadOnly()) {
  29454. root = this.editor.getBody();
  29455. node = selection.getStart(true) || root;
  29456. if (node.ownerDocument !== this.editor.getDoc() || !this.editor.dom.isChildOf(node, root)) {
  29457. node = root;
  29458. }
  29459. parents = [];
  29460. this.editor.dom.getParent(node, function (node) {
  29461. if (node === root) {
  29462. return true;
  29463. }
  29464. parents.push(node);
  29465. });
  29466. args = args || {};
  29467. args.element = node;
  29468. args.parents = parents;
  29469. this.editor.fire('NodeChange', args);
  29470. }
  29471. };
  29472. NodeChange.prototype.isSameElementPath = function (startElm) {
  29473. var i;
  29474. var currentPath = this.editor.$(startElm).parentsUntil(this.editor.getBody()).add(startElm);
  29475. if (currentPath.length === this.lastPath.length) {
  29476. for (i = currentPath.length; i >= 0; i--) {
  29477. if (currentPath[i] !== this.lastPath[i]) {
  29478. break;
  29479. }
  29480. }
  29481. if (i === -1) {
  29482. this.lastPath = currentPath;
  29483. return true;
  29484. }
  29485. }
  29486. this.lastPath = currentPath;
  29487. return false;
  29488. };
  29489. return NodeChange;
  29490. }();
  29491. var preventSummaryToggle = function (editor) {
  29492. editor.on('click', function (e) {
  29493. if (editor.dom.getParent(e.target, 'details')) {
  29494. e.preventDefault();
  29495. }
  29496. });
  29497. };
  29498. var filterDetails = function (editor) {
  29499. editor.parser.addNodeFilter('details', function (elms) {
  29500. each$k(elms, function (details) {
  29501. details.attr('data-mce-open', details.attr('open'));
  29502. details.attr('open', 'open');
  29503. });
  29504. });
  29505. editor.serializer.addNodeFilter('details', function (elms) {
  29506. each$k(elms, function (details) {
  29507. var open = details.attr('data-mce-open');
  29508. details.attr('open', isString$1(open) ? open : null);
  29509. details.attr('data-mce-open', null);
  29510. });
  29511. });
  29512. };
  29513. var setup$3 = function (editor) {
  29514. preventSummaryToggle(editor);
  29515. filterDetails(editor);
  29516. };
  29517. var isTextBlockNode = function (node) {
  29518. return isElement$5(node) && isTextBlock$2(SugarElement.fromDom(node));
  29519. };
  29520. var normalizeSelection = function (editor) {
  29521. var rng = editor.selection.getRng();
  29522. var startPos = CaretPosition.fromRangeStart(rng);
  29523. var endPos = CaretPosition.fromRangeEnd(rng);
  29524. if (CaretPosition.isElementPosition(startPos)) {
  29525. var container = startPos.container();
  29526. if (isTextBlockNode(container)) {
  29527. firstPositionIn(container).each(function (pos) {
  29528. return rng.setStart(pos.container(), pos.offset());
  29529. });
  29530. }
  29531. }
  29532. if (CaretPosition.isElementPosition(endPos)) {
  29533. var container = startPos.container();
  29534. if (isTextBlockNode(container)) {
  29535. lastPositionIn(container).each(function (pos) {
  29536. return rng.setEnd(pos.container(), pos.offset());
  29537. });
  29538. }
  29539. }
  29540. editor.selection.setRng(normalize(rng));
  29541. };
  29542. var setup$2 = function (editor) {
  29543. editor.on('click', function (e) {
  29544. if (e.detail >= 3) {
  29545. normalizeSelection(editor);
  29546. }
  29547. });
  29548. };
  29549. var getAbsolutePosition = function (elm) {
  29550. var clientRect = elm.getBoundingClientRect();
  29551. var doc = elm.ownerDocument;
  29552. var docElem = doc.documentElement;
  29553. var win = doc.defaultView;
  29554. return {
  29555. top: clientRect.top + win.pageYOffset - docElem.clientTop,
  29556. left: clientRect.left + win.pageXOffset - docElem.clientLeft
  29557. };
  29558. };
  29559. var getBodyPosition = function (editor) {
  29560. return editor.inline ? getAbsolutePosition(editor.getBody()) : {
  29561. left: 0,
  29562. top: 0
  29563. };
  29564. };
  29565. var getScrollPosition = function (editor) {
  29566. var body = editor.getBody();
  29567. return editor.inline ? {
  29568. left: body.scrollLeft,
  29569. top: body.scrollTop
  29570. } : {
  29571. left: 0,
  29572. top: 0
  29573. };
  29574. };
  29575. var getBodyScroll = function (editor) {
  29576. var body = editor.getBody(), docElm = editor.getDoc().documentElement;
  29577. var inlineScroll = {
  29578. left: body.scrollLeft,
  29579. top: body.scrollTop
  29580. };
  29581. var iframeScroll = {
  29582. left: body.scrollLeft || docElm.scrollLeft,
  29583. top: body.scrollTop || docElm.scrollTop
  29584. };
  29585. return editor.inline ? inlineScroll : iframeScroll;
  29586. };
  29587. var getMousePosition = function (editor, event) {
  29588. if (event.target.ownerDocument !== editor.getDoc()) {
  29589. var iframePosition = getAbsolutePosition(editor.getContentAreaContainer());
  29590. var scrollPosition = getBodyScroll(editor);
  29591. return {
  29592. left: event.pageX - iframePosition.left + scrollPosition.left,
  29593. top: event.pageY - iframePosition.top + scrollPosition.top
  29594. };
  29595. }
  29596. return {
  29597. left: event.pageX,
  29598. top: event.pageY
  29599. };
  29600. };
  29601. var calculatePosition = function (bodyPosition, scrollPosition, mousePosition) {
  29602. return {
  29603. pageX: mousePosition.left - bodyPosition.left + scrollPosition.left,
  29604. pageY: mousePosition.top - bodyPosition.top + scrollPosition.top
  29605. };
  29606. };
  29607. var calc = function (editor, event) {
  29608. return calculatePosition(getBodyPosition(editor), getScrollPosition(editor), getMousePosition(editor, event));
  29609. };
  29610. var isContentEditableFalse$1 = isContentEditableFalse$b, isContentEditableTrue$1 = isContentEditableTrue$4;
  29611. var isDraggable = function (rootElm, elm) {
  29612. return isContentEditableFalse$1(elm) && elm !== rootElm;
  29613. };
  29614. var isValidDropTarget = function (editor, targetElement, dragElement) {
  29615. if (targetElement === dragElement || editor.dom.isChildOf(targetElement, dragElement)) {
  29616. return false;
  29617. }
  29618. return !isContentEditableFalse$1(targetElement);
  29619. };
  29620. var cloneElement = function (elm) {
  29621. var cloneElm = elm.cloneNode(true);
  29622. cloneElm.removeAttribute('data-mce-selected');
  29623. return cloneElm;
  29624. };
  29625. var createGhost = function (editor, elm, width, height) {
  29626. var dom = editor.dom;
  29627. var clonedElm = elm.cloneNode(true);
  29628. dom.setStyles(clonedElm, {
  29629. width: width,
  29630. height: height
  29631. });
  29632. dom.setAttrib(clonedElm, 'data-mce-selected', null);
  29633. var ghostElm = dom.create('div', {
  29634. 'class': 'mce-drag-container',
  29635. 'data-mce-bogus': 'all',
  29636. 'unselectable': 'on',
  29637. 'contenteditable': 'false'
  29638. });
  29639. dom.setStyles(ghostElm, {
  29640. position: 'absolute',
  29641. opacity: 0.5,
  29642. overflow: 'hidden',
  29643. border: 0,
  29644. padding: 0,
  29645. margin: 0,
  29646. width: width,
  29647. height: height
  29648. });
  29649. dom.setStyles(clonedElm, {
  29650. margin: 0,
  29651. boxSizing: 'border-box'
  29652. });
  29653. ghostElm.appendChild(clonedElm);
  29654. return ghostElm;
  29655. };
  29656. var appendGhostToBody = function (ghostElm, bodyElm) {
  29657. if (ghostElm.parentNode !== bodyElm) {
  29658. bodyElm.appendChild(ghostElm);
  29659. }
  29660. };
  29661. var moveGhost = function (ghostElm, position, width, height, maxX, maxY) {
  29662. var overflowX = 0, overflowY = 0;
  29663. ghostElm.style.left = position.pageX + 'px';
  29664. ghostElm.style.top = position.pageY + 'px';
  29665. if (position.pageX + width > maxX) {
  29666. overflowX = position.pageX + width - maxX;
  29667. }
  29668. if (position.pageY + height > maxY) {
  29669. overflowY = position.pageY + height - maxY;
  29670. }
  29671. ghostElm.style.width = width - overflowX + 'px';
  29672. ghostElm.style.height = height - overflowY + 'px';
  29673. };
  29674. var removeElement = function (elm) {
  29675. if (elm && elm.parentNode) {
  29676. elm.parentNode.removeChild(elm);
  29677. }
  29678. };
  29679. var isLeftMouseButtonPressed = function (e) {
  29680. return e.button === 0;
  29681. };
  29682. var applyRelPos = function (state, position) {
  29683. return {
  29684. pageX: position.pageX - state.relX,
  29685. pageY: position.pageY + 5
  29686. };
  29687. };
  29688. var start = function (state, editor) {
  29689. return function (e) {
  29690. if (isLeftMouseButtonPressed(e)) {
  29691. var ceElm = find$3(editor.dom.getParents(e.target), or(isContentEditableFalse$1, isContentEditableTrue$1)).getOr(null);
  29692. if (isDraggable(editor.getBody(), ceElm)) {
  29693. var elmPos = editor.dom.getPos(ceElm);
  29694. var bodyElm = editor.getBody();
  29695. var docElm = editor.getDoc().documentElement;
  29696. state.set({
  29697. element: ceElm,
  29698. dragging: false,
  29699. screenX: e.screenX,
  29700. screenY: e.screenY,
  29701. maxX: (editor.inline ? bodyElm.scrollWidth : docElm.offsetWidth) - 2,
  29702. maxY: (editor.inline ? bodyElm.scrollHeight : docElm.offsetHeight) - 2,
  29703. relX: e.pageX - elmPos.x,
  29704. relY: e.pageY - elmPos.y,
  29705. width: ceElm.offsetWidth,
  29706. height: ceElm.offsetHeight,
  29707. ghost: createGhost(editor, ceElm, ceElm.offsetWidth, ceElm.offsetHeight)
  29708. });
  29709. }
  29710. }
  29711. };
  29712. };
  29713. var move = function (state, editor) {
  29714. var throttledPlaceCaretAt = Delay.throttle(function (clientX, clientY) {
  29715. editor._selectionOverrides.hideFakeCaret();
  29716. editor.selection.placeCaretAt(clientX, clientY);
  29717. }, 0);
  29718. editor.on('remove', throttledPlaceCaretAt.stop);
  29719. return function (e) {
  29720. return state.on(function (state) {
  29721. var movement = Math.max(Math.abs(e.screenX - state.screenX), Math.abs(e.screenY - state.screenY));
  29722. if (!state.dragging && movement > 10) {
  29723. var args = editor.fire('dragstart', { target: state.element });
  29724. if (args.isDefaultPrevented()) {
  29725. return;
  29726. }
  29727. state.dragging = true;
  29728. editor.focus();
  29729. }
  29730. if (state.dragging) {
  29731. var targetPos = applyRelPos(state, calc(editor, e));
  29732. appendGhostToBody(state.ghost, editor.getBody());
  29733. moveGhost(state.ghost, targetPos, state.width, state.height, state.maxX, state.maxY);
  29734. throttledPlaceCaretAt(e.clientX, e.clientY);
  29735. }
  29736. });
  29737. };
  29738. };
  29739. var getRawTarget = function (selection) {
  29740. var rng = selection.getSel().getRangeAt(0);
  29741. var startContainer = rng.startContainer;
  29742. return startContainer.nodeType === 3 ? startContainer.parentNode : startContainer;
  29743. };
  29744. var drop = function (state, editor) {
  29745. return function (e) {
  29746. state.on(function (state) {
  29747. if (state.dragging) {
  29748. if (isValidDropTarget(editor, getRawTarget(editor.selection), state.element)) {
  29749. var targetClone_1 = cloneElement(state.element);
  29750. var args = editor.fire('drop', {
  29751. clientX: e.clientX,
  29752. clientY: e.clientY
  29753. });
  29754. if (!args.isDefaultPrevented()) {
  29755. editor.undoManager.transact(function () {
  29756. removeElement(state.element);
  29757. editor.insertContent(editor.dom.getOuterHTML(targetClone_1));
  29758. editor._selectionOverrides.hideFakeCaret();
  29759. });
  29760. }
  29761. }
  29762. editor.fire('dragend');
  29763. }
  29764. });
  29765. removeDragState(state);
  29766. };
  29767. };
  29768. var stop = function (state, editor) {
  29769. return function () {
  29770. state.on(function (state) {
  29771. if (state.dragging) {
  29772. editor.fire('dragend');
  29773. }
  29774. });
  29775. removeDragState(state);
  29776. };
  29777. };
  29778. var removeDragState = function (state) {
  29779. state.on(function (state) {
  29780. removeElement(state.ghost);
  29781. });
  29782. state.clear();
  29783. };
  29784. var bindFakeDragEvents = function (editor) {
  29785. var state = value();
  29786. var pageDom = DOMUtils.DOM;
  29787. var rootDocument = document;
  29788. var dragStartHandler = start(state, editor);
  29789. var dragHandler = move(state, editor);
  29790. var dropHandler = drop(state, editor);
  29791. var dragEndHandler = stop(state, editor);
  29792. editor.on('mousedown', dragStartHandler);
  29793. editor.on('mousemove', dragHandler);
  29794. editor.on('mouseup', dropHandler);
  29795. pageDom.bind(rootDocument, 'mousemove', dragHandler);
  29796. pageDom.bind(rootDocument, 'mouseup', dragEndHandler);
  29797. editor.on('remove', function () {
  29798. pageDom.unbind(rootDocument, 'mousemove', dragHandler);
  29799. pageDom.unbind(rootDocument, 'mouseup', dragEndHandler);
  29800. });
  29801. editor.on('keydown', function (e) {
  29802. if (e.keyCode === VK.ESC) {
  29803. dragEndHandler();
  29804. }
  29805. });
  29806. };
  29807. var blockIeDrop = function (editor) {
  29808. editor.on('drop', function (e) {
  29809. var realTarget = typeof e.clientX !== 'undefined' ? editor.getDoc().elementFromPoint(e.clientX, e.clientY) : null;
  29810. if (isContentEditableFalse$1(realTarget) || editor.dom.getContentEditableParent(realTarget) === 'false') {
  29811. e.preventDefault();
  29812. }
  29813. });
  29814. };
  29815. var blockUnsupportedFileDrop = function (editor) {
  29816. var preventFileDrop = function (e) {
  29817. if (!e.isDefaultPrevented()) {
  29818. var dataTransfer = e.dataTransfer;
  29819. if (dataTransfer && (contains$3(dataTransfer.types, 'Files') || dataTransfer.files.length > 0)) {
  29820. e.preventDefault();
  29821. if (e.type === 'drop') {
  29822. displayError(editor, 'Dropped file type is not supported');
  29823. }
  29824. }
  29825. }
  29826. };
  29827. var preventFileDropIfUIElement = function (e) {
  29828. if (isUIElement(editor, e.target)) {
  29829. preventFileDrop(e);
  29830. }
  29831. };
  29832. var setup = function () {
  29833. var pageDom = DOMUtils.DOM;
  29834. var dom = editor.dom;
  29835. var doc = document;
  29836. var editorRoot = editor.inline ? editor.getBody() : editor.getDoc();
  29837. var eventNames = [
  29838. 'drop',
  29839. 'dragover'
  29840. ];
  29841. each$k(eventNames, function (name) {
  29842. pageDom.bind(doc, name, preventFileDropIfUIElement);
  29843. dom.bind(editorRoot, name, preventFileDrop);
  29844. });
  29845. editor.on('remove', function () {
  29846. each$k(eventNames, function (name) {
  29847. pageDom.unbind(doc, name, preventFileDropIfUIElement);
  29848. dom.unbind(editorRoot, name, preventFileDrop);
  29849. });
  29850. });
  29851. };
  29852. editor.on('init', function () {
  29853. Delay.setEditorTimeout(editor, setup, 0);
  29854. });
  29855. };
  29856. var init$2 = function (editor) {
  29857. bindFakeDragEvents(editor);
  29858. blockIeDrop(editor);
  29859. if (shouldBlockUnsupportedDrop(editor)) {
  29860. blockUnsupportedFileDrop(editor);
  29861. }
  29862. };
  29863. var setup$1 = function (editor) {
  29864. var renderFocusCaret = first(function () {
  29865. if (!editor.removed && editor.getBody().contains(document.activeElement)) {
  29866. var rng = editor.selection.getRng();
  29867. if (rng.collapsed) {
  29868. var caretRange = renderRangeCaret(editor, rng, false);
  29869. editor.selection.setRng(caretRange);
  29870. }
  29871. }
  29872. }, 0);
  29873. editor.on('focus', function () {
  29874. renderFocusCaret.throttle();
  29875. });
  29876. editor.on('blur', function () {
  29877. renderFocusCaret.cancel();
  29878. });
  29879. };
  29880. var setup = function (editor) {
  29881. editor.on('init', function () {
  29882. editor.on('focusin', function (e) {
  29883. var target = e.target;
  29884. if (isMedia$2(target)) {
  29885. var ceRoot = getContentEditableRoot$1(editor.getBody(), target);
  29886. var node = isContentEditableFalse$b(ceRoot) ? ceRoot : target;
  29887. if (editor.selection.getNode() !== node) {
  29888. selectNode(editor, node).each(function (rng) {
  29889. return editor.selection.setRng(rng);
  29890. });
  29891. }
  29892. }
  29893. });
  29894. });
  29895. };
  29896. var isContentEditableTrue = isContentEditableTrue$4;
  29897. var isContentEditableFalse = isContentEditableFalse$b;
  29898. var getContentEditableRoot = function (editor, node) {
  29899. return getContentEditableRoot$1(editor.getBody(), node);
  29900. };
  29901. var SelectionOverrides = function (editor) {
  29902. var selection = editor.selection, dom = editor.dom;
  29903. var isBlock = dom.isBlock;
  29904. var rootNode = editor.getBody();
  29905. var fakeCaret = FakeCaret(editor, rootNode, isBlock, function () {
  29906. return hasFocus(editor);
  29907. });
  29908. var realSelectionId = 'sel-' + dom.uniqueId();
  29909. var elementSelectionAttr = 'data-mce-selected';
  29910. var selectedElement;
  29911. var isFakeSelectionElement = function (node) {
  29912. return dom.hasClass(node, 'mce-offscreen-selection');
  29913. };
  29914. var isFakeSelectionTargetElement = function (node) {
  29915. return node !== rootNode && (isContentEditableFalse(node) || isMedia$2(node)) && dom.isChildOf(node, rootNode);
  29916. };
  29917. var isNearFakeSelectionElement = function (pos) {
  29918. return isBeforeContentEditableFalse(pos) || isAfterContentEditableFalse(pos) || isBeforeMedia(pos) || isAfterMedia(pos);
  29919. };
  29920. var getRealSelectionElement = function () {
  29921. var container = dom.get(realSelectionId);
  29922. return container ? container.getElementsByTagName('*')[0] : container;
  29923. };
  29924. var setRange = function (range) {
  29925. if (range) {
  29926. selection.setRng(range);
  29927. }
  29928. };
  29929. var getRange = selection.getRng;
  29930. var showCaret = function (direction, node, before, scrollIntoView) {
  29931. if (scrollIntoView === void 0) {
  29932. scrollIntoView = true;
  29933. }
  29934. var e = editor.fire('ShowCaret', {
  29935. target: node,
  29936. direction: direction,
  29937. before: before
  29938. });
  29939. if (e.isDefaultPrevented()) {
  29940. return null;
  29941. }
  29942. if (scrollIntoView) {
  29943. selection.scrollIntoView(node, direction === -1);
  29944. }
  29945. return fakeCaret.show(before, node);
  29946. };
  29947. var showBlockCaretContainer = function (blockCaretContainer) {
  29948. if (blockCaretContainer.hasAttribute('data-mce-caret')) {
  29949. showCaretContainerBlock(blockCaretContainer);
  29950. setRange(getRange());
  29951. selection.scrollIntoView(blockCaretContainer);
  29952. }
  29953. };
  29954. var registerEvents = function () {
  29955. editor.on('mouseup', function (e) {
  29956. var range = getRange();
  29957. if (range.collapsed && isXYInContentArea(editor, e.clientX, e.clientY)) {
  29958. renderCaretAtRange(editor, range, false).each(setRange);
  29959. }
  29960. });
  29961. editor.on('click', function (e) {
  29962. var contentEditableRoot = getContentEditableRoot(editor, e.target);
  29963. if (contentEditableRoot) {
  29964. if (isContentEditableFalse(contentEditableRoot)) {
  29965. e.preventDefault();
  29966. editor.focus();
  29967. }
  29968. if (isContentEditableTrue(contentEditableRoot)) {
  29969. if (dom.isChildOf(contentEditableRoot, selection.getNode())) {
  29970. removeElementSelection();
  29971. }
  29972. }
  29973. }
  29974. });
  29975. editor.on('blur NewBlock', removeElementSelection);
  29976. editor.on('ResizeWindow FullscreenStateChanged', fakeCaret.reposition);
  29977. var hasNormalCaretPosition = function (elm) {
  29978. var start = elm.firstChild;
  29979. if (isNullable(start)) {
  29980. return false;
  29981. }
  29982. var startPos = CaretPosition.before(start);
  29983. if (isBr$5(startPos.getNode()) && elm.childNodes.length === 1) {
  29984. return !isNearFakeSelectionElement(startPos);
  29985. } else {
  29986. var caretWalker = CaretWalker(elm);
  29987. var newPos = caretWalker.next(startPos);
  29988. return newPos && !isNearFakeSelectionElement(newPos);
  29989. }
  29990. };
  29991. var isInSameBlock = function (node1, node2) {
  29992. var block1 = dom.getParent(node1, isBlock);
  29993. var block2 = dom.getParent(node2, isBlock);
  29994. return block1 === block2;
  29995. };
  29996. var hasBetterMouseTarget = function (targetNode, caretNode) {
  29997. var targetBlock = dom.getParent(targetNode, isBlock);
  29998. var caretBlock = dom.getParent(caretNode, isBlock);
  29999. if (isNullable(targetBlock)) {
  30000. return false;
  30001. }
  30002. if (targetNode !== caretBlock && dom.isChildOf(targetBlock, caretBlock) && isContentEditableFalse(getContentEditableRoot(editor, targetBlock)) === false) {
  30003. return true;
  30004. }
  30005. return !dom.isChildOf(caretBlock, targetBlock) && !isInSameBlock(targetBlock, caretBlock) && hasNormalCaretPosition(targetBlock);
  30006. };
  30007. editor.on('tap', function (e) {
  30008. var targetElm = e.target;
  30009. var contentEditableRoot = getContentEditableRoot(editor, targetElm);
  30010. if (isContentEditableFalse(contentEditableRoot)) {
  30011. e.preventDefault();
  30012. selectNode(editor, contentEditableRoot).each(setElementSelection);
  30013. } else if (isFakeSelectionTargetElement(targetElm)) {
  30014. selectNode(editor, targetElm).each(setElementSelection);
  30015. }
  30016. }, true);
  30017. editor.on('mousedown', function (e) {
  30018. var targetElm = e.target;
  30019. if (targetElm !== rootNode && targetElm.nodeName !== 'HTML' && !dom.isChildOf(targetElm, rootNode)) {
  30020. return;
  30021. }
  30022. if (isXYInContentArea(editor, e.clientX, e.clientY) === false) {
  30023. return;
  30024. }
  30025. var contentEditableRoot = getContentEditableRoot(editor, targetElm);
  30026. if (contentEditableRoot) {
  30027. if (isContentEditableFalse(contentEditableRoot)) {
  30028. e.preventDefault();
  30029. selectNode(editor, contentEditableRoot).each(setElementSelection);
  30030. } else {
  30031. removeElementSelection();
  30032. if (!(isContentEditableTrue(contentEditableRoot) && e.shiftKey) && !isXYWithinRange(e.clientX, e.clientY, selection.getRng())) {
  30033. hideFakeCaret();
  30034. selection.placeCaretAt(e.clientX, e.clientY);
  30035. }
  30036. }
  30037. } else if (isFakeSelectionTargetElement(targetElm)) {
  30038. selectNode(editor, targetElm).each(setElementSelection);
  30039. } else if (isFakeCaretTarget(targetElm) === false) {
  30040. removeElementSelection();
  30041. hideFakeCaret();
  30042. var fakeCaretInfo = closestFakeCaret(rootNode, e.clientX, e.clientY);
  30043. if (fakeCaretInfo) {
  30044. if (!hasBetterMouseTarget(targetElm, fakeCaretInfo.node)) {
  30045. e.preventDefault();
  30046. var range = showCaret(1, fakeCaretInfo.node, fakeCaretInfo.before, false);
  30047. setRange(range);
  30048. editor.getBody().focus();
  30049. }
  30050. }
  30051. }
  30052. });
  30053. editor.on('keypress', function (e) {
  30054. if (VK.modifierPressed(e)) {
  30055. return;
  30056. }
  30057. if (isContentEditableFalse(selection.getNode())) {
  30058. e.preventDefault();
  30059. }
  30060. });
  30061. editor.on('GetSelectionRange', function (e) {
  30062. var rng = e.range;
  30063. if (selectedElement) {
  30064. if (!selectedElement.parentNode) {
  30065. selectedElement = null;
  30066. return;
  30067. }
  30068. rng = rng.cloneRange();
  30069. rng.selectNode(selectedElement);
  30070. e.range = rng;
  30071. }
  30072. });
  30073. editor.on('SetSelectionRange', function (e) {
  30074. e.range = normalizeShortEndedElementSelection(e.range);
  30075. var rng = setElementSelection(e.range, e.forward);
  30076. if (rng) {
  30077. e.range = rng;
  30078. }
  30079. });
  30080. var isPasteBin = function (node) {
  30081. return node.id === 'mcepastebin';
  30082. };
  30083. editor.on('AfterSetSelectionRange', function (e) {
  30084. var rng = e.range;
  30085. var parentNode = rng.startContainer.parentNode;
  30086. if (!isRangeInCaretContainer(rng) && !isPasteBin(parentNode)) {
  30087. hideFakeCaret();
  30088. }
  30089. if (!isFakeSelectionElement(parentNode)) {
  30090. removeElementSelection();
  30091. }
  30092. });
  30093. editor.on('copy', function (e) {
  30094. var clipboardData = e.clipboardData;
  30095. if (!e.isDefaultPrevented() && e.clipboardData && !Env.ie) {
  30096. var realSelectionElement = getRealSelectionElement();
  30097. if (realSelectionElement) {
  30098. e.preventDefault();
  30099. clipboardData.clearData();
  30100. clipboardData.setData('text/html', realSelectionElement.outerHTML);
  30101. clipboardData.setData('text/plain', realSelectionElement.outerText || realSelectionElement.innerText);
  30102. }
  30103. }
  30104. });
  30105. init$2(editor);
  30106. setup$1(editor);
  30107. setup(editor);
  30108. };
  30109. var isWithinCaretContainer = function (node) {
  30110. return isCaretContainer$2(node) || startsWithCaretContainer$1(node) || endsWithCaretContainer$1(node);
  30111. };
  30112. var isRangeInCaretContainer = function (rng) {
  30113. return isWithinCaretContainer(rng.startContainer) || isWithinCaretContainer(rng.endContainer);
  30114. };
  30115. var normalizeShortEndedElementSelection = function (rng) {
  30116. var shortEndedElements = editor.schema.getShortEndedElements();
  30117. var newRng = dom.createRng();
  30118. var startContainer = rng.startContainer;
  30119. var startOffset = rng.startOffset;
  30120. var endContainer = rng.endContainer;
  30121. var endOffset = rng.endOffset;
  30122. if (has$2(shortEndedElements, startContainer.nodeName.toLowerCase())) {
  30123. if (startOffset === 0) {
  30124. newRng.setStartBefore(startContainer);
  30125. } else {
  30126. newRng.setStartAfter(startContainer);
  30127. }
  30128. } else {
  30129. newRng.setStart(startContainer, startOffset);
  30130. }
  30131. if (has$2(shortEndedElements, endContainer.nodeName.toLowerCase())) {
  30132. if (endOffset === 0) {
  30133. newRng.setEndBefore(endContainer);
  30134. } else {
  30135. newRng.setEndAfter(endContainer);
  30136. }
  30137. } else {
  30138. newRng.setEnd(endContainer, endOffset);
  30139. }
  30140. return newRng;
  30141. };
  30142. var setupOffscreenSelection = function (node, targetClone, origTargetClone) {
  30143. var $ = editor.$;
  30144. var $realSelectionContainer = descendant(SugarElement.fromDom(editor.getBody()), '#' + realSelectionId).fold(function () {
  30145. return $([]);
  30146. }, function (elm) {
  30147. return $([elm.dom]);
  30148. });
  30149. if ($realSelectionContainer.length === 0) {
  30150. $realSelectionContainer = $('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr('id', realSelectionId);
  30151. $realSelectionContainer.appendTo(editor.getBody());
  30152. }
  30153. var newRange = dom.createRng();
  30154. if (targetClone === origTargetClone && Env.ie) {
  30155. $realSelectionContainer.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xA0</p>').append(targetClone);
  30156. newRange.setStartAfter($realSelectionContainer[0].firstChild.firstChild);
  30157. newRange.setEndAfter(targetClone);
  30158. } else {
  30159. $realSelectionContainer.empty().append(nbsp).append(targetClone).append(nbsp);
  30160. newRange.setStart($realSelectionContainer[0].firstChild, 1);
  30161. newRange.setEnd($realSelectionContainer[0].lastChild, 0);
  30162. }
  30163. $realSelectionContainer.css({ top: dom.getPos(node, editor.getBody()).y });
  30164. $realSelectionContainer[0].focus();
  30165. var sel = selection.getSel();
  30166. sel.removeAllRanges();
  30167. sel.addRange(newRange);
  30168. return newRange;
  30169. };
  30170. var selectElement = function (elm) {
  30171. var targetClone = elm.cloneNode(true);
  30172. var e = editor.fire('ObjectSelected', {
  30173. target: elm,
  30174. targetClone: targetClone
  30175. });
  30176. if (e.isDefaultPrevented()) {
  30177. return null;
  30178. }
  30179. var range = setupOffscreenSelection(elm, e.targetClone, targetClone);
  30180. var nodeElm = SugarElement.fromDom(elm);
  30181. each$k(descendants(SugarElement.fromDom(editor.getBody()), '*[data-mce-selected]'), function (elm) {
  30182. if (!eq(nodeElm, elm)) {
  30183. remove$6(elm, elementSelectionAttr);
  30184. }
  30185. });
  30186. if (!dom.getAttrib(elm, elementSelectionAttr)) {
  30187. elm.setAttribute(elementSelectionAttr, '1');
  30188. }
  30189. selectedElement = elm;
  30190. hideFakeCaret();
  30191. return range;
  30192. };
  30193. var setElementSelection = function (range, forward) {
  30194. if (!range) {
  30195. return null;
  30196. }
  30197. if (range.collapsed) {
  30198. if (!isRangeInCaretContainer(range)) {
  30199. var dir = forward ? 1 : -1;
  30200. var caretPosition = getNormalizedRangeEndPoint(dir, rootNode, range);
  30201. var beforeNode = caretPosition.getNode(!forward);
  30202. if (isFakeCaretTarget(beforeNode)) {
  30203. return showCaret(dir, beforeNode, forward ? !caretPosition.isAtEnd() : false, false);
  30204. }
  30205. var afterNode = caretPosition.getNode(forward);
  30206. if (isFakeCaretTarget(afterNode)) {
  30207. return showCaret(dir, afterNode, forward ? false : !caretPosition.isAtEnd(), false);
  30208. }
  30209. }
  30210. return null;
  30211. }
  30212. var startContainer = range.startContainer;
  30213. var startOffset = range.startOffset;
  30214. var endOffset = range.endOffset;
  30215. if (startContainer.nodeType === 3 && startOffset === 0 && isContentEditableFalse(startContainer.parentNode)) {
  30216. startContainer = startContainer.parentNode;
  30217. startOffset = dom.nodeIndex(startContainer);
  30218. startContainer = startContainer.parentNode;
  30219. }
  30220. if (startContainer.nodeType !== 1) {
  30221. return null;
  30222. }
  30223. if (endOffset === startOffset + 1 && startContainer === range.endContainer) {
  30224. var node = startContainer.childNodes[startOffset];
  30225. if (isFakeSelectionTargetElement(node)) {
  30226. return selectElement(node);
  30227. }
  30228. }
  30229. return null;
  30230. };
  30231. var removeElementSelection = function () {
  30232. if (selectedElement) {
  30233. selectedElement.removeAttribute(elementSelectionAttr);
  30234. }
  30235. descendant(SugarElement.fromDom(editor.getBody()), '#' + realSelectionId).each(remove$7);
  30236. selectedElement = null;
  30237. };
  30238. var destroy = function () {
  30239. fakeCaret.destroy();
  30240. selectedElement = null;
  30241. };
  30242. var hideFakeCaret = function () {
  30243. fakeCaret.hide();
  30244. };
  30245. if (Env.ceFalse && !isRtc(editor)) {
  30246. registerEvents();
  30247. }
  30248. return {
  30249. showCaret: showCaret,
  30250. showBlockCaretContainer: showBlockCaretContainer,
  30251. hideFakeCaret: hideFakeCaret,
  30252. destroy: destroy
  30253. };
  30254. };
  30255. var Quirks = function (editor) {
  30256. var each = Tools.each;
  30257. var BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection, parser = editor.parser;
  30258. var isGecko = Env.gecko, isIE = Env.ie, isWebKit = Env.webkit;
  30259. var mceInternalUrlPrefix = 'data:text/mce-internal,';
  30260. var mceInternalDataType = isIE ? 'Text' : 'URL';
  30261. var setEditorCommandState = function (cmd, state) {
  30262. try {
  30263. editor.getDoc().execCommand(cmd, false, state);
  30264. } catch (ex) {
  30265. }
  30266. };
  30267. var isDefaultPrevented = function (e) {
  30268. return e.isDefaultPrevented();
  30269. };
  30270. var setMceInternalContent = function (e) {
  30271. var selectionHtml, internalContent;
  30272. if (e.dataTransfer) {
  30273. if (editor.selection.isCollapsed() && e.target.tagName === 'IMG') {
  30274. selection.select(e.target);
  30275. }
  30276. selectionHtml = editor.selection.getContent();
  30277. if (selectionHtml.length > 0) {
  30278. internalContent = mceInternalUrlPrefix + escape(editor.id) + ',' + escape(selectionHtml);
  30279. e.dataTransfer.setData(mceInternalDataType, internalContent);
  30280. }
  30281. }
  30282. };
  30283. var getMceInternalContent = function (e) {
  30284. var internalContent;
  30285. if (e.dataTransfer) {
  30286. internalContent = e.dataTransfer.getData(mceInternalDataType);
  30287. if (internalContent && internalContent.indexOf(mceInternalUrlPrefix) >= 0) {
  30288. internalContent = internalContent.substr(mceInternalUrlPrefix.length).split(',');
  30289. return {
  30290. id: unescape(internalContent[0]),
  30291. html: unescape(internalContent[1])
  30292. };
  30293. }
  30294. }
  30295. return null;
  30296. };
  30297. var insertClipboardContents = function (content, internal) {
  30298. if (editor.queryCommandSupported('mceInsertClipboardContent')) {
  30299. editor.execCommand('mceInsertClipboardContent', false, {
  30300. content: content,
  30301. internal: internal
  30302. });
  30303. } else {
  30304. editor.execCommand('mceInsertContent', false, content);
  30305. }
  30306. };
  30307. var emptyEditorWhenDeleting = function () {
  30308. var serializeRng = function (rng) {
  30309. var body = dom.create('body');
  30310. var contents = rng.cloneContents();
  30311. body.appendChild(contents);
  30312. return selection.serializer.serialize(body, { format: 'html' });
  30313. };
  30314. var allContentsSelected = function (rng) {
  30315. var selection = serializeRng(rng);
  30316. var allRng = dom.createRng();
  30317. allRng.selectNode(editor.getBody());
  30318. var allSelection = serializeRng(allRng);
  30319. return selection === allSelection;
  30320. };
  30321. editor.on('keydown', function (e) {
  30322. var keyCode = e.keyCode;
  30323. var isCollapsed, body;
  30324. if (!isDefaultPrevented(e) && (keyCode === DELETE || keyCode === BACKSPACE)) {
  30325. isCollapsed = editor.selection.isCollapsed();
  30326. body = editor.getBody();
  30327. if (isCollapsed && !dom.isEmpty(body)) {
  30328. return;
  30329. }
  30330. if (!isCollapsed && !allContentsSelected(editor.selection.getRng())) {
  30331. return;
  30332. }
  30333. e.preventDefault();
  30334. editor.setContent('');
  30335. if (body.firstChild && dom.isBlock(body.firstChild)) {
  30336. editor.selection.setCursorLocation(body.firstChild, 0);
  30337. } else {
  30338. editor.selection.setCursorLocation(body, 0);
  30339. }
  30340. editor.nodeChanged();
  30341. }
  30342. });
  30343. };
  30344. var selectAll = function () {
  30345. editor.shortcuts.add('meta+a', null, 'SelectAll');
  30346. };
  30347. var documentElementEditingFocus = function () {
  30348. if (!editor.inline) {
  30349. dom.bind(editor.getDoc(), 'mousedown mouseup', function (e) {
  30350. var rng;
  30351. if (e.target === editor.getDoc().documentElement) {
  30352. rng = selection.getRng();
  30353. editor.getBody().focus();
  30354. if (e.type === 'mousedown') {
  30355. if (isCaretContainer$2(rng.startContainer)) {
  30356. return;
  30357. }
  30358. selection.placeCaretAt(e.clientX, e.clientY);
  30359. } else {
  30360. selection.setRng(rng);
  30361. }
  30362. }
  30363. });
  30364. }
  30365. };
  30366. var removeHrOnBackspace = function () {
  30367. editor.on('keydown', function (e) {
  30368. if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {
  30369. if (!editor.getBody().getElementsByTagName('hr').length) {
  30370. return;
  30371. }
  30372. if (selection.isCollapsed() && selection.getRng().startOffset === 0) {
  30373. var node = selection.getNode();
  30374. var previousSibling = node.previousSibling;
  30375. if (node.nodeName === 'HR') {
  30376. dom.remove(node);
  30377. e.preventDefault();
  30378. return;
  30379. }
  30380. if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === 'hr') {
  30381. dom.remove(previousSibling);
  30382. e.preventDefault();
  30383. }
  30384. }
  30385. }
  30386. });
  30387. };
  30388. var focusBody = function () {
  30389. if (!Range.prototype.getClientRects) {
  30390. editor.on('mousedown', function (e) {
  30391. if (!isDefaultPrevented(e) && e.target.nodeName === 'HTML') {
  30392. var body_1 = editor.getBody();
  30393. body_1.blur();
  30394. Delay.setEditorTimeout(editor, function () {
  30395. body_1.focus();
  30396. });
  30397. }
  30398. });
  30399. }
  30400. };
  30401. var selectControlElements = function () {
  30402. editor.on('click', function (e) {
  30403. var target = e.target;
  30404. if (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== 'false') {
  30405. e.preventDefault();
  30406. editor.selection.select(target);
  30407. editor.nodeChanged();
  30408. }
  30409. if (target.nodeName === 'A' && dom.hasClass(target, 'mce-item-anchor')) {
  30410. e.preventDefault();
  30411. selection.select(target);
  30412. }
  30413. });
  30414. };
  30415. var removeStylesWhenDeletingAcrossBlockElements = function () {
  30416. var getAttributeApplyFunction = function () {
  30417. var template = dom.getAttribs(selection.getStart().cloneNode(false));
  30418. return function () {
  30419. var target = selection.getStart();
  30420. if (target !== editor.getBody()) {
  30421. dom.setAttrib(target, 'style', null);
  30422. each(template, function (attr) {
  30423. target.setAttributeNode(attr.cloneNode(true));
  30424. });
  30425. }
  30426. };
  30427. };
  30428. var isSelectionAcrossElements = function () {
  30429. return !selection.isCollapsed() && dom.getParent(selection.getStart(), dom.isBlock) !== dom.getParent(selection.getEnd(), dom.isBlock);
  30430. };
  30431. editor.on('keypress', function (e) {
  30432. var applyAttributes;
  30433. if (!isDefaultPrevented(e) && (e.keyCode === 8 || e.keyCode === 46) && isSelectionAcrossElements()) {
  30434. applyAttributes = getAttributeApplyFunction();
  30435. editor.getDoc().execCommand('delete', false, null);
  30436. applyAttributes();
  30437. e.preventDefault();
  30438. return false;
  30439. }
  30440. });
  30441. dom.bind(editor.getDoc(), 'cut', function (e) {
  30442. var applyAttributes;
  30443. if (!isDefaultPrevented(e) && isSelectionAcrossElements()) {
  30444. applyAttributes = getAttributeApplyFunction();
  30445. Delay.setEditorTimeout(editor, function () {
  30446. applyAttributes();
  30447. });
  30448. }
  30449. });
  30450. };
  30451. var disableBackspaceIntoATable = function () {
  30452. editor.on('keydown', function (e) {
  30453. if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {
  30454. if (selection.isCollapsed() && selection.getRng().startOffset === 0) {
  30455. var previousSibling = selection.getNode().previousSibling;
  30456. if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === 'table') {
  30457. e.preventDefault();
  30458. return false;
  30459. }
  30460. }
  30461. }
  30462. });
  30463. };
  30464. var removeBlockQuoteOnBackSpace = function () {
  30465. editor.on('keydown', function (e) {
  30466. var rng, parent;
  30467. if (isDefaultPrevented(e) || e.keyCode !== VK.BACKSPACE) {
  30468. return;
  30469. }
  30470. rng = selection.getRng();
  30471. var container = rng.startContainer;
  30472. var offset = rng.startOffset;
  30473. var root = dom.getRoot();
  30474. parent = container;
  30475. if (!rng.collapsed || offset !== 0) {
  30476. return;
  30477. }
  30478. while (parent && parent.parentNode && parent.parentNode.firstChild === parent && parent.parentNode !== root) {
  30479. parent = parent.parentNode;
  30480. }
  30481. if (parent.tagName === 'BLOCKQUOTE') {
  30482. editor.formatter.toggle('blockquote', null, parent);
  30483. rng = dom.createRng();
  30484. rng.setStart(container, 0);
  30485. rng.setEnd(container, 0);
  30486. selection.setRng(rng);
  30487. }
  30488. });
  30489. };
  30490. var setGeckoEditingOptions = function () {
  30491. var setOpts = function () {
  30492. setEditorCommandState('StyleWithCSS', false);
  30493. setEditorCommandState('enableInlineTableEditing', false);
  30494. if (!getObjectResizing(editor)) {
  30495. setEditorCommandState('enableObjectResizing', false);
  30496. }
  30497. };
  30498. if (!isReadOnly$1(editor)) {
  30499. editor.on('BeforeExecCommand mousedown', setOpts);
  30500. }
  30501. };
  30502. var addBrAfterLastLinks = function () {
  30503. var fixLinks = function () {
  30504. each(dom.select('a'), function (node) {
  30505. var parentNode = node.parentNode;
  30506. var root = dom.getRoot();
  30507. if (parentNode.lastChild === node) {
  30508. while (parentNode && !dom.isBlock(parentNode)) {
  30509. if (parentNode.parentNode.lastChild !== parentNode || parentNode === root) {
  30510. return;
  30511. }
  30512. parentNode = parentNode.parentNode;
  30513. }
  30514. dom.add(parentNode, 'br', { 'data-mce-bogus': 1 });
  30515. }
  30516. });
  30517. };
  30518. editor.on('SetContent ExecCommand', function (e) {
  30519. if (e.type === 'setcontent' || e.command === 'mceInsertLink') {
  30520. fixLinks();
  30521. }
  30522. });
  30523. };
  30524. var setDefaultBlockType = function () {
  30525. if (getForcedRootBlock(editor)) {
  30526. editor.on('init', function () {
  30527. setEditorCommandState('DefaultParagraphSeparator', getForcedRootBlock(editor));
  30528. });
  30529. }
  30530. };
  30531. var normalizeSelection = function () {
  30532. editor.on('keyup focusin mouseup', function (e) {
  30533. if (!VK.modifierPressed(e)) {
  30534. selection.normalize();
  30535. }
  30536. }, true);
  30537. };
  30538. var showBrokenImageIcon = function () {
  30539. editor.contentStyles.push('img:-moz-broken {' + '-moz-force-broken-image-icon:1;' + 'min-width:24px;' + 'min-height:24px' + '}');
  30540. };
  30541. var restoreFocusOnKeyDown = function () {
  30542. if (!editor.inline) {
  30543. editor.on('keydown', function () {
  30544. if (document.activeElement === document.body) {
  30545. editor.getWin().focus();
  30546. }
  30547. });
  30548. }
  30549. };
  30550. var bodyHeight = function () {
  30551. if (!editor.inline) {
  30552. editor.contentStyles.push('body {min-height: 150px}');
  30553. editor.on('click', function (e) {
  30554. var rng;
  30555. if (e.target.nodeName === 'HTML') {
  30556. if (Env.ie > 11) {
  30557. editor.getBody().focus();
  30558. return;
  30559. }
  30560. rng = editor.selection.getRng();
  30561. editor.getBody().focus();
  30562. editor.selection.setRng(rng);
  30563. editor.selection.normalize();
  30564. editor.nodeChanged();
  30565. }
  30566. });
  30567. }
  30568. };
  30569. var blockCmdArrowNavigation = function () {
  30570. if (Env.mac) {
  30571. editor.on('keydown', function (e) {
  30572. if (VK.metaKeyPressed(e) && !e.shiftKey && (e.keyCode === 37 || e.keyCode === 39)) {
  30573. e.preventDefault();
  30574. var selection_1 = editor.selection.getSel();
  30575. selection_1.modify('move', e.keyCode === 37 ? 'backward' : 'forward', 'lineboundary');
  30576. }
  30577. });
  30578. }
  30579. };
  30580. var disableAutoUrlDetect = function () {
  30581. setEditorCommandState('AutoUrlDetect', false);
  30582. };
  30583. var tapLinksAndImages = function () {
  30584. editor.on('click', function (e) {
  30585. var elm = e.target;
  30586. do {
  30587. if (elm.tagName === 'A') {
  30588. e.preventDefault();
  30589. return;
  30590. }
  30591. } while (elm = elm.parentNode);
  30592. });
  30593. editor.contentStyles.push('.mce-content-body {-webkit-touch-callout: none}');
  30594. };
  30595. var blockFormSubmitInsideEditor = function () {
  30596. editor.on('init', function () {
  30597. editor.dom.bind(editor.getBody(), 'submit', function (e) {
  30598. e.preventDefault();
  30599. });
  30600. });
  30601. };
  30602. var removeAppleInterchangeBrs = function () {
  30603. parser.addNodeFilter('br', function (nodes) {
  30604. var i = nodes.length;
  30605. while (i--) {
  30606. if (nodes[i].attr('class') === 'Apple-interchange-newline') {
  30607. nodes[i].remove();
  30608. }
  30609. }
  30610. });
  30611. };
  30612. var ieInternalDragAndDrop = function () {
  30613. editor.on('dragstart', function (e) {
  30614. setMceInternalContent(e);
  30615. });
  30616. editor.on('drop', function (e) {
  30617. if (!isDefaultPrevented(e)) {
  30618. var internalContent = getMceInternalContent(e);
  30619. if (internalContent && internalContent.id !== editor.id) {
  30620. e.preventDefault();
  30621. var rng = fromPoint(e.x, e.y, editor.getDoc());
  30622. selection.setRng(rng);
  30623. insertClipboardContents(internalContent.html, true);
  30624. }
  30625. }
  30626. });
  30627. };
  30628. var refreshContentEditable = noop;
  30629. var isHidden = function () {
  30630. if (!isGecko || editor.removed) {
  30631. return false;
  30632. }
  30633. var sel = editor.selection.getSel();
  30634. return !sel || !sel.rangeCount || sel.rangeCount === 0;
  30635. };
  30636. var setupRtc = function () {
  30637. if (isWebKit) {
  30638. documentElementEditingFocus();
  30639. selectControlElements();
  30640. blockFormSubmitInsideEditor();
  30641. selectAll();
  30642. if (Env.iOS) {
  30643. restoreFocusOnKeyDown();
  30644. bodyHeight();
  30645. tapLinksAndImages();
  30646. }
  30647. }
  30648. if (isGecko) {
  30649. focusBody();
  30650. setGeckoEditingOptions();
  30651. showBrokenImageIcon();
  30652. blockCmdArrowNavigation();
  30653. }
  30654. };
  30655. var setup = function () {
  30656. removeBlockQuoteOnBackSpace();
  30657. emptyEditorWhenDeleting();
  30658. if (!Env.windowsPhone) {
  30659. normalizeSelection();
  30660. }
  30661. if (isWebKit) {
  30662. documentElementEditingFocus();
  30663. selectControlElements();
  30664. setDefaultBlockType();
  30665. blockFormSubmitInsideEditor();
  30666. disableBackspaceIntoATable();
  30667. removeAppleInterchangeBrs();
  30668. if (Env.iOS) {
  30669. restoreFocusOnKeyDown();
  30670. bodyHeight();
  30671. tapLinksAndImages();
  30672. } else {
  30673. selectAll();
  30674. }
  30675. }
  30676. if (Env.ie >= 11) {
  30677. bodyHeight();
  30678. disableBackspaceIntoATable();
  30679. }
  30680. if (Env.ie) {
  30681. selectAll();
  30682. disableAutoUrlDetect();
  30683. ieInternalDragAndDrop();
  30684. }
  30685. if (isGecko) {
  30686. removeHrOnBackspace();
  30687. focusBody();
  30688. removeStylesWhenDeletingAcrossBlockElements();
  30689. setGeckoEditingOptions();
  30690. addBrAfterLastLinks();
  30691. showBrokenImageIcon();
  30692. blockCmdArrowNavigation();
  30693. disableBackspaceIntoATable();
  30694. }
  30695. };
  30696. if (isRtc(editor)) {
  30697. setupRtc();
  30698. } else {
  30699. setup();
  30700. }
  30701. return {
  30702. refreshContentEditable: refreshContentEditable,
  30703. isHidden: isHidden
  30704. };
  30705. };
  30706. var DOM$6 = DOMUtils.DOM;
  30707. var appendStyle = function (editor, text) {
  30708. var body = SugarElement.fromDom(editor.getBody());
  30709. var container = getStyleContainer(getRootNode(body));
  30710. var style = SugarElement.fromTag('style');
  30711. set$1(style, 'type', 'text/css');
  30712. append$1(style, SugarElement.fromText(text));
  30713. append$1(container, style);
  30714. editor.on('remove', function () {
  30715. remove$7(style);
  30716. });
  30717. };
  30718. var getRootName = function (editor) {
  30719. return editor.inline ? editor.getElement().nodeName.toLowerCase() : undefined;
  30720. };
  30721. var removeUndefined = function (obj) {
  30722. return filter$3(obj, function (v) {
  30723. return isUndefined(v) === false;
  30724. });
  30725. };
  30726. var mkParserSettings = function (editor) {
  30727. var settings = editor.settings;
  30728. var blobCache = editor.editorUpload.blobCache;
  30729. return removeUndefined({
  30730. allow_conditional_comments: settings.allow_conditional_comments,
  30731. allow_html_data_urls: settings.allow_html_data_urls,
  30732. allow_svg_data_urls: settings.allow_svg_data_urls,
  30733. allow_html_in_named_anchor: settings.allow_html_in_named_anchor,
  30734. allow_script_urls: settings.allow_script_urls,
  30735. allow_unsafe_link_target: settings.allow_unsafe_link_target,
  30736. convert_fonts_to_spans: settings.convert_fonts_to_spans,
  30737. fix_list_elements: settings.fix_list_elements,
  30738. font_size_legacy_values: settings.font_size_legacy_values,
  30739. forced_root_block: settings.forced_root_block,
  30740. forced_root_block_attrs: settings.forced_root_block_attrs,
  30741. padd_empty_with_br: settings.padd_empty_with_br,
  30742. preserve_cdata: settings.preserve_cdata,
  30743. remove_trailing_brs: settings.remove_trailing_brs,
  30744. inline_styles: settings.inline_styles,
  30745. root_name: getRootName(editor),
  30746. validate: true,
  30747. blob_cache: blobCache,
  30748. document: editor.getDoc(),
  30749. images_dataimg_filter: settings.images_dataimg_filter
  30750. });
  30751. };
  30752. var mkSerializerSettings = function (editor) {
  30753. var settings = editor.settings;
  30754. return __assign(__assign({}, mkParserSettings(editor)), removeUndefined({
  30755. url_converter: settings.url_converter,
  30756. url_converter_scope: settings.url_converter_scope,
  30757. element_format: settings.element_format,
  30758. entities: settings.entities,
  30759. entity_encoding: settings.entity_encoding,
  30760. indent: settings.indent,
  30761. indent_after: settings.indent_after,
  30762. indent_before: settings.indent_before,
  30763. block_elements: settings.block_elements,
  30764. boolean_attributes: settings.boolean_attributes,
  30765. custom_elements: settings.custom_elements,
  30766. extended_valid_elements: settings.extended_valid_elements,
  30767. invalid_elements: settings.invalid_elements,
  30768. invalid_styles: settings.invalid_styles,
  30769. move_caret_before_on_enter_elements: settings.move_caret_before_on_enter_elements,
  30770. non_empty_elements: settings.non_empty_elements,
  30771. schema: settings.schema,
  30772. self_closing_elements: settings.self_closing_elements,
  30773. short_ended_elements: settings.short_ended_elements,
  30774. special: settings.special,
  30775. text_block_elements: settings.text_block_elements,
  30776. text_inline_elements: settings.text_inline_elements,
  30777. valid_children: settings.valid_children,
  30778. valid_classes: settings.valid_classes,
  30779. valid_elements: settings.valid_elements,
  30780. valid_styles: settings.valid_styles,
  30781. verify_html: settings.verify_html,
  30782. whitespace_elements: settings.whitespace_elements
  30783. }));
  30784. };
  30785. var createParser = function (editor) {
  30786. var parser = DomParser(mkParserSettings(editor), editor.schema);
  30787. parser.addAttributeFilter('src,href,style,tabindex', function (nodes, name) {
  30788. var i = nodes.length, node, value;
  30789. var dom = editor.dom;
  30790. var internalName = 'data-mce-' + name;
  30791. while (i--) {
  30792. node = nodes[i];
  30793. value = node.attr(name);
  30794. if (value && !node.attr(internalName)) {
  30795. if (value.indexOf('data:') === 0 || value.indexOf('blob:') === 0) {
  30796. continue;
  30797. }
  30798. if (name === 'style') {
  30799. value = dom.serializeStyle(dom.parseStyle(value), node.name);
  30800. if (!value.length) {
  30801. value = null;
  30802. }
  30803. node.attr(internalName, value);
  30804. node.attr(name, value);
  30805. } else if (name === 'tabindex') {
  30806. node.attr(internalName, value);
  30807. node.attr(name, null);
  30808. } else {
  30809. node.attr(internalName, editor.convertURL(value, name, node.name));
  30810. }
  30811. }
  30812. }
  30813. });
  30814. parser.addNodeFilter('script', function (nodes) {
  30815. var i = nodes.length;
  30816. while (i--) {
  30817. var node = nodes[i];
  30818. var type = node.attr('type') || 'no/type';
  30819. if (type.indexOf('mce-') !== 0) {
  30820. node.attr('type', 'mce-' + type);
  30821. }
  30822. }
  30823. });
  30824. if (editor.settings.preserve_cdata) {
  30825. parser.addNodeFilter('#cdata', function (nodes) {
  30826. var i = nodes.length;
  30827. while (i--) {
  30828. var node = nodes[i];
  30829. node.type = 8;
  30830. node.name = '#comment';
  30831. node.value = '[CDATA[' + editor.dom.encode(node.value) + ']]';
  30832. }
  30833. });
  30834. }
  30835. parser.addNodeFilter('p,h1,h2,h3,h4,h5,h6,div', function (nodes) {
  30836. var i = nodes.length;
  30837. var nonEmptyElements = editor.schema.getNonEmptyElements();
  30838. while (i--) {
  30839. var node = nodes[i];
  30840. if (node.isEmpty(nonEmptyElements) && node.getAll('br').length === 0) {
  30841. node.append(new AstNode('br', 1)).shortEnded = true;
  30842. }
  30843. }
  30844. });
  30845. return parser;
  30846. };
  30847. var autoFocus = function (editor) {
  30848. if (editor.settings.auto_focus) {
  30849. Delay.setEditorTimeout(editor, function () {
  30850. var focusEditor;
  30851. if (editor.settings.auto_focus === true) {
  30852. focusEditor = editor;
  30853. } else {
  30854. focusEditor = editor.editorManager.get(editor.settings.auto_focus);
  30855. }
  30856. if (!focusEditor.destroyed) {
  30857. focusEditor.focus();
  30858. }
  30859. }, 100);
  30860. }
  30861. };
  30862. var moveSelectionToFirstCaretPosition = function (editor) {
  30863. var root = editor.dom.getRoot();
  30864. if (!editor.inline && (!hasAnyRanges(editor) || editor.selection.getStart(true) === root)) {
  30865. firstPositionIn(root).each(function (pos) {
  30866. var node = pos.getNode();
  30867. var caretPos = isTable$3(node) ? firstPositionIn(node).getOr(pos) : pos;
  30868. if (Env.browser.isIE()) {
  30869. storeNative(editor, caretPos.toRange());
  30870. } else {
  30871. editor.selection.setRng(caretPos.toRange());
  30872. }
  30873. });
  30874. }
  30875. };
  30876. var initEditor = function (editor) {
  30877. editor.bindPendingEventDelegates();
  30878. editor.initialized = true;
  30879. fireInit(editor);
  30880. editor.focus(true);
  30881. moveSelectionToFirstCaretPosition(editor);
  30882. editor.nodeChanged({ initial: true });
  30883. editor.execCallback('init_instance_callback', editor);
  30884. autoFocus(editor);
  30885. };
  30886. var getStyleSheetLoader$1 = function (editor) {
  30887. return editor.inline ? editor.ui.styleSheetLoader : editor.dom.styleSheetLoader;
  30888. };
  30889. var makeStylesheetLoadingPromises = function (editor, css, framedFonts) {
  30890. var promises = [new promiseObj(function (resolve, reject) {
  30891. return getStyleSheetLoader$1(editor).loadAll(css, resolve, reject);
  30892. })];
  30893. if (editor.inline) {
  30894. return promises;
  30895. } else {
  30896. return promises.concat([new promiseObj(function (resolve, reject) {
  30897. return editor.ui.styleSheetLoader.loadAll(framedFonts, resolve, reject);
  30898. })]);
  30899. }
  30900. };
  30901. var loadContentCss = function (editor) {
  30902. var styleSheetLoader = getStyleSheetLoader$1(editor);
  30903. var fontCss = getFontCss(editor);
  30904. var css = editor.contentCSS;
  30905. var removeCss = function () {
  30906. styleSheetLoader.unloadAll(css);
  30907. if (!editor.inline) {
  30908. editor.ui.styleSheetLoader.unloadAll(fontCss);
  30909. }
  30910. };
  30911. var loaded = function () {
  30912. if (editor.removed) {
  30913. removeCss();
  30914. } else {
  30915. editor.on('remove', removeCss);
  30916. }
  30917. };
  30918. if (editor.contentStyles.length > 0) {
  30919. var contentCssText_1 = '';
  30920. Tools.each(editor.contentStyles, function (style) {
  30921. contentCssText_1 += style + '\r\n';
  30922. });
  30923. editor.dom.addStyle(contentCssText_1);
  30924. }
  30925. var allStylesheets = promiseObj.all(makeStylesheetLoadingPromises(editor, css, fontCss)).then(loaded).catch(loaded);
  30926. if (editor.settings.content_style) {
  30927. appendStyle(editor, editor.settings.content_style);
  30928. }
  30929. return allStylesheets;
  30930. };
  30931. var preInit = function (editor) {
  30932. var settings = editor.settings, doc = editor.getDoc(), body = editor.getBody();
  30933. firePreInit(editor);
  30934. if (!settings.browser_spellcheck && !settings.gecko_spellcheck) {
  30935. doc.body.spellcheck = false;
  30936. DOM$6.setAttrib(body, 'spellcheck', 'false');
  30937. }
  30938. editor.quirks = Quirks(editor);
  30939. firePostRender(editor);
  30940. var directionality = getDirectionality(editor);
  30941. if (directionality !== undefined) {
  30942. body.dir = directionality;
  30943. }
  30944. if (settings.protect) {
  30945. editor.on('BeforeSetContent', function (e) {
  30946. Tools.each(settings.protect, function (pattern) {
  30947. e.content = e.content.replace(pattern, function (str) {
  30948. return '<!--mce:protected ' + escape(str) + '-->';
  30949. });
  30950. });
  30951. });
  30952. }
  30953. editor.on('SetContent', function () {
  30954. editor.addVisual(editor.getBody());
  30955. });
  30956. editor.on('compositionstart compositionend', function (e) {
  30957. editor.composing = e.type === 'compositionstart';
  30958. });
  30959. };
  30960. var loadInitialContent = function (editor) {
  30961. if (!isRtc(editor)) {
  30962. editor.load({
  30963. initial: true,
  30964. format: 'html'
  30965. });
  30966. }
  30967. editor.startContent = editor.getContent({ format: 'raw' });
  30968. };
  30969. var initEditorWithInitialContent = function (editor) {
  30970. if (editor.removed !== true) {
  30971. loadInitialContent(editor);
  30972. initEditor(editor);
  30973. }
  30974. };
  30975. var initContentBody = function (editor, skipWrite) {
  30976. var settings = editor.settings;
  30977. var targetElm = editor.getElement();
  30978. var doc = editor.getDoc();
  30979. if (!settings.inline) {
  30980. editor.getElement().style.visibility = editor.orgVisibility;
  30981. }
  30982. if (!skipWrite && !editor.inline) {
  30983. doc.open();
  30984. doc.write(editor.iframeHTML);
  30985. doc.close();
  30986. }
  30987. if (editor.inline) {
  30988. DOM$6.addClass(targetElm, 'mce-content-body');
  30989. editor.contentDocument = doc = document;
  30990. editor.contentWindow = window;
  30991. editor.bodyElement = targetElm;
  30992. editor.contentAreaContainer = targetElm;
  30993. }
  30994. var body = editor.getBody();
  30995. body.disabled = true;
  30996. editor.readonly = !!settings.readonly;
  30997. if (!editor.readonly) {
  30998. if (editor.inline && DOM$6.getStyle(body, 'position', true) === 'static') {
  30999. body.style.position = 'relative';
  31000. }
  31001. body.contentEditable = editor.getParam('content_editable_state', true);
  31002. }
  31003. body.disabled = false;
  31004. editor.editorUpload = EditorUpload(editor);
  31005. editor.schema = Schema(settings);
  31006. editor.dom = DOMUtils(doc, {
  31007. keep_values: true,
  31008. url_converter: editor.convertURL,
  31009. url_converter_scope: editor,
  31010. hex_colors: settings.force_hex_style_colors,
  31011. update_styles: true,
  31012. root_element: editor.inline ? editor.getBody() : null,
  31013. collect: function () {
  31014. return editor.inline;
  31015. },
  31016. schema: editor.schema,
  31017. contentCssCors: shouldUseContentCssCors(editor),
  31018. referrerPolicy: getReferrerPolicy(editor),
  31019. onSetAttrib: function (e) {
  31020. editor.fire('SetAttrib', e);
  31021. }
  31022. });
  31023. editor.parser = createParser(editor);
  31024. editor.serializer = DomSerializer(mkSerializerSettings(editor), editor);
  31025. editor.selection = EditorSelection(editor.dom, editor.getWin(), editor.serializer, editor);
  31026. editor.annotator = Annotator(editor);
  31027. editor.formatter = Formatter(editor);
  31028. editor.undoManager = UndoManager(editor);
  31029. editor._nodeChangeDispatcher = new NodeChange(editor);
  31030. editor._selectionOverrides = SelectionOverrides(editor);
  31031. setup$e(editor);
  31032. setup$3(editor);
  31033. if (!isRtc(editor)) {
  31034. setup$2(editor);
  31035. }
  31036. var caret = setup$4(editor);
  31037. setup$f(editor, caret);
  31038. setup$d(editor);
  31039. setup$g(editor);
  31040. var setupRtcThunk = setup$i(editor);
  31041. preInit(editor);
  31042. setupRtcThunk.fold(function () {
  31043. loadContentCss(editor).then(function () {
  31044. return initEditorWithInitialContent(editor);
  31045. });
  31046. }, function (setupRtc) {
  31047. editor.setProgressState(true);
  31048. loadContentCss(editor).then(function () {
  31049. setupRtc().then(function (_rtcMode) {
  31050. editor.setProgressState(false);
  31051. initEditorWithInitialContent(editor);
  31052. }, function (err) {
  31053. editor.notificationManager.open({
  31054. type: 'error',
  31055. text: String(err)
  31056. });
  31057. initEditorWithInitialContent(editor);
  31058. });
  31059. });
  31060. });
  31061. };
  31062. var DOM$5 = DOMUtils.DOM;
  31063. var relaxDomain = function (editor, ifr) {
  31064. if (document.domain !== window.location.hostname && Env.browser.isIE()) {
  31065. var bodyUuid = uuid('mce');
  31066. editor[bodyUuid] = function () {
  31067. initContentBody(editor);
  31068. };
  31069. var domainRelaxUrl = 'javascript:(function(){' + 'document.open();document.domain="' + document.domain + '";' + 'var ed = window.parent.tinymce.get("' + editor.id + '");document.write(ed.iframeHTML);' + 'document.close();ed.' + bodyUuid + '(true);})()';
  31070. DOM$5.setAttrib(ifr, 'src', domainRelaxUrl);
  31071. return true;
  31072. }
  31073. return false;
  31074. };
  31075. var createIframeElement = function (id, title, height, customAttrs) {
  31076. var iframe = SugarElement.fromTag('iframe');
  31077. setAll$1(iframe, customAttrs);
  31078. setAll$1(iframe, {
  31079. id: id + '_ifr',
  31080. frameBorder: '0',
  31081. allowTransparency: 'true',
  31082. title: title
  31083. });
  31084. add$1(iframe, 'tox-edit-area__iframe');
  31085. return iframe;
  31086. };
  31087. var getIframeHtml = function (editor) {
  31088. var iframeHTML = getDocType(editor) + '<html><head>';
  31089. if (getDocumentBaseUrl(editor) !== editor.documentBaseUrl) {
  31090. iframeHTML += '<base href="' + editor.documentBaseURI.getURI() + '" />';
  31091. }
  31092. iframeHTML += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
  31093. var bodyId = getBodyId(editor);
  31094. var bodyClass = getBodyClass(editor);
  31095. var translatedAriaText = editor.translate(getIframeAriaText(editor));
  31096. if (getContentSecurityPolicy(editor)) {
  31097. iframeHTML += '<meta http-equiv="Content-Security-Policy" content="' + getContentSecurityPolicy(editor) + '" />';
  31098. }
  31099. iframeHTML += '</head>' + ('<body id="' + bodyId + '" class="mce-content-body ' + bodyClass + '" data-id="' + editor.id + '" aria-label="' + translatedAriaText + '">') + '<br>' + '</body></html>';
  31100. return iframeHTML;
  31101. };
  31102. var createIframe = function (editor, o) {
  31103. var iframeTitle = editor.translate('Rich Text Area');
  31104. var ifr = createIframeElement(editor.id, iframeTitle, o.height, getIframeAttrs(editor)).dom;
  31105. ifr.onload = function () {
  31106. ifr.onload = null;
  31107. editor.fire('load');
  31108. };
  31109. var isDomainRelaxed = relaxDomain(editor, ifr);
  31110. editor.contentAreaContainer = o.iframeContainer;
  31111. editor.iframeElement = ifr;
  31112. editor.iframeHTML = getIframeHtml(editor);
  31113. DOM$5.add(o.iframeContainer, ifr);
  31114. return isDomainRelaxed;
  31115. };
  31116. var init$1 = function (editor, boxInfo) {
  31117. var isDomainRelaxed = createIframe(editor, boxInfo);
  31118. if (boxInfo.editorContainer) {
  31119. DOM$5.get(boxInfo.editorContainer).style.display = editor.orgDisplay;
  31120. editor.hidden = DOM$5.isHidden(boxInfo.editorContainer);
  31121. }
  31122. editor.getElement().style.display = 'none';
  31123. DOM$5.setAttrib(editor.id, 'aria-hidden', 'true');
  31124. if (!isDomainRelaxed) {
  31125. initContentBody(editor);
  31126. }
  31127. };
  31128. var DOM$4 = DOMUtils.DOM;
  31129. var initPlugin = function (editor, initializedPlugins, plugin) {
  31130. var Plugin = PluginManager.get(plugin);
  31131. var pluginUrl = PluginManager.urls[plugin] || editor.documentBaseUrl.replace(/\/$/, '');
  31132. plugin = Tools.trim(plugin);
  31133. if (Plugin && Tools.inArray(initializedPlugins, plugin) === -1) {
  31134. Tools.each(PluginManager.dependencies(plugin), function (dep) {
  31135. initPlugin(editor, initializedPlugins, dep);
  31136. });
  31137. if (editor.plugins[plugin]) {
  31138. return;
  31139. }
  31140. try {
  31141. var pluginInstance = new Plugin(editor, pluginUrl, editor.$);
  31142. editor.plugins[plugin] = pluginInstance;
  31143. if (pluginInstance.init) {
  31144. pluginInstance.init(editor, pluginUrl);
  31145. initializedPlugins.push(plugin);
  31146. }
  31147. } catch (e) {
  31148. pluginInitError(editor, plugin, e);
  31149. }
  31150. }
  31151. };
  31152. var trimLegacyPrefix = function (name) {
  31153. return name.replace(/^\-/, '');
  31154. };
  31155. var initPlugins = function (editor) {
  31156. var initializedPlugins = [];
  31157. Tools.each(getPlugins(editor).split(/[ ,]/), function (name) {
  31158. initPlugin(editor, initializedPlugins, trimLegacyPrefix(name));
  31159. });
  31160. };
  31161. var initIcons = function (editor) {
  31162. var iconPackName = Tools.trim(getIconPackName(editor));
  31163. var currentIcons = editor.ui.registry.getAll().icons;
  31164. var loadIcons = __assign(__assign({}, IconManager.get('default').icons), IconManager.get(iconPackName).icons);
  31165. each$j(loadIcons, function (svgData, icon) {
  31166. if (!has$2(currentIcons, icon)) {
  31167. editor.ui.registry.addIcon(icon, svgData);
  31168. }
  31169. });
  31170. };
  31171. var initTheme = function (editor) {
  31172. var theme = getTheme(editor);
  31173. if (isString$1(theme)) {
  31174. editor.settings.theme = trimLegacyPrefix(theme);
  31175. var Theme = ThemeManager.get(theme);
  31176. editor.theme = new Theme(editor, ThemeManager.urls[theme]);
  31177. if (editor.theme.init) {
  31178. editor.theme.init(editor, ThemeManager.urls[theme] || editor.documentBaseUrl.replace(/\/$/, ''), editor.$);
  31179. }
  31180. } else {
  31181. editor.theme = {};
  31182. }
  31183. };
  31184. var renderFromLoadedTheme = function (editor) {
  31185. return editor.theme.renderUI();
  31186. };
  31187. var renderFromThemeFunc = function (editor) {
  31188. var elm = editor.getElement();
  31189. var theme = getTheme(editor);
  31190. var info = theme(editor, elm);
  31191. if (info.editorContainer.nodeType) {
  31192. info.editorContainer.id = info.editorContainer.id || editor.id + '_parent';
  31193. }
  31194. if (info.iframeContainer && info.iframeContainer.nodeType) {
  31195. info.iframeContainer.id = info.iframeContainer.id || editor.id + '_iframecontainer';
  31196. }
  31197. info.height = info.iframeHeight ? info.iframeHeight : elm.offsetHeight;
  31198. return info;
  31199. };
  31200. var createThemeFalseResult = function (element) {
  31201. return {
  31202. editorContainer: element,
  31203. iframeContainer: element,
  31204. api: {}
  31205. };
  31206. };
  31207. var renderThemeFalseIframe = function (targetElement) {
  31208. var iframeContainer = DOM$4.create('div');
  31209. DOM$4.insertAfter(iframeContainer, targetElement);
  31210. return createThemeFalseResult(iframeContainer);
  31211. };
  31212. var renderThemeFalse = function (editor) {
  31213. var targetElement = editor.getElement();
  31214. return editor.inline ? createThemeFalseResult(null) : renderThemeFalseIframe(targetElement);
  31215. };
  31216. var renderThemeUi = function (editor) {
  31217. var elm = editor.getElement();
  31218. editor.orgDisplay = elm.style.display;
  31219. if (isString$1(getTheme(editor))) {
  31220. return renderFromLoadedTheme(editor);
  31221. } else if (isFunction(getTheme(editor))) {
  31222. return renderFromThemeFunc(editor);
  31223. } else {
  31224. return renderThemeFalse(editor);
  31225. }
  31226. };
  31227. var augmentEditorUiApi = function (editor, api) {
  31228. var uiApiFacade = {
  31229. show: Optional.from(api.show).getOr(noop),
  31230. hide: Optional.from(api.hide).getOr(noop),
  31231. disable: Optional.from(api.disable).getOr(noop),
  31232. isDisabled: Optional.from(api.isDisabled).getOr(never),
  31233. enable: function () {
  31234. if (!editor.mode.isReadOnly()) {
  31235. Optional.from(api.enable).map(call);
  31236. }
  31237. }
  31238. };
  31239. editor.ui = __assign(__assign({}, editor.ui), uiApiFacade);
  31240. };
  31241. var init = function (editor) {
  31242. editor.fire('ScriptsLoaded');
  31243. initIcons(editor);
  31244. initTheme(editor);
  31245. initPlugins(editor);
  31246. var renderInfo = renderThemeUi(editor);
  31247. augmentEditorUiApi(editor, Optional.from(renderInfo.api).getOr({}));
  31248. var boxInfo = {
  31249. editorContainer: renderInfo.editorContainer,
  31250. iframeContainer: renderInfo.iframeContainer
  31251. };
  31252. editor.editorContainer = boxInfo.editorContainer ? boxInfo.editorContainer : null;
  31253. appendContentCssFromSettings(editor);
  31254. if (editor.inline) {
  31255. return initContentBody(editor);
  31256. } else {
  31257. return init$1(editor, boxInfo);
  31258. }
  31259. };
  31260. var DOM$3 = DOMUtils.DOM;
  31261. var hasSkipLoadPrefix = function (name) {
  31262. return name.charAt(0) === '-';
  31263. };
  31264. var loadLanguage = function (scriptLoader, editor) {
  31265. var languageCode = getLanguageCode(editor);
  31266. var languageUrl = getLanguageUrl(editor);
  31267. if (I18n.hasCode(languageCode) === false && languageCode !== 'en') {
  31268. var url_1 = languageUrl !== '' ? languageUrl : editor.editorManager.baseURL + '/langs/' + languageCode + '.js';
  31269. scriptLoader.add(url_1, noop, undefined, function () {
  31270. languageLoadError(editor, url_1, languageCode);
  31271. });
  31272. }
  31273. };
  31274. var loadTheme = function (scriptLoader, editor, suffix, callback) {
  31275. var theme = getTheme(editor);
  31276. if (isString$1(theme)) {
  31277. if (!hasSkipLoadPrefix(theme) && !has$2(ThemeManager.urls, theme)) {
  31278. var themeUrl = getThemeUrl(editor);
  31279. if (themeUrl) {
  31280. ThemeManager.load(theme, editor.documentBaseURI.toAbsolute(themeUrl));
  31281. } else {
  31282. ThemeManager.load(theme, 'themes/' + theme + '/theme' + suffix + '.js');
  31283. }
  31284. }
  31285. scriptLoader.loadQueue(function () {
  31286. ThemeManager.waitFor(theme, callback);
  31287. });
  31288. } else {
  31289. callback();
  31290. }
  31291. };
  31292. var getIconsUrlMetaFromUrl = function (editor) {
  31293. return Optional.from(getIconsUrl(editor)).filter(function (url) {
  31294. return url.length > 0;
  31295. }).map(function (url) {
  31296. return {
  31297. url: url,
  31298. name: Optional.none()
  31299. };
  31300. });
  31301. };
  31302. var getIconsUrlMetaFromName = function (editor, name, suffix) {
  31303. return Optional.from(name).filter(function (name) {
  31304. return name.length > 0 && !IconManager.has(name);
  31305. }).map(function (name) {
  31306. return {
  31307. url: editor.editorManager.baseURL + '/icons/' + name + '/icons' + suffix + '.js',
  31308. name: Optional.some(name)
  31309. };
  31310. });
  31311. };
  31312. var loadIcons = function (scriptLoader, editor, suffix) {
  31313. var defaultIconsUrl = getIconsUrlMetaFromName(editor, 'default', suffix);
  31314. var customIconsUrl = getIconsUrlMetaFromUrl(editor).orThunk(function () {
  31315. return getIconsUrlMetaFromName(editor, getIconPackName(editor), '');
  31316. });
  31317. each$k(cat([
  31318. defaultIconsUrl,
  31319. customIconsUrl
  31320. ]), function (urlMeta) {
  31321. scriptLoader.add(urlMeta.url, noop, undefined, function () {
  31322. iconsLoadError(editor, urlMeta.url, urlMeta.name.getOrUndefined());
  31323. });
  31324. });
  31325. };
  31326. var loadPlugins = function (editor, suffix) {
  31327. Tools.each(getExternalPlugins$1(editor), function (url, name) {
  31328. PluginManager.load(name, url, noop, undefined, function () {
  31329. pluginLoadError(editor, url, name);
  31330. });
  31331. editor.settings.plugins += ' ' + name;
  31332. });
  31333. Tools.each(getPlugins(editor).split(/[ ,]/), function (plugin) {
  31334. plugin = Tools.trim(plugin);
  31335. if (plugin && !PluginManager.urls[plugin]) {
  31336. if (hasSkipLoadPrefix(plugin)) {
  31337. plugin = plugin.substr(1, plugin.length);
  31338. var dependencies = PluginManager.dependencies(plugin);
  31339. Tools.each(dependencies, function (depPlugin) {
  31340. var defaultSettings = {
  31341. prefix: 'plugins/',
  31342. resource: depPlugin,
  31343. suffix: '/plugin' + suffix + '.js'
  31344. };
  31345. var dep = PluginManager.createUrl(defaultSettings, depPlugin);
  31346. PluginManager.load(dep.resource, dep, noop, undefined, function () {
  31347. pluginLoadError(editor, dep.prefix + dep.resource + dep.suffix, dep.resource);
  31348. });
  31349. });
  31350. } else {
  31351. var url_2 = {
  31352. prefix: 'plugins/',
  31353. resource: plugin,
  31354. suffix: '/plugin' + suffix + '.js'
  31355. };
  31356. PluginManager.load(plugin, url_2, noop, undefined, function () {
  31357. pluginLoadError(editor, url_2.prefix + url_2.resource + url_2.suffix, plugin);
  31358. });
  31359. }
  31360. }
  31361. });
  31362. };
  31363. var loadScripts = function (editor, suffix) {
  31364. var scriptLoader = ScriptLoader.ScriptLoader;
  31365. loadTheme(scriptLoader, editor, suffix, function () {
  31366. loadLanguage(scriptLoader, editor);
  31367. loadIcons(scriptLoader, editor, suffix);
  31368. loadPlugins(editor, suffix);
  31369. scriptLoader.loadQueue(function () {
  31370. if (!editor.removed) {
  31371. init(editor);
  31372. }
  31373. }, editor, function () {
  31374. if (!editor.removed) {
  31375. init(editor);
  31376. }
  31377. });
  31378. });
  31379. };
  31380. var getStyleSheetLoader = function (element, editor) {
  31381. return instance.forElement(element, {
  31382. contentCssCors: hasContentCssCors(editor),
  31383. referrerPolicy: getReferrerPolicy(editor)
  31384. });
  31385. };
  31386. var render = function (editor) {
  31387. var id = editor.id;
  31388. I18n.setCode(getLanguageCode(editor));
  31389. var readyHandler = function () {
  31390. DOM$3.unbind(window, 'ready', readyHandler);
  31391. editor.render();
  31392. };
  31393. if (!EventUtils.Event.domLoaded) {
  31394. DOM$3.bind(window, 'ready', readyHandler);
  31395. return;
  31396. }
  31397. if (!editor.getElement()) {
  31398. return;
  31399. }
  31400. if (!Env.contentEditable) {
  31401. return;
  31402. }
  31403. var element = SugarElement.fromDom(editor.getElement());
  31404. var snapshot = clone$3(element);
  31405. editor.on('remove', function () {
  31406. eachr(element.dom.attributes, function (attr) {
  31407. return remove$6(element, attr.name);
  31408. });
  31409. setAll$1(element, snapshot);
  31410. });
  31411. editor.ui.styleSheetLoader = getStyleSheetLoader(element, editor);
  31412. if (!isInline(editor)) {
  31413. editor.orgVisibility = editor.getElement().style.visibility;
  31414. editor.getElement().style.visibility = 'hidden';
  31415. } else {
  31416. editor.inline = true;
  31417. }
  31418. var form = editor.getElement().form || DOM$3.getParent(id, 'form');
  31419. if (form) {
  31420. editor.formElement = form;
  31421. if (hasHiddenInput(editor) && !isTextareaOrInput(editor.getElement())) {
  31422. DOM$3.insertAfter(DOM$3.create('input', {
  31423. type: 'hidden',
  31424. name: id
  31425. }), id);
  31426. editor.hasHiddenInput = true;
  31427. }
  31428. editor.formEventDelegate = function (e) {
  31429. editor.fire(e.type, e);
  31430. };
  31431. DOM$3.bind(form, 'submit reset', editor.formEventDelegate);
  31432. editor.on('reset', function () {
  31433. editor.resetContent();
  31434. });
  31435. if (shouldPatchSubmit(editor) && !form.submit.nodeType && !form.submit.length && !form._mceOldSubmit) {
  31436. form._mceOldSubmit = form.submit;
  31437. form.submit = function () {
  31438. editor.editorManager.triggerSave();
  31439. editor.setDirty(false);
  31440. return form._mceOldSubmit(form);
  31441. };
  31442. }
  31443. }
  31444. editor.windowManager = WindowManager(editor);
  31445. editor.notificationManager = NotificationManager(editor);
  31446. if (isEncodingXml(editor)) {
  31447. editor.on('GetContent', function (e) {
  31448. if (e.save) {
  31449. e.content = DOM$3.encode(e.content);
  31450. }
  31451. });
  31452. }
  31453. if (shouldAddFormSubmitTrigger(editor)) {
  31454. editor.on('submit', function () {
  31455. if (editor.initialized) {
  31456. editor.save();
  31457. }
  31458. });
  31459. }
  31460. if (shouldAddUnloadTrigger(editor)) {
  31461. editor._beforeUnload = function () {
  31462. if (editor.initialized && !editor.destroyed && !editor.isHidden()) {
  31463. editor.save({
  31464. format: 'raw',
  31465. no_events: true,
  31466. set_dirty: false
  31467. });
  31468. }
  31469. };
  31470. editor.editorManager.on('BeforeUnload', editor._beforeUnload);
  31471. }
  31472. editor.editorManager.add(editor);
  31473. loadScripts(editor, editor.suffix);
  31474. };
  31475. var addVisual = function (editor, elm) {
  31476. return addVisual$1(editor, elm);
  31477. };
  31478. var legacyPropNames = {
  31479. 'font-size': 'size',
  31480. 'font-family': 'face'
  31481. };
  31482. var getSpecifiedFontProp = function (propName, rootElm, elm) {
  31483. var getProperty = function (elm) {
  31484. return getRaw(elm, propName).orThunk(function () {
  31485. if (name(elm) === 'font') {
  31486. return get$9(legacyPropNames, propName).bind(function (legacyPropName) {
  31487. return getOpt(elm, legacyPropName);
  31488. });
  31489. } else {
  31490. return Optional.none();
  31491. }
  31492. });
  31493. };
  31494. var isRoot = function (elm) {
  31495. return eq(SugarElement.fromDom(rootElm), elm);
  31496. };
  31497. return closest$1(SugarElement.fromDom(elm), function (elm) {
  31498. return getProperty(elm);
  31499. }, isRoot);
  31500. };
  31501. var normalizeFontFamily = function (fontFamily) {
  31502. return fontFamily.replace(/[\'\"\\]/g, '').replace(/,\s+/g, ',');
  31503. };
  31504. var getComputedFontProp = function (propName, elm) {
  31505. return Optional.from(DOMUtils.DOM.getStyle(elm, propName, true));
  31506. };
  31507. var getFontProp = function (propName) {
  31508. return function (rootElm, elm) {
  31509. return Optional.from(elm).map(SugarElement.fromDom).filter(isElement$6).bind(function (element) {
  31510. return getSpecifiedFontProp(propName, rootElm, element.dom).or(getComputedFontProp(propName, element.dom));
  31511. }).getOr('');
  31512. };
  31513. };
  31514. var getFontSize = getFontProp('font-size');
  31515. var getFontFamily = compose(normalizeFontFamily, getFontProp('font-family'));
  31516. var findFirstCaretElement = function (editor) {
  31517. return firstPositionIn(editor.getBody()).map(function (caret) {
  31518. var container = caret.container();
  31519. return isText$7(container) ? container.parentNode : container;
  31520. });
  31521. };
  31522. var getCaretElement = function (editor) {
  31523. return Optional.from(editor.selection.getRng()).bind(function (rng) {
  31524. var root = editor.getBody();
  31525. var atStartOfNode = rng.startContainer === root && rng.startOffset === 0;
  31526. return atStartOfNode ? Optional.none() : Optional.from(editor.selection.getStart(true));
  31527. });
  31528. };
  31529. var bindRange = function (editor, binder) {
  31530. return getCaretElement(editor).orThunk(curry(findFirstCaretElement, editor)).map(SugarElement.fromDom).filter(isElement$6).bind(binder);
  31531. };
  31532. var mapRange = function (editor, mapper) {
  31533. return bindRange(editor, compose1(Optional.some, mapper));
  31534. };
  31535. var fromFontSizeNumber = function (editor, value) {
  31536. if (/^[0-9.]+$/.test(value)) {
  31537. var fontSizeNumber = parseInt(value, 10);
  31538. if (fontSizeNumber >= 1 && fontSizeNumber <= 7) {
  31539. var fontSizes = getFontStyleValues(editor);
  31540. var fontClasses = getFontSizeClasses(editor);
  31541. if (fontClasses) {
  31542. return fontClasses[fontSizeNumber - 1] || value;
  31543. } else {
  31544. return fontSizes[fontSizeNumber - 1] || value;
  31545. }
  31546. } else {
  31547. return value;
  31548. }
  31549. } else {
  31550. return value;
  31551. }
  31552. };
  31553. var normalizeFontNames = function (font) {
  31554. var fonts = font.split(/\s*,\s*/);
  31555. return map$3(fonts, function (font) {
  31556. if (font.indexOf(' ') !== -1 && !(startsWith(font, '"') || startsWith(font, '\''))) {
  31557. return '\'' + font + '\'';
  31558. } else {
  31559. return font;
  31560. }
  31561. }).join(',');
  31562. };
  31563. var fontNameAction = function (editor, value) {
  31564. var font = fromFontSizeNumber(editor, value);
  31565. editor.formatter.toggle('fontname', { value: normalizeFontNames(font) });
  31566. editor.nodeChanged();
  31567. };
  31568. var fontNameQuery = function (editor) {
  31569. return mapRange(editor, function (elm) {
  31570. return getFontFamily(editor.getBody(), elm.dom);
  31571. }).getOr('');
  31572. };
  31573. var fontSizeAction = function (editor, value) {
  31574. editor.formatter.toggle('fontsize', { value: fromFontSizeNumber(editor, value) });
  31575. editor.nodeChanged();
  31576. };
  31577. var fontSizeQuery = function (editor) {
  31578. return mapRange(editor, function (elm) {
  31579. return getFontSize(editor.getBody(), elm.dom);
  31580. }).getOr('');
  31581. };
  31582. var lineHeightQuery = function (editor) {
  31583. return mapRange(editor, function (elm) {
  31584. var root = SugarElement.fromDom(editor.getBody());
  31585. var specifiedStyle = closest$1(elm, function (elm) {
  31586. return getRaw(elm, 'line-height');
  31587. }, curry(eq, root));
  31588. var computedStyle = function () {
  31589. var lineHeight = parseFloat(get$5(elm, 'line-height'));
  31590. var fontSize = parseFloat(get$5(elm, 'font-size'));
  31591. return String(lineHeight / fontSize);
  31592. };
  31593. return specifiedStyle.getOrThunk(computedStyle);
  31594. }).getOr('');
  31595. };
  31596. var lineHeightAction = function (editor, lineHeight) {
  31597. editor.formatter.toggle('lineheight', { value: String(lineHeight) });
  31598. editor.nodeChanged();
  31599. };
  31600. var processValue = function (value) {
  31601. if (typeof value !== 'string') {
  31602. var details = Tools.extend({
  31603. paste: value.paste,
  31604. data: { paste: value.paste }
  31605. }, value);
  31606. return {
  31607. content: value.content,
  31608. details: details
  31609. };
  31610. }
  31611. return {
  31612. content: value,
  31613. details: {}
  31614. };
  31615. };
  31616. var insertAtCaret = function (editor, value) {
  31617. var result = processValue(value);
  31618. insertContent(editor, result.content, result.details);
  31619. };
  31620. var each$4 = Tools.each;
  31621. var map = Tools.map, inArray = Tools.inArray;
  31622. var EditorCommands = function () {
  31623. function EditorCommands(editor) {
  31624. this.commands = {
  31625. state: {},
  31626. exec: {},
  31627. value: {}
  31628. };
  31629. this.editor = editor;
  31630. this.setupCommands(editor);
  31631. }
  31632. EditorCommands.prototype.execCommand = function (command, ui, value, args) {
  31633. var func, state = false;
  31634. var self = this;
  31635. if (self.editor.removed) {
  31636. return;
  31637. }
  31638. if (command.toLowerCase() !== 'mcefocus') {
  31639. if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(command) && (!args || !args.skip_focus)) {
  31640. self.editor.focus();
  31641. } else {
  31642. restore(self.editor);
  31643. }
  31644. }
  31645. args = self.editor.fire('BeforeExecCommand', {
  31646. command: command,
  31647. ui: ui,
  31648. value: value
  31649. });
  31650. if (args.isDefaultPrevented()) {
  31651. return false;
  31652. }
  31653. var customCommand = command.toLowerCase();
  31654. if (func = self.commands.exec[customCommand]) {
  31655. func(customCommand, ui, value);
  31656. self.editor.fire('ExecCommand', {
  31657. command: command,
  31658. ui: ui,
  31659. value: value
  31660. });
  31661. return true;
  31662. }
  31663. each$4(this.editor.plugins, function (p) {
  31664. if (p.execCommand && p.execCommand(command, ui, value)) {
  31665. self.editor.fire('ExecCommand', {
  31666. command: command,
  31667. ui: ui,
  31668. value: value
  31669. });
  31670. state = true;
  31671. return false;
  31672. }
  31673. });
  31674. if (state) {
  31675. return state;
  31676. }
  31677. if (self.editor.theme && self.editor.theme.execCommand && self.editor.theme.execCommand(command, ui, value)) {
  31678. self.editor.fire('ExecCommand', {
  31679. command: command,
  31680. ui: ui,
  31681. value: value
  31682. });
  31683. return true;
  31684. }
  31685. try {
  31686. state = self.editor.getDoc().execCommand(command, ui, value);
  31687. } catch (ex) {
  31688. }
  31689. if (state) {
  31690. self.editor.fire('ExecCommand', {
  31691. command: command,
  31692. ui: ui,
  31693. value: value
  31694. });
  31695. return true;
  31696. }
  31697. return false;
  31698. };
  31699. EditorCommands.prototype.queryCommandState = function (command) {
  31700. var func;
  31701. if (this.editor.quirks.isHidden() || this.editor.removed) {
  31702. return;
  31703. }
  31704. command = command.toLowerCase();
  31705. if (func = this.commands.state[command]) {
  31706. return func(command);
  31707. }
  31708. try {
  31709. return this.editor.getDoc().queryCommandState(command);
  31710. } catch (ex) {
  31711. }
  31712. return false;
  31713. };
  31714. EditorCommands.prototype.queryCommandValue = function (command) {
  31715. var func;
  31716. if (this.editor.quirks.isHidden() || this.editor.removed) {
  31717. return;
  31718. }
  31719. command = command.toLowerCase();
  31720. if (func = this.commands.value[command]) {
  31721. return func(command);
  31722. }
  31723. try {
  31724. return this.editor.getDoc().queryCommandValue(command);
  31725. } catch (ex) {
  31726. }
  31727. };
  31728. EditorCommands.prototype.addCommands = function (commandList, type) {
  31729. if (type === void 0) {
  31730. type = 'exec';
  31731. }
  31732. var self = this;
  31733. each$4(commandList, function (callback, command) {
  31734. each$4(command.toLowerCase().split(','), function (command) {
  31735. self.commands[type][command] = callback;
  31736. });
  31737. });
  31738. };
  31739. EditorCommands.prototype.addCommand = function (command, callback, scope) {
  31740. var _this = this;
  31741. command = command.toLowerCase();
  31742. this.commands.exec[command] = function (command, ui, value, args) {
  31743. return callback.call(scope || _this.editor, ui, value, args);
  31744. };
  31745. };
  31746. EditorCommands.prototype.queryCommandSupported = function (command) {
  31747. command = command.toLowerCase();
  31748. if (this.commands.exec[command]) {
  31749. return true;
  31750. }
  31751. try {
  31752. return this.editor.getDoc().queryCommandSupported(command);
  31753. } catch (ex) {
  31754. }
  31755. return false;
  31756. };
  31757. EditorCommands.prototype.addQueryStateHandler = function (command, callback, scope) {
  31758. var _this = this;
  31759. command = command.toLowerCase();
  31760. this.commands.state[command] = function () {
  31761. return callback.call(scope || _this.editor);
  31762. };
  31763. };
  31764. EditorCommands.prototype.addQueryValueHandler = function (command, callback, scope) {
  31765. var _this = this;
  31766. command = command.toLowerCase();
  31767. this.commands.value[command] = function () {
  31768. return callback.call(scope || _this.editor);
  31769. };
  31770. };
  31771. EditorCommands.prototype.hasCustomCommand = function (command) {
  31772. command = command.toLowerCase();
  31773. return !!this.commands.exec[command];
  31774. };
  31775. EditorCommands.prototype.execNativeCommand = function (command, ui, value) {
  31776. if (ui === undefined) {
  31777. ui = false;
  31778. }
  31779. if (value === undefined) {
  31780. value = null;
  31781. }
  31782. return this.editor.getDoc().execCommand(command, ui, value);
  31783. };
  31784. EditorCommands.prototype.isFormatMatch = function (name) {
  31785. return this.editor.formatter.match(name);
  31786. };
  31787. EditorCommands.prototype.toggleFormat = function (name, value) {
  31788. this.editor.formatter.toggle(name, value);
  31789. this.editor.nodeChanged();
  31790. };
  31791. EditorCommands.prototype.storeSelection = function (type) {
  31792. this.selectionBookmark = this.editor.selection.getBookmark(type);
  31793. };
  31794. EditorCommands.prototype.restoreSelection = function () {
  31795. this.editor.selection.moveToBookmark(this.selectionBookmark);
  31796. };
  31797. EditorCommands.prototype.setupCommands = function (editor) {
  31798. var self = this;
  31799. this.addCommands({
  31800. 'mceResetDesignMode,mceBeginUndoLevel': noop,
  31801. 'mceEndUndoLevel,mceAddUndoLevel': function () {
  31802. editor.undoManager.add();
  31803. },
  31804. 'mceFocus': function (_command, _ui, value) {
  31805. focus(editor, value);
  31806. },
  31807. 'Cut,Copy,Paste': function (command) {
  31808. var doc = editor.getDoc();
  31809. var failed;
  31810. try {
  31811. self.execNativeCommand(command);
  31812. } catch (ex) {
  31813. failed = true;
  31814. }
  31815. if (command === 'paste' && !doc.queryCommandEnabled(command)) {
  31816. failed = true;
  31817. }
  31818. if (failed || !doc.queryCommandSupported(command)) {
  31819. var msg = editor.translate('Your browser doesn\'t support direct access to the clipboard. ' + 'Please use the Ctrl+X/C/V keyboard shortcuts instead.');
  31820. if (Env.mac) {
  31821. msg = msg.replace(/Ctrl\+/g, '\u2318+');
  31822. }
  31823. editor.notificationManager.open({
  31824. text: msg,
  31825. type: 'error'
  31826. });
  31827. }
  31828. },
  31829. 'unlink': function () {
  31830. if (editor.selection.isCollapsed()) {
  31831. var elm = editor.dom.getParent(editor.selection.getStart(), 'a');
  31832. if (elm) {
  31833. editor.dom.remove(elm, true);
  31834. }
  31835. return;
  31836. }
  31837. editor.formatter.remove('link');
  31838. },
  31839. 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone': function (command) {
  31840. var align = command.substring(7);
  31841. if (align === 'full') {
  31842. align = 'justify';
  31843. }
  31844. each$4('left,center,right,justify'.split(','), function (name) {
  31845. if (align !== name) {
  31846. editor.formatter.remove('align' + name);
  31847. }
  31848. });
  31849. if (align !== 'none') {
  31850. self.toggleFormat('align' + align);
  31851. }
  31852. },
  31853. 'InsertUnorderedList,InsertOrderedList': function (command) {
  31854. var listParent;
  31855. self.execNativeCommand(command);
  31856. var listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
  31857. if (listElm) {
  31858. listParent = listElm.parentNode;
  31859. if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) {
  31860. self.storeSelection();
  31861. editor.dom.split(listParent, listElm);
  31862. self.restoreSelection();
  31863. }
  31864. }
  31865. },
  31866. 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function (command) {
  31867. self.toggleFormat(command);
  31868. },
  31869. 'ForeColor,HiliteColor': function (command, ui, value) {
  31870. self.toggleFormat(command, { value: value });
  31871. },
  31872. 'FontName': function (command, ui, value) {
  31873. fontNameAction(editor, value);
  31874. },
  31875. 'FontSize': function (command, ui, value) {
  31876. fontSizeAction(editor, value);
  31877. },
  31878. 'LineHeight': function (command, ui, value) {
  31879. lineHeightAction(editor, value);
  31880. },
  31881. 'Lang': function (command, ui, lang) {
  31882. self.toggleFormat(command, {
  31883. value: lang.code,
  31884. customValue: lang.customCode
  31885. });
  31886. },
  31887. 'RemoveFormat': function (command) {
  31888. editor.formatter.remove(command);
  31889. },
  31890. 'mceBlockQuote': function () {
  31891. self.toggleFormat('blockquote');
  31892. },
  31893. 'FormatBlock': function (command, ui, value) {
  31894. return self.toggleFormat(value || 'p');
  31895. },
  31896. 'mceCleanup': function () {
  31897. var bookmark = editor.selection.getBookmark();
  31898. editor.setContent(editor.getContent());
  31899. editor.selection.moveToBookmark(bookmark);
  31900. },
  31901. 'mceRemoveNode': function (command, ui, value) {
  31902. var node = value || editor.selection.getNode();
  31903. if (node !== editor.getBody()) {
  31904. self.storeSelection();
  31905. editor.dom.remove(node, true);
  31906. self.restoreSelection();
  31907. }
  31908. },
  31909. 'mceSelectNodeDepth': function (command, ui, value) {
  31910. var counter = 0;
  31911. editor.dom.getParent(editor.selection.getNode(), function (node) {
  31912. if (node.nodeType === 1 && counter++ === value) {
  31913. editor.selection.select(node);
  31914. return false;
  31915. }
  31916. }, editor.getBody());
  31917. },
  31918. 'mceSelectNode': function (command, ui, value) {
  31919. editor.selection.select(value);
  31920. },
  31921. 'mceInsertContent': function (command, ui, value) {
  31922. insertAtCaret(editor, value);
  31923. },
  31924. 'mceInsertRawHTML': function (command, ui, value) {
  31925. editor.selection.setContent('tiny_mce_marker');
  31926. var content = editor.getContent();
  31927. editor.setContent(content.replace(/tiny_mce_marker/g, function () {
  31928. return value;
  31929. }));
  31930. },
  31931. 'mceInsertNewLine': function (command, ui, value) {
  31932. insert(editor, value);
  31933. },
  31934. 'mceToggleFormat': function (command, ui, value) {
  31935. self.toggleFormat(value);
  31936. },
  31937. 'mceSetContent': function (command, ui, value) {
  31938. editor.setContent(value);
  31939. },
  31940. 'Indent,Outdent': function (command) {
  31941. handle(editor, command);
  31942. },
  31943. 'mceRepaint': noop,
  31944. 'InsertHorizontalRule': function () {
  31945. editor.execCommand('mceInsertContent', false, '<hr />');
  31946. },
  31947. 'mceToggleVisualAid': function () {
  31948. editor.hasVisual = !editor.hasVisual;
  31949. editor.addVisual();
  31950. },
  31951. 'mceReplaceContent': function (command, ui, value) {
  31952. editor.execCommand('mceInsertContent', false, value.replace(/\{\$selection\}/g, editor.selection.getContent({ format: 'text' })));
  31953. },
  31954. 'mceInsertLink': function (command, ui, value) {
  31955. if (typeof value === 'string') {
  31956. value = { href: value };
  31957. }
  31958. var anchor = editor.dom.getParent(editor.selection.getNode(), 'a');
  31959. value.href = value.href.replace(/ /g, '%20');
  31960. if (!anchor || !value.href) {
  31961. editor.formatter.remove('link');
  31962. }
  31963. if (value.href) {
  31964. editor.formatter.apply('link', value, anchor);
  31965. }
  31966. },
  31967. 'selectAll': function () {
  31968. var editingHost = editor.dom.getParent(editor.selection.getStart(), isContentEditableTrue$4);
  31969. if (editingHost) {
  31970. var rng = editor.dom.createRng();
  31971. rng.selectNodeContents(editingHost);
  31972. editor.selection.setRng(rng);
  31973. }
  31974. },
  31975. 'mceNewDocument': function () {
  31976. editor.setContent('');
  31977. },
  31978. 'InsertLineBreak': function (command, ui, value) {
  31979. insert$1(editor, value);
  31980. return true;
  31981. }
  31982. });
  31983. var alignStates = function (name) {
  31984. return function () {
  31985. var selection = editor.selection;
  31986. var nodes = selection.isCollapsed() ? [editor.dom.getParent(selection.getNode(), editor.dom.isBlock)] : selection.getSelectedBlocks();
  31987. var matches = map(nodes, function (node) {
  31988. return !!editor.formatter.matchNode(node, name);
  31989. });
  31990. return inArray(matches, true) !== -1;
  31991. };
  31992. };
  31993. self.addCommands({
  31994. 'JustifyLeft': alignStates('alignleft'),
  31995. 'JustifyCenter': alignStates('aligncenter'),
  31996. 'JustifyRight': alignStates('alignright'),
  31997. 'JustifyFull': alignStates('alignjustify'),
  31998. 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function (command) {
  31999. return self.isFormatMatch(command);
  32000. },
  32001. 'mceBlockQuote': function () {
  32002. return self.isFormatMatch('blockquote');
  32003. },
  32004. 'Outdent': function () {
  32005. return canOutdent(editor);
  32006. },
  32007. 'InsertUnorderedList,InsertOrderedList': function (command) {
  32008. var list = editor.dom.getParent(editor.selection.getNode(), 'ul,ol');
  32009. return list && (command === 'insertunorderedlist' && list.tagName === 'UL' || command === 'insertorderedlist' && list.tagName === 'OL');
  32010. }
  32011. }, 'state');
  32012. self.addCommands({
  32013. Undo: function () {
  32014. editor.undoManager.undo();
  32015. },
  32016. Redo: function () {
  32017. editor.undoManager.redo();
  32018. }
  32019. });
  32020. self.addQueryValueHandler('FontName', function () {
  32021. return fontNameQuery(editor);
  32022. }, this);
  32023. self.addQueryValueHandler('FontSize', function () {
  32024. return fontSizeQuery(editor);
  32025. }, this);
  32026. self.addQueryValueHandler('LineHeight', function () {
  32027. return lineHeightQuery(editor);
  32028. }, this);
  32029. };
  32030. return EditorCommands;
  32031. }();
  32032. var internalContentEditableAttr = 'data-mce-contenteditable';
  32033. var toggleClass = function (elm, cls, state) {
  32034. if (has(elm, cls) && state === false) {
  32035. remove$3(elm, cls);
  32036. } else if (state) {
  32037. add$1(elm, cls);
  32038. }
  32039. };
  32040. var setEditorCommandState = function (editor, cmd, state) {
  32041. try {
  32042. editor.getDoc().execCommand(cmd, false, String(state));
  32043. } catch (ex) {
  32044. }
  32045. };
  32046. var setContentEditable = function (elm, state) {
  32047. elm.dom.contentEditable = state ? 'true' : 'false';
  32048. };
  32049. var switchOffContentEditableTrue = function (elm) {
  32050. each$k(descendants(elm, '*[contenteditable="true"]'), function (elm) {
  32051. set$1(elm, internalContentEditableAttr, 'true');
  32052. setContentEditable(elm, false);
  32053. });
  32054. };
  32055. var switchOnContentEditableTrue = function (elm) {
  32056. each$k(descendants(elm, '*[' + internalContentEditableAttr + '="true"]'), function (elm) {
  32057. remove$6(elm, internalContentEditableAttr);
  32058. setContentEditable(elm, true);
  32059. });
  32060. };
  32061. var removeFakeSelection = function (editor) {
  32062. Optional.from(editor.selection.getNode()).each(function (elm) {
  32063. elm.removeAttribute('data-mce-selected');
  32064. });
  32065. };
  32066. var restoreFakeSelection = function (editor) {
  32067. editor.selection.setRng(editor.selection.getRng());
  32068. };
  32069. var toggleReadOnly = function (editor, state) {
  32070. var body = SugarElement.fromDom(editor.getBody());
  32071. toggleClass(body, 'mce-content-readonly', state);
  32072. if (state) {
  32073. editor.selection.controlSelection.hideResizeRect();
  32074. editor._selectionOverrides.hideFakeCaret();
  32075. removeFakeSelection(editor);
  32076. editor.readonly = true;
  32077. setContentEditable(body, false);
  32078. switchOffContentEditableTrue(body);
  32079. } else {
  32080. editor.readonly = false;
  32081. setContentEditable(body, true);
  32082. switchOnContentEditableTrue(body);
  32083. setEditorCommandState(editor, 'StyleWithCSS', false);
  32084. setEditorCommandState(editor, 'enableInlineTableEditing', false);
  32085. setEditorCommandState(editor, 'enableObjectResizing', false);
  32086. if (hasEditorOrUiFocus(editor)) {
  32087. editor.focus();
  32088. }
  32089. restoreFakeSelection(editor);
  32090. editor.nodeChanged();
  32091. }
  32092. };
  32093. var isReadOnly = function (editor) {
  32094. return editor.readonly;
  32095. };
  32096. var registerFilters = function (editor) {
  32097. editor.parser.addAttributeFilter('contenteditable', function (nodes) {
  32098. if (isReadOnly(editor)) {
  32099. each$k(nodes, function (node) {
  32100. node.attr(internalContentEditableAttr, node.attr('contenteditable'));
  32101. node.attr('contenteditable', 'false');
  32102. });
  32103. }
  32104. });
  32105. editor.serializer.addAttributeFilter(internalContentEditableAttr, function (nodes) {
  32106. if (isReadOnly(editor)) {
  32107. each$k(nodes, function (node) {
  32108. node.attr('contenteditable', node.attr(internalContentEditableAttr));
  32109. });
  32110. }
  32111. });
  32112. editor.serializer.addTempAttr(internalContentEditableAttr);
  32113. };
  32114. var registerReadOnlyContentFilters = function (editor) {
  32115. if (editor.serializer) {
  32116. registerFilters(editor);
  32117. } else {
  32118. editor.on('PreInit', function () {
  32119. registerFilters(editor);
  32120. });
  32121. }
  32122. };
  32123. var isClickEvent = function (e) {
  32124. return e.type === 'click';
  32125. };
  32126. var getAnchorHrefOpt = function (editor, elm) {
  32127. var isRoot = function (elm) {
  32128. return eq(elm, SugarElement.fromDom(editor.getBody()));
  32129. };
  32130. return closest$2(elm, 'a', isRoot).bind(function (a) {
  32131. return getOpt(a, 'href');
  32132. });
  32133. };
  32134. var processReadonlyEvents = function (editor, e) {
  32135. if (isClickEvent(e) && !VK.metaKeyPressed(e)) {
  32136. var elm = SugarElement.fromDom(e.target);
  32137. getAnchorHrefOpt(editor, elm).each(function (href) {
  32138. e.preventDefault();
  32139. if (/^#/.test(href)) {
  32140. var targetEl = editor.dom.select(href + ',[name="' + removeLeading(href, '#') + '"]');
  32141. if (targetEl.length) {
  32142. editor.selection.scrollIntoView(targetEl[0], true);
  32143. }
  32144. } else {
  32145. window.open(href, '_blank', 'rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes');
  32146. }
  32147. });
  32148. }
  32149. };
  32150. var registerReadOnlySelectionBlockers = function (editor) {
  32151. editor.on('ShowCaret', function (e) {
  32152. if (isReadOnly(editor)) {
  32153. e.preventDefault();
  32154. }
  32155. });
  32156. editor.on('ObjectSelected', function (e) {
  32157. if (isReadOnly(editor)) {
  32158. e.preventDefault();
  32159. }
  32160. });
  32161. };
  32162. var nativeEvents = Tools.makeMap('focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange ' + 'mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover ' + 'draggesture dragdrop drop drag submit ' + 'compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel', ' ');
  32163. var EventDispatcher = function () {
  32164. function EventDispatcher(settings) {
  32165. this.bindings = {};
  32166. this.settings = settings || {};
  32167. this.scope = this.settings.scope || this;
  32168. this.toggleEvent = this.settings.toggleEvent || never;
  32169. }
  32170. EventDispatcher.isNative = function (name) {
  32171. return !!nativeEvents[name.toLowerCase()];
  32172. };
  32173. EventDispatcher.prototype.fire = function (name, args) {
  32174. var lcName = name.toLowerCase();
  32175. var event = normalize$3(lcName, args || {}, this.scope);
  32176. if (this.settings.beforeFire) {
  32177. this.settings.beforeFire(event);
  32178. }
  32179. var handlers = this.bindings[lcName];
  32180. if (handlers) {
  32181. for (var i = 0, l = handlers.length; i < l; i++) {
  32182. var callback = handlers[i];
  32183. if (callback.removed) {
  32184. continue;
  32185. }
  32186. if (callback.once) {
  32187. this.off(lcName, callback.func);
  32188. }
  32189. if (event.isImmediatePropagationStopped()) {
  32190. return event;
  32191. }
  32192. if (callback.func.call(this.scope, event) === false) {
  32193. event.preventDefault();
  32194. return event;
  32195. }
  32196. }
  32197. }
  32198. return event;
  32199. };
  32200. EventDispatcher.prototype.on = function (name, callback, prepend, extra) {
  32201. if (callback === false) {
  32202. callback = never;
  32203. }
  32204. if (callback) {
  32205. var wrappedCallback = {
  32206. func: callback,
  32207. removed: false
  32208. };
  32209. if (extra) {
  32210. Tools.extend(wrappedCallback, extra);
  32211. }
  32212. var names = name.toLowerCase().split(' ');
  32213. var i = names.length;
  32214. while (i--) {
  32215. var currentName = names[i];
  32216. var handlers = this.bindings[currentName];
  32217. if (!handlers) {
  32218. handlers = [];
  32219. this.toggleEvent(currentName, true);
  32220. }
  32221. if (prepend) {
  32222. handlers = __spreadArray([wrappedCallback], handlers, true);
  32223. } else {
  32224. handlers = __spreadArray(__spreadArray([], handlers, true), [wrappedCallback], false);
  32225. }
  32226. this.bindings[currentName] = handlers;
  32227. }
  32228. }
  32229. return this;
  32230. };
  32231. EventDispatcher.prototype.off = function (name, callback) {
  32232. var _this = this;
  32233. if (name) {
  32234. var names = name.toLowerCase().split(' ');
  32235. var i = names.length;
  32236. while (i--) {
  32237. var currentName = names[i];
  32238. var handlers = this.bindings[currentName];
  32239. if (!currentName) {
  32240. each$j(this.bindings, function (_value, bindingName) {
  32241. _this.toggleEvent(bindingName, false);
  32242. delete _this.bindings[bindingName];
  32243. });
  32244. return this;
  32245. }
  32246. if (handlers) {
  32247. if (!callback) {
  32248. handlers.length = 0;
  32249. } else {
  32250. var filteredHandlers = partition(handlers, function (handler) {
  32251. return handler.func === callback;
  32252. });
  32253. handlers = filteredHandlers.fail;
  32254. this.bindings[currentName] = handlers;
  32255. each$k(filteredHandlers.pass, function (handler) {
  32256. handler.removed = true;
  32257. });
  32258. }
  32259. if (!handlers.length) {
  32260. this.toggleEvent(name, false);
  32261. delete this.bindings[currentName];
  32262. }
  32263. }
  32264. }
  32265. } else {
  32266. each$j(this.bindings, function (_value, name) {
  32267. _this.toggleEvent(name, false);
  32268. });
  32269. this.bindings = {};
  32270. }
  32271. return this;
  32272. };
  32273. EventDispatcher.prototype.once = function (name, callback, prepend) {
  32274. return this.on(name, callback, prepend, { once: true });
  32275. };
  32276. EventDispatcher.prototype.has = function (name) {
  32277. name = name.toLowerCase();
  32278. return !(!this.bindings[name] || this.bindings[name].length === 0);
  32279. };
  32280. return EventDispatcher;
  32281. }();
  32282. var getEventDispatcher = function (obj) {
  32283. if (!obj._eventDispatcher) {
  32284. obj._eventDispatcher = new EventDispatcher({
  32285. scope: obj,
  32286. toggleEvent: function (name, state) {
  32287. if (EventDispatcher.isNative(name) && obj.toggleNativeEvent) {
  32288. obj.toggleNativeEvent(name, state);
  32289. }
  32290. }
  32291. });
  32292. }
  32293. return obj._eventDispatcher;
  32294. };
  32295. var Observable = {
  32296. fire: function (name, args, bubble) {
  32297. var self = this;
  32298. if (self.removed && name !== 'remove' && name !== 'detach') {
  32299. return args;
  32300. }
  32301. var dispatcherArgs = getEventDispatcher(self).fire(name, args);
  32302. if (bubble !== false && self.parent) {
  32303. var parent_1 = self.parent();
  32304. while (parent_1 && !dispatcherArgs.isPropagationStopped()) {
  32305. parent_1.fire(name, dispatcherArgs, false);
  32306. parent_1 = parent_1.parent();
  32307. }
  32308. }
  32309. return dispatcherArgs;
  32310. },
  32311. on: function (name, callback, prepend) {
  32312. return getEventDispatcher(this).on(name, callback, prepend);
  32313. },
  32314. off: function (name, callback) {
  32315. return getEventDispatcher(this).off(name, callback);
  32316. },
  32317. once: function (name, callback) {
  32318. return getEventDispatcher(this).once(name, callback);
  32319. },
  32320. hasEventListeners: function (name) {
  32321. return getEventDispatcher(this).has(name);
  32322. }
  32323. };
  32324. var DOM$2 = DOMUtils.DOM;
  32325. var customEventRootDelegates;
  32326. var getEventTarget = function (editor, eventName) {
  32327. if (eventName === 'selectionchange') {
  32328. return editor.getDoc();
  32329. }
  32330. if (!editor.inline && /^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(eventName)) {
  32331. return editor.getDoc().documentElement;
  32332. }
  32333. var eventRoot = getEventRoot(editor);
  32334. if (eventRoot) {
  32335. if (!editor.eventRoot) {
  32336. editor.eventRoot = DOM$2.select(eventRoot)[0];
  32337. }
  32338. return editor.eventRoot;
  32339. }
  32340. return editor.getBody();
  32341. };
  32342. var isListening = function (editor) {
  32343. return !editor.hidden && !isReadOnly(editor);
  32344. };
  32345. var fireEvent = function (editor, eventName, e) {
  32346. if (isListening(editor)) {
  32347. editor.fire(eventName, e);
  32348. } else if (isReadOnly(editor)) {
  32349. processReadonlyEvents(editor, e);
  32350. }
  32351. };
  32352. var bindEventDelegate = function (editor, eventName) {
  32353. var delegate;
  32354. if (!editor.delegates) {
  32355. editor.delegates = {};
  32356. }
  32357. if (editor.delegates[eventName] || editor.removed) {
  32358. return;
  32359. }
  32360. var eventRootElm = getEventTarget(editor, eventName);
  32361. if (getEventRoot(editor)) {
  32362. if (!customEventRootDelegates) {
  32363. customEventRootDelegates = {};
  32364. editor.editorManager.on('removeEditor', function () {
  32365. if (!editor.editorManager.activeEditor) {
  32366. if (customEventRootDelegates) {
  32367. each$j(customEventRootDelegates, function (_value, name) {
  32368. editor.dom.unbind(getEventTarget(editor, name));
  32369. });
  32370. customEventRootDelegates = null;
  32371. }
  32372. }
  32373. });
  32374. }
  32375. if (customEventRootDelegates[eventName]) {
  32376. return;
  32377. }
  32378. delegate = function (e) {
  32379. var target = e.target;
  32380. var editors = editor.editorManager.get();
  32381. var i = editors.length;
  32382. while (i--) {
  32383. var body = editors[i].getBody();
  32384. if (body === target || DOM$2.isChildOf(target, body)) {
  32385. fireEvent(editors[i], eventName, e);
  32386. }
  32387. }
  32388. };
  32389. customEventRootDelegates[eventName] = delegate;
  32390. DOM$2.bind(eventRootElm, eventName, delegate);
  32391. } else {
  32392. delegate = function (e) {
  32393. fireEvent(editor, eventName, e);
  32394. };
  32395. DOM$2.bind(eventRootElm, eventName, delegate);
  32396. editor.delegates[eventName] = delegate;
  32397. }
  32398. };
  32399. var EditorObservable = __assign(__assign({}, Observable), {
  32400. bindPendingEventDelegates: function () {
  32401. var self = this;
  32402. Tools.each(self._pendingNativeEvents, function (name) {
  32403. bindEventDelegate(self, name);
  32404. });
  32405. },
  32406. toggleNativeEvent: function (name, state) {
  32407. var self = this;
  32408. if (name === 'focus' || name === 'blur') {
  32409. return;
  32410. }
  32411. if (self.removed) {
  32412. return;
  32413. }
  32414. if (state) {
  32415. if (self.initialized) {
  32416. bindEventDelegate(self, name);
  32417. } else {
  32418. if (!self._pendingNativeEvents) {
  32419. self._pendingNativeEvents = [name];
  32420. } else {
  32421. self._pendingNativeEvents.push(name);
  32422. }
  32423. }
  32424. } else if (self.initialized) {
  32425. self.dom.unbind(getEventTarget(self, name), name, self.delegates[name]);
  32426. delete self.delegates[name];
  32427. }
  32428. },
  32429. unbindAllNativeEvents: function () {
  32430. var self = this;
  32431. var body = self.getBody();
  32432. var dom = self.dom;
  32433. if (self.delegates) {
  32434. each$j(self.delegates, function (value, name) {
  32435. self.dom.unbind(getEventTarget(self, name), name, value);
  32436. });
  32437. delete self.delegates;
  32438. }
  32439. if (!self.inline && body && dom) {
  32440. body.onload = null;
  32441. dom.unbind(self.getWin());
  32442. dom.unbind(self.getDoc());
  32443. }
  32444. if (dom) {
  32445. dom.unbind(body);
  32446. dom.unbind(self.getContainer());
  32447. }
  32448. }
  32449. });
  32450. var defaultModes = [
  32451. 'design',
  32452. 'readonly'
  32453. ];
  32454. var switchToMode = function (editor, activeMode, availableModes, mode) {
  32455. var oldMode = availableModes[activeMode.get()];
  32456. var newMode = availableModes[mode];
  32457. try {
  32458. newMode.activate();
  32459. } catch (e) {
  32460. console.error('problem while activating editor mode ' + mode + ':', e);
  32461. return;
  32462. }
  32463. oldMode.deactivate();
  32464. if (oldMode.editorReadOnly !== newMode.editorReadOnly) {
  32465. toggleReadOnly(editor, newMode.editorReadOnly);
  32466. }
  32467. activeMode.set(mode);
  32468. fireSwitchMode(editor, mode);
  32469. };
  32470. var setMode = function (editor, availableModes, activeMode, mode) {
  32471. if (mode === activeMode.get()) {
  32472. return;
  32473. } else if (!has$2(availableModes, mode)) {
  32474. throw new Error('Editor mode \'' + mode + '\' is invalid');
  32475. }
  32476. if (editor.initialized) {
  32477. switchToMode(editor, activeMode, availableModes, mode);
  32478. } else {
  32479. editor.on('init', function () {
  32480. return switchToMode(editor, activeMode, availableModes, mode);
  32481. });
  32482. }
  32483. };
  32484. var registerMode = function (availableModes, mode, api) {
  32485. var _a;
  32486. if (contains$3(defaultModes, mode)) {
  32487. throw new Error('Cannot override default mode ' + mode);
  32488. }
  32489. return __assign(__assign({}, availableModes), (_a = {}, _a[mode] = __assign(__assign({}, api), {
  32490. deactivate: function () {
  32491. try {
  32492. api.deactivate();
  32493. } catch (e) {
  32494. console.error('problem while deactivating editor mode ' + mode + ':', e);
  32495. }
  32496. }
  32497. }), _a));
  32498. };
  32499. var create$4 = function (editor) {
  32500. var activeMode = Cell('design');
  32501. var availableModes = Cell({
  32502. design: {
  32503. activate: noop,
  32504. deactivate: noop,
  32505. editorReadOnly: false
  32506. },
  32507. readonly: {
  32508. activate: noop,
  32509. deactivate: noop,
  32510. editorReadOnly: true
  32511. }
  32512. });
  32513. registerReadOnlyContentFilters(editor);
  32514. registerReadOnlySelectionBlockers(editor);
  32515. return {
  32516. isReadOnly: function () {
  32517. return isReadOnly(editor);
  32518. },
  32519. set: function (mode) {
  32520. return setMode(editor, availableModes.get(), activeMode, mode);
  32521. },
  32522. get: function () {
  32523. return activeMode.get();
  32524. },
  32525. register: function (mode, api) {
  32526. availableModes.set(registerMode(availableModes.get(), mode, api));
  32527. }
  32528. };
  32529. };
  32530. var each$3 = Tools.each, explode$1 = Tools.explode;
  32531. var keyCodeLookup = {
  32532. f1: 112,
  32533. f2: 113,
  32534. f3: 114,
  32535. f4: 115,
  32536. f5: 116,
  32537. f6: 117,
  32538. f7: 118,
  32539. f8: 119,
  32540. f9: 120,
  32541. f10: 121,
  32542. f11: 122,
  32543. f12: 123
  32544. };
  32545. var modifierNames = Tools.makeMap('alt,ctrl,shift,meta,access');
  32546. var parseShortcut = function (pattern) {
  32547. var key;
  32548. var shortcut = {};
  32549. each$3(explode$1(pattern.toLowerCase(), '+'), function (value) {
  32550. if (value in modifierNames) {
  32551. shortcut[value] = true;
  32552. } else {
  32553. if (/^[0-9]{2,}$/.test(value)) {
  32554. shortcut.keyCode = parseInt(value, 10);
  32555. } else {
  32556. shortcut.charCode = value.charCodeAt(0);
  32557. shortcut.keyCode = keyCodeLookup[value] || value.toUpperCase().charCodeAt(0);
  32558. }
  32559. }
  32560. });
  32561. var id = [shortcut.keyCode];
  32562. for (key in modifierNames) {
  32563. if (shortcut[key]) {
  32564. id.push(key);
  32565. } else {
  32566. shortcut[key] = false;
  32567. }
  32568. }
  32569. shortcut.id = id.join(',');
  32570. if (shortcut.access) {
  32571. shortcut.alt = true;
  32572. if (Env.mac) {
  32573. shortcut.ctrl = true;
  32574. } else {
  32575. shortcut.shift = true;
  32576. }
  32577. }
  32578. if (shortcut.meta) {
  32579. if (Env.mac) {
  32580. shortcut.meta = true;
  32581. } else {
  32582. shortcut.ctrl = true;
  32583. shortcut.meta = false;
  32584. }
  32585. }
  32586. return shortcut;
  32587. };
  32588. var Shortcuts = function () {
  32589. function Shortcuts(editor) {
  32590. this.shortcuts = {};
  32591. this.pendingPatterns = [];
  32592. this.editor = editor;
  32593. var self = this;
  32594. editor.on('keyup keypress keydown', function (e) {
  32595. if ((self.hasModifier(e) || self.isFunctionKey(e)) && !e.isDefaultPrevented()) {
  32596. each$3(self.shortcuts, function (shortcut) {
  32597. if (self.matchShortcut(e, shortcut)) {
  32598. self.pendingPatterns = shortcut.subpatterns.slice(0);
  32599. if (e.type === 'keydown') {
  32600. self.executeShortcutAction(shortcut);
  32601. }
  32602. return true;
  32603. }
  32604. });
  32605. if (self.matchShortcut(e, self.pendingPatterns[0])) {
  32606. if (self.pendingPatterns.length === 1) {
  32607. if (e.type === 'keydown') {
  32608. self.executeShortcutAction(self.pendingPatterns[0]);
  32609. }
  32610. }
  32611. self.pendingPatterns.shift();
  32612. }
  32613. }
  32614. });
  32615. }
  32616. Shortcuts.prototype.add = function (pattern, desc, cmdFunc, scope) {
  32617. var self = this;
  32618. var func = self.normalizeCommandFunc(cmdFunc);
  32619. each$3(explode$1(Tools.trim(pattern)), function (pattern) {
  32620. var shortcut = self.createShortcut(pattern, desc, func, scope);
  32621. self.shortcuts[shortcut.id] = shortcut;
  32622. });
  32623. return true;
  32624. };
  32625. Shortcuts.prototype.remove = function (pattern) {
  32626. var shortcut = this.createShortcut(pattern);
  32627. if (this.shortcuts[shortcut.id]) {
  32628. delete this.shortcuts[shortcut.id];
  32629. return true;
  32630. }
  32631. return false;
  32632. };
  32633. Shortcuts.prototype.normalizeCommandFunc = function (cmdFunc) {
  32634. var self = this;
  32635. var cmd = cmdFunc;
  32636. if (typeof cmd === 'string') {
  32637. return function () {
  32638. self.editor.execCommand(cmd, false, null);
  32639. };
  32640. } else if (Tools.isArray(cmd)) {
  32641. return function () {
  32642. self.editor.execCommand(cmd[0], cmd[1], cmd[2]);
  32643. };
  32644. } else {
  32645. return cmd;
  32646. }
  32647. };
  32648. Shortcuts.prototype.createShortcut = function (pattern, desc, cmdFunc, scope) {
  32649. var shortcuts = Tools.map(explode$1(pattern, '>'), parseShortcut);
  32650. shortcuts[shortcuts.length - 1] = Tools.extend(shortcuts[shortcuts.length - 1], {
  32651. func: cmdFunc,
  32652. scope: scope || this.editor
  32653. });
  32654. return Tools.extend(shortcuts[0], {
  32655. desc: this.editor.translate(desc),
  32656. subpatterns: shortcuts.slice(1)
  32657. });
  32658. };
  32659. Shortcuts.prototype.hasModifier = function (e) {
  32660. return e.altKey || e.ctrlKey || e.metaKey;
  32661. };
  32662. Shortcuts.prototype.isFunctionKey = function (e) {
  32663. return e.type === 'keydown' && e.keyCode >= 112 && e.keyCode <= 123;
  32664. };
  32665. Shortcuts.prototype.matchShortcut = function (e, shortcut) {
  32666. if (!shortcut) {
  32667. return false;
  32668. }
  32669. if (shortcut.ctrl !== e.ctrlKey || shortcut.meta !== e.metaKey) {
  32670. return false;
  32671. }
  32672. if (shortcut.alt !== e.altKey || shortcut.shift !== e.shiftKey) {
  32673. return false;
  32674. }
  32675. if (e.keyCode === shortcut.keyCode || e.charCode && e.charCode === shortcut.charCode) {
  32676. e.preventDefault();
  32677. return true;
  32678. }
  32679. return false;
  32680. };
  32681. Shortcuts.prototype.executeShortcutAction = function (shortcut) {
  32682. return shortcut.func ? shortcut.func.call(shortcut.scope) : null;
  32683. };
  32684. return Shortcuts;
  32685. }();
  32686. var create$3 = function () {
  32687. var buttons = {};
  32688. var menuItems = {};
  32689. var popups = {};
  32690. var icons = {};
  32691. var contextMenus = {};
  32692. var contextToolbars = {};
  32693. var sidebars = {};
  32694. var add = function (collection, type) {
  32695. return function (name, spec) {
  32696. return collection[name.toLowerCase()] = __assign(__assign({}, spec), { type: type });
  32697. };
  32698. };
  32699. var addIcon = function (name, svgData) {
  32700. return icons[name.toLowerCase()] = svgData;
  32701. };
  32702. return {
  32703. addButton: add(buttons, 'button'),
  32704. addGroupToolbarButton: add(buttons, 'grouptoolbarbutton'),
  32705. addToggleButton: add(buttons, 'togglebutton'),
  32706. addMenuButton: add(buttons, 'menubutton'),
  32707. addSplitButton: add(buttons, 'splitbutton'),
  32708. addMenuItem: add(menuItems, 'menuitem'),
  32709. addNestedMenuItem: add(menuItems, 'nestedmenuitem'),
  32710. addToggleMenuItem: add(menuItems, 'togglemenuitem'),
  32711. addAutocompleter: add(popups, 'autocompleter'),
  32712. addContextMenu: add(contextMenus, 'contextmenu'),
  32713. addContextToolbar: add(contextToolbars, 'contexttoolbar'),
  32714. addContextForm: add(contextToolbars, 'contextform'),
  32715. addSidebar: add(sidebars, 'sidebar'),
  32716. addIcon: addIcon,
  32717. getAll: function () {
  32718. return {
  32719. buttons: buttons,
  32720. menuItems: menuItems,
  32721. icons: icons,
  32722. popups: popups,
  32723. contextMenus: contextMenus,
  32724. contextToolbars: contextToolbars,
  32725. sidebars: sidebars
  32726. };
  32727. }
  32728. };
  32729. };
  32730. var registry = function () {
  32731. var bridge = create$3();
  32732. return {
  32733. addAutocompleter: bridge.addAutocompleter,
  32734. addButton: bridge.addButton,
  32735. addContextForm: bridge.addContextForm,
  32736. addContextMenu: bridge.addContextMenu,
  32737. addContextToolbar: bridge.addContextToolbar,
  32738. addIcon: bridge.addIcon,
  32739. addMenuButton: bridge.addMenuButton,
  32740. addMenuItem: bridge.addMenuItem,
  32741. addNestedMenuItem: bridge.addNestedMenuItem,
  32742. addSidebar: bridge.addSidebar,
  32743. addSplitButton: bridge.addSplitButton,
  32744. addToggleButton: bridge.addToggleButton,
  32745. addGroupToolbarButton: bridge.addGroupToolbarButton,
  32746. addToggleMenuItem: bridge.addToggleMenuItem,
  32747. getAll: bridge.getAll
  32748. };
  32749. };
  32750. var DOM$1 = DOMUtils.DOM;
  32751. var extend$3 = Tools.extend, each$2 = Tools.each;
  32752. var resolve = Tools.resolve;
  32753. var ie = Env.ie;
  32754. var Editor = function () {
  32755. function Editor(id, settings, editorManager) {
  32756. var _this = this;
  32757. this.plugins = {};
  32758. this.contentCSS = [];
  32759. this.contentStyles = [];
  32760. this.loadedCSS = {};
  32761. this.isNotDirty = false;
  32762. this.editorManager = editorManager;
  32763. this.documentBaseUrl = editorManager.documentBaseURL;
  32764. extend$3(this, EditorObservable);
  32765. this.settings = getEditorSettings(this, id, this.documentBaseUrl, editorManager.defaultSettings, settings);
  32766. if (this.settings.suffix) {
  32767. editorManager.suffix = this.settings.suffix;
  32768. }
  32769. this.suffix = editorManager.suffix;
  32770. if (this.settings.base_url) {
  32771. editorManager._setBaseUrl(this.settings.base_url);
  32772. }
  32773. this.baseUri = editorManager.baseURI;
  32774. if (this.settings.referrer_policy) {
  32775. ScriptLoader.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy);
  32776. DOMUtils.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy);
  32777. }
  32778. AddOnManager.languageLoad = this.settings.language_load;
  32779. AddOnManager.baseURL = editorManager.baseURL;
  32780. this.id = id;
  32781. this.setDirty(false);
  32782. this.documentBaseURI = new URI(this.settings.document_base_url, { base_uri: this.baseUri });
  32783. this.baseURI = this.baseUri;
  32784. this.inline = !!this.settings.inline;
  32785. this.shortcuts = new Shortcuts(this);
  32786. this.editorCommands = new EditorCommands(this);
  32787. if (this.settings.cache_suffix) {
  32788. Env.cacheSuffix = this.settings.cache_suffix.replace(/^[\?\&]+/, '');
  32789. }
  32790. this.ui = {
  32791. registry: registry(),
  32792. styleSheetLoader: undefined,
  32793. show: noop,
  32794. hide: noop,
  32795. enable: noop,
  32796. disable: noop,
  32797. isDisabled: never
  32798. };
  32799. var self = this;
  32800. var modeInstance = create$4(self);
  32801. this.mode = modeInstance;
  32802. this.setMode = modeInstance.set;
  32803. editorManager.fire('SetupEditor', { editor: this });
  32804. this.execCallback('setup', this);
  32805. this.$ = DomQuery.overrideDefaults(function () {
  32806. return {
  32807. context: _this.inline ? _this.getBody() : _this.getDoc(),
  32808. element: _this.getBody()
  32809. };
  32810. });
  32811. }
  32812. Editor.prototype.render = function () {
  32813. render(this);
  32814. };
  32815. Editor.prototype.focus = function (skipFocus) {
  32816. this.execCommand('mceFocus', false, skipFocus);
  32817. };
  32818. Editor.prototype.hasFocus = function () {
  32819. return hasFocus(this);
  32820. };
  32821. Editor.prototype.execCallback = function (name) {
  32822. var x = [];
  32823. for (var _i = 1; _i < arguments.length; _i++) {
  32824. x[_i - 1] = arguments[_i];
  32825. }
  32826. var self = this;
  32827. var callback = self.settings[name], scope;
  32828. if (!callback) {
  32829. return;
  32830. }
  32831. if (self.callbackLookup && (scope = self.callbackLookup[name])) {
  32832. callback = scope.func;
  32833. scope = scope.scope;
  32834. }
  32835. if (typeof callback === 'string') {
  32836. scope = callback.replace(/\.\w+$/, '');
  32837. scope = scope ? resolve(scope) : 0;
  32838. callback = resolve(callback);
  32839. self.callbackLookup = self.callbackLookup || {};
  32840. self.callbackLookup[name] = {
  32841. func: callback,
  32842. scope: scope
  32843. };
  32844. }
  32845. return callback.apply(scope || self, x);
  32846. };
  32847. Editor.prototype.translate = function (text) {
  32848. return I18n.translate(text);
  32849. };
  32850. Editor.prototype.getParam = function (name, defaultVal, type) {
  32851. return getParam(this, name, defaultVal, type);
  32852. };
  32853. Editor.prototype.hasPlugin = function (name, loaded) {
  32854. var hasPlugin = contains$3(getPlugins(this).split(/[ ,]/), name);
  32855. if (hasPlugin) {
  32856. return loaded ? PluginManager.get(name) !== undefined : true;
  32857. } else {
  32858. return false;
  32859. }
  32860. };
  32861. Editor.prototype.nodeChanged = function (args) {
  32862. this._nodeChangeDispatcher.nodeChanged(args);
  32863. };
  32864. Editor.prototype.addCommand = function (name, callback, scope) {
  32865. this.editorCommands.addCommand(name, callback, scope);
  32866. };
  32867. Editor.prototype.addQueryStateHandler = function (name, callback, scope) {
  32868. this.editorCommands.addQueryStateHandler(name, callback, scope);
  32869. };
  32870. Editor.prototype.addQueryValueHandler = function (name, callback, scope) {
  32871. this.editorCommands.addQueryValueHandler(name, callback, scope);
  32872. };
  32873. Editor.prototype.addShortcut = function (pattern, desc, cmdFunc, scope) {
  32874. this.shortcuts.add(pattern, desc, cmdFunc, scope);
  32875. };
  32876. Editor.prototype.execCommand = function (cmd, ui, value, args) {
  32877. return this.editorCommands.execCommand(cmd, ui, value, args);
  32878. };
  32879. Editor.prototype.queryCommandState = function (cmd) {
  32880. return this.editorCommands.queryCommandState(cmd);
  32881. };
  32882. Editor.prototype.queryCommandValue = function (cmd) {
  32883. return this.editorCommands.queryCommandValue(cmd);
  32884. };
  32885. Editor.prototype.queryCommandSupported = function (cmd) {
  32886. return this.editorCommands.queryCommandSupported(cmd);
  32887. };
  32888. Editor.prototype.show = function () {
  32889. var self = this;
  32890. if (self.hidden) {
  32891. self.hidden = false;
  32892. if (self.inline) {
  32893. self.getBody().contentEditable = 'true';
  32894. } else {
  32895. DOM$1.show(self.getContainer());
  32896. DOM$1.hide(self.id);
  32897. }
  32898. self.load();
  32899. self.fire('show');
  32900. }
  32901. };
  32902. Editor.prototype.hide = function () {
  32903. var self = this, doc = self.getDoc();
  32904. if (!self.hidden) {
  32905. if (ie && doc && !self.inline) {
  32906. doc.execCommand('SelectAll');
  32907. }
  32908. self.save();
  32909. if (self.inline) {
  32910. self.getBody().contentEditable = 'false';
  32911. if (self === self.editorManager.focusedEditor) {
  32912. self.editorManager.focusedEditor = null;
  32913. }
  32914. } else {
  32915. DOM$1.hide(self.getContainer());
  32916. DOM$1.setStyle(self.id, 'display', self.orgDisplay);
  32917. }
  32918. self.hidden = true;
  32919. self.fire('hide');
  32920. }
  32921. };
  32922. Editor.prototype.isHidden = function () {
  32923. return !!this.hidden;
  32924. };
  32925. Editor.prototype.setProgressState = function (state, time) {
  32926. this.fire('ProgressState', {
  32927. state: state,
  32928. time: time
  32929. });
  32930. };
  32931. Editor.prototype.load = function (args) {
  32932. var self = this;
  32933. var elm = self.getElement(), html;
  32934. if (self.removed) {
  32935. return '';
  32936. }
  32937. if (elm) {
  32938. args = args || {};
  32939. args.load = true;
  32940. var value = isTextareaOrInput(elm) ? elm.value : elm.innerHTML;
  32941. html = self.setContent(value, args);
  32942. args.element = elm;
  32943. if (!args.no_events) {
  32944. self.fire('LoadContent', args);
  32945. }
  32946. args.element = elm = null;
  32947. return html;
  32948. }
  32949. };
  32950. Editor.prototype.save = function (args) {
  32951. var self = this;
  32952. var elm = self.getElement(), html, form;
  32953. if (!elm || !self.initialized || self.removed) {
  32954. return;
  32955. }
  32956. args = args || {};
  32957. args.save = true;
  32958. args.element = elm;
  32959. html = args.content = self.getContent(args);
  32960. if (!args.no_events) {
  32961. self.fire('SaveContent', args);
  32962. }
  32963. if (args.format === 'raw') {
  32964. self.fire('RawSaveContent', args);
  32965. }
  32966. html = args.content;
  32967. if (!isTextareaOrInput(elm)) {
  32968. if (args.is_removing || !self.inline) {
  32969. elm.innerHTML = html;
  32970. }
  32971. if (form = DOM$1.getParent(self.id, 'form')) {
  32972. each$2(form.elements, function (elm) {
  32973. if (elm.name === self.id) {
  32974. elm.value = html;
  32975. return false;
  32976. }
  32977. });
  32978. }
  32979. } else {
  32980. elm.value = html;
  32981. }
  32982. args.element = elm = null;
  32983. if (args.set_dirty !== false) {
  32984. self.setDirty(false);
  32985. }
  32986. return html;
  32987. };
  32988. Editor.prototype.setContent = function (content, args) {
  32989. return setContent(this, content, args);
  32990. };
  32991. Editor.prototype.getContent = function (args) {
  32992. return getContent(this, args);
  32993. };
  32994. Editor.prototype.insertContent = function (content, args) {
  32995. if (args) {
  32996. content = extend$3({ content: content }, args);
  32997. }
  32998. this.execCommand('mceInsertContent', false, content);
  32999. };
  33000. Editor.prototype.resetContent = function (initialContent) {
  33001. if (initialContent === undefined) {
  33002. setContent(this, this.startContent, { format: 'raw' });
  33003. } else {
  33004. setContent(this, initialContent);
  33005. }
  33006. this.undoManager.reset();
  33007. this.setDirty(false);
  33008. this.nodeChanged();
  33009. };
  33010. Editor.prototype.isDirty = function () {
  33011. return !this.isNotDirty;
  33012. };
  33013. Editor.prototype.setDirty = function (state) {
  33014. var oldState = !this.isNotDirty;
  33015. this.isNotDirty = !state;
  33016. if (state && state !== oldState) {
  33017. this.fire('dirty');
  33018. }
  33019. };
  33020. Editor.prototype.getContainer = function () {
  33021. var self = this;
  33022. if (!self.container) {
  33023. self.container = DOM$1.get(self.editorContainer || self.id + '_parent');
  33024. }
  33025. return self.container;
  33026. };
  33027. Editor.prototype.getContentAreaContainer = function () {
  33028. return this.contentAreaContainer;
  33029. };
  33030. Editor.prototype.getElement = function () {
  33031. if (!this.targetElm) {
  33032. this.targetElm = DOM$1.get(this.id);
  33033. }
  33034. return this.targetElm;
  33035. };
  33036. Editor.prototype.getWin = function () {
  33037. var self = this;
  33038. var elm;
  33039. if (!self.contentWindow) {
  33040. elm = self.iframeElement;
  33041. if (elm) {
  33042. self.contentWindow = elm.contentWindow;
  33043. }
  33044. }
  33045. return self.contentWindow;
  33046. };
  33047. Editor.prototype.getDoc = function () {
  33048. var self = this;
  33049. var win;
  33050. if (!self.contentDocument) {
  33051. win = self.getWin();
  33052. if (win) {
  33053. self.contentDocument = win.document;
  33054. }
  33055. }
  33056. return self.contentDocument;
  33057. };
  33058. Editor.prototype.getBody = function () {
  33059. var doc = this.getDoc();
  33060. return this.bodyElement || (doc ? doc.body : null);
  33061. };
  33062. Editor.prototype.convertURL = function (url, name, elm) {
  33063. var self = this, settings = self.settings;
  33064. if (settings.urlconverter_callback) {
  33065. return self.execCallback('urlconverter_callback', url, elm, true, name);
  33066. }
  33067. if (!settings.convert_urls || elm && elm.nodeName === 'LINK' || url.indexOf('file:') === 0 || url.length === 0) {
  33068. return url;
  33069. }
  33070. if (settings.relative_urls) {
  33071. return self.documentBaseURI.toRelative(url);
  33072. }
  33073. url = self.documentBaseURI.toAbsolute(url, settings.remove_script_host);
  33074. return url;
  33075. };
  33076. Editor.prototype.addVisual = function (elm) {
  33077. addVisual(this, elm);
  33078. };
  33079. Editor.prototype.remove = function () {
  33080. remove(this);
  33081. };
  33082. Editor.prototype.destroy = function (automatic) {
  33083. destroy(this, automatic);
  33084. };
  33085. Editor.prototype.uploadImages = function (callback) {
  33086. return this.editorUpload.uploadImages(callback);
  33087. };
  33088. Editor.prototype._scanForImages = function () {
  33089. return this.editorUpload.scanForImages();
  33090. };
  33091. Editor.prototype.addButton = function () {
  33092. throw new Error('editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead');
  33093. };
  33094. Editor.prototype.addSidebar = function () {
  33095. throw new Error('editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead');
  33096. };
  33097. Editor.prototype.addMenuItem = function () {
  33098. throw new Error('editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead');
  33099. };
  33100. Editor.prototype.addContextToolbar = function () {
  33101. throw new Error('editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead');
  33102. };
  33103. return Editor;
  33104. }();
  33105. var DOM = DOMUtils.DOM;
  33106. var explode = Tools.explode, each$1 = Tools.each, extend$2 = Tools.extend;
  33107. var instanceCounter = 0, boundGlobalEvents = false;
  33108. var beforeUnloadDelegate;
  33109. var legacyEditors = [];
  33110. var editors = [];
  33111. var isValidLegacyKey = function (id) {
  33112. return id !== 'length';
  33113. };
  33114. var globalEventDelegate = function (e) {
  33115. var type = e.type;
  33116. each$1(EditorManager.get(), function (editor) {
  33117. switch (type) {
  33118. case 'scroll':
  33119. editor.fire('ScrollWindow', e);
  33120. break;
  33121. case 'resize':
  33122. editor.fire('ResizeWindow', e);
  33123. break;
  33124. }
  33125. });
  33126. };
  33127. var toggleGlobalEvents = function (state) {
  33128. if (state !== boundGlobalEvents) {
  33129. if (state) {
  33130. DomQuery(window).on('resize scroll', globalEventDelegate);
  33131. } else {
  33132. DomQuery(window).off('resize scroll', globalEventDelegate);
  33133. }
  33134. boundGlobalEvents = state;
  33135. }
  33136. };
  33137. var removeEditorFromList = function (targetEditor) {
  33138. var oldEditors = editors;
  33139. delete legacyEditors[targetEditor.id];
  33140. for (var i = 0; i < legacyEditors.length; i++) {
  33141. if (legacyEditors[i] === targetEditor) {
  33142. legacyEditors.splice(i, 1);
  33143. break;
  33144. }
  33145. }
  33146. editors = filter$4(editors, function (editor) {
  33147. return targetEditor !== editor;
  33148. });
  33149. if (EditorManager.activeEditor === targetEditor) {
  33150. EditorManager.activeEditor = editors.length > 0 ? editors[0] : null;
  33151. }
  33152. if (EditorManager.focusedEditor === targetEditor) {
  33153. EditorManager.focusedEditor = null;
  33154. }
  33155. return oldEditors.length !== editors.length;
  33156. };
  33157. var purgeDestroyedEditor = function (editor) {
  33158. if (editor && editor.initialized && !(editor.getContainer() || editor.getBody()).parentNode) {
  33159. removeEditorFromList(editor);
  33160. editor.unbindAllNativeEvents();
  33161. editor.destroy(true);
  33162. editor.removed = true;
  33163. editor = null;
  33164. }
  33165. return editor;
  33166. };
  33167. var isQuirksMode = document.compatMode !== 'CSS1Compat';
  33168. var EditorManager = __assign(__assign({}, Observable), {
  33169. baseURI: null,
  33170. baseURL: null,
  33171. defaultSettings: {},
  33172. documentBaseURL: null,
  33173. suffix: null,
  33174. $: DomQuery,
  33175. majorVersion: '5',
  33176. minorVersion: '10.3',
  33177. releaseDate: '2022-02-09',
  33178. editors: legacyEditors,
  33179. i18n: I18n,
  33180. activeEditor: null,
  33181. focusedEditor: null,
  33182. settings: {},
  33183. setup: function () {
  33184. var self = this;
  33185. var baseURL, documentBaseURL, suffix = '';
  33186. documentBaseURL = URI.getDocumentBaseUrl(document.location);
  33187. if (/^[^:]+:\/\/\/?[^\/]+\//.test(documentBaseURL)) {
  33188. documentBaseURL = documentBaseURL.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, '');
  33189. if (!/[\/\\]$/.test(documentBaseURL)) {
  33190. documentBaseURL += '/';
  33191. }
  33192. }
  33193. var preInit = window.tinymce || window.tinyMCEPreInit;
  33194. if (preInit) {
  33195. baseURL = preInit.base || preInit.baseURL;
  33196. suffix = preInit.suffix;
  33197. } else {
  33198. var scripts = document.getElementsByTagName('script');
  33199. for (var i = 0; i < scripts.length; i++) {
  33200. var src = scripts[i].src || '';
  33201. if (src === '') {
  33202. continue;
  33203. }
  33204. var srcScript = src.substring(src.lastIndexOf('/'));
  33205. if (/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(src)) {
  33206. if (srcScript.indexOf('.min') !== -1) {
  33207. suffix = '.min';
  33208. }
  33209. baseURL = src.substring(0, src.lastIndexOf('/'));
  33210. break;
  33211. }
  33212. }
  33213. if (!baseURL && document.currentScript) {
  33214. var src = document.currentScript.src;
  33215. if (src.indexOf('.min') !== -1) {
  33216. suffix = '.min';
  33217. }
  33218. baseURL = src.substring(0, src.lastIndexOf('/'));
  33219. }
  33220. }
  33221. self.baseURL = new URI(documentBaseURL).toAbsolute(baseURL);
  33222. self.documentBaseURL = documentBaseURL;
  33223. self.baseURI = new URI(self.baseURL);
  33224. self.suffix = suffix;
  33225. setup$l(self);
  33226. },
  33227. overrideDefaults: function (defaultSettings) {
  33228. var baseUrl = defaultSettings.base_url;
  33229. if (baseUrl) {
  33230. this._setBaseUrl(baseUrl);
  33231. }
  33232. var suffix = defaultSettings.suffix;
  33233. if (defaultSettings.suffix) {
  33234. this.suffix = suffix;
  33235. }
  33236. this.defaultSettings = defaultSettings;
  33237. var pluginBaseUrls = defaultSettings.plugin_base_urls;
  33238. if (pluginBaseUrls !== undefined) {
  33239. each$j(pluginBaseUrls, function (pluginBaseUrl, pluginName) {
  33240. AddOnManager.PluginManager.urls[pluginName] = pluginBaseUrl;
  33241. });
  33242. }
  33243. },
  33244. init: function (settings) {
  33245. var self = this;
  33246. var result;
  33247. var invalidInlineTargets = Tools.makeMap('area base basefont br col frame hr img input isindex link meta param embed source wbr track ' + 'colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu', ' ');
  33248. var isInvalidInlineTarget = function (settings, elm) {
  33249. return settings.inline && elm.tagName.toLowerCase() in invalidInlineTargets;
  33250. };
  33251. var createId = function (elm) {
  33252. var id = elm.id;
  33253. if (!id) {
  33254. id = get$9(elm, 'name').filter(function (name) {
  33255. return !DOM.get(name);
  33256. }).getOrThunk(DOM.uniqueId);
  33257. elm.setAttribute('id', id);
  33258. }
  33259. return id;
  33260. };
  33261. var execCallback = function (name) {
  33262. var callback = settings[name];
  33263. if (!callback) {
  33264. return;
  33265. }
  33266. return callback.apply(self, []);
  33267. };
  33268. var hasClass = function (elm, className) {
  33269. return className.constructor === RegExp ? className.test(elm.className) : DOM.hasClass(elm, className);
  33270. };
  33271. var findTargets = function (settings) {
  33272. var targets = [];
  33273. if (Env.browser.isIE() && Env.browser.version.major < 11) {
  33274. initError('TinyMCE does not support the browser you are using. For a list of supported' + ' browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/');
  33275. return [];
  33276. } else if (isQuirksMode) {
  33277. initError('Failed to initialize the editor as the document is not in standards mode. ' + 'TinyMCE requires standards mode.');
  33278. return [];
  33279. }
  33280. if (settings.types) {
  33281. each$1(settings.types, function (type) {
  33282. targets = targets.concat(DOM.select(type.selector));
  33283. });
  33284. return targets;
  33285. } else if (settings.selector) {
  33286. return DOM.select(settings.selector);
  33287. } else if (settings.target) {
  33288. return [settings.target];
  33289. }
  33290. switch (settings.mode) {
  33291. case 'exact':
  33292. var l = settings.elements || '';
  33293. if (l.length > 0) {
  33294. each$1(explode(l), function (id) {
  33295. var elm = DOM.get(id);
  33296. if (elm) {
  33297. targets.push(elm);
  33298. } else {
  33299. each$1(document.forms, function (f) {
  33300. each$1(f.elements, function (e) {
  33301. if (e.name === id) {
  33302. id = 'mce_editor_' + instanceCounter++;
  33303. DOM.setAttrib(e, 'id', id);
  33304. targets.push(e);
  33305. }
  33306. });
  33307. });
  33308. }
  33309. });
  33310. }
  33311. break;
  33312. case 'textareas':
  33313. case 'specific_textareas':
  33314. each$1(DOM.select('textarea'), function (elm) {
  33315. if (settings.editor_deselector && hasClass(elm, settings.editor_deselector)) {
  33316. return;
  33317. }
  33318. if (!settings.editor_selector || hasClass(elm, settings.editor_selector)) {
  33319. targets.push(elm);
  33320. }
  33321. });
  33322. break;
  33323. }
  33324. return targets;
  33325. };
  33326. var provideResults = function (editors) {
  33327. result = editors;
  33328. };
  33329. var initEditors = function () {
  33330. var initCount = 0;
  33331. var editors = [];
  33332. var targets;
  33333. var createEditor = function (id, settings, targetElm) {
  33334. var editor = new Editor(id, settings, self);
  33335. editors.push(editor);
  33336. editor.on('init', function () {
  33337. if (++initCount === targets.length) {
  33338. provideResults(editors);
  33339. }
  33340. });
  33341. editor.targetElm = editor.targetElm || targetElm;
  33342. editor.render();
  33343. };
  33344. DOM.unbind(window, 'ready', initEditors);
  33345. execCallback('onpageload');
  33346. targets = DomQuery.unique(findTargets(settings));
  33347. if (settings.types) {
  33348. each$1(settings.types, function (type) {
  33349. Tools.each(targets, function (elm) {
  33350. if (DOM.is(elm, type.selector)) {
  33351. createEditor(createId(elm), extend$2({}, settings, type), elm);
  33352. return false;
  33353. }
  33354. return true;
  33355. });
  33356. });
  33357. return;
  33358. }
  33359. Tools.each(targets, function (elm) {
  33360. purgeDestroyedEditor(self.get(elm.id));
  33361. });
  33362. targets = Tools.grep(targets, function (elm) {
  33363. return !self.get(elm.id);
  33364. });
  33365. if (targets.length === 0) {
  33366. provideResults([]);
  33367. } else {
  33368. each$1(targets, function (elm) {
  33369. if (isInvalidInlineTarget(settings, elm)) {
  33370. initError('Could not initialize inline editor on invalid inline target element', elm);
  33371. } else {
  33372. createEditor(createId(elm), settings, elm);
  33373. }
  33374. });
  33375. }
  33376. };
  33377. self.settings = settings;
  33378. DOM.bind(window, 'ready', initEditors);
  33379. return new promiseObj(function (resolve) {
  33380. if (result) {
  33381. resolve(result);
  33382. } else {
  33383. provideResults = function (editors) {
  33384. resolve(editors);
  33385. };
  33386. }
  33387. });
  33388. },
  33389. get: function (id) {
  33390. if (arguments.length === 0) {
  33391. return editors.slice(0);
  33392. } else if (isString$1(id)) {
  33393. return find$3(editors, function (editor) {
  33394. return editor.id === id;
  33395. }).getOr(null);
  33396. } else if (isNumber(id)) {
  33397. return editors[id] ? editors[id] : null;
  33398. } else {
  33399. return null;
  33400. }
  33401. },
  33402. add: function (editor) {
  33403. var self = this;
  33404. var existingEditor = legacyEditors[editor.id];
  33405. if (existingEditor === editor) {
  33406. return editor;
  33407. }
  33408. if (self.get(editor.id) === null) {
  33409. if (isValidLegacyKey(editor.id)) {
  33410. legacyEditors[editor.id] = editor;
  33411. }
  33412. legacyEditors.push(editor);
  33413. editors.push(editor);
  33414. }
  33415. toggleGlobalEvents(true);
  33416. self.activeEditor = editor;
  33417. self.fire('AddEditor', { editor: editor });
  33418. if (!beforeUnloadDelegate) {
  33419. beforeUnloadDelegate = function (e) {
  33420. var event = self.fire('BeforeUnload');
  33421. if (event.returnValue) {
  33422. e.preventDefault();
  33423. e.returnValue = event.returnValue;
  33424. return event.returnValue;
  33425. }
  33426. };
  33427. window.addEventListener('beforeunload', beforeUnloadDelegate);
  33428. }
  33429. return editor;
  33430. },
  33431. createEditor: function (id, settings) {
  33432. return this.add(new Editor(id, settings, this));
  33433. },
  33434. remove: function (selector) {
  33435. var self = this;
  33436. var i, editor;
  33437. if (!selector) {
  33438. for (i = editors.length - 1; i >= 0; i--) {
  33439. self.remove(editors[i]);
  33440. }
  33441. return;
  33442. }
  33443. if (isString$1(selector)) {
  33444. each$1(DOM.select(selector), function (elm) {
  33445. editor = self.get(elm.id);
  33446. if (editor) {
  33447. self.remove(editor);
  33448. }
  33449. });
  33450. return;
  33451. }
  33452. editor = selector;
  33453. if (isNull(self.get(editor.id))) {
  33454. return null;
  33455. }
  33456. if (removeEditorFromList(editor)) {
  33457. self.fire('RemoveEditor', { editor: editor });
  33458. }
  33459. if (editors.length === 0) {
  33460. window.removeEventListener('beforeunload', beforeUnloadDelegate);
  33461. }
  33462. editor.remove();
  33463. toggleGlobalEvents(editors.length > 0);
  33464. return editor;
  33465. },
  33466. execCommand: function (cmd, ui, value) {
  33467. var self = this, editor = self.get(value);
  33468. switch (cmd) {
  33469. case 'mceAddEditor':
  33470. if (!self.get(value)) {
  33471. new Editor(value, self.settings, self).render();
  33472. }
  33473. return true;
  33474. case 'mceRemoveEditor':
  33475. if (editor) {
  33476. editor.remove();
  33477. }
  33478. return true;
  33479. case 'mceToggleEditor':
  33480. if (!editor) {
  33481. self.execCommand('mceAddEditor', false, value);
  33482. return true;
  33483. }
  33484. if (editor.isHidden()) {
  33485. editor.show();
  33486. } else {
  33487. editor.hide();
  33488. }
  33489. return true;
  33490. }
  33491. if (self.activeEditor) {
  33492. return self.activeEditor.execCommand(cmd, ui, value);
  33493. }
  33494. return false;
  33495. },
  33496. triggerSave: function () {
  33497. each$1(editors, function (editor) {
  33498. editor.save();
  33499. });
  33500. },
  33501. addI18n: function (code, items) {
  33502. I18n.add(code, items);
  33503. },
  33504. translate: function (text) {
  33505. return I18n.translate(text);
  33506. },
  33507. setActive: function (editor) {
  33508. var activeEditor = this.activeEditor;
  33509. if (this.activeEditor !== editor) {
  33510. if (activeEditor) {
  33511. activeEditor.fire('deactivate', { relatedTarget: editor });
  33512. }
  33513. editor.fire('activate', { relatedTarget: activeEditor });
  33514. }
  33515. this.activeEditor = editor;
  33516. },
  33517. _setBaseUrl: function (baseUrl) {
  33518. this.baseURL = new URI(this.documentBaseURL).toAbsolute(baseUrl.replace(/\/+$/, ''));
  33519. this.baseURI = new URI(this.baseURL);
  33520. }
  33521. });
  33522. EditorManager.setup();
  33523. var min$1 = Math.min, max$1 = Math.max, round$1 = Math.round;
  33524. var relativePosition = function (rect, targetRect, rel) {
  33525. var x = targetRect.x;
  33526. var y = targetRect.y;
  33527. var w = rect.w;
  33528. var h = rect.h;
  33529. var targetW = targetRect.w;
  33530. var targetH = targetRect.h;
  33531. var relChars = (rel || '').split('');
  33532. if (relChars[0] === 'b') {
  33533. y += targetH;
  33534. }
  33535. if (relChars[1] === 'r') {
  33536. x += targetW;
  33537. }
  33538. if (relChars[0] === 'c') {
  33539. y += round$1(targetH / 2);
  33540. }
  33541. if (relChars[1] === 'c') {
  33542. x += round$1(targetW / 2);
  33543. }
  33544. if (relChars[3] === 'b') {
  33545. y -= h;
  33546. }
  33547. if (relChars[4] === 'r') {
  33548. x -= w;
  33549. }
  33550. if (relChars[3] === 'c') {
  33551. y -= round$1(h / 2);
  33552. }
  33553. if (relChars[4] === 'c') {
  33554. x -= round$1(w / 2);
  33555. }
  33556. return create$2(x, y, w, h);
  33557. };
  33558. var findBestRelativePosition = function (rect, targetRect, constrainRect, rels) {
  33559. var pos, i;
  33560. for (i = 0; i < rels.length; i++) {
  33561. pos = relativePosition(rect, targetRect, rels[i]);
  33562. if (pos.x >= constrainRect.x && pos.x + pos.w <= constrainRect.w + constrainRect.x && pos.y >= constrainRect.y && pos.y + pos.h <= constrainRect.h + constrainRect.y) {
  33563. return rels[i];
  33564. }
  33565. }
  33566. return null;
  33567. };
  33568. var inflate = function (rect, w, h) {
  33569. return create$2(rect.x - w, rect.y - h, rect.w + w * 2, rect.h + h * 2);
  33570. };
  33571. var intersect = function (rect, cropRect) {
  33572. var x1 = max$1(rect.x, cropRect.x);
  33573. var y1 = max$1(rect.y, cropRect.y);
  33574. var x2 = min$1(rect.x + rect.w, cropRect.x + cropRect.w);
  33575. var y2 = min$1(rect.y + rect.h, cropRect.y + cropRect.h);
  33576. if (x2 - x1 < 0 || y2 - y1 < 0) {
  33577. return null;
  33578. }
  33579. return create$2(x1, y1, x2 - x1, y2 - y1);
  33580. };
  33581. var clamp = function (rect, clampRect, fixedSize) {
  33582. var x1 = rect.x;
  33583. var y1 = rect.y;
  33584. var x2 = rect.x + rect.w;
  33585. var y2 = rect.y + rect.h;
  33586. var cx2 = clampRect.x + clampRect.w;
  33587. var cy2 = clampRect.y + clampRect.h;
  33588. var underflowX1 = max$1(0, clampRect.x - x1);
  33589. var underflowY1 = max$1(0, clampRect.y - y1);
  33590. var overflowX2 = max$1(0, x2 - cx2);
  33591. var overflowY2 = max$1(0, y2 - cy2);
  33592. x1 += underflowX1;
  33593. y1 += underflowY1;
  33594. if (fixedSize) {
  33595. x2 += underflowX1;
  33596. y2 += underflowY1;
  33597. x1 -= overflowX2;
  33598. y1 -= overflowY2;
  33599. }
  33600. x2 -= overflowX2;
  33601. y2 -= overflowY2;
  33602. return create$2(x1, y1, x2 - x1, y2 - y1);
  33603. };
  33604. var create$2 = function (x, y, w, h) {
  33605. return {
  33606. x: x,
  33607. y: y,
  33608. w: w,
  33609. h: h
  33610. };
  33611. };
  33612. var fromClientRect = function (clientRect) {
  33613. return create$2(clientRect.left, clientRect.top, clientRect.width, clientRect.height);
  33614. };
  33615. var Rect = {
  33616. inflate: inflate,
  33617. relativePosition: relativePosition,
  33618. findBestRelativePosition: findBestRelativePosition,
  33619. intersect: intersect,
  33620. clamp: clamp,
  33621. create: create$2,
  33622. fromClientRect: fromClientRect
  33623. };
  33624. var awaiter = function (resolveCb, rejectCb, timeout) {
  33625. if (timeout === void 0) {
  33626. timeout = 1000;
  33627. }
  33628. var done = false;
  33629. var timer = null;
  33630. var complete = function (completer) {
  33631. return function () {
  33632. var args = [];
  33633. for (var _i = 0; _i < arguments.length; _i++) {
  33634. args[_i] = arguments[_i];
  33635. }
  33636. if (!done) {
  33637. done = true;
  33638. if (timer !== null) {
  33639. clearTimeout(timer);
  33640. timer = null;
  33641. }
  33642. completer.apply(null, args);
  33643. }
  33644. };
  33645. };
  33646. var resolve = complete(resolveCb);
  33647. var reject = complete(rejectCb);
  33648. var start = function () {
  33649. var args = [];
  33650. for (var _i = 0; _i < arguments.length; _i++) {
  33651. args[_i] = arguments[_i];
  33652. }
  33653. if (!done && timer === null) {
  33654. timer = setTimeout(function () {
  33655. return reject.apply(null, args);
  33656. }, timeout);
  33657. }
  33658. };
  33659. return {
  33660. start: start,
  33661. resolve: resolve,
  33662. reject: reject
  33663. };
  33664. };
  33665. var create$1 = function () {
  33666. var tasks = {};
  33667. var resultFns = {};
  33668. var load = function (id, url) {
  33669. var loadErrMsg = 'Script at URL "' + url + '" failed to load';
  33670. var runErrMsg = 'Script at URL "' + url + '" did not call `tinymce.Resource.add(\'' + id + '\', data)` within 1 second';
  33671. if (tasks[id] !== undefined) {
  33672. return tasks[id];
  33673. } else {
  33674. var task = new promiseObj(function (resolve, reject) {
  33675. var waiter = awaiter(resolve, reject);
  33676. resultFns[id] = waiter.resolve;
  33677. ScriptLoader.ScriptLoader.loadScript(url, function () {
  33678. return waiter.start(runErrMsg);
  33679. }, function () {
  33680. return waiter.reject(loadErrMsg);
  33681. });
  33682. });
  33683. tasks[id] = task;
  33684. return task;
  33685. }
  33686. };
  33687. var add = function (id, data) {
  33688. if (resultFns[id] !== undefined) {
  33689. resultFns[id](data);
  33690. delete resultFns[id];
  33691. }
  33692. tasks[id] = promiseObj.resolve(data);
  33693. };
  33694. return {
  33695. load: load,
  33696. add: add
  33697. };
  33698. };
  33699. var Resource = create$1();
  33700. var each = Tools.each, extend$1 = Tools.extend;
  33701. var extendClass, initializing;
  33702. var Class = function () {
  33703. };
  33704. Class.extend = extendClass = function (props) {
  33705. var self = this;
  33706. var _super = self.prototype;
  33707. var Class = function () {
  33708. var i, mixins, mixin;
  33709. var self = this;
  33710. if (!initializing) {
  33711. if (self.init) {
  33712. self.init.apply(self, arguments);
  33713. }
  33714. mixins = self.Mixins;
  33715. if (mixins) {
  33716. i = mixins.length;
  33717. while (i--) {
  33718. mixin = mixins[i];
  33719. if (mixin.init) {
  33720. mixin.init.apply(self, arguments);
  33721. }
  33722. }
  33723. }
  33724. }
  33725. };
  33726. var dummy = function () {
  33727. return this;
  33728. };
  33729. var createMethod = function (name, fn) {
  33730. return function () {
  33731. var self = this;
  33732. var tmp = self._super;
  33733. self._super = _super[name];
  33734. var ret = fn.apply(self, arguments);
  33735. self._super = tmp;
  33736. return ret;
  33737. };
  33738. };
  33739. initializing = true;
  33740. var prototype = new self();
  33741. initializing = false;
  33742. if (props.Mixins) {
  33743. each(props.Mixins, function (mixin) {
  33744. for (var name_1 in mixin) {
  33745. if (name_1 !== 'init') {
  33746. props[name_1] = mixin[name_1];
  33747. }
  33748. }
  33749. });
  33750. if (_super.Mixins) {
  33751. props.Mixins = _super.Mixins.concat(props.Mixins);
  33752. }
  33753. }
  33754. if (props.Methods) {
  33755. each(props.Methods.split(','), function (name) {
  33756. props[name] = dummy;
  33757. });
  33758. }
  33759. if (props.Properties) {
  33760. each(props.Properties.split(','), function (name) {
  33761. var fieldName = '_' + name;
  33762. props[name] = function (value) {
  33763. var self = this;
  33764. if (value !== undefined) {
  33765. self[fieldName] = value;
  33766. return self;
  33767. }
  33768. return self[fieldName];
  33769. };
  33770. });
  33771. }
  33772. if (props.Statics) {
  33773. each(props.Statics, function (func, name) {
  33774. Class[name] = func;
  33775. });
  33776. }
  33777. if (props.Defaults && _super.Defaults) {
  33778. props.Defaults = extend$1({}, _super.Defaults, props.Defaults);
  33779. }
  33780. each$j(props, function (member, name) {
  33781. if (typeof member === 'function' && _super[name]) {
  33782. prototype[name] = createMethod(name, member);
  33783. } else {
  33784. prototype[name] = member;
  33785. }
  33786. });
  33787. Class.prototype = prototype;
  33788. Class.constructor = Class;
  33789. Class.extend = extendClass;
  33790. return Class;
  33791. };
  33792. var min = Math.min, max = Math.max, round = Math.round;
  33793. var Color = function (value) {
  33794. var self = {};
  33795. var r = 0, g = 0, b = 0;
  33796. var rgb2hsv = function (r, g, b) {
  33797. var h, s, v;
  33798. h = 0;
  33799. s = 0;
  33800. v = 0;
  33801. r = r / 255;
  33802. g = g / 255;
  33803. b = b / 255;
  33804. var minRGB = min(r, min(g, b));
  33805. var maxRGB = max(r, max(g, b));
  33806. if (minRGB === maxRGB) {
  33807. v = minRGB;
  33808. return {
  33809. h: 0,
  33810. s: 0,
  33811. v: v * 100
  33812. };
  33813. }
  33814. var d = r === minRGB ? g - b : b === minRGB ? r - g : b - r;
  33815. h = r === minRGB ? 3 : b === minRGB ? 1 : 5;
  33816. h = 60 * (h - d / (maxRGB - minRGB));
  33817. s = (maxRGB - minRGB) / maxRGB;
  33818. v = maxRGB;
  33819. return {
  33820. h: round(h),
  33821. s: round(s * 100),
  33822. v: round(v * 100)
  33823. };
  33824. };
  33825. var hsvToRgb = function (hue, saturation, brightness) {
  33826. hue = (parseInt(hue, 10) || 0) % 360;
  33827. saturation = parseInt(saturation, 10) / 100;
  33828. brightness = parseInt(brightness, 10) / 100;
  33829. saturation = max(0, min(saturation, 1));
  33830. brightness = max(0, min(brightness, 1));
  33831. if (saturation === 0) {
  33832. r = g = b = round(255 * brightness);
  33833. return;
  33834. }
  33835. var side = hue / 60;
  33836. var chroma = brightness * saturation;
  33837. var x = chroma * (1 - Math.abs(side % 2 - 1));
  33838. var match = brightness - chroma;
  33839. switch (Math.floor(side)) {
  33840. case 0:
  33841. r = chroma;
  33842. g = x;
  33843. b = 0;
  33844. break;
  33845. case 1:
  33846. r = x;
  33847. g = chroma;
  33848. b = 0;
  33849. break;
  33850. case 2:
  33851. r = 0;
  33852. g = chroma;
  33853. b = x;
  33854. break;
  33855. case 3:
  33856. r = 0;
  33857. g = x;
  33858. b = chroma;
  33859. break;
  33860. case 4:
  33861. r = x;
  33862. g = 0;
  33863. b = chroma;
  33864. break;
  33865. case 5:
  33866. r = chroma;
  33867. g = 0;
  33868. b = x;
  33869. break;
  33870. default:
  33871. r = g = b = 0;
  33872. }
  33873. r = round(255 * (r + match));
  33874. g = round(255 * (g + match));
  33875. b = round(255 * (b + match));
  33876. };
  33877. var toHex = function () {
  33878. var hex = function (val) {
  33879. val = parseInt(val, 10).toString(16);
  33880. return val.length > 1 ? val : '0' + val;
  33881. };
  33882. return '#' + hex(r) + hex(g) + hex(b);
  33883. };
  33884. var toRgb = function () {
  33885. return {
  33886. r: r,
  33887. g: g,
  33888. b: b
  33889. };
  33890. };
  33891. var toHsv = function () {
  33892. return rgb2hsv(r, g, b);
  33893. };
  33894. var parse = function (value) {
  33895. var matches;
  33896. if (typeof value === 'object') {
  33897. if ('r' in value) {
  33898. r = value.r;
  33899. g = value.g;
  33900. b = value.b;
  33901. } else if ('v' in value) {
  33902. hsvToRgb(value.h, value.s, value.v);
  33903. }
  33904. } else {
  33905. if (matches = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(value)) {
  33906. r = parseInt(matches[1], 10);
  33907. g = parseInt(matches[2], 10);
  33908. b = parseInt(matches[3], 10);
  33909. } else if (matches = /#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(value)) {
  33910. r = parseInt(matches[1], 16);
  33911. g = parseInt(matches[2], 16);
  33912. b = parseInt(matches[3], 16);
  33913. } else if (matches = /#([0-F])([0-F])([0-F])/gi.exec(value)) {
  33914. r = parseInt(matches[1] + matches[1], 16);
  33915. g = parseInt(matches[2] + matches[2], 16);
  33916. b = parseInt(matches[3] + matches[3], 16);
  33917. }
  33918. }
  33919. r = r < 0 ? 0 : r > 255 ? 255 : r;
  33920. g = g < 0 ? 0 : g > 255 ? 255 : g;
  33921. b = b < 0 ? 0 : b > 255 ? 255 : b;
  33922. return self;
  33923. };
  33924. if (value) {
  33925. parse(value);
  33926. }
  33927. self.toRgb = toRgb;
  33928. self.toHsv = toHsv;
  33929. self.toHex = toHex;
  33930. self.parse = parse;
  33931. return self;
  33932. };
  33933. var serialize = function (obj) {
  33934. var data = JSON.stringify(obj);
  33935. if (!isString$1(data)) {
  33936. return data;
  33937. }
  33938. return data.replace(/[\u0080-\uFFFF]/g, function (match) {
  33939. var hexCode = match.charCodeAt(0).toString(16);
  33940. return '\\u' + '0000'.substring(hexCode.length) + hexCode;
  33941. });
  33942. };
  33943. var JSONUtils = {
  33944. serialize: serialize,
  33945. parse: function (text) {
  33946. try {
  33947. return JSON.parse(text);
  33948. } catch (ex) {
  33949. }
  33950. }
  33951. };
  33952. var JSONP = {
  33953. callbacks: {},
  33954. count: 0,
  33955. send: function (settings) {
  33956. var self = this, dom = DOMUtils.DOM, count = settings.count !== undefined ? settings.count : self.count;
  33957. var id = 'tinymce_jsonp_' + count;
  33958. self.callbacks[count] = function (json) {
  33959. dom.remove(id);
  33960. delete self.callbacks[count];
  33961. settings.callback(json);
  33962. };
  33963. dom.add(dom.doc.body, 'script', {
  33964. id: id,
  33965. src: settings.url,
  33966. type: 'text/javascript'
  33967. });
  33968. self.count++;
  33969. }
  33970. };
  33971. var XHR = __assign(__assign({}, Observable), {
  33972. send: function (settings) {
  33973. var xhr, count = 0;
  33974. var ready = function () {
  33975. if (!settings.async || xhr.readyState === 4 || count++ > 10000) {
  33976. if (settings.success && count < 10000 && xhr.status === 200) {
  33977. settings.success.call(settings.success_scope, '' + xhr.responseText, xhr, settings);
  33978. } else if (settings.error) {
  33979. settings.error.call(settings.error_scope, count > 10000 ? 'TIMED_OUT' : 'GENERAL', xhr, settings);
  33980. }
  33981. xhr = null;
  33982. } else {
  33983. Delay.setTimeout(ready, 10);
  33984. }
  33985. };
  33986. settings.scope = settings.scope || this;
  33987. settings.success_scope = settings.success_scope || settings.scope;
  33988. settings.error_scope = settings.error_scope || settings.scope;
  33989. settings.async = settings.async !== false;
  33990. settings.data = settings.data || '';
  33991. XHR.fire('beforeInitialize', { settings: settings });
  33992. xhr = new XMLHttpRequest();
  33993. if (xhr.overrideMimeType) {
  33994. xhr.overrideMimeType(settings.content_type);
  33995. }
  33996. xhr.open(settings.type || (settings.data ? 'POST' : 'GET'), settings.url, settings.async);
  33997. if (settings.crossDomain) {
  33998. xhr.withCredentials = true;
  33999. }
  34000. if (settings.content_type) {
  34001. xhr.setRequestHeader('Content-Type', settings.content_type);
  34002. }
  34003. if (settings.requestheaders) {
  34004. Tools.each(settings.requestheaders, function (header) {
  34005. xhr.setRequestHeader(header.key, header.value);
  34006. });
  34007. }
  34008. xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
  34009. xhr = XHR.fire('beforeSend', {
  34010. xhr: xhr,
  34011. settings: settings
  34012. }).xhr;
  34013. xhr.send(settings.data);
  34014. if (!settings.async) {
  34015. return ready();
  34016. }
  34017. Delay.setTimeout(ready, 10);
  34018. }
  34019. });
  34020. var extend = Tools.extend;
  34021. var JSONRequest = function () {
  34022. function JSONRequest(settings) {
  34023. this.settings = extend({}, settings);
  34024. this.count = 0;
  34025. }
  34026. JSONRequest.sendRPC = function (o) {
  34027. return new JSONRequest().send(o);
  34028. };
  34029. JSONRequest.prototype.send = function (args) {
  34030. var ecb = args.error, scb = args.success;
  34031. var xhrArgs = extend(this.settings, args);
  34032. xhrArgs.success = function (c, x) {
  34033. c = JSONUtils.parse(c);
  34034. if (typeof c === 'undefined') {
  34035. c = { error: 'JSON Parse error.' };
  34036. }
  34037. if (c.error) {
  34038. ecb.call(xhrArgs.error_scope || xhrArgs.scope, c.error, x);
  34039. } else {
  34040. scb.call(xhrArgs.success_scope || xhrArgs.scope, c.result);
  34041. }
  34042. };
  34043. xhrArgs.error = function (ty, x) {
  34044. if (ecb) {
  34045. ecb.call(xhrArgs.error_scope || xhrArgs.scope, ty, x);
  34046. }
  34047. };
  34048. xhrArgs.data = JSONUtils.serialize({
  34049. id: args.id || 'c' + this.count++,
  34050. method: args.method,
  34051. params: args.params
  34052. });
  34053. xhrArgs.content_type = 'application/json';
  34054. XHR.send(xhrArgs);
  34055. };
  34056. return JSONRequest;
  34057. }();
  34058. var create = function () {
  34059. return function () {
  34060. var data = {};
  34061. var keys = [];
  34062. var storage = {
  34063. getItem: function (key) {
  34064. var item = data[key];
  34065. return item ? item : null;
  34066. },
  34067. setItem: function (key, value) {
  34068. keys.push(key);
  34069. data[key] = String(value);
  34070. },
  34071. key: function (index) {
  34072. return keys[index];
  34073. },
  34074. removeItem: function (key) {
  34075. keys = keys.filter(function (k) {
  34076. return k === key;
  34077. });
  34078. delete data[key];
  34079. },
  34080. clear: function () {
  34081. keys = [];
  34082. data = {};
  34083. },
  34084. length: 0
  34085. };
  34086. Object.defineProperty(storage, 'length', {
  34087. get: function () {
  34088. return keys.length;
  34089. },
  34090. configurable: false,
  34091. enumerable: false
  34092. });
  34093. return storage;
  34094. }();
  34095. };
  34096. var localStorage;
  34097. try {
  34098. var test = '__storage_test__';
  34099. localStorage = window.localStorage;
  34100. localStorage.setItem(test, test);
  34101. localStorage.removeItem(test);
  34102. } catch (e) {
  34103. localStorage = create();
  34104. }
  34105. var LocalStorage = localStorage;
  34106. var publicApi = {
  34107. geom: { Rect: Rect },
  34108. util: {
  34109. Promise: promiseObj,
  34110. Delay: Delay,
  34111. Tools: Tools,
  34112. VK: VK,
  34113. URI: URI,
  34114. Class: Class,
  34115. EventDispatcher: EventDispatcher,
  34116. Observable: Observable,
  34117. I18n: I18n,
  34118. XHR: XHR,
  34119. JSON: JSONUtils,
  34120. JSONRequest: JSONRequest,
  34121. JSONP: JSONP,
  34122. LocalStorage: LocalStorage,
  34123. Color: Color,
  34124. ImageUploader: ImageUploader
  34125. },
  34126. dom: {
  34127. EventUtils: EventUtils,
  34128. Sizzle: Sizzle,
  34129. DomQuery: DomQuery,
  34130. TreeWalker: DomTreeWalker,
  34131. TextSeeker: TextSeeker,
  34132. DOMUtils: DOMUtils,
  34133. ScriptLoader: ScriptLoader,
  34134. RangeUtils: RangeUtils,
  34135. Serializer: DomSerializer,
  34136. StyleSheetLoader: StyleSheetLoader,
  34137. ControlSelection: ControlSelection,
  34138. BookmarkManager: BookmarkManager,
  34139. Selection: EditorSelection,
  34140. Event: EventUtils.Event
  34141. },
  34142. html: {
  34143. Styles: Styles,
  34144. Entities: Entities,
  34145. Node: AstNode,
  34146. Schema: Schema,
  34147. SaxParser: SaxParser,
  34148. DomParser: DomParser,
  34149. Writer: Writer,
  34150. Serializer: HtmlSerializer
  34151. },
  34152. Env: Env,
  34153. AddOnManager: AddOnManager,
  34154. Annotator: Annotator,
  34155. Formatter: Formatter,
  34156. UndoManager: UndoManager,
  34157. EditorCommands: EditorCommands,
  34158. WindowManager: WindowManager,
  34159. NotificationManager: NotificationManager,
  34160. EditorObservable: EditorObservable,
  34161. Shortcuts: Shortcuts,
  34162. Editor: Editor,
  34163. FocusManager: FocusManager,
  34164. EditorManager: EditorManager,
  34165. DOM: DOMUtils.DOM,
  34166. ScriptLoader: ScriptLoader.ScriptLoader,
  34167. PluginManager: PluginManager,
  34168. ThemeManager: ThemeManager,
  34169. IconManager: IconManager,
  34170. Resource: Resource,
  34171. trim: Tools.trim,
  34172. isArray: Tools.isArray,
  34173. is: Tools.is,
  34174. toArray: Tools.toArray,
  34175. makeMap: Tools.makeMap,
  34176. each: Tools.each,
  34177. map: Tools.map,
  34178. grep: Tools.grep,
  34179. inArray: Tools.inArray,
  34180. extend: Tools.extend,
  34181. create: Tools.create,
  34182. walk: Tools.walk,
  34183. createNS: Tools.createNS,
  34184. resolve: Tools.resolve,
  34185. explode: Tools.explode,
  34186. _addCacheSuffix: Tools._addCacheSuffix,
  34187. isOpera: Env.opera,
  34188. isWebKit: Env.webkit,
  34189. isIE: Env.ie,
  34190. isGecko: Env.gecko,
  34191. isMac: Env.mac
  34192. };
  34193. var tinymce = Tools.extend(EditorManager, publicApi);
  34194. var exportToModuleLoaders = function (tinymce) {
  34195. if (true) {
  34196. try {
  34197. module.exports = tinymce;
  34198. } catch (_) {
  34199. }
  34200. }
  34201. };
  34202. var exportToWindowGlobal = function (tinymce) {
  34203. window.tinymce = tinymce;
  34204. window.tinyMCE = tinymce;
  34205. };
  34206. exportToWindowGlobal(tinymce);
  34207. exportToModuleLoaders(tinymce);
  34208. }());
  34209. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(31).setImmediate))
  34210. /***/ }),
  34211. /* 54 */
  34212. /***/ (function(module, exports, __webpack_require__) {
  34213. var mapCacheClear = __webpack_require__(150),
  34214. mapCacheDelete = __webpack_require__(166),
  34215. mapCacheGet = __webpack_require__(168),
  34216. mapCacheHas = __webpack_require__(169),
  34217. mapCacheSet = __webpack_require__(170);
  34218. /**
  34219. * Creates a map cache object to store key-value pairs.
  34220. *
  34221. * @private
  34222. * @constructor
  34223. * @param {Array} [entries] The key-value pairs to cache.
  34224. */
  34225. function MapCache(entries) {
  34226. var index = -1,
  34227. length = entries == null ? 0 : entries.length;
  34228. this.clear();
  34229. while (++index < length) {
  34230. var entry = entries[index];
  34231. this.set(entry[0], entry[1]);
  34232. }
  34233. }
  34234. // Add methods to `MapCache`.
  34235. MapCache.prototype.clear = mapCacheClear;
  34236. MapCache.prototype['delete'] = mapCacheDelete;
  34237. MapCache.prototype.get = mapCacheGet;
  34238. MapCache.prototype.has = mapCacheHas;
  34239. MapCache.prototype.set = mapCacheSet;
  34240. module.exports = MapCache;
  34241. /***/ }),
  34242. /* 55 */
  34243. /***/ (function(module, exports, __webpack_require__) {
  34244. var ListCache = __webpack_require__(12),
  34245. stackClear = __webpack_require__(171),
  34246. stackDelete = __webpack_require__(172),
  34247. stackGet = __webpack_require__(173),
  34248. stackHas = __webpack_require__(174),
  34249. stackSet = __webpack_require__(175);
  34250. /**
  34251. * Creates a stack cache object to store key-value pairs.
  34252. *
  34253. * @private
  34254. * @constructor
  34255. * @param {Array} [entries] The key-value pairs to cache.
  34256. */
  34257. function Stack(entries) {
  34258. var data = this.__data__ = new ListCache(entries);
  34259. this.size = data.size;
  34260. }
  34261. // Add methods to `Stack`.
  34262. Stack.prototype.clear = stackClear;
  34263. Stack.prototype['delete'] = stackDelete;
  34264. Stack.prototype.get = stackGet;
  34265. Stack.prototype.has = stackHas;
  34266. Stack.prototype.set = stackSet;
  34267. module.exports = Stack;
  34268. /***/ }),
  34269. /* 56 */
  34270. /***/ (function(module, exports, __webpack_require__) {
  34271. var disposed = false
  34272. function injectStyle (ssrContext) {
  34273. if (disposed) return
  34274. __webpack_require__(112)
  34275. }
  34276. var normalizeComponent = __webpack_require__(2)
  34277. /* script */
  34278. var __vue_script__ = __webpack_require__(114)
  34279. /* template */
  34280. var __vue_template__ = __webpack_require__(115)
  34281. /* template functional */
  34282. var __vue_template_functional__ = false
  34283. /* styles */
  34284. var __vue_styles__ = injectStyle
  34285. /* scopeId */
  34286. var __vue_scopeId__ = "data-v-5eba4923"
  34287. /* moduleIdentifier (server only) */
  34288. var __vue_module_identifier__ = null
  34289. var Component = normalizeComponent(
  34290. __vue_script__,
  34291. __vue_template__,
  34292. __vue_template_functional__,
  34293. __vue_styles__,
  34294. __vue_scopeId__,
  34295. __vue_module_identifier__
  34296. )
  34297. Component.options.__file = "resources/assets/js/_components/ScrollerY.vue"
  34298. /* hot reload */
  34299. if (false) {(function () {
  34300. var hotAPI = require("vue-hot-reload-api")
  34301. hotAPI.install(require("vue"), false)
  34302. if (!hotAPI.compatible) return
  34303. module.hot.accept()
  34304. if (!module.hot.data) {
  34305. hotAPI.createRecord("data-v-5eba4923", Component.options)
  34306. } else {
  34307. hotAPI.reload("data-v-5eba4923", Component.options)
  34308. }
  34309. module.hot.dispose(function (data) {
  34310. disposed = true
  34311. })
  34312. })()}
  34313. module.exports = Component.exports
  34314. /***/ }),
  34315. /* 57 */
  34316. /***/ (function(module, exports, __webpack_require__) {
  34317. var disposed = false
  34318. function injectStyle (ssrContext) {
  34319. if (disposed) return
  34320. __webpack_require__(138)
  34321. }
  34322. var normalizeComponent = __webpack_require__(2)
  34323. /* script */
  34324. var __vue_script__ = __webpack_require__(140)
  34325. /* template */
  34326. var __vue_template__ = __webpack_require__(143)
  34327. /* template functional */
  34328. var __vue_template_functional__ = false
  34329. /* styles */
  34330. var __vue_styles__ = injectStyle
  34331. /* scopeId */
  34332. var __vue_scopeId__ = "data-v-0c50b298"
  34333. /* moduleIdentifier (server only) */
  34334. var __vue_module_identifier__ = null
  34335. var Component = normalizeComponent(
  34336. __vue_script__,
  34337. __vue_template__,
  34338. __vue_template_functional__,
  34339. __vue_styles__,
  34340. __vue_scopeId__,
  34341. __vue_module_identifier__
  34342. )
  34343. Component.options.__file = "resources/assets/js/main/components/project/task/files.vue"
  34344. /* hot reload */
  34345. if (false) {(function () {
  34346. var hotAPI = require("vue-hot-reload-api")
  34347. hotAPI.install(require("vue"), false)
  34348. if (!hotAPI.compatible) return
  34349. module.hot.accept()
  34350. if (!module.hot.data) {
  34351. hotAPI.createRecord("data-v-0c50b298", Component.options)
  34352. } else {
  34353. hotAPI.reload("data-v-0c50b298", Component.options)
  34354. }
  34355. module.hot.dispose(function (data) {
  34356. disposed = true
  34357. })
  34358. })()}
  34359. module.exports = Component.exports
  34360. /***/ }),
  34361. /* 58 */
  34362. /***/ (function(module, exports, __webpack_require__) {
  34363. var disposed = false
  34364. function injectStyle (ssrContext) {
  34365. if (disposed) return
  34366. __webpack_require__(144)
  34367. }
  34368. var normalizeComponent = __webpack_require__(2)
  34369. /* script */
  34370. var __vue_script__ = __webpack_require__(146)
  34371. /* template */
  34372. var __vue_template__ = __webpack_require__(147)
  34373. /* template functional */
  34374. var __vue_template_functional__ = false
  34375. /* styles */
  34376. var __vue_styles__ = injectStyle
  34377. /* scopeId */
  34378. var __vue_scopeId__ = "data-v-2951ea9e"
  34379. /* moduleIdentifier (server only) */
  34380. var __vue_module_identifier__ = null
  34381. var Component = normalizeComponent(
  34382. __vue_script__,
  34383. __vue_template__,
  34384. __vue_template_functional__,
  34385. __vue_styles__,
  34386. __vue_scopeId__,
  34387. __vue_module_identifier__
  34388. )
  34389. Component.options.__file = "resources/assets/js/main/components/project/task/logs.vue"
  34390. /* hot reload */
  34391. if (false) {(function () {
  34392. var hotAPI = require("vue-hot-reload-api")
  34393. hotAPI.install(require("vue"), false)
  34394. if (!hotAPI.compatible) return
  34395. module.hot.accept()
  34396. if (!module.hot.data) {
  34397. hotAPI.createRecord("data-v-2951ea9e", Component.options)
  34398. } else {
  34399. hotAPI.reload("data-v-2951ea9e", Component.options)
  34400. }
  34401. module.hot.dispose(function (data) {
  34402. disposed = true
  34403. })
  34404. })()}
  34405. module.exports = Component.exports
  34406. /***/ }),
  34407. /* 59 */
  34408. /***/ (function(module, exports, __webpack_require__) {
  34409. var root = __webpack_require__(3);
  34410. /** Built-in value references. */
  34411. var Uint8Array = root.Uint8Array;
  34412. module.exports = Uint8Array;
  34413. /***/ }),
  34414. /* 60 */
  34415. /***/ (function(module, exports, __webpack_require__) {
  34416. var baseGetAllKeys = __webpack_require__(40),
  34417. getSymbols = __webpack_require__(24),
  34418. keys = __webpack_require__(19);
  34419. /**
  34420. * Creates an array of own enumerable property names and symbols of `object`.
  34421. *
  34422. * @private
  34423. * @param {Object} object The object to query.
  34424. * @returns {Array} Returns the array of property names and symbols.
  34425. */
  34426. function getAllKeys(object) {
  34427. return baseGetAllKeys(object, keys, getSymbols);
  34428. }
  34429. module.exports = getAllKeys;
  34430. /***/ }),
  34431. /* 61 */
  34432. /***/ (function(module, exports, __webpack_require__) {
  34433. var baseIsArguments = __webpack_require__(178),
  34434. isObjectLike = __webpack_require__(8);
  34435. /** Used for built-in method references. */
  34436. var objectProto = Object.prototype;
  34437. /** Used to check objects for own properties. */
  34438. var hasOwnProperty = objectProto.hasOwnProperty;
  34439. /** Built-in value references. */
  34440. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  34441. /**
  34442. * Checks if `value` is likely an `arguments` object.
  34443. *
  34444. * @static
  34445. * @memberOf _
  34446. * @since 0.1.0
  34447. * @category Lang
  34448. * @param {*} value The value to check.
  34449. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  34450. * else `false`.
  34451. * @example
  34452. *
  34453. * _.isArguments(function() { return arguments; }());
  34454. * // => true
  34455. *
  34456. * _.isArguments([1, 2, 3]);
  34457. * // => false
  34458. */
  34459. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  34460. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  34461. !propertyIsEnumerable.call(value, 'callee');
  34462. };
  34463. module.exports = isArguments;
  34464. /***/ }),
  34465. /* 62 */
  34466. /***/ (function(module, exports) {
  34467. /** Used as references for various `Number` constants. */
  34468. var MAX_SAFE_INTEGER = 9007199254740991;
  34469. /** Used to detect unsigned integer values. */
  34470. var reIsUint = /^(?:0|[1-9]\d*)$/;
  34471. /**
  34472. * Checks if `value` is a valid array-like index.
  34473. *
  34474. * @private
  34475. * @param {*} value The value to check.
  34476. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  34477. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  34478. */
  34479. function isIndex(value, length) {
  34480. var type = typeof value;
  34481. length = length == null ? MAX_SAFE_INTEGER : length;
  34482. return !!length &&
  34483. (type == 'number' ||
  34484. (type != 'symbol' && reIsUint.test(value))) &&
  34485. (value > -1 && value % 1 == 0 && value < length);
  34486. }
  34487. module.exports = isIndex;
  34488. /***/ }),
  34489. /* 63 */
  34490. /***/ (function(module, exports, __webpack_require__) {
  34491. var baseIsTypedArray = __webpack_require__(180),
  34492. baseUnary = __webpack_require__(20),
  34493. nodeUtil = __webpack_require__(26);
  34494. /* Node.js helper references. */
  34495. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  34496. /**
  34497. * Checks if `value` is classified as a typed array.
  34498. *
  34499. * @static
  34500. * @memberOf _
  34501. * @since 3.0.0
  34502. * @category Lang
  34503. * @param {*} value The value to check.
  34504. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  34505. * @example
  34506. *
  34507. * _.isTypedArray(new Uint8Array);
  34508. * // => true
  34509. *
  34510. * _.isTypedArray([]);
  34511. * // => false
  34512. */
  34513. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  34514. module.exports = isTypedArray;
  34515. /***/ }),
  34516. /* 64 */
  34517. /***/ (function(module, exports, __webpack_require__) {
  34518. var disposed = false
  34519. function injectStyle (ssrContext) {
  34520. if (disposed) return
  34521. __webpack_require__(188)
  34522. }
  34523. var normalizeComponent = __webpack_require__(2)
  34524. /* script */
  34525. var __vue_script__ = __webpack_require__(190)
  34526. /* template */
  34527. var __vue_template__ = __webpack_require__(191)
  34528. /* template functional */
  34529. var __vue_template_functional__ = false
  34530. /* styles */
  34531. var __vue_styles__ = injectStyle
  34532. /* scopeId */
  34533. var __vue_scopeId__ = "data-v-1fd3fc13"
  34534. /* moduleIdentifier (server only) */
  34535. var __vue_module_identifier__ = null
  34536. var Component = normalizeComponent(
  34537. __vue_script__,
  34538. __vue_template__,
  34539. __vue_template_functional__,
  34540. __vue_styles__,
  34541. __vue_scopeId__,
  34542. __vue_module_identifier__
  34543. )
  34544. Component.options.__file = "resources/assets/js/main/components/report/content.vue"
  34545. /* hot reload */
  34546. if (false) {(function () {
  34547. var hotAPI = require("vue-hot-reload-api")
  34548. hotAPI.install(require("vue"), false)
  34549. if (!hotAPI.compatible) return
  34550. module.hot.accept()
  34551. if (!module.hot.data) {
  34552. hotAPI.createRecord("data-v-1fd3fc13", Component.options)
  34553. } else {
  34554. hotAPI.reload("data-v-1fd3fc13", Component.options)
  34555. }
  34556. module.hot.dispose(function (data) {
  34557. disposed = true
  34558. })
  34559. })()}
  34560. module.exports = Component.exports
  34561. /***/ }),
  34562. /* 65 */
  34563. /***/ (function(module, exports, __webpack_require__) {
  34564. __webpack_require__(66);
  34565. module.exports = __webpack_require__(285);
  34566. /***/ }),
  34567. /* 66 */
  34568. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34569. "use strict";
  34570. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  34571. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(4);
  34572. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__);
  34573. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_vue__ = __webpack_require__(69);
  34574. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__App_vue__);
  34575. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routes__ = __webpack_require__(136);
  34576. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue_router__ = __webpack_require__(192);
  34577. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_view_design__ = __webpack_require__(193);
  34578. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_view_design___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_view_design__);
  34579. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__modules_language__ = __webpack_require__(194);
  34580. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__modules_mixins__ = __webpack_require__(197);
  34581. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common__ = __webpack_require__(198);
  34582. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__common___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__common__);
  34583. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__main__ = __webpack_require__(199);
  34584. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__components_Title_vue__ = __webpack_require__(202);
  34585. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__components_Title_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__components_Title_vue__);
  34586. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__components_sreachTitle_vue__ = __webpack_require__(205);
  34587. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__components_sreachTitle_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__components_sreachTitle_vue__);
  34588. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__components_UserInput__ = __webpack_require__(208);
  34589. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__components_UserInput___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__components_UserInput__);
  34590. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__components_UserView__ = __webpack_require__(219);
  34591. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__components_UserView___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__components_UserView__);
  34592. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__components_UserImg__ = __webpack_require__(226);
  34593. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__components_UserImg___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13__components_UserImg__);
  34594. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__components_WLoading__ = __webpack_require__(231);
  34595. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__components_WLoading___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14__components_WLoading__);
  34596. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__components_project_task_detail__ = __webpack_require__(236);
  34597. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__components_report_detail__ = __webpack_require__(281);
  34598. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  34599. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.use(__WEBPACK_IMPORTED_MODULE_3_vue_router__["a" /* default */]);
  34600. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.use(__WEBPACK_IMPORTED_MODULE_4_view_design___default.a);
  34601. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.use(__WEBPACK_IMPORTED_MODULE_5__modules_language__["a" /* default */]);
  34602. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.use(__WEBPACK_IMPORTED_MODULE_6__modules_mixins__["a" /* default */]);
  34603. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.component('VTitle', __WEBPACK_IMPORTED_MODULE_9__components_Title_vue___default.a);
  34604. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.component('sreachTitle', __WEBPACK_IMPORTED_MODULE_10__components_sreachTitle_vue___default.a);
  34605. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.component('UserInput', __WEBPACK_IMPORTED_MODULE_11__components_UserInput___default.a);
  34606. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.component('UserView', __WEBPACK_IMPORTED_MODULE_12__components_UserView___default.a);
  34607. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.component('UserImg', __WEBPACK_IMPORTED_MODULE_13__components_UserImg___default.a);
  34608. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.component('WLoading', __WEBPACK_IMPORTED_MODULE_14__components_WLoading___default.a);
  34609. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.prototype.taskDetail = __WEBPACK_IMPORTED_MODULE_15__components_project_task_detail__["a" /* default */];
  34610. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.prototype.reportDetail = __WEBPACK_IMPORTED_MODULE_16__components_report_detail__["a" /* default */];
  34611. var originalPush = __WEBPACK_IMPORTED_MODULE_3_vue_router__["a" /* default */].prototype.push;
  34612. __WEBPACK_IMPORTED_MODULE_3_vue_router__["a" /* default */].prototype.push = function push(location) {
  34613. return originalPush.call(this, location).catch(function (err) {
  34614. return err;
  34615. });
  34616. };
  34617. var router = new __WEBPACK_IMPORTED_MODULE_3_vue_router__["a" /* default */]({
  34618. mode: 'history',
  34619. routes: __WEBPACK_IMPORTED_MODULE_2__routes__["a" /* default */]
  34620. });
  34621. //进度条配置
  34622. __WEBPACK_IMPORTED_MODULE_4_view_design___default.a.LoadingBar.config({
  34623. color: '#3fcc25',
  34624. failedColor: '#ff0000'
  34625. });
  34626. router.beforeEach(function (to, from, next) {
  34627. __WEBPACK_IMPORTED_MODULE_4_view_design___default.a.LoadingBar.start();
  34628. next();
  34629. });
  34630. router.afterEach(function (to, from, next) {
  34631. __WEBPACK_IMPORTED_MODULE_4_view_design___default.a.LoadingBar.finish();
  34632. });
  34633. //加载函数
  34634. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.prototype.goForward = function (location, isReplace) {
  34635. if (typeof location === 'string') location = { name: location };
  34636. if (isReplace === true) {
  34637. this.$router.replace(location);
  34638. } else {
  34639. this.$router.push(location);
  34640. }
  34641. };
  34642. //返回函数
  34643. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.prototype.goBack = function (number) {
  34644. var history = $A.jsonParse(window.sessionStorage['__history__'] || '{}');
  34645. if ($A.runNum(history['::count']) > 2) {
  34646. this.$router.go(typeof number === 'number' ? number : -1);
  34647. } else {
  34648. this.$router.replace((typeof number === 'undefined' ? 'undefined' : _typeof(number)) === "object" ? number : { path: '/' });
  34649. }
  34650. };
  34651. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.prototype.$A = $A;
  34652. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.config.productionTip = false;
  34653. var app = new __WEBPACK_IMPORTED_MODULE_0_vue___default.a({
  34654. el: '#app',
  34655. router: router,
  34656. template: '<App/>',
  34657. components: { App: __WEBPACK_IMPORTED_MODULE_1__App_vue___default.a }
  34658. });
  34659. $A.app = app;
  34660. window.localStorage.setItem("__::WookTeam:check", "success");
  34661. /***/ }),
  34662. /* 67 */
  34663. /***/ (function(module, exports, __webpack_require__) {
  34664. "use strict";
  34665. /* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*!
  34666. * Vue.js v2.6.14
  34667. * (c) 2014-2021 Evan You
  34668. * Released under the MIT License.
  34669. */
  34670. /* */
  34671. var emptyObject = Object.freeze({});
  34672. // These helpers produce better VM code in JS engines due to their
  34673. // explicitness and function inlining.
  34674. function isUndef (v) {
  34675. return v === undefined || v === null
  34676. }
  34677. function isDef (v) {
  34678. return v !== undefined && v !== null
  34679. }
  34680. function isTrue (v) {
  34681. return v === true
  34682. }
  34683. function isFalse (v) {
  34684. return v === false
  34685. }
  34686. /**
  34687. * Check if value is primitive.
  34688. */
  34689. function isPrimitive (value) {
  34690. return (
  34691. typeof value === 'string' ||
  34692. typeof value === 'number' ||
  34693. // $flow-disable-line
  34694. typeof value === 'symbol' ||
  34695. typeof value === 'boolean'
  34696. )
  34697. }
  34698. /**
  34699. * Quick object check - this is primarily used to tell
  34700. * Objects from primitive values when we know the value
  34701. * is a JSON-compliant type.
  34702. */
  34703. function isObject (obj) {
  34704. return obj !== null && typeof obj === 'object'
  34705. }
  34706. /**
  34707. * Get the raw type string of a value, e.g., [object Object].
  34708. */
  34709. var _toString = Object.prototype.toString;
  34710. function toRawType (value) {
  34711. return _toString.call(value).slice(8, -1)
  34712. }
  34713. /**
  34714. * Strict object type check. Only returns true
  34715. * for plain JavaScript objects.
  34716. */
  34717. function isPlainObject (obj) {
  34718. return _toString.call(obj) === '[object Object]'
  34719. }
  34720. function isRegExp (v) {
  34721. return _toString.call(v) === '[object RegExp]'
  34722. }
  34723. /**
  34724. * Check if val is a valid array index.
  34725. */
  34726. function isValidArrayIndex (val) {
  34727. var n = parseFloat(String(val));
  34728. return n >= 0 && Math.floor(n) === n && isFinite(val)
  34729. }
  34730. function isPromise (val) {
  34731. return (
  34732. isDef(val) &&
  34733. typeof val.then === 'function' &&
  34734. typeof val.catch === 'function'
  34735. )
  34736. }
  34737. /**
  34738. * Convert a value to a string that is actually rendered.
  34739. */
  34740. function toString (val) {
  34741. return val == null
  34742. ? ''
  34743. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  34744. ? JSON.stringify(val, null, 2)
  34745. : String(val)
  34746. }
  34747. /**
  34748. * Convert an input value to a number for persistence.
  34749. * If the conversion fails, return original string.
  34750. */
  34751. function toNumber (val) {
  34752. var n = parseFloat(val);
  34753. return isNaN(n) ? val : n
  34754. }
  34755. /**
  34756. * Make a map and return a function for checking if a key
  34757. * is in that map.
  34758. */
  34759. function makeMap (
  34760. str,
  34761. expectsLowerCase
  34762. ) {
  34763. var map = Object.create(null);
  34764. var list = str.split(',');
  34765. for (var i = 0; i < list.length; i++) {
  34766. map[list[i]] = true;
  34767. }
  34768. return expectsLowerCase
  34769. ? function (val) { return map[val.toLowerCase()]; }
  34770. : function (val) { return map[val]; }
  34771. }
  34772. /**
  34773. * Check if a tag is a built-in tag.
  34774. */
  34775. var isBuiltInTag = makeMap('slot,component', true);
  34776. /**
  34777. * Check if an attribute is a reserved attribute.
  34778. */
  34779. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  34780. /**
  34781. * Remove an item from an array.
  34782. */
  34783. function remove (arr, item) {
  34784. if (arr.length) {
  34785. var index = arr.indexOf(item);
  34786. if (index > -1) {
  34787. return arr.splice(index, 1)
  34788. }
  34789. }
  34790. }
  34791. /**
  34792. * Check whether an object has the property.
  34793. */
  34794. var hasOwnProperty = Object.prototype.hasOwnProperty;
  34795. function hasOwn (obj, key) {
  34796. return hasOwnProperty.call(obj, key)
  34797. }
  34798. /**
  34799. * Create a cached version of a pure function.
  34800. */
  34801. function cached (fn) {
  34802. var cache = Object.create(null);
  34803. return (function cachedFn (str) {
  34804. var hit = cache[str];
  34805. return hit || (cache[str] = fn(str))
  34806. })
  34807. }
  34808. /**
  34809. * Camelize a hyphen-delimited string.
  34810. */
  34811. var camelizeRE = /-(\w)/g;
  34812. var camelize = cached(function (str) {
  34813. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  34814. });
  34815. /**
  34816. * Capitalize a string.
  34817. */
  34818. var capitalize = cached(function (str) {
  34819. return str.charAt(0).toUpperCase() + str.slice(1)
  34820. });
  34821. /**
  34822. * Hyphenate a camelCase string.
  34823. */
  34824. var hyphenateRE = /\B([A-Z])/g;
  34825. var hyphenate = cached(function (str) {
  34826. return str.replace(hyphenateRE, '-$1').toLowerCase()
  34827. });
  34828. /**
  34829. * Simple bind polyfill for environments that do not support it,
  34830. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  34831. * since native bind is now performant enough in most browsers.
  34832. * But removing it would mean breaking code that was able to run in
  34833. * PhantomJS 1.x, so this must be kept for backward compatibility.
  34834. */
  34835. /* istanbul ignore next */
  34836. function polyfillBind (fn, ctx) {
  34837. function boundFn (a) {
  34838. var l = arguments.length;
  34839. return l
  34840. ? l > 1
  34841. ? fn.apply(ctx, arguments)
  34842. : fn.call(ctx, a)
  34843. : fn.call(ctx)
  34844. }
  34845. boundFn._length = fn.length;
  34846. return boundFn
  34847. }
  34848. function nativeBind (fn, ctx) {
  34849. return fn.bind(ctx)
  34850. }
  34851. var bind = Function.prototype.bind
  34852. ? nativeBind
  34853. : polyfillBind;
  34854. /**
  34855. * Convert an Array-like object to a real Array.
  34856. */
  34857. function toArray (list, start) {
  34858. start = start || 0;
  34859. var i = list.length - start;
  34860. var ret = new Array(i);
  34861. while (i--) {
  34862. ret[i] = list[i + start];
  34863. }
  34864. return ret
  34865. }
  34866. /**
  34867. * Mix properties into target object.
  34868. */
  34869. function extend (to, _from) {
  34870. for (var key in _from) {
  34871. to[key] = _from[key];
  34872. }
  34873. return to
  34874. }
  34875. /**
  34876. * Merge an Array of Objects into a single Object.
  34877. */
  34878. function toObject (arr) {
  34879. var res = {};
  34880. for (var i = 0; i < arr.length; i++) {
  34881. if (arr[i]) {
  34882. extend(res, arr[i]);
  34883. }
  34884. }
  34885. return res
  34886. }
  34887. /* eslint-disable no-unused-vars */
  34888. /**
  34889. * Perform no operation.
  34890. * Stubbing args to make Flow happy without leaving useless transpiled code
  34891. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  34892. */
  34893. function noop (a, b, c) {}
  34894. /**
  34895. * Always return false.
  34896. */
  34897. var no = function (a, b, c) { return false; };
  34898. /* eslint-enable no-unused-vars */
  34899. /**
  34900. * Return the same value.
  34901. */
  34902. var identity = function (_) { return _; };
  34903. /**
  34904. * Generate a string containing static keys from compiler modules.
  34905. */
  34906. function genStaticKeys (modules) {
  34907. return modules.reduce(function (keys, m) {
  34908. return keys.concat(m.staticKeys || [])
  34909. }, []).join(',')
  34910. }
  34911. /**
  34912. * Check if two values are loosely equal - that is,
  34913. * if they are plain objects, do they have the same shape?
  34914. */
  34915. function looseEqual (a, b) {
  34916. if (a === b) { return true }
  34917. var isObjectA = isObject(a);
  34918. var isObjectB = isObject(b);
  34919. if (isObjectA && isObjectB) {
  34920. try {
  34921. var isArrayA = Array.isArray(a);
  34922. var isArrayB = Array.isArray(b);
  34923. if (isArrayA && isArrayB) {
  34924. return a.length === b.length && a.every(function (e, i) {
  34925. return looseEqual(e, b[i])
  34926. })
  34927. } else if (a instanceof Date && b instanceof Date) {
  34928. return a.getTime() === b.getTime()
  34929. } else if (!isArrayA && !isArrayB) {
  34930. var keysA = Object.keys(a);
  34931. var keysB = Object.keys(b);
  34932. return keysA.length === keysB.length && keysA.every(function (key) {
  34933. return looseEqual(a[key], b[key])
  34934. })
  34935. } else {
  34936. /* istanbul ignore next */
  34937. return false
  34938. }
  34939. } catch (e) {
  34940. /* istanbul ignore next */
  34941. return false
  34942. }
  34943. } else if (!isObjectA && !isObjectB) {
  34944. return String(a) === String(b)
  34945. } else {
  34946. return false
  34947. }
  34948. }
  34949. /**
  34950. * Return the first index at which a loosely equal value can be
  34951. * found in the array (if value is a plain object, the array must
  34952. * contain an object of the same shape), or -1 if it is not present.
  34953. */
  34954. function looseIndexOf (arr, val) {
  34955. for (var i = 0; i < arr.length; i++) {
  34956. if (looseEqual(arr[i], val)) { return i }
  34957. }
  34958. return -1
  34959. }
  34960. /**
  34961. * Ensure a function is called only once.
  34962. */
  34963. function once (fn) {
  34964. var called = false;
  34965. return function () {
  34966. if (!called) {
  34967. called = true;
  34968. fn.apply(this, arguments);
  34969. }
  34970. }
  34971. }
  34972. var SSR_ATTR = 'data-server-rendered';
  34973. var ASSET_TYPES = [
  34974. 'component',
  34975. 'directive',
  34976. 'filter'
  34977. ];
  34978. var LIFECYCLE_HOOKS = [
  34979. 'beforeCreate',
  34980. 'created',
  34981. 'beforeMount',
  34982. 'mounted',
  34983. 'beforeUpdate',
  34984. 'updated',
  34985. 'beforeDestroy',
  34986. 'destroyed',
  34987. 'activated',
  34988. 'deactivated',
  34989. 'errorCaptured',
  34990. 'serverPrefetch'
  34991. ];
  34992. /* */
  34993. var config = ({
  34994. /**
  34995. * Option merge strategies (used in core/util/options)
  34996. */
  34997. // $flow-disable-line
  34998. optionMergeStrategies: Object.create(null),
  34999. /**
  35000. * Whether to suppress warnings.
  35001. */
  35002. silent: false,
  35003. /**
  35004. * Show production mode tip message on boot?
  35005. */
  35006. productionTip: "development" !== 'production',
  35007. /**
  35008. * Whether to enable devtools
  35009. */
  35010. devtools: "development" !== 'production',
  35011. /**
  35012. * Whether to record perf
  35013. */
  35014. performance: false,
  35015. /**
  35016. * Error handler for watcher errors
  35017. */
  35018. errorHandler: null,
  35019. /**
  35020. * Warn handler for watcher warns
  35021. */
  35022. warnHandler: null,
  35023. /**
  35024. * Ignore certain custom elements
  35025. */
  35026. ignoredElements: [],
  35027. /**
  35028. * Custom user key aliases for v-on
  35029. */
  35030. // $flow-disable-line
  35031. keyCodes: Object.create(null),
  35032. /**
  35033. * Check if a tag is reserved so that it cannot be registered as a
  35034. * component. This is platform-dependent and may be overwritten.
  35035. */
  35036. isReservedTag: no,
  35037. /**
  35038. * Check if an attribute is reserved so that it cannot be used as a component
  35039. * prop. This is platform-dependent and may be overwritten.
  35040. */
  35041. isReservedAttr: no,
  35042. /**
  35043. * Check if a tag is an unknown element.
  35044. * Platform-dependent.
  35045. */
  35046. isUnknownElement: no,
  35047. /**
  35048. * Get the namespace of an element
  35049. */
  35050. getTagNamespace: noop,
  35051. /**
  35052. * Parse the real tag name for the specific platform.
  35053. */
  35054. parsePlatformTagName: identity,
  35055. /**
  35056. * Check if an attribute must be bound using property, e.g. value
  35057. * Platform-dependent.
  35058. */
  35059. mustUseProp: no,
  35060. /**
  35061. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  35062. * This will significantly reduce performance if set to false.
  35063. */
  35064. async: true,
  35065. /**
  35066. * Exposed for legacy reasons
  35067. */
  35068. _lifecycleHooks: LIFECYCLE_HOOKS
  35069. });
  35070. /* */
  35071. /**
  35072. * unicode letters used for parsing html tags, component names and property paths.
  35073. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  35074. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  35075. */
  35076. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  35077. /**
  35078. * Check if a string starts with $ or _
  35079. */
  35080. function isReserved (str) {
  35081. var c = (str + '').charCodeAt(0);
  35082. return c === 0x24 || c === 0x5F
  35083. }
  35084. /**
  35085. * Define a property.
  35086. */
  35087. function def (obj, key, val, enumerable) {
  35088. Object.defineProperty(obj, key, {
  35089. value: val,
  35090. enumerable: !!enumerable,
  35091. writable: true,
  35092. configurable: true
  35093. });
  35094. }
  35095. /**
  35096. * Parse simple path.
  35097. */
  35098. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  35099. function parsePath (path) {
  35100. if (bailRE.test(path)) {
  35101. return
  35102. }
  35103. var segments = path.split('.');
  35104. return function (obj) {
  35105. for (var i = 0; i < segments.length; i++) {
  35106. if (!obj) { return }
  35107. obj = obj[segments[i]];
  35108. }
  35109. return obj
  35110. }
  35111. }
  35112. /* */
  35113. // can we use __proto__?
  35114. var hasProto = '__proto__' in {};
  35115. // Browser environment sniffing
  35116. var inBrowser = typeof window !== 'undefined';
  35117. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  35118. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  35119. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  35120. var isIE = UA && /msie|trident/.test(UA);
  35121. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  35122. var isEdge = UA && UA.indexOf('edge/') > 0;
  35123. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  35124. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  35125. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  35126. var isPhantomJS = UA && /phantomjs/.test(UA);
  35127. var isFF = UA && UA.match(/firefox\/(\d+)/);
  35128. // Firefox has a "watch" function on Object.prototype...
  35129. var nativeWatch = ({}).watch;
  35130. var supportsPassive = false;
  35131. if (inBrowser) {
  35132. try {
  35133. var opts = {};
  35134. Object.defineProperty(opts, 'passive', ({
  35135. get: function get () {
  35136. /* istanbul ignore next */
  35137. supportsPassive = true;
  35138. }
  35139. })); // https://github.com/facebook/flow/issues/285
  35140. window.addEventListener('test-passive', null, opts);
  35141. } catch (e) {}
  35142. }
  35143. // this needs to be lazy-evaled because vue may be required before
  35144. // vue-server-renderer can set VUE_ENV
  35145. var _isServer;
  35146. var isServerRendering = function () {
  35147. if (_isServer === undefined) {
  35148. /* istanbul ignore if */
  35149. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  35150. // detect presence of vue-server-renderer and avoid
  35151. // Webpack shimming the process
  35152. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  35153. } else {
  35154. _isServer = false;
  35155. }
  35156. }
  35157. return _isServer
  35158. };
  35159. // detect devtools
  35160. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  35161. /* istanbul ignore next */
  35162. function isNative (Ctor) {
  35163. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  35164. }
  35165. var hasSymbol =
  35166. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  35167. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  35168. var _Set;
  35169. /* istanbul ignore if */ // $flow-disable-line
  35170. if (typeof Set !== 'undefined' && isNative(Set)) {
  35171. // use native Set when available.
  35172. _Set = Set;
  35173. } else {
  35174. // a non-standard Set polyfill that only works with primitive keys.
  35175. _Set = /*@__PURE__*/(function () {
  35176. function Set () {
  35177. this.set = Object.create(null);
  35178. }
  35179. Set.prototype.has = function has (key) {
  35180. return this.set[key] === true
  35181. };
  35182. Set.prototype.add = function add (key) {
  35183. this.set[key] = true;
  35184. };
  35185. Set.prototype.clear = function clear () {
  35186. this.set = Object.create(null);
  35187. };
  35188. return Set;
  35189. }());
  35190. }
  35191. /* */
  35192. var warn = noop;
  35193. var tip = noop;
  35194. var generateComponentTrace = (noop); // work around flow check
  35195. var formatComponentName = (noop);
  35196. {
  35197. var hasConsole = typeof console !== 'undefined';
  35198. var classifyRE = /(?:^|[-_])(\w)/g;
  35199. var classify = function (str) { return str
  35200. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  35201. .replace(/[-_]/g, ''); };
  35202. warn = function (msg, vm) {
  35203. var trace = vm ? generateComponentTrace(vm) : '';
  35204. if (config.warnHandler) {
  35205. config.warnHandler.call(null, msg, vm, trace);
  35206. } else if (hasConsole && (!config.silent)) {
  35207. console.error(("[Vue warn]: " + msg + trace));
  35208. }
  35209. };
  35210. tip = function (msg, vm) {
  35211. if (hasConsole && (!config.silent)) {
  35212. console.warn("[Vue tip]: " + msg + (
  35213. vm ? generateComponentTrace(vm) : ''
  35214. ));
  35215. }
  35216. };
  35217. formatComponentName = function (vm, includeFile) {
  35218. if (vm.$root === vm) {
  35219. return '<Root>'
  35220. }
  35221. var options = typeof vm === 'function' && vm.cid != null
  35222. ? vm.options
  35223. : vm._isVue
  35224. ? vm.$options || vm.constructor.options
  35225. : vm;
  35226. var name = options.name || options._componentTag;
  35227. var file = options.__file;
  35228. if (!name && file) {
  35229. var match = file.match(/([^/\\]+)\.vue$/);
  35230. name = match && match[1];
  35231. }
  35232. return (
  35233. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  35234. (file && includeFile !== false ? (" at " + file) : '')
  35235. )
  35236. };
  35237. var repeat = function (str, n) {
  35238. var res = '';
  35239. while (n) {
  35240. if (n % 2 === 1) { res += str; }
  35241. if (n > 1) { str += str; }
  35242. n >>= 1;
  35243. }
  35244. return res
  35245. };
  35246. generateComponentTrace = function (vm) {
  35247. if (vm._isVue && vm.$parent) {
  35248. var tree = [];
  35249. var currentRecursiveSequence = 0;
  35250. while (vm) {
  35251. if (tree.length > 0) {
  35252. var last = tree[tree.length - 1];
  35253. if (last.constructor === vm.constructor) {
  35254. currentRecursiveSequence++;
  35255. vm = vm.$parent;
  35256. continue
  35257. } else if (currentRecursiveSequence > 0) {
  35258. tree[tree.length - 1] = [last, currentRecursiveSequence];
  35259. currentRecursiveSequence = 0;
  35260. }
  35261. }
  35262. tree.push(vm);
  35263. vm = vm.$parent;
  35264. }
  35265. return '\n\nfound in\n\n' + tree
  35266. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  35267. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  35268. : formatComponentName(vm))); })
  35269. .join('\n')
  35270. } else {
  35271. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  35272. }
  35273. };
  35274. }
  35275. /* */
  35276. var uid = 0;
  35277. /**
  35278. * A dep is an observable that can have multiple
  35279. * directives subscribing to it.
  35280. */
  35281. var Dep = function Dep () {
  35282. this.id = uid++;
  35283. this.subs = [];
  35284. };
  35285. Dep.prototype.addSub = function addSub (sub) {
  35286. this.subs.push(sub);
  35287. };
  35288. Dep.prototype.removeSub = function removeSub (sub) {
  35289. remove(this.subs, sub);
  35290. };
  35291. Dep.prototype.depend = function depend () {
  35292. if (Dep.target) {
  35293. Dep.target.addDep(this);
  35294. }
  35295. };
  35296. Dep.prototype.notify = function notify () {
  35297. // stabilize the subscriber list first
  35298. var subs = this.subs.slice();
  35299. if (!config.async) {
  35300. // subs aren't sorted in scheduler if not running async
  35301. // we need to sort them now to make sure they fire in correct
  35302. // order
  35303. subs.sort(function (a, b) { return a.id - b.id; });
  35304. }
  35305. for (var i = 0, l = subs.length; i < l; i++) {
  35306. subs[i].update();
  35307. }
  35308. };
  35309. // The current target watcher being evaluated.
  35310. // This is globally unique because only one watcher
  35311. // can be evaluated at a time.
  35312. Dep.target = null;
  35313. var targetStack = [];
  35314. function pushTarget (target) {
  35315. targetStack.push(target);
  35316. Dep.target = target;
  35317. }
  35318. function popTarget () {
  35319. targetStack.pop();
  35320. Dep.target = targetStack[targetStack.length - 1];
  35321. }
  35322. /* */
  35323. var VNode = function VNode (
  35324. tag,
  35325. data,
  35326. children,
  35327. text,
  35328. elm,
  35329. context,
  35330. componentOptions,
  35331. asyncFactory
  35332. ) {
  35333. this.tag = tag;
  35334. this.data = data;
  35335. this.children = children;
  35336. this.text = text;
  35337. this.elm = elm;
  35338. this.ns = undefined;
  35339. this.context = context;
  35340. this.fnContext = undefined;
  35341. this.fnOptions = undefined;
  35342. this.fnScopeId = undefined;
  35343. this.key = data && data.key;
  35344. this.componentOptions = componentOptions;
  35345. this.componentInstance = undefined;
  35346. this.parent = undefined;
  35347. this.raw = false;
  35348. this.isStatic = false;
  35349. this.isRootInsert = true;
  35350. this.isComment = false;
  35351. this.isCloned = false;
  35352. this.isOnce = false;
  35353. this.asyncFactory = asyncFactory;
  35354. this.asyncMeta = undefined;
  35355. this.isAsyncPlaceholder = false;
  35356. };
  35357. var prototypeAccessors = { child: { configurable: true } };
  35358. // DEPRECATED: alias for componentInstance for backwards compat.
  35359. /* istanbul ignore next */
  35360. prototypeAccessors.child.get = function () {
  35361. return this.componentInstance
  35362. };
  35363. Object.defineProperties( VNode.prototype, prototypeAccessors );
  35364. var createEmptyVNode = function (text) {
  35365. if ( text === void 0 ) text = '';
  35366. var node = new VNode();
  35367. node.text = text;
  35368. node.isComment = true;
  35369. return node
  35370. };
  35371. function createTextVNode (val) {
  35372. return new VNode(undefined, undefined, undefined, String(val))
  35373. }
  35374. // optimized shallow clone
  35375. // used for static nodes and slot nodes because they may be reused across
  35376. // multiple renders, cloning them avoids errors when DOM manipulations rely
  35377. // on their elm reference.
  35378. function cloneVNode (vnode) {
  35379. var cloned = new VNode(
  35380. vnode.tag,
  35381. vnode.data,
  35382. // #7975
  35383. // clone children array to avoid mutating original in case of cloning
  35384. // a child.
  35385. vnode.children && vnode.children.slice(),
  35386. vnode.text,
  35387. vnode.elm,
  35388. vnode.context,
  35389. vnode.componentOptions,
  35390. vnode.asyncFactory
  35391. );
  35392. cloned.ns = vnode.ns;
  35393. cloned.isStatic = vnode.isStatic;
  35394. cloned.key = vnode.key;
  35395. cloned.isComment = vnode.isComment;
  35396. cloned.fnContext = vnode.fnContext;
  35397. cloned.fnOptions = vnode.fnOptions;
  35398. cloned.fnScopeId = vnode.fnScopeId;
  35399. cloned.asyncMeta = vnode.asyncMeta;
  35400. cloned.isCloned = true;
  35401. return cloned
  35402. }
  35403. /*
  35404. * not type checking this file because flow doesn't play well with
  35405. * dynamically accessing methods on Array prototype
  35406. */
  35407. var arrayProto = Array.prototype;
  35408. var arrayMethods = Object.create(arrayProto);
  35409. var methodsToPatch = [
  35410. 'push',
  35411. 'pop',
  35412. 'shift',
  35413. 'unshift',
  35414. 'splice',
  35415. 'sort',
  35416. 'reverse'
  35417. ];
  35418. /**
  35419. * Intercept mutating methods and emit events
  35420. */
  35421. methodsToPatch.forEach(function (method) {
  35422. // cache original method
  35423. var original = arrayProto[method];
  35424. def(arrayMethods, method, function mutator () {
  35425. var args = [], len = arguments.length;
  35426. while ( len-- ) args[ len ] = arguments[ len ];
  35427. var result = original.apply(this, args);
  35428. var ob = this.__ob__;
  35429. var inserted;
  35430. switch (method) {
  35431. case 'push':
  35432. case 'unshift':
  35433. inserted = args;
  35434. break
  35435. case 'splice':
  35436. inserted = args.slice(2);
  35437. break
  35438. }
  35439. if (inserted) { ob.observeArray(inserted); }
  35440. // notify change
  35441. ob.dep.notify();
  35442. return result
  35443. });
  35444. });
  35445. /* */
  35446. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  35447. /**
  35448. * In some cases we may want to disable observation inside a component's
  35449. * update computation.
  35450. */
  35451. var shouldObserve = true;
  35452. function toggleObserving (value) {
  35453. shouldObserve = value;
  35454. }
  35455. /**
  35456. * Observer class that is attached to each observed
  35457. * object. Once attached, the observer converts the target
  35458. * object's property keys into getter/setters that
  35459. * collect dependencies and dispatch updates.
  35460. */
  35461. var Observer = function Observer (value) {
  35462. this.value = value;
  35463. this.dep = new Dep();
  35464. this.vmCount = 0;
  35465. def(value, '__ob__', this);
  35466. if (Array.isArray(value)) {
  35467. if (hasProto) {
  35468. protoAugment(value, arrayMethods);
  35469. } else {
  35470. copyAugment(value, arrayMethods, arrayKeys);
  35471. }
  35472. this.observeArray(value);
  35473. } else {
  35474. this.walk(value);
  35475. }
  35476. };
  35477. /**
  35478. * Walk through all properties and convert them into
  35479. * getter/setters. This method should only be called when
  35480. * value type is Object.
  35481. */
  35482. Observer.prototype.walk = function walk (obj) {
  35483. var keys = Object.keys(obj);
  35484. for (var i = 0; i < keys.length; i++) {
  35485. defineReactive$$1(obj, keys[i]);
  35486. }
  35487. };
  35488. /**
  35489. * Observe a list of Array items.
  35490. */
  35491. Observer.prototype.observeArray = function observeArray (items) {
  35492. for (var i = 0, l = items.length; i < l; i++) {
  35493. observe(items[i]);
  35494. }
  35495. };
  35496. // helpers
  35497. /**
  35498. * Augment a target Object or Array by intercepting
  35499. * the prototype chain using __proto__
  35500. */
  35501. function protoAugment (target, src) {
  35502. /* eslint-disable no-proto */
  35503. target.__proto__ = src;
  35504. /* eslint-enable no-proto */
  35505. }
  35506. /**
  35507. * Augment a target Object or Array by defining
  35508. * hidden properties.
  35509. */
  35510. /* istanbul ignore next */
  35511. function copyAugment (target, src, keys) {
  35512. for (var i = 0, l = keys.length; i < l; i++) {
  35513. var key = keys[i];
  35514. def(target, key, src[key]);
  35515. }
  35516. }
  35517. /**
  35518. * Attempt to create an observer instance for a value,
  35519. * returns the new observer if successfully observed,
  35520. * or the existing observer if the value already has one.
  35521. */
  35522. function observe (value, asRootData) {
  35523. if (!isObject(value) || value instanceof VNode) {
  35524. return
  35525. }
  35526. var ob;
  35527. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  35528. ob = value.__ob__;
  35529. } else if (
  35530. shouldObserve &&
  35531. !isServerRendering() &&
  35532. (Array.isArray(value) || isPlainObject(value)) &&
  35533. Object.isExtensible(value) &&
  35534. !value._isVue
  35535. ) {
  35536. ob = new Observer(value);
  35537. }
  35538. if (asRootData && ob) {
  35539. ob.vmCount++;
  35540. }
  35541. return ob
  35542. }
  35543. /**
  35544. * Define a reactive property on an Object.
  35545. */
  35546. function defineReactive$$1 (
  35547. obj,
  35548. key,
  35549. val,
  35550. customSetter,
  35551. shallow
  35552. ) {
  35553. var dep = new Dep();
  35554. var property = Object.getOwnPropertyDescriptor(obj, key);
  35555. if (property && property.configurable === false) {
  35556. return
  35557. }
  35558. // cater for pre-defined getter/setters
  35559. var getter = property && property.get;
  35560. var setter = property && property.set;
  35561. if ((!getter || setter) && arguments.length === 2) {
  35562. val = obj[key];
  35563. }
  35564. var childOb = !shallow && observe(val);
  35565. Object.defineProperty(obj, key, {
  35566. enumerable: true,
  35567. configurable: true,
  35568. get: function reactiveGetter () {
  35569. var value = getter ? getter.call(obj) : val;
  35570. if (Dep.target) {
  35571. dep.depend();
  35572. if (childOb) {
  35573. childOb.dep.depend();
  35574. if (Array.isArray(value)) {
  35575. dependArray(value);
  35576. }
  35577. }
  35578. }
  35579. return value
  35580. },
  35581. set: function reactiveSetter (newVal) {
  35582. var value = getter ? getter.call(obj) : val;
  35583. /* eslint-disable no-self-compare */
  35584. if (newVal === value || (newVal !== newVal && value !== value)) {
  35585. return
  35586. }
  35587. /* eslint-enable no-self-compare */
  35588. if (customSetter) {
  35589. customSetter();
  35590. }
  35591. // #7981: for accessor properties without setter
  35592. if (getter && !setter) { return }
  35593. if (setter) {
  35594. setter.call(obj, newVal);
  35595. } else {
  35596. val = newVal;
  35597. }
  35598. childOb = !shallow && observe(newVal);
  35599. dep.notify();
  35600. }
  35601. });
  35602. }
  35603. /**
  35604. * Set a property on an object. Adds the new property and
  35605. * triggers change notification if the property doesn't
  35606. * already exist.
  35607. */
  35608. function set (target, key, val) {
  35609. if (isUndef(target) || isPrimitive(target)
  35610. ) {
  35611. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  35612. }
  35613. if (Array.isArray(target) && isValidArrayIndex(key)) {
  35614. target.length = Math.max(target.length, key);
  35615. target.splice(key, 1, val);
  35616. return val
  35617. }
  35618. if (key in target && !(key in Object.prototype)) {
  35619. target[key] = val;
  35620. return val
  35621. }
  35622. var ob = (target).__ob__;
  35623. if (target._isVue || (ob && ob.vmCount)) {
  35624. warn(
  35625. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  35626. 'at runtime - declare it upfront in the data option.'
  35627. );
  35628. return val
  35629. }
  35630. if (!ob) {
  35631. target[key] = val;
  35632. return val
  35633. }
  35634. defineReactive$$1(ob.value, key, val);
  35635. ob.dep.notify();
  35636. return val
  35637. }
  35638. /**
  35639. * Delete a property and trigger change if necessary.
  35640. */
  35641. function del (target, key) {
  35642. if (isUndef(target) || isPrimitive(target)
  35643. ) {
  35644. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  35645. }
  35646. if (Array.isArray(target) && isValidArrayIndex(key)) {
  35647. target.splice(key, 1);
  35648. return
  35649. }
  35650. var ob = (target).__ob__;
  35651. if (target._isVue || (ob && ob.vmCount)) {
  35652. warn(
  35653. 'Avoid deleting properties on a Vue instance or its root $data ' +
  35654. '- just set it to null.'
  35655. );
  35656. return
  35657. }
  35658. if (!hasOwn(target, key)) {
  35659. return
  35660. }
  35661. delete target[key];
  35662. if (!ob) {
  35663. return
  35664. }
  35665. ob.dep.notify();
  35666. }
  35667. /**
  35668. * Collect dependencies on array elements when the array is touched, since
  35669. * we cannot intercept array element access like property getters.
  35670. */
  35671. function dependArray (value) {
  35672. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  35673. e = value[i];
  35674. e && e.__ob__ && e.__ob__.dep.depend();
  35675. if (Array.isArray(e)) {
  35676. dependArray(e);
  35677. }
  35678. }
  35679. }
  35680. /* */
  35681. /**
  35682. * Option overwriting strategies are functions that handle
  35683. * how to merge a parent option value and a child option
  35684. * value into the final value.
  35685. */
  35686. var strats = config.optionMergeStrategies;
  35687. /**
  35688. * Options with restrictions
  35689. */
  35690. {
  35691. strats.el = strats.propsData = function (parent, child, vm, key) {
  35692. if (!vm) {
  35693. warn(
  35694. "option \"" + key + "\" can only be used during instance " +
  35695. 'creation with the `new` keyword.'
  35696. );
  35697. }
  35698. return defaultStrat(parent, child)
  35699. };
  35700. }
  35701. /**
  35702. * Helper that recursively merges two data objects together.
  35703. */
  35704. function mergeData (to, from) {
  35705. if (!from) { return to }
  35706. var key, toVal, fromVal;
  35707. var keys = hasSymbol
  35708. ? Reflect.ownKeys(from)
  35709. : Object.keys(from);
  35710. for (var i = 0; i < keys.length; i++) {
  35711. key = keys[i];
  35712. // in case the object is already observed...
  35713. if (key === '__ob__') { continue }
  35714. toVal = to[key];
  35715. fromVal = from[key];
  35716. if (!hasOwn(to, key)) {
  35717. set(to, key, fromVal);
  35718. } else if (
  35719. toVal !== fromVal &&
  35720. isPlainObject(toVal) &&
  35721. isPlainObject(fromVal)
  35722. ) {
  35723. mergeData(toVal, fromVal);
  35724. }
  35725. }
  35726. return to
  35727. }
  35728. /**
  35729. * Data
  35730. */
  35731. function mergeDataOrFn (
  35732. parentVal,
  35733. childVal,
  35734. vm
  35735. ) {
  35736. if (!vm) {
  35737. // in a Vue.extend merge, both should be functions
  35738. if (!childVal) {
  35739. return parentVal
  35740. }
  35741. if (!parentVal) {
  35742. return childVal
  35743. }
  35744. // when parentVal & childVal are both present,
  35745. // we need to return a function that returns the
  35746. // merged result of both functions... no need to
  35747. // check if parentVal is a function here because
  35748. // it has to be a function to pass previous merges.
  35749. return function mergedDataFn () {
  35750. return mergeData(
  35751. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  35752. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  35753. )
  35754. }
  35755. } else {
  35756. return function mergedInstanceDataFn () {
  35757. // instance merge
  35758. var instanceData = typeof childVal === 'function'
  35759. ? childVal.call(vm, vm)
  35760. : childVal;
  35761. var defaultData = typeof parentVal === 'function'
  35762. ? parentVal.call(vm, vm)
  35763. : parentVal;
  35764. if (instanceData) {
  35765. return mergeData(instanceData, defaultData)
  35766. } else {
  35767. return defaultData
  35768. }
  35769. }
  35770. }
  35771. }
  35772. strats.data = function (
  35773. parentVal,
  35774. childVal,
  35775. vm
  35776. ) {
  35777. if (!vm) {
  35778. if (childVal && typeof childVal !== 'function') {
  35779. warn(
  35780. 'The "data" option should be a function ' +
  35781. 'that returns a per-instance value in component ' +
  35782. 'definitions.',
  35783. vm
  35784. );
  35785. return parentVal
  35786. }
  35787. return mergeDataOrFn(parentVal, childVal)
  35788. }
  35789. return mergeDataOrFn(parentVal, childVal, vm)
  35790. };
  35791. /**
  35792. * Hooks and props are merged as arrays.
  35793. */
  35794. function mergeHook (
  35795. parentVal,
  35796. childVal
  35797. ) {
  35798. var res = childVal
  35799. ? parentVal
  35800. ? parentVal.concat(childVal)
  35801. : Array.isArray(childVal)
  35802. ? childVal
  35803. : [childVal]
  35804. : parentVal;
  35805. return res
  35806. ? dedupeHooks(res)
  35807. : res
  35808. }
  35809. function dedupeHooks (hooks) {
  35810. var res = [];
  35811. for (var i = 0; i < hooks.length; i++) {
  35812. if (res.indexOf(hooks[i]) === -1) {
  35813. res.push(hooks[i]);
  35814. }
  35815. }
  35816. return res
  35817. }
  35818. LIFECYCLE_HOOKS.forEach(function (hook) {
  35819. strats[hook] = mergeHook;
  35820. });
  35821. /**
  35822. * Assets
  35823. *
  35824. * When a vm is present (instance creation), we need to do
  35825. * a three-way merge between constructor options, instance
  35826. * options and parent options.
  35827. */
  35828. function mergeAssets (
  35829. parentVal,
  35830. childVal,
  35831. vm,
  35832. key
  35833. ) {
  35834. var res = Object.create(parentVal || null);
  35835. if (childVal) {
  35836. assertObjectType(key, childVal, vm);
  35837. return extend(res, childVal)
  35838. } else {
  35839. return res
  35840. }
  35841. }
  35842. ASSET_TYPES.forEach(function (type) {
  35843. strats[type + 's'] = mergeAssets;
  35844. });
  35845. /**
  35846. * Watchers.
  35847. *
  35848. * Watchers hashes should not overwrite one
  35849. * another, so we merge them as arrays.
  35850. */
  35851. strats.watch = function (
  35852. parentVal,
  35853. childVal,
  35854. vm,
  35855. key
  35856. ) {
  35857. // work around Firefox's Object.prototype.watch...
  35858. if (parentVal === nativeWatch) { parentVal = undefined; }
  35859. if (childVal === nativeWatch) { childVal = undefined; }
  35860. /* istanbul ignore if */
  35861. if (!childVal) { return Object.create(parentVal || null) }
  35862. {
  35863. assertObjectType(key, childVal, vm);
  35864. }
  35865. if (!parentVal) { return childVal }
  35866. var ret = {};
  35867. extend(ret, parentVal);
  35868. for (var key$1 in childVal) {
  35869. var parent = ret[key$1];
  35870. var child = childVal[key$1];
  35871. if (parent && !Array.isArray(parent)) {
  35872. parent = [parent];
  35873. }
  35874. ret[key$1] = parent
  35875. ? parent.concat(child)
  35876. : Array.isArray(child) ? child : [child];
  35877. }
  35878. return ret
  35879. };
  35880. /**
  35881. * Other object hashes.
  35882. */
  35883. strats.props =
  35884. strats.methods =
  35885. strats.inject =
  35886. strats.computed = function (
  35887. parentVal,
  35888. childVal,
  35889. vm,
  35890. key
  35891. ) {
  35892. if (childVal && "development" !== 'production') {
  35893. assertObjectType(key, childVal, vm);
  35894. }
  35895. if (!parentVal) { return childVal }
  35896. var ret = Object.create(null);
  35897. extend(ret, parentVal);
  35898. if (childVal) { extend(ret, childVal); }
  35899. return ret
  35900. };
  35901. strats.provide = mergeDataOrFn;
  35902. /**
  35903. * Default strategy.
  35904. */
  35905. var defaultStrat = function (parentVal, childVal) {
  35906. return childVal === undefined
  35907. ? parentVal
  35908. : childVal
  35909. };
  35910. /**
  35911. * Validate component names
  35912. */
  35913. function checkComponents (options) {
  35914. for (var key in options.components) {
  35915. validateComponentName(key);
  35916. }
  35917. }
  35918. function validateComponentName (name) {
  35919. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  35920. warn(
  35921. 'Invalid component name: "' + name + '". Component names ' +
  35922. 'should conform to valid custom element name in html5 specification.'
  35923. );
  35924. }
  35925. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  35926. warn(
  35927. 'Do not use built-in or reserved HTML elements as component ' +
  35928. 'id: ' + name
  35929. );
  35930. }
  35931. }
  35932. /**
  35933. * Ensure all props option syntax are normalized into the
  35934. * Object-based format.
  35935. */
  35936. function normalizeProps (options, vm) {
  35937. var props = options.props;
  35938. if (!props) { return }
  35939. var res = {};
  35940. var i, val, name;
  35941. if (Array.isArray(props)) {
  35942. i = props.length;
  35943. while (i--) {
  35944. val = props[i];
  35945. if (typeof val === 'string') {
  35946. name = camelize(val);
  35947. res[name] = { type: null };
  35948. } else {
  35949. warn('props must be strings when using array syntax.');
  35950. }
  35951. }
  35952. } else if (isPlainObject(props)) {
  35953. for (var key in props) {
  35954. val = props[key];
  35955. name = camelize(key);
  35956. res[name] = isPlainObject(val)
  35957. ? val
  35958. : { type: val };
  35959. }
  35960. } else {
  35961. warn(
  35962. "Invalid value for option \"props\": expected an Array or an Object, " +
  35963. "but got " + (toRawType(props)) + ".",
  35964. vm
  35965. );
  35966. }
  35967. options.props = res;
  35968. }
  35969. /**
  35970. * Normalize all injections into Object-based format
  35971. */
  35972. function normalizeInject (options, vm) {
  35973. var inject = options.inject;
  35974. if (!inject) { return }
  35975. var normalized = options.inject = {};
  35976. if (Array.isArray(inject)) {
  35977. for (var i = 0; i < inject.length; i++) {
  35978. normalized[inject[i]] = { from: inject[i] };
  35979. }
  35980. } else if (isPlainObject(inject)) {
  35981. for (var key in inject) {
  35982. var val = inject[key];
  35983. normalized[key] = isPlainObject(val)
  35984. ? extend({ from: key }, val)
  35985. : { from: val };
  35986. }
  35987. } else {
  35988. warn(
  35989. "Invalid value for option \"inject\": expected an Array or an Object, " +
  35990. "but got " + (toRawType(inject)) + ".",
  35991. vm
  35992. );
  35993. }
  35994. }
  35995. /**
  35996. * Normalize raw function directives into object format.
  35997. */
  35998. function normalizeDirectives (options) {
  35999. var dirs = options.directives;
  36000. if (dirs) {
  36001. for (var key in dirs) {
  36002. var def$$1 = dirs[key];
  36003. if (typeof def$$1 === 'function') {
  36004. dirs[key] = { bind: def$$1, update: def$$1 };
  36005. }
  36006. }
  36007. }
  36008. }
  36009. function assertObjectType (name, value, vm) {
  36010. if (!isPlainObject(value)) {
  36011. warn(
  36012. "Invalid value for option \"" + name + "\": expected an Object, " +
  36013. "but got " + (toRawType(value)) + ".",
  36014. vm
  36015. );
  36016. }
  36017. }
  36018. /**
  36019. * Merge two option objects into a new one.
  36020. * Core utility used in both instantiation and inheritance.
  36021. */
  36022. function mergeOptions (
  36023. parent,
  36024. child,
  36025. vm
  36026. ) {
  36027. {
  36028. checkComponents(child);
  36029. }
  36030. if (typeof child === 'function') {
  36031. child = child.options;
  36032. }
  36033. normalizeProps(child, vm);
  36034. normalizeInject(child, vm);
  36035. normalizeDirectives(child);
  36036. // Apply extends and mixins on the child options,
  36037. // but only if it is a raw options object that isn't
  36038. // the result of another mergeOptions call.
  36039. // Only merged options has the _base property.
  36040. if (!child._base) {
  36041. if (child.extends) {
  36042. parent = mergeOptions(parent, child.extends, vm);
  36043. }
  36044. if (child.mixins) {
  36045. for (var i = 0, l = child.mixins.length; i < l; i++) {
  36046. parent = mergeOptions(parent, child.mixins[i], vm);
  36047. }
  36048. }
  36049. }
  36050. var options = {};
  36051. var key;
  36052. for (key in parent) {
  36053. mergeField(key);
  36054. }
  36055. for (key in child) {
  36056. if (!hasOwn(parent, key)) {
  36057. mergeField(key);
  36058. }
  36059. }
  36060. function mergeField (key) {
  36061. var strat = strats[key] || defaultStrat;
  36062. options[key] = strat(parent[key], child[key], vm, key);
  36063. }
  36064. return options
  36065. }
  36066. /**
  36067. * Resolve an asset.
  36068. * This function is used because child instances need access
  36069. * to assets defined in its ancestor chain.
  36070. */
  36071. function resolveAsset (
  36072. options,
  36073. type,
  36074. id,
  36075. warnMissing
  36076. ) {
  36077. /* istanbul ignore if */
  36078. if (typeof id !== 'string') {
  36079. return
  36080. }
  36081. var assets = options[type];
  36082. // check local registration variations first
  36083. if (hasOwn(assets, id)) { return assets[id] }
  36084. var camelizedId = camelize(id);
  36085. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  36086. var PascalCaseId = capitalize(camelizedId);
  36087. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  36088. // fallback to prototype chain
  36089. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  36090. if (warnMissing && !res) {
  36091. warn(
  36092. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  36093. options
  36094. );
  36095. }
  36096. return res
  36097. }
  36098. /* */
  36099. function validateProp (
  36100. key,
  36101. propOptions,
  36102. propsData,
  36103. vm
  36104. ) {
  36105. var prop = propOptions[key];
  36106. var absent = !hasOwn(propsData, key);
  36107. var value = propsData[key];
  36108. // boolean casting
  36109. var booleanIndex = getTypeIndex(Boolean, prop.type);
  36110. if (booleanIndex > -1) {
  36111. if (absent && !hasOwn(prop, 'default')) {
  36112. value = false;
  36113. } else if (value === '' || value === hyphenate(key)) {
  36114. // only cast empty string / same name to boolean if
  36115. // boolean has higher priority
  36116. var stringIndex = getTypeIndex(String, prop.type);
  36117. if (stringIndex < 0 || booleanIndex < stringIndex) {
  36118. value = true;
  36119. }
  36120. }
  36121. }
  36122. // check default value
  36123. if (value === undefined) {
  36124. value = getPropDefaultValue(vm, prop, key);
  36125. // since the default value is a fresh copy,
  36126. // make sure to observe it.
  36127. var prevShouldObserve = shouldObserve;
  36128. toggleObserving(true);
  36129. observe(value);
  36130. toggleObserving(prevShouldObserve);
  36131. }
  36132. {
  36133. assertProp(prop, key, value, vm, absent);
  36134. }
  36135. return value
  36136. }
  36137. /**
  36138. * Get the default value of a prop.
  36139. */
  36140. function getPropDefaultValue (vm, prop, key) {
  36141. // no default, return undefined
  36142. if (!hasOwn(prop, 'default')) {
  36143. return undefined
  36144. }
  36145. var def = prop.default;
  36146. // warn against non-factory defaults for Object & Array
  36147. if (isObject(def)) {
  36148. warn(
  36149. 'Invalid default value for prop "' + key + '": ' +
  36150. 'Props with type Object/Array must use a factory function ' +
  36151. 'to return the default value.',
  36152. vm
  36153. );
  36154. }
  36155. // the raw prop value was also undefined from previous render,
  36156. // return previous default value to avoid unnecessary watcher trigger
  36157. if (vm && vm.$options.propsData &&
  36158. vm.$options.propsData[key] === undefined &&
  36159. vm._props[key] !== undefined
  36160. ) {
  36161. return vm._props[key]
  36162. }
  36163. // call factory function for non-Function types
  36164. // a value is Function if its prototype is function even across different execution context
  36165. return typeof def === 'function' && getType(prop.type) !== 'Function'
  36166. ? def.call(vm)
  36167. : def
  36168. }
  36169. /**
  36170. * Assert whether a prop is valid.
  36171. */
  36172. function assertProp (
  36173. prop,
  36174. name,
  36175. value,
  36176. vm,
  36177. absent
  36178. ) {
  36179. if (prop.required && absent) {
  36180. warn(
  36181. 'Missing required prop: "' + name + '"',
  36182. vm
  36183. );
  36184. return
  36185. }
  36186. if (value == null && !prop.required) {
  36187. return
  36188. }
  36189. var type = prop.type;
  36190. var valid = !type || type === true;
  36191. var expectedTypes = [];
  36192. if (type) {
  36193. if (!Array.isArray(type)) {
  36194. type = [type];
  36195. }
  36196. for (var i = 0; i < type.length && !valid; i++) {
  36197. var assertedType = assertType(value, type[i], vm);
  36198. expectedTypes.push(assertedType.expectedType || '');
  36199. valid = assertedType.valid;
  36200. }
  36201. }
  36202. var haveExpectedTypes = expectedTypes.some(function (t) { return t; });
  36203. if (!valid && haveExpectedTypes) {
  36204. warn(
  36205. getInvalidTypeMessage(name, value, expectedTypes),
  36206. vm
  36207. );
  36208. return
  36209. }
  36210. var validator = prop.validator;
  36211. if (validator) {
  36212. if (!validator(value)) {
  36213. warn(
  36214. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  36215. vm
  36216. );
  36217. }
  36218. }
  36219. }
  36220. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;
  36221. function assertType (value, type, vm) {
  36222. var valid;
  36223. var expectedType = getType(type);
  36224. if (simpleCheckRE.test(expectedType)) {
  36225. var t = typeof value;
  36226. valid = t === expectedType.toLowerCase();
  36227. // for primitive wrapper objects
  36228. if (!valid && t === 'object') {
  36229. valid = value instanceof type;
  36230. }
  36231. } else if (expectedType === 'Object') {
  36232. valid = isPlainObject(value);
  36233. } else if (expectedType === 'Array') {
  36234. valid = Array.isArray(value);
  36235. } else {
  36236. try {
  36237. valid = value instanceof type;
  36238. } catch (e) {
  36239. warn('Invalid prop type: "' + String(type) + '" is not a constructor', vm);
  36240. valid = false;
  36241. }
  36242. }
  36243. return {
  36244. valid: valid,
  36245. expectedType: expectedType
  36246. }
  36247. }
  36248. var functionTypeCheckRE = /^\s*function (\w+)/;
  36249. /**
  36250. * Use function string name to check built-in types,
  36251. * because a simple equality check will fail when running
  36252. * across different vms / iframes.
  36253. */
  36254. function getType (fn) {
  36255. var match = fn && fn.toString().match(functionTypeCheckRE);
  36256. return match ? match[1] : ''
  36257. }
  36258. function isSameType (a, b) {
  36259. return getType(a) === getType(b)
  36260. }
  36261. function getTypeIndex (type, expectedTypes) {
  36262. if (!Array.isArray(expectedTypes)) {
  36263. return isSameType(expectedTypes, type) ? 0 : -1
  36264. }
  36265. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  36266. if (isSameType(expectedTypes[i], type)) {
  36267. return i
  36268. }
  36269. }
  36270. return -1
  36271. }
  36272. function getInvalidTypeMessage (name, value, expectedTypes) {
  36273. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  36274. " Expected " + (expectedTypes.map(capitalize).join(', '));
  36275. var expectedType = expectedTypes[0];
  36276. var receivedType = toRawType(value);
  36277. // check if we need to specify expected value
  36278. if (
  36279. expectedTypes.length === 1 &&
  36280. isExplicable(expectedType) &&
  36281. isExplicable(typeof value) &&
  36282. !isBoolean(expectedType, receivedType)
  36283. ) {
  36284. message += " with value " + (styleValue(value, expectedType));
  36285. }
  36286. message += ", got " + receivedType + " ";
  36287. // check if we need to specify received value
  36288. if (isExplicable(receivedType)) {
  36289. message += "with value " + (styleValue(value, receivedType)) + ".";
  36290. }
  36291. return message
  36292. }
  36293. function styleValue (value, type) {
  36294. if (type === 'String') {
  36295. return ("\"" + value + "\"")
  36296. } else if (type === 'Number') {
  36297. return ("" + (Number(value)))
  36298. } else {
  36299. return ("" + value)
  36300. }
  36301. }
  36302. var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];
  36303. function isExplicable (value) {
  36304. return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; })
  36305. }
  36306. function isBoolean () {
  36307. var args = [], len = arguments.length;
  36308. while ( len-- ) args[ len ] = arguments[ len ];
  36309. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  36310. }
  36311. /* */
  36312. function handleError (err, vm, info) {
  36313. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  36314. // See: https://github.com/vuejs/vuex/issues/1505
  36315. pushTarget();
  36316. try {
  36317. if (vm) {
  36318. var cur = vm;
  36319. while ((cur = cur.$parent)) {
  36320. var hooks = cur.$options.errorCaptured;
  36321. if (hooks) {
  36322. for (var i = 0; i < hooks.length; i++) {
  36323. try {
  36324. var capture = hooks[i].call(cur, err, vm, info) === false;
  36325. if (capture) { return }
  36326. } catch (e) {
  36327. globalHandleError(e, cur, 'errorCaptured hook');
  36328. }
  36329. }
  36330. }
  36331. }
  36332. }
  36333. globalHandleError(err, vm, info);
  36334. } finally {
  36335. popTarget();
  36336. }
  36337. }
  36338. function invokeWithErrorHandling (
  36339. handler,
  36340. context,
  36341. args,
  36342. vm,
  36343. info
  36344. ) {
  36345. var res;
  36346. try {
  36347. res = args ? handler.apply(context, args) : handler.call(context);
  36348. if (res && !res._isVue && isPromise(res) && !res._handled) {
  36349. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  36350. // issue #9511
  36351. // avoid catch triggering multiple times when nested calls
  36352. res._handled = true;
  36353. }
  36354. } catch (e) {
  36355. handleError(e, vm, info);
  36356. }
  36357. return res
  36358. }
  36359. function globalHandleError (err, vm, info) {
  36360. if (config.errorHandler) {
  36361. try {
  36362. return config.errorHandler.call(null, err, vm, info)
  36363. } catch (e) {
  36364. // if the user intentionally throws the original error in the handler,
  36365. // do not log it twice
  36366. if (e !== err) {
  36367. logError(e, null, 'config.errorHandler');
  36368. }
  36369. }
  36370. }
  36371. logError(err, vm, info);
  36372. }
  36373. function logError (err, vm, info) {
  36374. {
  36375. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  36376. }
  36377. /* istanbul ignore else */
  36378. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  36379. console.error(err);
  36380. } else {
  36381. throw err
  36382. }
  36383. }
  36384. /* */
  36385. var isUsingMicroTask = false;
  36386. var callbacks = [];
  36387. var pending = false;
  36388. function flushCallbacks () {
  36389. pending = false;
  36390. var copies = callbacks.slice(0);
  36391. callbacks.length = 0;
  36392. for (var i = 0; i < copies.length; i++) {
  36393. copies[i]();
  36394. }
  36395. }
  36396. // Here we have async deferring wrappers using microtasks.
  36397. // In 2.5 we used (macro) tasks (in combination with microtasks).
  36398. // However, it has subtle problems when state is changed right before repaint
  36399. // (e.g. #6813, out-in transitions).
  36400. // Also, using (macro) tasks in event handler would cause some weird behaviors
  36401. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  36402. // So we now use microtasks everywhere, again.
  36403. // A major drawback of this tradeoff is that there are some scenarios
  36404. // where microtasks have too high a priority and fire in between supposedly
  36405. // sequential events (e.g. #4521, #6690, which have workarounds)
  36406. // or even between bubbling of the same event (#6566).
  36407. var timerFunc;
  36408. // The nextTick behavior leverages the microtask queue, which can be accessed
  36409. // via either native Promise.then or MutationObserver.
  36410. // MutationObserver has wider support, however it is seriously bugged in
  36411. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  36412. // completely stops working after triggering a few times... so, if native
  36413. // Promise is available, we will use it:
  36414. /* istanbul ignore next, $flow-disable-line */
  36415. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  36416. var p = Promise.resolve();
  36417. timerFunc = function () {
  36418. p.then(flushCallbacks);
  36419. // In problematic UIWebViews, Promise.then doesn't completely break, but
  36420. // it can get stuck in a weird state where callbacks are pushed into the
  36421. // microtask queue but the queue isn't being flushed, until the browser
  36422. // needs to do some other work, e.g. handle a timer. Therefore we can
  36423. // "force" the microtask queue to be flushed by adding an empty timer.
  36424. if (isIOS) { setTimeout(noop); }
  36425. };
  36426. isUsingMicroTask = true;
  36427. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  36428. isNative(MutationObserver) ||
  36429. // PhantomJS and iOS 7.x
  36430. MutationObserver.toString() === '[object MutationObserverConstructor]'
  36431. )) {
  36432. // Use MutationObserver where native Promise is not available,
  36433. // e.g. PhantomJS, iOS7, Android 4.4
  36434. // (#6466 MutationObserver is unreliable in IE11)
  36435. var counter = 1;
  36436. var observer = new MutationObserver(flushCallbacks);
  36437. var textNode = document.createTextNode(String(counter));
  36438. observer.observe(textNode, {
  36439. characterData: true
  36440. });
  36441. timerFunc = function () {
  36442. counter = (counter + 1) % 2;
  36443. textNode.data = String(counter);
  36444. };
  36445. isUsingMicroTask = true;
  36446. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  36447. // Fallback to setImmediate.
  36448. // Technically it leverages the (macro) task queue,
  36449. // but it is still a better choice than setTimeout.
  36450. timerFunc = function () {
  36451. setImmediate(flushCallbacks);
  36452. };
  36453. } else {
  36454. // Fallback to setTimeout.
  36455. timerFunc = function () {
  36456. setTimeout(flushCallbacks, 0);
  36457. };
  36458. }
  36459. function nextTick (cb, ctx) {
  36460. var _resolve;
  36461. callbacks.push(function () {
  36462. if (cb) {
  36463. try {
  36464. cb.call(ctx);
  36465. } catch (e) {
  36466. handleError(e, ctx, 'nextTick');
  36467. }
  36468. } else if (_resolve) {
  36469. _resolve(ctx);
  36470. }
  36471. });
  36472. if (!pending) {
  36473. pending = true;
  36474. timerFunc();
  36475. }
  36476. // $flow-disable-line
  36477. if (!cb && typeof Promise !== 'undefined') {
  36478. return new Promise(function (resolve) {
  36479. _resolve = resolve;
  36480. })
  36481. }
  36482. }
  36483. /* */
  36484. var mark;
  36485. var measure;
  36486. {
  36487. var perf = inBrowser && window.performance;
  36488. /* istanbul ignore if */
  36489. if (
  36490. perf &&
  36491. perf.mark &&
  36492. perf.measure &&
  36493. perf.clearMarks &&
  36494. perf.clearMeasures
  36495. ) {
  36496. mark = function (tag) { return perf.mark(tag); };
  36497. measure = function (name, startTag, endTag) {
  36498. perf.measure(name, startTag, endTag);
  36499. perf.clearMarks(startTag);
  36500. perf.clearMarks(endTag);
  36501. // perf.clearMeasures(name)
  36502. };
  36503. }
  36504. }
  36505. /* not type checking this file because flow doesn't play well with Proxy */
  36506. var initProxy;
  36507. {
  36508. var allowedGlobals = makeMap(
  36509. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  36510. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  36511. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +
  36512. 'require' // for Webpack/Browserify
  36513. );
  36514. var warnNonPresent = function (target, key) {
  36515. warn(
  36516. "Property or method \"" + key + "\" is not defined on the instance but " +
  36517. 'referenced during render. Make sure that this property is reactive, ' +
  36518. 'either in the data option, or for class-based components, by ' +
  36519. 'initializing the property. ' +
  36520. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  36521. target
  36522. );
  36523. };
  36524. var warnReservedPrefix = function (target, key) {
  36525. warn(
  36526. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  36527. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  36528. 'prevent conflicts with Vue internals. ' +
  36529. 'See: https://vuejs.org/v2/api/#data',
  36530. target
  36531. );
  36532. };
  36533. var hasProxy =
  36534. typeof Proxy !== 'undefined' && isNative(Proxy);
  36535. if (hasProxy) {
  36536. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  36537. config.keyCodes = new Proxy(config.keyCodes, {
  36538. set: function set (target, key, value) {
  36539. if (isBuiltInModifier(key)) {
  36540. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  36541. return false
  36542. } else {
  36543. target[key] = value;
  36544. return true
  36545. }
  36546. }
  36547. });
  36548. }
  36549. var hasHandler = {
  36550. has: function has (target, key) {
  36551. var has = key in target;
  36552. var isAllowed = allowedGlobals(key) ||
  36553. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  36554. if (!has && !isAllowed) {
  36555. if (key in target.$data) { warnReservedPrefix(target, key); }
  36556. else { warnNonPresent(target, key); }
  36557. }
  36558. return has || !isAllowed
  36559. }
  36560. };
  36561. var getHandler = {
  36562. get: function get (target, key) {
  36563. if (typeof key === 'string' && !(key in target)) {
  36564. if (key in target.$data) { warnReservedPrefix(target, key); }
  36565. else { warnNonPresent(target, key); }
  36566. }
  36567. return target[key]
  36568. }
  36569. };
  36570. initProxy = function initProxy (vm) {
  36571. if (hasProxy) {
  36572. // determine which proxy handler to use
  36573. var options = vm.$options;
  36574. var handlers = options.render && options.render._withStripped
  36575. ? getHandler
  36576. : hasHandler;
  36577. vm._renderProxy = new Proxy(vm, handlers);
  36578. } else {
  36579. vm._renderProxy = vm;
  36580. }
  36581. };
  36582. }
  36583. /* */
  36584. var seenObjects = new _Set();
  36585. /**
  36586. * Recursively traverse an object to evoke all converted
  36587. * getters, so that every nested property inside the object
  36588. * is collected as a "deep" dependency.
  36589. */
  36590. function traverse (val) {
  36591. _traverse(val, seenObjects);
  36592. seenObjects.clear();
  36593. }
  36594. function _traverse (val, seen) {
  36595. var i, keys;
  36596. var isA = Array.isArray(val);
  36597. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  36598. return
  36599. }
  36600. if (val.__ob__) {
  36601. var depId = val.__ob__.dep.id;
  36602. if (seen.has(depId)) {
  36603. return
  36604. }
  36605. seen.add(depId);
  36606. }
  36607. if (isA) {
  36608. i = val.length;
  36609. while (i--) { _traverse(val[i], seen); }
  36610. } else {
  36611. keys = Object.keys(val);
  36612. i = keys.length;
  36613. while (i--) { _traverse(val[keys[i]], seen); }
  36614. }
  36615. }
  36616. /* */
  36617. var normalizeEvent = cached(function (name) {
  36618. var passive = name.charAt(0) === '&';
  36619. name = passive ? name.slice(1) : name;
  36620. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  36621. name = once$$1 ? name.slice(1) : name;
  36622. var capture = name.charAt(0) === '!';
  36623. name = capture ? name.slice(1) : name;
  36624. return {
  36625. name: name,
  36626. once: once$$1,
  36627. capture: capture,
  36628. passive: passive
  36629. }
  36630. });
  36631. function createFnInvoker (fns, vm) {
  36632. function invoker () {
  36633. var arguments$1 = arguments;
  36634. var fns = invoker.fns;
  36635. if (Array.isArray(fns)) {
  36636. var cloned = fns.slice();
  36637. for (var i = 0; i < cloned.length; i++) {
  36638. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  36639. }
  36640. } else {
  36641. // return handler return value for single handlers
  36642. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  36643. }
  36644. }
  36645. invoker.fns = fns;
  36646. return invoker
  36647. }
  36648. function updateListeners (
  36649. on,
  36650. oldOn,
  36651. add,
  36652. remove$$1,
  36653. createOnceHandler,
  36654. vm
  36655. ) {
  36656. var name, def$$1, cur, old, event;
  36657. for (name in on) {
  36658. def$$1 = cur = on[name];
  36659. old = oldOn[name];
  36660. event = normalizeEvent(name);
  36661. if (isUndef(cur)) {
  36662. warn(
  36663. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  36664. vm
  36665. );
  36666. } else if (isUndef(old)) {
  36667. if (isUndef(cur.fns)) {
  36668. cur = on[name] = createFnInvoker(cur, vm);
  36669. }
  36670. if (isTrue(event.once)) {
  36671. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  36672. }
  36673. add(event.name, cur, event.capture, event.passive, event.params);
  36674. } else if (cur !== old) {
  36675. old.fns = cur;
  36676. on[name] = old;
  36677. }
  36678. }
  36679. for (name in oldOn) {
  36680. if (isUndef(on[name])) {
  36681. event = normalizeEvent(name);
  36682. remove$$1(event.name, oldOn[name], event.capture);
  36683. }
  36684. }
  36685. }
  36686. /* */
  36687. function mergeVNodeHook (def, hookKey, hook) {
  36688. if (def instanceof VNode) {
  36689. def = def.data.hook || (def.data.hook = {});
  36690. }
  36691. var invoker;
  36692. var oldHook = def[hookKey];
  36693. function wrappedHook () {
  36694. hook.apply(this, arguments);
  36695. // important: remove merged hook to ensure it's called only once
  36696. // and prevent memory leak
  36697. remove(invoker.fns, wrappedHook);
  36698. }
  36699. if (isUndef(oldHook)) {
  36700. // no existing hook
  36701. invoker = createFnInvoker([wrappedHook]);
  36702. } else {
  36703. /* istanbul ignore if */
  36704. if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
  36705. // already a merged invoker
  36706. invoker = oldHook;
  36707. invoker.fns.push(wrappedHook);
  36708. } else {
  36709. // existing plain hook
  36710. invoker = createFnInvoker([oldHook, wrappedHook]);
  36711. }
  36712. }
  36713. invoker.merged = true;
  36714. def[hookKey] = invoker;
  36715. }
  36716. /* */
  36717. function extractPropsFromVNodeData (
  36718. data,
  36719. Ctor,
  36720. tag
  36721. ) {
  36722. // we are only extracting raw values here.
  36723. // validation and default values are handled in the child
  36724. // component itself.
  36725. var propOptions = Ctor.options.props;
  36726. if (isUndef(propOptions)) {
  36727. return
  36728. }
  36729. var res = {};
  36730. var attrs = data.attrs;
  36731. var props = data.props;
  36732. if (isDef(attrs) || isDef(props)) {
  36733. for (var key in propOptions) {
  36734. var altKey = hyphenate(key);
  36735. {
  36736. var keyInLowerCase = key.toLowerCase();
  36737. if (
  36738. key !== keyInLowerCase &&
  36739. attrs && hasOwn(attrs, keyInLowerCase)
  36740. ) {
  36741. tip(
  36742. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  36743. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  36744. " \"" + key + "\". " +
  36745. "Note that HTML attributes are case-insensitive and camelCased " +
  36746. "props need to use their kebab-case equivalents when using in-DOM " +
  36747. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  36748. );
  36749. }
  36750. }
  36751. checkProp(res, props, key, altKey, true) ||
  36752. checkProp(res, attrs, key, altKey, false);
  36753. }
  36754. }
  36755. return res
  36756. }
  36757. function checkProp (
  36758. res,
  36759. hash,
  36760. key,
  36761. altKey,
  36762. preserve
  36763. ) {
  36764. if (isDef(hash)) {
  36765. if (hasOwn(hash, key)) {
  36766. res[key] = hash[key];
  36767. if (!preserve) {
  36768. delete hash[key];
  36769. }
  36770. return true
  36771. } else if (hasOwn(hash, altKey)) {
  36772. res[key] = hash[altKey];
  36773. if (!preserve) {
  36774. delete hash[altKey];
  36775. }
  36776. return true
  36777. }
  36778. }
  36779. return false
  36780. }
  36781. /* */
  36782. // The template compiler attempts to minimize the need for normalization by
  36783. // statically analyzing the template at compile time.
  36784. //
  36785. // For plain HTML markup, normalization can be completely skipped because the
  36786. // generated render function is guaranteed to return Array<VNode>. There are
  36787. // two cases where extra normalization is needed:
  36788. // 1. When the children contains components - because a functional component
  36789. // may return an Array instead of a single root. In this case, just a simple
  36790. // normalization is needed - if any child is an Array, we flatten the whole
  36791. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  36792. // because functional components already normalize their own children.
  36793. function simpleNormalizeChildren (children) {
  36794. for (var i = 0; i < children.length; i++) {
  36795. if (Array.isArray(children[i])) {
  36796. return Array.prototype.concat.apply([], children)
  36797. }
  36798. }
  36799. return children
  36800. }
  36801. // 2. When the children contains constructs that always generated nested Arrays,
  36802. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  36803. // with hand-written render functions / JSX. In such cases a full normalization
  36804. // is needed to cater to all possible types of children values.
  36805. function normalizeChildren (children) {
  36806. return isPrimitive(children)
  36807. ? [createTextVNode(children)]
  36808. : Array.isArray(children)
  36809. ? normalizeArrayChildren(children)
  36810. : undefined
  36811. }
  36812. function isTextNode (node) {
  36813. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  36814. }
  36815. function normalizeArrayChildren (children, nestedIndex) {
  36816. var res = [];
  36817. var i, c, lastIndex, last;
  36818. for (i = 0; i < children.length; i++) {
  36819. c = children[i];
  36820. if (isUndef(c) || typeof c === 'boolean') { continue }
  36821. lastIndex = res.length - 1;
  36822. last = res[lastIndex];
  36823. // nested
  36824. if (Array.isArray(c)) {
  36825. if (c.length > 0) {
  36826. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  36827. // merge adjacent text nodes
  36828. if (isTextNode(c[0]) && isTextNode(last)) {
  36829. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  36830. c.shift();
  36831. }
  36832. res.push.apply(res, c);
  36833. }
  36834. } else if (isPrimitive(c)) {
  36835. if (isTextNode(last)) {
  36836. // merge adjacent text nodes
  36837. // this is necessary for SSR hydration because text nodes are
  36838. // essentially merged when rendered to HTML strings
  36839. res[lastIndex] = createTextVNode(last.text + c);
  36840. } else if (c !== '') {
  36841. // convert primitive to vnode
  36842. res.push(createTextVNode(c));
  36843. }
  36844. } else {
  36845. if (isTextNode(c) && isTextNode(last)) {
  36846. // merge adjacent text nodes
  36847. res[lastIndex] = createTextVNode(last.text + c.text);
  36848. } else {
  36849. // default key for nested array children (likely generated by v-for)
  36850. if (isTrue(children._isVList) &&
  36851. isDef(c.tag) &&
  36852. isUndef(c.key) &&
  36853. isDef(nestedIndex)) {
  36854. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  36855. }
  36856. res.push(c);
  36857. }
  36858. }
  36859. }
  36860. return res
  36861. }
  36862. /* */
  36863. function initProvide (vm) {
  36864. var provide = vm.$options.provide;
  36865. if (provide) {
  36866. vm._provided = typeof provide === 'function'
  36867. ? provide.call(vm)
  36868. : provide;
  36869. }
  36870. }
  36871. function initInjections (vm) {
  36872. var result = resolveInject(vm.$options.inject, vm);
  36873. if (result) {
  36874. toggleObserving(false);
  36875. Object.keys(result).forEach(function (key) {
  36876. /* istanbul ignore else */
  36877. {
  36878. defineReactive$$1(vm, key, result[key], function () {
  36879. warn(
  36880. "Avoid mutating an injected value directly since the changes will be " +
  36881. "overwritten whenever the provided component re-renders. " +
  36882. "injection being mutated: \"" + key + "\"",
  36883. vm
  36884. );
  36885. });
  36886. }
  36887. });
  36888. toggleObserving(true);
  36889. }
  36890. }
  36891. function resolveInject (inject, vm) {
  36892. if (inject) {
  36893. // inject is :any because flow is not smart enough to figure out cached
  36894. var result = Object.create(null);
  36895. var keys = hasSymbol
  36896. ? Reflect.ownKeys(inject)
  36897. : Object.keys(inject);
  36898. for (var i = 0; i < keys.length; i++) {
  36899. var key = keys[i];
  36900. // #6574 in case the inject object is observed...
  36901. if (key === '__ob__') { continue }
  36902. var provideKey = inject[key].from;
  36903. var source = vm;
  36904. while (source) {
  36905. if (source._provided && hasOwn(source._provided, provideKey)) {
  36906. result[key] = source._provided[provideKey];
  36907. break
  36908. }
  36909. source = source.$parent;
  36910. }
  36911. if (!source) {
  36912. if ('default' in inject[key]) {
  36913. var provideDefault = inject[key].default;
  36914. result[key] = typeof provideDefault === 'function'
  36915. ? provideDefault.call(vm)
  36916. : provideDefault;
  36917. } else {
  36918. warn(("Injection \"" + key + "\" not found"), vm);
  36919. }
  36920. }
  36921. }
  36922. return result
  36923. }
  36924. }
  36925. /* */
  36926. /**
  36927. * Runtime helper for resolving raw children VNodes into a slot object.
  36928. */
  36929. function resolveSlots (
  36930. children,
  36931. context
  36932. ) {
  36933. if (!children || !children.length) {
  36934. return {}
  36935. }
  36936. var slots = {};
  36937. for (var i = 0, l = children.length; i < l; i++) {
  36938. var child = children[i];
  36939. var data = child.data;
  36940. // remove slot attribute if the node is resolved as a Vue slot node
  36941. if (data && data.attrs && data.attrs.slot) {
  36942. delete data.attrs.slot;
  36943. }
  36944. // named slots should only be respected if the vnode was rendered in the
  36945. // same context.
  36946. if ((child.context === context || child.fnContext === context) &&
  36947. data && data.slot != null
  36948. ) {
  36949. var name = data.slot;
  36950. var slot = (slots[name] || (slots[name] = []));
  36951. if (child.tag === 'template') {
  36952. slot.push.apply(slot, child.children || []);
  36953. } else {
  36954. slot.push(child);
  36955. }
  36956. } else {
  36957. (slots.default || (slots.default = [])).push(child);
  36958. }
  36959. }
  36960. // ignore slots that contains only whitespace
  36961. for (var name$1 in slots) {
  36962. if (slots[name$1].every(isWhitespace)) {
  36963. delete slots[name$1];
  36964. }
  36965. }
  36966. return slots
  36967. }
  36968. function isWhitespace (node) {
  36969. return (node.isComment && !node.asyncFactory) || node.text === ' '
  36970. }
  36971. /* */
  36972. function isAsyncPlaceholder (node) {
  36973. return node.isComment && node.asyncFactory
  36974. }
  36975. /* */
  36976. function normalizeScopedSlots (
  36977. slots,
  36978. normalSlots,
  36979. prevSlots
  36980. ) {
  36981. var res;
  36982. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  36983. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  36984. var key = slots && slots.$key;
  36985. if (!slots) {
  36986. res = {};
  36987. } else if (slots._normalized) {
  36988. // fast path 1: child component re-render only, parent did not change
  36989. return slots._normalized
  36990. } else if (
  36991. isStable &&
  36992. prevSlots &&
  36993. prevSlots !== emptyObject &&
  36994. key === prevSlots.$key &&
  36995. !hasNormalSlots &&
  36996. !prevSlots.$hasNormal
  36997. ) {
  36998. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  36999. // only need to normalize once
  37000. return prevSlots
  37001. } else {
  37002. res = {};
  37003. for (var key$1 in slots) {
  37004. if (slots[key$1] && key$1[0] !== '$') {
  37005. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  37006. }
  37007. }
  37008. }
  37009. // expose normal slots on scopedSlots
  37010. for (var key$2 in normalSlots) {
  37011. if (!(key$2 in res)) {
  37012. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  37013. }
  37014. }
  37015. // avoriaz seems to mock a non-extensible $scopedSlots object
  37016. // and when that is passed down this would cause an error
  37017. if (slots && Object.isExtensible(slots)) {
  37018. (slots)._normalized = res;
  37019. }
  37020. def(res, '$stable', isStable);
  37021. def(res, '$key', key);
  37022. def(res, '$hasNormal', hasNormalSlots);
  37023. return res
  37024. }
  37025. function normalizeScopedSlot(normalSlots, key, fn) {
  37026. var normalized = function () {
  37027. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  37028. res = res && typeof res === 'object' && !Array.isArray(res)
  37029. ? [res] // single vnode
  37030. : normalizeChildren(res);
  37031. var vnode = res && res[0];
  37032. return res && (
  37033. !vnode ||
  37034. (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode)) // #9658, #10391
  37035. ) ? undefined
  37036. : res
  37037. };
  37038. // this is a slot using the new v-slot syntax without scope. although it is
  37039. // compiled as a scoped slot, render fn users would expect it to be present
  37040. // on this.$slots because the usage is semantically a normal slot.
  37041. if (fn.proxy) {
  37042. Object.defineProperty(normalSlots, key, {
  37043. get: normalized,
  37044. enumerable: true,
  37045. configurable: true
  37046. });
  37047. }
  37048. return normalized
  37049. }
  37050. function proxyNormalSlot(slots, key) {
  37051. return function () { return slots[key]; }
  37052. }
  37053. /* */
  37054. /**
  37055. * Runtime helper for rendering v-for lists.
  37056. */
  37057. function renderList (
  37058. val,
  37059. render
  37060. ) {
  37061. var ret, i, l, keys, key;
  37062. if (Array.isArray(val) || typeof val === 'string') {
  37063. ret = new Array(val.length);
  37064. for (i = 0, l = val.length; i < l; i++) {
  37065. ret[i] = render(val[i], i);
  37066. }
  37067. } else if (typeof val === 'number') {
  37068. ret = new Array(val);
  37069. for (i = 0; i < val; i++) {
  37070. ret[i] = render(i + 1, i);
  37071. }
  37072. } else if (isObject(val)) {
  37073. if (hasSymbol && val[Symbol.iterator]) {
  37074. ret = [];
  37075. var iterator = val[Symbol.iterator]();
  37076. var result = iterator.next();
  37077. while (!result.done) {
  37078. ret.push(render(result.value, ret.length));
  37079. result = iterator.next();
  37080. }
  37081. } else {
  37082. keys = Object.keys(val);
  37083. ret = new Array(keys.length);
  37084. for (i = 0, l = keys.length; i < l; i++) {
  37085. key = keys[i];
  37086. ret[i] = render(val[key], key, i);
  37087. }
  37088. }
  37089. }
  37090. if (!isDef(ret)) {
  37091. ret = [];
  37092. }
  37093. (ret)._isVList = true;
  37094. return ret
  37095. }
  37096. /* */
  37097. /**
  37098. * Runtime helper for rendering <slot>
  37099. */
  37100. function renderSlot (
  37101. name,
  37102. fallbackRender,
  37103. props,
  37104. bindObject
  37105. ) {
  37106. var scopedSlotFn = this.$scopedSlots[name];
  37107. var nodes;
  37108. if (scopedSlotFn) {
  37109. // scoped slot
  37110. props = props || {};
  37111. if (bindObject) {
  37112. if (!isObject(bindObject)) {
  37113. warn('slot v-bind without argument expects an Object', this);
  37114. }
  37115. props = extend(extend({}, bindObject), props);
  37116. }
  37117. nodes =
  37118. scopedSlotFn(props) ||
  37119. (typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender);
  37120. } else {
  37121. nodes =
  37122. this.$slots[name] ||
  37123. (typeof fallbackRender === 'function' ? fallbackRender() : fallbackRender);
  37124. }
  37125. var target = props && props.slot;
  37126. if (target) {
  37127. return this.$createElement('template', { slot: target }, nodes)
  37128. } else {
  37129. return nodes
  37130. }
  37131. }
  37132. /* */
  37133. /**
  37134. * Runtime helper for resolving filters
  37135. */
  37136. function resolveFilter (id) {
  37137. return resolveAsset(this.$options, 'filters', id, true) || identity
  37138. }
  37139. /* */
  37140. function isKeyNotMatch (expect, actual) {
  37141. if (Array.isArray(expect)) {
  37142. return expect.indexOf(actual) === -1
  37143. } else {
  37144. return expect !== actual
  37145. }
  37146. }
  37147. /**
  37148. * Runtime helper for checking keyCodes from config.
  37149. * exposed as Vue.prototype._k
  37150. * passing in eventKeyName as last argument separately for backwards compat
  37151. */
  37152. function checkKeyCodes (
  37153. eventKeyCode,
  37154. key,
  37155. builtInKeyCode,
  37156. eventKeyName,
  37157. builtInKeyName
  37158. ) {
  37159. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  37160. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  37161. return isKeyNotMatch(builtInKeyName, eventKeyName)
  37162. } else if (mappedKeyCode) {
  37163. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  37164. } else if (eventKeyName) {
  37165. return hyphenate(eventKeyName) !== key
  37166. }
  37167. return eventKeyCode === undefined
  37168. }
  37169. /* */
  37170. /**
  37171. * Runtime helper for merging v-bind="object" into a VNode's data.
  37172. */
  37173. function bindObjectProps (
  37174. data,
  37175. tag,
  37176. value,
  37177. asProp,
  37178. isSync
  37179. ) {
  37180. if (value) {
  37181. if (!isObject(value)) {
  37182. warn(
  37183. 'v-bind without argument expects an Object or Array value',
  37184. this
  37185. );
  37186. } else {
  37187. if (Array.isArray(value)) {
  37188. value = toObject(value);
  37189. }
  37190. var hash;
  37191. var loop = function ( key ) {
  37192. if (
  37193. key === 'class' ||
  37194. key === 'style' ||
  37195. isReservedAttribute(key)
  37196. ) {
  37197. hash = data;
  37198. } else {
  37199. var type = data.attrs && data.attrs.type;
  37200. hash = asProp || config.mustUseProp(tag, type, key)
  37201. ? data.domProps || (data.domProps = {})
  37202. : data.attrs || (data.attrs = {});
  37203. }
  37204. var camelizedKey = camelize(key);
  37205. var hyphenatedKey = hyphenate(key);
  37206. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  37207. hash[key] = value[key];
  37208. if (isSync) {
  37209. var on = data.on || (data.on = {});
  37210. on[("update:" + key)] = function ($event) {
  37211. value[key] = $event;
  37212. };
  37213. }
  37214. }
  37215. };
  37216. for (var key in value) loop( key );
  37217. }
  37218. }
  37219. return data
  37220. }
  37221. /* */
  37222. /**
  37223. * Runtime helper for rendering static trees.
  37224. */
  37225. function renderStatic (
  37226. index,
  37227. isInFor
  37228. ) {
  37229. var cached = this._staticTrees || (this._staticTrees = []);
  37230. var tree = cached[index];
  37231. // if has already-rendered static tree and not inside v-for,
  37232. // we can reuse the same tree.
  37233. if (tree && !isInFor) {
  37234. return tree
  37235. }
  37236. // otherwise, render a fresh tree.
  37237. tree = cached[index] = this.$options.staticRenderFns[index].call(
  37238. this._renderProxy,
  37239. null,
  37240. this // for render fns generated for functional component templates
  37241. );
  37242. markStatic(tree, ("__static__" + index), false);
  37243. return tree
  37244. }
  37245. /**
  37246. * Runtime helper for v-once.
  37247. * Effectively it means marking the node as static with a unique key.
  37248. */
  37249. function markOnce (
  37250. tree,
  37251. index,
  37252. key
  37253. ) {
  37254. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  37255. return tree
  37256. }
  37257. function markStatic (
  37258. tree,
  37259. key,
  37260. isOnce
  37261. ) {
  37262. if (Array.isArray(tree)) {
  37263. for (var i = 0; i < tree.length; i++) {
  37264. if (tree[i] && typeof tree[i] !== 'string') {
  37265. markStaticNode(tree[i], (key + "_" + i), isOnce);
  37266. }
  37267. }
  37268. } else {
  37269. markStaticNode(tree, key, isOnce);
  37270. }
  37271. }
  37272. function markStaticNode (node, key, isOnce) {
  37273. node.isStatic = true;
  37274. node.key = key;
  37275. node.isOnce = isOnce;
  37276. }
  37277. /* */
  37278. function bindObjectListeners (data, value) {
  37279. if (value) {
  37280. if (!isPlainObject(value)) {
  37281. warn(
  37282. 'v-on without argument expects an Object value',
  37283. this
  37284. );
  37285. } else {
  37286. var on = data.on = data.on ? extend({}, data.on) : {};
  37287. for (var key in value) {
  37288. var existing = on[key];
  37289. var ours = value[key];
  37290. on[key] = existing ? [].concat(existing, ours) : ours;
  37291. }
  37292. }
  37293. }
  37294. return data
  37295. }
  37296. /* */
  37297. function resolveScopedSlots (
  37298. fns, // see flow/vnode
  37299. res,
  37300. // the following are added in 2.6
  37301. hasDynamicKeys,
  37302. contentHashKey
  37303. ) {
  37304. res = res || { $stable: !hasDynamicKeys };
  37305. for (var i = 0; i < fns.length; i++) {
  37306. var slot = fns[i];
  37307. if (Array.isArray(slot)) {
  37308. resolveScopedSlots(slot, res, hasDynamicKeys);
  37309. } else if (slot) {
  37310. // marker for reverse proxying v-slot without scope on this.$slots
  37311. if (slot.proxy) {
  37312. slot.fn.proxy = true;
  37313. }
  37314. res[slot.key] = slot.fn;
  37315. }
  37316. }
  37317. if (contentHashKey) {
  37318. (res).$key = contentHashKey;
  37319. }
  37320. return res
  37321. }
  37322. /* */
  37323. function bindDynamicKeys (baseObj, values) {
  37324. for (var i = 0; i < values.length; i += 2) {
  37325. var key = values[i];
  37326. if (typeof key === 'string' && key) {
  37327. baseObj[values[i]] = values[i + 1];
  37328. } else if (key !== '' && key !== null) {
  37329. // null is a special value for explicitly removing a binding
  37330. warn(
  37331. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  37332. this
  37333. );
  37334. }
  37335. }
  37336. return baseObj
  37337. }
  37338. // helper to dynamically append modifier runtime markers to event names.
  37339. // ensure only append when value is already string, otherwise it will be cast
  37340. // to string and cause the type check to miss.
  37341. function prependModifier (value, symbol) {
  37342. return typeof value === 'string' ? symbol + value : value
  37343. }
  37344. /* */
  37345. function installRenderHelpers (target) {
  37346. target._o = markOnce;
  37347. target._n = toNumber;
  37348. target._s = toString;
  37349. target._l = renderList;
  37350. target._t = renderSlot;
  37351. target._q = looseEqual;
  37352. target._i = looseIndexOf;
  37353. target._m = renderStatic;
  37354. target._f = resolveFilter;
  37355. target._k = checkKeyCodes;
  37356. target._b = bindObjectProps;
  37357. target._v = createTextVNode;
  37358. target._e = createEmptyVNode;
  37359. target._u = resolveScopedSlots;
  37360. target._g = bindObjectListeners;
  37361. target._d = bindDynamicKeys;
  37362. target._p = prependModifier;
  37363. }
  37364. /* */
  37365. function FunctionalRenderContext (
  37366. data,
  37367. props,
  37368. children,
  37369. parent,
  37370. Ctor
  37371. ) {
  37372. var this$1 = this;
  37373. var options = Ctor.options;
  37374. // ensure the createElement function in functional components
  37375. // gets a unique context - this is necessary for correct named slot check
  37376. var contextVm;
  37377. if (hasOwn(parent, '_uid')) {
  37378. contextVm = Object.create(parent);
  37379. // $flow-disable-line
  37380. contextVm._original = parent;
  37381. } else {
  37382. // the context vm passed in is a functional context as well.
  37383. // in this case we want to make sure we are able to get a hold to the
  37384. // real context instance.
  37385. contextVm = parent;
  37386. // $flow-disable-line
  37387. parent = parent._original;
  37388. }
  37389. var isCompiled = isTrue(options._compiled);
  37390. var needNormalization = !isCompiled;
  37391. this.data = data;
  37392. this.props = props;
  37393. this.children = children;
  37394. this.parent = parent;
  37395. this.listeners = data.on || emptyObject;
  37396. this.injections = resolveInject(options.inject, parent);
  37397. this.slots = function () {
  37398. if (!this$1.$slots) {
  37399. normalizeScopedSlots(
  37400. data.scopedSlots,
  37401. this$1.$slots = resolveSlots(children, parent)
  37402. );
  37403. }
  37404. return this$1.$slots
  37405. };
  37406. Object.defineProperty(this, 'scopedSlots', ({
  37407. enumerable: true,
  37408. get: function get () {
  37409. return normalizeScopedSlots(data.scopedSlots, this.slots())
  37410. }
  37411. }));
  37412. // support for compiled functional template
  37413. if (isCompiled) {
  37414. // exposing $options for renderStatic()
  37415. this.$options = options;
  37416. // pre-resolve slots for renderSlot()
  37417. this.$slots = this.slots();
  37418. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  37419. }
  37420. if (options._scopeId) {
  37421. this._c = function (a, b, c, d) {
  37422. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  37423. if (vnode && !Array.isArray(vnode)) {
  37424. vnode.fnScopeId = options._scopeId;
  37425. vnode.fnContext = parent;
  37426. }
  37427. return vnode
  37428. };
  37429. } else {
  37430. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  37431. }
  37432. }
  37433. installRenderHelpers(FunctionalRenderContext.prototype);
  37434. function createFunctionalComponent (
  37435. Ctor,
  37436. propsData,
  37437. data,
  37438. contextVm,
  37439. children
  37440. ) {
  37441. var options = Ctor.options;
  37442. var props = {};
  37443. var propOptions = options.props;
  37444. if (isDef(propOptions)) {
  37445. for (var key in propOptions) {
  37446. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  37447. }
  37448. } else {
  37449. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  37450. if (isDef(data.props)) { mergeProps(props, data.props); }
  37451. }
  37452. var renderContext = new FunctionalRenderContext(
  37453. data,
  37454. props,
  37455. children,
  37456. contextVm,
  37457. Ctor
  37458. );
  37459. var vnode = options.render.call(null, renderContext._c, renderContext);
  37460. if (vnode instanceof VNode) {
  37461. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  37462. } else if (Array.isArray(vnode)) {
  37463. var vnodes = normalizeChildren(vnode) || [];
  37464. var res = new Array(vnodes.length);
  37465. for (var i = 0; i < vnodes.length; i++) {
  37466. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  37467. }
  37468. return res
  37469. }
  37470. }
  37471. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  37472. // #7817 clone node before setting fnContext, otherwise if the node is reused
  37473. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  37474. // that should not be matched to match.
  37475. var clone = cloneVNode(vnode);
  37476. clone.fnContext = contextVm;
  37477. clone.fnOptions = options;
  37478. {
  37479. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  37480. }
  37481. if (data.slot) {
  37482. (clone.data || (clone.data = {})).slot = data.slot;
  37483. }
  37484. return clone
  37485. }
  37486. function mergeProps (to, from) {
  37487. for (var key in from) {
  37488. to[camelize(key)] = from[key];
  37489. }
  37490. }
  37491. /* */
  37492. /* */
  37493. /* */
  37494. /* */
  37495. // inline hooks to be invoked on component VNodes during patch
  37496. var componentVNodeHooks = {
  37497. init: function init (vnode, hydrating) {
  37498. if (
  37499. vnode.componentInstance &&
  37500. !vnode.componentInstance._isDestroyed &&
  37501. vnode.data.keepAlive
  37502. ) {
  37503. // kept-alive components, treat as a patch
  37504. var mountedNode = vnode; // work around flow
  37505. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  37506. } else {
  37507. var child = vnode.componentInstance = createComponentInstanceForVnode(
  37508. vnode,
  37509. activeInstance
  37510. );
  37511. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  37512. }
  37513. },
  37514. prepatch: function prepatch (oldVnode, vnode) {
  37515. var options = vnode.componentOptions;
  37516. var child = vnode.componentInstance = oldVnode.componentInstance;
  37517. updateChildComponent(
  37518. child,
  37519. options.propsData, // updated props
  37520. options.listeners, // updated listeners
  37521. vnode, // new parent vnode
  37522. options.children // new children
  37523. );
  37524. },
  37525. insert: function insert (vnode) {
  37526. var context = vnode.context;
  37527. var componentInstance = vnode.componentInstance;
  37528. if (!componentInstance._isMounted) {
  37529. componentInstance._isMounted = true;
  37530. callHook(componentInstance, 'mounted');
  37531. }
  37532. if (vnode.data.keepAlive) {
  37533. if (context._isMounted) {
  37534. // vue-router#1212
  37535. // During updates, a kept-alive component's child components may
  37536. // change, so directly walking the tree here may call activated hooks
  37537. // on incorrect children. Instead we push them into a queue which will
  37538. // be processed after the whole patch process ended.
  37539. queueActivatedComponent(componentInstance);
  37540. } else {
  37541. activateChildComponent(componentInstance, true /* direct */);
  37542. }
  37543. }
  37544. },
  37545. destroy: function destroy (vnode) {
  37546. var componentInstance = vnode.componentInstance;
  37547. if (!componentInstance._isDestroyed) {
  37548. if (!vnode.data.keepAlive) {
  37549. componentInstance.$destroy();
  37550. } else {
  37551. deactivateChildComponent(componentInstance, true /* direct */);
  37552. }
  37553. }
  37554. }
  37555. };
  37556. var hooksToMerge = Object.keys(componentVNodeHooks);
  37557. function createComponent (
  37558. Ctor,
  37559. data,
  37560. context,
  37561. children,
  37562. tag
  37563. ) {
  37564. if (isUndef(Ctor)) {
  37565. return
  37566. }
  37567. var baseCtor = context.$options._base;
  37568. // plain options object: turn it into a constructor
  37569. if (isObject(Ctor)) {
  37570. Ctor = baseCtor.extend(Ctor);
  37571. }
  37572. // if at this stage it's not a constructor or an async component factory,
  37573. // reject.
  37574. if (typeof Ctor !== 'function') {
  37575. {
  37576. warn(("Invalid Component definition: " + (String(Ctor))), context);
  37577. }
  37578. return
  37579. }
  37580. // async component
  37581. var asyncFactory;
  37582. if (isUndef(Ctor.cid)) {
  37583. asyncFactory = Ctor;
  37584. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  37585. if (Ctor === undefined) {
  37586. // return a placeholder node for async component, which is rendered
  37587. // as a comment node but preserves all the raw information for the node.
  37588. // the information will be used for async server-rendering and hydration.
  37589. return createAsyncPlaceholder(
  37590. asyncFactory,
  37591. data,
  37592. context,
  37593. children,
  37594. tag
  37595. )
  37596. }
  37597. }
  37598. data = data || {};
  37599. // resolve constructor options in case global mixins are applied after
  37600. // component constructor creation
  37601. resolveConstructorOptions(Ctor);
  37602. // transform component v-model data into props & events
  37603. if (isDef(data.model)) {
  37604. transformModel(Ctor.options, data);
  37605. }
  37606. // extract props
  37607. var propsData = extractPropsFromVNodeData(data, Ctor, tag);
  37608. // functional component
  37609. if (isTrue(Ctor.options.functional)) {
  37610. return createFunctionalComponent(Ctor, propsData, data, context, children)
  37611. }
  37612. // extract listeners, since these needs to be treated as
  37613. // child component listeners instead of DOM listeners
  37614. var listeners = data.on;
  37615. // replace with listeners with .native modifier
  37616. // so it gets processed during parent component patch.
  37617. data.on = data.nativeOn;
  37618. if (isTrue(Ctor.options.abstract)) {
  37619. // abstract components do not keep anything
  37620. // other than props & listeners & slot
  37621. // work around flow
  37622. var slot = data.slot;
  37623. data = {};
  37624. if (slot) {
  37625. data.slot = slot;
  37626. }
  37627. }
  37628. // install component management hooks onto the placeholder node
  37629. installComponentHooks(data);
  37630. // return a placeholder vnode
  37631. var name = Ctor.options.name || tag;
  37632. var vnode = new VNode(
  37633. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  37634. data, undefined, undefined, undefined, context,
  37635. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  37636. asyncFactory
  37637. );
  37638. return vnode
  37639. }
  37640. function createComponentInstanceForVnode (
  37641. // we know it's MountedComponentVNode but flow doesn't
  37642. vnode,
  37643. // activeInstance in lifecycle state
  37644. parent
  37645. ) {
  37646. var options = {
  37647. _isComponent: true,
  37648. _parentVnode: vnode,
  37649. parent: parent
  37650. };
  37651. // check inline-template render functions
  37652. var inlineTemplate = vnode.data.inlineTemplate;
  37653. if (isDef(inlineTemplate)) {
  37654. options.render = inlineTemplate.render;
  37655. options.staticRenderFns = inlineTemplate.staticRenderFns;
  37656. }
  37657. return new vnode.componentOptions.Ctor(options)
  37658. }
  37659. function installComponentHooks (data) {
  37660. var hooks = data.hook || (data.hook = {});
  37661. for (var i = 0; i < hooksToMerge.length; i++) {
  37662. var key = hooksToMerge[i];
  37663. var existing = hooks[key];
  37664. var toMerge = componentVNodeHooks[key];
  37665. if (existing !== toMerge && !(existing && existing._merged)) {
  37666. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  37667. }
  37668. }
  37669. }
  37670. function mergeHook$1 (f1, f2) {
  37671. var merged = function (a, b) {
  37672. // flow complains about extra args which is why we use any
  37673. f1(a, b);
  37674. f2(a, b);
  37675. };
  37676. merged._merged = true;
  37677. return merged
  37678. }
  37679. // transform component v-model info (value and callback) into
  37680. // prop and event handler respectively.
  37681. function transformModel (options, data) {
  37682. var prop = (options.model && options.model.prop) || 'value';
  37683. var event = (options.model && options.model.event) || 'input'
  37684. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  37685. var on = data.on || (data.on = {});
  37686. var existing = on[event];
  37687. var callback = data.model.callback;
  37688. if (isDef(existing)) {
  37689. if (
  37690. Array.isArray(existing)
  37691. ? existing.indexOf(callback) === -1
  37692. : existing !== callback
  37693. ) {
  37694. on[event] = [callback].concat(existing);
  37695. }
  37696. } else {
  37697. on[event] = callback;
  37698. }
  37699. }
  37700. /* */
  37701. var SIMPLE_NORMALIZE = 1;
  37702. var ALWAYS_NORMALIZE = 2;
  37703. // wrapper function for providing a more flexible interface
  37704. // without getting yelled at by flow
  37705. function createElement (
  37706. context,
  37707. tag,
  37708. data,
  37709. children,
  37710. normalizationType,
  37711. alwaysNormalize
  37712. ) {
  37713. if (Array.isArray(data) || isPrimitive(data)) {
  37714. normalizationType = children;
  37715. children = data;
  37716. data = undefined;
  37717. }
  37718. if (isTrue(alwaysNormalize)) {
  37719. normalizationType = ALWAYS_NORMALIZE;
  37720. }
  37721. return _createElement(context, tag, data, children, normalizationType)
  37722. }
  37723. function _createElement (
  37724. context,
  37725. tag,
  37726. data,
  37727. children,
  37728. normalizationType
  37729. ) {
  37730. if (isDef(data) && isDef((data).__ob__)) {
  37731. warn(
  37732. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  37733. 'Always create fresh vnode data objects in each render!',
  37734. context
  37735. );
  37736. return createEmptyVNode()
  37737. }
  37738. // object syntax in v-bind
  37739. if (isDef(data) && isDef(data.is)) {
  37740. tag = data.is;
  37741. }
  37742. if (!tag) {
  37743. // in case of component :is set to falsy value
  37744. return createEmptyVNode()
  37745. }
  37746. // warn against non-primitive key
  37747. if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  37748. ) {
  37749. {
  37750. warn(
  37751. 'Avoid using non-primitive value as key, ' +
  37752. 'use string/number value instead.',
  37753. context
  37754. );
  37755. }
  37756. }
  37757. // support single function children as default scoped slot
  37758. if (Array.isArray(children) &&
  37759. typeof children[0] === 'function'
  37760. ) {
  37761. data = data || {};
  37762. data.scopedSlots = { default: children[0] };
  37763. children.length = 0;
  37764. }
  37765. if (normalizationType === ALWAYS_NORMALIZE) {
  37766. children = normalizeChildren(children);
  37767. } else if (normalizationType === SIMPLE_NORMALIZE) {
  37768. children = simpleNormalizeChildren(children);
  37769. }
  37770. var vnode, ns;
  37771. if (typeof tag === 'string') {
  37772. var Ctor;
  37773. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  37774. if (config.isReservedTag(tag)) {
  37775. // platform built-in elements
  37776. if (isDef(data) && isDef(data.nativeOn) && data.tag !== 'component') {
  37777. warn(
  37778. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  37779. context
  37780. );
  37781. }
  37782. vnode = new VNode(
  37783. config.parsePlatformTagName(tag), data, children,
  37784. undefined, undefined, context
  37785. );
  37786. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  37787. // component
  37788. vnode = createComponent(Ctor, data, context, children, tag);
  37789. } else {
  37790. // unknown or unlisted namespaced elements
  37791. // check at runtime because it may get assigned a namespace when its
  37792. // parent normalizes children
  37793. vnode = new VNode(
  37794. tag, data, children,
  37795. undefined, undefined, context
  37796. );
  37797. }
  37798. } else {
  37799. // direct component options / constructor
  37800. vnode = createComponent(tag, data, context, children);
  37801. }
  37802. if (Array.isArray(vnode)) {
  37803. return vnode
  37804. } else if (isDef(vnode)) {
  37805. if (isDef(ns)) { applyNS(vnode, ns); }
  37806. if (isDef(data)) { registerDeepBindings(data); }
  37807. return vnode
  37808. } else {
  37809. return createEmptyVNode()
  37810. }
  37811. }
  37812. function applyNS (vnode, ns, force) {
  37813. vnode.ns = ns;
  37814. if (vnode.tag === 'foreignObject') {
  37815. // use default namespace inside foreignObject
  37816. ns = undefined;
  37817. force = true;
  37818. }
  37819. if (isDef(vnode.children)) {
  37820. for (var i = 0, l = vnode.children.length; i < l; i++) {
  37821. var child = vnode.children[i];
  37822. if (isDef(child.tag) && (
  37823. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  37824. applyNS(child, ns, force);
  37825. }
  37826. }
  37827. }
  37828. }
  37829. // ref #5318
  37830. // necessary to ensure parent re-render when deep bindings like :style and
  37831. // :class are used on slot nodes
  37832. function registerDeepBindings (data) {
  37833. if (isObject(data.style)) {
  37834. traverse(data.style);
  37835. }
  37836. if (isObject(data.class)) {
  37837. traverse(data.class);
  37838. }
  37839. }
  37840. /* */
  37841. function initRender (vm) {
  37842. vm._vnode = null; // the root of the child tree
  37843. vm._staticTrees = null; // v-once cached trees
  37844. var options = vm.$options;
  37845. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  37846. var renderContext = parentVnode && parentVnode.context;
  37847. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  37848. vm.$scopedSlots = emptyObject;
  37849. // bind the createElement fn to this instance
  37850. // so that we get proper render context inside it.
  37851. // args order: tag, data, children, normalizationType, alwaysNormalize
  37852. // internal version is used by render functions compiled from templates
  37853. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  37854. // normalization is always applied for the public version, used in
  37855. // user-written render functions.
  37856. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  37857. // $attrs & $listeners are exposed for easier HOC creation.
  37858. // they need to be reactive so that HOCs using them are always updated
  37859. var parentData = parentVnode && parentVnode.data;
  37860. /* istanbul ignore else */
  37861. {
  37862. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  37863. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  37864. }, true);
  37865. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  37866. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  37867. }, true);
  37868. }
  37869. }
  37870. var currentRenderingInstance = null;
  37871. function renderMixin (Vue) {
  37872. // install runtime convenience helpers
  37873. installRenderHelpers(Vue.prototype);
  37874. Vue.prototype.$nextTick = function (fn) {
  37875. return nextTick(fn, this)
  37876. };
  37877. Vue.prototype._render = function () {
  37878. var vm = this;
  37879. var ref = vm.$options;
  37880. var render = ref.render;
  37881. var _parentVnode = ref._parentVnode;
  37882. if (_parentVnode) {
  37883. vm.$scopedSlots = normalizeScopedSlots(
  37884. _parentVnode.data.scopedSlots,
  37885. vm.$slots,
  37886. vm.$scopedSlots
  37887. );
  37888. }
  37889. // set parent vnode. this allows render functions to have access
  37890. // to the data on the placeholder node.
  37891. vm.$vnode = _parentVnode;
  37892. // render self
  37893. var vnode;
  37894. try {
  37895. // There's no need to maintain a stack because all render fns are called
  37896. // separately from one another. Nested component's render fns are called
  37897. // when parent component is patched.
  37898. currentRenderingInstance = vm;
  37899. vnode = render.call(vm._renderProxy, vm.$createElement);
  37900. } catch (e) {
  37901. handleError(e, vm, "render");
  37902. // return error render result,
  37903. // or previous vnode to prevent render error causing blank component
  37904. /* istanbul ignore else */
  37905. if (vm.$options.renderError) {
  37906. try {
  37907. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  37908. } catch (e) {
  37909. handleError(e, vm, "renderError");
  37910. vnode = vm._vnode;
  37911. }
  37912. } else {
  37913. vnode = vm._vnode;
  37914. }
  37915. } finally {
  37916. currentRenderingInstance = null;
  37917. }
  37918. // if the returned array contains only a single node, allow it
  37919. if (Array.isArray(vnode) && vnode.length === 1) {
  37920. vnode = vnode[0];
  37921. }
  37922. // return empty vnode in case the render function errored out
  37923. if (!(vnode instanceof VNode)) {
  37924. if (Array.isArray(vnode)) {
  37925. warn(
  37926. 'Multiple root nodes returned from render function. Render function ' +
  37927. 'should return a single root node.',
  37928. vm
  37929. );
  37930. }
  37931. vnode = createEmptyVNode();
  37932. }
  37933. // set parent
  37934. vnode.parent = _parentVnode;
  37935. return vnode
  37936. };
  37937. }
  37938. /* */
  37939. function ensureCtor (comp, base) {
  37940. if (
  37941. comp.__esModule ||
  37942. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  37943. ) {
  37944. comp = comp.default;
  37945. }
  37946. return isObject(comp)
  37947. ? base.extend(comp)
  37948. : comp
  37949. }
  37950. function createAsyncPlaceholder (
  37951. factory,
  37952. data,
  37953. context,
  37954. children,
  37955. tag
  37956. ) {
  37957. var node = createEmptyVNode();
  37958. node.asyncFactory = factory;
  37959. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  37960. return node
  37961. }
  37962. function resolveAsyncComponent (
  37963. factory,
  37964. baseCtor
  37965. ) {
  37966. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  37967. return factory.errorComp
  37968. }
  37969. if (isDef(factory.resolved)) {
  37970. return factory.resolved
  37971. }
  37972. var owner = currentRenderingInstance;
  37973. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  37974. // already pending
  37975. factory.owners.push(owner);
  37976. }
  37977. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  37978. return factory.loadingComp
  37979. }
  37980. if (owner && !isDef(factory.owners)) {
  37981. var owners = factory.owners = [owner];
  37982. var sync = true;
  37983. var timerLoading = null;
  37984. var timerTimeout = null
  37985. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  37986. var forceRender = function (renderCompleted) {
  37987. for (var i = 0, l = owners.length; i < l; i++) {
  37988. (owners[i]).$forceUpdate();
  37989. }
  37990. if (renderCompleted) {
  37991. owners.length = 0;
  37992. if (timerLoading !== null) {
  37993. clearTimeout(timerLoading);
  37994. timerLoading = null;
  37995. }
  37996. if (timerTimeout !== null) {
  37997. clearTimeout(timerTimeout);
  37998. timerTimeout = null;
  37999. }
  38000. }
  38001. };
  38002. var resolve = once(function (res) {
  38003. // cache resolved
  38004. factory.resolved = ensureCtor(res, baseCtor);
  38005. // invoke callbacks only if this is not a synchronous resolve
  38006. // (async resolves are shimmed as synchronous during SSR)
  38007. if (!sync) {
  38008. forceRender(true);
  38009. } else {
  38010. owners.length = 0;
  38011. }
  38012. });
  38013. var reject = once(function (reason) {
  38014. warn(
  38015. "Failed to resolve async component: " + (String(factory)) +
  38016. (reason ? ("\nReason: " + reason) : '')
  38017. );
  38018. if (isDef(factory.errorComp)) {
  38019. factory.error = true;
  38020. forceRender(true);
  38021. }
  38022. });
  38023. var res = factory(resolve, reject);
  38024. if (isObject(res)) {
  38025. if (isPromise(res)) {
  38026. // () => Promise
  38027. if (isUndef(factory.resolved)) {
  38028. res.then(resolve, reject);
  38029. }
  38030. } else if (isPromise(res.component)) {
  38031. res.component.then(resolve, reject);
  38032. if (isDef(res.error)) {
  38033. factory.errorComp = ensureCtor(res.error, baseCtor);
  38034. }
  38035. if (isDef(res.loading)) {
  38036. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  38037. if (res.delay === 0) {
  38038. factory.loading = true;
  38039. } else {
  38040. timerLoading = setTimeout(function () {
  38041. timerLoading = null;
  38042. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  38043. factory.loading = true;
  38044. forceRender(false);
  38045. }
  38046. }, res.delay || 200);
  38047. }
  38048. }
  38049. if (isDef(res.timeout)) {
  38050. timerTimeout = setTimeout(function () {
  38051. timerTimeout = null;
  38052. if (isUndef(factory.resolved)) {
  38053. reject(
  38054. "timeout (" + (res.timeout) + "ms)"
  38055. );
  38056. }
  38057. }, res.timeout);
  38058. }
  38059. }
  38060. }
  38061. sync = false;
  38062. // return in case resolved synchronously
  38063. return factory.loading
  38064. ? factory.loadingComp
  38065. : factory.resolved
  38066. }
  38067. }
  38068. /* */
  38069. function getFirstComponentChild (children) {
  38070. if (Array.isArray(children)) {
  38071. for (var i = 0; i < children.length; i++) {
  38072. var c = children[i];
  38073. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  38074. return c
  38075. }
  38076. }
  38077. }
  38078. }
  38079. /* */
  38080. /* */
  38081. function initEvents (vm) {
  38082. vm._events = Object.create(null);
  38083. vm._hasHookEvent = false;
  38084. // init parent attached events
  38085. var listeners = vm.$options._parentListeners;
  38086. if (listeners) {
  38087. updateComponentListeners(vm, listeners);
  38088. }
  38089. }
  38090. var target;
  38091. function add (event, fn) {
  38092. target.$on(event, fn);
  38093. }
  38094. function remove$1 (event, fn) {
  38095. target.$off(event, fn);
  38096. }
  38097. function createOnceHandler (event, fn) {
  38098. var _target = target;
  38099. return function onceHandler () {
  38100. var res = fn.apply(null, arguments);
  38101. if (res !== null) {
  38102. _target.$off(event, onceHandler);
  38103. }
  38104. }
  38105. }
  38106. function updateComponentListeners (
  38107. vm,
  38108. listeners,
  38109. oldListeners
  38110. ) {
  38111. target = vm;
  38112. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  38113. target = undefined;
  38114. }
  38115. function eventsMixin (Vue) {
  38116. var hookRE = /^hook:/;
  38117. Vue.prototype.$on = function (event, fn) {
  38118. var vm = this;
  38119. if (Array.isArray(event)) {
  38120. for (var i = 0, l = event.length; i < l; i++) {
  38121. vm.$on(event[i], fn);
  38122. }
  38123. } else {
  38124. (vm._events[event] || (vm._events[event] = [])).push(fn);
  38125. // optimize hook:event cost by using a boolean flag marked at registration
  38126. // instead of a hash lookup
  38127. if (hookRE.test(event)) {
  38128. vm._hasHookEvent = true;
  38129. }
  38130. }
  38131. return vm
  38132. };
  38133. Vue.prototype.$once = function (event, fn) {
  38134. var vm = this;
  38135. function on () {
  38136. vm.$off(event, on);
  38137. fn.apply(vm, arguments);
  38138. }
  38139. on.fn = fn;
  38140. vm.$on(event, on);
  38141. return vm
  38142. };
  38143. Vue.prototype.$off = function (event, fn) {
  38144. var vm = this;
  38145. // all
  38146. if (!arguments.length) {
  38147. vm._events = Object.create(null);
  38148. return vm
  38149. }
  38150. // array of events
  38151. if (Array.isArray(event)) {
  38152. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  38153. vm.$off(event[i$1], fn);
  38154. }
  38155. return vm
  38156. }
  38157. // specific event
  38158. var cbs = vm._events[event];
  38159. if (!cbs) {
  38160. return vm
  38161. }
  38162. if (!fn) {
  38163. vm._events[event] = null;
  38164. return vm
  38165. }
  38166. // specific handler
  38167. var cb;
  38168. var i = cbs.length;
  38169. while (i--) {
  38170. cb = cbs[i];
  38171. if (cb === fn || cb.fn === fn) {
  38172. cbs.splice(i, 1);
  38173. break
  38174. }
  38175. }
  38176. return vm
  38177. };
  38178. Vue.prototype.$emit = function (event) {
  38179. var vm = this;
  38180. {
  38181. var lowerCaseEvent = event.toLowerCase();
  38182. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  38183. tip(
  38184. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  38185. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  38186. "Note that HTML attributes are case-insensitive and you cannot use " +
  38187. "v-on to listen to camelCase events when using in-DOM templates. " +
  38188. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  38189. );
  38190. }
  38191. }
  38192. var cbs = vm._events[event];
  38193. if (cbs) {
  38194. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  38195. var args = toArray(arguments, 1);
  38196. var info = "event handler for \"" + event + "\"";
  38197. for (var i = 0, l = cbs.length; i < l; i++) {
  38198. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  38199. }
  38200. }
  38201. return vm
  38202. };
  38203. }
  38204. /* */
  38205. var activeInstance = null;
  38206. var isUpdatingChildComponent = false;
  38207. function setActiveInstance(vm) {
  38208. var prevActiveInstance = activeInstance;
  38209. activeInstance = vm;
  38210. return function () {
  38211. activeInstance = prevActiveInstance;
  38212. }
  38213. }
  38214. function initLifecycle (vm) {
  38215. var options = vm.$options;
  38216. // locate first non-abstract parent
  38217. var parent = options.parent;
  38218. if (parent && !options.abstract) {
  38219. while (parent.$options.abstract && parent.$parent) {
  38220. parent = parent.$parent;
  38221. }
  38222. parent.$children.push(vm);
  38223. }
  38224. vm.$parent = parent;
  38225. vm.$root = parent ? parent.$root : vm;
  38226. vm.$children = [];
  38227. vm.$refs = {};
  38228. vm._watcher = null;
  38229. vm._inactive = null;
  38230. vm._directInactive = false;
  38231. vm._isMounted = false;
  38232. vm._isDestroyed = false;
  38233. vm._isBeingDestroyed = false;
  38234. }
  38235. function lifecycleMixin (Vue) {
  38236. Vue.prototype._update = function (vnode, hydrating) {
  38237. var vm = this;
  38238. var prevEl = vm.$el;
  38239. var prevVnode = vm._vnode;
  38240. var restoreActiveInstance = setActiveInstance(vm);
  38241. vm._vnode = vnode;
  38242. // Vue.prototype.__patch__ is injected in entry points
  38243. // based on the rendering backend used.
  38244. if (!prevVnode) {
  38245. // initial render
  38246. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  38247. } else {
  38248. // updates
  38249. vm.$el = vm.__patch__(prevVnode, vnode);
  38250. }
  38251. restoreActiveInstance();
  38252. // update __vue__ reference
  38253. if (prevEl) {
  38254. prevEl.__vue__ = null;
  38255. }
  38256. if (vm.$el) {
  38257. vm.$el.__vue__ = vm;
  38258. }
  38259. // if parent is an HOC, update its $el as well
  38260. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  38261. vm.$parent.$el = vm.$el;
  38262. }
  38263. // updated hook is called by the scheduler to ensure that children are
  38264. // updated in a parent's updated hook.
  38265. };
  38266. Vue.prototype.$forceUpdate = function () {
  38267. var vm = this;
  38268. if (vm._watcher) {
  38269. vm._watcher.update();
  38270. }
  38271. };
  38272. Vue.prototype.$destroy = function () {
  38273. var vm = this;
  38274. if (vm._isBeingDestroyed) {
  38275. return
  38276. }
  38277. callHook(vm, 'beforeDestroy');
  38278. vm._isBeingDestroyed = true;
  38279. // remove self from parent
  38280. var parent = vm.$parent;
  38281. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  38282. remove(parent.$children, vm);
  38283. }
  38284. // teardown watchers
  38285. if (vm._watcher) {
  38286. vm._watcher.teardown();
  38287. }
  38288. var i = vm._watchers.length;
  38289. while (i--) {
  38290. vm._watchers[i].teardown();
  38291. }
  38292. // remove reference from data ob
  38293. // frozen object may not have observer.
  38294. if (vm._data.__ob__) {
  38295. vm._data.__ob__.vmCount--;
  38296. }
  38297. // call the last hook...
  38298. vm._isDestroyed = true;
  38299. // invoke destroy hooks on current rendered tree
  38300. vm.__patch__(vm._vnode, null);
  38301. // fire destroyed hook
  38302. callHook(vm, 'destroyed');
  38303. // turn off all instance listeners.
  38304. vm.$off();
  38305. // remove __vue__ reference
  38306. if (vm.$el) {
  38307. vm.$el.__vue__ = null;
  38308. }
  38309. // release circular reference (#6759)
  38310. if (vm.$vnode) {
  38311. vm.$vnode.parent = null;
  38312. }
  38313. };
  38314. }
  38315. function mountComponent (
  38316. vm,
  38317. el,
  38318. hydrating
  38319. ) {
  38320. vm.$el = el;
  38321. if (!vm.$options.render) {
  38322. vm.$options.render = createEmptyVNode;
  38323. {
  38324. /* istanbul ignore if */
  38325. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  38326. vm.$options.el || el) {
  38327. warn(
  38328. 'You are using the runtime-only build of Vue where the template ' +
  38329. 'compiler is not available. Either pre-compile the templates into ' +
  38330. 'render functions, or use the compiler-included build.',
  38331. vm
  38332. );
  38333. } else {
  38334. warn(
  38335. 'Failed to mount component: template or render function not defined.',
  38336. vm
  38337. );
  38338. }
  38339. }
  38340. }
  38341. callHook(vm, 'beforeMount');
  38342. var updateComponent;
  38343. /* istanbul ignore if */
  38344. if (config.performance && mark) {
  38345. updateComponent = function () {
  38346. var name = vm._name;
  38347. var id = vm._uid;
  38348. var startTag = "vue-perf-start:" + id;
  38349. var endTag = "vue-perf-end:" + id;
  38350. mark(startTag);
  38351. var vnode = vm._render();
  38352. mark(endTag);
  38353. measure(("vue " + name + " render"), startTag, endTag);
  38354. mark(startTag);
  38355. vm._update(vnode, hydrating);
  38356. mark(endTag);
  38357. measure(("vue " + name + " patch"), startTag, endTag);
  38358. };
  38359. } else {
  38360. updateComponent = function () {
  38361. vm._update(vm._render(), hydrating);
  38362. };
  38363. }
  38364. // we set this to vm._watcher inside the watcher's constructor
  38365. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  38366. // component's mounted hook), which relies on vm._watcher being already defined
  38367. new Watcher(vm, updateComponent, noop, {
  38368. before: function before () {
  38369. if (vm._isMounted && !vm._isDestroyed) {
  38370. callHook(vm, 'beforeUpdate');
  38371. }
  38372. }
  38373. }, true /* isRenderWatcher */);
  38374. hydrating = false;
  38375. // manually mounted instance, call mounted on self
  38376. // mounted is called for render-created child components in its inserted hook
  38377. if (vm.$vnode == null) {
  38378. vm._isMounted = true;
  38379. callHook(vm, 'mounted');
  38380. }
  38381. return vm
  38382. }
  38383. function updateChildComponent (
  38384. vm,
  38385. propsData,
  38386. listeners,
  38387. parentVnode,
  38388. renderChildren
  38389. ) {
  38390. {
  38391. isUpdatingChildComponent = true;
  38392. }
  38393. // determine whether component has slot children
  38394. // we need to do this before overwriting $options._renderChildren.
  38395. // check if there are dynamic scopedSlots (hand-written or compiled but with
  38396. // dynamic slot names). Static scoped slots compiled from template has the
  38397. // "$stable" marker.
  38398. var newScopedSlots = parentVnode.data.scopedSlots;
  38399. var oldScopedSlots = vm.$scopedSlots;
  38400. var hasDynamicScopedSlot = !!(
  38401. (newScopedSlots && !newScopedSlots.$stable) ||
  38402. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  38403. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||
  38404. (!newScopedSlots && vm.$scopedSlots.$key)
  38405. );
  38406. // Any static slot children from the parent may have changed during parent's
  38407. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  38408. // update is necessary to ensure correctness.
  38409. var needsForceUpdate = !!(
  38410. renderChildren || // has new static slots
  38411. vm.$options._renderChildren || // has old static slots
  38412. hasDynamicScopedSlot
  38413. );
  38414. vm.$options._parentVnode = parentVnode;
  38415. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  38416. if (vm._vnode) { // update child tree's parent
  38417. vm._vnode.parent = parentVnode;
  38418. }
  38419. vm.$options._renderChildren = renderChildren;
  38420. // update $attrs and $listeners hash
  38421. // these are also reactive so they may trigger child update if the child
  38422. // used them during render
  38423. vm.$attrs = parentVnode.data.attrs || emptyObject;
  38424. vm.$listeners = listeners || emptyObject;
  38425. // update props
  38426. if (propsData && vm.$options.props) {
  38427. toggleObserving(false);
  38428. var props = vm._props;
  38429. var propKeys = vm.$options._propKeys || [];
  38430. for (var i = 0; i < propKeys.length; i++) {
  38431. var key = propKeys[i];
  38432. var propOptions = vm.$options.props; // wtf flow?
  38433. props[key] = validateProp(key, propOptions, propsData, vm);
  38434. }
  38435. toggleObserving(true);
  38436. // keep a copy of raw propsData
  38437. vm.$options.propsData = propsData;
  38438. }
  38439. // update listeners
  38440. listeners = listeners || emptyObject;
  38441. var oldListeners = vm.$options._parentListeners;
  38442. vm.$options._parentListeners = listeners;
  38443. updateComponentListeners(vm, listeners, oldListeners);
  38444. // resolve slots + force update if has children
  38445. if (needsForceUpdate) {
  38446. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  38447. vm.$forceUpdate();
  38448. }
  38449. {
  38450. isUpdatingChildComponent = false;
  38451. }
  38452. }
  38453. function isInInactiveTree (vm) {
  38454. while (vm && (vm = vm.$parent)) {
  38455. if (vm._inactive) { return true }
  38456. }
  38457. return false
  38458. }
  38459. function activateChildComponent (vm, direct) {
  38460. if (direct) {
  38461. vm._directInactive = false;
  38462. if (isInInactiveTree(vm)) {
  38463. return
  38464. }
  38465. } else if (vm._directInactive) {
  38466. return
  38467. }
  38468. if (vm._inactive || vm._inactive === null) {
  38469. vm._inactive = false;
  38470. for (var i = 0; i < vm.$children.length; i++) {
  38471. activateChildComponent(vm.$children[i]);
  38472. }
  38473. callHook(vm, 'activated');
  38474. }
  38475. }
  38476. function deactivateChildComponent (vm, direct) {
  38477. if (direct) {
  38478. vm._directInactive = true;
  38479. if (isInInactiveTree(vm)) {
  38480. return
  38481. }
  38482. }
  38483. if (!vm._inactive) {
  38484. vm._inactive = true;
  38485. for (var i = 0; i < vm.$children.length; i++) {
  38486. deactivateChildComponent(vm.$children[i]);
  38487. }
  38488. callHook(vm, 'deactivated');
  38489. }
  38490. }
  38491. function callHook (vm, hook) {
  38492. // #7573 disable dep collection when invoking lifecycle hooks
  38493. pushTarget();
  38494. var handlers = vm.$options[hook];
  38495. var info = hook + " hook";
  38496. if (handlers) {
  38497. for (var i = 0, j = handlers.length; i < j; i++) {
  38498. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  38499. }
  38500. }
  38501. if (vm._hasHookEvent) {
  38502. vm.$emit('hook:' + hook);
  38503. }
  38504. popTarget();
  38505. }
  38506. /* */
  38507. var MAX_UPDATE_COUNT = 100;
  38508. var queue = [];
  38509. var activatedChildren = [];
  38510. var has = {};
  38511. var circular = {};
  38512. var waiting = false;
  38513. var flushing = false;
  38514. var index = 0;
  38515. /**
  38516. * Reset the scheduler's state.
  38517. */
  38518. function resetSchedulerState () {
  38519. index = queue.length = activatedChildren.length = 0;
  38520. has = {};
  38521. {
  38522. circular = {};
  38523. }
  38524. waiting = flushing = false;
  38525. }
  38526. // Async edge case #6566 requires saving the timestamp when event listeners are
  38527. // attached. However, calling performance.now() has a perf overhead especially
  38528. // if the page has thousands of event listeners. Instead, we take a timestamp
  38529. // every time the scheduler flushes and use that for all event listeners
  38530. // attached during that flush.
  38531. var currentFlushTimestamp = 0;
  38532. // Async edge case fix requires storing an event listener's attach timestamp.
  38533. var getNow = Date.now;
  38534. // Determine what event timestamp the browser is using. Annoyingly, the
  38535. // timestamp can either be hi-res (relative to page load) or low-res
  38536. // (relative to UNIX epoch), so in order to compare time we have to use the
  38537. // same timestamp type when saving the flush timestamp.
  38538. // All IE versions use low-res event timestamps, and have problematic clock
  38539. // implementations (#9632)
  38540. if (inBrowser && !isIE) {
  38541. var performance = window.performance;
  38542. if (
  38543. performance &&
  38544. typeof performance.now === 'function' &&
  38545. getNow() > document.createEvent('Event').timeStamp
  38546. ) {
  38547. // if the event timestamp, although evaluated AFTER the Date.now(), is
  38548. // smaller than it, it means the event is using a hi-res timestamp,
  38549. // and we need to use the hi-res version for event listener timestamps as
  38550. // well.
  38551. getNow = function () { return performance.now(); };
  38552. }
  38553. }
  38554. /**
  38555. * Flush both queues and run the watchers.
  38556. */
  38557. function flushSchedulerQueue () {
  38558. currentFlushTimestamp = getNow();
  38559. flushing = true;
  38560. var watcher, id;
  38561. // Sort queue before flush.
  38562. // This ensures that:
  38563. // 1. Components are updated from parent to child. (because parent is always
  38564. // created before the child)
  38565. // 2. A component's user watchers are run before its render watcher (because
  38566. // user watchers are created before the render watcher)
  38567. // 3. If a component is destroyed during a parent component's watcher run,
  38568. // its watchers can be skipped.
  38569. queue.sort(function (a, b) { return a.id - b.id; });
  38570. // do not cache length because more watchers might be pushed
  38571. // as we run existing watchers
  38572. for (index = 0; index < queue.length; index++) {
  38573. watcher = queue[index];
  38574. if (watcher.before) {
  38575. watcher.before();
  38576. }
  38577. id = watcher.id;
  38578. has[id] = null;
  38579. watcher.run();
  38580. // in dev build, check and stop circular updates.
  38581. if (has[id] != null) {
  38582. circular[id] = (circular[id] || 0) + 1;
  38583. if (circular[id] > MAX_UPDATE_COUNT) {
  38584. warn(
  38585. 'You may have an infinite update loop ' + (
  38586. watcher.user
  38587. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  38588. : "in a component render function."
  38589. ),
  38590. watcher.vm
  38591. );
  38592. break
  38593. }
  38594. }
  38595. }
  38596. // keep copies of post queues before resetting state
  38597. var activatedQueue = activatedChildren.slice();
  38598. var updatedQueue = queue.slice();
  38599. resetSchedulerState();
  38600. // call component updated and activated hooks
  38601. callActivatedHooks(activatedQueue);
  38602. callUpdatedHooks(updatedQueue);
  38603. // devtool hook
  38604. /* istanbul ignore if */
  38605. if (devtools && config.devtools) {
  38606. devtools.emit('flush');
  38607. }
  38608. }
  38609. function callUpdatedHooks (queue) {
  38610. var i = queue.length;
  38611. while (i--) {
  38612. var watcher = queue[i];
  38613. var vm = watcher.vm;
  38614. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  38615. callHook(vm, 'updated');
  38616. }
  38617. }
  38618. }
  38619. /**
  38620. * Queue a kept-alive component that was activated during patch.
  38621. * The queue will be processed after the entire tree has been patched.
  38622. */
  38623. function queueActivatedComponent (vm) {
  38624. // setting _inactive to false here so that a render function can
  38625. // rely on checking whether it's in an inactive tree (e.g. router-view)
  38626. vm._inactive = false;
  38627. activatedChildren.push(vm);
  38628. }
  38629. function callActivatedHooks (queue) {
  38630. for (var i = 0; i < queue.length; i++) {
  38631. queue[i]._inactive = true;
  38632. activateChildComponent(queue[i], true /* true */);
  38633. }
  38634. }
  38635. /**
  38636. * Push a watcher into the watcher queue.
  38637. * Jobs with duplicate IDs will be skipped unless it's
  38638. * pushed when the queue is being flushed.
  38639. */
  38640. function queueWatcher (watcher) {
  38641. var id = watcher.id;
  38642. if (has[id] == null) {
  38643. has[id] = true;
  38644. if (!flushing) {
  38645. queue.push(watcher);
  38646. } else {
  38647. // if already flushing, splice the watcher based on its id
  38648. // if already past its id, it will be run next immediately.
  38649. var i = queue.length - 1;
  38650. while (i > index && queue[i].id > watcher.id) {
  38651. i--;
  38652. }
  38653. queue.splice(i + 1, 0, watcher);
  38654. }
  38655. // queue the flush
  38656. if (!waiting) {
  38657. waiting = true;
  38658. if (!config.async) {
  38659. flushSchedulerQueue();
  38660. return
  38661. }
  38662. nextTick(flushSchedulerQueue);
  38663. }
  38664. }
  38665. }
  38666. /* */
  38667. var uid$2 = 0;
  38668. /**
  38669. * A watcher parses an expression, collects dependencies,
  38670. * and fires callback when the expression value changes.
  38671. * This is used for both the $watch() api and directives.
  38672. */
  38673. var Watcher = function Watcher (
  38674. vm,
  38675. expOrFn,
  38676. cb,
  38677. options,
  38678. isRenderWatcher
  38679. ) {
  38680. this.vm = vm;
  38681. if (isRenderWatcher) {
  38682. vm._watcher = this;
  38683. }
  38684. vm._watchers.push(this);
  38685. // options
  38686. if (options) {
  38687. this.deep = !!options.deep;
  38688. this.user = !!options.user;
  38689. this.lazy = !!options.lazy;
  38690. this.sync = !!options.sync;
  38691. this.before = options.before;
  38692. } else {
  38693. this.deep = this.user = this.lazy = this.sync = false;
  38694. }
  38695. this.cb = cb;
  38696. this.id = ++uid$2; // uid for batching
  38697. this.active = true;
  38698. this.dirty = this.lazy; // for lazy watchers
  38699. this.deps = [];
  38700. this.newDeps = [];
  38701. this.depIds = new _Set();
  38702. this.newDepIds = new _Set();
  38703. this.expression = expOrFn.toString();
  38704. // parse expression for getter
  38705. if (typeof expOrFn === 'function') {
  38706. this.getter = expOrFn;
  38707. } else {
  38708. this.getter = parsePath(expOrFn);
  38709. if (!this.getter) {
  38710. this.getter = noop;
  38711. warn(
  38712. "Failed watching path: \"" + expOrFn + "\" " +
  38713. 'Watcher only accepts simple dot-delimited paths. ' +
  38714. 'For full control, use a function instead.',
  38715. vm
  38716. );
  38717. }
  38718. }
  38719. this.value = this.lazy
  38720. ? undefined
  38721. : this.get();
  38722. };
  38723. /**
  38724. * Evaluate the getter, and re-collect dependencies.
  38725. */
  38726. Watcher.prototype.get = function get () {
  38727. pushTarget(this);
  38728. var value;
  38729. var vm = this.vm;
  38730. try {
  38731. value = this.getter.call(vm, vm);
  38732. } catch (e) {
  38733. if (this.user) {
  38734. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  38735. } else {
  38736. throw e
  38737. }
  38738. } finally {
  38739. // "touch" every property so they are all tracked as
  38740. // dependencies for deep watching
  38741. if (this.deep) {
  38742. traverse(value);
  38743. }
  38744. popTarget();
  38745. this.cleanupDeps();
  38746. }
  38747. return value
  38748. };
  38749. /**
  38750. * Add a dependency to this directive.
  38751. */
  38752. Watcher.prototype.addDep = function addDep (dep) {
  38753. var id = dep.id;
  38754. if (!this.newDepIds.has(id)) {
  38755. this.newDepIds.add(id);
  38756. this.newDeps.push(dep);
  38757. if (!this.depIds.has(id)) {
  38758. dep.addSub(this);
  38759. }
  38760. }
  38761. };
  38762. /**
  38763. * Clean up for dependency collection.
  38764. */
  38765. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  38766. var i = this.deps.length;
  38767. while (i--) {
  38768. var dep = this.deps[i];
  38769. if (!this.newDepIds.has(dep.id)) {
  38770. dep.removeSub(this);
  38771. }
  38772. }
  38773. var tmp = this.depIds;
  38774. this.depIds = this.newDepIds;
  38775. this.newDepIds = tmp;
  38776. this.newDepIds.clear();
  38777. tmp = this.deps;
  38778. this.deps = this.newDeps;
  38779. this.newDeps = tmp;
  38780. this.newDeps.length = 0;
  38781. };
  38782. /**
  38783. * Subscriber interface.
  38784. * Will be called when a dependency changes.
  38785. */
  38786. Watcher.prototype.update = function update () {
  38787. /* istanbul ignore else */
  38788. if (this.lazy) {
  38789. this.dirty = true;
  38790. } else if (this.sync) {
  38791. this.run();
  38792. } else {
  38793. queueWatcher(this);
  38794. }
  38795. };
  38796. /**
  38797. * Scheduler job interface.
  38798. * Will be called by the scheduler.
  38799. */
  38800. Watcher.prototype.run = function run () {
  38801. if (this.active) {
  38802. var value = this.get();
  38803. if (
  38804. value !== this.value ||
  38805. // Deep watchers and watchers on Object/Arrays should fire even
  38806. // when the value is the same, because the value may
  38807. // have mutated.
  38808. isObject(value) ||
  38809. this.deep
  38810. ) {
  38811. // set new value
  38812. var oldValue = this.value;
  38813. this.value = value;
  38814. if (this.user) {
  38815. var info = "callback for watcher \"" + (this.expression) + "\"";
  38816. invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);
  38817. } else {
  38818. this.cb.call(this.vm, value, oldValue);
  38819. }
  38820. }
  38821. }
  38822. };
  38823. /**
  38824. * Evaluate the value of the watcher.
  38825. * This only gets called for lazy watchers.
  38826. */
  38827. Watcher.prototype.evaluate = function evaluate () {
  38828. this.value = this.get();
  38829. this.dirty = false;
  38830. };
  38831. /**
  38832. * Depend on all deps collected by this watcher.
  38833. */
  38834. Watcher.prototype.depend = function depend () {
  38835. var i = this.deps.length;
  38836. while (i--) {
  38837. this.deps[i].depend();
  38838. }
  38839. };
  38840. /**
  38841. * Remove self from all dependencies' subscriber list.
  38842. */
  38843. Watcher.prototype.teardown = function teardown () {
  38844. if (this.active) {
  38845. // remove self from vm's watcher list
  38846. // this is a somewhat expensive operation so we skip it
  38847. // if the vm is being destroyed.
  38848. if (!this.vm._isBeingDestroyed) {
  38849. remove(this.vm._watchers, this);
  38850. }
  38851. var i = this.deps.length;
  38852. while (i--) {
  38853. this.deps[i].removeSub(this);
  38854. }
  38855. this.active = false;
  38856. }
  38857. };
  38858. /* */
  38859. var sharedPropertyDefinition = {
  38860. enumerable: true,
  38861. configurable: true,
  38862. get: noop,
  38863. set: noop
  38864. };
  38865. function proxy (target, sourceKey, key) {
  38866. sharedPropertyDefinition.get = function proxyGetter () {
  38867. return this[sourceKey][key]
  38868. };
  38869. sharedPropertyDefinition.set = function proxySetter (val) {
  38870. this[sourceKey][key] = val;
  38871. };
  38872. Object.defineProperty(target, key, sharedPropertyDefinition);
  38873. }
  38874. function initState (vm) {
  38875. vm._watchers = [];
  38876. var opts = vm.$options;
  38877. if (opts.props) { initProps(vm, opts.props); }
  38878. if (opts.methods) { initMethods(vm, opts.methods); }
  38879. if (opts.data) {
  38880. initData(vm);
  38881. } else {
  38882. observe(vm._data = {}, true /* asRootData */);
  38883. }
  38884. if (opts.computed) { initComputed(vm, opts.computed); }
  38885. if (opts.watch && opts.watch !== nativeWatch) {
  38886. initWatch(vm, opts.watch);
  38887. }
  38888. }
  38889. function initProps (vm, propsOptions) {
  38890. var propsData = vm.$options.propsData || {};
  38891. var props = vm._props = {};
  38892. // cache prop keys so that future props updates can iterate using Array
  38893. // instead of dynamic object key enumeration.
  38894. var keys = vm.$options._propKeys = [];
  38895. var isRoot = !vm.$parent;
  38896. // root instance props should be converted
  38897. if (!isRoot) {
  38898. toggleObserving(false);
  38899. }
  38900. var loop = function ( key ) {
  38901. keys.push(key);
  38902. var value = validateProp(key, propsOptions, propsData, vm);
  38903. /* istanbul ignore else */
  38904. {
  38905. var hyphenatedKey = hyphenate(key);
  38906. if (isReservedAttribute(hyphenatedKey) ||
  38907. config.isReservedAttr(hyphenatedKey)) {
  38908. warn(
  38909. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  38910. vm
  38911. );
  38912. }
  38913. defineReactive$$1(props, key, value, function () {
  38914. if (!isRoot && !isUpdatingChildComponent) {
  38915. warn(
  38916. "Avoid mutating a prop directly since the value will be " +
  38917. "overwritten whenever the parent component re-renders. " +
  38918. "Instead, use a data or computed property based on the prop's " +
  38919. "value. Prop being mutated: \"" + key + "\"",
  38920. vm
  38921. );
  38922. }
  38923. });
  38924. }
  38925. // static props are already proxied on the component's prototype
  38926. // during Vue.extend(). We only need to proxy props defined at
  38927. // instantiation here.
  38928. if (!(key in vm)) {
  38929. proxy(vm, "_props", key);
  38930. }
  38931. };
  38932. for (var key in propsOptions) loop( key );
  38933. toggleObserving(true);
  38934. }
  38935. function initData (vm) {
  38936. var data = vm.$options.data;
  38937. data = vm._data = typeof data === 'function'
  38938. ? getData(data, vm)
  38939. : data || {};
  38940. if (!isPlainObject(data)) {
  38941. data = {};
  38942. warn(
  38943. 'data functions should return an object:\n' +
  38944. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  38945. vm
  38946. );
  38947. }
  38948. // proxy data on instance
  38949. var keys = Object.keys(data);
  38950. var props = vm.$options.props;
  38951. var methods = vm.$options.methods;
  38952. var i = keys.length;
  38953. while (i--) {
  38954. var key = keys[i];
  38955. {
  38956. if (methods && hasOwn(methods, key)) {
  38957. warn(
  38958. ("Method \"" + key + "\" has already been defined as a data property."),
  38959. vm
  38960. );
  38961. }
  38962. }
  38963. if (props && hasOwn(props, key)) {
  38964. warn(
  38965. "The data property \"" + key + "\" is already declared as a prop. " +
  38966. "Use prop default value instead.",
  38967. vm
  38968. );
  38969. } else if (!isReserved(key)) {
  38970. proxy(vm, "_data", key);
  38971. }
  38972. }
  38973. // observe data
  38974. observe(data, true /* asRootData */);
  38975. }
  38976. function getData (data, vm) {
  38977. // #7573 disable dep collection when invoking data getters
  38978. pushTarget();
  38979. try {
  38980. return data.call(vm, vm)
  38981. } catch (e) {
  38982. handleError(e, vm, "data()");
  38983. return {}
  38984. } finally {
  38985. popTarget();
  38986. }
  38987. }
  38988. var computedWatcherOptions = { lazy: true };
  38989. function initComputed (vm, computed) {
  38990. // $flow-disable-line
  38991. var watchers = vm._computedWatchers = Object.create(null);
  38992. // computed properties are just getters during SSR
  38993. var isSSR = isServerRendering();
  38994. for (var key in computed) {
  38995. var userDef = computed[key];
  38996. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  38997. if (getter == null) {
  38998. warn(
  38999. ("Getter is missing for computed property \"" + key + "\"."),
  39000. vm
  39001. );
  39002. }
  39003. if (!isSSR) {
  39004. // create internal watcher for the computed property.
  39005. watchers[key] = new Watcher(
  39006. vm,
  39007. getter || noop,
  39008. noop,
  39009. computedWatcherOptions
  39010. );
  39011. }
  39012. // component-defined computed properties are already defined on the
  39013. // component prototype. We only need to define computed properties defined
  39014. // at instantiation here.
  39015. if (!(key in vm)) {
  39016. defineComputed(vm, key, userDef);
  39017. } else {
  39018. if (key in vm.$data) {
  39019. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  39020. } else if (vm.$options.props && key in vm.$options.props) {
  39021. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  39022. } else if (vm.$options.methods && key in vm.$options.methods) {
  39023. warn(("The computed property \"" + key + "\" is already defined as a method."), vm);
  39024. }
  39025. }
  39026. }
  39027. }
  39028. function defineComputed (
  39029. target,
  39030. key,
  39031. userDef
  39032. ) {
  39033. var shouldCache = !isServerRendering();
  39034. if (typeof userDef === 'function') {
  39035. sharedPropertyDefinition.get = shouldCache
  39036. ? createComputedGetter(key)
  39037. : createGetterInvoker(userDef);
  39038. sharedPropertyDefinition.set = noop;
  39039. } else {
  39040. sharedPropertyDefinition.get = userDef.get
  39041. ? shouldCache && userDef.cache !== false
  39042. ? createComputedGetter(key)
  39043. : createGetterInvoker(userDef.get)
  39044. : noop;
  39045. sharedPropertyDefinition.set = userDef.set || noop;
  39046. }
  39047. if (sharedPropertyDefinition.set === noop) {
  39048. sharedPropertyDefinition.set = function () {
  39049. warn(
  39050. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  39051. this
  39052. );
  39053. };
  39054. }
  39055. Object.defineProperty(target, key, sharedPropertyDefinition);
  39056. }
  39057. function createComputedGetter (key) {
  39058. return function computedGetter () {
  39059. var watcher = this._computedWatchers && this._computedWatchers[key];
  39060. if (watcher) {
  39061. if (watcher.dirty) {
  39062. watcher.evaluate();
  39063. }
  39064. if (Dep.target) {
  39065. watcher.depend();
  39066. }
  39067. return watcher.value
  39068. }
  39069. }
  39070. }
  39071. function createGetterInvoker(fn) {
  39072. return function computedGetter () {
  39073. return fn.call(this, this)
  39074. }
  39075. }
  39076. function initMethods (vm, methods) {
  39077. var props = vm.$options.props;
  39078. for (var key in methods) {
  39079. {
  39080. if (typeof methods[key] !== 'function') {
  39081. warn(
  39082. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  39083. "Did you reference the function correctly?",
  39084. vm
  39085. );
  39086. }
  39087. if (props && hasOwn(props, key)) {
  39088. warn(
  39089. ("Method \"" + key + "\" has already been defined as a prop."),
  39090. vm
  39091. );
  39092. }
  39093. if ((key in vm) && isReserved(key)) {
  39094. warn(
  39095. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  39096. "Avoid defining component methods that start with _ or $."
  39097. );
  39098. }
  39099. }
  39100. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  39101. }
  39102. }
  39103. function initWatch (vm, watch) {
  39104. for (var key in watch) {
  39105. var handler = watch[key];
  39106. if (Array.isArray(handler)) {
  39107. for (var i = 0; i < handler.length; i++) {
  39108. createWatcher(vm, key, handler[i]);
  39109. }
  39110. } else {
  39111. createWatcher(vm, key, handler);
  39112. }
  39113. }
  39114. }
  39115. function createWatcher (
  39116. vm,
  39117. expOrFn,
  39118. handler,
  39119. options
  39120. ) {
  39121. if (isPlainObject(handler)) {
  39122. options = handler;
  39123. handler = handler.handler;
  39124. }
  39125. if (typeof handler === 'string') {
  39126. handler = vm[handler];
  39127. }
  39128. return vm.$watch(expOrFn, handler, options)
  39129. }
  39130. function stateMixin (Vue) {
  39131. // flow somehow has problems with directly declared definition object
  39132. // when using Object.defineProperty, so we have to procedurally build up
  39133. // the object here.
  39134. var dataDef = {};
  39135. dataDef.get = function () { return this._data };
  39136. var propsDef = {};
  39137. propsDef.get = function () { return this._props };
  39138. {
  39139. dataDef.set = function () {
  39140. warn(
  39141. 'Avoid replacing instance root $data. ' +
  39142. 'Use nested data properties instead.',
  39143. this
  39144. );
  39145. };
  39146. propsDef.set = function () {
  39147. warn("$props is readonly.", this);
  39148. };
  39149. }
  39150. Object.defineProperty(Vue.prototype, '$data', dataDef);
  39151. Object.defineProperty(Vue.prototype, '$props', propsDef);
  39152. Vue.prototype.$set = set;
  39153. Vue.prototype.$delete = del;
  39154. Vue.prototype.$watch = function (
  39155. expOrFn,
  39156. cb,
  39157. options
  39158. ) {
  39159. var vm = this;
  39160. if (isPlainObject(cb)) {
  39161. return createWatcher(vm, expOrFn, cb, options)
  39162. }
  39163. options = options || {};
  39164. options.user = true;
  39165. var watcher = new Watcher(vm, expOrFn, cb, options);
  39166. if (options.immediate) {
  39167. var info = "callback for immediate watcher \"" + (watcher.expression) + "\"";
  39168. pushTarget();
  39169. invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);
  39170. popTarget();
  39171. }
  39172. return function unwatchFn () {
  39173. watcher.teardown();
  39174. }
  39175. };
  39176. }
  39177. /* */
  39178. var uid$3 = 0;
  39179. function initMixin (Vue) {
  39180. Vue.prototype._init = function (options) {
  39181. var vm = this;
  39182. // a uid
  39183. vm._uid = uid$3++;
  39184. var startTag, endTag;
  39185. /* istanbul ignore if */
  39186. if (config.performance && mark) {
  39187. startTag = "vue-perf-start:" + (vm._uid);
  39188. endTag = "vue-perf-end:" + (vm._uid);
  39189. mark(startTag);
  39190. }
  39191. // a flag to avoid this being observed
  39192. vm._isVue = true;
  39193. // merge options
  39194. if (options && options._isComponent) {
  39195. // optimize internal component instantiation
  39196. // since dynamic options merging is pretty slow, and none of the
  39197. // internal component options needs special treatment.
  39198. initInternalComponent(vm, options);
  39199. } else {
  39200. vm.$options = mergeOptions(
  39201. resolveConstructorOptions(vm.constructor),
  39202. options || {},
  39203. vm
  39204. );
  39205. }
  39206. /* istanbul ignore else */
  39207. {
  39208. initProxy(vm);
  39209. }
  39210. // expose real self
  39211. vm._self = vm;
  39212. initLifecycle(vm);
  39213. initEvents(vm);
  39214. initRender(vm);
  39215. callHook(vm, 'beforeCreate');
  39216. initInjections(vm); // resolve injections before data/props
  39217. initState(vm);
  39218. initProvide(vm); // resolve provide after data/props
  39219. callHook(vm, 'created');
  39220. /* istanbul ignore if */
  39221. if (config.performance && mark) {
  39222. vm._name = formatComponentName(vm, false);
  39223. mark(endTag);
  39224. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  39225. }
  39226. if (vm.$options.el) {
  39227. vm.$mount(vm.$options.el);
  39228. }
  39229. };
  39230. }
  39231. function initInternalComponent (vm, options) {
  39232. var opts = vm.$options = Object.create(vm.constructor.options);
  39233. // doing this because it's faster than dynamic enumeration.
  39234. var parentVnode = options._parentVnode;
  39235. opts.parent = options.parent;
  39236. opts._parentVnode = parentVnode;
  39237. var vnodeComponentOptions = parentVnode.componentOptions;
  39238. opts.propsData = vnodeComponentOptions.propsData;
  39239. opts._parentListeners = vnodeComponentOptions.listeners;
  39240. opts._renderChildren = vnodeComponentOptions.children;
  39241. opts._componentTag = vnodeComponentOptions.tag;
  39242. if (options.render) {
  39243. opts.render = options.render;
  39244. opts.staticRenderFns = options.staticRenderFns;
  39245. }
  39246. }
  39247. function resolveConstructorOptions (Ctor) {
  39248. var options = Ctor.options;
  39249. if (Ctor.super) {
  39250. var superOptions = resolveConstructorOptions(Ctor.super);
  39251. var cachedSuperOptions = Ctor.superOptions;
  39252. if (superOptions !== cachedSuperOptions) {
  39253. // super option changed,
  39254. // need to resolve new options.
  39255. Ctor.superOptions = superOptions;
  39256. // check if there are any late-modified/attached options (#4976)
  39257. var modifiedOptions = resolveModifiedOptions(Ctor);
  39258. // update base extend options
  39259. if (modifiedOptions) {
  39260. extend(Ctor.extendOptions, modifiedOptions);
  39261. }
  39262. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  39263. if (options.name) {
  39264. options.components[options.name] = Ctor;
  39265. }
  39266. }
  39267. }
  39268. return options
  39269. }
  39270. function resolveModifiedOptions (Ctor) {
  39271. var modified;
  39272. var latest = Ctor.options;
  39273. var sealed = Ctor.sealedOptions;
  39274. for (var key in latest) {
  39275. if (latest[key] !== sealed[key]) {
  39276. if (!modified) { modified = {}; }
  39277. modified[key] = latest[key];
  39278. }
  39279. }
  39280. return modified
  39281. }
  39282. function Vue (options) {
  39283. if (!(this instanceof Vue)
  39284. ) {
  39285. warn('Vue is a constructor and should be called with the `new` keyword');
  39286. }
  39287. this._init(options);
  39288. }
  39289. initMixin(Vue);
  39290. stateMixin(Vue);
  39291. eventsMixin(Vue);
  39292. lifecycleMixin(Vue);
  39293. renderMixin(Vue);
  39294. /* */
  39295. function initUse (Vue) {
  39296. Vue.use = function (plugin) {
  39297. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  39298. if (installedPlugins.indexOf(plugin) > -1) {
  39299. return this
  39300. }
  39301. // additional parameters
  39302. var args = toArray(arguments, 1);
  39303. args.unshift(this);
  39304. if (typeof plugin.install === 'function') {
  39305. plugin.install.apply(plugin, args);
  39306. } else if (typeof plugin === 'function') {
  39307. plugin.apply(null, args);
  39308. }
  39309. installedPlugins.push(plugin);
  39310. return this
  39311. };
  39312. }
  39313. /* */
  39314. function initMixin$1 (Vue) {
  39315. Vue.mixin = function (mixin) {
  39316. this.options = mergeOptions(this.options, mixin);
  39317. return this
  39318. };
  39319. }
  39320. /* */
  39321. function initExtend (Vue) {
  39322. /**
  39323. * Each instance constructor, including Vue, has a unique
  39324. * cid. This enables us to create wrapped "child
  39325. * constructors" for prototypal inheritance and cache them.
  39326. */
  39327. Vue.cid = 0;
  39328. var cid = 1;
  39329. /**
  39330. * Class inheritance
  39331. */
  39332. Vue.extend = function (extendOptions) {
  39333. extendOptions = extendOptions || {};
  39334. var Super = this;
  39335. var SuperId = Super.cid;
  39336. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  39337. if (cachedCtors[SuperId]) {
  39338. return cachedCtors[SuperId]
  39339. }
  39340. var name = extendOptions.name || Super.options.name;
  39341. if (name) {
  39342. validateComponentName(name);
  39343. }
  39344. var Sub = function VueComponent (options) {
  39345. this._init(options);
  39346. };
  39347. Sub.prototype = Object.create(Super.prototype);
  39348. Sub.prototype.constructor = Sub;
  39349. Sub.cid = cid++;
  39350. Sub.options = mergeOptions(
  39351. Super.options,
  39352. extendOptions
  39353. );
  39354. Sub['super'] = Super;
  39355. // For props and computed properties, we define the proxy getters on
  39356. // the Vue instances at extension time, on the extended prototype. This
  39357. // avoids Object.defineProperty calls for each instance created.
  39358. if (Sub.options.props) {
  39359. initProps$1(Sub);
  39360. }
  39361. if (Sub.options.computed) {
  39362. initComputed$1(Sub);
  39363. }
  39364. // allow further extension/mixin/plugin usage
  39365. Sub.extend = Super.extend;
  39366. Sub.mixin = Super.mixin;
  39367. Sub.use = Super.use;
  39368. // create asset registers, so extended classes
  39369. // can have their private assets too.
  39370. ASSET_TYPES.forEach(function (type) {
  39371. Sub[type] = Super[type];
  39372. });
  39373. // enable recursive self-lookup
  39374. if (name) {
  39375. Sub.options.components[name] = Sub;
  39376. }
  39377. // keep a reference to the super options at extension time.
  39378. // later at instantiation we can check if Super's options have
  39379. // been updated.
  39380. Sub.superOptions = Super.options;
  39381. Sub.extendOptions = extendOptions;
  39382. Sub.sealedOptions = extend({}, Sub.options);
  39383. // cache constructor
  39384. cachedCtors[SuperId] = Sub;
  39385. return Sub
  39386. };
  39387. }
  39388. function initProps$1 (Comp) {
  39389. var props = Comp.options.props;
  39390. for (var key in props) {
  39391. proxy(Comp.prototype, "_props", key);
  39392. }
  39393. }
  39394. function initComputed$1 (Comp) {
  39395. var computed = Comp.options.computed;
  39396. for (var key in computed) {
  39397. defineComputed(Comp.prototype, key, computed[key]);
  39398. }
  39399. }
  39400. /* */
  39401. function initAssetRegisters (Vue) {
  39402. /**
  39403. * Create asset registration methods.
  39404. */
  39405. ASSET_TYPES.forEach(function (type) {
  39406. Vue[type] = function (
  39407. id,
  39408. definition
  39409. ) {
  39410. if (!definition) {
  39411. return this.options[type + 's'][id]
  39412. } else {
  39413. /* istanbul ignore if */
  39414. if (type === 'component') {
  39415. validateComponentName(id);
  39416. }
  39417. if (type === 'component' && isPlainObject(definition)) {
  39418. definition.name = definition.name || id;
  39419. definition = this.options._base.extend(definition);
  39420. }
  39421. if (type === 'directive' && typeof definition === 'function') {
  39422. definition = { bind: definition, update: definition };
  39423. }
  39424. this.options[type + 's'][id] = definition;
  39425. return definition
  39426. }
  39427. };
  39428. });
  39429. }
  39430. /* */
  39431. function getComponentName (opts) {
  39432. return opts && (opts.Ctor.options.name || opts.tag)
  39433. }
  39434. function matches (pattern, name) {
  39435. if (Array.isArray(pattern)) {
  39436. return pattern.indexOf(name) > -1
  39437. } else if (typeof pattern === 'string') {
  39438. return pattern.split(',').indexOf(name) > -1
  39439. } else if (isRegExp(pattern)) {
  39440. return pattern.test(name)
  39441. }
  39442. /* istanbul ignore next */
  39443. return false
  39444. }
  39445. function pruneCache (keepAliveInstance, filter) {
  39446. var cache = keepAliveInstance.cache;
  39447. var keys = keepAliveInstance.keys;
  39448. var _vnode = keepAliveInstance._vnode;
  39449. for (var key in cache) {
  39450. var entry = cache[key];
  39451. if (entry) {
  39452. var name = entry.name;
  39453. if (name && !filter(name)) {
  39454. pruneCacheEntry(cache, key, keys, _vnode);
  39455. }
  39456. }
  39457. }
  39458. }
  39459. function pruneCacheEntry (
  39460. cache,
  39461. key,
  39462. keys,
  39463. current
  39464. ) {
  39465. var entry = cache[key];
  39466. if (entry && (!current || entry.tag !== current.tag)) {
  39467. entry.componentInstance.$destroy();
  39468. }
  39469. cache[key] = null;
  39470. remove(keys, key);
  39471. }
  39472. var patternTypes = [String, RegExp, Array];
  39473. var KeepAlive = {
  39474. name: 'keep-alive',
  39475. abstract: true,
  39476. props: {
  39477. include: patternTypes,
  39478. exclude: patternTypes,
  39479. max: [String, Number]
  39480. },
  39481. methods: {
  39482. cacheVNode: function cacheVNode() {
  39483. var ref = this;
  39484. var cache = ref.cache;
  39485. var keys = ref.keys;
  39486. var vnodeToCache = ref.vnodeToCache;
  39487. var keyToCache = ref.keyToCache;
  39488. if (vnodeToCache) {
  39489. var tag = vnodeToCache.tag;
  39490. var componentInstance = vnodeToCache.componentInstance;
  39491. var componentOptions = vnodeToCache.componentOptions;
  39492. cache[keyToCache] = {
  39493. name: getComponentName(componentOptions),
  39494. tag: tag,
  39495. componentInstance: componentInstance,
  39496. };
  39497. keys.push(keyToCache);
  39498. // prune oldest entry
  39499. if (this.max && keys.length > parseInt(this.max)) {
  39500. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  39501. }
  39502. this.vnodeToCache = null;
  39503. }
  39504. }
  39505. },
  39506. created: function created () {
  39507. this.cache = Object.create(null);
  39508. this.keys = [];
  39509. },
  39510. destroyed: function destroyed () {
  39511. for (var key in this.cache) {
  39512. pruneCacheEntry(this.cache, key, this.keys);
  39513. }
  39514. },
  39515. mounted: function mounted () {
  39516. var this$1 = this;
  39517. this.cacheVNode();
  39518. this.$watch('include', function (val) {
  39519. pruneCache(this$1, function (name) { return matches(val, name); });
  39520. });
  39521. this.$watch('exclude', function (val) {
  39522. pruneCache(this$1, function (name) { return !matches(val, name); });
  39523. });
  39524. },
  39525. updated: function updated () {
  39526. this.cacheVNode();
  39527. },
  39528. render: function render () {
  39529. var slot = this.$slots.default;
  39530. var vnode = getFirstComponentChild(slot);
  39531. var componentOptions = vnode && vnode.componentOptions;
  39532. if (componentOptions) {
  39533. // check pattern
  39534. var name = getComponentName(componentOptions);
  39535. var ref = this;
  39536. var include = ref.include;
  39537. var exclude = ref.exclude;
  39538. if (
  39539. // not included
  39540. (include && (!name || !matches(include, name))) ||
  39541. // excluded
  39542. (exclude && name && matches(exclude, name))
  39543. ) {
  39544. return vnode
  39545. }
  39546. var ref$1 = this;
  39547. var cache = ref$1.cache;
  39548. var keys = ref$1.keys;
  39549. var key = vnode.key == null
  39550. // same constructor may get registered as different local components
  39551. // so cid alone is not enough (#3269)
  39552. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  39553. : vnode.key;
  39554. if (cache[key]) {
  39555. vnode.componentInstance = cache[key].componentInstance;
  39556. // make current key freshest
  39557. remove(keys, key);
  39558. keys.push(key);
  39559. } else {
  39560. // delay setting the cache until update
  39561. this.vnodeToCache = vnode;
  39562. this.keyToCache = key;
  39563. }
  39564. vnode.data.keepAlive = true;
  39565. }
  39566. return vnode || (slot && slot[0])
  39567. }
  39568. };
  39569. var builtInComponents = {
  39570. KeepAlive: KeepAlive
  39571. };
  39572. /* */
  39573. function initGlobalAPI (Vue) {
  39574. // config
  39575. var configDef = {};
  39576. configDef.get = function () { return config; };
  39577. {
  39578. configDef.set = function () {
  39579. warn(
  39580. 'Do not replace the Vue.config object, set individual fields instead.'
  39581. );
  39582. };
  39583. }
  39584. Object.defineProperty(Vue, 'config', configDef);
  39585. // exposed util methods.
  39586. // NOTE: these are not considered part of the public API - avoid relying on
  39587. // them unless you are aware of the risk.
  39588. Vue.util = {
  39589. warn: warn,
  39590. extend: extend,
  39591. mergeOptions: mergeOptions,
  39592. defineReactive: defineReactive$$1
  39593. };
  39594. Vue.set = set;
  39595. Vue.delete = del;
  39596. Vue.nextTick = nextTick;
  39597. // 2.6 explicit observable API
  39598. Vue.observable = function (obj) {
  39599. observe(obj);
  39600. return obj
  39601. };
  39602. Vue.options = Object.create(null);
  39603. ASSET_TYPES.forEach(function (type) {
  39604. Vue.options[type + 's'] = Object.create(null);
  39605. });
  39606. // this is used to identify the "base" constructor to extend all plain-object
  39607. // components with in Weex's multi-instance scenarios.
  39608. Vue.options._base = Vue;
  39609. extend(Vue.options.components, builtInComponents);
  39610. initUse(Vue);
  39611. initMixin$1(Vue);
  39612. initExtend(Vue);
  39613. initAssetRegisters(Vue);
  39614. }
  39615. initGlobalAPI(Vue);
  39616. Object.defineProperty(Vue.prototype, '$isServer', {
  39617. get: isServerRendering
  39618. });
  39619. Object.defineProperty(Vue.prototype, '$ssrContext', {
  39620. get: function get () {
  39621. /* istanbul ignore next */
  39622. return this.$vnode && this.$vnode.ssrContext
  39623. }
  39624. });
  39625. // expose FunctionalRenderContext for ssr runtime helper installation
  39626. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  39627. value: FunctionalRenderContext
  39628. });
  39629. Vue.version = '2.6.14';
  39630. /* */
  39631. // these are reserved for web because they are directly compiled away
  39632. // during template compilation
  39633. var isReservedAttr = makeMap('style,class');
  39634. // attributes that should be using props for binding
  39635. var acceptValue = makeMap('input,textarea,option,select,progress');
  39636. var mustUseProp = function (tag, type, attr) {
  39637. return (
  39638. (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
  39639. (attr === 'selected' && tag === 'option') ||
  39640. (attr === 'checked' && tag === 'input') ||
  39641. (attr === 'muted' && tag === 'video')
  39642. )
  39643. };
  39644. var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
  39645. var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
  39646. var convertEnumeratedValue = function (key, value) {
  39647. return isFalsyAttrValue(value) || value === 'false'
  39648. ? 'false'
  39649. // allow arbitrary string value for contenteditable
  39650. : key === 'contenteditable' && isValidContentEditableValue(value)
  39651. ? value
  39652. : 'true'
  39653. };
  39654. var isBooleanAttr = makeMap(
  39655. 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
  39656. 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
  39657. 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
  39658. 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
  39659. 'required,reversed,scoped,seamless,selected,sortable,' +
  39660. 'truespeed,typemustmatch,visible'
  39661. );
  39662. var xlinkNS = 'http://www.w3.org/1999/xlink';
  39663. var isXlink = function (name) {
  39664. return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'
  39665. };
  39666. var getXlinkProp = function (name) {
  39667. return isXlink(name) ? name.slice(6, name.length) : ''
  39668. };
  39669. var isFalsyAttrValue = function (val) {
  39670. return val == null || val === false
  39671. };
  39672. /* */
  39673. function genClassForVnode (vnode) {
  39674. var data = vnode.data;
  39675. var parentNode = vnode;
  39676. var childNode = vnode;
  39677. while (isDef(childNode.componentInstance)) {
  39678. childNode = childNode.componentInstance._vnode;
  39679. if (childNode && childNode.data) {
  39680. data = mergeClassData(childNode.data, data);
  39681. }
  39682. }
  39683. while (isDef(parentNode = parentNode.parent)) {
  39684. if (parentNode && parentNode.data) {
  39685. data = mergeClassData(data, parentNode.data);
  39686. }
  39687. }
  39688. return renderClass(data.staticClass, data.class)
  39689. }
  39690. function mergeClassData (child, parent) {
  39691. return {
  39692. staticClass: concat(child.staticClass, parent.staticClass),
  39693. class: isDef(child.class)
  39694. ? [child.class, parent.class]
  39695. : parent.class
  39696. }
  39697. }
  39698. function renderClass (
  39699. staticClass,
  39700. dynamicClass
  39701. ) {
  39702. if (isDef(staticClass) || isDef(dynamicClass)) {
  39703. return concat(staticClass, stringifyClass(dynamicClass))
  39704. }
  39705. /* istanbul ignore next */
  39706. return ''
  39707. }
  39708. function concat (a, b) {
  39709. return a ? b ? (a + ' ' + b) : a : (b || '')
  39710. }
  39711. function stringifyClass (value) {
  39712. if (Array.isArray(value)) {
  39713. return stringifyArray(value)
  39714. }
  39715. if (isObject(value)) {
  39716. return stringifyObject(value)
  39717. }
  39718. if (typeof value === 'string') {
  39719. return value
  39720. }
  39721. /* istanbul ignore next */
  39722. return ''
  39723. }
  39724. function stringifyArray (value) {
  39725. var res = '';
  39726. var stringified;
  39727. for (var i = 0, l = value.length; i < l; i++) {
  39728. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  39729. if (res) { res += ' '; }
  39730. res += stringified;
  39731. }
  39732. }
  39733. return res
  39734. }
  39735. function stringifyObject (value) {
  39736. var res = '';
  39737. for (var key in value) {
  39738. if (value[key]) {
  39739. if (res) { res += ' '; }
  39740. res += key;
  39741. }
  39742. }
  39743. return res
  39744. }
  39745. /* */
  39746. var namespaceMap = {
  39747. svg: 'http://www.w3.org/2000/svg',
  39748. math: 'http://www.w3.org/1998/Math/MathML'
  39749. };
  39750. var isHTMLTag = makeMap(
  39751. 'html,body,base,head,link,meta,style,title,' +
  39752. 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
  39753. 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
  39754. 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
  39755. 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
  39756. 'embed,object,param,source,canvas,script,noscript,del,ins,' +
  39757. 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
  39758. 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
  39759. 'output,progress,select,textarea,' +
  39760. 'details,dialog,menu,menuitem,summary,' +
  39761. 'content,element,shadow,template,blockquote,iframe,tfoot'
  39762. );
  39763. // this map is intentionally selective, only covering SVG elements that may
  39764. // contain child elements.
  39765. var isSVG = makeMap(
  39766. 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
  39767. 'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
  39768. 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
  39769. true
  39770. );
  39771. var isPreTag = function (tag) { return tag === 'pre'; };
  39772. var isReservedTag = function (tag) {
  39773. return isHTMLTag(tag) || isSVG(tag)
  39774. };
  39775. function getTagNamespace (tag) {
  39776. if (isSVG(tag)) {
  39777. return 'svg'
  39778. }
  39779. // basic support for MathML
  39780. // note it doesn't support other MathML elements being component roots
  39781. if (tag === 'math') {
  39782. return 'math'
  39783. }
  39784. }
  39785. var unknownElementCache = Object.create(null);
  39786. function isUnknownElement (tag) {
  39787. /* istanbul ignore if */
  39788. if (!inBrowser) {
  39789. return true
  39790. }
  39791. if (isReservedTag(tag)) {
  39792. return false
  39793. }
  39794. tag = tag.toLowerCase();
  39795. /* istanbul ignore if */
  39796. if (unknownElementCache[tag] != null) {
  39797. return unknownElementCache[tag]
  39798. }
  39799. var el = document.createElement(tag);
  39800. if (tag.indexOf('-') > -1) {
  39801. // http://stackoverflow.com/a/28210364/1070244
  39802. return (unknownElementCache[tag] = (
  39803. el.constructor === window.HTMLUnknownElement ||
  39804. el.constructor === window.HTMLElement
  39805. ))
  39806. } else {
  39807. return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
  39808. }
  39809. }
  39810. var isTextInputType = makeMap('text,number,password,search,email,tel,url');
  39811. /* */
  39812. /**
  39813. * Query an element selector if it's not an element already.
  39814. */
  39815. function query (el) {
  39816. if (typeof el === 'string') {
  39817. var selected = document.querySelector(el);
  39818. if (!selected) {
  39819. warn(
  39820. 'Cannot find element: ' + el
  39821. );
  39822. return document.createElement('div')
  39823. }
  39824. return selected
  39825. } else {
  39826. return el
  39827. }
  39828. }
  39829. /* */
  39830. function createElement$1 (tagName, vnode) {
  39831. var elm = document.createElement(tagName);
  39832. if (tagName !== 'select') {
  39833. return elm
  39834. }
  39835. // false or null will remove the attribute but undefined will not
  39836. if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
  39837. elm.setAttribute('multiple', 'multiple');
  39838. }
  39839. return elm
  39840. }
  39841. function createElementNS (namespace, tagName) {
  39842. return document.createElementNS(namespaceMap[namespace], tagName)
  39843. }
  39844. function createTextNode (text) {
  39845. return document.createTextNode(text)
  39846. }
  39847. function createComment (text) {
  39848. return document.createComment(text)
  39849. }
  39850. function insertBefore (parentNode, newNode, referenceNode) {
  39851. parentNode.insertBefore(newNode, referenceNode);
  39852. }
  39853. function removeChild (node, child) {
  39854. node.removeChild(child);
  39855. }
  39856. function appendChild (node, child) {
  39857. node.appendChild(child);
  39858. }
  39859. function parentNode (node) {
  39860. return node.parentNode
  39861. }
  39862. function nextSibling (node) {
  39863. return node.nextSibling
  39864. }
  39865. function tagName (node) {
  39866. return node.tagName
  39867. }
  39868. function setTextContent (node, text) {
  39869. node.textContent = text;
  39870. }
  39871. function setStyleScope (node, scopeId) {
  39872. node.setAttribute(scopeId, '');
  39873. }
  39874. var nodeOps = /*#__PURE__*/Object.freeze({
  39875. createElement: createElement$1,
  39876. createElementNS: createElementNS,
  39877. createTextNode: createTextNode,
  39878. createComment: createComment,
  39879. insertBefore: insertBefore,
  39880. removeChild: removeChild,
  39881. appendChild: appendChild,
  39882. parentNode: parentNode,
  39883. nextSibling: nextSibling,
  39884. tagName: tagName,
  39885. setTextContent: setTextContent,
  39886. setStyleScope: setStyleScope
  39887. });
  39888. /* */
  39889. var ref = {
  39890. create: function create (_, vnode) {
  39891. registerRef(vnode);
  39892. },
  39893. update: function update (oldVnode, vnode) {
  39894. if (oldVnode.data.ref !== vnode.data.ref) {
  39895. registerRef(oldVnode, true);
  39896. registerRef(vnode);
  39897. }
  39898. },
  39899. destroy: function destroy (vnode) {
  39900. registerRef(vnode, true);
  39901. }
  39902. };
  39903. function registerRef (vnode, isRemoval) {
  39904. var key = vnode.data.ref;
  39905. if (!isDef(key)) { return }
  39906. var vm = vnode.context;
  39907. var ref = vnode.componentInstance || vnode.elm;
  39908. var refs = vm.$refs;
  39909. if (isRemoval) {
  39910. if (Array.isArray(refs[key])) {
  39911. remove(refs[key], ref);
  39912. } else if (refs[key] === ref) {
  39913. refs[key] = undefined;
  39914. }
  39915. } else {
  39916. if (vnode.data.refInFor) {
  39917. if (!Array.isArray(refs[key])) {
  39918. refs[key] = [ref];
  39919. } else if (refs[key].indexOf(ref) < 0) {
  39920. // $flow-disable-line
  39921. refs[key].push(ref);
  39922. }
  39923. } else {
  39924. refs[key] = ref;
  39925. }
  39926. }
  39927. }
  39928. /**
  39929. * Virtual DOM patching algorithm based on Snabbdom by
  39930. * Simon Friis Vindum (@paldepind)
  39931. * Licensed under the MIT License
  39932. * https://github.com/paldepind/snabbdom/blob/master/LICENSE
  39933. *
  39934. * modified by Evan You (@yyx990803)
  39935. *
  39936. * Not type-checking this because this file is perf-critical and the cost
  39937. * of making flow understand it is not worth it.
  39938. */
  39939. var emptyNode = new VNode('', {}, []);
  39940. var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
  39941. function sameVnode (a, b) {
  39942. return (
  39943. a.key === b.key &&
  39944. a.asyncFactory === b.asyncFactory && (
  39945. (
  39946. a.tag === b.tag &&
  39947. a.isComment === b.isComment &&
  39948. isDef(a.data) === isDef(b.data) &&
  39949. sameInputType(a, b)
  39950. ) || (
  39951. isTrue(a.isAsyncPlaceholder) &&
  39952. isUndef(b.asyncFactory.error)
  39953. )
  39954. )
  39955. )
  39956. }
  39957. function sameInputType (a, b) {
  39958. if (a.tag !== 'input') { return true }
  39959. var i;
  39960. var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
  39961. var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
  39962. return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)
  39963. }
  39964. function createKeyToOldIdx (children, beginIdx, endIdx) {
  39965. var i, key;
  39966. var map = {};
  39967. for (i = beginIdx; i <= endIdx; ++i) {
  39968. key = children[i].key;
  39969. if (isDef(key)) { map[key] = i; }
  39970. }
  39971. return map
  39972. }
  39973. function createPatchFunction (backend) {
  39974. var i, j;
  39975. var cbs = {};
  39976. var modules = backend.modules;
  39977. var nodeOps = backend.nodeOps;
  39978. for (i = 0; i < hooks.length; ++i) {
  39979. cbs[hooks[i]] = [];
  39980. for (j = 0; j < modules.length; ++j) {
  39981. if (isDef(modules[j][hooks[i]])) {
  39982. cbs[hooks[i]].push(modules[j][hooks[i]]);
  39983. }
  39984. }
  39985. }
  39986. function emptyNodeAt (elm) {
  39987. return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
  39988. }
  39989. function createRmCb (childElm, listeners) {
  39990. function remove$$1 () {
  39991. if (--remove$$1.listeners === 0) {
  39992. removeNode(childElm);
  39993. }
  39994. }
  39995. remove$$1.listeners = listeners;
  39996. return remove$$1
  39997. }
  39998. function removeNode (el) {
  39999. var parent = nodeOps.parentNode(el);
  40000. // element may have already been removed due to v-html / v-text
  40001. if (isDef(parent)) {
  40002. nodeOps.removeChild(parent, el);
  40003. }
  40004. }
  40005. function isUnknownElement$$1 (vnode, inVPre) {
  40006. return (
  40007. !inVPre &&
  40008. !vnode.ns &&
  40009. !(
  40010. config.ignoredElements.length &&
  40011. config.ignoredElements.some(function (ignore) {
  40012. return isRegExp(ignore)
  40013. ? ignore.test(vnode.tag)
  40014. : ignore === vnode.tag
  40015. })
  40016. ) &&
  40017. config.isUnknownElement(vnode.tag)
  40018. )
  40019. }
  40020. var creatingElmInVPre = 0;
  40021. function createElm (
  40022. vnode,
  40023. insertedVnodeQueue,
  40024. parentElm,
  40025. refElm,
  40026. nested,
  40027. ownerArray,
  40028. index
  40029. ) {
  40030. if (isDef(vnode.elm) && isDef(ownerArray)) {
  40031. // This vnode was used in a previous render!
  40032. // now it's used as a new node, overwriting its elm would cause
  40033. // potential patch errors down the road when it's used as an insertion
  40034. // reference node. Instead, we clone the node on-demand before creating
  40035. // associated DOM element for it.
  40036. vnode = ownerArray[index] = cloneVNode(vnode);
  40037. }
  40038. vnode.isRootInsert = !nested; // for transition enter check
  40039. if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
  40040. return
  40041. }
  40042. var data = vnode.data;
  40043. var children = vnode.children;
  40044. var tag = vnode.tag;
  40045. if (isDef(tag)) {
  40046. {
  40047. if (data && data.pre) {
  40048. creatingElmInVPre++;
  40049. }
  40050. if (isUnknownElement$$1(vnode, creatingElmInVPre)) {
  40051. warn(
  40052. 'Unknown custom element: <' + tag + '> - did you ' +
  40053. 'register the component correctly? For recursive components, ' +
  40054. 'make sure to provide the "name" option.',
  40055. vnode.context
  40056. );
  40057. }
  40058. }
  40059. vnode.elm = vnode.ns
  40060. ? nodeOps.createElementNS(vnode.ns, tag)
  40061. : nodeOps.createElement(tag, vnode);
  40062. setScope(vnode);
  40063. /* istanbul ignore if */
  40064. {
  40065. createChildren(vnode, children, insertedVnodeQueue);
  40066. if (isDef(data)) {
  40067. invokeCreateHooks(vnode, insertedVnodeQueue);
  40068. }
  40069. insert(parentElm, vnode.elm, refElm);
  40070. }
  40071. if (data && data.pre) {
  40072. creatingElmInVPre--;
  40073. }
  40074. } else if (isTrue(vnode.isComment)) {
  40075. vnode.elm = nodeOps.createComment(vnode.text);
  40076. insert(parentElm, vnode.elm, refElm);
  40077. } else {
  40078. vnode.elm = nodeOps.createTextNode(vnode.text);
  40079. insert(parentElm, vnode.elm, refElm);
  40080. }
  40081. }
  40082. function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
  40083. var i = vnode.data;
  40084. if (isDef(i)) {
  40085. var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
  40086. if (isDef(i = i.hook) && isDef(i = i.init)) {
  40087. i(vnode, false /* hydrating */);
  40088. }
  40089. // after calling the init hook, if the vnode is a child component
  40090. // it should've created a child instance and mounted it. the child
  40091. // component also has set the placeholder vnode's elm.
  40092. // in that case we can just return the element and be done.
  40093. if (isDef(vnode.componentInstance)) {
  40094. initComponent(vnode, insertedVnodeQueue);
  40095. insert(parentElm, vnode.elm, refElm);
  40096. if (isTrue(isReactivated)) {
  40097. reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
  40098. }
  40099. return true
  40100. }
  40101. }
  40102. }
  40103. function initComponent (vnode, insertedVnodeQueue) {
  40104. if (isDef(vnode.data.pendingInsert)) {
  40105. insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
  40106. vnode.data.pendingInsert = null;
  40107. }
  40108. vnode.elm = vnode.componentInstance.$el;
  40109. if (isPatchable(vnode)) {
  40110. invokeCreateHooks(vnode, insertedVnodeQueue);
  40111. setScope(vnode);
  40112. } else {
  40113. // empty component root.
  40114. // skip all element-related modules except for ref (#3455)
  40115. registerRef(vnode);
  40116. // make sure to invoke the insert hook
  40117. insertedVnodeQueue.push(vnode);
  40118. }
  40119. }
  40120. function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
  40121. var i;
  40122. // hack for #4339: a reactivated component with inner transition
  40123. // does not trigger because the inner node's created hooks are not called
  40124. // again. It's not ideal to involve module-specific logic in here but
  40125. // there doesn't seem to be a better way to do it.
  40126. var innerNode = vnode;
  40127. while (innerNode.componentInstance) {
  40128. innerNode = innerNode.componentInstance._vnode;
  40129. if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
  40130. for (i = 0; i < cbs.activate.length; ++i) {
  40131. cbs.activate[i](emptyNode, innerNode);
  40132. }
  40133. insertedVnodeQueue.push(innerNode);
  40134. break
  40135. }
  40136. }
  40137. // unlike a newly created component,
  40138. // a reactivated keep-alive component doesn't insert itself
  40139. insert(parentElm, vnode.elm, refElm);
  40140. }
  40141. function insert (parent, elm, ref$$1) {
  40142. if (isDef(parent)) {
  40143. if (isDef(ref$$1)) {
  40144. if (nodeOps.parentNode(ref$$1) === parent) {
  40145. nodeOps.insertBefore(parent, elm, ref$$1);
  40146. }
  40147. } else {
  40148. nodeOps.appendChild(parent, elm);
  40149. }
  40150. }
  40151. }
  40152. function createChildren (vnode, children, insertedVnodeQueue) {
  40153. if (Array.isArray(children)) {
  40154. {
  40155. checkDuplicateKeys(children);
  40156. }
  40157. for (var i = 0; i < children.length; ++i) {
  40158. createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);
  40159. }
  40160. } else if (isPrimitive(vnode.text)) {
  40161. nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
  40162. }
  40163. }
  40164. function isPatchable (vnode) {
  40165. while (vnode.componentInstance) {
  40166. vnode = vnode.componentInstance._vnode;
  40167. }
  40168. return isDef(vnode.tag)
  40169. }
  40170. function invokeCreateHooks (vnode, insertedVnodeQueue) {
  40171. for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
  40172. cbs.create[i$1](emptyNode, vnode);
  40173. }
  40174. i = vnode.data.hook; // Reuse variable
  40175. if (isDef(i)) {
  40176. if (isDef(i.create)) { i.create(emptyNode, vnode); }
  40177. if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }
  40178. }
  40179. }
  40180. // set scope id attribute for scoped CSS.
  40181. // this is implemented as a special case to avoid the overhead
  40182. // of going through the normal attribute patching process.
  40183. function setScope (vnode) {
  40184. var i;
  40185. if (isDef(i = vnode.fnScopeId)) {
  40186. nodeOps.setStyleScope(vnode.elm, i);
  40187. } else {
  40188. var ancestor = vnode;
  40189. while (ancestor) {
  40190. if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
  40191. nodeOps.setStyleScope(vnode.elm, i);
  40192. }
  40193. ancestor = ancestor.parent;
  40194. }
  40195. }
  40196. // for slot content they should also get the scopeId from the host instance.
  40197. if (isDef(i = activeInstance) &&
  40198. i !== vnode.context &&
  40199. i !== vnode.fnContext &&
  40200. isDef(i = i.$options._scopeId)
  40201. ) {
  40202. nodeOps.setStyleScope(vnode.elm, i);
  40203. }
  40204. }
  40205. function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
  40206. for (; startIdx <= endIdx; ++startIdx) {
  40207. createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);
  40208. }
  40209. }
  40210. function invokeDestroyHook (vnode) {
  40211. var i, j;
  40212. var data = vnode.data;
  40213. if (isDef(data)) {
  40214. if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }
  40215. for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }
  40216. }
  40217. if (isDef(i = vnode.children)) {
  40218. for (j = 0; j < vnode.children.length; ++j) {
  40219. invokeDestroyHook(vnode.children[j]);
  40220. }
  40221. }
  40222. }
  40223. function removeVnodes (vnodes, startIdx, endIdx) {
  40224. for (; startIdx <= endIdx; ++startIdx) {
  40225. var ch = vnodes[startIdx];
  40226. if (isDef(ch)) {
  40227. if (isDef(ch.tag)) {
  40228. removeAndInvokeRemoveHook(ch);
  40229. invokeDestroyHook(ch);
  40230. } else { // Text node
  40231. removeNode(ch.elm);
  40232. }
  40233. }
  40234. }
  40235. }
  40236. function removeAndInvokeRemoveHook (vnode, rm) {
  40237. if (isDef(rm) || isDef(vnode.data)) {
  40238. var i;
  40239. var listeners = cbs.remove.length + 1;
  40240. if (isDef(rm)) {
  40241. // we have a recursively passed down rm callback
  40242. // increase the listeners count
  40243. rm.listeners += listeners;
  40244. } else {
  40245. // directly removing
  40246. rm = createRmCb(vnode.elm, listeners);
  40247. }
  40248. // recursively invoke hooks on child component root node
  40249. if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
  40250. removeAndInvokeRemoveHook(i, rm);
  40251. }
  40252. for (i = 0; i < cbs.remove.length; ++i) {
  40253. cbs.remove[i](vnode, rm);
  40254. }
  40255. if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
  40256. i(vnode, rm);
  40257. } else {
  40258. rm();
  40259. }
  40260. } else {
  40261. removeNode(vnode.elm);
  40262. }
  40263. }
  40264. function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
  40265. var oldStartIdx = 0;
  40266. var newStartIdx = 0;
  40267. var oldEndIdx = oldCh.length - 1;
  40268. var oldStartVnode = oldCh[0];
  40269. var oldEndVnode = oldCh[oldEndIdx];
  40270. var newEndIdx = newCh.length - 1;
  40271. var newStartVnode = newCh[0];
  40272. var newEndVnode = newCh[newEndIdx];
  40273. var oldKeyToIdx, idxInOld, vnodeToMove, refElm;
  40274. // removeOnly is a special flag used only by <transition-group>
  40275. // to ensure removed elements stay in correct relative positions
  40276. // during leaving transitions
  40277. var canMove = !removeOnly;
  40278. {
  40279. checkDuplicateKeys(newCh);
  40280. }
  40281. while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
  40282. if (isUndef(oldStartVnode)) {
  40283. oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
  40284. } else if (isUndef(oldEndVnode)) {
  40285. oldEndVnode = oldCh[--oldEndIdx];
  40286. } else if (sameVnode(oldStartVnode, newStartVnode)) {
  40287. patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  40288. oldStartVnode = oldCh[++oldStartIdx];
  40289. newStartVnode = newCh[++newStartIdx];
  40290. } else if (sameVnode(oldEndVnode, newEndVnode)) {
  40291. patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
  40292. oldEndVnode = oldCh[--oldEndIdx];
  40293. newEndVnode = newCh[--newEndIdx];
  40294. } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right
  40295. patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
  40296. canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
  40297. oldStartVnode = oldCh[++oldStartIdx];
  40298. newEndVnode = newCh[--newEndIdx];
  40299. } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left
  40300. patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  40301. canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
  40302. oldEndVnode = oldCh[--oldEndIdx];
  40303. newStartVnode = newCh[++newStartIdx];
  40304. } else {
  40305. if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
  40306. idxInOld = isDef(newStartVnode.key)
  40307. ? oldKeyToIdx[newStartVnode.key]
  40308. : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
  40309. if (isUndef(idxInOld)) { // New element
  40310. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
  40311. } else {
  40312. vnodeToMove = oldCh[idxInOld];
  40313. if (sameVnode(vnodeToMove, newStartVnode)) {
  40314. patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
  40315. oldCh[idxInOld] = undefined;
  40316. canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
  40317. } else {
  40318. // same key but different element. treat as new element
  40319. createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
  40320. }
  40321. }
  40322. newStartVnode = newCh[++newStartIdx];
  40323. }
  40324. }
  40325. if (oldStartIdx > oldEndIdx) {
  40326. refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
  40327. addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
  40328. } else if (newStartIdx > newEndIdx) {
  40329. removeVnodes(oldCh, oldStartIdx, oldEndIdx);
  40330. }
  40331. }
  40332. function checkDuplicateKeys (children) {
  40333. var seenKeys = {};
  40334. for (var i = 0; i < children.length; i++) {
  40335. var vnode = children[i];
  40336. var key = vnode.key;
  40337. if (isDef(key)) {
  40338. if (seenKeys[key]) {
  40339. warn(
  40340. ("Duplicate keys detected: '" + key + "'. This may cause an update error."),
  40341. vnode.context
  40342. );
  40343. } else {
  40344. seenKeys[key] = true;
  40345. }
  40346. }
  40347. }
  40348. }
  40349. function findIdxInOld (node, oldCh, start, end) {
  40350. for (var i = start; i < end; i++) {
  40351. var c = oldCh[i];
  40352. if (isDef(c) && sameVnode(node, c)) { return i }
  40353. }
  40354. }
  40355. function patchVnode (
  40356. oldVnode,
  40357. vnode,
  40358. insertedVnodeQueue,
  40359. ownerArray,
  40360. index,
  40361. removeOnly
  40362. ) {
  40363. if (oldVnode === vnode) {
  40364. return
  40365. }
  40366. if (isDef(vnode.elm) && isDef(ownerArray)) {
  40367. // clone reused vnode
  40368. vnode = ownerArray[index] = cloneVNode(vnode);
  40369. }
  40370. var elm = vnode.elm = oldVnode.elm;
  40371. if (isTrue(oldVnode.isAsyncPlaceholder)) {
  40372. if (isDef(vnode.asyncFactory.resolved)) {
  40373. hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
  40374. } else {
  40375. vnode.isAsyncPlaceholder = true;
  40376. }
  40377. return
  40378. }
  40379. // reuse element for static trees.
  40380. // note we only do this if the vnode is cloned -
  40381. // if the new node is not cloned it means the render functions have been
  40382. // reset by the hot-reload-api and we need to do a proper re-render.
  40383. if (isTrue(vnode.isStatic) &&
  40384. isTrue(oldVnode.isStatic) &&
  40385. vnode.key === oldVnode.key &&
  40386. (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
  40387. ) {
  40388. vnode.componentInstance = oldVnode.componentInstance;
  40389. return
  40390. }
  40391. var i;
  40392. var data = vnode.data;
  40393. if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
  40394. i(oldVnode, vnode);
  40395. }
  40396. var oldCh = oldVnode.children;
  40397. var ch = vnode.children;
  40398. if (isDef(data) && isPatchable(vnode)) {
  40399. for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }
  40400. if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }
  40401. }
  40402. if (isUndef(vnode.text)) {
  40403. if (isDef(oldCh) && isDef(ch)) {
  40404. if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }
  40405. } else if (isDef(ch)) {
  40406. {
  40407. checkDuplicateKeys(ch);
  40408. }
  40409. if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
  40410. addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
  40411. } else if (isDef(oldCh)) {
  40412. removeVnodes(oldCh, 0, oldCh.length - 1);
  40413. } else if (isDef(oldVnode.text)) {
  40414. nodeOps.setTextContent(elm, '');
  40415. }
  40416. } else if (oldVnode.text !== vnode.text) {
  40417. nodeOps.setTextContent(elm, vnode.text);
  40418. }
  40419. if (isDef(data)) {
  40420. if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }
  40421. }
  40422. }
  40423. function invokeInsertHook (vnode, queue, initial) {
  40424. // delay insert hooks for component root nodes, invoke them after the
  40425. // element is really inserted
  40426. if (isTrue(initial) && isDef(vnode.parent)) {
  40427. vnode.parent.data.pendingInsert = queue;
  40428. } else {
  40429. for (var i = 0; i < queue.length; ++i) {
  40430. queue[i].data.hook.insert(queue[i]);
  40431. }
  40432. }
  40433. }
  40434. var hydrationBailed = false;
  40435. // list of modules that can skip create hook during hydration because they
  40436. // are already rendered on the client or has no need for initialization
  40437. // Note: style is excluded because it relies on initial clone for future
  40438. // deep updates (#7063).
  40439. var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');
  40440. // Note: this is a browser-only function so we can assume elms are DOM nodes.
  40441. function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {
  40442. var i;
  40443. var tag = vnode.tag;
  40444. var data = vnode.data;
  40445. var children = vnode.children;
  40446. inVPre = inVPre || (data && data.pre);
  40447. vnode.elm = elm;
  40448. if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
  40449. vnode.isAsyncPlaceholder = true;
  40450. return true
  40451. }
  40452. // assert node match
  40453. {
  40454. if (!assertNodeMatch(elm, vnode, inVPre)) {
  40455. return false
  40456. }
  40457. }
  40458. if (isDef(data)) {
  40459. if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }
  40460. if (isDef(i = vnode.componentInstance)) {
  40461. // child component. it should have hydrated its own tree.
  40462. initComponent(vnode, insertedVnodeQueue);
  40463. return true
  40464. }
  40465. }
  40466. if (isDef(tag)) {
  40467. if (isDef(children)) {
  40468. // empty element, allow client to pick up and populate children
  40469. if (!elm.hasChildNodes()) {
  40470. createChildren(vnode, children, insertedVnodeQueue);
  40471. } else {
  40472. // v-html and domProps: innerHTML
  40473. if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {
  40474. if (i !== elm.innerHTML) {
  40475. /* istanbul ignore if */
  40476. if (typeof console !== 'undefined' &&
  40477. !hydrationBailed
  40478. ) {
  40479. hydrationBailed = true;
  40480. console.warn('Parent: ', elm);
  40481. console.warn('server innerHTML: ', i);
  40482. console.warn('client innerHTML: ', elm.innerHTML);
  40483. }
  40484. return false
  40485. }
  40486. } else {
  40487. // iterate and compare children lists
  40488. var childrenMatch = true;
  40489. var childNode = elm.firstChild;
  40490. for (var i$1 = 0; i$1 < children.length; i$1++) {
  40491. if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {
  40492. childrenMatch = false;
  40493. break
  40494. }
  40495. childNode = childNode.nextSibling;
  40496. }
  40497. // if childNode is not null, it means the actual childNodes list is
  40498. // longer than the virtual children list.
  40499. if (!childrenMatch || childNode) {
  40500. /* istanbul ignore if */
  40501. if (typeof console !== 'undefined' &&
  40502. !hydrationBailed
  40503. ) {
  40504. hydrationBailed = true;
  40505. console.warn('Parent: ', elm);
  40506. console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
  40507. }
  40508. return false
  40509. }
  40510. }
  40511. }
  40512. }
  40513. if (isDef(data)) {
  40514. var fullInvoke = false;
  40515. for (var key in data) {
  40516. if (!isRenderedModule(key)) {
  40517. fullInvoke = true;
  40518. invokeCreateHooks(vnode, insertedVnodeQueue);
  40519. break
  40520. }
  40521. }
  40522. if (!fullInvoke && data['class']) {
  40523. // ensure collecting deps for deep class bindings for future updates
  40524. traverse(data['class']);
  40525. }
  40526. }
  40527. } else if (elm.data !== vnode.text) {
  40528. elm.data = vnode.text;
  40529. }
  40530. return true
  40531. }
  40532. function assertNodeMatch (node, vnode, inVPre) {
  40533. if (isDef(vnode.tag)) {
  40534. return vnode.tag.indexOf('vue-component') === 0 || (
  40535. !isUnknownElement$$1(vnode, inVPre) &&
  40536. vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
  40537. )
  40538. } else {
  40539. return node.nodeType === (vnode.isComment ? 8 : 3)
  40540. }
  40541. }
  40542. return function patch (oldVnode, vnode, hydrating, removeOnly) {
  40543. if (isUndef(vnode)) {
  40544. if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }
  40545. return
  40546. }
  40547. var isInitialPatch = false;
  40548. var insertedVnodeQueue = [];
  40549. if (isUndef(oldVnode)) {
  40550. // empty mount (likely as component), create new root element
  40551. isInitialPatch = true;
  40552. createElm(vnode, insertedVnodeQueue);
  40553. } else {
  40554. var isRealElement = isDef(oldVnode.nodeType);
  40555. if (!isRealElement && sameVnode(oldVnode, vnode)) {
  40556. // patch existing root node
  40557. patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);
  40558. } else {
  40559. if (isRealElement) {
  40560. // mounting to a real element
  40561. // check if this is server-rendered content and if we can perform
  40562. // a successful hydration.
  40563. if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
  40564. oldVnode.removeAttribute(SSR_ATTR);
  40565. hydrating = true;
  40566. }
  40567. if (isTrue(hydrating)) {
  40568. if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
  40569. invokeInsertHook(vnode, insertedVnodeQueue, true);
  40570. return oldVnode
  40571. } else {
  40572. warn(
  40573. 'The client-side rendered virtual DOM tree is not matching ' +
  40574. 'server-rendered content. This is likely caused by incorrect ' +
  40575. 'HTML markup, for example nesting block-level elements inside ' +
  40576. '<p>, or missing <tbody>. Bailing hydration and performing ' +
  40577. 'full client-side render.'
  40578. );
  40579. }
  40580. }
  40581. // either not server-rendered, or hydration failed.
  40582. // create an empty node and replace it
  40583. oldVnode = emptyNodeAt(oldVnode);
  40584. }
  40585. // replacing existing element
  40586. var oldElm = oldVnode.elm;
  40587. var parentElm = nodeOps.parentNode(oldElm);
  40588. // create new node
  40589. createElm(
  40590. vnode,
  40591. insertedVnodeQueue,
  40592. // extremely rare edge case: do not insert if old element is in a
  40593. // leaving transition. Only happens when combining transition +
  40594. // keep-alive + HOCs. (#4590)
  40595. oldElm._leaveCb ? null : parentElm,
  40596. nodeOps.nextSibling(oldElm)
  40597. );
  40598. // update parent placeholder node element, recursively
  40599. if (isDef(vnode.parent)) {
  40600. var ancestor = vnode.parent;
  40601. var patchable = isPatchable(vnode);
  40602. while (ancestor) {
  40603. for (var i = 0; i < cbs.destroy.length; ++i) {
  40604. cbs.destroy[i](ancestor);
  40605. }
  40606. ancestor.elm = vnode.elm;
  40607. if (patchable) {
  40608. for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
  40609. cbs.create[i$1](emptyNode, ancestor);
  40610. }
  40611. // #6513
  40612. // invoke insert hooks that may have been merged by create hooks.
  40613. // e.g. for directives that uses the "inserted" hook.
  40614. var insert = ancestor.data.hook.insert;
  40615. if (insert.merged) {
  40616. // start at index 1 to avoid re-invoking component mounted hook
  40617. for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {
  40618. insert.fns[i$2]();
  40619. }
  40620. }
  40621. } else {
  40622. registerRef(ancestor);
  40623. }
  40624. ancestor = ancestor.parent;
  40625. }
  40626. }
  40627. // destroy old node
  40628. if (isDef(parentElm)) {
  40629. removeVnodes([oldVnode], 0, 0);
  40630. } else if (isDef(oldVnode.tag)) {
  40631. invokeDestroyHook(oldVnode);
  40632. }
  40633. }
  40634. }
  40635. invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
  40636. return vnode.elm
  40637. }
  40638. }
  40639. /* */
  40640. var directives = {
  40641. create: updateDirectives,
  40642. update: updateDirectives,
  40643. destroy: function unbindDirectives (vnode) {
  40644. updateDirectives(vnode, emptyNode);
  40645. }
  40646. };
  40647. function updateDirectives (oldVnode, vnode) {
  40648. if (oldVnode.data.directives || vnode.data.directives) {
  40649. _update(oldVnode, vnode);
  40650. }
  40651. }
  40652. function _update (oldVnode, vnode) {
  40653. var isCreate = oldVnode === emptyNode;
  40654. var isDestroy = vnode === emptyNode;
  40655. var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
  40656. var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
  40657. var dirsWithInsert = [];
  40658. var dirsWithPostpatch = [];
  40659. var key, oldDir, dir;
  40660. for (key in newDirs) {
  40661. oldDir = oldDirs[key];
  40662. dir = newDirs[key];
  40663. if (!oldDir) {
  40664. // new directive, bind
  40665. callHook$1(dir, 'bind', vnode, oldVnode);
  40666. if (dir.def && dir.def.inserted) {
  40667. dirsWithInsert.push(dir);
  40668. }
  40669. } else {
  40670. // existing directive, update
  40671. dir.oldValue = oldDir.value;
  40672. dir.oldArg = oldDir.arg;
  40673. callHook$1(dir, 'update', vnode, oldVnode);
  40674. if (dir.def && dir.def.componentUpdated) {
  40675. dirsWithPostpatch.push(dir);
  40676. }
  40677. }
  40678. }
  40679. if (dirsWithInsert.length) {
  40680. var callInsert = function () {
  40681. for (var i = 0; i < dirsWithInsert.length; i++) {
  40682. callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
  40683. }
  40684. };
  40685. if (isCreate) {
  40686. mergeVNodeHook(vnode, 'insert', callInsert);
  40687. } else {
  40688. callInsert();
  40689. }
  40690. }
  40691. if (dirsWithPostpatch.length) {
  40692. mergeVNodeHook(vnode, 'postpatch', function () {
  40693. for (var i = 0; i < dirsWithPostpatch.length; i++) {
  40694. callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
  40695. }
  40696. });
  40697. }
  40698. if (!isCreate) {
  40699. for (key in oldDirs) {
  40700. if (!newDirs[key]) {
  40701. // no longer present, unbind
  40702. callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
  40703. }
  40704. }
  40705. }
  40706. }
  40707. var emptyModifiers = Object.create(null);
  40708. function normalizeDirectives$1 (
  40709. dirs,
  40710. vm
  40711. ) {
  40712. var res = Object.create(null);
  40713. if (!dirs) {
  40714. // $flow-disable-line
  40715. return res
  40716. }
  40717. var i, dir;
  40718. for (i = 0; i < dirs.length; i++) {
  40719. dir = dirs[i];
  40720. if (!dir.modifiers) {
  40721. // $flow-disable-line
  40722. dir.modifiers = emptyModifiers;
  40723. }
  40724. res[getRawDirName(dir)] = dir;
  40725. dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
  40726. }
  40727. // $flow-disable-line
  40728. return res
  40729. }
  40730. function getRawDirName (dir) {
  40731. return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.')))
  40732. }
  40733. function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
  40734. var fn = dir.def && dir.def[hook];
  40735. if (fn) {
  40736. try {
  40737. fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
  40738. } catch (e) {
  40739. handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook"));
  40740. }
  40741. }
  40742. }
  40743. var baseModules = [
  40744. ref,
  40745. directives
  40746. ];
  40747. /* */
  40748. function updateAttrs (oldVnode, vnode) {
  40749. var opts = vnode.componentOptions;
  40750. if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
  40751. return
  40752. }
  40753. if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
  40754. return
  40755. }
  40756. var key, cur, old;
  40757. var elm = vnode.elm;
  40758. var oldAttrs = oldVnode.data.attrs || {};
  40759. var attrs = vnode.data.attrs || {};
  40760. // clone observed objects, as the user probably wants to mutate it
  40761. if (isDef(attrs.__ob__)) {
  40762. attrs = vnode.data.attrs = extend({}, attrs);
  40763. }
  40764. for (key in attrs) {
  40765. cur = attrs[key];
  40766. old = oldAttrs[key];
  40767. if (old !== cur) {
  40768. setAttr(elm, key, cur, vnode.data.pre);
  40769. }
  40770. }
  40771. // #4391: in IE9, setting type can reset value for input[type=radio]
  40772. // #6666: IE/Edge forces progress value down to 1 before setting a max
  40773. /* istanbul ignore if */
  40774. if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
  40775. setAttr(elm, 'value', attrs.value);
  40776. }
  40777. for (key in oldAttrs) {
  40778. if (isUndef(attrs[key])) {
  40779. if (isXlink(key)) {
  40780. elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
  40781. } else if (!isEnumeratedAttr(key)) {
  40782. elm.removeAttribute(key);
  40783. }
  40784. }
  40785. }
  40786. }
  40787. function setAttr (el, key, value, isInPre) {
  40788. if (isInPre || el.tagName.indexOf('-') > -1) {
  40789. baseSetAttr(el, key, value);
  40790. } else if (isBooleanAttr(key)) {
  40791. // set attribute for blank value
  40792. // e.g. <option disabled>Select one</option>
  40793. if (isFalsyAttrValue(value)) {
  40794. el.removeAttribute(key);
  40795. } else {
  40796. // technically allowfullscreen is a boolean attribute for <iframe>,
  40797. // but Flash expects a value of "true" when used on <embed> tag
  40798. value = key === 'allowfullscreen' && el.tagName === 'EMBED'
  40799. ? 'true'
  40800. : key;
  40801. el.setAttribute(key, value);
  40802. }
  40803. } else if (isEnumeratedAttr(key)) {
  40804. el.setAttribute(key, convertEnumeratedValue(key, value));
  40805. } else if (isXlink(key)) {
  40806. if (isFalsyAttrValue(value)) {
  40807. el.removeAttributeNS(xlinkNS, getXlinkProp(key));
  40808. } else {
  40809. el.setAttributeNS(xlinkNS, key, value);
  40810. }
  40811. } else {
  40812. baseSetAttr(el, key, value);
  40813. }
  40814. }
  40815. function baseSetAttr (el, key, value) {
  40816. if (isFalsyAttrValue(value)) {
  40817. el.removeAttribute(key);
  40818. } else {
  40819. // #7138: IE10 & 11 fires input event when setting placeholder on
  40820. // <textarea>... block the first input event and remove the blocker
  40821. // immediately.
  40822. /* istanbul ignore if */
  40823. if (
  40824. isIE && !isIE9 &&
  40825. el.tagName === 'TEXTAREA' &&
  40826. key === 'placeholder' && value !== '' && !el.__ieph
  40827. ) {
  40828. var blocker = function (e) {
  40829. e.stopImmediatePropagation();
  40830. el.removeEventListener('input', blocker);
  40831. };
  40832. el.addEventListener('input', blocker);
  40833. // $flow-disable-line
  40834. el.__ieph = true; /* IE placeholder patched */
  40835. }
  40836. el.setAttribute(key, value);
  40837. }
  40838. }
  40839. var attrs = {
  40840. create: updateAttrs,
  40841. update: updateAttrs
  40842. };
  40843. /* */
  40844. function updateClass (oldVnode, vnode) {
  40845. var el = vnode.elm;
  40846. var data = vnode.data;
  40847. var oldData = oldVnode.data;
  40848. if (
  40849. isUndef(data.staticClass) &&
  40850. isUndef(data.class) && (
  40851. isUndef(oldData) || (
  40852. isUndef(oldData.staticClass) &&
  40853. isUndef(oldData.class)
  40854. )
  40855. )
  40856. ) {
  40857. return
  40858. }
  40859. var cls = genClassForVnode(vnode);
  40860. // handle transition classes
  40861. var transitionClass = el._transitionClasses;
  40862. if (isDef(transitionClass)) {
  40863. cls = concat(cls, stringifyClass(transitionClass));
  40864. }
  40865. // set the class
  40866. if (cls !== el._prevClass) {
  40867. el.setAttribute('class', cls);
  40868. el._prevClass = cls;
  40869. }
  40870. }
  40871. var klass = {
  40872. create: updateClass,
  40873. update: updateClass
  40874. };
  40875. /* */
  40876. var validDivisionCharRE = /[\w).+\-_$\]]/;
  40877. function parseFilters (exp) {
  40878. var inSingle = false;
  40879. var inDouble = false;
  40880. var inTemplateString = false;
  40881. var inRegex = false;
  40882. var curly = 0;
  40883. var square = 0;
  40884. var paren = 0;
  40885. var lastFilterIndex = 0;
  40886. var c, prev, i, expression, filters;
  40887. for (i = 0; i < exp.length; i++) {
  40888. prev = c;
  40889. c = exp.charCodeAt(i);
  40890. if (inSingle) {
  40891. if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
  40892. } else if (inDouble) {
  40893. if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
  40894. } else if (inTemplateString) {
  40895. if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
  40896. } else if (inRegex) {
  40897. if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
  40898. } else if (
  40899. c === 0x7C && // pipe
  40900. exp.charCodeAt(i + 1) !== 0x7C &&
  40901. exp.charCodeAt(i - 1) !== 0x7C &&
  40902. !curly && !square && !paren
  40903. ) {
  40904. if (expression === undefined) {
  40905. // first filter, end of expression
  40906. lastFilterIndex = i + 1;
  40907. expression = exp.slice(0, i).trim();
  40908. } else {
  40909. pushFilter();
  40910. }
  40911. } else {
  40912. switch (c) {
  40913. case 0x22: inDouble = true; break // "
  40914. case 0x27: inSingle = true; break // '
  40915. case 0x60: inTemplateString = true; break // `
  40916. case 0x28: paren++; break // (
  40917. case 0x29: paren--; break // )
  40918. case 0x5B: square++; break // [
  40919. case 0x5D: square--; break // ]
  40920. case 0x7B: curly++; break // {
  40921. case 0x7D: curly--; break // }
  40922. }
  40923. if (c === 0x2f) { // /
  40924. var j = i - 1;
  40925. var p = (void 0);
  40926. // find first non-whitespace prev char
  40927. for (; j >= 0; j--) {
  40928. p = exp.charAt(j);
  40929. if (p !== ' ') { break }
  40930. }
  40931. if (!p || !validDivisionCharRE.test(p)) {
  40932. inRegex = true;
  40933. }
  40934. }
  40935. }
  40936. }
  40937. if (expression === undefined) {
  40938. expression = exp.slice(0, i).trim();
  40939. } else if (lastFilterIndex !== 0) {
  40940. pushFilter();
  40941. }
  40942. function pushFilter () {
  40943. (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
  40944. lastFilterIndex = i + 1;
  40945. }
  40946. if (filters) {
  40947. for (i = 0; i < filters.length; i++) {
  40948. expression = wrapFilter(expression, filters[i]);
  40949. }
  40950. }
  40951. return expression
  40952. }
  40953. function wrapFilter (exp, filter) {
  40954. var i = filter.indexOf('(');
  40955. if (i < 0) {
  40956. // _f: resolveFilter
  40957. return ("_f(\"" + filter + "\")(" + exp + ")")
  40958. } else {
  40959. var name = filter.slice(0, i);
  40960. var args = filter.slice(i + 1);
  40961. return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args))
  40962. }
  40963. }
  40964. /* */
  40965. /* eslint-disable no-unused-vars */
  40966. function baseWarn (msg, range) {
  40967. console.error(("[Vue compiler]: " + msg));
  40968. }
  40969. /* eslint-enable no-unused-vars */
  40970. function pluckModuleFunction (
  40971. modules,
  40972. key
  40973. ) {
  40974. return modules
  40975. ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
  40976. : []
  40977. }
  40978. function addProp (el, name, value, range, dynamic) {
  40979. (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
  40980. el.plain = false;
  40981. }
  40982. function addAttr (el, name, value, range, dynamic) {
  40983. var attrs = dynamic
  40984. ? (el.dynamicAttrs || (el.dynamicAttrs = []))
  40985. : (el.attrs || (el.attrs = []));
  40986. attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
  40987. el.plain = false;
  40988. }
  40989. // add a raw attr (use this in preTransforms)
  40990. function addRawAttr (el, name, value, range) {
  40991. el.attrsMap[name] = value;
  40992. el.attrsList.push(rangeSetItem({ name: name, value: value }, range));
  40993. }
  40994. function addDirective (
  40995. el,
  40996. name,
  40997. rawName,
  40998. value,
  40999. arg,
  41000. isDynamicArg,
  41001. modifiers,
  41002. range
  41003. ) {
  41004. (el.directives || (el.directives = [])).push(rangeSetItem({
  41005. name: name,
  41006. rawName: rawName,
  41007. value: value,
  41008. arg: arg,
  41009. isDynamicArg: isDynamicArg,
  41010. modifiers: modifiers
  41011. }, range));
  41012. el.plain = false;
  41013. }
  41014. function prependModifierMarker (symbol, name, dynamic) {
  41015. return dynamic
  41016. ? ("_p(" + name + ",\"" + symbol + "\")")
  41017. : symbol + name // mark the event as captured
  41018. }
  41019. function addHandler (
  41020. el,
  41021. name,
  41022. value,
  41023. modifiers,
  41024. important,
  41025. warn,
  41026. range,
  41027. dynamic
  41028. ) {
  41029. modifiers = modifiers || emptyObject;
  41030. // warn prevent and passive modifier
  41031. /* istanbul ignore if */
  41032. if (
  41033. warn &&
  41034. modifiers.prevent && modifiers.passive
  41035. ) {
  41036. warn(
  41037. 'passive and prevent can\'t be used together. ' +
  41038. 'Passive handler can\'t prevent default event.',
  41039. range
  41040. );
  41041. }
  41042. // normalize click.right and click.middle since they don't actually fire
  41043. // this is technically browser-specific, but at least for now browsers are
  41044. // the only target envs that have right/middle clicks.
  41045. if (modifiers.right) {
  41046. if (dynamic) {
  41047. name = "(" + name + ")==='click'?'contextmenu':(" + name + ")";
  41048. } else if (name === 'click') {
  41049. name = 'contextmenu';
  41050. delete modifiers.right;
  41051. }
  41052. } else if (modifiers.middle) {
  41053. if (dynamic) {
  41054. name = "(" + name + ")==='click'?'mouseup':(" + name + ")";
  41055. } else if (name === 'click') {
  41056. name = 'mouseup';
  41057. }
  41058. }
  41059. // check capture modifier
  41060. if (modifiers.capture) {
  41061. delete modifiers.capture;
  41062. name = prependModifierMarker('!', name, dynamic);
  41063. }
  41064. if (modifiers.once) {
  41065. delete modifiers.once;
  41066. name = prependModifierMarker('~', name, dynamic);
  41067. }
  41068. /* istanbul ignore if */
  41069. if (modifiers.passive) {
  41070. delete modifiers.passive;
  41071. name = prependModifierMarker('&', name, dynamic);
  41072. }
  41073. var events;
  41074. if (modifiers.native) {
  41075. delete modifiers.native;
  41076. events = el.nativeEvents || (el.nativeEvents = {});
  41077. } else {
  41078. events = el.events || (el.events = {});
  41079. }
  41080. var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range);
  41081. if (modifiers !== emptyObject) {
  41082. newHandler.modifiers = modifiers;
  41083. }
  41084. var handlers = events[name];
  41085. /* istanbul ignore if */
  41086. if (Array.isArray(handlers)) {
  41087. important ? handlers.unshift(newHandler) : handlers.push(newHandler);
  41088. } else if (handlers) {
  41089. events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
  41090. } else {
  41091. events[name] = newHandler;
  41092. }
  41093. el.plain = false;
  41094. }
  41095. function getRawBindingAttr (
  41096. el,
  41097. name
  41098. ) {
  41099. return el.rawAttrsMap[':' + name] ||
  41100. el.rawAttrsMap['v-bind:' + name] ||
  41101. el.rawAttrsMap[name]
  41102. }
  41103. function getBindingAttr (
  41104. el,
  41105. name,
  41106. getStatic
  41107. ) {
  41108. var dynamicValue =
  41109. getAndRemoveAttr(el, ':' + name) ||
  41110. getAndRemoveAttr(el, 'v-bind:' + name);
  41111. if (dynamicValue != null) {
  41112. return parseFilters(dynamicValue)
  41113. } else if (getStatic !== false) {
  41114. var staticValue = getAndRemoveAttr(el, name);
  41115. if (staticValue != null) {
  41116. return JSON.stringify(staticValue)
  41117. }
  41118. }
  41119. }
  41120. // note: this only removes the attr from the Array (attrsList) so that it
  41121. // doesn't get processed by processAttrs.
  41122. // By default it does NOT remove it from the map (attrsMap) because the map is
  41123. // needed during codegen.
  41124. function getAndRemoveAttr (
  41125. el,
  41126. name,
  41127. removeFromMap
  41128. ) {
  41129. var val;
  41130. if ((val = el.attrsMap[name]) != null) {
  41131. var list = el.attrsList;
  41132. for (var i = 0, l = list.length; i < l; i++) {
  41133. if (list[i].name === name) {
  41134. list.splice(i, 1);
  41135. break
  41136. }
  41137. }
  41138. }
  41139. if (removeFromMap) {
  41140. delete el.attrsMap[name];
  41141. }
  41142. return val
  41143. }
  41144. function getAndRemoveAttrByRegex (
  41145. el,
  41146. name
  41147. ) {
  41148. var list = el.attrsList;
  41149. for (var i = 0, l = list.length; i < l; i++) {
  41150. var attr = list[i];
  41151. if (name.test(attr.name)) {
  41152. list.splice(i, 1);
  41153. return attr
  41154. }
  41155. }
  41156. }
  41157. function rangeSetItem (
  41158. item,
  41159. range
  41160. ) {
  41161. if (range) {
  41162. if (range.start != null) {
  41163. item.start = range.start;
  41164. }
  41165. if (range.end != null) {
  41166. item.end = range.end;
  41167. }
  41168. }
  41169. return item
  41170. }
  41171. /* */
  41172. /**
  41173. * Cross-platform code generation for component v-model
  41174. */
  41175. function genComponentModel (
  41176. el,
  41177. value,
  41178. modifiers
  41179. ) {
  41180. var ref = modifiers || {};
  41181. var number = ref.number;
  41182. var trim = ref.trim;
  41183. var baseValueExpression = '$$v';
  41184. var valueExpression = baseValueExpression;
  41185. if (trim) {
  41186. valueExpression =
  41187. "(typeof " + baseValueExpression + " === 'string'" +
  41188. "? " + baseValueExpression + ".trim()" +
  41189. ": " + baseValueExpression + ")";
  41190. }
  41191. if (number) {
  41192. valueExpression = "_n(" + valueExpression + ")";
  41193. }
  41194. var assignment = genAssignmentCode(value, valueExpression);
  41195. el.model = {
  41196. value: ("(" + value + ")"),
  41197. expression: JSON.stringify(value),
  41198. callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
  41199. };
  41200. }
  41201. /**
  41202. * Cross-platform codegen helper for generating v-model value assignment code.
  41203. */
  41204. function genAssignmentCode (
  41205. value,
  41206. assignment
  41207. ) {
  41208. var res = parseModel(value);
  41209. if (res.key === null) {
  41210. return (value + "=" + assignment)
  41211. } else {
  41212. return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
  41213. }
  41214. }
  41215. /**
  41216. * Parse a v-model expression into a base path and a final key segment.
  41217. * Handles both dot-path and possible square brackets.
  41218. *
  41219. * Possible cases:
  41220. *
  41221. * - test
  41222. * - test[key]
  41223. * - test[test1[key]]
  41224. * - test["a"][key]
  41225. * - xxx.test[a[a].test1[key]]
  41226. * - test.xxx.a["asa"][test1[key]]
  41227. *
  41228. */
  41229. var len, str, chr, index$1, expressionPos, expressionEndPos;
  41230. function parseModel (val) {
  41231. // Fix https://github.com/vuejs/vue/pull/7730
  41232. // allow v-model="obj.val " (trailing whitespace)
  41233. val = val.trim();
  41234. len = val.length;
  41235. if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
  41236. index$1 = val.lastIndexOf('.');
  41237. if (index$1 > -1) {
  41238. return {
  41239. exp: val.slice(0, index$1),
  41240. key: '"' + val.slice(index$1 + 1) + '"'
  41241. }
  41242. } else {
  41243. return {
  41244. exp: val,
  41245. key: null
  41246. }
  41247. }
  41248. }
  41249. str = val;
  41250. index$1 = expressionPos = expressionEndPos = 0;
  41251. while (!eof()) {
  41252. chr = next();
  41253. /* istanbul ignore if */
  41254. if (isStringStart(chr)) {
  41255. parseString(chr);
  41256. } else if (chr === 0x5B) {
  41257. parseBracket(chr);
  41258. }
  41259. }
  41260. return {
  41261. exp: val.slice(0, expressionPos),
  41262. key: val.slice(expressionPos + 1, expressionEndPos)
  41263. }
  41264. }
  41265. function next () {
  41266. return str.charCodeAt(++index$1)
  41267. }
  41268. function eof () {
  41269. return index$1 >= len
  41270. }
  41271. function isStringStart (chr) {
  41272. return chr === 0x22 || chr === 0x27
  41273. }
  41274. function parseBracket (chr) {
  41275. var inBracket = 1;
  41276. expressionPos = index$1;
  41277. while (!eof()) {
  41278. chr = next();
  41279. if (isStringStart(chr)) {
  41280. parseString(chr);
  41281. continue
  41282. }
  41283. if (chr === 0x5B) { inBracket++; }
  41284. if (chr === 0x5D) { inBracket--; }
  41285. if (inBracket === 0) {
  41286. expressionEndPos = index$1;
  41287. break
  41288. }
  41289. }
  41290. }
  41291. function parseString (chr) {
  41292. var stringQuote = chr;
  41293. while (!eof()) {
  41294. chr = next();
  41295. if (chr === stringQuote) {
  41296. break
  41297. }
  41298. }
  41299. }
  41300. /* */
  41301. var warn$1;
  41302. // in some cases, the event used has to be determined at runtime
  41303. // so we used some reserved tokens during compile.
  41304. var RANGE_TOKEN = '__r';
  41305. var CHECKBOX_RADIO_TOKEN = '__c';
  41306. function model (
  41307. el,
  41308. dir,
  41309. _warn
  41310. ) {
  41311. warn$1 = _warn;
  41312. var value = dir.value;
  41313. var modifiers = dir.modifiers;
  41314. var tag = el.tag;
  41315. var type = el.attrsMap.type;
  41316. {
  41317. // inputs with type="file" are read only and setting the input's
  41318. // value will throw an error.
  41319. if (tag === 'input' && type === 'file') {
  41320. warn$1(
  41321. "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
  41322. "File inputs are read only. Use a v-on:change listener instead.",
  41323. el.rawAttrsMap['v-model']
  41324. );
  41325. }
  41326. }
  41327. if (el.component) {
  41328. genComponentModel(el, value, modifiers);
  41329. // component v-model doesn't need extra runtime
  41330. return false
  41331. } else if (tag === 'select') {
  41332. genSelect(el, value, modifiers);
  41333. } else if (tag === 'input' && type === 'checkbox') {
  41334. genCheckboxModel(el, value, modifiers);
  41335. } else if (tag === 'input' && type === 'radio') {
  41336. genRadioModel(el, value, modifiers);
  41337. } else if (tag === 'input' || tag === 'textarea') {
  41338. genDefaultModel(el, value, modifiers);
  41339. } else if (!config.isReservedTag(tag)) {
  41340. genComponentModel(el, value, modifiers);
  41341. // component v-model doesn't need extra runtime
  41342. return false
  41343. } else {
  41344. warn$1(
  41345. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  41346. "v-model is not supported on this element type. " +
  41347. 'If you are working with contenteditable, it\'s recommended to ' +
  41348. 'wrap a library dedicated for that purpose inside a custom component.',
  41349. el.rawAttrsMap['v-model']
  41350. );
  41351. }
  41352. // ensure runtime directive metadata
  41353. return true
  41354. }
  41355. function genCheckboxModel (
  41356. el,
  41357. value,
  41358. modifiers
  41359. ) {
  41360. var number = modifiers && modifiers.number;
  41361. var valueBinding = getBindingAttr(el, 'value') || 'null';
  41362. var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
  41363. var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
  41364. addProp(el, 'checked',
  41365. "Array.isArray(" + value + ")" +
  41366. "?_i(" + value + "," + valueBinding + ")>-1" + (
  41367. trueValueBinding === 'true'
  41368. ? (":(" + value + ")")
  41369. : (":_q(" + value + "," + trueValueBinding + ")")
  41370. )
  41371. );
  41372. addHandler(el, 'change',
  41373. "var $$a=" + value + "," +
  41374. '$$el=$event.target,' +
  41375. "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
  41376. 'if(Array.isArray($$a)){' +
  41377. "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
  41378. '$$i=_i($$a,$$v);' +
  41379. "if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" +
  41380. "else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" +
  41381. "}else{" + (genAssignmentCode(value, '$$c')) + "}",
  41382. null, true
  41383. );
  41384. }
  41385. function genRadioModel (
  41386. el,
  41387. value,
  41388. modifiers
  41389. ) {
  41390. var number = modifiers && modifiers.number;
  41391. var valueBinding = getBindingAttr(el, 'value') || 'null';
  41392. valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
  41393. addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
  41394. addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
  41395. }
  41396. function genSelect (
  41397. el,
  41398. value,
  41399. modifiers
  41400. ) {
  41401. var number = modifiers && modifiers.number;
  41402. var selectedVal = "Array.prototype.filter" +
  41403. ".call($event.target.options,function(o){return o.selected})" +
  41404. ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
  41405. "return " + (number ? '_n(val)' : 'val') + "})";
  41406. var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
  41407. var code = "var $$selectedVal = " + selectedVal + ";";
  41408. code = code + " " + (genAssignmentCode(value, assignment));
  41409. addHandler(el, 'change', code, null, true);
  41410. }
  41411. function genDefaultModel (
  41412. el,
  41413. value,
  41414. modifiers
  41415. ) {
  41416. var type = el.attrsMap.type;
  41417. // warn if v-bind:value conflicts with v-model
  41418. // except for inputs with v-bind:type
  41419. {
  41420. var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
  41421. var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
  41422. if (value$1 && !typeBinding) {
  41423. var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
  41424. warn$1(
  41425. binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " +
  41426. 'because the latter already expands to a value binding internally',
  41427. el.rawAttrsMap[binding]
  41428. );
  41429. }
  41430. }
  41431. var ref = modifiers || {};
  41432. var lazy = ref.lazy;
  41433. var number = ref.number;
  41434. var trim = ref.trim;
  41435. var needCompositionGuard = !lazy && type !== 'range';
  41436. var event = lazy
  41437. ? 'change'
  41438. : type === 'range'
  41439. ? RANGE_TOKEN
  41440. : 'input';
  41441. var valueExpression = '$event.target.value';
  41442. if (trim) {
  41443. valueExpression = "$event.target.value.trim()";
  41444. }
  41445. if (number) {
  41446. valueExpression = "_n(" + valueExpression + ")";
  41447. }
  41448. var code = genAssignmentCode(value, valueExpression);
  41449. if (needCompositionGuard) {
  41450. code = "if($event.target.composing)return;" + code;
  41451. }
  41452. addProp(el, 'value', ("(" + value + ")"));
  41453. addHandler(el, event, code, null, true);
  41454. if (trim || number) {
  41455. addHandler(el, 'blur', '$forceUpdate()');
  41456. }
  41457. }
  41458. /* */
  41459. // normalize v-model event tokens that can only be determined at runtime.
  41460. // it's important to place the event as the first in the array because
  41461. // the whole point is ensuring the v-model callback gets called before
  41462. // user-attached handlers.
  41463. function normalizeEvents (on) {
  41464. /* istanbul ignore if */
  41465. if (isDef(on[RANGE_TOKEN])) {
  41466. // IE input[type=range] only supports `change` event
  41467. var event = isIE ? 'change' : 'input';
  41468. on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
  41469. delete on[RANGE_TOKEN];
  41470. }
  41471. // This was originally intended to fix #4521 but no longer necessary
  41472. // after 2.5. Keeping it for backwards compat with generated code from < 2.4
  41473. /* istanbul ignore if */
  41474. if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
  41475. on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
  41476. delete on[CHECKBOX_RADIO_TOKEN];
  41477. }
  41478. }
  41479. var target$1;
  41480. function createOnceHandler$1 (event, handler, capture) {
  41481. var _target = target$1; // save current target element in closure
  41482. return function onceHandler () {
  41483. var res = handler.apply(null, arguments);
  41484. if (res !== null) {
  41485. remove$2(event, onceHandler, capture, _target);
  41486. }
  41487. }
  41488. }
  41489. // #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp
  41490. // implementation and does not fire microtasks in between event propagation, so
  41491. // safe to exclude.
  41492. var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);
  41493. function add$1 (
  41494. name,
  41495. handler,
  41496. capture,
  41497. passive
  41498. ) {
  41499. // async edge case #6566: inner click event triggers patch, event handler
  41500. // attached to outer element during patch, and triggered again. This
  41501. // happens because browsers fire microtask ticks between event propagation.
  41502. // the solution is simple: we save the timestamp when a handler is attached,
  41503. // and the handler would only fire if the event passed to it was fired
  41504. // AFTER it was attached.
  41505. if (useMicrotaskFix) {
  41506. var attachedTimestamp = currentFlushTimestamp;
  41507. var original = handler;
  41508. handler = original._wrapper = function (e) {
  41509. if (
  41510. // no bubbling, should always fire.
  41511. // this is just a safety net in case event.timeStamp is unreliable in
  41512. // certain weird environments...
  41513. e.target === e.currentTarget ||
  41514. // event is fired after handler attachment
  41515. e.timeStamp >= attachedTimestamp ||
  41516. // bail for environments that have buggy event.timeStamp implementations
  41517. // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
  41518. // #9681 QtWebEngine event.timeStamp is negative value
  41519. e.timeStamp <= 0 ||
  41520. // #9448 bail if event is fired in another document in a multi-page
  41521. // electron/nw.js app, since event.timeStamp will be using a different
  41522. // starting reference
  41523. e.target.ownerDocument !== document
  41524. ) {
  41525. return original.apply(this, arguments)
  41526. }
  41527. };
  41528. }
  41529. target$1.addEventListener(
  41530. name,
  41531. handler,
  41532. supportsPassive
  41533. ? { capture: capture, passive: passive }
  41534. : capture
  41535. );
  41536. }
  41537. function remove$2 (
  41538. name,
  41539. handler,
  41540. capture,
  41541. _target
  41542. ) {
  41543. (_target || target$1).removeEventListener(
  41544. name,
  41545. handler._wrapper || handler,
  41546. capture
  41547. );
  41548. }
  41549. function updateDOMListeners (oldVnode, vnode) {
  41550. if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
  41551. return
  41552. }
  41553. var on = vnode.data.on || {};
  41554. var oldOn = oldVnode.data.on || {};
  41555. target$1 = vnode.elm;
  41556. normalizeEvents(on);
  41557. updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context);
  41558. target$1 = undefined;
  41559. }
  41560. var events = {
  41561. create: updateDOMListeners,
  41562. update: updateDOMListeners
  41563. };
  41564. /* */
  41565. var svgContainer;
  41566. function updateDOMProps (oldVnode, vnode) {
  41567. if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
  41568. return
  41569. }
  41570. var key, cur;
  41571. var elm = vnode.elm;
  41572. var oldProps = oldVnode.data.domProps || {};
  41573. var props = vnode.data.domProps || {};
  41574. // clone observed objects, as the user probably wants to mutate it
  41575. if (isDef(props.__ob__)) {
  41576. props = vnode.data.domProps = extend({}, props);
  41577. }
  41578. for (key in oldProps) {
  41579. if (!(key in props)) {
  41580. elm[key] = '';
  41581. }
  41582. }
  41583. for (key in props) {
  41584. cur = props[key];
  41585. // ignore children if the node has textContent or innerHTML,
  41586. // as these will throw away existing DOM nodes and cause removal errors
  41587. // on subsequent patches (#3360)
  41588. if (key === 'textContent' || key === 'innerHTML') {
  41589. if (vnode.children) { vnode.children.length = 0; }
  41590. if (cur === oldProps[key]) { continue }
  41591. // #6601 work around Chrome version <= 55 bug where single textNode
  41592. // replaced by innerHTML/textContent retains its parentNode property
  41593. if (elm.childNodes.length === 1) {
  41594. elm.removeChild(elm.childNodes[0]);
  41595. }
  41596. }
  41597. if (key === 'value' && elm.tagName !== 'PROGRESS') {
  41598. // store value as _value as well since
  41599. // non-string values will be stringified
  41600. elm._value = cur;
  41601. // avoid resetting cursor position when value is the same
  41602. var strCur = isUndef(cur) ? '' : String(cur);
  41603. if (shouldUpdateValue(elm, strCur)) {
  41604. elm.value = strCur;
  41605. }
  41606. } else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) {
  41607. // IE doesn't support innerHTML for SVG elements
  41608. svgContainer = svgContainer || document.createElement('div');
  41609. svgContainer.innerHTML = "<svg>" + cur + "</svg>";
  41610. var svg = svgContainer.firstChild;
  41611. while (elm.firstChild) {
  41612. elm.removeChild(elm.firstChild);
  41613. }
  41614. while (svg.firstChild) {
  41615. elm.appendChild(svg.firstChild);
  41616. }
  41617. } else if (
  41618. // skip the update if old and new VDOM state is the same.
  41619. // `value` is handled separately because the DOM value may be temporarily
  41620. // out of sync with VDOM state due to focus, composition and modifiers.
  41621. // This #4521 by skipping the unnecessary `checked` update.
  41622. cur !== oldProps[key]
  41623. ) {
  41624. // some property updates can throw
  41625. // e.g. `value` on <progress> w/ non-finite value
  41626. try {
  41627. elm[key] = cur;
  41628. } catch (e) {}
  41629. }
  41630. }
  41631. }
  41632. // check platforms/web/util/attrs.js acceptValue
  41633. function shouldUpdateValue (elm, checkVal) {
  41634. return (!elm.composing && (
  41635. elm.tagName === 'OPTION' ||
  41636. isNotInFocusAndDirty(elm, checkVal) ||
  41637. isDirtyWithModifiers(elm, checkVal)
  41638. ))
  41639. }
  41640. function isNotInFocusAndDirty (elm, checkVal) {
  41641. // return true when textbox (.number and .trim) loses focus and its value is
  41642. // not equal to the updated value
  41643. var notInFocus = true;
  41644. // #6157
  41645. // work around IE bug when accessing document.activeElement in an iframe
  41646. try { notInFocus = document.activeElement !== elm; } catch (e) {}
  41647. return notInFocus && elm.value !== checkVal
  41648. }
  41649. function isDirtyWithModifiers (elm, newVal) {
  41650. var value = elm.value;
  41651. var modifiers = elm._vModifiers; // injected by v-model runtime
  41652. if (isDef(modifiers)) {
  41653. if (modifiers.number) {
  41654. return toNumber(value) !== toNumber(newVal)
  41655. }
  41656. if (modifiers.trim) {
  41657. return value.trim() !== newVal.trim()
  41658. }
  41659. }
  41660. return value !== newVal
  41661. }
  41662. var domProps = {
  41663. create: updateDOMProps,
  41664. update: updateDOMProps
  41665. };
  41666. /* */
  41667. var parseStyleText = cached(function (cssText) {
  41668. var res = {};
  41669. var listDelimiter = /;(?![^(]*\))/g;
  41670. var propertyDelimiter = /:(.+)/;
  41671. cssText.split(listDelimiter).forEach(function (item) {
  41672. if (item) {
  41673. var tmp = item.split(propertyDelimiter);
  41674. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  41675. }
  41676. });
  41677. return res
  41678. });
  41679. // merge static and dynamic style data on the same vnode
  41680. function normalizeStyleData (data) {
  41681. var style = normalizeStyleBinding(data.style);
  41682. // static style is pre-processed into an object during compilation
  41683. // and is always a fresh object, so it's safe to merge into it
  41684. return data.staticStyle
  41685. ? extend(data.staticStyle, style)
  41686. : style
  41687. }
  41688. // normalize possible array / string values into Object
  41689. function normalizeStyleBinding (bindingStyle) {
  41690. if (Array.isArray(bindingStyle)) {
  41691. return toObject(bindingStyle)
  41692. }
  41693. if (typeof bindingStyle === 'string') {
  41694. return parseStyleText(bindingStyle)
  41695. }
  41696. return bindingStyle
  41697. }
  41698. /**
  41699. * parent component style should be after child's
  41700. * so that parent component's style could override it
  41701. */
  41702. function getStyle (vnode, checkChild) {
  41703. var res = {};
  41704. var styleData;
  41705. if (checkChild) {
  41706. var childNode = vnode;
  41707. while (childNode.componentInstance) {
  41708. childNode = childNode.componentInstance._vnode;
  41709. if (
  41710. childNode && childNode.data &&
  41711. (styleData = normalizeStyleData(childNode.data))
  41712. ) {
  41713. extend(res, styleData);
  41714. }
  41715. }
  41716. }
  41717. if ((styleData = normalizeStyleData(vnode.data))) {
  41718. extend(res, styleData);
  41719. }
  41720. var parentNode = vnode;
  41721. while ((parentNode = parentNode.parent)) {
  41722. if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
  41723. extend(res, styleData);
  41724. }
  41725. }
  41726. return res
  41727. }
  41728. /* */
  41729. var cssVarRE = /^--/;
  41730. var importantRE = /\s*!important$/;
  41731. var setProp = function (el, name, val) {
  41732. /* istanbul ignore if */
  41733. if (cssVarRE.test(name)) {
  41734. el.style.setProperty(name, val);
  41735. } else if (importantRE.test(val)) {
  41736. el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');
  41737. } else {
  41738. var normalizedName = normalize(name);
  41739. if (Array.isArray(val)) {
  41740. // Support values array created by autoprefixer, e.g.
  41741. // {display: ["-webkit-box", "-ms-flexbox", "flex"]}
  41742. // Set them one by one, and the browser will only set those it can recognize
  41743. for (var i = 0, len = val.length; i < len; i++) {
  41744. el.style[normalizedName] = val[i];
  41745. }
  41746. } else {
  41747. el.style[normalizedName] = val;
  41748. }
  41749. }
  41750. };
  41751. var vendorNames = ['Webkit', 'Moz', 'ms'];
  41752. var emptyStyle;
  41753. var normalize = cached(function (prop) {
  41754. emptyStyle = emptyStyle || document.createElement('div').style;
  41755. prop = camelize(prop);
  41756. if (prop !== 'filter' && (prop in emptyStyle)) {
  41757. return prop
  41758. }
  41759. var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
  41760. for (var i = 0; i < vendorNames.length; i++) {
  41761. var name = vendorNames[i] + capName;
  41762. if (name in emptyStyle) {
  41763. return name
  41764. }
  41765. }
  41766. });
  41767. function updateStyle (oldVnode, vnode) {
  41768. var data = vnode.data;
  41769. var oldData = oldVnode.data;
  41770. if (isUndef(data.staticStyle) && isUndef(data.style) &&
  41771. isUndef(oldData.staticStyle) && isUndef(oldData.style)
  41772. ) {
  41773. return
  41774. }
  41775. var cur, name;
  41776. var el = vnode.elm;
  41777. var oldStaticStyle = oldData.staticStyle;
  41778. var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
  41779. // if static style exists, stylebinding already merged into it when doing normalizeStyleData
  41780. var oldStyle = oldStaticStyle || oldStyleBinding;
  41781. var style = normalizeStyleBinding(vnode.data.style) || {};
  41782. // store normalized style under a different key for next diff
  41783. // make sure to clone it if it's reactive, since the user likely wants
  41784. // to mutate it.
  41785. vnode.data.normalizedStyle = isDef(style.__ob__)
  41786. ? extend({}, style)
  41787. : style;
  41788. var newStyle = getStyle(vnode, true);
  41789. for (name in oldStyle) {
  41790. if (isUndef(newStyle[name])) {
  41791. setProp(el, name, '');
  41792. }
  41793. }
  41794. for (name in newStyle) {
  41795. cur = newStyle[name];
  41796. if (cur !== oldStyle[name]) {
  41797. // ie9 setting to null has no effect, must use empty string
  41798. setProp(el, name, cur == null ? '' : cur);
  41799. }
  41800. }
  41801. }
  41802. var style = {
  41803. create: updateStyle,
  41804. update: updateStyle
  41805. };
  41806. /* */
  41807. var whitespaceRE = /\s+/;
  41808. /**
  41809. * Add class with compatibility for SVG since classList is not supported on
  41810. * SVG elements in IE
  41811. */
  41812. function addClass (el, cls) {
  41813. /* istanbul ignore if */
  41814. if (!cls || !(cls = cls.trim())) {
  41815. return
  41816. }
  41817. /* istanbul ignore else */
  41818. if (el.classList) {
  41819. if (cls.indexOf(' ') > -1) {
  41820. cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });
  41821. } else {
  41822. el.classList.add(cls);
  41823. }
  41824. } else {
  41825. var cur = " " + (el.getAttribute('class') || '') + " ";
  41826. if (cur.indexOf(' ' + cls + ' ') < 0) {
  41827. el.setAttribute('class', (cur + cls).trim());
  41828. }
  41829. }
  41830. }
  41831. /**
  41832. * Remove class with compatibility for SVG since classList is not supported on
  41833. * SVG elements in IE
  41834. */
  41835. function removeClass (el, cls) {
  41836. /* istanbul ignore if */
  41837. if (!cls || !(cls = cls.trim())) {
  41838. return
  41839. }
  41840. /* istanbul ignore else */
  41841. if (el.classList) {
  41842. if (cls.indexOf(' ') > -1) {
  41843. cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });
  41844. } else {
  41845. el.classList.remove(cls);
  41846. }
  41847. if (!el.classList.length) {
  41848. el.removeAttribute('class');
  41849. }
  41850. } else {
  41851. var cur = " " + (el.getAttribute('class') || '') + " ";
  41852. var tar = ' ' + cls + ' ';
  41853. while (cur.indexOf(tar) >= 0) {
  41854. cur = cur.replace(tar, ' ');
  41855. }
  41856. cur = cur.trim();
  41857. if (cur) {
  41858. el.setAttribute('class', cur);
  41859. } else {
  41860. el.removeAttribute('class');
  41861. }
  41862. }
  41863. }
  41864. /* */
  41865. function resolveTransition (def$$1) {
  41866. if (!def$$1) {
  41867. return
  41868. }
  41869. /* istanbul ignore else */
  41870. if (typeof def$$1 === 'object') {
  41871. var res = {};
  41872. if (def$$1.css !== false) {
  41873. extend(res, autoCssTransition(def$$1.name || 'v'));
  41874. }
  41875. extend(res, def$$1);
  41876. return res
  41877. } else if (typeof def$$1 === 'string') {
  41878. return autoCssTransition(def$$1)
  41879. }
  41880. }
  41881. var autoCssTransition = cached(function (name) {
  41882. return {
  41883. enterClass: (name + "-enter"),
  41884. enterToClass: (name + "-enter-to"),
  41885. enterActiveClass: (name + "-enter-active"),
  41886. leaveClass: (name + "-leave"),
  41887. leaveToClass: (name + "-leave-to"),
  41888. leaveActiveClass: (name + "-leave-active")
  41889. }
  41890. });
  41891. var hasTransition = inBrowser && !isIE9;
  41892. var TRANSITION = 'transition';
  41893. var ANIMATION = 'animation';
  41894. // Transition property/event sniffing
  41895. var transitionProp = 'transition';
  41896. var transitionEndEvent = 'transitionend';
  41897. var animationProp = 'animation';
  41898. var animationEndEvent = 'animationend';
  41899. if (hasTransition) {
  41900. /* istanbul ignore if */
  41901. if (window.ontransitionend === undefined &&
  41902. window.onwebkittransitionend !== undefined
  41903. ) {
  41904. transitionProp = 'WebkitTransition';
  41905. transitionEndEvent = 'webkitTransitionEnd';
  41906. }
  41907. if (window.onanimationend === undefined &&
  41908. window.onwebkitanimationend !== undefined
  41909. ) {
  41910. animationProp = 'WebkitAnimation';
  41911. animationEndEvent = 'webkitAnimationEnd';
  41912. }
  41913. }
  41914. // binding to window is necessary to make hot reload work in IE in strict mode
  41915. var raf = inBrowser
  41916. ? window.requestAnimationFrame
  41917. ? window.requestAnimationFrame.bind(window)
  41918. : setTimeout
  41919. : /* istanbul ignore next */ function (fn) { return fn(); };
  41920. function nextFrame (fn) {
  41921. raf(function () {
  41922. raf(fn);
  41923. });
  41924. }
  41925. function addTransitionClass (el, cls) {
  41926. var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
  41927. if (transitionClasses.indexOf(cls) < 0) {
  41928. transitionClasses.push(cls);
  41929. addClass(el, cls);
  41930. }
  41931. }
  41932. function removeTransitionClass (el, cls) {
  41933. if (el._transitionClasses) {
  41934. remove(el._transitionClasses, cls);
  41935. }
  41936. removeClass(el, cls);
  41937. }
  41938. function whenTransitionEnds (
  41939. el,
  41940. expectedType,
  41941. cb
  41942. ) {
  41943. var ref = getTransitionInfo(el, expectedType);
  41944. var type = ref.type;
  41945. var timeout = ref.timeout;
  41946. var propCount = ref.propCount;
  41947. if (!type) { return cb() }
  41948. var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
  41949. var ended = 0;
  41950. var end = function () {
  41951. el.removeEventListener(event, onEnd);
  41952. cb();
  41953. };
  41954. var onEnd = function (e) {
  41955. if (e.target === el) {
  41956. if (++ended >= propCount) {
  41957. end();
  41958. }
  41959. }
  41960. };
  41961. setTimeout(function () {
  41962. if (ended < propCount) {
  41963. end();
  41964. }
  41965. }, timeout + 1);
  41966. el.addEventListener(event, onEnd);
  41967. }
  41968. var transformRE = /\b(transform|all)(,|$)/;
  41969. function getTransitionInfo (el, expectedType) {
  41970. var styles = window.getComputedStyle(el);
  41971. // JSDOM may return undefined for transition properties
  41972. var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');
  41973. var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');
  41974. var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  41975. var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');
  41976. var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');
  41977. var animationTimeout = getTimeout(animationDelays, animationDurations);
  41978. var type;
  41979. var timeout = 0;
  41980. var propCount = 0;
  41981. /* istanbul ignore if */
  41982. if (expectedType === TRANSITION) {
  41983. if (transitionTimeout > 0) {
  41984. type = TRANSITION;
  41985. timeout = transitionTimeout;
  41986. propCount = transitionDurations.length;
  41987. }
  41988. } else if (expectedType === ANIMATION) {
  41989. if (animationTimeout > 0) {
  41990. type = ANIMATION;
  41991. timeout = animationTimeout;
  41992. propCount = animationDurations.length;
  41993. }
  41994. } else {
  41995. timeout = Math.max(transitionTimeout, animationTimeout);
  41996. type = timeout > 0
  41997. ? transitionTimeout > animationTimeout
  41998. ? TRANSITION
  41999. : ANIMATION
  42000. : null;
  42001. propCount = type
  42002. ? type === TRANSITION
  42003. ? transitionDurations.length
  42004. : animationDurations.length
  42005. : 0;
  42006. }
  42007. var hasTransform =
  42008. type === TRANSITION &&
  42009. transformRE.test(styles[transitionProp + 'Property']);
  42010. return {
  42011. type: type,
  42012. timeout: timeout,
  42013. propCount: propCount,
  42014. hasTransform: hasTransform
  42015. }
  42016. }
  42017. function getTimeout (delays, durations) {
  42018. /* istanbul ignore next */
  42019. while (delays.length < durations.length) {
  42020. delays = delays.concat(delays);
  42021. }
  42022. return Math.max.apply(null, durations.map(function (d, i) {
  42023. return toMs(d) + toMs(delays[i])
  42024. }))
  42025. }
  42026. // Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
  42027. // in a locale-dependent way, using a comma instead of a dot.
  42028. // If comma is not replaced with a dot, the input will be rounded down (i.e. acting
  42029. // as a floor function) causing unexpected behaviors
  42030. function toMs (s) {
  42031. return Number(s.slice(0, -1).replace(',', '.')) * 1000
  42032. }
  42033. /* */
  42034. function enter (vnode, toggleDisplay) {
  42035. var el = vnode.elm;
  42036. // call leave callback now
  42037. if (isDef(el._leaveCb)) {
  42038. el._leaveCb.cancelled = true;
  42039. el._leaveCb();
  42040. }
  42041. var data = resolveTransition(vnode.data.transition);
  42042. if (isUndef(data)) {
  42043. return
  42044. }
  42045. /* istanbul ignore if */
  42046. if (isDef(el._enterCb) || el.nodeType !== 1) {
  42047. return
  42048. }
  42049. var css = data.css;
  42050. var type = data.type;
  42051. var enterClass = data.enterClass;
  42052. var enterToClass = data.enterToClass;
  42053. var enterActiveClass = data.enterActiveClass;
  42054. var appearClass = data.appearClass;
  42055. var appearToClass = data.appearToClass;
  42056. var appearActiveClass = data.appearActiveClass;
  42057. var beforeEnter = data.beforeEnter;
  42058. var enter = data.enter;
  42059. var afterEnter = data.afterEnter;
  42060. var enterCancelled = data.enterCancelled;
  42061. var beforeAppear = data.beforeAppear;
  42062. var appear = data.appear;
  42063. var afterAppear = data.afterAppear;
  42064. var appearCancelled = data.appearCancelled;
  42065. var duration = data.duration;
  42066. // activeInstance will always be the <transition> component managing this
  42067. // transition. One edge case to check is when the <transition> is placed
  42068. // as the root node of a child component. In that case we need to check
  42069. // <transition>'s parent for appear check.
  42070. var context = activeInstance;
  42071. var transitionNode = activeInstance.$vnode;
  42072. while (transitionNode && transitionNode.parent) {
  42073. context = transitionNode.context;
  42074. transitionNode = transitionNode.parent;
  42075. }
  42076. var isAppear = !context._isMounted || !vnode.isRootInsert;
  42077. if (isAppear && !appear && appear !== '') {
  42078. return
  42079. }
  42080. var startClass = isAppear && appearClass
  42081. ? appearClass
  42082. : enterClass;
  42083. var activeClass = isAppear && appearActiveClass
  42084. ? appearActiveClass
  42085. : enterActiveClass;
  42086. var toClass = isAppear && appearToClass
  42087. ? appearToClass
  42088. : enterToClass;
  42089. var beforeEnterHook = isAppear
  42090. ? (beforeAppear || beforeEnter)
  42091. : beforeEnter;
  42092. var enterHook = isAppear
  42093. ? (typeof appear === 'function' ? appear : enter)
  42094. : enter;
  42095. var afterEnterHook = isAppear
  42096. ? (afterAppear || afterEnter)
  42097. : afterEnter;
  42098. var enterCancelledHook = isAppear
  42099. ? (appearCancelled || enterCancelled)
  42100. : enterCancelled;
  42101. var explicitEnterDuration = toNumber(
  42102. isObject(duration)
  42103. ? duration.enter
  42104. : duration
  42105. );
  42106. if (explicitEnterDuration != null) {
  42107. checkDuration(explicitEnterDuration, 'enter', vnode);
  42108. }
  42109. var expectsCSS = css !== false && !isIE9;
  42110. var userWantsControl = getHookArgumentsLength(enterHook);
  42111. var cb = el._enterCb = once(function () {
  42112. if (expectsCSS) {
  42113. removeTransitionClass(el, toClass);
  42114. removeTransitionClass(el, activeClass);
  42115. }
  42116. if (cb.cancelled) {
  42117. if (expectsCSS) {
  42118. removeTransitionClass(el, startClass);
  42119. }
  42120. enterCancelledHook && enterCancelledHook(el);
  42121. } else {
  42122. afterEnterHook && afterEnterHook(el);
  42123. }
  42124. el._enterCb = null;
  42125. });
  42126. if (!vnode.data.show) {
  42127. // remove pending leave element on enter by injecting an insert hook
  42128. mergeVNodeHook(vnode, 'insert', function () {
  42129. var parent = el.parentNode;
  42130. var pendingNode = parent && parent._pending && parent._pending[vnode.key];
  42131. if (pendingNode &&
  42132. pendingNode.tag === vnode.tag &&
  42133. pendingNode.elm._leaveCb
  42134. ) {
  42135. pendingNode.elm._leaveCb();
  42136. }
  42137. enterHook && enterHook(el, cb);
  42138. });
  42139. }
  42140. // start enter transition
  42141. beforeEnterHook && beforeEnterHook(el);
  42142. if (expectsCSS) {
  42143. addTransitionClass(el, startClass);
  42144. addTransitionClass(el, activeClass);
  42145. nextFrame(function () {
  42146. removeTransitionClass(el, startClass);
  42147. if (!cb.cancelled) {
  42148. addTransitionClass(el, toClass);
  42149. if (!userWantsControl) {
  42150. if (isValidDuration(explicitEnterDuration)) {
  42151. setTimeout(cb, explicitEnterDuration);
  42152. } else {
  42153. whenTransitionEnds(el, type, cb);
  42154. }
  42155. }
  42156. }
  42157. });
  42158. }
  42159. if (vnode.data.show) {
  42160. toggleDisplay && toggleDisplay();
  42161. enterHook && enterHook(el, cb);
  42162. }
  42163. if (!expectsCSS && !userWantsControl) {
  42164. cb();
  42165. }
  42166. }
  42167. function leave (vnode, rm) {
  42168. var el = vnode.elm;
  42169. // call enter callback now
  42170. if (isDef(el._enterCb)) {
  42171. el._enterCb.cancelled = true;
  42172. el._enterCb();
  42173. }
  42174. var data = resolveTransition(vnode.data.transition);
  42175. if (isUndef(data) || el.nodeType !== 1) {
  42176. return rm()
  42177. }
  42178. /* istanbul ignore if */
  42179. if (isDef(el._leaveCb)) {
  42180. return
  42181. }
  42182. var css = data.css;
  42183. var type = data.type;
  42184. var leaveClass = data.leaveClass;
  42185. var leaveToClass = data.leaveToClass;
  42186. var leaveActiveClass = data.leaveActiveClass;
  42187. var beforeLeave = data.beforeLeave;
  42188. var leave = data.leave;
  42189. var afterLeave = data.afterLeave;
  42190. var leaveCancelled = data.leaveCancelled;
  42191. var delayLeave = data.delayLeave;
  42192. var duration = data.duration;
  42193. var expectsCSS = css !== false && !isIE9;
  42194. var userWantsControl = getHookArgumentsLength(leave);
  42195. var explicitLeaveDuration = toNumber(
  42196. isObject(duration)
  42197. ? duration.leave
  42198. : duration
  42199. );
  42200. if (isDef(explicitLeaveDuration)) {
  42201. checkDuration(explicitLeaveDuration, 'leave', vnode);
  42202. }
  42203. var cb = el._leaveCb = once(function () {
  42204. if (el.parentNode && el.parentNode._pending) {
  42205. el.parentNode._pending[vnode.key] = null;
  42206. }
  42207. if (expectsCSS) {
  42208. removeTransitionClass(el, leaveToClass);
  42209. removeTransitionClass(el, leaveActiveClass);
  42210. }
  42211. if (cb.cancelled) {
  42212. if (expectsCSS) {
  42213. removeTransitionClass(el, leaveClass);
  42214. }
  42215. leaveCancelled && leaveCancelled(el);
  42216. } else {
  42217. rm();
  42218. afterLeave && afterLeave(el);
  42219. }
  42220. el._leaveCb = null;
  42221. });
  42222. if (delayLeave) {
  42223. delayLeave(performLeave);
  42224. } else {
  42225. performLeave();
  42226. }
  42227. function performLeave () {
  42228. // the delayed leave may have already been cancelled
  42229. if (cb.cancelled) {
  42230. return
  42231. }
  42232. // record leaving element
  42233. if (!vnode.data.show && el.parentNode) {
  42234. (el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;
  42235. }
  42236. beforeLeave && beforeLeave(el);
  42237. if (expectsCSS) {
  42238. addTransitionClass(el, leaveClass);
  42239. addTransitionClass(el, leaveActiveClass);
  42240. nextFrame(function () {
  42241. removeTransitionClass(el, leaveClass);
  42242. if (!cb.cancelled) {
  42243. addTransitionClass(el, leaveToClass);
  42244. if (!userWantsControl) {
  42245. if (isValidDuration(explicitLeaveDuration)) {
  42246. setTimeout(cb, explicitLeaveDuration);
  42247. } else {
  42248. whenTransitionEnds(el, type, cb);
  42249. }
  42250. }
  42251. }
  42252. });
  42253. }
  42254. leave && leave(el, cb);
  42255. if (!expectsCSS && !userWantsControl) {
  42256. cb();
  42257. }
  42258. }
  42259. }
  42260. // only used in dev mode
  42261. function checkDuration (val, name, vnode) {
  42262. if (typeof val !== 'number') {
  42263. warn(
  42264. "<transition> explicit " + name + " duration is not a valid number - " +
  42265. "got " + (JSON.stringify(val)) + ".",
  42266. vnode.context
  42267. );
  42268. } else if (isNaN(val)) {
  42269. warn(
  42270. "<transition> explicit " + name + " duration is NaN - " +
  42271. 'the duration expression might be incorrect.',
  42272. vnode.context
  42273. );
  42274. }
  42275. }
  42276. function isValidDuration (val) {
  42277. return typeof val === 'number' && !isNaN(val)
  42278. }
  42279. /**
  42280. * Normalize a transition hook's argument length. The hook may be:
  42281. * - a merged hook (invoker) with the original in .fns
  42282. * - a wrapped component method (check ._length)
  42283. * - a plain function (.length)
  42284. */
  42285. function getHookArgumentsLength (fn) {
  42286. if (isUndef(fn)) {
  42287. return false
  42288. }
  42289. var invokerFns = fn.fns;
  42290. if (isDef(invokerFns)) {
  42291. // invoker
  42292. return getHookArgumentsLength(
  42293. Array.isArray(invokerFns)
  42294. ? invokerFns[0]
  42295. : invokerFns
  42296. )
  42297. } else {
  42298. return (fn._length || fn.length) > 1
  42299. }
  42300. }
  42301. function _enter (_, vnode) {
  42302. if (vnode.data.show !== true) {
  42303. enter(vnode);
  42304. }
  42305. }
  42306. var transition = inBrowser ? {
  42307. create: _enter,
  42308. activate: _enter,
  42309. remove: function remove$$1 (vnode, rm) {
  42310. /* istanbul ignore else */
  42311. if (vnode.data.show !== true) {
  42312. leave(vnode, rm);
  42313. } else {
  42314. rm();
  42315. }
  42316. }
  42317. } : {};
  42318. var platformModules = [
  42319. attrs,
  42320. klass,
  42321. events,
  42322. domProps,
  42323. style,
  42324. transition
  42325. ];
  42326. /* */
  42327. // the directive module should be applied last, after all
  42328. // built-in modules have been applied.
  42329. var modules = platformModules.concat(baseModules);
  42330. var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
  42331. /**
  42332. * Not type checking this file because flow doesn't like attaching
  42333. * properties to Elements.
  42334. */
  42335. /* istanbul ignore if */
  42336. if (isIE9) {
  42337. // http://www.matts411.com/post/internet-explorer-9-oninput/
  42338. document.addEventListener('selectionchange', function () {
  42339. var el = document.activeElement;
  42340. if (el && el.vmodel) {
  42341. trigger(el, 'input');
  42342. }
  42343. });
  42344. }
  42345. var directive = {
  42346. inserted: function inserted (el, binding, vnode, oldVnode) {
  42347. if (vnode.tag === 'select') {
  42348. // #6903
  42349. if (oldVnode.elm && !oldVnode.elm._vOptions) {
  42350. mergeVNodeHook(vnode, 'postpatch', function () {
  42351. directive.componentUpdated(el, binding, vnode);
  42352. });
  42353. } else {
  42354. setSelected(el, binding, vnode.context);
  42355. }
  42356. el._vOptions = [].map.call(el.options, getValue);
  42357. } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
  42358. el._vModifiers = binding.modifiers;
  42359. if (!binding.modifiers.lazy) {
  42360. el.addEventListener('compositionstart', onCompositionStart);
  42361. el.addEventListener('compositionend', onCompositionEnd);
  42362. // Safari < 10.2 & UIWebView doesn't fire compositionend when
  42363. // switching focus before confirming composition choice
  42364. // this also fixes the issue where some browsers e.g. iOS Chrome
  42365. // fires "change" instead of "input" on autocomplete.
  42366. el.addEventListener('change', onCompositionEnd);
  42367. /* istanbul ignore if */
  42368. if (isIE9) {
  42369. el.vmodel = true;
  42370. }
  42371. }
  42372. }
  42373. },
  42374. componentUpdated: function componentUpdated (el, binding, vnode) {
  42375. if (vnode.tag === 'select') {
  42376. setSelected(el, binding, vnode.context);
  42377. // in case the options rendered by v-for have changed,
  42378. // it's possible that the value is out-of-sync with the rendered options.
  42379. // detect such cases and filter out values that no longer has a matching
  42380. // option in the DOM.
  42381. var prevOptions = el._vOptions;
  42382. var curOptions = el._vOptions = [].map.call(el.options, getValue);
  42383. if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {
  42384. // trigger change event if
  42385. // no matching option found for at least one value
  42386. var needReset = el.multiple
  42387. ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })
  42388. : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);
  42389. if (needReset) {
  42390. trigger(el, 'change');
  42391. }
  42392. }
  42393. }
  42394. }
  42395. };
  42396. function setSelected (el, binding, vm) {
  42397. actuallySetSelected(el, binding, vm);
  42398. /* istanbul ignore if */
  42399. if (isIE || isEdge) {
  42400. setTimeout(function () {
  42401. actuallySetSelected(el, binding, vm);
  42402. }, 0);
  42403. }
  42404. }
  42405. function actuallySetSelected (el, binding, vm) {
  42406. var value = binding.value;
  42407. var isMultiple = el.multiple;
  42408. if (isMultiple && !Array.isArray(value)) {
  42409. warn(
  42410. "<select multiple v-model=\"" + (binding.expression) + "\"> " +
  42411. "expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)),
  42412. vm
  42413. );
  42414. return
  42415. }
  42416. var selected, option;
  42417. for (var i = 0, l = el.options.length; i < l; i++) {
  42418. option = el.options[i];
  42419. if (isMultiple) {
  42420. selected = looseIndexOf(value, getValue(option)) > -1;
  42421. if (option.selected !== selected) {
  42422. option.selected = selected;
  42423. }
  42424. } else {
  42425. if (looseEqual(getValue(option), value)) {
  42426. if (el.selectedIndex !== i) {
  42427. el.selectedIndex = i;
  42428. }
  42429. return
  42430. }
  42431. }
  42432. }
  42433. if (!isMultiple) {
  42434. el.selectedIndex = -1;
  42435. }
  42436. }
  42437. function hasNoMatchingOption (value, options) {
  42438. return options.every(function (o) { return !looseEqual(o, value); })
  42439. }
  42440. function getValue (option) {
  42441. return '_value' in option
  42442. ? option._value
  42443. : option.value
  42444. }
  42445. function onCompositionStart (e) {
  42446. e.target.composing = true;
  42447. }
  42448. function onCompositionEnd (e) {
  42449. // prevent triggering an input event for no reason
  42450. if (!e.target.composing) { return }
  42451. e.target.composing = false;
  42452. trigger(e.target, 'input');
  42453. }
  42454. function trigger (el, type) {
  42455. var e = document.createEvent('HTMLEvents');
  42456. e.initEvent(type, true, true);
  42457. el.dispatchEvent(e);
  42458. }
  42459. /* */
  42460. // recursively search for possible transition defined inside the component root
  42461. function locateNode (vnode) {
  42462. return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
  42463. ? locateNode(vnode.componentInstance._vnode)
  42464. : vnode
  42465. }
  42466. var show = {
  42467. bind: function bind (el, ref, vnode) {
  42468. var value = ref.value;
  42469. vnode = locateNode(vnode);
  42470. var transition$$1 = vnode.data && vnode.data.transition;
  42471. var originalDisplay = el.__vOriginalDisplay =
  42472. el.style.display === 'none' ? '' : el.style.display;
  42473. if (value && transition$$1) {
  42474. vnode.data.show = true;
  42475. enter(vnode, function () {
  42476. el.style.display = originalDisplay;
  42477. });
  42478. } else {
  42479. el.style.display = value ? originalDisplay : 'none';
  42480. }
  42481. },
  42482. update: function update (el, ref, vnode) {
  42483. var value = ref.value;
  42484. var oldValue = ref.oldValue;
  42485. /* istanbul ignore if */
  42486. if (!value === !oldValue) { return }
  42487. vnode = locateNode(vnode);
  42488. var transition$$1 = vnode.data && vnode.data.transition;
  42489. if (transition$$1) {
  42490. vnode.data.show = true;
  42491. if (value) {
  42492. enter(vnode, function () {
  42493. el.style.display = el.__vOriginalDisplay;
  42494. });
  42495. } else {
  42496. leave(vnode, function () {
  42497. el.style.display = 'none';
  42498. });
  42499. }
  42500. } else {
  42501. el.style.display = value ? el.__vOriginalDisplay : 'none';
  42502. }
  42503. },
  42504. unbind: function unbind (
  42505. el,
  42506. binding,
  42507. vnode,
  42508. oldVnode,
  42509. isDestroy
  42510. ) {
  42511. if (!isDestroy) {
  42512. el.style.display = el.__vOriginalDisplay;
  42513. }
  42514. }
  42515. };
  42516. var platformDirectives = {
  42517. model: directive,
  42518. show: show
  42519. };
  42520. /* */
  42521. var transitionProps = {
  42522. name: String,
  42523. appear: Boolean,
  42524. css: Boolean,
  42525. mode: String,
  42526. type: String,
  42527. enterClass: String,
  42528. leaveClass: String,
  42529. enterToClass: String,
  42530. leaveToClass: String,
  42531. enterActiveClass: String,
  42532. leaveActiveClass: String,
  42533. appearClass: String,
  42534. appearActiveClass: String,
  42535. appearToClass: String,
  42536. duration: [Number, String, Object]
  42537. };
  42538. // in case the child is also an abstract component, e.g. <keep-alive>
  42539. // we want to recursively retrieve the real component to be rendered
  42540. function getRealChild (vnode) {
  42541. var compOptions = vnode && vnode.componentOptions;
  42542. if (compOptions && compOptions.Ctor.options.abstract) {
  42543. return getRealChild(getFirstComponentChild(compOptions.children))
  42544. } else {
  42545. return vnode
  42546. }
  42547. }
  42548. function extractTransitionData (comp) {
  42549. var data = {};
  42550. var options = comp.$options;
  42551. // props
  42552. for (var key in options.propsData) {
  42553. data[key] = comp[key];
  42554. }
  42555. // events.
  42556. // extract listeners and pass them directly to the transition methods
  42557. var listeners = options._parentListeners;
  42558. for (var key$1 in listeners) {
  42559. data[camelize(key$1)] = listeners[key$1];
  42560. }
  42561. return data
  42562. }
  42563. function placeholder (h, rawChild) {
  42564. if (/\d-keep-alive$/.test(rawChild.tag)) {
  42565. return h('keep-alive', {
  42566. props: rawChild.componentOptions.propsData
  42567. })
  42568. }
  42569. }
  42570. function hasParentTransition (vnode) {
  42571. while ((vnode = vnode.parent)) {
  42572. if (vnode.data.transition) {
  42573. return true
  42574. }
  42575. }
  42576. }
  42577. function isSameChild (child, oldChild) {
  42578. return oldChild.key === child.key && oldChild.tag === child.tag
  42579. }
  42580. var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };
  42581. var isVShowDirective = function (d) { return d.name === 'show'; };
  42582. var Transition = {
  42583. name: 'transition',
  42584. props: transitionProps,
  42585. abstract: true,
  42586. render: function render (h) {
  42587. var this$1 = this;
  42588. var children = this.$slots.default;
  42589. if (!children) {
  42590. return
  42591. }
  42592. // filter out text nodes (possible whitespaces)
  42593. children = children.filter(isNotTextNode);
  42594. /* istanbul ignore if */
  42595. if (!children.length) {
  42596. return
  42597. }
  42598. // warn multiple elements
  42599. if (children.length > 1) {
  42600. warn(
  42601. '<transition> can only be used on a single element. Use ' +
  42602. '<transition-group> for lists.',
  42603. this.$parent
  42604. );
  42605. }
  42606. var mode = this.mode;
  42607. // warn invalid mode
  42608. if (mode && mode !== 'in-out' && mode !== 'out-in'
  42609. ) {
  42610. warn(
  42611. 'invalid <transition> mode: ' + mode,
  42612. this.$parent
  42613. );
  42614. }
  42615. var rawChild = children[0];
  42616. // if this is a component root node and the component's
  42617. // parent container node also has transition, skip.
  42618. if (hasParentTransition(this.$vnode)) {
  42619. return rawChild
  42620. }
  42621. // apply transition data to child
  42622. // use getRealChild() to ignore abstract components e.g. keep-alive
  42623. var child = getRealChild(rawChild);
  42624. /* istanbul ignore if */
  42625. if (!child) {
  42626. return rawChild
  42627. }
  42628. if (this._leaving) {
  42629. return placeholder(h, rawChild)
  42630. }
  42631. // ensure a key that is unique to the vnode type and to this transition
  42632. // component instance. This key will be used to remove pending leaving nodes
  42633. // during entering.
  42634. var id = "__transition-" + (this._uid) + "-";
  42635. child.key = child.key == null
  42636. ? child.isComment
  42637. ? id + 'comment'
  42638. : id + child.tag
  42639. : isPrimitive(child.key)
  42640. ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
  42641. : child.key;
  42642. var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
  42643. var oldRawChild = this._vnode;
  42644. var oldChild = getRealChild(oldRawChild);
  42645. // mark v-show
  42646. // so that the transition module can hand over the control to the directive
  42647. if (child.data.directives && child.data.directives.some(isVShowDirective)) {
  42648. child.data.show = true;
  42649. }
  42650. if (
  42651. oldChild &&
  42652. oldChild.data &&
  42653. !isSameChild(child, oldChild) &&
  42654. !isAsyncPlaceholder(oldChild) &&
  42655. // #6687 component root is a comment node
  42656. !(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)
  42657. ) {
  42658. // replace old child transition data with fresh one
  42659. // important for dynamic transitions!
  42660. var oldData = oldChild.data.transition = extend({}, data);
  42661. // handle transition mode
  42662. if (mode === 'out-in') {
  42663. // return placeholder node and queue update when leave finishes
  42664. this._leaving = true;
  42665. mergeVNodeHook(oldData, 'afterLeave', function () {
  42666. this$1._leaving = false;
  42667. this$1.$forceUpdate();
  42668. });
  42669. return placeholder(h, rawChild)
  42670. } else if (mode === 'in-out') {
  42671. if (isAsyncPlaceholder(child)) {
  42672. return oldRawChild
  42673. }
  42674. var delayedLeave;
  42675. var performLeave = function () { delayedLeave(); };
  42676. mergeVNodeHook(data, 'afterEnter', performLeave);
  42677. mergeVNodeHook(data, 'enterCancelled', performLeave);
  42678. mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });
  42679. }
  42680. }
  42681. return rawChild
  42682. }
  42683. };
  42684. /* */
  42685. var props = extend({
  42686. tag: String,
  42687. moveClass: String
  42688. }, transitionProps);
  42689. delete props.mode;
  42690. var TransitionGroup = {
  42691. props: props,
  42692. beforeMount: function beforeMount () {
  42693. var this$1 = this;
  42694. var update = this._update;
  42695. this._update = function (vnode, hydrating) {
  42696. var restoreActiveInstance = setActiveInstance(this$1);
  42697. // force removing pass
  42698. this$1.__patch__(
  42699. this$1._vnode,
  42700. this$1.kept,
  42701. false, // hydrating
  42702. true // removeOnly (!important, avoids unnecessary moves)
  42703. );
  42704. this$1._vnode = this$1.kept;
  42705. restoreActiveInstance();
  42706. update.call(this$1, vnode, hydrating);
  42707. };
  42708. },
  42709. render: function render (h) {
  42710. var tag = this.tag || this.$vnode.data.tag || 'span';
  42711. var map = Object.create(null);
  42712. var prevChildren = this.prevChildren = this.children;
  42713. var rawChildren = this.$slots.default || [];
  42714. var children = this.children = [];
  42715. var transitionData = extractTransitionData(this);
  42716. for (var i = 0; i < rawChildren.length; i++) {
  42717. var c = rawChildren[i];
  42718. if (c.tag) {
  42719. if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
  42720. children.push(c);
  42721. map[c.key] = c
  42722. ;(c.data || (c.data = {})).transition = transitionData;
  42723. } else {
  42724. var opts = c.componentOptions;
  42725. var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;
  42726. warn(("<transition-group> children must be keyed: <" + name + ">"));
  42727. }
  42728. }
  42729. }
  42730. if (prevChildren) {
  42731. var kept = [];
  42732. var removed = [];
  42733. for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
  42734. var c$1 = prevChildren[i$1];
  42735. c$1.data.transition = transitionData;
  42736. c$1.data.pos = c$1.elm.getBoundingClientRect();
  42737. if (map[c$1.key]) {
  42738. kept.push(c$1);
  42739. } else {
  42740. removed.push(c$1);
  42741. }
  42742. }
  42743. this.kept = h(tag, null, kept);
  42744. this.removed = removed;
  42745. }
  42746. return h(tag, null, children)
  42747. },
  42748. updated: function updated () {
  42749. var children = this.prevChildren;
  42750. var moveClass = this.moveClass || ((this.name || 'v') + '-move');
  42751. if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
  42752. return
  42753. }
  42754. // we divide the work into three loops to avoid mixing DOM reads and writes
  42755. // in each iteration - which helps prevent layout thrashing.
  42756. children.forEach(callPendingCbs);
  42757. children.forEach(recordPosition);
  42758. children.forEach(applyTranslation);
  42759. // force reflow to put everything in position
  42760. // assign to this to avoid being removed in tree-shaking
  42761. // $flow-disable-line
  42762. this._reflow = document.body.offsetHeight;
  42763. children.forEach(function (c) {
  42764. if (c.data.moved) {
  42765. var el = c.elm;
  42766. var s = el.style;
  42767. addTransitionClass(el, moveClass);
  42768. s.transform = s.WebkitTransform = s.transitionDuration = '';
  42769. el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {
  42770. if (e && e.target !== el) {
  42771. return
  42772. }
  42773. if (!e || /transform$/.test(e.propertyName)) {
  42774. el.removeEventListener(transitionEndEvent, cb);
  42775. el._moveCb = null;
  42776. removeTransitionClass(el, moveClass);
  42777. }
  42778. });
  42779. }
  42780. });
  42781. },
  42782. methods: {
  42783. hasMove: function hasMove (el, moveClass) {
  42784. /* istanbul ignore if */
  42785. if (!hasTransition) {
  42786. return false
  42787. }
  42788. /* istanbul ignore if */
  42789. if (this._hasMove) {
  42790. return this._hasMove
  42791. }
  42792. // Detect whether an element with the move class applied has
  42793. // CSS transitions. Since the element may be inside an entering
  42794. // transition at this very moment, we make a clone of it and remove
  42795. // all other transition classes applied to ensure only the move class
  42796. // is applied.
  42797. var clone = el.cloneNode();
  42798. if (el._transitionClasses) {
  42799. el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });
  42800. }
  42801. addClass(clone, moveClass);
  42802. clone.style.display = 'none';
  42803. this.$el.appendChild(clone);
  42804. var info = getTransitionInfo(clone);
  42805. this.$el.removeChild(clone);
  42806. return (this._hasMove = info.hasTransform)
  42807. }
  42808. }
  42809. };
  42810. function callPendingCbs (c) {
  42811. /* istanbul ignore if */
  42812. if (c.elm._moveCb) {
  42813. c.elm._moveCb();
  42814. }
  42815. /* istanbul ignore if */
  42816. if (c.elm._enterCb) {
  42817. c.elm._enterCb();
  42818. }
  42819. }
  42820. function recordPosition (c) {
  42821. c.data.newPos = c.elm.getBoundingClientRect();
  42822. }
  42823. function applyTranslation (c) {
  42824. var oldPos = c.data.pos;
  42825. var newPos = c.data.newPos;
  42826. var dx = oldPos.left - newPos.left;
  42827. var dy = oldPos.top - newPos.top;
  42828. if (dx || dy) {
  42829. c.data.moved = true;
  42830. var s = c.elm.style;
  42831. s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
  42832. s.transitionDuration = '0s';
  42833. }
  42834. }
  42835. var platformComponents = {
  42836. Transition: Transition,
  42837. TransitionGroup: TransitionGroup
  42838. };
  42839. /* */
  42840. // install platform specific utils
  42841. Vue.config.mustUseProp = mustUseProp;
  42842. Vue.config.isReservedTag = isReservedTag;
  42843. Vue.config.isReservedAttr = isReservedAttr;
  42844. Vue.config.getTagNamespace = getTagNamespace;
  42845. Vue.config.isUnknownElement = isUnknownElement;
  42846. // install platform runtime directives & components
  42847. extend(Vue.options.directives, platformDirectives);
  42848. extend(Vue.options.components, platformComponents);
  42849. // install platform patch function
  42850. Vue.prototype.__patch__ = inBrowser ? patch : noop;
  42851. // public mount method
  42852. Vue.prototype.$mount = function (
  42853. el,
  42854. hydrating
  42855. ) {
  42856. el = el && inBrowser ? query(el) : undefined;
  42857. return mountComponent(this, el, hydrating)
  42858. };
  42859. // devtools global hook
  42860. /* istanbul ignore next */
  42861. if (inBrowser) {
  42862. setTimeout(function () {
  42863. if (config.devtools) {
  42864. if (devtools) {
  42865. devtools.emit('init', Vue);
  42866. } else {
  42867. console[console.info ? 'info' : 'log'](
  42868. 'Download the Vue Devtools extension for a better development experience:\n' +
  42869. 'https://github.com/vuejs/vue-devtools'
  42870. );
  42871. }
  42872. }
  42873. if (config.productionTip !== false &&
  42874. typeof console !== 'undefined'
  42875. ) {
  42876. console[console.info ? 'info' : 'log'](
  42877. "You are running Vue in development mode.\n" +
  42878. "Make sure to turn on production mode when deploying for production.\n" +
  42879. "See more tips at https://vuejs.org/guide/deployment.html"
  42880. );
  42881. }
  42882. }, 0);
  42883. }
  42884. /* */
  42885. var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g;
  42886. var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
  42887. var buildRegex = cached(function (delimiters) {
  42888. var open = delimiters[0].replace(regexEscapeRE, '\\$&');
  42889. var close = delimiters[1].replace(regexEscapeRE, '\\$&');
  42890. return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
  42891. });
  42892. function parseText (
  42893. text,
  42894. delimiters
  42895. ) {
  42896. var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
  42897. if (!tagRE.test(text)) {
  42898. return
  42899. }
  42900. var tokens = [];
  42901. var rawTokens = [];
  42902. var lastIndex = tagRE.lastIndex = 0;
  42903. var match, index, tokenValue;
  42904. while ((match = tagRE.exec(text))) {
  42905. index = match.index;
  42906. // push text token
  42907. if (index > lastIndex) {
  42908. rawTokens.push(tokenValue = text.slice(lastIndex, index));
  42909. tokens.push(JSON.stringify(tokenValue));
  42910. }
  42911. // tag token
  42912. var exp = parseFilters(match[1].trim());
  42913. tokens.push(("_s(" + exp + ")"));
  42914. rawTokens.push({ '@binding': exp });
  42915. lastIndex = index + match[0].length;
  42916. }
  42917. if (lastIndex < text.length) {
  42918. rawTokens.push(tokenValue = text.slice(lastIndex));
  42919. tokens.push(JSON.stringify(tokenValue));
  42920. }
  42921. return {
  42922. expression: tokens.join('+'),
  42923. tokens: rawTokens
  42924. }
  42925. }
  42926. /* */
  42927. function transformNode (el, options) {
  42928. var warn = options.warn || baseWarn;
  42929. var staticClass = getAndRemoveAttr(el, 'class');
  42930. if (staticClass) {
  42931. var res = parseText(staticClass, options.delimiters);
  42932. if (res) {
  42933. warn(
  42934. "class=\"" + staticClass + "\": " +
  42935. 'Interpolation inside attributes has been removed. ' +
  42936. 'Use v-bind or the colon shorthand instead. For example, ' +
  42937. 'instead of <div class="{{ val }}">, use <div :class="val">.',
  42938. el.rawAttrsMap['class']
  42939. );
  42940. }
  42941. }
  42942. if (staticClass) {
  42943. el.staticClass = JSON.stringify(staticClass);
  42944. }
  42945. var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
  42946. if (classBinding) {
  42947. el.classBinding = classBinding;
  42948. }
  42949. }
  42950. function genData (el) {
  42951. var data = '';
  42952. if (el.staticClass) {
  42953. data += "staticClass:" + (el.staticClass) + ",";
  42954. }
  42955. if (el.classBinding) {
  42956. data += "class:" + (el.classBinding) + ",";
  42957. }
  42958. return data
  42959. }
  42960. var klass$1 = {
  42961. staticKeys: ['staticClass'],
  42962. transformNode: transformNode,
  42963. genData: genData
  42964. };
  42965. /* */
  42966. function transformNode$1 (el, options) {
  42967. var warn = options.warn || baseWarn;
  42968. var staticStyle = getAndRemoveAttr(el, 'style');
  42969. if (staticStyle) {
  42970. /* istanbul ignore if */
  42971. {
  42972. var res = parseText(staticStyle, options.delimiters);
  42973. if (res) {
  42974. warn(
  42975. "style=\"" + staticStyle + "\": " +
  42976. 'Interpolation inside attributes has been removed. ' +
  42977. 'Use v-bind or the colon shorthand instead. For example, ' +
  42978. 'instead of <div style="{{ val }}">, use <div :style="val">.',
  42979. el.rawAttrsMap['style']
  42980. );
  42981. }
  42982. }
  42983. el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
  42984. }
  42985. var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
  42986. if (styleBinding) {
  42987. el.styleBinding = styleBinding;
  42988. }
  42989. }
  42990. function genData$1 (el) {
  42991. var data = '';
  42992. if (el.staticStyle) {
  42993. data += "staticStyle:" + (el.staticStyle) + ",";
  42994. }
  42995. if (el.styleBinding) {
  42996. data += "style:(" + (el.styleBinding) + "),";
  42997. }
  42998. return data
  42999. }
  43000. var style$1 = {
  43001. staticKeys: ['staticStyle'],
  43002. transformNode: transformNode$1,
  43003. genData: genData$1
  43004. };
  43005. /* */
  43006. var decoder;
  43007. var he = {
  43008. decode: function decode (html) {
  43009. decoder = decoder || document.createElement('div');
  43010. decoder.innerHTML = html;
  43011. return decoder.textContent
  43012. }
  43013. };
  43014. /* */
  43015. var isUnaryTag = makeMap(
  43016. 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
  43017. 'link,meta,param,source,track,wbr'
  43018. );
  43019. // Elements that you can, intentionally, leave open
  43020. // (and which close themselves)
  43021. var canBeLeftOpenTag = makeMap(
  43022. 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
  43023. );
  43024. // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
  43025. // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
  43026. var isNonPhrasingTag = makeMap(
  43027. 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
  43028. 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
  43029. 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
  43030. 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
  43031. 'title,tr,track'
  43032. );
  43033. /**
  43034. * Not type-checking this file because it's mostly vendor code.
  43035. */
  43036. // Regular Expressions for parsing tags and attributes
  43037. var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  43038. var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
  43039. var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*";
  43040. var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
  43041. var startTagOpen = new RegExp(("^<" + qnameCapture));
  43042. var startTagClose = /^\s*(\/?)>/;
  43043. var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
  43044. var doctype = /^<!DOCTYPE [^>]+>/i;
  43045. // #7298: escape - to avoid being passed as HTML comment when inlined in page
  43046. var comment = /^<!\--/;
  43047. var conditionalComment = /^<!\[/;
  43048. // Special Elements (can contain anything)
  43049. var isPlainTextElement = makeMap('script,style,textarea', true);
  43050. var reCache = {};
  43051. var decodingMap = {
  43052. '&lt;': '<',
  43053. '&gt;': '>',
  43054. '&quot;': '"',
  43055. '&amp;': '&',
  43056. '&#10;': '\n',
  43057. '&#9;': '\t',
  43058. '&#39;': "'"
  43059. };
  43060. var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;
  43061. var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;
  43062. // #5992
  43063. var isIgnoreNewlineTag = makeMap('pre,textarea', true);
  43064. var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
  43065. function decodeAttr (value, shouldDecodeNewlines) {
  43066. var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
  43067. return value.replace(re, function (match) { return decodingMap[match]; })
  43068. }
  43069. function parseHTML (html, options) {
  43070. var stack = [];
  43071. var expectHTML = options.expectHTML;
  43072. var isUnaryTag$$1 = options.isUnaryTag || no;
  43073. var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
  43074. var index = 0;
  43075. var last, lastTag;
  43076. while (html) {
  43077. last = html;
  43078. // Make sure we're not in a plaintext content element like script/style
  43079. if (!lastTag || !isPlainTextElement(lastTag)) {
  43080. var textEnd = html.indexOf('<');
  43081. if (textEnd === 0) {
  43082. // Comment:
  43083. if (comment.test(html)) {
  43084. var commentEnd = html.indexOf('-->');
  43085. if (commentEnd >= 0) {
  43086. if (options.shouldKeepComment) {
  43087. options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);
  43088. }
  43089. advance(commentEnd + 3);
  43090. continue
  43091. }
  43092. }
  43093. // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
  43094. if (conditionalComment.test(html)) {
  43095. var conditionalEnd = html.indexOf(']>');
  43096. if (conditionalEnd >= 0) {
  43097. advance(conditionalEnd + 2);
  43098. continue
  43099. }
  43100. }
  43101. // Doctype:
  43102. var doctypeMatch = html.match(doctype);
  43103. if (doctypeMatch) {
  43104. advance(doctypeMatch[0].length);
  43105. continue
  43106. }
  43107. // End tag:
  43108. var endTagMatch = html.match(endTag);
  43109. if (endTagMatch) {
  43110. var curIndex = index;
  43111. advance(endTagMatch[0].length);
  43112. parseEndTag(endTagMatch[1], curIndex, index);
  43113. continue
  43114. }
  43115. // Start tag:
  43116. var startTagMatch = parseStartTag();
  43117. if (startTagMatch) {
  43118. handleStartTag(startTagMatch);
  43119. if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
  43120. advance(1);
  43121. }
  43122. continue
  43123. }
  43124. }
  43125. var text = (void 0), rest = (void 0), next = (void 0);
  43126. if (textEnd >= 0) {
  43127. rest = html.slice(textEnd);
  43128. while (
  43129. !endTag.test(rest) &&
  43130. !startTagOpen.test(rest) &&
  43131. !comment.test(rest) &&
  43132. !conditionalComment.test(rest)
  43133. ) {
  43134. // < in plain text, be forgiving and treat it as text
  43135. next = rest.indexOf('<', 1);
  43136. if (next < 0) { break }
  43137. textEnd += next;
  43138. rest = html.slice(textEnd);
  43139. }
  43140. text = html.substring(0, textEnd);
  43141. }
  43142. if (textEnd < 0) {
  43143. text = html;
  43144. }
  43145. if (text) {
  43146. advance(text.length);
  43147. }
  43148. if (options.chars && text) {
  43149. options.chars(text, index - text.length, index);
  43150. }
  43151. } else {
  43152. var endTagLength = 0;
  43153. var stackedTag = lastTag.toLowerCase();
  43154. var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
  43155. var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
  43156. endTagLength = endTag.length;
  43157. if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
  43158. text = text
  43159. .replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
  43160. .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
  43161. }
  43162. if (shouldIgnoreFirstNewline(stackedTag, text)) {
  43163. text = text.slice(1);
  43164. }
  43165. if (options.chars) {
  43166. options.chars(text);
  43167. }
  43168. return ''
  43169. });
  43170. index += html.length - rest$1.length;
  43171. html = rest$1;
  43172. parseEndTag(stackedTag, index - endTagLength, index);
  43173. }
  43174. if (html === last) {
  43175. options.chars && options.chars(html);
  43176. if (!stack.length && options.warn) {
  43177. options.warn(("Mal-formatted tag at end of template: \"" + html + "\""), { start: index + html.length });
  43178. }
  43179. break
  43180. }
  43181. }
  43182. // Clean up any remaining tags
  43183. parseEndTag();
  43184. function advance (n) {
  43185. index += n;
  43186. html = html.substring(n);
  43187. }
  43188. function parseStartTag () {
  43189. var start = html.match(startTagOpen);
  43190. if (start) {
  43191. var match = {
  43192. tagName: start[1],
  43193. attrs: [],
  43194. start: index
  43195. };
  43196. advance(start[0].length);
  43197. var end, attr;
  43198. while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
  43199. attr.start = index;
  43200. advance(attr[0].length);
  43201. attr.end = index;
  43202. match.attrs.push(attr);
  43203. }
  43204. if (end) {
  43205. match.unarySlash = end[1];
  43206. advance(end[0].length);
  43207. match.end = index;
  43208. return match
  43209. }
  43210. }
  43211. }
  43212. function handleStartTag (match) {
  43213. var tagName = match.tagName;
  43214. var unarySlash = match.unarySlash;
  43215. if (expectHTML) {
  43216. if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
  43217. parseEndTag(lastTag);
  43218. }
  43219. if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
  43220. parseEndTag(tagName);
  43221. }
  43222. }
  43223. var unary = isUnaryTag$$1(tagName) || !!unarySlash;
  43224. var l = match.attrs.length;
  43225. var attrs = new Array(l);
  43226. for (var i = 0; i < l; i++) {
  43227. var args = match.attrs[i];
  43228. var value = args[3] || args[4] || args[5] || '';
  43229. var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
  43230. ? options.shouldDecodeNewlinesForHref
  43231. : options.shouldDecodeNewlines;
  43232. attrs[i] = {
  43233. name: args[1],
  43234. value: decodeAttr(value, shouldDecodeNewlines)
  43235. };
  43236. if (options.outputSourceRange) {
  43237. attrs[i].start = args.start + args[0].match(/^\s*/).length;
  43238. attrs[i].end = args.end;
  43239. }
  43240. }
  43241. if (!unary) {
  43242. stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs, start: match.start, end: match.end });
  43243. lastTag = tagName;
  43244. }
  43245. if (options.start) {
  43246. options.start(tagName, attrs, unary, match.start, match.end);
  43247. }
  43248. }
  43249. function parseEndTag (tagName, start, end) {
  43250. var pos, lowerCasedTagName;
  43251. if (start == null) { start = index; }
  43252. if (end == null) { end = index; }
  43253. // Find the closest opened tag of the same type
  43254. if (tagName) {
  43255. lowerCasedTagName = tagName.toLowerCase();
  43256. for (pos = stack.length - 1; pos >= 0; pos--) {
  43257. if (stack[pos].lowerCasedTag === lowerCasedTagName) {
  43258. break
  43259. }
  43260. }
  43261. } else {
  43262. // If no tag name is provided, clean shop
  43263. pos = 0;
  43264. }
  43265. if (pos >= 0) {
  43266. // Close all the open elements, up the stack
  43267. for (var i = stack.length - 1; i >= pos; i--) {
  43268. if (i > pos || !tagName &&
  43269. options.warn
  43270. ) {
  43271. options.warn(
  43272. ("tag <" + (stack[i].tag) + "> has no matching end tag."),
  43273. { start: stack[i].start, end: stack[i].end }
  43274. );
  43275. }
  43276. if (options.end) {
  43277. options.end(stack[i].tag, start, end);
  43278. }
  43279. }
  43280. // Remove the open elements from the stack
  43281. stack.length = pos;
  43282. lastTag = pos && stack[pos - 1].tag;
  43283. } else if (lowerCasedTagName === 'br') {
  43284. if (options.start) {
  43285. options.start(tagName, [], true, start, end);
  43286. }
  43287. } else if (lowerCasedTagName === 'p') {
  43288. if (options.start) {
  43289. options.start(tagName, [], false, start, end);
  43290. }
  43291. if (options.end) {
  43292. options.end(tagName, start, end);
  43293. }
  43294. }
  43295. }
  43296. }
  43297. /* */
  43298. var onRE = /^@|^v-on:/;
  43299. var dirRE = /^v-|^@|^:|^#/;
  43300. var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
  43301. var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
  43302. var stripParensRE = /^\(|\)$/g;
  43303. var dynamicArgRE = /^\[.*\]$/;
  43304. var argRE = /:(.*)$/;
  43305. var bindRE = /^:|^\.|^v-bind:/;
  43306. var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
  43307. var slotRE = /^v-slot(:|$)|^#/;
  43308. var lineBreakRE = /[\r\n]/;
  43309. var whitespaceRE$1 = /[ \f\t\r\n]+/g;
  43310. var invalidAttributeRE = /[\s"'<>\/=]/;
  43311. var decodeHTMLCached = cached(he.decode);
  43312. var emptySlotScopeToken = "_empty_";
  43313. // configurable state
  43314. var warn$2;
  43315. var delimiters;
  43316. var transforms;
  43317. var preTransforms;
  43318. var postTransforms;
  43319. var platformIsPreTag;
  43320. var platformMustUseProp;
  43321. var platformGetTagNamespace;
  43322. var maybeComponent;
  43323. function createASTElement (
  43324. tag,
  43325. attrs,
  43326. parent
  43327. ) {
  43328. return {
  43329. type: 1,
  43330. tag: tag,
  43331. attrsList: attrs,
  43332. attrsMap: makeAttrsMap(attrs),
  43333. rawAttrsMap: {},
  43334. parent: parent,
  43335. children: []
  43336. }
  43337. }
  43338. /**
  43339. * Convert HTML string to AST.
  43340. */
  43341. function parse (
  43342. template,
  43343. options
  43344. ) {
  43345. warn$2 = options.warn || baseWarn;
  43346. platformIsPreTag = options.isPreTag || no;
  43347. platformMustUseProp = options.mustUseProp || no;
  43348. platformGetTagNamespace = options.getTagNamespace || no;
  43349. var isReservedTag = options.isReservedTag || no;
  43350. maybeComponent = function (el) { return !!(
  43351. el.component ||
  43352. el.attrsMap[':is'] ||
  43353. el.attrsMap['v-bind:is'] ||
  43354. !(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag))
  43355. ); };
  43356. transforms = pluckModuleFunction(options.modules, 'transformNode');
  43357. preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
  43358. postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
  43359. delimiters = options.delimiters;
  43360. var stack = [];
  43361. var preserveWhitespace = options.preserveWhitespace !== false;
  43362. var whitespaceOption = options.whitespace;
  43363. var root;
  43364. var currentParent;
  43365. var inVPre = false;
  43366. var inPre = false;
  43367. var warned = false;
  43368. function warnOnce (msg, range) {
  43369. if (!warned) {
  43370. warned = true;
  43371. warn$2(msg, range);
  43372. }
  43373. }
  43374. function closeElement (element) {
  43375. trimEndingWhitespace(element);
  43376. if (!inVPre && !element.processed) {
  43377. element = processElement(element, options);
  43378. }
  43379. // tree management
  43380. if (!stack.length && element !== root) {
  43381. // allow root elements with v-if, v-else-if and v-else
  43382. if (root.if && (element.elseif || element.else)) {
  43383. {
  43384. checkRootConstraints(element);
  43385. }
  43386. addIfCondition(root, {
  43387. exp: element.elseif,
  43388. block: element
  43389. });
  43390. } else {
  43391. warnOnce(
  43392. "Component template should contain exactly one root element. " +
  43393. "If you are using v-if on multiple elements, " +
  43394. "use v-else-if to chain them instead.",
  43395. { start: element.start }
  43396. );
  43397. }
  43398. }
  43399. if (currentParent && !element.forbidden) {
  43400. if (element.elseif || element.else) {
  43401. processIfConditions(element, currentParent);
  43402. } else {
  43403. if (element.slotScope) {
  43404. // scoped slot
  43405. // keep it in the children list so that v-else(-if) conditions can
  43406. // find it as the prev node.
  43407. var name = element.slotTarget || '"default"'
  43408. ;(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
  43409. }
  43410. currentParent.children.push(element);
  43411. element.parent = currentParent;
  43412. }
  43413. }
  43414. // final children cleanup
  43415. // filter out scoped slots
  43416. element.children = element.children.filter(function (c) { return !(c).slotScope; });
  43417. // remove trailing whitespace node again
  43418. trimEndingWhitespace(element);
  43419. // check pre state
  43420. if (element.pre) {
  43421. inVPre = false;
  43422. }
  43423. if (platformIsPreTag(element.tag)) {
  43424. inPre = false;
  43425. }
  43426. // apply post-transforms
  43427. for (var i = 0; i < postTransforms.length; i++) {
  43428. postTransforms[i](element, options);
  43429. }
  43430. }
  43431. function trimEndingWhitespace (el) {
  43432. // remove trailing whitespace node
  43433. if (!inPre) {
  43434. var lastNode;
  43435. while (
  43436. (lastNode = el.children[el.children.length - 1]) &&
  43437. lastNode.type === 3 &&
  43438. lastNode.text === ' '
  43439. ) {
  43440. el.children.pop();
  43441. }
  43442. }
  43443. }
  43444. function checkRootConstraints (el) {
  43445. if (el.tag === 'slot' || el.tag === 'template') {
  43446. warnOnce(
  43447. "Cannot use <" + (el.tag) + "> as component root element because it may " +
  43448. 'contain multiple nodes.',
  43449. { start: el.start }
  43450. );
  43451. }
  43452. if (el.attrsMap.hasOwnProperty('v-for')) {
  43453. warnOnce(
  43454. 'Cannot use v-for on stateful component root element because ' +
  43455. 'it renders multiple elements.',
  43456. el.rawAttrsMap['v-for']
  43457. );
  43458. }
  43459. }
  43460. parseHTML(template, {
  43461. warn: warn$2,
  43462. expectHTML: options.expectHTML,
  43463. isUnaryTag: options.isUnaryTag,
  43464. canBeLeftOpenTag: options.canBeLeftOpenTag,
  43465. shouldDecodeNewlines: options.shouldDecodeNewlines,
  43466. shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
  43467. shouldKeepComment: options.comments,
  43468. outputSourceRange: options.outputSourceRange,
  43469. start: function start (tag, attrs, unary, start$1, end) {
  43470. // check namespace.
  43471. // inherit parent ns if there is one
  43472. var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
  43473. // handle IE svg bug
  43474. /* istanbul ignore if */
  43475. if (isIE && ns === 'svg') {
  43476. attrs = guardIESVGBug(attrs);
  43477. }
  43478. var element = createASTElement(tag, attrs, currentParent);
  43479. if (ns) {
  43480. element.ns = ns;
  43481. }
  43482. {
  43483. if (options.outputSourceRange) {
  43484. element.start = start$1;
  43485. element.end = end;
  43486. element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
  43487. cumulated[attr.name] = attr;
  43488. return cumulated
  43489. }, {});
  43490. }
  43491. attrs.forEach(function (attr) {
  43492. if (invalidAttributeRE.test(attr.name)) {
  43493. warn$2(
  43494. "Invalid dynamic argument expression: attribute names cannot contain " +
  43495. "spaces, quotes, <, >, / or =.",
  43496. {
  43497. start: attr.start + attr.name.indexOf("["),
  43498. end: attr.start + attr.name.length
  43499. }
  43500. );
  43501. }
  43502. });
  43503. }
  43504. if (isForbiddenTag(element) && !isServerRendering()) {
  43505. element.forbidden = true;
  43506. warn$2(
  43507. 'Templates should only be responsible for mapping the state to the ' +
  43508. 'UI. Avoid placing tags with side-effects in your templates, such as ' +
  43509. "<" + tag + ">" + ', as they will not be parsed.',
  43510. { start: element.start }
  43511. );
  43512. }
  43513. // apply pre-transforms
  43514. for (var i = 0; i < preTransforms.length; i++) {
  43515. element = preTransforms[i](element, options) || element;
  43516. }
  43517. if (!inVPre) {
  43518. processPre(element);
  43519. if (element.pre) {
  43520. inVPre = true;
  43521. }
  43522. }
  43523. if (platformIsPreTag(element.tag)) {
  43524. inPre = true;
  43525. }
  43526. if (inVPre) {
  43527. processRawAttrs(element);
  43528. } else if (!element.processed) {
  43529. // structural directives
  43530. processFor(element);
  43531. processIf(element);
  43532. processOnce(element);
  43533. }
  43534. if (!root) {
  43535. root = element;
  43536. {
  43537. checkRootConstraints(root);
  43538. }
  43539. }
  43540. if (!unary) {
  43541. currentParent = element;
  43542. stack.push(element);
  43543. } else {
  43544. closeElement(element);
  43545. }
  43546. },
  43547. end: function end (tag, start, end$1) {
  43548. var element = stack[stack.length - 1];
  43549. // pop stack
  43550. stack.length -= 1;
  43551. currentParent = stack[stack.length - 1];
  43552. if (options.outputSourceRange) {
  43553. element.end = end$1;
  43554. }
  43555. closeElement(element);
  43556. },
  43557. chars: function chars (text, start, end) {
  43558. if (!currentParent) {
  43559. {
  43560. if (text === template) {
  43561. warnOnce(
  43562. 'Component template requires a root element, rather than just text.',
  43563. { start: start }
  43564. );
  43565. } else if ((text = text.trim())) {
  43566. warnOnce(
  43567. ("text \"" + text + "\" outside root element will be ignored."),
  43568. { start: start }
  43569. );
  43570. }
  43571. }
  43572. return
  43573. }
  43574. // IE textarea placeholder bug
  43575. /* istanbul ignore if */
  43576. if (isIE &&
  43577. currentParent.tag === 'textarea' &&
  43578. currentParent.attrsMap.placeholder === text
  43579. ) {
  43580. return
  43581. }
  43582. var children = currentParent.children;
  43583. if (inPre || text.trim()) {
  43584. text = isTextTag(currentParent) ? text : decodeHTMLCached(text);
  43585. } else if (!children.length) {
  43586. // remove the whitespace-only node right after an opening tag
  43587. text = '';
  43588. } else if (whitespaceOption) {
  43589. if (whitespaceOption === 'condense') {
  43590. // in condense mode, remove the whitespace node if it contains
  43591. // line break, otherwise condense to a single space
  43592. text = lineBreakRE.test(text) ? '' : ' ';
  43593. } else {
  43594. text = ' ';
  43595. }
  43596. } else {
  43597. text = preserveWhitespace ? ' ' : '';
  43598. }
  43599. if (text) {
  43600. if (!inPre && whitespaceOption === 'condense') {
  43601. // condense consecutive whitespaces into single space
  43602. text = text.replace(whitespaceRE$1, ' ');
  43603. }
  43604. var res;
  43605. var child;
  43606. if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
  43607. child = {
  43608. type: 2,
  43609. expression: res.expression,
  43610. tokens: res.tokens,
  43611. text: text
  43612. };
  43613. } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
  43614. child = {
  43615. type: 3,
  43616. text: text
  43617. };
  43618. }
  43619. if (child) {
  43620. if (options.outputSourceRange) {
  43621. child.start = start;
  43622. child.end = end;
  43623. }
  43624. children.push(child);
  43625. }
  43626. }
  43627. },
  43628. comment: function comment (text, start, end) {
  43629. // adding anything as a sibling to the root node is forbidden
  43630. // comments should still be allowed, but ignored
  43631. if (currentParent) {
  43632. var child = {
  43633. type: 3,
  43634. text: text,
  43635. isComment: true
  43636. };
  43637. if (options.outputSourceRange) {
  43638. child.start = start;
  43639. child.end = end;
  43640. }
  43641. currentParent.children.push(child);
  43642. }
  43643. }
  43644. });
  43645. return root
  43646. }
  43647. function processPre (el) {
  43648. if (getAndRemoveAttr(el, 'v-pre') != null) {
  43649. el.pre = true;
  43650. }
  43651. }
  43652. function processRawAttrs (el) {
  43653. var list = el.attrsList;
  43654. var len = list.length;
  43655. if (len) {
  43656. var attrs = el.attrs = new Array(len);
  43657. for (var i = 0; i < len; i++) {
  43658. attrs[i] = {
  43659. name: list[i].name,
  43660. value: JSON.stringify(list[i].value)
  43661. };
  43662. if (list[i].start != null) {
  43663. attrs[i].start = list[i].start;
  43664. attrs[i].end = list[i].end;
  43665. }
  43666. }
  43667. } else if (!el.pre) {
  43668. // non root node in pre blocks with no attributes
  43669. el.plain = true;
  43670. }
  43671. }
  43672. function processElement (
  43673. element,
  43674. options
  43675. ) {
  43676. processKey(element);
  43677. // determine whether this is a plain element after
  43678. // removing structural attributes
  43679. element.plain = (
  43680. !element.key &&
  43681. !element.scopedSlots &&
  43682. !element.attrsList.length
  43683. );
  43684. processRef(element);
  43685. processSlotContent(element);
  43686. processSlotOutlet(element);
  43687. processComponent(element);
  43688. for (var i = 0; i < transforms.length; i++) {
  43689. element = transforms[i](element, options) || element;
  43690. }
  43691. processAttrs(element);
  43692. return element
  43693. }
  43694. function processKey (el) {
  43695. var exp = getBindingAttr(el, 'key');
  43696. if (exp) {
  43697. {
  43698. if (el.tag === 'template') {
  43699. warn$2(
  43700. "<template> cannot be keyed. Place the key on real elements instead.",
  43701. getRawBindingAttr(el, 'key')
  43702. );
  43703. }
  43704. if (el.for) {
  43705. var iterator = el.iterator2 || el.iterator1;
  43706. var parent = el.parent;
  43707. if (iterator && iterator === exp && parent && parent.tag === 'transition-group') {
  43708. warn$2(
  43709. "Do not use v-for index as key on <transition-group> children, " +
  43710. "this is the same as not using keys.",
  43711. getRawBindingAttr(el, 'key'),
  43712. true /* tip */
  43713. );
  43714. }
  43715. }
  43716. }
  43717. el.key = exp;
  43718. }
  43719. }
  43720. function processRef (el) {
  43721. var ref = getBindingAttr(el, 'ref');
  43722. if (ref) {
  43723. el.ref = ref;
  43724. el.refInFor = checkInFor(el);
  43725. }
  43726. }
  43727. function processFor (el) {
  43728. var exp;
  43729. if ((exp = getAndRemoveAttr(el, 'v-for'))) {
  43730. var res = parseFor(exp);
  43731. if (res) {
  43732. extend(el, res);
  43733. } else {
  43734. warn$2(
  43735. ("Invalid v-for expression: " + exp),
  43736. el.rawAttrsMap['v-for']
  43737. );
  43738. }
  43739. }
  43740. }
  43741. function parseFor (exp) {
  43742. var inMatch = exp.match(forAliasRE);
  43743. if (!inMatch) { return }
  43744. var res = {};
  43745. res.for = inMatch[2].trim();
  43746. var alias = inMatch[1].trim().replace(stripParensRE, '');
  43747. var iteratorMatch = alias.match(forIteratorRE);
  43748. if (iteratorMatch) {
  43749. res.alias = alias.replace(forIteratorRE, '').trim();
  43750. res.iterator1 = iteratorMatch[1].trim();
  43751. if (iteratorMatch[2]) {
  43752. res.iterator2 = iteratorMatch[2].trim();
  43753. }
  43754. } else {
  43755. res.alias = alias;
  43756. }
  43757. return res
  43758. }
  43759. function processIf (el) {
  43760. var exp = getAndRemoveAttr(el, 'v-if');
  43761. if (exp) {
  43762. el.if = exp;
  43763. addIfCondition(el, {
  43764. exp: exp,
  43765. block: el
  43766. });
  43767. } else {
  43768. if (getAndRemoveAttr(el, 'v-else') != null) {
  43769. el.else = true;
  43770. }
  43771. var elseif = getAndRemoveAttr(el, 'v-else-if');
  43772. if (elseif) {
  43773. el.elseif = elseif;
  43774. }
  43775. }
  43776. }
  43777. function processIfConditions (el, parent) {
  43778. var prev = findPrevElement(parent.children);
  43779. if (prev && prev.if) {
  43780. addIfCondition(prev, {
  43781. exp: el.elseif,
  43782. block: el
  43783. });
  43784. } else {
  43785. warn$2(
  43786. "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
  43787. "used on element <" + (el.tag) + "> without corresponding v-if.",
  43788. el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']
  43789. );
  43790. }
  43791. }
  43792. function findPrevElement (children) {
  43793. var i = children.length;
  43794. while (i--) {
  43795. if (children[i].type === 1) {
  43796. return children[i]
  43797. } else {
  43798. if (children[i].text !== ' ') {
  43799. warn$2(
  43800. "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
  43801. "will be ignored.",
  43802. children[i]
  43803. );
  43804. }
  43805. children.pop();
  43806. }
  43807. }
  43808. }
  43809. function addIfCondition (el, condition) {
  43810. if (!el.ifConditions) {
  43811. el.ifConditions = [];
  43812. }
  43813. el.ifConditions.push(condition);
  43814. }
  43815. function processOnce (el) {
  43816. var once$$1 = getAndRemoveAttr(el, 'v-once');
  43817. if (once$$1 != null) {
  43818. el.once = true;
  43819. }
  43820. }
  43821. // handle content being passed to a component as slot,
  43822. // e.g. <template slot="xxx">, <div slot-scope="xxx">
  43823. function processSlotContent (el) {
  43824. var slotScope;
  43825. if (el.tag === 'template') {
  43826. slotScope = getAndRemoveAttr(el, 'scope');
  43827. /* istanbul ignore if */
  43828. if (slotScope) {
  43829. warn$2(
  43830. "the \"scope\" attribute for scoped slots have been deprecated and " +
  43831. "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
  43832. "can also be used on plain elements in addition to <template> to " +
  43833. "denote scoped slots.",
  43834. el.rawAttrsMap['scope'],
  43835. true
  43836. );
  43837. }
  43838. el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
  43839. } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
  43840. /* istanbul ignore if */
  43841. if (el.attrsMap['v-for']) {
  43842. warn$2(
  43843. "Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
  43844. "(v-for takes higher priority). Use a wrapper <template> for the " +
  43845. "scoped slot to make it clearer.",
  43846. el.rawAttrsMap['slot-scope'],
  43847. true
  43848. );
  43849. }
  43850. el.slotScope = slotScope;
  43851. }
  43852. // slot="xxx"
  43853. var slotTarget = getBindingAttr(el, 'slot');
  43854. if (slotTarget) {
  43855. el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
  43856. el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);
  43857. // preserve slot as an attribute for native shadow DOM compat
  43858. // only for non-scoped slots.
  43859. if (el.tag !== 'template' && !el.slotScope) {
  43860. addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));
  43861. }
  43862. }
  43863. // 2.6 v-slot syntax
  43864. {
  43865. if (el.tag === 'template') {
  43866. // v-slot on <template>
  43867. var slotBinding = getAndRemoveAttrByRegex(el, slotRE);
  43868. if (slotBinding) {
  43869. {
  43870. if (el.slotTarget || el.slotScope) {
  43871. warn$2(
  43872. "Unexpected mixed usage of different slot syntaxes.",
  43873. el
  43874. );
  43875. }
  43876. if (el.parent && !maybeComponent(el.parent)) {
  43877. warn$2(
  43878. "<template v-slot> can only appear at the root level inside " +
  43879. "the receiving component",
  43880. el
  43881. );
  43882. }
  43883. }
  43884. var ref = getSlotName(slotBinding);
  43885. var name = ref.name;
  43886. var dynamic = ref.dynamic;
  43887. el.slotTarget = name;
  43888. el.slotTargetDynamic = dynamic;
  43889. el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf
  43890. }
  43891. } else {
  43892. // v-slot on component, denotes default slot
  43893. var slotBinding$1 = getAndRemoveAttrByRegex(el, slotRE);
  43894. if (slotBinding$1) {
  43895. {
  43896. if (!maybeComponent(el)) {
  43897. warn$2(
  43898. "v-slot can only be used on components or <template>.",
  43899. slotBinding$1
  43900. );
  43901. }
  43902. if (el.slotScope || el.slotTarget) {
  43903. warn$2(
  43904. "Unexpected mixed usage of different slot syntaxes.",
  43905. el
  43906. );
  43907. }
  43908. if (el.scopedSlots) {
  43909. warn$2(
  43910. "To avoid scope ambiguity, the default slot should also use " +
  43911. "<template> syntax when there are other named slots.",
  43912. slotBinding$1
  43913. );
  43914. }
  43915. }
  43916. // add the component's children to its default slot
  43917. var slots = el.scopedSlots || (el.scopedSlots = {});
  43918. var ref$1 = getSlotName(slotBinding$1);
  43919. var name$1 = ref$1.name;
  43920. var dynamic$1 = ref$1.dynamic;
  43921. var slotContainer = slots[name$1] = createASTElement('template', [], el);
  43922. slotContainer.slotTarget = name$1;
  43923. slotContainer.slotTargetDynamic = dynamic$1;
  43924. slotContainer.children = el.children.filter(function (c) {
  43925. if (!c.slotScope) {
  43926. c.parent = slotContainer;
  43927. return true
  43928. }
  43929. });
  43930. slotContainer.slotScope = slotBinding$1.value || emptySlotScopeToken;
  43931. // remove children as they are returned from scopedSlots now
  43932. el.children = [];
  43933. // mark el non-plain so data gets generated
  43934. el.plain = false;
  43935. }
  43936. }
  43937. }
  43938. }
  43939. function getSlotName (binding) {
  43940. var name = binding.name.replace(slotRE, '');
  43941. if (!name) {
  43942. if (binding.name[0] !== '#') {
  43943. name = 'default';
  43944. } else {
  43945. warn$2(
  43946. "v-slot shorthand syntax requires a slot name.",
  43947. binding
  43948. );
  43949. }
  43950. }
  43951. return dynamicArgRE.test(name)
  43952. // dynamic [name]
  43953. ? { name: name.slice(1, -1), dynamic: true }
  43954. // static name
  43955. : { name: ("\"" + name + "\""), dynamic: false }
  43956. }
  43957. // handle <slot/> outlets
  43958. function processSlotOutlet (el) {
  43959. if (el.tag === 'slot') {
  43960. el.slotName = getBindingAttr(el, 'name');
  43961. if (el.key) {
  43962. warn$2(
  43963. "`key` does not work on <slot> because slots are abstract outlets " +
  43964. "and can possibly expand into multiple elements. " +
  43965. "Use the key on a wrapping element instead.",
  43966. getRawBindingAttr(el, 'key')
  43967. );
  43968. }
  43969. }
  43970. }
  43971. function processComponent (el) {
  43972. var binding;
  43973. if ((binding = getBindingAttr(el, 'is'))) {
  43974. el.component = binding;
  43975. }
  43976. if (getAndRemoveAttr(el, 'inline-template') != null) {
  43977. el.inlineTemplate = true;
  43978. }
  43979. }
  43980. function processAttrs (el) {
  43981. var list = el.attrsList;
  43982. var i, l, name, rawName, value, modifiers, syncGen, isDynamic;
  43983. for (i = 0, l = list.length; i < l; i++) {
  43984. name = rawName = list[i].name;
  43985. value = list[i].value;
  43986. if (dirRE.test(name)) {
  43987. // mark element as dynamic
  43988. el.hasBindings = true;
  43989. // modifiers
  43990. modifiers = parseModifiers(name.replace(dirRE, ''));
  43991. // support .foo shorthand syntax for the .prop modifier
  43992. if (modifiers) {
  43993. name = name.replace(modifierRE, '');
  43994. }
  43995. if (bindRE.test(name)) { // v-bind
  43996. name = name.replace(bindRE, '');
  43997. value = parseFilters(value);
  43998. isDynamic = dynamicArgRE.test(name);
  43999. if (isDynamic) {
  44000. name = name.slice(1, -1);
  44001. }
  44002. if (
  44003. value.trim().length === 0
  44004. ) {
  44005. warn$2(
  44006. ("The value for a v-bind expression cannot be empty. Found in \"v-bind:" + name + "\"")
  44007. );
  44008. }
  44009. if (modifiers) {
  44010. if (modifiers.prop && !isDynamic) {
  44011. name = camelize(name);
  44012. if (name === 'innerHtml') { name = 'innerHTML'; }
  44013. }
  44014. if (modifiers.camel && !isDynamic) {
  44015. name = camelize(name);
  44016. }
  44017. if (modifiers.sync) {
  44018. syncGen = genAssignmentCode(value, "$event");
  44019. if (!isDynamic) {
  44020. addHandler(
  44021. el,
  44022. ("update:" + (camelize(name))),
  44023. syncGen,
  44024. null,
  44025. false,
  44026. warn$2,
  44027. list[i]
  44028. );
  44029. if (hyphenate(name) !== camelize(name)) {
  44030. addHandler(
  44031. el,
  44032. ("update:" + (hyphenate(name))),
  44033. syncGen,
  44034. null,
  44035. false,
  44036. warn$2,
  44037. list[i]
  44038. );
  44039. }
  44040. } else {
  44041. // handler w/ dynamic event name
  44042. addHandler(
  44043. el,
  44044. ("\"update:\"+(" + name + ")"),
  44045. syncGen,
  44046. null,
  44047. false,
  44048. warn$2,
  44049. list[i],
  44050. true // dynamic
  44051. );
  44052. }
  44053. }
  44054. }
  44055. if ((modifiers && modifiers.prop) || (
  44056. !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
  44057. )) {
  44058. addProp(el, name, value, list[i], isDynamic);
  44059. } else {
  44060. addAttr(el, name, value, list[i], isDynamic);
  44061. }
  44062. } else if (onRE.test(name)) { // v-on
  44063. name = name.replace(onRE, '');
  44064. isDynamic = dynamicArgRE.test(name);
  44065. if (isDynamic) {
  44066. name = name.slice(1, -1);
  44067. }
  44068. addHandler(el, name, value, modifiers, false, warn$2, list[i], isDynamic);
  44069. } else { // normal directives
  44070. name = name.replace(dirRE, '');
  44071. // parse arg
  44072. var argMatch = name.match(argRE);
  44073. var arg = argMatch && argMatch[1];
  44074. isDynamic = false;
  44075. if (arg) {
  44076. name = name.slice(0, -(arg.length + 1));
  44077. if (dynamicArgRE.test(arg)) {
  44078. arg = arg.slice(1, -1);
  44079. isDynamic = true;
  44080. }
  44081. }
  44082. addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);
  44083. if (name === 'model') {
  44084. checkForAliasModel(el, value);
  44085. }
  44086. }
  44087. } else {
  44088. // literal attribute
  44089. {
  44090. var res = parseText(value, delimiters);
  44091. if (res) {
  44092. warn$2(
  44093. name + "=\"" + value + "\": " +
  44094. 'Interpolation inside attributes has been removed. ' +
  44095. 'Use v-bind or the colon shorthand instead. For example, ' +
  44096. 'instead of <div id="{{ val }}">, use <div :id="val">.',
  44097. list[i]
  44098. );
  44099. }
  44100. }
  44101. addAttr(el, name, JSON.stringify(value), list[i]);
  44102. // #6887 firefox doesn't update muted state if set via attribute
  44103. // even immediately after element creation
  44104. if (!el.component &&
  44105. name === 'muted' &&
  44106. platformMustUseProp(el.tag, el.attrsMap.type, name)) {
  44107. addProp(el, name, 'true', list[i]);
  44108. }
  44109. }
  44110. }
  44111. }
  44112. function checkInFor (el) {
  44113. var parent = el;
  44114. while (parent) {
  44115. if (parent.for !== undefined) {
  44116. return true
  44117. }
  44118. parent = parent.parent;
  44119. }
  44120. return false
  44121. }
  44122. function parseModifiers (name) {
  44123. var match = name.match(modifierRE);
  44124. if (match) {
  44125. var ret = {};
  44126. match.forEach(function (m) { ret[m.slice(1)] = true; });
  44127. return ret
  44128. }
  44129. }
  44130. function makeAttrsMap (attrs) {
  44131. var map = {};
  44132. for (var i = 0, l = attrs.length; i < l; i++) {
  44133. if (
  44134. map[attrs[i].name] && !isIE && !isEdge
  44135. ) {
  44136. warn$2('duplicate attribute: ' + attrs[i].name, attrs[i]);
  44137. }
  44138. map[attrs[i].name] = attrs[i].value;
  44139. }
  44140. return map
  44141. }
  44142. // for script (e.g. type="x/template") or style, do not decode content
  44143. function isTextTag (el) {
  44144. return el.tag === 'script' || el.tag === 'style'
  44145. }
  44146. function isForbiddenTag (el) {
  44147. return (
  44148. el.tag === 'style' ||
  44149. (el.tag === 'script' && (
  44150. !el.attrsMap.type ||
  44151. el.attrsMap.type === 'text/javascript'
  44152. ))
  44153. )
  44154. }
  44155. var ieNSBug = /^xmlns:NS\d+/;
  44156. var ieNSPrefix = /^NS\d+:/;
  44157. /* istanbul ignore next */
  44158. function guardIESVGBug (attrs) {
  44159. var res = [];
  44160. for (var i = 0; i < attrs.length; i++) {
  44161. var attr = attrs[i];
  44162. if (!ieNSBug.test(attr.name)) {
  44163. attr.name = attr.name.replace(ieNSPrefix, '');
  44164. res.push(attr);
  44165. }
  44166. }
  44167. return res
  44168. }
  44169. function checkForAliasModel (el, value) {
  44170. var _el = el;
  44171. while (_el) {
  44172. if (_el.for && _el.alias === value) {
  44173. warn$2(
  44174. "<" + (el.tag) + " v-model=\"" + value + "\">: " +
  44175. "You are binding v-model directly to a v-for iteration alias. " +
  44176. "This will not be able to modify the v-for source array because " +
  44177. "writing to the alias is like modifying a function local variable. " +
  44178. "Consider using an array of objects and use v-model on an object property instead.",
  44179. el.rawAttrsMap['v-model']
  44180. );
  44181. }
  44182. _el = _el.parent;
  44183. }
  44184. }
  44185. /* */
  44186. function preTransformNode (el, options) {
  44187. if (el.tag === 'input') {
  44188. var map = el.attrsMap;
  44189. if (!map['v-model']) {
  44190. return
  44191. }
  44192. var typeBinding;
  44193. if (map[':type'] || map['v-bind:type']) {
  44194. typeBinding = getBindingAttr(el, 'type');
  44195. }
  44196. if (!map.type && !typeBinding && map['v-bind']) {
  44197. typeBinding = "(" + (map['v-bind']) + ").type";
  44198. }
  44199. if (typeBinding) {
  44200. var ifCondition = getAndRemoveAttr(el, 'v-if', true);
  44201. var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : "";
  44202. var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
  44203. var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
  44204. // 1. checkbox
  44205. var branch0 = cloneASTElement(el);
  44206. // process for on the main node
  44207. processFor(branch0);
  44208. addRawAttr(branch0, 'type', 'checkbox');
  44209. processElement(branch0, options);
  44210. branch0.processed = true; // prevent it from double-processed
  44211. branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
  44212. addIfCondition(branch0, {
  44213. exp: branch0.if,
  44214. block: branch0
  44215. });
  44216. // 2. add radio else-if condition
  44217. var branch1 = cloneASTElement(el);
  44218. getAndRemoveAttr(branch1, 'v-for', true);
  44219. addRawAttr(branch1, 'type', 'radio');
  44220. processElement(branch1, options);
  44221. addIfCondition(branch0, {
  44222. exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
  44223. block: branch1
  44224. });
  44225. // 3. other
  44226. var branch2 = cloneASTElement(el);
  44227. getAndRemoveAttr(branch2, 'v-for', true);
  44228. addRawAttr(branch2, ':type', typeBinding);
  44229. processElement(branch2, options);
  44230. addIfCondition(branch0, {
  44231. exp: ifCondition,
  44232. block: branch2
  44233. });
  44234. if (hasElse) {
  44235. branch0.else = true;
  44236. } else if (elseIfCondition) {
  44237. branch0.elseif = elseIfCondition;
  44238. }
  44239. return branch0
  44240. }
  44241. }
  44242. }
  44243. function cloneASTElement (el) {
  44244. return createASTElement(el.tag, el.attrsList.slice(), el.parent)
  44245. }
  44246. var model$1 = {
  44247. preTransformNode: preTransformNode
  44248. };
  44249. var modules$1 = [
  44250. klass$1,
  44251. style$1,
  44252. model$1
  44253. ];
  44254. /* */
  44255. function text (el, dir) {
  44256. if (dir.value) {
  44257. addProp(el, 'textContent', ("_s(" + (dir.value) + ")"), dir);
  44258. }
  44259. }
  44260. /* */
  44261. function html (el, dir) {
  44262. if (dir.value) {
  44263. addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"), dir);
  44264. }
  44265. }
  44266. var directives$1 = {
  44267. model: model,
  44268. text: text,
  44269. html: html
  44270. };
  44271. /* */
  44272. var baseOptions = {
  44273. expectHTML: true,
  44274. modules: modules$1,
  44275. directives: directives$1,
  44276. isPreTag: isPreTag,
  44277. isUnaryTag: isUnaryTag,
  44278. mustUseProp: mustUseProp,
  44279. canBeLeftOpenTag: canBeLeftOpenTag,
  44280. isReservedTag: isReservedTag,
  44281. getTagNamespace: getTagNamespace,
  44282. staticKeys: genStaticKeys(modules$1)
  44283. };
  44284. /* */
  44285. var isStaticKey;
  44286. var isPlatformReservedTag;
  44287. var genStaticKeysCached = cached(genStaticKeys$1);
  44288. /**
  44289. * Goal of the optimizer: walk the generated template AST tree
  44290. * and detect sub-trees that are purely static, i.e. parts of
  44291. * the DOM that never needs to change.
  44292. *
  44293. * Once we detect these sub-trees, we can:
  44294. *
  44295. * 1. Hoist them into constants, so that we no longer need to
  44296. * create fresh nodes for them on each re-render;
  44297. * 2. Completely skip them in the patching process.
  44298. */
  44299. function optimize (root, options) {
  44300. if (!root) { return }
  44301. isStaticKey = genStaticKeysCached(options.staticKeys || '');
  44302. isPlatformReservedTag = options.isReservedTag || no;
  44303. // first pass: mark all non-static nodes.
  44304. markStatic$1(root);
  44305. // second pass: mark static roots.
  44306. markStaticRoots(root, false);
  44307. }
  44308. function genStaticKeys$1 (keys) {
  44309. return makeMap(
  44310. 'type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +
  44311. (keys ? ',' + keys : '')
  44312. )
  44313. }
  44314. function markStatic$1 (node) {
  44315. node.static = isStatic(node);
  44316. if (node.type === 1) {
  44317. // do not make component slot content static. this avoids
  44318. // 1. components not able to mutate slot nodes
  44319. // 2. static slot content fails for hot-reloading
  44320. if (
  44321. !isPlatformReservedTag(node.tag) &&
  44322. node.tag !== 'slot' &&
  44323. node.attrsMap['inline-template'] == null
  44324. ) {
  44325. return
  44326. }
  44327. for (var i = 0, l = node.children.length; i < l; i++) {
  44328. var child = node.children[i];
  44329. markStatic$1(child);
  44330. if (!child.static) {
  44331. node.static = false;
  44332. }
  44333. }
  44334. if (node.ifConditions) {
  44335. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  44336. var block = node.ifConditions[i$1].block;
  44337. markStatic$1(block);
  44338. if (!block.static) {
  44339. node.static = false;
  44340. }
  44341. }
  44342. }
  44343. }
  44344. }
  44345. function markStaticRoots (node, isInFor) {
  44346. if (node.type === 1) {
  44347. if (node.static || node.once) {
  44348. node.staticInFor = isInFor;
  44349. }
  44350. // For a node to qualify as a static root, it should have children that
  44351. // are not just static text. Otherwise the cost of hoisting out will
  44352. // outweigh the benefits and it's better off to just always render it fresh.
  44353. if (node.static && node.children.length && !(
  44354. node.children.length === 1 &&
  44355. node.children[0].type === 3
  44356. )) {
  44357. node.staticRoot = true;
  44358. return
  44359. } else {
  44360. node.staticRoot = false;
  44361. }
  44362. if (node.children) {
  44363. for (var i = 0, l = node.children.length; i < l; i++) {
  44364. markStaticRoots(node.children[i], isInFor || !!node.for);
  44365. }
  44366. }
  44367. if (node.ifConditions) {
  44368. for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
  44369. markStaticRoots(node.ifConditions[i$1].block, isInFor);
  44370. }
  44371. }
  44372. }
  44373. }
  44374. function isStatic (node) {
  44375. if (node.type === 2) { // expression
  44376. return false
  44377. }
  44378. if (node.type === 3) { // text
  44379. return true
  44380. }
  44381. return !!(node.pre || (
  44382. !node.hasBindings && // no dynamic bindings
  44383. !node.if && !node.for && // not v-if or v-for or v-else
  44384. !isBuiltInTag(node.tag) && // not a built-in
  44385. isPlatformReservedTag(node.tag) && // not a component
  44386. !isDirectChildOfTemplateFor(node) &&
  44387. Object.keys(node).every(isStaticKey)
  44388. ))
  44389. }
  44390. function isDirectChildOfTemplateFor (node) {
  44391. while (node.parent) {
  44392. node = node.parent;
  44393. if (node.tag !== 'template') {
  44394. return false
  44395. }
  44396. if (node.for) {
  44397. return true
  44398. }
  44399. }
  44400. return false
  44401. }
  44402. /* */
  44403. var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/;
  44404. var fnInvokeRE = /\([^)]*?\);*$/;
  44405. var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
  44406. // KeyboardEvent.keyCode aliases
  44407. var keyCodes = {
  44408. esc: 27,
  44409. tab: 9,
  44410. enter: 13,
  44411. space: 32,
  44412. up: 38,
  44413. left: 37,
  44414. right: 39,
  44415. down: 40,
  44416. 'delete': [8, 46]
  44417. };
  44418. // KeyboardEvent.key aliases
  44419. var keyNames = {
  44420. // #7880: IE11 and Edge use `Esc` for Escape key name.
  44421. esc: ['Esc', 'Escape'],
  44422. tab: 'Tab',
  44423. enter: 'Enter',
  44424. // #9112: IE11 uses `Spacebar` for Space key name.
  44425. space: [' ', 'Spacebar'],
  44426. // #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
  44427. up: ['Up', 'ArrowUp'],
  44428. left: ['Left', 'ArrowLeft'],
  44429. right: ['Right', 'ArrowRight'],
  44430. down: ['Down', 'ArrowDown'],
  44431. // #9112: IE11 uses `Del` for Delete key name.
  44432. 'delete': ['Backspace', 'Delete', 'Del']
  44433. };
  44434. // #4868: modifiers that prevent the execution of the listener
  44435. // need to explicitly return null so that we can determine whether to remove
  44436. // the listener for .once
  44437. var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
  44438. var modifierCode = {
  44439. stop: '$event.stopPropagation();',
  44440. prevent: '$event.preventDefault();',
  44441. self: genGuard("$event.target !== $event.currentTarget"),
  44442. ctrl: genGuard("!$event.ctrlKey"),
  44443. shift: genGuard("!$event.shiftKey"),
  44444. alt: genGuard("!$event.altKey"),
  44445. meta: genGuard("!$event.metaKey"),
  44446. left: genGuard("'button' in $event && $event.button !== 0"),
  44447. middle: genGuard("'button' in $event && $event.button !== 1"),
  44448. right: genGuard("'button' in $event && $event.button !== 2")
  44449. };
  44450. function genHandlers (
  44451. events,
  44452. isNative
  44453. ) {
  44454. var prefix = isNative ? 'nativeOn:' : 'on:';
  44455. var staticHandlers = "";
  44456. var dynamicHandlers = "";
  44457. for (var name in events) {
  44458. var handlerCode = genHandler(events[name]);
  44459. if (events[name] && events[name].dynamic) {
  44460. dynamicHandlers += name + "," + handlerCode + ",";
  44461. } else {
  44462. staticHandlers += "\"" + name + "\":" + handlerCode + ",";
  44463. }
  44464. }
  44465. staticHandlers = "{" + (staticHandlers.slice(0, -1)) + "}";
  44466. if (dynamicHandlers) {
  44467. return prefix + "_d(" + staticHandlers + ",[" + (dynamicHandlers.slice(0, -1)) + "])"
  44468. } else {
  44469. return prefix + staticHandlers
  44470. }
  44471. }
  44472. function genHandler (handler) {
  44473. if (!handler) {
  44474. return 'function(){}'
  44475. }
  44476. if (Array.isArray(handler)) {
  44477. return ("[" + (handler.map(function (handler) { return genHandler(handler); }).join(',')) + "]")
  44478. }
  44479. var isMethodPath = simplePathRE.test(handler.value);
  44480. var isFunctionExpression = fnExpRE.test(handler.value);
  44481. var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));
  44482. if (!handler.modifiers) {
  44483. if (isMethodPath || isFunctionExpression) {
  44484. return handler.value
  44485. }
  44486. return ("function($event){" + (isFunctionInvocation ? ("return " + (handler.value)) : handler.value) + "}") // inline statement
  44487. } else {
  44488. var code = '';
  44489. var genModifierCode = '';
  44490. var keys = [];
  44491. for (var key in handler.modifiers) {
  44492. if (modifierCode[key]) {
  44493. genModifierCode += modifierCode[key];
  44494. // left/right
  44495. if (keyCodes[key]) {
  44496. keys.push(key);
  44497. }
  44498. } else if (key === 'exact') {
  44499. var modifiers = (handler.modifiers);
  44500. genModifierCode += genGuard(
  44501. ['ctrl', 'shift', 'alt', 'meta']
  44502. .filter(function (keyModifier) { return !modifiers[keyModifier]; })
  44503. .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
  44504. .join('||')
  44505. );
  44506. } else {
  44507. keys.push(key);
  44508. }
  44509. }
  44510. if (keys.length) {
  44511. code += genKeyFilter(keys);
  44512. }
  44513. // Make sure modifiers like prevent and stop get executed after key filtering
  44514. if (genModifierCode) {
  44515. code += genModifierCode;
  44516. }
  44517. var handlerCode = isMethodPath
  44518. ? ("return " + (handler.value) + ".apply(null, arguments)")
  44519. : isFunctionExpression
  44520. ? ("return (" + (handler.value) + ").apply(null, arguments)")
  44521. : isFunctionInvocation
  44522. ? ("return " + (handler.value))
  44523. : handler.value;
  44524. return ("function($event){" + code + handlerCode + "}")
  44525. }
  44526. }
  44527. function genKeyFilter (keys) {
  44528. return (
  44529. // make sure the key filters only apply to KeyboardEvents
  44530. // #9441: can't use 'keyCode' in $event because Chrome autofill fires fake
  44531. // key events that do not have keyCode property...
  44532. "if(!$event.type.indexOf('key')&&" +
  44533. (keys.map(genFilterCode).join('&&')) + ")return null;"
  44534. )
  44535. }
  44536. function genFilterCode (key) {
  44537. var keyVal = parseInt(key, 10);
  44538. if (keyVal) {
  44539. return ("$event.keyCode!==" + keyVal)
  44540. }
  44541. var keyCode = keyCodes[key];
  44542. var keyName = keyNames[key];
  44543. return (
  44544. "_k($event.keyCode," +
  44545. (JSON.stringify(key)) + "," +
  44546. (JSON.stringify(keyCode)) + "," +
  44547. "$event.key," +
  44548. "" + (JSON.stringify(keyName)) +
  44549. ")"
  44550. )
  44551. }
  44552. /* */
  44553. function on (el, dir) {
  44554. if (dir.modifiers) {
  44555. warn("v-on without argument does not support modifiers.");
  44556. }
  44557. el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
  44558. }
  44559. /* */
  44560. function bind$1 (el, dir) {
  44561. el.wrapData = function (code) {
  44562. return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
  44563. };
  44564. }
  44565. /* */
  44566. var baseDirectives = {
  44567. on: on,
  44568. bind: bind$1,
  44569. cloak: noop
  44570. };
  44571. /* */
  44572. var CodegenState = function CodegenState (options) {
  44573. this.options = options;
  44574. this.warn = options.warn || baseWarn;
  44575. this.transforms = pluckModuleFunction(options.modules, 'transformCode');
  44576. this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
  44577. this.directives = extend(extend({}, baseDirectives), options.directives);
  44578. var isReservedTag = options.isReservedTag || no;
  44579. this.maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); };
  44580. this.onceId = 0;
  44581. this.staticRenderFns = [];
  44582. this.pre = false;
  44583. };
  44584. function generate (
  44585. ast,
  44586. options
  44587. ) {
  44588. var state = new CodegenState(options);
  44589. // fix #11483, Root level <script> tags should not be rendered.
  44590. var code = ast ? (ast.tag === 'script' ? 'null' : genElement(ast, state)) : '_c("div")';
  44591. return {
  44592. render: ("with(this){return " + code + "}"),
  44593. staticRenderFns: state.staticRenderFns
  44594. }
  44595. }
  44596. function genElement (el, state) {
  44597. if (el.parent) {
  44598. el.pre = el.pre || el.parent.pre;
  44599. }
  44600. if (el.staticRoot && !el.staticProcessed) {
  44601. return genStatic(el, state)
  44602. } else if (el.once && !el.onceProcessed) {
  44603. return genOnce(el, state)
  44604. } else if (el.for && !el.forProcessed) {
  44605. return genFor(el, state)
  44606. } else if (el.if && !el.ifProcessed) {
  44607. return genIf(el, state)
  44608. } else if (el.tag === 'template' && !el.slotTarget && !state.pre) {
  44609. return genChildren(el, state) || 'void 0'
  44610. } else if (el.tag === 'slot') {
  44611. return genSlot(el, state)
  44612. } else {
  44613. // component or element
  44614. var code;
  44615. if (el.component) {
  44616. code = genComponent(el.component, el, state);
  44617. } else {
  44618. var data;
  44619. if (!el.plain || (el.pre && state.maybeComponent(el))) {
  44620. data = genData$2(el, state);
  44621. }
  44622. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  44623. code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
  44624. }
  44625. // module transforms
  44626. for (var i = 0; i < state.transforms.length; i++) {
  44627. code = state.transforms[i](el, code);
  44628. }
  44629. return code
  44630. }
  44631. }
  44632. // hoist static sub-trees out
  44633. function genStatic (el, state) {
  44634. el.staticProcessed = true;
  44635. // Some elements (templates) need to behave differently inside of a v-pre
  44636. // node. All pre nodes are static roots, so we can use this as a location to
  44637. // wrap a state change and reset it upon exiting the pre node.
  44638. var originalPreState = state.pre;
  44639. if (el.pre) {
  44640. state.pre = el.pre;
  44641. }
  44642. state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
  44643. state.pre = originalPreState;
  44644. return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
  44645. }
  44646. // v-once
  44647. function genOnce (el, state) {
  44648. el.onceProcessed = true;
  44649. if (el.if && !el.ifProcessed) {
  44650. return genIf(el, state)
  44651. } else if (el.staticInFor) {
  44652. var key = '';
  44653. var parent = el.parent;
  44654. while (parent) {
  44655. if (parent.for) {
  44656. key = parent.key;
  44657. break
  44658. }
  44659. parent = parent.parent;
  44660. }
  44661. if (!key) {
  44662. state.warn(
  44663. "v-once can only be used inside v-for that is keyed. ",
  44664. el.rawAttrsMap['v-once']
  44665. );
  44666. return genElement(el, state)
  44667. }
  44668. return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
  44669. } else {
  44670. return genStatic(el, state)
  44671. }
  44672. }
  44673. function genIf (
  44674. el,
  44675. state,
  44676. altGen,
  44677. altEmpty
  44678. ) {
  44679. el.ifProcessed = true; // avoid recursion
  44680. return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
  44681. }
  44682. function genIfConditions (
  44683. conditions,
  44684. state,
  44685. altGen,
  44686. altEmpty
  44687. ) {
  44688. if (!conditions.length) {
  44689. return altEmpty || '_e()'
  44690. }
  44691. var condition = conditions.shift();
  44692. if (condition.exp) {
  44693. return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
  44694. } else {
  44695. return ("" + (genTernaryExp(condition.block)))
  44696. }
  44697. // v-if with v-once should generate code like (a)?_m(0):_m(1)
  44698. function genTernaryExp (el) {
  44699. return altGen
  44700. ? altGen(el, state)
  44701. : el.once
  44702. ? genOnce(el, state)
  44703. : genElement(el, state)
  44704. }
  44705. }
  44706. function genFor (
  44707. el,
  44708. state,
  44709. altGen,
  44710. altHelper
  44711. ) {
  44712. var exp = el.for;
  44713. var alias = el.alias;
  44714. var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
  44715. var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
  44716. if (state.maybeComponent(el) &&
  44717. el.tag !== 'slot' &&
  44718. el.tag !== 'template' &&
  44719. !el.key
  44720. ) {
  44721. state.warn(
  44722. "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
  44723. "v-for should have explicit keys. " +
  44724. "See https://vuejs.org/guide/list.html#key for more info.",
  44725. el.rawAttrsMap['v-for'],
  44726. true /* tip */
  44727. );
  44728. }
  44729. el.forProcessed = true; // avoid recursion
  44730. return (altHelper || '_l') + "((" + exp + ")," +
  44731. "function(" + alias + iterator1 + iterator2 + "){" +
  44732. "return " + ((altGen || genElement)(el, state)) +
  44733. '})'
  44734. }
  44735. function genData$2 (el, state) {
  44736. var data = '{';
  44737. // directives first.
  44738. // directives may mutate the el's other properties before they are generated.
  44739. var dirs = genDirectives(el, state);
  44740. if (dirs) { data += dirs + ','; }
  44741. // key
  44742. if (el.key) {
  44743. data += "key:" + (el.key) + ",";
  44744. }
  44745. // ref
  44746. if (el.ref) {
  44747. data += "ref:" + (el.ref) + ",";
  44748. }
  44749. if (el.refInFor) {
  44750. data += "refInFor:true,";
  44751. }
  44752. // pre
  44753. if (el.pre) {
  44754. data += "pre:true,";
  44755. }
  44756. // record original tag name for components using "is" attribute
  44757. if (el.component) {
  44758. data += "tag:\"" + (el.tag) + "\",";
  44759. }
  44760. // module data generation functions
  44761. for (var i = 0; i < state.dataGenFns.length; i++) {
  44762. data += state.dataGenFns[i](el);
  44763. }
  44764. // attributes
  44765. if (el.attrs) {
  44766. data += "attrs:" + (genProps(el.attrs)) + ",";
  44767. }
  44768. // DOM props
  44769. if (el.props) {
  44770. data += "domProps:" + (genProps(el.props)) + ",";
  44771. }
  44772. // event handlers
  44773. if (el.events) {
  44774. data += (genHandlers(el.events, false)) + ",";
  44775. }
  44776. if (el.nativeEvents) {
  44777. data += (genHandlers(el.nativeEvents, true)) + ",";
  44778. }
  44779. // slot target
  44780. // only for non-scoped slots
  44781. if (el.slotTarget && !el.slotScope) {
  44782. data += "slot:" + (el.slotTarget) + ",";
  44783. }
  44784. // scoped slots
  44785. if (el.scopedSlots) {
  44786. data += (genScopedSlots(el, el.scopedSlots, state)) + ",";
  44787. }
  44788. // component v-model
  44789. if (el.model) {
  44790. data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
  44791. }
  44792. // inline-template
  44793. if (el.inlineTemplate) {
  44794. var inlineTemplate = genInlineTemplate(el, state);
  44795. if (inlineTemplate) {
  44796. data += inlineTemplate + ",";
  44797. }
  44798. }
  44799. data = data.replace(/,$/, '') + '}';
  44800. // v-bind dynamic argument wrap
  44801. // v-bind with dynamic arguments must be applied using the same v-bind object
  44802. // merge helper so that class/style/mustUseProp attrs are handled correctly.
  44803. if (el.dynamicAttrs) {
  44804. data = "_b(" + data + ",\"" + (el.tag) + "\"," + (genProps(el.dynamicAttrs)) + ")";
  44805. }
  44806. // v-bind data wrap
  44807. if (el.wrapData) {
  44808. data = el.wrapData(data);
  44809. }
  44810. // v-on data wrap
  44811. if (el.wrapListeners) {
  44812. data = el.wrapListeners(data);
  44813. }
  44814. return data
  44815. }
  44816. function genDirectives (el, state) {
  44817. var dirs = el.directives;
  44818. if (!dirs) { return }
  44819. var res = 'directives:[';
  44820. var hasRuntime = false;
  44821. var i, l, dir, needRuntime;
  44822. for (i = 0, l = dirs.length; i < l; i++) {
  44823. dir = dirs[i];
  44824. needRuntime = true;
  44825. var gen = state.directives[dir.name];
  44826. if (gen) {
  44827. // compile-time directive that manipulates AST.
  44828. // returns true if it also needs a runtime counterpart.
  44829. needRuntime = !!gen(el, dir, state.warn);
  44830. }
  44831. if (needRuntime) {
  44832. hasRuntime = true;
  44833. res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:" + (dir.isDynamicArg ? dir.arg : ("\"" + (dir.arg) + "\""))) : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
  44834. }
  44835. }
  44836. if (hasRuntime) {
  44837. return res.slice(0, -1) + ']'
  44838. }
  44839. }
  44840. function genInlineTemplate (el, state) {
  44841. var ast = el.children[0];
  44842. if (el.children.length !== 1 || ast.type !== 1) {
  44843. state.warn(
  44844. 'Inline-template components must have exactly one child element.',
  44845. { start: el.start }
  44846. );
  44847. }
  44848. if (ast && ast.type === 1) {
  44849. var inlineRenderFns = generate(ast, state.options);
  44850. return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
  44851. }
  44852. }
  44853. function genScopedSlots (
  44854. el,
  44855. slots,
  44856. state
  44857. ) {
  44858. // by default scoped slots are considered "stable", this allows child
  44859. // components with only scoped slots to skip forced updates from parent.
  44860. // but in some cases we have to bail-out of this optimization
  44861. // for example if the slot contains dynamic names, has v-if or v-for on them...
  44862. var needsForceUpdate = el.for || Object.keys(slots).some(function (key) {
  44863. var slot = slots[key];
  44864. return (
  44865. slot.slotTargetDynamic ||
  44866. slot.if ||
  44867. slot.for ||
  44868. containsSlotChild(slot) // is passing down slot from parent which may be dynamic
  44869. )
  44870. });
  44871. // #9534: if a component with scoped slots is inside a conditional branch,
  44872. // it's possible for the same component to be reused but with different
  44873. // compiled slot content. To avoid that, we generate a unique key based on
  44874. // the generated code of all the slot contents.
  44875. var needsKey = !!el.if;
  44876. // OR when it is inside another scoped slot or v-for (the reactivity may be
  44877. // disconnected due to the intermediate scope variable)
  44878. // #9438, #9506
  44879. // TODO: this can be further optimized by properly analyzing in-scope bindings
  44880. // and skip force updating ones that do not actually use scope variables.
  44881. if (!needsForceUpdate) {
  44882. var parent = el.parent;
  44883. while (parent) {
  44884. if (
  44885. (parent.slotScope && parent.slotScope !== emptySlotScopeToken) ||
  44886. parent.for
  44887. ) {
  44888. needsForceUpdate = true;
  44889. break
  44890. }
  44891. if (parent.if) {
  44892. needsKey = true;
  44893. }
  44894. parent = parent.parent;
  44895. }
  44896. }
  44897. var generatedSlots = Object.keys(slots)
  44898. .map(function (key) { return genScopedSlot(slots[key], state); })
  44899. .join(',');
  44900. return ("scopedSlots:_u([" + generatedSlots + "]" + (needsForceUpdate ? ",null,true" : "") + (!needsForceUpdate && needsKey ? (",null,false," + (hash(generatedSlots))) : "") + ")")
  44901. }
  44902. function hash(str) {
  44903. var hash = 5381;
  44904. var i = str.length;
  44905. while(i) {
  44906. hash = (hash * 33) ^ str.charCodeAt(--i);
  44907. }
  44908. return hash >>> 0
  44909. }
  44910. function containsSlotChild (el) {
  44911. if (el.type === 1) {
  44912. if (el.tag === 'slot') {
  44913. return true
  44914. }
  44915. return el.children.some(containsSlotChild)
  44916. }
  44917. return false
  44918. }
  44919. function genScopedSlot (
  44920. el,
  44921. state
  44922. ) {
  44923. var isLegacySyntax = el.attrsMap['slot-scope'];
  44924. if (el.if && !el.ifProcessed && !isLegacySyntax) {
  44925. return genIf(el, state, genScopedSlot, "null")
  44926. }
  44927. if (el.for && !el.forProcessed) {
  44928. return genFor(el, state, genScopedSlot)
  44929. }
  44930. var slotScope = el.slotScope === emptySlotScopeToken
  44931. ? ""
  44932. : String(el.slotScope);
  44933. var fn = "function(" + slotScope + "){" +
  44934. "return " + (el.tag === 'template'
  44935. ? el.if && isLegacySyntax
  44936. ? ("(" + (el.if) + ")?" + (genChildren(el, state) || 'undefined') + ":undefined")
  44937. : genChildren(el, state) || 'undefined'
  44938. : genElement(el, state)) + "}";
  44939. // reverse proxy v-slot without scope on this.$slots
  44940. var reverseProxy = slotScope ? "" : ",proxy:true";
  44941. return ("{key:" + (el.slotTarget || "\"default\"") + ",fn:" + fn + reverseProxy + "}")
  44942. }
  44943. function genChildren (
  44944. el,
  44945. state,
  44946. checkSkip,
  44947. altGenElement,
  44948. altGenNode
  44949. ) {
  44950. var children = el.children;
  44951. if (children.length) {
  44952. var el$1 = children[0];
  44953. // optimize single v-for
  44954. if (children.length === 1 &&
  44955. el$1.for &&
  44956. el$1.tag !== 'template' &&
  44957. el$1.tag !== 'slot'
  44958. ) {
  44959. var normalizationType = checkSkip
  44960. ? state.maybeComponent(el$1) ? ",1" : ",0"
  44961. : "";
  44962. return ("" + ((altGenElement || genElement)(el$1, state)) + normalizationType)
  44963. }
  44964. var normalizationType$1 = checkSkip
  44965. ? getNormalizationType(children, state.maybeComponent)
  44966. : 0;
  44967. var gen = altGenNode || genNode;
  44968. return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType$1 ? ("," + normalizationType$1) : ''))
  44969. }
  44970. }
  44971. // determine the normalization needed for the children array.
  44972. // 0: no normalization needed
  44973. // 1: simple normalization needed (possible 1-level deep nested array)
  44974. // 2: full normalization needed
  44975. function getNormalizationType (
  44976. children,
  44977. maybeComponent
  44978. ) {
  44979. var res = 0;
  44980. for (var i = 0; i < children.length; i++) {
  44981. var el = children[i];
  44982. if (el.type !== 1) {
  44983. continue
  44984. }
  44985. if (needsNormalization(el) ||
  44986. (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
  44987. res = 2;
  44988. break
  44989. }
  44990. if (maybeComponent(el) ||
  44991. (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
  44992. res = 1;
  44993. }
  44994. }
  44995. return res
  44996. }
  44997. function needsNormalization (el) {
  44998. return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
  44999. }
  45000. function genNode (node, state) {
  45001. if (node.type === 1) {
  45002. return genElement(node, state)
  45003. } else if (node.type === 3 && node.isComment) {
  45004. return genComment(node)
  45005. } else {
  45006. return genText(node)
  45007. }
  45008. }
  45009. function genText (text) {
  45010. return ("_v(" + (text.type === 2
  45011. ? text.expression // no need for () because already wrapped in _s()
  45012. : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
  45013. }
  45014. function genComment (comment) {
  45015. return ("_e(" + (JSON.stringify(comment.text)) + ")")
  45016. }
  45017. function genSlot (el, state) {
  45018. var slotName = el.slotName || '"default"';
  45019. var children = genChildren(el, state);
  45020. var res = "_t(" + slotName + (children ? (",function(){return " + children + "}") : '');
  45021. var attrs = el.attrs || el.dynamicAttrs
  45022. ? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
  45023. // slot props are camelized
  45024. name: camelize(attr.name),
  45025. value: attr.value,
  45026. dynamic: attr.dynamic
  45027. }); }))
  45028. : null;
  45029. var bind$$1 = el.attrsMap['v-bind'];
  45030. if ((attrs || bind$$1) && !children) {
  45031. res += ",null";
  45032. }
  45033. if (attrs) {
  45034. res += "," + attrs;
  45035. }
  45036. if (bind$$1) {
  45037. res += (attrs ? '' : ',null') + "," + bind$$1;
  45038. }
  45039. return res + ')'
  45040. }
  45041. // componentName is el.component, take it as argument to shun flow's pessimistic refinement
  45042. function genComponent (
  45043. componentName,
  45044. el,
  45045. state
  45046. ) {
  45047. var children = el.inlineTemplate ? null : genChildren(el, state, true);
  45048. return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
  45049. }
  45050. function genProps (props) {
  45051. var staticProps = "";
  45052. var dynamicProps = "";
  45053. for (var i = 0; i < props.length; i++) {
  45054. var prop = props[i];
  45055. var value = transformSpecialNewlines(prop.value);
  45056. if (prop.dynamic) {
  45057. dynamicProps += (prop.name) + "," + value + ",";
  45058. } else {
  45059. staticProps += "\"" + (prop.name) + "\":" + value + ",";
  45060. }
  45061. }
  45062. staticProps = "{" + (staticProps.slice(0, -1)) + "}";
  45063. if (dynamicProps) {
  45064. return ("_d(" + staticProps + ",[" + (dynamicProps.slice(0, -1)) + "])")
  45065. } else {
  45066. return staticProps
  45067. }
  45068. }
  45069. // #3895, #4268
  45070. function transformSpecialNewlines (text) {
  45071. return text
  45072. .replace(/\u2028/g, '\\u2028')
  45073. .replace(/\u2029/g, '\\u2029')
  45074. }
  45075. /* */
  45076. // these keywords should not appear inside expressions, but operators like
  45077. // typeof, instanceof and in are allowed
  45078. var prohibitedKeywordRE = new RegExp('\\b' + (
  45079. 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
  45080. 'super,throw,while,yield,delete,export,import,return,switch,default,' +
  45081. 'extends,finally,continue,debugger,function,arguments'
  45082. ).split(',').join('\\b|\\b') + '\\b');
  45083. // these unary operators should not be used as property/method names
  45084. var unaryOperatorsRE = new RegExp('\\b' + (
  45085. 'delete,typeof,void'
  45086. ).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
  45087. // strip strings in expressions
  45088. var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
  45089. // detect problematic expressions in a template
  45090. function detectErrors (ast, warn) {
  45091. if (ast) {
  45092. checkNode(ast, warn);
  45093. }
  45094. }
  45095. function checkNode (node, warn) {
  45096. if (node.type === 1) {
  45097. for (var name in node.attrsMap) {
  45098. if (dirRE.test(name)) {
  45099. var value = node.attrsMap[name];
  45100. if (value) {
  45101. var range = node.rawAttrsMap[name];
  45102. if (name === 'v-for') {
  45103. checkFor(node, ("v-for=\"" + value + "\""), warn, range);
  45104. } else if (name === 'v-slot' || name[0] === '#') {
  45105. checkFunctionParameterExpression(value, (name + "=\"" + value + "\""), warn, range);
  45106. } else if (onRE.test(name)) {
  45107. checkEvent(value, (name + "=\"" + value + "\""), warn, range);
  45108. } else {
  45109. checkExpression(value, (name + "=\"" + value + "\""), warn, range);
  45110. }
  45111. }
  45112. }
  45113. }
  45114. if (node.children) {
  45115. for (var i = 0; i < node.children.length; i++) {
  45116. checkNode(node.children[i], warn);
  45117. }
  45118. }
  45119. } else if (node.type === 2) {
  45120. checkExpression(node.expression, node.text, warn, node);
  45121. }
  45122. }
  45123. function checkEvent (exp, text, warn, range) {
  45124. var stripped = exp.replace(stripStringRE, '');
  45125. var keywordMatch = stripped.match(unaryOperatorsRE);
  45126. if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
  45127. warn(
  45128. "avoid using JavaScript unary operator as property name: " +
  45129. "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim()),
  45130. range
  45131. );
  45132. }
  45133. checkExpression(exp, text, warn, range);
  45134. }
  45135. function checkFor (node, text, warn, range) {
  45136. checkExpression(node.for || '', text, warn, range);
  45137. checkIdentifier(node.alias, 'v-for alias', text, warn, range);
  45138. checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);
  45139. checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);
  45140. }
  45141. function checkIdentifier (
  45142. ident,
  45143. type,
  45144. text,
  45145. warn,
  45146. range
  45147. ) {
  45148. if (typeof ident === 'string') {
  45149. try {
  45150. new Function(("var " + ident + "=_"));
  45151. } catch (e) {
  45152. warn(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())), range);
  45153. }
  45154. }
  45155. }
  45156. function checkExpression (exp, text, warn, range) {
  45157. try {
  45158. new Function(("return " + exp));
  45159. } catch (e) {
  45160. var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
  45161. if (keywordMatch) {
  45162. warn(
  45163. "avoid using JavaScript keyword as property name: " +
  45164. "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim()),
  45165. range
  45166. );
  45167. } else {
  45168. warn(
  45169. "invalid expression: " + (e.message) + " in\n\n" +
  45170. " " + exp + "\n\n" +
  45171. " Raw expression: " + (text.trim()) + "\n",
  45172. range
  45173. );
  45174. }
  45175. }
  45176. }
  45177. function checkFunctionParameterExpression (exp, text, warn, range) {
  45178. try {
  45179. new Function(exp, '');
  45180. } catch (e) {
  45181. warn(
  45182. "invalid function parameter expression: " + (e.message) + " in\n\n" +
  45183. " " + exp + "\n\n" +
  45184. " Raw expression: " + (text.trim()) + "\n",
  45185. range
  45186. );
  45187. }
  45188. }
  45189. /* */
  45190. var range = 2;
  45191. function generateCodeFrame (
  45192. source,
  45193. start,
  45194. end
  45195. ) {
  45196. if ( start === void 0 ) start = 0;
  45197. if ( end === void 0 ) end = source.length;
  45198. var lines = source.split(/\r?\n/);
  45199. var count = 0;
  45200. var res = [];
  45201. for (var i = 0; i < lines.length; i++) {
  45202. count += lines[i].length + 1;
  45203. if (count >= start) {
  45204. for (var j = i - range; j <= i + range || end > count; j++) {
  45205. if (j < 0 || j >= lines.length) { continue }
  45206. res.push(("" + (j + 1) + (repeat$1(" ", 3 - String(j + 1).length)) + "| " + (lines[j])));
  45207. var lineLength = lines[j].length;
  45208. if (j === i) {
  45209. // push underline
  45210. var pad = start - (count - lineLength) + 1;
  45211. var length = end > count ? lineLength - pad : end - start;
  45212. res.push(" | " + repeat$1(" ", pad) + repeat$1("^", length));
  45213. } else if (j > i) {
  45214. if (end > count) {
  45215. var length$1 = Math.min(end - count, lineLength);
  45216. res.push(" | " + repeat$1("^", length$1));
  45217. }
  45218. count += lineLength + 1;
  45219. }
  45220. }
  45221. break
  45222. }
  45223. }
  45224. return res.join('\n')
  45225. }
  45226. function repeat$1 (str, n) {
  45227. var result = '';
  45228. if (n > 0) {
  45229. while (true) { // eslint-disable-line
  45230. if (n & 1) { result += str; }
  45231. n >>>= 1;
  45232. if (n <= 0) { break }
  45233. str += str;
  45234. }
  45235. }
  45236. return result
  45237. }
  45238. /* */
  45239. function createFunction (code, errors) {
  45240. try {
  45241. return new Function(code)
  45242. } catch (err) {
  45243. errors.push({ err: err, code: code });
  45244. return noop
  45245. }
  45246. }
  45247. function createCompileToFunctionFn (compile) {
  45248. var cache = Object.create(null);
  45249. return function compileToFunctions (
  45250. template,
  45251. options,
  45252. vm
  45253. ) {
  45254. options = extend({}, options);
  45255. var warn$$1 = options.warn || warn;
  45256. delete options.warn;
  45257. /* istanbul ignore if */
  45258. {
  45259. // detect possible CSP restriction
  45260. try {
  45261. new Function('return 1');
  45262. } catch (e) {
  45263. if (e.toString().match(/unsafe-eval|CSP/)) {
  45264. warn$$1(
  45265. 'It seems you are using the standalone build of Vue.js in an ' +
  45266. 'environment with Content Security Policy that prohibits unsafe-eval. ' +
  45267. 'The template compiler cannot work in this environment. Consider ' +
  45268. 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
  45269. 'templates into render functions.'
  45270. );
  45271. }
  45272. }
  45273. }
  45274. // check cache
  45275. var key = options.delimiters
  45276. ? String(options.delimiters) + template
  45277. : template;
  45278. if (cache[key]) {
  45279. return cache[key]
  45280. }
  45281. // compile
  45282. var compiled = compile(template, options);
  45283. // check compilation errors/tips
  45284. {
  45285. if (compiled.errors && compiled.errors.length) {
  45286. if (options.outputSourceRange) {
  45287. compiled.errors.forEach(function (e) {
  45288. warn$$1(
  45289. "Error compiling template:\n\n" + (e.msg) + "\n\n" +
  45290. generateCodeFrame(template, e.start, e.end),
  45291. vm
  45292. );
  45293. });
  45294. } else {
  45295. warn$$1(
  45296. "Error compiling template:\n\n" + template + "\n\n" +
  45297. compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
  45298. vm
  45299. );
  45300. }
  45301. }
  45302. if (compiled.tips && compiled.tips.length) {
  45303. if (options.outputSourceRange) {
  45304. compiled.tips.forEach(function (e) { return tip(e.msg, vm); });
  45305. } else {
  45306. compiled.tips.forEach(function (msg) { return tip(msg, vm); });
  45307. }
  45308. }
  45309. }
  45310. // turn code into functions
  45311. var res = {};
  45312. var fnGenErrors = [];
  45313. res.render = createFunction(compiled.render, fnGenErrors);
  45314. res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
  45315. return createFunction(code, fnGenErrors)
  45316. });
  45317. // check function generation errors.
  45318. // this should only happen if there is a bug in the compiler itself.
  45319. // mostly for codegen development use
  45320. /* istanbul ignore if */
  45321. {
  45322. if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
  45323. warn$$1(
  45324. "Failed to generate render function:\n\n" +
  45325. fnGenErrors.map(function (ref) {
  45326. var err = ref.err;
  45327. var code = ref.code;
  45328. return ((err.toString()) + " in\n\n" + code + "\n");
  45329. }).join('\n'),
  45330. vm
  45331. );
  45332. }
  45333. }
  45334. return (cache[key] = res)
  45335. }
  45336. }
  45337. /* */
  45338. function createCompilerCreator (baseCompile) {
  45339. return function createCompiler (baseOptions) {
  45340. function compile (
  45341. template,
  45342. options
  45343. ) {
  45344. var finalOptions = Object.create(baseOptions);
  45345. var errors = [];
  45346. var tips = [];
  45347. var warn = function (msg, range, tip) {
  45348. (tip ? tips : errors).push(msg);
  45349. };
  45350. if (options) {
  45351. if (options.outputSourceRange) {
  45352. // $flow-disable-line
  45353. var leadingSpaceLength = template.match(/^\s*/)[0].length;
  45354. warn = function (msg, range, tip) {
  45355. var data = { msg: msg };
  45356. if (range) {
  45357. if (range.start != null) {
  45358. data.start = range.start + leadingSpaceLength;
  45359. }
  45360. if (range.end != null) {
  45361. data.end = range.end + leadingSpaceLength;
  45362. }
  45363. }
  45364. (tip ? tips : errors).push(data);
  45365. };
  45366. }
  45367. // merge custom modules
  45368. if (options.modules) {
  45369. finalOptions.modules =
  45370. (baseOptions.modules || []).concat(options.modules);
  45371. }
  45372. // merge custom directives
  45373. if (options.directives) {
  45374. finalOptions.directives = extend(
  45375. Object.create(baseOptions.directives || null),
  45376. options.directives
  45377. );
  45378. }
  45379. // copy other options
  45380. for (var key in options) {
  45381. if (key !== 'modules' && key !== 'directives') {
  45382. finalOptions[key] = options[key];
  45383. }
  45384. }
  45385. }
  45386. finalOptions.warn = warn;
  45387. var compiled = baseCompile(template.trim(), finalOptions);
  45388. {
  45389. detectErrors(compiled.ast, warn);
  45390. }
  45391. compiled.errors = errors;
  45392. compiled.tips = tips;
  45393. return compiled
  45394. }
  45395. return {
  45396. compile: compile,
  45397. compileToFunctions: createCompileToFunctionFn(compile)
  45398. }
  45399. }
  45400. }
  45401. /* */
  45402. // `createCompilerCreator` allows creating compilers that use alternative
  45403. // parser/optimizer/codegen, e.g the SSR optimizing compiler.
  45404. // Here we just export a default compiler using the default parts.
  45405. var createCompiler = createCompilerCreator(function baseCompile (
  45406. template,
  45407. options
  45408. ) {
  45409. var ast = parse(template.trim(), options);
  45410. if (options.optimize !== false) {
  45411. optimize(ast, options);
  45412. }
  45413. var code = generate(ast, options);
  45414. return {
  45415. ast: ast,
  45416. render: code.render,
  45417. staticRenderFns: code.staticRenderFns
  45418. }
  45419. });
  45420. /* */
  45421. var ref$1 = createCompiler(baseOptions);
  45422. var compile = ref$1.compile;
  45423. var compileToFunctions = ref$1.compileToFunctions;
  45424. /* */
  45425. // check whether current browser encodes a char inside attribute values
  45426. var div;
  45427. function getShouldDecode (href) {
  45428. div = div || document.createElement('div');
  45429. div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>";
  45430. return div.innerHTML.indexOf('&#10;') > 0
  45431. }
  45432. // #3663: IE encodes newlines inside attribute values while other browsers don't
  45433. var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;
  45434. // #6828: chrome encodes content in a[href]
  45435. var shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false;
  45436. /* */
  45437. var idToTemplate = cached(function (id) {
  45438. var el = query(id);
  45439. return el && el.innerHTML
  45440. });
  45441. var mount = Vue.prototype.$mount;
  45442. Vue.prototype.$mount = function (
  45443. el,
  45444. hydrating
  45445. ) {
  45446. el = el && query(el);
  45447. /* istanbul ignore if */
  45448. if (el === document.body || el === document.documentElement) {
  45449. warn(
  45450. "Do not mount Vue to <html> or <body> - mount to normal elements instead."
  45451. );
  45452. return this
  45453. }
  45454. var options = this.$options;
  45455. // resolve template/el and convert to render function
  45456. if (!options.render) {
  45457. var template = options.template;
  45458. if (template) {
  45459. if (typeof template === 'string') {
  45460. if (template.charAt(0) === '#') {
  45461. template = idToTemplate(template);
  45462. /* istanbul ignore if */
  45463. if (!template) {
  45464. warn(
  45465. ("Template element not found or is empty: " + (options.template)),
  45466. this
  45467. );
  45468. }
  45469. }
  45470. } else if (template.nodeType) {
  45471. template = template.innerHTML;
  45472. } else {
  45473. {
  45474. warn('invalid template option:' + template, this);
  45475. }
  45476. return this
  45477. }
  45478. } else if (el) {
  45479. template = getOuterHTML(el);
  45480. }
  45481. if (template) {
  45482. /* istanbul ignore if */
  45483. if (config.performance && mark) {
  45484. mark('compile');
  45485. }
  45486. var ref = compileToFunctions(template, {
  45487. outputSourceRange: "development" !== 'production',
  45488. shouldDecodeNewlines: shouldDecodeNewlines,
  45489. shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,
  45490. delimiters: options.delimiters,
  45491. comments: options.comments
  45492. }, this);
  45493. var render = ref.render;
  45494. var staticRenderFns = ref.staticRenderFns;
  45495. options.render = render;
  45496. options.staticRenderFns = staticRenderFns;
  45497. /* istanbul ignore if */
  45498. if (config.performance && mark) {
  45499. mark('compile end');
  45500. measure(("vue " + (this._name) + " compile"), 'compile', 'compile end');
  45501. }
  45502. }
  45503. }
  45504. return mount.call(this, el, hydrating)
  45505. };
  45506. /**
  45507. * Get outerHTML of elements, taking care
  45508. * of SVG elements in IE as well.
  45509. */
  45510. function getOuterHTML (el) {
  45511. if (el.outerHTML) {
  45512. return el.outerHTML
  45513. } else {
  45514. var container = document.createElement('div');
  45515. container.appendChild(el.cloneNode(true));
  45516. return container.innerHTML
  45517. }
  45518. }
  45519. Vue.compile = compileToFunctions;
  45520. module.exports = Vue;
  45521. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(31).setImmediate))
  45522. /***/ }),
  45523. /* 68 */
  45524. /***/ (function(module, exports, __webpack_require__) {
  45525. /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
  45526. "use strict";
  45527. if (global.setImmediate) {
  45528. return;
  45529. }
  45530. var nextHandle = 1; // Spec says greater than zero
  45531. var tasksByHandle = {};
  45532. var currentlyRunningATask = false;
  45533. var doc = global.document;
  45534. var registerImmediate;
  45535. function setImmediate(callback) {
  45536. // Callback can either be a function or a string
  45537. if (typeof callback !== "function") {
  45538. callback = new Function("" + callback);
  45539. }
  45540. // Copy function arguments
  45541. var args = new Array(arguments.length - 1);
  45542. for (var i = 0; i < args.length; i++) {
  45543. args[i] = arguments[i + 1];
  45544. }
  45545. // Store and register the task
  45546. var task = { callback: callback, args: args };
  45547. tasksByHandle[nextHandle] = task;
  45548. registerImmediate(nextHandle);
  45549. return nextHandle++;
  45550. }
  45551. function clearImmediate(handle) {
  45552. delete tasksByHandle[handle];
  45553. }
  45554. function run(task) {
  45555. var callback = task.callback;
  45556. var args = task.args;
  45557. switch (args.length) {
  45558. case 0:
  45559. callback();
  45560. break;
  45561. case 1:
  45562. callback(args[0]);
  45563. break;
  45564. case 2:
  45565. callback(args[0], args[1]);
  45566. break;
  45567. case 3:
  45568. callback(args[0], args[1], args[2]);
  45569. break;
  45570. default:
  45571. callback.apply(undefined, args);
  45572. break;
  45573. }
  45574. }
  45575. function runIfPresent(handle) {
  45576. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  45577. // So if we're currently running a task, we'll need to delay this invocation.
  45578. if (currentlyRunningATask) {
  45579. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  45580. // "too much recursion" error.
  45581. setTimeout(runIfPresent, 0, handle);
  45582. } else {
  45583. var task = tasksByHandle[handle];
  45584. if (task) {
  45585. currentlyRunningATask = true;
  45586. try {
  45587. run(task);
  45588. } finally {
  45589. clearImmediate(handle);
  45590. currentlyRunningATask = false;
  45591. }
  45592. }
  45593. }
  45594. }
  45595. function installNextTickImplementation() {
  45596. registerImmediate = function(handle) {
  45597. process.nextTick(function () { runIfPresent(handle); });
  45598. };
  45599. }
  45600. function canUsePostMessage() {
  45601. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  45602. // where `global.postMessage` means something completely different and can't be used for this purpose.
  45603. if (global.postMessage && !global.importScripts) {
  45604. var postMessageIsAsynchronous = true;
  45605. var oldOnMessage = global.onmessage;
  45606. global.onmessage = function() {
  45607. postMessageIsAsynchronous = false;
  45608. };
  45609. global.postMessage("", "*");
  45610. global.onmessage = oldOnMessage;
  45611. return postMessageIsAsynchronous;
  45612. }
  45613. }
  45614. function installPostMessageImplementation() {
  45615. // Installs an event handler on `global` for the `message` event: see
  45616. // * https://developer.mozilla.org/en/DOM/window.postMessage
  45617. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  45618. var messagePrefix = "setImmediate$" + Math.random() + "$";
  45619. var onGlobalMessage = function(event) {
  45620. if (event.source === global &&
  45621. typeof event.data === "string" &&
  45622. event.data.indexOf(messagePrefix) === 0) {
  45623. runIfPresent(+event.data.slice(messagePrefix.length));
  45624. }
  45625. };
  45626. if (global.addEventListener) {
  45627. global.addEventListener("message", onGlobalMessage, false);
  45628. } else {
  45629. global.attachEvent("onmessage", onGlobalMessage);
  45630. }
  45631. registerImmediate = function(handle) {
  45632. global.postMessage(messagePrefix + handle, "*");
  45633. };
  45634. }
  45635. function installMessageChannelImplementation() {
  45636. var channel = new MessageChannel();
  45637. channel.port1.onmessage = function(event) {
  45638. var handle = event.data;
  45639. runIfPresent(handle);
  45640. };
  45641. registerImmediate = function(handle) {
  45642. channel.port2.postMessage(handle);
  45643. };
  45644. }
  45645. function installReadyStateChangeImplementation() {
  45646. var html = doc.documentElement;
  45647. registerImmediate = function(handle) {
  45648. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  45649. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  45650. var script = doc.createElement("script");
  45651. script.onreadystatechange = function () {
  45652. runIfPresent(handle);
  45653. script.onreadystatechange = null;
  45654. html.removeChild(script);
  45655. script = null;
  45656. };
  45657. html.appendChild(script);
  45658. };
  45659. }
  45660. function installSetTimeoutImplementation() {
  45661. registerImmediate = function(handle) {
  45662. setTimeout(runIfPresent, 0, handle);
  45663. };
  45664. }
  45665. // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  45666. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  45667. attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
  45668. // Don't get fooled by e.g. browserify environments.
  45669. if ({}.toString.call(global.process) === "[object process]") {
  45670. // For Node.js before 0.9
  45671. installNextTickImplementation();
  45672. } else if (canUsePostMessage()) {
  45673. // For non-IE10 modern browsers
  45674. installPostMessageImplementation();
  45675. } else if (global.MessageChannel) {
  45676. // For web workers, where supported
  45677. installMessageChannelImplementation();
  45678. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  45679. // For IE 6–8
  45680. installReadyStateChangeImplementation();
  45681. } else {
  45682. // For older browsers
  45683. installSetTimeoutImplementation();
  45684. }
  45685. attachTo.setImmediate = setImmediate;
  45686. attachTo.clearImmediate = clearImmediate;
  45687. }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
  45688. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(52)))
  45689. /***/ }),
  45690. /* 69 */
  45691. /***/ (function(module, exports, __webpack_require__) {
  45692. var disposed = false
  45693. function injectStyle (ssrContext) {
  45694. if (disposed) return
  45695. __webpack_require__(70)
  45696. __webpack_require__(73)
  45697. }
  45698. var normalizeComponent = __webpack_require__(2)
  45699. /* script */
  45700. var __vue_script__ = __webpack_require__(75)
  45701. /* template */
  45702. var __vue_template__ = __webpack_require__(135)
  45703. /* template functional */
  45704. var __vue_template_functional__ = false
  45705. /* styles */
  45706. var __vue_styles__ = injectStyle
  45707. /* scopeId */
  45708. var __vue_scopeId__ = "data-v-0fbb5d46"
  45709. /* moduleIdentifier (server only) */
  45710. var __vue_module_identifier__ = null
  45711. var Component = normalizeComponent(
  45712. __vue_script__,
  45713. __vue_template__,
  45714. __vue_template_functional__,
  45715. __vue_styles__,
  45716. __vue_scopeId__,
  45717. __vue_module_identifier__
  45718. )
  45719. Component.options.__file = "resources/assets/js/main/App.vue"
  45720. /* hot reload */
  45721. if (false) {(function () {
  45722. var hotAPI = require("vue-hot-reload-api")
  45723. hotAPI.install(require("vue"), false)
  45724. if (!hotAPI.compatible) return
  45725. module.hot.accept()
  45726. if (!module.hot.data) {
  45727. hotAPI.createRecord("data-v-0fbb5d46", Component.options)
  45728. } else {
  45729. hotAPI.reload("data-v-0fbb5d46", Component.options)
  45730. }
  45731. module.hot.dispose(function (data) {
  45732. disposed = true
  45733. })
  45734. })()}
  45735. module.exports = Component.exports
  45736. /***/ }),
  45737. /* 70 */
  45738. /***/ (function(module, exports, __webpack_require__) {
  45739. // style-loader: Adds some css to the DOM by adding a <style> tag
  45740. // load the styles
  45741. var content = __webpack_require__(71);
  45742. if(typeof content === 'string') content = [[module.i, content, '']];
  45743. if(content.locals) module.exports = content.locals;
  45744. // add the styles to the DOM
  45745. var update = __webpack_require__(1)("29742c7e", content, false, {});
  45746. // Hot Module Replacement
  45747. if(false) {
  45748. // When the styles change, update the <style> tags
  45749. if(!content.locals) {
  45750. module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0fbb5d46\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./App.vue", function() {
  45751. var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0fbb5d46\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./App.vue");
  45752. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  45753. update(newContent);
  45754. });
  45755. }
  45756. // When the module is disposed, remove the <style> tags
  45757. module.hot.dispose(function() { update(); });
  45758. }
  45759. /***/ }),
  45760. /* 71 */
  45761. /***/ (function(module, exports, __webpack_require__) {
  45762. exports = module.exports = __webpack_require__(0)(false);
  45763. // imports
  45764. // module
  45765. exports.push([module.i, "\nbody { overflow-x: hidden;\n}\n", ""]);
  45766. // exports
  45767. /***/ }),
  45768. /* 72 */
  45769. /***/ (function(module, exports) {
  45770. /**
  45771. * Translates the list format produced by css-loader into something
  45772. * easier to manipulate.
  45773. */
  45774. module.exports = function listToStyles (parentId, list) {
  45775. var styles = []
  45776. var newStyles = {}
  45777. for (var i = 0; i < list.length; i++) {
  45778. var item = list[i]
  45779. var id = item[0]
  45780. var css = item[1]
  45781. var media = item[2]
  45782. var sourceMap = item[3]
  45783. var part = {
  45784. id: parentId + ':' + i,
  45785. css: css,
  45786. media: media,
  45787. sourceMap: sourceMap
  45788. }
  45789. if (!newStyles[id]) {
  45790. styles.push(newStyles[id] = { id: id, parts: [part] })
  45791. } else {
  45792. newStyles[id].parts.push(part)
  45793. }
  45794. }
  45795. return styles
  45796. }
  45797. /***/ }),
  45798. /* 73 */
  45799. /***/ (function(module, exports, __webpack_require__) {
  45800. // style-loader: Adds some css to the DOM by adding a <style> tag
  45801. // load the styles
  45802. var content = __webpack_require__(74);
  45803. if(typeof content === 'string') content = [[module.i, content, '']];
  45804. if(content.locals) module.exports = content.locals;
  45805. // add the styles to the DOM
  45806. var update = __webpack_require__(1)("4c209231", content, false, {});
  45807. // Hot Module Replacement
  45808. if(false) {
  45809. // When the styles change, update the <style> tags
  45810. if(!content.locals) {
  45811. module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0fbb5d46\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./App.vue", function() {
  45812. var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0fbb5d46\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./App.vue");
  45813. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  45814. update(newContent);
  45815. });
  45816. }
  45817. // When the module is disposed, remove the <style> tags
  45818. module.hot.dispose(function() { update(); });
  45819. }
  45820. /***/ }),
  45821. /* 74 */
  45822. /***/ (function(module, exports, __webpack_require__) {
  45823. exports = module.exports = __webpack_require__(0)(false);
  45824. // imports
  45825. // module
  45826. exports.push([module.i, "\n.child-view[data-v-0fbb5d46] {\n position: absolute;\n width: 100%;\n min-height: 100%;\n background-color: #f1f2f7;\n -webkit-transition: all .3s cubic-bezier(.55, 0, .1, 1);\n transition: all .3s cubic-bezier(.55, 0, .1, 1);\n}\n.app-slide-no-leave-to[data-v-0fbb5d46] {display: none;\n}\n/**\n * 左右模式\n */\n.app-slide-left-leave-active[data-v-0fbb5d46]{z-index:1;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n.app-slide-left-leave-to[data-v-0fbb5d46]{z-index:1;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n.app-slide-left-enter-active[data-v-0fbb5d46]{opacity:0;z-index:2;-webkit-transform:translate(30%,0);transform:translate(30%,0)\n}\n.app-slide-left-enter-to[data-v-0fbb5d46]{opacity:1;z-index:2;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n.app-slide-right-leave-active[data-v-0fbb5d46]{opacity:1;z-index:2;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n.app-slide-right-leave-to[data-v-0fbb5d46]{opacity:0;z-index:2;-webkit-transform:translate(30%,0);transform:translate(30%,0)\n}\n.app-slide-right-enter-active[data-v-0fbb5d46]{z-index:1;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n.app-slide-right-enter[data-v-0fbb5d46]{z-index:1;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n\n/**\n * 上下模式\n */\n.app-slide-up-leave-active[data-v-0fbb5d46]{z-index:1;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n.app-slide-up-leave-to[data-v-0fbb5d46]{z-index:1;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n.app-slide-up-enter-active[data-v-0fbb5d46]{opacity:0;z-index:2;-webkit-transform:translate(0,20%);transform:translate(0,20%)\n}\n.app-slide-up-enter-to[data-v-0fbb5d46]{opacity:1;z-index:2;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n.app-slide-down-leave-active[data-v-0fbb5d46]{opacity:1;z-index:2;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n.app-slide-down-leave-to[data-v-0fbb5d46]{opacity:0;z-index:2;-webkit-transform:translate(0,20%);transform:translate(0,20%)\n}\n.app-slide-down-enter-active[data-v-0fbb5d46]{z-index:1;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n.app-slide-down-enter[data-v-0fbb5d46]{z-index:1;-webkit-transform:translate(0,0);transform:translate(0,0)\n}\n", ""]);
  45827. // exports
  45828. /***/ }),
  45829. /* 75 */
  45830. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  45831. "use strict";
  45832. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  45833. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_WSpinner__ = __webpack_require__(76);
  45834. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_WSpinner___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__components_WSpinner__);
  45835. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_WHeader__ = __webpack_require__(81);
  45836. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_WHeader___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__components_WHeader__);
  45837. //
  45838. //
  45839. //
  45840. //
  45841. //
  45842. //
  45843. //
  45844. //
  45845. //
  45846. //
  45847. //
  45848. //
  45849. /* harmony default export */ __webpack_exports__["default"] = ({
  45850. components: { WHeader: __WEBPACK_IMPORTED_MODULE_1__components_WHeader___default.a, WSpinner: __WEBPACK_IMPORTED_MODULE_0__components_WSpinner___default.a },
  45851. data: function data() {
  45852. return {
  45853. transitionName: null
  45854. };
  45855. },
  45856. mounted: function mounted() {
  45857. var _this = this;
  45858. this.checkToken();
  45859. //
  45860. var hash = window.location.hash;
  45861. if (hash.indexOf("#") === 0) {
  45862. hash = hash.substr(1);
  45863. if (hash) {
  45864. this.$nextTick(function () {
  45865. hash = $A.removeURLParameter(hash, 'token');
  45866. _this.goForward({ path: hash });
  45867. });
  45868. }
  45869. }
  45870. this.sessionStorage('/', 1);
  45871. var pathname = window.location.pathname;
  45872. if (pathname && this.sessionStorage(pathname) === 0) {
  45873. this.sessionStorage(pathname, this.sessionStorage('::count') + 1);
  45874. }
  45875. //
  45876. setInterval(function () {
  45877. _this.searchEnter();
  45878. }, 1000);
  45879. //
  45880. this.handleWebSocket();
  45881. $A.setOnUserInfoListener("app", function () {
  45882. _this.handleWebSocket();
  45883. });
  45884. },
  45885. watch: {
  45886. '$route': function $route(To, From) {
  45887. if (this.transitionName === null) {
  45888. this.transitionName = 'app-slide-no';
  45889. return;
  45890. }
  45891. if (typeof To.name === 'undefined' || typeof From.name === 'undefined') {
  45892. return;
  45893. }
  45894. this.slideType(To, From);
  45895. }
  45896. },
  45897. methods: {
  45898. checkToken: function checkToken() {
  45899. var _this2 = this;
  45900. var token = $A.urlParameter("token");
  45901. if ($A.count(token) > 10) {
  45902. $.setToken(decodeURIComponent(token));
  45903. $A.getUserInfo(true);
  45904. var path = $A.removeURLParameter(window.location.href, 'token');
  45905. var uri = document.createElement('a');
  45906. uri.href = path;
  45907. if (uri.pathname) {
  45908. var query = $A.urlParameterAll();
  45909. if (typeof query['token'] !== "undefined") delete query['token'];
  45910. this.$nextTick(function () {
  45911. _this2.goForward({ path: uri.pathname, query: query }, true);
  45912. });
  45913. }
  45914. }
  45915. },
  45916. slideType: function slideType(To, From) {
  45917. var isBack = this.$router.isBack;
  45918. this.$router.isBack = false;
  45919. //
  45920. var ToIndex = this.sessionStorage(To.path);
  45921. var FromIndex = this.sessionStorage(From.path);
  45922. if (ToIndex && ToIndex < FromIndex) {
  45923. isBack = true; //后退
  45924. this.sessionStorage(true, ToIndex);
  45925. } else {
  45926. isBack = false; //前进
  45927. this.sessionStorage(To.path, this.sessionStorage('::count') + 1);
  45928. }
  45929. //
  45930. if (To.meta.slide === false || From.meta.slide === false) {
  45931. //取消动画
  45932. this.transitionName = 'app-slide-no';
  45933. } else if (To.meta.slide === 'up' || From.meta.slide === 'up' || To.meta.slide === 'down' || From.meta.slide === 'down') {
  45934. //上下动画
  45935. if (isBack) {
  45936. this.transitionName = 'app-slide-down';
  45937. } else {
  45938. this.transitionName = 'app-slide-up';
  45939. }
  45940. } else {
  45941. //左右动画(默认)
  45942. if (isBack) {
  45943. this.transitionName = 'app-slide-right';
  45944. } else {
  45945. this.transitionName = 'app-slide-left';
  45946. }
  45947. }
  45948. },
  45949. sessionStorage: function sessionStorage(path, num) {
  45950. var conut = 0;
  45951. var history = JSON.parse(window.sessionStorage['__history__'] || '{}');
  45952. if (path === true) {
  45953. var items = {};
  45954. for (var i in history) {
  45955. if (history.hasOwnProperty(i)) {
  45956. if (parseInt(history[i]) <= num) {
  45957. items[i] = history[i];
  45958. conut++;
  45959. }
  45960. }
  45961. }
  45962. history = items;
  45963. history['::count'] = Math.max(num, conut);
  45964. window.sessionStorage['__history__'] = JSON.stringify(history);
  45965. return history;
  45966. }
  45967. if (typeof num === 'undefined') {
  45968. return parseInt(history[path] || 0);
  45969. }
  45970. if (path === "/") num = 1;
  45971. history[path] = num;
  45972. for (var key in history) {
  45973. if (history.hasOwnProperty(key) && key !== '::count') {
  45974. conut++;
  45975. }
  45976. }
  45977. history['::count'] = Math.max(num, conut);
  45978. window.sessionStorage['__history__'] = JSON.stringify(history);
  45979. },
  45980. searchEnter: function searchEnter() {
  45981. var row = $A(".sreachBox");
  45982. if (row.length === 0) {
  45983. return;
  45984. }
  45985. if (row.attr("data-enter-init") === "init") {
  45986. return;
  45987. }
  45988. row.attr("data-enter-init", "init");
  45989. //
  45990. var buttons = row.find("button[type='button']");
  45991. var button = null;
  45992. if (buttons.length === 0) {
  45993. return;
  45994. }
  45995. buttons.each(function (index, item) {
  45996. if ($A(item).text().indexOf("搜索")) {
  45997. button = $A(item);
  45998. }
  45999. });
  46000. if (button === null) {
  46001. return;
  46002. }
  46003. row.find("input.ivu-input").keydown(function (e) {
  46004. if (e.keyCode == 13) {
  46005. if (!button.hasClass("ivu-btn-loading")) {
  46006. button.click();
  46007. }
  46008. }
  46009. });
  46010. },
  46011. handleWebSocket: function handleWebSocket() {
  46012. var _this3 = this;
  46013. if ($A.getToken() === false) {
  46014. $A.WSOB.close();
  46015. } else {
  46016. $A.WSOB.setOnMsgListener("app", function (msgDetail) {
  46017. if (msgDetail.username == _this3.usrName) {
  46018. return;
  46019. }
  46020. switch (msgDetail.messageType) {
  46021. case 'open':
  46022. window.localStorage.setItem("__::WookTeam:config", $A.jsonStringify(Object.assign(msgDetail.config, {
  46023. nickname: $A.getNickName(false)
  46024. })));
  46025. break;
  46026. case 'close':
  46027. window.localStorage.setItem("__::WookTeam:config", $A.jsonStringify({}));
  46028. break;
  46029. case 'info':
  46030. if (msgDetail.body.type == 'update') {
  46031. $A.getUserInfo(true);
  46032. }
  46033. break;
  46034. case 'user':
  46035. if (msgDetail.body.type == 'taskA') {
  46036. $A.triggerTaskInfoListener(msgDetail.body.act, msgDetail.body.taskDetail, false);
  46037. }
  46038. break;
  46039. case 'kick':
  46040. $A.token("");
  46041. $A.storage("userInfo", {});
  46042. $A.triggerUserInfoListener({});
  46043. //
  46044. var id = 'inip_' + Math.round(Math.random() * 10000);
  46045. var ip = msgDetail.body.ip;
  46046. var ip2 = ip.substring(0, ip.lastIndexOf('.')) + '.*';
  46047. _this3.$Modal.warning({
  46048. title: _this3.$L("系统提示"),
  46049. content: _this3.$L('您的帐号在其他地方(%)登录,您被迫退出,如果这不是您本人的操作,请注意帐号安全!', '<span id="' + id + '">' + ip2 + '</span>'),
  46050. onOk: function onOk() {
  46051. _this3.goForward({ path: '/' }, true);
  46052. }
  46053. });
  46054. _this3.$nextTick(function () {
  46055. $A.getIpInfo(ip, function (res) {
  46056. if (res.ret === 1) {
  46057. $A("span#" + id).text(res.data.textSmall);
  46058. $A("span#" + id).attr("title", ip2);
  46059. }
  46060. });
  46061. });
  46062. break;
  46063. }
  46064. });
  46065. }
  46066. }
  46067. }
  46068. });
  46069. /***/ }),
  46070. /* 76 */
  46071. /***/ (function(module, exports, __webpack_require__) {
  46072. var disposed = false
  46073. function injectStyle (ssrContext) {
  46074. if (disposed) return
  46075. __webpack_require__(77)
  46076. }
  46077. var normalizeComponent = __webpack_require__(2)
  46078. /* script */
  46079. var __vue_script__ = __webpack_require__(79)
  46080. /* template */
  46081. var __vue_template__ = __webpack_require__(80)
  46082. /* template functional */
  46083. var __vue_template_functional__ = false
  46084. /* styles */
  46085. var __vue_styles__ = injectStyle
  46086. /* scopeId */
  46087. var __vue_scopeId__ = "data-v-1f542a12"
  46088. /* moduleIdentifier (server only) */
  46089. var __vue_module_identifier__ = null
  46090. var Component = normalizeComponent(
  46091. __vue_script__,
  46092. __vue_template__,
  46093. __vue_template_functional__,
  46094. __vue_styles__,
  46095. __vue_scopeId__,
  46096. __vue_module_identifier__
  46097. )
  46098. Component.options.__file = "resources/assets/js/main/components/WSpinner.vue"
  46099. /* hot reload */
  46100. if (false) {(function () {
  46101. var hotAPI = require("vue-hot-reload-api")
  46102. hotAPI.install(require("vue"), false)
  46103. if (!hotAPI.compatible) return
  46104. module.hot.accept()
  46105. if (!module.hot.data) {
  46106. hotAPI.createRecord("data-v-1f542a12", Component.options)
  46107. } else {
  46108. hotAPI.reload("data-v-1f542a12", Component.options)
  46109. }
  46110. module.hot.dispose(function (data) {
  46111. disposed = true
  46112. })
  46113. })()}
  46114. module.exports = Component.exports
  46115. /***/ }),
  46116. /* 77 */
  46117. /***/ (function(module, exports, __webpack_require__) {
  46118. // style-loader: Adds some css to the DOM by adding a <style> tag
  46119. // load the styles
  46120. var content = __webpack_require__(78);
  46121. if(typeof content === 'string') content = [[module.i, content, '']];
  46122. if(content.locals) module.exports = content.locals;
  46123. // add the styles to the DOM
  46124. var update = __webpack_require__(1)("0de25de8", content, false, {});
  46125. // Hot Module Replacement
  46126. if(false) {
  46127. // When the styles change, update the <style> tags
  46128. if(!content.locals) {
  46129. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-1f542a12\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./WSpinner.vue", function() {
  46130. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-1f542a12\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./WSpinner.vue");
  46131. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  46132. update(newContent);
  46133. });
  46134. }
  46135. // When the module is disposed, remove the <style> tags
  46136. module.hot.dispose(function() { update(); });
  46137. }
  46138. /***/ }),
  46139. /* 78 */
  46140. /***/ (function(module, exports, __webpack_require__) {
  46141. exports = module.exports = __webpack_require__(0)(false);
  46142. // imports
  46143. // module
  46144. exports.push([module.i, "\n.w-spinner[data-v-1f542a12] {\n display: none;\n position: fixed;\n z-index: 9999;\n bottom: 20px;\n right: 20px;\n margin: 0 auto;\n width: 30px;\n height: 30px;\n}\n.w-spinner .w-circular[data-v-1f542a12] {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n}\n", ""]);
  46145. // exports
  46146. /***/ }),
  46147. /* 79 */
  46148. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  46149. "use strict";
  46150. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  46151. //
  46152. //
  46153. //
  46154. //
  46155. //
  46156. //
  46157. //
  46158. //
  46159. //
  46160. //
  46161. //
  46162. //
  46163. //
  46164. //
  46165. //
  46166. //
  46167. //
  46168. //
  46169. //
  46170. //
  46171. //
  46172. //
  46173. //
  46174. //
  46175. //
  46176. //
  46177. //
  46178. /* harmony default export */ __webpack_exports__["default"] = ({
  46179. name: 'WSpinner'
  46180. });
  46181. /***/ }),
  46182. /* 80 */
  46183. /***/ (function(module, exports, __webpack_require__) {
  46184. var render = function() {
  46185. var _vm = this
  46186. var _h = _vm.$createElement
  46187. var _c = _vm._self._c || _h
  46188. return _c(
  46189. "div",
  46190. { staticClass: "w-spinner" },
  46191. [_c("w-loading", { staticClass: "w-circular" })],
  46192. 1
  46193. )
  46194. }
  46195. var staticRenderFns = []
  46196. render._withStripped = true
  46197. module.exports = { render: render, staticRenderFns: staticRenderFns }
  46198. if (false) {
  46199. module.hot.accept()
  46200. if (module.hot.data) {
  46201. require("vue-hot-reload-api") .rerender("data-v-1f542a12", module.exports)
  46202. }
  46203. }
  46204. /***/ }),
  46205. /* 81 */
  46206. /***/ (function(module, exports, __webpack_require__) {
  46207. var disposed = false
  46208. function injectStyle (ssrContext) {
  46209. if (disposed) return
  46210. __webpack_require__(82)
  46211. __webpack_require__(84)
  46212. }
  46213. var normalizeComponent = __webpack_require__(2)
  46214. /* script */
  46215. var __vue_script__ = __webpack_require__(86)
  46216. /* template */
  46217. var __vue_template__ = __webpack_require__(134)
  46218. /* template functional */
  46219. var __vue_template_functional__ = false
  46220. /* styles */
  46221. var __vue_styles__ = injectStyle
  46222. /* scopeId */
  46223. var __vue_scopeId__ = "data-v-2df6db1f"
  46224. /* moduleIdentifier (server only) */
  46225. var __vue_module_identifier__ = null
  46226. var Component = normalizeComponent(
  46227. __vue_script__,
  46228. __vue_template__,
  46229. __vue_template_functional__,
  46230. __vue_styles__,
  46231. __vue_scopeId__,
  46232. __vue_module_identifier__
  46233. )
  46234. Component.options.__file = "resources/assets/js/main/components/WHeader.vue"
  46235. /* hot reload */
  46236. if (false) {(function () {
  46237. var hotAPI = require("vue-hot-reload-api")
  46238. hotAPI.install(require("vue"), false)
  46239. if (!hotAPI.compatible) return
  46240. module.hot.accept()
  46241. if (!module.hot.data) {
  46242. hotAPI.createRecord("data-v-2df6db1f", Component.options)
  46243. } else {
  46244. hotAPI.reload("data-v-2df6db1f", Component.options)
  46245. }
  46246. module.hot.dispose(function (data) {
  46247. disposed = true
  46248. })
  46249. })()}
  46250. module.exports = Component.exports
  46251. /***/ }),
  46252. /* 82 */
  46253. /***/ (function(module, exports, __webpack_require__) {
  46254. // style-loader: Adds some css to the DOM by adding a <style> tag
  46255. // load the styles
  46256. var content = __webpack_require__(83);
  46257. if(typeof content === 'string') content = [[module.i, content, '']];
  46258. if(content.locals) module.exports = content.locals;
  46259. // add the styles to the DOM
  46260. var update = __webpack_require__(1)("3e511ece", content, false, {});
  46261. // Hot Module Replacement
  46262. if(false) {
  46263. // When the styles change, update the <style> tags
  46264. if(!content.locals) {
  46265. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2df6db1f\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./WHeader.vue", function() {
  46266. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2df6db1f\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./WHeader.vue");
  46267. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  46268. update(newContent);
  46269. });
  46270. }
  46271. // When the module is disposed, remove the <style> tags
  46272. module.hot.dispose(function() { update(); });
  46273. }
  46274. /***/ }),
  46275. /* 83 */
  46276. /***/ (function(module, exports, __webpack_require__) {
  46277. exports = module.exports = __webpack_require__(0)(false);
  46278. // imports
  46279. // module
  46280. exports.push([module.i, "\n.w-header-chat-draver .ivu-drawer-wrap,\n.w-header-chat-draver .ivu-drawer-mask {\n z-index: 1001;\n}\n.w-header-chat-draver .w-header-chat-close {\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: 1;\n color: #ffffff;\n font-size: 32px;\n width: 68px;\n height: 58px;\n line-height: 58px;\n text-align: center;\n cursor: pointer;\n}\n@media (max-width: 768px) {\n.w-header-chat-draver .w-header-chat-close {\n width: 50px;\n height: 50px;\n line-height: 50px;\n}\n}\n.w-header-chat-draver .w-header-chat-close > i {\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n}\n.w-header-chat-draver .w-header-chat-close:hover > i {\n -webkit-transform: scale(1.12) rotate(90deg);\n transform: scale(1.12) rotate(90deg);\n}\n", ""]);
  46281. // exports
  46282. /***/ }),
  46283. /* 84 */
  46284. /***/ (function(module, exports, __webpack_require__) {
  46285. // style-loader: Adds some css to the DOM by adding a <style> tag
  46286. // load the styles
  46287. var content = __webpack_require__(85);
  46288. if(typeof content === 'string') content = [[module.i, content, '']];
  46289. if(content.locals) module.exports = content.locals;
  46290. // add the styles to the DOM
  46291. var update = __webpack_require__(1)("2b23ebf8", content, false, {});
  46292. // Hot Module Replacement
  46293. if(false) {
  46294. // When the styles change, update the <style> tags
  46295. if(!content.locals) {
  46296. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2df6db1f\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./WHeader.vue", function() {
  46297. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2df6db1f\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./WHeader.vue");
  46298. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  46299. update(newContent);
  46300. });
  46301. }
  46302. // When the module is disposed, remove the <style> tags
  46303. module.hot.dispose(function() { update(); });
  46304. }
  46305. /***/ }),
  46306. /* 85 */
  46307. /***/ (function(module, exports, __webpack_require__) {
  46308. exports = module.exports = __webpack_require__(0)(false);
  46309. // imports
  46310. // module
  46311. exports.push([module.i, "\n.w-header[data-v-2df6db1f] {\n z-index: 15;\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n font-size: 14px;\n background: #0396f2 linear-gradient(45deg, #0396f2 0%, #0285d7 100%);\n -webkit-box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.25);\n box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.25);\n}\n.w-header .icon[data-v-2df6db1f] {\n font-size: 16px;\n margin-right: 3px;\n}\n.w-header .w-header-row[data-v-2df6db1f] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n color: #fff;\n height: 40px;\n position: relative;\n z-index: 10;\n margin: 0 32px;\n}\n.w-header .w-header-row .w-header-row-left[data-v-2df6db1f] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n white-space: nowrap;\n overflow: hidden;\n overflow-x: auto;\n -webkit-backface-visibility: hidden;\n -webkit-overflow-scrolling: touch;\n}\n.w-header .w-header-row .w-header-row-left li[data-v-2df6db1f] {\n line-height: 40px;\n color: #fff;\n display: inline-block;\n}\n.w-header .w-header-row .w-header-row-left li a[data-v-2df6db1f] {\n color: #fff;\n display: block;\n min-width: 116px;\n text-align: center;\n}\n.w-header .w-header-row .w-header-row-left li a[data-v-2df6db1f]:visited {\n color: #fff;\n}\n.w-header .w-header-row .w-header-row-left li a[data-v-2df6db1f]:hover {\n color: #f2f2f2;\n}\n.w-header .w-header-row .w-header-row-left li[data-v-2df6db1f]:hover, .w-header .w-header-row .w-header-row-left li.active[data-v-2df6db1f] {\n background: #0277c0;\n}\n.w-header .w-header-row .w-header-row-right[data-v-2df6db1f] {\n white-space: nowrap;\n text-align: right;\n line-height: 40px;\n margin-right: -5px;\n}\n.w-header .w-header-row .w-header-row-right .right-info[data-v-2df6db1f] {\n display: inline-block;\n position: relative;\n padding-left: 10px;\n padding-right: 10px;\n margin-right: -5px;\n cursor: pointer;\n}\n.w-header .w-header-row .w-header-row-right .right-info[data-v-2df6db1f]:hover {\n background: #0277c0;\n}\n.w-header .w-header-row .w-header-row-right .right-info .right-mticon[data-v-2df6db1f] {\n vertical-align: top;\n margin-top: 8px;\n}\n.w-header .w-header-row .w-header-row-right .right-info .right-mticon-9[data-v-2df6db1f] {\n vertical-align: top;\n margin-top: 9px;\n}\n.w-header .w-header-row .w-header-row-right .right-info .right-info-num[data-v-2df6db1f] {\n position: absolute;\n top: 2px;\n left: 22px;\n height: auto;\n line-height: normal;\n color: #ffffff;\n background-color: #ff0000;\n text-align: center;\n border-radius: 10px;\n padding: 1px 5px;\n font-size: 12px;\n -webkit-transform: scale(0.9);\n transform: scale(0.9);\n z-index: 1;\n}\n.w-header .w-header-row .w-header-row-right .right-info .userimg[data-v-2df6db1f] {\n display: none;\n width: 26px;\n height: 26px;\n margin-top: 7px;\n vertical-align: top;\n border-radius: 50%;\n}\n.w-header .w-header-row .w-header-row-right .right-info .username[data-v-2df6db1f] {\n display: inline-block;\n}\n@media (max-width: 768px) {\n.w-header .w-header-row[data-v-2df6db1f] {\n margin: 0 16px;\n}\n.w-header .w-header-row .w-header-row-left .dropdown-menu[data-v-2df6db1f] {\n font-size: 28px;\n vertical-align: top;\n margin-top: 6px;\n}\n.w-header .w-header-row .w-header-row-right .right-info[data-v-2df6db1f] {\n padding-left: 8px;\n padding-right: 8px;\n}\n.w-header .w-header-row .w-header-row-right .right-info .userimg[data-v-2df6db1f] {\n display: inline-block;\n}\n.w-header .w-header-row .w-header-row-right .right-info .username[data-v-2df6db1f] {\n display: none;\n}\n}\n.setting-auto-day[data-v-2df6db1f] {\n display: block;\n width: 110px;\n margin-top: 12px;\n line-height: 32px;\n margin-bottom: -10px;\n}\n.setting-bg[data-v-2df6db1f] {\n margin-top: 6px;\n margin-bottom: -24px;\n}\n.setting-bg[data-v-2df6db1f]:after, .setting-bg[data-v-2df6db1f]:before {\n display: table;\n content: \"\";\n}\n.setting-bg li[data-v-2df6db1f] {\n margin: 0 16px 16px 0;\n width: 160px;\n height: 124px;\n display: inline-block;\n cursor: pointer;\n border: solid 2px #fff;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n}\n.setting-bg li.active[data-v-2df6db1f], .setting-bg li[data-v-2df6db1f]:hover {\n border-color: #0396f2;\n -webkit-transform: scale(1.02);\n transform: scale(1.02);\n}\n", ""]);
  46312. // exports
  46313. /***/ }),
  46314. /* 86 */
  46315. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  46316. "use strict";
  46317. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  46318. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ImgUpload__ = __webpack_require__(17);
  46319. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ImgUpload___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__ImgUpload__);
  46320. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__project_header_create__ = __webpack_require__(91);
  46321. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__project_header_create___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__project_header_create__);
  46322. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__project_header_archived__ = __webpack_require__(100);
  46323. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__project_header_archived___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__project_header_archived__);
  46324. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__chat_Index__ = __webpack_require__(105);
  46325. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__chat_Index___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__chat_Index__);
  46326. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__iview_WDrawer__ = __webpack_require__(49);
  46327. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__iview_WDrawer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__iview_WDrawer__);
  46328. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  46329. //
  46330. //
  46331. //
  46332. //
  46333. //
  46334. //
  46335. //
  46336. //
  46337. //
  46338. //
  46339. //
  46340. //
  46341. //
  46342. //
  46343. //
  46344. //
  46345. //
  46346. //
  46347. //
  46348. //
  46349. //
  46350. //
  46351. //
  46352. //
  46353. //
  46354. //
  46355. //
  46356. //
  46357. //
  46358. //
  46359. //
  46360. //
  46361. //
  46362. //
  46363. //
  46364. //
  46365. //
  46366. //
  46367. //
  46368. //
  46369. //
  46370. //
  46371. //
  46372. //
  46373. //
  46374. //
  46375. //
  46376. //
  46377. //
  46378. //
  46379. //
  46380. //
  46381. //
  46382. //
  46383. //
  46384. //
  46385. //
  46386. //
  46387. //
  46388. //
  46389. //
  46390. //
  46391. //
  46392. //
  46393. //
  46394. //
  46395. //
  46396. //
  46397. //
  46398. //
  46399. //
  46400. //
  46401. //
  46402. //
  46403. //
  46404. //
  46405. //
  46406. //
  46407. //
  46408. //
  46409. //
  46410. //
  46411. //
  46412. //
  46413. //
  46414. //
  46415. //
  46416. //
  46417. //
  46418. //
  46419. //
  46420. //
  46421. //
  46422. //
  46423. //
  46424. //
  46425. //
  46426. //
  46427. //
  46428. //
  46429. //
  46430. //
  46431. //
  46432. //
  46433. //
  46434. //
  46435. //
  46436. //
  46437. //
  46438. //
  46439. //
  46440. //
  46441. //
  46442. //
  46443. //
  46444. //
  46445. //
  46446. //
  46447. //
  46448. //
  46449. //
  46450. //
  46451. //
  46452. //
  46453. //
  46454. //
  46455. //
  46456. //
  46457. //
  46458. //
  46459. //
  46460. //
  46461. //
  46462. //
  46463. //
  46464. //
  46465. //
  46466. //
  46467. //
  46468. //
  46469. //
  46470. //
  46471. //
  46472. //
  46473. //
  46474. //
  46475. //
  46476. //
  46477. //
  46478. //
  46479. //
  46480. //
  46481. //
  46482. //
  46483. //
  46484. //
  46485. //
  46486. //
  46487. //
  46488. //
  46489. //
  46490. //
  46491. //
  46492. //
  46493. //
  46494. //
  46495. //
  46496. //
  46497. //
  46498. //
  46499. //
  46500. //
  46501. //
  46502. //
  46503. //
  46504. //
  46505. //
  46506. //
  46507. //
  46508. //
  46509. //
  46510. //
  46511. //
  46512. //
  46513. //
  46514. //
  46515. //
  46516. //
  46517. //
  46518. //
  46519. //
  46520. //
  46521. //
  46522. //
  46523. //
  46524. //
  46525. //
  46526. //
  46527. //
  46528. //
  46529. //
  46530. //
  46531. //
  46532. //
  46533. //
  46534. //
  46535. //
  46536. //
  46537. //
  46538. //
  46539. //
  46540. //
  46541. //
  46542. //
  46543. //
  46544. //
  46545. //
  46546. //
  46547. //
  46548. //
  46549. //
  46550. //
  46551. //
  46552. //
  46553. //
  46554. //
  46555. //
  46556. //
  46557. //
  46558. //
  46559. //
  46560. //
  46561. //
  46562. //
  46563. //
  46564. //
  46565. //
  46566. //
  46567. //
  46568. //
  46569. //
  46570. //
  46571. //
  46572. //
  46573. //
  46574. //
  46575. //
  46576. //
  46577. //
  46578. //
  46579. //
  46580. //
  46581. //
  46582. //
  46583. //
  46584. //
  46585. //
  46586. //
  46587. //
  46588. //
  46589. //
  46590. //
  46591. //
  46592. //
  46593. //
  46594. //
  46595. //
  46596. //
  46597. //
  46598. //
  46599. //
  46600. //
  46601. //
  46602. //
  46603. //
  46604. //
  46605. //
  46606. //
  46607. //
  46608. //
  46609. //
  46610. //
  46611. //
  46612. //
  46613. //
  46614. //
  46615. //
  46616. //
  46617. //
  46618. //
  46619. //
  46620. //
  46621. //
  46622. //
  46623. //
  46624. //
  46625. //
  46626. //
  46627. //
  46628. //
  46629. //
  46630. //
  46631. //
  46632. //
  46633. //
  46634. //
  46635. //
  46636. //
  46637. //
  46638. //
  46639. //
  46640. //
  46641. //
  46642. //
  46643. //
  46644. //
  46645. //
  46646. //
  46647. //
  46648. //
  46649. //
  46650. //
  46651. //
  46652. //
  46653. //
  46654. //
  46655. //
  46656. //
  46657. //
  46658. //
  46659. //
  46660. //
  46661. //
  46662. //
  46663. //
  46664. //
  46665. //
  46666. //
  46667. //
  46668. //
  46669. //
  46670. //
  46671. //
  46672. //
  46673. //
  46674. //
  46675. //
  46676. //
  46677. //
  46678. //
  46679. //
  46680. //
  46681. //
  46682. //
  46683. //
  46684. //
  46685. //
  46686. //
  46687. //
  46688. //
  46689. //
  46690. //
  46691. //
  46692. /* harmony default export */ __webpack_exports__["default"] = ({
  46693. name: 'WHeader',
  46694. components: { WDrawer: __WEBPACK_IMPORTED_MODULE_4__iview_WDrawer___default.a, ChatIndex: __WEBPACK_IMPORTED_MODULE_3__chat_Index___default.a, HeaderArchived: __WEBPACK_IMPORTED_MODULE_2__project_header_archived___default.a, HeaderCreate: __WEBPACK_IMPORTED_MODULE_1__project_header_create___default.a, ImgUpload: __WEBPACK_IMPORTED_MODULE_0__ImgUpload___default.a },
  46695. data: function data() {
  46696. return {
  46697. tabActive: '',
  46698. loadIng: 0,
  46699. isAdmin: false,
  46700. systemDrawerShow: false,
  46701. userDrawerShow: false,
  46702. userDrawerTab: 'personal',
  46703. formSystem: {
  46704. github: 'show',
  46705. reg: 'open',
  46706. callav: 'open',
  46707. autoArchived: 'close',
  46708. archivedDay: 7
  46709. },
  46710. formDatum: {
  46711. userimg: '',
  46712. nickname: '',
  46713. profession: ''
  46714. },
  46715. ruleDatum: {},
  46716. formPass: {
  46717. oldpass: '',
  46718. newpass: '',
  46719. checkpass: ''
  46720. },
  46721. rulePass: {},
  46722. formSetting: {
  46723. bgid: 0
  46724. },
  46725. chatDrawerShow: false,
  46726. chatUnreadTotal: 0
  46727. };
  46728. },
  46729. mounted: function mounted() {
  46730. this.isAdmin = $A.identity('admin');
  46731. this.formatDatum();
  46732. //
  46733. this.tabActive = this.$route.meta.tabActive;
  46734. //
  46735. if ($A.urlParameter("open") === 'chat' && $A.getToken() !== false) {
  46736. this.chatDrawerShow = true;
  46737. }
  46738. },
  46739. watch: {
  46740. '$route': function $route() {
  46741. this.tabActive = this.$route.meta.tabActive;
  46742. this.systemDrawerShow = false;
  46743. this.chatDrawerShow = $A.urlParameter("open") === 'chat' && $A.getToken() !== false;
  46744. if (!this.usrInfo.changepass) {
  46745. this.userDrawerShow = false;
  46746. }
  46747. },
  46748. usrName: function usrName() {
  46749. this.isAdmin = $A.identity('admin');
  46750. this.formatDatum();
  46751. }
  46752. },
  46753. methods: {
  46754. initLanguage: function initLanguage() {
  46755. var _this = this;
  46756. this.ruleDatum = {
  46757. nickname: [{ required: true, message: this.$L('请输入昵称!'), trigger: 'change' }, { type: 'string', min: 2, message: this.$L('昵称长度至少2位!'), trigger: 'change' }]
  46758. };
  46759. this.rulePass = {
  46760. oldpass: [{ required: true, message: this.$L('请输入旧密码!'), trigger: 'change' }, { type: 'string', min: 6, message: this.$L('密码长度至少6位!'), trigger: 'change' }],
  46761. newpass: [{
  46762. validator: function validator(rule, value, callback) {
  46763. if (value === '') {
  46764. callback(new Error(_this.$L('请输入新密码!')));
  46765. } else {
  46766. if (_this.formPass.checkpass !== '') {
  46767. _this.$refs.formPass.validateField('checkpass');
  46768. }
  46769. callback();
  46770. }
  46771. },
  46772. required: true,
  46773. trigger: 'change'
  46774. }, { type: 'string', min: 6, message: this.$L('密码长度至少6位!'), trigger: 'change' }],
  46775. checkpass: [{
  46776. validator: function validator(rule, value, callback) {
  46777. if (value === '') {
  46778. callback(new Error(_this.$L('请重新输入新密码!')));
  46779. } else if (value !== _this.formPass.newpass) {
  46780. callback(new Error(_this.$L('两次密码输入不一致!')));
  46781. } else {
  46782. callback();
  46783. }
  46784. },
  46785. required: true,
  46786. trigger: 'change'
  46787. }]
  46788. };
  46789. },
  46790. formatDatum: function formatDatum() {
  46791. this.$set(this.formDatum, 'userimg', this.usrInfo.userimg);
  46792. this.$set(this.formDatum, 'nickname', this.usrInfo.nickname);
  46793. this.$set(this.formDatum, 'profession', this.usrInfo.profession);
  46794. this.$set(this.formSetting, 'bgid', this.usrInfo.bgid);
  46795. this.formDatum__reset = $A.cloneData(this.formDatum);
  46796. this.formSetting__reset = $A.cloneData(this.formSetting);
  46797. this.formPass__reset = $A.cloneData(this.formPass);
  46798. this.changepass();
  46799. },
  46800. changepass: function changepass() {
  46801. var _this2 = this;
  46802. if (this.usrInfo.changepass) {
  46803. this.userDrawerShow = true;
  46804. this.userDrawerTab = 'account';
  46805. setTimeout(function () {
  46806. _this2.changepass();
  46807. }, 500);
  46808. }
  46809. },
  46810. getBgUrl: function getBgUrl(id, thumb) {
  46811. id = Math.max(1, parseInt(id));
  46812. return 'url(' + window.location.origin + '/images/bg/' + (thumb ? 'thumb/' : '') + id + '.jpg' + ')';
  46813. },
  46814. tabPage: function tabPage(path) {
  46815. this.goForward({ path: '/' + path });
  46816. },
  46817. setRightSelect: function setRightSelect(act) {
  46818. switch (act) {
  46819. case 'system':
  46820. this.systemSetting(false);
  46821. this.systemDrawerShow = true;
  46822. break;
  46823. case 'user':
  46824. this.userDrawerShow = true;
  46825. break;
  46826. case 'out':
  46827. this.logout();
  46828. break;
  46829. }
  46830. },
  46831. logout: function logout() {
  46832. this.$Modal.confirm({
  46833. title: this.$L('退出登录'),
  46834. content: this.$L('您确定要退出登录吗?'),
  46835. onOk: function onOk() {
  46836. $A.userLogout();
  46837. }
  46838. });
  46839. },
  46840. systemSetting: function systemSetting(save) {
  46841. var _this3 = this;
  46842. this.loadIng++;
  46843. $A.apiAjax({
  46844. url: 'system/setting?type=' + (save ? 'save' : 'get'),
  46845. data: this.formSystem,
  46846. complete: function complete() {
  46847. _this3.loadIng--;
  46848. },
  46849. success: function success(res) {
  46850. if (res.ret === 1) {
  46851. var tempData = res.data;
  46852. tempData.github = tempData.github || 'show';
  46853. tempData.reg = tempData.reg || 'open';
  46854. tempData.callav = tempData.callav || 'open';
  46855. tempData.autoArchived = tempData.autoArchived || 'close';
  46856. tempData.archivedDay = tempData.archivedDay || 7;
  46857. _this3.formSystem = tempData;
  46858. _this3.formSystem__reset = $A.cloneData(_this3.formSystem);
  46859. if (save) {
  46860. _this3.$Message.success(_this3.$L('修改成功'));
  46861. }
  46862. } else {
  46863. if (save) {
  46864. _this3.$Modal.error({ title: _this3.$L('温馨提示'), content: res.msg });
  46865. }
  46866. }
  46867. }
  46868. });
  46869. },
  46870. handleSubmit: function handleSubmit(name) {
  46871. var _this4 = this;
  46872. this.$refs[name].validate(function (valid) {
  46873. if (valid) {
  46874. switch (name) {
  46875. case "formSystem":
  46876. {
  46877. _this4.systemSetting(true);
  46878. break;
  46879. }
  46880. case "formDatum":
  46881. {
  46882. _this4.loadIng++;
  46883. $A.apiAjax({
  46884. url: 'users/editdata',
  46885. data: _this4.formDatum,
  46886. complete: function complete() {
  46887. _this4.loadIng--;
  46888. },
  46889. success: function success(res) {
  46890. if (res.ret === 1) {
  46891. $A.getUserInfo(true);
  46892. $A.getUserBasic(_this4.usrInfo.username, function () {}, 0);
  46893. _this4.$Message.success(_this4.$L('修改成功'));
  46894. } else {
  46895. _this4.$Modal.error({ title: _this4.$L('温馨提示'), content: res.msg });
  46896. }
  46897. }
  46898. });
  46899. break;
  46900. }
  46901. case "formPass":
  46902. {
  46903. _this4.loadIng++;
  46904. $A.apiAjax({
  46905. url: 'users/editpass',
  46906. data: _this4.formPass,
  46907. complete: function complete() {
  46908. _this4.loadIng--;
  46909. },
  46910. success: function success(res) {
  46911. if (res.ret === 1) {
  46912. _this4.userDrawerShow = false;
  46913. _this4.$Message.success(_this4.$L('修改成功,请重新登录!'));
  46914. _this4.$refs[name].resetFields();
  46915. $A.userLogout();
  46916. } else {
  46917. _this4.$Modal.error({ title: _this4.$L('温馨提示'), content: res.msg });
  46918. }
  46919. }
  46920. });
  46921. break;
  46922. }
  46923. case "formSetting":
  46924. {
  46925. _this4.loadIng++;
  46926. $A.apiAjax({
  46927. url: 'users/editdata',
  46928. data: _this4.formSetting,
  46929. complete: function complete() {
  46930. _this4.loadIng--;
  46931. },
  46932. success: function success(res) {
  46933. if (res.ret === 1) {
  46934. $A.getUserInfo(true);
  46935. _this4.$Message.success(_this4.$L('修改成功'));
  46936. } else {
  46937. _this4.$Modal.error({ title: _this4.$L('温馨提示'), content: res.msg });
  46938. }
  46939. }
  46940. });
  46941. break;
  46942. }
  46943. }
  46944. }
  46945. });
  46946. },
  46947. handleReset: function handleReset(name) {
  46948. if (typeof this[name + '__reset'] !== "undefined") {
  46949. this[name] = $A.cloneData(this[name + '__reset']);
  46950. return;
  46951. }
  46952. this.$refs[name].resetFields();
  46953. },
  46954. formArchived: function formArchived(value) {
  46955. this.formSystem = _extends({}, this.formSystem, { autoArchived: value });
  46956. }
  46957. }
  46958. });
  46959. /***/ }),
  46960. /* 87 */
  46961. /***/ (function(module, exports, __webpack_require__) {
  46962. // style-loader: Adds some css to the DOM by adding a <style> tag
  46963. // load the styles
  46964. var content = __webpack_require__(88);
  46965. if(typeof content === 'string') content = [[module.i, content, '']];
  46966. if(content.locals) module.exports = content.locals;
  46967. // add the styles to the DOM
  46968. var update = __webpack_require__(1)("3b50b398", content, false, {});
  46969. // Hot Module Replacement
  46970. if(false) {
  46971. // When the styles change, update the <style> tags
  46972. if(!content.locals) {
  46973. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-55c90fc2\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./ImgUpload.vue", function() {
  46974. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-55c90fc2\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./ImgUpload.vue");
  46975. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  46976. update(newContent);
  46977. });
  46978. }
  46979. // When the module is disposed, remove the <style> tags
  46980. module.hot.dispose(function() { update(); });
  46981. }
  46982. /***/ }),
  46983. /* 88 */
  46984. /***/ (function(module, exports, __webpack_require__) {
  46985. exports = module.exports = __webpack_require__(0)(false);
  46986. // imports
  46987. // module
  46988. exports.push([module.i, "\n.img-upload-modal .ivu-modal-mask {\n z-index: 1001;\n}\n.img-upload-modal .ivu-modal-no-mask {\n background-color: rgba(55, 55, 55, 0.2);\n}\n.img-upload-modal .ivu-modal-wrap {\n z-index: 1001;\n}\n.imgcomp-upload-list {\n display: inline-block;\n width: 60px;\n height: 60px;\n text-align: center;\n line-height: 60px;\n border: 1px solid transparent;\n border-radius: 4px;\n overflow: hidden;\n background: #fff;\n position: relative;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n margin-right: 4px;\n vertical-align: top;\n}\n.imgcomp-upload-list .imgcomp-upload-img {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-position: center;\n background-size: cover;\n}\n.imgcomp-upload-list .imgcomp-upload-list-cover {\n display: none;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.6);\n}\n.imgcomp-upload-list .imgcomp-upload-list-cover i {\n color: #fff;\n font-size: 24px;\n cursor: pointer;\n vertical-align: middle;\n margin: 0;\n -webkit-transition: all .2s;\n transition: all .2s;\n}\n.imgcomp-upload-list .imgcomp-upload-list-cover i:hover {\n font-size: 28px;\n}\n.imgcomp-upload-list .ivu-progress-outer {\n background-color: rgba(0, 0, 0, 0.68);\n}\n.imgcomp-upload-list .ivu-progress-outer .ivu-progress-inner {\n width: 88%;\n}\n.imgcomp-upload-list:hover .imgcomp-upload-list-cover {\n display: block;\n}\n.img-upload-foot {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n.img-upload-foot .img-upload-foot-input {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n text-align: left;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n.img-upload-foot .img-upload-foot-input .img-upload-foot-httptitle {\n cursor: pointer;\n padding-left: 3px;\n margin-right: 22px;\n}\n.add-box {\n width: 60px;\n height: 60px;\n line-height: 60px;\n display: inline-block;\n background: #fff;\n border: 1px dashed #dddee1;\n border-radius: 4px;\n text-align: center;\n position: relative;\n overflow: hidden;\n vertical-align: top;\n}\n.add-box .add-box-icon i {\n vertical-align: middle;\n padding-bottom: 2px;\n}\n.add-box .add-box-upload {\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n color: #ffffff;\n padding-top: 9px;\n background: rgba(0, 0, 0, 0.6);\n}\n.add-box .add-box-upload .add-box-item {\n height: 22px;\n line-height: 22px;\n cursor: pointer;\n}\n.add-box .add-box-upload .add-box-item .ivu-upload-drag, .add-box .add-box-upload .add-box-item .ivu-upload-drag:hover {\n background: transparent;\n border: 0;\n border-radius: 0;\n}\n.add-box .add-box-upload .add-box-item span {\n -webkit-transition: all .2s;\n transition: all .2s;\n font-size: 12px;\n}\n.add-box .add-box-upload .add-box-item:hover span {\n font-size: 14px;\n}\n.add-box em {\n font-style: normal;\n}\n.add-box:hover {\n border-color: rgba(0, 0, 0, 0.6);\n}\n.add-box:hover .add-box-upload {\n display: block;\n}\n.callback-add-box {\n display: block;\n width: auto;\n height: 25px;\n line-height: 25px;\n border: 0;\n background: transparent;\n}\n.callback-add-box .add-box-icon {\n display: none;\n}\n.callback-add-box .add-box-upload {\n display: block;\n width: auto;\n background: transparent;\n color: #333;\n padding: 0;\n}\n.callback-add-box .add-box-upload > div {\n display: inline-block;\n padding-right: 10px;\n}\n.browse-load {\n margin: 20px;\n text-align: center;\n}\n.browse-list {\n max-height: 540px;\n overflow: auto;\n}\n.browse-list .browse-item {\n margin: 10px 15px;\n display: inline-block;\n text-align: center;\n cursor: pointer;\n position: relative;\n}\n.browse-list .browse-item .browse-img {\n width: 64px;\n height: 64px;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKoAAABxCAAAAABg5GeyAAACW0lEQVR4Ae3XVRLjMBAE0L3/rSwKM3OcSNPyLVYOLvM6UD0Bd03LVe9XH+RlhlRSSSWVVFJJJZVUUkkllVRSSSWVVFJJJZVUUkl9WyqppJJKKqmkkgpURP17xngOAR5NxW5wlJ9MaLQh83F4NHWmd/gZtdVBaOldfDB1bq5UpJFbFOC6LKnYrkRO209PAw+hIuzWB8Ep5es8HvYo4z4tE1X8UeRwlMM2D5Bzkc7kj6Bi3VTKDDwEeUcrMxrUvGDXTnHa6kK69SDN9sgq1clxKSbNHqqnYmdri81Q9QHf1JPt1Frncaib2XbiTKL2GkHaurnY9LOulMV0O7G6Kw+g9sw2ohhm62KezVJaaufjWC1TnOkr1exilJ7Ji0vxCCqO9V4UwV4PYr9+apouhGYLKfnahdpqegjmeoXOpXgANe70pKT6Zhu19qkY2nC0PZS527lQOyInqr8Uvc5jqfUb1X+PGh5IhW90S2quh3FQC2XRcF66TUkTXPcLKm5FtdR9RJq+2hWII7UpFtmsQLEyzsdJtkxxpr6gLotbUSlV9yeT0Trmzk2XPdUThLYarUbWOY9j04xXQ2u+pMZLYSumGmNUH3HbM9qOAwSHodN2Pks25F2j3aI7+IxqNsB+YLWb16ukSjiW4xNB0gMoMfApBS/XZQgi3p9/5RsiKNKZEOwYFVIF5VyTyD19sbyjIJiNJRZxpNbx2S8sGKvGZNHJBniBu9Wy5WxjGuQFqIAcBHiRGyt4ua5gSCWVVFJJJZVUUkkllVRSSSWVVFJJJZVUUkkllVRSSSWVVFI/AgO0SXIVYHeGAAAAAElFTkSuQmCC);\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.browse-list .browse-item .browse-title {\n display: block;\n width: 64px;\n margin-top: 5px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.browse-list .browse-item .browse-icon {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 64px;\n font-size: 36px;\n padding-top: 15px;\n color: #ffffff;\n background-color: rgba(0, 0, 0, 0.5);\n}\n.browse-list-disabled {\n position: relative;\n}\n.browse-list-disabled:after {\n position: absolute;\n content: '';\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0.9);\n z-index: 1;\n}\n", ""]);
  46989. // exports
  46990. /***/ }),
  46991. /* 89 */
  46992. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  46993. "use strict";
  46994. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  46995. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  46996. //
  46997. //
  46998. //
  46999. //
  47000. //
  47001. //
  47002. //
  47003. //
  47004. //
  47005. //
  47006. //
  47007. //
  47008. //
  47009. //
  47010. //
  47011. //
  47012. //
  47013. //
  47014. //
  47015. //
  47016. //
  47017. //
  47018. //
  47019. //
  47020. //
  47021. //
  47022. //
  47023. //
  47024. //
  47025. //
  47026. //
  47027. //
  47028. //
  47029. //
  47030. //
  47031. //
  47032. //
  47033. //
  47034. //
  47035. //
  47036. //
  47037. //
  47038. //
  47039. //
  47040. //
  47041. //
  47042. //
  47043. //
  47044. //
  47045. //
  47046. //
  47047. //
  47048. //
  47049. //
  47050. //
  47051. //
  47052. //
  47053. //
  47054. //
  47055. //
  47056. //
  47057. //
  47058. //
  47059. //
  47060. //
  47061. //
  47062. //
  47063. //
  47064. //
  47065. //
  47066. //
  47067. //
  47068. //
  47069. //
  47070. //
  47071. //
  47072. //
  47073. //
  47074. //
  47075. //
  47076. //
  47077. //
  47078. //
  47079. //
  47080. //
  47081. //
  47082. //
  47083. //
  47084. //
  47085. //
  47086. //
  47087. //
  47088. //
  47089. //
  47090. //
  47091. //
  47092. //
  47093. //
  47094. //
  47095. //
  47096. //
  47097. //
  47098. //
  47099. //
  47100. //
  47101. //
  47102. //
  47103. //
  47104. //
  47105. //
  47106. //
  47107. //
  47108. //
  47109. //
  47110. //
  47111. //
  47112. //
  47113. //
  47114. //
  47115. //
  47116. //
  47117. //
  47118. //
  47119. //
  47120. //
  47121. //
  47122. //
  47123. //
  47124. //
  47125. //
  47126. //
  47127. //
  47128. //
  47129. //
  47130. //
  47131. //
  47132. //
  47133. //
  47134. //
  47135. //
  47136. //
  47137. //
  47138. //
  47139. //
  47140. //
  47141. //
  47142. //
  47143. //
  47144. //
  47145. //
  47146. //
  47147. //
  47148. //
  47149. //
  47150. //
  47151. //
  47152. //
  47153. //
  47154. //
  47155. //
  47156. //
  47157. //
  47158. //
  47159. //
  47160. //
  47161. //
  47162. //
  47163. //
  47164. //
  47165. //
  47166. //
  47167. //
  47168. //
  47169. //
  47170. //
  47171. //
  47172. //
  47173. //
  47174. //
  47175. //
  47176. //
  47177. //
  47178. //
  47179. //
  47180. //
  47181. //
  47182. //
  47183. //
  47184. //
  47185. //
  47186. //
  47187. //
  47188. //
  47189. //
  47190. //
  47191. //
  47192. //
  47193. //
  47194. //
  47195. //
  47196. //
  47197. //
  47198. //
  47199. //
  47200. //
  47201. //
  47202. //
  47203. //
  47204. //
  47205. //
  47206. //
  47207. //
  47208. //
  47209. //
  47210. //
  47211. //
  47212. //
  47213. //
  47214. //
  47215. //
  47216. //
  47217. //
  47218. //
  47219. //
  47220. //
  47221. //
  47222. //
  47223. //
  47224. //
  47225. //
  47226. //
  47227. //
  47228. //
  47229. //
  47230. //
  47231. //
  47232. //
  47233. //
  47234. //
  47235. //
  47236. //
  47237. //
  47238. //
  47239. //
  47240. //
  47241. //
  47242. //
  47243. //
  47244. //
  47245. //
  47246. //
  47247. //
  47248. //
  47249. //
  47250. //
  47251. //
  47252. //
  47253. //
  47254. //
  47255. //
  47256. //
  47257. //
  47258. //
  47259. //
  47260. //
  47261. //
  47262. //
  47263. //
  47264. //
  47265. //
  47266. //
  47267. //
  47268. //
  47269. //
  47270. //
  47271. //
  47272. //
  47273. //
  47274. //
  47275. //
  47276. //
  47277. //
  47278. //
  47279. //
  47280. //
  47281. //
  47282. //
  47283. //
  47284. //
  47285. //
  47286. //
  47287. //
  47288. //
  47289. //
  47290. /* harmony default export */ __webpack_exports__["default"] = ({
  47291. name: 'ImgUpload',
  47292. props: {
  47293. value: {},
  47294. num: {},
  47295. width: {},
  47296. height: {},
  47297. type: {},
  47298. http: {
  47299. type: Boolean,
  47300. default: false
  47301. },
  47302. otherParams: {
  47303. type: Object,
  47304. default: function _default() {
  47305. return {};
  47306. }
  47307. },
  47308. uploadIng: {
  47309. type: Number,
  47310. default: 0
  47311. }
  47312. },
  47313. data: function data() {
  47314. return {
  47315. actionUrl: $A.apiUrl('system/imgupload'),
  47316. params: {
  47317. token: $A.getToken(),
  47318. width: this.width,
  47319. height: this.height
  47320. },
  47321. multiple: this.num > 1,
  47322. visible: false,
  47323. browseVisible: false,
  47324. isLoading: false,
  47325. browseList: [],
  47326. browseListNext: [],
  47327. imgVisible: '',
  47328. defaultList: this.initItems(this.value),
  47329. uploadList: [],
  47330. maxNum: Math.min(Math.max($A.runNum(this.num), 1), 99),
  47331. httpValue: '',
  47332. httpType: '',
  47333. maxSize: 204800
  47334. };
  47335. },
  47336. mounted: function mounted() {
  47337. var _this = this;
  47338. this.uploadList = this.$refs.upload.fileList;
  47339. this.$emit('input', this.uploadList);
  47340. //
  47341. var browseBox = $A(this.$refs.browselistbox);
  47342. browseBox.scroll(function () {
  47343. var nHight = browseBox[0].scrollHeight;
  47344. var nTop = browseBox[0].scrollTop;
  47345. var boxHight = browseBox.height();
  47346. if (nTop + boxHight >= nHight) {
  47347. //到底了
  47348. if (_this.browseListNext.length > 0) {
  47349. var tmpNext = _this.browseListNext;
  47350. _this.browseListNext = [];
  47351. _this.browsePictureFor(tmpNext);
  47352. }
  47353. }
  47354. });
  47355. },
  47356. watch: {
  47357. value: function value(val) {
  47358. if (typeof val === 'string') {
  47359. this.$emit('input', this.initItems(val));
  47360. return;
  47361. }
  47362. if (val === this.$refs.upload.fileList) {
  47363. return;
  47364. }
  47365. this.$refs.upload.fileList = this.initItems(val);
  47366. this.uploadList = this.$refs.upload.fileList;
  47367. },
  47368. browseVisible: function browseVisible() {
  47369. this.httpType = '';
  47370. this.httpValue = '';
  47371. }
  47372. },
  47373. computed: {
  47374. uploadParams: function uploadParams() {
  47375. if (Object.keys(this.otherParams).length > 0) {
  47376. return Object.assign(this.params, this.otherParams);
  47377. } else {
  47378. return this.params;
  47379. }
  47380. }
  47381. },
  47382. methods: {
  47383. handleCallback: function handleCallback(file) {
  47384. if (this.type === 'callback') {
  47385. if (file === true) {
  47386. this.$emit('on-callback', this.uploadList);
  47387. this.$refs.upload.fileList = [];
  47388. this.uploadList = this.$refs.upload.fileList;
  47389. } else if ((typeof file === 'undefined' ? 'undefined' : _typeof(file)) === "object") {
  47390. this.$emit('on-callback', [file]);
  47391. }
  47392. }
  47393. this.browseVisible = false;
  47394. },
  47395. initItems: function initItems(items) {
  47396. //数据初始化
  47397. if (typeof items === 'string') {
  47398. items = [{ 'url': items }];
  47399. }
  47400. var lists = [];
  47401. $A.each(items, function (index, item) {
  47402. if (typeof item === 'string') item = { 'url': item };
  47403. if (item.url) {
  47404. item.active = true;
  47405. item.status = 'finished';
  47406. if (typeof item.path === 'undefined') item.path = item.url;
  47407. if (typeof item.thumb === 'undefined') item.thumb = item.url;
  47408. lists.push(item);
  47409. }
  47410. });
  47411. return lists;
  47412. },
  47413. handleView: function handleView(item) {
  47414. //查看
  47415. this.visible = true;
  47416. this.imgVisible = item.url;
  47417. },
  47418. handleRemove: function handleRemove(item) {
  47419. //删除
  47420. var fileList = this.$refs.upload.fileList;
  47421. this.$refs.upload.fileList.splice(fileList.indexOf(item), 1);
  47422. this.$emit('input', this.$refs.upload.fileList);
  47423. },
  47424. handleProgress: function handleProgress() {
  47425. //开始上传
  47426. this.$emit('update:uploadIng', this.uploadIng + 1);
  47427. },
  47428. handleSuccess: function handleSuccess(res, file) {
  47429. //上传完成
  47430. this.$emit('update:uploadIng', this.uploadIng - 1);
  47431. if (res.ret === 1) {
  47432. file.url = res.data.url;
  47433. file.path = res.data.path;
  47434. file.thumb = res.data.thumb;
  47435. this.handleCallback(file);
  47436. } else {
  47437. this.$Modal.warning({
  47438. title: this.$L('上传失败'),
  47439. content: this.$L('文件 % 上传失败 %', file.name, res.msg)
  47440. });
  47441. this.$refs.upload.fileList.pop();
  47442. }
  47443. this.$emit('input', this.$refs.upload.fileList);
  47444. },
  47445. handleError: function handleError() {
  47446. //上传错误
  47447. this.$emit('update:uploadIng', this.uploadIng - 1);
  47448. },
  47449. handleFormatError: function handleFormatError(file) {
  47450. //上传类型错误
  47451. this.$Modal.warning({
  47452. title: this.$L('文件格式不正确'),
  47453. content: this.$L('文件 % 格式不正确,请上传 jpg、jpeg、gif、png 格式的图片。', file.name)
  47454. });
  47455. },
  47456. handleMaxSize: function handleMaxSize(file) {
  47457. //上传大小错误
  47458. this.$Modal.warning({
  47459. title: this.$L('超出文件大小限制'),
  47460. content: this.$L('文件 % 太大,不能超过%。', file.name, $A.bytesToSize(this.maxSize * 1024))
  47461. });
  47462. },
  47463. handleBeforeUpload: function handleBeforeUpload() {
  47464. //上传前判断
  47465. var check = this.uploadList.length < this.maxNum;
  47466. if (!check && this.uploadList.length == 1) {
  47467. this.handleRemove(this.uploadList[0]);
  47468. check = this.uploadList.length < this.maxNum;
  47469. }
  47470. if (!check) {
  47471. this.$Modal.warning({
  47472. title: this.$L('温馨提示'),
  47473. content: this.$L('最多只能上传 % 张图片。', this.maxNum)
  47474. });
  47475. }
  47476. this.params = {
  47477. token: $A.getToken(),
  47478. width: this.width,
  47479. height: this.height
  47480. };
  47481. return check;
  47482. },
  47483. handleClick: function handleClick() {
  47484. //手动上传
  47485. if (this.handleBeforeUpload()) {
  47486. this.$refs.upload.handleClick();
  47487. }
  47488. },
  47489. handleManual: function handleManual(file) {
  47490. //手动传file
  47491. if (this.handleBeforeUpload()) {
  47492. this.$refs.upload.upload(file);
  47493. }
  47494. },
  47495. browsePicture: function browsePicture(path) {
  47496. var _this2 = this;
  47497. //获取图片空间
  47498. this.browseVisible = true;
  47499. this.browseList = [];
  47500. this.browseListNext = [];
  47501. this.isLoading = true;
  47502. $A.apiAjax({
  47503. url: 'system/imgview',
  47504. data: { path: path ? path : '' },
  47505. beforeSend: true,
  47506. complete: true,
  47507. error: true,
  47508. success: function success(res) {
  47509. _this2.isLoading = false;
  47510. if (res.ret === 1) {
  47511. var dirs = res.data['dirs'];
  47512. for (var i = 0; i < dirs.length; i++) {
  47513. _this2.browseList.push(dirs[i]);
  47514. }
  47515. _this2.browsePictureFor(res.data['files']);
  47516. } else if (res.ret === -2) {
  47517. _this2.browseVisible = false;
  47518. _this2.$Modal.warning({ title: _this2.$L('温馨提示'), content: res.msg });
  47519. }
  47520. }
  47521. });
  47522. },
  47523. browsePictureFor: function browsePictureFor(files) {
  47524. for (var o = 0; o < files.length; o++) {
  47525. for (var j = 0; j < this.uploadList.length; j++) {
  47526. if (this.uploadList[j]['url'] === files[o]['url'] || this.uploadList[j]['url'] === files[o]['path']) {
  47527. files[o]['active'] = true;
  47528. break;
  47529. }
  47530. }
  47531. if (o < 100) {
  47532. this.browseList.push(files[o]);
  47533. } else {
  47534. this.browseListNext.push(files[o]);
  47535. }
  47536. }
  47537. },
  47538. browseItem: function browseItem(item) {
  47539. //点击选择图片
  47540. if (item.type === 'dir') {
  47541. //目录
  47542. this.browsePicture(item.path);
  47543. } else if (item.type === 'file') {
  47544. //文件
  47545. if (item.active) {
  47546. var fileList = this.$refs.upload.fileList;
  47547. this.$refs.upload.fileList.splice(fileList.indexOf(item), 1);
  47548. item.active = false;
  47549. } else {
  47550. if (this.maxNum === 1) {
  47551. for (var i = 0; i < this.browseList.length; i++) {
  47552. this.browseList[i].active = false;
  47553. }
  47554. this.$refs.upload.fileList = [];
  47555. this.uploadList = this.$refs.upload.fileList;
  47556. }
  47557. var check = this.uploadList.length < this.maxNum;
  47558. if (!check) {
  47559. this.$Modal.warning({ title: this.$L('温馨提示'), content: this.$L('最多只能选择 % 张图片。', this.maxNum) });
  47560. return;
  47561. }
  47562. item.active = true;
  47563. item.status = 'finished';
  47564. this.$refs.upload.fileList.push(item);
  47565. this.uploadList = this.$refs.upload.fileList;
  47566. }
  47567. this.$emit('input', this.$refs.upload.fileList);
  47568. }
  47569. },
  47570. __thumb: function __thumb(url) {
  47571. if ($A.strExists(url, "?", false)) {
  47572. return url + "&__thumb=true";
  47573. } else {
  47574. return url + "?__thumb=true";
  47575. }
  47576. },
  47577. httpEnter: function httpEnter() {
  47578. this.$emit('input', this.initItems(this.httpValue));
  47579. this.browseVisible = false;
  47580. }
  47581. }
  47582. });
  47583. /***/ }),
  47584. /* 90 */
  47585. /***/ (function(module, exports, __webpack_require__) {
  47586. var render = function() {
  47587. var _vm = this
  47588. var _h = _vm.$createElement
  47589. var _c = _vm._self._c || _h
  47590. return _c(
  47591. "div",
  47592. [
  47593. _vm._l(_vm.uploadList, function(item) {
  47594. return _vm.type !== "callback"
  47595. ? _c(
  47596. "div",
  47597. { staticClass: "imgcomp-upload-list" },
  47598. [
  47599. item.status === "finished"
  47600. ? [
  47601. _c("div", {
  47602. staticClass: "imgcomp-upload-img",
  47603. style: {
  47604. "background-image":
  47605. "url(" + _vm.__thumb(item.thumb) + ")"
  47606. }
  47607. }),
  47608. _vm._v(" "),
  47609. _c(
  47610. "div",
  47611. { staticClass: "imgcomp-upload-list-cover" },
  47612. [
  47613. _c("Icon", {
  47614. attrs: { type: "ios-eye-outline" },
  47615. nativeOn: {
  47616. click: function($event) {
  47617. return _vm.handleView(item)
  47618. }
  47619. }
  47620. }),
  47621. _vm._v(" "),
  47622. _c("Icon", {
  47623. attrs: { type: "ios-trash-outline" },
  47624. nativeOn: {
  47625. click: function($event) {
  47626. return _vm.handleRemove(item)
  47627. }
  47628. }
  47629. })
  47630. ],
  47631. 1
  47632. )
  47633. ]
  47634. : [
  47635. item.showProgress
  47636. ? _c("Progress", {
  47637. attrs: { percent: item.percentage, "hide-info": "" }
  47638. })
  47639. : _vm._e()
  47640. ]
  47641. ],
  47642. 2
  47643. )
  47644. : _vm._e()
  47645. }),
  47646. _vm._v(" "),
  47647. _c(
  47648. "div",
  47649. {
  47650. staticClass: "add-box",
  47651. class: { "callback-add-box": _vm.type === "callback" }
  47652. },
  47653. [
  47654. _c(
  47655. "div",
  47656. { staticClass: "add-box-icon" },
  47657. [_c("Icon", { attrs: { type: "md-add", size: "32" } })],
  47658. 1
  47659. ),
  47660. _vm._v(" "),
  47661. _c("div", { staticClass: "add-box-upload" }, [
  47662. _c(
  47663. "div",
  47664. { staticClass: "add-box-item", on: { click: _vm.browsePicture } },
  47665. [
  47666. _c("span", [
  47667. _vm._v(_vm._s(_vm.$L("浏览"))),
  47668. _vm.type === "callback"
  47669. ? _c("em", [_vm._v(_vm._s(_vm.$L("图片")))])
  47670. : _vm._e()
  47671. ])
  47672. ]
  47673. ),
  47674. _vm._v(" "),
  47675. _c(
  47676. "div",
  47677. { staticClass: "add-box-item" },
  47678. [
  47679. _c(
  47680. "Upload",
  47681. {
  47682. ref: "upload",
  47683. attrs: {
  47684. name: "image",
  47685. accept: "image/*",
  47686. action: _vm.actionUrl,
  47687. data: _vm.uploadParams,
  47688. "show-upload-list": false,
  47689. "max-size": _vm.maxSize,
  47690. format: ["jpg", "jpeg", "gif", "png"],
  47691. "default-file-list": _vm.defaultList,
  47692. "on-progress": _vm.handleProgress,
  47693. "on-success": _vm.handleSuccess,
  47694. "on-error": _vm.handleError,
  47695. "on-format-error": _vm.handleFormatError,
  47696. "on-exceeded-size": _vm.handleMaxSize,
  47697. "before-upload": _vm.handleBeforeUpload,
  47698. multiple: _vm.multiple
  47699. }
  47700. },
  47701. [
  47702. _c("span", [
  47703. _vm._v(_vm._s(_vm.$L("上传"))),
  47704. _vm.type === "callback"
  47705. ? _c("em", [_vm._v(_vm._s(_vm.$L("图片")))])
  47706. : _vm._e()
  47707. ])
  47708. ]
  47709. )
  47710. ],
  47711. 1
  47712. )
  47713. ])
  47714. ]
  47715. ),
  47716. _vm._v(" "),
  47717. _c(
  47718. "Modal",
  47719. {
  47720. staticClass: "img-upload-modal",
  47721. attrs: {
  47722. title: _vm.$L("浏览图片空间的图片"),
  47723. "class-name": "simple-modal",
  47724. width: "710",
  47725. styles: { top: "35px", paddingBottom: "35px" }
  47726. },
  47727. model: {
  47728. value: _vm.browseVisible,
  47729. callback: function($$v) {
  47730. _vm.browseVisible = $$v
  47731. },
  47732. expression: "browseVisible"
  47733. }
  47734. },
  47735. [
  47736. _vm.isLoading
  47737. ? _c("div", { staticClass: "browse-load" }, [
  47738. _vm._v(_vm._s(_vm.$L("加载中...")))
  47739. ])
  47740. : _vm._e(),
  47741. _vm._v(" "),
  47742. _c(
  47743. "div",
  47744. {
  47745. ref: "browselistbox",
  47746. staticClass: "browse-list",
  47747. class: _vm.httpType === "input" ? "browse-list-disabled" : ""
  47748. },
  47749. _vm._l(_vm.browseList, function(item) {
  47750. return _c(
  47751. "div",
  47752. {
  47753. staticClass: "browse-item",
  47754. on: {
  47755. click: function($event) {
  47756. return _vm.browseItem(item)
  47757. }
  47758. }
  47759. },
  47760. [
  47761. item.active
  47762. ? _c("Icon", {
  47763. staticClass: "browse-icon",
  47764. attrs: { type: "ios-checkmark-circle" }
  47765. })
  47766. : _vm._e(),
  47767. _vm._v(" "),
  47768. _c("div", {
  47769. staticClass: "browse-img",
  47770. style: { "background-image": "url(" + item.thumb + ")" }
  47771. }),
  47772. _vm._v(" "),
  47773. _c("div", { staticClass: "browse-title" }, [
  47774. _vm._v(_vm._s(item.title))
  47775. ])
  47776. ],
  47777. 1
  47778. )
  47779. }),
  47780. 0
  47781. ),
  47782. _vm._v(" "),
  47783. _c(
  47784. "div",
  47785. {
  47786. staticClass: "img-upload-foot",
  47787. attrs: { slot: "footer" },
  47788. slot: "footer"
  47789. },
  47790. [
  47791. _vm.type !== "callback" && _vm.http && _vm.httpType === ""
  47792. ? _c(
  47793. "div",
  47794. {
  47795. staticClass: "img-upload-foot-input",
  47796. on: {
  47797. click: function($event) {
  47798. _vm.httpType = "input"
  47799. }
  47800. }
  47801. },
  47802. [
  47803. _c("Icon", { attrs: { type: "ios-image", size: "22" } }),
  47804. _vm._v(" "),
  47805. _c("div", { staticClass: "img-upload-foot-httptitle" }, [
  47806. _vm._v(_vm._s(_vm.$L("自定义图片地址")))
  47807. ])
  47808. ],
  47809. 1
  47810. )
  47811. : _vm._e(),
  47812. _vm._v(" "),
  47813. _vm.type !== "callback" && _vm.http && _vm.httpType === "input"
  47814. ? _c(
  47815. "div",
  47816. { staticClass: "img-upload-foot-input" },
  47817. [
  47818. _c(
  47819. "Input",
  47820. {
  47821. attrs: {
  47822. placeholder: _vm.$L("以“http://”或“https://”开头"),
  47823. search: "",
  47824. "enter-button": _vm.$L("确定")
  47825. },
  47826. on: { "on-search": _vm.httpEnter },
  47827. model: {
  47828. value: _vm.httpValue,
  47829. callback: function($$v) {
  47830. _vm.httpValue = $$v
  47831. },
  47832. expression: "httpValue"
  47833. }
  47834. },
  47835. [
  47836. _c(
  47837. "span",
  47838. {
  47839. staticStyle: { cursor: "pointer" },
  47840. attrs: { slot: "prepend" },
  47841. on: {
  47842. click: function($event) {
  47843. _vm.httpType = ""
  47844. }
  47845. },
  47846. slot: "prepend"
  47847. },
  47848. [_vm._v(_vm._s(_vm.$L("自定义地址")) + ": ")]
  47849. )
  47850. ]
  47851. )
  47852. ],
  47853. 1
  47854. )
  47855. : _vm._e(),
  47856. _vm._v(" "),
  47857. _vm.httpType === ""
  47858. ? _c(
  47859. "Button",
  47860. {
  47861. on: {
  47862. click: function($event) {
  47863. _vm.browseVisible = false
  47864. }
  47865. }
  47866. },
  47867. [_vm._v(_vm._s(_vm.$L("关闭")))]
  47868. )
  47869. : _vm._e(),
  47870. _vm._v(" "),
  47871. _vm.httpType === ""
  47872. ? _c(
  47873. "Button",
  47874. {
  47875. attrs: { type: "primary" },
  47876. on: {
  47877. click: function($event) {
  47878. return _vm.handleCallback(true)
  47879. }
  47880. }
  47881. },
  47882. [_vm._v(_vm._s(_vm.$L("完成")))]
  47883. )
  47884. : _vm._e()
  47885. ],
  47886. 1
  47887. )
  47888. ]
  47889. ),
  47890. _vm._v(" "),
  47891. _c(
  47892. "Modal",
  47893. {
  47894. staticClass: "img-upload-modal",
  47895. attrs: {
  47896. title: _vm.$L("查看图片"),
  47897. "class-name": "simple-modal",
  47898. draggable: ""
  47899. },
  47900. model: {
  47901. value: _vm.visible,
  47902. callback: function($$v) {
  47903. _vm.visible = $$v
  47904. },
  47905. expression: "visible"
  47906. }
  47907. },
  47908. [
  47909. _c(
  47910. "div",
  47911. { staticStyle: { "max-height": "480px", overflow: "auto" } },
  47912. [
  47913. _c("a", { attrs: { href: _vm.imgVisible, target: "_blank" } }, [
  47914. _vm.visible
  47915. ? _c("img", {
  47916. staticStyle: {
  47917. "max-width": "100%",
  47918. "max-height": "900px",
  47919. display: "block",
  47920. margin: "0 auto"
  47921. },
  47922. attrs: { src: _vm.imgVisible }
  47923. })
  47924. : _vm._e()
  47925. ])
  47926. ]
  47927. )
  47928. ]
  47929. )
  47930. ],
  47931. 2
  47932. )
  47933. }
  47934. var staticRenderFns = []
  47935. render._withStripped = true
  47936. module.exports = { render: render, staticRenderFns: staticRenderFns }
  47937. if (false) {
  47938. module.hot.accept()
  47939. if (module.hot.data) {
  47940. require("vue-hot-reload-api") .rerender("data-v-55c90fc2", module.exports)
  47941. }
  47942. }
  47943. /***/ }),
  47944. /* 91 */
  47945. /***/ (function(module, exports, __webpack_require__) {
  47946. var disposed = false
  47947. function injectStyle (ssrContext) {
  47948. if (disposed) return
  47949. __webpack_require__(92)
  47950. }
  47951. var normalizeComponent = __webpack_require__(2)
  47952. /* script */
  47953. var __vue_script__ = __webpack_require__(94)
  47954. /* template */
  47955. var __vue_template__ = __webpack_require__(99)
  47956. /* template functional */
  47957. var __vue_template_functional__ = false
  47958. /* styles */
  47959. var __vue_styles__ = injectStyle
  47960. /* scopeId */
  47961. var __vue_scopeId__ = "data-v-1ae87c63"
  47962. /* moduleIdentifier (server only) */
  47963. var __vue_module_identifier__ = null
  47964. var Component = normalizeComponent(
  47965. __vue_script__,
  47966. __vue_template__,
  47967. __vue_template_functional__,
  47968. __vue_styles__,
  47969. __vue_scopeId__,
  47970. __vue_module_identifier__
  47971. )
  47972. Component.options.__file = "resources/assets/js/main/components/project/header/create.vue"
  47973. /* hot reload */
  47974. if (false) {(function () {
  47975. var hotAPI = require("vue-hot-reload-api")
  47976. hotAPI.install(require("vue"), false)
  47977. if (!hotAPI.compatible) return
  47978. module.hot.accept()
  47979. if (!module.hot.data) {
  47980. hotAPI.createRecord("data-v-1ae87c63", Component.options)
  47981. } else {
  47982. hotAPI.reload("data-v-1ae87c63", Component.options)
  47983. }
  47984. module.hot.dispose(function (data) {
  47985. disposed = true
  47986. })
  47987. })()}
  47988. module.exports = Component.exports
  47989. /***/ }),
  47990. /* 92 */
  47991. /***/ (function(module, exports, __webpack_require__) {
  47992. // style-loader: Adds some css to the DOM by adding a <style> tag
  47993. // load the styles
  47994. var content = __webpack_require__(93);
  47995. if(typeof content === 'string') content = [[module.i, content, '']];
  47996. if(content.locals) module.exports = content.locals;
  47997. // add the styles to the DOM
  47998. var update = __webpack_require__(1)("e7232698", content, false, {});
  47999. // Hot Module Replacement
  48000. if(false) {
  48001. // When the styles change, update the <style> tags
  48002. if(!content.locals) {
  48003. module.hot.accept("!!../../../../../../../node_modules/css-loader/index.js!../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-1ae87c63\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./create.vue", function() {
  48004. var newContent = require("!!../../../../../../../node_modules/css-loader/index.js!../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-1ae87c63\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./create.vue");
  48005. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  48006. update(newContent);
  48007. });
  48008. }
  48009. // When the module is disposed, remove the <style> tags
  48010. module.hot.dispose(function() { update(); });
  48011. }
  48012. /***/ }),
  48013. /* 93 */
  48014. /***/ (function(module, exports, __webpack_require__) {
  48015. exports = module.exports = __webpack_require__(0)(false);
  48016. // imports
  48017. // module
  48018. exports.push([module.i, "\n.project-header-create .tableFill[data-v-1ae87c63] {\n margin: 12px 12px 20px;\n}\n", ""]);
  48019. // exports
  48020. /***/ }),
  48021. /* 94 */
  48022. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  48023. "use strict";
  48024. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  48025. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer__ = __webpack_require__(7);
  48026. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer__);
  48027. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_task__ = __webpack_require__(30);
  48028. //
  48029. //
  48030. //
  48031. //
  48032. //
  48033. //
  48034. //
  48035. //
  48036. //
  48037. //
  48038. //
  48039. //
  48040. //
  48041. //
  48042. //
  48043. //
  48044. //
  48045. //
  48046. /**
  48047. * 我创建的任务
  48048. */
  48049. /* harmony default export */ __webpack_exports__["default"] = ({
  48050. name: 'HeaderCreate',
  48051. components: { DrawerTabsContainer: __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer___default.a },
  48052. props: {
  48053. canload: {
  48054. type: Boolean,
  48055. default: true
  48056. }
  48057. },
  48058. mixins: [__WEBPACK_IMPORTED_MODULE_1__mixins_task__["a" /* default */]],
  48059. data: function data() {
  48060. return {
  48061. loadYet: false,
  48062. loadIng: 0,
  48063. columns: [],
  48064. lists: [],
  48065. listPage: 1,
  48066. listTotal: 0,
  48067. noDataText: ""
  48068. };
  48069. },
  48070. mounted: function mounted() {
  48071. var _this = this;
  48072. if (this.canload) {
  48073. this.loadYet = true;
  48074. this.getLists(true);
  48075. }
  48076. $A.setOnTaskInfoListener('components/project/header/create', function (act, detail) {
  48077. if (detail.createuser != _this.usrName) {
  48078. return;
  48079. }
  48080. //
  48081. _this.lists.some(function (task, i) {
  48082. if (task.id == detail.id) {
  48083. _this.lists.splice(i, 1, detail);
  48084. return true;
  48085. }
  48086. });
  48087. //
  48088. switch (act) {
  48089. case "delete":
  48090. // 删除任务
  48091. _this.lists.some(function (task, i) {
  48092. if (task.id == detail.id) {
  48093. _this.lists.splice(i, 1);
  48094. return true;
  48095. }
  48096. });
  48097. break;
  48098. }
  48099. });
  48100. },
  48101. watch: {
  48102. canload: function canload(val) {
  48103. if (val && !this.loadYet) {
  48104. this.loadYet = true;
  48105. this.getLists(true);
  48106. }
  48107. }
  48108. },
  48109. methods: {
  48110. initLanguage: function initLanguage() {
  48111. var _this2 = this;
  48112. this.noDataText = this.$L("数据加载中.....");
  48113. this.columns = [{
  48114. "title": this.$L("任务名称"),
  48115. "key": 'title',
  48116. "minWidth": 120,
  48117. render: function render(h, params) {
  48118. return _this2.renderTaskTitle(h, params);
  48119. }
  48120. }, {
  48121. "title": this.$L("负责人"),
  48122. "key": 'username',
  48123. "minWidth": 80,
  48124. render: function render(h, params) {
  48125. return h('UserView', {
  48126. props: {
  48127. username: params.row.username
  48128. }
  48129. });
  48130. }
  48131. }, {
  48132. "title": this.$L("完成"),
  48133. "minWidth": 70,
  48134. "align": "center",
  48135. render: function render(h, params) {
  48136. return h('span', params.row.complete ? '√' : '-');
  48137. }
  48138. }, {
  48139. "title": this.$L("归档"),
  48140. "minWidth": 70,
  48141. "align": "center",
  48142. render: function render(h, params) {
  48143. return h('span', params.row.archived ? '√' : '-');
  48144. }
  48145. }, {
  48146. "title": this.$L("创建时间"),
  48147. "width": 160,
  48148. render: function render(h, params) {
  48149. return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
  48150. }
  48151. }];
  48152. },
  48153. setPage: function setPage(page) {
  48154. this.listPage = page;
  48155. this.getLists();
  48156. },
  48157. setPageSize: function setPageSize(size) {
  48158. if (Math.max($A.runNum(this.listPageSize), 10) != size) {
  48159. this.listPageSize = size;
  48160. this.getLists();
  48161. }
  48162. },
  48163. getLists: function getLists(resetLoad) {
  48164. var _this3 = this;
  48165. if (resetLoad === true) {
  48166. this.listPage = 1;
  48167. }
  48168. this.loadIng++;
  48169. this.noDataText = this.$L("数据加载中.....");
  48170. $A.apiAjax({
  48171. url: 'project/task/lists',
  48172. data: {
  48173. createuser: 1,
  48174. archived: '全部',
  48175. page: Math.max(this.listPage, 1),
  48176. pagesize: Math.max($A.runNum(this.listPageSize), 10)
  48177. },
  48178. complete: function complete() {
  48179. _this3.loadIng--;
  48180. },
  48181. error: function error() {
  48182. _this3.noDataText = _this3.$L("数据加载失败!");
  48183. },
  48184. success: function success(res) {
  48185. if (res.ret === 1) {
  48186. _this3.lists = res.data.lists;
  48187. _this3.listTotal = res.data.total;
  48188. _this3.noDataText = _this3.$L("没有相关的数据");
  48189. } else {
  48190. _this3.lists = [];
  48191. _this3.listTotal = 0;
  48192. _this3.noDataText = res.msg;
  48193. }
  48194. }
  48195. });
  48196. }
  48197. }
  48198. });
  48199. /***/ }),
  48200. /* 95 */
  48201. /***/ (function(module, exports, __webpack_require__) {
  48202. // style-loader: Adds some css to the DOM by adding a <style> tag
  48203. // load the styles
  48204. var content = __webpack_require__(96);
  48205. if(typeof content === 'string') content = [[module.i, content, '']];
  48206. if(content.locals) module.exports = content.locals;
  48207. // add the styles to the DOM
  48208. var update = __webpack_require__(1)("7490fac2", content, false, {});
  48209. // Hot Module Replacement
  48210. if(false) {
  48211. // When the styles change, update the <style> tags
  48212. if(!content.locals) {
  48213. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-329e9aed\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./DrawerTabsContainer.vue", function() {
  48214. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-329e9aed\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./DrawerTabsContainer.vue");
  48215. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  48216. update(newContent);
  48217. });
  48218. }
  48219. // When the module is disposed, remove the <style> tags
  48220. module.hot.dispose(function() { update(); });
  48221. }
  48222. /***/ }),
  48223. /* 96 */
  48224. /***/ (function(module, exports, __webpack_require__) {
  48225. exports = module.exports = __webpack_require__(0)(false);
  48226. // imports
  48227. // module
  48228. exports.push([module.i, "\n.dtc-main[data-v-329e9aed] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n width: 100%;\n overflow: hidden;\n position: relative;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n}\n.dtc-main .dtc-body[data-v-329e9aed] {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n overflow: auto;\n}\n", ""]);
  48229. // exports
  48230. /***/ }),
  48231. /* 97 */
  48232. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  48233. "use strict";
  48234. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  48235. //
  48236. //
  48237. //
  48238. //
  48239. //
  48240. //
  48241. //
  48242. //
  48243. //
  48244. //
  48245. //
  48246. //
  48247. //
  48248. //
  48249. //
  48250. //
  48251. //
  48252. //
  48253. //
  48254. //
  48255. //
  48256. //
  48257. //
  48258. //
  48259. //
  48260. //
  48261. //
  48262. //
  48263. //
  48264. /* harmony default export */ __webpack_exports__["default"] = ({
  48265. name: 'DrawerTabsContainer',
  48266. data: function data() {
  48267. return {
  48268. idDrawerTabs: false,
  48269. calculateHeight: 0
  48270. };
  48271. },
  48272. mounted: function mounted() {
  48273. var _this = this;
  48274. var el = $A(this.$el);
  48275. var eb = el.parents(".ivu-drawer-body");
  48276. if (eb == 0 || eb.parents(".ivu-drawer-wrap").length == 0) {
  48277. return;
  48278. }
  48279. this.idDrawerTabs = true;
  48280. this.calculateHeight = Math.round(eb.outerHeight() - el.offset().top);
  48281. setInterval(function () {
  48282. _this.calculateHeight = Math.round(eb.outerHeight() - el.offset().top);
  48283. }, 300);
  48284. },
  48285. computed: {
  48286. myStyle: function myStyle() {
  48287. var calculateHeight = this.calculateHeight,
  48288. idDrawerTabs = this.idDrawerTabs;
  48289. if (!idDrawerTabs) {
  48290. return {};
  48291. }
  48292. return {
  48293. height: Math.max(0, calculateHeight - 16) + 'px'
  48294. };
  48295. }
  48296. }
  48297. });
  48298. /***/ }),
  48299. /* 98 */
  48300. /***/ (function(module, exports, __webpack_require__) {
  48301. var render = function() {
  48302. var _vm = this
  48303. var _h = _vm.$createElement
  48304. var _c = _vm._self._c || _h
  48305. return _c(
  48306. "div",
  48307. { class: [_vm.idDrawerTabs ? "dtc-main" : ""], style: _vm.myStyle },
  48308. [
  48309. _c(
  48310. "div",
  48311. { class: [_vm.idDrawerTabs ? "dtc-body" : ""] },
  48312. [_vm._t("default")],
  48313. 2
  48314. )
  48315. ]
  48316. )
  48317. }
  48318. var staticRenderFns = []
  48319. render._withStripped = true
  48320. module.exports = { render: render, staticRenderFns: staticRenderFns }
  48321. if (false) {
  48322. module.hot.accept()
  48323. if (module.hot.data) {
  48324. require("vue-hot-reload-api") .rerender("data-v-329e9aed", module.exports)
  48325. }
  48326. }
  48327. /***/ }),
  48328. /* 99 */
  48329. /***/ (function(module, exports, __webpack_require__) {
  48330. var render = function() {
  48331. var _vm = this
  48332. var _h = _vm.$createElement
  48333. var _c = _vm._self._c || _h
  48334. return _c("drawer-tabs-container", [
  48335. _c(
  48336. "div",
  48337. { staticClass: "project-header-create" },
  48338. [
  48339. _c("Table", {
  48340. ref: "tableRef",
  48341. staticClass: "tableFill",
  48342. attrs: {
  48343. columns: _vm.columns,
  48344. data: _vm.lists,
  48345. loading: _vm.loadIng > 0,
  48346. "no-data-text": _vm.noDataText,
  48347. stripe: ""
  48348. }
  48349. }),
  48350. _vm._v(" "),
  48351. _c("Page", {
  48352. staticClass: "pageBox",
  48353. attrs: {
  48354. total: _vm.listTotal,
  48355. current: _vm.listPage,
  48356. disabled: _vm.loadIng > 0,
  48357. "page-size-opts": [10, 20, 30, 50, 100],
  48358. placement: "top",
  48359. "show-elevator": "",
  48360. "show-sizer": "",
  48361. "show-total": "",
  48362. transfer: "",
  48363. simple: _vm.windowMax768
  48364. },
  48365. on: {
  48366. "on-change": _vm.setPage,
  48367. "on-page-size-change": _vm.setPageSize
  48368. }
  48369. })
  48370. ],
  48371. 1
  48372. )
  48373. ])
  48374. }
  48375. var staticRenderFns = []
  48376. render._withStripped = true
  48377. module.exports = { render: render, staticRenderFns: staticRenderFns }
  48378. if (false) {
  48379. module.hot.accept()
  48380. if (module.hot.data) {
  48381. require("vue-hot-reload-api") .rerender("data-v-1ae87c63", module.exports)
  48382. }
  48383. }
  48384. /***/ }),
  48385. /* 100 */
  48386. /***/ (function(module, exports, __webpack_require__) {
  48387. var disposed = false
  48388. function injectStyle (ssrContext) {
  48389. if (disposed) return
  48390. __webpack_require__(101)
  48391. }
  48392. var normalizeComponent = __webpack_require__(2)
  48393. /* script */
  48394. var __vue_script__ = __webpack_require__(103)
  48395. /* template */
  48396. var __vue_template__ = __webpack_require__(104)
  48397. /* template functional */
  48398. var __vue_template_functional__ = false
  48399. /* styles */
  48400. var __vue_styles__ = injectStyle
  48401. /* scopeId */
  48402. var __vue_scopeId__ = "data-v-fc048eee"
  48403. /* moduleIdentifier (server only) */
  48404. var __vue_module_identifier__ = null
  48405. var Component = normalizeComponent(
  48406. __vue_script__,
  48407. __vue_template__,
  48408. __vue_template_functional__,
  48409. __vue_styles__,
  48410. __vue_scopeId__,
  48411. __vue_module_identifier__
  48412. )
  48413. Component.options.__file = "resources/assets/js/main/components/project/header/archived.vue"
  48414. /* hot reload */
  48415. if (false) {(function () {
  48416. var hotAPI = require("vue-hot-reload-api")
  48417. hotAPI.install(require("vue"), false)
  48418. if (!hotAPI.compatible) return
  48419. module.hot.accept()
  48420. if (!module.hot.data) {
  48421. hotAPI.createRecord("data-v-fc048eee", Component.options)
  48422. } else {
  48423. hotAPI.reload("data-v-fc048eee", Component.options)
  48424. }
  48425. module.hot.dispose(function (data) {
  48426. disposed = true
  48427. })
  48428. })()}
  48429. module.exports = Component.exports
  48430. /***/ }),
  48431. /* 101 */
  48432. /***/ (function(module, exports, __webpack_require__) {
  48433. // style-loader: Adds some css to the DOM by adding a <style> tag
  48434. // load the styles
  48435. var content = __webpack_require__(102);
  48436. if(typeof content === 'string') content = [[module.i, content, '']];
  48437. if(content.locals) module.exports = content.locals;
  48438. // add the styles to the DOM
  48439. var update = __webpack_require__(1)("3ff66afc", content, false, {});
  48440. // Hot Module Replacement
  48441. if(false) {
  48442. // When the styles change, update the <style> tags
  48443. if(!content.locals) {
  48444. module.hot.accept("!!../../../../../../../node_modules/css-loader/index.js!../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-fc048eee\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./archived.vue", function() {
  48445. var newContent = require("!!../../../../../../../node_modules/css-loader/index.js!../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-fc048eee\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./archived.vue");
  48446. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  48447. update(newContent);
  48448. });
  48449. }
  48450. // When the module is disposed, remove the <style> tags
  48451. module.hot.dispose(function() { update(); });
  48452. }
  48453. /***/ }),
  48454. /* 102 */
  48455. /***/ (function(module, exports, __webpack_require__) {
  48456. exports = module.exports = __webpack_require__(0)(false);
  48457. // imports
  48458. // module
  48459. exports.push([module.i, "\n.project-header-archived .tableFill[data-v-fc048eee] {\n margin: 12px 12px 20px;\n}\n", ""]);
  48460. // exports
  48461. /***/ }),
  48462. /* 103 */
  48463. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  48464. "use strict";
  48465. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  48466. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer__ = __webpack_require__(7);
  48467. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer__);
  48468. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_task__ = __webpack_require__(30);
  48469. //
  48470. //
  48471. //
  48472. //
  48473. //
  48474. //
  48475. //
  48476. //
  48477. //
  48478. //
  48479. //
  48480. //
  48481. //
  48482. //
  48483. //
  48484. //
  48485. //
  48486. //
  48487. /**
  48488. * 我归档的任务
  48489. */
  48490. /* harmony default export */ __webpack_exports__["default"] = ({
  48491. name: 'HeaderArchived',
  48492. components: { DrawerTabsContainer: __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer___default.a },
  48493. props: {
  48494. canload: {
  48495. type: Boolean,
  48496. default: true
  48497. }
  48498. },
  48499. mixins: [__WEBPACK_IMPORTED_MODULE_1__mixins_task__["a" /* default */]],
  48500. data: function data() {
  48501. return {
  48502. loadYet: false,
  48503. loadIng: 0,
  48504. columns: [],
  48505. lists: [],
  48506. listPage: 1,
  48507. listTotal: 0,
  48508. noDataText: ""
  48509. };
  48510. },
  48511. mounted: function mounted() {
  48512. var _this = this;
  48513. if (this.canload) {
  48514. this.loadYet = true;
  48515. this.getLists(true);
  48516. }
  48517. $A.setOnTaskInfoListener('components/project/header/archived', function (act, detail) {
  48518. if (detail.username != _this.usrName) {
  48519. _this.lists.some(function (task, i) {
  48520. if (task.id == detail.id) {
  48521. _this.lists.splice(i, 1);
  48522. return true;
  48523. }
  48524. });
  48525. return;
  48526. }
  48527. //
  48528. _this.lists.some(function (task, i) {
  48529. if (task.id == detail.id) {
  48530. _this.lists.splice(i, 1, detail);
  48531. return true;
  48532. }
  48533. });
  48534. //
  48535. switch (act) {
  48536. case "delete": // 删除任务
  48537. case "unarchived":
  48538. // 取消归档
  48539. _this.lists.some(function (task, i) {
  48540. if (task.id == detail.id) {
  48541. _this.lists.splice(i, 1);
  48542. return true;
  48543. }
  48544. });
  48545. break;
  48546. case "archived":
  48547. // 归档
  48548. var has = false;
  48549. _this.lists.some(function (task) {
  48550. if (task.id == detail.id) {
  48551. return has = true;
  48552. }
  48553. });
  48554. if (!has) {
  48555. _this.lists.unshift(detail);
  48556. }
  48557. break;
  48558. }
  48559. });
  48560. },
  48561. watch: {
  48562. canload: function canload(val) {
  48563. if (val && !this.loadYet) {
  48564. this.loadYet = true;
  48565. this.getLists(true);
  48566. }
  48567. }
  48568. },
  48569. methods: {
  48570. initLanguage: function initLanguage() {
  48571. var _this2 = this;
  48572. this.noDataText = this.$L("数据加载中.....");
  48573. this.columns = [{
  48574. "title": this.$L("任务名称"),
  48575. "key": 'title',
  48576. "minWidth": 120,
  48577. render: function render(h, params) {
  48578. return _this2.renderTaskTitle(h, params);
  48579. }
  48580. }, {
  48581. "title": this.$L("创建人"),
  48582. "key": 'createuser',
  48583. "minWidth": 80,
  48584. render: function render(h, params) {
  48585. return h('UserView', {
  48586. props: {
  48587. username: params.row.createuser
  48588. }
  48589. });
  48590. }
  48591. }, {
  48592. "title": this.$L("负责人"),
  48593. "key": 'username',
  48594. "minWidth": 80,
  48595. render: function render(h, params) {
  48596. return h('UserView', {
  48597. props: {
  48598. username: params.row.username
  48599. }
  48600. });
  48601. }
  48602. }, {
  48603. "title": this.$L("完成"),
  48604. "minWidth": 70,
  48605. "align": "center",
  48606. render: function render(h, params) {
  48607. return h('span', params.row.complete ? '√' : '-');
  48608. }
  48609. }, {
  48610. "title": this.$L("归档时间"),
  48611. "width": 160,
  48612. render: function render(h, params) {
  48613. return h('span', $A.formatDate("Y-m-d H:i:s", params.row.archiveddate));
  48614. }
  48615. }, {
  48616. "title": this.$L("操作"),
  48617. "key": 'action',
  48618. "width": 100,
  48619. "align": 'center',
  48620. render: function render(h, params) {
  48621. return h('Button', {
  48622. props: {
  48623. type: 'primary',
  48624. size: 'small'
  48625. },
  48626. style: {
  48627. fontSize: '12px'
  48628. },
  48629. on: {
  48630. click: function click() {
  48631. _this2.$Modal.confirm({
  48632. title: _this2.$L('取消归档'),
  48633. content: _this2.$L('你确定要取消归档吗?'),
  48634. loading: true,
  48635. onOk: function onOk() {
  48636. $A.apiAjax({
  48637. url: 'project/task/edit',
  48638. method: 'post',
  48639. data: {
  48640. act: 'unarchived',
  48641. taskid: params.row.id
  48642. },
  48643. error: function error() {
  48644. _this2.$Modal.remove();
  48645. alert(_this2.$L('网络繁忙,请稍后再试!'));
  48646. },
  48647. success: function success(res) {
  48648. _this2.$Modal.remove();
  48649. _this2.getLists();
  48650. setTimeout(function () {
  48651. if (res.ret === 1) {
  48652. _this2.$Message.success(res.msg);
  48653. $A.triggerTaskInfoListener('unarchived', res.data);
  48654. $A.triggerTaskInfoChange(params.row.id);
  48655. } else {
  48656. _this2.$Modal.error({ title: _this2.$L('温馨提示'), content: res.msg });
  48657. }
  48658. }, 350);
  48659. }
  48660. });
  48661. }
  48662. });
  48663. }
  48664. }
  48665. }, _this2.$L('取消归档'));
  48666. }
  48667. }];
  48668. },
  48669. setPage: function setPage(page) {
  48670. this.listPage = page;
  48671. this.getLists();
  48672. },
  48673. setPageSize: function setPageSize(size) {
  48674. if (Math.max($A.runNum(this.listPageSize), 10) != size) {
  48675. this.listPageSize = size;
  48676. this.getLists();
  48677. }
  48678. },
  48679. getLists: function getLists(resetLoad) {
  48680. var _this3 = this;
  48681. if (resetLoad === true) {
  48682. this.listPage = 1;
  48683. }
  48684. this.loadIng++;
  48685. this.noDataText = this.$L("数据加载中.....");
  48686. $A.apiAjax({
  48687. url: 'project/task/lists',
  48688. data: {
  48689. page: Math.max(this.listPage, 1),
  48690. pagesize: Math.max($A.runNum(this.listPageSize), 10),
  48691. archived: '已归档'
  48692. },
  48693. complete: function complete() {
  48694. _this3.loadIng--;
  48695. },
  48696. error: function error() {
  48697. _this3.noDataText = _this3.$L("数据加载失败!");
  48698. },
  48699. success: function success(res) {
  48700. if (res.ret === 1) {
  48701. _this3.lists = res.data.lists;
  48702. _this3.listTotal = res.data.total;
  48703. _this3.noDataText = _this3.$L("没有相关的数据");
  48704. } else {
  48705. _this3.lists = [];
  48706. _this3.listTotal = 0;
  48707. _this3.noDataText = res.msg;
  48708. }
  48709. }
  48710. });
  48711. }
  48712. }
  48713. });
  48714. /***/ }),
  48715. /* 104 */
  48716. /***/ (function(module, exports, __webpack_require__) {
  48717. var render = function() {
  48718. var _vm = this
  48719. var _h = _vm.$createElement
  48720. var _c = _vm._self._c || _h
  48721. return _c("drawer-tabs-container", [
  48722. _c(
  48723. "div",
  48724. { staticClass: "project-header-archived" },
  48725. [
  48726. _c("Table", {
  48727. ref: "tableRef",
  48728. staticClass: "tableFill",
  48729. attrs: {
  48730. columns: _vm.columns,
  48731. data: _vm.lists,
  48732. loading: _vm.loadIng > 0,
  48733. "no-data-text": _vm.noDataText,
  48734. stripe: ""
  48735. }
  48736. }),
  48737. _vm._v(" "),
  48738. _c("Page", {
  48739. staticClass: "pageBox",
  48740. attrs: {
  48741. total: _vm.listTotal,
  48742. current: _vm.listPage,
  48743. disabled: _vm.loadIng > 0,
  48744. "page-size-opts": [10, 20, 30, 50, 100],
  48745. placement: "top",
  48746. "show-elevator": "",
  48747. "show-sizer": "",
  48748. "show-total": "",
  48749. transfer: "",
  48750. simple: _vm.windowMax768
  48751. },
  48752. on: {
  48753. "on-change": _vm.setPage,
  48754. "on-page-size-change": _vm.setPageSize
  48755. }
  48756. })
  48757. ],
  48758. 1
  48759. )
  48760. ])
  48761. }
  48762. var staticRenderFns = []
  48763. render._withStripped = true
  48764. module.exports = { render: render, staticRenderFns: staticRenderFns }
  48765. if (false) {
  48766. module.hot.accept()
  48767. if (module.hot.data) {
  48768. require("vue-hot-reload-api") .rerender("data-v-fc048eee", module.exports)
  48769. }
  48770. }
  48771. /***/ }),
  48772. /* 105 */
  48773. /***/ (function(module, exports, __webpack_require__) {
  48774. var disposed = false
  48775. function injectStyle (ssrContext) {
  48776. if (disposed) return
  48777. __webpack_require__(106)
  48778. __webpack_require__(108)
  48779. }
  48780. var normalizeComponent = __webpack_require__(2)
  48781. /* script */
  48782. var __vue_script__ = __webpack_require__(110)
  48783. /* template */
  48784. var __vue_template__ = __webpack_require__(124)
  48785. /* template functional */
  48786. var __vue_template_functional__ = false
  48787. /* styles */
  48788. var __vue_styles__ = injectStyle
  48789. /* scopeId */
  48790. var __vue_scopeId__ = "data-v-3f6b8ea0"
  48791. /* moduleIdentifier (server only) */
  48792. var __vue_module_identifier__ = null
  48793. var Component = normalizeComponent(
  48794. __vue_script__,
  48795. __vue_template__,
  48796. __vue_template_functional__,
  48797. __vue_styles__,
  48798. __vue_scopeId__,
  48799. __vue_module_identifier__
  48800. )
  48801. Component.options.__file = "resources/assets/js/main/components/chat/Index.vue"
  48802. /* hot reload */
  48803. if (false) {(function () {
  48804. var hotAPI = require("vue-hot-reload-api")
  48805. hotAPI.install(require("vue"), false)
  48806. if (!hotAPI.compatible) return
  48807. module.hot.accept()
  48808. if (!module.hot.data) {
  48809. hotAPI.createRecord("data-v-3f6b8ea0", Component.options)
  48810. } else {
  48811. hotAPI.reload("data-v-3f6b8ea0", Component.options)
  48812. }
  48813. module.hot.dispose(function (data) {
  48814. disposed = true
  48815. })
  48816. })()}
  48817. module.exports = Component.exports
  48818. /***/ }),
  48819. /* 106 */
  48820. /***/ (function(module, exports, __webpack_require__) {
  48821. // style-loader: Adds some css to the DOM by adding a <style> tag
  48822. // load the styles
  48823. var content = __webpack_require__(107);
  48824. if(typeof content === 'string') content = [[module.i, content, '']];
  48825. if(content.locals) module.exports = content.locals;
  48826. // add the styles to the DOM
  48827. var update = __webpack_require__(1)("75fe3a14", content, false, {});
  48828. // Hot Module Replacement
  48829. if(false) {
  48830. // When the styles change, update the <style> tags
  48831. if(!content.locals) {
  48832. module.hot.accept("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-3f6b8ea0\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Index.vue", function() {
  48833. var newContent = require("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-3f6b8ea0\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Index.vue");
  48834. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  48835. update(newContent);
  48836. });
  48837. }
  48838. // When the module is disposed, remove the <style> tags
  48839. module.hot.dispose(function() { update(); });
  48840. }
  48841. /***/ }),
  48842. /* 107 */
  48843. /***/ (function(module, exports, __webpack_require__) {
  48844. exports = module.exports = __webpack_require__(0)(false);
  48845. // imports
  48846. // module
  48847. exports.push([module.i, "\n.chat-notice-box {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n cursor: pointer;\n}\n.chat-notice-box .chat-notice-userimg {\n width: 42px;\n height: 42px;\n font-size: 20px;\n line-height: 42px;\n border-radius: 4px;\n}\n.chat-notice-box .ivu-notice-with-desc {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 12px;\n}\n.chat-notice-box .chat-notice-btn-box {\n margin-top: 8px;\n margin-bottom: -4px;\n}\n.chat-notice-box .chat-notice-btn-box .ivu-btn {\n margin-right: 12px;\n font-size: 12px;\n min-width: 42px;\n}\n.chat-notice-box .ivu-notice-desc {\n font-size: 13px;\n word-break: break-all;\n line-height: 1.3;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n overflow: hidden;\n -webkit-box-orient: vertical;\n}\n.chat-notice-box .chat-user .user-msg-title .user-view-inline .user-view-name {\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.chat-notice-box .chat-message .manage-title .user-view-inline {\n max-width: 70%;\n}\n.chat-notice-box .chat-message .manage-title .user-view-inline .user-view-name {\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n", ""]);
  48848. // exports
  48849. /***/ }),
  48850. /* 108 */
  48851. /***/ (function(module, exports, __webpack_require__) {
  48852. // style-loader: Adds some css to the DOM by adding a <style> tag
  48853. // load the styles
  48854. var content = __webpack_require__(109);
  48855. if(typeof content === 'string') content = [[module.i, content, '']];
  48856. if(content.locals) module.exports = content.locals;
  48857. // add the styles to the DOM
  48858. var update = __webpack_require__(1)("035002ea", content, false, {});
  48859. // Hot Module Replacement
  48860. if(false) {
  48861. // When the styles change, update the <style> tags
  48862. if(!content.locals) {
  48863. module.hot.accept("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-3f6b8ea0\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./Index.vue", function() {
  48864. var newContent = require("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-3f6b8ea0\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./Index.vue");
  48865. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  48866. update(newContent);
  48867. });
  48868. }
  48869. // When the module is disposed, remove the <style> tags
  48870. module.hot.dispose(function() { update(); });
  48871. }
  48872. /***/ }),
  48873. /* 109 */
  48874. /***/ (function(module, exports, __webpack_require__) {
  48875. exports = module.exports = __webpack_require__(0)(false);
  48876. // imports
  48877. // module
  48878. exports.push([module.i, "\n.chat-index[data-v-3f6b8ea0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.chat-index .chat-none[data-v-3f6b8ea0] {\n height: auto;\n color: #666666;\n padding: 22px 8px;\n text-align: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 0 !important;\n}\n.chat-index .chat-none[data-v-3f6b8ea0]:before {\n display: none;\n}\n.chat-index .chat-more[data-v-3f6b8ea0] {\n color: #666666;\n padding: 18px 0;\n text-align: center;\n cursor: pointer;\n margin: 0 !important;\n}\n.chat-index .chat-more[data-v-3f6b8ea0]:hover {\n color: #444444;\n}\n.chat-index .chat-menu[data-v-3f6b8ea0] {\n background-color: rgba(28, 29, 31, 0.92);\n width: 68px;\n height: 100%;\n padding-top: 20px;\n}\n.chat-index .chat-menu li[data-v-3f6b8ea0] {\n position: relative;\n padding: 12px 0;\n text-align: center;\n font-size: 28px;\n color: #919193;\n background-color: transparent;\n cursor: pointer;\n}\n.chat-index .chat-menu li.self[data-v-3f6b8ea0] {\n cursor: default;\n}\n.chat-index .chat-menu li.self .avatar[data-v-3f6b8ea0] {\n width: 36px;\n height: 36px;\n font-size: 20px;\n border-radius: 3px;\n}\n.chat-index .chat-menu li.active[data-v-3f6b8ea0] {\n color: #ffffff;\n background-color: rgba(255, 255, 255, 0.06);\n}\n.chat-index .chat-menu li:hover > i[data-v-3f6b8ea0] {\n -webkit-transform: scale(1.1);\n transform: scale(1.1);\n}\n.chat-index .chat-menu li > i[data-v-3f6b8ea0] {\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n}\n.chat-index .chat-menu li .chat-num[data-v-3f6b8ea0] {\n position: absolute;\n top: 50%;\n left: 50%;\n height: auto;\n line-height: normal;\n color: #ffffff;\n background-color: #ff0000;\n text-align: center;\n border-radius: 10px;\n padding: 1px 5px;\n font-size: 12px;\n -webkit-transform: scale(0.9) translate(5px, -20px);\n transform: scale(0.9) translate(5px, -20px);\n}\n.chat-index .chat-user[data-v-3f6b8ea0] {\n display: none;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n width: 248px;\n height: 100%;\n background-color: #ffffff;\n border-right: 1px solid #ededed;\n}\n.chat-index .chat-user > li[data-v-3f6b8ea0] {\n position: relative;\n}\n.chat-index .chat-user > li.sreach[data-v-3f6b8ea0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n height: 62px;\n margin: 0;\n padding: 0 12px;\n position: relative;\n cursor: pointer;\n}\n.chat-index .chat-user > li.sreach[data-v-3f6b8ea0]:before {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 1px;\n background-color: rgba(0, 0, 0, 0.06);\n}\n.chat-index .chat-user > li.lists[data-v-3f6b8ea0] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n overflow: auto;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n}\n.chat-index .chat-user > li.lists > ul > li[data-v-3f6b8ea0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n height: 70px;\n padding: 0 12px;\n position: relative;\n cursor: pointer;\n}\n.chat-index .chat-user > li.lists > ul > li[data-v-3f6b8ea0]:before {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 1px;\n background-color: rgba(0, 0, 0, 0.06);\n}\n.chat-index .chat-user > li.lists > ul > li.active[data-v-3f6b8ea0]:before {\n top: 0;\n height: 100%;\n}\n.chat-index .chat-user > li.lists > ul > li .avatar[data-v-3f6b8ea0] {\n -webkit-box-flex: 0;\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n width: 42px;\n height: 42px;\n font-size: 20px;\n border-radius: 4px;\n}\n.chat-index .chat-user > li.lists > ul > li .user-msg-box[data-v-3f6b8ea0] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n padding-left: 12px;\n}\n.chat-index .chat-user > li.lists > ul > li .user-msg-box .user-msg-title[data-v-3f6b8ea0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n line-height: 24px;\n}\n.chat-index .chat-user > li.lists > ul > li .user-msg-box .user-msg-title span[data-v-3f6b8ea0] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n max-width: 130px;\n color: #333333;\n font-size: 14px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.chat-index .chat-user > li.lists > ul > li .user-msg-box .user-msg-title em[data-v-3f6b8ea0] {\n color: #999999;\n font-size: 12px;\n}\n.chat-index .chat-user > li.lists > ul > li .user-msg-box .user-msg-text[data-v-3f6b8ea0] {\n max-width: 170px;\n color: #999999;\n font-size: 12px;\n line-height: 24px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.chat-index .chat-user > li .user-msg-num[data-v-3f6b8ea0] {\n position: absolute;\n top: 6px;\n left: 44px;\n height: auto;\n line-height: normal;\n color: #ffffff;\n background-color: #ff0000;\n text-align: center;\n border-radius: 10px;\n padding: 1px 5px;\n font-size: 12px;\n -webkit-transform: scale(0.9);\n transform: scale(0.9);\n border: 1px solid #ffffff;\n}\n.chat-index .chat-team[data-v-3f6b8ea0] {\n display: none;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n width: 248px;\n height: 100%;\n background-color: #ffffff;\n border-right: 1px solid #ededed;\n}\n.chat-index .chat-team > li[data-v-3f6b8ea0] {\n position: relative;\n}\n.chat-index .chat-team > li.sreach[data-v-3f6b8ea0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n height: 62px;\n margin: 0;\n padding: 0 12px;\n position: relative;\n cursor: pointer;\n}\n.chat-index .chat-team > li.sreach[data-v-3f6b8ea0]:before {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 1px;\n background-color: rgba(0, 0, 0, 0.06);\n}\n.chat-index .chat-team > li.lists[data-v-3f6b8ea0] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n overflow: auto;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n}\n.chat-index .chat-team > li.lists > ul > li[data-v-3f6b8ea0] {\n margin-left: 24px;\n position: relative;\n}\n.chat-index .chat-team > li.lists > ul > li .team-label[data-v-3f6b8ea0] {\n padding-left: 4px;\n margin-top: 6px;\n margin-bottom: 6px;\n height: 34px;\n line-height: 34px;\n border-bottom: 1px solid #efefef;\n}\n.chat-index .chat-team > li.lists > ul > li > ul > li[data-v-3f6b8ea0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n height: 52px;\n cursor: pointer;\n}\n.chat-index .chat-team > li.lists > ul > li > ul > li .avatar[data-v-3f6b8ea0] {\n -webkit-box-flex: 0;\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n width: 30px;\n height: 30px;\n font-size: 16px;\n border-radius: 3px;\n}\n.chat-index .chat-team > li.lists > ul > li > ul > li .team-username[data-v-3f6b8ea0] {\n padding: 0 12px;\n font-size: 14px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.chat-index .chat-message[data-v-3f6b8ea0] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n height: 100%;\n background-color: #F3F3F3;\n position: relative;\n}\n.chat-index .chat-message .manage-title[data-v-3f6b8ea0] {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 3;\n width: 100%;\n height: 62px;\n padding: 0 20px;\n line-height: 62px;\n font-size: 16px;\n font-weight: 500;\n text-align: left;\n background: #ffffff;\n border-bottom: 1px solid #ededed;\n}\n.chat-index .chat-message .manage-title .manage-title-right[data-v-3f6b8ea0] {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 9;\n width: 62px;\n height: 62px;\n line-height: 62px;\n text-align: center;\n font-size: 22px;\n color: #242424;\n}\n.chat-index .chat-message .manage-lists[data-v-3f6b8ea0] {\n position: absolute;\n left: 0;\n top: 62px;\n z-index: 1;\n bottom: 120px;\n width: 100%;\n overflow: auto;\n padding: 8px 0;\n background-color: #E8EBF2;\n}\n.chat-index .chat-message .manage-lists .manage-more[data-v-3f6b8ea0] {\n color: #666666;\n padding: 8px 0;\n text-align: center;\n cursor: pointer;\n}\n.chat-index .chat-message .manage-lists .manage-more[data-v-3f6b8ea0]:hover {\n color: #444444;\n}\n.chat-index .chat-message .manage-lists .manage-lists-message-new[data-v-3f6b8ea0] {\n position: fixed;\n bottom: 130px;\n right: 20px;\n color: #ffffff;\n background-color: rgba(0, 0, 0, 0.6);\n padding: 6px 12px;\n border-radius: 16px;\n font-size: 12px;\n cursor: pointer;\n}\n.chat-index .chat-message .manage-send[data-v-3f6b8ea0] {\n position: absolute;\n left: 0;\n bottom: 0;\n z-index: 2;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n height: 120px;\n background-color: #ffffff;\n border-top: 1px solid #e4e4e4;\n}\n.chat-index .chat-message .manage-send .manage-input[data-v-3f6b8ea0], .chat-index .chat-message .manage-send .manage-input[data-v-3f6b8ea0]:focus {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n -webkit-appearance: none;\n font-size: 14px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0;\n margin: 38px 10px 6px;\n border: 0;\n line-height: 20px;\n -webkit-box-shadow: none;\n box-shadow: none;\n resize: none;\n outline: 0;\n}\n.chat-index .chat-message .manage-send .manage-join[data-v-3f6b8ea0],\n .chat-index .chat-message .manage-send .manage-spin[data-v-3f6b8ea0] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: #ffffff;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.chat-index .chat-message .manage-quick[data-v-3f6b8ea0] {\n position: absolute;\n z-index: 2;\n left: 0;\n right: 0;\n bottom: 79px;\n padding: 8px 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n height: 40px;\n}\n.chat-index .chat-message .manage-quick .quick-item[data-v-3f6b8ea0] {\n color: #444444;\n font-size: 24px;\n margin: 0 7px;\n}\n.chat-index .chat-message .manage-quick .quick-item.voicecam[data-v-3f6b8ea0] {\n font-size: 26px;\n height: 24px;\n line-height: 24px;\n}\n.chat-index .chat-message .manage-quick .quick-item.videocam[data-v-3f6b8ea0] {\n color: #666666;\n font-size: 30px;\n height: 24px;\n line-height: 24px;\n}\n.chat-index .chat-message .manage-quick .emoji-box[data-v-3f6b8ea0] {\n position: absolute;\n left: 0;\n bottom: 40px;\n max-height: 320px;\n width: 100%;\n overflow: auto;\n background-color: #ffffff;\n padding: 12px;\n border-bottom: 1px solid #efefef;\n}\n.chat-index .chat-message .manage-quick .emoji-box .emoji-input[data-v-3f6b8ea0] {\n margin: 6px 0;\n}\n.chat-index .chat-message .manage-quick .emoji-box h5[data-v-3f6b8ea0] {\n padding: 0;\n margin: 8px 0 0 0;\n color: #b1b1b1;\n text-transform: uppercase;\n font-size: 14px;\n cursor: default;\n font-weight: normal;\n}\n.chat-index .chat-message .manage-quick .emoji-box .emojis[data-v-3f6b8ea0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.chat-index .chat-message .manage-quick .emoji-box .emojis[data-v-3f6b8ea0]:after {\n content: \"\";\n -webkit-box-flex: 1;\n -ms-flex: auto;\n flex: auto;\n}\n.chat-index .chat-message .manage-quick .emoji-box .emojis span[data-v-3f6b8ea0] {\n padding: 2px 4px;\n cursor: pointer;\n font-size: 22px;\n}\n.chat-index .chat-message .manage-quick .emoji-box .emojis span[data-v-3f6b8ea0]:hover {\n background: #ececec;\n cursor: pointer;\n}\n.chat-index .chat-message .manage-quick .message-upload[data-v-3f6b8ea0] {\n display: none;\n width: 0;\n height: 0;\n overflow: hidden;\n}\n.chat-index .chat-message .manage-drag-over[data-v-3f6b8ea0] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 3;\n background-color: rgba(255, 255, 255, 0.78);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.chat-index .chat-message .manage-drag-over[data-v-3f6b8ea0]:before {\n content: \"\";\n position: absolute;\n top: 16px;\n left: 16px;\n right: 16px;\n bottom: 16px;\n border: 2px dashed #7b7b7b;\n border-radius: 12px;\n}\n.chat-index .chat-message .manage-drag-over .manage-drag-text[data-v-3f6b8ea0] {\n padding: 12px;\n font-size: 18px;\n color: #666666;\n}\n@media screen and (max-width: 768px) {\n.chat-index .chat-message .manage-lists[data-v-3f6b8ea0] {\n bottom: 96px;\n}\n.chat-index .chat-message .manage-lists .manage-lists-message-new[data-v-3f6b8ea0] {\n bottom: 106px;\n}\n.chat-index .chat-message .manage-send[data-v-3f6b8ea0] {\n height: 96px;\n}\n.chat-index .chat-message .manage-quick[data-v-3f6b8ea0] {\n bottom: 54px;\n}\n.chat-index .chat-message .manage-quick .quick-item[data-v-3f6b8ea0] {\n font-size: 24px;\n margin-right: 8px;\n}\n}\n.chat-index .chat-video[data-v-3f6b8ea0] {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #000000;\n background-size: cover;\n background-position: center center;\n background-repeat: no-repeat;\n z-index: 9;\n}\n.chat-index .chat-video[data-v-3f6b8ea0]:before {\n content: \"\";\n position: absolute;\n left: -10%;\n right: -10%;\n top: -10%;\n bottom: -10%;\n background: inherit;\n -webkit-filter: blur(25px);\n filter: blur(25px);\n z-index: 1;\n}\n.chat-index .chat-video[data-v-3f6b8ea0]:after {\n content: \"\";\n position: absolute;\n left: -10%;\n right: -10%;\n top: -10%;\n bottom: -10%;\n background: rgba(0, 0, 0, 0.82);\n z-index: 2;\n}\n.chat-index .chat-video .video-opacity[data-v-3f6b8ea0] {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n font-size: 26px;\n color: #aaaaaa;\n padding: 24px;\n z-index: 3;\n -webkit-animation: opacity-data-v-3f6b8ea0 2s infinite alternate;\n animation: opacity-data-v-3f6b8ea0 2s infinite alternate;\n}\n@-webkit-keyframes opacity-data-v-3f6b8ea0 {\n0% {\n opacity: 0.1;\n}\n100% {\n opacity: 1;\n}\n}\n@keyframes opacity-data-v-3f6b8ea0 {\n0% {\n opacity: 0.1;\n}\n100% {\n opacity: 1;\n}\n}\n.chat-index .chat-video .video-mini[data-v-3f6b8ea0],\n .chat-index .chat-video .video-active[data-v-3f6b8ea0] {\n position: absolute;\n max-width: 640px;\n max-height: 100%;\n -o-object-fit: cover;\n object-fit: cover;\n -webkit-transition: opacity 1s;\n transition: opacity 1s;\n}\n.chat-index .chat-video .video-active[data-v-3f6b8ea0] {\n top: 0;\n left: 50%;\n width: 100%;\n height: 100%;\n -webkit-transform: rotateY(180deg) translateX(50%);\n transform: rotateY(180deg) translateX(50%);\n z-index: 4;\n}\n.chat-index .chat-video .video-mini[data-v-3f6b8ea0] {\n top: 0;\n right: 0;\n width: 260px;\n height: 180px;\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n z-index: 5;\n}\n.chat-index .chat-video .video-close[data-v-3f6b8ea0] {\n position: absolute;\n max-width: 720px;\n bottom: 18px;\n left: 50%;\n width: 100%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n z-index: 6;\n}\n.chat-index .chat-video .video-close > i[data-v-3f6b8ea0] {\n font-weight: 600;\n font-size: 46px;\n color: #ffffff;\n cursor: pointer;\n}\n.chat-index .chat-video .video-close > i[data-v-3f6b8ea0]:hover {\n color: #ff0000;\n}\n.chat-index .chat-audio[data-v-3f6b8ea0] {\n width: 0;\n height: 0;\n display: none;\n}\n.chat-index .chat-flex[data-v-3f6b8ea0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n@media (max-width: 768px) {\n.chat-index .chat-menu[data-v-3f6b8ea0] {\n width: 50px;\n}\n.chat-index .chat-menu li[data-v-3f6b8ea0] {\n padding: 6px 0;\n margin: 6px 0;\n font-size: 24px;\n}\n.chat-index .chat-menu li.self .avatar[data-v-3f6b8ea0] {\n width: 32px;\n height: 32px;\n font-size: 18px;\n}\n.chat-index .chat-user[data-v-3f6b8ea0],\n .chat-index .chat-team[data-v-3f6b8ea0] {\n display: none;\n position: absolute;\n left: 50px;\n right: 0;\n z-index: 2;\n width: auto;\n}\n.chat-index .chat-user > li.sreach[data-v-3f6b8ea0],\n .chat-index .chat-team > li.sreach[data-v-3f6b8ea0] {\n height: 54px;\n}\n.chat-index .chat-user.chat-tam[data-v-3f6b8ea0],\n .chat-index .chat-team.chat-tam[data-v-3f6b8ea0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.chat-index .chat-message .manage-title[data-v-3f6b8ea0] {\n height: 54px;\n line-height: 54px;\n}\n.chat-index .chat-message .manage-title .manage-title-right[data-v-3f6b8ea0] {\n width: 54px;\n height: 54px;\n line-height: 54px;\n}\n.chat-index .chat-message .manage-lists[data-v-3f6b8ea0] {\n top: 54px;\n}\n}\n", ""]);
  48879. // exports
  48880. /***/ }),
  48881. /* 110 */
  48882. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  48883. "use strict";
  48884. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  48885. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_emoji_picker__ = __webpack_require__(111);
  48886. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_emoji_picker___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue_emoji_picker__);
  48887. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DrawerTabsContainer__ = __webpack_require__(7);
  48888. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DrawerTabsContainer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__DrawerTabsContainer__);
  48889. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_ScrollerY__ = __webpack_require__(56);
  48890. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__components_ScrollerY___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__components_ScrollerY__);
  48891. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Message__ = __webpack_require__(116);
  48892. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Message___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__Message__);
  48893. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ImgUpload__ = __webpack_require__(17);
  48894. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ImgUpload___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__ImgUpload__);
  48895. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Upload__ = __webpack_require__(121);
  48896. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Upload___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__Upload__);
  48897. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  48898. //
  48899. //
  48900. //
  48901. //
  48902. //
  48903. //
  48904. //
  48905. //
  48906. //
  48907. //
  48908. //
  48909. //
  48910. //
  48911. //
  48912. //
  48913. //
  48914. //
  48915. //
  48916. //
  48917. //
  48918. //
  48919. //
  48920. //
  48921. //
  48922. //
  48923. //
  48924. //
  48925. //
  48926. //
  48927. //
  48928. //
  48929. //
  48930. //
  48931. //
  48932. //
  48933. //
  48934. //
  48935. //
  48936. //
  48937. //
  48938. //
  48939. //
  48940. //
  48941. //
  48942. //
  48943. //
  48944. //
  48945. //
  48946. //
  48947. //
  48948. //
  48949. //
  48950. //
  48951. //
  48952. //
  48953. //
  48954. //
  48955. //
  48956. //
  48957. //
  48958. //
  48959. //
  48960. //
  48961. //
  48962. //
  48963. //
  48964. //
  48965. //
  48966. //
  48967. //
  48968. //
  48969. //
  48970. //
  48971. //
  48972. //
  48973. //
  48974. //
  48975. //
  48976. //
  48977. //
  48978. //
  48979. //
  48980. //
  48981. //
  48982. //
  48983. //
  48984. //
  48985. //
  48986. //
  48987. //
  48988. //
  48989. //
  48990. //
  48991. //
  48992. //
  48993. //
  48994. //
  48995. //
  48996. //
  48997. //
  48998. //
  48999. //
  49000. //
  49001. //
  49002. //
  49003. //
  49004. //
  49005. //
  49006. //
  49007. //
  49008. //
  49009. //
  49010. //
  49011. //
  49012. //
  49013. //
  49014. //
  49015. //
  49016. //
  49017. //
  49018. //
  49019. //
  49020. //
  49021. //
  49022. //
  49023. //
  49024. //
  49025. //
  49026. //
  49027. //
  49028. //
  49029. //
  49030. //
  49031. //
  49032. //
  49033. //
  49034. //
  49035. //
  49036. //
  49037. //
  49038. //
  49039. //
  49040. //
  49041. //
  49042. //
  49043. //
  49044. //
  49045. //
  49046. //
  49047. //
  49048. //
  49049. //
  49050. //
  49051. //
  49052. //
  49053. //
  49054. //
  49055. //
  49056. //
  49057. //
  49058. //
  49059. //
  49060. //
  49061. //
  49062. //
  49063. //
  49064. //
  49065. //
  49066. //
  49067. //
  49068. //
  49069. //
  49070. //
  49071. //
  49072. //
  49073. //
  49074. //
  49075. //
  49076. //
  49077. //
  49078. //
  49079. //
  49080. //
  49081. //
  49082. //
  49083. //
  49084. //
  49085. //
  49086. //
  49087. //
  49088. //
  49089. //
  49090. //
  49091. //
  49092. //
  49093. //
  49094. //
  49095. //
  49096. //
  49097. //
  49098. //
  49099. //
  49100. //
  49101. //
  49102. //
  49103. //
  49104. //
  49105. //
  49106. //
  49107. //
  49108. //
  49109. //
  49110. //
  49111. //
  49112. //
  49113. //
  49114. //
  49115. //
  49116. //
  49117. //
  49118. //
  49119. //
  49120. //
  49121. //
  49122. //
  49123. //
  49124. //
  49125. //
  49126. //
  49127. //
  49128. //
  49129. //
  49130. //
  49131. //
  49132. //
  49133. //
  49134. //
  49135. //
  49136. //
  49137. //
  49138. //
  49139. //
  49140. //
  49141. //
  49142. //
  49143. //
  49144. //
  49145. //
  49146. //
  49147. //
  49148. //
  49149. //
  49150. //
  49151. //
  49152. //
  49153. //
  49154. //
  49155. //
  49156. //
  49157. //
  49158. //
  49159. //
  49160. //
  49161. //
  49162. //
  49163. //
  49164. //
  49165. //
  49166. //
  49167. //
  49168. //
  49169. //
  49170. //
  49171. //
  49172. //
  49173. //
  49174. //
  49175. //
  49176. //
  49177. //
  49178. //
  49179. //
  49180. //
  49181. //
  49182. //
  49183. //
  49184. //
  49185. //
  49186. //
  49187. //
  49188. //
  49189. //
  49190. //
  49191. //
  49192. //
  49193. //
  49194. //
  49195. //
  49196. //
  49197. //
  49198. //
  49199. //
  49200. //
  49201. //
  49202. //
  49203. //
  49204. //
  49205. //
  49206. //
  49207. //
  49208. //
  49209. //
  49210. //
  49211. //
  49212. //
  49213. //
  49214. //
  49215. //
  49216. //
  49217. //
  49218. //
  49219. //
  49220. //
  49221. //
  49222. //
  49223. //
  49224. //
  49225. //
  49226. //
  49227. //
  49228. //
  49229. //
  49230. //
  49231. //
  49232. //
  49233. //
  49234. //
  49235. //
  49236. //
  49237. //
  49238. //
  49239. //
  49240. //
  49241. //
  49242. //
  49243. //
  49244. //
  49245. //
  49246. //
  49247. //
  49248. //
  49249. //
  49250. //
  49251. //
  49252. //
  49253. //
  49254. //
  49255. //
  49256. //
  49257. //
  49258. //
  49259. //
  49260. //
  49261. //
  49262. //
  49263. //
  49264. //
  49265. //
  49266. //
  49267. //
  49268. //
  49269. //
  49270. //
  49271. //
  49272. //
  49273. //
  49274. //
  49275. //
  49276. //
  49277. //
  49278. //
  49279. //
  49280. //
  49281. //
  49282. //
  49283. //
  49284. //
  49285. //
  49286. //
  49287. //
  49288. //
  49289. //
  49290. //
  49291. //
  49292. //
  49293. //
  49294. //
  49295. //
  49296. //
  49297. //
  49298. //
  49299. //
  49300. //
  49301. //
  49302. //
  49303. //
  49304. //
  49305. //
  49306. //
  49307. //
  49308. //
  49309. //
  49310. //
  49311. //
  49312. //
  49313. //
  49314. //
  49315. //
  49316. //
  49317. //
  49318. //
  49319. //
  49320. //
  49321. //
  49322. //
  49323. //
  49324. //
  49325. //
  49326. //
  49327. //
  49328. //
  49329. //
  49330. //
  49331. //
  49332. //
  49333. //
  49334. //
  49335. //
  49336. //
  49337. //
  49338. //
  49339. //
  49340. //
  49341. //
  49342. //
  49343. //
  49344. //
  49345. //
  49346. //
  49347. //
  49348. //
  49349. //
  49350. //
  49351. //
  49352. //
  49353. //
  49354. //
  49355. //
  49356. //
  49357. //
  49358. //
  49359. //
  49360. //
  49361. //
  49362. //
  49363. //
  49364. //
  49365. //
  49366. //
  49367. //
  49368. //
  49369. //
  49370. //
  49371. //
  49372. //
  49373. //
  49374. //
  49375. //
  49376. //
  49377. //
  49378. //
  49379. //
  49380. //
  49381. //
  49382. //
  49383. //
  49384. //
  49385. //
  49386. //
  49387. //
  49388. //
  49389. //
  49390. //
  49391. //
  49392. //
  49393. //
  49394. //
  49395. //
  49396. //
  49397. //
  49398. //
  49399. //
  49400. //
  49401. //
  49402. //
  49403. //
  49404. //
  49405. //
  49406. //
  49407. //
  49408. //
  49409. //
  49410. //
  49411. //
  49412. //
  49413. //
  49414. //
  49415. //
  49416. //
  49417. //
  49418. //
  49419. //
  49420. //
  49421. //
  49422. //
  49423. //
  49424. //
  49425. //
  49426. //
  49427. //
  49428. //
  49429. //
  49430. //
  49431. //
  49432. //
  49433. //
  49434. //
  49435. //
  49436. //
  49437. //
  49438. //
  49439. //
  49440. //
  49441. //
  49442. //
  49443. //
  49444. //
  49445. //
  49446. //
  49447. //
  49448. //
  49449. //
  49450. //
  49451. //
  49452. //
  49453. //
  49454. //
  49455. //
  49456. //
  49457. //
  49458. //
  49459. //
  49460. //
  49461. //
  49462. //
  49463. //
  49464. //
  49465. //
  49466. //
  49467. //
  49468. //
  49469. //
  49470. //
  49471. //
  49472. //
  49473. //
  49474. //
  49475. //
  49476. //
  49477. //
  49478. //
  49479. //
  49480. //
  49481. //
  49482. //
  49483. //
  49484. //
  49485. //
  49486. //
  49487. //
  49488. //
  49489. //
  49490. //
  49491. //
  49492. //
  49493. //
  49494. //
  49495. //
  49496. //
  49497. //
  49498. //
  49499. //
  49500. //
  49501. //
  49502. //
  49503. //
  49504. //
  49505. //
  49506. //
  49507. //
  49508. //
  49509. //
  49510. //
  49511. //
  49512. //
  49513. //
  49514. //
  49515. //
  49516. //
  49517. //
  49518. //
  49519. //
  49520. //
  49521. //
  49522. //
  49523. //
  49524. //
  49525. //
  49526. //
  49527. //
  49528. //
  49529. //
  49530. //
  49531. //
  49532. //
  49533. //
  49534. //
  49535. //
  49536. //
  49537. //
  49538. //
  49539. //
  49540. //
  49541. //
  49542. //
  49543. //
  49544. //
  49545. //
  49546. //
  49547. //
  49548. //
  49549. //
  49550. //
  49551. //
  49552. //
  49553. //
  49554. //
  49555. //
  49556. //
  49557. //
  49558. //
  49559. //
  49560. //
  49561. //
  49562. //
  49563. //
  49564. //
  49565. //
  49566. //
  49567. //
  49568. //
  49569. //
  49570. //
  49571. //
  49572. //
  49573. //
  49574. //
  49575. //
  49576. //
  49577. //
  49578. //
  49579. //
  49580. //
  49581. //
  49582. //
  49583. //
  49584. //
  49585. //
  49586. //
  49587. //
  49588. //
  49589. //
  49590. //
  49591. //
  49592. //
  49593. //
  49594. //
  49595. //
  49596. //
  49597. //
  49598. //
  49599. //
  49600. //
  49601. //
  49602. //
  49603. //
  49604. //
  49605. //
  49606. //
  49607. //
  49608. //
  49609. //
  49610. //
  49611. //
  49612. //
  49613. //
  49614. //
  49615. //
  49616. //
  49617. //
  49618. //
  49619. //
  49620. //
  49621. //
  49622. //
  49623. //
  49624. //
  49625. //
  49626. //
  49627. //
  49628. //
  49629. //
  49630. //
  49631. //
  49632. //
  49633. //
  49634. //
  49635. //
  49636. //
  49637. //
  49638. //
  49639. //
  49640. //
  49641. //
  49642. //
  49643. //
  49644. //
  49645. //
  49646. //
  49647. //
  49648. //
  49649. //
  49650. //
  49651. //
  49652. //
  49653. //
  49654. //
  49655. //
  49656. //
  49657. //
  49658. //
  49659. //
  49660. //
  49661. //
  49662. //
  49663. //
  49664. //
  49665. //
  49666. //
  49667. //
  49668. //
  49669. //
  49670. //
  49671. //
  49672. //
  49673. //
  49674. //
  49675. //
  49676. //
  49677. //
  49678. //
  49679. //
  49680. //
  49681. //
  49682. //
  49683. //
  49684. //
  49685. //
  49686. //
  49687. //
  49688. //
  49689. //
  49690. //
  49691. //
  49692. //
  49693. //
  49694. //
  49695. //
  49696. //
  49697. //
  49698. //
  49699. //
  49700. //
  49701. //
  49702. //
  49703. //
  49704. //
  49705. //
  49706. //
  49707. //
  49708. //
  49709. //
  49710. //
  49711. //
  49712. //
  49713. //
  49714. //
  49715. //
  49716. //
  49717. //
  49718. //
  49719. //
  49720. //
  49721. //
  49722. //
  49723. //
  49724. //
  49725. //
  49726. //
  49727. //
  49728. //
  49729. //
  49730. //
  49731. //
  49732. //
  49733. //
  49734. //
  49735. //
  49736. //
  49737. //
  49738. //
  49739. //
  49740. //
  49741. //
  49742. //
  49743. //
  49744. //
  49745. //
  49746. //
  49747. //
  49748. //
  49749. //
  49750. //
  49751. //
  49752. //
  49753. //
  49754. //
  49755. //
  49756. //
  49757. //
  49758. //
  49759. //
  49760. //
  49761. //
  49762. //
  49763. //
  49764. //
  49765. //
  49766. //
  49767. //
  49768. //
  49769. //
  49770. //
  49771. //
  49772. /* harmony default export */ __webpack_exports__["default"] = ({
  49773. name: 'ChatIndex',
  49774. components: { ChatLoad: __WEBPACK_IMPORTED_MODULE_5__Upload___default.a, ImgUpload: __WEBPACK_IMPORTED_MODULE_4__ImgUpload___default.a, ChatMessage: __WEBPACK_IMPORTED_MODULE_3__Message___default.a, EmojiPicker: __WEBPACK_IMPORTED_MODULE_0_vue_emoji_picker___default.a, ScrollerY: __WEBPACK_IMPORTED_MODULE_2__components_ScrollerY___default.a, DrawerTabsContainer: __WEBPACK_IMPORTED_MODULE_1__DrawerTabsContainer___default.a },
  49775. props: {
  49776. value: {
  49777. default: 0
  49778. },
  49779. openWindow: {
  49780. type: Boolean,
  49781. default: false
  49782. }
  49783. },
  49784. data: function data() {
  49785. return {
  49786. loadIng: 0,
  49787. openAlready: false,
  49788. chatTap: 'dialog',
  49789. chatTam: 'dialog',
  49790. messageAudio: window.location.origin + '/audio/',
  49791. dialogSearch: '',
  49792. dialogTarget: {},
  49793. dialogLists: [],
  49794. dialogNoDataText: '',
  49795. dialogDragOver: false,
  49796. teamSearch: '',
  49797. teamReady: false,
  49798. teamLists: {},
  49799. teamNoDataText: '',
  49800. teamCurrentPage: 1,
  49801. teamHasMorePages: false,
  49802. autoBottom: true,
  49803. messageNew: 0,
  49804. messageText: '',
  49805. messageLists: [],
  49806. messageNoDataText: '',
  49807. messageEmojiSearch: '',
  49808. messageCurrentPage: 1,
  49809. messageHasMorePages: false,
  49810. unreadTotal: 0,
  49811. videoUserName: '', //视频对话用户名
  49812. videoUserImg: '', //视频对话用户头像
  49813. videoStartTime: 0, //视频开始时间
  49814. videoInitiator: false, //是否发起人
  49815. videoChat: false, //是否视频通话(否则音频通话)
  49816. videoRtc: null, //视频Rtc
  49817. videoLocalStream: null, //视频流
  49818. systemConfig: $A.jsonParse($A.storage("systemSetting"), {
  49819. callav: ''
  49820. })
  49821. };
  49822. },
  49823. mounted: function mounted() {
  49824. var _this = this;
  49825. this.formatCall();
  49826. this.getSetting();
  49827. //
  49828. window.onChatOpenUserName = function (username) {
  49829. _this.$emit("on-open-notice", username);
  49830. _this.clickDialog(username, true);
  49831. };
  49832. //
  49833. if (this.openWindow) {
  49834. $A.WSOB.connection();
  49835. if (!this.openAlready) {
  49836. this.openAlready = true;
  49837. this.getDialogLists();
  49838. }
  49839. }
  49840. //
  49841. $A.WSOB.setOnMsgListener("chat/index", function (msgDetail) {
  49842. if (msgDetail.username == _this.usrName) {
  49843. return;
  49844. }
  49845. switch (msgDetail.messageType) {
  49846. case 'open':
  49847. if (_this.openWindow) {
  49848. _this.getDialogLists();
  49849. _this.getDialogMessage();
  49850. } else {
  49851. _this.openAlready = false;
  49852. _this.dialogTarget = {};
  49853. }
  49854. break;
  49855. case 'info':
  49856. if (msgDetail.body.type == 'video') {
  49857. _this.videoMessage(msgDetail);
  49858. }
  49859. break;
  49860. case 'user':
  49861. var body = msgDetail.body;
  49862. if (['taskA'].indexOf(body.type) !== -1) {
  49863. return;
  49864. }
  49865. var lasttext = $A.WSOB.getMsgDesc(body);
  49866. _this.unreadTotal += 1;
  49867. _this.addDialog({
  49868. username: body.username,
  49869. userimg: body.userimg,
  49870. lasttext: lasttext,
  49871. lastdate: body.indate,
  49872. unread: body.unread
  49873. });
  49874. if (msgDetail.username == _this.dialogTarget.username) {
  49875. _this.addMessageData(body, true);
  49876. }
  49877. if (!_this.openWindow) {
  49878. _this.$Notice.close('chat-notice');
  49879. _this.$Notice.open({
  49880. name: 'chat-notice',
  49881. duration: 0,
  49882. render: function render(h) {
  49883. return h('div', {
  49884. class: 'chat-notice-box',
  49885. on: {
  49886. click: function click() {
  49887. _this.$Notice.close('chat-notice');
  49888. _this.$emit("on-open-notice", body.username);
  49889. _this.clickDialog(body.username);
  49890. }
  49891. }
  49892. }, [h('UserImg', { class: 'chat-notice-userimg', props: { info: body } }), h('div', { class: 'ivu-notice-with-desc' }, [h('div', { class: 'ivu-notice-title' }, [h('UserView', { props: { username: body.username } })]), h('div', { class: 'ivu-notice-desc' }, lasttext)])]);
  49893. }
  49894. });
  49895. }
  49896. try {
  49897. _this.$refs.messageAudio.play();
  49898. } catch (e) {}
  49899. break;
  49900. }
  49901. });
  49902. $A.WSOB.setOnSpecialListener("chat/index", function (simpleMsg) {
  49903. _this.addDialog({
  49904. username: simpleMsg.target,
  49905. lasttext: $A.WSOB.getMsgDesc(simpleMsg.body),
  49906. lastdate: simpleMsg.body.indate
  49907. });
  49908. if (simpleMsg.target == _this.dialogTarget.username) {
  49909. _this.addMessageData(simpleMsg.body, true);
  49910. }
  49911. });
  49912. },
  49913. watch: {
  49914. usrName: function usrName() {
  49915. this.formatCall();
  49916. },
  49917. chatTap: function chatTap(val) {
  49918. var _this2 = this;
  49919. if (val === 'team' && this.teamReady == false) {
  49920. this.teamReady = true;
  49921. this.getTeamLists();
  49922. } else if (val === 'dialog') {
  49923. this.autoBottom = true;
  49924. this.$nextTick(function () {
  49925. _this2.messageBottomGo();
  49926. });
  49927. }
  49928. },
  49929. openWindow: function openWindow(val) {
  49930. var _this3 = this;
  49931. if (val) {
  49932. $A.WSOB.connection();
  49933. if (!this.openAlready) {
  49934. this.openAlready = true;
  49935. this.getDialogLists();
  49936. }
  49937. }
  49938. //
  49939. var tmpRand = $A.randomString(8);
  49940. this.__openWindowRand = tmpRand;
  49941. setTimeout(function () {
  49942. if (_this3.__openWindowRand !== tmpRand) {
  49943. return;
  49944. }
  49945. $A.WSOB.sendTo('unread', function (res) {
  49946. if (res.status === 1) {
  49947. _this3.unreadTotal = $A.runNum(res.message);
  49948. } else {
  49949. _this3.unreadTotal = 0;
  49950. }
  49951. });
  49952. }, 500);
  49953. },
  49954. unreadTotal: function unreadTotal(val) {
  49955. if (val < 0) {
  49956. this.unreadTotal = 0;
  49957. return;
  49958. }
  49959. this.$emit('input', val);
  49960. },
  49961. dialogTarget: {
  49962. handler: function handler() {
  49963. var username = this.dialogTarget.username;
  49964. if (username === this.__dialogTargetUsername) {
  49965. return;
  49966. }
  49967. this.__dialogTargetUsername = username;
  49968. this.getDialogMessage();
  49969. },
  49970. deep: true
  49971. }
  49972. },
  49973. computed: {
  49974. dialogListsS: function dialogListsS() {
  49975. var _this4 = this;
  49976. return this.dialogLists.filter(function (item) {
  49977. return (item.username + "").indexOf(_this4.dialogSearch) > -1 || (item.lasttext + "").indexOf(_this4.dialogSearch) > -1 || (item.nickname + "").indexOf(_this4.dialogSearch) > -1;
  49978. });
  49979. },
  49980. teamListsS: function teamListsS() {
  49981. return function (lists) {
  49982. var _this5 = this;
  49983. return lists.filter(function (item) {
  49984. return (item.username + "").indexOf(_this5.teamSearch) > -1 || (item.nickname + "").indexOf(_this5.teamSearch) > -1;
  49985. });
  49986. };
  49987. }
  49988. },
  49989. methods: {
  49990. initLanguage: function initLanguage() {
  49991. this.dialogNoDataText = this.$L("数据加载中.....");
  49992. this.teamNoDataText = this.$L("数据加载中.....");
  49993. this.messageNoDataText = this.$L("数据加载中.....");
  49994. },
  49995. formatCall: function formatCall() {
  49996. var _this6 = this;
  49997. if ($A.getToken() === false) {
  49998. return;
  49999. }
  50000. $A.WSOB.sendTo('unread', function (res) {
  50001. if (res.status === 1) {
  50002. _this6.unreadTotal = $A.runNum(res.message);
  50003. } else {
  50004. _this6.unreadTotal = 0;
  50005. }
  50006. });
  50007. this.getDialogLists();
  50008. this.messageBottomAuto();
  50009. },
  50010. getSetting: function getSetting() {
  50011. var _this7 = this;
  50012. $A.apiAjax({
  50013. url: 'system/setting',
  50014. error: function error() {
  50015. $A.storage("systemSetting", {});
  50016. },
  50017. success: function success(res) {
  50018. if (res.ret === 1) {
  50019. _this7.systemConfig = res.data;
  50020. _this7.systemConfig.callav = _this7.systemConfig.callav || 'open';
  50021. $A.storage("systemSetting", _this7.systemConfig);
  50022. } else {
  50023. $A.storage("systemSetting", {});
  50024. }
  50025. }
  50026. });
  50027. },
  50028. formatCDate: function formatCDate(v) {
  50029. var string = '';
  50030. if ($A.runNum(v) > 0) {
  50031. if ($A.formatDate('Ymd') === $A.formatDate('Ymd', v)) {
  50032. string = $A.formatDate('H:i', v);
  50033. } else if ($A.formatDate('Y') === $A.formatDate('Y', v)) {
  50034. string = $A.formatDate('m-d', v);
  50035. } else {
  50036. string = $A.formatDate('Y-m-d', v);
  50037. }
  50038. }
  50039. return string || '';
  50040. },
  50041. getDialogLists: function getDialogLists() {
  50042. var _this8 = this;
  50043. if (!this.openAlready) {
  50044. return;
  50045. }
  50046. this.loadIng++;
  50047. this.dialogNoDataText = this.$L("数据加载中.....");
  50048. $A.apiAjax({
  50049. url: 'chat/dialog/lists',
  50050. complete: function complete() {
  50051. _this8.loadIng--;
  50052. },
  50053. error: function error() {
  50054. _this8.dialogNoDataText = _this8.$L("数据加载失败!");
  50055. },
  50056. success: function success(res) {
  50057. if (res.ret === 1) {
  50058. _this8.dialogLists = res.data;
  50059. _this8.dialogNoDataText = _this8.$L("没有相关的数据");
  50060. _this8.scrollToActive();
  50061. } else {
  50062. _this8.dialogLists = [];
  50063. _this8.dialogNoDataText = res.msg;
  50064. }
  50065. }
  50066. });
  50067. },
  50068. getDialogMessage: function getDialogMessage() {
  50069. var _this9 = this;
  50070. var isNextPage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  50071. var username = this.dialogTarget.username;
  50072. if (!username) {
  50073. return;
  50074. }
  50075. //
  50076. if (isNextPage === true) {
  50077. if (!this.messageHasMorePages) {
  50078. return;
  50079. }
  50080. this.messageCurrentPage += 1;
  50081. } else {
  50082. this.messageCurrentPage = 1;
  50083. this.autoBottom = true;
  50084. this.messageNew = 0;
  50085. this.messageLists = [];
  50086. }
  50087. this.messageHasMorePages = false;
  50088. //
  50089. this.loadIng++;
  50090. this.messageNoDataText = this.$L("数据加载中.....");
  50091. $A.apiAjax({
  50092. url: 'chat/message/lists',
  50093. data: {
  50094. username: username,
  50095. page: this.messageCurrentPage,
  50096. pagesize: 30
  50097. },
  50098. complete: function complete() {
  50099. _this9.loadIng--;
  50100. },
  50101. error: function error() {
  50102. _this9.messageNoDataText = _this9.$L("数据加载失败!");
  50103. },
  50104. success: function success(res) {
  50105. if (username != _this9.dialogTarget.username) {
  50106. return;
  50107. }
  50108. if (res.ret === 1) {
  50109. var tempId = "notice_" + $A.randomString(6);
  50110. var tempLists = res.data.lists;
  50111. if (isNextPage) {
  50112. _this9.addMessageData({
  50113. id: tempId,
  50114. type: 'notice',
  50115. notice: _this9.$L('历史消息')
  50116. }, false, isNextPage);
  50117. } else {
  50118. tempLists = tempLists.reverse();
  50119. }
  50120. tempLists.forEach(function (item) {
  50121. _this9.addMessageData(Object.assign(item.message, {
  50122. id: item.id,
  50123. username: item.username,
  50124. userimg: item.userimg,
  50125. indate: item.indate
  50126. }), false, isNextPage);
  50127. });
  50128. if (isNextPage) {
  50129. _this9.$nextTick(function () {
  50130. var tempObj = $A('div[data-id="' + tempId + '"]');
  50131. if (tempObj.length > 0) {
  50132. _this9.$refs.manageLists.scrollTo(tempObj.offset().top - tempObj.height() - 24, false);
  50133. }
  50134. });
  50135. }
  50136. _this9.messageNoDataText = '';
  50137. _this9.messageHasMorePages = res.data.hasMorePages;
  50138. } else {
  50139. _this9.messageNoDataText = res.msg;
  50140. _this9.messageHasMorePages = false;
  50141. }
  50142. }
  50143. });
  50144. },
  50145. getTeamLists: function getTeamLists() {
  50146. var _this10 = this;
  50147. var isNextPage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  50148. if (isNextPage === true) {
  50149. if (!this.teamHasMorePages) {
  50150. return;
  50151. }
  50152. this.teamCurrentPage += 1;
  50153. } else {
  50154. this.teamCurrentPage = 1;
  50155. }
  50156. this.teamHasMorePages = false;
  50157. //
  50158. this.loadIng++;
  50159. this.teamNoDataText = this.$L("数据加载中.....");
  50160. $A.apiAjax({
  50161. url: 'users/team/lists',
  50162. data: {
  50163. sorts: {
  50164. key: 'az',
  50165. order: 'asc'
  50166. },
  50167. page: this.teamCurrentPage,
  50168. pagesize: 100
  50169. },
  50170. complete: function complete() {
  50171. _this10.loadIng--;
  50172. },
  50173. error: function error() {
  50174. _this10.teamNoDataText = _this10.$L("数据加载失败!");
  50175. },
  50176. success: function success(res) {
  50177. if (res.ret === 1) {
  50178. res.data.lists.forEach(function (item) {
  50179. if (typeof _this10.teamLists[item.az] === "undefined") {
  50180. _this10.$set(_this10.teamLists, item.az, []);
  50181. }
  50182. _this10.teamLists[item.az].push(item);
  50183. });
  50184. _this10.teamNoDataText = _this10.$L("没有相关的数据");
  50185. _this10.teamHasMorePages = res.data.hasMorePages;
  50186. //
  50187. if (_this10.teamHasMorePages && res.data.currentPage < 5) {
  50188. _this10.getTeamLists(true);
  50189. }
  50190. } else {
  50191. _this10.teamLists = {};
  50192. _this10.teamNoDataText = res.msg;
  50193. _this10.teamHasMorePages = false;
  50194. }
  50195. }
  50196. });
  50197. },
  50198. addDialog: function addDialog(data) {
  50199. if (!data.username) {
  50200. return;
  50201. }
  50202. var lists = this.dialogLists.filter(function (item) {
  50203. return item.username == data.username;
  50204. });
  50205. var unread = 0;
  50206. if (lists.length > 0) {
  50207. if (typeof data.userimg === "undefined") {
  50208. data.userimg = lists[0].userimg;
  50209. }
  50210. unread = $A.runNum(lists[0].unread);
  50211. this.dialogLists = this.dialogLists.filter(function (item) {
  50212. return item.username != data.username;
  50213. });
  50214. }
  50215. if (typeof data.unread === "undefined") {
  50216. data.unread = unread;
  50217. }
  50218. this.dialogLists.unshift(data);
  50219. },
  50220. openDialog: function openDialog(user) {
  50221. var autoAddDialog = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  50222. if (autoAddDialog === true) {
  50223. var lists = this.dialogLists.filter(function (item) {
  50224. return item.username == user.username;
  50225. });
  50226. if (lists.length === 0) {
  50227. this.addDialog(user);
  50228. }
  50229. }
  50230. this.chatTap = 'dialog';
  50231. this.chatTam = '';
  50232. this.dialogTarget = user;
  50233. if (typeof user.unread === "number" && user.unread > 0) {
  50234. this.unreadTotal -= user.unread;
  50235. this.$set(user, 'unread', 0);
  50236. $A.WSOB.sendTo('read', user.username);
  50237. }
  50238. if (autoAddDialog === true) {
  50239. this.scrollToActive();
  50240. }
  50241. },
  50242. scrollToActive: function scrollToActive() {
  50243. var _this11 = this;
  50244. //自动滚到焦点
  50245. this.$nextTick(function () {
  50246. var dialogObj = $A(_this11.$refs.dialogLists);
  50247. var activeObj = dialogObj.find("li.active");
  50248. if (activeObj.length > 0) {
  50249. var offsetTop = activeObj.offset().top;
  50250. if (offsetTop < 0) {
  50251. dialogObj.stop().scrollTop(activeObj[0].offsetTop - 50);
  50252. } else if (offsetTop > dialogObj.height()) {
  50253. dialogObj.stop().scrollTop(activeObj[0].offsetTop + 50 + activeObj.height() - dialogObj.height());
  50254. }
  50255. }
  50256. });
  50257. },
  50258. clickDialog: function clickDialog(username) {
  50259. var _this12 = this;
  50260. var autoPush = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  50261. var lists = this.dialogLists.filter(function (item) {
  50262. return item.username == username;
  50263. });
  50264. if (lists.length > 0) {
  50265. this.openDialog(lists[0]);
  50266. if (autoPush === true) {
  50267. this.scrollToActive();
  50268. }
  50269. } else if (autoPush === true) {
  50270. $A.apiAjax({
  50271. url: 'users/team/lists',
  50272. data: {
  50273. username: username
  50274. },
  50275. success: function success(res) {
  50276. if (res.ret === 1 && $A.isPlainObject(res.data)) {
  50277. _this12.$nextTick(function () {
  50278. typeof _this12.dialogTarget.username === "undefined" && _this12.openDialog(res.data, true);
  50279. });
  50280. }
  50281. }
  50282. });
  50283. }
  50284. },
  50285. dialogDropdown: function dialogDropdown(type) {
  50286. var _this13 = this;
  50287. switch (type) {
  50288. case 'clear':
  50289. case 'delete':
  50290. this.$Modal.confirm({
  50291. title: this.$L('确认操作'),
  50292. content: type === 'delete' ? this.$L('你确定要删除此对话吗?') : this.$L('你确定要清除聊天记录吗?'),
  50293. loading: true,
  50294. onOk: function onOk() {
  50295. var username = _this13.dialogTarget.username;
  50296. $A.apiAjax({
  50297. url: 'chat/dialog/clear',
  50298. data: {
  50299. username: username,
  50300. delete: type === 'delete' ? 1 : 0
  50301. },
  50302. error: function error() {
  50303. _this13.$Modal.remove();
  50304. alert(_this13.$L('网络繁忙,请稍后再试!'));
  50305. },
  50306. success: function success(res) {
  50307. _this13.$Modal.remove();
  50308. if (res.ret === 1) {
  50309. if (type === 'delete') {
  50310. _this13.dialogLists = _this13.dialogLists.filter(function (item) {
  50311. return item.username != username;
  50312. });
  50313. _this13.dialogTarget = {};
  50314. } else {
  50315. _this13.$set(_this13.dialogTarget, 'lasttext', '');
  50316. _this13.getDialogMessage();
  50317. }
  50318. }
  50319. setTimeout(function () {
  50320. if (res.ret === 1) {
  50321. _this13.$Message.success(res.msg);
  50322. } else {
  50323. _this13.$Modal.error({ title: _this13.$L('温馨提示'), content: res.msg });
  50324. }
  50325. }, 350);
  50326. }
  50327. });
  50328. }
  50329. });
  50330. break;
  50331. }
  50332. },
  50333. messageListsScroll: function messageListsScroll(res) {
  50334. if (res.directionreal === 'up') {
  50335. if (res.scrollE < 10) {
  50336. this.autoBottom = true;
  50337. }
  50338. } else if (res.directionreal === 'down') {
  50339. this.autoBottom = false;
  50340. }
  50341. },
  50342. messageBottomAuto: function messageBottomAuto() {
  50343. var _this14 = this;
  50344. var randString = $A.randomString(8);
  50345. window.__messageBottomAuto = randString;
  50346. setTimeout(function () {
  50347. if (randString === window.__messageBottomAuto) {
  50348. window.__messageBottomAuto = null;
  50349. if (_this14.autoBottom) {
  50350. _this14.messageBottomGo();
  50351. }
  50352. _this14.messageBottomAuto();
  50353. }
  50354. }, 1000);
  50355. },
  50356. messageBottomGo: function messageBottomGo() {
  50357. var _this15 = this;
  50358. var animation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  50359. this.$nextTick(function () {
  50360. _this15.messageNew = 0;
  50361. if (typeof _this15.$refs.manageLists !== "undefined") {
  50362. _this15.$refs.manageLists.scrollTo(_this15.$refs.manageBody.clientHeight, animation);
  50363. _this15.autoBottom = true;
  50364. }
  50365. });
  50366. },
  50367. messageInsertText: function messageInsertText(emoji) {
  50368. this.messageText += emoji;
  50369. },
  50370. messageInsertFile: function messageInsertFile(item) {
  50371. var _this16 = this;
  50372. if ((typeof item === "undefined" ? "undefined" : _typeof(item)) === 'object' && typeof item.url === "string") {
  50373. var data = {
  50374. type: ['jpg', 'jpeg', 'png', 'gif'].indexOf(item.ext) !== -1 ? 'image' : 'file',
  50375. filename: item.name,
  50376. filesize: item.size,
  50377. filethumb: item.thumb,
  50378. username: this.usrInfo.username,
  50379. userimg: this.usrInfo.userimg,
  50380. indate: Math.round(new Date().getTime() / 1000),
  50381. url: item.url,
  50382. width: $A.getObject(item, 'response.data.width'),
  50383. height: $A.getObject(item, 'response.data.height'),
  50384. replaceId: item.tempId
  50385. };
  50386. $A.WSOB.sendTo('user', this.dialogTarget.username, data, function (res) {
  50387. _this16.$set(data, res.status === 1 ? 'id' : 'error', res.message);
  50388. });
  50389. //
  50390. this.addDialog(Object.assign(this.dialogTarget, {
  50391. lasttext: this.$L(data.type == 'image' ? '[图片]' : '[文件]'),
  50392. lastdate: data.indate
  50393. }));
  50394. this.openDialog(this.dialogTarget);
  50395. this.addMessageData(data, true);
  50396. }
  50397. },
  50398. addMessageData: function addMessageData(data) {
  50399. var _this17 = this;
  50400. var animation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  50401. var isUnshift = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  50402. data.self = data.username === this.usrInfo.username;
  50403. var sikp = false;
  50404. if (data.id || data.replaceId) {
  50405. this.messageLists.some(function (item, index) {
  50406. if (item.id == data.id || item.id == data.replaceId) {
  50407. data.nickname = data.nickname || item.nickname;
  50408. _this17.messageLists.splice(index, 1, data);
  50409. return sikp = true;
  50410. }
  50411. });
  50412. if (sikp) {
  50413. return;
  50414. }
  50415. }
  50416. if (isUnshift) {
  50417. this.messageLists.unshift(data);
  50418. } else {
  50419. this.messageLists.push(data);
  50420. if (this.autoBottom) {
  50421. this.messageBottomGo(animation);
  50422. } else {
  50423. this.messageNew++;
  50424. }
  50425. }
  50426. },
  50427. messageSend: function messageSend(e) {
  50428. if (e.keyCode == 13) {
  50429. if (e.shiftKey) {
  50430. return;
  50431. }
  50432. e.preventDefault();
  50433. this.messageSubmit();
  50434. }
  50435. },
  50436. messageDragOver: function messageDragOver(show) {
  50437. var _this18 = this;
  50438. var random = this.__dialogDragOver = $A.randomString(8);
  50439. if (!show) {
  50440. setTimeout(function () {
  50441. if (random === _this18.__dialogDragOver) {
  50442. _this18.dialogDragOver = show;
  50443. }
  50444. }, 150);
  50445. } else {
  50446. this.dialogDragOver = show;
  50447. }
  50448. },
  50449. messagePasteDrag: function messagePasteDrag(e, type) {
  50450. var _this19 = this;
  50451. this.dialogDragOver = false;
  50452. var files = type === 'drag' ? e.dataTransfer.files : e.clipboardData.files;
  50453. var postFiles = Array.prototype.slice.call(files);
  50454. if (postFiles.length > 0) {
  50455. e.preventDefault();
  50456. postFiles.forEach(function (file) {
  50457. _this19.$refs.messageUpload.upload(file);
  50458. });
  50459. }
  50460. },
  50461. messageFile: function messageFile(type, file) {
  50462. var _this20 = this;
  50463. switch (type) {
  50464. case 'progress':
  50465. this.addMessageData({
  50466. id: file.tempId,
  50467. type: 'image',
  50468. username: this.usrInfo.username,
  50469. userimg: this.usrInfo.userimg,
  50470. indate: Math.round(new Date().getTime() / 1000),
  50471. url: 'loading'
  50472. }, true);
  50473. break;
  50474. case 'error':
  50475. this.messageLists.some(function (item, index) {
  50476. if (item.id == file.tempId) {
  50477. _this20.messageLists.splice(index, 1);
  50478. return true;
  50479. }
  50480. });
  50481. break;
  50482. case 'success':
  50483. this.messageInsertFile(file);
  50484. break;
  50485. }
  50486. },
  50487. messageSubmit: function messageSubmit() {
  50488. var _this21 = this;
  50489. var dialogUser = this.dialogLists.filter(function (item) {
  50490. return item.username == _this21.dialogTarget.username;
  50491. });
  50492. if (dialogUser.length > 0) {
  50493. var user = dialogUser[0];
  50494. if (typeof user.unread === "number" && user.unread > 0) {
  50495. this.unreadTotal -= user.unread;
  50496. this.$set(user, 'unread', 0);
  50497. $A.WSOB.sendTo('read', user.username);
  50498. }
  50499. }
  50500. //
  50501. this.autoBottom = true;
  50502. var text = this.messageText.trim();
  50503. if ($A.count(text) > 0) {
  50504. var data = {
  50505. type: 'text',
  50506. username: this.usrInfo.username,
  50507. userimg: this.usrInfo.userimg,
  50508. indate: Math.round(new Date().getTime() / 1000),
  50509. text: text
  50510. };
  50511. $A.WSOB.sendTo('user', this.dialogTarget.username, data, function (res) {
  50512. _this21.$set(data, res.status === 1 ? 'id' : 'error', res.message);
  50513. });
  50514. //
  50515. this.addDialog(Object.assign(this.dialogTarget, {
  50516. lasttext: text,
  50517. lastdate: data.indate
  50518. }));
  50519. this.openDialog(this.dialogTarget);
  50520. this.addMessageData(data, true);
  50521. }
  50522. this.$nextTick(function () {
  50523. _this21.messageText = "";
  50524. });
  50525. },
  50526. userViewResult: function userViewResult(user, data) {
  50527. this.$set(user, 'nickname', data.nickname);
  50528. this.$set(user, 'userimg', data.userimg);
  50529. },
  50530. videoConnect: function videoConnect(username, videoChat) {
  50531. var _this22 = this;
  50532. if (!$A.leftExists(window.location.protocol, "https")) {
  50533. this.$Modal.warning({ title: this.$L('温馨提示'), content: this.$L('浏览器阻止音视频访问不是https的网站,所以尝试安装SSL!') });
  50534. return;
  50535. }
  50536. this.videoChat = videoChat;
  50537. navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
  50538. try {
  50539. navigator.mediaDevices.getUserMedia({
  50540. audio: true,
  50541. video: this.videoChat
  50542. }).then(function (stream) {
  50543. _this22.videoLocalStream = stream;
  50544. _this22.$refs.localVideo.srcObject = stream;
  50545. _this22.$refs.localVideo.removeEventListener('loadedmetadata', _this22.videoListener);
  50546. //
  50547. if (username === null) {
  50548. // 发起者
  50549. _this22.videoUserName = _this22.dialogTarget.username;
  50550. _this22.videoUserImg = _this22.dialogTarget.userimg;
  50551. _this22.videoStartTime = 0;
  50552. _this22.videoInitiator = true;
  50553. _this22.$refs.localVideo.addEventListener('loadedmetadata', _this22.videoListener);
  50554. } else {
  50555. // 接受者
  50556. _this22.videoIcecandidate(_this22.videoLocalStream, username);
  50557. _this22.videoRtc.createOffer({
  50558. offerToReceiveAudio: true,
  50559. offerToReceiveVideo: _this22.videoChat
  50560. }).then(function (desc) {
  50561. _this22.videoRtc.setLocalDescription(desc).then(function () {
  50562. $A.WSOB.sendTo('info', username, {
  50563. 'type': 'video',
  50564. 'subtype': 'offer',
  50565. 'data': _this22.videoRtc.localDescription
  50566. });
  50567. }).catch(function (e) {
  50568. _this22.$Modal.warning({ title: _this22.$L('温馨提示'), content: e });
  50569. _this22.videoClose(username, _this22.$L('对方:') + e);
  50570. });
  50571. }).catch(function (e) {
  50572. _this22.$Modal.warning({ title: _this22.$L('温馨提示'), content: e });
  50573. _this22.videoClose(username, _this22.$L('对方:') + e);
  50574. });
  50575. }
  50576. }).catch(function (e) {
  50577. _this22.$Modal.warning({ title: _this22.$L('温馨提示'), content: e });
  50578. username && _this22.videoClose(username, _this22.$L('对方:') + e);
  50579. });
  50580. } catch (e) {
  50581. this.$Modal.warning({ title: this.$L('温馨提示'), content: this.$L('当前浏览器不支持音视频通话!') });
  50582. username && this.videoClose(username, this.$L('对方:') + this.$L('浏览器不支持音视频通话!'));
  50583. }
  50584. },
  50585. videoListener: function videoListener() {
  50586. var _this23 = this;
  50587. $A.WSOB.sendTo('info', this.videoUserName, {
  50588. 'type': 'video',
  50589. 'subtype': 'call',
  50590. 'username': this.usrInfo.username,
  50591. 'userimg': this.usrInfo.userimg,
  50592. 'video': this.videoChat
  50593. }, function (res) {
  50594. if (res.status !== 1) {
  50595. _this23.videoClose(_this23.videoUserName, _this23.$L('呼叫失败!'));
  50596. }
  50597. });
  50598. },
  50599. videoIcecandidate: function videoIcecandidate(localStream, username) {
  50600. var _this24 = this;
  50601. this.videoRtc = new RTCPeerConnection({ "iceServers": [{ "urls": ["turn:business.swoole.com:3478?transport=udp", "turn:business.swoole.com:3478?transport=tcp"], "username": "ceshi", "credential": "ceshi" }] });
  50602. this.videoRtc.onicecandidate = function (event) {
  50603. if (event.candidate) {
  50604. $A.WSOB.sendTo('info', username, {
  50605. 'type': 'video',
  50606. 'subtype': 'candidate',
  50607. 'data': event.candidate
  50608. });
  50609. }
  50610. };
  50611. try {
  50612. this.videoRtc.addStream(localStream);
  50613. } catch (e) {
  50614. var tracks = localStream.getTracks();
  50615. for (var i = 0; i < tracks.length; i++) {
  50616. this.videoRtc.addTrack(tracks[i], localStream);
  50617. }
  50618. }
  50619. this.videoRtc.onaddstream = function (e) {
  50620. _this24.$refs.remoteVideo.srcObject = e.stream;
  50621. };
  50622. },
  50623. videoClose: function videoClose(username, reason) {
  50624. if (username && reason !== false) {
  50625. $A.WSOB.sendTo('info', username, {
  50626. 'type': 'video',
  50627. 'subtype': 'close',
  50628. 'reason': reason
  50629. });
  50630. }
  50631. if (this.videoInitiator) {
  50632. this.videoInitiator = false;
  50633. if (this.videoStartTime > 0) {
  50634. var second = Math.round(new Date().getTime() / 1000) - this.videoStartTime;
  50635. if (second >= 2) {
  50636. $A.WSOB.sendTo('user', this.videoUserName, {
  50637. type: this.videoChat ? 'video' : 'voice',
  50638. username: this.usrInfo.username,
  50639. userimg: this.usrInfo.userimg,
  50640. indate: Math.round(new Date().getTime() / 1000),
  50641. text: this.videoChat ? '视频通话' : '语音通话',
  50642. other: {
  50643. second: second
  50644. }
  50645. }, 'special');
  50646. }
  50647. }
  50648. }
  50649. if (username == this.videoUserName) {
  50650. this.videoUserName = '';
  50651. this.videoUserImg = '';
  50652. this.videoStartTime = 0;
  50653. if (this.videoLocalStream !== null) {
  50654. this.videoLocalStream.getTracks().forEach(function (track) {
  50655. track.stop();
  50656. });
  50657. this.videoLocalStream = null;
  50658. }
  50659. this.$refs.localVideo.srcObject = null;
  50660. this.$refs.remoteVideo.srcObject = null;
  50661. }
  50662. },
  50663. videoMessage: function videoMessage(msgDetail) {
  50664. var _this25 = this;
  50665. var body = msgDetail.body;
  50666. var username = msgDetail.username;
  50667. if (['offer', 'candidate', 'answer'].indexOf(body.subtype) !== -1) {
  50668. if (!this.videoLocalStream) {
  50669. this.videoClose(username);
  50670. return;
  50671. }
  50672. }
  50673. //
  50674. switch (body.subtype) {
  50675. case 'call':
  50676. var callIng = true;
  50677. var callAudio = this.$refs.callAudio;
  50678. if (callAudio.getAttribute("data-listener") !== 'yes') {
  50679. callAudio.setAttribute("data-listener", "yes");
  50680. callAudio.addEventListener('ended', function () {
  50681. if (callIng) {
  50682. $A.WSOB.sendTo('info', username, {
  50683. 'type': 'video',
  50684. 'subtype': 'judge'
  50685. });
  50686. callAudio.play();
  50687. }
  50688. }, false);
  50689. }
  50690. callAudio.currentTime = 0;
  50691. callAudio.play();
  50692. //
  50693. this.$Notice.close('chat-call');
  50694. this.$Notice.open({
  50695. name: 'chat-call',
  50696. duration: 0,
  50697. onClose: function onClose() {
  50698. callIng = false;
  50699. callAudio.pause();
  50700. _this25.videoClose(username, _this25.$L('对方:拒绝接听'));
  50701. },
  50702. render: function render(h) {
  50703. return h('div', {
  50704. class: 'chat-notice-box'
  50705. }, [h('UserImg', { class: 'chat-notice-userimg', props: { info: body } }), h('div', { class: 'ivu-notice-with-desc' }, [h('div', { class: 'ivu-notice-title' }, [h('UserView', { props: { username: username } })]), h('div', { class: 'ivu-notice-desc' }, _this25.$L(body.video ? "邀请视频通话..." : "邀请语音通话...")), h('div', { class: 'chat-notice-btn-box' }, [h('Button', {
  50706. props: { type: 'success', size: 'small' },
  50707. on: {
  50708. click: function click() {
  50709. callIng = false;
  50710. callAudio.pause();
  50711. _this25.$Notice.close('chat-call');
  50712. _this25.$emit("on-open-notice", username);
  50713. _this25.clickDialog(username);
  50714. _this25.videoConnect(username, body.video);
  50715. _this25.videoUserName = username;
  50716. _this25.videoUserImg = body.userimg;
  50717. _this25.videoStartTime = 0;
  50718. _this25.videoInitiator = false;
  50719. }
  50720. }
  50721. }, _this25.$L("接受")), h('Button', {
  50722. props: { type: 'error', size: 'small' },
  50723. on: {
  50724. click: function click() {
  50725. callIng = false;
  50726. callAudio.pause();
  50727. _this25.$Notice.close('chat-call');
  50728. _this25.videoClose(username, _this25.$L('对方:拒绝接听'));
  50729. }
  50730. }
  50731. }, _this25.$L("拒绝"))])])]);
  50732. }
  50733. });
  50734. break;
  50735. case 'judge':
  50736. if (username != this.videoUserName) {
  50737. $A.WSOB.sendTo('info', username, {
  50738. 'type': 'video',
  50739. 'subtype': 'close'
  50740. });
  50741. }
  50742. break;
  50743. case 'close':
  50744. this.$refs.callAudio.pause();
  50745. this.$Notice.close('chat-call');
  50746. this.videoClose(username, false);
  50747. body.reason && this.$Message.warning(body.reason);
  50748. break;
  50749. case 'offer':
  50750. this.videoIcecandidate(this.videoLocalStream, username);
  50751. this.videoRtc.setRemoteDescription(new RTCSessionDescription(body.data)).then(function () {
  50752. if (_this25.videoStartTime === 0) {
  50753. _this25.videoRtc.createAnswer().then(function (desc) {
  50754. _this25.videoRtc.setLocalDescription(desc).then(function () {
  50755. $A.WSOB.sendTo('info', username, {
  50756. 'type': 'video',
  50757. 'subtype': 'answer',
  50758. 'data': _this25.videoRtc.localDescription
  50759. });
  50760. }).catch(function (e) {
  50761. _this25.$Modal.warning({ title: _this25.$L('温馨提示'), content: e });
  50762. });
  50763. }).catch(function (e) {
  50764. _this25.$Modal.warning({ title: _this25.$L('温馨提示'), content: e });
  50765. });
  50766. _this25.videoStartTime = Math.round(new Date().getTime() / 1000);
  50767. }
  50768. }).catch(function (e) {
  50769. _this25.$Modal.warning({ title: _this25.$L('温馨提示'), content: e });
  50770. });
  50771. break;
  50772. case 'answer':
  50773. if (this.videoRtc) {
  50774. this.videoRtc.setRemoteDescription(new RTCSessionDescription(body.data)).then(function () {}).catch(function (e) {
  50775. _this25.$Modal.warning({ title: _this25.$L('温馨提示'), content: e });
  50776. });
  50777. }
  50778. break;
  50779. case 'candidate':
  50780. if (this.videoRtc) {
  50781. this.videoRtc.addIceCandidate(new RTCIceCandidate(body.data)).then(function () {}).catch(function (e) {
  50782. _this25.$Modal.warning({ title: _this25.$L('温馨提示'), content: e });
  50783. });
  50784. }
  50785. break;
  50786. }
  50787. }
  50788. }
  50789. });
  50790. /***/ }),
  50791. /* 111 */
  50792. /***/ (function(module, exports, __webpack_require__) {
  50793. !function(e,o){ true?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.es6Module=o():e.es6Module=o()}(this,function(){return function(e){function o(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,o),n.l=!0,n.exports}var t={};return o.m=e,o.c=t,o.i=function(e){return e},o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},o.p="/dist-module/",o(o.s=3)}([function(e,o,t){var a=t(4)(t(1),t(5),null,null,null);e.exports=a.exports},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var a=t(2),n=function(e){return e&&e.__esModule?e:{default:e}}(a),i=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")};o.default={props:{search:{type:String,required:!1,default:""},emojiTable:{type:Object,required:!1,default:function(){return n.default}}},data:function(){return{display:{x:0,y:0,visible:!1}}},computed:{emojis:function(){if(this.search){var e={};for(var o in this.emojiTable){e[o]={};for(var t in this.emojiTable[o])new RegExp(".*"+i(this.search)+".*").test(t)&&(e[o][t]=this.emojiTable[o][t]);0===Object.keys(e[o]).length&&delete e[o]}return e}return this.emojiTable}},methods:{insert:function(e){this.$emit("emoji",e)},toggle:function(e){this.display.visible=!this.display.visible,this.display.x=e.clientX,this.display.y=e.clientY},hide:function(){this.display.visible=!1},escape:function(e){!0===this.display.visible&&27===e.keyCode&&(this.display.visible=!1)}},directives:{"click-outside":{bind:function(e,o,t){if("function"==typeof o.value){var a=o.modifiers.bubble,n=function(t){(a||!e.contains(t.target)&&e!==t.target)&&o.value(t)};e.__vueClickOutside__=n,document.addEventListener("click",n)}},unbind:function(e,o){document.removeEventListener("click",e.__vueClickOutside__),e.__vueClickOutside__=null}}},mounted:function(){document.addEventListener("keyup",this.escape)},destroyed:function(){document.removeEventListener("keyup",this.escape)}}},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default={"Frequently used":{thumbs_up:"👍","-1":"👎",sob:"😭",confused:"😕",neutral_face:"😐",blush:"😊",heart_eyes:"😍"},People:{smile:"😄",smiley:"😃",grinning:"😀",blush:"😊",wink:"😉",heart_eyes:"😍",kissing_heart:"😘",kissing_closed_eyes:"😚",kissing:"😗",kissing_smiling_eyes:"😙",stuck_out_tongue_winking_eye:"😜",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue:"😛",flushed:"😳",grin:"😁",pensive:"😔",relieved:"😌",unamused:"😒",disappointed:"😞",persevere:"😣",cry:"😢",joy:"😂",sob:"😭",sleepy:"😪",disappointed_relieved:"😥",cold_sweat:"😰",sweat_smile:"😅",sweat:"😓",weary:"😩",tired_face:"😫",fearful:"😨",scream:"😱",angry:"😠",rage:"😡",triumph:"😤",confounded:"😖",laughing:"😆",yum:"😋",mask:"😷",sunglasses:"😎",sleeping:"😴",dizzy_face:"😵",astonished:"😲",worried:"😟",frowning:"😦",anguished:"😧",imp:"👿",open_mouth:"😮",grimacing:"😬",neutral_face:"😐",confused:"😕",hushed:"😯",smirk:"😏",expressionless:"😑",man_with_gua_pi_mao:"👲",man_with_turban:"👳",cop:"👮",construction_worker:"👷",guardsman:"💂",baby:"👶",boy:"👦",girl:"👧",man:"👨",woman:"👩",older_man:"👴",older_woman:"👵",person_with_blond_hair:"👱",angel:"👼",princess:"👸",smiley_cat:"😺",smile_cat:"😸",heart_eyes_cat:"😻",kissing_cat:"😽",smirk_cat:"😼",scream_cat:"🙀",crying_cat_face:"😿",joy_cat:"😹",pouting_cat:"😾",japanese_ogre:"👹",japanese_goblin:"👺",see_no_evil:"🙈",hear_no_evil:"🙉",speak_no_evil:"🙊",skull:"💀",alien:"👽",hankey:"💩",fire:"🔥",sparkles:"✨",star2:"🌟",dizzy:"💫",boom:"💥",anger:"💢",sweat_drops:"💦",droplet:"💧",zzz:"💤",dash:"💨",ear:"👂",eyes:"👀",nose:"👃",tongue:"👅",lips:"👄",thumbs_up:"👍","-1":"👎",ok_hand:"👌",facepunch:"👊",fist:"✊",wave:"👋",hand:"✋",open_hands:"👐",point_up_2:"👆",point_down:"👇",point_right:"👉",point_left:"👈",raised_hands:"🙌",pray:"🙏",clap:"👏",muscle:"💪",walking:"🚶",runner:"🏃",dancer:"💃",couple:"👫",family:"👪",couplekiss:"💏",couple_with_heart:"💑",dancers:"👯",ok_woman:"🙆",no_good:"🙅",information_desk_person:"💁",raising_hand:"🙋",massage:"💆",haircut:"💇",nail_care:"💅",bride_with_veil:"👰",person_with_pouting_face:"🙎",person_frowning:"🙍",bow:"🙇",tophat:"🎩",crown:"👑",womans_hat:"👒",athletic_shoe:"👟",mans_shoe:"👞",sandal:"👡",high_heel:"👠",boot:"👢",shirt:"👕",necktie:"👔",womans_clothes:"👚",dress:"👗",running_shirt_with_sash:"🎽",jeans:"👖",kimono:"👘",bikini:"👙",briefcase:"💼",handbag:"👜",pouch:"👝",purse:"👛",eyeglasses:"👓",ribbon:"🎀",closed_umbrella:"🌂",lipstick:"💄",yellow_heart:"💛",blue_heart:"💙",purple_heart:"💜",green_heart:"💚",broken_heart:"💔",heartpulse:"💗",heartbeat:"💓",two_hearts:"💕",sparkling_heart:"💖",revolving_hearts:"💞",cupid:"💘",love_letter:"💌",kiss:"💋",ring:"💍",gem:"💎",bust_in_silhouette:"👤",speech_balloon:"💬",footprints:"👣"},Nature:{dog:"🐶",wolf:"🐺",cat:"🐱",mouse:"🐭",hamster:"🐹",rabbit:"🐰",frog:"🐸",tiger:"🐯",koala:"🐨",bear:"🐻",pig:"🐷",pig_nose:"🐽",cow:"🐮",boar:"🐗",monkey_face:"🐵",monkey:"🐒",horse:"🐴",sheep:"🐑",elephant:"🐘",panda_face:"🐼",penguin:"🐧",bird:"🐦",baby_chick:"🐤",hatched_chick:"🐥",hatching_chick:"🐣",chicken:"🐔",snake:"🐍",turtle:"🐢",bug:"🐛",bee:"🐝",ant:"🐜",beetle:"🐞",snail:"🐌",octopus:"🐙",shell:"🐚",tropical_fish:"🐠",fish:"🐟",dolphin:"🐬",whale:"🐳",racehorse:"🐎",dragon_face:"🐲",blowfish:"🐡",camel:"🐫",poodle:"🐩",feet:"🐾",bouquet:"💐",cherry_blossom:"🌸",tulip:"🌷",four_leaf_clover:"🍀",rose:"🌹",sunflower:"🌻",hibiscus:"🌺",maple_leaf:"🍁",leaves:"🍃",fallen_leaf:"🍂",herb:"🌿",ear_of_rice:"🌾",mushroom:"🍄",cactus:"🌵",palm_tree:"🌴",chestnut:"🌰",seedling:"🌱",blossom:"🌼",new_moon:"🌑",first_quarter_moon:"🌓",moon:"🌔",full_moon:"🌕",first_quarter_moon_with_face:"🌛",crescent_moon:"🌙",earth_asia:"🌏",volcano:"🌋",milky_way:"🌌",stars:"🌠",partly_sunny:"⛅",snowman:"⛄",cyclone:"🌀",foggy:"🌁",rainbow:"🌈",ocean:"🌊"},Objects:{bamboo:"🎍",gift_heart:"💝",dolls:"🎎",school_satchel:"🎒",mortar_board:"🎓",flags:"🎏",fireworks:"🎆",sparkler:"🎇",wind_chime:"🎐",rice_scene:"🎑",jack_o_lantern:"🎃",ghost:"👻",santa:"🎅",christmas_tree:"🎄",gift:"🎁",tanabata_tree:"🎋",tada:"🎉",confetti_ball:"🎊",balloon:"🎈",crossed_flags:"🎌",crystal_ball:"🔮",movie_camera:"🎥",camera:"📷",video_camera:"📹",vhs:"📼",cd:"💿",dvd:"📀",minidisc:"💽",floppy_disk:"💾",computer:"💻",iphone:"📱",telephone_receiver:"📞",pager:"📟",fax:"📠",satellite:"📡",tv:"📺",radio:"📻",loud_sound:"🔊",bell:"🔔",loudspeaker:"📢",mega:"📣",hourglass_flowing_sand:"⏳",hourglass:"⌛",alarm_clock:"⏰",watch:"⌚",unlock:"🔓",lock:"🔒",lock_with_ink_pen:"🔏",closed_lock_with_key:"🔐",key:"🔑",mag_right:"🔎",bulb:"💡",flashlight:"🔦",electric_plug:"🔌",battery:"🔋",mag:"🔍",bath:"🛀",toilet:"🚽",wrench:"🔧",nut_and_bolt:"🔩",hammer:"🔨",door:"🚪",smoking:"🚬",bomb:"💣",gun:"🔫",hocho:"🔪",pill:"💊",syringe:"💉",moneybag:"💰",yen:"💴",dollar:"💵",credit_card:"💳",money_with_wings:"💸",calling:"📲","e-mail":"📧",inbox_tray:"📥",outbox_tray:"📤",envelope_with_arrow:"📩",incoming_envelope:"📨",mailbox:"📫",mailbox_closed:"📪",postbox:"📮",package:"📦",memo:"📝",page_facing_up:"📄",page_with_curl:"📃",bookmark_tabs:"📑",bar_chart:"📊",chart_with_upwards_trend:"📈",chart_with_downwards_trend:"📉",scroll:"📜",clipboard:"📋",date:"📅",calendar:"📆",card_index:"📇",file_folder:"📁",open_file_folder:"📂",pushpin:"📌",paperclip:"📎",straight_ruler:"📏",triangular_ruler:"📐",closed_book:"📕",green_book:"📗",blue_book:"📘",orange_book:"📙",notebook:"📓",notebook_with_decorative_cover:"📔",ledger:"📒",books:"📚",book:"📖",bookmark:"🔖",name_badge:"📛",newspaper:"📰",art:"🎨",clapper:"🎬",microphone:"🎤",headphones:"🎧",musical_score:"🎼",musical_note:"🎵",notes:"🎶",musical_keyboard:"🎹",violin:"🎻",trumpet:"🎺",saxophone:"🎷",guitar:"🎸",space_invader:"👾",video_game:"🎮",black_joker:"🃏",flower_playing_cards:"🎴",mahjong:"🀄",game_die:"🎲",dart:"🎯",football:"🏈",basketball:"🏀",soccer:"⚽",baseball:"⚾",tennis:"🎾","8ball":"🎱",bowling:"🎳",golf:"⛳",checkered_flag:"🏁",trophy:"🏆",ski:"🎿",snowboarder:"🏂",swimmer:"🏊",surfer:"🏄",fishing_pole_and_fish:"🎣",tea:"🍵",sake:"🍶",beer:"🍺",beers:"🍻",cocktail:"🍸",tropical_drink:"🍹",wine_glass:"🍷",fork_and_knife:"🍴",pizza:"🍕",hamburger:"🍔",fries:"🍟",poultry_leg:"🍗",meat_on_bone:"🍖",spaghetti:"🍝",curry:"🍛",fried_shrimp:"🍤",bento:"🍱",sushi:"🍣",fish_cake:"🍥",rice_ball:"🍙",rice_cracker:"🍘",rice:"🍚",ramen:"🍜",stew:"🍲",oden:"🍢",dango:"🍡",egg:"🍳",bread:"🍞",doughnut:"🍩",custard:"🍮",icecream:"🍦",ice_cream:"🍨",shaved_ice:"🍧",birthday:"🎂",cake:"🍰",cookie:"🍪",chocolate_bar:"🍫",candy:"🍬",lollipop:"🍭",honey_pot:"🍯",apple:"🍎",green_apple:"🍏",tangerine:"🍊",cherries:"🍒",grapes:"🍇",watermelon:"🍉",strawberry:"🍓",peach:"🍑",melon:"🍈",banana:"🍌",pineapple:"🍍",sweet_potato:"🍠",eggplant:"🍆",tomato:"🍅",corn:"🌽"},Places:{house:"🏠",house_with_garden:"🏡",school:"🏫",office:"🏢",post_office:"🏣",hospital:"🏥",bank:"🏦",convenience_store:"🏪",love_hotel:"🏩",hotel:"🏨",wedding:"💒",church:"⛪",department_store:"🏬",city_sunrise:"🌇",city_sunset:"🌆",japanese_castle:"🏯",european_castle:"🏰",tent:"⛺",factory:"🏭",tokyo_tower:"🗼",japan:"🗾",mount_fuji:"🗻",sunrise_over_mountains:"🌄",sunrise:"🌅",night_with_stars:"🌃",statue_of_liberty:"🗽",bridge_at_night:"🌉",carousel_horse:"🎠",ferris_wheel:"🎡",fountain:"⛲",roller_coaster:"🎢",ship:"🚢",boat:"⛵",speedboat:"🚤",rocket:"🚀",seat:"💺",station:"🚉",bullettrain_side:"🚄",bullettrain_front:"🚅",metro:"🚇",railway_car:"🚃",bus:"🚌",blue_car:"🚙",car:"🚗",taxi:"🚕",truck:"🚚",rotating_light:"🚨",police_car:"🚓",fire_engine:"🚒",ambulance:"🚑",bike:"🚲",barber:"💈",busstop:"🚏",ticket:"🎫",traffic_light:"🚥",construction:"🚧",beginner:"🔰",fuelpump:"⛽",izakaya_lantern:"🏮",slot_machine:"🎰",moyai:"🗿",circus_tent:"🎪",performing_arts:"🎭",round_pushpin:"📍",triangular_flag_on_post:"🚩"},Symbols:{keycap_ten:"🔟",1234:"🔢",symbols:"🔣",capital_abcd:"🔠",abcd:"🔡",abc:"🔤",arrow_up_small:"🔼",arrow_down_small:"🔽",rewind:"⏪",fast_forward:"⏩",arrow_double_up:"⏫",arrow_double_down:"⏬",ok:"🆗",new:"🆕",up:"🆙",cool:"🆒",free:"🆓",ng:"🆖",signal_strength:"📶",cinema:"🎦",koko:"🈁",u6307:"🈯",u7a7a:"🈳",u6e80:"🈵",u5408:"🈴",u7981:"🈲",ideograph_advantage:"🉐",u5272:"🈹",u55b6:"🈺",u6709:"🈶",u7121:"🈚",restroom:"🚻",mens:"🚹",womens:"🚺",baby_symbol:"🚼",wc:"🚾",no_smoking:"🚭",u7533:"🈸",accept:"🉑",cl:"🆑",sos:"🆘",id:"🆔",no_entry_sign:"🚫",underage:"🔞",no_entry:"⛔",negative_squared_cross_mark:"❎",white_check_mark:"✅",heart_decoration:"💟",vs:"🆚",vibration_mode:"📳",mobile_phone_off:"📴",ab:"🆎",diamond_shape_with_a_dot_inside:"💠",ophiuchus:"⛎",six_pointed_star:"🔯",atm:"🏧",chart:"💹",heavy_dollar_sign:"💲",currency_exchange:"💱",x:"❌",exclamation:"❗",question:"❓",grey_exclamation:"❕",grey_question:"❔",o:"⭕",top:"🔝",end:"🔚",back:"🔙",on:"🔛",soon:"🔜",arrows_clockwise:"🔃",clock12:"🕛",clock1:"🕐",clock2:"🕑",clock3:"🕒",clock4:"🕓",clock5:"🕔",clock6:"🕕",clock7:"🕖",clock8:"🕗",clock9:"🕘",clock10:"🕙",clock11:"🕚",heavy_plus_sign:"➕",heavy_minus_sign:"➖",heavy_division_sign:"➗",white_flower:"💮",100:"💯",radio_button:"🔘",link:"🔗",curly_loop:"➰",trident:"🔱",small_red_triangle:"🔺",black_square_button:"🔲",white_square_button:"🔳",red_circle:"🔴",large_blue_circle:"🔵",small_red_triangle_down:"🔻",white_large_square:"⬜",black_large_square:"⬛",large_orange_diamond:"🔶",large_blue_diamond:"🔷",small_orange_diamond:"🔸",small_blue_diamond:"🔹"}}},function(e,o,t){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.EmojiPickerPlugin=o.EmojiPicker=void 0;var a=t(0),n=function(e){return e&&e.__esModule?e:{default:e}}(a),i={install:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.component("emoji-picker",n.default)}};"undefined"!=typeof window&&(window.EmojiPicker=i),o.EmojiPicker=n.default,o.EmojiPickerPlugin=i,o.default=n.default},function(e,o){e.exports=function(e,o,t,a,n){var i,r=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(i=e,r=e.default);var l="function"==typeof r?r.options:r;o&&(l.render=o.render,l.staticRenderFns=o.staticRenderFns),a&&(l._scopeId=a);var _;if(n?(_=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},l._ssrRegister=_):t&&(_=t),_){var c=l.functional,u=c?l.render:l.beforeCreate;c?l.render=function(e,o){return _.call(o),u(e,o)}:l.beforeCreate=u?[].concat(u,_):[_]}return{esModule:i,exports:r,options:l}}},function(e,o){e.exports={render:function(){var e=this,o=e.$createElement,t=e._self._c||o;return t("div",[e._t("emoji-invoker",null,{events:{click:function(o){return e.toggle(o)}}}),e._v(" "),e.display.visible?t("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.hide,expression:"hide"}]},[e._t("emoji-picker",null,{emojis:e.emojis,insert:e.insert,display:e.display})],2):e._e()],2)},staticRenderFns:[]}}])});
  50794. //# sourceMappingURL=main.js.map
  50795. /***/ }),
  50796. /* 112 */
  50797. /***/ (function(module, exports, __webpack_require__) {
  50798. // style-loader: Adds some css to the DOM by adding a <style> tag
  50799. // load the styles
  50800. var content = __webpack_require__(113);
  50801. if(typeof content === 'string') content = [[module.i, content, '']];
  50802. if(content.locals) module.exports = content.locals;
  50803. // add the styles to the DOM
  50804. var update = __webpack_require__(1)("ea5947be", content, false, {});
  50805. // Hot Module Replacement
  50806. if(false) {
  50807. // When the styles change, update the <style> tags
  50808. if(!content.locals) {
  50809. module.hot.accept("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-5eba4923\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../node_modules/sass-loader/lib/loader.js!../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./ScrollerY.vue", function() {
  50810. var newContent = require("!!../../../../node_modules/css-loader/index.js!../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-5eba4923\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../node_modules/sass-loader/lib/loader.js!../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./ScrollerY.vue");
  50811. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  50812. update(newContent);
  50813. });
  50814. }
  50815. // When the module is disposed, remove the <style> tags
  50816. module.hot.dispose(function() { update(); });
  50817. }
  50818. /***/ }),
  50819. /* 113 */
  50820. /***/ (function(module, exports, __webpack_require__) {
  50821. exports = module.exports = __webpack_require__(0)(false);
  50822. // imports
  50823. // module
  50824. exports.push([module.i, "\n.app-scroller[data-v-5eba4923] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow-x: hidden;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n}\n.app-scroller-static[data-v-5eba4923] {\n position: static;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n", ""]);
  50825. // exports
  50826. /***/ }),
  50827. /* 114 */
  50828. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  50829. "use strict";
  50830. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  50831. //
  50832. //
  50833. //
  50834. //
  50835. //
  50836. //
  50837. //
  50838. //
  50839. //
  50840. //
  50841. //
  50842. //
  50843. //
  50844. //
  50845. //
  50846. //
  50847. //
  50848. //
  50849. //
  50850. //
  50851. //
  50852. //
  50853. //
  50854. /* harmony default export */ __webpack_exports__["default"] = ({
  50855. name: 'ScrollerY',
  50856. props: {
  50857. static: {
  50858. type: Boolean,
  50859. default: false
  50860. }
  50861. },
  50862. data: function data() {
  50863. return {
  50864. scrollY: 0,
  50865. scrollDiff: 0,
  50866. scrollInfo: {}
  50867. };
  50868. },
  50869. mounted: function mounted() {
  50870. var _this = this;
  50871. this.$nextTick(function () {
  50872. var scrollListener = typeof _this.$listeners['on-scroll'] === "function";
  50873. var scrollerView = $A(_this.$refs.scrollerView);
  50874. scrollerView.scroll(function () {
  50875. var wInnerH = Math.round(scrollerView.innerHeight());
  50876. var wScrollY = scrollerView.scrollTop();
  50877. var bScrollH = _this.$refs.scrollerView.scrollHeight;
  50878. _this.scrollY = wScrollY;
  50879. if (scrollListener) {
  50880. var direction = 'static';
  50881. var directionreal = 'static';
  50882. if (_this.scrollDiff - wScrollY > 50) {
  50883. _this.scrollDiff = wScrollY;
  50884. direction = 'down';
  50885. } else if (_this.scrollDiff - wScrollY < -100) {
  50886. _this.scrollDiff = wScrollY;
  50887. direction = 'up';
  50888. }
  50889. if (_this.scrollDiff - wScrollY > 1) {
  50890. _this.scrollDiff = wScrollY;
  50891. directionreal = 'down';
  50892. } else if (_this.scrollDiff - wScrollY < -1) {
  50893. _this.scrollDiff = wScrollY;
  50894. directionreal = 'up';
  50895. }
  50896. _this.$emit('on-scroll', {
  50897. scale: wScrollY / (bScrollH - wInnerH), //已滚动比例
  50898. scrollY: wScrollY, //滚动的距离
  50899. scrollE: bScrollH - wInnerH - wScrollY, //与底部距离
  50900. direction: direction, //滚动方向
  50901. directionreal: directionreal //滚动方向(即时)
  50902. });
  50903. }
  50904. });
  50905. });
  50906. },
  50907. activated: function activated() {
  50908. var _this2 = this;
  50909. if (this.scrollY > 0) {
  50910. this.$nextTick(function () {
  50911. _this2.scrollTo(_this2.scrollY);
  50912. });
  50913. }
  50914. },
  50915. methods: {
  50916. scrollTo: function scrollTo(top, animate) {
  50917. if (animate === false) {
  50918. $A(this.$refs.scrollerView).stop().scrollTop(top);
  50919. } else {
  50920. $A(this.$refs.scrollerView).stop().animate({ "scrollTop": top });
  50921. }
  50922. },
  50923. scrollToBottom: function scrollToBottom(animate) {
  50924. this.scrollTo(this.$refs.scrollerView.scrollHeight, animate);
  50925. }
  50926. }
  50927. });
  50928. /***/ }),
  50929. /* 115 */
  50930. /***/ (function(module, exports, __webpack_require__) {
  50931. var render = function() {
  50932. var _vm = this
  50933. var _h = _vm.$createElement
  50934. var _c = _vm._self._c || _h
  50935. return _c(
  50936. "div",
  50937. {
  50938. ref: "scrollerView",
  50939. staticClass: "app-scroller",
  50940. class: [_vm.static ? "app-scroller-static" : ""]
  50941. },
  50942. [_vm._t("default")],
  50943. 2
  50944. )
  50945. }
  50946. var staticRenderFns = []
  50947. render._withStripped = true
  50948. module.exports = { render: render, staticRenderFns: staticRenderFns }
  50949. if (false) {
  50950. module.hot.accept()
  50951. if (module.hot.data) {
  50952. require("vue-hot-reload-api") .rerender("data-v-5eba4923", module.exports)
  50953. }
  50954. }
  50955. /***/ }),
  50956. /* 116 */
  50957. /***/ (function(module, exports, __webpack_require__) {
  50958. var disposed = false
  50959. function injectStyle (ssrContext) {
  50960. if (disposed) return
  50961. __webpack_require__(117)
  50962. }
  50963. var normalizeComponent = __webpack_require__(2)
  50964. /* script */
  50965. var __vue_script__ = __webpack_require__(119)
  50966. /* template */
  50967. var __vue_template__ = __webpack_require__(120)
  50968. /* template functional */
  50969. var __vue_template_functional__ = false
  50970. /* styles */
  50971. var __vue_styles__ = injectStyle
  50972. /* scopeId */
  50973. var __vue_scopeId__ = "data-v-9d161836"
  50974. /* moduleIdentifier (server only) */
  50975. var __vue_module_identifier__ = null
  50976. var Component = normalizeComponent(
  50977. __vue_script__,
  50978. __vue_template__,
  50979. __vue_template_functional__,
  50980. __vue_styles__,
  50981. __vue_scopeId__,
  50982. __vue_module_identifier__
  50983. )
  50984. Component.options.__file = "resources/assets/js/main/components/chat/Message.vue"
  50985. /* hot reload */
  50986. if (false) {(function () {
  50987. var hotAPI = require("vue-hot-reload-api")
  50988. hotAPI.install(require("vue"), false)
  50989. if (!hotAPI.compatible) return
  50990. module.hot.accept()
  50991. if (!module.hot.data) {
  50992. hotAPI.createRecord("data-v-9d161836", Component.options)
  50993. } else {
  50994. hotAPI.reload("data-v-9d161836", Component.options)
  50995. }
  50996. module.hot.dispose(function (data) {
  50997. disposed = true
  50998. })
  50999. })()}
  51000. module.exports = Component.exports
  51001. /***/ }),
  51002. /* 117 */
  51003. /***/ (function(module, exports, __webpack_require__) {
  51004. // style-loader: Adds some css to the DOM by adding a <style> tag
  51005. // load the styles
  51006. var content = __webpack_require__(118);
  51007. if(typeof content === 'string') content = [[module.i, content, '']];
  51008. if(content.locals) module.exports = content.locals;
  51009. // add the styles to the DOM
  51010. var update = __webpack_require__(1)("4cbc0aec", content, false, {});
  51011. // Hot Module Replacement
  51012. if(false) {
  51013. // When the styles change, update the <style> tags
  51014. if(!content.locals) {
  51015. module.hot.accept("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-9d161836\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Message.vue", function() {
  51016. var newContent = require("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-9d161836\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Message.vue");
  51017. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  51018. update(newContent);
  51019. });
  51020. }
  51021. // When the module is disposed, remove the <style> tags
  51022. module.hot.dispose(function() { update(); });
  51023. }
  51024. /***/ }),
  51025. /* 118 */
  51026. /***/ (function(module, exports, __webpack_require__) {
  51027. exports = module.exports = __webpack_require__(0)(false);
  51028. // imports
  51029. // module
  51030. exports.push([module.i, "\n@charset \"UTF-8\";\n/*通用*/\n.list-item[data-v-9d161836], .list-right[data-v-9d161836] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n padding-top: 7px;\n padding-bottom: 7px;\n background-color: #E8EBF2;\n}\n.list-item .item-left[data-v-9d161836], .list-item .item-right[data-v-9d161836], .list-right .item-left[data-v-9d161836], .list-right .item-right[data-v-9d161836] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n max-width: 80%;\n}\n.list-item .item-left .item-username[data-v-9d161836], .list-item .item-right .item-username[data-v-9d161836], .list-right .item-left .item-username[data-v-9d161836], .list-right .item-right .item-username[data-v-9d161836] {\n font-size: 12px;\n padding-top: 1px;\n padding-bottom: 4px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.list-item .item-left .item-username em[data-v-9d161836], .list-item .item-right .item-username em[data-v-9d161836], .list-right .item-left .item-username em[data-v-9d161836], .list-right .item-right .item-username em[data-v-9d161836] {\n display: inline-block;\n font-style: normal;\n}\n.list-item .item-left .item-username em.item-name[data-v-9d161836], .list-item .item-right .item-username em.item-name[data-v-9d161836], .list-right .item-left .item-username em.item-name[data-v-9d161836], .list-right .item-right .item-username em.item-name[data-v-9d161836] {\n color: #888888;\n}\n.list-item .item-left .item-username em.item-tag[data-v-9d161836], .list-item .item-right .item-username em.item-tag[data-v-9d161836], .list-right .item-left .item-username em.item-tag[data-v-9d161836], .list-right .item-right .item-username em.item-tag[data-v-9d161836] {\n color: #ffffff;\n background-color: #ff0000;\n line-height: 16px;\n padding: 2px 4px;\n margin-left: 3px;\n border-radius: 2px;\n font-size: 12px;\n -webkit-transform: scale(0.8);\n transform: scale(0.8);\n font-weight: 600;\n}\n.list-item .item-left .item-username em.item-date[data-v-9d161836], .list-item .item-right .item-username em.item-date[data-v-9d161836], .list-right .item-left .item-username em.item-date[data-v-9d161836], .list-right .item-right .item-username em.item-date[data-v-9d161836] {\n margin-left: 4px;\n color: #aaaaaa;\n}\n.list-item .item-left[data-v-9d161836], .list-right .item-left[data-v-9d161836] {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.list-item .item-right[data-v-9d161836], .list-right .item-right[data-v-9d161836] {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.list-item .item-right .item-username[data-v-9d161836], .list-right .item-right .item-username[data-v-9d161836] {\n text-align: right;\n}\n.list-item .item-right .item-link[data-v-9d161836], .list-right .item-right .item-link[data-v-9d161836] {\n -webkit-transform-origin: right center;\n transform-origin: right center;\n}\n.list-item .item-userimg[data-v-9d161836], .list-right .item-userimg[data-v-9d161836] {\n width: 38px;\n height: 38px;\n margin-left: 8px;\n margin-right: 8px;\n border-radius: 3px;\n font-size: 20px;\n}\n.list-item .item-error[data-v-9d161836], .list-right .item-error[data-v-9d161836] {\n cursor: pointer;\n width: 48px;\n position: relative;\n}\n.list-item .item-error > i[data-v-9d161836], .list-right .item-error > i[data-v-9d161836] {\n color: #ff0000;\n font-size: 18px;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.list-right[data-v-9d161836] {\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n/*文本*/\n.item-text[data-v-9d161836] {\n display: inline-block;\n border-radius: 6px;\n padding: 8px;\n background-color: #ffffff;\n max-height: 580px;\n overflow: auto;\n}\n.item-text.text-emoji[data-v-9d161836] {\n background-color: transparent;\n}\n.item-text.text-emoji .item-text-view[data-v-9d161836] {\n font-size: 52px;\n line-height: normal;\n}\n.item-text.text-error[data-v-9d161836] {\n -webkit-box-shadow: 0 0 4px 0 #ffa1a1;\n box-shadow: 0 0 4px 0 #ffa1a1;\n}\n.item-text .item-text-view[data-v-9d161836] {\n max-width: 520px;\n color: #242424;\n font-size: 14px;\n line-height: 18px;\n word-break: break-all;\n}\n\n/*信息底标*/\n.item-link[data-v-9d161836] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n max-width: 100%;\n font-size: 12px;\n color: #ffffff;\n background-color: #cacaca;\n margin-top: 6px;\n margin-bottom: -2px;\n height: 20px;\n line-height: 20px;\n padding: 0 5px;\n border-radius: 4px;\n -webkit-transform: scale(0.96);\n transform: scale(0.96);\n -webkit-transform-origin: left center;\n transform-origin: left center;\n}\n.item-link > i[data-v-9d161836] {\n font-size: 14px;\n padding-right: 2px;\n}\n.item-link > span[data-v-9d161836] {\n white-space: nowrap;\n}\n.item-link > a[data-v-9d161836] {\n color: #3D90E2;\n padding-left: 3px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100%;\n}\n\n/*加载中*/\n.item-loading[data-v-9d161836] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: 28px;\n height: 28px;\n margin: 24px;\n}\n\n/*文件、图片*/\n.item-file[data-v-9d161836] {\n display: inline-block;\n text-decoration: none;\n}\n.item-file .item-file-box[data-v-9d161836] {\n background: #ffffff;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 10px 14px;\n border-radius: 3px;\n width: 220px;\n}\n.item-file .item-file-box .item-file-thumb[data-v-9d161836] {\n width: 36px;\n}\n.item-file .item-file-box .item-file-info[data-v-9d161836] {\n margin-left: 12px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.item-file .item-file-box .item-file-info .item-file-name[data-v-9d161836] {\n color: #333333;\n font-size: 14px;\n line-height: 18px;\n word-break: break-all;\n text-overflow: ellipsis;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n.item-file .item-file-box .item-file-info .item-file-size[data-v-9d161836] {\n padding-top: 4px;\n color: #666666;\n font-size: 14px;\n}\n.item-file .item-file-img[data-v-9d161836] {\n max-width: 220px;\n max-height: 220px;\n border-radius: 6px;\n}\n\n/*通知*/\n.item-notice[data-v-9d161836] {\n color: #777777;\n font-size: 12px;\n text-align: center;\n padding: 12px 24px;\n}\n", ""]);
  51031. // exports
  51032. /***/ }),
  51033. /* 119 */
  51034. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  51035. "use strict";
  51036. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  51037. //
  51038. //
  51039. //
  51040. //
  51041. //
  51042. //
  51043. //
  51044. //
  51045. //
  51046. //
  51047. //
  51048. //
  51049. //
  51050. //
  51051. //
  51052. //
  51053. //
  51054. //
  51055. //
  51056. //
  51057. //
  51058. //
  51059. //
  51060. //
  51061. //
  51062. //
  51063. //
  51064. //
  51065. //
  51066. //
  51067. //
  51068. //
  51069. //
  51070. //
  51071. //
  51072. //
  51073. //
  51074. //
  51075. //
  51076. //
  51077. //
  51078. //
  51079. //
  51080. //
  51081. //
  51082. //
  51083. //
  51084. //
  51085. //
  51086. //
  51087. //
  51088. //
  51089. //
  51090. //
  51091. //
  51092. //
  51093. //
  51094. //
  51095. //
  51096. //
  51097. //
  51098. //
  51099. //
  51100. //
  51101. //
  51102. //
  51103. //
  51104. //
  51105. //
  51106. //
  51107. //
  51108. //
  51109. //
  51110. //
  51111. //
  51112. //
  51113. //
  51114. //
  51115. //
  51116. //
  51117. //
  51118. //
  51119. //
  51120. //
  51121. //
  51122. //
  51123. //
  51124. //
  51125. //
  51126. //
  51127. //
  51128. //
  51129. //
  51130. //
  51131. //
  51132. //
  51133. //
  51134. //
  51135. //
  51136. //
  51137. //
  51138. //
  51139. //
  51140. //
  51141. //
  51142. //
  51143. //
  51144. //
  51145. //
  51146. //
  51147. //
  51148. //
  51149. //
  51150. //
  51151. //
  51152. //
  51153. //
  51154. //
  51155. //
  51156. //
  51157. //
  51158. //
  51159. //
  51160. //
  51161. //
  51162. //
  51163. //
  51164. //
  51165. //
  51166. //
  51167. //
  51168. //
  51169. //
  51170. //
  51171. //
  51172. //
  51173. //
  51174. //
  51175. //
  51176. //
  51177. //
  51178. //
  51179. //
  51180. //
  51181. //
  51182. //
  51183. //
  51184. //
  51185. //
  51186. //
  51187. //
  51188. //
  51189. //
  51190. //
  51191. //
  51192. //
  51193. //
  51194. //
  51195. //
  51196. //
  51197. //
  51198. //
  51199. //
  51200. //
  51201. //
  51202. //
  51203. //
  51204. //
  51205. //
  51206. //
  51207. //
  51208. //
  51209. //
  51210. //
  51211. //
  51212. //
  51213. //
  51214. //
  51215. //
  51216. //
  51217. //
  51218. //
  51219. //
  51220. //
  51221. //
  51222. //
  51223. //
  51224. //
  51225. //
  51226. //
  51227. //
  51228. //
  51229. //
  51230. //
  51231. //
  51232. //
  51233. //
  51234. //
  51235. //
  51236. //
  51237. //
  51238. //
  51239. //
  51240. //
  51241. //
  51242. //
  51243. //
  51244. //
  51245. //
  51246. //
  51247. //
  51248. //
  51249. //
  51250. //
  51251. //
  51252. //
  51253. //
  51254. //
  51255. //
  51256. //
  51257. //
  51258. //
  51259. //
  51260. //
  51261. //
  51262. //
  51263. //
  51264. //
  51265. //
  51266. //
  51267. //
  51268. //
  51269. //
  51270. //
  51271. //
  51272. //
  51273. //
  51274. //
  51275. //
  51276. //
  51277. //
  51278. //
  51279. //
  51280. //
  51281. //
  51282. //
  51283. //
  51284. //
  51285. //
  51286. //
  51287. //
  51288. //
  51289. //
  51290. //
  51291. //
  51292. //
  51293. //
  51294. //
  51295. //
  51296. //
  51297. //
  51298. //
  51299. //
  51300. //
  51301. //
  51302. //
  51303. //
  51304. //
  51305. //
  51306. //
  51307. //
  51308. //
  51309. //
  51310. //
  51311. //
  51312. //
  51313. //
  51314. //
  51315. //
  51316. //
  51317. //
  51318. //
  51319. //
  51320. //
  51321. //
  51322. //
  51323. //
  51324. //
  51325. //
  51326. //
  51327. //
  51328. //
  51329. //
  51330. //
  51331. //
  51332. //
  51333. //
  51334. //
  51335. //
  51336. //
  51337. //
  51338. //
  51339. //
  51340. //
  51341. //
  51342. //
  51343. //
  51344. //
  51345. //
  51346. //
  51347. //
  51348. //
  51349. //
  51350. //
  51351. //
  51352. //
  51353. //
  51354. //
  51355. //
  51356. //
  51357. /* harmony default export */ __webpack_exports__["default"] = ({
  51358. name: 'ChatMessage',
  51359. props: {
  51360. info: {
  51361. type: Object,
  51362. default: {}
  51363. }
  51364. },
  51365. mounted: function mounted() {},
  51366. computed: {
  51367. userName: function userName() {
  51368. return this.info.send_username || this.info.username;
  51369. },
  51370. userImg: function userImg() {
  51371. return this.info.send_userimg || this.info.userimg;
  51372. },
  51373. imageStyle: function imageStyle() {
  51374. return function (info) {
  51375. var width = info.width,
  51376. height = info.height;
  51377. if (width && height) {
  51378. var maxWidth = 220,
  51379. maxHeight = 220,
  51380. tempWidth = width,
  51381. tempHeight = height;
  51382. if (width > maxWidth || height > maxHeight) {
  51383. if (width > height) {
  51384. tempWidth = maxWidth;
  51385. tempHeight = height * (maxWidth / width);
  51386. } else {
  51387. tempWidth = width * (maxHeight / height);
  51388. tempHeight = maxHeight;
  51389. }
  51390. }
  51391. return {
  51392. width: tempWidth + 'px',
  51393. height: tempHeight + 'px'
  51394. };
  51395. }
  51396. return {};
  51397. };
  51398. }
  51399. },
  51400. methods: {
  51401. textMsg: function textMsg(text) {
  51402. return (text + "").replace(/\n/, '<br/>');
  51403. },
  51404. textIsEmoji: function textIsEmoji(text) {
  51405. return text.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_") === "_";
  51406. },
  51407. formatCDate: function formatCDate(v) {
  51408. var string = '';
  51409. if ($A.runNum(v) > 0) {
  51410. if ($A.formatDate('Ymd') === $A.formatDate('Ymd', v)) {
  51411. string = $A.formatDate('H:i', v);
  51412. } else if ($A.formatDate('Y') === $A.formatDate('Y', v)) {
  51413. string = $A.formatDate('m-d', v);
  51414. } else {
  51415. string = $A.formatDate('Y-m-d', v);
  51416. }
  51417. }
  51418. return string ? '(' + string + ')' : '';
  51419. },
  51420. clickError: function clickError(err) {
  51421. this.$Modal.error({
  51422. title: this.$L("错误详情"),
  51423. content: err
  51424. });
  51425. },
  51426. clickUser: function clickUser(e) {
  51427. this.$emit('clickUser', this.info, e);
  51428. },
  51429. fileDownUrl: function fileDownUrl(id) {
  51430. return $A.apiUrl('project/files/download?fileid=' + id);
  51431. },
  51432. formatSecond: function formatSecond(d) {
  51433. if (d > 3600) {
  51434. return Math.ceil(d / 3600) + '小时';
  51435. } else if (d > 60) {
  51436. return Math.ceil(d / 60) + '分钟';
  51437. } else {
  51438. return d + '秒';
  51439. }
  51440. }
  51441. }
  51442. });
  51443. /***/ }),
  51444. /* 120 */
  51445. /***/ (function(module, exports, __webpack_require__) {
  51446. var render = function() {
  51447. var _vm = this
  51448. var _h = _vm.$createElement
  51449. var _c = _vm._self._c || _h
  51450. return _c("div", { attrs: { "data-id": _vm.info.id } }, [
  51451. _vm.info.type === "text" ||
  51452. _vm.info.type === "taskB" ||
  51453. _vm.info.type === "report" ||
  51454. _vm.info.type === "video" ||
  51455. _vm.info.type === "voice"
  51456. ? _c("div", [
  51457. _vm.info.self === true
  51458. ? _c(
  51459. "div",
  51460. { staticClass: "list-right" },
  51461. [
  51462. _vm.info.error
  51463. ? _c(
  51464. "div",
  51465. {
  51466. staticClass: "item-error",
  51467. on: {
  51468. click: function($event) {
  51469. return _vm.clickError(_vm.info.error)
  51470. }
  51471. }
  51472. },
  51473. [_c("Icon", { attrs: { type: "md-alert" } })],
  51474. 1
  51475. )
  51476. : _vm._e(),
  51477. _vm._v(" "),
  51478. _c(
  51479. "div",
  51480. { staticClass: "item-right" },
  51481. [
  51482. _c(
  51483. "div",
  51484. {
  51485. staticClass: "item-username",
  51486. on: { click: _vm.clickUser }
  51487. },
  51488. [
  51489. _c(
  51490. "em",
  51491. { staticClass: "item-name" },
  51492. [
  51493. _c("UserView", {
  51494. attrs: {
  51495. username: _vm.userName,
  51496. info: _vm.info,
  51497. placement: "left"
  51498. }
  51499. })
  51500. ],
  51501. 1
  51502. ),
  51503. _vm._v(" "),
  51504. _vm.info.indate
  51505. ? _c("em", { staticClass: "item-date" }, [
  51506. _vm._v(_vm._s(_vm.formatCDate(_vm.info.indate)))
  51507. ])
  51508. : _vm._e()
  51509. ]
  51510. ),
  51511. _vm._v(" "),
  51512. _c(
  51513. "div",
  51514. {
  51515. staticClass: "item-text",
  51516. class: {
  51517. "text-emoji": _vm.textIsEmoji(_vm.info.text),
  51518. "text-error": _vm.info.error
  51519. }
  51520. },
  51521. [
  51522. _c("div", { staticClass: "item-text-view" }, [
  51523. _vm._v(_vm._s(_vm.textMsg(_vm.info.text)))
  51524. ])
  51525. ]
  51526. ),
  51527. _vm._v(" "),
  51528. _vm.info.type === "taskB"
  51529. ? [
  51530. _vm.info.other.type === "task"
  51531. ? _c(
  51532. "div",
  51533. {
  51534. staticClass: "item-link",
  51535. on: {
  51536. click: function($event) {
  51537. return _vm.taskDetail(_vm.info.other.id)
  51538. }
  51539. }
  51540. },
  51541. [
  51542. _c("span", [
  51543. _vm._v(
  51544. _vm._s(_vm.$L("来自关注任务")) + ":"
  51545. )
  51546. ]),
  51547. _c(
  51548. "a",
  51549. { attrs: { href: "javascript:void(0)" } },
  51550. [_vm._v(_vm._s(_vm.info.other.title))]
  51551. )
  51552. ]
  51553. )
  51554. : _vm._e(),
  51555. _vm._v(" "),
  51556. _vm.info.other.type === "file"
  51557. ? _c("div", { staticClass: "item-link" }, [
  51558. _c("span", [
  51559. _vm._v(_vm._s(_vm.$L("来自关注任务")) + ":")
  51560. ]),
  51561. _c(
  51562. "a",
  51563. {
  51564. attrs: {
  51565. target: "_blank",
  51566. href: _vm.fileDownUrl(_vm.info.other.id)
  51567. }
  51568. },
  51569. [_vm._v(_vm._s(_vm.info.other.name))]
  51570. )
  51571. ])
  51572. : _vm._e()
  51573. ]
  51574. : _vm.info.type === "report"
  51575. ? _c(
  51576. "div",
  51577. {
  51578. staticClass: "item-link",
  51579. on: {
  51580. click: function($event) {
  51581. return _vm.reportDetail(
  51582. _vm.info.other.id,
  51583. _vm.info.other.title
  51584. )
  51585. }
  51586. }
  51587. },
  51588. [
  51589. _c("span", [
  51590. _vm._v(_vm._s(_vm.$L("来自工作报告")) + ":")
  51591. ]),
  51592. _c(
  51593. "a",
  51594. { attrs: { href: "javascript:void(0)" } },
  51595. [_vm._v(_vm._s(_vm.info.other.title))]
  51596. )
  51597. ]
  51598. )
  51599. : _vm.info.type === "video" || _vm.info.type === "voice"
  51600. ? _c(
  51601. "div",
  51602. { staticClass: "item-link" },
  51603. [
  51604. _vm.info.type === "voice"
  51605. ? _c("Icon", {
  51606. attrs: { type: "ios-call-outline" }
  51607. })
  51608. : _c("Icon", {
  51609. attrs: { type: "ios-videocam-outline" }
  51610. }),
  51611. _vm._v(" "),
  51612. _c("span", [
  51613. _vm._v(
  51614. _vm._s(
  51615. _vm.$L(
  51616. "通话时长:%",
  51617. _vm.formatSecond(_vm.info.other.second)
  51618. )
  51619. )
  51620. )
  51621. ])
  51622. ],
  51623. 1
  51624. )
  51625. : _vm._e()
  51626. ],
  51627. 2
  51628. ),
  51629. _vm._v(" "),
  51630. _c("UserImg", {
  51631. staticClass: "item-userimg",
  51632. attrs: { info: _vm.info },
  51633. on: { click: _vm.clickUser }
  51634. })
  51635. ],
  51636. 1
  51637. )
  51638. : _vm.info.self === false
  51639. ? _c(
  51640. "div",
  51641. { staticClass: "list-item" },
  51642. [
  51643. _c("UserImg", {
  51644. staticClass: "item-userimg",
  51645. attrs: { info: _vm.info },
  51646. on: { click: _vm.clickUser }
  51647. }),
  51648. _vm._v(" "),
  51649. _c(
  51650. "div",
  51651. { staticClass: "item-left" },
  51652. [
  51653. _c(
  51654. "div",
  51655. {
  51656. staticClass: "item-username",
  51657. on: { click: _vm.clickUser }
  51658. },
  51659. [
  51660. _c(
  51661. "em",
  51662. { staticClass: "item-name" },
  51663. [
  51664. _c("UserView", {
  51665. attrs: {
  51666. username: _vm.userName,
  51667. info: _vm.info,
  51668. placement: "right"
  51669. }
  51670. })
  51671. ],
  51672. 1
  51673. ),
  51674. _vm._v(" "),
  51675. _vm.info.__usertag
  51676. ? _c("em", { staticClass: "item-tag" }, [
  51677. _vm._v(_vm._s(_vm.info.__usertag))
  51678. ])
  51679. : _vm._e(),
  51680. _vm._v(" "),
  51681. _vm.info.indate
  51682. ? _c("em", { staticClass: "item-date" }, [
  51683. _vm._v(_vm._s(_vm.formatCDate(_vm.info.indate)))
  51684. ])
  51685. : _vm._e()
  51686. ]
  51687. ),
  51688. _vm._v(" "),
  51689. _c(
  51690. "div",
  51691. {
  51692. staticClass: "item-text",
  51693. class: {
  51694. "text-emoji": _vm.textIsEmoji(_vm.info.text),
  51695. "text-error": _vm.info.error
  51696. }
  51697. },
  51698. [
  51699. _c("div", { staticClass: "item-text-view" }, [
  51700. _vm._v(_vm._s(_vm.textMsg(_vm.info.text)))
  51701. ])
  51702. ]
  51703. ),
  51704. _vm._v(" "),
  51705. _vm.info.type === "taskB"
  51706. ? [
  51707. _vm.info.other.type === "task"
  51708. ? _c(
  51709. "div",
  51710. {
  51711. staticClass: "item-link",
  51712. on: {
  51713. click: function($event) {
  51714. return _vm.taskDetail(_vm.info.other.id)
  51715. }
  51716. }
  51717. },
  51718. [
  51719. _c("span", [
  51720. _vm._v(
  51721. _vm._s(_vm.$L("来自关注任务")) + ":"
  51722. )
  51723. ]),
  51724. _c(
  51725. "a",
  51726. { attrs: { href: "javascript:void(0)" } },
  51727. [_vm._v(_vm._s(_vm.info.other.title))]
  51728. )
  51729. ]
  51730. )
  51731. : _vm._e(),
  51732. _vm._v(" "),
  51733. _vm.info.other.type === "file"
  51734. ? _c("div", { staticClass: "item-link" }, [
  51735. _c("span", [
  51736. _vm._v(_vm._s(_vm.$L("来自关注任务")) + ":")
  51737. ]),
  51738. _c(
  51739. "a",
  51740. {
  51741. attrs: {
  51742. target: "_blank",
  51743. href: _vm.fileDownUrl(_vm.info.other.id)
  51744. }
  51745. },
  51746. [_vm._v(_vm._s(_vm.info.other.name))]
  51747. )
  51748. ])
  51749. : _vm._e()
  51750. ]
  51751. : _vm.info.type === "report"
  51752. ? _c(
  51753. "div",
  51754. {
  51755. staticClass: "item-link",
  51756. on: {
  51757. click: function($event) {
  51758. return _vm.reportDetail(
  51759. _vm.info.other.id,
  51760. _vm.info.other.title
  51761. )
  51762. }
  51763. }
  51764. },
  51765. [
  51766. _c("span", [
  51767. _vm._v(_vm._s(_vm.$L("来自工作报告")) + ":")
  51768. ]),
  51769. _c(
  51770. "a",
  51771. { attrs: { href: "javascript:void(0)" } },
  51772. [_vm._v(_vm._s(_vm.info.other.title))]
  51773. )
  51774. ]
  51775. )
  51776. : _vm.info.type === "video" || _vm.info.type === "voice"
  51777. ? _c(
  51778. "div",
  51779. { staticClass: "item-link" },
  51780. [
  51781. _vm.info.type === "voice"
  51782. ? _c("Icon", {
  51783. attrs: { type: "ios-call-outline" }
  51784. })
  51785. : _c("Icon", {
  51786. attrs: { type: "ios-videocam-outline" }
  51787. }),
  51788. _vm._v(" "),
  51789. _c("span", [
  51790. _vm._v(
  51791. _vm._s(
  51792. _vm.$L(
  51793. "通话时长:%",
  51794. _vm.formatSecond(_vm.info.other.second)
  51795. )
  51796. )
  51797. )
  51798. ])
  51799. ],
  51800. 1
  51801. )
  51802. : _vm._e()
  51803. ],
  51804. 2
  51805. )
  51806. ],
  51807. 1
  51808. )
  51809. : _vm._e()
  51810. ])
  51811. : _vm.info.type === "image" || _vm.info.type === "file"
  51812. ? _c("div", [
  51813. _vm.info.self === true
  51814. ? _c(
  51815. "div",
  51816. { staticClass: "list-right" },
  51817. [
  51818. _vm.info.error
  51819. ? _c(
  51820. "div",
  51821. {
  51822. staticClass: "item-error",
  51823. on: {
  51824. click: function($event) {
  51825. return _vm.clickError(_vm.info.error)
  51826. }
  51827. }
  51828. },
  51829. [_c("Icon", { attrs: { type: "md-alert" } })],
  51830. 1
  51831. )
  51832. : _vm._e(),
  51833. _vm._v(" "),
  51834. _c("div", { staticClass: "item-right" }, [
  51835. _c(
  51836. "div",
  51837. {
  51838. staticClass: "item-username",
  51839. on: { click: _vm.clickUser }
  51840. },
  51841. [
  51842. _c(
  51843. "em",
  51844. { staticClass: "item-name" },
  51845. [
  51846. _c("UserView", {
  51847. attrs: {
  51848. username: _vm.userName,
  51849. info: _vm.info,
  51850. placement: "left"
  51851. }
  51852. })
  51853. ],
  51854. 1
  51855. ),
  51856. _vm._v(" "),
  51857. _vm.info.indate
  51858. ? _c("em", { staticClass: "item-date" }, [
  51859. _vm._v(_vm._s(_vm.formatCDate(_vm.info.indate)))
  51860. ])
  51861. : _vm._e()
  51862. ]
  51863. ),
  51864. _vm._v(" "),
  51865. _vm.info.url === "loading"
  51866. ? _c(
  51867. "div",
  51868. { staticClass: "item-loading" },
  51869. [_c("WLoading")],
  51870. 1
  51871. )
  51872. : _c(
  51873. "a",
  51874. {
  51875. staticClass: "item-file",
  51876. attrs: { href: _vm.info.url, target: "_blank" }
  51877. },
  51878. [
  51879. _vm.info.type === "file"
  51880. ? _c("div", { staticClass: "item-file-box" }, [
  51881. _c("img", {
  51882. staticClass: "item-file-thumb",
  51883. attrs: { src: _vm.info.filethumb }
  51884. }),
  51885. _vm._v(" "),
  51886. _c("div", { staticClass: "item-file-info" }, [
  51887. _c(
  51888. "div",
  51889. { staticClass: "item-file-name" },
  51890. [_vm._v(_vm._s(_vm.info.filename))]
  51891. ),
  51892. _vm._v(" "),
  51893. _c(
  51894. "div",
  51895. { staticClass: "item-file-size" },
  51896. [
  51897. _vm._v(
  51898. _vm._s(
  51899. _vm.$A.bytesToSize(
  51900. _vm.$A.runNum(_vm.info.filesize) *
  51901. 1024
  51902. )
  51903. )
  51904. )
  51905. ]
  51906. )
  51907. ])
  51908. ])
  51909. : _c("img", {
  51910. staticClass: "item-file-img",
  51911. style: _vm.imageStyle(_vm.info),
  51912. attrs: { src: _vm.info.url }
  51913. })
  51914. ]
  51915. )
  51916. ]),
  51917. _vm._v(" "),
  51918. _c("UserImg", {
  51919. staticClass: "item-userimg",
  51920. attrs: { info: _vm.info },
  51921. on: { click: _vm.clickUser }
  51922. })
  51923. ],
  51924. 1
  51925. )
  51926. : _vm.info.self === false
  51927. ? _c(
  51928. "div",
  51929. { staticClass: "list-item" },
  51930. [
  51931. _c("UserImg", {
  51932. staticClass: "item-userimg",
  51933. attrs: { info: _vm.info },
  51934. on: { click: _vm.clickUser }
  51935. }),
  51936. _vm._v(" "),
  51937. _c("div", { staticClass: "item-left" }, [
  51938. _c(
  51939. "div",
  51940. {
  51941. staticClass: "item-username",
  51942. on: { click: _vm.clickUser }
  51943. },
  51944. [
  51945. _c(
  51946. "em",
  51947. { staticClass: "item-name" },
  51948. [
  51949. _c("UserView", {
  51950. attrs: {
  51951. username: _vm.userName,
  51952. info: _vm.info,
  51953. placement: "right"
  51954. }
  51955. })
  51956. ],
  51957. 1
  51958. ),
  51959. _vm._v(" "),
  51960. _vm.info.__usertag
  51961. ? _c("em", { staticClass: "item-tag" }, [
  51962. _vm._v(_vm._s(_vm.info.__usertag))
  51963. ])
  51964. : _vm._e(),
  51965. _vm._v(" "),
  51966. _vm.info.indate
  51967. ? _c("em", { staticClass: "item-date" }, [
  51968. _vm._v(_vm._s(_vm.formatCDate(_vm.info.indate)))
  51969. ])
  51970. : _vm._e()
  51971. ]
  51972. ),
  51973. _vm._v(" "),
  51974. _vm.info.url === "loading"
  51975. ? _c(
  51976. "div",
  51977. { staticClass: "item-loading" },
  51978. [_c("WLoading")],
  51979. 1
  51980. )
  51981. : _c(
  51982. "a",
  51983. {
  51984. staticClass: "item-file",
  51985. attrs: { href: _vm.info.url, target: "_blank" }
  51986. },
  51987. [
  51988. _vm.info.type === "file"
  51989. ? _c("div", { staticClass: "item-file-box" }, [
  51990. _c("img", {
  51991. staticClass: "item-file-thumb",
  51992. attrs: { src: _vm.info.filethumb }
  51993. }),
  51994. _vm._v(" "),
  51995. _c("div", { staticClass: "item-file-info" }, [
  51996. _c(
  51997. "div",
  51998. { staticClass: "item-file-name" },
  51999. [_vm._v(_vm._s(_vm.info.filename))]
  52000. ),
  52001. _vm._v(" "),
  52002. _c(
  52003. "div",
  52004. { staticClass: "item-file-size" },
  52005. [
  52006. _vm._v(
  52007. _vm._s(
  52008. _vm.$A.bytesToSize(
  52009. _vm.$A.runNum(_vm.info.filesize) *
  52010. 1024
  52011. )
  52012. )
  52013. )
  52014. ]
  52015. )
  52016. ])
  52017. ])
  52018. : _c("img", {
  52019. staticClass: "item-file-img",
  52020. style: _vm.imageStyle(_vm.info),
  52021. attrs: { src: _vm.info.url }
  52022. })
  52023. ]
  52024. )
  52025. ])
  52026. ],
  52027. 1
  52028. )
  52029. : _vm._e()
  52030. ])
  52031. : _vm.info.type === "notice"
  52032. ? _c("div", [
  52033. _c("div", { staticClass: "item-notice" }, [
  52034. _vm._v(_vm._s(_vm.info.notice))
  52035. ])
  52036. ])
  52037. : _vm._e()
  52038. ])
  52039. }
  52040. var staticRenderFns = []
  52041. render._withStripped = true
  52042. module.exports = { render: render, staticRenderFns: staticRenderFns }
  52043. if (false) {
  52044. module.hot.accept()
  52045. if (module.hot.data) {
  52046. require("vue-hot-reload-api") .rerender("data-v-9d161836", module.exports)
  52047. }
  52048. }
  52049. /***/ }),
  52050. /* 121 */
  52051. /***/ (function(module, exports, __webpack_require__) {
  52052. var disposed = false
  52053. var normalizeComponent = __webpack_require__(2)
  52054. /* script */
  52055. var __vue_script__ = __webpack_require__(122)
  52056. /* template */
  52057. var __vue_template__ = __webpack_require__(123)
  52058. /* template functional */
  52059. var __vue_template_functional__ = false
  52060. /* styles */
  52061. var __vue_styles__ = null
  52062. /* scopeId */
  52063. var __vue_scopeId__ = null
  52064. /* moduleIdentifier (server only) */
  52065. var __vue_module_identifier__ = null
  52066. var Component = normalizeComponent(
  52067. __vue_script__,
  52068. __vue_template__,
  52069. __vue_template_functional__,
  52070. __vue_styles__,
  52071. __vue_scopeId__,
  52072. __vue_module_identifier__
  52073. )
  52074. Component.options.__file = "resources/assets/js/main/components/chat/Upload.vue"
  52075. /* hot reload */
  52076. if (false) {(function () {
  52077. var hotAPI = require("vue-hot-reload-api")
  52078. hotAPI.install(require("vue"), false)
  52079. if (!hotAPI.compatible) return
  52080. module.hot.accept()
  52081. if (!module.hot.data) {
  52082. hotAPI.createRecord("data-v-1ed0eada", Component.options)
  52083. } else {
  52084. hotAPI.reload("data-v-1ed0eada", Component.options)
  52085. }
  52086. module.hot.dispose(function (data) {
  52087. disposed = true
  52088. })
  52089. })()}
  52090. module.exports = Component.exports
  52091. /***/ }),
  52092. /* 122 */
  52093. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  52094. "use strict";
  52095. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  52096. //
  52097. //
  52098. //
  52099. //
  52100. //
  52101. //
  52102. //
  52103. //
  52104. //
  52105. //
  52106. //
  52107. //
  52108. //
  52109. //
  52110. //
  52111. //
  52112. //
  52113. //
  52114. /* harmony default export */ __webpack_exports__["default"] = ({
  52115. name: 'ChatLoad',
  52116. props: {
  52117. target: {
  52118. default: ''
  52119. },
  52120. maxSize: {
  52121. type: Number,
  52122. default: 204800
  52123. }
  52124. },
  52125. data: function data() {
  52126. return {
  52127. uploadFormat: ['jpg', 'jpeg', 'png', 'gif', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'esp', 'pdf', 'rar', 'zip', 'gz', 'ai', 'avi', 'bmp', 'cdr', 'eps', 'mov', 'mp3', 'mp4', 'pr', 'psd', 'svg', 'tif'],
  52128. actionUrl: $A.apiUrl('chat/files/upload'),
  52129. params: {
  52130. username: this.target,
  52131. token: $A.getToken()
  52132. }
  52133. };
  52134. },
  52135. watch: {
  52136. target: function target(val) {
  52137. this.$set(this.params, 'username', val);
  52138. }
  52139. },
  52140. methods: {
  52141. handleProgress: function handleProgress(event, file) {
  52142. //上传时
  52143. if (typeof file.tempId === "undefined") {
  52144. file.tempId = $A.randomString(8);
  52145. this.$emit('on-progress', file);
  52146. }
  52147. },
  52148. handleSuccess: function handleSuccess(res, file) {
  52149. //上传完成
  52150. if (res.ret === 1) {
  52151. for (var key in res.data) {
  52152. if (res.data.hasOwnProperty(key)) {
  52153. file[key] = res.data[key];
  52154. }
  52155. }
  52156. this.$emit('on-success', file);
  52157. } else {
  52158. this.$Modal.warning({
  52159. title: this.$L('上传失败'),
  52160. content: this.$L('文件 % 上传失败,%', file.name, res.msg)
  52161. });
  52162. this.$emit('on-error', file);
  52163. this.$refs.upload.fileList.pop();
  52164. }
  52165. },
  52166. handleFormatError: function handleFormatError(file) {
  52167. //上传类型错误
  52168. this.$Modal.warning({
  52169. title: this.$L('文件格式不正确'),
  52170. content: this.$L('文件 % 格式不正确,仅支持上传:%', file.name, this.uploadFormat.join(','))
  52171. });
  52172. },
  52173. handleMaxSize: function handleMaxSize(file) {
  52174. //上传大小错误
  52175. this.$Modal.warning({
  52176. title: this.$L('超出文件大小限制'),
  52177. content: this.$L('文件 % 太大,不能超过%。', file.name, $A.bytesToSize(this.maxSize * 1024))
  52178. });
  52179. },
  52180. handleBeforeUpload: function handleBeforeUpload() {
  52181. //上传前判断
  52182. this.params = {
  52183. username: this.target,
  52184. token: $A.getToken()
  52185. };
  52186. return true;
  52187. },
  52188. handleClick: function handleClick() {
  52189. //手动上传
  52190. if (this.handleBeforeUpload()) {
  52191. this.$refs.upload.handleClick();
  52192. }
  52193. },
  52194. upload: function upload(file) {
  52195. //手动传file
  52196. if (this.handleBeforeUpload()) {
  52197. this.$refs.upload.upload(file);
  52198. }
  52199. }
  52200. }
  52201. });
  52202. /***/ }),
  52203. /* 123 */
  52204. /***/ (function(module, exports, __webpack_require__) {
  52205. var render = function() {
  52206. var _vm = this
  52207. var _h = _vm.$createElement
  52208. var _c = _vm._self._c || _h
  52209. return _c("Upload", {
  52210. ref: "upload",
  52211. attrs: {
  52212. name: "files",
  52213. action: _vm.actionUrl,
  52214. data: _vm.params,
  52215. multiple: "",
  52216. format: _vm.uploadFormat,
  52217. "show-upload-list": false,
  52218. "max-size": _vm.maxSize,
  52219. "on-progress": _vm.handleProgress,
  52220. "on-success": _vm.handleSuccess,
  52221. "on-format-error": _vm.handleFormatError,
  52222. "on-exceeded-size": _vm.handleMaxSize,
  52223. "before-upload": _vm.handleBeforeUpload
  52224. }
  52225. })
  52226. }
  52227. var staticRenderFns = []
  52228. render._withStripped = true
  52229. module.exports = { render: render, staticRenderFns: staticRenderFns }
  52230. if (false) {
  52231. module.hot.accept()
  52232. if (module.hot.data) {
  52233. require("vue-hot-reload-api") .rerender("data-v-1ed0eada", module.exports)
  52234. }
  52235. }
  52236. /***/ }),
  52237. /* 124 */
  52238. /***/ (function(module, exports, __webpack_require__) {
  52239. var render = function() {
  52240. var _vm = this
  52241. var _h = _vm.$createElement
  52242. var _c = _vm._self._c || _h
  52243. return _c("div", { staticClass: "chat-index" }, [
  52244. _c("ul", { staticClass: "chat-menu" }, [
  52245. _c(
  52246. "li",
  52247. { staticClass: "self" },
  52248. [
  52249. _c("UserImg", { staticClass: "avatar", attrs: { info: _vm.usrInfo } })
  52250. ],
  52251. 1
  52252. ),
  52253. _vm._v(" "),
  52254. _c(
  52255. "li",
  52256. {
  52257. class: { active: _vm.chatTap == "dialog" },
  52258. on: {
  52259. click: function($event) {
  52260. ;[(_vm.chatTap = "dialog"), (_vm.chatTam = "dialog")]
  52261. }
  52262. }
  52263. },
  52264. [
  52265. _c("Icon", { attrs: { type: "md-text" } }),
  52266. _vm._v(" "),
  52267. _vm.unreadTotal > 0
  52268. ? _c("em", { staticClass: "chat-num" }, [
  52269. _vm._v(_vm._s(_vm.unreadTotal > 99 ? "99+" : _vm.unreadTotal))
  52270. ])
  52271. : _vm._e()
  52272. ],
  52273. 1
  52274. ),
  52275. _vm._v(" "),
  52276. _c(
  52277. "li",
  52278. {
  52279. class: { active: _vm.chatTap == "team" },
  52280. on: {
  52281. click: function($event) {
  52282. ;[(_vm.chatTap = "team"), (_vm.chatTam = "team")]
  52283. }
  52284. }
  52285. },
  52286. [_c("Icon", { attrs: { type: "md-person" } })],
  52287. 1
  52288. )
  52289. ]),
  52290. _vm._v(" "),
  52291. _c(
  52292. "ul",
  52293. {
  52294. staticClass: "chat-user",
  52295. class: {
  52296. "chat-flex": _vm.chatTap == "dialog",
  52297. "chat-tam": _vm.chatTam == "dialog"
  52298. }
  52299. },
  52300. [
  52301. _c(
  52302. "li",
  52303. { staticClass: "sreach" },
  52304. [
  52305. _c("Input", {
  52306. attrs: { placeholder: _vm.$L("搜索"), prefix: "ios-search" },
  52307. model: {
  52308. value: _vm.dialogSearch,
  52309. callback: function($$v) {
  52310. _vm.dialogSearch = $$v
  52311. },
  52312. expression: "dialogSearch"
  52313. }
  52314. })
  52315. ],
  52316. 1
  52317. ),
  52318. _vm._v(" "),
  52319. _c("li", { ref: "dialogLists", staticClass: "lists" }, [
  52320. _c(
  52321. "ul",
  52322. [
  52323. _vm._l(_vm.dialogListsS, function(dialog, index) {
  52324. return _c(
  52325. "li",
  52326. {
  52327. key: index,
  52328. class: {
  52329. active: dialog.username == _vm.dialogTarget.username
  52330. },
  52331. attrs: { "data-id": dialog.id },
  52332. on: {
  52333. click: function($event) {
  52334. return _vm.openDialog(dialog)
  52335. }
  52336. }
  52337. },
  52338. [
  52339. _c("UserImg", {
  52340. staticClass: "avatar",
  52341. attrs: { info: dialog }
  52342. }),
  52343. _vm._v(" "),
  52344. _c("div", { staticClass: "user-msg-box" }, [
  52345. _c("div", { staticClass: "user-msg-title" }, [
  52346. _c(
  52347. "span",
  52348. [
  52349. _c("UserView", {
  52350. attrs: {
  52351. username: dialog.username,
  52352. placement: "right"
  52353. },
  52354. on: {
  52355. "on-result": function($event) {
  52356. return _vm.userViewResult(dialog, $event)
  52357. }
  52358. }
  52359. })
  52360. ],
  52361. 1
  52362. ),
  52363. _vm._v(" "),
  52364. _c("em", [
  52365. _vm._v(_vm._s(_vm.formatCDate(dialog.lastdate)))
  52366. ])
  52367. ]),
  52368. _vm._v(" "),
  52369. _c("div", { staticClass: "user-msg-text" }, [
  52370. _vm._v(_vm._s(dialog.lasttext))
  52371. ])
  52372. ]),
  52373. _vm._v(" "),
  52374. dialog.unread > 0
  52375. ? _c("em", { staticClass: "user-msg-num" }, [
  52376. _vm._v(_vm._s(dialog.unread))
  52377. ])
  52378. : _vm._e()
  52379. ],
  52380. 1
  52381. )
  52382. }),
  52383. _vm._v(" "),
  52384. _vm.dialogNoDataText == _vm.$L("数据加载中.....")
  52385. ? _c("li", { staticClass: "chat-none" }, [_c("w-loading")], 1)
  52386. : _vm.dialogLists.length == 0
  52387. ? _c("li", { staticClass: "chat-none" }, [
  52388. _vm._v(_vm._s(_vm.dialogNoDataText))
  52389. ])
  52390. : _vm._e()
  52391. ],
  52392. 2
  52393. )
  52394. ])
  52395. ]
  52396. ),
  52397. _vm._v(" "),
  52398. _c(
  52399. "ul",
  52400. {
  52401. staticClass: "chat-team",
  52402. class: {
  52403. "chat-flex": _vm.chatTap == "team",
  52404. "chat-tam": _vm.chatTam == "team"
  52405. }
  52406. },
  52407. [
  52408. _c(
  52409. "li",
  52410. { staticClass: "sreach" },
  52411. [
  52412. _c("Input", {
  52413. attrs: { placeholder: _vm.$L("搜索"), prefix: "ios-search" },
  52414. model: {
  52415. value: _vm.teamSearch,
  52416. callback: function($$v) {
  52417. _vm.teamSearch = $$v
  52418. },
  52419. expression: "teamSearch"
  52420. }
  52421. })
  52422. ],
  52423. 1
  52424. ),
  52425. _vm._v(" "),
  52426. _c("li", { staticClass: "lists" }, [
  52427. _c(
  52428. "ul",
  52429. [
  52430. _vm._l(_vm.teamLists, function(lists, key) {
  52431. return _vm.teamListsS(lists).length > 0
  52432. ? _c("li", { key: key }, [
  52433. _c("div", { staticClass: "team-label" }, [
  52434. _vm._v(_vm._s(key))
  52435. ]),
  52436. _vm._v(" "),
  52437. _c(
  52438. "ul",
  52439. _vm._l(_vm.teamListsS(lists), function(item, index) {
  52440. return _c(
  52441. "li",
  52442. {
  52443. key: index,
  52444. on: {
  52445. click: function($event) {
  52446. return _vm.openDialog(item, true)
  52447. }
  52448. }
  52449. },
  52450. [
  52451. _c("UserImg", {
  52452. staticClass: "avatar",
  52453. attrs: { info: item }
  52454. }),
  52455. _vm._v(" "),
  52456. _c("div", { staticClass: "team-username" }, [
  52457. _vm._v(_vm._s(item.nickname || item.username))
  52458. ])
  52459. ],
  52460. 1
  52461. )
  52462. }),
  52463. 0
  52464. )
  52465. ])
  52466. : _vm._e()
  52467. }),
  52468. _vm._v(" "),
  52469. _vm.teamNoDataText == _vm.$L("数据加载中.....")
  52470. ? _c("li", { staticClass: "chat-none" }, [_c("w-loading")], 1)
  52471. : Object.keys(_vm.teamLists).length == 0
  52472. ? _c("li", { staticClass: "chat-none" }, [
  52473. _vm._v(_vm._s(_vm.teamNoDataText))
  52474. ])
  52475. : _vm._e(),
  52476. _vm._v(" "),
  52477. _vm.teamHasMorePages
  52478. ? _c(
  52479. "li",
  52480. {
  52481. staticClass: "chat-more",
  52482. on: {
  52483. click: function($event) {
  52484. return _vm.getTeamLists(true)
  52485. }
  52486. }
  52487. },
  52488. [_vm._v(_vm._s(_vm.$L("加载更多...")))]
  52489. )
  52490. : _vm._e()
  52491. ],
  52492. 2
  52493. )
  52494. ])
  52495. ]
  52496. ),
  52497. _vm._v(" "),
  52498. _c(
  52499. "div",
  52500. {
  52501. staticClass: "chat-message",
  52502. style: {
  52503. display:
  52504. _vm.chatTap == "dialog" && _vm.dialogTarget.username
  52505. ? "block"
  52506. : "none"
  52507. },
  52508. on: {
  52509. drop: function($event) {
  52510. $event.preventDefault()
  52511. return _vm.messagePasteDrag($event, "drag")
  52512. },
  52513. dragover: function($event) {
  52514. $event.preventDefault()
  52515. return _vm.messageDragOver(true)
  52516. },
  52517. dragleave: function($event) {
  52518. $event.preventDefault()
  52519. return _vm.messageDragOver(false)
  52520. }
  52521. }
  52522. },
  52523. [
  52524. _c(
  52525. "div",
  52526. { staticClass: "manage-title" },
  52527. [
  52528. _c("UserView", { attrs: { username: _vm.dialogTarget.username } }),
  52529. _vm._v(" "),
  52530. _c(
  52531. "Dropdown",
  52532. {
  52533. staticClass: "manage-title-right",
  52534. attrs: {
  52535. placement: "bottom-end",
  52536. trigger: "click",
  52537. transfer: ""
  52538. },
  52539. on: { "on-click": _vm.dialogDropdown }
  52540. },
  52541. [
  52542. _c("Icon", { attrs: { type: "ios-more" } }),
  52543. _vm._v(" "),
  52544. _c(
  52545. "DropdownMenu",
  52546. { attrs: { slot: "list" }, slot: "list" },
  52547. [
  52548. _c("DropdownItem", { attrs: { name: "delete" } }, [
  52549. _vm._v(_vm._s(_vm.$L("删除对话")))
  52550. ]),
  52551. _vm._v(" "),
  52552. _c("DropdownItem", { attrs: { name: "clear" } }, [
  52553. _vm._v(_vm._s(_vm.$L("清除聊天记录")))
  52554. ])
  52555. ],
  52556. 1
  52557. )
  52558. ],
  52559. 1
  52560. )
  52561. ],
  52562. 1
  52563. ),
  52564. _vm._v(" "),
  52565. _c(
  52566. "ScrollerY",
  52567. {
  52568. ref: "manageLists",
  52569. staticClass: "manage-lists",
  52570. on: { "on-scroll": _vm.messageListsScroll }
  52571. },
  52572. [
  52573. _c(
  52574. "div",
  52575. { ref: "manageBody", staticClass: "manage-body" },
  52576. [
  52577. _vm.messageHasMorePages
  52578. ? _c(
  52579. "div",
  52580. {
  52581. staticClass: "manage-more",
  52582. on: {
  52583. click: function($event) {
  52584. return _vm.getDialogMessage(true)
  52585. }
  52586. }
  52587. },
  52588. [_vm._v(_vm._s(_vm.$L("加载更多...")))]
  52589. )
  52590. : _vm._e(),
  52591. _vm._v(" "),
  52592. _vm.messageNoDataText == _vm.$L("数据加载中.....")
  52593. ? _c(
  52594. "div",
  52595. { staticClass: "manage-more" },
  52596. [_c("w-loading")],
  52597. 1
  52598. )
  52599. : _vm.messageNoDataText
  52600. ? _c("div", { staticClass: "manage-more" }, [
  52601. _vm._v(_vm._s(_vm.messageNoDataText))
  52602. ])
  52603. : _vm._e(),
  52604. _vm._v(" "),
  52605. _vm._l(_vm.messageLists, function(info, index) {
  52606. return _c("chat-message", {
  52607. key: index,
  52608. attrs: { info: info }
  52609. })
  52610. })
  52611. ],
  52612. 2
  52613. ),
  52614. _vm._v(" "),
  52615. _vm.messageNew > 0
  52616. ? _c(
  52617. "div",
  52618. {
  52619. staticClass: "manage-lists-message-new",
  52620. on: {
  52621. click: function($event) {
  52622. return _vm.messageBottomGo(true)
  52623. }
  52624. }
  52625. },
  52626. [_vm._v(_vm._s(_vm.$L("有%条新消息", _vm.messageNew)))]
  52627. )
  52628. : _vm._e()
  52629. ]
  52630. ),
  52631. _vm._v(" "),
  52632. _c(
  52633. "div",
  52634. {
  52635. staticClass: "manage-send",
  52636. on: {
  52637. click: function($event) {
  52638. return _vm.clickDialog(_vm.dialogTarget.username)
  52639. }
  52640. }
  52641. },
  52642. [
  52643. _c("textarea", {
  52644. directives: [
  52645. {
  52646. name: "model",
  52647. rawName: "v-model",
  52648. value: _vm.messageText,
  52649. expression: "messageText"
  52650. }
  52651. ],
  52652. ref: "textarea",
  52653. staticClass: "manage-input",
  52654. attrs: {
  52655. maxlength: "20000",
  52656. placeholder: _vm.$L("请输入要发送的消息")
  52657. },
  52658. domProps: { value: _vm.messageText },
  52659. on: {
  52660. keydown: function($event) {
  52661. return _vm.messageSend($event)
  52662. },
  52663. paste: _vm.messagePasteDrag,
  52664. input: function($event) {
  52665. if ($event.target.composing) {
  52666. return
  52667. }
  52668. _vm.messageText = $event.target.value
  52669. }
  52670. }
  52671. })
  52672. ]
  52673. ),
  52674. _vm._v(" "),
  52675. _c(
  52676. "div",
  52677. { staticClass: "manage-quick" },
  52678. [
  52679. _c("emoji-picker", {
  52680. attrs: { search: _vm.messageEmojiSearch },
  52681. on: { emoji: _vm.messageInsertText },
  52682. scopedSlots: _vm._u([
  52683. {
  52684. key: "emoji-invoker",
  52685. fn: function(ref) {
  52686. var clickEvent = ref.events.click
  52687. return _c(
  52688. "div",
  52689. {
  52690. on: {
  52691. click: function($event) {
  52692. $event.stopPropagation()
  52693. return function(event) {
  52694. clickEvent(event)
  52695. }.apply(null, arguments)
  52696. }
  52697. }
  52698. },
  52699. [
  52700. _c(
  52701. "Tooltip",
  52702. {
  52703. attrs: { content: _vm.$L("表情"), placement: "top" }
  52704. },
  52705. [
  52706. _c("Icon", {
  52707. staticClass: "quick-item",
  52708. attrs: { type: "ios-happy-outline" }
  52709. })
  52710. ],
  52711. 1
  52712. )
  52713. ],
  52714. 1
  52715. )
  52716. }
  52717. },
  52718. {
  52719. key: "emoji-picker",
  52720. fn: function(ref) {
  52721. var emojis = ref.emojis
  52722. var insert = ref.insert
  52723. var display = ref.display
  52724. return _c("div", {}, [
  52725. _c(
  52726. "div",
  52727. { staticClass: "emoji-box" },
  52728. [
  52729. _c("Input", {
  52730. staticClass: "emoji-input",
  52731. attrs: {
  52732. placeholder: _vm.$L("搜索"),
  52733. prefix: "ios-search"
  52734. },
  52735. model: {
  52736. value: _vm.messageEmojiSearch,
  52737. callback: function($$v) {
  52738. _vm.messageEmojiSearch = $$v
  52739. },
  52740. expression: "messageEmojiSearch"
  52741. }
  52742. }),
  52743. _vm._v(" "),
  52744. _c(
  52745. "div",
  52746. _vm._l(emojis, function(emojiGroup, category) {
  52747. return _c("div", { key: category }, [
  52748. _c("h5", [_vm._v(_vm._s(category))]),
  52749. _vm._v(" "),
  52750. _c(
  52751. "div",
  52752. { staticClass: "emojis" },
  52753. _vm._l(emojiGroup, function(
  52754. emoji,
  52755. emojiName
  52756. ) {
  52757. return _c(
  52758. "span",
  52759. {
  52760. key: emojiName,
  52761. attrs: { title: emojiName },
  52762. on: {
  52763. click: function($event) {
  52764. return insert(emoji)
  52765. }
  52766. }
  52767. },
  52768. [_vm._v(_vm._s(emoji))]
  52769. )
  52770. }),
  52771. 0
  52772. )
  52773. ])
  52774. }),
  52775. 0
  52776. )
  52777. ],
  52778. 1
  52779. )
  52780. ])
  52781. }
  52782. }
  52783. ])
  52784. }),
  52785. _vm._v(" "),
  52786. _c(
  52787. "Tooltip",
  52788. { attrs: { content: _vm.$L("文件/图片"), placement: "top" } },
  52789. [
  52790. _c("Icon", {
  52791. staticClass: "quick-item",
  52792. attrs: { type: "ios-photos-outline" },
  52793. on: {
  52794. click: function($event) {
  52795. return _vm.$refs.messageUpload.handleClick()
  52796. }
  52797. }
  52798. }),
  52799. _vm._v(" "),
  52800. _c("ChatLoad", {
  52801. ref: "messageUpload",
  52802. staticClass: "message-upload",
  52803. attrs: { target: _vm.dialogTarget.username },
  52804. on: {
  52805. "on-progress": function($event) {
  52806. return _vm.messageFile("progress", $event)
  52807. },
  52808. "on-success": function($event) {
  52809. return _vm.messageFile("success", $event)
  52810. },
  52811. "on-error": function($event) {
  52812. return _vm.messageFile("error", $event)
  52813. }
  52814. }
  52815. })
  52816. ],
  52817. 1
  52818. ),
  52819. _vm._v(" "),
  52820. _vm.systemConfig.callav == "open"
  52821. ? [
  52822. _c(
  52823. "Tooltip",
  52824. {
  52825. attrs: { content: _vm.$L("语音聊天"), placement: "top" }
  52826. },
  52827. [
  52828. _c("Icon", {
  52829. staticClass: "quick-item voicecam",
  52830. attrs: { type: "ios-call-outline" },
  52831. on: {
  52832. click: function($event) {
  52833. return _vm.videoConnect(null, false)
  52834. }
  52835. }
  52836. })
  52837. ],
  52838. 1
  52839. ),
  52840. _vm._v(" "),
  52841. _c(
  52842. "Tooltip",
  52843. {
  52844. attrs: { content: _vm.$L("视频聊天"), placement: "top" }
  52845. },
  52846. [
  52847. _c("Icon", {
  52848. staticClass: "quick-item videocam",
  52849. attrs: { type: "ios-videocam-outline" },
  52850. on: {
  52851. click: function($event) {
  52852. return _vm.videoConnect(null, true)
  52853. }
  52854. }
  52855. })
  52856. ],
  52857. 1
  52858. )
  52859. ]
  52860. : _vm._e()
  52861. ],
  52862. 2
  52863. ),
  52864. _vm._v(" "),
  52865. _vm.dialogDragOver
  52866. ? _c("div", { staticClass: "manage-drag-over" }, [
  52867. _c("div", { staticClass: "manage-drag-text" }, [
  52868. _vm._v(
  52869. _vm._s(
  52870. _vm.$L(
  52871. "拖动到这里发送给 %",
  52872. _vm.dialogTarget.nickname || _vm.dialogTarget.username
  52873. )
  52874. )
  52875. )
  52876. ])
  52877. ])
  52878. : _vm._e()
  52879. ],
  52880. 1
  52881. ),
  52882. _vm._v(" "),
  52883. _c(
  52884. "div",
  52885. {
  52886. staticClass: "chat-video",
  52887. style: {
  52888. display: _vm.videoUserName ? "block" : "none",
  52889. backgroundImage: "url(" + _vm.videoUserImg + ")"
  52890. }
  52891. },
  52892. [
  52893. _vm.videoChat
  52894. ? _c("div", { staticClass: "video-opacity" }, [
  52895. _vm._v(_vm._s(_vm.$L("正在视频通话...")))
  52896. ])
  52897. : _c("div", { staticClass: "video-opacity" }, [
  52898. _vm._v(_vm._s(_vm.$L("正在语音通话...")))
  52899. ]),
  52900. _vm._v(" "),
  52901. _c("video", {
  52902. ref: "remoteVideo",
  52903. staticClass: "video-active",
  52904. attrs: { autoplay: "" }
  52905. }),
  52906. _vm._v(" "),
  52907. _c("video", {
  52908. ref: "localVideo",
  52909. staticClass: "video-mini",
  52910. attrs: { autoplay: "", muted: "true" },
  52911. domProps: { muted: true }
  52912. }),
  52913. _vm._v(" "),
  52914. _c(
  52915. "div",
  52916. { staticClass: "video-close" },
  52917. [
  52918. _c("Icon", {
  52919. attrs: { type: "ios-close-circle-outline" },
  52920. on: {
  52921. click: function($event) {
  52922. return _vm.videoClose(_vm.videoUserName)
  52923. }
  52924. }
  52925. })
  52926. ],
  52927. 1
  52928. )
  52929. ]
  52930. ),
  52931. _vm._v(" "),
  52932. _c(
  52933. "audio",
  52934. {
  52935. ref: "messageAudio",
  52936. staticClass: "chat-audio",
  52937. attrs: { preload: "none" }
  52938. },
  52939. [
  52940. _c("source", {
  52941. attrs: { src: _vm.messageAudio + "message.mp3", type: "audio/mpeg" }
  52942. }),
  52943. _vm._v(" "),
  52944. _c("source", {
  52945. attrs: { src: _vm.messageAudio + "message.wav", type: "audio/wav" }
  52946. })
  52947. ]
  52948. ),
  52949. _vm._v(" "),
  52950. _c(
  52951. "audio",
  52952. {
  52953. ref: "callAudio",
  52954. staticClass: "chat-audio",
  52955. attrs: { preload: "none" }
  52956. },
  52957. [
  52958. _c("source", {
  52959. attrs: { src: _vm.messageAudio + "call.mp3", type: "audio/mpeg" }
  52960. }),
  52961. _vm._v(" "),
  52962. _c("source", {
  52963. attrs: { src: _vm.messageAudio + "call.wav", type: "audio/wav" }
  52964. })
  52965. ]
  52966. )
  52967. ])
  52968. }
  52969. var staticRenderFns = []
  52970. render._withStripped = true
  52971. module.exports = { render: render, staticRenderFns: staticRenderFns }
  52972. if (false) {
  52973. module.hot.accept()
  52974. if (module.hot.data) {
  52975. require("vue-hot-reload-api") .rerender("data-v-3f6b8ea0", module.exports)
  52976. }
  52977. }
  52978. /***/ }),
  52979. /* 125 */
  52980. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  52981. "use strict";
  52982. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  52983. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_view_design_src_components_icon__ = __webpack_require__(126);
  52984. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_view_design_src_utils_assist__ = __webpack_require__(22);
  52985. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_view_design_src_directives_transfer_dom__ = __webpack_require__(130);
  52986. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_view_design_src_mixins_emitter__ = __webpack_require__(36);
  52987. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_view_design_src_components_modal_mixins_scrollbar__ = __webpack_require__(131);
  52988. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_view_design_src_utils_dom__ = __webpack_require__(132);
  52989. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  52990. //
  52991. //
  52992. //
  52993. //
  52994. //
  52995. //
  52996. //
  52997. //
  52998. //
  52999. //
  53000. //
  53001. //
  53002. //
  53003. //
  53004. //
  53005. //
  53006. //
  53007. //
  53008. //
  53009. //
  53010. //
  53011. //
  53012. //
  53013. //
  53014. //
  53015. //
  53016. //
  53017. //
  53018. //
  53019. //
  53020. //
  53021. var prefixCls = 'ivu-drawer';
  53022. /* harmony default export */ __webpack_exports__["default"] = ({
  53023. name: 'WDrawer',
  53024. mixins: [__WEBPACK_IMPORTED_MODULE_3_view_design_src_mixins_emitter__["a" /* default */], __WEBPACK_IMPORTED_MODULE_4_view_design_src_components_modal_mixins_scrollbar__["a" /* default */]],
  53025. components: { Icon: __WEBPACK_IMPORTED_MODULE_0_view_design_src_components_icon__["a" /* default */] },
  53026. directives: { TransferDom: __WEBPACK_IMPORTED_MODULE_2_view_design_src_directives_transfer_dom__["a" /* default */] },
  53027. props: {
  53028. value: {
  53029. type: Boolean,
  53030. default: false
  53031. },
  53032. title: {
  53033. type: String
  53034. },
  53035. width: {
  53036. type: [Number, String],
  53037. default: '100%'
  53038. },
  53039. minWidth: {
  53040. type: [Number, String],
  53041. default: 0
  53042. },
  53043. maxWidth: {
  53044. type: [Number, String],
  53045. default: 0
  53046. },
  53047. closable: {
  53048. type: Boolean,
  53049. default: true
  53050. },
  53051. maskClosable: {
  53052. type: Boolean,
  53053. default: true
  53054. },
  53055. mask: {
  53056. type: Boolean,
  53057. default: true
  53058. },
  53059. maskStyle: {
  53060. type: Object
  53061. },
  53062. styles: {
  53063. type: Object
  53064. },
  53065. scrollable: {
  53066. type: Boolean,
  53067. default: false
  53068. },
  53069. placement: {
  53070. validator: function validator(value) {
  53071. return Object(__WEBPACK_IMPORTED_MODULE_1_view_design_src_utils_assist__["e" /* oneOf */])(value, ['left', 'right']);
  53072. },
  53073. default: 'right'
  53074. },
  53075. zIndex: {
  53076. type: Number,
  53077. default: 1000
  53078. },
  53079. transfer: {
  53080. type: Boolean,
  53081. default: function _default() {
  53082. return !this.$IVIEW || this.$IVIEW.transfer === '' ? true : this.$IVIEW.transfer;
  53083. }
  53084. },
  53085. className: {
  53086. type: String
  53087. },
  53088. inner: {
  53089. type: Boolean,
  53090. default: false
  53091. },
  53092. // Whether drag and drop is allowed to adjust width
  53093. draggable: {
  53094. type: Boolean,
  53095. default: false
  53096. },
  53097. beforeClose: Function
  53098. },
  53099. data: function data() {
  53100. return {
  53101. prefixCls: prefixCls,
  53102. visible: this.value,
  53103. wrapShow: false,
  53104. showHead: true,
  53105. canMove: false,
  53106. dragWidth: this.width,
  53107. wrapperWidth: this.width,
  53108. wrapperLeft: 0,
  53109. minHandleWidth: 256
  53110. };
  53111. },
  53112. computed: {
  53113. wrapClasses: function wrapClasses() {
  53114. var _ref;
  53115. return [prefixCls + '-wrap', (_ref = {}, _defineProperty(_ref, prefixCls + '-hidden', !this.wrapShow), _defineProperty(_ref, '' + this.className, !!this.className), _defineProperty(_ref, prefixCls + '-no-mask', !this.mask), _defineProperty(_ref, prefixCls + '-wrap-inner', this.inner), _defineProperty(_ref, prefixCls + '-wrap-dragging', this.canMove), _ref)];
  53116. },
  53117. mainStyles: function mainStyles() {
  53118. var style = {};
  53119. var minWidth = parseInt(this.minWidth);
  53120. if (minWidth > 0) {
  53121. style.minWidth = minWidth <= 100 ? minWidth + '%' : minWidth + 'px';
  53122. }
  53123. var maxWidth = parseInt(this.maxWidth);
  53124. if (maxWidth > 0) {
  53125. style.maxWidth = maxWidth <= 100 ? maxWidth + '%' : maxWidth + 'px';
  53126. }
  53127. var width = parseInt(this.dragWidth);
  53128. var styleWidth = {
  53129. width: width <= 100 ? width + '%' : width + 'px'
  53130. };
  53131. Object.assign(style, styleWidth);
  53132. return style;
  53133. },
  53134. contentClasses: function contentClasses() {
  53135. return [prefixCls + '-content', _defineProperty({}, prefixCls + '-content-no-mask', !this.mask)];
  53136. },
  53137. classes: function classes() {
  53138. var _ref3;
  53139. return ['' + prefixCls, prefixCls + '-' + this.placement, (_ref3 = {}, _defineProperty(_ref3, prefixCls + '-no-header', !this.showHead), _defineProperty(_ref3, prefixCls + '-inner', this.inner), _ref3)];
  53140. },
  53141. maskClasses: function maskClasses() {
  53142. return [prefixCls + '-mask', _defineProperty({}, prefixCls + '-mask-inner', this.inner)];
  53143. }
  53144. },
  53145. methods: {
  53146. close: function close() {
  53147. var _this = this;
  53148. if (!this.beforeClose) {
  53149. return this.handleClose();
  53150. }
  53151. var before = this.beforeClose();
  53152. if (before && before.then) {
  53153. before.then(function () {
  53154. _this.handleClose();
  53155. });
  53156. } else {
  53157. this.handleClose();
  53158. }
  53159. },
  53160. handleClose: function handleClose() {
  53161. this.visible = false;
  53162. this.$emit('input', false);
  53163. this.$emit('on-close');
  53164. },
  53165. handleMask: function handleMask() {
  53166. if (this.maskClosable && this.mask) {
  53167. this.close();
  53168. }
  53169. },
  53170. handleWrapClick: function handleWrapClick(event) {
  53171. // use indexOf,do not use === ,because ivu-modal-wrap can have other custom className
  53172. var className = event.target.getAttribute('class');
  53173. if (className && className.indexOf(prefixCls + '-wrap') > -1) this.handleMask();
  53174. },
  53175. handleMousemove: function handleMousemove(event) {
  53176. if (!this.canMove || !this.draggable) return;
  53177. // 更新容器宽度和距离左侧页面距离,如果是window则距左侧距离为0
  53178. this.handleSetWrapperWidth();
  53179. var left = event.pageX - this.wrapperLeft;
  53180. // 如果抽屉方向为右边,宽度计算需用容器宽度减去left
  53181. var width = this.placement === 'right' ? this.wrapperWidth - left : left;
  53182. // 限定最小宽度
  53183. width = Math.max(width, parseFloat(this.minHandleWidth));
  53184. event.atMin = width === parseFloat(this.minHandleWidth);
  53185. // 如果当前width不大于100,视为百分比
  53186. if (width <= 100) width = width / this.wrapperWidth * 100;
  53187. this.dragWidth = width;
  53188. this.$emit('on-resize-width', parseInt(this.dragWidth));
  53189. },
  53190. handleSetWrapperWidth: function handleSetWrapperWidth() {
  53191. var _$el$getBoundingClien = this.$el.getBoundingClientRect(),
  53192. width = _$el$getBoundingClien.width,
  53193. left = _$el$getBoundingClien.left;
  53194. this.wrapperWidth = width;
  53195. this.wrapperLeft = left;
  53196. },
  53197. handleMouseup: function handleMouseup() {
  53198. if (!this.draggable) return;
  53199. this.canMove = false;
  53200. },
  53201. handleTriggerMousedown: function handleTriggerMousedown() {
  53202. this.canMove = true;
  53203. // 防止鼠标选中抽屉中文字,造成拖动trigger触发浏览器原生拖动行为
  53204. window.getSelection().removeAllRanges();
  53205. }
  53206. },
  53207. mounted: function mounted() {
  53208. if (this.visible) {
  53209. this.wrapShow = true;
  53210. }
  53211. var showHead = true;
  53212. if (this.$slots.header === undefined && !this.title) {
  53213. showHead = false;
  53214. }
  53215. this.showHead = showHead;
  53216. Object(__WEBPACK_IMPORTED_MODULE_5_view_design_src_utils_dom__["b" /* on */])(document, 'mousemove', this.handleMousemove);
  53217. Object(__WEBPACK_IMPORTED_MODULE_5_view_design_src_utils_dom__["b" /* on */])(document, 'mouseup', this.handleMouseup);
  53218. this.handleSetWrapperWidth();
  53219. },
  53220. beforeDestroy: function beforeDestroy() {
  53221. Object(__WEBPACK_IMPORTED_MODULE_5_view_design_src_utils_dom__["a" /* off */])(document, 'mousemove', this.handleMousemove);
  53222. Object(__WEBPACK_IMPORTED_MODULE_5_view_design_src_utils_dom__["a" /* off */])(document, 'mouseup', this.handleMouseup);
  53223. this.removeScrollEffect();
  53224. },
  53225. watch: {
  53226. value: function value(val) {
  53227. this.visible = val;
  53228. },
  53229. visible: function visible(val) {
  53230. var _this2 = this;
  53231. if (val === false) {
  53232. this.timer = setTimeout(function () {
  53233. _this2.wrapShow = false;
  53234. // #4831 Check if there are any drawers left at the parent level
  53235. var brotherDrawers = Object(__WEBPACK_IMPORTED_MODULE_1_view_design_src_utils_assist__["a" /* findBrothersComponents */])(_this2, 'Drawer') || [];
  53236. var parentDrawers = Object(__WEBPACK_IMPORTED_MODULE_1_view_design_src_utils_assist__["c" /* findComponentsUpward */])(_this2, 'Drawer') || [];
  53237. var otherDrawers = [].concat(brotherDrawers).concat(parentDrawers);
  53238. var isScrollDrawer = otherDrawers.some(function (item) {
  53239. return item.visible && !item.scrollable;
  53240. });
  53241. if (!isScrollDrawer) {
  53242. _this2.removeScrollEffect();
  53243. }
  53244. }, 300);
  53245. } else {
  53246. if (this.timer) clearTimeout(this.timer);
  53247. this.wrapShow = true;
  53248. if (!this.scrollable) {
  53249. this.addScrollEffect();
  53250. }
  53251. }
  53252. this.broadcast('Table', 'on-visible-change', val);
  53253. this.broadcast('Slider', 'on-visible-change', val); // #2852
  53254. this.$emit('on-visible-change', val);
  53255. },
  53256. scrollable: function scrollable(val) {
  53257. if (!val) {
  53258. this.addScrollEffect();
  53259. } else {
  53260. this.removeScrollEffect();
  53261. }
  53262. },
  53263. title: function title(val) {
  53264. if (this.$slots.header === undefined) {
  53265. this.showHead = !!val;
  53266. }
  53267. },
  53268. width: function width(val) {
  53269. this.dragWidth = val;
  53270. }
  53271. }
  53272. });
  53273. /***/ }),
  53274. /* 126 */
  53275. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  53276. "use strict";
  53277. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__icon_vue__ = __webpack_require__(127);
  53278. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__icon_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__icon_vue__);
  53279. /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__icon_vue___default.a);
  53280. /***/ }),
  53281. /* 127 */
  53282. /***/ (function(module, exports, __webpack_require__) {
  53283. var disposed = false
  53284. var normalizeComponent = __webpack_require__(2)
  53285. /* script */
  53286. var __vue_script__ = __webpack_require__(128)
  53287. /* template */
  53288. var __vue_template__ = __webpack_require__(129)
  53289. /* template functional */
  53290. var __vue_template_functional__ = false
  53291. /* styles */
  53292. var __vue_styles__ = null
  53293. /* scopeId */
  53294. var __vue_scopeId__ = null
  53295. /* moduleIdentifier (server only) */
  53296. var __vue_module_identifier__ = null
  53297. var Component = normalizeComponent(
  53298. __vue_script__,
  53299. __vue_template__,
  53300. __vue_template_functional__,
  53301. __vue_styles__,
  53302. __vue_scopeId__,
  53303. __vue_module_identifier__
  53304. )
  53305. Component.options.__file = "node_modules/view-design/src/components/icon/icon.vue"
  53306. /* hot reload */
  53307. if (false) {(function () {
  53308. var hotAPI = require("vue-hot-reload-api")
  53309. hotAPI.install(require("vue"), false)
  53310. if (!hotAPI.compatible) return
  53311. module.hot.accept()
  53312. if (!module.hot.data) {
  53313. hotAPI.createRecord("data-v-1c71251e", Component.options)
  53314. } else {
  53315. hotAPI.reload("data-v-1c71251e", Component.options)
  53316. }
  53317. module.hot.dispose(function (data) {
  53318. disposed = true
  53319. })
  53320. })()}
  53321. module.exports = Component.exports
  53322. /***/ }),
  53323. /* 128 */
  53324. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  53325. "use strict";
  53326. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  53327. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  53328. //
  53329. //
  53330. //
  53331. var prefixCls = 'ivu-icon';
  53332. /* harmony default export */ __webpack_exports__["default"] = ({
  53333. name: 'Icon',
  53334. props: {
  53335. type: {
  53336. type: String,
  53337. default: ''
  53338. },
  53339. size: [Number, String],
  53340. color: String,
  53341. custom: {
  53342. type: String,
  53343. default: ''
  53344. }
  53345. },
  53346. computed: {
  53347. classes: function classes() {
  53348. var _ref;
  53349. return ['' + prefixCls, (_ref = {}, _defineProperty(_ref, prefixCls + '-' + this.type, this.type !== ''), _defineProperty(_ref, '' + this.custom, this.custom !== ''), _ref)];
  53350. },
  53351. styles: function styles() {
  53352. var style = {};
  53353. if (this.size) {
  53354. style['font-size'] = this.size + 'px';
  53355. }
  53356. if (this.color) {
  53357. style.color = this.color;
  53358. }
  53359. return style;
  53360. }
  53361. },
  53362. methods: {
  53363. handleClick: function handleClick(event) {
  53364. this.$emit('click', event);
  53365. }
  53366. }
  53367. });
  53368. /***/ }),
  53369. /* 129 */
  53370. /***/ (function(module, exports, __webpack_require__) {
  53371. var render = function() {
  53372. var _vm = this
  53373. var _h = _vm.$createElement
  53374. var _c = _vm._self._c || _h
  53375. return _c("i", {
  53376. class: _vm.classes,
  53377. style: _vm.styles,
  53378. on: { click: _vm.handleClick }
  53379. })
  53380. }
  53381. var staticRenderFns = []
  53382. render._withStripped = true
  53383. module.exports = { render: render, staticRenderFns: staticRenderFns }
  53384. if (false) {
  53385. module.hot.accept()
  53386. if (module.hot.data) {
  53387. require("vue-hot-reload-api") .rerender("data-v-1c71251e", module.exports)
  53388. }
  53389. }
  53390. /***/ }),
  53391. /* 130 */
  53392. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  53393. "use strict";
  53394. // Thanks to: https://github.com/airyland/vux/blob/v2/src/directives/transfer-dom/index.js
  53395. // Thanks to: https://github.com/calebroseland/vue-dom-portal
  53396. /**
  53397. * Get target DOM Node
  53398. * @param {(Node|string|Boolean)} [node=document.body] DOM Node, CSS selector, or Boolean
  53399. * @return {Node} The target that the el will be appended to
  53400. */
  53401. function getTarget (node) {
  53402. if (node === void 0) {
  53403. node = document.body
  53404. }
  53405. if (node === true) { return document.body }
  53406. return node instanceof window.Node ? node : document.querySelector(node)
  53407. }
  53408. const directive = {
  53409. inserted (el, { value }, vnode) {
  53410. if ( el.dataset && el.dataset.transfer !== 'true') return false;
  53411. el.className = el.className ? el.className + ' v-transfer-dom' : 'v-transfer-dom';
  53412. const parentNode = el.parentNode;
  53413. if (!parentNode) return;
  53414. const home = document.createComment('');
  53415. let hasMovedOut = false;
  53416. if (value !== false) {
  53417. parentNode.replaceChild(home, el); // moving out, el is no longer in the document
  53418. getTarget(value).appendChild(el); // moving into new place
  53419. hasMovedOut = true
  53420. }
  53421. if (!el.__transferDomData) {
  53422. el.__transferDomData = {
  53423. parentNode: parentNode,
  53424. home: home,
  53425. target: getTarget(value),
  53426. hasMovedOut: hasMovedOut
  53427. }
  53428. }
  53429. },
  53430. componentUpdated (el, { value }) {
  53431. if ( el.dataset && el.dataset.transfer !== 'true') return false;
  53432. // need to make sure children are done updating (vs. `update`)
  53433. const ref$1 = el.__transferDomData;
  53434. if (!ref$1) return;
  53435. // homes.get(el)
  53436. const parentNode = ref$1.parentNode;
  53437. const home = ref$1.home;
  53438. const hasMovedOut = ref$1.hasMovedOut; // recall where home is
  53439. if (!hasMovedOut && value) {
  53440. // remove from document and leave placeholder
  53441. parentNode.replaceChild(home, el);
  53442. // append to target
  53443. getTarget(value).appendChild(el);
  53444. el.__transferDomData = Object.assign({}, el.__transferDomData, { hasMovedOut: true, target: getTarget(value) });
  53445. } else if (hasMovedOut && value === false) {
  53446. // previously moved, coming back home
  53447. parentNode.replaceChild(el, home);
  53448. el.__transferDomData = Object.assign({}, el.__transferDomData, { hasMovedOut: false, target: getTarget(value) });
  53449. } else if (value) {
  53450. // already moved, going somewhere else
  53451. getTarget(value).appendChild(el);
  53452. }
  53453. },
  53454. unbind (el) {
  53455. if (el.dataset && el.dataset.transfer !== 'true') return false;
  53456. el.className = el.className.replace('v-transfer-dom', '');
  53457. const ref$1 = el.__transferDomData;
  53458. if (!ref$1) return;
  53459. if (el.__transferDomData.hasMovedOut === true) {
  53460. el.__transferDomData.parentNode && el.__transferDomData.parentNode.appendChild(el)
  53461. }
  53462. el.__transferDomData = null
  53463. }
  53464. };
  53465. /* harmony default export */ __webpack_exports__["a"] = (directive);
  53466. /***/ }),
  53467. /* 131 */
  53468. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  53469. "use strict";
  53470. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_assist__ = __webpack_require__(22);
  53471. // used for Modal & $Spin & Drawer
  53472. /* harmony default export */ __webpack_exports__["a"] = ({
  53473. props: {
  53474. lockScroll: {
  53475. type: Boolean,
  53476. default: true
  53477. }
  53478. },
  53479. methods: {
  53480. checkScrollBar () {
  53481. let fullWindowWidth = window.innerWidth;
  53482. if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
  53483. const documentElementRect = document.documentElement.getBoundingClientRect();
  53484. fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left);
  53485. }
  53486. this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth;
  53487. if (this.bodyIsOverflowing) {
  53488. this.scrollBarWidth = Object(__WEBPACK_IMPORTED_MODULE_0__utils_assist__["d" /* getScrollBarSize */])();
  53489. }
  53490. },
  53491. checkMaskInVisible () {
  53492. let masks = document.getElementsByClassName('ivu-modal-mask') || [];
  53493. return Array.from(masks).every(m => m.style.display === 'none' || m.classList.contains('fade-leave-to'));
  53494. },
  53495. setScrollBar () {
  53496. if (this.bodyIsOverflowing && this.scrollBarWidth !== undefined) {
  53497. document.body.style.paddingRight = `${this.scrollBarWidth}px`;
  53498. }
  53499. },
  53500. resetScrollBar () {
  53501. document.body.style.paddingRight = '';
  53502. },
  53503. addScrollEffect () {
  53504. if (!this.lockScroll) return;
  53505. this.checkScrollBar();
  53506. this.setScrollBar();
  53507. document.body.style.overflow = 'hidden';
  53508. },
  53509. removeScrollEffect() {
  53510. if (!this.lockScroll) return;
  53511. if (this.checkMaskInVisible()) {
  53512. document.body.style.overflow = '';
  53513. this.resetScrollBar();
  53514. }
  53515. }
  53516. }
  53517. });
  53518. /***/ }),
  53519. /* 132 */
  53520. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  53521. "use strict";
  53522. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(4);
  53523. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__);
  53524. const isServer = __WEBPACK_IMPORTED_MODULE_0_vue___default.a.prototype.$isServer;
  53525. /* istanbul ignore next */
  53526. const on = (function() {
  53527. if (!isServer && document.addEventListener) {
  53528. return function(element, event, handler, useCapture = false) {
  53529. if (element && event && handler) {
  53530. element.addEventListener(event, handler, useCapture);
  53531. }
  53532. };
  53533. } else {
  53534. return function(element, event, handler) {
  53535. if (element && event && handler) {
  53536. element.attachEvent('on' + event, handler);
  53537. }
  53538. };
  53539. }
  53540. })();
  53541. /* harmony export (immutable) */ __webpack_exports__["b"] = on;
  53542. /* istanbul ignore next */
  53543. const off = (function() {
  53544. if (!isServer && document.removeEventListener) {
  53545. return function(element, event, handler, useCapture = false) {
  53546. if (element && event) {
  53547. element.removeEventListener(event, handler, useCapture);
  53548. }
  53549. };
  53550. } else {
  53551. return function(element, event, handler) {
  53552. if (element && event) {
  53553. element.detachEvent('on' + event, handler);
  53554. }
  53555. };
  53556. }
  53557. })();
  53558. /* harmony export (immutable) */ __webpack_exports__["a"] = off;
  53559. /***/ }),
  53560. /* 133 */
  53561. /***/ (function(module, exports, __webpack_require__) {
  53562. var render = function() {
  53563. var _vm = this
  53564. var _h = _vm.$createElement
  53565. var _c = _vm._self._c || _h
  53566. return _c(
  53567. "div",
  53568. {
  53569. directives: [{ name: "transfer-dom", rawName: "v-transfer-dom" }],
  53570. attrs: { "data-transfer": _vm.transfer }
  53571. },
  53572. [
  53573. _c("transition", { attrs: { name: "fade" } }, [
  53574. _vm.mask
  53575. ? _c("div", {
  53576. directives: [
  53577. {
  53578. name: "show",
  53579. rawName: "v-show",
  53580. value: _vm.visible,
  53581. expression: "visible"
  53582. }
  53583. ],
  53584. class: _vm.maskClasses,
  53585. style: _vm.maskStyle,
  53586. on: { click: _vm.handleMask }
  53587. })
  53588. : _vm._e()
  53589. ]),
  53590. _vm._v(" "),
  53591. _c(
  53592. "div",
  53593. { class: _vm.wrapClasses, on: { click: _vm.handleWrapClick } },
  53594. [
  53595. _c("transition", { attrs: { name: "move-" + _vm.placement } }, [
  53596. _c(
  53597. "div",
  53598. {
  53599. directives: [
  53600. {
  53601. name: "show",
  53602. rawName: "v-show",
  53603. value: _vm.visible,
  53604. expression: "visible"
  53605. }
  53606. ],
  53607. class: _vm.classes,
  53608. style: _vm.mainStyles
  53609. },
  53610. [
  53611. _c("div", { ref: "content", class: _vm.contentClasses }, [
  53612. _vm.closable
  53613. ? _c(
  53614. "a",
  53615. {
  53616. staticClass: "ivu-drawer-close",
  53617. on: { click: _vm.close }
  53618. },
  53619. [
  53620. _vm._t("close", function() {
  53621. return [
  53622. _c("Icon", { attrs: { type: "ios-close" } })
  53623. ]
  53624. })
  53625. ],
  53626. 2
  53627. )
  53628. : _vm._e(),
  53629. _vm._v(" "),
  53630. _vm.showHead
  53631. ? _c(
  53632. "div",
  53633. { class: [_vm.prefixCls + "-header"] },
  53634. [
  53635. _vm._t("header", function() {
  53636. return [
  53637. _c(
  53638. "div",
  53639. { class: [_vm.prefixCls + "-header-inner"] },
  53640. [_vm._v(_vm._s(_vm.title))]
  53641. )
  53642. ]
  53643. })
  53644. ],
  53645. 2
  53646. )
  53647. : _vm._e(),
  53648. _vm._v(" "),
  53649. _c(
  53650. "div",
  53651. { class: [_vm.prefixCls + "-body"], style: _vm.styles },
  53652. [_vm._t("default")],
  53653. 2
  53654. )
  53655. ]),
  53656. _vm._v(" "),
  53657. _vm.draggable
  53658. ? _c(
  53659. "div",
  53660. {
  53661. staticClass: "ivu-drawer-drag",
  53662. class: {
  53663. "ivu-drawer-drag-left": _vm.placement === "left"
  53664. },
  53665. on: { mousedown: _vm.handleTriggerMousedown }
  53666. },
  53667. [
  53668. _vm._t("trigger", function() {
  53669. return [
  53670. _c(
  53671. "div",
  53672. { staticClass: "ivu-drawer-drag-move-trigger" },
  53673. [
  53674. _c(
  53675. "div",
  53676. {
  53677. staticClass:
  53678. "ivu-drawer-drag-move-trigger-point"
  53679. },
  53680. [_c("i"), _c("i"), _c("i"), _c("i"), _c("i")]
  53681. )
  53682. ]
  53683. )
  53684. ]
  53685. })
  53686. ],
  53687. 2
  53688. )
  53689. : _vm._e()
  53690. ]
  53691. )
  53692. ])
  53693. ],
  53694. 1
  53695. )
  53696. ],
  53697. 1
  53698. )
  53699. }
  53700. var staticRenderFns = []
  53701. render._withStripped = true
  53702. module.exports = { render: render, staticRenderFns: staticRenderFns }
  53703. if (false) {
  53704. module.hot.accept()
  53705. if (module.hot.data) {
  53706. require("vue-hot-reload-api") .rerender("data-v-37c31742", module.exports)
  53707. }
  53708. }
  53709. /***/ }),
  53710. /* 134 */
  53711. /***/ (function(module, exports, __webpack_require__) {
  53712. var render = function() {
  53713. var _vm = this
  53714. var _h = _vm.$createElement
  53715. var _c = _vm._self._c || _h
  53716. return _c(
  53717. "div",
  53718. { staticClass: "w-header" },
  53719. [
  53720. _vm.tabActive
  53721. ? _c("div", { staticClass: "w-header-row" }, [
  53722. _c(
  53723. "div",
  53724. { staticClass: "w-header-row-left" },
  53725. [
  53726. _c(
  53727. "Dropdown",
  53728. {
  53729. staticClass: "m768-show",
  53730. attrs: { trigger: "click", transfer: "" },
  53731. on: { "on-click": _vm.tabPage }
  53732. },
  53733. [
  53734. _c("Icon", {
  53735. staticClass: "dropdown-menu",
  53736. attrs: { type: "md-menu" }
  53737. }),
  53738. _vm._v(" "),
  53739. _c(
  53740. "DropdownMenu",
  53741. { attrs: { slot: "list" }, slot: "list" },
  53742. [
  53743. _c("DropdownItem", { attrs: { name: "todo" } }, [
  53744. _vm._v(_vm._s(_vm.$L("待办")))
  53745. ]),
  53746. _vm._v(" "),
  53747. _c("DropdownItem", { attrs: { name: "project" } }, [
  53748. _vm._v(_vm._s(_vm.$L("项目")))
  53749. ]),
  53750. _vm._v(" "),
  53751. _c("DropdownItem", { attrs: { name: "docs" } }, [
  53752. _vm._v(_vm._s(_vm.$L("知识库")))
  53753. ]),
  53754. _vm._v(" "),
  53755. _c("DropdownItem", { attrs: { name: "team" } }, [
  53756. _vm._v(_vm._s(_vm.$L("团队")))
  53757. ])
  53758. ],
  53759. 1
  53760. )
  53761. ],
  53762. 1
  53763. ),
  53764. _vm._v(" "),
  53765. _c("ul", { staticClass: "m768-hide" }, [
  53766. _c(
  53767. "li",
  53768. { class: _vm.tabActive === "todo" ? "active" : "" },
  53769. [
  53770. _c(
  53771. "a",
  53772. {
  53773. attrs: { href: "javascript:void(0)" },
  53774. on: {
  53775. click: function($event) {
  53776. return _vm.tabPage("todo")
  53777. }
  53778. }
  53779. },
  53780. [
  53781. _c("i", { staticClass: "ft icon" }, [_vm._v("")]),
  53782. _vm._v(_vm._s(_vm.$L("待办")))
  53783. ]
  53784. )
  53785. ]
  53786. ),
  53787. _c(
  53788. "li",
  53789. { class: _vm.tabActive === "project" ? "active" : "" },
  53790. [
  53791. _c(
  53792. "a",
  53793. {
  53794. attrs: { href: "javascript:void(0)" },
  53795. on: {
  53796. click: function($event) {
  53797. return _vm.tabPage("project")
  53798. }
  53799. }
  53800. },
  53801. [
  53802. _c("i", { staticClass: "ft icon" }, [_vm._v("")]),
  53803. _vm._v(_vm._s(_vm.$L("项目")))
  53804. ]
  53805. )
  53806. ]
  53807. ),
  53808. _c(
  53809. "li",
  53810. { class: _vm.tabActive === "docs" ? "active" : "" },
  53811. [
  53812. _c(
  53813. "a",
  53814. {
  53815. attrs: { href: "javascript:void(0)" },
  53816. on: {
  53817. click: function($event) {
  53818. return _vm.tabPage("docs")
  53819. }
  53820. }
  53821. },
  53822. [
  53823. _c("i", { staticClass: "ft icon" }, [_vm._v("")]),
  53824. _vm._v(_vm._s(_vm.$L("知识库")))
  53825. ]
  53826. )
  53827. ]
  53828. ),
  53829. _c(
  53830. "li",
  53831. { class: _vm.tabActive === "team" ? "active" : "" },
  53832. [
  53833. _c(
  53834. "a",
  53835. {
  53836. attrs: { href: "javascript:void(0)" },
  53837. on: {
  53838. click: function($event) {
  53839. return _vm.tabPage("team")
  53840. }
  53841. }
  53842. },
  53843. [
  53844. _c("i", { staticClass: "ft icon" }, [_vm._v("")]),
  53845. _vm._v(_vm._s(_vm.$L("团队")))
  53846. ]
  53847. )
  53848. ]
  53849. )
  53850. ])
  53851. ],
  53852. 1
  53853. ),
  53854. _vm._v(" "),
  53855. _c(
  53856. "div",
  53857. { staticClass: "w-header-row-right" },
  53858. [
  53859. _c(
  53860. "Dropdown",
  53861. {
  53862. staticClass: "right-info",
  53863. attrs: {
  53864. trigger: "click",
  53865. placement: "bottom-end",
  53866. transfer: ""
  53867. },
  53868. on: { "on-click": _vm.setRightSelect }
  53869. },
  53870. [
  53871. _c(
  53872. "div",
  53873. [
  53874. _c("UserImg", {
  53875. staticClass: "userimg",
  53876. attrs: { info: _vm.usrInfo }
  53877. }),
  53878. _vm._v(" "),
  53879. _c("span", { staticClass: "username" }, [
  53880. _vm._v(
  53881. _vm._s(_vm.$L("欢迎您")) +
  53882. ", " +
  53883. _vm._s(
  53884. _vm.usrInfo.nickname ||
  53885. _vm.usrInfo.username ||
  53886. _vm.$L("尊敬的会员")
  53887. )
  53888. )
  53889. ]),
  53890. _vm._v(" "),
  53891. _c("Icon", { attrs: { type: "md-arrow-dropdown" } })
  53892. ],
  53893. 1
  53894. ),
  53895. _vm._v(" "),
  53896. _c(
  53897. "Dropdown-menu",
  53898. { attrs: { slot: "list" }, slot: "list" },
  53899. [
  53900. _vm.isAdmin
  53901. ? _c("Dropdown-item", { attrs: { name: "system" } }, [
  53902. _vm._v(_vm._s(_vm.$L("系统设置")))
  53903. ])
  53904. : _vm._e(),
  53905. _vm._v(" "),
  53906. _c("Dropdown-item", { attrs: { name: "user" } }, [
  53907. _vm._v(_vm._s(_vm.$L("个人中心")))
  53908. ]),
  53909. _vm._v(" "),
  53910. _c("Dropdown-item", { attrs: { name: "out" } }, [
  53911. _vm._v(_vm._s(_vm.$L("退出登录")))
  53912. ])
  53913. ],
  53914. 1
  53915. )
  53916. ],
  53917. 1
  53918. ),
  53919. _vm._v(" "),
  53920. _c(
  53921. "div",
  53922. {
  53923. staticClass: "right-info",
  53924. on: {
  53925. click: function($event) {
  53926. _vm.chatDrawerShow = true
  53927. }
  53928. }
  53929. },
  53930. [
  53931. _c("Icon", {
  53932. staticClass: "right-mticon-9",
  53933. attrs: { type: "md-text", size: "24" }
  53934. }),
  53935. _vm._v(" "),
  53936. _vm.chatUnreadTotal > 0
  53937. ? _c("em", { staticClass: "right-info-num" }, [
  53938. _vm._v(
  53939. _vm._s(
  53940. _vm.chatUnreadTotal > 99
  53941. ? "99+"
  53942. : _vm.chatUnreadTotal
  53943. )
  53944. )
  53945. ])
  53946. : _vm._e()
  53947. ],
  53948. 1
  53949. ),
  53950. _vm._v(" "),
  53951. _c(
  53952. "Dropdown",
  53953. {
  53954. staticClass: "right-info",
  53955. attrs: { trigger: "click", transfer: "" },
  53956. on: { "on-click": _vm.setLanguage }
  53957. },
  53958. [
  53959. _c(
  53960. "div",
  53961. [
  53962. _c("Icon", {
  53963. staticClass: "right-mticon",
  53964. attrs: { type: "md-globe", size: "24" }
  53965. }),
  53966. _vm._v(" "),
  53967. _c("Icon", { attrs: { type: "md-arrow-dropdown" } })
  53968. ],
  53969. 1
  53970. ),
  53971. _vm._v(" "),
  53972. _c(
  53973. "Dropdown-menu",
  53974. { attrs: { slot: "list" }, slot: "list" },
  53975. [
  53976. _c(
  53977. "Dropdown-item",
  53978. {
  53979. attrs: {
  53980. name: "zh",
  53981. selected: _vm.getLanguage() === "zh"
  53982. }
  53983. },
  53984. [_vm._v("中文")]
  53985. ),
  53986. _vm._v(" "),
  53987. _c(
  53988. "Dropdown-item",
  53989. {
  53990. attrs: {
  53991. name: "en",
  53992. selected: _vm.getLanguage() === "en"
  53993. }
  53994. },
  53995. [_vm._v("English")]
  53996. )
  53997. ],
  53998. 1
  53999. )
  54000. ],
  54001. 1
  54002. )
  54003. ],
  54004. 1
  54005. )
  54006. ])
  54007. : _vm._e(),
  54008. _vm._v(" "),
  54009. _c(
  54010. "WDrawer",
  54011. {
  54012. attrs: { maxWidth: "640", title: _vm.$L("系统设置") },
  54013. model: {
  54014. value: _vm.systemDrawerShow,
  54015. callback: function($$v) {
  54016. _vm.systemDrawerShow = $$v
  54017. },
  54018. expression: "systemDrawerShow"
  54019. }
  54020. },
  54021. [
  54022. _c(
  54023. "Form",
  54024. {
  54025. ref: "formSystem",
  54026. attrs: { model: _vm.formSystem, "label-width": 150 },
  54027. nativeOn: {
  54028. submit: function($event) {
  54029. $event.preventDefault()
  54030. }
  54031. }
  54032. },
  54033. [
  54034. _c(
  54035. "FormItem",
  54036. { attrs: { label: _vm.$L("首页Logo") } },
  54037. [
  54038. _c("ImgUpload", {
  54039. attrs: { num: 1 },
  54040. model: {
  54041. value: _vm.formSystem.logo,
  54042. callback: function($$v) {
  54043. _vm.$set(_vm.formSystem, "logo", $$v)
  54044. },
  54045. expression: "formSystem.logo"
  54046. }
  54047. }),
  54048. _vm._v(" "),
  54049. _c("span", { staticStyle: { color: "#777" } }, [
  54050. _vm._v(_vm._s(_vm.$L("建议尺寸:%", "300x52")))
  54051. ])
  54052. ],
  54053. 1
  54054. ),
  54055. _vm._v(" "),
  54056. _c(
  54057. "FormItem",
  54058. { attrs: { label: _vm.$L("Github/Gitee图标") } },
  54059. [
  54060. _c(
  54061. "RadioGroup",
  54062. {
  54063. model: {
  54064. value: _vm.formSystem.github,
  54065. callback: function($$v) {
  54066. _vm.$set(_vm.formSystem, "github", $$v)
  54067. },
  54068. expression: "formSystem.github"
  54069. }
  54070. },
  54071. [
  54072. _c("Radio", { attrs: { label: "show" } }, [
  54073. _vm._v(_vm._s(_vm.$L("显示")))
  54074. ]),
  54075. _vm._v(" "),
  54076. _c("Radio", { attrs: { label: "hidden" } }, [
  54077. _vm._v(_vm._s(_vm.$L("隐藏")))
  54078. ])
  54079. ],
  54080. 1
  54081. )
  54082. ],
  54083. 1
  54084. ),
  54085. _vm._v(" "),
  54086. _c(
  54087. "FormItem",
  54088. { attrs: { label: _vm.$L("允许注册") } },
  54089. [
  54090. _c(
  54091. "RadioGroup",
  54092. {
  54093. model: {
  54094. value: _vm.formSystem.reg,
  54095. callback: function($$v) {
  54096. _vm.$set(_vm.formSystem, "reg", $$v)
  54097. },
  54098. expression: "formSystem.reg"
  54099. }
  54100. },
  54101. [
  54102. _c("Radio", { attrs: { label: "open" } }, [
  54103. _vm._v(_vm._s(_vm.$L("允许")))
  54104. ]),
  54105. _vm._v(" "),
  54106. _c("Radio", { attrs: { label: "close" } }, [
  54107. _vm._v(_vm._s(_vm.$L("禁止")))
  54108. ])
  54109. ],
  54110. 1
  54111. )
  54112. ],
  54113. 1
  54114. ),
  54115. _vm._v(" "),
  54116. _c(
  54117. "FormItem",
  54118. { attrs: { label: _vm.$L("音视频通话") } },
  54119. [
  54120. _c(
  54121. "RadioGroup",
  54122. {
  54123. model: {
  54124. value: _vm.formSystem.callav,
  54125. callback: function($$v) {
  54126. _vm.$set(_vm.formSystem, "callav", $$v)
  54127. },
  54128. expression: "formSystem.callav"
  54129. }
  54130. },
  54131. [
  54132. _c("Radio", { attrs: { label: "open" } }, [
  54133. _vm._v(_vm._s(_vm.$L("开启")))
  54134. ]),
  54135. _vm._v(" "),
  54136. _c("Radio", { attrs: { label: "close" } }, [
  54137. _vm._v(_vm._s(_vm.$L("关闭")))
  54138. ])
  54139. ],
  54140. 1
  54141. )
  54142. ],
  54143. 1
  54144. ),
  54145. _vm._v(" "),
  54146. _c(
  54147. "FormItem",
  54148. { attrs: { label: _vm.$L("完成自动归档") } },
  54149. [
  54150. _c(
  54151. "RadioGroup",
  54152. {
  54153. attrs: { value: _vm.formSystem.autoArchived },
  54154. on: { "on-change": _vm.formArchived }
  54155. },
  54156. [
  54157. _c("Radio", { attrs: { label: "open" } }, [
  54158. _vm._v(_vm._s(_vm.$L("开启")))
  54159. ]),
  54160. _vm._v(" "),
  54161. _c("Radio", { attrs: { label: "close" } }, [
  54162. _vm._v(_vm._s(_vm.$L("关闭")))
  54163. ])
  54164. ],
  54165. 1
  54166. ),
  54167. _vm._v(" "),
  54168. _vm.formSystem.autoArchived == "open"
  54169. ? _c(
  54170. "Tooltip",
  54171. {
  54172. staticClass: "setting-auto-day",
  54173. attrs: { placement: "right" }
  54174. },
  54175. [
  54176. _c(
  54177. "Input",
  54178. {
  54179. attrs: { type: "number" },
  54180. model: {
  54181. value: _vm.formSystem.archivedDay,
  54182. callback: function($$v) {
  54183. _vm.$set(_vm.formSystem, "archivedDay", $$v)
  54184. },
  54185. expression: "formSystem.archivedDay"
  54186. }
  54187. },
  54188. [
  54189. _c(
  54190. "span",
  54191. { attrs: { slot: "append" }, slot: "append" },
  54192. [_vm._v(_vm._s(_vm.$L("天")))]
  54193. )
  54194. ]
  54195. ),
  54196. _vm._v(" "),
  54197. _c(
  54198. "div",
  54199. { attrs: { slot: "content" }, slot: "content" },
  54200. [
  54201. _vm._v(
  54202. _vm._s(
  54203. _vm.$L(
  54204. "任务完成 % 天后自动归档。",
  54205. _vm.formSystem.archivedDay
  54206. )
  54207. )
  54208. )
  54209. ]
  54210. )
  54211. ],
  54212. 1
  54213. )
  54214. : _vm._e()
  54215. ],
  54216. 1
  54217. ),
  54218. _vm._v(" "),
  54219. _c(
  54220. "FormItem",
  54221. [
  54222. _c(
  54223. "Button",
  54224. {
  54225. attrs: { loading: _vm.loadIng > 0, type: "primary" },
  54226. on: {
  54227. click: function($event) {
  54228. return _vm.handleSubmit("formSystem")
  54229. }
  54230. }
  54231. },
  54232. [_vm._v(_vm._s(_vm.$L("提交")))]
  54233. ),
  54234. _vm._v(" "),
  54235. _c(
  54236. "Button",
  54237. {
  54238. staticStyle: { "margin-left": "8px" },
  54239. attrs: { loading: _vm.loadIng > 0 },
  54240. on: {
  54241. click: function($event) {
  54242. return _vm.handleReset("formSystem")
  54243. }
  54244. }
  54245. },
  54246. [_vm._v(_vm._s(_vm.$L("重置")))]
  54247. )
  54248. ],
  54249. 1
  54250. )
  54251. ],
  54252. 1
  54253. )
  54254. ],
  54255. 1
  54256. ),
  54257. _vm._v(" "),
  54258. _c(
  54259. "WDrawer",
  54260. {
  54261. attrs: { maxWidth: "1000" },
  54262. model: {
  54263. value: _vm.userDrawerShow,
  54264. callback: function($$v) {
  54265. _vm.userDrawerShow = $$v
  54266. },
  54267. expression: "userDrawerShow"
  54268. }
  54269. },
  54270. [
  54271. _c(
  54272. "Tabs",
  54273. {
  54274. model: {
  54275. value: _vm.userDrawerTab,
  54276. callback: function($$v) {
  54277. _vm.userDrawerTab = $$v
  54278. },
  54279. expression: "userDrawerTab"
  54280. }
  54281. },
  54282. [
  54283. _c(
  54284. "TabPane",
  54285. { attrs: { label: _vm.$L("个人资料"), name: "personal" } },
  54286. [
  54287. _c(
  54288. "Form",
  54289. {
  54290. ref: "formDatum",
  54291. attrs: {
  54292. model: _vm.formDatum,
  54293. rules: _vm.ruleDatum,
  54294. "label-width": 80
  54295. },
  54296. nativeOn: {
  54297. submit: function($event) {
  54298. $event.preventDefault()
  54299. }
  54300. }
  54301. },
  54302. [
  54303. _c(
  54304. "FormItem",
  54305. { attrs: { label: _vm.$L("头像"), prop: "userimg" } },
  54306. [
  54307. _c("ImgUpload", {
  54308. attrs: { num: 1 },
  54309. model: {
  54310. value: _vm.formDatum.userimg,
  54311. callback: function($$v) {
  54312. _vm.$set(_vm.formDatum, "userimg", $$v)
  54313. },
  54314. expression: "formDatum.userimg"
  54315. }
  54316. }),
  54317. _vm._v(" "),
  54318. _c("span", { staticStyle: { color: "#777" } }, [
  54319. _vm._v(_vm._s(_vm.$L("建议尺寸:%", "200x200")))
  54320. ])
  54321. ],
  54322. 1
  54323. ),
  54324. _vm._v(" "),
  54325. _c(
  54326. "FormItem",
  54327. { attrs: { label: _vm.$L("账号") } },
  54328. [
  54329. _c("Input", {
  54330. attrs: { disabled: true },
  54331. model: {
  54332. value: _vm.usrInfo.username,
  54333. callback: function($$v) {
  54334. _vm.$set(_vm.usrInfo, "username", $$v)
  54335. },
  54336. expression: "usrInfo.username"
  54337. }
  54338. })
  54339. ],
  54340. 1
  54341. ),
  54342. _vm._v(" "),
  54343. _c(
  54344. "FormItem",
  54345. { attrs: { label: _vm.$L("昵称"), prop: "nickname" } },
  54346. [
  54347. _c("Input", {
  54348. model: {
  54349. value: _vm.formDatum.nickname,
  54350. callback: function($$v) {
  54351. _vm.$set(_vm.formDatum, "nickname", $$v)
  54352. },
  54353. expression: "formDatum.nickname"
  54354. }
  54355. })
  54356. ],
  54357. 1
  54358. ),
  54359. _vm._v(" "),
  54360. _c(
  54361. "FormItem",
  54362. {
  54363. attrs: {
  54364. label: _vm.$L("职位/职称"),
  54365. prop: "profession"
  54366. }
  54367. },
  54368. [
  54369. _c("Input", {
  54370. model: {
  54371. value: _vm.formDatum.profession,
  54372. callback: function($$v) {
  54373. _vm.$set(_vm.formDatum, "profession", $$v)
  54374. },
  54375. expression: "formDatum.profession"
  54376. }
  54377. })
  54378. ],
  54379. 1
  54380. ),
  54381. _vm._v(" "),
  54382. _c(
  54383. "FormItem",
  54384. [
  54385. _c(
  54386. "Button",
  54387. {
  54388. attrs: {
  54389. loading: _vm.loadIng > 0,
  54390. type: "primary"
  54391. },
  54392. on: {
  54393. click: function($event) {
  54394. return _vm.handleSubmit("formDatum")
  54395. }
  54396. }
  54397. },
  54398. [_vm._v(_vm._s(_vm.$L("提交")))]
  54399. ),
  54400. _vm._v(" "),
  54401. _c(
  54402. "Button",
  54403. {
  54404. staticStyle: { "margin-left": "8px" },
  54405. attrs: { loading: _vm.loadIng > 0 },
  54406. on: {
  54407. click: function($event) {
  54408. return _vm.handleReset("formDatum")
  54409. }
  54410. }
  54411. },
  54412. [_vm._v(_vm._s(_vm.$L("重置")))]
  54413. )
  54414. ],
  54415. 1
  54416. )
  54417. ],
  54418. 1
  54419. )
  54420. ],
  54421. 1
  54422. ),
  54423. _vm._v(" "),
  54424. _c(
  54425. "TabPane",
  54426. { attrs: { label: _vm.$L("偏好设置"), name: "setting" } },
  54427. [
  54428. _c(
  54429. "Form",
  54430. {
  54431. ref: "formSetting",
  54432. attrs: { model: _vm.formSetting, "label-width": 100 },
  54433. nativeOn: {
  54434. submit: function($event) {
  54435. $event.preventDefault()
  54436. }
  54437. }
  54438. },
  54439. [
  54440. _c(
  54441. "FormItem",
  54442. { attrs: { label: _vm.$L("系统皮肤"), prop: "bgid" } },
  54443. [
  54444. _c(
  54445. "ul",
  54446. { staticClass: "setting-bg" },
  54447. _vm._l(
  54448. [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  54449. function(i) {
  54450. return _c("li", {
  54451. key: i,
  54452. class: { active: _vm.formSetting.bgid == i },
  54453. style:
  54454. "background-image:" + _vm.getBgUrl(i, true),
  54455. on: {
  54456. click: function($event) {
  54457. _vm.formSetting.bgid = i
  54458. }
  54459. }
  54460. })
  54461. }
  54462. ),
  54463. 0
  54464. )
  54465. ]
  54466. ),
  54467. _vm._v(" "),
  54468. _c(
  54469. "FormItem",
  54470. [
  54471. _c(
  54472. "Button",
  54473. {
  54474. attrs: {
  54475. loading: _vm.loadIng > 0,
  54476. type: "primary"
  54477. },
  54478. on: {
  54479. click: function($event) {
  54480. return _vm.handleSubmit("formSetting")
  54481. }
  54482. }
  54483. },
  54484. [_vm._v(_vm._s(_vm.$L("提交")))]
  54485. ),
  54486. _vm._v(" "),
  54487. _c(
  54488. "Button",
  54489. {
  54490. staticStyle: { "margin-left": "8px" },
  54491. attrs: { loading: _vm.loadIng > 0 },
  54492. on: {
  54493. click: function($event) {
  54494. return _vm.handleReset("formSetting")
  54495. }
  54496. }
  54497. },
  54498. [_vm._v(_vm._s(_vm.$L("重置")))]
  54499. )
  54500. ],
  54501. 1
  54502. )
  54503. ],
  54504. 1
  54505. )
  54506. ],
  54507. 1
  54508. ),
  54509. _vm._v(" "),
  54510. _c(
  54511. "TabPane",
  54512. { attrs: { label: _vm.$L("账号密码"), name: "account" } },
  54513. [
  54514. _vm.usrInfo.changepass
  54515. ? _c(
  54516. "Alert",
  54517. { attrs: { type: "warning", showIcon: "" } },
  54518. [_vm._v(_vm._s(_vm.$L("请先修改登录密码!")))]
  54519. )
  54520. : _vm._e(),
  54521. _vm._v(" "),
  54522. _c(
  54523. "Form",
  54524. {
  54525. ref: "formPass",
  54526. attrs: {
  54527. model: _vm.formPass,
  54528. rules: _vm.rulePass,
  54529. "label-width": 100
  54530. },
  54531. nativeOn: {
  54532. submit: function($event) {
  54533. $event.preventDefault()
  54534. }
  54535. }
  54536. },
  54537. [
  54538. _c(
  54539. "FormItem",
  54540. { attrs: { label: _vm.$L("旧密码"), prop: "oldpass" } },
  54541. [
  54542. _c("Input", {
  54543. attrs: { type: "password" },
  54544. model: {
  54545. value: _vm.formPass.oldpass,
  54546. callback: function($$v) {
  54547. _vm.$set(_vm.formPass, "oldpass", $$v)
  54548. },
  54549. expression: "formPass.oldpass"
  54550. }
  54551. })
  54552. ],
  54553. 1
  54554. ),
  54555. _vm._v(" "),
  54556. _c(
  54557. "FormItem",
  54558. { attrs: { label: _vm.$L("新密码"), prop: "newpass" } },
  54559. [
  54560. _c("Input", {
  54561. attrs: { type: "password" },
  54562. model: {
  54563. value: _vm.formPass.newpass,
  54564. callback: function($$v) {
  54565. _vm.$set(_vm.formPass, "newpass", $$v)
  54566. },
  54567. expression: "formPass.newpass"
  54568. }
  54569. })
  54570. ],
  54571. 1
  54572. ),
  54573. _vm._v(" "),
  54574. _c(
  54575. "FormItem",
  54576. {
  54577. attrs: {
  54578. label: _vm.$L("确认新密码"),
  54579. prop: "checkpass"
  54580. }
  54581. },
  54582. [
  54583. _c("Input", {
  54584. attrs: { type: "password" },
  54585. model: {
  54586. value: _vm.formPass.checkpass,
  54587. callback: function($$v) {
  54588. _vm.$set(_vm.formPass, "checkpass", $$v)
  54589. },
  54590. expression: "formPass.checkpass"
  54591. }
  54592. })
  54593. ],
  54594. 1
  54595. ),
  54596. _vm._v(" "),
  54597. _c(
  54598. "FormItem",
  54599. [
  54600. _c(
  54601. "Button",
  54602. {
  54603. attrs: {
  54604. loading: _vm.loadIng > 0,
  54605. type: "primary"
  54606. },
  54607. on: {
  54608. click: function($event) {
  54609. return _vm.handleSubmit("formPass")
  54610. }
  54611. }
  54612. },
  54613. [_vm._v(_vm._s(_vm.$L("提交")))]
  54614. ),
  54615. _vm._v(" "),
  54616. _c(
  54617. "Button",
  54618. {
  54619. staticStyle: { "margin-left": "8px" },
  54620. attrs: { loading: _vm.loadIng > 0 },
  54621. on: {
  54622. click: function($event) {
  54623. return _vm.handleReset("formPass")
  54624. }
  54625. }
  54626. },
  54627. [_vm._v(_vm._s(_vm.$L("重置")))]
  54628. )
  54629. ],
  54630. 1
  54631. )
  54632. ],
  54633. 1
  54634. )
  54635. ],
  54636. 1
  54637. ),
  54638. _vm._v(" "),
  54639. _c(
  54640. "TabPane",
  54641. {
  54642. attrs: { label: _vm.$L("我创建的任务"), name: "createtask" }
  54643. },
  54644. [
  54645. _c("header-create", {
  54646. attrs: {
  54647. canload:
  54648. _vm.userDrawerShow && _vm.userDrawerTab == "createtask"
  54649. }
  54650. })
  54651. ],
  54652. 1
  54653. ),
  54654. _vm._v(" "),
  54655. _c(
  54656. "TabPane",
  54657. {
  54658. attrs: { label: _vm.$L("我归档的任务"), name: "archivedtask" }
  54659. },
  54660. [
  54661. _c("header-archived", {
  54662. attrs: {
  54663. canload:
  54664. _vm.userDrawerShow &&
  54665. _vm.userDrawerTab == "archivedtask"
  54666. }
  54667. })
  54668. ],
  54669. 1
  54670. )
  54671. ],
  54672. 1
  54673. )
  54674. ],
  54675. 1
  54676. ),
  54677. _vm._v(" "),
  54678. _c(
  54679. "WDrawer",
  54680. {
  54681. staticClass: "w-header-chat-draver",
  54682. attrs: { closable: false, maxWidth: "1080" },
  54683. model: {
  54684. value: _vm.chatDrawerShow,
  54685. callback: function($$v) {
  54686. _vm.chatDrawerShow = $$v
  54687. },
  54688. expression: "chatDrawerShow"
  54689. }
  54690. },
  54691. [
  54692. _c("chat-index", {
  54693. attrs: { openWindow: _vm.chatDrawerShow },
  54694. on: {
  54695. "on-open-notice": function($event) {
  54696. _vm.chatDrawerShow = true
  54697. }
  54698. },
  54699. model: {
  54700. value: _vm.chatUnreadTotal,
  54701. callback: function($$v) {
  54702. _vm.chatUnreadTotal = $$v
  54703. },
  54704. expression: "chatUnreadTotal"
  54705. }
  54706. }),
  54707. _vm._v(" "),
  54708. _c(
  54709. "div",
  54710. {
  54711. staticClass: "w-header-chat-close",
  54712. on: {
  54713. click: function($event) {
  54714. _vm.chatDrawerShow = false
  54715. }
  54716. }
  54717. },
  54718. [_c("Icon", { attrs: { type: "ios-close" } })],
  54719. 1
  54720. )
  54721. ],
  54722. 1
  54723. )
  54724. ],
  54725. 1
  54726. )
  54727. }
  54728. var staticRenderFns = []
  54729. render._withStripped = true
  54730. module.exports = { render: render, staticRenderFns: staticRenderFns }
  54731. if (false) {
  54732. module.hot.accept()
  54733. if (module.hot.data) {
  54734. require("vue-hot-reload-api") .rerender("data-v-2df6db1f", module.exports)
  54735. }
  54736. }
  54737. /***/ }),
  54738. /* 135 */
  54739. /***/ (function(module, exports, __webpack_require__) {
  54740. var render = function() {
  54741. var _vm = this
  54742. var _h = _vm.$createElement
  54743. var _c = _vm._self._c || _h
  54744. return _c(
  54745. "div",
  54746. { attrs: { id: "app" } },
  54747. [
  54748. _c("w-header"),
  54749. _vm._v(" "),
  54750. _c(
  54751. "transition",
  54752. { attrs: { name: _vm.transitionName } },
  54753. [
  54754. _c(
  54755. "keep-alive",
  54756. [_c("router-view", { staticClass: "child-view" })],
  54757. 1
  54758. )
  54759. ],
  54760. 1
  54761. ),
  54762. _vm._v(" "),
  54763. _c("w-spinner")
  54764. ],
  54765. 1
  54766. )
  54767. }
  54768. var staticRenderFns = []
  54769. render._withStripped = true
  54770. module.exports = { render: render, staticRenderFns: staticRenderFns }
  54771. if (false) {
  54772. module.hot.accept()
  54773. if (module.hot.data) {
  54774. require("vue-hot-reload-api") .rerender("data-v-0fbb5d46", module.exports)
  54775. }
  54776. }
  54777. /***/ }),
  54778. /* 136 */
  54779. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  54780. "use strict";
  54781. /* harmony default export */ __webpack_exports__["a"] = ([{
  54782. path: '/',
  54783. name: 'index',
  54784. component: function component(resolve) {
  54785. return __webpack_require__.e/* require */(8).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(287)]; ((resolve).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  54786. }
  54787. }, {
  54788. path: '/ding',
  54789. name: 'ding',
  54790. component: function component(resolve) {
  54791. return __webpack_require__.e/* require */(0).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(288)]; ((resolve).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  54792. }
  54793. }, {
  54794. path: '/todo',
  54795. name: 'todo',
  54796. meta: { slide: false, tabActive: 'todo' },
  54797. component: function component(resolve) {
  54798. return __webpack_require__.e/* require */(2).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(289)]; ((resolve).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  54799. }
  54800. }, {
  54801. path: '/project',
  54802. name: 'project',
  54803. meta: { slide: false, tabActive: 'project' },
  54804. component: function component(resolve) {
  54805. return __webpack_require__.e/* require */(5).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(290)]; ((resolve).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  54806. }
  54807. }, {
  54808. path: '/project/panel/:projectid',
  54809. name: 'project-panel',
  54810. meta: { slide: false, tabActive: 'project' },
  54811. component: function component(resolve) {
  54812. return __webpack_require__.e/* require */(1).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(291)]; ((resolve).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  54813. }
  54814. }, {
  54815. path: '/docs',
  54816. name: 'docs',
  54817. meta: { slide: false, tabActive: 'docs' },
  54818. component: function component(resolve) {
  54819. return __webpack_require__.e/* require */(6).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(292)]; ((resolve).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  54820. }
  54821. }, {
  54822. path: '/docs/edit/:sid',
  54823. name: 'docs-edit',
  54824. meta: { slide: false },
  54825. component: function component(resolve) {
  54826. return __webpack_require__.e/* require */(4).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(293)]; ((resolve).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  54827. }
  54828. }, {
  54829. path: '/docs/view/:sid',
  54830. name: 'docs-view',
  54831. meta: { slide: false },
  54832. component: function component(resolve) {
  54833. return __webpack_require__.e/* require */(3).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(294)]; ((resolve).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  54834. }
  54835. }, {
  54836. path: '/team',
  54837. name: 'team',
  54838. meta: { slide: false, tabActive: 'team' },
  54839. component: function component(resolve) {
  54840. return __webpack_require__.e/* require */(7).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(295)]; ((resolve).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  54841. }
  54842. }, {
  54843. path: '*',
  54844. name: '404',
  54845. component: function component(resolve) {
  54846. return __webpack_require__.e/* require */(9).then(function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(296)]; ((resolve).apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}.bind(this)).catch(__webpack_require__.oe);
  54847. }
  54848. }]);
  54849. /***/ }),
  54850. /* 137 */
  54851. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  54852. "use strict";
  54853. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  54854. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MultiDrag", function() { return MultiDragPlugin; });
  54855. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sortable", function() { return Sortable; });
  54856. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Swap", function() { return SwapPlugin; });
  54857. /**!
  54858. * Sortable 1.10.2
  54859. * @author RubaXa <trash@rubaxa.org>
  54860. * @author owenm <owen23355@gmail.com>
  54861. * @license MIT
  54862. */
  54863. function _typeof(obj) {
  54864. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  54865. _typeof = function (obj) {
  54866. return typeof obj;
  54867. };
  54868. } else {
  54869. _typeof = function (obj) {
  54870. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  54871. };
  54872. }
  54873. return _typeof(obj);
  54874. }
  54875. function _defineProperty(obj, key, value) {
  54876. if (key in obj) {
  54877. Object.defineProperty(obj, key, {
  54878. value: value,
  54879. enumerable: true,
  54880. configurable: true,
  54881. writable: true
  54882. });
  54883. } else {
  54884. obj[key] = value;
  54885. }
  54886. return obj;
  54887. }
  54888. function _extends() {
  54889. _extends = Object.assign || function (target) {
  54890. for (var i = 1; i < arguments.length; i++) {
  54891. var source = arguments[i];
  54892. for (var key in source) {
  54893. if (Object.prototype.hasOwnProperty.call(source, key)) {
  54894. target[key] = source[key];
  54895. }
  54896. }
  54897. }
  54898. return target;
  54899. };
  54900. return _extends.apply(this, arguments);
  54901. }
  54902. function _objectSpread(target) {
  54903. for (var i = 1; i < arguments.length; i++) {
  54904. var source = arguments[i] != null ? arguments[i] : {};
  54905. var ownKeys = Object.keys(source);
  54906. if (typeof Object.getOwnPropertySymbols === 'function') {
  54907. ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
  54908. return Object.getOwnPropertyDescriptor(source, sym).enumerable;
  54909. }));
  54910. }
  54911. ownKeys.forEach(function (key) {
  54912. _defineProperty(target, key, source[key]);
  54913. });
  54914. }
  54915. return target;
  54916. }
  54917. function _objectWithoutPropertiesLoose(source, excluded) {
  54918. if (source == null) return {};
  54919. var target = {};
  54920. var sourceKeys = Object.keys(source);
  54921. var key, i;
  54922. for (i = 0; i < sourceKeys.length; i++) {
  54923. key = sourceKeys[i];
  54924. if (excluded.indexOf(key) >= 0) continue;
  54925. target[key] = source[key];
  54926. }
  54927. return target;
  54928. }
  54929. function _objectWithoutProperties(source, excluded) {
  54930. if (source == null) return {};
  54931. var target = _objectWithoutPropertiesLoose(source, excluded);
  54932. var key, i;
  54933. if (Object.getOwnPropertySymbols) {
  54934. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  54935. for (i = 0; i < sourceSymbolKeys.length; i++) {
  54936. key = sourceSymbolKeys[i];
  54937. if (excluded.indexOf(key) >= 0) continue;
  54938. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  54939. target[key] = source[key];
  54940. }
  54941. }
  54942. return target;
  54943. }
  54944. function _toConsumableArray(arr) {
  54945. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
  54946. }
  54947. function _arrayWithoutHoles(arr) {
  54948. if (Array.isArray(arr)) {
  54949. for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
  54950. return arr2;
  54951. }
  54952. }
  54953. function _iterableToArray(iter) {
  54954. if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
  54955. }
  54956. function _nonIterableSpread() {
  54957. throw new TypeError("Invalid attempt to spread non-iterable instance");
  54958. }
  54959. var version = "1.10.2";
  54960. function userAgent(pattern) {
  54961. if (typeof window !== 'undefined' && window.navigator) {
  54962. return !!
  54963. /*@__PURE__*/
  54964. navigator.userAgent.match(pattern);
  54965. }
  54966. }
  54967. var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
  54968. var Edge = userAgent(/Edge/i);
  54969. var FireFox = userAgent(/firefox/i);
  54970. var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
  54971. var IOS = userAgent(/iP(ad|od|hone)/i);
  54972. var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
  54973. var captureMode = {
  54974. capture: false,
  54975. passive: false
  54976. };
  54977. function on(el, event, fn) {
  54978. el.addEventListener(event, fn, !IE11OrLess && captureMode);
  54979. }
  54980. function off(el, event, fn) {
  54981. el.removeEventListener(event, fn, !IE11OrLess && captureMode);
  54982. }
  54983. function matches(
  54984. /**HTMLElement*/
  54985. el,
  54986. /**String*/
  54987. selector) {
  54988. if (!selector) return;
  54989. selector[0] === '>' && (selector = selector.substring(1));
  54990. if (el) {
  54991. try {
  54992. if (el.matches) {
  54993. return el.matches(selector);
  54994. } else if (el.msMatchesSelector) {
  54995. return el.msMatchesSelector(selector);
  54996. } else if (el.webkitMatchesSelector) {
  54997. return el.webkitMatchesSelector(selector);
  54998. }
  54999. } catch (_) {
  55000. return false;
  55001. }
  55002. }
  55003. return false;
  55004. }
  55005. function getParentOrHost(el) {
  55006. return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
  55007. }
  55008. function closest(
  55009. /**HTMLElement*/
  55010. el,
  55011. /**String*/
  55012. selector,
  55013. /**HTMLElement*/
  55014. ctx, includeCTX) {
  55015. if (el) {
  55016. ctx = ctx || document;
  55017. do {
  55018. if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
  55019. return el;
  55020. }
  55021. if (el === ctx) break;
  55022. /* jshint boss:true */
  55023. } while (el = getParentOrHost(el));
  55024. }
  55025. return null;
  55026. }
  55027. var R_SPACE = /\s+/g;
  55028. function toggleClass(el, name, state) {
  55029. if (el && name) {
  55030. if (el.classList) {
  55031. el.classList[state ? 'add' : 'remove'](name);
  55032. } else {
  55033. var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
  55034. el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
  55035. }
  55036. }
  55037. }
  55038. function css(el, prop, val) {
  55039. var style = el && el.style;
  55040. if (style) {
  55041. if (val === void 0) {
  55042. if (document.defaultView && document.defaultView.getComputedStyle) {
  55043. val = document.defaultView.getComputedStyle(el, '');
  55044. } else if (el.currentStyle) {
  55045. val = el.currentStyle;
  55046. }
  55047. return prop === void 0 ? val : val[prop];
  55048. } else {
  55049. if (!(prop in style) && prop.indexOf('webkit') === -1) {
  55050. prop = '-webkit-' + prop;
  55051. }
  55052. style[prop] = val + (typeof val === 'string' ? '' : 'px');
  55053. }
  55054. }
  55055. }
  55056. function matrix(el, selfOnly) {
  55057. var appliedTransforms = '';
  55058. if (typeof el === 'string') {
  55059. appliedTransforms = el;
  55060. } else {
  55061. do {
  55062. var transform = css(el, 'transform');
  55063. if (transform && transform !== 'none') {
  55064. appliedTransforms = transform + ' ' + appliedTransforms;
  55065. }
  55066. /* jshint boss:true */
  55067. } while (!selfOnly && (el = el.parentNode));
  55068. }
  55069. var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
  55070. /*jshint -W056 */
  55071. return matrixFn && new matrixFn(appliedTransforms);
  55072. }
  55073. function find(ctx, tagName, iterator) {
  55074. if (ctx) {
  55075. var list = ctx.getElementsByTagName(tagName),
  55076. i = 0,
  55077. n = list.length;
  55078. if (iterator) {
  55079. for (; i < n; i++) {
  55080. iterator(list[i], i);
  55081. }
  55082. }
  55083. return list;
  55084. }
  55085. return [];
  55086. }
  55087. function getWindowScrollingElement() {
  55088. var scrollingElement = document.scrollingElement;
  55089. if (scrollingElement) {
  55090. return scrollingElement;
  55091. } else {
  55092. return document.documentElement;
  55093. }
  55094. }
  55095. /**
  55096. * Returns the "bounding client rect" of given element
  55097. * @param {HTMLElement} el The element whose boundingClientRect is wanted
  55098. * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
  55099. * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
  55100. * @param {[Boolean]} undoScale Whether the container's scale() should be undone
  55101. * @param {[HTMLElement]} container The parent the element will be placed in
  55102. * @return {Object} The boundingClientRect of el, with specified adjustments
  55103. */
  55104. function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
  55105. if (!el.getBoundingClientRect && el !== window) return;
  55106. var elRect, top, left, bottom, right, height, width;
  55107. if (el !== window && el !== getWindowScrollingElement()) {
  55108. elRect = el.getBoundingClientRect();
  55109. top = elRect.top;
  55110. left = elRect.left;
  55111. bottom = elRect.bottom;
  55112. right = elRect.right;
  55113. height = elRect.height;
  55114. width = elRect.width;
  55115. } else {
  55116. top = 0;
  55117. left = 0;
  55118. bottom = window.innerHeight;
  55119. right = window.innerWidth;
  55120. height = window.innerHeight;
  55121. width = window.innerWidth;
  55122. }
  55123. if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
  55124. // Adjust for translate()
  55125. container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
  55126. // Not needed on <= IE11
  55127. if (!IE11OrLess) {
  55128. do {
  55129. if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
  55130. var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
  55131. top -= containerRect.top + parseInt(css(container, 'border-top-width'));
  55132. left -= containerRect.left + parseInt(css(container, 'border-left-width'));
  55133. bottom = top + elRect.height;
  55134. right = left + elRect.width;
  55135. break;
  55136. }
  55137. /* jshint boss:true */
  55138. } while (container = container.parentNode);
  55139. }
  55140. }
  55141. if (undoScale && el !== window) {
  55142. // Adjust for scale()
  55143. var elMatrix = matrix(container || el),
  55144. scaleX = elMatrix && elMatrix.a,
  55145. scaleY = elMatrix && elMatrix.d;
  55146. if (elMatrix) {
  55147. top /= scaleY;
  55148. left /= scaleX;
  55149. width /= scaleX;
  55150. height /= scaleY;
  55151. bottom = top + height;
  55152. right = left + width;
  55153. }
  55154. }
  55155. return {
  55156. top: top,
  55157. left: left,
  55158. bottom: bottom,
  55159. right: right,
  55160. width: width,
  55161. height: height
  55162. };
  55163. }
  55164. /**
  55165. * Checks if a side of an element is scrolled past a side of its parents
  55166. * @param {HTMLElement} el The element who's side being scrolled out of view is in question
  55167. * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
  55168. * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
  55169. * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
  55170. */
  55171. function isScrolledPast(el, elSide, parentSide) {
  55172. var parent = getParentAutoScrollElement(el, true),
  55173. elSideVal = getRect(el)[elSide];
  55174. /* jshint boss:true */
  55175. while (parent) {
  55176. var parentSideVal = getRect(parent)[parentSide],
  55177. visible = void 0;
  55178. if (parentSide === 'top' || parentSide === 'left') {
  55179. visible = elSideVal >= parentSideVal;
  55180. } else {
  55181. visible = elSideVal <= parentSideVal;
  55182. }
  55183. if (!visible) return parent;
  55184. if (parent === getWindowScrollingElement()) break;
  55185. parent = getParentAutoScrollElement(parent, false);
  55186. }
  55187. return false;
  55188. }
  55189. /**
  55190. * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
  55191. * and non-draggable elements
  55192. * @param {HTMLElement} el The parent element
  55193. * @param {Number} childNum The index of the child
  55194. * @param {Object} options Parent Sortable's options
  55195. * @return {HTMLElement} The child at index childNum, or null if not found
  55196. */
  55197. function getChild(el, childNum, options) {
  55198. var currentChild = 0,
  55199. i = 0,
  55200. children = el.children;
  55201. while (i < children.length) {
  55202. if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && children[i] !== Sortable.dragged && closest(children[i], options.draggable, el, false)) {
  55203. if (currentChild === childNum) {
  55204. return children[i];
  55205. }
  55206. currentChild++;
  55207. }
  55208. i++;
  55209. }
  55210. return null;
  55211. }
  55212. /**
  55213. * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
  55214. * @param {HTMLElement} el Parent element
  55215. * @param {selector} selector Any other elements that should be ignored
  55216. * @return {HTMLElement} The last child, ignoring ghostEl
  55217. */
  55218. function lastChild(el, selector) {
  55219. var last = el.lastElementChild;
  55220. while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
  55221. last = last.previousElementSibling;
  55222. }
  55223. return last || null;
  55224. }
  55225. /**
  55226. * Returns the index of an element within its parent for a selected set of
  55227. * elements
  55228. * @param {HTMLElement} el
  55229. * @param {selector} selector
  55230. * @return {number}
  55231. */
  55232. function index(el, selector) {
  55233. var index = 0;
  55234. if (!el || !el.parentNode) {
  55235. return -1;
  55236. }
  55237. /* jshint boss:true */
  55238. while (el = el.previousElementSibling) {
  55239. if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
  55240. index++;
  55241. }
  55242. }
  55243. return index;
  55244. }
  55245. /**
  55246. * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
  55247. * The value is returned in real pixels.
  55248. * @param {HTMLElement} el
  55249. * @return {Array} Offsets in the format of [left, top]
  55250. */
  55251. function getRelativeScrollOffset(el) {
  55252. var offsetLeft = 0,
  55253. offsetTop = 0,
  55254. winScroller = getWindowScrollingElement();
  55255. if (el) {
  55256. do {
  55257. var elMatrix = matrix(el),
  55258. scaleX = elMatrix.a,
  55259. scaleY = elMatrix.d;
  55260. offsetLeft += el.scrollLeft * scaleX;
  55261. offsetTop += el.scrollTop * scaleY;
  55262. } while (el !== winScroller && (el = el.parentNode));
  55263. }
  55264. return [offsetLeft, offsetTop];
  55265. }
  55266. /**
  55267. * Returns the index of the object within the given array
  55268. * @param {Array} arr Array that may or may not hold the object
  55269. * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
  55270. * @return {Number} The index of the object in the array, or -1
  55271. */
  55272. function indexOfObject(arr, obj) {
  55273. for (var i in arr) {
  55274. if (!arr.hasOwnProperty(i)) continue;
  55275. for (var key in obj) {
  55276. if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
  55277. }
  55278. }
  55279. return -1;
  55280. }
  55281. function getParentAutoScrollElement(el, includeSelf) {
  55282. // skip to window
  55283. if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
  55284. var elem = el;
  55285. var gotSelf = false;
  55286. do {
  55287. // we don't need to get elem css if it isn't even overflowing in the first place (performance)
  55288. if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
  55289. var elemCSS = css(elem);
  55290. if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
  55291. if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
  55292. if (gotSelf || includeSelf) return elem;
  55293. gotSelf = true;
  55294. }
  55295. }
  55296. /* jshint boss:true */
  55297. } while (elem = elem.parentNode);
  55298. return getWindowScrollingElement();
  55299. }
  55300. function extend(dst, src) {
  55301. if (dst && src) {
  55302. for (var key in src) {
  55303. if (src.hasOwnProperty(key)) {
  55304. dst[key] = src[key];
  55305. }
  55306. }
  55307. }
  55308. return dst;
  55309. }
  55310. function isRectEqual(rect1, rect2) {
  55311. return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
  55312. }
  55313. var _throttleTimeout;
  55314. function throttle(callback, ms) {
  55315. return function () {
  55316. if (!_throttleTimeout) {
  55317. var args = arguments,
  55318. _this = this;
  55319. if (args.length === 1) {
  55320. callback.call(_this, args[0]);
  55321. } else {
  55322. callback.apply(_this, args);
  55323. }
  55324. _throttleTimeout = setTimeout(function () {
  55325. _throttleTimeout = void 0;
  55326. }, ms);
  55327. }
  55328. };
  55329. }
  55330. function cancelThrottle() {
  55331. clearTimeout(_throttleTimeout);
  55332. _throttleTimeout = void 0;
  55333. }
  55334. function scrollBy(el, x, y) {
  55335. el.scrollLeft += x;
  55336. el.scrollTop += y;
  55337. }
  55338. function clone(el) {
  55339. var Polymer = window.Polymer;
  55340. var $ = window.jQuery || window.Zepto;
  55341. if (Polymer && Polymer.dom) {
  55342. return Polymer.dom(el).cloneNode(true);
  55343. } else if ($) {
  55344. return $(el).clone(true)[0];
  55345. } else {
  55346. return el.cloneNode(true);
  55347. }
  55348. }
  55349. function setRect(el, rect) {
  55350. css(el, 'position', 'absolute');
  55351. css(el, 'top', rect.top);
  55352. css(el, 'left', rect.left);
  55353. css(el, 'width', rect.width);
  55354. css(el, 'height', rect.height);
  55355. }
  55356. function unsetRect(el) {
  55357. css(el, 'position', '');
  55358. css(el, 'top', '');
  55359. css(el, 'left', '');
  55360. css(el, 'width', '');
  55361. css(el, 'height', '');
  55362. }
  55363. var expando = 'Sortable' + new Date().getTime();
  55364. function AnimationStateManager() {
  55365. var animationStates = [],
  55366. animationCallbackId;
  55367. return {
  55368. captureAnimationState: function captureAnimationState() {
  55369. animationStates = [];
  55370. if (!this.options.animation) return;
  55371. var children = [].slice.call(this.el.children);
  55372. children.forEach(function (child) {
  55373. if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
  55374. animationStates.push({
  55375. target: child,
  55376. rect: getRect(child)
  55377. });
  55378. var fromRect = _objectSpread({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation
  55379. if (child.thisAnimationDuration) {
  55380. var childMatrix = matrix(child, true);
  55381. if (childMatrix) {
  55382. fromRect.top -= childMatrix.f;
  55383. fromRect.left -= childMatrix.e;
  55384. }
  55385. }
  55386. child.fromRect = fromRect;
  55387. });
  55388. },
  55389. addAnimationState: function addAnimationState(state) {
  55390. animationStates.push(state);
  55391. },
  55392. removeAnimationState: function removeAnimationState(target) {
  55393. animationStates.splice(indexOfObject(animationStates, {
  55394. target: target
  55395. }), 1);
  55396. },
  55397. animateAll: function animateAll(callback) {
  55398. var _this = this;
  55399. if (!this.options.animation) {
  55400. clearTimeout(animationCallbackId);
  55401. if (typeof callback === 'function') callback();
  55402. return;
  55403. }
  55404. var animating = false,
  55405. animationTime = 0;
  55406. animationStates.forEach(function (state) {
  55407. var time = 0,
  55408. target = state.target,
  55409. fromRect = target.fromRect,
  55410. toRect = getRect(target),
  55411. prevFromRect = target.prevFromRect,
  55412. prevToRect = target.prevToRect,
  55413. animatingRect = state.rect,
  55414. targetMatrix = matrix(target, true);
  55415. if (targetMatrix) {
  55416. // Compensate for current animation
  55417. toRect.top -= targetMatrix.f;
  55418. toRect.left -= targetMatrix.e;
  55419. }
  55420. target.toRect = toRect;
  55421. if (target.thisAnimationDuration) {
  55422. // Could also check if animatingRect is between fromRect and toRect
  55423. if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
  55424. (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
  55425. // If returning to same place as started from animation and on same axis
  55426. time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
  55427. }
  55428. } // if fromRect != toRect: animate
  55429. if (!isRectEqual(toRect, fromRect)) {
  55430. target.prevFromRect = fromRect;
  55431. target.prevToRect = toRect;
  55432. if (!time) {
  55433. time = _this.options.animation;
  55434. }
  55435. _this.animate(target, animatingRect, toRect, time);
  55436. }
  55437. if (time) {
  55438. animating = true;
  55439. animationTime = Math.max(animationTime, time);
  55440. clearTimeout(target.animationResetTimer);
  55441. target.animationResetTimer = setTimeout(function () {
  55442. target.animationTime = 0;
  55443. target.prevFromRect = null;
  55444. target.fromRect = null;
  55445. target.prevToRect = null;
  55446. target.thisAnimationDuration = null;
  55447. }, time);
  55448. target.thisAnimationDuration = time;
  55449. }
  55450. });
  55451. clearTimeout(animationCallbackId);
  55452. if (!animating) {
  55453. if (typeof callback === 'function') callback();
  55454. } else {
  55455. animationCallbackId = setTimeout(function () {
  55456. if (typeof callback === 'function') callback();
  55457. }, animationTime);
  55458. }
  55459. animationStates = [];
  55460. },
  55461. animate: function animate(target, currentRect, toRect, duration) {
  55462. if (duration) {
  55463. css(target, 'transition', '');
  55464. css(target, 'transform', '');
  55465. var elMatrix = matrix(this.el),
  55466. scaleX = elMatrix && elMatrix.a,
  55467. scaleY = elMatrix && elMatrix.d,
  55468. translateX = (currentRect.left - toRect.left) / (scaleX || 1),
  55469. translateY = (currentRect.top - toRect.top) / (scaleY || 1);
  55470. target.animatingX = !!translateX;
  55471. target.animatingY = !!translateY;
  55472. css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
  55473. repaint(target); // repaint
  55474. css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
  55475. css(target, 'transform', 'translate3d(0,0,0)');
  55476. typeof target.animated === 'number' && clearTimeout(target.animated);
  55477. target.animated = setTimeout(function () {
  55478. css(target, 'transition', '');
  55479. css(target, 'transform', '');
  55480. target.animated = false;
  55481. target.animatingX = false;
  55482. target.animatingY = false;
  55483. }, duration);
  55484. }
  55485. }
  55486. };
  55487. }
  55488. function repaint(target) {
  55489. return target.offsetWidth;
  55490. }
  55491. function calculateRealTime(animatingRect, fromRect, toRect, options) {
  55492. return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
  55493. }
  55494. var plugins = [];
  55495. var defaults = {
  55496. initializeByDefault: true
  55497. };
  55498. var PluginManager = {
  55499. mount: function mount(plugin) {
  55500. // Set default static properties
  55501. for (var option in defaults) {
  55502. if (defaults.hasOwnProperty(option) && !(option in plugin)) {
  55503. plugin[option] = defaults[option];
  55504. }
  55505. }
  55506. plugins.push(plugin);
  55507. },
  55508. pluginEvent: function pluginEvent(eventName, sortable, evt) {
  55509. var _this = this;
  55510. this.eventCanceled = false;
  55511. evt.cancel = function () {
  55512. _this.eventCanceled = true;
  55513. };
  55514. var eventNameGlobal = eventName + 'Global';
  55515. plugins.forEach(function (plugin) {
  55516. if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable
  55517. if (sortable[plugin.pluginName][eventNameGlobal]) {
  55518. sortable[plugin.pluginName][eventNameGlobal](_objectSpread({
  55519. sortable: sortable
  55520. }, evt));
  55521. } // Only fire plugin event if plugin is enabled in this sortable,
  55522. // and plugin has event defined
  55523. if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
  55524. sortable[plugin.pluginName][eventName](_objectSpread({
  55525. sortable: sortable
  55526. }, evt));
  55527. }
  55528. });
  55529. },
  55530. initializePlugins: function initializePlugins(sortable, el, defaults, options) {
  55531. plugins.forEach(function (plugin) {
  55532. var pluginName = plugin.pluginName;
  55533. if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
  55534. var initialized = new plugin(sortable, el, sortable.options);
  55535. initialized.sortable = sortable;
  55536. initialized.options = sortable.options;
  55537. sortable[pluginName] = initialized; // Add default options from plugin
  55538. _extends(defaults, initialized.defaults);
  55539. });
  55540. for (var option in sortable.options) {
  55541. if (!sortable.options.hasOwnProperty(option)) continue;
  55542. var modified = this.modifyOption(sortable, option, sortable.options[option]);
  55543. if (typeof modified !== 'undefined') {
  55544. sortable.options[option] = modified;
  55545. }
  55546. }
  55547. },
  55548. getEventProperties: function getEventProperties(name, sortable) {
  55549. var eventProperties = {};
  55550. plugins.forEach(function (plugin) {
  55551. if (typeof plugin.eventProperties !== 'function') return;
  55552. _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
  55553. });
  55554. return eventProperties;
  55555. },
  55556. modifyOption: function modifyOption(sortable, name, value) {
  55557. var modifiedValue;
  55558. plugins.forEach(function (plugin) {
  55559. // Plugin must exist on the Sortable
  55560. if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
  55561. if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
  55562. modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
  55563. }
  55564. });
  55565. return modifiedValue;
  55566. }
  55567. };
  55568. function dispatchEvent(_ref) {
  55569. var sortable = _ref.sortable,
  55570. rootEl = _ref.rootEl,
  55571. name = _ref.name,
  55572. targetEl = _ref.targetEl,
  55573. cloneEl = _ref.cloneEl,
  55574. toEl = _ref.toEl,
  55575. fromEl = _ref.fromEl,
  55576. oldIndex = _ref.oldIndex,
  55577. newIndex = _ref.newIndex,
  55578. oldDraggableIndex = _ref.oldDraggableIndex,
  55579. newDraggableIndex = _ref.newDraggableIndex,
  55580. originalEvent = _ref.originalEvent,
  55581. putSortable = _ref.putSortable,
  55582. extraEventProperties = _ref.extraEventProperties;
  55583. sortable = sortable || rootEl && rootEl[expando];
  55584. if (!sortable) return;
  55585. var evt,
  55586. options = sortable.options,
  55587. onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
  55588. if (window.CustomEvent && !IE11OrLess && !Edge) {
  55589. evt = new CustomEvent(name, {
  55590. bubbles: true,
  55591. cancelable: true
  55592. });
  55593. } else {
  55594. evt = document.createEvent('Event');
  55595. evt.initEvent(name, true, true);
  55596. }
  55597. evt.to = toEl || rootEl;
  55598. evt.from = fromEl || rootEl;
  55599. evt.item = targetEl || rootEl;
  55600. evt.clone = cloneEl;
  55601. evt.oldIndex = oldIndex;
  55602. evt.newIndex = newIndex;
  55603. evt.oldDraggableIndex = oldDraggableIndex;
  55604. evt.newDraggableIndex = newDraggableIndex;
  55605. evt.originalEvent = originalEvent;
  55606. evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
  55607. var allEventProperties = _objectSpread({}, extraEventProperties, PluginManager.getEventProperties(name, sortable));
  55608. for (var option in allEventProperties) {
  55609. evt[option] = allEventProperties[option];
  55610. }
  55611. if (rootEl) {
  55612. rootEl.dispatchEvent(evt);
  55613. }
  55614. if (options[onName]) {
  55615. options[onName].call(sortable, evt);
  55616. }
  55617. }
  55618. var pluginEvent = function pluginEvent(eventName, sortable) {
  55619. var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
  55620. originalEvent = _ref.evt,
  55621. data = _objectWithoutProperties(_ref, ["evt"]);
  55622. PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread({
  55623. dragEl: dragEl,
  55624. parentEl: parentEl,
  55625. ghostEl: ghostEl,
  55626. rootEl: rootEl,
  55627. nextEl: nextEl,
  55628. lastDownEl: lastDownEl,
  55629. cloneEl: cloneEl,
  55630. cloneHidden: cloneHidden,
  55631. dragStarted: moved,
  55632. putSortable: putSortable,
  55633. activeSortable: Sortable.active,
  55634. originalEvent: originalEvent,
  55635. oldIndex: oldIndex,
  55636. oldDraggableIndex: oldDraggableIndex,
  55637. newIndex: newIndex,
  55638. newDraggableIndex: newDraggableIndex,
  55639. hideGhostForTarget: _hideGhostForTarget,
  55640. unhideGhostForTarget: _unhideGhostForTarget,
  55641. cloneNowHidden: function cloneNowHidden() {
  55642. cloneHidden = true;
  55643. },
  55644. cloneNowShown: function cloneNowShown() {
  55645. cloneHidden = false;
  55646. },
  55647. dispatchSortableEvent: function dispatchSortableEvent(name) {
  55648. _dispatchEvent({
  55649. sortable: sortable,
  55650. name: name,
  55651. originalEvent: originalEvent
  55652. });
  55653. }
  55654. }, data));
  55655. };
  55656. function _dispatchEvent(info) {
  55657. dispatchEvent(_objectSpread({
  55658. putSortable: putSortable,
  55659. cloneEl: cloneEl,
  55660. targetEl: dragEl,
  55661. rootEl: rootEl,
  55662. oldIndex: oldIndex,
  55663. oldDraggableIndex: oldDraggableIndex,
  55664. newIndex: newIndex,
  55665. newDraggableIndex: newDraggableIndex
  55666. }, info));
  55667. }
  55668. var dragEl,
  55669. parentEl,
  55670. ghostEl,
  55671. rootEl,
  55672. nextEl,
  55673. lastDownEl,
  55674. cloneEl,
  55675. cloneHidden,
  55676. oldIndex,
  55677. newIndex,
  55678. oldDraggableIndex,
  55679. newDraggableIndex,
  55680. activeGroup,
  55681. putSortable,
  55682. awaitingDragStarted = false,
  55683. ignoreNextClick = false,
  55684. sortables = [],
  55685. tapEvt,
  55686. touchEvt,
  55687. lastDx,
  55688. lastDy,
  55689. tapDistanceLeft,
  55690. tapDistanceTop,
  55691. moved,
  55692. lastTarget,
  55693. lastDirection,
  55694. pastFirstInvertThresh = false,
  55695. isCircumstantialInvert = false,
  55696. targetMoveDistance,
  55697. // For positioning ghost absolutely
  55698. ghostRelativeParent,
  55699. ghostRelativeParentInitialScroll = [],
  55700. // (left, top)
  55701. _silent = false,
  55702. savedInputChecked = [];
  55703. /** @const */
  55704. var documentExists = typeof document !== 'undefined',
  55705. PositionGhostAbsolutely = IOS,
  55706. CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
  55707. // This will not pass for IE9, because IE9 DnD only works on anchors
  55708. supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
  55709. supportCssPointerEvents = function () {
  55710. if (!documentExists) return; // false when <= IE11
  55711. if (IE11OrLess) {
  55712. return false;
  55713. }
  55714. var el = document.createElement('x');
  55715. el.style.cssText = 'pointer-events:auto';
  55716. return el.style.pointerEvents === 'auto';
  55717. }(),
  55718. _detectDirection = function _detectDirection(el, options) {
  55719. var elCSS = css(el),
  55720. elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
  55721. child1 = getChild(el, 0, options),
  55722. child2 = getChild(el, 1, options),
  55723. firstChildCSS = child1 && css(child1),
  55724. secondChildCSS = child2 && css(child2),
  55725. firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
  55726. secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
  55727. if (elCSS.display === 'flex') {
  55728. return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
  55729. }
  55730. if (elCSS.display === 'grid') {
  55731. return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
  55732. }
  55733. if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
  55734. var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
  55735. return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
  55736. }
  55737. return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
  55738. },
  55739. _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
  55740. var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
  55741. dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
  55742. dragElOppLength = vertical ? dragRect.width : dragRect.height,
  55743. targetS1Opp = vertical ? targetRect.left : targetRect.top,
  55744. targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
  55745. targetOppLength = vertical ? targetRect.width : targetRect.height;
  55746. return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
  55747. },
  55748. /**
  55749. * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
  55750. * @param {Number} x X position
  55751. * @param {Number} y Y position
  55752. * @return {HTMLElement} Element of the first found nearest Sortable
  55753. */
  55754. _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
  55755. var ret;
  55756. sortables.some(function (sortable) {
  55757. if (lastChild(sortable)) return;
  55758. var rect = getRect(sortable),
  55759. threshold = sortable[expando].options.emptyInsertThreshold,
  55760. insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
  55761. insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
  55762. if (threshold && insideHorizontally && insideVertically) {
  55763. return ret = sortable;
  55764. }
  55765. });
  55766. return ret;
  55767. },
  55768. _prepareGroup = function _prepareGroup(options) {
  55769. function toFn(value, pull) {
  55770. return function (to, from, dragEl, evt) {
  55771. var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
  55772. if (value == null && (pull || sameGroup)) {
  55773. // Default pull value
  55774. // Default pull and put value if same group
  55775. return true;
  55776. } else if (value == null || value === false) {
  55777. return false;
  55778. } else if (pull && value === 'clone') {
  55779. return value;
  55780. } else if (typeof value === 'function') {
  55781. return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
  55782. } else {
  55783. var otherGroup = (pull ? to : from).options.group.name;
  55784. return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
  55785. }
  55786. };
  55787. }
  55788. var group = {};
  55789. var originalGroup = options.group;
  55790. if (!originalGroup || _typeof(originalGroup) != 'object') {
  55791. originalGroup = {
  55792. name: originalGroup
  55793. };
  55794. }
  55795. group.name = originalGroup.name;
  55796. group.checkPull = toFn(originalGroup.pull, true);
  55797. group.checkPut = toFn(originalGroup.put);
  55798. group.revertClone = originalGroup.revertClone;
  55799. options.group = group;
  55800. },
  55801. _hideGhostForTarget = function _hideGhostForTarget() {
  55802. if (!supportCssPointerEvents && ghostEl) {
  55803. css(ghostEl, 'display', 'none');
  55804. }
  55805. },
  55806. _unhideGhostForTarget = function _unhideGhostForTarget() {
  55807. if (!supportCssPointerEvents && ghostEl) {
  55808. css(ghostEl, 'display', '');
  55809. }
  55810. }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
  55811. if (documentExists) {
  55812. document.addEventListener('click', function (evt) {
  55813. if (ignoreNextClick) {
  55814. evt.preventDefault();
  55815. evt.stopPropagation && evt.stopPropagation();
  55816. evt.stopImmediatePropagation && evt.stopImmediatePropagation();
  55817. ignoreNextClick = false;
  55818. return false;
  55819. }
  55820. }, true);
  55821. }
  55822. var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
  55823. if (dragEl) {
  55824. evt = evt.touches ? evt.touches[0] : evt;
  55825. var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
  55826. if (nearest) {
  55827. // Create imitation event
  55828. var event = {};
  55829. for (var i in evt) {
  55830. if (evt.hasOwnProperty(i)) {
  55831. event[i] = evt[i];
  55832. }
  55833. }
  55834. event.target = event.rootEl = nearest;
  55835. event.preventDefault = void 0;
  55836. event.stopPropagation = void 0;
  55837. nearest[expando]._onDragOver(event);
  55838. }
  55839. }
  55840. };
  55841. var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
  55842. if (dragEl) {
  55843. dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
  55844. }
  55845. };
  55846. /**
  55847. * @class Sortable
  55848. * @param {HTMLElement} el
  55849. * @param {Object} [options]
  55850. */
  55851. function Sortable(el, options) {
  55852. if (!(el && el.nodeType && el.nodeType === 1)) {
  55853. throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
  55854. }
  55855. this.el = el; // root element
  55856. this.options = options = _extends({}, options); // Export instance
  55857. el[expando] = this;
  55858. var defaults = {
  55859. group: null,
  55860. sort: true,
  55861. disabled: false,
  55862. store: null,
  55863. handle: null,
  55864. draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
  55865. swapThreshold: 1,
  55866. // percentage; 0 <= x <= 1
  55867. invertSwap: false,
  55868. // invert always
  55869. invertedSwapThreshold: null,
  55870. // will be set to same as swapThreshold if default
  55871. removeCloneOnHide: true,
  55872. direction: function direction() {
  55873. return _detectDirection(el, this.options);
  55874. },
  55875. ghostClass: 'sortable-ghost',
  55876. chosenClass: 'sortable-chosen',
  55877. dragClass: 'sortable-drag',
  55878. ignore: 'a, img',
  55879. filter: null,
  55880. preventOnFilter: true,
  55881. animation: 0,
  55882. easing: null,
  55883. setData: function setData(dataTransfer, dragEl) {
  55884. dataTransfer.setData('Text', dragEl.textContent);
  55885. },
  55886. dropBubble: false,
  55887. dragoverBubble: false,
  55888. dataIdAttr: 'data-id',
  55889. delay: 0,
  55890. delayOnTouchOnly: false,
  55891. touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
  55892. forceFallback: false,
  55893. fallbackClass: 'sortable-fallback',
  55894. fallbackOnBody: false,
  55895. fallbackTolerance: 0,
  55896. fallbackOffset: {
  55897. x: 0,
  55898. y: 0
  55899. },
  55900. supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window,
  55901. emptyInsertThreshold: 5
  55902. };
  55903. PluginManager.initializePlugins(this, el, defaults); // Set default options
  55904. for (var name in defaults) {
  55905. !(name in options) && (options[name] = defaults[name]);
  55906. }
  55907. _prepareGroup(options); // Bind all private methods
  55908. for (var fn in this) {
  55909. if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
  55910. this[fn] = this[fn].bind(this);
  55911. }
  55912. } // Setup drag mode
  55913. this.nativeDraggable = options.forceFallback ? false : supportDraggable;
  55914. if (this.nativeDraggable) {
  55915. // Touch start threshold cannot be greater than the native dragstart threshold
  55916. this.options.touchStartThreshold = 1;
  55917. } // Bind events
  55918. if (options.supportPointer) {
  55919. on(el, 'pointerdown', this._onTapStart);
  55920. } else {
  55921. on(el, 'mousedown', this._onTapStart);
  55922. on(el, 'touchstart', this._onTapStart);
  55923. }
  55924. if (this.nativeDraggable) {
  55925. on(el, 'dragover', this);
  55926. on(el, 'dragenter', this);
  55927. }
  55928. sortables.push(this.el); // Restore sorting
  55929. options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
  55930. _extends(this, AnimationStateManager());
  55931. }
  55932. Sortable.prototype =
  55933. /** @lends Sortable.prototype */
  55934. {
  55935. constructor: Sortable,
  55936. _isOutsideThisEl: function _isOutsideThisEl(target) {
  55937. if (!this.el.contains(target) && target !== this.el) {
  55938. lastTarget = null;
  55939. }
  55940. },
  55941. _getDirection: function _getDirection(evt, target) {
  55942. return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
  55943. },
  55944. _onTapStart: function _onTapStart(
  55945. /** Event|TouchEvent */
  55946. evt) {
  55947. if (!evt.cancelable) return;
  55948. var _this = this,
  55949. el = this.el,
  55950. options = this.options,
  55951. preventOnFilter = options.preventOnFilter,
  55952. type = evt.type,
  55953. touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
  55954. target = (touch || evt).target,
  55955. originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
  55956. filter = options.filter;
  55957. _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
  55958. if (dragEl) {
  55959. return;
  55960. }
  55961. if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
  55962. return; // only left button and enabled
  55963. } // cancel dnd if original target is content editable
  55964. if (originalTarget.isContentEditable) {
  55965. return;
  55966. }
  55967. target = closest(target, options.draggable, el, false);
  55968. if (target && target.animated) {
  55969. return;
  55970. }
  55971. if (lastDownEl === target) {
  55972. // Ignoring duplicate `down`
  55973. return;
  55974. } // Get the index of the dragged element within its parent
  55975. oldIndex = index(target);
  55976. oldDraggableIndex = index(target, options.draggable); // Check filter
  55977. if (typeof filter === 'function') {
  55978. if (filter.call(this, evt, target, this)) {
  55979. _dispatchEvent({
  55980. sortable: _this,
  55981. rootEl: originalTarget,
  55982. name: 'filter',
  55983. targetEl: target,
  55984. toEl: el,
  55985. fromEl: el
  55986. });
  55987. pluginEvent('filter', _this, {
  55988. evt: evt
  55989. });
  55990. preventOnFilter && evt.cancelable && evt.preventDefault();
  55991. return; // cancel dnd
  55992. }
  55993. } else if (filter) {
  55994. filter = filter.split(',').some(function (criteria) {
  55995. criteria = closest(originalTarget, criteria.trim(), el, false);
  55996. if (criteria) {
  55997. _dispatchEvent({
  55998. sortable: _this,
  55999. rootEl: criteria,
  56000. name: 'filter',
  56001. targetEl: target,
  56002. fromEl: el,
  56003. toEl: el
  56004. });
  56005. pluginEvent('filter', _this, {
  56006. evt: evt
  56007. });
  56008. return true;
  56009. }
  56010. });
  56011. if (filter) {
  56012. preventOnFilter && evt.cancelable && evt.preventDefault();
  56013. return; // cancel dnd
  56014. }
  56015. }
  56016. if (options.handle && !closest(originalTarget, options.handle, el, false)) {
  56017. return;
  56018. } // Prepare `dragstart`
  56019. this._prepareDragStart(evt, touch, target);
  56020. },
  56021. _prepareDragStart: function _prepareDragStart(
  56022. /** Event */
  56023. evt,
  56024. /** Touch */
  56025. touch,
  56026. /** HTMLElement */
  56027. target) {
  56028. var _this = this,
  56029. el = _this.el,
  56030. options = _this.options,
  56031. ownerDocument = el.ownerDocument,
  56032. dragStartFn;
  56033. if (target && !dragEl && target.parentNode === el) {
  56034. var dragRect = getRect(target);
  56035. rootEl = el;
  56036. dragEl = target;
  56037. parentEl = dragEl.parentNode;
  56038. nextEl = dragEl.nextSibling;
  56039. lastDownEl = target;
  56040. activeGroup = options.group;
  56041. Sortable.dragged = dragEl;
  56042. tapEvt = {
  56043. target: dragEl,
  56044. clientX: (touch || evt).clientX,
  56045. clientY: (touch || evt).clientY
  56046. };
  56047. tapDistanceLeft = tapEvt.clientX - dragRect.left;
  56048. tapDistanceTop = tapEvt.clientY - dragRect.top;
  56049. this._lastX = (touch || evt).clientX;
  56050. this._lastY = (touch || evt).clientY;
  56051. dragEl.style['will-change'] = 'all';
  56052. dragStartFn = function dragStartFn() {
  56053. pluginEvent('delayEnded', _this, {
  56054. evt: evt
  56055. });
  56056. if (Sortable.eventCanceled) {
  56057. _this._onDrop();
  56058. return;
  56059. } // Delayed drag has been triggered
  56060. // we can re-enable the events: touchmove/mousemove
  56061. _this._disableDelayedDragEvents();
  56062. if (!FireFox && _this.nativeDraggable) {
  56063. dragEl.draggable = true;
  56064. } // Bind the events: dragstart/dragend
  56065. _this._triggerDragStart(evt, touch); // Drag start event
  56066. _dispatchEvent({
  56067. sortable: _this,
  56068. name: 'choose',
  56069. originalEvent: evt
  56070. }); // Chosen item
  56071. toggleClass(dragEl, options.chosenClass, true);
  56072. }; // Disable "draggable"
  56073. options.ignore.split(',').forEach(function (criteria) {
  56074. find(dragEl, criteria.trim(), _disableDraggable);
  56075. });
  56076. on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
  56077. on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
  56078. on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
  56079. on(ownerDocument, 'mouseup', _this._onDrop);
  56080. on(ownerDocument, 'touchend', _this._onDrop);
  56081. on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
  56082. if (FireFox && this.nativeDraggable) {
  56083. this.options.touchStartThreshold = 4;
  56084. dragEl.draggable = true;
  56085. }
  56086. pluginEvent('delayStart', this, {
  56087. evt: evt
  56088. }); // Delay is impossible for native DnD in Edge or IE
  56089. if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
  56090. if (Sortable.eventCanceled) {
  56091. this._onDrop();
  56092. return;
  56093. } // If the user moves the pointer or let go the click or touch
  56094. // before the delay has been reached:
  56095. // disable the delayed drag
  56096. on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
  56097. on(ownerDocument, 'touchend', _this._disableDelayedDrag);
  56098. on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
  56099. on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
  56100. on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
  56101. options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
  56102. _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
  56103. } else {
  56104. dragStartFn();
  56105. }
  56106. }
  56107. },
  56108. _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
  56109. /** TouchEvent|PointerEvent **/
  56110. e) {
  56111. var touch = e.touches ? e.touches[0] : e;
  56112. if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
  56113. this._disableDelayedDrag();
  56114. }
  56115. },
  56116. _disableDelayedDrag: function _disableDelayedDrag() {
  56117. dragEl && _disableDraggable(dragEl);
  56118. clearTimeout(this._dragStartTimer);
  56119. this._disableDelayedDragEvents();
  56120. },
  56121. _disableDelayedDragEvents: function _disableDelayedDragEvents() {
  56122. var ownerDocument = this.el.ownerDocument;
  56123. off(ownerDocument, 'mouseup', this._disableDelayedDrag);
  56124. off(ownerDocument, 'touchend', this._disableDelayedDrag);
  56125. off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
  56126. off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
  56127. off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
  56128. off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
  56129. },
  56130. _triggerDragStart: function _triggerDragStart(
  56131. /** Event */
  56132. evt,
  56133. /** Touch */
  56134. touch) {
  56135. touch = touch || evt.pointerType == 'touch' && evt;
  56136. if (!this.nativeDraggable || touch) {
  56137. if (this.options.supportPointer) {
  56138. on(document, 'pointermove', this._onTouchMove);
  56139. } else if (touch) {
  56140. on(document, 'touchmove', this._onTouchMove);
  56141. } else {
  56142. on(document, 'mousemove', this._onTouchMove);
  56143. }
  56144. } else {
  56145. on(dragEl, 'dragend', this);
  56146. on(rootEl, 'dragstart', this._onDragStart);
  56147. }
  56148. try {
  56149. if (document.selection) {
  56150. // Timeout neccessary for IE9
  56151. _nextTick(function () {
  56152. document.selection.empty();
  56153. });
  56154. } else {
  56155. window.getSelection().removeAllRanges();
  56156. }
  56157. } catch (err) {}
  56158. },
  56159. _dragStarted: function _dragStarted(fallback, evt) {
  56160. awaitingDragStarted = false;
  56161. if (rootEl && dragEl) {
  56162. pluginEvent('dragStarted', this, {
  56163. evt: evt
  56164. });
  56165. if (this.nativeDraggable) {
  56166. on(document, 'dragover', _checkOutsideTargetEl);
  56167. }
  56168. var options = this.options; // Apply effect
  56169. !fallback && toggleClass(dragEl, options.dragClass, false);
  56170. toggleClass(dragEl, options.ghostClass, true);
  56171. Sortable.active = this;
  56172. fallback && this._appendGhost(); // Drag start event
  56173. _dispatchEvent({
  56174. sortable: this,
  56175. name: 'start',
  56176. originalEvent: evt
  56177. });
  56178. } else {
  56179. this._nulling();
  56180. }
  56181. },
  56182. _emulateDragOver: function _emulateDragOver() {
  56183. if (touchEvt) {
  56184. this._lastX = touchEvt.clientX;
  56185. this._lastY = touchEvt.clientY;
  56186. _hideGhostForTarget();
  56187. var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
  56188. var parent = target;
  56189. while (target && target.shadowRoot) {
  56190. target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
  56191. if (target === parent) break;
  56192. parent = target;
  56193. }
  56194. dragEl.parentNode[expando]._isOutsideThisEl(target);
  56195. if (parent) {
  56196. do {
  56197. if (parent[expando]) {
  56198. var inserted = void 0;
  56199. inserted = parent[expando]._onDragOver({
  56200. clientX: touchEvt.clientX,
  56201. clientY: touchEvt.clientY,
  56202. target: target,
  56203. rootEl: parent
  56204. });
  56205. if (inserted && !this.options.dragoverBubble) {
  56206. break;
  56207. }
  56208. }
  56209. target = parent; // store last element
  56210. }
  56211. /* jshint boss:true */
  56212. while (parent = parent.parentNode);
  56213. }
  56214. _unhideGhostForTarget();
  56215. }
  56216. },
  56217. _onTouchMove: function _onTouchMove(
  56218. /**TouchEvent*/
  56219. evt) {
  56220. if (tapEvt) {
  56221. var options = this.options,
  56222. fallbackTolerance = options.fallbackTolerance,
  56223. fallbackOffset = options.fallbackOffset,
  56224. touch = evt.touches ? evt.touches[0] : evt,
  56225. ghostMatrix = ghostEl && matrix(ghostEl, true),
  56226. scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
  56227. scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
  56228. relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
  56229. dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
  56230. dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging
  56231. if (!Sortable.active && !awaitingDragStarted) {
  56232. if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
  56233. return;
  56234. }
  56235. this._onDragStart(evt, true);
  56236. }
  56237. if (ghostEl) {
  56238. if (ghostMatrix) {
  56239. ghostMatrix.e += dx - (lastDx || 0);
  56240. ghostMatrix.f += dy - (lastDy || 0);
  56241. } else {
  56242. ghostMatrix = {
  56243. a: 1,
  56244. b: 0,
  56245. c: 0,
  56246. d: 1,
  56247. e: dx,
  56248. f: dy
  56249. };
  56250. }
  56251. var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
  56252. css(ghostEl, 'webkitTransform', cssMatrix);
  56253. css(ghostEl, 'mozTransform', cssMatrix);
  56254. css(ghostEl, 'msTransform', cssMatrix);
  56255. css(ghostEl, 'transform', cssMatrix);
  56256. lastDx = dx;
  56257. lastDy = dy;
  56258. touchEvt = touch;
  56259. }
  56260. evt.cancelable && evt.preventDefault();
  56261. }
  56262. },
  56263. _appendGhost: function _appendGhost() {
  56264. // Bug if using scale(): https://stackoverflow.com/questions/2637058
  56265. // Not being adjusted for
  56266. if (!ghostEl) {
  56267. var container = this.options.fallbackOnBody ? document.body : rootEl,
  56268. rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
  56269. options = this.options; // Position absolutely
  56270. if (PositionGhostAbsolutely) {
  56271. // Get relatively positioned parent
  56272. ghostRelativeParent = container;
  56273. while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
  56274. ghostRelativeParent = ghostRelativeParent.parentNode;
  56275. }
  56276. if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
  56277. if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
  56278. rect.top += ghostRelativeParent.scrollTop;
  56279. rect.left += ghostRelativeParent.scrollLeft;
  56280. } else {
  56281. ghostRelativeParent = getWindowScrollingElement();
  56282. }
  56283. ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
  56284. }
  56285. ghostEl = dragEl.cloneNode(true);
  56286. toggleClass(ghostEl, options.ghostClass, false);
  56287. toggleClass(ghostEl, options.fallbackClass, true);
  56288. toggleClass(ghostEl, options.dragClass, true);
  56289. css(ghostEl, 'transition', '');
  56290. css(ghostEl, 'transform', '');
  56291. css(ghostEl, 'box-sizing', 'border-box');
  56292. css(ghostEl, 'margin', 0);
  56293. css(ghostEl, 'top', rect.top);
  56294. css(ghostEl, 'left', rect.left);
  56295. css(ghostEl, 'width', rect.width);
  56296. css(ghostEl, 'height', rect.height);
  56297. css(ghostEl, 'opacity', '0.8');
  56298. css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
  56299. css(ghostEl, 'zIndex', '100000');
  56300. css(ghostEl, 'pointerEvents', 'none');
  56301. Sortable.ghost = ghostEl;
  56302. container.appendChild(ghostEl); // Set transform-origin
  56303. css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
  56304. }
  56305. },
  56306. _onDragStart: function _onDragStart(
  56307. /**Event*/
  56308. evt,
  56309. /**boolean*/
  56310. fallback) {
  56311. var _this = this;
  56312. var dataTransfer = evt.dataTransfer;
  56313. var options = _this.options;
  56314. pluginEvent('dragStart', this, {
  56315. evt: evt
  56316. });
  56317. if (Sortable.eventCanceled) {
  56318. this._onDrop();
  56319. return;
  56320. }
  56321. pluginEvent('setupClone', this);
  56322. if (!Sortable.eventCanceled) {
  56323. cloneEl = clone(dragEl);
  56324. cloneEl.draggable = false;
  56325. cloneEl.style['will-change'] = '';
  56326. this._hideClone();
  56327. toggleClass(cloneEl, this.options.chosenClass, false);
  56328. Sortable.clone = cloneEl;
  56329. } // #1143: IFrame support workaround
  56330. _this.cloneId = _nextTick(function () {
  56331. pluginEvent('clone', _this);
  56332. if (Sortable.eventCanceled) return;
  56333. if (!_this.options.removeCloneOnHide) {
  56334. rootEl.insertBefore(cloneEl, dragEl);
  56335. }
  56336. _this._hideClone();
  56337. _dispatchEvent({
  56338. sortable: _this,
  56339. name: 'clone'
  56340. });
  56341. });
  56342. !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
  56343. if (fallback) {
  56344. ignoreNextClick = true;
  56345. _this._loopId = setInterval(_this._emulateDragOver, 50);
  56346. } else {
  56347. // Undo what was set in _prepareDragStart before drag started
  56348. off(document, 'mouseup', _this._onDrop);
  56349. off(document, 'touchend', _this._onDrop);
  56350. off(document, 'touchcancel', _this._onDrop);
  56351. if (dataTransfer) {
  56352. dataTransfer.effectAllowed = 'move';
  56353. options.setData && options.setData.call(_this, dataTransfer, dragEl);
  56354. }
  56355. on(document, 'drop', _this); // #1276 fix:
  56356. css(dragEl, 'transform', 'translateZ(0)');
  56357. }
  56358. awaitingDragStarted = true;
  56359. _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
  56360. on(document, 'selectstart', _this);
  56361. moved = true;
  56362. if (Safari) {
  56363. css(document.body, 'user-select', 'none');
  56364. }
  56365. },
  56366. // Returns true - if no further action is needed (either inserted or another condition)
  56367. _onDragOver: function _onDragOver(
  56368. /**Event*/
  56369. evt) {
  56370. var el = this.el,
  56371. target = evt.target,
  56372. dragRect,
  56373. targetRect,
  56374. revert,
  56375. options = this.options,
  56376. group = options.group,
  56377. activeSortable = Sortable.active,
  56378. isOwner = activeGroup === group,
  56379. canSort = options.sort,
  56380. fromSortable = putSortable || activeSortable,
  56381. vertical,
  56382. _this = this,
  56383. completedFired = false;
  56384. if (_silent) return;
  56385. function dragOverEvent(name, extra) {
  56386. pluginEvent(name, _this, _objectSpread({
  56387. evt: evt,
  56388. isOwner: isOwner,
  56389. axis: vertical ? 'vertical' : 'horizontal',
  56390. revert: revert,
  56391. dragRect: dragRect,
  56392. targetRect: targetRect,
  56393. canSort: canSort,
  56394. fromSortable: fromSortable,
  56395. target: target,
  56396. completed: completed,
  56397. onMove: function onMove(target, after) {
  56398. return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
  56399. },
  56400. changed: changed
  56401. }, extra));
  56402. } // Capture animation state
  56403. function capture() {
  56404. dragOverEvent('dragOverAnimationCapture');
  56405. _this.captureAnimationState();
  56406. if (_this !== fromSortable) {
  56407. fromSortable.captureAnimationState();
  56408. }
  56409. } // Return invocation when dragEl is inserted (or completed)
  56410. function completed(insertion) {
  56411. dragOverEvent('dragOverCompleted', {
  56412. insertion: insertion
  56413. });
  56414. if (insertion) {
  56415. // Clones must be hidden before folding animation to capture dragRectAbsolute properly
  56416. if (isOwner) {
  56417. activeSortable._hideClone();
  56418. } else {
  56419. activeSortable._showClone(_this);
  56420. }
  56421. if (_this !== fromSortable) {
  56422. // Set ghost class to new sortable's ghost class
  56423. toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
  56424. toggleClass(dragEl, options.ghostClass, true);
  56425. }
  56426. if (putSortable !== _this && _this !== Sortable.active) {
  56427. putSortable = _this;
  56428. } else if (_this === Sortable.active && putSortable) {
  56429. putSortable = null;
  56430. } // Animation
  56431. if (fromSortable === _this) {
  56432. _this._ignoreWhileAnimating = target;
  56433. }
  56434. _this.animateAll(function () {
  56435. dragOverEvent('dragOverAnimationComplete');
  56436. _this._ignoreWhileAnimating = null;
  56437. });
  56438. if (_this !== fromSortable) {
  56439. fromSortable.animateAll();
  56440. fromSortable._ignoreWhileAnimating = null;
  56441. }
  56442. } // Null lastTarget if it is not inside a previously swapped element
  56443. if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
  56444. lastTarget = null;
  56445. } // no bubbling and not fallback
  56446. if (!options.dragoverBubble && !evt.rootEl && target !== document) {
  56447. dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
  56448. !insertion && nearestEmptyInsertDetectEvent(evt);
  56449. }
  56450. !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
  56451. return completedFired = true;
  56452. } // Call when dragEl has been inserted
  56453. function changed() {
  56454. newIndex = index(dragEl);
  56455. newDraggableIndex = index(dragEl, options.draggable);
  56456. _dispatchEvent({
  56457. sortable: _this,
  56458. name: 'change',
  56459. toEl: el,
  56460. newIndex: newIndex,
  56461. newDraggableIndex: newDraggableIndex,
  56462. originalEvent: evt
  56463. });
  56464. }
  56465. if (evt.preventDefault !== void 0) {
  56466. evt.cancelable && evt.preventDefault();
  56467. }
  56468. target = closest(target, options.draggable, el, true);
  56469. dragOverEvent('dragOver');
  56470. if (Sortable.eventCanceled) return completedFired;
  56471. if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
  56472. return completed(false);
  56473. }
  56474. ignoreNextClick = false;
  56475. if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
  56476. : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
  56477. vertical = this._getDirection(evt, target) === 'vertical';
  56478. dragRect = getRect(dragEl);
  56479. dragOverEvent('dragOverValid');
  56480. if (Sortable.eventCanceled) return completedFired;
  56481. if (revert) {
  56482. parentEl = rootEl; // actualization
  56483. capture();
  56484. this._hideClone();
  56485. dragOverEvent('revert');
  56486. if (!Sortable.eventCanceled) {
  56487. if (nextEl) {
  56488. rootEl.insertBefore(dragEl, nextEl);
  56489. } else {
  56490. rootEl.appendChild(dragEl);
  56491. }
  56492. }
  56493. return completed(true);
  56494. }
  56495. var elLastChild = lastChild(el, options.draggable);
  56496. if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
  56497. // If already at end of list: Do not insert
  56498. if (elLastChild === dragEl) {
  56499. return completed(false);
  56500. } // assign target only if condition is true
  56501. if (elLastChild && el === evt.target) {
  56502. target = elLastChild;
  56503. }
  56504. if (target) {
  56505. targetRect = getRect(target);
  56506. }
  56507. if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
  56508. capture();
  56509. el.appendChild(dragEl);
  56510. parentEl = el; // actualization
  56511. changed();
  56512. return completed(true);
  56513. }
  56514. } else if (target.parentNode === el) {
  56515. targetRect = getRect(target);
  56516. var direction = 0,
  56517. targetBeforeFirstSwap,
  56518. differentLevel = dragEl.parentNode !== el,
  56519. differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
  56520. side1 = vertical ? 'top' : 'left',
  56521. scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
  56522. scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
  56523. if (lastTarget !== target) {
  56524. targetBeforeFirstSwap = targetRect[side1];
  56525. pastFirstInvertThresh = false;
  56526. isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
  56527. }
  56528. direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
  56529. var sibling;
  56530. if (direction !== 0) {
  56531. // Check if target is beside dragEl in respective direction (ignoring hidden elements)
  56532. var dragIndex = index(dragEl);
  56533. do {
  56534. dragIndex -= direction;
  56535. sibling = parentEl.children[dragIndex];
  56536. } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
  56537. } // If dragEl is already beside target: Do not insert
  56538. if (direction === 0 || sibling === target) {
  56539. return completed(false);
  56540. }
  56541. lastTarget = target;
  56542. lastDirection = direction;
  56543. var nextSibling = target.nextElementSibling,
  56544. after = false;
  56545. after = direction === 1;
  56546. var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
  56547. if (moveVector !== false) {
  56548. if (moveVector === 1 || moveVector === -1) {
  56549. after = moveVector === 1;
  56550. }
  56551. _silent = true;
  56552. setTimeout(_unsilent, 30);
  56553. capture();
  56554. if (after && !nextSibling) {
  56555. el.appendChild(dragEl);
  56556. } else {
  56557. target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
  56558. } // Undo chrome's scroll adjustment (has no effect on other browsers)
  56559. if (scrolledPastTop) {
  56560. scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
  56561. }
  56562. parentEl = dragEl.parentNode; // actualization
  56563. // must be done before animation
  56564. if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
  56565. targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
  56566. }
  56567. changed();
  56568. return completed(true);
  56569. }
  56570. }
  56571. if (el.contains(dragEl)) {
  56572. return completed(false);
  56573. }
  56574. }
  56575. return false;
  56576. },
  56577. _ignoreWhileAnimating: null,
  56578. _offMoveEvents: function _offMoveEvents() {
  56579. off(document, 'mousemove', this._onTouchMove);
  56580. off(document, 'touchmove', this._onTouchMove);
  56581. off(document, 'pointermove', this._onTouchMove);
  56582. off(document, 'dragover', nearestEmptyInsertDetectEvent);
  56583. off(document, 'mousemove', nearestEmptyInsertDetectEvent);
  56584. off(document, 'touchmove', nearestEmptyInsertDetectEvent);
  56585. },
  56586. _offUpEvents: function _offUpEvents() {
  56587. var ownerDocument = this.el.ownerDocument;
  56588. off(ownerDocument, 'mouseup', this._onDrop);
  56589. off(ownerDocument, 'touchend', this._onDrop);
  56590. off(ownerDocument, 'pointerup', this._onDrop);
  56591. off(ownerDocument, 'touchcancel', this._onDrop);
  56592. off(document, 'selectstart', this);
  56593. },
  56594. _onDrop: function _onDrop(
  56595. /**Event*/
  56596. evt) {
  56597. var el = this.el,
  56598. options = this.options; // Get the index of the dragged element within its parent
  56599. newIndex = index(dragEl);
  56600. newDraggableIndex = index(dragEl, options.draggable);
  56601. pluginEvent('drop', this, {
  56602. evt: evt
  56603. });
  56604. parentEl = dragEl && dragEl.parentNode; // Get again after plugin event
  56605. newIndex = index(dragEl);
  56606. newDraggableIndex = index(dragEl, options.draggable);
  56607. if (Sortable.eventCanceled) {
  56608. this._nulling();
  56609. return;
  56610. }
  56611. awaitingDragStarted = false;
  56612. isCircumstantialInvert = false;
  56613. pastFirstInvertThresh = false;
  56614. clearInterval(this._loopId);
  56615. clearTimeout(this._dragStartTimer);
  56616. _cancelNextTick(this.cloneId);
  56617. _cancelNextTick(this._dragStartId); // Unbind events
  56618. if (this.nativeDraggable) {
  56619. off(document, 'drop', this);
  56620. off(el, 'dragstart', this._onDragStart);
  56621. }
  56622. this._offMoveEvents();
  56623. this._offUpEvents();
  56624. if (Safari) {
  56625. css(document.body, 'user-select', '');
  56626. }
  56627. css(dragEl, 'transform', '');
  56628. if (evt) {
  56629. if (moved) {
  56630. evt.cancelable && evt.preventDefault();
  56631. !options.dropBubble && evt.stopPropagation();
  56632. }
  56633. ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
  56634. if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
  56635. // Remove clone(s)
  56636. cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
  56637. }
  56638. if (dragEl) {
  56639. if (this.nativeDraggable) {
  56640. off(dragEl, 'dragend', this);
  56641. }
  56642. _disableDraggable(dragEl);
  56643. dragEl.style['will-change'] = ''; // Remove classes
  56644. // ghostClass is added in dragStarted
  56645. if (moved && !awaitingDragStarted) {
  56646. toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
  56647. }
  56648. toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
  56649. _dispatchEvent({
  56650. sortable: this,
  56651. name: 'unchoose',
  56652. toEl: parentEl,
  56653. newIndex: null,
  56654. newDraggableIndex: null,
  56655. originalEvent: evt
  56656. });
  56657. if (rootEl !== parentEl) {
  56658. if (newIndex >= 0) {
  56659. // Add event
  56660. _dispatchEvent({
  56661. rootEl: parentEl,
  56662. name: 'add',
  56663. toEl: parentEl,
  56664. fromEl: rootEl,
  56665. originalEvent: evt
  56666. }); // Remove event
  56667. _dispatchEvent({
  56668. sortable: this,
  56669. name: 'remove',
  56670. toEl: parentEl,
  56671. originalEvent: evt
  56672. }); // drag from one list and drop into another
  56673. _dispatchEvent({
  56674. rootEl: parentEl,
  56675. name: 'sort',
  56676. toEl: parentEl,
  56677. fromEl: rootEl,
  56678. originalEvent: evt
  56679. });
  56680. _dispatchEvent({
  56681. sortable: this,
  56682. name: 'sort',
  56683. toEl: parentEl,
  56684. originalEvent: evt
  56685. });
  56686. }
  56687. putSortable && putSortable.save();
  56688. } else {
  56689. if (newIndex !== oldIndex) {
  56690. if (newIndex >= 0) {
  56691. // drag & drop within the same list
  56692. _dispatchEvent({
  56693. sortable: this,
  56694. name: 'update',
  56695. toEl: parentEl,
  56696. originalEvent: evt
  56697. });
  56698. _dispatchEvent({
  56699. sortable: this,
  56700. name: 'sort',
  56701. toEl: parentEl,
  56702. originalEvent: evt
  56703. });
  56704. }
  56705. }
  56706. }
  56707. if (Sortable.active) {
  56708. /* jshint eqnull:true */
  56709. if (newIndex == null || newIndex === -1) {
  56710. newIndex = oldIndex;
  56711. newDraggableIndex = oldDraggableIndex;
  56712. }
  56713. _dispatchEvent({
  56714. sortable: this,
  56715. name: 'end',
  56716. toEl: parentEl,
  56717. originalEvent: evt
  56718. }); // Save sorting
  56719. this.save();
  56720. }
  56721. }
  56722. }
  56723. this._nulling();
  56724. },
  56725. _nulling: function _nulling() {
  56726. pluginEvent('nulling', this);
  56727. rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
  56728. savedInputChecked.forEach(function (el) {
  56729. el.checked = true;
  56730. });
  56731. savedInputChecked.length = lastDx = lastDy = 0;
  56732. },
  56733. handleEvent: function handleEvent(
  56734. /**Event*/
  56735. evt) {
  56736. switch (evt.type) {
  56737. case 'drop':
  56738. case 'dragend':
  56739. this._onDrop(evt);
  56740. break;
  56741. case 'dragenter':
  56742. case 'dragover':
  56743. if (dragEl) {
  56744. this._onDragOver(evt);
  56745. _globalDragOver(evt);
  56746. }
  56747. break;
  56748. case 'selectstart':
  56749. evt.preventDefault();
  56750. break;
  56751. }
  56752. },
  56753. /**
  56754. * Serializes the item into an array of string.
  56755. * @returns {String[]}
  56756. */
  56757. toArray: function toArray() {
  56758. var order = [],
  56759. el,
  56760. children = this.el.children,
  56761. i = 0,
  56762. n = children.length,
  56763. options = this.options;
  56764. for (; i < n; i++) {
  56765. el = children[i];
  56766. if (closest(el, options.draggable, this.el, false)) {
  56767. order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
  56768. }
  56769. }
  56770. return order;
  56771. },
  56772. /**
  56773. * Sorts the elements according to the array.
  56774. * @param {String[]} order order of the items
  56775. */
  56776. sort: function sort(order) {
  56777. var items = {},
  56778. rootEl = this.el;
  56779. this.toArray().forEach(function (id, i) {
  56780. var el = rootEl.children[i];
  56781. if (closest(el, this.options.draggable, rootEl, false)) {
  56782. items[id] = el;
  56783. }
  56784. }, this);
  56785. order.forEach(function (id) {
  56786. if (items[id]) {
  56787. rootEl.removeChild(items[id]);
  56788. rootEl.appendChild(items[id]);
  56789. }
  56790. });
  56791. },
  56792. /**
  56793. * Save the current sorting
  56794. */
  56795. save: function save() {
  56796. var store = this.options.store;
  56797. store && store.set && store.set(this);
  56798. },
  56799. /**
  56800. * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
  56801. * @param {HTMLElement} el
  56802. * @param {String} [selector] default: `options.draggable`
  56803. * @returns {HTMLElement|null}
  56804. */
  56805. closest: function closest$1(el, selector) {
  56806. return closest(el, selector || this.options.draggable, this.el, false);
  56807. },
  56808. /**
  56809. * Set/get option
  56810. * @param {string} name
  56811. * @param {*} [value]
  56812. * @returns {*}
  56813. */
  56814. option: function option(name, value) {
  56815. var options = this.options;
  56816. if (value === void 0) {
  56817. return options[name];
  56818. } else {
  56819. var modifiedValue = PluginManager.modifyOption(this, name, value);
  56820. if (typeof modifiedValue !== 'undefined') {
  56821. options[name] = modifiedValue;
  56822. } else {
  56823. options[name] = value;
  56824. }
  56825. if (name === 'group') {
  56826. _prepareGroup(options);
  56827. }
  56828. }
  56829. },
  56830. /**
  56831. * Destroy
  56832. */
  56833. destroy: function destroy() {
  56834. pluginEvent('destroy', this);
  56835. var el = this.el;
  56836. el[expando] = null;
  56837. off(el, 'mousedown', this._onTapStart);
  56838. off(el, 'touchstart', this._onTapStart);
  56839. off(el, 'pointerdown', this._onTapStart);
  56840. if (this.nativeDraggable) {
  56841. off(el, 'dragover', this);
  56842. off(el, 'dragenter', this);
  56843. } // Remove draggable attributes
  56844. Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
  56845. el.removeAttribute('draggable');
  56846. });
  56847. this._onDrop();
  56848. this._disableDelayedDragEvents();
  56849. sortables.splice(sortables.indexOf(this.el), 1);
  56850. this.el = el = null;
  56851. },
  56852. _hideClone: function _hideClone() {
  56853. if (!cloneHidden) {
  56854. pluginEvent('hideClone', this);
  56855. if (Sortable.eventCanceled) return;
  56856. css(cloneEl, 'display', 'none');
  56857. if (this.options.removeCloneOnHide && cloneEl.parentNode) {
  56858. cloneEl.parentNode.removeChild(cloneEl);
  56859. }
  56860. cloneHidden = true;
  56861. }
  56862. },
  56863. _showClone: function _showClone(putSortable) {
  56864. if (putSortable.lastPutMode !== 'clone') {
  56865. this._hideClone();
  56866. return;
  56867. }
  56868. if (cloneHidden) {
  56869. pluginEvent('showClone', this);
  56870. if (Sortable.eventCanceled) return; // show clone at dragEl or original position
  56871. if (rootEl.contains(dragEl) && !this.options.group.revertClone) {
  56872. rootEl.insertBefore(cloneEl, dragEl);
  56873. } else if (nextEl) {
  56874. rootEl.insertBefore(cloneEl, nextEl);
  56875. } else {
  56876. rootEl.appendChild(cloneEl);
  56877. }
  56878. if (this.options.group.revertClone) {
  56879. this.animate(dragEl, cloneEl);
  56880. }
  56881. css(cloneEl, 'display', '');
  56882. cloneHidden = false;
  56883. }
  56884. }
  56885. };
  56886. function _globalDragOver(
  56887. /**Event*/
  56888. evt) {
  56889. if (evt.dataTransfer) {
  56890. evt.dataTransfer.dropEffect = 'move';
  56891. }
  56892. evt.cancelable && evt.preventDefault();
  56893. }
  56894. function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
  56895. var evt,
  56896. sortable = fromEl[expando],
  56897. onMoveFn = sortable.options.onMove,
  56898. retVal; // Support for new CustomEvent feature
  56899. if (window.CustomEvent && !IE11OrLess && !Edge) {
  56900. evt = new CustomEvent('move', {
  56901. bubbles: true,
  56902. cancelable: true
  56903. });
  56904. } else {
  56905. evt = document.createEvent('Event');
  56906. evt.initEvent('move', true, true);
  56907. }
  56908. evt.to = toEl;
  56909. evt.from = fromEl;
  56910. evt.dragged = dragEl;
  56911. evt.draggedRect = dragRect;
  56912. evt.related = targetEl || toEl;
  56913. evt.relatedRect = targetRect || getRect(toEl);
  56914. evt.willInsertAfter = willInsertAfter;
  56915. evt.originalEvent = originalEvent;
  56916. fromEl.dispatchEvent(evt);
  56917. if (onMoveFn) {
  56918. retVal = onMoveFn.call(sortable, evt, originalEvent);
  56919. }
  56920. return retVal;
  56921. }
  56922. function _disableDraggable(el) {
  56923. el.draggable = false;
  56924. }
  56925. function _unsilent() {
  56926. _silent = false;
  56927. }
  56928. function _ghostIsLast(evt, vertical, sortable) {
  56929. var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
  56930. var spacer = 10;
  56931. return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
  56932. }
  56933. function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
  56934. var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
  56935. targetLength = vertical ? targetRect.height : targetRect.width,
  56936. targetS1 = vertical ? targetRect.top : targetRect.left,
  56937. targetS2 = vertical ? targetRect.bottom : targetRect.right,
  56938. invert = false;
  56939. if (!invertSwap) {
  56940. // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
  56941. if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
  56942. // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
  56943. // check if past first invert threshold on side opposite of lastDirection
  56944. if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
  56945. // past first invert threshold, do not restrict inverted threshold to dragEl shadow
  56946. pastFirstInvertThresh = true;
  56947. }
  56948. if (!pastFirstInvertThresh) {
  56949. // dragEl shadow (target move distance shadow)
  56950. if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
  56951. : mouseOnAxis > targetS2 - targetMoveDistance) {
  56952. return -lastDirection;
  56953. }
  56954. } else {
  56955. invert = true;
  56956. }
  56957. } else {
  56958. // Regular
  56959. if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
  56960. return _getInsertDirection(target);
  56961. }
  56962. }
  56963. }
  56964. invert = invert || invertSwap;
  56965. if (invert) {
  56966. // Invert of regular
  56967. if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
  56968. return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
  56969. }
  56970. }
  56971. return 0;
  56972. }
  56973. /**
  56974. * Gets the direction dragEl must be swapped relative to target in order to make it
  56975. * seem that dragEl has been "inserted" into that element's position
  56976. * @param {HTMLElement} target The target whose position dragEl is being inserted at
  56977. * @return {Number} Direction dragEl must be swapped
  56978. */
  56979. function _getInsertDirection(target) {
  56980. if (index(dragEl) < index(target)) {
  56981. return 1;
  56982. } else {
  56983. return -1;
  56984. }
  56985. }
  56986. /**
  56987. * Generate id
  56988. * @param {HTMLElement} el
  56989. * @returns {String}
  56990. * @private
  56991. */
  56992. function _generateId(el) {
  56993. var str = el.tagName + el.className + el.src + el.href + el.textContent,
  56994. i = str.length,
  56995. sum = 0;
  56996. while (i--) {
  56997. sum += str.charCodeAt(i);
  56998. }
  56999. return sum.toString(36);
  57000. }
  57001. function _saveInputCheckedState(root) {
  57002. savedInputChecked.length = 0;
  57003. var inputs = root.getElementsByTagName('input');
  57004. var idx = inputs.length;
  57005. while (idx--) {
  57006. var el = inputs[idx];
  57007. el.checked && savedInputChecked.push(el);
  57008. }
  57009. }
  57010. function _nextTick(fn) {
  57011. return setTimeout(fn, 0);
  57012. }
  57013. function _cancelNextTick(id) {
  57014. return clearTimeout(id);
  57015. } // Fixed #973:
  57016. if (documentExists) {
  57017. on(document, 'touchmove', function (evt) {
  57018. if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
  57019. evt.preventDefault();
  57020. }
  57021. });
  57022. } // Export utils
  57023. Sortable.utils = {
  57024. on: on,
  57025. off: off,
  57026. css: css,
  57027. find: find,
  57028. is: function is(el, selector) {
  57029. return !!closest(el, selector, el, false);
  57030. },
  57031. extend: extend,
  57032. throttle: throttle,
  57033. closest: closest,
  57034. toggleClass: toggleClass,
  57035. clone: clone,
  57036. index: index,
  57037. nextTick: _nextTick,
  57038. cancelNextTick: _cancelNextTick,
  57039. detectDirection: _detectDirection,
  57040. getChild: getChild
  57041. };
  57042. /**
  57043. * Get the Sortable instance of an element
  57044. * @param {HTMLElement} element The element
  57045. * @return {Sortable|undefined} The instance of Sortable
  57046. */
  57047. Sortable.get = function (element) {
  57048. return element[expando];
  57049. };
  57050. /**
  57051. * Mount a plugin to Sortable
  57052. * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
  57053. */
  57054. Sortable.mount = function () {
  57055. for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
  57056. plugins[_key] = arguments[_key];
  57057. }
  57058. if (plugins[0].constructor === Array) plugins = plugins[0];
  57059. plugins.forEach(function (plugin) {
  57060. if (!plugin.prototype || !plugin.prototype.constructor) {
  57061. throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
  57062. }
  57063. if (plugin.utils) Sortable.utils = _objectSpread({}, Sortable.utils, plugin.utils);
  57064. PluginManager.mount(plugin);
  57065. });
  57066. };
  57067. /**
  57068. * Create sortable instance
  57069. * @param {HTMLElement} el
  57070. * @param {Object} [options]
  57071. */
  57072. Sortable.create = function (el, options) {
  57073. return new Sortable(el, options);
  57074. }; // Export
  57075. Sortable.version = version;
  57076. var autoScrolls = [],
  57077. scrollEl,
  57078. scrollRootEl,
  57079. scrolling = false,
  57080. lastAutoScrollX,
  57081. lastAutoScrollY,
  57082. touchEvt$1,
  57083. pointerElemChangedInterval;
  57084. function AutoScrollPlugin() {
  57085. function AutoScroll() {
  57086. this.defaults = {
  57087. scroll: true,
  57088. scrollSensitivity: 30,
  57089. scrollSpeed: 10,
  57090. bubbleScroll: true
  57091. }; // Bind all private methods
  57092. for (var fn in this) {
  57093. if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
  57094. this[fn] = this[fn].bind(this);
  57095. }
  57096. }
  57097. }
  57098. AutoScroll.prototype = {
  57099. dragStarted: function dragStarted(_ref) {
  57100. var originalEvent = _ref.originalEvent;
  57101. if (this.sortable.nativeDraggable) {
  57102. on(document, 'dragover', this._handleAutoScroll);
  57103. } else {
  57104. if (this.options.supportPointer) {
  57105. on(document, 'pointermove', this._handleFallbackAutoScroll);
  57106. } else if (originalEvent.touches) {
  57107. on(document, 'touchmove', this._handleFallbackAutoScroll);
  57108. } else {
  57109. on(document, 'mousemove', this._handleFallbackAutoScroll);
  57110. }
  57111. }
  57112. },
  57113. dragOverCompleted: function dragOverCompleted(_ref2) {
  57114. var originalEvent = _ref2.originalEvent;
  57115. // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
  57116. if (!this.options.dragOverBubble && !originalEvent.rootEl) {
  57117. this._handleAutoScroll(originalEvent);
  57118. }
  57119. },
  57120. drop: function drop() {
  57121. if (this.sortable.nativeDraggable) {
  57122. off(document, 'dragover', this._handleAutoScroll);
  57123. } else {
  57124. off(document, 'pointermove', this._handleFallbackAutoScroll);
  57125. off(document, 'touchmove', this._handleFallbackAutoScroll);
  57126. off(document, 'mousemove', this._handleFallbackAutoScroll);
  57127. }
  57128. clearPointerElemChangedInterval();
  57129. clearAutoScrolls();
  57130. cancelThrottle();
  57131. },
  57132. nulling: function nulling() {
  57133. touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
  57134. autoScrolls.length = 0;
  57135. },
  57136. _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
  57137. this._handleAutoScroll(evt, true);
  57138. },
  57139. _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
  57140. var _this = this;
  57141. var x = (evt.touches ? evt.touches[0] : evt).clientX,
  57142. y = (evt.touches ? evt.touches[0] : evt).clientY,
  57143. elem = document.elementFromPoint(x, y);
  57144. touchEvt$1 = evt; // IE does not seem to have native autoscroll,
  57145. // Edge's autoscroll seems too conditional,
  57146. // MACOS Safari does not have autoscroll,
  57147. // Firefox and Chrome are good
  57148. if (fallback || Edge || IE11OrLess || Safari) {
  57149. autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
  57150. var ogElemScroller = getParentAutoScrollElement(elem, true);
  57151. if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
  57152. pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
  57153. pointerElemChangedInterval = setInterval(function () {
  57154. var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
  57155. if (newElem !== ogElemScroller) {
  57156. ogElemScroller = newElem;
  57157. clearAutoScrolls();
  57158. }
  57159. autoScroll(evt, _this.options, newElem, fallback);
  57160. }, 10);
  57161. lastAutoScrollX = x;
  57162. lastAutoScrollY = y;
  57163. }
  57164. } else {
  57165. // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
  57166. if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
  57167. clearAutoScrolls();
  57168. return;
  57169. }
  57170. autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
  57171. }
  57172. }
  57173. };
  57174. return _extends(AutoScroll, {
  57175. pluginName: 'scroll',
  57176. initializeByDefault: true
  57177. });
  57178. }
  57179. function clearAutoScrolls() {
  57180. autoScrolls.forEach(function (autoScroll) {
  57181. clearInterval(autoScroll.pid);
  57182. });
  57183. autoScrolls = [];
  57184. }
  57185. function clearPointerElemChangedInterval() {
  57186. clearInterval(pointerElemChangedInterval);
  57187. }
  57188. var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
  57189. // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
  57190. if (!options.scroll) return;
  57191. var x = (evt.touches ? evt.touches[0] : evt).clientX,
  57192. y = (evt.touches ? evt.touches[0] : evt).clientY,
  57193. sens = options.scrollSensitivity,
  57194. speed = options.scrollSpeed,
  57195. winScroller = getWindowScrollingElement();
  57196. var scrollThisInstance = false,
  57197. scrollCustomFn; // New scroll root, set scrollEl
  57198. if (scrollRootEl !== rootEl) {
  57199. scrollRootEl = rootEl;
  57200. clearAutoScrolls();
  57201. scrollEl = options.scroll;
  57202. scrollCustomFn = options.scrollFn;
  57203. if (scrollEl === true) {
  57204. scrollEl = getParentAutoScrollElement(rootEl, true);
  57205. }
  57206. }
  57207. var layersOut = 0;
  57208. var currentParent = scrollEl;
  57209. do {
  57210. var el = currentParent,
  57211. rect = getRect(el),
  57212. top = rect.top,
  57213. bottom = rect.bottom,
  57214. left = rect.left,
  57215. right = rect.right,
  57216. width = rect.width,
  57217. height = rect.height,
  57218. canScrollX = void 0,
  57219. canScrollY = void 0,
  57220. scrollWidth = el.scrollWidth,
  57221. scrollHeight = el.scrollHeight,
  57222. elCSS = css(el),
  57223. scrollPosX = el.scrollLeft,
  57224. scrollPosY = el.scrollTop;
  57225. if (el === winScroller) {
  57226. canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
  57227. canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
  57228. } else {
  57229. canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
  57230. canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
  57231. }
  57232. var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
  57233. var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
  57234. if (!autoScrolls[layersOut]) {
  57235. for (var i = 0; i <= layersOut; i++) {
  57236. if (!autoScrolls[i]) {
  57237. autoScrolls[i] = {};
  57238. }
  57239. }
  57240. }
  57241. if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
  57242. autoScrolls[layersOut].el = el;
  57243. autoScrolls[layersOut].vx = vx;
  57244. autoScrolls[layersOut].vy = vy;
  57245. clearInterval(autoScrolls[layersOut].pid);
  57246. if (vx != 0 || vy != 0) {
  57247. scrollThisInstance = true;
  57248. /* jshint loopfunc:true */
  57249. autoScrolls[layersOut].pid = setInterval(function () {
  57250. // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
  57251. if (isFallback && this.layer === 0) {
  57252. Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
  57253. }
  57254. var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
  57255. var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
  57256. if (typeof scrollCustomFn === 'function') {
  57257. if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
  57258. return;
  57259. }
  57260. }
  57261. scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
  57262. }.bind({
  57263. layer: layersOut
  57264. }), 24);
  57265. }
  57266. }
  57267. layersOut++;
  57268. } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
  57269. scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
  57270. }, 30);
  57271. var drop = function drop(_ref) {
  57272. var originalEvent = _ref.originalEvent,
  57273. putSortable = _ref.putSortable,
  57274. dragEl = _ref.dragEl,
  57275. activeSortable = _ref.activeSortable,
  57276. dispatchSortableEvent = _ref.dispatchSortableEvent,
  57277. hideGhostForTarget = _ref.hideGhostForTarget,
  57278. unhideGhostForTarget = _ref.unhideGhostForTarget;
  57279. if (!originalEvent) return;
  57280. var toSortable = putSortable || activeSortable;
  57281. hideGhostForTarget();
  57282. var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
  57283. var target = document.elementFromPoint(touch.clientX, touch.clientY);
  57284. unhideGhostForTarget();
  57285. if (toSortable && !toSortable.el.contains(target)) {
  57286. dispatchSortableEvent('spill');
  57287. this.onSpill({
  57288. dragEl: dragEl,
  57289. putSortable: putSortable
  57290. });
  57291. }
  57292. };
  57293. function Revert() {}
  57294. Revert.prototype = {
  57295. startIndex: null,
  57296. dragStart: function dragStart(_ref2) {
  57297. var oldDraggableIndex = _ref2.oldDraggableIndex;
  57298. this.startIndex = oldDraggableIndex;
  57299. },
  57300. onSpill: function onSpill(_ref3) {
  57301. var dragEl = _ref3.dragEl,
  57302. putSortable = _ref3.putSortable;
  57303. this.sortable.captureAnimationState();
  57304. if (putSortable) {
  57305. putSortable.captureAnimationState();
  57306. }
  57307. var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
  57308. if (nextSibling) {
  57309. this.sortable.el.insertBefore(dragEl, nextSibling);
  57310. } else {
  57311. this.sortable.el.appendChild(dragEl);
  57312. }
  57313. this.sortable.animateAll();
  57314. if (putSortable) {
  57315. putSortable.animateAll();
  57316. }
  57317. },
  57318. drop: drop
  57319. };
  57320. _extends(Revert, {
  57321. pluginName: 'revertOnSpill'
  57322. });
  57323. function Remove() {}
  57324. Remove.prototype = {
  57325. onSpill: function onSpill(_ref4) {
  57326. var dragEl = _ref4.dragEl,
  57327. putSortable = _ref4.putSortable;
  57328. var parentSortable = putSortable || this.sortable;
  57329. parentSortable.captureAnimationState();
  57330. dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
  57331. parentSortable.animateAll();
  57332. },
  57333. drop: drop
  57334. };
  57335. _extends(Remove, {
  57336. pluginName: 'removeOnSpill'
  57337. });
  57338. var lastSwapEl;
  57339. function SwapPlugin() {
  57340. function Swap() {
  57341. this.defaults = {
  57342. swapClass: 'sortable-swap-highlight'
  57343. };
  57344. }
  57345. Swap.prototype = {
  57346. dragStart: function dragStart(_ref) {
  57347. var dragEl = _ref.dragEl;
  57348. lastSwapEl = dragEl;
  57349. },
  57350. dragOverValid: function dragOverValid(_ref2) {
  57351. var completed = _ref2.completed,
  57352. target = _ref2.target,
  57353. onMove = _ref2.onMove,
  57354. activeSortable = _ref2.activeSortable,
  57355. changed = _ref2.changed,
  57356. cancel = _ref2.cancel;
  57357. if (!activeSortable.options.swap) return;
  57358. var el = this.sortable.el,
  57359. options = this.options;
  57360. if (target && target !== el) {
  57361. var prevSwapEl = lastSwapEl;
  57362. if (onMove(target) !== false) {
  57363. toggleClass(target, options.swapClass, true);
  57364. lastSwapEl = target;
  57365. } else {
  57366. lastSwapEl = null;
  57367. }
  57368. if (prevSwapEl && prevSwapEl !== lastSwapEl) {
  57369. toggleClass(prevSwapEl, options.swapClass, false);
  57370. }
  57371. }
  57372. changed();
  57373. completed(true);
  57374. cancel();
  57375. },
  57376. drop: function drop(_ref3) {
  57377. var activeSortable = _ref3.activeSortable,
  57378. putSortable = _ref3.putSortable,
  57379. dragEl = _ref3.dragEl;
  57380. var toSortable = putSortable || this.sortable;
  57381. var options = this.options;
  57382. lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
  57383. if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
  57384. if (dragEl !== lastSwapEl) {
  57385. toSortable.captureAnimationState();
  57386. if (toSortable !== activeSortable) activeSortable.captureAnimationState();
  57387. swapNodes(dragEl, lastSwapEl);
  57388. toSortable.animateAll();
  57389. if (toSortable !== activeSortable) activeSortable.animateAll();
  57390. }
  57391. }
  57392. },
  57393. nulling: function nulling() {
  57394. lastSwapEl = null;
  57395. }
  57396. };
  57397. return _extends(Swap, {
  57398. pluginName: 'swap',
  57399. eventProperties: function eventProperties() {
  57400. return {
  57401. swapItem: lastSwapEl
  57402. };
  57403. }
  57404. });
  57405. }
  57406. function swapNodes(n1, n2) {
  57407. var p1 = n1.parentNode,
  57408. p2 = n2.parentNode,
  57409. i1,
  57410. i2;
  57411. if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;
  57412. i1 = index(n1);
  57413. i2 = index(n2);
  57414. if (p1.isEqualNode(p2) && i1 < i2) {
  57415. i2++;
  57416. }
  57417. p1.insertBefore(n2, p1.children[i1]);
  57418. p2.insertBefore(n1, p2.children[i2]);
  57419. }
  57420. var multiDragElements = [],
  57421. multiDragClones = [],
  57422. lastMultiDragSelect,
  57423. // for selection with modifier key down (SHIFT)
  57424. multiDragSortable,
  57425. initialFolding = false,
  57426. // Initial multi-drag fold when drag started
  57427. folding = false,
  57428. // Folding any other time
  57429. dragStarted = false,
  57430. dragEl$1,
  57431. clonesFromRect,
  57432. clonesHidden;
  57433. function MultiDragPlugin() {
  57434. function MultiDrag(sortable) {
  57435. // Bind all private methods
  57436. for (var fn in this) {
  57437. if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
  57438. this[fn] = this[fn].bind(this);
  57439. }
  57440. }
  57441. if (sortable.options.supportPointer) {
  57442. on(document, 'pointerup', this._deselectMultiDrag);
  57443. } else {
  57444. on(document, 'mouseup', this._deselectMultiDrag);
  57445. on(document, 'touchend', this._deselectMultiDrag);
  57446. }
  57447. on(document, 'keydown', this._checkKeyDown);
  57448. on(document, 'keyup', this._checkKeyUp);
  57449. this.defaults = {
  57450. selectedClass: 'sortable-selected',
  57451. multiDragKey: null,
  57452. setData: function setData(dataTransfer, dragEl) {
  57453. var data = '';
  57454. if (multiDragElements.length && multiDragSortable === sortable) {
  57455. multiDragElements.forEach(function (multiDragElement, i) {
  57456. data += (!i ? '' : ', ') + multiDragElement.textContent;
  57457. });
  57458. } else {
  57459. data = dragEl.textContent;
  57460. }
  57461. dataTransfer.setData('Text', data);
  57462. }
  57463. };
  57464. }
  57465. MultiDrag.prototype = {
  57466. multiDragKeyDown: false,
  57467. isMultiDrag: false,
  57468. delayStartGlobal: function delayStartGlobal(_ref) {
  57469. var dragged = _ref.dragEl;
  57470. dragEl$1 = dragged;
  57471. },
  57472. delayEnded: function delayEnded() {
  57473. this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
  57474. },
  57475. setupClone: function setupClone(_ref2) {
  57476. var sortable = _ref2.sortable,
  57477. cancel = _ref2.cancel;
  57478. if (!this.isMultiDrag) return;
  57479. for (var i = 0; i < multiDragElements.length; i++) {
  57480. multiDragClones.push(clone(multiDragElements[i]));
  57481. multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
  57482. multiDragClones[i].draggable = false;
  57483. multiDragClones[i].style['will-change'] = '';
  57484. toggleClass(multiDragClones[i], this.options.selectedClass, false);
  57485. multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);
  57486. }
  57487. sortable._hideClone();
  57488. cancel();
  57489. },
  57490. clone: function clone(_ref3) {
  57491. var sortable = _ref3.sortable,
  57492. rootEl = _ref3.rootEl,
  57493. dispatchSortableEvent = _ref3.dispatchSortableEvent,
  57494. cancel = _ref3.cancel;
  57495. if (!this.isMultiDrag) return;
  57496. if (!this.options.removeCloneOnHide) {
  57497. if (multiDragElements.length && multiDragSortable === sortable) {
  57498. insertMultiDragClones(true, rootEl);
  57499. dispatchSortableEvent('clone');
  57500. cancel();
  57501. }
  57502. }
  57503. },
  57504. showClone: function showClone(_ref4) {
  57505. var cloneNowShown = _ref4.cloneNowShown,
  57506. rootEl = _ref4.rootEl,
  57507. cancel = _ref4.cancel;
  57508. if (!this.isMultiDrag) return;
  57509. insertMultiDragClones(false, rootEl);
  57510. multiDragClones.forEach(function (clone) {
  57511. css(clone, 'display', '');
  57512. });
  57513. cloneNowShown();
  57514. clonesHidden = false;
  57515. cancel();
  57516. },
  57517. hideClone: function hideClone(_ref5) {
  57518. var _this = this;
  57519. var sortable = _ref5.sortable,
  57520. cloneNowHidden = _ref5.cloneNowHidden,
  57521. cancel = _ref5.cancel;
  57522. if (!this.isMultiDrag) return;
  57523. multiDragClones.forEach(function (clone) {
  57524. css(clone, 'display', 'none');
  57525. if (_this.options.removeCloneOnHide && clone.parentNode) {
  57526. clone.parentNode.removeChild(clone);
  57527. }
  57528. });
  57529. cloneNowHidden();
  57530. clonesHidden = true;
  57531. cancel();
  57532. },
  57533. dragStartGlobal: function dragStartGlobal(_ref6) {
  57534. var sortable = _ref6.sortable;
  57535. if (!this.isMultiDrag && multiDragSortable) {
  57536. multiDragSortable.multiDrag._deselectMultiDrag();
  57537. }
  57538. multiDragElements.forEach(function (multiDragElement) {
  57539. multiDragElement.sortableIndex = index(multiDragElement);
  57540. }); // Sort multi-drag elements
  57541. multiDragElements = multiDragElements.sort(function (a, b) {
  57542. return a.sortableIndex - b.sortableIndex;
  57543. });
  57544. dragStarted = true;
  57545. },
  57546. dragStarted: function dragStarted(_ref7) {
  57547. var _this2 = this;
  57548. var sortable = _ref7.sortable;
  57549. if (!this.isMultiDrag) return;
  57550. if (this.options.sort) {
  57551. // Capture rects,
  57552. // hide multi drag elements (by positioning them absolute),
  57553. // set multi drag elements rects to dragRect,
  57554. // show multi drag elements,
  57555. // animate to rects,
  57556. // unset rects & remove from DOM
  57557. sortable.captureAnimationState();
  57558. if (this.options.animation) {
  57559. multiDragElements.forEach(function (multiDragElement) {
  57560. if (multiDragElement === dragEl$1) return;
  57561. css(multiDragElement, 'position', 'absolute');
  57562. });
  57563. var dragRect = getRect(dragEl$1, false, true, true);
  57564. multiDragElements.forEach(function (multiDragElement) {
  57565. if (multiDragElement === dragEl$1) return;
  57566. setRect(multiDragElement, dragRect);
  57567. });
  57568. folding = true;
  57569. initialFolding = true;
  57570. }
  57571. }
  57572. sortable.animateAll(function () {
  57573. folding = false;
  57574. initialFolding = false;
  57575. if (_this2.options.animation) {
  57576. multiDragElements.forEach(function (multiDragElement) {
  57577. unsetRect(multiDragElement);
  57578. });
  57579. } // Remove all auxiliary multidrag items from el, if sorting enabled
  57580. if (_this2.options.sort) {
  57581. removeMultiDragElements();
  57582. }
  57583. });
  57584. },
  57585. dragOver: function dragOver(_ref8) {
  57586. var target = _ref8.target,
  57587. completed = _ref8.completed,
  57588. cancel = _ref8.cancel;
  57589. if (folding && ~multiDragElements.indexOf(target)) {
  57590. completed(false);
  57591. cancel();
  57592. }
  57593. },
  57594. revert: function revert(_ref9) {
  57595. var fromSortable = _ref9.fromSortable,
  57596. rootEl = _ref9.rootEl,
  57597. sortable = _ref9.sortable,
  57598. dragRect = _ref9.dragRect;
  57599. if (multiDragElements.length > 1) {
  57600. // Setup unfold animation
  57601. multiDragElements.forEach(function (multiDragElement) {
  57602. sortable.addAnimationState({
  57603. target: multiDragElement,
  57604. rect: folding ? getRect(multiDragElement) : dragRect
  57605. });
  57606. unsetRect(multiDragElement);
  57607. multiDragElement.fromRect = dragRect;
  57608. fromSortable.removeAnimationState(multiDragElement);
  57609. });
  57610. folding = false;
  57611. insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);
  57612. }
  57613. },
  57614. dragOverCompleted: function dragOverCompleted(_ref10) {
  57615. var sortable = _ref10.sortable,
  57616. isOwner = _ref10.isOwner,
  57617. insertion = _ref10.insertion,
  57618. activeSortable = _ref10.activeSortable,
  57619. parentEl = _ref10.parentEl,
  57620. putSortable = _ref10.putSortable;
  57621. var options = this.options;
  57622. if (insertion) {
  57623. // Clones must be hidden before folding animation to capture dragRectAbsolute properly
  57624. if (isOwner) {
  57625. activeSortable._hideClone();
  57626. }
  57627. initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location
  57628. if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
  57629. // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
  57630. var dragRectAbsolute = getRect(dragEl$1, false, true, true);
  57631. multiDragElements.forEach(function (multiDragElement) {
  57632. if (multiDragElement === dragEl$1) return;
  57633. setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
  57634. // while folding, and so that we can capture them again because old sortable will no longer be fromSortable
  57635. parentEl.appendChild(multiDragElement);
  57636. });
  57637. folding = true;
  57638. } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
  57639. if (!isOwner) {
  57640. // Only remove if not folding (folding will remove them anyways)
  57641. if (!folding) {
  57642. removeMultiDragElements();
  57643. }
  57644. if (multiDragElements.length > 1) {
  57645. var clonesHiddenBefore = clonesHidden;
  57646. activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden
  57647. if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
  57648. multiDragClones.forEach(function (clone) {
  57649. activeSortable.addAnimationState({
  57650. target: clone,
  57651. rect: clonesFromRect
  57652. });
  57653. clone.fromRect = clonesFromRect;
  57654. clone.thisAnimationDuration = null;
  57655. });
  57656. }
  57657. } else {
  57658. activeSortable._showClone(sortable);
  57659. }
  57660. }
  57661. }
  57662. },
  57663. dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
  57664. var dragRect = _ref11.dragRect,
  57665. isOwner = _ref11.isOwner,
  57666. activeSortable = _ref11.activeSortable;
  57667. multiDragElements.forEach(function (multiDragElement) {
  57668. multiDragElement.thisAnimationDuration = null;
  57669. });
  57670. if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
  57671. clonesFromRect = _extends({}, dragRect);
  57672. var dragMatrix = matrix(dragEl$1, true);
  57673. clonesFromRect.top -= dragMatrix.f;
  57674. clonesFromRect.left -= dragMatrix.e;
  57675. }
  57676. },
  57677. dragOverAnimationComplete: function dragOverAnimationComplete() {
  57678. if (folding) {
  57679. folding = false;
  57680. removeMultiDragElements();
  57681. }
  57682. },
  57683. drop: function drop(_ref12) {
  57684. var evt = _ref12.originalEvent,
  57685. rootEl = _ref12.rootEl,
  57686. parentEl = _ref12.parentEl,
  57687. sortable = _ref12.sortable,
  57688. dispatchSortableEvent = _ref12.dispatchSortableEvent,
  57689. oldIndex = _ref12.oldIndex,
  57690. putSortable = _ref12.putSortable;
  57691. var toSortable = putSortable || this.sortable;
  57692. if (!evt) return;
  57693. var options = this.options,
  57694. children = parentEl.children; // Multi-drag selection
  57695. if (!dragStarted) {
  57696. if (options.multiDragKey && !this.multiDragKeyDown) {
  57697. this._deselectMultiDrag();
  57698. }
  57699. toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
  57700. if (!~multiDragElements.indexOf(dragEl$1)) {
  57701. multiDragElements.push(dragEl$1);
  57702. dispatchEvent({
  57703. sortable: sortable,
  57704. rootEl: rootEl,
  57705. name: 'select',
  57706. targetEl: dragEl$1,
  57707. originalEvt: evt
  57708. }); // Modifier activated, select from last to dragEl
  57709. if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
  57710. var lastIndex = index(lastMultiDragSelect),
  57711. currentIndex = index(dragEl$1);
  57712. if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
  57713. // Must include lastMultiDragSelect (select it), in case modified selection from no selection
  57714. // (but previous selection existed)
  57715. var n, i;
  57716. if (currentIndex > lastIndex) {
  57717. i = lastIndex;
  57718. n = currentIndex;
  57719. } else {
  57720. i = currentIndex;
  57721. n = lastIndex + 1;
  57722. }
  57723. for (; i < n; i++) {
  57724. if (~multiDragElements.indexOf(children[i])) continue;
  57725. toggleClass(children[i], options.selectedClass, true);
  57726. multiDragElements.push(children[i]);
  57727. dispatchEvent({
  57728. sortable: sortable,
  57729. rootEl: rootEl,
  57730. name: 'select',
  57731. targetEl: children[i],
  57732. originalEvt: evt
  57733. });
  57734. }
  57735. }
  57736. } else {
  57737. lastMultiDragSelect = dragEl$1;
  57738. }
  57739. multiDragSortable = toSortable;
  57740. } else {
  57741. multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
  57742. lastMultiDragSelect = null;
  57743. dispatchEvent({
  57744. sortable: sortable,
  57745. rootEl: rootEl,
  57746. name: 'deselect',
  57747. targetEl: dragEl$1,
  57748. originalEvt: evt
  57749. });
  57750. }
  57751. } // Multi-drag drop
  57752. if (dragStarted && this.isMultiDrag) {
  57753. // Do not "unfold" after around dragEl if reverted
  57754. if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
  57755. var dragRect = getRect(dragEl$1),
  57756. multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
  57757. if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
  57758. toSortable.captureAnimationState();
  57759. if (!initialFolding) {
  57760. if (options.animation) {
  57761. dragEl$1.fromRect = dragRect;
  57762. multiDragElements.forEach(function (multiDragElement) {
  57763. multiDragElement.thisAnimationDuration = null;
  57764. if (multiDragElement !== dragEl$1) {
  57765. var rect = folding ? getRect(multiDragElement) : dragRect;
  57766. multiDragElement.fromRect = rect; // Prepare unfold animation
  57767. toSortable.addAnimationState({
  57768. target: multiDragElement,
  57769. rect: rect
  57770. });
  57771. }
  57772. });
  57773. } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
  57774. // properly they must all be removed
  57775. removeMultiDragElements();
  57776. multiDragElements.forEach(function (multiDragElement) {
  57777. if (children[multiDragIndex]) {
  57778. parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
  57779. } else {
  57780. parentEl.appendChild(multiDragElement);
  57781. }
  57782. multiDragIndex++;
  57783. }); // If initial folding is done, the elements may have changed position because they are now
  57784. // unfolding around dragEl, even though dragEl may not have his index changed, so update event
  57785. // must be fired here as Sortable will not.
  57786. if (oldIndex === index(dragEl$1)) {
  57787. var update = false;
  57788. multiDragElements.forEach(function (multiDragElement) {
  57789. if (multiDragElement.sortableIndex !== index(multiDragElement)) {
  57790. update = true;
  57791. return;
  57792. }
  57793. });
  57794. if (update) {
  57795. dispatchSortableEvent('update');
  57796. }
  57797. }
  57798. } // Must be done after capturing individual rects (scroll bar)
  57799. multiDragElements.forEach(function (multiDragElement) {
  57800. unsetRect(multiDragElement);
  57801. });
  57802. toSortable.animateAll();
  57803. }
  57804. multiDragSortable = toSortable;
  57805. } // Remove clones if necessary
  57806. if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
  57807. multiDragClones.forEach(function (clone) {
  57808. clone.parentNode && clone.parentNode.removeChild(clone);
  57809. });
  57810. }
  57811. },
  57812. nullingGlobal: function nullingGlobal() {
  57813. this.isMultiDrag = dragStarted = false;
  57814. multiDragClones.length = 0;
  57815. },
  57816. destroyGlobal: function destroyGlobal() {
  57817. this._deselectMultiDrag();
  57818. off(document, 'pointerup', this._deselectMultiDrag);
  57819. off(document, 'mouseup', this._deselectMultiDrag);
  57820. off(document, 'touchend', this._deselectMultiDrag);
  57821. off(document, 'keydown', this._checkKeyDown);
  57822. off(document, 'keyup', this._checkKeyUp);
  57823. },
  57824. _deselectMultiDrag: function _deselectMultiDrag(evt) {
  57825. if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable
  57826. if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable
  57827. if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click
  57828. if (evt && evt.button !== 0) return;
  57829. while (multiDragElements.length) {
  57830. var el = multiDragElements[0];
  57831. toggleClass(el, this.options.selectedClass, false);
  57832. multiDragElements.shift();
  57833. dispatchEvent({
  57834. sortable: this.sortable,
  57835. rootEl: this.sortable.el,
  57836. name: 'deselect',
  57837. targetEl: el,
  57838. originalEvt: evt
  57839. });
  57840. }
  57841. },
  57842. _checkKeyDown: function _checkKeyDown(evt) {
  57843. if (evt.key === this.options.multiDragKey) {
  57844. this.multiDragKeyDown = true;
  57845. }
  57846. },
  57847. _checkKeyUp: function _checkKeyUp(evt) {
  57848. if (evt.key === this.options.multiDragKey) {
  57849. this.multiDragKeyDown = false;
  57850. }
  57851. }
  57852. };
  57853. return _extends(MultiDrag, {
  57854. // Static methods & properties
  57855. pluginName: 'multiDrag',
  57856. utils: {
  57857. /**
  57858. * Selects the provided multi-drag item
  57859. * @param {HTMLElement} el The element to be selected
  57860. */
  57861. select: function select(el) {
  57862. var sortable = el.parentNode[expando];
  57863. if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
  57864. if (multiDragSortable && multiDragSortable !== sortable) {
  57865. multiDragSortable.multiDrag._deselectMultiDrag();
  57866. multiDragSortable = sortable;
  57867. }
  57868. toggleClass(el, sortable.options.selectedClass, true);
  57869. multiDragElements.push(el);
  57870. },
  57871. /**
  57872. * Deselects the provided multi-drag item
  57873. * @param {HTMLElement} el The element to be deselected
  57874. */
  57875. deselect: function deselect(el) {
  57876. var sortable = el.parentNode[expando],
  57877. index = multiDragElements.indexOf(el);
  57878. if (!sortable || !sortable.options.multiDrag || !~index) return;
  57879. toggleClass(el, sortable.options.selectedClass, false);
  57880. multiDragElements.splice(index, 1);
  57881. }
  57882. },
  57883. eventProperties: function eventProperties() {
  57884. var _this3 = this;
  57885. var oldIndicies = [],
  57886. newIndicies = [];
  57887. multiDragElements.forEach(function (multiDragElement) {
  57888. oldIndicies.push({
  57889. multiDragElement: multiDragElement,
  57890. index: multiDragElement.sortableIndex
  57891. }); // multiDragElements will already be sorted if folding
  57892. var newIndex;
  57893. if (folding && multiDragElement !== dragEl$1) {
  57894. newIndex = -1;
  57895. } else if (folding) {
  57896. newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');
  57897. } else {
  57898. newIndex = index(multiDragElement);
  57899. }
  57900. newIndicies.push({
  57901. multiDragElement: multiDragElement,
  57902. index: newIndex
  57903. });
  57904. });
  57905. return {
  57906. items: _toConsumableArray(multiDragElements),
  57907. clones: [].concat(multiDragClones),
  57908. oldIndicies: oldIndicies,
  57909. newIndicies: newIndicies
  57910. };
  57911. },
  57912. optionListeners: {
  57913. multiDragKey: function multiDragKey(key) {
  57914. key = key.toLowerCase();
  57915. if (key === 'ctrl') {
  57916. key = 'Control';
  57917. } else if (key.length > 1) {
  57918. key = key.charAt(0).toUpperCase() + key.substr(1);
  57919. }
  57920. return key;
  57921. }
  57922. }
  57923. });
  57924. }
  57925. function insertMultiDragElements(clonesInserted, rootEl) {
  57926. multiDragElements.forEach(function (multiDragElement, i) {
  57927. var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
  57928. if (target) {
  57929. rootEl.insertBefore(multiDragElement, target);
  57930. } else {
  57931. rootEl.appendChild(multiDragElement);
  57932. }
  57933. });
  57934. }
  57935. /**
  57936. * Insert multi-drag clones
  57937. * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
  57938. * @param {HTMLElement} rootEl
  57939. */
  57940. function insertMultiDragClones(elementsInserted, rootEl) {
  57941. multiDragClones.forEach(function (clone, i) {
  57942. var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
  57943. if (target) {
  57944. rootEl.insertBefore(clone, target);
  57945. } else {
  57946. rootEl.appendChild(clone);
  57947. }
  57948. });
  57949. }
  57950. function removeMultiDragElements() {
  57951. multiDragElements.forEach(function (multiDragElement) {
  57952. if (multiDragElement === dragEl$1) return;
  57953. multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);
  57954. });
  57955. }
  57956. Sortable.mount(new AutoScrollPlugin());
  57957. Sortable.mount(Remove, Revert);
  57958. /* harmony default export */ __webpack_exports__["default"] = (Sortable);
  57959. /***/ }),
  57960. /* 138 */
  57961. /***/ (function(module, exports, __webpack_require__) {
  57962. // style-loader: Adds some css to the DOM by adding a <style> tag
  57963. // load the styles
  57964. var content = __webpack_require__(139);
  57965. if(typeof content === 'string') content = [[module.i, content, '']];
  57966. if(content.locals) module.exports = content.locals;
  57967. // add the styles to the DOM
  57968. var update = __webpack_require__(1)("f2cb592e", content, false, {});
  57969. // Hot Module Replacement
  57970. if(false) {
  57971. // When the styles change, update the <style> tags
  57972. if(!content.locals) {
  57973. module.hot.accept("!!../../../../../../../node_modules/css-loader/index.js!../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0c50b298\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./files.vue", function() {
  57974. var newContent = require("!!../../../../../../../node_modules/css-loader/index.js!../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-0c50b298\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./files.vue");
  57975. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  57976. update(newContent);
  57977. });
  57978. }
  57979. // When the module is disposed, remove the <style> tags
  57980. module.hot.dispose(function() { update(); });
  57981. }
  57982. /***/ }),
  57983. /* 139 */
  57984. /***/ (function(module, exports, __webpack_require__) {
  57985. exports = module.exports = __webpack_require__(0)(false);
  57986. // imports
  57987. // module
  57988. exports.push([module.i, "\n.project-task-file[data-v-0c50b298] {\n margin: 0 12px;\n}\n.project-task-file .tableFill[data-v-0c50b298] {\n margin: 12px 0 20px;\n}\n", ""]);
  57989. // exports
  57990. /***/ }),
  57991. /* 140 */
  57992. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  57993. "use strict";
  57994. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  57995. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(4);
  57996. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__);
  57997. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_clipboard2__ = __webpack_require__(141);
  57998. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_clipboard2___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_vue_clipboard2__);
  57999. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DrawerTabsContainer__ = __webpack_require__(7);
  58000. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__DrawerTabsContainer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__DrawerTabsContainer__);
  58001. //
  58002. //
  58003. //
  58004. //
  58005. //
  58006. //
  58007. //
  58008. //
  58009. //
  58010. //
  58011. //
  58012. //
  58013. //
  58014. //
  58015. //
  58016. //
  58017. //
  58018. //
  58019. //
  58020. //
  58021. //
  58022. //
  58023. //
  58024. //
  58025. //
  58026. //
  58027. //
  58028. //
  58029. //
  58030. //
  58031. //
  58032. //
  58033. //
  58034. //
  58035. //
  58036. //
  58037. //
  58038. //
  58039. //
  58040. //
  58041. //
  58042. //
  58043. //
  58044. //
  58045. //
  58046. //
  58047. //
  58048. //
  58049. //
  58050. //
  58051. //
  58052. //
  58053. //
  58054. //
  58055. //
  58056. //
  58057. //
  58058. //
  58059. //
  58060. //
  58061. __WEBPACK_IMPORTED_MODULE_0_vue___default.a.use(__WEBPACK_IMPORTED_MODULE_1_vue_clipboard2___default.a);
  58062. /* harmony default export */ __webpack_exports__["default"] = ({
  58063. name: 'ProjectTaskFiles',
  58064. components: { DrawerTabsContainer: __WEBPACK_IMPORTED_MODULE_2__DrawerTabsContainer___default.a },
  58065. props: {
  58066. projectid: {
  58067. default: 0
  58068. },
  58069. taskid: {
  58070. default: 0
  58071. },
  58072. canload: {
  58073. type: Boolean,
  58074. default: true
  58075. },
  58076. simple: {
  58077. type: Boolean,
  58078. default: false
  58079. }
  58080. },
  58081. data: function data() {
  58082. return {
  58083. keys: {},
  58084. sorts: { key: '', order: '' },
  58085. loadYet: false,
  58086. loadIng: 0,
  58087. columns: [],
  58088. lists: [],
  58089. listPage: 1,
  58090. listTotal: 0,
  58091. lastPage: 0,
  58092. noDataText: "",
  58093. uploadFormat: ['jpg', 'jpeg', 'png', 'gif', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'esp', 'pdf', 'rar', 'zip', 'gz', 'ai', 'avi', 'bmp', 'cdr', 'eps', 'mov', 'mp3', 'mp4', 'pr', 'psd', 'svg', 'tif'],
  58094. actionUrl: $A.apiUrl('project/files/upload'),
  58095. params: {
  58096. token: $A.getToken(),
  58097. taskid: this.taskid,
  58098. projectid: this.projectid
  58099. },
  58100. uploadList: [],
  58101. maxSize: 204800
  58102. };
  58103. },
  58104. mounted: function mounted() {
  58105. if (this.canload) {
  58106. this.loadYet = true;
  58107. this.getLists(true);
  58108. }
  58109. this.uploadList = this.$refs.upload.fileList;
  58110. },
  58111. watch: {
  58112. projectid: function projectid(val) {
  58113. if (this.loadYet) {
  58114. this.getLists(true);
  58115. }
  58116. this.$set(this.params, 'projectid', val);
  58117. },
  58118. taskid: function taskid(val) {
  58119. if (this.loadYet) {
  58120. this.getLists(true);
  58121. }
  58122. this.$set(this.params, 'taskid', val);
  58123. },
  58124. canload: function canload(val) {
  58125. if (val && !this.loadYet) {
  58126. this.loadYet = true;
  58127. this.getLists(true);
  58128. }
  58129. },
  58130. uploadList: function uploadList(files) {
  58131. var _this = this;
  58132. files.forEach(function (file) {
  58133. if (typeof file.username === "undefined") {
  58134. file.username = _this.usrName;
  58135. file.indate = Math.round(new Date().getTime() / 1000);
  58136. _this.lists.unshift(file);
  58137. _this.$emit('change', 'up');
  58138. }
  58139. });
  58140. }
  58141. },
  58142. methods: {
  58143. initLanguage: function initLanguage() {
  58144. var _this2 = this;
  58145. this.noDataText = this.$L("数据加载中.....");
  58146. var columns = [];
  58147. columns.push({
  58148. "title": "",
  58149. "width": 60,
  58150. render: function render(h, params) {
  58151. if (!params.row.thumb) {
  58152. return h('WLoading', {
  58153. style: {
  58154. width: "24px",
  58155. height: "24px",
  58156. verticalAlign: "middle"
  58157. }
  58158. });
  58159. }
  58160. var imgRender = h('img', {
  58161. style: {
  58162. width: "28px",
  58163. height: "28px",
  58164. display: "table"
  58165. },
  58166. attrs: {
  58167. src: params.row.thumb
  58168. }
  58169. });
  58170. if (['jpg', 'jpeg', 'png', 'gif'].indexOf(params.row.ext) !== -1) {
  58171. return h('Tooltip', {
  58172. props: {
  58173. transfer: true,
  58174. delay: 600,
  58175. maxWidth: 600
  58176. }
  58177. }, [imgRender, h('div', { slot: 'content' }, [h('img', {
  58178. style: {
  58179. maxWidth: "360px",
  58180. maxHeight: "360px",
  58181. display: "table",
  58182. margin: "3px 0"
  58183. },
  58184. attrs: {
  58185. src: params.row.path
  58186. }
  58187. })])]);
  58188. } else {
  58189. return imgRender;
  58190. }
  58191. }
  58192. });
  58193. columns.push({
  58194. "title": this.$L("文件名"),
  58195. "key": 'name',
  58196. "minWidth": 100,
  58197. "tooltip": true,
  58198. "sortable": true,
  58199. render: function render(h, params) {
  58200. var arr = [h('span', params.row.name)];
  58201. if (params.row.showProgress === true) {
  58202. arr.push(h('Progress', {
  58203. style: {
  58204. display: 'block',
  58205. marginTop: '-3px'
  58206. },
  58207. props: {
  58208. percent: parseFloat($A.runNum(params.row.percentage || 100, 2))
  58209. }
  58210. }));
  58211. }
  58212. return h('div', arr);
  58213. }
  58214. });
  58215. columns.push({
  58216. "title": this.$L("大小"),
  58217. "key": 'size',
  58218. "minWidth": 90,
  58219. "maxWidth": 120,
  58220. "align": "right",
  58221. "sortable": true,
  58222. render: function render(h, params) {
  58223. return h('span', $A.bytesToSize(params.row.size));
  58224. }
  58225. });
  58226. if (!this.simple) {
  58227. columns.push({
  58228. "title": this.$L("下载次数"),
  58229. "key": 'download',
  58230. "align": "center",
  58231. "sortable": true,
  58232. "width": 100
  58233. });
  58234. columns.push({
  58235. "title": this.$L("上传者"),
  58236. "key": 'username',
  58237. "minWidth": 90,
  58238. "maxWidth": 130,
  58239. "sortable": true,
  58240. render: function render(h, params) {
  58241. return h('UserView', {
  58242. props: {
  58243. username: params.row.username
  58244. }
  58245. });
  58246. }
  58247. });
  58248. columns.push({
  58249. "title": this.$L("上传时间"),
  58250. "key": 'indate',
  58251. "width": 160,
  58252. "sortable": true,
  58253. render: function render(h, params) {
  58254. return h('span', $A.formatDate("Y-m-d H:i:s", params.row.indate));
  58255. }
  58256. });
  58257. }
  58258. columns.push({
  58259. "title": " ",
  58260. "key": 'action',
  58261. "align": 'right',
  58262. "width": 120,
  58263. render: function render(h, params) {
  58264. if (!params.row.id) {
  58265. return null;
  58266. }
  58267. return h('div', [h('Tooltip', {
  58268. props: { content: _this2.$L('下载'), transfer: true, delay: 600 },
  58269. style: { position: 'relative' }
  58270. }, [h('Icon', {
  58271. props: { type: 'md-arrow-down', size: 16 },
  58272. style: { margin: '0 3px', cursor: 'pointer' }
  58273. }), h('a', {
  58274. style: { position: 'absolute', top: '0', left: '0', right: '0', bottom: '0', 'zIndex': 1 },
  58275. attrs: { href: $A.apiUrl('project/files/download?fileid=' + params.row.id), target: '_blank' },
  58276. on: {
  58277. click: function click() {
  58278. if (params.row.yetdown) {
  58279. return;
  58280. }
  58281. params.row.yetdown = 1;
  58282. _this2.$set(params.row, 'download', params.row.download + 1);
  58283. }
  58284. }
  58285. })]), h('Tooltip', {
  58286. props: { content: _this2.$L('重命名'), transfer: true, delay: 600 }
  58287. }, [h('Icon', {
  58288. props: { type: 'md-create', size: 16 },
  58289. style: { margin: '0 3px', cursor: 'pointer' },
  58290. on: {
  58291. click: function click() {
  58292. _this2.renameFile(params.row);
  58293. }
  58294. }
  58295. })]), h('Tooltip', {
  58296. props: { content: _this2.$L('复制链接'), transfer: true, delay: 600 }
  58297. }, [h('Icon', {
  58298. props: { type: 'md-link', size: 16 },
  58299. style: { margin: '0 3px', cursor: 'pointer', transform: 'rotate(-45deg)' },
  58300. on: {
  58301. click: function click() {
  58302. _this2.$copyText($A.apiUrl('project/files/download?fileid=' + params.row.id)).then(function () {
  58303. _this2.$Message.success(_this2.$L('复制成功!'));
  58304. }, function () {
  58305. _this2.$Message.error(_this2.$L('复制失败!'));
  58306. });
  58307. }
  58308. }
  58309. })]), h('Tooltip', {
  58310. props: { content: _this2.$L('删除'), transfer: true, delay: 600 }
  58311. }, [h('Icon', {
  58312. props: { type: 'md-trash', size: 16 },
  58313. style: { margin: '0 3px', cursor: 'pointer' },
  58314. on: {
  58315. click: function click() {
  58316. _this2.deleteFile(params.row);
  58317. }
  58318. }
  58319. })])]);
  58320. }
  58321. });
  58322. this.columns = columns;
  58323. },
  58324. sreachTab: function sreachTab(clear) {
  58325. if (clear === true) {
  58326. this.keys = {};
  58327. }
  58328. this.getLists(true);
  58329. },
  58330. sortChange: function sortChange(info) {
  58331. this.sorts = { key: info.key, order: info.order };
  58332. this.getLists(true);
  58333. },
  58334. setPage: function setPage(page) {
  58335. this.listPage = page;
  58336. this.getLists();
  58337. },
  58338. setPageSize: function setPageSize(size) {
  58339. if (Math.max($A.runNum(this.listPageSize), 10) != size) {
  58340. this.listPageSize = size;
  58341. this.getLists();
  58342. }
  58343. },
  58344. getLists: function getLists(resetLoad) {
  58345. var _this3 = this;
  58346. if (resetLoad === true) {
  58347. this.listPage = 1;
  58348. }
  58349. if (this.projectid == 0 && this.taskid == 0) {
  58350. this.lists = [];
  58351. this.listTotal = 0;
  58352. this.noDataText = this.$L("没有相关的文件");
  58353. return;
  58354. }
  58355. this.loadIng++;
  58356. var whereData = $A.cloneData(this.keys);
  58357. whereData.page = Math.max(this.listPage, 1);
  58358. whereData.pagesize = Math.max($A.runNum(this.listPageSize), 10);
  58359. whereData.projectid = this.projectid;
  58360. whereData.taskid = this.taskid;
  58361. whereData.sorts = this.sorts;
  58362. this.noDataText = this.$L("数据加载中.....");
  58363. $A.apiAjax({
  58364. url: 'project/files/lists',
  58365. data: whereData,
  58366. complete: function complete() {
  58367. _this3.loadIng--;
  58368. },
  58369. error: function error() {
  58370. _this3.noDataText = _this3.$L("数据加载失败!");
  58371. },
  58372. success: function success(res) {
  58373. if (res.ret === 1) {
  58374. _this3.lists = res.data.lists;
  58375. _this3.listTotal = res.data.total;
  58376. _this3.lastPage = res.data.lastPage;
  58377. _this3.noDataText = _this3.$L("没有相关的文件");
  58378. } else {
  58379. _this3.lists = [];
  58380. _this3.listTotal = 0;
  58381. _this3.lastPage = 0;
  58382. _this3.noDataText = res.msg;
  58383. }
  58384. }
  58385. });
  58386. },
  58387. renameFile: function renameFile(item) {
  58388. var _this4 = this;
  58389. this.renameValue = "";
  58390. this.$Modal.confirm({
  58391. render: function render(h) {
  58392. return h('div', [h('div', {
  58393. style: {
  58394. fontSize: '16px',
  58395. fontWeight: '500',
  58396. marginBottom: '20px'
  58397. }
  58398. }, _this4.$L('重命名文件名')), h('Input', {
  58399. props: {
  58400. value: _this4.renameValue,
  58401. autofocus: true,
  58402. placeholder: item.name || _this4.$L('请输入新的文件名称')
  58403. },
  58404. on: {
  58405. input: function input(val) {
  58406. _this4.renameValue = val;
  58407. }
  58408. }
  58409. })]);
  58410. },
  58411. loading: true,
  58412. onOk: function onOk() {
  58413. if (_this4.renameValue) {
  58414. var oldName = item.name;
  58415. var newName = _this4.renameValue;
  58416. if (!$A.rightExists(newName, '.' + item.ext)) {
  58417. newName += '.' + item.ext;
  58418. }
  58419. _this4.$set(item, 'name', newName);
  58420. $A.apiAjax({
  58421. url: 'project/files/rename',
  58422. data: {
  58423. fileid: item.id,
  58424. name: newName
  58425. },
  58426. error: function error() {
  58427. _this4.$Modal.remove();
  58428. _this4.$set(item, 'name', oldName);
  58429. alert(_this4.$L('网络繁忙,请稍后再试!'));
  58430. },
  58431. success: function success(res) {
  58432. _this4.$Modal.remove();
  58433. if (res.ret === 1) {
  58434. _this4.$set(item, 'name', res.data.name);
  58435. } else {
  58436. _this4.$Modal.error({ title: _this4.$L('温馨提示'), content: res.msg });
  58437. _this4.$set(item, 'name', oldName);
  58438. }
  58439. }
  58440. });
  58441. } else {
  58442. _this4.$Modal.remove();
  58443. }
  58444. }
  58445. });
  58446. },
  58447. deleteFile: function deleteFile(item) {
  58448. var _this5 = this;
  58449. this.$Modal.confirm({
  58450. title: this.$L('删除文件'),
  58451. content: this.$L('你确定要删除此文件吗?'),
  58452. loading: true,
  58453. onOk: function onOk() {
  58454. $A.apiAjax({
  58455. url: 'project/files/delete',
  58456. data: {
  58457. fileid: item.id
  58458. },
  58459. error: function error() {
  58460. _this5.$Modal.remove();
  58461. alert(_this5.$L('网络繁忙,请稍后再试!'));
  58462. },
  58463. success: function success(res) {
  58464. _this5.$Modal.remove();
  58465. _this5.lists.some(function (temp, index) {
  58466. if (temp.id == item.id) {
  58467. _this5.lists.splice(index, 1);
  58468. return true;
  58469. }
  58470. });
  58471. setTimeout(function () {
  58472. if (res.ret === 1) {
  58473. _this5.$Message.success(res.msg);
  58474. _this5.$emit('change', 'delete');
  58475. } else {
  58476. _this5.$Modal.error({ title: _this5.$L('温馨提示'), content: res.msg });
  58477. }
  58478. }, 350);
  58479. }
  58480. });
  58481. }
  58482. });
  58483. },
  58484. uploadHandleClick: function uploadHandleClick() {
  58485. this.$refs.upload.handleClick();
  58486. },
  58487. handleError: function handleError(error, html, file) {
  58488. var _this6 = this;
  58489. //上传失败
  58490. this.$Modal.warning({
  58491. title: this.$L('上传失败'),
  58492. content: this.$L('文件 % 上传失败,%', file.name, error)
  58493. });
  58494. this.$refs.upload.fileList.pop();
  58495. this.lists.some(function (item, index) {
  58496. if (item.uid == file.uid) {
  58497. _this6.lists.splice(index, 1);
  58498. return true;
  58499. }
  58500. });
  58501. this.$emit('change', 'error');
  58502. },
  58503. handleSuccess: function handleSuccess(res, file) {
  58504. var _this7 = this;
  58505. //上传完成
  58506. if (res.ret === 1) {
  58507. for (var key in res.data) {
  58508. if (res.data.hasOwnProperty(key)) {
  58509. file[key] = res.data[key];
  58510. }
  58511. }
  58512. this.$emit('change', 'add');
  58513. } else {
  58514. this.$Modal.warning({
  58515. title: this.$L('上传失败'),
  58516. content: this.$L('文件 % 上传失败,%', file.name, res.msg)
  58517. });
  58518. this.$refs.upload.fileList.pop();
  58519. this.lists.some(function (item, index) {
  58520. if (item.id == res.id) {
  58521. _this7.lists.splice(index, 1);
  58522. return true;
  58523. }
  58524. });
  58525. this.$emit('change', 'error');
  58526. }
  58527. this.uploadList = this.$refs.upload.fileList;
  58528. },
  58529. handleFormatError: function handleFormatError(file) {
  58530. //上传类型错误
  58531. this.$Modal.warning({
  58532. title: this.$L('文件格式不正确'),
  58533. content: this.$L('文件 % 格式不正确,仅支持上传:%', file.name, this.uploadFormat.join(','))
  58534. });
  58535. },
  58536. handleMaxSize: function handleMaxSize(file) {
  58537. //上传大小错误
  58538. this.$Modal.warning({
  58539. title: this.$L('超出文件大小限制'),
  58540. content: this.$L('文件 % 太大,不能超过%。', file.name, $A.bytesToSize(this.maxSize * 1024))
  58541. });
  58542. },
  58543. handleBeforeUpload: function handleBeforeUpload() {
  58544. //上传前判断
  58545. this.params = {
  58546. token: $A.getToken(),
  58547. taskid: this.taskid,
  58548. projectid: this.projectid
  58549. };
  58550. return true;
  58551. },
  58552. upload: function upload(file) {
  58553. //手动传file
  58554. if (this.handleBeforeUpload()) {
  58555. this.$refs.upload.upload(file);
  58556. }
  58557. }
  58558. }
  58559. });
  58560. /***/ }),
  58561. /* 141 */
  58562. /***/ (function(module, exports, __webpack_require__) {
  58563. var Clipboard = __webpack_require__(142) // FIXME: workaround for browserify
  58564. var VueClipboardConfig = {
  58565. autoSetContainer: false,
  58566. appendToBody: true // This fixes IE, see #50
  58567. }
  58568. var VueClipboard = {
  58569. install: function (Vue) {
  58570. var globalPrototype = Vue.version.slice(0, 2) === '3.' ? Vue.config.globalProperties : Vue.prototype
  58571. globalPrototype.$clipboardConfig = VueClipboardConfig
  58572. globalPrototype.$copyText = function (text, container) {
  58573. return new Promise(function (resolve, reject) {
  58574. var fakeElement = document.createElement('button')
  58575. var clipboard = new Clipboard(fakeElement, {
  58576. text: function () { return text },
  58577. action: function () { return 'copy' },
  58578. container: typeof container === 'object' ? container : document.body
  58579. })
  58580. clipboard.on('success', function (e) {
  58581. clipboard.destroy()
  58582. resolve(e)
  58583. })
  58584. clipboard.on('error', function (e) {
  58585. clipboard.destroy()
  58586. reject(e)
  58587. })
  58588. if (VueClipboardConfig.appendToBody) document.body.appendChild(fakeElement)
  58589. fakeElement.click()
  58590. if (VueClipboardConfig.appendToBody) document.body.removeChild(fakeElement)
  58591. })
  58592. }
  58593. Vue.directive('clipboard', {
  58594. bind: function (el, binding, vnode) {
  58595. if (binding.arg === 'success') {
  58596. el._vClipboard_success = binding.value
  58597. } else if (binding.arg === 'error') {
  58598. el._vClipboard_error = binding.value
  58599. } else {
  58600. var clipboard = new Clipboard(el, {
  58601. text: function () { return binding.value },
  58602. action: function () { return binding.arg === 'cut' ? 'cut' : 'copy' },
  58603. container: VueClipboardConfig.autoSetContainer ? el : undefined
  58604. })
  58605. clipboard.on('success', function (e) {
  58606. var callback = el._vClipboard_success
  58607. callback && callback(e)
  58608. })
  58609. clipboard.on('error', function (e) {
  58610. var callback = el._vClipboard_error
  58611. callback && callback(e)
  58612. })
  58613. el._vClipboard = clipboard
  58614. }
  58615. },
  58616. update: function (el, binding) {
  58617. if (binding.arg === 'success') {
  58618. el._vClipboard_success = binding.value
  58619. } else if (binding.arg === 'error') {
  58620. el._vClipboard_error = binding.value
  58621. } else {
  58622. el._vClipboard.text = function () { return binding.value }
  58623. el._vClipboard.action = function () { return binding.arg === 'cut' ? 'cut' : 'copy' }
  58624. }
  58625. },
  58626. unbind: function (el, binding) {
  58627. // FIXME: investigate why $element._vClipboard was missing
  58628. if (!el._vClipboard) return
  58629. if (binding.arg === 'success') {
  58630. delete el._vClipboard_success
  58631. } else if (binding.arg === 'error') {
  58632. delete el._vClipboard_error
  58633. } else {
  58634. el._vClipboard.destroy()
  58635. delete el._vClipboard
  58636. }
  58637. }
  58638. })
  58639. },
  58640. config: VueClipboardConfig
  58641. }
  58642. if (true) {
  58643. module.exports = VueClipboard
  58644. } else if (typeof define === 'function' && define.amd) {
  58645. define([], function () {
  58646. return VueClipboard
  58647. })
  58648. }
  58649. /***/ }),
  58650. /* 142 */
  58651. /***/ (function(module, exports, __webpack_require__) {
  58652. /*!
  58653. * clipboard.js v2.0.10
  58654. * https://clipboardjs.com/
  58655. *
  58656. * Licensed MIT © Zeno Rocha
  58657. */
  58658. !function(t,e){ true?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},i="";return"string"==typeof t?(e=t,n="rtl"===document.documentElement.getAttribute("dir"),(o=document.createElement("textarea")).style.fontSize="12pt",o.style.border="0",o.style.padding="0",o.style.margin="0",o.style.position="absolute",o.style[n?"right":"left"]="-9999px",n=window.pageYOffset||document.documentElement.scrollTop,o.style.top="".concat(n,"px"),o.setAttribute("readonly",""),o.value=e,o=o,r.container.appendChild(o),i=c()(o),a("copy"),o.remove()):(i=c()(t),a("copy")),i};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==r(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?l(t,{container:o}):e?"cut"===n?f(e):l(e,{container:o}):void 0};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=m(n);return t=o?(t=m(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==p(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var o=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return l(t,e)}},{key:"cut",value:function(t){return f(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",t=s({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(t?"success":"error",{action:n,text:t,trigger:e,clearSelection:function(){e&&e.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return v("action",t)}},{key:"defaultTarget",value:function(t){t=v("target",t);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(t){return v("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}])&&d(t.prototype,e),n&&d(t,n),r}()},828:function(t){var e;"undefined"==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var u=n(828);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=u(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},879:function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var f=n(879),l=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!f.string(e))throw new TypeError("Second argument must be a String");if(!f.fn(n))throw new TypeError("Third argument must be a Function");if(f.node(t))return c=e,a=n,(u=t).addEventListener(c,a),{destroy:function(){u.removeEventListener(c,a)}};if(f.nodeList(t))return o=t,r=e,i=n,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,i)}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,i)})}};if(f.string(t))return t=t,e=e,n=n,l(document.body,t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,u,c,a}},817:function(t){t.exports=function(t){var e,n="SELECT"===t.nodeName?(t.focus(),t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?((e=t.hasAttribute("readonly"))||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute("readonly"),t.value):(t.hasAttribute("contenteditable")&&t.focus(),n=window.getSelection(),(e=document.createRange()).selectNodeContents(t),n.removeAllRanges(),n.addRange(e),n.toString());return n}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,u=o.length;i<u;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},r={},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o(686).default;function o(t){if(r[t])return r[t].exports;var e=r[t]={exports:{}};return n[t](e,e.exports,o),e.exports}var n,r});
  58659. /***/ }),
  58660. /* 143 */
  58661. /***/ (function(module, exports, __webpack_require__) {
  58662. var render = function() {
  58663. var _vm = this
  58664. var _h = _vm.$createElement
  58665. var _c = _vm._self._c || _h
  58666. return _c("drawer-tabs-container", [
  58667. _c(
  58668. "div",
  58669. { staticClass: "project-task-file" },
  58670. [
  58671. !_vm.simple
  58672. ? _c("Row", { staticClass: "sreachBox" }, [
  58673. _c("div", { staticClass: "item" }, [
  58674. _c(
  58675. "div",
  58676. { staticClass: "item-2" },
  58677. [
  58678. _c("sreachTitle", { attrs: { val: _vm.keys.name } }, [
  58679. _vm._v(_vm._s(_vm.$L("文件名")))
  58680. ]),
  58681. _vm._v(" "),
  58682. _c("Input", {
  58683. attrs: { placeholder: _vm.$L("关键词") },
  58684. model: {
  58685. value: _vm.keys.name,
  58686. callback: function($$v) {
  58687. _vm.$set(_vm.keys, "name", $$v)
  58688. },
  58689. expression: "keys.name"
  58690. }
  58691. })
  58692. ],
  58693. 1
  58694. ),
  58695. _vm._v(" "),
  58696. _c(
  58697. "div",
  58698. { staticClass: "item-2" },
  58699. [
  58700. _c("sreachTitle", { attrs: { val: _vm.keys.username } }, [
  58701. _vm._v(_vm._s(_vm.$L("上传者")))
  58702. ]),
  58703. _vm._v(" "),
  58704. _c("Input", {
  58705. attrs: { placeholder: _vm.$L("用户名") },
  58706. model: {
  58707. value: _vm.keys.username,
  58708. callback: function($$v) {
  58709. _vm.$set(_vm.keys, "username", $$v)
  58710. },
  58711. expression: "keys.username"
  58712. }
  58713. })
  58714. ],
  58715. 1
  58716. )
  58717. ]),
  58718. _vm._v(" "),
  58719. _c(
  58720. "div",
  58721. { staticClass: "item item-button" },
  58722. [
  58723. _vm.$A.objImplode(_vm.keys) != ""
  58724. ? _c(
  58725. "Button",
  58726. {
  58727. attrs: { type: "text" },
  58728. on: {
  58729. click: function($event) {
  58730. return _vm.sreachTab(true)
  58731. }
  58732. }
  58733. },
  58734. [_vm._v(_vm._s(_vm.$L("取消筛选")))]
  58735. )
  58736. : _vm._e(),
  58737. _vm._v(" "),
  58738. _c(
  58739. "Button",
  58740. {
  58741. attrs: {
  58742. type: "primary",
  58743. icon: "md-search",
  58744. loading: _vm.loadIng > 0
  58745. },
  58746. on: { click: _vm.sreachTab }
  58747. },
  58748. [_vm._v(_vm._s(_vm.$L("搜索")))]
  58749. )
  58750. ],
  58751. 1
  58752. )
  58753. ])
  58754. : _vm._e(),
  58755. _vm._v(" "),
  58756. _c(
  58757. "Row",
  58758. {
  58759. staticClass: "butBox",
  58760. style:
  58761. "float:left;margin-top:-32px;" +
  58762. (_vm.simple ? "display:none" : "")
  58763. },
  58764. [
  58765. _c(
  58766. "Upload",
  58767. {
  58768. ref: "upload",
  58769. attrs: {
  58770. name: "files",
  58771. action: _vm.actionUrl,
  58772. data: _vm.params,
  58773. multiple: "",
  58774. format: _vm.uploadFormat,
  58775. "show-upload-list": false,
  58776. "max-size": _vm.maxSize,
  58777. "on-success": _vm.handleSuccess,
  58778. "on-error": _vm.handleError,
  58779. "on-format-error": _vm.handleFormatError,
  58780. "on-exceeded-size": _vm.handleMaxSize,
  58781. "before-upload": _vm.handleBeforeUpload
  58782. }
  58783. },
  58784. [
  58785. _c(
  58786. "Button",
  58787. {
  58788. attrs: {
  58789. loading: _vm.loadIng > 0,
  58790. type: "primary",
  58791. icon: "ios-cloud-upload-outline"
  58792. },
  58793. on: { click: function($event) {} }
  58794. },
  58795. [_vm._v(_vm._s(_vm.$L("上传文件")))]
  58796. )
  58797. ],
  58798. 1
  58799. )
  58800. ],
  58801. 1
  58802. ),
  58803. _vm._v(" "),
  58804. _c("Table", {
  58805. ref: "tableRef",
  58806. staticClass: "tableFill",
  58807. attrs: {
  58808. size: !_vm.simple ? "default" : "small",
  58809. columns: _vm.columns,
  58810. data: _vm.lists,
  58811. loading: _vm.loadIng > 0,
  58812. "no-data-text": _vm.noDataText,
  58813. stripe: ""
  58814. },
  58815. on: { "on-sort-change": _vm.sortChange }
  58816. }),
  58817. _vm._v(" "),
  58818. _vm.lastPage > 1 || !_vm.simple
  58819. ? _c("Page", {
  58820. staticClass: "pageBox",
  58821. attrs: {
  58822. simple: _vm.simple || _vm.windowMax768,
  58823. total: _vm.listTotal,
  58824. current: _vm.listPage,
  58825. disabled: _vm.loadIng > 0,
  58826. "page-size-opts": [10, 20, 30, 50, 100],
  58827. placement: "top",
  58828. "show-elevator": "",
  58829. "show-sizer": "",
  58830. "show-total": "",
  58831. transfer: ""
  58832. },
  58833. on: {
  58834. "on-change": _vm.setPage,
  58835. "on-page-size-change": _vm.setPageSize
  58836. }
  58837. })
  58838. : _vm._e()
  58839. ],
  58840. 1
  58841. )
  58842. ])
  58843. }
  58844. var staticRenderFns = []
  58845. render._withStripped = true
  58846. module.exports = { render: render, staticRenderFns: staticRenderFns }
  58847. if (false) {
  58848. module.hot.accept()
  58849. if (module.hot.data) {
  58850. require("vue-hot-reload-api") .rerender("data-v-0c50b298", module.exports)
  58851. }
  58852. }
  58853. /***/ }),
  58854. /* 144 */
  58855. /***/ (function(module, exports, __webpack_require__) {
  58856. // style-loader: Adds some css to the DOM by adding a <style> tag
  58857. // load the styles
  58858. var content = __webpack_require__(145);
  58859. if(typeof content === 'string') content = [[module.i, content, '']];
  58860. if(content.locals) module.exports = content.locals;
  58861. // add the styles to the DOM
  58862. var update = __webpack_require__(1)("2afd1fe1", content, false, {});
  58863. // Hot Module Replacement
  58864. if(false) {
  58865. // When the styles change, update the <style> tags
  58866. if(!content.locals) {
  58867. module.hot.accept("!!../../../../../../../node_modules/css-loader/index.js!../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2951ea9e\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./logs.vue", function() {
  58868. var newContent = require("!!../../../../../../../node_modules/css-loader/index.js!../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-2951ea9e\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./logs.vue");
  58869. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  58870. update(newContent);
  58871. });
  58872. }
  58873. // When the module is disposed, remove the <style> tags
  58874. module.hot.dispose(function() { update(); });
  58875. }
  58876. /***/ }),
  58877. /* 145 */
  58878. /***/ (function(module, exports, __webpack_require__) {
  58879. exports = module.exports = __webpack_require__(0)(false);
  58880. // imports
  58881. // module
  58882. exports.push([module.i, "\n.project-task-logs[data-v-2951ea9e] {\n margin: 0 12px;\n}\n.project-task-logs .logs-activity[data-v-2951ea9e] {\n position: relative;\n word-break: break-all;\n padding: 12px 12px;\n}\n.project-task-logs .logs-activity.istaskid > li[data-v-2951ea9e] {\n padding-top: 0;\n}\n.project-task-logs .logs-activity > li[data-v-2951ea9e] {\n padding-top: 22px;\n}\n.project-task-logs .logs-activity > li.logs-loading[data-v-2951ea9e] {\n margin: 4px 0;\n width: 18px;\n height: 18px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.project-task-logs .logs-activity > li.logs-more[data-v-2951ea9e] {\n cursor: pointer;\n}\n.project-task-logs .logs-activity > li.logs-more[data-v-2951ea9e]:hover {\n color: #048be0;\n}\n.project-task-logs .logs-activity > li.logs-none[data-v-2951ea9e] {\n cursor: pointer;\n color: #666666;\n line-height: 26px;\n}\n.project-task-logs .logs-activity > li[data-v-2951ea9e]:first-child {\n padding-top: 0;\n}\n.project-task-logs .logs-activity > li:last-child .logs-section[data-v-2951ea9e] {\n margin-bottom: -8px;\n}\n.project-task-logs .logs-activity > li .logs-date[data-v-2951ea9e] {\n color: rgba(0, 0, 0, 0.36);\n padding-bottom: 14px;\n}\n.project-task-logs .logs-activity > li .logs-section .ivu-timeline-item[data-v-2951ea9e] {\n padding-bottom: 2px;\n}\n.project-task-logs .logs-activity > li .logs-dot[data-v-2951ea9e] {\n width: 18px;\n height: 18px;\n margin-left: 10px;\n}\n.project-task-logs .logs-activity > li .logs-dot .avatar[data-v-2951ea9e] {\n width: 18px;\n height: 18px;\n font-size: 12px;\n line-height: 18px;\n border-radius: 14px;\n overflow: hidden;\n}\n.project-task-logs .logs-activity > li .log-summary > span[data-v-2951ea9e],\n .project-task-logs .logs-activity > li .log-summary > a[data-v-2951ea9e] {\n padding-right: 6px;\n word-wrap: break-word;\n word-break: break-word;\n}\n.project-task-logs .logs-activity > li .log-summary .log-creator[data-v-2951ea9e] {\n color: rgba(0, 0, 0, 0.85);\n}\n.project-task-logs .logs-activity > li .log-summary .log-text-secondary[data-v-2951ea9e] {\n color: rgba(0, 0, 0, 0.54);\n}\n.project-task-logs .logs-activity > li .log-summary .log-text-link[data-v-2951ea9e] {\n color: #048be0;\n cursor: pointer;\n}\n.project-task-logs .logs-activity > li .log-summary .log-text-info[data-v-2951ea9e] {\n color: rgba(0, 0, 0, 0.36);\n}\n", ""]);
  58883. // exports
  58884. /***/ }),
  58885. /* 146 */
  58886. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  58887. "use strict";
  58888. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  58889. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer__ = __webpack_require__(7);
  58890. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer__);
  58891. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  58892. //
  58893. //
  58894. //
  58895. //
  58896. //
  58897. //
  58898. //
  58899. //
  58900. //
  58901. //
  58902. //
  58903. //
  58904. //
  58905. //
  58906. //
  58907. //
  58908. //
  58909. //
  58910. //
  58911. //
  58912. //
  58913. //
  58914. //
  58915. //
  58916. //
  58917. //
  58918. //
  58919. //
  58920. //
  58921. //
  58922. //
  58923. //
  58924. //
  58925. //
  58926. //
  58927. //
  58928. //
  58929. //
  58930. //
  58931. //
  58932. //
  58933. //
  58934. //
  58935. //
  58936. //
  58937. //
  58938. //
  58939. //
  58940. //
  58941. //
  58942. //
  58943. //
  58944. //
  58945. //
  58946. //
  58947. //
  58948. //
  58949. //
  58950. //
  58951. //
  58952. //
  58953. //
  58954. //
  58955. //
  58956. //
  58957. //
  58958. //
  58959. //
  58960. //
  58961. //
  58962. //
  58963. //
  58964. //
  58965. //
  58966. //
  58967. //
  58968. //
  58969. //
  58970. //
  58971. //
  58972. //
  58973. //
  58974. //
  58975. //
  58976. //
  58977. //
  58978. //
  58979. //
  58980. //
  58981. //
  58982. //
  58983. //
  58984. //
  58985. //
  58986. //
  58987. //
  58988. //
  58989. //
  58990. //
  58991. //
  58992. //
  58993. //
  58994. //
  58995. //
  58996. //
  58997. //
  58998. //
  58999. //
  59000. //
  59001. //
  59002. //
  59003. //
  59004. //
  59005. //
  59006. //
  59007. //
  59008. //
  59009. /* harmony default export */ __webpack_exports__["default"] = ({
  59010. name: 'ProjectTaskLogs',
  59011. components: { DrawerTabsContainer: __WEBPACK_IMPORTED_MODULE_0__DrawerTabsContainer___default.a },
  59012. props: {
  59013. projectid: {
  59014. default: 0
  59015. },
  59016. taskid: {
  59017. default: 0
  59018. },
  59019. pagesize: {
  59020. default: 100
  59021. },
  59022. logtype: {
  59023. default: '全部'
  59024. },
  59025. canload: {
  59026. type: Boolean,
  59027. default: true
  59028. }
  59029. },
  59030. data: function data() {
  59031. return {
  59032. loadYet: false,
  59033. loadIng: 0,
  59034. lists: {},
  59035. listPage: 1,
  59036. hasMorePages: false,
  59037. totalNum: -1
  59038. };
  59039. },
  59040. mounted: function mounted() {
  59041. if (this.canload) {
  59042. this.loadYet = true;
  59043. this.getLists(true);
  59044. }
  59045. },
  59046. watch: {
  59047. projectid: function projectid() {
  59048. if (this.loadYet) {
  59049. this.lists = {};
  59050. this.getLists(true);
  59051. }
  59052. },
  59053. taskid: function taskid() {
  59054. if (this.loadYet) {
  59055. this.lists = {};
  59056. this.getLists(true);
  59057. }
  59058. },
  59059. logtype: function logtype() {
  59060. if (this.loadYet) {
  59061. this.lists = {};
  59062. this.getLists(true);
  59063. }
  59064. },
  59065. canload: function canload(val) {
  59066. if (val && !this.loadYet) {
  59067. this.loadYet = true;
  59068. this.getLists(true);
  59069. }
  59070. }
  59071. },
  59072. methods: {
  59073. logDate: function logDate(items) {
  59074. var md = $A.formatDate("m-d");
  59075. return md == items.ymd ? items.ymd + ' ' + this.$L('今天') : items.key;
  59076. },
  59077. getLists: function getLists(resetLoad, noLoading) {
  59078. var _this = this;
  59079. if (resetLoad === true) {
  59080. this.listPage = 1;
  59081. }
  59082. if (noLoading !== true) {
  59083. this.loadIng++;
  59084. }
  59085. $A.apiAjax({
  59086. url: 'project/log/lists',
  59087. data: {
  59088. projectid: this.projectid,
  59089. taskid: this.taskid,
  59090. type: this.logtype,
  59091. page: Math.max(this.listPage, 1),
  59092. pagesize: this.pagesize
  59093. },
  59094. complete: function complete() {
  59095. if (noLoading !== true) {
  59096. _this.loadIng--;
  59097. }
  59098. },
  59099. success: function success(res) {
  59100. if (res.ret === 1) {
  59101. var timeData = void 0,
  59102. key = void 0;
  59103. if (resetLoad === true) {
  59104. _this.lists = {};
  59105. }
  59106. _this.$nextTick(function () {
  59107. res.data.lists.forEach(function (item) {
  59108. timeData = item.timeData;
  59109. key = timeData.ymd + " " + timeData.week;
  59110. if (_typeof(_this.lists[key]) !== "object") {
  59111. _this.$set(_this.lists, key, {
  59112. key: key,
  59113. ymd: timeData.ymd,
  59114. lists: []
  59115. });
  59116. }
  59117. _this.lists[key].lists.push(item);
  59118. });
  59119. _this.hasMorePages = res.data.hasMorePages;
  59120. _this.totalNum = res.data.total;
  59121. });
  59122. } else {
  59123. _this.lists = {};
  59124. _this.hasMorePages = false;
  59125. _this.totalNum = 0;
  59126. }
  59127. }
  59128. });
  59129. },
  59130. getMore: function getMore() {
  59131. if (!this.hasMorePages) {
  59132. return;
  59133. }
  59134. this.hasMorePages = false;
  59135. this.listPage++;
  59136. this.getLists();
  59137. },
  59138. openChat: function openChat(username) {
  59139. if (typeof window.onChatOpenUserName === "function") {
  59140. window.onChatOpenUserName(username);
  59141. }
  59142. },
  59143. fileDownUrl: function fileDownUrl(id) {
  59144. return $A.apiUrl('project/files/download?fileid=' + id);
  59145. }
  59146. }
  59147. });
  59148. /***/ }),
  59149. /* 147 */
  59150. /***/ (function(module, exports, __webpack_require__) {
  59151. var render = function() {
  59152. var _vm = this
  59153. var _h = _vm.$createElement
  59154. var _c = _vm._self._c || _h
  59155. return _c("drawer-tabs-container", [
  59156. _c("div", { staticClass: "project-task-logs" }, [
  59157. _c(
  59158. "ul",
  59159. {
  59160. staticClass: "logs-activity",
  59161. class: "" + (_vm.taskid > 0 ? "istaskid" : "")
  59162. },
  59163. [
  59164. _vm._l(_vm.lists, function(items) {
  59165. return _c("li", [
  59166. _c("div", { staticClass: "logs-date" }, [
  59167. _vm._v(_vm._s(_vm.logDate(items)))
  59168. ]),
  59169. _vm._v(" "),
  59170. _c(
  59171. "div",
  59172. { staticClass: "logs-section" },
  59173. [
  59174. _c(
  59175. "Timeline",
  59176. _vm._l(items.lists, function(item, index) {
  59177. return _c("TimelineItem", { key: index }, [
  59178. _c(
  59179. "div",
  59180. {
  59181. staticClass: "logs-dot",
  59182. attrs: { slot: "dot" },
  59183. slot: "dot"
  59184. },
  59185. [
  59186. _c("UserImg", {
  59187. staticClass: "avatar",
  59188. attrs: { info: item }
  59189. })
  59190. ],
  59191. 1
  59192. ),
  59193. _vm._v(" "),
  59194. _c("div", { staticClass: "log-summary" }, [
  59195. _c(
  59196. "span",
  59197. {
  59198. staticClass: "log-creator",
  59199. on: {
  59200. click: function($event) {
  59201. return _vm.openChat(item.username)
  59202. }
  59203. }
  59204. },
  59205. [
  59206. _c("UserView", {
  59207. attrs: { username: item.username }
  59208. })
  59209. ],
  59210. 1
  59211. ),
  59212. _vm._v(" "),
  59213. _c("span", { staticClass: "log-text-secondary" }, [
  59214. _vm._v(_vm._s(item.detail))
  59215. ]),
  59216. _vm._v(" "),
  59217. item.other.type == "task" && _vm.taskid == 0
  59218. ? _c(
  59219. "span",
  59220. {
  59221. staticClass: "log-text-link",
  59222. on: {
  59223. click: function($event) {
  59224. return _vm.taskDetail(item.other.id)
  59225. }
  59226. }
  59227. },
  59228. [_vm._v(_vm._s(item.other.title))]
  59229. )
  59230. : _vm._e(),
  59231. _vm._v(" "),
  59232. item.other.type == "username"
  59233. ? _c(
  59234. "span",
  59235. {
  59236. staticClass: "log-text-link",
  59237. on: {
  59238. click: function($event) {
  59239. return _vm.openChat(item.other.username)
  59240. }
  59241. }
  59242. },
  59243. [
  59244. _c("UserView", {
  59245. attrs: { username: item.other.username }
  59246. })
  59247. ],
  59248. 1
  59249. )
  59250. : _vm._e(),
  59251. _vm._v(" "),
  59252. item.other.type == "file"
  59253. ? _c(
  59254. "a",
  59255. {
  59256. staticClass: "log-text-link",
  59257. attrs: {
  59258. target: "_blank",
  59259. href: _vm.fileDownUrl(item.other.id)
  59260. }
  59261. },
  59262. [_vm._v(_vm._s(item.other.name))]
  59263. )
  59264. : _vm._e(),
  59265. _vm._v(" "),
  59266. _c("span", { staticClass: "log-text-info" }, [
  59267. _vm._v(
  59268. _vm._s(item.timeData.ymd) +
  59269. " " +
  59270. _vm._s(item.timeData.segment) +
  59271. " " +
  59272. _vm._s(item.timeData.hi)
  59273. )
  59274. ])
  59275. ])
  59276. ])
  59277. }),
  59278. 1
  59279. )
  59280. ],
  59281. 1
  59282. )
  59283. ])
  59284. }),
  59285. _vm._v(" "),
  59286. _vm.loadIng > 0
  59287. ? _c("li", { staticClass: "logs-loading" }, [_c("w-loading")], 1)
  59288. : _vm.hasMorePages
  59289. ? _c(
  59290. "li",
  59291. { staticClass: "logs-more", on: { click: _vm.getMore } },
  59292. [_vm._v(_vm._s(_vm.$L("加载更多")))]
  59293. )
  59294. : _vm.totalNum == 0
  59295. ? _c(
  59296. "li",
  59297. {
  59298. staticClass: "logs-none",
  59299. on: {
  59300. click: function($event) {
  59301. return _vm.getLists(true)
  59302. }
  59303. }
  59304. },
  59305. [_vm._v(_vm._s(_vm.$L("没有相关内容")))]
  59306. )
  59307. : _vm._e()
  59308. ],
  59309. 2
  59310. )
  59311. ])
  59312. ])
  59313. }
  59314. var staticRenderFns = []
  59315. render._withStripped = true
  59316. module.exports = { render: render, staticRenderFns: staticRenderFns }
  59317. if (false) {
  59318. module.hot.accept()
  59319. if (module.hot.data) {
  59320. require("vue-hot-reload-api") .rerender("data-v-2951ea9e", module.exports)
  59321. }
  59322. }
  59323. /***/ }),
  59324. /* 148 */
  59325. /***/ (function(module, exports, __webpack_require__) {
  59326. var Symbol = __webpack_require__(18);
  59327. /** Used for built-in method references. */
  59328. var objectProto = Object.prototype;
  59329. /** Used to check objects for own properties. */
  59330. var hasOwnProperty = objectProto.hasOwnProperty;
  59331. /**
  59332. * Used to resolve the
  59333. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  59334. * of values.
  59335. */
  59336. var nativeObjectToString = objectProto.toString;
  59337. /** Built-in value references. */
  59338. var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  59339. /**
  59340. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  59341. *
  59342. * @private
  59343. * @param {*} value The value to query.
  59344. * @returns {string} Returns the raw `toStringTag`.
  59345. */
  59346. function getRawTag(value) {
  59347. var isOwn = hasOwnProperty.call(value, symToStringTag),
  59348. tag = value[symToStringTag];
  59349. try {
  59350. value[symToStringTag] = undefined;
  59351. var unmasked = true;
  59352. } catch (e) {}
  59353. var result = nativeObjectToString.call(value);
  59354. if (unmasked) {
  59355. if (isOwn) {
  59356. value[symToStringTag] = tag;
  59357. } else {
  59358. delete value[symToStringTag];
  59359. }
  59360. }
  59361. return result;
  59362. }
  59363. module.exports = getRawTag;
  59364. /***/ }),
  59365. /* 149 */
  59366. /***/ (function(module, exports) {
  59367. /** Used for built-in method references. */
  59368. var objectProto = Object.prototype;
  59369. /**
  59370. * Used to resolve the
  59371. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  59372. * of values.
  59373. */
  59374. var nativeObjectToString = objectProto.toString;
  59375. /**
  59376. * Converts `value` to a string using `Object.prototype.toString`.
  59377. *
  59378. * @private
  59379. * @param {*} value The value to convert.
  59380. * @returns {string} Returns the converted string.
  59381. */
  59382. function objectToString(value) {
  59383. return nativeObjectToString.call(value);
  59384. }
  59385. module.exports = objectToString;
  59386. /***/ }),
  59387. /* 150 */
  59388. /***/ (function(module, exports, __webpack_require__) {
  59389. var Hash = __webpack_require__(151),
  59390. ListCache = __webpack_require__(12),
  59391. Map = __webpack_require__(23);
  59392. /**
  59393. * Removes all key-value entries from the map.
  59394. *
  59395. * @private
  59396. * @name clear
  59397. * @memberOf MapCache
  59398. */
  59399. function mapCacheClear() {
  59400. this.size = 0;
  59401. this.__data__ = {
  59402. 'hash': new Hash,
  59403. 'map': new (Map || ListCache),
  59404. 'string': new Hash
  59405. };
  59406. }
  59407. module.exports = mapCacheClear;
  59408. /***/ }),
  59409. /* 151 */
  59410. /***/ (function(module, exports, __webpack_require__) {
  59411. var hashClear = __webpack_require__(152),
  59412. hashDelete = __webpack_require__(157),
  59413. hashGet = __webpack_require__(158),
  59414. hashHas = __webpack_require__(159),
  59415. hashSet = __webpack_require__(160);
  59416. /**
  59417. * Creates a hash object.
  59418. *
  59419. * @private
  59420. * @constructor
  59421. * @param {Array} [entries] The key-value pairs to cache.
  59422. */
  59423. function Hash(entries) {
  59424. var index = -1,
  59425. length = entries == null ? 0 : entries.length;
  59426. this.clear();
  59427. while (++index < length) {
  59428. var entry = entries[index];
  59429. this.set(entry[0], entry[1]);
  59430. }
  59431. }
  59432. // Add methods to `Hash`.
  59433. Hash.prototype.clear = hashClear;
  59434. Hash.prototype['delete'] = hashDelete;
  59435. Hash.prototype.get = hashGet;
  59436. Hash.prototype.has = hashHas;
  59437. Hash.prototype.set = hashSet;
  59438. module.exports = Hash;
  59439. /***/ }),
  59440. /* 152 */
  59441. /***/ (function(module, exports, __webpack_require__) {
  59442. var nativeCreate = __webpack_require__(11);
  59443. /**
  59444. * Removes all key-value entries from the hash.
  59445. *
  59446. * @private
  59447. * @name clear
  59448. * @memberOf Hash
  59449. */
  59450. function hashClear() {
  59451. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  59452. this.size = 0;
  59453. }
  59454. module.exports = hashClear;
  59455. /***/ }),
  59456. /* 153 */
  59457. /***/ (function(module, exports, __webpack_require__) {
  59458. var isFunction = __webpack_require__(38),
  59459. isMasked = __webpack_require__(154),
  59460. isObject = __webpack_require__(9),
  59461. toSource = __webpack_require__(39);
  59462. /**
  59463. * Used to match `RegExp`
  59464. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  59465. */
  59466. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  59467. /** Used to detect host constructors (Safari). */
  59468. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  59469. /** Used for built-in method references. */
  59470. var funcProto = Function.prototype,
  59471. objectProto = Object.prototype;
  59472. /** Used to resolve the decompiled source of functions. */
  59473. var funcToString = funcProto.toString;
  59474. /** Used to check objects for own properties. */
  59475. var hasOwnProperty = objectProto.hasOwnProperty;
  59476. /** Used to detect if a method is native. */
  59477. var reIsNative = RegExp('^' +
  59478. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  59479. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  59480. );
  59481. /**
  59482. * The base implementation of `_.isNative` without bad shim checks.
  59483. *
  59484. * @private
  59485. * @param {*} value The value to check.
  59486. * @returns {boolean} Returns `true` if `value` is a native function,
  59487. * else `false`.
  59488. */
  59489. function baseIsNative(value) {
  59490. if (!isObject(value) || isMasked(value)) {
  59491. return false;
  59492. }
  59493. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  59494. return pattern.test(toSource(value));
  59495. }
  59496. module.exports = baseIsNative;
  59497. /***/ }),
  59498. /* 154 */
  59499. /***/ (function(module, exports, __webpack_require__) {
  59500. var coreJsData = __webpack_require__(155);
  59501. /** Used to detect methods masquerading as native. */
  59502. var maskSrcKey = (function() {
  59503. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  59504. return uid ? ('Symbol(src)_1.' + uid) : '';
  59505. }());
  59506. /**
  59507. * Checks if `func` has its source masked.
  59508. *
  59509. * @private
  59510. * @param {Function} func The function to check.
  59511. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  59512. */
  59513. function isMasked(func) {
  59514. return !!maskSrcKey && (maskSrcKey in func);
  59515. }
  59516. module.exports = isMasked;
  59517. /***/ }),
  59518. /* 155 */
  59519. /***/ (function(module, exports, __webpack_require__) {
  59520. var root = __webpack_require__(3);
  59521. /** Used to detect overreaching core-js shims. */
  59522. var coreJsData = root['__core-js_shared__'];
  59523. module.exports = coreJsData;
  59524. /***/ }),
  59525. /* 156 */
  59526. /***/ (function(module, exports) {
  59527. /**
  59528. * Gets the value at `key` of `object`.
  59529. *
  59530. * @private
  59531. * @param {Object} [object] The object to query.
  59532. * @param {string} key The key of the property to get.
  59533. * @returns {*} Returns the property value.
  59534. */
  59535. function getValue(object, key) {
  59536. return object == null ? undefined : object[key];
  59537. }
  59538. module.exports = getValue;
  59539. /***/ }),
  59540. /* 157 */
  59541. /***/ (function(module, exports) {
  59542. /**
  59543. * Removes `key` and its value from the hash.
  59544. *
  59545. * @private
  59546. * @name delete
  59547. * @memberOf Hash
  59548. * @param {Object} hash The hash to modify.
  59549. * @param {string} key The key of the value to remove.
  59550. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  59551. */
  59552. function hashDelete(key) {
  59553. var result = this.has(key) && delete this.__data__[key];
  59554. this.size -= result ? 1 : 0;
  59555. return result;
  59556. }
  59557. module.exports = hashDelete;
  59558. /***/ }),
  59559. /* 158 */
  59560. /***/ (function(module, exports, __webpack_require__) {
  59561. var nativeCreate = __webpack_require__(11);
  59562. /** Used to stand-in for `undefined` hash values. */
  59563. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  59564. /** Used for built-in method references. */
  59565. var objectProto = Object.prototype;
  59566. /** Used to check objects for own properties. */
  59567. var hasOwnProperty = objectProto.hasOwnProperty;
  59568. /**
  59569. * Gets the hash value for `key`.
  59570. *
  59571. * @private
  59572. * @name get
  59573. * @memberOf Hash
  59574. * @param {string} key The key of the value to get.
  59575. * @returns {*} Returns the entry value.
  59576. */
  59577. function hashGet(key) {
  59578. var data = this.__data__;
  59579. if (nativeCreate) {
  59580. var result = data[key];
  59581. return result === HASH_UNDEFINED ? undefined : result;
  59582. }
  59583. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  59584. }
  59585. module.exports = hashGet;
  59586. /***/ }),
  59587. /* 159 */
  59588. /***/ (function(module, exports, __webpack_require__) {
  59589. var nativeCreate = __webpack_require__(11);
  59590. /** Used for built-in method references. */
  59591. var objectProto = Object.prototype;
  59592. /** Used to check objects for own properties. */
  59593. var hasOwnProperty = objectProto.hasOwnProperty;
  59594. /**
  59595. * Checks if a hash value for `key` exists.
  59596. *
  59597. * @private
  59598. * @name has
  59599. * @memberOf Hash
  59600. * @param {string} key The key of the entry to check.
  59601. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  59602. */
  59603. function hashHas(key) {
  59604. var data = this.__data__;
  59605. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  59606. }
  59607. module.exports = hashHas;
  59608. /***/ }),
  59609. /* 160 */
  59610. /***/ (function(module, exports, __webpack_require__) {
  59611. var nativeCreate = __webpack_require__(11);
  59612. /** Used to stand-in for `undefined` hash values. */
  59613. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  59614. /**
  59615. * Sets the hash `key` to `value`.
  59616. *
  59617. * @private
  59618. * @name set
  59619. * @memberOf Hash
  59620. * @param {string} key The key of the value to set.
  59621. * @param {*} value The value to set.
  59622. * @returns {Object} Returns the hash instance.
  59623. */
  59624. function hashSet(key, value) {
  59625. var data = this.__data__;
  59626. this.size += this.has(key) ? 0 : 1;
  59627. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  59628. return this;
  59629. }
  59630. module.exports = hashSet;
  59631. /***/ }),
  59632. /* 161 */
  59633. /***/ (function(module, exports) {
  59634. /**
  59635. * Removes all key-value entries from the list cache.
  59636. *
  59637. * @private
  59638. * @name clear
  59639. * @memberOf ListCache
  59640. */
  59641. function listCacheClear() {
  59642. this.__data__ = [];
  59643. this.size = 0;
  59644. }
  59645. module.exports = listCacheClear;
  59646. /***/ }),
  59647. /* 162 */
  59648. /***/ (function(module, exports, __webpack_require__) {
  59649. var assocIndexOf = __webpack_require__(13);
  59650. /** Used for built-in method references. */
  59651. var arrayProto = Array.prototype;
  59652. /** Built-in value references. */
  59653. var splice = arrayProto.splice;
  59654. /**
  59655. * Removes `key` and its value from the list cache.
  59656. *
  59657. * @private
  59658. * @name delete
  59659. * @memberOf ListCache
  59660. * @param {string} key The key of the value to remove.
  59661. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  59662. */
  59663. function listCacheDelete(key) {
  59664. var data = this.__data__,
  59665. index = assocIndexOf(data, key);
  59666. if (index < 0) {
  59667. return false;
  59668. }
  59669. var lastIndex = data.length - 1;
  59670. if (index == lastIndex) {
  59671. data.pop();
  59672. } else {
  59673. splice.call(data, index, 1);
  59674. }
  59675. --this.size;
  59676. return true;
  59677. }
  59678. module.exports = listCacheDelete;
  59679. /***/ }),
  59680. /* 163 */
  59681. /***/ (function(module, exports, __webpack_require__) {
  59682. var assocIndexOf = __webpack_require__(13);
  59683. /**
  59684. * Gets the list cache value for `key`.
  59685. *
  59686. * @private
  59687. * @name get
  59688. * @memberOf ListCache
  59689. * @param {string} key The key of the value to get.
  59690. * @returns {*} Returns the entry value.
  59691. */
  59692. function listCacheGet(key) {
  59693. var data = this.__data__,
  59694. index = assocIndexOf(data, key);
  59695. return index < 0 ? undefined : data[index][1];
  59696. }
  59697. module.exports = listCacheGet;
  59698. /***/ }),
  59699. /* 164 */
  59700. /***/ (function(module, exports, __webpack_require__) {
  59701. var assocIndexOf = __webpack_require__(13);
  59702. /**
  59703. * Checks if a list cache value for `key` exists.
  59704. *
  59705. * @private
  59706. * @name has
  59707. * @memberOf ListCache
  59708. * @param {string} key The key of the entry to check.
  59709. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  59710. */
  59711. function listCacheHas(key) {
  59712. return assocIndexOf(this.__data__, key) > -1;
  59713. }
  59714. module.exports = listCacheHas;
  59715. /***/ }),
  59716. /* 165 */
  59717. /***/ (function(module, exports, __webpack_require__) {
  59718. var assocIndexOf = __webpack_require__(13);
  59719. /**
  59720. * Sets the list cache `key` to `value`.
  59721. *
  59722. * @private
  59723. * @name set
  59724. * @memberOf ListCache
  59725. * @param {string} key The key of the value to set.
  59726. * @param {*} value The value to set.
  59727. * @returns {Object} Returns the list cache instance.
  59728. */
  59729. function listCacheSet(key, value) {
  59730. var data = this.__data__,
  59731. index = assocIndexOf(data, key);
  59732. if (index < 0) {
  59733. ++this.size;
  59734. data.push([key, value]);
  59735. } else {
  59736. data[index][1] = value;
  59737. }
  59738. return this;
  59739. }
  59740. module.exports = listCacheSet;
  59741. /***/ }),
  59742. /* 166 */
  59743. /***/ (function(module, exports, __webpack_require__) {
  59744. var getMapData = __webpack_require__(14);
  59745. /**
  59746. * Removes `key` and its value from the map.
  59747. *
  59748. * @private
  59749. * @name delete
  59750. * @memberOf MapCache
  59751. * @param {string} key The key of the value to remove.
  59752. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  59753. */
  59754. function mapCacheDelete(key) {
  59755. var result = getMapData(this, key)['delete'](key);
  59756. this.size -= result ? 1 : 0;
  59757. return result;
  59758. }
  59759. module.exports = mapCacheDelete;
  59760. /***/ }),
  59761. /* 167 */
  59762. /***/ (function(module, exports) {
  59763. /**
  59764. * Checks if `value` is suitable for use as unique object key.
  59765. *
  59766. * @private
  59767. * @param {*} value The value to check.
  59768. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  59769. */
  59770. function isKeyable(value) {
  59771. var type = typeof value;
  59772. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  59773. ? (value !== '__proto__')
  59774. : (value === null);
  59775. }
  59776. module.exports = isKeyable;
  59777. /***/ }),
  59778. /* 168 */
  59779. /***/ (function(module, exports, __webpack_require__) {
  59780. var getMapData = __webpack_require__(14);
  59781. /**
  59782. * Gets the map value for `key`.
  59783. *
  59784. * @private
  59785. * @name get
  59786. * @memberOf MapCache
  59787. * @param {string} key The key of the value to get.
  59788. * @returns {*} Returns the entry value.
  59789. */
  59790. function mapCacheGet(key) {
  59791. return getMapData(this, key).get(key);
  59792. }
  59793. module.exports = mapCacheGet;
  59794. /***/ }),
  59795. /* 169 */
  59796. /***/ (function(module, exports, __webpack_require__) {
  59797. var getMapData = __webpack_require__(14);
  59798. /**
  59799. * Checks if a map value for `key` exists.
  59800. *
  59801. * @private
  59802. * @name has
  59803. * @memberOf MapCache
  59804. * @param {string} key The key of the entry to check.
  59805. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  59806. */
  59807. function mapCacheHas(key) {
  59808. return getMapData(this, key).has(key);
  59809. }
  59810. module.exports = mapCacheHas;
  59811. /***/ }),
  59812. /* 170 */
  59813. /***/ (function(module, exports, __webpack_require__) {
  59814. var getMapData = __webpack_require__(14);
  59815. /**
  59816. * Sets the map `key` to `value`.
  59817. *
  59818. * @private
  59819. * @name set
  59820. * @memberOf MapCache
  59821. * @param {string} key The key of the value to set.
  59822. * @param {*} value The value to set.
  59823. * @returns {Object} Returns the map cache instance.
  59824. */
  59825. function mapCacheSet(key, value) {
  59826. var data = getMapData(this, key),
  59827. size = data.size;
  59828. data.set(key, value);
  59829. this.size += data.size == size ? 0 : 1;
  59830. return this;
  59831. }
  59832. module.exports = mapCacheSet;
  59833. /***/ }),
  59834. /* 171 */
  59835. /***/ (function(module, exports, __webpack_require__) {
  59836. var ListCache = __webpack_require__(12);
  59837. /**
  59838. * Removes all key-value entries from the stack.
  59839. *
  59840. * @private
  59841. * @name clear
  59842. * @memberOf Stack
  59843. */
  59844. function stackClear() {
  59845. this.__data__ = new ListCache;
  59846. this.size = 0;
  59847. }
  59848. module.exports = stackClear;
  59849. /***/ }),
  59850. /* 172 */
  59851. /***/ (function(module, exports) {
  59852. /**
  59853. * Removes `key` and its value from the stack.
  59854. *
  59855. * @private
  59856. * @name delete
  59857. * @memberOf Stack
  59858. * @param {string} key The key of the value to remove.
  59859. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  59860. */
  59861. function stackDelete(key) {
  59862. var data = this.__data__,
  59863. result = data['delete'](key);
  59864. this.size = data.size;
  59865. return result;
  59866. }
  59867. module.exports = stackDelete;
  59868. /***/ }),
  59869. /* 173 */
  59870. /***/ (function(module, exports) {
  59871. /**
  59872. * Gets the stack value for `key`.
  59873. *
  59874. * @private
  59875. * @name get
  59876. * @memberOf Stack
  59877. * @param {string} key The key of the value to get.
  59878. * @returns {*} Returns the entry value.
  59879. */
  59880. function stackGet(key) {
  59881. return this.__data__.get(key);
  59882. }
  59883. module.exports = stackGet;
  59884. /***/ }),
  59885. /* 174 */
  59886. /***/ (function(module, exports) {
  59887. /**
  59888. * Checks if a stack value for `key` exists.
  59889. *
  59890. * @private
  59891. * @name has
  59892. * @memberOf Stack
  59893. * @param {string} key The key of the entry to check.
  59894. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  59895. */
  59896. function stackHas(key) {
  59897. return this.__data__.has(key);
  59898. }
  59899. module.exports = stackHas;
  59900. /***/ }),
  59901. /* 175 */
  59902. /***/ (function(module, exports, __webpack_require__) {
  59903. var ListCache = __webpack_require__(12),
  59904. Map = __webpack_require__(23),
  59905. MapCache = __webpack_require__(54);
  59906. /** Used as the size to enable large array optimizations. */
  59907. var LARGE_ARRAY_SIZE = 200;
  59908. /**
  59909. * Sets the stack `key` to `value`.
  59910. *
  59911. * @private
  59912. * @name set
  59913. * @memberOf Stack
  59914. * @param {string} key The key of the value to set.
  59915. * @param {*} value The value to set.
  59916. * @returns {Object} Returns the stack cache instance.
  59917. */
  59918. function stackSet(key, value) {
  59919. var data = this.__data__;
  59920. if (data instanceof ListCache) {
  59921. var pairs = data.__data__;
  59922. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  59923. pairs.push([key, value]);
  59924. this.size = ++data.size;
  59925. return this;
  59926. }
  59927. data = this.__data__ = new MapCache(pairs);
  59928. }
  59929. data.set(key, value);
  59930. this.size = data.size;
  59931. return this;
  59932. }
  59933. module.exports = stackSet;
  59934. /***/ }),
  59935. /* 176 */
  59936. /***/ (function(module, exports) {
  59937. /**
  59938. * A specialized version of `_.filter` for arrays without support for
  59939. * iteratee shorthands.
  59940. *
  59941. * @private
  59942. * @param {Array} [array] The array to iterate over.
  59943. * @param {Function} predicate The function invoked per iteration.
  59944. * @returns {Array} Returns the new filtered array.
  59945. */
  59946. function arrayFilter(array, predicate) {
  59947. var index = -1,
  59948. length = array == null ? 0 : array.length,
  59949. resIndex = 0,
  59950. result = [];
  59951. while (++index < length) {
  59952. var value = array[index];
  59953. if (predicate(value, index, array)) {
  59954. result[resIndex++] = value;
  59955. }
  59956. }
  59957. return result;
  59958. }
  59959. module.exports = arrayFilter;
  59960. /***/ }),
  59961. /* 177 */
  59962. /***/ (function(module, exports) {
  59963. /**
  59964. * The base implementation of `_.times` without support for iteratee shorthands
  59965. * or max array length checks.
  59966. *
  59967. * @private
  59968. * @param {number} n The number of times to invoke `iteratee`.
  59969. * @param {Function} iteratee The function invoked per iteration.
  59970. * @returns {Array} Returns the array of results.
  59971. */
  59972. function baseTimes(n, iteratee) {
  59973. var index = -1,
  59974. result = Array(n);
  59975. while (++index < n) {
  59976. result[index] = iteratee(index);
  59977. }
  59978. return result;
  59979. }
  59980. module.exports = baseTimes;
  59981. /***/ }),
  59982. /* 178 */
  59983. /***/ (function(module, exports, __webpack_require__) {
  59984. var baseGetTag = __webpack_require__(10),
  59985. isObjectLike = __webpack_require__(8);
  59986. /** `Object#toString` result references. */
  59987. var argsTag = '[object Arguments]';
  59988. /**
  59989. * The base implementation of `_.isArguments`.
  59990. *
  59991. * @private
  59992. * @param {*} value The value to check.
  59993. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  59994. */
  59995. function baseIsArguments(value) {
  59996. return isObjectLike(value) && baseGetTag(value) == argsTag;
  59997. }
  59998. module.exports = baseIsArguments;
  59999. /***/ }),
  60000. /* 179 */
  60001. /***/ (function(module, exports) {
  60002. /**
  60003. * This method returns `false`.
  60004. *
  60005. * @static
  60006. * @memberOf _
  60007. * @since 4.13.0
  60008. * @category Util
  60009. * @returns {boolean} Returns `false`.
  60010. * @example
  60011. *
  60012. * _.times(2, _.stubFalse);
  60013. * // => [false, false]
  60014. */
  60015. function stubFalse() {
  60016. return false;
  60017. }
  60018. module.exports = stubFalse;
  60019. /***/ }),
  60020. /* 180 */
  60021. /***/ (function(module, exports, __webpack_require__) {
  60022. var baseGetTag = __webpack_require__(10),
  60023. isLength = __webpack_require__(35),
  60024. isObjectLike = __webpack_require__(8);
  60025. /** `Object#toString` result references. */
  60026. var argsTag = '[object Arguments]',
  60027. arrayTag = '[object Array]',
  60028. boolTag = '[object Boolean]',
  60029. dateTag = '[object Date]',
  60030. errorTag = '[object Error]',
  60031. funcTag = '[object Function]',
  60032. mapTag = '[object Map]',
  60033. numberTag = '[object Number]',
  60034. objectTag = '[object Object]',
  60035. regexpTag = '[object RegExp]',
  60036. setTag = '[object Set]',
  60037. stringTag = '[object String]',
  60038. weakMapTag = '[object WeakMap]';
  60039. var arrayBufferTag = '[object ArrayBuffer]',
  60040. dataViewTag = '[object DataView]',
  60041. float32Tag = '[object Float32Array]',
  60042. float64Tag = '[object Float64Array]',
  60043. int8Tag = '[object Int8Array]',
  60044. int16Tag = '[object Int16Array]',
  60045. int32Tag = '[object Int32Array]',
  60046. uint8Tag = '[object Uint8Array]',
  60047. uint8ClampedTag = '[object Uint8ClampedArray]',
  60048. uint16Tag = '[object Uint16Array]',
  60049. uint32Tag = '[object Uint32Array]';
  60050. /** Used to identify `toStringTag` values of typed arrays. */
  60051. var typedArrayTags = {};
  60052. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  60053. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  60054. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  60055. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  60056. typedArrayTags[uint32Tag] = true;
  60057. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  60058. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  60059. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  60060. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  60061. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  60062. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  60063. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  60064. typedArrayTags[weakMapTag] = false;
  60065. /**
  60066. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  60067. *
  60068. * @private
  60069. * @param {*} value The value to check.
  60070. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  60071. */
  60072. function baseIsTypedArray(value) {
  60073. return isObjectLike(value) &&
  60074. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  60075. }
  60076. module.exports = baseIsTypedArray;
  60077. /***/ }),
  60078. /* 181 */
  60079. /***/ (function(module, exports, __webpack_require__) {
  60080. var isPrototype = __webpack_require__(27),
  60081. nativeKeys = __webpack_require__(182);
  60082. /** Used for built-in method references. */
  60083. var objectProto = Object.prototype;
  60084. /** Used to check objects for own properties. */
  60085. var hasOwnProperty = objectProto.hasOwnProperty;
  60086. /**
  60087. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  60088. *
  60089. * @private
  60090. * @param {Object} object The object to query.
  60091. * @returns {Array} Returns the array of property names.
  60092. */
  60093. function baseKeys(object) {
  60094. if (!isPrototype(object)) {
  60095. return nativeKeys(object);
  60096. }
  60097. var result = [];
  60098. for (var key in Object(object)) {
  60099. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  60100. result.push(key);
  60101. }
  60102. }
  60103. return result;
  60104. }
  60105. module.exports = baseKeys;
  60106. /***/ }),
  60107. /* 182 */
  60108. /***/ (function(module, exports, __webpack_require__) {
  60109. var overArg = __webpack_require__(44);
  60110. /* Built-in method references for those with the same name as other `lodash` methods. */
  60111. var nativeKeys = overArg(Object.keys, Object);
  60112. module.exports = nativeKeys;
  60113. /***/ }),
  60114. /* 183 */
  60115. /***/ (function(module, exports, __webpack_require__) {
  60116. var getNative = __webpack_require__(5),
  60117. root = __webpack_require__(3);
  60118. /* Built-in method references that are verified to be native. */
  60119. var DataView = getNative(root, 'DataView');
  60120. module.exports = DataView;
  60121. /***/ }),
  60122. /* 184 */
  60123. /***/ (function(module, exports, __webpack_require__) {
  60124. var getNative = __webpack_require__(5),
  60125. root = __webpack_require__(3);
  60126. /* Built-in method references that are verified to be native. */
  60127. var Promise = getNative(root, 'Promise');
  60128. module.exports = Promise;
  60129. /***/ }),
  60130. /* 185 */
  60131. /***/ (function(module, exports, __webpack_require__) {
  60132. var getNative = __webpack_require__(5),
  60133. root = __webpack_require__(3);
  60134. /* Built-in method references that are verified to be native. */
  60135. var Set = getNative(root, 'Set');
  60136. module.exports = Set;
  60137. /***/ }),
  60138. /* 186 */
  60139. /***/ (function(module, exports, __webpack_require__) {
  60140. var getNative = __webpack_require__(5),
  60141. root = __webpack_require__(3);
  60142. /* Built-in method references that are verified to be native. */
  60143. var WeakMap = getNative(root, 'WeakMap');
  60144. module.exports = WeakMap;
  60145. /***/ }),
  60146. /* 187 */
  60147. /***/ (function(module, exports) {
  60148. /**
  60149. * When source maps are enabled, `style-loader` uses a link element with a data-uri to
  60150. * embed the css on the page. This breaks all relative urls because now they are relative to a
  60151. * bundle instead of the current page.
  60152. *
  60153. * One solution is to only use full urls, but that may be impossible.
  60154. *
  60155. * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
  60156. *
  60157. * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
  60158. *
  60159. */
  60160. module.exports = function (css) {
  60161. // get current location
  60162. var location = typeof window !== "undefined" && window.location;
  60163. if (!location) {
  60164. throw new Error("fixUrls requires window.location");
  60165. }
  60166. // blank or null?
  60167. if (!css || typeof css !== "string") {
  60168. return css;
  60169. }
  60170. var baseUrl = location.protocol + "//" + location.host;
  60171. var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
  60172. // convert each url(...)
  60173. /*
  60174. This regular expression is just a way to recursively match brackets within
  60175. a string.
  60176. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
  60177. ( = Start a capturing group
  60178. (?: = Start a non-capturing group
  60179. [^)(] = Match anything that isn't a parentheses
  60180. | = OR
  60181. \( = Match a start parentheses
  60182. (?: = Start another non-capturing groups
  60183. [^)(]+ = Match anything that isn't a parentheses
  60184. | = OR
  60185. \( = Match a start parentheses
  60186. [^)(]* = Match anything that isn't a parentheses
  60187. \) = Match a end parentheses
  60188. ) = End Group
  60189. *\) = Match anything and then a close parens
  60190. ) = Close non-capturing group
  60191. * = Match anything
  60192. ) = Close capturing group
  60193. \) = Match a close parens
  60194. /gi = Get all matches, not the first. Be case insensitive.
  60195. */
  60196. var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
  60197. // strip quotes (if they exist)
  60198. var unquotedOrigUrl = origUrl
  60199. .trim()
  60200. .replace(/^"(.*)"$/, function(o, $1){ return $1; })
  60201. .replace(/^'(.*)'$/, function(o, $1){ return $1; });
  60202. // already a full url? no change
  60203. if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
  60204. return fullMatch;
  60205. }
  60206. // convert the url to a full url
  60207. var newUrl;
  60208. if (unquotedOrigUrl.indexOf("//") === 0) {
  60209. //TODO: should we add protocol?
  60210. newUrl = unquotedOrigUrl;
  60211. } else if (unquotedOrigUrl.indexOf("/") === 0) {
  60212. // path should be relative to the base url
  60213. newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
  60214. } else {
  60215. // path should be relative to current directory
  60216. newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
  60217. }
  60218. // send back the fixed url(...)
  60219. return "url(" + JSON.stringify(newUrl) + ")";
  60220. });
  60221. // send back the fixed css
  60222. return fixedCss;
  60223. };
  60224. /***/ }),
  60225. /* 188 */
  60226. /***/ (function(module, exports, __webpack_require__) {
  60227. // style-loader: Adds some css to the DOM by adding a <style> tag
  60228. // load the styles
  60229. var content = __webpack_require__(189);
  60230. if(typeof content === 'string') content = [[module.i, content, '']];
  60231. if(content.locals) module.exports = content.locals;
  60232. // add the styles to the DOM
  60233. var update = __webpack_require__(1)("6a9f6baf", content, false, {});
  60234. // Hot Module Replacement
  60235. if(false) {
  60236. // When the styles change, update the <style> tags
  60237. if(!content.locals) {
  60238. module.hot.accept("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-1fd3fc13\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./content.vue", function() {
  60239. var newContent = require("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-1fd3fc13\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./content.vue");
  60240. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  60241. update(newContent);
  60242. });
  60243. }
  60244. // When the module is disposed, remove the <style> tags
  60245. module.hot.dispose(function() { update(); });
  60246. }
  60247. /***/ }),
  60248. /* 189 */
  60249. /***/ (function(module, exports, __webpack_require__) {
  60250. exports = module.exports = __webpack_require__(0)(false);
  60251. // imports
  60252. // module
  60253. exports.push([module.i, "\n.report-content[data-v-1fd3fc13] {\n background: 0 0;\n border: 0;\n float: none;\n margin: 6px 0;\n max-width: none;\n outline: 0;\n padding: 0;\n position: static;\n width: 100%;\n}\n", ""]);
  60254. // exports
  60255. /***/ }),
  60256. /* 190 */
  60257. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  60258. "use strict";
  60259. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  60260. //
  60261. //
  60262. //
  60263. //
  60264. //
  60265. //
  60266. //
  60267. //
  60268. //
  60269. //
  60270. //
  60271. //
  60272. //
  60273. //
  60274. //
  60275. //
  60276. //
  60277. /**
  60278. * 预览内容
  60279. */
  60280. /* harmony default export */ __webpack_exports__["default"] = ({
  60281. name: 'ReportContent',
  60282. props: {
  60283. content: {
  60284. default: ''
  60285. }
  60286. },
  60287. data: function data() {
  60288. return {
  60289. contentHeight: 50
  60290. };
  60291. },
  60292. mounted: function mounted() {
  60293. this.setContent(this.content);
  60294. },
  60295. watch: {
  60296. content: function content(val) {
  60297. this.setContent(val);
  60298. }
  60299. },
  60300. methods: {
  60301. setContent: function setContent(val) {
  60302. var _this = this;
  60303. if (!this.$el.contentWindow) {
  60304. return;
  60305. }
  60306. var $d = this.$el.contentWindow.document;
  60307. $A("body", $d).html('<link type="text/css" rel="stylesheet" href="' + window.location.origin + '/js/build/skins/ui/oxide/content.min.css"><style>html,body{padding:0;margin:0}</style><div id="content">' + val + '</div>');
  60308. this.$nextTick(function () {
  60309. _this.contentHeight = $d.getElementById("content").scrollHeight;
  60310. });
  60311. }
  60312. }
  60313. });
  60314. /***/ }),
  60315. /* 191 */
  60316. /***/ (function(module, exports, __webpack_require__) {
  60317. var render = function() {
  60318. var _vm = this
  60319. var _h = _vm.$createElement
  60320. var _c = _vm._self._c || _h
  60321. return _c("iframe", {
  60322. staticClass: "report-content",
  60323. style: { height: _vm.contentHeight + "px" }
  60324. })
  60325. }
  60326. var staticRenderFns = []
  60327. render._withStripped = true
  60328. module.exports = { render: render, staticRenderFns: staticRenderFns }
  60329. if (false) {
  60330. module.hot.accept()
  60331. if (module.hot.data) {
  60332. require("vue-hot-reload-api") .rerender("data-v-1fd3fc13", module.exports)
  60333. }
  60334. }
  60335. /***/ }),
  60336. /* 192 */
  60337. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  60338. "use strict";
  60339. /*!
  60340. * vue-router v3.5.3
  60341. * (c) 2021 Evan You
  60342. * @license MIT
  60343. */
  60344. /* */
  60345. function assert (condition, message) {
  60346. if (!condition) {
  60347. throw new Error(("[vue-router] " + message))
  60348. }
  60349. }
  60350. function warn (condition, message) {
  60351. if (!condition) {
  60352. typeof console !== 'undefined' && console.warn(("[vue-router] " + message));
  60353. }
  60354. }
  60355. function extend (a, b) {
  60356. for (var key in b) {
  60357. a[key] = b[key];
  60358. }
  60359. return a
  60360. }
  60361. /* */
  60362. var encodeReserveRE = /[!'()*]/g;
  60363. var encodeReserveReplacer = function (c) { return '%' + c.charCodeAt(0).toString(16); };
  60364. var commaRE = /%2C/g;
  60365. // fixed encodeURIComponent which is more conformant to RFC3986:
  60366. // - escapes [!'()*]
  60367. // - preserve commas
  60368. var encode = function (str) { return encodeURIComponent(str)
  60369. .replace(encodeReserveRE, encodeReserveReplacer)
  60370. .replace(commaRE, ','); };
  60371. function decode (str) {
  60372. try {
  60373. return decodeURIComponent(str)
  60374. } catch (err) {
  60375. if (true) {
  60376. warn(false, ("Error decoding \"" + str + "\". Leaving it intact."));
  60377. }
  60378. }
  60379. return str
  60380. }
  60381. function resolveQuery (
  60382. query,
  60383. extraQuery,
  60384. _parseQuery
  60385. ) {
  60386. if ( extraQuery === void 0 ) extraQuery = {};
  60387. var parse = _parseQuery || parseQuery;
  60388. var parsedQuery;
  60389. try {
  60390. parsedQuery = parse(query || '');
  60391. } catch (e) {
  60392. "development" !== 'production' && warn(false, e.message);
  60393. parsedQuery = {};
  60394. }
  60395. for (var key in extraQuery) {
  60396. var value = extraQuery[key];
  60397. parsedQuery[key] = Array.isArray(value)
  60398. ? value.map(castQueryParamValue)
  60399. : castQueryParamValue(value);
  60400. }
  60401. return parsedQuery
  60402. }
  60403. var castQueryParamValue = function (value) { return (value == null || typeof value === 'object' ? value : String(value)); };
  60404. function parseQuery (query) {
  60405. var res = {};
  60406. query = query.trim().replace(/^(\?|#|&)/, '');
  60407. if (!query) {
  60408. return res
  60409. }
  60410. query.split('&').forEach(function (param) {
  60411. var parts = param.replace(/\+/g, ' ').split('=');
  60412. var key = decode(parts.shift());
  60413. var val = parts.length > 0 ? decode(parts.join('=')) : null;
  60414. if (res[key] === undefined) {
  60415. res[key] = val;
  60416. } else if (Array.isArray(res[key])) {
  60417. res[key].push(val);
  60418. } else {
  60419. res[key] = [res[key], val];
  60420. }
  60421. });
  60422. return res
  60423. }
  60424. function stringifyQuery (obj) {
  60425. var res = obj
  60426. ? Object.keys(obj)
  60427. .map(function (key) {
  60428. var val = obj[key];
  60429. if (val === undefined) {
  60430. return ''
  60431. }
  60432. if (val === null) {
  60433. return encode(key)
  60434. }
  60435. if (Array.isArray(val)) {
  60436. var result = [];
  60437. val.forEach(function (val2) {
  60438. if (val2 === undefined) {
  60439. return
  60440. }
  60441. if (val2 === null) {
  60442. result.push(encode(key));
  60443. } else {
  60444. result.push(encode(key) + '=' + encode(val2));
  60445. }
  60446. });
  60447. return result.join('&')
  60448. }
  60449. return encode(key) + '=' + encode(val)
  60450. })
  60451. .filter(function (x) { return x.length > 0; })
  60452. .join('&')
  60453. : null;
  60454. return res ? ("?" + res) : ''
  60455. }
  60456. /* */
  60457. var trailingSlashRE = /\/?$/;
  60458. function createRoute (
  60459. record,
  60460. location,
  60461. redirectedFrom,
  60462. router
  60463. ) {
  60464. var stringifyQuery = router && router.options.stringifyQuery;
  60465. var query = location.query || {};
  60466. try {
  60467. query = clone(query);
  60468. } catch (e) {}
  60469. var route = {
  60470. name: location.name || (record && record.name),
  60471. meta: (record && record.meta) || {},
  60472. path: location.path || '/',
  60473. hash: location.hash || '',
  60474. query: query,
  60475. params: location.params || {},
  60476. fullPath: getFullPath(location, stringifyQuery),
  60477. matched: record ? formatMatch(record) : []
  60478. };
  60479. if (redirectedFrom) {
  60480. route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery);
  60481. }
  60482. return Object.freeze(route)
  60483. }
  60484. function clone (value) {
  60485. if (Array.isArray(value)) {
  60486. return value.map(clone)
  60487. } else if (value && typeof value === 'object') {
  60488. var res = {};
  60489. for (var key in value) {
  60490. res[key] = clone(value[key]);
  60491. }
  60492. return res
  60493. } else {
  60494. return value
  60495. }
  60496. }
  60497. // the starting route that represents the initial state
  60498. var START = createRoute(null, {
  60499. path: '/'
  60500. });
  60501. function formatMatch (record) {
  60502. var res = [];
  60503. while (record) {
  60504. res.unshift(record);
  60505. record = record.parent;
  60506. }
  60507. return res
  60508. }
  60509. function getFullPath (
  60510. ref,
  60511. _stringifyQuery
  60512. ) {
  60513. var path = ref.path;
  60514. var query = ref.query; if ( query === void 0 ) query = {};
  60515. var hash = ref.hash; if ( hash === void 0 ) hash = '';
  60516. var stringify = _stringifyQuery || stringifyQuery;
  60517. return (path || '/') + stringify(query) + hash
  60518. }
  60519. function isSameRoute (a, b, onlyPath) {
  60520. if (b === START) {
  60521. return a === b
  60522. } else if (!b) {
  60523. return false
  60524. } else if (a.path && b.path) {
  60525. return a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') && (onlyPath ||
  60526. a.hash === b.hash &&
  60527. isObjectEqual(a.query, b.query))
  60528. } else if (a.name && b.name) {
  60529. return (
  60530. a.name === b.name &&
  60531. (onlyPath || (
  60532. a.hash === b.hash &&
  60533. isObjectEqual(a.query, b.query) &&
  60534. isObjectEqual(a.params, b.params))
  60535. )
  60536. )
  60537. } else {
  60538. return false
  60539. }
  60540. }
  60541. function isObjectEqual (a, b) {
  60542. if ( a === void 0 ) a = {};
  60543. if ( b === void 0 ) b = {};
  60544. // handle null value #1566
  60545. if (!a || !b) { return a === b }
  60546. var aKeys = Object.keys(a).sort();
  60547. var bKeys = Object.keys(b).sort();
  60548. if (aKeys.length !== bKeys.length) {
  60549. return false
  60550. }
  60551. return aKeys.every(function (key, i) {
  60552. var aVal = a[key];
  60553. var bKey = bKeys[i];
  60554. if (bKey !== key) { return false }
  60555. var bVal = b[key];
  60556. // query values can be null and undefined
  60557. if (aVal == null || bVal == null) { return aVal === bVal }
  60558. // check nested equality
  60559. if (typeof aVal === 'object' && typeof bVal === 'object') {
  60560. return isObjectEqual(aVal, bVal)
  60561. }
  60562. return String(aVal) === String(bVal)
  60563. })
  60564. }
  60565. function isIncludedRoute (current, target) {
  60566. return (
  60567. current.path.replace(trailingSlashRE, '/').indexOf(
  60568. target.path.replace(trailingSlashRE, '/')
  60569. ) === 0 &&
  60570. (!target.hash || current.hash === target.hash) &&
  60571. queryIncludes(current.query, target.query)
  60572. )
  60573. }
  60574. function queryIncludes (current, target) {
  60575. for (var key in target) {
  60576. if (!(key in current)) {
  60577. return false
  60578. }
  60579. }
  60580. return true
  60581. }
  60582. function handleRouteEntered (route) {
  60583. for (var i = 0; i < route.matched.length; i++) {
  60584. var record = route.matched[i];
  60585. for (var name in record.instances) {
  60586. var instance = record.instances[name];
  60587. var cbs = record.enteredCbs[name];
  60588. if (!instance || !cbs) { continue }
  60589. delete record.enteredCbs[name];
  60590. for (var i$1 = 0; i$1 < cbs.length; i$1++) {
  60591. if (!instance._isBeingDestroyed) { cbs[i$1](instance); }
  60592. }
  60593. }
  60594. }
  60595. }
  60596. var View = {
  60597. name: 'RouterView',
  60598. functional: true,
  60599. props: {
  60600. name: {
  60601. type: String,
  60602. default: 'default'
  60603. }
  60604. },
  60605. render: function render (_, ref) {
  60606. var props = ref.props;
  60607. var children = ref.children;
  60608. var parent = ref.parent;
  60609. var data = ref.data;
  60610. // used by devtools to display a router-view badge
  60611. data.routerView = true;
  60612. // directly use parent context's createElement() function
  60613. // so that components rendered by router-view can resolve named slots
  60614. var h = parent.$createElement;
  60615. var name = props.name;
  60616. var route = parent.$route;
  60617. var cache = parent._routerViewCache || (parent._routerViewCache = {});
  60618. // determine current view depth, also check to see if the tree
  60619. // has been toggled inactive but kept-alive.
  60620. var depth = 0;
  60621. var inactive = false;
  60622. while (parent && parent._routerRoot !== parent) {
  60623. var vnodeData = parent.$vnode ? parent.$vnode.data : {};
  60624. if (vnodeData.routerView) {
  60625. depth++;
  60626. }
  60627. if (vnodeData.keepAlive && parent._directInactive && parent._inactive) {
  60628. inactive = true;
  60629. }
  60630. parent = parent.$parent;
  60631. }
  60632. data.routerViewDepth = depth;
  60633. // render previous view if the tree is inactive and kept-alive
  60634. if (inactive) {
  60635. var cachedData = cache[name];
  60636. var cachedComponent = cachedData && cachedData.component;
  60637. if (cachedComponent) {
  60638. // #2301
  60639. // pass props
  60640. if (cachedData.configProps) {
  60641. fillPropsinData(cachedComponent, data, cachedData.route, cachedData.configProps);
  60642. }
  60643. return h(cachedComponent, data, children)
  60644. } else {
  60645. // render previous empty view
  60646. return h()
  60647. }
  60648. }
  60649. var matched = route.matched[depth];
  60650. var component = matched && matched.components[name];
  60651. // render empty node if no matched route or no config component
  60652. if (!matched || !component) {
  60653. cache[name] = null;
  60654. return h()
  60655. }
  60656. // cache component
  60657. cache[name] = { component: component };
  60658. // attach instance registration hook
  60659. // this will be called in the instance's injected lifecycle hooks
  60660. data.registerRouteInstance = function (vm, val) {
  60661. // val could be undefined for unregistration
  60662. var current = matched.instances[name];
  60663. if (
  60664. (val && current !== vm) ||
  60665. (!val && current === vm)
  60666. ) {
  60667. matched.instances[name] = val;
  60668. }
  60669. }
  60670. // also register instance in prepatch hook
  60671. // in case the same component instance is reused across different routes
  60672. ;(data.hook || (data.hook = {})).prepatch = function (_, vnode) {
  60673. matched.instances[name] = vnode.componentInstance;
  60674. };
  60675. // register instance in init hook
  60676. // in case kept-alive component be actived when routes changed
  60677. data.hook.init = function (vnode) {
  60678. if (vnode.data.keepAlive &&
  60679. vnode.componentInstance &&
  60680. vnode.componentInstance !== matched.instances[name]
  60681. ) {
  60682. matched.instances[name] = vnode.componentInstance;
  60683. }
  60684. // if the route transition has already been confirmed then we weren't
  60685. // able to call the cbs during confirmation as the component was not
  60686. // registered yet, so we call it here.
  60687. handleRouteEntered(route);
  60688. };
  60689. var configProps = matched.props && matched.props[name];
  60690. // save route and configProps in cache
  60691. if (configProps) {
  60692. extend(cache[name], {
  60693. route: route,
  60694. configProps: configProps
  60695. });
  60696. fillPropsinData(component, data, route, configProps);
  60697. }
  60698. return h(component, data, children)
  60699. }
  60700. };
  60701. function fillPropsinData (component, data, route, configProps) {
  60702. // resolve props
  60703. var propsToPass = data.props = resolveProps(route, configProps);
  60704. if (propsToPass) {
  60705. // clone to prevent mutation
  60706. propsToPass = data.props = extend({}, propsToPass);
  60707. // pass non-declared props as attrs
  60708. var attrs = data.attrs = data.attrs || {};
  60709. for (var key in propsToPass) {
  60710. if (!component.props || !(key in component.props)) {
  60711. attrs[key] = propsToPass[key];
  60712. delete propsToPass[key];
  60713. }
  60714. }
  60715. }
  60716. }
  60717. function resolveProps (route, config) {
  60718. switch (typeof config) {
  60719. case 'undefined':
  60720. return
  60721. case 'object':
  60722. return config
  60723. case 'function':
  60724. return config(route)
  60725. case 'boolean':
  60726. return config ? route.params : undefined
  60727. default:
  60728. if (true) {
  60729. warn(
  60730. false,
  60731. "props in \"" + (route.path) + "\" is a " + (typeof config) + ", " +
  60732. "expecting an object, function or boolean."
  60733. );
  60734. }
  60735. }
  60736. }
  60737. /* */
  60738. function resolvePath (
  60739. relative,
  60740. base,
  60741. append
  60742. ) {
  60743. var firstChar = relative.charAt(0);
  60744. if (firstChar === '/') {
  60745. return relative
  60746. }
  60747. if (firstChar === '?' || firstChar === '#') {
  60748. return base + relative
  60749. }
  60750. var stack = base.split('/');
  60751. // remove trailing segment if:
  60752. // - not appending
  60753. // - appending to trailing slash (last segment is empty)
  60754. if (!append || !stack[stack.length - 1]) {
  60755. stack.pop();
  60756. }
  60757. // resolve relative path
  60758. var segments = relative.replace(/^\//, '').split('/');
  60759. for (var i = 0; i < segments.length; i++) {
  60760. var segment = segments[i];
  60761. if (segment === '..') {
  60762. stack.pop();
  60763. } else if (segment !== '.') {
  60764. stack.push(segment);
  60765. }
  60766. }
  60767. // ensure leading slash
  60768. if (stack[0] !== '') {
  60769. stack.unshift('');
  60770. }
  60771. return stack.join('/')
  60772. }
  60773. function parsePath (path) {
  60774. var hash = '';
  60775. var query = '';
  60776. var hashIndex = path.indexOf('#');
  60777. if (hashIndex >= 0) {
  60778. hash = path.slice(hashIndex);
  60779. path = path.slice(0, hashIndex);
  60780. }
  60781. var queryIndex = path.indexOf('?');
  60782. if (queryIndex >= 0) {
  60783. query = path.slice(queryIndex + 1);
  60784. path = path.slice(0, queryIndex);
  60785. }
  60786. return {
  60787. path: path,
  60788. query: query,
  60789. hash: hash
  60790. }
  60791. }
  60792. function cleanPath (path) {
  60793. return path.replace(/\/+/g, '/')
  60794. }
  60795. var isarray = Array.isArray || function (arr) {
  60796. return Object.prototype.toString.call(arr) == '[object Array]';
  60797. };
  60798. /**
  60799. * Expose `pathToRegexp`.
  60800. */
  60801. var pathToRegexp_1 = pathToRegexp;
  60802. var parse_1 = parse;
  60803. var compile_1 = compile;
  60804. var tokensToFunction_1 = tokensToFunction;
  60805. var tokensToRegExp_1 = tokensToRegExp;
  60806. /**
  60807. * The main path matching regexp utility.
  60808. *
  60809. * @type {RegExp}
  60810. */
  60811. var PATH_REGEXP = new RegExp([
  60812. // Match escaped characters that would otherwise appear in future matches.
  60813. // This allows the user to escape special characters that won't transform.
  60814. '(\\\\.)',
  60815. // Match Express-style parameters and un-named parameters with a prefix
  60816. // and optional suffixes. Matches appear as:
  60817. //
  60818. // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
  60819. // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
  60820. // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
  60821. '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
  60822. ].join('|'), 'g');
  60823. /**
  60824. * Parse a string for the raw tokens.
  60825. *
  60826. * @param {string} str
  60827. * @param {Object=} options
  60828. * @return {!Array}
  60829. */
  60830. function parse (str, options) {
  60831. var tokens = [];
  60832. var key = 0;
  60833. var index = 0;
  60834. var path = '';
  60835. var defaultDelimiter = options && options.delimiter || '/';
  60836. var res;
  60837. while ((res = PATH_REGEXP.exec(str)) != null) {
  60838. var m = res[0];
  60839. var escaped = res[1];
  60840. var offset = res.index;
  60841. path += str.slice(index, offset);
  60842. index = offset + m.length;
  60843. // Ignore already escaped sequences.
  60844. if (escaped) {
  60845. path += escaped[1];
  60846. continue
  60847. }
  60848. var next = str[index];
  60849. var prefix = res[2];
  60850. var name = res[3];
  60851. var capture = res[4];
  60852. var group = res[5];
  60853. var modifier = res[6];
  60854. var asterisk = res[7];
  60855. // Push the current path onto the tokens.
  60856. if (path) {
  60857. tokens.push(path);
  60858. path = '';
  60859. }
  60860. var partial = prefix != null && next != null && next !== prefix;
  60861. var repeat = modifier === '+' || modifier === '*';
  60862. var optional = modifier === '?' || modifier === '*';
  60863. var delimiter = res[2] || defaultDelimiter;
  60864. var pattern = capture || group;
  60865. tokens.push({
  60866. name: name || key++,
  60867. prefix: prefix || '',
  60868. delimiter: delimiter,
  60869. optional: optional,
  60870. repeat: repeat,
  60871. partial: partial,
  60872. asterisk: !!asterisk,
  60873. pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
  60874. });
  60875. }
  60876. // Match any characters still remaining.
  60877. if (index < str.length) {
  60878. path += str.substr(index);
  60879. }
  60880. // If the path exists, push it onto the end.
  60881. if (path) {
  60882. tokens.push(path);
  60883. }
  60884. return tokens
  60885. }
  60886. /**
  60887. * Compile a string to a template function for the path.
  60888. *
  60889. * @param {string} str
  60890. * @param {Object=} options
  60891. * @return {!function(Object=, Object=)}
  60892. */
  60893. function compile (str, options) {
  60894. return tokensToFunction(parse(str, options), options)
  60895. }
  60896. /**
  60897. * Prettier encoding of URI path segments.
  60898. *
  60899. * @param {string}
  60900. * @return {string}
  60901. */
  60902. function encodeURIComponentPretty (str) {
  60903. return encodeURI(str).replace(/[\/?#]/g, function (c) {
  60904. return '%' + c.charCodeAt(0).toString(16).toUpperCase()
  60905. })
  60906. }
  60907. /**
  60908. * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
  60909. *
  60910. * @param {string}
  60911. * @return {string}
  60912. */
  60913. function encodeAsterisk (str) {
  60914. return encodeURI(str).replace(/[?#]/g, function (c) {
  60915. return '%' + c.charCodeAt(0).toString(16).toUpperCase()
  60916. })
  60917. }
  60918. /**
  60919. * Expose a method for transforming tokens into the path function.
  60920. */
  60921. function tokensToFunction (tokens, options) {
  60922. // Compile all the tokens into regexps.
  60923. var matches = new Array(tokens.length);
  60924. // Compile all the patterns before compilation.
  60925. for (var i = 0; i < tokens.length; i++) {
  60926. if (typeof tokens[i] === 'object') {
  60927. matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));
  60928. }
  60929. }
  60930. return function (obj, opts) {
  60931. var path = '';
  60932. var data = obj || {};
  60933. var options = opts || {};
  60934. var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;
  60935. for (var i = 0; i < tokens.length; i++) {
  60936. var token = tokens[i];
  60937. if (typeof token === 'string') {
  60938. path += token;
  60939. continue
  60940. }
  60941. var value = data[token.name];
  60942. var segment;
  60943. if (value == null) {
  60944. if (token.optional) {
  60945. // Prepend partial segment prefixes.
  60946. if (token.partial) {
  60947. path += token.prefix;
  60948. }
  60949. continue
  60950. } else {
  60951. throw new TypeError('Expected "' + token.name + '" to be defined')
  60952. }
  60953. }
  60954. if (isarray(value)) {
  60955. if (!token.repeat) {
  60956. throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
  60957. }
  60958. if (value.length === 0) {
  60959. if (token.optional) {
  60960. continue
  60961. } else {
  60962. throw new TypeError('Expected "' + token.name + '" to not be empty')
  60963. }
  60964. }
  60965. for (var j = 0; j < value.length; j++) {
  60966. segment = encode(value[j]);
  60967. if (!matches[i].test(segment)) {
  60968. throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
  60969. }
  60970. path += (j === 0 ? token.prefix : token.delimiter) + segment;
  60971. }
  60972. continue
  60973. }
  60974. segment = token.asterisk ? encodeAsterisk(value) : encode(value);
  60975. if (!matches[i].test(segment)) {
  60976. throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
  60977. }
  60978. path += token.prefix + segment;
  60979. }
  60980. return path
  60981. }
  60982. }
  60983. /**
  60984. * Escape a regular expression string.
  60985. *
  60986. * @param {string} str
  60987. * @return {string}
  60988. */
  60989. function escapeString (str) {
  60990. return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
  60991. }
  60992. /**
  60993. * Escape the capturing group by escaping special characters and meaning.
  60994. *
  60995. * @param {string} group
  60996. * @return {string}
  60997. */
  60998. function escapeGroup (group) {
  60999. return group.replace(/([=!:$\/()])/g, '\\$1')
  61000. }
  61001. /**
  61002. * Attach the keys as a property of the regexp.
  61003. *
  61004. * @param {!RegExp} re
  61005. * @param {Array} keys
  61006. * @return {!RegExp}
  61007. */
  61008. function attachKeys (re, keys) {
  61009. re.keys = keys;
  61010. return re
  61011. }
  61012. /**
  61013. * Get the flags for a regexp from the options.
  61014. *
  61015. * @param {Object} options
  61016. * @return {string}
  61017. */
  61018. function flags (options) {
  61019. return options && options.sensitive ? '' : 'i'
  61020. }
  61021. /**
  61022. * Pull out keys from a regexp.
  61023. *
  61024. * @param {!RegExp} path
  61025. * @param {!Array} keys
  61026. * @return {!RegExp}
  61027. */
  61028. function regexpToRegexp (path, keys) {
  61029. // Use a negative lookahead to match only capturing groups.
  61030. var groups = path.source.match(/\((?!\?)/g);
  61031. if (groups) {
  61032. for (var i = 0; i < groups.length; i++) {
  61033. keys.push({
  61034. name: i,
  61035. prefix: null,
  61036. delimiter: null,
  61037. optional: false,
  61038. repeat: false,
  61039. partial: false,
  61040. asterisk: false,
  61041. pattern: null
  61042. });
  61043. }
  61044. }
  61045. return attachKeys(path, keys)
  61046. }
  61047. /**
  61048. * Transform an array into a regexp.
  61049. *
  61050. * @param {!Array} path
  61051. * @param {Array} keys
  61052. * @param {!Object} options
  61053. * @return {!RegExp}
  61054. */
  61055. function arrayToRegexp (path, keys, options) {
  61056. var parts = [];
  61057. for (var i = 0; i < path.length; i++) {
  61058. parts.push(pathToRegexp(path[i], keys, options).source);
  61059. }
  61060. var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));
  61061. return attachKeys(regexp, keys)
  61062. }
  61063. /**
  61064. * Create a path regexp from string input.
  61065. *
  61066. * @param {string} path
  61067. * @param {!Array} keys
  61068. * @param {!Object} options
  61069. * @return {!RegExp}
  61070. */
  61071. function stringToRegexp (path, keys, options) {
  61072. return tokensToRegExp(parse(path, options), keys, options)
  61073. }
  61074. /**
  61075. * Expose a function for taking tokens and returning a RegExp.
  61076. *
  61077. * @param {!Array} tokens
  61078. * @param {(Array|Object)=} keys
  61079. * @param {Object=} options
  61080. * @return {!RegExp}
  61081. */
  61082. function tokensToRegExp (tokens, keys, options) {
  61083. if (!isarray(keys)) {
  61084. options = /** @type {!Object} */ (keys || options);
  61085. keys = [];
  61086. }
  61087. options = options || {};
  61088. var strict = options.strict;
  61089. var end = options.end !== false;
  61090. var route = '';
  61091. // Iterate over the tokens and create our regexp string.
  61092. for (var i = 0; i < tokens.length; i++) {
  61093. var token = tokens[i];
  61094. if (typeof token === 'string') {
  61095. route += escapeString(token);
  61096. } else {
  61097. var prefix = escapeString(token.prefix);
  61098. var capture = '(?:' + token.pattern + ')';
  61099. keys.push(token);
  61100. if (token.repeat) {
  61101. capture += '(?:' + prefix + capture + ')*';
  61102. }
  61103. if (token.optional) {
  61104. if (!token.partial) {
  61105. capture = '(?:' + prefix + '(' + capture + '))?';
  61106. } else {
  61107. capture = prefix + '(' + capture + ')?';
  61108. }
  61109. } else {
  61110. capture = prefix + '(' + capture + ')';
  61111. }
  61112. route += capture;
  61113. }
  61114. }
  61115. var delimiter = escapeString(options.delimiter || '/');
  61116. var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
  61117. // In non-strict mode we allow a slash at the end of match. If the path to
  61118. // match already ends with a slash, we remove it for consistency. The slash
  61119. // is valid at the end of a path match, not in the middle. This is important
  61120. // in non-ending mode, where "/test/" shouldn't match "/test//route".
  61121. if (!strict) {
  61122. route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';
  61123. }
  61124. if (end) {
  61125. route += '$';
  61126. } else {
  61127. // In non-ending mode, we need the capturing groups to match as much as
  61128. // possible by using a positive lookahead to the end or next path segment.
  61129. route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';
  61130. }
  61131. return attachKeys(new RegExp('^' + route, flags(options)), keys)
  61132. }
  61133. /**
  61134. * Normalize the given path string, returning a regular expression.
  61135. *
  61136. * An empty array can be passed in for the keys, which will hold the
  61137. * placeholder key descriptions. For example, using `/user/:id`, `keys` will
  61138. * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
  61139. *
  61140. * @param {(string|RegExp|Array)} path
  61141. * @param {(Array|Object)=} keys
  61142. * @param {Object=} options
  61143. * @return {!RegExp}
  61144. */
  61145. function pathToRegexp (path, keys, options) {
  61146. if (!isarray(keys)) {
  61147. options = /** @type {!Object} */ (keys || options);
  61148. keys = [];
  61149. }
  61150. options = options || {};
  61151. if (path instanceof RegExp) {
  61152. return regexpToRegexp(path, /** @type {!Array} */ (keys))
  61153. }
  61154. if (isarray(path)) {
  61155. return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
  61156. }
  61157. return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
  61158. }
  61159. pathToRegexp_1.parse = parse_1;
  61160. pathToRegexp_1.compile = compile_1;
  61161. pathToRegexp_1.tokensToFunction = tokensToFunction_1;
  61162. pathToRegexp_1.tokensToRegExp = tokensToRegExp_1;
  61163. /* */
  61164. // $flow-disable-line
  61165. var regexpCompileCache = Object.create(null);
  61166. function fillParams (
  61167. path,
  61168. params,
  61169. routeMsg
  61170. ) {
  61171. params = params || {};
  61172. try {
  61173. var filler =
  61174. regexpCompileCache[path] ||
  61175. (regexpCompileCache[path] = pathToRegexp_1.compile(path));
  61176. // Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}
  61177. // and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string
  61178. if (typeof params.pathMatch === 'string') { params[0] = params.pathMatch; }
  61179. return filler(params, { pretty: true })
  61180. } catch (e) {
  61181. if (true) {
  61182. // Fix #3072 no warn if `pathMatch` is string
  61183. warn(typeof params.pathMatch === 'string', ("missing param for " + routeMsg + ": " + (e.message)));
  61184. }
  61185. return ''
  61186. } finally {
  61187. // delete the 0 if it was added
  61188. delete params[0];
  61189. }
  61190. }
  61191. /* */
  61192. function normalizeLocation (
  61193. raw,
  61194. current,
  61195. append,
  61196. router
  61197. ) {
  61198. var next = typeof raw === 'string' ? { path: raw } : raw;
  61199. // named target
  61200. if (next._normalized) {
  61201. return next
  61202. } else if (next.name) {
  61203. next = extend({}, raw);
  61204. var params = next.params;
  61205. if (params && typeof params === 'object') {
  61206. next.params = extend({}, params);
  61207. }
  61208. return next
  61209. }
  61210. // relative params
  61211. if (!next.path && next.params && current) {
  61212. next = extend({}, next);
  61213. next._normalized = true;
  61214. var params$1 = extend(extend({}, current.params), next.params);
  61215. if (current.name) {
  61216. next.name = current.name;
  61217. next.params = params$1;
  61218. } else if (current.matched.length) {
  61219. var rawPath = current.matched[current.matched.length - 1].path;
  61220. next.path = fillParams(rawPath, params$1, ("path " + (current.path)));
  61221. } else if (true) {
  61222. warn(false, "relative params navigation requires a current route.");
  61223. }
  61224. return next
  61225. }
  61226. var parsedPath = parsePath(next.path || '');
  61227. var basePath = (current && current.path) || '/';
  61228. var path = parsedPath.path
  61229. ? resolvePath(parsedPath.path, basePath, append || next.append)
  61230. : basePath;
  61231. var query = resolveQuery(
  61232. parsedPath.query,
  61233. next.query,
  61234. router && router.options.parseQuery
  61235. );
  61236. var hash = next.hash || parsedPath.hash;
  61237. if (hash && hash.charAt(0) !== '#') {
  61238. hash = "#" + hash;
  61239. }
  61240. return {
  61241. _normalized: true,
  61242. path: path,
  61243. query: query,
  61244. hash: hash
  61245. }
  61246. }
  61247. /* */
  61248. // work around weird flow bug
  61249. var toTypes = [String, Object];
  61250. var eventTypes = [String, Array];
  61251. var noop = function () {};
  61252. var warnedCustomSlot;
  61253. var warnedTagProp;
  61254. var warnedEventProp;
  61255. var Link = {
  61256. name: 'RouterLink',
  61257. props: {
  61258. to: {
  61259. type: toTypes,
  61260. required: true
  61261. },
  61262. tag: {
  61263. type: String,
  61264. default: 'a'
  61265. },
  61266. custom: Boolean,
  61267. exact: Boolean,
  61268. exactPath: Boolean,
  61269. append: Boolean,
  61270. replace: Boolean,
  61271. activeClass: String,
  61272. exactActiveClass: String,
  61273. ariaCurrentValue: {
  61274. type: String,
  61275. default: 'page'
  61276. },
  61277. event: {
  61278. type: eventTypes,
  61279. default: 'click'
  61280. }
  61281. },
  61282. render: function render (h) {
  61283. var this$1 = this;
  61284. var router = this.$router;
  61285. var current = this.$route;
  61286. var ref = router.resolve(
  61287. this.to,
  61288. current,
  61289. this.append
  61290. );
  61291. var location = ref.location;
  61292. var route = ref.route;
  61293. var href = ref.href;
  61294. var classes = {};
  61295. var globalActiveClass = router.options.linkActiveClass;
  61296. var globalExactActiveClass = router.options.linkExactActiveClass;
  61297. // Support global empty active class
  61298. var activeClassFallback =
  61299. globalActiveClass == null ? 'router-link-active' : globalActiveClass;
  61300. var exactActiveClassFallback =
  61301. globalExactActiveClass == null
  61302. ? 'router-link-exact-active'
  61303. : globalExactActiveClass;
  61304. var activeClass =
  61305. this.activeClass == null ? activeClassFallback : this.activeClass;
  61306. var exactActiveClass =
  61307. this.exactActiveClass == null
  61308. ? exactActiveClassFallback
  61309. : this.exactActiveClass;
  61310. var compareTarget = route.redirectedFrom
  61311. ? createRoute(null, normalizeLocation(route.redirectedFrom), null, router)
  61312. : route;
  61313. classes[exactActiveClass] = isSameRoute(current, compareTarget, this.exactPath);
  61314. classes[activeClass] = this.exact || this.exactPath
  61315. ? classes[exactActiveClass]
  61316. : isIncludedRoute(current, compareTarget);
  61317. var ariaCurrentValue = classes[exactActiveClass] ? this.ariaCurrentValue : null;
  61318. var handler = function (e) {
  61319. if (guardEvent(e)) {
  61320. if (this$1.replace) {
  61321. router.replace(location, noop);
  61322. } else {
  61323. router.push(location, noop);
  61324. }
  61325. }
  61326. };
  61327. var on = { click: guardEvent };
  61328. if (Array.isArray(this.event)) {
  61329. this.event.forEach(function (e) {
  61330. on[e] = handler;
  61331. });
  61332. } else {
  61333. on[this.event] = handler;
  61334. }
  61335. var data = { class: classes };
  61336. var scopedSlot =
  61337. !this.$scopedSlots.$hasNormal &&
  61338. this.$scopedSlots.default &&
  61339. this.$scopedSlots.default({
  61340. href: href,
  61341. route: route,
  61342. navigate: handler,
  61343. isActive: classes[activeClass],
  61344. isExactActive: classes[exactActiveClass]
  61345. });
  61346. if (scopedSlot) {
  61347. if ("development" !== 'production' && !this.custom) {
  61348. !warnedCustomSlot && warn(false, 'In Vue Router 4, the v-slot API will by default wrap its content with an <a> element. Use the custom prop to remove this warning:\n<router-link v-slot="{ navigate, href }" custom></router-link>\n');
  61349. warnedCustomSlot = true;
  61350. }
  61351. if (scopedSlot.length === 1) {
  61352. return scopedSlot[0]
  61353. } else if (scopedSlot.length > 1 || !scopedSlot.length) {
  61354. if (true) {
  61355. warn(
  61356. false,
  61357. ("<router-link> with to=\"" + (this.to) + "\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.")
  61358. );
  61359. }
  61360. return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)
  61361. }
  61362. }
  61363. if (true) {
  61364. if ('tag' in this.$options.propsData && !warnedTagProp) {
  61365. warn(
  61366. false,
  61367. "<router-link>'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link."
  61368. );
  61369. warnedTagProp = true;
  61370. }
  61371. if ('event' in this.$options.propsData && !warnedEventProp) {
  61372. warn(
  61373. false,
  61374. "<router-link>'s event prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link."
  61375. );
  61376. warnedEventProp = true;
  61377. }
  61378. }
  61379. if (this.tag === 'a') {
  61380. data.on = on;
  61381. data.attrs = { href: href, 'aria-current': ariaCurrentValue };
  61382. } else {
  61383. // find the first <a> child and apply listener and href
  61384. var a = findAnchor(this.$slots.default);
  61385. if (a) {
  61386. // in case the <a> is a static node
  61387. a.isStatic = false;
  61388. var aData = (a.data = extend({}, a.data));
  61389. aData.on = aData.on || {};
  61390. // transform existing events in both objects into arrays so we can push later
  61391. for (var event in aData.on) {
  61392. var handler$1 = aData.on[event];
  61393. if (event in on) {
  61394. aData.on[event] = Array.isArray(handler$1) ? handler$1 : [handler$1];
  61395. }
  61396. }
  61397. // append new listeners for router-link
  61398. for (var event$1 in on) {
  61399. if (event$1 in aData.on) {
  61400. // on[event] is always a function
  61401. aData.on[event$1].push(on[event$1]);
  61402. } else {
  61403. aData.on[event$1] = handler;
  61404. }
  61405. }
  61406. var aAttrs = (a.data.attrs = extend({}, a.data.attrs));
  61407. aAttrs.href = href;
  61408. aAttrs['aria-current'] = ariaCurrentValue;
  61409. } else {
  61410. // doesn't have <a> child, apply listener to self
  61411. data.on = on;
  61412. }
  61413. }
  61414. return h(this.tag, data, this.$slots.default)
  61415. }
  61416. };
  61417. function guardEvent (e) {
  61418. // don't redirect with control keys
  61419. if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }
  61420. // don't redirect when preventDefault called
  61421. if (e.defaultPrevented) { return }
  61422. // don't redirect on right click
  61423. if (e.button !== undefined && e.button !== 0) { return }
  61424. // don't redirect if `target="_blank"`
  61425. if (e.currentTarget && e.currentTarget.getAttribute) {
  61426. var target = e.currentTarget.getAttribute('target');
  61427. if (/\b_blank\b/i.test(target)) { return }
  61428. }
  61429. // this may be a Weex event which doesn't have this method
  61430. if (e.preventDefault) {
  61431. e.preventDefault();
  61432. }
  61433. return true
  61434. }
  61435. function findAnchor (children) {
  61436. if (children) {
  61437. var child;
  61438. for (var i = 0; i < children.length; i++) {
  61439. child = children[i];
  61440. if (child.tag === 'a') {
  61441. return child
  61442. }
  61443. if (child.children && (child = findAnchor(child.children))) {
  61444. return child
  61445. }
  61446. }
  61447. }
  61448. }
  61449. var _Vue;
  61450. function install (Vue) {
  61451. if (install.installed && _Vue === Vue) { return }
  61452. install.installed = true;
  61453. _Vue = Vue;
  61454. var isDef = function (v) { return v !== undefined; };
  61455. var registerInstance = function (vm, callVal) {
  61456. var i = vm.$options._parentVnode;
  61457. if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {
  61458. i(vm, callVal);
  61459. }
  61460. };
  61461. Vue.mixin({
  61462. beforeCreate: function beforeCreate () {
  61463. if (isDef(this.$options.router)) {
  61464. this._routerRoot = this;
  61465. this._router = this.$options.router;
  61466. this._router.init(this);
  61467. Vue.util.defineReactive(this, '_route', this._router.history.current);
  61468. } else {
  61469. this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;
  61470. }
  61471. registerInstance(this, this);
  61472. },
  61473. destroyed: function destroyed () {
  61474. registerInstance(this);
  61475. }
  61476. });
  61477. Object.defineProperty(Vue.prototype, '$router', {
  61478. get: function get () { return this._routerRoot._router }
  61479. });
  61480. Object.defineProperty(Vue.prototype, '$route', {
  61481. get: function get () { return this._routerRoot._route }
  61482. });
  61483. Vue.component('RouterView', View);
  61484. Vue.component('RouterLink', Link);
  61485. var strats = Vue.config.optionMergeStrategies;
  61486. // use the same hook merging strategy for route hooks
  61487. strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;
  61488. }
  61489. /* */
  61490. var inBrowser = typeof window !== 'undefined';
  61491. /* */
  61492. function createRouteMap (
  61493. routes,
  61494. oldPathList,
  61495. oldPathMap,
  61496. oldNameMap,
  61497. parentRoute
  61498. ) {
  61499. // the path list is used to control path matching priority
  61500. var pathList = oldPathList || [];
  61501. // $flow-disable-line
  61502. var pathMap = oldPathMap || Object.create(null);
  61503. // $flow-disable-line
  61504. var nameMap = oldNameMap || Object.create(null);
  61505. routes.forEach(function (route) {
  61506. addRouteRecord(pathList, pathMap, nameMap, route, parentRoute);
  61507. });
  61508. // ensure wildcard routes are always at the end
  61509. for (var i = 0, l = pathList.length; i < l; i++) {
  61510. if (pathList[i] === '*') {
  61511. pathList.push(pathList.splice(i, 1)[0]);
  61512. l--;
  61513. i--;
  61514. }
  61515. }
  61516. if (true) {
  61517. // warn if routes do not include leading slashes
  61518. var found = pathList
  61519. // check for missing leading slash
  61520. .filter(function (path) { return path && path.charAt(0) !== '*' && path.charAt(0) !== '/'; });
  61521. if (found.length > 0) {
  61522. var pathNames = found.map(function (path) { return ("- " + path); }).join('\n');
  61523. warn(false, ("Non-nested routes must include a leading slash character. Fix the following routes: \n" + pathNames));
  61524. }
  61525. }
  61526. return {
  61527. pathList: pathList,
  61528. pathMap: pathMap,
  61529. nameMap: nameMap
  61530. }
  61531. }
  61532. function addRouteRecord (
  61533. pathList,
  61534. pathMap,
  61535. nameMap,
  61536. route,
  61537. parent,
  61538. matchAs
  61539. ) {
  61540. var path = route.path;
  61541. var name = route.name;
  61542. if (true) {
  61543. assert(path != null, "\"path\" is required in a route configuration.");
  61544. assert(
  61545. typeof route.component !== 'string',
  61546. "route config \"component\" for path: " + (String(
  61547. path || name
  61548. )) + " cannot be a " + "string id. Use an actual component instead."
  61549. );
  61550. warn(
  61551. // eslint-disable-next-line no-control-regex
  61552. !/[^\u0000-\u007F]+/.test(path),
  61553. "Route with path \"" + path + "\" contains unencoded characters, make sure " +
  61554. "your path is correctly encoded before passing it to the router. Use " +
  61555. "encodeURI to encode static segments of your path."
  61556. );
  61557. }
  61558. var pathToRegexpOptions =
  61559. route.pathToRegexpOptions || {};
  61560. var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);
  61561. if (typeof route.caseSensitive === 'boolean') {
  61562. pathToRegexpOptions.sensitive = route.caseSensitive;
  61563. }
  61564. var record = {
  61565. path: normalizedPath,
  61566. regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),
  61567. components: route.components || { default: route.component },
  61568. alias: route.alias
  61569. ? typeof route.alias === 'string'
  61570. ? [route.alias]
  61571. : route.alias
  61572. : [],
  61573. instances: {},
  61574. enteredCbs: {},
  61575. name: name,
  61576. parent: parent,
  61577. matchAs: matchAs,
  61578. redirect: route.redirect,
  61579. beforeEnter: route.beforeEnter,
  61580. meta: route.meta || {},
  61581. props:
  61582. route.props == null
  61583. ? {}
  61584. : route.components
  61585. ? route.props
  61586. : { default: route.props }
  61587. };
  61588. if (route.children) {
  61589. // Warn if route is named, does not redirect and has a default child route.
  61590. // If users navigate to this route by name, the default child will
  61591. // not be rendered (GH Issue #629)
  61592. if (true) {
  61593. if (
  61594. route.name &&
  61595. !route.redirect &&
  61596. route.children.some(function (child) { return /^\/?$/.test(child.path); })
  61597. ) {
  61598. warn(
  61599. false,
  61600. "Named Route '" + (route.name) + "' has a default child route. " +
  61601. "When navigating to this named route (:to=\"{name: '" + (route.name) + "'\"), " +
  61602. "the default child route will not be rendered. Remove the name from " +
  61603. "this route and use the name of the default child route for named " +
  61604. "links instead."
  61605. );
  61606. }
  61607. }
  61608. route.children.forEach(function (child) {
  61609. var childMatchAs = matchAs
  61610. ? cleanPath((matchAs + "/" + (child.path)))
  61611. : undefined;
  61612. addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);
  61613. });
  61614. }
  61615. if (!pathMap[record.path]) {
  61616. pathList.push(record.path);
  61617. pathMap[record.path] = record;
  61618. }
  61619. if (route.alias !== undefined) {
  61620. var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];
  61621. for (var i = 0; i < aliases.length; ++i) {
  61622. var alias = aliases[i];
  61623. if ("development" !== 'production' && alias === path) {
  61624. warn(
  61625. false,
  61626. ("Found an alias with the same value as the path: \"" + path + "\". You have to remove that alias. It will be ignored in development.")
  61627. );
  61628. // skip in dev to make it work
  61629. continue
  61630. }
  61631. var aliasRoute = {
  61632. path: alias,
  61633. children: route.children
  61634. };
  61635. addRouteRecord(
  61636. pathList,
  61637. pathMap,
  61638. nameMap,
  61639. aliasRoute,
  61640. parent,
  61641. record.path || '/' // matchAs
  61642. );
  61643. }
  61644. }
  61645. if (name) {
  61646. if (!nameMap[name]) {
  61647. nameMap[name] = record;
  61648. } else if ("development" !== 'production' && !matchAs) {
  61649. warn(
  61650. false,
  61651. "Duplicate named routes definition: " +
  61652. "{ name: \"" + name + "\", path: \"" + (record.path) + "\" }"
  61653. );
  61654. }
  61655. }
  61656. }
  61657. function compileRouteRegex (
  61658. path,
  61659. pathToRegexpOptions
  61660. ) {
  61661. var regex = pathToRegexp_1(path, [], pathToRegexpOptions);
  61662. if (true) {
  61663. var keys = Object.create(null);
  61664. regex.keys.forEach(function (key) {
  61665. warn(
  61666. !keys[key.name],
  61667. ("Duplicate param keys in route with path: \"" + path + "\"")
  61668. );
  61669. keys[key.name] = true;
  61670. });
  61671. }
  61672. return regex
  61673. }
  61674. function normalizePath (
  61675. path,
  61676. parent,
  61677. strict
  61678. ) {
  61679. if (!strict) { path = path.replace(/\/$/, ''); }
  61680. if (path[0] === '/') { return path }
  61681. if (parent == null) { return path }
  61682. return cleanPath(((parent.path) + "/" + path))
  61683. }
  61684. /* */
  61685. function createMatcher (
  61686. routes,
  61687. router
  61688. ) {
  61689. var ref = createRouteMap(routes);
  61690. var pathList = ref.pathList;
  61691. var pathMap = ref.pathMap;
  61692. var nameMap = ref.nameMap;
  61693. function addRoutes (routes) {
  61694. createRouteMap(routes, pathList, pathMap, nameMap);
  61695. }
  61696. function addRoute (parentOrRoute, route) {
  61697. var parent = (typeof parentOrRoute !== 'object') ? nameMap[parentOrRoute] : undefined;
  61698. // $flow-disable-line
  61699. createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);
  61700. // add aliases of parent
  61701. if (parent && parent.alias.length) {
  61702. createRouteMap(
  61703. // $flow-disable-line route is defined if parent is
  61704. parent.alias.map(function (alias) { return ({ path: alias, children: [route] }); }),
  61705. pathList,
  61706. pathMap,
  61707. nameMap,
  61708. parent
  61709. );
  61710. }
  61711. }
  61712. function getRoutes () {
  61713. return pathList.map(function (path) { return pathMap[path]; })
  61714. }
  61715. function match (
  61716. raw,
  61717. currentRoute,
  61718. redirectedFrom
  61719. ) {
  61720. var location = normalizeLocation(raw, currentRoute, false, router);
  61721. var name = location.name;
  61722. if (name) {
  61723. var record = nameMap[name];
  61724. if (true) {
  61725. warn(record, ("Route with name '" + name + "' does not exist"));
  61726. }
  61727. if (!record) { return _createRoute(null, location) }
  61728. var paramNames = record.regex.keys
  61729. .filter(function (key) { return !key.optional; })
  61730. .map(function (key) { return key.name; });
  61731. if (typeof location.params !== 'object') {
  61732. location.params = {};
  61733. }
  61734. if (currentRoute && typeof currentRoute.params === 'object') {
  61735. for (var key in currentRoute.params) {
  61736. if (!(key in location.params) && paramNames.indexOf(key) > -1) {
  61737. location.params[key] = currentRoute.params[key];
  61738. }
  61739. }
  61740. }
  61741. location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""));
  61742. return _createRoute(record, location, redirectedFrom)
  61743. } else if (location.path) {
  61744. location.params = {};
  61745. for (var i = 0; i < pathList.length; i++) {
  61746. var path = pathList[i];
  61747. var record$1 = pathMap[path];
  61748. if (matchRoute(record$1.regex, location.path, location.params)) {
  61749. return _createRoute(record$1, location, redirectedFrom)
  61750. }
  61751. }
  61752. }
  61753. // no match
  61754. return _createRoute(null, location)
  61755. }
  61756. function redirect (
  61757. record,
  61758. location
  61759. ) {
  61760. var originalRedirect = record.redirect;
  61761. var redirect = typeof originalRedirect === 'function'
  61762. ? originalRedirect(createRoute(record, location, null, router))
  61763. : originalRedirect;
  61764. if (typeof redirect === 'string') {
  61765. redirect = { path: redirect };
  61766. }
  61767. if (!redirect || typeof redirect !== 'object') {
  61768. if (true) {
  61769. warn(
  61770. false, ("invalid redirect option: " + (JSON.stringify(redirect)))
  61771. );
  61772. }
  61773. return _createRoute(null, location)
  61774. }
  61775. var re = redirect;
  61776. var name = re.name;
  61777. var path = re.path;
  61778. var query = location.query;
  61779. var hash = location.hash;
  61780. var params = location.params;
  61781. query = re.hasOwnProperty('query') ? re.query : query;
  61782. hash = re.hasOwnProperty('hash') ? re.hash : hash;
  61783. params = re.hasOwnProperty('params') ? re.params : params;
  61784. if (name) {
  61785. // resolved named direct
  61786. var targetRecord = nameMap[name];
  61787. if (true) {
  61788. assert(targetRecord, ("redirect failed: named route \"" + name + "\" not found."));
  61789. }
  61790. return match({
  61791. _normalized: true,
  61792. name: name,
  61793. query: query,
  61794. hash: hash,
  61795. params: params
  61796. }, undefined, location)
  61797. } else if (path) {
  61798. // 1. resolve relative redirect
  61799. var rawPath = resolveRecordPath(path, record);
  61800. // 2. resolve params
  61801. var resolvedPath = fillParams(rawPath, params, ("redirect route with path \"" + rawPath + "\""));
  61802. // 3. rematch with existing query and hash
  61803. return match({
  61804. _normalized: true,
  61805. path: resolvedPath,
  61806. query: query,
  61807. hash: hash
  61808. }, undefined, location)
  61809. } else {
  61810. if (true) {
  61811. warn(false, ("invalid redirect option: " + (JSON.stringify(redirect))));
  61812. }
  61813. return _createRoute(null, location)
  61814. }
  61815. }
  61816. function alias (
  61817. record,
  61818. location,
  61819. matchAs
  61820. ) {
  61821. var aliasedPath = fillParams(matchAs, location.params, ("aliased route with path \"" + matchAs + "\""));
  61822. var aliasedMatch = match({
  61823. _normalized: true,
  61824. path: aliasedPath
  61825. });
  61826. if (aliasedMatch) {
  61827. var matched = aliasedMatch.matched;
  61828. var aliasedRecord = matched[matched.length - 1];
  61829. location.params = aliasedMatch.params;
  61830. return _createRoute(aliasedRecord, location)
  61831. }
  61832. return _createRoute(null, location)
  61833. }
  61834. function _createRoute (
  61835. record,
  61836. location,
  61837. redirectedFrom
  61838. ) {
  61839. if (record && record.redirect) {
  61840. return redirect(record, redirectedFrom || location)
  61841. }
  61842. if (record && record.matchAs) {
  61843. return alias(record, location, record.matchAs)
  61844. }
  61845. return createRoute(record, location, redirectedFrom, router)
  61846. }
  61847. return {
  61848. match: match,
  61849. addRoute: addRoute,
  61850. getRoutes: getRoutes,
  61851. addRoutes: addRoutes
  61852. }
  61853. }
  61854. function matchRoute (
  61855. regex,
  61856. path,
  61857. params
  61858. ) {
  61859. var m = path.match(regex);
  61860. if (!m) {
  61861. return false
  61862. } else if (!params) {
  61863. return true
  61864. }
  61865. for (var i = 1, len = m.length; i < len; ++i) {
  61866. var key = regex.keys[i - 1];
  61867. if (key) {
  61868. // Fix #1994: using * with props: true generates a param named 0
  61869. params[key.name || 'pathMatch'] = typeof m[i] === 'string' ? decode(m[i]) : m[i];
  61870. }
  61871. }
  61872. return true
  61873. }
  61874. function resolveRecordPath (path, record) {
  61875. return resolvePath(path, record.parent ? record.parent.path : '/', true)
  61876. }
  61877. /* */
  61878. // use User Timing api (if present) for more accurate key precision
  61879. var Time =
  61880. inBrowser && window.performance && window.performance.now
  61881. ? window.performance
  61882. : Date;
  61883. function genStateKey () {
  61884. return Time.now().toFixed(3)
  61885. }
  61886. var _key = genStateKey();
  61887. function getStateKey () {
  61888. return _key
  61889. }
  61890. function setStateKey (key) {
  61891. return (_key = key)
  61892. }
  61893. /* */
  61894. var positionStore = Object.create(null);
  61895. function setupScroll () {
  61896. // Prevent browser scroll behavior on History popstate
  61897. if ('scrollRestoration' in window.history) {
  61898. window.history.scrollRestoration = 'manual';
  61899. }
  61900. // Fix for #1585 for Firefox
  61901. // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678
  61902. // Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with
  61903. // window.location.protocol + '//' + window.location.host
  61904. // location.host contains the port and location.hostname doesn't
  61905. var protocolAndPath = window.location.protocol + '//' + window.location.host;
  61906. var absolutePath = window.location.href.replace(protocolAndPath, '');
  61907. // preserve existing history state as it could be overriden by the user
  61908. var stateCopy = extend({}, window.history.state);
  61909. stateCopy.key = getStateKey();
  61910. window.history.replaceState(stateCopy, '', absolutePath);
  61911. window.addEventListener('popstate', handlePopState);
  61912. return function () {
  61913. window.removeEventListener('popstate', handlePopState);
  61914. }
  61915. }
  61916. function handleScroll (
  61917. router,
  61918. to,
  61919. from,
  61920. isPop
  61921. ) {
  61922. if (!router.app) {
  61923. return
  61924. }
  61925. var behavior = router.options.scrollBehavior;
  61926. if (!behavior) {
  61927. return
  61928. }
  61929. if (true) {
  61930. assert(typeof behavior === 'function', "scrollBehavior must be a function");
  61931. }
  61932. // wait until re-render finishes before scrolling
  61933. router.app.$nextTick(function () {
  61934. var position = getScrollPosition();
  61935. var shouldScroll = behavior.call(
  61936. router,
  61937. to,
  61938. from,
  61939. isPop ? position : null
  61940. );
  61941. if (!shouldScroll) {
  61942. return
  61943. }
  61944. if (typeof shouldScroll.then === 'function') {
  61945. shouldScroll
  61946. .then(function (shouldScroll) {
  61947. scrollToPosition((shouldScroll), position);
  61948. })
  61949. .catch(function (err) {
  61950. if (true) {
  61951. assert(false, err.toString());
  61952. }
  61953. });
  61954. } else {
  61955. scrollToPosition(shouldScroll, position);
  61956. }
  61957. });
  61958. }
  61959. function saveScrollPosition () {
  61960. var key = getStateKey();
  61961. if (key) {
  61962. positionStore[key] = {
  61963. x: window.pageXOffset,
  61964. y: window.pageYOffset
  61965. };
  61966. }
  61967. }
  61968. function handlePopState (e) {
  61969. saveScrollPosition();
  61970. if (e.state && e.state.key) {
  61971. setStateKey(e.state.key);
  61972. }
  61973. }
  61974. function getScrollPosition () {
  61975. var key = getStateKey();
  61976. if (key) {
  61977. return positionStore[key]
  61978. }
  61979. }
  61980. function getElementPosition (el, offset) {
  61981. var docEl = document.documentElement;
  61982. var docRect = docEl.getBoundingClientRect();
  61983. var elRect = el.getBoundingClientRect();
  61984. return {
  61985. x: elRect.left - docRect.left - offset.x,
  61986. y: elRect.top - docRect.top - offset.y
  61987. }
  61988. }
  61989. function isValidPosition (obj) {
  61990. return isNumber(obj.x) || isNumber(obj.y)
  61991. }
  61992. function normalizePosition (obj) {
  61993. return {
  61994. x: isNumber(obj.x) ? obj.x : window.pageXOffset,
  61995. y: isNumber(obj.y) ? obj.y : window.pageYOffset
  61996. }
  61997. }
  61998. function normalizeOffset (obj) {
  61999. return {
  62000. x: isNumber(obj.x) ? obj.x : 0,
  62001. y: isNumber(obj.y) ? obj.y : 0
  62002. }
  62003. }
  62004. function isNumber (v) {
  62005. return typeof v === 'number'
  62006. }
  62007. var hashStartsWithNumberRE = /^#\d/;
  62008. function scrollToPosition (shouldScroll, position) {
  62009. var isObject = typeof shouldScroll === 'object';
  62010. if (isObject && typeof shouldScroll.selector === 'string') {
  62011. // getElementById would still fail if the selector contains a more complicated query like #main[data-attr]
  62012. // but at the same time, it doesn't make much sense to select an element with an id and an extra selector
  62013. var el = hashStartsWithNumberRE.test(shouldScroll.selector) // $flow-disable-line
  62014. ? document.getElementById(shouldScroll.selector.slice(1)) // $flow-disable-line
  62015. : document.querySelector(shouldScroll.selector);
  62016. if (el) {
  62017. var offset =
  62018. shouldScroll.offset && typeof shouldScroll.offset === 'object'
  62019. ? shouldScroll.offset
  62020. : {};
  62021. offset = normalizeOffset(offset);
  62022. position = getElementPosition(el, offset);
  62023. } else if (isValidPosition(shouldScroll)) {
  62024. position = normalizePosition(shouldScroll);
  62025. }
  62026. } else if (isObject && isValidPosition(shouldScroll)) {
  62027. position = normalizePosition(shouldScroll);
  62028. }
  62029. if (position) {
  62030. // $flow-disable-line
  62031. if ('scrollBehavior' in document.documentElement.style) {
  62032. window.scrollTo({
  62033. left: position.x,
  62034. top: position.y,
  62035. // $flow-disable-line
  62036. behavior: shouldScroll.behavior
  62037. });
  62038. } else {
  62039. window.scrollTo(position.x, position.y);
  62040. }
  62041. }
  62042. }
  62043. /* */
  62044. var supportsPushState =
  62045. inBrowser &&
  62046. (function () {
  62047. var ua = window.navigator.userAgent;
  62048. if (
  62049. (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&
  62050. ua.indexOf('Mobile Safari') !== -1 &&
  62051. ua.indexOf('Chrome') === -1 &&
  62052. ua.indexOf('Windows Phone') === -1
  62053. ) {
  62054. return false
  62055. }
  62056. return window.history && typeof window.history.pushState === 'function'
  62057. })();
  62058. function pushState (url, replace) {
  62059. saveScrollPosition();
  62060. // try...catch the pushState call to get around Safari
  62061. // DOM Exception 18 where it limits to 100 pushState calls
  62062. var history = window.history;
  62063. try {
  62064. if (replace) {
  62065. // preserve existing history state as it could be overriden by the user
  62066. var stateCopy = extend({}, history.state);
  62067. stateCopy.key = getStateKey();
  62068. history.replaceState(stateCopy, '', url);
  62069. } else {
  62070. history.pushState({ key: setStateKey(genStateKey()) }, '', url);
  62071. }
  62072. } catch (e) {
  62073. window.location[replace ? 'replace' : 'assign'](url);
  62074. }
  62075. }
  62076. function replaceState (url) {
  62077. pushState(url, true);
  62078. }
  62079. /* */
  62080. function runQueue (queue, fn, cb) {
  62081. var step = function (index) {
  62082. if (index >= queue.length) {
  62083. cb();
  62084. } else {
  62085. if (queue[index]) {
  62086. fn(queue[index], function () {
  62087. step(index + 1);
  62088. });
  62089. } else {
  62090. step(index + 1);
  62091. }
  62092. }
  62093. };
  62094. step(0);
  62095. }
  62096. // When changing thing, also edit router.d.ts
  62097. var NavigationFailureType = {
  62098. redirected: 2,
  62099. aborted: 4,
  62100. cancelled: 8,
  62101. duplicated: 16
  62102. };
  62103. function createNavigationRedirectedError (from, to) {
  62104. return createRouterError(
  62105. from,
  62106. to,
  62107. NavigationFailureType.redirected,
  62108. ("Redirected when going from \"" + (from.fullPath) + "\" to \"" + (stringifyRoute(
  62109. to
  62110. )) + "\" via a navigation guard.")
  62111. )
  62112. }
  62113. function createNavigationDuplicatedError (from, to) {
  62114. var error = createRouterError(
  62115. from,
  62116. to,
  62117. NavigationFailureType.duplicated,
  62118. ("Avoided redundant navigation to current location: \"" + (from.fullPath) + "\".")
  62119. );
  62120. // backwards compatible with the first introduction of Errors
  62121. error.name = 'NavigationDuplicated';
  62122. return error
  62123. }
  62124. function createNavigationCancelledError (from, to) {
  62125. return createRouterError(
  62126. from,
  62127. to,
  62128. NavigationFailureType.cancelled,
  62129. ("Navigation cancelled from \"" + (from.fullPath) + "\" to \"" + (to.fullPath) + "\" with a new navigation.")
  62130. )
  62131. }
  62132. function createNavigationAbortedError (from, to) {
  62133. return createRouterError(
  62134. from,
  62135. to,
  62136. NavigationFailureType.aborted,
  62137. ("Navigation aborted from \"" + (from.fullPath) + "\" to \"" + (to.fullPath) + "\" via a navigation guard.")
  62138. )
  62139. }
  62140. function createRouterError (from, to, type, message) {
  62141. var error = new Error(message);
  62142. error._isRouter = true;
  62143. error.from = from;
  62144. error.to = to;
  62145. error.type = type;
  62146. return error
  62147. }
  62148. var propertiesToLog = ['params', 'query', 'hash'];
  62149. function stringifyRoute (to) {
  62150. if (typeof to === 'string') { return to }
  62151. if ('path' in to) { return to.path }
  62152. var location = {};
  62153. propertiesToLog.forEach(function (key) {
  62154. if (key in to) { location[key] = to[key]; }
  62155. });
  62156. return JSON.stringify(location, null, 2)
  62157. }
  62158. function isError (err) {
  62159. return Object.prototype.toString.call(err).indexOf('Error') > -1
  62160. }
  62161. function isNavigationFailure (err, errorType) {
  62162. return (
  62163. isError(err) &&
  62164. err._isRouter &&
  62165. (errorType == null || err.type === errorType)
  62166. )
  62167. }
  62168. /* */
  62169. function resolveAsyncComponents (matched) {
  62170. return function (to, from, next) {
  62171. var hasAsync = false;
  62172. var pending = 0;
  62173. var error = null;
  62174. flatMapComponents(matched, function (def, _, match, key) {
  62175. // if it's a function and doesn't have cid attached,
  62176. // assume it's an async component resolve function.
  62177. // we are not using Vue's default async resolving mechanism because
  62178. // we want to halt the navigation until the incoming component has been
  62179. // resolved.
  62180. if (typeof def === 'function' && def.cid === undefined) {
  62181. hasAsync = true;
  62182. pending++;
  62183. var resolve = once(function (resolvedDef) {
  62184. if (isESModule(resolvedDef)) {
  62185. resolvedDef = resolvedDef.default;
  62186. }
  62187. // save resolved on async factory in case it's used elsewhere
  62188. def.resolved = typeof resolvedDef === 'function'
  62189. ? resolvedDef
  62190. : _Vue.extend(resolvedDef);
  62191. match.components[key] = resolvedDef;
  62192. pending--;
  62193. if (pending <= 0) {
  62194. next();
  62195. }
  62196. });
  62197. var reject = once(function (reason) {
  62198. var msg = "Failed to resolve async component " + key + ": " + reason;
  62199. "development" !== 'production' && warn(false, msg);
  62200. if (!error) {
  62201. error = isError(reason)
  62202. ? reason
  62203. : new Error(msg);
  62204. next(error);
  62205. }
  62206. });
  62207. var res;
  62208. try {
  62209. res = def(resolve, reject);
  62210. } catch (e) {
  62211. reject(e);
  62212. }
  62213. if (res) {
  62214. if (typeof res.then === 'function') {
  62215. res.then(resolve, reject);
  62216. } else {
  62217. // new syntax in Vue 2.3
  62218. var comp = res.component;
  62219. if (comp && typeof comp.then === 'function') {
  62220. comp.then(resolve, reject);
  62221. }
  62222. }
  62223. }
  62224. }
  62225. });
  62226. if (!hasAsync) { next(); }
  62227. }
  62228. }
  62229. function flatMapComponents (
  62230. matched,
  62231. fn
  62232. ) {
  62233. return flatten(matched.map(function (m) {
  62234. return Object.keys(m.components).map(function (key) { return fn(
  62235. m.components[key],
  62236. m.instances[key],
  62237. m, key
  62238. ); })
  62239. }))
  62240. }
  62241. function flatten (arr) {
  62242. return Array.prototype.concat.apply([], arr)
  62243. }
  62244. var hasSymbol =
  62245. typeof Symbol === 'function' &&
  62246. typeof Symbol.toStringTag === 'symbol';
  62247. function isESModule (obj) {
  62248. return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module')
  62249. }
  62250. // in Webpack 2, require.ensure now also returns a Promise
  62251. // so the resolve/reject functions may get called an extra time
  62252. // if the user uses an arrow function shorthand that happens to
  62253. // return that Promise.
  62254. function once (fn) {
  62255. var called = false;
  62256. return function () {
  62257. var args = [], len = arguments.length;
  62258. while ( len-- ) args[ len ] = arguments[ len ];
  62259. if (called) { return }
  62260. called = true;
  62261. return fn.apply(this, args)
  62262. }
  62263. }
  62264. /* */
  62265. var History = function History (router, base) {
  62266. this.router = router;
  62267. this.base = normalizeBase(base);
  62268. // start with a route object that stands for "nowhere"
  62269. this.current = START;
  62270. this.pending = null;
  62271. this.ready = false;
  62272. this.readyCbs = [];
  62273. this.readyErrorCbs = [];
  62274. this.errorCbs = [];
  62275. this.listeners = [];
  62276. };
  62277. History.prototype.listen = function listen (cb) {
  62278. this.cb = cb;
  62279. };
  62280. History.prototype.onReady = function onReady (cb, errorCb) {
  62281. if (this.ready) {
  62282. cb();
  62283. } else {
  62284. this.readyCbs.push(cb);
  62285. if (errorCb) {
  62286. this.readyErrorCbs.push(errorCb);
  62287. }
  62288. }
  62289. };
  62290. History.prototype.onError = function onError (errorCb) {
  62291. this.errorCbs.push(errorCb);
  62292. };
  62293. History.prototype.transitionTo = function transitionTo (
  62294. location,
  62295. onComplete,
  62296. onAbort
  62297. ) {
  62298. var this$1 = this;
  62299. var route;
  62300. // catch redirect option https://github.com/vuejs/vue-router/issues/3201
  62301. try {
  62302. route = this.router.match(location, this.current);
  62303. } catch (e) {
  62304. this.errorCbs.forEach(function (cb) {
  62305. cb(e);
  62306. });
  62307. // Exception should still be thrown
  62308. throw e
  62309. }
  62310. var prev = this.current;
  62311. this.confirmTransition(
  62312. route,
  62313. function () {
  62314. this$1.updateRoute(route);
  62315. onComplete && onComplete(route);
  62316. this$1.ensureURL();
  62317. this$1.router.afterHooks.forEach(function (hook) {
  62318. hook && hook(route, prev);
  62319. });
  62320. // fire ready cbs once
  62321. if (!this$1.ready) {
  62322. this$1.ready = true;
  62323. this$1.readyCbs.forEach(function (cb) {
  62324. cb(route);
  62325. });
  62326. }
  62327. },
  62328. function (err) {
  62329. if (onAbort) {
  62330. onAbort(err);
  62331. }
  62332. if (err && !this$1.ready) {
  62333. // Initial redirection should not mark the history as ready yet
  62334. // because it's triggered by the redirection instead
  62335. // https://github.com/vuejs/vue-router/issues/3225
  62336. // https://github.com/vuejs/vue-router/issues/3331
  62337. if (!isNavigationFailure(err, NavigationFailureType.redirected) || prev !== START) {
  62338. this$1.ready = true;
  62339. this$1.readyErrorCbs.forEach(function (cb) {
  62340. cb(err);
  62341. });
  62342. }
  62343. }
  62344. }
  62345. );
  62346. };
  62347. History.prototype.confirmTransition = function confirmTransition (route, onComplete, onAbort) {
  62348. var this$1 = this;
  62349. var current = this.current;
  62350. this.pending = route;
  62351. var abort = function (err) {
  62352. // changed after adding errors with
  62353. // https://github.com/vuejs/vue-router/pull/3047 before that change,
  62354. // redirect and aborted navigation would produce an err == null
  62355. if (!isNavigationFailure(err) && isError(err)) {
  62356. if (this$1.errorCbs.length) {
  62357. this$1.errorCbs.forEach(function (cb) {
  62358. cb(err);
  62359. });
  62360. } else {
  62361. if (true) {
  62362. warn(false, 'uncaught error during route navigation:');
  62363. }
  62364. console.error(err);
  62365. }
  62366. }
  62367. onAbort && onAbort(err);
  62368. };
  62369. var lastRouteIndex = route.matched.length - 1;
  62370. var lastCurrentIndex = current.matched.length - 1;
  62371. if (
  62372. isSameRoute(route, current) &&
  62373. // in the case the route map has been dynamically appended to
  62374. lastRouteIndex === lastCurrentIndex &&
  62375. route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]
  62376. ) {
  62377. this.ensureURL();
  62378. if (route.hash) {
  62379. handleScroll(this.router, current, route, false);
  62380. }
  62381. return abort(createNavigationDuplicatedError(current, route))
  62382. }
  62383. var ref = resolveQueue(
  62384. this.current.matched,
  62385. route.matched
  62386. );
  62387. var updated = ref.updated;
  62388. var deactivated = ref.deactivated;
  62389. var activated = ref.activated;
  62390. var queue = [].concat(
  62391. // in-component leave guards
  62392. extractLeaveGuards(deactivated),
  62393. // global before hooks
  62394. this.router.beforeHooks,
  62395. // in-component update hooks
  62396. extractUpdateHooks(updated),
  62397. // in-config enter guards
  62398. activated.map(function (m) { return m.beforeEnter; }),
  62399. // async components
  62400. resolveAsyncComponents(activated)
  62401. );
  62402. var iterator = function (hook, next) {
  62403. if (this$1.pending !== route) {
  62404. return abort(createNavigationCancelledError(current, route))
  62405. }
  62406. try {
  62407. hook(route, current, function (to) {
  62408. if (to === false) {
  62409. // next(false) -> abort navigation, ensure current URL
  62410. this$1.ensureURL(true);
  62411. abort(createNavigationAbortedError(current, route));
  62412. } else if (isError(to)) {
  62413. this$1.ensureURL(true);
  62414. abort(to);
  62415. } else if (
  62416. typeof to === 'string' ||
  62417. (typeof to === 'object' &&
  62418. (typeof to.path === 'string' || typeof to.name === 'string'))
  62419. ) {
  62420. // next('/') or next({ path: '/' }) -> redirect
  62421. abort(createNavigationRedirectedError(current, route));
  62422. if (typeof to === 'object' && to.replace) {
  62423. this$1.replace(to);
  62424. } else {
  62425. this$1.push(to);
  62426. }
  62427. } else {
  62428. // confirm transition and pass on the value
  62429. next(to);
  62430. }
  62431. });
  62432. } catch (e) {
  62433. abort(e);
  62434. }
  62435. };
  62436. runQueue(queue, iterator, function () {
  62437. // wait until async components are resolved before
  62438. // extracting in-component enter guards
  62439. var enterGuards = extractEnterGuards(activated);
  62440. var queue = enterGuards.concat(this$1.router.resolveHooks);
  62441. runQueue(queue, iterator, function () {
  62442. if (this$1.pending !== route) {
  62443. return abort(createNavigationCancelledError(current, route))
  62444. }
  62445. this$1.pending = null;
  62446. onComplete(route);
  62447. if (this$1.router.app) {
  62448. this$1.router.app.$nextTick(function () {
  62449. handleRouteEntered(route);
  62450. });
  62451. }
  62452. });
  62453. });
  62454. };
  62455. History.prototype.updateRoute = function updateRoute (route) {
  62456. this.current = route;
  62457. this.cb && this.cb(route);
  62458. };
  62459. History.prototype.setupListeners = function setupListeners () {
  62460. // Default implementation is empty
  62461. };
  62462. History.prototype.teardown = function teardown () {
  62463. // clean up event listeners
  62464. // https://github.com/vuejs/vue-router/issues/2341
  62465. this.listeners.forEach(function (cleanupListener) {
  62466. cleanupListener();
  62467. });
  62468. this.listeners = [];
  62469. // reset current history route
  62470. // https://github.com/vuejs/vue-router/issues/3294
  62471. this.current = START;
  62472. this.pending = null;
  62473. };
  62474. function normalizeBase (base) {
  62475. if (!base) {
  62476. if (inBrowser) {
  62477. // respect <base> tag
  62478. var baseEl = document.querySelector('base');
  62479. base = (baseEl && baseEl.getAttribute('href')) || '/';
  62480. // strip full URL origin
  62481. base = base.replace(/^https?:\/\/[^\/]+/, '');
  62482. } else {
  62483. base = '/';
  62484. }
  62485. }
  62486. // make sure there's the starting slash
  62487. if (base.charAt(0) !== '/') {
  62488. base = '/' + base;
  62489. }
  62490. // remove trailing slash
  62491. return base.replace(/\/$/, '')
  62492. }
  62493. function resolveQueue (
  62494. current,
  62495. next
  62496. ) {
  62497. var i;
  62498. var max = Math.max(current.length, next.length);
  62499. for (i = 0; i < max; i++) {
  62500. if (current[i] !== next[i]) {
  62501. break
  62502. }
  62503. }
  62504. return {
  62505. updated: next.slice(0, i),
  62506. activated: next.slice(i),
  62507. deactivated: current.slice(i)
  62508. }
  62509. }
  62510. function extractGuards (
  62511. records,
  62512. name,
  62513. bind,
  62514. reverse
  62515. ) {
  62516. var guards = flatMapComponents(records, function (def, instance, match, key) {
  62517. var guard = extractGuard(def, name);
  62518. if (guard) {
  62519. return Array.isArray(guard)
  62520. ? guard.map(function (guard) { return bind(guard, instance, match, key); })
  62521. : bind(guard, instance, match, key)
  62522. }
  62523. });
  62524. return flatten(reverse ? guards.reverse() : guards)
  62525. }
  62526. function extractGuard (
  62527. def,
  62528. key
  62529. ) {
  62530. if (typeof def !== 'function') {
  62531. // extend now so that global mixins are applied.
  62532. def = _Vue.extend(def);
  62533. }
  62534. return def.options[key]
  62535. }
  62536. function extractLeaveGuards (deactivated) {
  62537. return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true)
  62538. }
  62539. function extractUpdateHooks (updated) {
  62540. return extractGuards(updated, 'beforeRouteUpdate', bindGuard)
  62541. }
  62542. function bindGuard (guard, instance) {
  62543. if (instance) {
  62544. return function boundRouteGuard () {
  62545. return guard.apply(instance, arguments)
  62546. }
  62547. }
  62548. }
  62549. function extractEnterGuards (
  62550. activated
  62551. ) {
  62552. return extractGuards(
  62553. activated,
  62554. 'beforeRouteEnter',
  62555. function (guard, _, match, key) {
  62556. return bindEnterGuard(guard, match, key)
  62557. }
  62558. )
  62559. }
  62560. function bindEnterGuard (
  62561. guard,
  62562. match,
  62563. key
  62564. ) {
  62565. return function routeEnterGuard (to, from, next) {
  62566. return guard(to, from, function (cb) {
  62567. if (typeof cb === 'function') {
  62568. if (!match.enteredCbs[key]) {
  62569. match.enteredCbs[key] = [];
  62570. }
  62571. match.enteredCbs[key].push(cb);
  62572. }
  62573. next(cb);
  62574. })
  62575. }
  62576. }
  62577. /* */
  62578. var HTML5History = /*@__PURE__*/(function (History) {
  62579. function HTML5History (router, base) {
  62580. History.call(this, router, base);
  62581. this._startLocation = getLocation(this.base);
  62582. }
  62583. if ( History ) HTML5History.__proto__ = History;
  62584. HTML5History.prototype = Object.create( History && History.prototype );
  62585. HTML5History.prototype.constructor = HTML5History;
  62586. HTML5History.prototype.setupListeners = function setupListeners () {
  62587. var this$1 = this;
  62588. if (this.listeners.length > 0) {
  62589. return
  62590. }
  62591. var router = this.router;
  62592. var expectScroll = router.options.scrollBehavior;
  62593. var supportsScroll = supportsPushState && expectScroll;
  62594. if (supportsScroll) {
  62595. this.listeners.push(setupScroll());
  62596. }
  62597. var handleRoutingEvent = function () {
  62598. var current = this$1.current;
  62599. // Avoiding first `popstate` event dispatched in some browsers but first
  62600. // history route not updated since async guard at the same time.
  62601. var location = getLocation(this$1.base);
  62602. if (this$1.current === START && location === this$1._startLocation) {
  62603. return
  62604. }
  62605. this$1.transitionTo(location, function (route) {
  62606. if (supportsScroll) {
  62607. handleScroll(router, route, current, true);
  62608. }
  62609. });
  62610. };
  62611. window.addEventListener('popstate', handleRoutingEvent);
  62612. this.listeners.push(function () {
  62613. window.removeEventListener('popstate', handleRoutingEvent);
  62614. });
  62615. };
  62616. HTML5History.prototype.go = function go (n) {
  62617. window.history.go(n);
  62618. };
  62619. HTML5History.prototype.push = function push (location, onComplete, onAbort) {
  62620. var this$1 = this;
  62621. var ref = this;
  62622. var fromRoute = ref.current;
  62623. this.transitionTo(location, function (route) {
  62624. pushState(cleanPath(this$1.base + route.fullPath));
  62625. handleScroll(this$1.router, route, fromRoute, false);
  62626. onComplete && onComplete(route);
  62627. }, onAbort);
  62628. };
  62629. HTML5History.prototype.replace = function replace (location, onComplete, onAbort) {
  62630. var this$1 = this;
  62631. var ref = this;
  62632. var fromRoute = ref.current;
  62633. this.transitionTo(location, function (route) {
  62634. replaceState(cleanPath(this$1.base + route.fullPath));
  62635. handleScroll(this$1.router, route, fromRoute, false);
  62636. onComplete && onComplete(route);
  62637. }, onAbort);
  62638. };
  62639. HTML5History.prototype.ensureURL = function ensureURL (push) {
  62640. if (getLocation(this.base) !== this.current.fullPath) {
  62641. var current = cleanPath(this.base + this.current.fullPath);
  62642. push ? pushState(current) : replaceState(current);
  62643. }
  62644. };
  62645. HTML5History.prototype.getCurrentLocation = function getCurrentLocation () {
  62646. return getLocation(this.base)
  62647. };
  62648. return HTML5History;
  62649. }(History));
  62650. function getLocation (base) {
  62651. var path = window.location.pathname;
  62652. var pathLowerCase = path.toLowerCase();
  62653. var baseLowerCase = base.toLowerCase();
  62654. // base="/a" shouldn't turn path="/app" into "/a/pp"
  62655. // https://github.com/vuejs/vue-router/issues/3555
  62656. // so we ensure the trailing slash in the base
  62657. if (base && ((pathLowerCase === baseLowerCase) ||
  62658. (pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {
  62659. path = path.slice(base.length);
  62660. }
  62661. return (path || '/') + window.location.search + window.location.hash
  62662. }
  62663. /* */
  62664. var HashHistory = /*@__PURE__*/(function (History) {
  62665. function HashHistory (router, base, fallback) {
  62666. History.call(this, router, base);
  62667. // check history fallback deeplinking
  62668. if (fallback && checkFallback(this.base)) {
  62669. return
  62670. }
  62671. ensureSlash();
  62672. }
  62673. if ( History ) HashHistory.__proto__ = History;
  62674. HashHistory.prototype = Object.create( History && History.prototype );
  62675. HashHistory.prototype.constructor = HashHistory;
  62676. // this is delayed until the app mounts
  62677. // to avoid the hashchange listener being fired too early
  62678. HashHistory.prototype.setupListeners = function setupListeners () {
  62679. var this$1 = this;
  62680. if (this.listeners.length > 0) {
  62681. return
  62682. }
  62683. var router = this.router;
  62684. var expectScroll = router.options.scrollBehavior;
  62685. var supportsScroll = supportsPushState && expectScroll;
  62686. if (supportsScroll) {
  62687. this.listeners.push(setupScroll());
  62688. }
  62689. var handleRoutingEvent = function () {
  62690. var current = this$1.current;
  62691. if (!ensureSlash()) {
  62692. return
  62693. }
  62694. this$1.transitionTo(getHash(), function (route) {
  62695. if (supportsScroll) {
  62696. handleScroll(this$1.router, route, current, true);
  62697. }
  62698. if (!supportsPushState) {
  62699. replaceHash(route.fullPath);
  62700. }
  62701. });
  62702. };
  62703. var eventType = supportsPushState ? 'popstate' : 'hashchange';
  62704. window.addEventListener(
  62705. eventType,
  62706. handleRoutingEvent
  62707. );
  62708. this.listeners.push(function () {
  62709. window.removeEventListener(eventType, handleRoutingEvent);
  62710. });
  62711. };
  62712. HashHistory.prototype.push = function push (location, onComplete, onAbort) {
  62713. var this$1 = this;
  62714. var ref = this;
  62715. var fromRoute = ref.current;
  62716. this.transitionTo(
  62717. location,
  62718. function (route) {
  62719. pushHash(route.fullPath);
  62720. handleScroll(this$1.router, route, fromRoute, false);
  62721. onComplete && onComplete(route);
  62722. },
  62723. onAbort
  62724. );
  62725. };
  62726. HashHistory.prototype.replace = function replace (location, onComplete, onAbort) {
  62727. var this$1 = this;
  62728. var ref = this;
  62729. var fromRoute = ref.current;
  62730. this.transitionTo(
  62731. location,
  62732. function (route) {
  62733. replaceHash(route.fullPath);
  62734. handleScroll(this$1.router, route, fromRoute, false);
  62735. onComplete && onComplete(route);
  62736. },
  62737. onAbort
  62738. );
  62739. };
  62740. HashHistory.prototype.go = function go (n) {
  62741. window.history.go(n);
  62742. };
  62743. HashHistory.prototype.ensureURL = function ensureURL (push) {
  62744. var current = this.current.fullPath;
  62745. if (getHash() !== current) {
  62746. push ? pushHash(current) : replaceHash(current);
  62747. }
  62748. };
  62749. HashHistory.prototype.getCurrentLocation = function getCurrentLocation () {
  62750. return getHash()
  62751. };
  62752. return HashHistory;
  62753. }(History));
  62754. function checkFallback (base) {
  62755. var location = getLocation(base);
  62756. if (!/^\/#/.test(location)) {
  62757. window.location.replace(cleanPath(base + '/#' + location));
  62758. return true
  62759. }
  62760. }
  62761. function ensureSlash () {
  62762. var path = getHash();
  62763. if (path.charAt(0) === '/') {
  62764. return true
  62765. }
  62766. replaceHash('/' + path);
  62767. return false
  62768. }
  62769. function getHash () {
  62770. // We can't use window.location.hash here because it's not
  62771. // consistent across browsers - Firefox will pre-decode it!
  62772. var href = window.location.href;
  62773. var index = href.indexOf('#');
  62774. // empty path
  62775. if (index < 0) { return '' }
  62776. href = href.slice(index + 1);
  62777. return href
  62778. }
  62779. function getUrl (path) {
  62780. var href = window.location.href;
  62781. var i = href.indexOf('#');
  62782. var base = i >= 0 ? href.slice(0, i) : href;
  62783. return (base + "#" + path)
  62784. }
  62785. function pushHash (path) {
  62786. if (supportsPushState) {
  62787. pushState(getUrl(path));
  62788. } else {
  62789. window.location.hash = path;
  62790. }
  62791. }
  62792. function replaceHash (path) {
  62793. if (supportsPushState) {
  62794. replaceState(getUrl(path));
  62795. } else {
  62796. window.location.replace(getUrl(path));
  62797. }
  62798. }
  62799. /* */
  62800. var AbstractHistory = /*@__PURE__*/(function (History) {
  62801. function AbstractHistory (router, base) {
  62802. History.call(this, router, base);
  62803. this.stack = [];
  62804. this.index = -1;
  62805. }
  62806. if ( History ) AbstractHistory.__proto__ = History;
  62807. AbstractHistory.prototype = Object.create( History && History.prototype );
  62808. AbstractHistory.prototype.constructor = AbstractHistory;
  62809. AbstractHistory.prototype.push = function push (location, onComplete, onAbort) {
  62810. var this$1 = this;
  62811. this.transitionTo(
  62812. location,
  62813. function (route) {
  62814. this$1.stack = this$1.stack.slice(0, this$1.index + 1).concat(route);
  62815. this$1.index++;
  62816. onComplete && onComplete(route);
  62817. },
  62818. onAbort
  62819. );
  62820. };
  62821. AbstractHistory.prototype.replace = function replace (location, onComplete, onAbort) {
  62822. var this$1 = this;
  62823. this.transitionTo(
  62824. location,
  62825. function (route) {
  62826. this$1.stack = this$1.stack.slice(0, this$1.index).concat(route);
  62827. onComplete && onComplete(route);
  62828. },
  62829. onAbort
  62830. );
  62831. };
  62832. AbstractHistory.prototype.go = function go (n) {
  62833. var this$1 = this;
  62834. var targetIndex = this.index + n;
  62835. if (targetIndex < 0 || targetIndex >= this.stack.length) {
  62836. return
  62837. }
  62838. var route = this.stack[targetIndex];
  62839. this.confirmTransition(
  62840. route,
  62841. function () {
  62842. var prev = this$1.current;
  62843. this$1.index = targetIndex;
  62844. this$1.updateRoute(route);
  62845. this$1.router.afterHooks.forEach(function (hook) {
  62846. hook && hook(route, prev);
  62847. });
  62848. },
  62849. function (err) {
  62850. if (isNavigationFailure(err, NavigationFailureType.duplicated)) {
  62851. this$1.index = targetIndex;
  62852. }
  62853. }
  62854. );
  62855. };
  62856. AbstractHistory.prototype.getCurrentLocation = function getCurrentLocation () {
  62857. var current = this.stack[this.stack.length - 1];
  62858. return current ? current.fullPath : '/'
  62859. };
  62860. AbstractHistory.prototype.ensureURL = function ensureURL () {
  62861. // noop
  62862. };
  62863. return AbstractHistory;
  62864. }(History));
  62865. /* */
  62866. var VueRouter = function VueRouter (options) {
  62867. if ( options === void 0 ) options = {};
  62868. if (true) {
  62869. warn(this instanceof VueRouter, "Router must be called with the new operator.");
  62870. }
  62871. this.app = null;
  62872. this.apps = [];
  62873. this.options = options;
  62874. this.beforeHooks = [];
  62875. this.resolveHooks = [];
  62876. this.afterHooks = [];
  62877. this.matcher = createMatcher(options.routes || [], this);
  62878. var mode = options.mode || 'hash';
  62879. this.fallback =
  62880. mode === 'history' && !supportsPushState && options.fallback !== false;
  62881. if (this.fallback) {
  62882. mode = 'hash';
  62883. }
  62884. if (!inBrowser) {
  62885. mode = 'abstract';
  62886. }
  62887. this.mode = mode;
  62888. switch (mode) {
  62889. case 'history':
  62890. this.history = new HTML5History(this, options.base);
  62891. break
  62892. case 'hash':
  62893. this.history = new HashHistory(this, options.base, this.fallback);
  62894. break
  62895. case 'abstract':
  62896. this.history = new AbstractHistory(this, options.base);
  62897. break
  62898. default:
  62899. if (true) {
  62900. assert(false, ("invalid mode: " + mode));
  62901. }
  62902. }
  62903. };
  62904. var prototypeAccessors = { currentRoute: { configurable: true } };
  62905. VueRouter.prototype.match = function match (raw, current, redirectedFrom) {
  62906. return this.matcher.match(raw, current, redirectedFrom)
  62907. };
  62908. prototypeAccessors.currentRoute.get = function () {
  62909. return this.history && this.history.current
  62910. };
  62911. VueRouter.prototype.init = function init (app /* Vue component instance */) {
  62912. var this$1 = this;
  62913. "development" !== 'production' &&
  62914. assert(
  62915. install.installed,
  62916. "not installed. Make sure to call `Vue.use(VueRouter)` " +
  62917. "before creating root instance."
  62918. );
  62919. this.apps.push(app);
  62920. // set up app destroyed handler
  62921. // https://github.com/vuejs/vue-router/issues/2639
  62922. app.$once('hook:destroyed', function () {
  62923. // clean out app from this.apps array once destroyed
  62924. var index = this$1.apps.indexOf(app);
  62925. if (index > -1) { this$1.apps.splice(index, 1); }
  62926. // ensure we still have a main app or null if no apps
  62927. // we do not release the router so it can be reused
  62928. if (this$1.app === app) { this$1.app = this$1.apps[0] || null; }
  62929. if (!this$1.app) { this$1.history.teardown(); }
  62930. });
  62931. // main app previously initialized
  62932. // return as we don't need to set up new history listener
  62933. if (this.app) {
  62934. return
  62935. }
  62936. this.app = app;
  62937. var history = this.history;
  62938. if (history instanceof HTML5History || history instanceof HashHistory) {
  62939. var handleInitialScroll = function (routeOrError) {
  62940. var from = history.current;
  62941. var expectScroll = this$1.options.scrollBehavior;
  62942. var supportsScroll = supportsPushState && expectScroll;
  62943. if (supportsScroll && 'fullPath' in routeOrError) {
  62944. handleScroll(this$1, routeOrError, from, false);
  62945. }
  62946. };
  62947. var setupListeners = function (routeOrError) {
  62948. history.setupListeners();
  62949. handleInitialScroll(routeOrError);
  62950. };
  62951. history.transitionTo(
  62952. history.getCurrentLocation(),
  62953. setupListeners,
  62954. setupListeners
  62955. );
  62956. }
  62957. history.listen(function (route) {
  62958. this$1.apps.forEach(function (app) {
  62959. app._route = route;
  62960. });
  62961. });
  62962. };
  62963. VueRouter.prototype.beforeEach = function beforeEach (fn) {
  62964. return registerHook(this.beforeHooks, fn)
  62965. };
  62966. VueRouter.prototype.beforeResolve = function beforeResolve (fn) {
  62967. return registerHook(this.resolveHooks, fn)
  62968. };
  62969. VueRouter.prototype.afterEach = function afterEach (fn) {
  62970. return registerHook(this.afterHooks, fn)
  62971. };
  62972. VueRouter.prototype.onReady = function onReady (cb, errorCb) {
  62973. this.history.onReady(cb, errorCb);
  62974. };
  62975. VueRouter.prototype.onError = function onError (errorCb) {
  62976. this.history.onError(errorCb);
  62977. };
  62978. VueRouter.prototype.push = function push (location, onComplete, onAbort) {
  62979. var this$1 = this;
  62980. // $flow-disable-line
  62981. if (!onComplete && !onAbort && typeof Promise !== 'undefined') {
  62982. return new Promise(function (resolve, reject) {
  62983. this$1.history.push(location, resolve, reject);
  62984. })
  62985. } else {
  62986. this.history.push(location, onComplete, onAbort);
  62987. }
  62988. };
  62989. VueRouter.prototype.replace = function replace (location, onComplete, onAbort) {
  62990. var this$1 = this;
  62991. // $flow-disable-line
  62992. if (!onComplete && !onAbort && typeof Promise !== 'undefined') {
  62993. return new Promise(function (resolve, reject) {
  62994. this$1.history.replace(location, resolve, reject);
  62995. })
  62996. } else {
  62997. this.history.replace(location, onComplete, onAbort);
  62998. }
  62999. };
  63000. VueRouter.prototype.go = function go (n) {
  63001. this.history.go(n);
  63002. };
  63003. VueRouter.prototype.back = function back () {
  63004. this.go(-1);
  63005. };
  63006. VueRouter.prototype.forward = function forward () {
  63007. this.go(1);
  63008. };
  63009. VueRouter.prototype.getMatchedComponents = function getMatchedComponents (to) {
  63010. var route = to
  63011. ? to.matched
  63012. ? to
  63013. : this.resolve(to).route
  63014. : this.currentRoute;
  63015. if (!route) {
  63016. return []
  63017. }
  63018. return [].concat.apply(
  63019. [],
  63020. route.matched.map(function (m) {
  63021. return Object.keys(m.components).map(function (key) {
  63022. return m.components[key]
  63023. })
  63024. })
  63025. )
  63026. };
  63027. VueRouter.prototype.resolve = function resolve (
  63028. to,
  63029. current,
  63030. append
  63031. ) {
  63032. current = current || this.history.current;
  63033. var location = normalizeLocation(to, current, append, this);
  63034. var route = this.match(location, current);
  63035. var fullPath = route.redirectedFrom || route.fullPath;
  63036. var base = this.history.base;
  63037. var href = createHref(base, fullPath, this.mode);
  63038. return {
  63039. location: location,
  63040. route: route,
  63041. href: href,
  63042. // for backwards compat
  63043. normalizedTo: location,
  63044. resolved: route
  63045. }
  63046. };
  63047. VueRouter.prototype.getRoutes = function getRoutes () {
  63048. return this.matcher.getRoutes()
  63049. };
  63050. VueRouter.prototype.addRoute = function addRoute (parentOrRoute, route) {
  63051. this.matcher.addRoute(parentOrRoute, route);
  63052. if (this.history.current !== START) {
  63053. this.history.transitionTo(this.history.getCurrentLocation());
  63054. }
  63055. };
  63056. VueRouter.prototype.addRoutes = function addRoutes (routes) {
  63057. if (true) {
  63058. warn(false, 'router.addRoutes() is deprecated and has been removed in Vue Router 4. Use router.addRoute() instead.');
  63059. }
  63060. this.matcher.addRoutes(routes);
  63061. if (this.history.current !== START) {
  63062. this.history.transitionTo(this.history.getCurrentLocation());
  63063. }
  63064. };
  63065. Object.defineProperties( VueRouter.prototype, prototypeAccessors );
  63066. function registerHook (list, fn) {
  63067. list.push(fn);
  63068. return function () {
  63069. var i = list.indexOf(fn);
  63070. if (i > -1) { list.splice(i, 1); }
  63071. }
  63072. }
  63073. function createHref (base, fullPath, mode) {
  63074. var path = mode === 'hash' ? '#' + fullPath : fullPath;
  63075. return base ? cleanPath(base + '/' + path) : path
  63076. }
  63077. VueRouter.install = install;
  63078. VueRouter.version = '3.5.3';
  63079. VueRouter.isNavigationFailure = isNavigationFailure;
  63080. VueRouter.NavigationFailureType = NavigationFailureType;
  63081. VueRouter.START_LOCATION = START;
  63082. if (inBrowser && window.Vue) {
  63083. window.Vue.use(VueRouter);
  63084. }
  63085. /* harmony default export */ __webpack_exports__["a"] = (VueRouter);
  63086. /***/ }),
  63087. /* 193 */
  63088. /***/ (function(module, exports, __webpack_require__) {
  63089. (function webpackUniversalModuleDefinition(root, factory) {
  63090. if(true)
  63091. module.exports = factory(__webpack_require__(4));
  63092. else if(typeof define === 'function' && define.amd)
  63093. define("iview", ["vue"], factory);
  63094. else if(typeof exports === 'object')
  63095. exports["iview"] = factory(require("vue"));
  63096. else
  63097. root["iview"] = factory(root["Vue"]);
  63098. })(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_16__) {
  63099. return /******/ (function(modules) { // webpackBootstrap
  63100. /******/ // The module cache
  63101. /******/ var installedModules = {};
  63102. /******/
  63103. /******/ // The require function
  63104. /******/ function __webpack_require__(moduleId) {
  63105. /******/
  63106. /******/ // Check if module is in cache
  63107. /******/ if(installedModules[moduleId]) {
  63108. /******/ return installedModules[moduleId].exports;
  63109. /******/ }
  63110. /******/ // Create a new module (and put it into the cache)
  63111. /******/ var module = installedModules[moduleId] = {
  63112. /******/ i: moduleId,
  63113. /******/ l: false,
  63114. /******/ exports: {}
  63115. /******/ };
  63116. /******/
  63117. /******/ // Execute the module function
  63118. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  63119. /******/
  63120. /******/ // Flag the module as loaded
  63121. /******/ module.l = true;
  63122. /******/
  63123. /******/ // Return the exports of the module
  63124. /******/ return module.exports;
  63125. /******/ }
  63126. /******/
  63127. /******/
  63128. /******/ // expose the modules object (__webpack_modules__)
  63129. /******/ __webpack_require__.m = modules;
  63130. /******/
  63131. /******/ // expose the module cache
  63132. /******/ __webpack_require__.c = installedModules;
  63133. /******/
  63134. /******/ // define getter function for harmony exports
  63135. /******/ __webpack_require__.d = function(exports, name, getter) {
  63136. /******/ if(!__webpack_require__.o(exports, name)) {
  63137. /******/ Object.defineProperty(exports, name, {
  63138. /******/ configurable: false,
  63139. /******/ enumerable: true,
  63140. /******/ get: getter
  63141. /******/ });
  63142. /******/ }
  63143. /******/ };
  63144. /******/
  63145. /******/ // getDefaultExport function for compatibility with non-harmony modules
  63146. /******/ __webpack_require__.n = function(module) {
  63147. /******/ var getter = module && module.__esModule ?
  63148. /******/ function getDefault() { return module['default']; } :
  63149. /******/ function getModuleExports() { return module; };
  63150. /******/ __webpack_require__.d(getter, 'a', getter);
  63151. /******/ return getter;
  63152. /******/ };
  63153. /******/
  63154. /******/ // Object.prototype.hasOwnProperty.call
  63155. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  63156. /******/
  63157. /******/ // __webpack_public_path__
  63158. /******/ __webpack_require__.p = "/dist/";
  63159. /******/
  63160. /******/ // Load entry module and return exports
  63161. /******/ return __webpack_require__(__webpack_require__.s = 259);
  63162. /******/ })
  63163. /************************************************************************/
  63164. /******/ ([
  63165. /* 0 */
  63166. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  63167. "use strict";
  63168. /* harmony export (immutable) */ __webpack_exports__["a"] = normalizeComponent;
  63169. /* globals __VUE_SSR_CONTEXT__ */
  63170. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  63171. // This module is a runtime utility for cleaner component module output and will
  63172. // be included in the final webpack user bundle.
  63173. function normalizeComponent (
  63174. scriptExports,
  63175. render,
  63176. staticRenderFns,
  63177. functionalTemplate,
  63178. injectStyles,
  63179. scopeId,
  63180. moduleIdentifier, /* server only */
  63181. shadowMode /* vue-cli only */
  63182. ) {
  63183. scriptExports = scriptExports || {}
  63184. // ES6 modules interop
  63185. var type = typeof scriptExports.default
  63186. if (type === 'object' || type === 'function') {
  63187. scriptExports = scriptExports.default
  63188. }
  63189. // Vue.extend constructor export interop
  63190. var options = typeof scriptExports === 'function'
  63191. ? scriptExports.options
  63192. : scriptExports
  63193. // render functions
  63194. if (render) {
  63195. options.render = render
  63196. options.staticRenderFns = staticRenderFns
  63197. options._compiled = true
  63198. }
  63199. // functional template
  63200. if (functionalTemplate) {
  63201. options.functional = true
  63202. }
  63203. // scopedId
  63204. if (scopeId) {
  63205. options._scopeId = scopeId
  63206. }
  63207. var hook
  63208. if (moduleIdentifier) { // server build
  63209. hook = function (context) {
  63210. // 2.3 injection
  63211. context =
  63212. context || // cached call
  63213. (this.$vnode && this.$vnode.ssrContext) || // stateful
  63214. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  63215. // 2.2 with runInNewContext: true
  63216. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  63217. context = __VUE_SSR_CONTEXT__
  63218. }
  63219. // inject component styles
  63220. if (injectStyles) {
  63221. injectStyles.call(this, context)
  63222. }
  63223. // register component module identifier for async chunk inferrence
  63224. if (context && context._registeredComponents) {
  63225. context._registeredComponents.add(moduleIdentifier)
  63226. }
  63227. }
  63228. // used by ssr in case component is cached and beforeCreate
  63229. // never gets called
  63230. options._ssrRegister = hook
  63231. } else if (injectStyles) {
  63232. hook = shadowMode
  63233. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  63234. : injectStyles
  63235. }
  63236. if (hook) {
  63237. if (options.functional) {
  63238. // for template-only hot-reload because in that case the render fn doesn't
  63239. // go through the normalizer
  63240. options._injectStyles = hook
  63241. // register for functioal component in vue file
  63242. var originalRender = options.render
  63243. options.render = function renderWithStyleInjection (h, context) {
  63244. hook.call(context)
  63245. return originalRender(h, context)
  63246. }
  63247. } else {
  63248. // inject component registration as beforeCreate hook
  63249. var existing = options.beforeCreate
  63250. options.beforeCreate = existing
  63251. ? [].concat(existing, hook)
  63252. : [hook]
  63253. }
  63254. }
  63255. return {
  63256. exports: scriptExports,
  63257. options: options
  63258. }
  63259. }
  63260. /***/ }),
  63261. /* 1 */
  63262. /***/ (function(module, exports, __webpack_require__) {
  63263. "use strict";
  63264. exports.__esModule = true;
  63265. exports.default = function (innerThis, boundThis) {
  63266. if (innerThis !== boundThis) {
  63267. throw new TypeError("Cannot instantiate an arrow function");
  63268. }
  63269. };
  63270. /***/ }),
  63271. /* 2 */
  63272. /***/ (function(module, exports, __webpack_require__) {
  63273. "use strict";
  63274. exports.__esModule = true;
  63275. var _defineProperty = __webpack_require__(269);
  63276. var _defineProperty2 = _interopRequireDefault(_defineProperty);
  63277. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  63278. exports.default = function (obj, key, value) {
  63279. if (key in obj) {
  63280. (0, _defineProperty2.default)(obj, key, {
  63281. value: value,
  63282. enumerable: true,
  63283. configurable: true,
  63284. writable: true
  63285. });
  63286. } else {
  63287. obj[key] = value;
  63288. }
  63289. return obj;
  63290. };
  63291. /***/ }),
  63292. /* 3 */
  63293. /***/ (function(module, exports, __webpack_require__) {
  63294. "use strict";
  63295. Object.defineProperty(exports, "__esModule", {
  63296. value: true
  63297. });
  63298. exports.sharpMatcherRegx = exports.dimensionMap = exports.findComponentUpward = exports.deepCopy = exports.firstUpperCase = exports.MutationObserver = undefined;
  63299. var _getIterator2 = __webpack_require__(45);
  63300. var _getIterator3 = _interopRequireDefault(_getIterator2);
  63301. var _newArrowCheck2 = __webpack_require__(1);
  63302. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  63303. exports.oneOf = oneOf;
  63304. exports.camelcaseToHyphen = camelcaseToHyphen;
  63305. exports.getScrollBarSize = getScrollBarSize;
  63306. exports.getStyle = getStyle;
  63307. exports.warnProp = warnProp;
  63308. exports.scrollTop = scrollTop;
  63309. exports.findComponentDownward = findComponentDownward;
  63310. exports.findComponentsDownward = findComponentsDownward;
  63311. exports.findComponentsUpward = findComponentsUpward;
  63312. exports.findBrothersComponents = findBrothersComponents;
  63313. exports.hasClass = hasClass;
  63314. exports.addClass = addClass;
  63315. exports.removeClass = removeClass;
  63316. exports.setMatchMedia = setMatchMedia;
  63317. var _vue = __webpack_require__(16);
  63318. var _vue2 = _interopRequireDefault(_vue);
  63319. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  63320. var isServer = _vue2.default.prototype.$isServer;
  63321. function oneOf(value, validList) {
  63322. for (var i = 0; i < validList.length; i++) {
  63323. if (value === validList[i]) {
  63324. return true;
  63325. }
  63326. }
  63327. return false;
  63328. }
  63329. function camelcaseToHyphen(str) {
  63330. return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
  63331. }
  63332. var cached = void 0;
  63333. function getScrollBarSize(fresh) {
  63334. if (isServer) return 0;
  63335. if (fresh || cached === undefined) {
  63336. var inner = document.createElement('div');
  63337. inner.style.width = '100%';
  63338. inner.style.height = '200px';
  63339. var outer = document.createElement('div');
  63340. var outerStyle = outer.style;
  63341. outerStyle.position = 'absolute';
  63342. outerStyle.top = 0;
  63343. outerStyle.left = 0;
  63344. outerStyle.pointerEvents = 'none';
  63345. outerStyle.visibility = 'hidden';
  63346. outerStyle.width = '200px';
  63347. outerStyle.height = '150px';
  63348. outerStyle.overflow = 'hidden';
  63349. outer.appendChild(inner);
  63350. document.body.appendChild(outer);
  63351. var widthContained = inner.offsetWidth;
  63352. outer.style.overflow = 'scroll';
  63353. var widthScroll = inner.offsetWidth;
  63354. if (widthContained === widthScroll) {
  63355. widthScroll = outer.clientWidth;
  63356. }
  63357. document.body.removeChild(outer);
  63358. cached = widthContained - widthScroll;
  63359. }
  63360. return cached;
  63361. }
  63362. var MutationObserver = exports.MutationObserver = isServer ? false : window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver || false;
  63363. var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
  63364. var MOZ_HACK_REGEXP = /^moz([A-Z])/;
  63365. function camelCase(name) {
  63366. return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
  63367. return offset ? letter.toUpperCase() : letter;
  63368. }).replace(MOZ_HACK_REGEXP, 'Moz$1');
  63369. }
  63370. function getStyle(element, styleName) {
  63371. if (!element || !styleName) return null;
  63372. styleName = camelCase(styleName);
  63373. if (styleName === 'float') {
  63374. styleName = 'cssFloat';
  63375. }
  63376. try {
  63377. var computed = document.defaultView.getComputedStyle(element, '');
  63378. return element.style[styleName] || computed ? computed[styleName] : null;
  63379. } catch (e) {
  63380. return element.style[styleName];
  63381. }
  63382. }
  63383. function firstUpperCase(str) {
  63384. return str.toString()[0].toUpperCase() + str.toString().slice(1);
  63385. }
  63386. exports.firstUpperCase = firstUpperCase;
  63387. function warnProp(component, prop, correctType, wrongType) {
  63388. correctType = firstUpperCase(correctType);
  63389. wrongType = firstUpperCase(wrongType);
  63390. console.error('[iView warn]: Invalid prop: type check failed for prop ' + String(prop) + '. Expected ' + String(correctType) + ', got ' + String(wrongType) + '. (found in component: ' + String(component) + ')');
  63391. }
  63392. function typeOf(obj) {
  63393. var toString = Object.prototype.toString;
  63394. var map = {
  63395. '[object Boolean]': 'boolean',
  63396. '[object Number]': 'number',
  63397. '[object String]': 'string',
  63398. '[object Function]': 'function',
  63399. '[object Array]': 'array',
  63400. '[object Date]': 'date',
  63401. '[object RegExp]': 'regExp',
  63402. '[object Undefined]': 'undefined',
  63403. '[object Null]': 'null',
  63404. '[object Object]': 'object'
  63405. };
  63406. return map[toString.call(obj)];
  63407. }
  63408. function deepCopy(data) {
  63409. var t = typeOf(data);
  63410. var o = void 0;
  63411. if (t === 'array') {
  63412. o = [];
  63413. } else if (t === 'object') {
  63414. o = {};
  63415. } else {
  63416. return data;
  63417. }
  63418. if (t === 'array') {
  63419. for (var i = 0; i < data.length; i++) {
  63420. o.push(deepCopy(data[i]));
  63421. }
  63422. } else if (t === 'object') {
  63423. for (var _i in data) {
  63424. o[_i] = deepCopy(data[_i]);
  63425. }
  63426. }
  63427. return o;
  63428. }
  63429. exports.deepCopy = deepCopy;
  63430. function scrollTop(el) {
  63431. var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  63432. var to = arguments[2];
  63433. var duration = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 500;
  63434. var endCallback = arguments[4];
  63435. if (!window.requestAnimationFrame) {
  63436. window.requestAnimationFrame = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {
  63437. return window.setTimeout(callback, 1000 / 60);
  63438. };
  63439. }
  63440. var difference = Math.abs(from - to);
  63441. var step = Math.ceil(difference / duration * 50);
  63442. function scroll(start, end, step) {
  63443. var _this = this;
  63444. if (start === end) {
  63445. endCallback && endCallback();
  63446. return;
  63447. }
  63448. var d = start + step > end ? end : start + step;
  63449. if (start > end) {
  63450. d = start - step < end ? end : start - step;
  63451. }
  63452. if (el === window) {
  63453. window.scrollTo(d, d);
  63454. } else {
  63455. el.scrollTop = d;
  63456. }
  63457. window.requestAnimationFrame(function () {
  63458. (0, _newArrowCheck3.default)(this, _this);
  63459. return scroll(d, end, step);
  63460. }.bind(this));
  63461. }
  63462. scroll(from, to, step);
  63463. }
  63464. function findComponentUpward(context, componentName, componentNames) {
  63465. if (typeof componentName === 'string') {
  63466. componentNames = [componentName];
  63467. } else {
  63468. componentNames = componentName;
  63469. }
  63470. var parent = context.$parent;
  63471. var name = parent.$options.name;
  63472. while (parent && (!name || componentNames.indexOf(name) < 0)) {
  63473. parent = parent.$parent;
  63474. if (parent) name = parent.$options.name;
  63475. }
  63476. return parent;
  63477. }
  63478. exports.findComponentUpward = findComponentUpward;
  63479. function findComponentDownward(context, componentName) {
  63480. var $children = context.$children;
  63481. var children = null;
  63482. if ($children.length) {
  63483. var _iteratorNormalCompletion = true;
  63484. var _didIteratorError = false;
  63485. var _iteratorError = undefined;
  63486. try {
  63487. for (var _iterator = (0, _getIterator3.default)($children), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  63488. var child = _step.value;
  63489. var name = child.$options.name;
  63490. if (name === componentName) {
  63491. children = child;
  63492. break;
  63493. } else {
  63494. children = findComponentDownward(child, componentName);
  63495. if (children) break;
  63496. }
  63497. }
  63498. } catch (err) {
  63499. _didIteratorError = true;
  63500. _iteratorError = err;
  63501. } finally {
  63502. try {
  63503. if (!_iteratorNormalCompletion && _iterator.return) {
  63504. _iterator.return();
  63505. }
  63506. } finally {
  63507. if (_didIteratorError) {
  63508. throw _iteratorError;
  63509. }
  63510. }
  63511. }
  63512. }
  63513. return children;
  63514. }
  63515. function findComponentsDownward(context, componentName) {
  63516. var _this2 = this;
  63517. return context.$children.reduce(function (components, child) {
  63518. (0, _newArrowCheck3.default)(this, _this2);
  63519. if (child.$options.name === componentName) components.push(child);
  63520. var foundChilds = findComponentsDownward(child, componentName);
  63521. return components.concat(foundChilds);
  63522. }.bind(this), []);
  63523. }
  63524. function findComponentsUpward(context, componentName) {
  63525. var parents = [];
  63526. var parent = context.$parent;
  63527. if (parent) {
  63528. if (parent.$options.name === componentName) parents.push(parent);
  63529. return parents.concat(findComponentsUpward(parent, componentName));
  63530. } else {
  63531. return [];
  63532. }
  63533. }
  63534. function findBrothersComponents(context, componentName) {
  63535. var _this3 = this;
  63536. var exceptMe = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  63537. var res = context.$parent.$children.filter(function (item) {
  63538. (0, _newArrowCheck3.default)(this, _this3);
  63539. return item.$options.name === componentName;
  63540. }.bind(this));
  63541. var index = res.findIndex(function (item) {
  63542. (0, _newArrowCheck3.default)(this, _this3);
  63543. return item._uid === context._uid;
  63544. }.bind(this));
  63545. if (exceptMe) res.splice(index, 1);
  63546. return res;
  63547. }
  63548. var trim = function trim(string) {
  63549. return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
  63550. };
  63551. function hasClass(el, cls) {
  63552. if (!el || !cls) return false;
  63553. if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
  63554. if (el.classList) {
  63555. return el.classList.contains(cls);
  63556. } else {
  63557. return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
  63558. }
  63559. }
  63560. function addClass(el, cls) {
  63561. if (!el) return;
  63562. var curClass = el.className;
  63563. var classes = (cls || '').split(' ');
  63564. for (var i = 0, j = classes.length; i < j; i++) {
  63565. var clsName = classes[i];
  63566. if (!clsName) continue;
  63567. if (el.classList) {
  63568. el.classList.add(clsName);
  63569. } else {
  63570. if (!hasClass(el, clsName)) {
  63571. curClass += ' ' + clsName;
  63572. }
  63573. }
  63574. }
  63575. if (!el.classList) {
  63576. el.className = curClass;
  63577. }
  63578. }
  63579. function removeClass(el, cls) {
  63580. if (!el || !cls) return;
  63581. var classes = cls.split(' ');
  63582. var curClass = ' ' + el.className + ' ';
  63583. for (var i = 0, j = classes.length; i < j; i++) {
  63584. var clsName = classes[i];
  63585. if (!clsName) continue;
  63586. if (el.classList) {
  63587. el.classList.remove(clsName);
  63588. } else {
  63589. if (hasClass(el, clsName)) {
  63590. curClass = curClass.replace(' ' + clsName + ' ', ' ');
  63591. }
  63592. }
  63593. }
  63594. if (!el.classList) {
  63595. el.className = trim(curClass);
  63596. }
  63597. }
  63598. var dimensionMap = exports.dimensionMap = {
  63599. xs: '480px',
  63600. sm: '576px',
  63601. md: '768px',
  63602. lg: '992px',
  63603. xl: '1200px',
  63604. xxl: '1600px'
  63605. };
  63606. function setMatchMedia() {
  63607. var _this4 = this;
  63608. if (typeof window !== 'undefined') {
  63609. var matchMediaPolyfill = function (mediaQuery) {
  63610. (0, _newArrowCheck3.default)(this, _this4);
  63611. return {
  63612. media: mediaQuery,
  63613. matches: false,
  63614. on: function on() {},
  63615. off: function off() {}
  63616. };
  63617. }.bind(this);
  63618. window.matchMedia = window.matchMedia || matchMediaPolyfill;
  63619. }
  63620. }
  63621. var sharpMatcherRegx = exports.sharpMatcherRegx = /#([^#]+)$/;
  63622. /***/ }),
  63623. /* 4 */
  63624. /***/ (function(module, exports, __webpack_require__) {
  63625. "use strict";
  63626. Object.defineProperty(exports, "__esModule", {
  63627. value: true
  63628. });
  63629. var _newArrowCheck2 = __webpack_require__(1);
  63630. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  63631. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  63632. function _broadcast(componentName, eventName, params) {
  63633. var _this = this;
  63634. this.$children.forEach(function (child) {
  63635. (0, _newArrowCheck3.default)(this, _this);
  63636. var name = child.$options.name;
  63637. if (name === componentName) {
  63638. child.$emit.apply(child, [eventName].concat(params));
  63639. } else {
  63640. _broadcast.apply(child, [componentName, eventName].concat([params]));
  63641. }
  63642. }.bind(this));
  63643. }
  63644. exports.default = {
  63645. methods: {
  63646. dispatch: function dispatch(componentName, eventName, params) {
  63647. var parent = this.$parent || this.$root;
  63648. var name = parent.$options.name;
  63649. while (parent && (!name || name !== componentName)) {
  63650. parent = parent.$parent;
  63651. if (parent) {
  63652. name = parent.$options.name;
  63653. }
  63654. }
  63655. if (parent) {
  63656. parent.$emit.apply(parent, [eventName].concat(params));
  63657. }
  63658. },
  63659. broadcast: function broadcast(componentName, eventName, params) {
  63660. _broadcast.call(this, componentName, eventName, params);
  63661. }
  63662. }
  63663. };
  63664. /***/ }),
  63665. /* 5 */
  63666. /***/ (function(module, exports) {
  63667. var core = module.exports = { version: '2.6.9' };
  63668. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  63669. /***/ }),
  63670. /* 6 */
  63671. /***/ (function(module, exports, __webpack_require__) {
  63672. "use strict";
  63673. Object.defineProperty(exports, "__esModule", {
  63674. value: true
  63675. });
  63676. var _locale = __webpack_require__(120);
  63677. exports.default = {
  63678. methods: {
  63679. t: function t() {
  63680. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  63681. args[_key] = arguments[_key];
  63682. }
  63683. return _locale.t.apply(this, args);
  63684. }
  63685. }
  63686. };
  63687. /***/ }),
  63688. /* 7 */
  63689. /***/ (function(module, exports, __webpack_require__) {
  63690. var global = __webpack_require__(9);
  63691. var core = __webpack_require__(5);
  63692. var ctx = __webpack_require__(24);
  63693. var hide = __webpack_require__(25);
  63694. var has = __webpack_require__(30);
  63695. var PROTOTYPE = 'prototype';
  63696. var $export = function (type, name, source) {
  63697. var IS_FORCED = type & $export.F;
  63698. var IS_GLOBAL = type & $export.G;
  63699. var IS_STATIC = type & $export.S;
  63700. var IS_PROTO = type & $export.P;
  63701. var IS_BIND = type & $export.B;
  63702. var IS_WRAP = type & $export.W;
  63703. var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  63704. var expProto = exports[PROTOTYPE];
  63705. var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
  63706. var key, own, out;
  63707. if (IS_GLOBAL) source = name;
  63708. for (key in source) {
  63709. // contains in native
  63710. own = !IS_FORCED && target && target[key] !== undefined;
  63711. if (own && has(exports, key)) continue;
  63712. // export native or passed
  63713. out = own ? target[key] : source[key];
  63714. // prevent global pollution for namespaces
  63715. exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
  63716. // bind timers to global for call from export context
  63717. : IS_BIND && own ? ctx(out, global)
  63718. // wrap global constructors for prevent change them in library
  63719. : IS_WRAP && target[key] == out ? (function (C) {
  63720. var F = function (a, b, c) {
  63721. if (this instanceof C) {
  63722. switch (arguments.length) {
  63723. case 0: return new C();
  63724. case 1: return new C(a);
  63725. case 2: return new C(a, b);
  63726. } return new C(a, b, c);
  63727. } return C.apply(this, arguments);
  63728. };
  63729. F[PROTOTYPE] = C[PROTOTYPE];
  63730. return F;
  63731. // make static versions for prototype methods
  63732. })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
  63733. // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
  63734. if (IS_PROTO) {
  63735. (exports.virtual || (exports.virtual = {}))[key] = out;
  63736. // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
  63737. if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
  63738. }
  63739. }
  63740. };
  63741. // type bitmap
  63742. $export.F = 1; // forced
  63743. $export.G = 2; // global
  63744. $export.S = 4; // static
  63745. $export.P = 8; // proto
  63746. $export.B = 16; // bind
  63747. $export.W = 32; // wrap
  63748. $export.U = 64; // safe
  63749. $export.R = 128; // real proto method for `library`
  63750. module.exports = $export;
  63751. /***/ }),
  63752. /* 8 */
  63753. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  63754. "use strict";
  63755. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  63756. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_icon_vue__ = __webpack_require__(101);
  63757. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_icon_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_icon_vue__);
  63758. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_icon_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_icon_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  63759. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8ab195dc_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_icon_vue__ = __webpack_require__(275);
  63760. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8ab195dc_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_icon_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8ab195dc_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_icon_vue__);
  63761. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  63762. /* script */
  63763. /* template */
  63764. /* template functional */
  63765. var __vue_template_functional__ = false
  63766. /* styles */
  63767. var __vue_styles__ = null
  63768. /* scopeId */
  63769. var __vue_scopeId__ = null
  63770. /* moduleIdentifier (server only) */
  63771. var __vue_module_identifier__ = null
  63772. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  63773. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_icon_vue___default.a,
  63774. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8ab195dc_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_icon_vue__["render"],
  63775. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8ab195dc_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_icon_vue__["staticRenderFns"],
  63776. __vue_template_functional__,
  63777. __vue_styles__,
  63778. __vue_scopeId__,
  63779. __vue_module_identifier__
  63780. )
  63781. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  63782. /***/ }),
  63783. /* 9 */
  63784. /***/ (function(module, exports) {
  63785. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  63786. var global = module.exports = typeof window != 'undefined' && window.Math == Math
  63787. ? window : typeof self != 'undefined' && self.Math == Math ? self
  63788. // eslint-disable-next-line no-new-func
  63789. : Function('return this')();
  63790. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  63791. /***/ }),
  63792. /* 10 */
  63793. /***/ (function(module, exports, __webpack_require__) {
  63794. var store = __webpack_require__(67)('wks');
  63795. var uid = __webpack_require__(53);
  63796. var Symbol = __webpack_require__(9).Symbol;
  63797. var USE_SYMBOL = typeof Symbol == 'function';
  63798. var $exports = module.exports = function (name) {
  63799. return store[name] || (store[name] =
  63800. USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
  63801. };
  63802. $exports.store = store;
  63803. /***/ }),
  63804. /* 11 */
  63805. /***/ (function(module, exports, __webpack_require__) {
  63806. "use strict";
  63807. Object.defineProperty(exports, "__esModule", {
  63808. value: true
  63809. });
  63810. exports.default = {
  63811. inject: {
  63812. FormInstance: {
  63813. default: ''
  63814. }
  63815. },
  63816. computed: {
  63817. itemDisabled: function itemDisabled() {
  63818. var state = this.disabled;
  63819. if (!state && this.FormInstance) state = this.FormInstance.disabled;
  63820. return state;
  63821. }
  63822. }
  63823. };
  63824. /***/ }),
  63825. /* 12 */
  63826. /***/ (function(module, exports, __webpack_require__) {
  63827. "use strict";
  63828. Object.defineProperty(exports, "__esModule", {
  63829. value: true
  63830. });
  63831. exports.off = exports.on = undefined;
  63832. var _vue = __webpack_require__(16);
  63833. var _vue2 = _interopRequireDefault(_vue);
  63834. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  63835. var isServer = _vue2.default.prototype.$isServer;
  63836. var on = exports.on = function () {
  63837. if (!isServer && document.addEventListener) {
  63838. return function (element, event, handler) {
  63839. var useCapture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  63840. if (element && event && handler) {
  63841. element.addEventListener(event, handler, useCapture);
  63842. }
  63843. };
  63844. } else {
  63845. return function (element, event, handler) {
  63846. if (element && event && handler) {
  63847. element.attachEvent('on' + event, handler);
  63848. }
  63849. };
  63850. }
  63851. }();
  63852. var off = exports.off = function () {
  63853. if (!isServer && document.removeEventListener) {
  63854. return function (element, event, handler) {
  63855. var useCapture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  63856. if (element && event) {
  63857. element.removeEventListener(event, handler, useCapture);
  63858. }
  63859. };
  63860. } else {
  63861. return function (element, event, handler) {
  63862. if (element && event) {
  63863. element.detachEvent('on' + event, handler);
  63864. }
  63865. };
  63866. }
  63867. }();
  63868. /***/ }),
  63869. /* 13 */
  63870. /***/ (function(module, exports, __webpack_require__) {
  63871. // Thank's IE8 for his funny defineProperty
  63872. module.exports = !__webpack_require__(31)(function () {
  63873. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  63874. });
  63875. /***/ }),
  63876. /* 14 */
  63877. /***/ (function(module, exports, __webpack_require__) {
  63878. var anObject = __webpack_require__(22);
  63879. var IE8_DOM_DEFINE = __webpack_require__(98);
  63880. var toPrimitive = __webpack_require__(70);
  63881. var dP = Object.defineProperty;
  63882. exports.f = __webpack_require__(13) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  63883. anObject(O);
  63884. P = toPrimitive(P, true);
  63885. anObject(Attributes);
  63886. if (IE8_DOM_DEFINE) try {
  63887. return dP(O, P, Attributes);
  63888. } catch (e) { /* empty */ }
  63889. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  63890. if ('value' in Attributes) O[P] = Attributes.value;
  63891. return O;
  63892. };
  63893. /***/ }),
  63894. /* 15 */
  63895. /***/ (function(module, exports, __webpack_require__) {
  63896. module.exports = { "default": __webpack_require__(264), __esModule: true };
  63897. /***/ }),
  63898. /* 16 */
  63899. /***/ (function(module, exports) {
  63900. module.exports = __WEBPACK_EXTERNAL_MODULE_16__;
  63901. /***/ }),
  63902. /* 17 */
  63903. /***/ (function(module, exports, __webpack_require__) {
  63904. "use strict";
  63905. exports.__esModule = true;
  63906. var _from = __webpack_require__(111);
  63907. var _from2 = _interopRequireDefault(_from);
  63908. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  63909. exports.default = function (arr) {
  63910. if (Array.isArray(arr)) {
  63911. for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
  63912. arr2[i] = arr[i];
  63913. }
  63914. return arr2;
  63915. } else {
  63916. return (0, _from2.default)(arr);
  63917. }
  63918. };
  63919. /***/ }),
  63920. /* 18 */
  63921. /***/ (function(module, exports) {
  63922. module.exports = function (it) {
  63923. return typeof it === 'object' ? it !== null : typeof it === 'function';
  63924. };
  63925. /***/ }),
  63926. /* 19 */
  63927. /***/ (function(module, exports, __webpack_require__) {
  63928. "use strict";
  63929. Object.defineProperty(exports, "__esModule", {
  63930. value: true
  63931. });
  63932. var _icon = __webpack_require__(8);
  63933. var _icon2 = _interopRequireDefault(_icon);
  63934. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  63935. exports.default = _icon2.default;
  63936. /***/ }),
  63937. /* 20 */
  63938. /***/ (function(module, exports, __webpack_require__) {
  63939. "use strict";
  63940. Object.defineProperty(exports, "__esModule", {
  63941. value: true
  63942. });
  63943. exports.TYPE_VALUE_RESOLVER_MAP = exports.DEFAULT_FORMATS = exports.formatDateLabels = exports.initTimeDate = exports.nextMonth = exports.prevMonth = exports.siblingMonth = exports.getFirstDayOfMonth = exports.getDayCountOfMonth = exports.parseDate = exports.formatDate = exports.isInRange = exports.clearHours = exports.toDate = undefined;
  63944. var _slicedToArray2 = __webpack_require__(26);
  63945. var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
  63946. var _newArrowCheck2 = __webpack_require__(1);
  63947. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  63948. var _toConsumableArray2 = __webpack_require__(17);
  63949. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  63950. var _date2 = __webpack_require__(407);
  63951. var _date3 = _interopRequireDefault(_date2);
  63952. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  63953. var toDate = exports.toDate = function toDate(date) {
  63954. var _date = new Date(date);
  63955. if (isNaN(_date.getTime()) && typeof date === 'string') {
  63956. _date = date.split('-').map(Number);
  63957. _date[1] += 1;
  63958. _date = new (Function.prototype.bind.apply(Date, [null].concat((0, _toConsumableArray3.default)(_date))))();
  63959. }
  63960. if (isNaN(_date.getTime())) return null;
  63961. return _date;
  63962. };
  63963. var clearHours = exports.clearHours = function clearHours(time) {
  63964. var cloneDate = new Date(time);
  63965. cloneDate.setHours(0, 0, 0, 0);
  63966. return cloneDate.getTime();
  63967. };
  63968. var isInRange = exports.isInRange = function (time, a, b) {
  63969. (0, _newArrowCheck3.default)(undefined, undefined);
  63970. if (!a || !b) return false;
  63971. var _sort = [a, b].sort(),
  63972. _sort2 = (0, _slicedToArray3.default)(_sort, 2),
  63973. start = _sort2[0],
  63974. end = _sort2[1];
  63975. return time >= start && time <= end;
  63976. }.bind(undefined);
  63977. var formatDate = exports.formatDate = function formatDate(date, format) {
  63978. date = toDate(date);
  63979. if (!date) return '';
  63980. return _date3.default.format(date, format || 'yyyy-MM-dd');
  63981. };
  63982. var parseDate = exports.parseDate = function parseDate(string, format) {
  63983. return _date3.default.parse(string, format || 'yyyy-MM-dd');
  63984. };
  63985. var getDayCountOfMonth = exports.getDayCountOfMonth = function getDayCountOfMonth(year, month) {
  63986. return new Date(year, month + 1, 0).getDate();
  63987. };
  63988. var getFirstDayOfMonth = exports.getFirstDayOfMonth = function getFirstDayOfMonth(date) {
  63989. var temp = new Date(date.getTime());
  63990. temp.setDate(1);
  63991. return temp.getDay();
  63992. };
  63993. var siblingMonth = exports.siblingMonth = function siblingMonth(src, diff) {
  63994. var temp = new Date(src);
  63995. var newMonth = temp.getMonth() + diff;
  63996. var newMonthDayCount = getDayCountOfMonth(temp.getFullYear(), newMonth);
  63997. if (newMonthDayCount < temp.getDate()) {
  63998. temp.setDate(newMonthDayCount);
  63999. }
  64000. temp.setMonth(newMonth);
  64001. return temp;
  64002. };
  64003. var prevMonth = exports.prevMonth = function prevMonth(src) {
  64004. return siblingMonth(src, -1);
  64005. };
  64006. var nextMonth = exports.nextMonth = function nextMonth(src) {
  64007. return siblingMonth(src, 1);
  64008. };
  64009. var initTimeDate = exports.initTimeDate = function initTimeDate() {
  64010. var date = new Date();
  64011. date.setHours(0);
  64012. date.setMinutes(0);
  64013. date.setSeconds(0);
  64014. return date;
  64015. };
  64016. var formatDateLabels = exports.formatDateLabels = function () {
  64017. var _this = this;
  64018. var formats = {
  64019. yyyy: function yyyy(date) {
  64020. (0, _newArrowCheck3.default)(this, _this);
  64021. return date.getFullYear();
  64022. }.bind(this),
  64023. m: function m(date) {
  64024. (0, _newArrowCheck3.default)(this, _this);
  64025. return date.getMonth() + 1;
  64026. }.bind(this),
  64027. mm: function mm(date) {
  64028. (0, _newArrowCheck3.default)(this, _this);
  64029. return ('0' + (date.getMonth() + 1)).slice(-2);
  64030. }.bind(this),
  64031. mmm: function mmm(date, locale) {
  64032. (0, _newArrowCheck3.default)(this, _this);
  64033. var monthName = date.toLocaleDateString(locale, {
  64034. month: 'long'
  64035. });
  64036. return monthName.slice(0, 3);
  64037. }.bind(this),
  64038. Mmm: function Mmm(date, locale) {
  64039. (0, _newArrowCheck3.default)(this, _this);
  64040. var monthName = date.toLocaleDateString(locale, {
  64041. month: 'long'
  64042. });
  64043. return (monthName[0].toUpperCase() + monthName.slice(1).toLowerCase()).slice(0, 3);
  64044. }.bind(this),
  64045. mmmm: function mmmm(date, locale) {
  64046. (0, _newArrowCheck3.default)(this, _this);
  64047. return date.toLocaleDateString(locale, {
  64048. month: 'long'
  64049. });
  64050. }.bind(this),
  64051. Mmmm: function Mmmm(date, locale) {
  64052. (0, _newArrowCheck3.default)(this, _this);
  64053. var monthName = date.toLocaleDateString(locale, {
  64054. month: 'long'
  64055. });
  64056. return monthName[0].toUpperCase() + monthName.slice(1).toLowerCase();
  64057. }.bind(this)
  64058. };
  64059. var formatRegex = new RegExp(['yyyy', 'Mmmm', 'mmmm', 'Mmm', 'mmm', 'mm', 'm'].join('|'), 'g');
  64060. return function (locale, format, date) {
  64061. var _this2 = this;
  64062. var componetsRegex = /(\[[^\]]+\])([^\[\]]+)(\[[^\]]+\])/;
  64063. var components = format.match(componetsRegex).slice(1);
  64064. var separator = components[1];
  64065. var labels = [components[0], components[2]].map(function (component) {
  64066. (0, _newArrowCheck3.default)(this, _this2);
  64067. var label = component.replace(/\[[^\]]+\]/, function (str) {
  64068. (0, _newArrowCheck3.default)(this, _this2);
  64069. return str.slice(1, -1).replace(formatRegex, function (match) {
  64070. (0, _newArrowCheck3.default)(this, _this2);
  64071. return formats[match](date, locale);
  64072. }.bind(this));
  64073. }.bind(this));
  64074. return {
  64075. label: label,
  64076. type: component.indexOf('yy') != -1 ? 'year' : 'month'
  64077. };
  64078. }.bind(this));
  64079. return {
  64080. separator: separator,
  64081. labels: labels
  64082. };
  64083. };
  64084. }();
  64085. var DEFAULT_FORMATS = exports.DEFAULT_FORMATS = {
  64086. date: 'yyyy-MM-dd',
  64087. month: 'yyyy-MM',
  64088. year: 'yyyy',
  64089. datetime: 'yyyy-MM-dd HH:mm:ss',
  64090. time: 'HH:mm:ss',
  64091. timerange: 'HH:mm:ss',
  64092. daterange: 'yyyy-MM-dd',
  64093. datetimerange: 'yyyy-MM-dd HH:mm:ss'
  64094. };
  64095. var DATE_FORMATTER = function DATE_FORMATTER(value, format) {
  64096. return formatDate(value, format);
  64097. };
  64098. var DATE_PARSER = function DATE_PARSER(text, format) {
  64099. return parseDate(text, format);
  64100. };
  64101. var RANGE_FORMATTER = function RANGE_FORMATTER(value, format, RANGE_SEPARATOR) {
  64102. if (Array.isArray(value) && value.length === 2) {
  64103. var start = value[0];
  64104. var end = value[1];
  64105. if (start && end) {
  64106. return formatDate(start, format) + RANGE_SEPARATOR + formatDate(end, format);
  64107. }
  64108. } else if (!Array.isArray(value) && value instanceof Date) {
  64109. return formatDate(value, format);
  64110. }
  64111. return '';
  64112. };
  64113. var RANGE_PARSER = function RANGE_PARSER(text, format, RANGE_SEPARATOR) {
  64114. var array = Array.isArray(text) ? text : text.split(RANGE_SEPARATOR);
  64115. if (array.length === 2) {
  64116. var range1 = array[0];
  64117. var range2 = array[1];
  64118. return [range1 instanceof Date ? range1 : parseDate(range1, format), range2 instanceof Date ? range2 : parseDate(range2, format)];
  64119. }
  64120. return [];
  64121. };
  64122. var TYPE_VALUE_RESOLVER_MAP = exports.TYPE_VALUE_RESOLVER_MAP = {
  64123. default: {
  64124. formatter: function formatter(value) {
  64125. if (!value) return '';
  64126. return '' + value;
  64127. },
  64128. parser: function parser(text) {
  64129. if (text === undefined || text === '') return null;
  64130. return text;
  64131. }
  64132. },
  64133. date: {
  64134. formatter: DATE_FORMATTER,
  64135. parser: DATE_PARSER
  64136. },
  64137. datetime: {
  64138. formatter: DATE_FORMATTER,
  64139. parser: DATE_PARSER
  64140. },
  64141. daterange: {
  64142. formatter: RANGE_FORMATTER,
  64143. parser: RANGE_PARSER
  64144. },
  64145. datetimerange: {
  64146. formatter: RANGE_FORMATTER,
  64147. parser: RANGE_PARSER
  64148. },
  64149. timerange: {
  64150. formatter: RANGE_FORMATTER,
  64151. parser: RANGE_PARSER
  64152. },
  64153. time: {
  64154. formatter: DATE_FORMATTER,
  64155. parser: DATE_PARSER
  64156. },
  64157. month: {
  64158. formatter: DATE_FORMATTER,
  64159. parser: DATE_PARSER
  64160. },
  64161. year: {
  64162. formatter: DATE_FORMATTER,
  64163. parser: DATE_PARSER
  64164. },
  64165. multiple: {
  64166. formatter: function formatter(value, format) {
  64167. (0, _newArrowCheck3.default)(undefined, undefined);
  64168. return value.filter(Boolean).map(function (date) {
  64169. (0, _newArrowCheck3.default)(undefined, undefined);
  64170. return formatDate(date, format);
  64171. }.bind(undefined)).join(',');
  64172. }.bind(undefined),
  64173. parser: function parser(value, format) {
  64174. (0, _newArrowCheck3.default)(undefined, undefined);
  64175. var values = typeof value === 'string' ? value.split(',') : value;
  64176. return values.map(function (value) {
  64177. (0, _newArrowCheck3.default)(undefined, undefined);
  64178. if (value instanceof Date) return value;
  64179. if (typeof value === 'string') value = value.trim();else if (typeof value !== 'number' && !value) value = '';
  64180. return parseDate(value, format);
  64181. }.bind(undefined));
  64182. }.bind(undefined)
  64183. },
  64184. number: {
  64185. formatter: function formatter(value) {
  64186. if (!value) return '';
  64187. return '' + value;
  64188. },
  64189. parser: function parser(text) {
  64190. var result = Number(text);
  64191. if (!isNaN(text)) {
  64192. return result;
  64193. } else {
  64194. return null;
  64195. }
  64196. }
  64197. }
  64198. };
  64199. /***/ }),
  64200. /* 21 */
  64201. /***/ (function(module, exports, __webpack_require__) {
  64202. module.exports = { "default": __webpack_require__(260), __esModule: true };
  64203. /***/ }),
  64204. /* 22 */
  64205. /***/ (function(module, exports, __webpack_require__) {
  64206. var isObject = __webpack_require__(18);
  64207. module.exports = function (it) {
  64208. if (!isObject(it)) throw TypeError(it + ' is not an object!');
  64209. return it;
  64210. };
  64211. /***/ }),
  64212. /* 23 */
  64213. /***/ (function(module, exports, __webpack_require__) {
  64214. "use strict";
  64215. Object.defineProperty(exports, "__esModule", {
  64216. value: true
  64217. });
  64218. var _assign = __webpack_require__(15);
  64219. var _assign2 = _interopRequireDefault(_assign);
  64220. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  64221. function getTarget(node) {
  64222. if (node === void 0) {
  64223. node = document.body;
  64224. }
  64225. if (node === true) {
  64226. return document.body;
  64227. }
  64228. return node instanceof window.Node ? node : document.querySelector(node);
  64229. }
  64230. var directive = {
  64231. inserted: function inserted(el, _ref, vnode) {
  64232. var value = _ref.value;
  64233. if (el.dataset && el.dataset.transfer !== 'true') return false;
  64234. el.className = el.className ? el.className + ' v-transfer-dom' : 'v-transfer-dom';
  64235. var parentNode = el.parentNode;
  64236. if (!parentNode) return;
  64237. var home = document.createComment('');
  64238. var hasMovedOut = false;
  64239. if (value !== false) {
  64240. parentNode.replaceChild(home, el);
  64241. getTarget(value).appendChild(el);
  64242. hasMovedOut = true;
  64243. }
  64244. if (!el.__transferDomData) {
  64245. el.__transferDomData = {
  64246. parentNode: parentNode,
  64247. home: home,
  64248. target: getTarget(value),
  64249. hasMovedOut: hasMovedOut
  64250. };
  64251. }
  64252. },
  64253. componentUpdated: function componentUpdated(el, _ref2) {
  64254. var value = _ref2.value;
  64255. if (el.dataset && el.dataset.transfer !== 'true') return false;
  64256. var ref$1 = el.__transferDomData;
  64257. if (!ref$1) return;
  64258. var parentNode = ref$1.parentNode;
  64259. var home = ref$1.home;
  64260. var hasMovedOut = ref$1.hasMovedOut;
  64261. if (!hasMovedOut && value) {
  64262. parentNode.replaceChild(home, el);
  64263. getTarget(value).appendChild(el);
  64264. el.__transferDomData = (0, _assign2.default)({}, el.__transferDomData, { hasMovedOut: true, target: getTarget(value) });
  64265. } else if (hasMovedOut && value === false) {
  64266. parentNode.replaceChild(el, home);
  64267. el.__transferDomData = (0, _assign2.default)({}, el.__transferDomData, { hasMovedOut: false, target: getTarget(value) });
  64268. } else if (value) {
  64269. getTarget(value).appendChild(el);
  64270. }
  64271. },
  64272. unbind: function unbind(el) {
  64273. if (el.dataset && el.dataset.transfer !== 'true') return false;
  64274. el.className = el.className.replace('v-transfer-dom', '');
  64275. var ref$1 = el.__transferDomData;
  64276. if (!ref$1) return;
  64277. if (el.__transferDomData.hasMovedOut === true) {
  64278. el.__transferDomData.parentNode && el.__transferDomData.parentNode.appendChild(el);
  64279. }
  64280. el.__transferDomData = null;
  64281. }
  64282. };
  64283. exports.default = directive;
  64284. /***/ }),
  64285. /* 24 */
  64286. /***/ (function(module, exports, __webpack_require__) {
  64287. // optional / simple context binding
  64288. var aFunction = __webpack_require__(43);
  64289. module.exports = function (fn, that, length) {
  64290. aFunction(fn);
  64291. if (that === undefined) return fn;
  64292. switch (length) {
  64293. case 1: return function (a) {
  64294. return fn.call(that, a);
  64295. };
  64296. case 2: return function (a, b) {
  64297. return fn.call(that, a, b);
  64298. };
  64299. case 3: return function (a, b, c) {
  64300. return fn.call(that, a, b, c);
  64301. };
  64302. }
  64303. return function (/* ...args */) {
  64304. return fn.apply(that, arguments);
  64305. };
  64306. };
  64307. /***/ }),
  64308. /* 25 */
  64309. /***/ (function(module, exports, __webpack_require__) {
  64310. var dP = __webpack_require__(14);
  64311. var createDesc = __webpack_require__(44);
  64312. module.exports = __webpack_require__(13) ? function (object, key, value) {
  64313. return dP.f(object, key, createDesc(1, value));
  64314. } : function (object, key, value) {
  64315. object[key] = value;
  64316. return object;
  64317. };
  64318. /***/ }),
  64319. /* 26 */
  64320. /***/ (function(module, exports, __webpack_require__) {
  64321. "use strict";
  64322. exports.__esModule = true;
  64323. var _isIterable2 = __webpack_require__(291);
  64324. var _isIterable3 = _interopRequireDefault(_isIterable2);
  64325. var _getIterator2 = __webpack_require__(45);
  64326. var _getIterator3 = _interopRequireDefault(_getIterator2);
  64327. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  64328. exports.default = function () {
  64329. function sliceIterator(arr, i) {
  64330. var _arr = [];
  64331. var _n = true;
  64332. var _d = false;
  64333. var _e = undefined;
  64334. try {
  64335. for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {
  64336. _arr.push(_s.value);
  64337. if (i && _arr.length === i) break;
  64338. }
  64339. } catch (err) {
  64340. _d = true;
  64341. _e = err;
  64342. } finally {
  64343. try {
  64344. if (!_n && _i["return"]) _i["return"]();
  64345. } finally {
  64346. if (_d) throw _e;
  64347. }
  64348. }
  64349. return _arr;
  64350. }
  64351. return function (arr, i) {
  64352. if (Array.isArray(arr)) {
  64353. return arr;
  64354. } else if ((0, _isIterable3.default)(Object(arr))) {
  64355. return sliceIterator(arr, i);
  64356. } else {
  64357. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  64358. }
  64359. };
  64360. }();
  64361. /***/ }),
  64362. /* 27 */
  64363. /***/ (function(module, exports, __webpack_require__) {
  64364. "use strict";
  64365. exports.__esModule = true;
  64366. var _iterator = __webpack_require__(301);
  64367. var _iterator2 = _interopRequireDefault(_iterator);
  64368. var _symbol = __webpack_require__(303);
  64369. var _symbol2 = _interopRequireDefault(_symbol);
  64370. var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
  64371. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  64372. exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
  64373. return typeof obj === "undefined" ? "undefined" : _typeof(obj);
  64374. } : function (obj) {
  64375. return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
  64376. };
  64377. /***/ }),
  64378. /* 28 */
  64379. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  64380. "use strict";
  64381. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  64382. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue__ = __webpack_require__(131);
  64383. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue__);
  64384. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  64385. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_9c2aeb5c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_vue__ = __webpack_require__(355);
  64386. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_9c2aeb5c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_9c2aeb5c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_vue__);
  64387. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  64388. /* script */
  64389. /* template */
  64390. /* template functional */
  64391. var __vue_template_functional__ = false
  64392. /* styles */
  64393. var __vue_styles__ = null
  64394. /* scopeId */
  64395. var __vue_scopeId__ = null
  64396. /* moduleIdentifier (server only) */
  64397. var __vue_module_identifier__ = null
  64398. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  64399. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_vue___default.a,
  64400. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_9c2aeb5c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_vue__["render"],
  64401. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_9c2aeb5c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_vue__["staticRenderFns"],
  64402. __vue_template_functional__,
  64403. __vue_styles__,
  64404. __vue_scopeId__,
  64405. __vue_module_identifier__
  64406. )
  64407. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  64408. /***/ }),
  64409. /* 29 */
  64410. /***/ (function(module, exports, __webpack_require__) {
  64411. // 7.1.13 ToObject(argument)
  64412. var defined = __webpack_require__(63);
  64413. module.exports = function (it) {
  64414. return Object(defined(it));
  64415. };
  64416. /***/ }),
  64417. /* 30 */
  64418. /***/ (function(module, exports) {
  64419. var hasOwnProperty = {}.hasOwnProperty;
  64420. module.exports = function (it, key) {
  64421. return hasOwnProperty.call(it, key);
  64422. };
  64423. /***/ }),
  64424. /* 31 */
  64425. /***/ (function(module, exports) {
  64426. module.exports = function (exec) {
  64427. try {
  64428. return !!exec();
  64429. } catch (e) {
  64430. return true;
  64431. }
  64432. };
  64433. /***/ }),
  64434. /* 32 */
  64435. /***/ (function(module, exports, __webpack_require__) {
  64436. "use strict";
  64437. exports.__esModule = true;
  64438. var _assign = __webpack_require__(15);
  64439. var _assign2 = _interopRequireDefault(_assign);
  64440. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  64441. exports.default = _assign2.default || function (target) {
  64442. for (var i = 1; i < arguments.length; i++) {
  64443. var source = arguments[i];
  64444. for (var key in source) {
  64445. if (Object.prototype.hasOwnProperty.call(source, key)) {
  64446. target[key] = source[key];
  64447. }
  64448. }
  64449. }
  64450. return target;
  64451. };
  64452. /***/ }),
  64453. /* 33 */
  64454. /***/ (function(module, exports, __webpack_require__) {
  64455. // to indexed object, toObject with fallback for non-array-like ES3 strings
  64456. var IObject = __webpack_require__(64);
  64457. var defined = __webpack_require__(63);
  64458. module.exports = function (it) {
  64459. return IObject(defined(it));
  64460. };
  64461. /***/ }),
  64462. /* 34 */
  64463. /***/ (function(module, exports) {
  64464. module.exports = {};
  64465. /***/ }),
  64466. /* 35 */
  64467. /***/ (function(module, exports, __webpack_require__) {
  64468. "use strict";
  64469. var $at = __webpack_require__(280)(true);
  64470. // 21.1.3.27 String.prototype[@@iterator]()
  64471. __webpack_require__(72)(String, 'String', function (iterated) {
  64472. this._t = String(iterated); // target
  64473. this._i = 0; // next index
  64474. // 21.1.5.2.1 %StringIteratorPrototype%.next()
  64475. }, function () {
  64476. var O = this._t;
  64477. var index = this._i;
  64478. var point;
  64479. if (index >= O.length) return { value: undefined, done: true };
  64480. point = $at(O, index);
  64481. this._i += point.length;
  64482. return { value: point, done: false };
  64483. });
  64484. /***/ }),
  64485. /* 36 */
  64486. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  64487. "use strict";
  64488. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  64489. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue__ = __webpack_require__(115);
  64490. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue__);
  64491. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  64492. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6cd7d5ac_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_vue__ = __webpack_require__(300);
  64493. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6cd7d5ac_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6cd7d5ac_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_vue__);
  64494. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  64495. /* script */
  64496. /* template */
  64497. /* template functional */
  64498. var __vue_template_functional__ = false
  64499. /* styles */
  64500. var __vue_styles__ = null
  64501. /* scopeId */
  64502. var __vue_scopeId__ = null
  64503. /* moduleIdentifier (server only) */
  64504. var __vue_module_identifier__ = null
  64505. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  64506. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue___default.a,
  64507. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6cd7d5ac_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_vue__["render"],
  64508. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6cd7d5ac_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_vue__["staticRenderFns"],
  64509. __vue_template_functional__,
  64510. __vue_styles__,
  64511. __vue_scopeId__,
  64512. __vue_module_identifier__
  64513. )
  64514. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  64515. /***/ }),
  64516. /* 37 */
  64517. /***/ (function(module, exports, __webpack_require__) {
  64518. "use strict";
  64519. Object.defineProperty(exports, "__esModule", {
  64520. value: true
  64521. });
  64522. var transferIndex = 0;
  64523. var lastVisibleIndex = 0;
  64524. function transferIncrease() {
  64525. exports.transferIndex = transferIndex += 1;
  64526. }
  64527. function lastVisibleIncrease() {
  64528. exports.lastVisibleIndex = lastVisibleIndex += 1;
  64529. }
  64530. exports.transferIndex = transferIndex;
  64531. exports.transferIncrease = transferIncrease;
  64532. exports.lastVisibleIndex = lastVisibleIndex;
  64533. exports.lastVisibleIncrease = lastVisibleIncrease;
  64534. /***/ }),
  64535. /* 38 */
  64536. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  64537. "use strict";
  64538. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  64539. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_vue__ = __webpack_require__(124);
  64540. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_vue__);
  64541. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  64542. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2a328bd6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_vue__ = __webpack_require__(339);
  64543. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2a328bd6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2a328bd6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_vue__);
  64544. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  64545. /* script */
  64546. /* template */
  64547. /* template functional */
  64548. var __vue_template_functional__ = false
  64549. /* styles */
  64550. var __vue_styles__ = null
  64551. /* scopeId */
  64552. var __vue_scopeId__ = null
  64553. /* moduleIdentifier (server only) */
  64554. var __vue_module_identifier__ = null
  64555. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  64556. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_vue___default.a,
  64557. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2a328bd6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_vue__["render"],
  64558. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2a328bd6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_vue__["staticRenderFns"],
  64559. __vue_template_functional__,
  64560. __vue_styles__,
  64561. __vue_scopeId__,
  64562. __vue_module_identifier__
  64563. )
  64564. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  64565. /***/ }),
  64566. /* 39 */
  64567. /***/ (function(module, exports, __webpack_require__) {
  64568. "use strict";
  64569. Object.defineProperty(exports, "__esModule", {
  64570. value: true
  64571. });
  64572. var _isFinite = __webpack_require__(75);
  64573. var _isFinite2 = _interopRequireDefault(_isFinite);
  64574. exports.changeColor = changeColor;
  64575. exports.clamp = clamp;
  64576. exports.getIncrement = getIncrement;
  64577. exports.getTouches = getTouches;
  64578. exports.toRGBAString = toRGBAString;
  64579. exports.isValidHex = isValidHex;
  64580. exports.simpleCheckForValidColor = simpleCheckForValidColor;
  64581. var _tinycolor = __webpack_require__(149);
  64582. var _tinycolor2 = _interopRequireDefault(_tinycolor);
  64583. var _assist = __webpack_require__(3);
  64584. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  64585. function setAlpha(data, alpha) {
  64586. var color = (0, _tinycolor2.default)(data);
  64587. var _a = color._a;
  64588. if (_a === undefined || _a === null) {
  64589. color.setAlpha(alpha || 1);
  64590. }
  64591. return color;
  64592. }
  64593. function getColor(data, colorData) {
  64594. var alpha = colorData && colorData.a;
  64595. if (colorData) {
  64596. if (colorData.hsl) {
  64597. return setAlpha(colorData.hsl, alpha);
  64598. }
  64599. if (colorData.hex && colorData.hex.length > 0) {
  64600. return setAlpha(colorData.hex, alpha);
  64601. }
  64602. }
  64603. return setAlpha(colorData, alpha);
  64604. }
  64605. function changeColor(data, oldHue) {
  64606. var colorData = data === '' ? '#2d8cf0' : data;
  64607. var color = getColor(data, colorData);
  64608. var hsl = color.toHsl();
  64609. var hsv = color.toHsv();
  64610. if (hsl.s === 0) {
  64611. hsl.h = colorData.h || colorData.hsl && colorData.hsl.h || oldHue || 0;
  64612. hsv.h = hsl.h;
  64613. }
  64614. if (hsv.v < 0.0164) {
  64615. hsv.h = colorData.h || colorData.hsv && colorData.hsv.h || 0;
  64616. hsv.s = colorData.s || colorData.hsv && colorData.hsv.s || 0;
  64617. }
  64618. if (hsl.l < 0.01) {
  64619. hsl.h = colorData.h || colorData.hsl && colorData.hsl.h || 0;
  64620. hsl.s = colorData.s || colorData.hsl && colorData.hsl.s || 0;
  64621. }
  64622. return {
  64623. hsl: hsl,
  64624. hex: color.toHexString().toUpperCase(),
  64625. rgba: color.toRgb(),
  64626. hsv: hsv,
  64627. oldHue: colorData.h || oldHue || hsl.h,
  64628. source: colorData.source,
  64629. a: colorData.a || color.getAlpha()
  64630. };
  64631. }
  64632. function clamp(value, min, max) {
  64633. if (value < min) {
  64634. return min;
  64635. }
  64636. if (value > max) {
  64637. return max;
  64638. }
  64639. return value;
  64640. }
  64641. function getIncrement(key, keys, increment) {
  64642. return (0, _assist.oneOf)(key, keys) ? increment : 0;
  64643. }
  64644. function getTouches(e, prop) {
  64645. return e.touches ? e.touches[0][prop] : 0;
  64646. }
  64647. function toRGBAString(rgba) {
  64648. var r = rgba.r,
  64649. g = rgba.g,
  64650. b = rgba.b,
  64651. a = rgba.a;
  64652. return 'rgba(' + String([r, g, b, a].join(',')) + ')';
  64653. }
  64654. function isValidHex(hex) {
  64655. return (0, _tinycolor2.default)(hex).isValid();
  64656. }
  64657. function checkIteratee(data, counts, letter) {
  64658. var checked = counts.checked,
  64659. passed = counts.passed;
  64660. var value = data[letter];
  64661. if (value) {
  64662. checked += 1;
  64663. if ((0, _isFinite2.default)(value)) {
  64664. passed += 1;
  64665. }
  64666. }
  64667. return { checked: checked, passed: passed };
  64668. }
  64669. var keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'l', 'v'];
  64670. function simpleCheckForValidColor(data) {
  64671. var results = keysToCheck.reduce(checkIteratee.bind(null, data), { checked: 0, passed: 0 });
  64672. return results.checked === results.passed ? data : undefined;
  64673. }
  64674. /***/ }),
  64675. /* 40 */
  64676. /***/ (function(module, exports, __webpack_require__) {
  64677. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  64678. var $keys = __webpack_require__(96);
  64679. var enumBugKeys = __webpack_require__(68);
  64680. module.exports = Object.keys || function keys(O) {
  64681. return $keys(O, enumBugKeys);
  64682. };
  64683. /***/ }),
  64684. /* 41 */
  64685. /***/ (function(module, exports) {
  64686. var toString = {}.toString;
  64687. module.exports = function (it) {
  64688. return toString.call(it).slice(8, -1);
  64689. };
  64690. /***/ }),
  64691. /* 42 */
  64692. /***/ (function(module, exports) {
  64693. module.exports = true;
  64694. /***/ }),
  64695. /* 43 */
  64696. /***/ (function(module, exports) {
  64697. module.exports = function (it) {
  64698. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  64699. return it;
  64700. };
  64701. /***/ }),
  64702. /* 44 */
  64703. /***/ (function(module, exports) {
  64704. module.exports = function (bitmap, value) {
  64705. return {
  64706. enumerable: !(bitmap & 1),
  64707. configurable: !(bitmap & 2),
  64708. writable: !(bitmap & 4),
  64709. value: value
  64710. };
  64711. };
  64712. /***/ }),
  64713. /* 45 */
  64714. /***/ (function(module, exports, __webpack_require__) {
  64715. module.exports = { "default": __webpack_require__(276), __esModule: true };
  64716. /***/ }),
  64717. /* 46 */
  64718. /***/ (function(module, exports, __webpack_require__) {
  64719. __webpack_require__(277);
  64720. var global = __webpack_require__(9);
  64721. var hide = __webpack_require__(25);
  64722. var Iterators = __webpack_require__(34);
  64723. var TO_STRING_TAG = __webpack_require__(10)('toStringTag');
  64724. var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
  64725. 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
  64726. 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
  64727. 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
  64728. 'TextTrackList,TouchList').split(',');
  64729. for (var i = 0; i < DOMIterables.length; i++) {
  64730. var NAME = DOMIterables[i];
  64731. var Collection = global[NAME];
  64732. var proto = Collection && Collection.prototype;
  64733. if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  64734. Iterators[NAME] = Iterators.Array;
  64735. }
  64736. /***/ }),
  64737. /* 47 */
  64738. /***/ (function(module, exports, __webpack_require__) {
  64739. var def = __webpack_require__(14).f;
  64740. var has = __webpack_require__(30);
  64741. var TAG = __webpack_require__(10)('toStringTag');
  64742. module.exports = function (it, tag, stat) {
  64743. if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
  64744. };
  64745. /***/ }),
  64746. /* 48 */
  64747. /***/ (function(module, exports, __webpack_require__) {
  64748. "use strict";
  64749. Object.defineProperty(exports, "__esModule", {
  64750. value: true
  64751. });
  64752. var _newArrowCheck2 = __webpack_require__(1);
  64753. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  64754. var _typeof2 = __webpack_require__(27);
  64755. var _typeof3 = _interopRequireDefault(_typeof2);
  64756. var _assist = __webpack_require__(3);
  64757. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  64758. exports.default = {
  64759. props: {
  64760. to: {
  64761. type: [Object, String]
  64762. },
  64763. replace: {
  64764. type: Boolean,
  64765. default: false
  64766. },
  64767. target: {
  64768. type: String,
  64769. validator: function validator(value) {
  64770. return (0, _assist.oneOf)(value, ['_blank', '_self', '_parent', '_top']);
  64771. },
  64772. default: '_self'
  64773. },
  64774. append: {
  64775. type: Boolean,
  64776. required: false,
  64777. default: false
  64778. }
  64779. },
  64780. computed: {
  64781. linkUrl: function linkUrl() {
  64782. var type = (0, _typeof3.default)(this.to);
  64783. if (type !== 'string') {
  64784. return null;
  64785. }
  64786. if (this.to.includes('//')) {
  64787. return this.to;
  64788. }
  64789. var router = this.$router;
  64790. if (router) {
  64791. var current = this.$route;
  64792. var route = router.resolve(this.to, current, this.append);
  64793. return route ? route.href : this.to;
  64794. }
  64795. return this.to;
  64796. }
  64797. },
  64798. methods: {
  64799. handleOpenTo: function handleOpenTo() {
  64800. var router = this.$router;
  64801. var to = this.to;
  64802. if (router) {
  64803. var current = this.$route;
  64804. var route = router.resolve(this.to, current, this.append);
  64805. to = route ? route.href : this.to;
  64806. }
  64807. if (typeof this.to === 'string') return;
  64808. window.open(to);
  64809. },
  64810. handleClick: function handleClick() {
  64811. var _this = this;
  64812. var new_window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  64813. var router = this.$router;
  64814. if (new_window) {
  64815. this.handleOpenTo();
  64816. } else {
  64817. if (router) {
  64818. if (typeof this.to === 'string' && this.to.includes('//')) {
  64819. window.location.href = this.to;
  64820. } else {
  64821. this.replace ? this.$router.replace(this.to, function () {
  64822. (0, _newArrowCheck3.default)(this, _this);
  64823. }.bind(this)) : this.$router.push(this.to, function () {
  64824. (0, _newArrowCheck3.default)(this, _this);
  64825. }.bind(this));
  64826. }
  64827. } else {
  64828. window.location.href = this.to;
  64829. }
  64830. }
  64831. },
  64832. handleCheckClick: function handleCheckClick(event) {
  64833. var new_window = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  64834. if (this.to) {
  64835. if (this.target === '_blank') {
  64836. this.handleOpenTo();
  64837. return false;
  64838. } else {
  64839. event.preventDefault();
  64840. this.handleClick(new_window);
  64841. }
  64842. }
  64843. }
  64844. }
  64845. };
  64846. /***/ }),
  64847. /* 49 */
  64848. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  64849. "use strict";
  64850. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  64851. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_vue__ = __webpack_require__(142);
  64852. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_vue__);
  64853. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  64854. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ecbefd0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_checkbox_vue__ = __webpack_require__(381);
  64855. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ecbefd0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_checkbox_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ecbefd0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_checkbox_vue__);
  64856. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  64857. /* script */
  64858. /* template */
  64859. /* template functional */
  64860. var __vue_template_functional__ = false
  64861. /* styles */
  64862. var __vue_styles__ = null
  64863. /* scopeId */
  64864. var __vue_scopeId__ = null
  64865. /* moduleIdentifier (server only) */
  64866. var __vue_module_identifier__ = null
  64867. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  64868. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_vue___default.a,
  64869. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ecbefd0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_checkbox_vue__["render"],
  64870. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ecbefd0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_checkbox_vue__["staticRenderFns"],
  64871. __vue_template_functional__,
  64872. __vue_styles__,
  64873. __vue_scopeId__,
  64874. __vue_module_identifier__
  64875. )
  64876. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  64877. /***/ }),
  64878. /* 50 */
  64879. /***/ (function(module, exports, __webpack_require__) {
  64880. "use strict";
  64881. Object.defineProperty(exports, "__esModule", {
  64882. value: true
  64883. });
  64884. exports.default = {
  64885. data: function data() {
  64886. return {
  64887. prefixCls: 'ivu-color-picker',
  64888. inputPrefixCls: 'ivu-input',
  64889. iconPrefixCls: 'ivu-icon',
  64890. transferPrefixCls: 'ivu-transfer'
  64891. };
  64892. }
  64893. };
  64894. /***/ }),
  64895. /* 51 */
  64896. /***/ (function(module, exports, __webpack_require__) {
  64897. var ctx = __webpack_require__(24);
  64898. var call = __webpack_require__(112);
  64899. var isArrayIter = __webpack_require__(113);
  64900. var anObject = __webpack_require__(22);
  64901. var toLength = __webpack_require__(52);
  64902. var getIterFn = __webpack_require__(73);
  64903. var BREAK = {};
  64904. var RETURN = {};
  64905. var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  64906. var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
  64907. var f = ctx(fn, that, entries ? 2 : 1);
  64908. var index = 0;
  64909. var length, step, iterator, result;
  64910. if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  64911. // fast case for arrays with default iterator
  64912. if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
  64913. result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
  64914. if (result === BREAK || result === RETURN) return result;
  64915. } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
  64916. result = call(iterator, f, step.value, entries);
  64917. if (result === BREAK || result === RETURN) return result;
  64918. }
  64919. };
  64920. exports.BREAK = BREAK;
  64921. exports.RETURN = RETURN;
  64922. /***/ }),
  64923. /* 52 */
  64924. /***/ (function(module, exports, __webpack_require__) {
  64925. // 7.1.15 ToLength
  64926. var toInteger = __webpack_require__(65);
  64927. var min = Math.min;
  64928. module.exports = function (it) {
  64929. return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  64930. };
  64931. /***/ }),
  64932. /* 53 */
  64933. /***/ (function(module, exports) {
  64934. var id = 0;
  64935. var px = Math.random();
  64936. module.exports = function (key) {
  64937. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  64938. };
  64939. /***/ }),
  64940. /* 54 */
  64941. /***/ (function(module, exports) {
  64942. exports.f = {}.propertyIsEnumerable;
  64943. /***/ }),
  64944. /* 55 */
  64945. /***/ (function(module, exports, __webpack_require__) {
  64946. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  64947. var anObject = __webpack_require__(22);
  64948. var dPs = __webpack_require__(104);
  64949. var enumBugKeys = __webpack_require__(68);
  64950. var IE_PROTO = __webpack_require__(66)('IE_PROTO');
  64951. var Empty = function () { /* empty */ };
  64952. var PROTOTYPE = 'prototype';
  64953. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  64954. var createDict = function () {
  64955. // Thrash, waste and sodomy: IE GC bug
  64956. var iframe = __webpack_require__(69)('iframe');
  64957. var i = enumBugKeys.length;
  64958. var lt = '<';
  64959. var gt = '>';
  64960. var iframeDocument;
  64961. iframe.style.display = 'none';
  64962. __webpack_require__(105).appendChild(iframe);
  64963. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  64964. // createDict = iframe.contentWindow.Object;
  64965. // html.removeChild(iframe);
  64966. iframeDocument = iframe.contentWindow.document;
  64967. iframeDocument.open();
  64968. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  64969. iframeDocument.close();
  64970. createDict = iframeDocument.F;
  64971. while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  64972. return createDict();
  64973. };
  64974. module.exports = Object.create || function create(O, Properties) {
  64975. var result;
  64976. if (O !== null) {
  64977. Empty[PROTOTYPE] = anObject(O);
  64978. result = new Empty();
  64979. Empty[PROTOTYPE] = null;
  64980. // add "__proto__" for Object.getPrototypeOf polyfill
  64981. result[IE_PROTO] = O;
  64982. } else result = createDict();
  64983. return Properties === undefined ? result : dPs(result, Properties);
  64984. };
  64985. /***/ }),
  64986. /* 56 */
  64987. /***/ (function(module, exports, __webpack_require__) {
  64988. // getting tag from 19.1.3.6 Object.prototype.toString()
  64989. var cof = __webpack_require__(41);
  64990. var TAG = __webpack_require__(10)('toStringTag');
  64991. // ES3 wrong here
  64992. var ARG = cof(function () { return arguments; }()) == 'Arguments';
  64993. // fallback for IE11 Script Access Denied error
  64994. var tryGet = function (it, key) {
  64995. try {
  64996. return it[key];
  64997. } catch (e) { /* empty */ }
  64998. };
  64999. module.exports = function (it) {
  65000. var O, T, B;
  65001. return it === undefined ? 'Undefined' : it === null ? 'Null'
  65002. // @@toStringTag case
  65003. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  65004. // builtinTag case
  65005. : ARG ? cof(O)
  65006. // ES3 arguments fallback
  65007. : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  65008. };
  65009. /***/ }),
  65010. /* 57 */
  65011. /***/ (function(module, exports, __webpack_require__) {
  65012. module.exports = { "default": __webpack_require__(296), __esModule: true };
  65013. /***/ }),
  65014. /* 58 */
  65015. /***/ (function(module, exports, __webpack_require__) {
  65016. "use strict";
  65017. Object.defineProperty(exports, "__esModule", {
  65018. value: true
  65019. });
  65020. exports.default = {
  65021. props: {
  65022. disabledHours: {
  65023. type: Array,
  65024. default: function _default() {
  65025. return [];
  65026. }
  65027. },
  65028. disabledMinutes: {
  65029. type: Array,
  65030. default: function _default() {
  65031. return [];
  65032. }
  65033. },
  65034. disabledSeconds: {
  65035. type: Array,
  65036. default: function _default() {
  65037. return [];
  65038. }
  65039. },
  65040. hideDisabledOptions: {
  65041. type: Boolean,
  65042. default: false
  65043. }
  65044. }
  65045. };
  65046. /***/ }),
  65047. /* 59 */
  65048. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  65049. "use strict";
  65050. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  65051. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_confirm_vue__ = __webpack_require__(170);
  65052. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_confirm_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_confirm_vue__);
  65053. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_confirm_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_confirm_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  65054. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_26b6f28e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_confirm_vue__ = __webpack_require__(418);
  65055. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_26b6f28e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_confirm_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_26b6f28e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_confirm_vue__);
  65056. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  65057. /* script */
  65058. /* template */
  65059. /* template functional */
  65060. var __vue_template_functional__ = false
  65061. /* styles */
  65062. var __vue_styles__ = null
  65063. /* scopeId */
  65064. var __vue_scopeId__ = null
  65065. /* moduleIdentifier (server only) */
  65066. var __vue_module_identifier__ = null
  65067. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  65068. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_confirm_vue___default.a,
  65069. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_26b6f28e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_confirm_vue__["render"],
  65070. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_26b6f28e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_confirm_vue__["staticRenderFns"],
  65071. __vue_template_functional__,
  65072. __vue_styles__,
  65073. __vue_scopeId__,
  65074. __vue_module_identifier__
  65075. )
  65076. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  65077. /***/ }),
  65078. /* 60 */
  65079. /***/ (function(module, exports, __webpack_require__) {
  65080. "use strict";
  65081. Object.defineProperty(exports, "__esModule", {
  65082. value: true
  65083. });
  65084. var _newArrowCheck2 = __webpack_require__(1);
  65085. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  65086. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  65087. var prefixCls = 'ivu-picker-panel';
  65088. var datePrefixCls = 'ivu-date-picker';
  65089. exports.default = {
  65090. props: {
  65091. confirm: {
  65092. type: Boolean,
  65093. default: false
  65094. }
  65095. },
  65096. methods: {
  65097. iconBtnCls: function iconBtnCls(direction) {
  65098. var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  65099. return [prefixCls + '-icon-btn', datePrefixCls + '-' + String(direction) + '-btn', datePrefixCls + '-' + String(direction) + '-btn-arrow' + String(type)];
  65100. },
  65101. handleShortcutClick: function handleShortcutClick(shortcut) {
  65102. if (shortcut.value) this.$emit('on-pick', shortcut.value());
  65103. if (shortcut.onClick) shortcut.onClick(this);
  65104. },
  65105. handlePickClear: function handlePickClear() {
  65106. this.resetView();
  65107. this.$emit('on-pick-clear');
  65108. },
  65109. handlePickSuccess: function handlePickSuccess() {
  65110. this.resetView();
  65111. this.$emit('on-pick-success');
  65112. },
  65113. handlePickClick: function handlePickClick() {
  65114. this.$emit('on-pick-click');
  65115. },
  65116. resetView: function resetView() {
  65117. var _this = this;
  65118. setTimeout(function () {
  65119. (0, _newArrowCheck3.default)(this, _this);
  65120. return this.currentView = this.selectionMode;
  65121. }.bind(this), 500);
  65122. },
  65123. handleClear: function handleClear() {
  65124. var _this2 = this;
  65125. this.dates = this.dates.map(function () {
  65126. (0, _newArrowCheck3.default)(this, _this2);
  65127. return null;
  65128. }.bind(this));
  65129. this.rangeState = {};
  65130. this.$emit('on-pick', this.dates);
  65131. this.handleConfirm();
  65132. },
  65133. handleConfirm: function handleConfirm(visible, type) {
  65134. this.$emit('on-pick', this.dates, visible, type || this.type);
  65135. },
  65136. onToggleVisibility: function onToggleVisibility(open) {
  65137. var _$refs = this.$refs,
  65138. timeSpinner = _$refs.timeSpinner,
  65139. timeSpinnerEnd = _$refs.timeSpinnerEnd;
  65140. if (open && timeSpinner) timeSpinner.updateScroll();
  65141. if (open && timeSpinnerEnd) timeSpinnerEnd.updateScroll();
  65142. }
  65143. }
  65144. };
  65145. /***/ }),
  65146. /* 61 */
  65147. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  65148. "use strict";
  65149. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  65150. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue__ = __webpack_require__(179);
  65151. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue__);
  65152. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  65153. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7c690a70_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_vue__ = __webpack_require__(432);
  65154. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7c690a70_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7c690a70_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_vue__);
  65155. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  65156. /* script */
  65157. /* template */
  65158. /* template functional */
  65159. var __vue_template_functional__ = false
  65160. /* styles */
  65161. var __vue_styles__ = null
  65162. /* scopeId */
  65163. var __vue_scopeId__ = null
  65164. /* moduleIdentifier (server only) */
  65165. var __vue_module_identifier__ = null
  65166. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  65167. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_vue___default.a,
  65168. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7c690a70_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_vue__["render"],
  65169. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7c690a70_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_vue__["staticRenderFns"],
  65170. __vue_template_functional__,
  65171. __vue_styles__,
  65172. __vue_scopeId__,
  65173. __vue_module_identifier__
  65174. )
  65175. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  65176. /***/ }),
  65177. /* 62 */
  65178. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  65179. "use strict";
  65180. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  65181. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_menu_vue__ = __webpack_require__(180);
  65182. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_menu_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_menu_vue__);
  65183. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_menu_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_menu_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  65184. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b48d9576_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_menu_vue__ = __webpack_require__(433);
  65185. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b48d9576_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_menu_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b48d9576_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_menu_vue__);
  65186. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  65187. /* script */
  65188. /* template */
  65189. /* template functional */
  65190. var __vue_template_functional__ = false
  65191. /* styles */
  65192. var __vue_styles__ = null
  65193. /* scopeId */
  65194. var __vue_scopeId__ = null
  65195. /* moduleIdentifier (server only) */
  65196. var __vue_module_identifier__ = null
  65197. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  65198. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_menu_vue___default.a,
  65199. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b48d9576_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_menu_vue__["render"],
  65200. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b48d9576_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_menu_vue__["staticRenderFns"],
  65201. __vue_template_functional__,
  65202. __vue_styles__,
  65203. __vue_scopeId__,
  65204. __vue_module_identifier__
  65205. )
  65206. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  65207. /***/ }),
  65208. /* 63 */
  65209. /***/ (function(module, exports) {
  65210. // 7.2.1 RequireObjectCoercible(argument)
  65211. module.exports = function (it) {
  65212. if (it == undefined) throw TypeError("Can't call method on " + it);
  65213. return it;
  65214. };
  65215. /***/ }),
  65216. /* 64 */
  65217. /***/ (function(module, exports, __webpack_require__) {
  65218. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  65219. var cof = __webpack_require__(41);
  65220. // eslint-disable-next-line no-prototype-builtins
  65221. module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  65222. return cof(it) == 'String' ? it.split('') : Object(it);
  65223. };
  65224. /***/ }),
  65225. /* 65 */
  65226. /***/ (function(module, exports) {
  65227. // 7.1.4 ToInteger
  65228. var ceil = Math.ceil;
  65229. var floor = Math.floor;
  65230. module.exports = function (it) {
  65231. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  65232. };
  65233. /***/ }),
  65234. /* 66 */
  65235. /***/ (function(module, exports, __webpack_require__) {
  65236. var shared = __webpack_require__(67)('keys');
  65237. var uid = __webpack_require__(53);
  65238. module.exports = function (key) {
  65239. return shared[key] || (shared[key] = uid(key));
  65240. };
  65241. /***/ }),
  65242. /* 67 */
  65243. /***/ (function(module, exports, __webpack_require__) {
  65244. var core = __webpack_require__(5);
  65245. var global = __webpack_require__(9);
  65246. var SHARED = '__core-js_shared__';
  65247. var store = global[SHARED] || (global[SHARED] = {});
  65248. (module.exports = function (key, value) {
  65249. return store[key] || (store[key] = value !== undefined ? value : {});
  65250. })('versions', []).push({
  65251. version: core.version,
  65252. mode: __webpack_require__(42) ? 'pure' : 'global',
  65253. copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
  65254. });
  65255. /***/ }),
  65256. /* 68 */
  65257. /***/ (function(module, exports) {
  65258. // IE 8- don't enum bug keys
  65259. module.exports = (
  65260. 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
  65261. ).split(',');
  65262. /***/ }),
  65263. /* 69 */
  65264. /***/ (function(module, exports, __webpack_require__) {
  65265. var isObject = __webpack_require__(18);
  65266. var document = __webpack_require__(9).document;
  65267. // typeof document.createElement is 'object' in old IE
  65268. var is = isObject(document) && isObject(document.createElement);
  65269. module.exports = function (it) {
  65270. return is ? document.createElement(it) : {};
  65271. };
  65272. /***/ }),
  65273. /* 70 */
  65274. /***/ (function(module, exports, __webpack_require__) {
  65275. // 7.1.1 ToPrimitive(input [, PreferredType])
  65276. var isObject = __webpack_require__(18);
  65277. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  65278. // and the second argument - flag - preferred type is a string
  65279. module.exports = function (it, S) {
  65280. if (!isObject(it)) return it;
  65281. var fn, val;
  65282. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  65283. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  65284. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  65285. throw TypeError("Can't convert object to primitive value");
  65286. };
  65287. /***/ }),
  65288. /* 71 */
  65289. /***/ (function(module, exports) {
  65290. exports.f = Object.getOwnPropertySymbols;
  65291. /***/ }),
  65292. /* 72 */
  65293. /***/ (function(module, exports, __webpack_require__) {
  65294. "use strict";
  65295. var LIBRARY = __webpack_require__(42);
  65296. var $export = __webpack_require__(7);
  65297. var redefine = __webpack_require__(103);
  65298. var hide = __webpack_require__(25);
  65299. var Iterators = __webpack_require__(34);
  65300. var $iterCreate = __webpack_require__(279);
  65301. var setToStringTag = __webpack_require__(47);
  65302. var getPrototypeOf = __webpack_require__(106);
  65303. var ITERATOR = __webpack_require__(10)('iterator');
  65304. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  65305. var FF_ITERATOR = '@@iterator';
  65306. var KEYS = 'keys';
  65307. var VALUES = 'values';
  65308. var returnThis = function () { return this; };
  65309. module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  65310. $iterCreate(Constructor, NAME, next);
  65311. var getMethod = function (kind) {
  65312. if (!BUGGY && kind in proto) return proto[kind];
  65313. switch (kind) {
  65314. case KEYS: return function keys() { return new Constructor(this, kind); };
  65315. case VALUES: return function values() { return new Constructor(this, kind); };
  65316. } return function entries() { return new Constructor(this, kind); };
  65317. };
  65318. var TAG = NAME + ' Iterator';
  65319. var DEF_VALUES = DEFAULT == VALUES;
  65320. var VALUES_BUG = false;
  65321. var proto = Base.prototype;
  65322. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  65323. var $default = $native || getMethod(DEFAULT);
  65324. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  65325. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  65326. var methods, key, IteratorPrototype;
  65327. // Fix native
  65328. if ($anyNative) {
  65329. IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
  65330. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  65331. // Set @@toStringTag to native iterators
  65332. setToStringTag(IteratorPrototype, TAG, true);
  65333. // fix for some old engines
  65334. if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
  65335. }
  65336. }
  65337. // fix Array#{values, @@iterator}.name in V8 / FF
  65338. if (DEF_VALUES && $native && $native.name !== VALUES) {
  65339. VALUES_BUG = true;
  65340. $default = function values() { return $native.call(this); };
  65341. }
  65342. // Define iterator
  65343. if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  65344. hide(proto, ITERATOR, $default);
  65345. }
  65346. // Plug for library
  65347. Iterators[NAME] = $default;
  65348. Iterators[TAG] = returnThis;
  65349. if (DEFAULT) {
  65350. methods = {
  65351. values: DEF_VALUES ? $default : getMethod(VALUES),
  65352. keys: IS_SET ? $default : getMethod(KEYS),
  65353. entries: $entries
  65354. };
  65355. if (FORCED) for (key in methods) {
  65356. if (!(key in proto)) redefine(proto, key, methods[key]);
  65357. } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  65358. }
  65359. return methods;
  65360. };
  65361. /***/ }),
  65362. /* 73 */
  65363. /***/ (function(module, exports, __webpack_require__) {
  65364. var classof = __webpack_require__(56);
  65365. var ITERATOR = __webpack_require__(10)('iterator');
  65366. var Iterators = __webpack_require__(34);
  65367. module.exports = __webpack_require__(5).getIteratorMethod = function (it) {
  65368. if (it != undefined) return it[ITERATOR]
  65369. || it['@@iterator']
  65370. || Iterators[classof(it)];
  65371. };
  65372. /***/ }),
  65373. /* 74 */
  65374. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  65375. "use strict";
  65376. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  65377. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_vue__ = __webpack_require__(110);
  65378. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_vue__);
  65379. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  65380. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_20c68a7a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_select_vue__ = __webpack_require__(327);
  65381. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_20c68a7a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_select_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_20c68a7a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_select_vue__);
  65382. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  65383. /* script */
  65384. /* template */
  65385. /* template functional */
  65386. var __vue_template_functional__ = false
  65387. /* styles */
  65388. var __vue_styles__ = null
  65389. /* scopeId */
  65390. var __vue_scopeId__ = null
  65391. /* moduleIdentifier (server only) */
  65392. var __vue_module_identifier__ = null
  65393. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  65394. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_vue___default.a,
  65395. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_20c68a7a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_select_vue__["render"],
  65396. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_20c68a7a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_select_vue__["staticRenderFns"],
  65397. __vue_template_functional__,
  65398. __vue_styles__,
  65399. __vue_scopeId__,
  65400. __vue_module_identifier__
  65401. )
  65402. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  65403. /***/ }),
  65404. /* 75 */
  65405. /***/ (function(module, exports, __webpack_require__) {
  65406. module.exports = { "default": __webpack_require__(294), __esModule: true };
  65407. /***/ }),
  65408. /* 76 */
  65409. /***/ (function(module, exports, __webpack_require__) {
  65410. "use strict";
  65411. Object.defineProperty(exports, "__esModule", {
  65412. value: true
  65413. });
  65414. exports.directive = undefined;
  65415. var _typeof2 = __webpack_require__(27);
  65416. var _typeof3 = _interopRequireDefault(_typeof2);
  65417. var _extends2 = __webpack_require__(32);
  65418. var _extends3 = _interopRequireDefault(_extends2);
  65419. var _defineProperties = __webpack_require__(311);
  65420. var _defineProperties2 = _interopRequireDefault(_defineProperties);
  65421. var _keys = __webpack_require__(21);
  65422. var _keys2 = _interopRequireDefault(_keys);
  65423. var _create = __webpack_require__(314);
  65424. var _create2 = _interopRequireDefault(_create);
  65425. exports.install = install;
  65426. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  65427. var CLICK = 'click';
  65428. var captureInstances = (0, _create2.default)(null);
  65429. var nonCaptureInstances = (0, _create2.default)(null);
  65430. var instancesList = [captureInstances, nonCaptureInstances];
  65431. var commonHandler = function _onCommonEvent(context, instances, event) {
  65432. var target = event.target;
  65433. var itemIteratee = function _itemIteratee(item) {
  65434. var el = item.el;
  65435. if (el !== target && !el.contains(target)) {
  65436. var binding = item.binding;
  65437. if (binding.modifiers.stop) {
  65438. event.stopPropagation();
  65439. }
  65440. if (binding.modifiers.prevent) {
  65441. event.preventDefault();
  65442. }
  65443. binding.value.call(context, event);
  65444. }
  65445. };
  65446. var keysIteratee = function _keysIteratee(eventName) {
  65447. return instances[eventName].forEach(itemIteratee);
  65448. };
  65449. (0, _keys2.default)(instances).forEach(keysIteratee);
  65450. };
  65451. var captureEventHandler = function onCaptureEvent(event) {
  65452. commonHandler(this, captureInstances, event);
  65453. };
  65454. var nonCaptureEventHandler = function onNonCaptureEvent(event) {
  65455. commonHandler(this, nonCaptureInstances, event);
  65456. };
  65457. var getEventHandler = function _getEventHandler(useCapture) {
  65458. return useCapture ? captureEventHandler : nonCaptureEventHandler;
  65459. };
  65460. var directive = exports.directive = (0, _defineProperties2.default)({}, {
  65461. $_captureInstances: {
  65462. value: captureInstances
  65463. },
  65464. $_nonCaptureInstances: {
  65465. value: nonCaptureInstances
  65466. },
  65467. $_onCaptureEvent: {
  65468. value: captureEventHandler
  65469. },
  65470. $_onNonCaptureEvent: {
  65471. value: nonCaptureEventHandler
  65472. },
  65473. bind: {
  65474. value: function bind(el, binding) {
  65475. if (typeof binding.value !== 'function') {
  65476. throw new TypeError('Binding value must be a function.');
  65477. }
  65478. var eventType = void 0;
  65479. var modifiers = binding.modifiers;
  65480. if (modifiers.click) eventType = 'click';else if (modifiers.mousedown) eventType = 'mousedown';else if (modifiers.touchstart) eventType = 'touchstart';else eventType = CLICK;
  65481. var useCapture = binding.arg;
  65482. var normalisedBinding = (0, _extends3.default)({}, binding, {
  65483. modifiers: (0, _extends3.default)({
  65484. capture: false,
  65485. prevent: false,
  65486. stop: false
  65487. }, binding.modifiers)
  65488. });
  65489. var instances = useCapture ? captureInstances : nonCaptureInstances;
  65490. if (!Array.isArray(instances[eventType])) {
  65491. instances[eventType] = [];
  65492. }
  65493. if (instances[eventType].push({ el: el, binding: normalisedBinding }) === 1) {
  65494. if ((typeof document === 'undefined' ? 'undefined' : (0, _typeof3.default)(document)) === 'object' && document) {
  65495. document.addEventListener(eventType, getEventHandler(useCapture), useCapture);
  65496. }
  65497. }
  65498. }
  65499. },
  65500. unbind: {
  65501. value: function unbind(el) {
  65502. var compareElements = function _compareElements(item) {
  65503. return item.el !== el;
  65504. };
  65505. var instancesIteratee = function _instancesIteratee(instances) {
  65506. var instanceKeys = (0, _keys2.default)(instances);
  65507. if (instanceKeys.length) {
  65508. var useCapture = instances === captureInstances;
  65509. var keysIteratee = function _keysIteratee(eventName) {
  65510. var newInstance = instances[eventName].filter(compareElements);
  65511. if (newInstance.length) {
  65512. instances[eventName] = newInstance;
  65513. } else {
  65514. if ((typeof document === 'undefined' ? 'undefined' : (0, _typeof3.default)(document)) === 'object' && document) {
  65515. document.removeEventListener(eventName, getEventHandler(useCapture), useCapture);
  65516. }
  65517. delete instances[eventName];
  65518. }
  65519. };
  65520. instanceKeys.forEach(keysIteratee);
  65521. }
  65522. };
  65523. instancesList.forEach(instancesIteratee);
  65524. }
  65525. },
  65526. version: {
  65527. enumerable: true,
  65528. value: '3.7.1'
  65529. }
  65530. });
  65531. function install(Vue) {
  65532. Vue.directive('click-outside', directive);
  65533. }
  65534. /***/ }),
  65535. /* 77 */
  65536. /***/ (function(module, exports, __webpack_require__) {
  65537. exports.f = __webpack_require__(10);
  65538. /***/ }),
  65539. /* 78 */
  65540. /***/ (function(module, exports, __webpack_require__) {
  65541. var META = __webpack_require__(53)('meta');
  65542. var isObject = __webpack_require__(18);
  65543. var has = __webpack_require__(30);
  65544. var setDesc = __webpack_require__(14).f;
  65545. var id = 0;
  65546. var isExtensible = Object.isExtensible || function () {
  65547. return true;
  65548. };
  65549. var FREEZE = !__webpack_require__(31)(function () {
  65550. return isExtensible(Object.preventExtensions({}));
  65551. });
  65552. var setMeta = function (it) {
  65553. setDesc(it, META, { value: {
  65554. i: 'O' + ++id, // object ID
  65555. w: {} // weak collections IDs
  65556. } });
  65557. };
  65558. var fastKey = function (it, create) {
  65559. // return primitive with prefix
  65560. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  65561. if (!has(it, META)) {
  65562. // can't set metadata to uncaught frozen object
  65563. if (!isExtensible(it)) return 'F';
  65564. // not necessary to add metadata
  65565. if (!create) return 'E';
  65566. // add missing metadata
  65567. setMeta(it);
  65568. // return object ID
  65569. } return it[META].i;
  65570. };
  65571. var getWeak = function (it, create) {
  65572. if (!has(it, META)) {
  65573. // can't set metadata to uncaught frozen object
  65574. if (!isExtensible(it)) return true;
  65575. // not necessary to add metadata
  65576. if (!create) return false;
  65577. // add missing metadata
  65578. setMeta(it);
  65579. // return hash weak collections IDs
  65580. } return it[META].w;
  65581. };
  65582. // add metadata on freeze-family methods calling
  65583. var onFreeze = function (it) {
  65584. if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  65585. return it;
  65586. };
  65587. var meta = module.exports = {
  65588. KEY: META,
  65589. NEED: false,
  65590. fastKey: fastKey,
  65591. getWeak: getWeak,
  65592. onFreeze: onFreeze
  65593. };
  65594. /***/ }),
  65595. /* 79 */
  65596. /***/ (function(module, exports, __webpack_require__) {
  65597. var global = __webpack_require__(9);
  65598. var core = __webpack_require__(5);
  65599. var LIBRARY = __webpack_require__(42);
  65600. var wksExt = __webpack_require__(77);
  65601. var defineProperty = __webpack_require__(14).f;
  65602. module.exports = function (name) {
  65603. var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  65604. if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
  65605. };
  65606. /***/ }),
  65607. /* 80 */
  65608. /***/ (function(module, exports) {
  65609. /***/ }),
  65610. /* 81 */
  65611. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  65612. "use strict";
  65613. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  65614. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_vue__ = __webpack_require__(123);
  65615. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_vue__);
  65616. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  65617. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_72d0cce2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_option_vue__ = __webpack_require__(328);
  65618. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_72d0cce2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_option_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_72d0cce2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_option_vue__);
  65619. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  65620. /* script */
  65621. /* template */
  65622. /* template functional */
  65623. var __vue_template_functional__ = false
  65624. /* styles */
  65625. var __vue_styles__ = null
  65626. /* scopeId */
  65627. var __vue_scopeId__ = null
  65628. /* moduleIdentifier (server only) */
  65629. var __vue_module_identifier__ = null
  65630. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  65631. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_vue___default.a,
  65632. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_72d0cce2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_option_vue__["render"],
  65633. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_72d0cce2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_option_vue__["staticRenderFns"],
  65634. __vue_template_functional__,
  65635. __vue_styles__,
  65636. __vue_scopeId__,
  65637. __vue_module_identifier__
  65638. )
  65639. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  65640. /***/ }),
  65641. /* 82 */
  65642. /***/ (function(module, exports, __webpack_require__) {
  65643. "use strict";
  65644. Object.defineProperty(exports, "__esModule", {
  65645. value: true
  65646. });
  65647. exports.default = {
  65648. bind: function bind(el, binding, vnode) {
  65649. function documentHandler(e) {
  65650. if (el.contains(e.target)) {
  65651. return false;
  65652. }
  65653. if (binding.expression) {
  65654. binding.value(e);
  65655. }
  65656. }
  65657. el.__vueClickOutside__ = documentHandler;
  65658. document.addEventListener('click', documentHandler);
  65659. },
  65660. update: function update() {},
  65661. unbind: function unbind(el, binding) {
  65662. document.removeEventListener('click', el.__vueClickOutside__);
  65663. delete el.__vueClickOutside__;
  65664. }
  65665. };
  65666. /***/ }),
  65667. /* 83 */
  65668. /***/ (function(module, exports, __webpack_require__) {
  65669. "use strict";
  65670. Object.defineProperty(exports, "__esModule", {
  65671. value: true
  65672. });
  65673. var _assist = __webpack_require__(3);
  65674. var Transition = {
  65675. beforeEnter: function beforeEnter(el) {
  65676. (0, _assist.addClass)(el, 'collapse-transition');
  65677. if (!el.dataset) el.dataset = {};
  65678. el.dataset.oldPaddingTop = el.style.paddingTop;
  65679. el.dataset.oldPaddingBottom = el.style.paddingBottom;
  65680. el.style.height = '0';
  65681. el.style.paddingTop = 0;
  65682. el.style.paddingBottom = 0;
  65683. },
  65684. enter: function enter(el) {
  65685. el.dataset.oldOverflow = el.style.overflow;
  65686. if (el.scrollHeight !== 0) {
  65687. el.style.height = el.scrollHeight + 'px';
  65688. el.style.paddingTop = el.dataset.oldPaddingTop;
  65689. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  65690. } else {
  65691. el.style.height = '';
  65692. el.style.paddingTop = el.dataset.oldPaddingTop;
  65693. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  65694. }
  65695. el.style.overflow = 'hidden';
  65696. },
  65697. afterEnter: function afterEnter(el) {
  65698. (0, _assist.removeClass)(el, 'collapse-transition');
  65699. el.style.height = '';
  65700. el.style.overflow = el.dataset.oldOverflow;
  65701. },
  65702. beforeLeave: function beforeLeave(el) {
  65703. if (!el.dataset) el.dataset = {};
  65704. el.dataset.oldPaddingTop = el.style.paddingTop;
  65705. el.dataset.oldPaddingBottom = el.style.paddingBottom;
  65706. el.dataset.oldOverflow = el.style.overflow;
  65707. el.style.height = el.scrollHeight + 'px';
  65708. el.style.overflow = 'hidden';
  65709. },
  65710. leave: function leave(el) {
  65711. if (el.scrollHeight !== 0) {
  65712. (0, _assist.addClass)(el, 'collapse-transition');
  65713. el.style.height = 0;
  65714. el.style.paddingTop = 0;
  65715. el.style.paddingBottom = 0;
  65716. }
  65717. },
  65718. afterLeave: function afterLeave(el) {
  65719. (0, _assist.removeClass)(el, 'collapse-transition');
  65720. el.style.height = '';
  65721. el.style.overflow = el.dataset.oldOverflow;
  65722. el.style.paddingTop = el.dataset.oldPaddingTop;
  65723. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  65724. }
  65725. };
  65726. exports.default = {
  65727. name: 'CollapseTransition',
  65728. functional: true,
  65729. props: {
  65730. appear: Boolean
  65731. },
  65732. render: function render(h, _ref) {
  65733. var children = _ref.children,
  65734. props = _ref.props;
  65735. var data = {
  65736. on: Transition,
  65737. props: {
  65738. appear: props.appear
  65739. }
  65740. };
  65741. return h('transition', data, children);
  65742. }
  65743. };
  65744. /***/ }),
  65745. /* 84 */
  65746. /***/ (function(module, exports, __webpack_require__) {
  65747. "use strict";
  65748. Object.defineProperty(exports, "__esModule", {
  65749. value: true
  65750. });
  65751. var _newArrowCheck2 = __webpack_require__(1);
  65752. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  65753. var _emitter = __webpack_require__(4);
  65754. var _emitter2 = _interopRequireDefault(_emitter);
  65755. var _handleEscapeMixin = __webpack_require__(151);
  65756. var _handleEscapeMixin2 = _interopRequireDefault(_handleEscapeMixin);
  65757. var _utils = __webpack_require__(39);
  65758. var _dom = __webpack_require__(12);
  65759. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  65760. exports.default = {
  65761. mixins: [_emitter2.default, _handleEscapeMixin2.default],
  65762. props: {
  65763. focused: {
  65764. type: Boolean,
  65765. default: false
  65766. },
  65767. value: {
  65768. type: Object,
  65769. default: undefined
  65770. }
  65771. },
  65772. beforeDestroy: function beforeDestroy() {
  65773. this.unbindEventListeners();
  65774. },
  65775. created: function created() {
  65776. var _this = this;
  65777. if (this.focused) {
  65778. setTimeout(function () {
  65779. (0, _newArrowCheck3.default)(this, _this);
  65780. return this.$el.focus();
  65781. }.bind(this), 1);
  65782. }
  65783. },
  65784. methods: {
  65785. handleLeft: function handleLeft(e) {
  65786. this.handleSlide(e, this.left, 'left');
  65787. },
  65788. handleRight: function handleRight(e) {
  65789. this.handleSlide(e, this.right, 'right');
  65790. },
  65791. handleUp: function handleUp(e) {
  65792. this.handleSlide(e, this.up, 'up');
  65793. },
  65794. handleDown: function handleDown(e) {
  65795. this.handleSlide(e, this.down, 'down');
  65796. },
  65797. handleMouseDown: function handleMouseDown(e) {
  65798. this.dispatch('ColorPicker', 'on-dragging', true);
  65799. this.handleChange(e, true);
  65800. (0, _dom.on)(window, 'mousemove', this.handleChange);
  65801. (0, _dom.on)(window, 'mouseup', this.handleMouseUp);
  65802. },
  65803. handleMouseUp: function handleMouseUp() {
  65804. this.unbindEventListeners();
  65805. },
  65806. unbindEventListeners: function unbindEventListeners() {
  65807. var _this2 = this;
  65808. (0, _dom.off)(window, 'mousemove', this.handleChange);
  65809. (0, _dom.off)(window, 'mouseup', this.handleMouseUp);
  65810. setTimeout(function () {
  65811. (0, _newArrowCheck3.default)(this, _this2);
  65812. return this.dispatch('ColorPicker', 'on-dragging', false);
  65813. }.bind(this), 1);
  65814. },
  65815. getLeft: function getLeft(e) {
  65816. var container = this.$refs.container;
  65817. var xOffset = container.getBoundingClientRect().left + window.pageXOffset;
  65818. var pageX = e.pageX || (0, _utils.getTouches)(e, 'PageX');
  65819. return pageX - xOffset;
  65820. },
  65821. getTop: function getTop(e) {
  65822. var container = this.$refs.container;
  65823. var yOffset = container.getBoundingClientRect().top + window.pageYOffset;
  65824. var pageY = e.pageY || (0, _utils.getTouches)(e, 'PageY');
  65825. return pageY - yOffset;
  65826. }
  65827. }
  65828. };
  65829. /***/ }),
  65830. /* 85 */
  65831. /***/ (function(module, exports, __webpack_require__) {
  65832. "use strict";
  65833. Object.defineProperty(exports, "__esModule", {
  65834. value: true
  65835. });
  65836. var _newArrowCheck2 = __webpack_require__(1);
  65837. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  65838. var _util = __webpack_require__(20);
  65839. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  65840. exports.default = {
  65841. name: 'PanelTable',
  65842. props: {
  65843. tableDate: {
  65844. type: Date,
  65845. required: true
  65846. },
  65847. disabledDate: {
  65848. type: Function
  65849. },
  65850. selectionMode: {
  65851. type: String,
  65852. required: true
  65853. },
  65854. value: {
  65855. type: Array,
  65856. required: true
  65857. },
  65858. rangeState: {
  65859. type: Object,
  65860. default: function _default() {
  65861. (0, _newArrowCheck3.default)(undefined, undefined);
  65862. return {
  65863. from: null,
  65864. to: null,
  65865. selecting: false
  65866. };
  65867. }.bind(undefined)
  65868. },
  65869. focusedDate: {
  65870. type: Date,
  65871. required: true
  65872. }
  65873. },
  65874. computed: {
  65875. dates: function dates() {
  65876. var selectionMode = this.selectionMode,
  65877. value = this.value,
  65878. rangeState = this.rangeState;
  65879. var rangeSelecting = selectionMode === 'range' && rangeState.selecting;
  65880. return rangeSelecting ? [rangeState.from] : value;
  65881. }
  65882. },
  65883. methods: {
  65884. handleClick: function handleClick(cell, e) {
  65885. e.stopPropagation();
  65886. if (cell.disabled || cell.type === 'weekLabel') return;
  65887. var newDate = new Date((0, _util.clearHours)(cell.date));
  65888. this.$emit('on-pick', newDate);
  65889. this.$emit('on-pick-click');
  65890. },
  65891. handleMouseMove: function handleMouseMove(cell) {
  65892. if (!this.rangeState.selecting) return;
  65893. if (cell.disabled) return;
  65894. var newDate = cell.date;
  65895. this.$emit('on-change-range', newDate);
  65896. }
  65897. }
  65898. };
  65899. /***/ }),
  65900. /* 86 */
  65901. /***/ (function(module, exports, __webpack_require__) {
  65902. "use strict";
  65903. Object.defineProperty(exports, "__esModule", {
  65904. value: true
  65905. });
  65906. exports.default = 'ivu-date-picker-cells';
  65907. /***/ }),
  65908. /* 87 */
  65909. /***/ (function(module, exports, __webpack_require__) {
  65910. "use strict";
  65911. Object.defineProperty(exports, "__esModule", {
  65912. value: true
  65913. });
  65914. var _newArrowCheck2 = __webpack_require__(1);
  65915. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  65916. var _from = __webpack_require__(111);
  65917. var _from2 = _interopRequireDefault(_from);
  65918. var _assist = __webpack_require__(3);
  65919. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  65920. exports.default = {
  65921. props: {
  65922. lockScroll: {
  65923. type: Boolean,
  65924. default: true
  65925. }
  65926. },
  65927. methods: {
  65928. checkScrollBar: function checkScrollBar() {
  65929. var fullWindowWidth = window.innerWidth;
  65930. if (!fullWindowWidth) {
  65931. var documentElementRect = document.documentElement.getBoundingClientRect();
  65932. fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left);
  65933. }
  65934. this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth;
  65935. if (this.bodyIsOverflowing) {
  65936. this.scrollBarWidth = (0, _assist.getScrollBarSize)();
  65937. }
  65938. },
  65939. checkMaskInVisible: function checkMaskInVisible() {
  65940. var _this = this;
  65941. var masks = document.getElementsByClassName('ivu-modal-mask') || [];
  65942. return (0, _from2.default)(masks).every(function (m) {
  65943. (0, _newArrowCheck3.default)(this, _this);
  65944. return m.style.display === 'none' || m.classList.contains('fade-leave-to');
  65945. }.bind(this));
  65946. },
  65947. setScrollBar: function setScrollBar() {
  65948. if (this.bodyIsOverflowing && this.scrollBarWidth !== undefined) {
  65949. document.body.style.paddingRight = String(this.scrollBarWidth) + 'px';
  65950. }
  65951. },
  65952. resetScrollBar: function resetScrollBar() {
  65953. document.body.style.paddingRight = '';
  65954. },
  65955. addScrollEffect: function addScrollEffect() {
  65956. if (!this.lockScroll) return;
  65957. this.checkScrollBar();
  65958. this.setScrollBar();
  65959. document.body.style.overflow = 'hidden';
  65960. },
  65961. removeScrollEffect: function removeScrollEffect() {
  65962. if (!this.lockScroll) return;
  65963. if (this.checkMaskInVisible()) {
  65964. document.body.style.overflow = '';
  65965. this.resetScrollBar();
  65966. }
  65967. }
  65968. }
  65969. };
  65970. /***/ }),
  65971. /* 88 */
  65972. /***/ (function(module, exports) {
  65973. module.exports = function (it, Constructor, name, forbiddenField) {
  65974. if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
  65975. throw TypeError(name + ': incorrect invocation!');
  65976. } return it;
  65977. };
  65978. /***/ }),
  65979. /* 89 */
  65980. /***/ (function(module, exports, __webpack_require__) {
  65981. "use strict";
  65982. // 25.4.1.5 NewPromiseCapability(C)
  65983. var aFunction = __webpack_require__(43);
  65984. function PromiseCapability(C) {
  65985. var resolve, reject;
  65986. this.promise = new C(function ($$resolve, $$reject) {
  65987. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  65988. resolve = $$resolve;
  65989. reject = $$reject;
  65990. });
  65991. this.resolve = aFunction(resolve);
  65992. this.reject = aFunction(reject);
  65993. }
  65994. module.exports.f = function (C) {
  65995. return new PromiseCapability(C);
  65996. };
  65997. /***/ }),
  65998. /* 90 */
  65999. /***/ (function(module, exports, __webpack_require__) {
  66000. var hide = __webpack_require__(25);
  66001. module.exports = function (target, src, safe) {
  66002. for (var key in src) {
  66003. if (safe && target[key]) target[key] = src[key];
  66004. else hide(target, key, src[key]);
  66005. } return target;
  66006. };
  66007. /***/ }),
  66008. /* 91 */
  66009. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  66010. "use strict";
  66011. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  66012. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_spin_vue__ = __webpack_require__(198);
  66013. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_spin_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_spin_vue__);
  66014. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_spin_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_spin_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  66015. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_38ac6ee9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_spin_vue__ = __webpack_require__(465);
  66016. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_38ac6ee9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_spin_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_38ac6ee9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_spin_vue__);
  66017. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  66018. /* script */
  66019. /* template */
  66020. /* template functional */
  66021. var __vue_template_functional__ = false
  66022. /* styles */
  66023. var __vue_styles__ = null
  66024. /* scopeId */
  66025. var __vue_scopeId__ = null
  66026. /* moduleIdentifier (server only) */
  66027. var __vue_module_identifier__ = null
  66028. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  66029. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_spin_vue___default.a,
  66030. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_38ac6ee9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_spin_vue__["render"],
  66031. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_38ac6ee9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_spin_vue__["staticRenderFns"],
  66032. __vue_template_functional__,
  66033. __vue_styles__,
  66034. __vue_scopeId__,
  66035. __vue_module_identifier__
  66036. )
  66037. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  66038. /***/ }),
  66039. /* 92 */
  66040. /***/ (function(module, exports, __webpack_require__) {
  66041. "use strict";
  66042. Object.defineProperty(exports, "__esModule", {
  66043. value: true
  66044. });
  66045. var _assist = __webpack_require__(3);
  66046. exports.default = {
  66047. data: function data() {
  66048. return {
  66049. menu: (0, _assist.findComponentUpward)(this, 'Menu')
  66050. };
  66051. },
  66052. computed: {
  66053. hasParentSubmenu: function hasParentSubmenu() {
  66054. return !!(0, _assist.findComponentUpward)(this, 'Submenu');
  66055. },
  66056. parentSubmenuNum: function parentSubmenuNum() {
  66057. return (0, _assist.findComponentsUpward)(this, 'Submenu').length;
  66058. },
  66059. mode: function mode() {
  66060. return this.menu.mode;
  66061. }
  66062. }
  66063. };
  66064. /***/ }),
  66065. /* 93 */
  66066. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  66067. "use strict";
  66068. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  66069. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tooltip_vue__ = __webpack_require__(228);
  66070. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tooltip_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tooltip_vue__);
  66071. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tooltip_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tooltip_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  66072. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_721e5989_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tooltip_vue__ = __webpack_require__(527);
  66073. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_721e5989_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tooltip_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_721e5989_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tooltip_vue__);
  66074. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  66075. /* script */
  66076. /* template */
  66077. /* template functional */
  66078. var __vue_template_functional__ = false
  66079. /* styles */
  66080. var __vue_styles__ = null
  66081. /* scopeId */
  66082. var __vue_scopeId__ = null
  66083. /* moduleIdentifier (server only) */
  66084. var __vue_module_identifier__ = null
  66085. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  66086. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tooltip_vue___default.a,
  66087. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_721e5989_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tooltip_vue__["render"],
  66088. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_721e5989_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tooltip_vue__["staticRenderFns"],
  66089. __vue_template_functional__,
  66090. __vue_styles__,
  66091. __vue_scopeId__,
  66092. __vue_module_identifier__
  66093. )
  66094. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  66095. /***/ }),
  66096. /* 94 */
  66097. /***/ (function(module, exports, __webpack_require__) {
  66098. "use strict";
  66099. var forEach = __webpack_require__(229).forEach;
  66100. var elementUtilsMaker = __webpack_require__(529);
  66101. var listenerHandlerMaker = __webpack_require__(530);
  66102. var idGeneratorMaker = __webpack_require__(531);
  66103. var idHandlerMaker = __webpack_require__(532);
  66104. var reporterMaker = __webpack_require__(533);
  66105. var browserDetector = __webpack_require__(230);
  66106. var batchProcessorMaker = __webpack_require__(534);
  66107. var stateHandler = __webpack_require__(536);
  66108. //Detection strategies.
  66109. var objectStrategyMaker = __webpack_require__(537);
  66110. var scrollStrategyMaker = __webpack_require__(538);
  66111. function isCollection(obj) {
  66112. return Array.isArray(obj) || obj.length !== undefined;
  66113. }
  66114. function toArray(collection) {
  66115. if (!Array.isArray(collection)) {
  66116. var array = [];
  66117. forEach(collection, function (obj) {
  66118. array.push(obj);
  66119. });
  66120. return array;
  66121. } else {
  66122. return collection;
  66123. }
  66124. }
  66125. function isElement(obj) {
  66126. return obj && obj.nodeType === 1;
  66127. }
  66128. /**
  66129. * @typedef idHandler
  66130. * @type {object}
  66131. * @property {function} get Gets the resize detector id of the element.
  66132. * @property {function} set Generate and sets the resize detector id of the element.
  66133. */
  66134. /**
  66135. * @typedef Options
  66136. * @type {object}
  66137. * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added.
  66138. Default is true. If true, the listener is guaranteed to be called when it has been added.
  66139. If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called).
  66140. * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements.
  66141. If not provided, a default id handler will be used.
  66142. * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors.
  66143. If not provided, a default id handler will be used.
  66144. If set to false, then nothing will be reported.
  66145. * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method.
  66146. */
  66147. /**
  66148. * Creates an element resize detector instance.
  66149. * @public
  66150. * @param {Options?} options Optional global options object that will decide how this instance will work.
  66151. */
  66152. module.exports = function(options) {
  66153. options = options || {};
  66154. //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions.
  66155. var idHandler;
  66156. if (options.idHandler) {
  66157. // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler
  66158. // so that readonly flag always is true when it's used here. This may be removed next major version bump.
  66159. idHandler = {
  66160. get: function (element) { return options.idHandler.get(element, true); },
  66161. set: options.idHandler.set
  66162. };
  66163. } else {
  66164. var idGenerator = idGeneratorMaker();
  66165. var defaultIdHandler = idHandlerMaker({
  66166. idGenerator: idGenerator,
  66167. stateHandler: stateHandler
  66168. });
  66169. idHandler = defaultIdHandler;
  66170. }
  66171. //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions.
  66172. var reporter = options.reporter;
  66173. if(!reporter) {
  66174. //If options.reporter is false, then the reporter should be quiet.
  66175. var quiet = reporter === false;
  66176. reporter = reporterMaker(quiet);
  66177. }
  66178. //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions.
  66179. var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter }));
  66180. //Options to be used as default for the listenTo function.
  66181. var globalOptions = {};
  66182. globalOptions.callOnAdd = !!getOption(options, "callOnAdd", true);
  66183. globalOptions.debug = !!getOption(options, "debug", false);
  66184. var eventListenerHandler = listenerHandlerMaker(idHandler);
  66185. var elementUtils = elementUtilsMaker({
  66186. stateHandler: stateHandler
  66187. });
  66188. //The detection strategy to be used.
  66189. var detectionStrategy;
  66190. var desiredStrategy = getOption(options, "strategy", "object");
  66191. var importantCssRules = getOption(options, "important", false);
  66192. var strategyOptions = {
  66193. reporter: reporter,
  66194. batchProcessor: batchProcessor,
  66195. stateHandler: stateHandler,
  66196. idHandler: idHandler,
  66197. important: importantCssRules
  66198. };
  66199. if(desiredStrategy === "scroll") {
  66200. if (browserDetector.isLegacyOpera()) {
  66201. reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy.");
  66202. desiredStrategy = "object";
  66203. } else if (browserDetector.isIE(9)) {
  66204. reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy.");
  66205. desiredStrategy = "object";
  66206. }
  66207. }
  66208. if(desiredStrategy === "scroll") {
  66209. detectionStrategy = scrollStrategyMaker(strategyOptions);
  66210. } else if(desiredStrategy === "object") {
  66211. detectionStrategy = objectStrategyMaker(strategyOptions);
  66212. } else {
  66213. throw new Error("Invalid strategy name: " + desiredStrategy);
  66214. }
  66215. //Calls can be made to listenTo with elements that are still being installed.
  66216. //Also, same elements can occur in the elements list in the listenTo function.
  66217. //With this map, the ready callbacks can be synchronized between the calls
  66218. //so that the ready callback can always be called when an element is ready - even if
  66219. //it wasn't installed from the function itself.
  66220. var onReadyCallbacks = {};
  66221. /**
  66222. * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element.
  66223. * @public
  66224. * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler.
  66225. * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid.
  66226. * @param {function} listener The callback to be executed for each resize event for each element.
  66227. */
  66228. function listenTo(options, elements, listener) {
  66229. function onResizeCallback(element) {
  66230. var listeners = eventListenerHandler.get(element);
  66231. forEach(listeners, function callListenerProxy(listener) {
  66232. listener(element);
  66233. });
  66234. }
  66235. function addListener(callOnAdd, element, listener) {
  66236. eventListenerHandler.add(element, listener);
  66237. if(callOnAdd) {
  66238. listener(element);
  66239. }
  66240. }
  66241. //Options object may be omitted.
  66242. if(!listener) {
  66243. listener = elements;
  66244. elements = options;
  66245. options = {};
  66246. }
  66247. if(!elements) {
  66248. throw new Error("At least one element required.");
  66249. }
  66250. if(!listener) {
  66251. throw new Error("Listener required.");
  66252. }
  66253. if (isElement(elements)) {
  66254. // A single element has been passed in.
  66255. elements = [elements];
  66256. } else if (isCollection(elements)) {
  66257. // Convert collection to array for plugins.
  66258. // TODO: May want to check so that all the elements in the collection are valid elements.
  66259. elements = toArray(elements);
  66260. } else {
  66261. return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
  66262. }
  66263. var elementsReady = 0;
  66264. var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd);
  66265. var onReadyCallback = getOption(options, "onReady", function noop() {});
  66266. var debug = getOption(options, "debug", globalOptions.debug);
  66267. forEach(elements, function attachListenerToElement(element) {
  66268. if (!stateHandler.getState(element)) {
  66269. stateHandler.initState(element);
  66270. idHandler.set(element);
  66271. }
  66272. var id = idHandler.get(element);
  66273. debug && reporter.log("Attaching listener to element", id, element);
  66274. if(!elementUtils.isDetectable(element)) {
  66275. debug && reporter.log(id, "Not detectable.");
  66276. if(elementUtils.isBusy(element)) {
  66277. debug && reporter.log(id, "System busy making it detectable");
  66278. //The element is being prepared to be detectable. Do not make it detectable.
  66279. //Just add the listener, because the element will soon be detectable.
  66280. addListener(callOnAdd, element, listener);
  66281. onReadyCallbacks[id] = onReadyCallbacks[id] || [];
  66282. onReadyCallbacks[id].push(function onReady() {
  66283. elementsReady++;
  66284. if(elementsReady === elements.length) {
  66285. onReadyCallback();
  66286. }
  66287. });
  66288. return;
  66289. }
  66290. debug && reporter.log(id, "Making detectable...");
  66291. //The element is not prepared to be detectable, so do prepare it and add a listener to it.
  66292. elementUtils.markBusy(element, true);
  66293. return detectionStrategy.makeDetectable({ debug: debug, important: importantCssRules }, element, function onElementDetectable(element) {
  66294. debug && reporter.log(id, "onElementDetectable");
  66295. if (stateHandler.getState(element)) {
  66296. elementUtils.markAsDetectable(element);
  66297. elementUtils.markBusy(element, false);
  66298. detectionStrategy.addListener(element, onResizeCallback);
  66299. addListener(callOnAdd, element, listener);
  66300. // Since the element size might have changed since the call to "listenTo", we need to check for this change,
  66301. // so that a resize event may be emitted.
  66302. // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before.
  66303. // Also, check the state existance before since the element may have been uninstalled in the installation process.
  66304. var state = stateHandler.getState(element);
  66305. if (state && state.startSize) {
  66306. var width = element.offsetWidth;
  66307. var height = element.offsetHeight;
  66308. if (state.startSize.width !== width || state.startSize.height !== height) {
  66309. onResizeCallback(element);
  66310. }
  66311. }
  66312. if(onReadyCallbacks[id]) {
  66313. forEach(onReadyCallbacks[id], function(callback) {
  66314. callback();
  66315. });
  66316. }
  66317. } else {
  66318. // The element has been unisntalled before being detectable.
  66319. debug && reporter.log(id, "Element uninstalled before being detectable.");
  66320. }
  66321. delete onReadyCallbacks[id];
  66322. elementsReady++;
  66323. if(elementsReady === elements.length) {
  66324. onReadyCallback();
  66325. }
  66326. });
  66327. }
  66328. debug && reporter.log(id, "Already detecable, adding listener.");
  66329. //The element has been prepared to be detectable and is ready to be listened to.
  66330. addListener(callOnAdd, element, listener);
  66331. elementsReady++;
  66332. });
  66333. if(elementsReady === elements.length) {
  66334. onReadyCallback();
  66335. }
  66336. }
  66337. function uninstall(elements) {
  66338. if(!elements) {
  66339. return reporter.error("At least one element is required.");
  66340. }
  66341. if (isElement(elements)) {
  66342. // A single element has been passed in.
  66343. elements = [elements];
  66344. } else if (isCollection(elements)) {
  66345. // Convert collection to array for plugins.
  66346. // TODO: May want to check so that all the elements in the collection are valid elements.
  66347. elements = toArray(elements);
  66348. } else {
  66349. return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
  66350. }
  66351. forEach(elements, function (element) {
  66352. eventListenerHandler.removeAllListeners(element);
  66353. detectionStrategy.uninstall(element);
  66354. stateHandler.cleanState(element);
  66355. });
  66356. }
  66357. function initDocument(targetDocument) {
  66358. detectionStrategy.initDocument && detectionStrategy.initDocument(targetDocument);
  66359. }
  66360. return {
  66361. listenTo: listenTo,
  66362. removeListener: eventListenerHandler.removeListener,
  66363. removeAllListeners: eventListenerHandler.removeAllListeners,
  66364. uninstall: uninstall,
  66365. initDocument: initDocument
  66366. };
  66367. };
  66368. function getOption(options, name, defaultValue) {
  66369. var value = options[name];
  66370. if((value === undefined || value === null) && defaultValue !== undefined) {
  66371. return defaultValue;
  66372. }
  66373. return value;
  66374. }
  66375. /***/ }),
  66376. /* 95 */
  66377. /***/ (function(module, exports, __webpack_require__) {
  66378. "use strict";
  66379. Object.defineProperty(exports, "__esModule", {
  66380. value: true
  66381. });
  66382. var _defineProperty2 = __webpack_require__(2);
  66383. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  66384. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  66385. exports.default = {
  66386. methods: {
  66387. alignCls: function alignCls(column) {
  66388. var _ref;
  66389. var row = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  66390. var cellClassName = '';
  66391. if (row.cellClassName && column.key && row.cellClassName[column.key]) {
  66392. cellClassName = row.cellClassName[column.key];
  66393. }
  66394. return [String(this.prefixCls) + '-column-' + String(column.__id), (_ref = {}, (0, _defineProperty3.default)(_ref, '' + String(cellClassName), cellClassName), (0, _defineProperty3.default)(_ref, '' + String(column.className), column.className), (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-column-' + String(column.align), column.align), (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-hidden', this.fixed === 'left' && column.fixed !== 'left' || this.fixed === 'right' && column.fixed !== 'right' || !this.fixed && column.fixed && (column.fixed === 'left' || column.fixed === 'right')), _ref)];
  66395. },
  66396. isPopperShow: function isPopperShow(column) {
  66397. return column.filters && (!this.fixed && !column.fixed || this.fixed === 'left' && column.fixed === 'left' || this.fixed === 'right' && column.fixed === 'right');
  66398. },
  66399. setCellWidth: function setCellWidth(column) {
  66400. var width = '';
  66401. if (column.width) {
  66402. width = column.width;
  66403. } else if (this.columnsWidth[column._index]) {
  66404. width = this.columnsWidth[column._index].width;
  66405. }
  66406. if (width === '0') width = '';
  66407. return width;
  66408. }
  66409. }
  66410. };
  66411. /***/ }),
  66412. /* 96 */
  66413. /***/ (function(module, exports, __webpack_require__) {
  66414. var has = __webpack_require__(30);
  66415. var toIObject = __webpack_require__(33);
  66416. var arrayIndexOf = __webpack_require__(262)(false);
  66417. var IE_PROTO = __webpack_require__(66)('IE_PROTO');
  66418. module.exports = function (object, names) {
  66419. var O = toIObject(object);
  66420. var i = 0;
  66421. var result = [];
  66422. var key;
  66423. for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  66424. // Don't enum bug & hidden keys
  66425. while (names.length > i) if (has(O, key = names[i++])) {
  66426. ~arrayIndexOf(result, key) || result.push(key);
  66427. }
  66428. return result;
  66429. };
  66430. /***/ }),
  66431. /* 97 */
  66432. /***/ (function(module, exports, __webpack_require__) {
  66433. // most Object methods by ES6 should accept primitives
  66434. var $export = __webpack_require__(7);
  66435. var core = __webpack_require__(5);
  66436. var fails = __webpack_require__(31);
  66437. module.exports = function (KEY, exec) {
  66438. var fn = (core.Object || {})[KEY] || Object[KEY];
  66439. var exp = {};
  66440. exp[KEY] = exec(fn);
  66441. $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
  66442. };
  66443. /***/ }),
  66444. /* 98 */
  66445. /***/ (function(module, exports, __webpack_require__) {
  66446. module.exports = !__webpack_require__(13) && !__webpack_require__(31)(function () {
  66447. return Object.defineProperty(__webpack_require__(69)('div'), 'a', { get: function () { return 7; } }).a != 7;
  66448. });
  66449. /***/ }),
  66450. /* 99 */
  66451. /***/ (function(module, exports, __webpack_require__) {
  66452. "use strict";
  66453. Object.defineProperty(exports, "__esModule", {
  66454. value: true
  66455. });
  66456. var _newArrowCheck2 = __webpack_require__(1);
  66457. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  66458. var _defineProperty2 = __webpack_require__(2);
  66459. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  66460. var _dom = __webpack_require__(12);
  66461. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  66462. var prefixCls = 'ivu-affix';
  66463. function getScroll(target, top) {
  66464. var prop = top ? 'pageYOffset' : 'pageXOffset';
  66465. var method = top ? 'scrollTop' : 'scrollLeft';
  66466. var ret = target[prop];
  66467. if (typeof ret !== 'number') {
  66468. ret = window.document.documentElement[method];
  66469. }
  66470. return ret;
  66471. }
  66472. function getOffset(element) {
  66473. var rect = element.getBoundingClientRect();
  66474. var scrollTop = getScroll(window, true);
  66475. var scrollLeft = getScroll(window);
  66476. var docEl = window.document.body;
  66477. var clientTop = docEl.clientTop || 0;
  66478. var clientLeft = docEl.clientLeft || 0;
  66479. return {
  66480. top: rect.top + scrollTop - clientTop,
  66481. left: rect.left + scrollLeft - clientLeft
  66482. };
  66483. }
  66484. exports.default = {
  66485. name: 'Affix',
  66486. props: {
  66487. offsetTop: {
  66488. type: Number,
  66489. default: 0
  66490. },
  66491. offsetBottom: {
  66492. type: Number
  66493. },
  66494. useCapture: {
  66495. type: Boolean,
  66496. default: false
  66497. }
  66498. },
  66499. data: function data() {
  66500. return {
  66501. affix: false,
  66502. styles: {},
  66503. slot: false,
  66504. slotStyle: {}
  66505. };
  66506. },
  66507. computed: {
  66508. offsetType: function offsetType() {
  66509. var type = 'top';
  66510. if (this.offsetBottom >= 0) {
  66511. type = 'bottom';
  66512. }
  66513. return type;
  66514. },
  66515. classes: function classes() {
  66516. return [(0, _defineProperty3.default)({}, '' + prefixCls, this.affix)];
  66517. }
  66518. },
  66519. mounted: function mounted() {
  66520. var _this = this;
  66521. (0, _dom.on)(window, 'scroll', this.handleScroll, this.useCapture);
  66522. (0, _dom.on)(window, 'resize', this.handleScroll, this.useCapture);
  66523. this.$nextTick(function () {
  66524. (0, _newArrowCheck3.default)(this, _this);
  66525. this.handleScroll();
  66526. }.bind(this));
  66527. },
  66528. beforeDestroy: function beforeDestroy() {
  66529. (0, _dom.off)(window, 'scroll', this.handleScroll, this.useCapture);
  66530. (0, _dom.off)(window, 'resize', this.handleScroll, this.useCapture);
  66531. },
  66532. methods: {
  66533. handleScroll: function handleScroll() {
  66534. var affix = this.affix;
  66535. var scrollTop = getScroll(window, true);
  66536. var elOffset = getOffset(this.$el);
  66537. var windowHeight = window.innerHeight;
  66538. var elHeight = this.$el.getElementsByTagName('div')[0].offsetHeight;
  66539. if (elOffset.top - this.offsetTop < scrollTop && this.offsetType == 'top' && !affix) {
  66540. this.affix = true;
  66541. this.slotStyle = {
  66542. width: this.$refs.point.clientWidth + 'px',
  66543. height: this.$refs.point.clientHeight + 'px'
  66544. };
  66545. this.slot = true;
  66546. this.styles = {
  66547. top: String(this.offsetTop) + 'px',
  66548. left: String(elOffset.left) + 'px',
  66549. width: String(this.$el.offsetWidth) + 'px'
  66550. };
  66551. this.$emit('on-change', true);
  66552. } else if (elOffset.top - this.offsetTop > scrollTop && this.offsetType == 'top' && affix) {
  66553. this.slot = false;
  66554. this.slotStyle = {};
  66555. this.affix = false;
  66556. this.styles = null;
  66557. this.$emit('on-change', false);
  66558. }
  66559. if (elOffset.top + this.offsetBottom + elHeight > scrollTop + windowHeight && this.offsetType == 'bottom' && !affix) {
  66560. this.affix = true;
  66561. this.styles = {
  66562. bottom: String(this.offsetBottom) + 'px',
  66563. left: String(elOffset.left) + 'px',
  66564. width: String(this.$el.offsetWidth) + 'px'
  66565. };
  66566. this.$emit('on-change', true);
  66567. } else if (elOffset.top + this.offsetBottom + elHeight < scrollTop + windowHeight && this.offsetType == 'bottom' && affix) {
  66568. this.affix = false;
  66569. this.styles = null;
  66570. this.$emit('on-change', false);
  66571. }
  66572. }
  66573. }
  66574. };
  66575. /***/ }),
  66576. /* 100 */
  66577. /***/ (function(module, exports, __webpack_require__) {
  66578. "use strict";
  66579. Object.defineProperty(exports, "__esModule", {
  66580. value: true
  66581. });
  66582. var _defineProperty2 = __webpack_require__(2);
  66583. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  66584. var _icon = __webpack_require__(19);
  66585. var _icon2 = _interopRequireDefault(_icon);
  66586. var _assist = __webpack_require__(3);
  66587. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  66588. var prefixCls = 'ivu-alert';
  66589. exports.default = {
  66590. name: 'Alert',
  66591. components: { Icon: _icon2.default },
  66592. props: {
  66593. type: {
  66594. validator: function validator(value) {
  66595. return (0, _assist.oneOf)(value, ['success', 'info', 'warning', 'error']);
  66596. },
  66597. default: 'info'
  66598. },
  66599. closable: {
  66600. type: Boolean,
  66601. default: false
  66602. },
  66603. showIcon: {
  66604. type: Boolean,
  66605. default: false
  66606. },
  66607. banner: {
  66608. type: Boolean,
  66609. default: false
  66610. },
  66611. fade: {
  66612. type: Boolean,
  66613. default: true
  66614. }
  66615. },
  66616. data: function data() {
  66617. return {
  66618. closed: false,
  66619. desc: false
  66620. };
  66621. },
  66622. computed: {
  66623. wrapClasses: function wrapClasses() {
  66624. var _ref;
  66625. return ['' + prefixCls, prefixCls + '-' + String(this.type), (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-with-icon', this.showIcon), (0, _defineProperty3.default)(_ref, prefixCls + '-with-desc', this.desc), (0, _defineProperty3.default)(_ref, prefixCls + '-with-banner', this.banner), _ref)];
  66626. },
  66627. messageClasses: function messageClasses() {
  66628. return prefixCls + '-message';
  66629. },
  66630. descClasses: function descClasses() {
  66631. return prefixCls + '-desc';
  66632. },
  66633. closeClasses: function closeClasses() {
  66634. return prefixCls + '-close';
  66635. },
  66636. iconClasses: function iconClasses() {
  66637. return prefixCls + '-icon';
  66638. },
  66639. iconType: function iconType() {
  66640. var type = '';
  66641. switch (this.type) {
  66642. case 'success':
  66643. type = 'ios-checkmark-circle';
  66644. break;
  66645. case 'info':
  66646. type = 'ios-information-circle';
  66647. break;
  66648. case 'warning':
  66649. type = 'ios-alert';
  66650. break;
  66651. case 'error':
  66652. type = 'ios-close-circle';
  66653. break;
  66654. }
  66655. if (this.desc) type += '-outline';
  66656. return type;
  66657. }
  66658. },
  66659. methods: {
  66660. close: function close(e) {
  66661. this.closed = true;
  66662. this.$emit('on-close', e);
  66663. }
  66664. },
  66665. mounted: function mounted() {
  66666. this.desc = this.$slots.desc !== undefined;
  66667. }
  66668. };
  66669. /***/ }),
  66670. /* 101 */
  66671. /***/ (function(module, exports, __webpack_require__) {
  66672. "use strict";
  66673. Object.defineProperty(exports, "__esModule", {
  66674. value: true
  66675. });
  66676. var _defineProperty2 = __webpack_require__(2);
  66677. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  66678. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  66679. var prefixCls = 'ivu-icon';
  66680. exports.default = {
  66681. name: 'Icon',
  66682. props: {
  66683. type: {
  66684. type: String,
  66685. default: ''
  66686. },
  66687. size: [Number, String],
  66688. color: String,
  66689. custom: {
  66690. type: String,
  66691. default: ''
  66692. }
  66693. },
  66694. computed: {
  66695. classes: function classes() {
  66696. var _ref;
  66697. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.type), this.type !== ''), (0, _defineProperty3.default)(_ref, '' + String(this.custom), this.custom !== ''), _ref)];
  66698. },
  66699. styles: function styles() {
  66700. var style = {};
  66701. if (this.size) {
  66702. style['font-size'] = String(this.size) + 'px';
  66703. }
  66704. if (this.color) {
  66705. style.color = this.color;
  66706. }
  66707. return style;
  66708. }
  66709. },
  66710. methods: {
  66711. handleClick: function handleClick(event) {
  66712. this.$emit('click', event);
  66713. }
  66714. }
  66715. };
  66716. /***/ }),
  66717. /* 102 */
  66718. /***/ (function(module, exports) {
  66719. module.exports = function (done, value) {
  66720. return { value: value, done: !!done };
  66721. };
  66722. /***/ }),
  66723. /* 103 */
  66724. /***/ (function(module, exports, __webpack_require__) {
  66725. module.exports = __webpack_require__(25);
  66726. /***/ }),
  66727. /* 104 */
  66728. /***/ (function(module, exports, __webpack_require__) {
  66729. var dP = __webpack_require__(14);
  66730. var anObject = __webpack_require__(22);
  66731. var getKeys = __webpack_require__(40);
  66732. module.exports = __webpack_require__(13) ? Object.defineProperties : function defineProperties(O, Properties) {
  66733. anObject(O);
  66734. var keys = getKeys(Properties);
  66735. var length = keys.length;
  66736. var i = 0;
  66737. var P;
  66738. while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  66739. return O;
  66740. };
  66741. /***/ }),
  66742. /* 105 */
  66743. /***/ (function(module, exports, __webpack_require__) {
  66744. var document = __webpack_require__(9).document;
  66745. module.exports = document && document.documentElement;
  66746. /***/ }),
  66747. /* 106 */
  66748. /***/ (function(module, exports, __webpack_require__) {
  66749. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  66750. var has = __webpack_require__(30);
  66751. var toObject = __webpack_require__(29);
  66752. var IE_PROTO = __webpack_require__(66)('IE_PROTO');
  66753. var ObjectProto = Object.prototype;
  66754. module.exports = Object.getPrototypeOf || function (O) {
  66755. O = toObject(O);
  66756. if (has(O, IE_PROTO)) return O[IE_PROTO];
  66757. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  66758. return O.constructor.prototype;
  66759. } return O instanceof Object ? ObjectProto : null;
  66760. };
  66761. /***/ }),
  66762. /* 107 */
  66763. /***/ (function(module, exports, __webpack_require__) {
  66764. "use strict";
  66765. Object.defineProperty(exports, "__esModule", {
  66766. value: true
  66767. });
  66768. var _newArrowCheck2 = __webpack_require__(1);
  66769. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  66770. var _assist = __webpack_require__(3);
  66771. var _dom = __webpack_require__(12);
  66772. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  66773. exports.default = {
  66774. name: 'Anchor',
  66775. provide: function provide() {
  66776. return {
  66777. anchorCom: this
  66778. };
  66779. },
  66780. data: function data() {
  66781. return {
  66782. prefix: 'ivu-anchor',
  66783. isAffixed: false,
  66784. inkTop: 0,
  66785. animating: false,
  66786. currentLink: '',
  66787. currentId: '',
  66788. scrollContainer: null,
  66789. scrollElement: null,
  66790. titlesOffsetArr: [],
  66791. wrapperTop: 0,
  66792. upperFirstTitle: true
  66793. };
  66794. },
  66795. props: {
  66796. affix: {
  66797. type: Boolean,
  66798. default: true
  66799. },
  66800. offsetTop: {
  66801. type: Number,
  66802. default: 0
  66803. },
  66804. offsetBottom: Number,
  66805. bounds: {
  66806. type: Number,
  66807. default: 5
  66808. },
  66809. container: null,
  66810. showInk: {
  66811. type: Boolean,
  66812. default: false
  66813. },
  66814. scrollOffset: {
  66815. type: Number,
  66816. default: 0
  66817. }
  66818. },
  66819. computed: {
  66820. wrapperComponent: function wrapperComponent() {
  66821. return this.affix ? 'Affix' : 'div';
  66822. },
  66823. wrapperStyle: function wrapperStyle() {
  66824. return {
  66825. maxHeight: this.offsetTop ? 'calc(100vh - ' + String(this.offsetTop) + 'px)' : '100vh'
  66826. };
  66827. },
  66828. containerIsWindow: function containerIsWindow() {
  66829. return this.scrollContainer === window;
  66830. }
  66831. },
  66832. methods: {
  66833. handleAffixStateChange: function handleAffixStateChange(state) {
  66834. this.isAffixed = this.affix && state;
  66835. },
  66836. handleScroll: function handleScroll(e) {
  66837. this.upperFirstTitle = e.target.scrollTop < this.titlesOffsetArr[0].offset;
  66838. if (this.animating) return;
  66839. this.updateTitleOffset();
  66840. var scrollTop = document.documentElement.scrollTop || document.body.scrollTop || e.target.scrollTop;
  66841. this.getCurrentScrollAtTitleId(scrollTop);
  66842. },
  66843. handleHashChange: function handleHashChange() {
  66844. var url = window.location.href;
  66845. var sharpLinkMatch = _assist.sharpMatcherRegx.exec(url);
  66846. if (!sharpLinkMatch) return;
  66847. this.currentLink = sharpLinkMatch[0];
  66848. this.currentId = sharpLinkMatch[1];
  66849. },
  66850. handleScrollTo: function handleScrollTo() {
  66851. var _this = this;
  66852. var anchor = document.getElementById(this.currentId);
  66853. var currentLinkElementA = document.querySelector('a[data-href="' + String(this.currentLink) + '"]');
  66854. var offset = this.scrollOffset;
  66855. if (currentLinkElementA) {
  66856. offset = parseFloat(currentLinkElementA.getAttribute('data-scroll-offset'));
  66857. }
  66858. if (!anchor) return;
  66859. var offsetTop = anchor.offsetTop - this.wrapperTop - offset;
  66860. this.animating = true;
  66861. (0, _assist.scrollTop)(this.scrollContainer, this.scrollElement.scrollTop, offsetTop, 600, function () {
  66862. (0, _newArrowCheck3.default)(this, _this);
  66863. this.animating = false;
  66864. }.bind(this));
  66865. this.handleSetInkTop();
  66866. },
  66867. handleSetInkTop: function handleSetInkTop() {
  66868. var currentLinkElementA = document.querySelector('a[data-href="' + String(this.currentLink) + '"]');
  66869. if (!currentLinkElementA) return;
  66870. var elementATop = currentLinkElementA.offsetTop;
  66871. var top = elementATop < 0 ? this.offsetTop : elementATop;
  66872. this.inkTop = top;
  66873. },
  66874. updateTitleOffset: function updateTitleOffset() {
  66875. var _this2 = this;
  66876. var links = (0, _assist.findComponentsDownward)(this, 'AnchorLink').map(function (link) {
  66877. (0, _newArrowCheck3.default)(this, _this2);
  66878. return link.href;
  66879. }.bind(this));
  66880. var idArr = links.map(function (link) {
  66881. (0, _newArrowCheck3.default)(this, _this2);
  66882. return link.split('#')[1];
  66883. }.bind(this));
  66884. var offsetArr = [];
  66885. idArr.forEach(function (id) {
  66886. (0, _newArrowCheck3.default)(this, _this2);
  66887. var titleEle = document.getElementById(id);
  66888. if (titleEle) offsetArr.push({
  66889. link: '#' + String(id),
  66890. offset: titleEle.offsetTop - this.scrollElement.offsetTop
  66891. });
  66892. }.bind(this));
  66893. this.titlesOffsetArr = offsetArr;
  66894. },
  66895. getCurrentScrollAtTitleId: function getCurrentScrollAtTitleId(scrollTop) {
  66896. var i = -1;
  66897. var len = this.titlesOffsetArr.length;
  66898. var titleItem = {
  66899. link: '#',
  66900. offset: 0
  66901. };
  66902. scrollTop += this.bounds;
  66903. while (++i < len) {
  66904. var currentEle = this.titlesOffsetArr[i];
  66905. var nextEle = this.titlesOffsetArr[i + 1];
  66906. if (scrollTop >= currentEle.offset && scrollTop < (nextEle && nextEle.offset || Infinity)) {
  66907. titleItem = this.titlesOffsetArr[i];
  66908. break;
  66909. }
  66910. }
  66911. this.currentLink = titleItem.link;
  66912. this.handleSetInkTop();
  66913. },
  66914. getContainer: function getContainer() {
  66915. this.scrollContainer = this.container ? typeof this.container === 'string' ? document.querySelector(this.container) : this.container : window;
  66916. this.scrollElement = this.container ? this.scrollContainer : document.documentElement || document.body;
  66917. },
  66918. removeListener: function removeListener() {
  66919. (0, _dom.off)(this.scrollContainer, 'scroll', this.handleScroll);
  66920. (0, _dom.off)(window, 'hashchange', this.handleHashChange);
  66921. },
  66922. init: function init() {
  66923. var _this3 = this;
  66924. this.handleHashChange();
  66925. this.$nextTick(function () {
  66926. (0, _newArrowCheck3.default)(this, _this3);
  66927. this.removeListener();
  66928. this.getContainer();
  66929. this.wrapperTop = this.containerIsWindow ? 0 : this.scrollElement.offsetTop;
  66930. this.handleScrollTo();
  66931. this.handleSetInkTop();
  66932. this.updateTitleOffset();
  66933. if (this.titlesOffsetArr[0]) {
  66934. this.upperFirstTitle = this.scrollElement.scrollTop < this.titlesOffsetArr[0].offset;
  66935. }
  66936. (0, _dom.on)(this.scrollContainer, 'scroll', this.handleScroll);
  66937. (0, _dom.on)(window, 'hashchange', this.handleHashChange);
  66938. }.bind(this));
  66939. }
  66940. },
  66941. watch: {
  66942. '$route': function $route() {
  66943. var _this4 = this;
  66944. this.handleHashChange();
  66945. this.$nextTick(function () {
  66946. (0, _newArrowCheck3.default)(this, _this4);
  66947. this.handleScrollTo();
  66948. }.bind(this));
  66949. },
  66950. container: function container() {
  66951. this.init();
  66952. },
  66953. currentLink: function currentLink(newHref, oldHref) {
  66954. this.$emit('on-change', newHref, oldHref);
  66955. }
  66956. },
  66957. mounted: function mounted() {
  66958. this.init();
  66959. },
  66960. beforeDestroy: function beforeDestroy() {
  66961. this.removeListener();
  66962. }
  66963. };
  66964. /***/ }),
  66965. /* 108 */
  66966. /***/ (function(module, exports, __webpack_require__) {
  66967. "use strict";
  66968. Object.defineProperty(exports, "__esModule", {
  66969. value: true
  66970. });
  66971. var _newArrowCheck2 = __webpack_require__(1);
  66972. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  66973. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  66974. exports.default = {
  66975. name: 'AnchorLink',
  66976. inject: ['anchorCom'],
  66977. props: {
  66978. href: String,
  66979. title: String,
  66980. scrollOffset: {
  66981. type: Number,
  66982. default: function _default() {
  66983. return this.anchorCom.scrollOffset;
  66984. }
  66985. }
  66986. },
  66987. data: function data() {
  66988. return {
  66989. prefix: 'ivu-anchor-link'
  66990. };
  66991. },
  66992. computed: {
  66993. anchorLinkClasses: function anchorLinkClasses() {
  66994. return [this.prefix, this.anchorCom.currentLink === this.href ? String(this.prefix) + '-active' : ''];
  66995. },
  66996. linkTitleClasses: function linkTitleClasses() {
  66997. return [String(this.prefix) + '-title'];
  66998. }
  66999. },
  67000. methods: {
  67001. goAnchor: function goAnchor() {
  67002. var _this = this;
  67003. this.currentLink = this.href;
  67004. this.anchorCom.handleHashChange();
  67005. this.anchorCom.handleScrollTo();
  67006. this.anchorCom.$emit('on-select', this.href);
  67007. var isRoute = this.$router;
  67008. if (isRoute) {
  67009. this.$router.push(this.href, function () {
  67010. (0, _newArrowCheck3.default)(this, _this);
  67011. }.bind(this));
  67012. } else {
  67013. window.location.href = this.href;
  67014. }
  67015. }
  67016. },
  67017. mounted: function mounted() {
  67018. var _this2 = this;
  67019. this.$nextTick(function () {
  67020. (0, _newArrowCheck3.default)(this, _this2);
  67021. this.anchorCom.init();
  67022. }.bind(this));
  67023. }
  67024. };
  67025. /***/ }),
  67026. /* 109 */
  67027. /***/ (function(module, exports, __webpack_require__) {
  67028. "use strict";
  67029. Object.defineProperty(exports, "__esModule", {
  67030. value: true
  67031. });
  67032. var _newArrowCheck2 = __webpack_require__(1);
  67033. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  67034. var _select = __webpack_require__(74);
  67035. var _select2 = _interopRequireDefault(_select);
  67036. var _option = __webpack_require__(81);
  67037. var _option2 = _interopRequireDefault(_option);
  67038. var _input = __webpack_require__(38);
  67039. var _input2 = _interopRequireDefault(_input);
  67040. var _assist = __webpack_require__(3);
  67041. var _emitter = __webpack_require__(4);
  67042. var _emitter2 = _interopRequireDefault(_emitter);
  67043. var _form = __webpack_require__(11);
  67044. var _form2 = _interopRequireDefault(_form);
  67045. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  67046. exports.default = {
  67047. name: 'AutoComplete',
  67048. mixins: [_emitter2.default, _form2.default],
  67049. components: { iSelect: _select2.default, iOption: _option2.default, iInput: _input2.default },
  67050. props: {
  67051. value: {
  67052. type: [String, Number],
  67053. default: ''
  67054. },
  67055. label: {
  67056. type: [String, Number],
  67057. default: ''
  67058. },
  67059. data: {
  67060. type: Array,
  67061. default: function _default() {
  67062. (0, _newArrowCheck3.default)(undefined, undefined);
  67063. return [];
  67064. }.bind(undefined)
  67065. },
  67066. disabled: {
  67067. type: Boolean,
  67068. default: false
  67069. },
  67070. clearable: {
  67071. type: Boolean,
  67072. default: false
  67073. },
  67074. placeholder: {
  67075. type: String
  67076. },
  67077. size: {
  67078. validator: function validator(value) {
  67079. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  67080. },
  67081. default: function _default() {
  67082. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  67083. }
  67084. },
  67085. icon: {
  67086. type: String
  67087. },
  67088. filterMethod: {
  67089. type: [Function, Boolean],
  67090. default: false
  67091. },
  67092. placement: {
  67093. validator: function validator(value) {
  67094. return (0, _assist.oneOf)(value, ['top', 'bottom', 'top-start', 'bottom-start', 'top-end', 'bottom-end']);
  67095. },
  67096. default: 'bottom-start'
  67097. },
  67098. transfer: {
  67099. type: Boolean,
  67100. default: function _default() {
  67101. return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
  67102. }
  67103. },
  67104. name: {
  67105. type: String
  67106. },
  67107. elementId: {
  67108. type: String
  67109. },
  67110. transferClassName: {
  67111. type: String
  67112. },
  67113. capture: {
  67114. type: Boolean,
  67115. default: function _default() {
  67116. return !this.$IVIEW ? true : this.$IVIEW.capture;
  67117. }
  67118. },
  67119. eventsEnabled: {
  67120. type: Boolean,
  67121. default: false
  67122. }
  67123. },
  67124. data: function data() {
  67125. return {
  67126. currentValue: this.value,
  67127. disableEmitChange: false };
  67128. },
  67129. computed: {
  67130. inputIcon: function inputIcon() {
  67131. var icon = '';
  67132. if (this.clearable && this.currentValue && !this.disabled) {
  67133. icon = 'ios-close-circle';
  67134. } else if (this.icon) {
  67135. icon = this.icon;
  67136. }
  67137. return icon;
  67138. },
  67139. filteredData: function filteredData() {
  67140. var _this = this;
  67141. if (this.filterMethod) {
  67142. return this.data.filter(function (item) {
  67143. (0, _newArrowCheck3.default)(this, _this);
  67144. return this.filterMethod(this.currentValue, item);
  67145. }.bind(this));
  67146. } else {
  67147. return this.data;
  67148. }
  67149. }
  67150. },
  67151. watch: {
  67152. value: function value(val) {
  67153. if (this.currentValue !== val) {
  67154. this.disableEmitChange = true;
  67155. }
  67156. this.currentValue = val;
  67157. },
  67158. currentValue: function currentValue(val) {
  67159. this.$refs.select.setQuery(val);
  67160. this.$emit('input', val);
  67161. if (this.disableEmitChange) {
  67162. this.disableEmitChange = false;
  67163. return;
  67164. }
  67165. this.$emit('on-change', val);
  67166. this.dispatch('FormItem', 'on-form-change', val);
  67167. }
  67168. },
  67169. methods: {
  67170. remoteMethod: function remoteMethod(query) {
  67171. this.$emit('on-search', query);
  67172. },
  67173. handleSelect: function handleSelect(option) {
  67174. var val = option.value;
  67175. if (val === undefined || val === null) return;
  67176. this.currentValue = val;
  67177. this.$refs.input.blur();
  67178. this.$emit('on-select', val);
  67179. },
  67180. handleFocus: function handleFocus(event) {
  67181. this.$emit('on-focus', event);
  67182. },
  67183. handleBlur: function handleBlur(event) {
  67184. this.$emit('on-blur', event);
  67185. },
  67186. handleClear: function handleClear() {
  67187. if (!this.clearable) return;
  67188. this.currentValue = '';
  67189. this.$refs.select.reset();
  67190. this.$emit('on-clear');
  67191. },
  67192. handleClickOutside: function handleClickOutside() {
  67193. var _this2 = this;
  67194. this.$nextTick(function () {
  67195. (0, _newArrowCheck3.default)(this, _this2);
  67196. this.$refs.input.blur();
  67197. }.bind(this));
  67198. }
  67199. }
  67200. };
  67201. /***/ }),
  67202. /* 110 */
  67203. /***/ (function(module, exports, __webpack_require__) {
  67204. "use strict";
  67205. Object.defineProperty(exports, "__esModule", {
  67206. value: true
  67207. });
  67208. var _slicedToArray2 = __webpack_require__(26);
  67209. var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
  67210. var _isFinite = __webpack_require__(75);
  67211. var _isFinite2 = _interopRequireDefault(_isFinite);
  67212. var _getIterator2 = __webpack_require__(45);
  67213. var _getIterator3 = _interopRequireDefault(_getIterator2);
  67214. var _stringify = __webpack_require__(57);
  67215. var _stringify2 = _interopRequireDefault(_stringify);
  67216. var _defineProperty2 = __webpack_require__(2);
  67217. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  67218. var _extends3 = __webpack_require__(32);
  67219. var _extends4 = _interopRequireDefault(_extends3);
  67220. var _toConsumableArray2 = __webpack_require__(17);
  67221. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  67222. var _newArrowCheck2 = __webpack_require__(1);
  67223. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  67224. var _dropdown = __webpack_require__(36);
  67225. var _dropdown2 = _interopRequireDefault(_dropdown);
  67226. var _icon = __webpack_require__(19);
  67227. var _icon2 = _interopRequireDefault(_icon);
  67228. var _vClickOutsideX = __webpack_require__(76);
  67229. var _transferDom = __webpack_require__(23);
  67230. var _transferDom2 = _interopRequireDefault(_transferDom);
  67231. var _assist = __webpack_require__(3);
  67232. var _emitter = __webpack_require__(4);
  67233. var _emitter2 = _interopRequireDefault(_emitter);
  67234. var _form = __webpack_require__(11);
  67235. var _form2 = _interopRequireDefault(_form);
  67236. var _locale = __webpack_require__(6);
  67237. var _locale2 = _interopRequireDefault(_locale);
  67238. var _selectHead = __webpack_require__(324);
  67239. var _selectHead2 = _interopRequireDefault(_selectHead);
  67240. var _functionalOptions = __webpack_require__(326);
  67241. var _functionalOptions2 = _interopRequireDefault(_functionalOptions);
  67242. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  67243. var prefixCls = 'ivu-select';
  67244. var optionRegexp = /^i-option$|^Option$/i;
  67245. var optionGroupRegexp = /option-?group/i;
  67246. var findChild = function (instance, checkFn) {
  67247. (0, _newArrowCheck3.default)(undefined, undefined);
  67248. var match = checkFn(instance);
  67249. if (match) return instance;
  67250. for (var i = 0, l = instance.$children.length; i < l; i++) {
  67251. var child = instance.$children[i];
  67252. match = findChild(child, checkFn);
  67253. if (match) return match;
  67254. }
  67255. }.bind(undefined);
  67256. var findOptionsInVNode = function (node) {
  67257. (0, _newArrowCheck3.default)(undefined, undefined);
  67258. var opts = node.componentOptions;
  67259. if (opts && optionRegexp.test(opts.tag)) return [node];
  67260. if (!node.children && (!opts || !opts.children)) return [];
  67261. var children = [].concat((0, _toConsumableArray3.default)(node.children || []), (0, _toConsumableArray3.default)(opts && opts.children || []));
  67262. var options = children.reduce(function (arr, el) {
  67263. (0, _newArrowCheck3.default)(undefined, undefined);
  67264. return [].concat((0, _toConsumableArray3.default)(arr), (0, _toConsumableArray3.default)(findOptionsInVNode(el)));
  67265. }.bind(undefined), []).filter(Boolean);
  67266. return options.length > 0 ? options : [];
  67267. }.bind(undefined);
  67268. var extractOptions = function (options) {
  67269. (0, _newArrowCheck3.default)(undefined, undefined);
  67270. return options.reduce(function (options, slotEntry) {
  67271. (0, _newArrowCheck3.default)(undefined, undefined);
  67272. return options.concat(findOptionsInVNode(slotEntry));
  67273. }.bind(undefined), []);
  67274. }.bind(undefined);
  67275. var applyProp = function (node, propName, value) {
  67276. (0, _newArrowCheck3.default)(undefined, undefined);
  67277. return (0, _extends4.default)({}, node, {
  67278. componentOptions: (0, _extends4.default)({}, node.componentOptions, {
  67279. propsData: (0, _extends4.default)({}, node.componentOptions.propsData, (0, _defineProperty3.default)({}, propName, value))
  67280. })
  67281. });
  67282. }.bind(undefined);
  67283. var getNestedProperty = function (obj, path) {
  67284. (0, _newArrowCheck3.default)(undefined, undefined);
  67285. var keys = path.split('.');
  67286. return keys.reduce(function (o, key) {
  67287. (0, _newArrowCheck3.default)(undefined, undefined);
  67288. return o && o[key] || null;
  67289. }.bind(undefined), obj);
  67290. }.bind(undefined);
  67291. var getOptionLabel = function (option) {
  67292. (0, _newArrowCheck3.default)(undefined, undefined);
  67293. if (option.componentOptions.propsData.label) return option.componentOptions.propsData.label;
  67294. var textContent = (option.componentOptions.children || []).reduce(function (str, child) {
  67295. (0, _newArrowCheck3.default)(undefined, undefined);
  67296. return str + (child.text || '');
  67297. }.bind(undefined), '');
  67298. var innerHTML = getNestedProperty(option, 'data.domProps.innerHTML');
  67299. return textContent || (typeof innerHTML === 'string' ? innerHTML : '');
  67300. }.bind(undefined);
  67301. var checkValuesNotEqual = function (value, publicValue, values) {
  67302. (0, _newArrowCheck3.default)(undefined, undefined);
  67303. var strValue = (0, _stringify2.default)(value);
  67304. var strPublic = (0, _stringify2.default)(publicValue);
  67305. var strValues = (0, _stringify2.default)(values.map(function (item) {
  67306. (0, _newArrowCheck3.default)(undefined, undefined);
  67307. return item.value;
  67308. }.bind(undefined)));
  67309. return strValue !== strPublic || strValue !== strValues || strValues !== strPublic;
  67310. }.bind(undefined);
  67311. var ANIMATION_TIMEOUT = 300;
  67312. exports.default = {
  67313. name: 'iSelect',
  67314. mixins: [_emitter2.default, _locale2.default, _form2.default],
  67315. components: { FunctionalOptions: _functionalOptions2.default, Drop: _dropdown2.default, SelectHead: _selectHead2.default, Icon: _icon2.default },
  67316. directives: { clickOutside: _vClickOutsideX.directive, TransferDom: _transferDom2.default },
  67317. props: {
  67318. value: {
  67319. type: [String, Number, Array],
  67320. default: ''
  67321. },
  67322. label: {
  67323. type: [String, Number, Array],
  67324. default: ''
  67325. },
  67326. defaultLabel: {
  67327. type: [String, Number, Array],
  67328. default: ''
  67329. },
  67330. multiple: {
  67331. type: Boolean,
  67332. default: false
  67333. },
  67334. disabled: {
  67335. type: Boolean,
  67336. default: false
  67337. },
  67338. clearable: {
  67339. type: Boolean,
  67340. default: false
  67341. },
  67342. placeholder: {
  67343. type: String
  67344. },
  67345. filterable: {
  67346. type: Boolean,
  67347. default: false
  67348. },
  67349. filterMethod: {
  67350. type: Function
  67351. },
  67352. remoteMethod: {
  67353. type: Function
  67354. },
  67355. loading: {
  67356. type: Boolean,
  67357. default: false
  67358. },
  67359. loadingText: {
  67360. type: String
  67361. },
  67362. size: {
  67363. validator: function validator(value) {
  67364. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  67365. },
  67366. default: function _default() {
  67367. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  67368. }
  67369. },
  67370. labelInValue: {
  67371. type: Boolean,
  67372. default: false
  67373. },
  67374. notFoundText: {
  67375. type: String
  67376. },
  67377. placement: {
  67378. validator: function validator(value) {
  67379. return (0, _assist.oneOf)(value, ['top', 'bottom', 'top-start', 'bottom-start', 'top-end', 'bottom-end']);
  67380. },
  67381. default: 'bottom-start'
  67382. },
  67383. transfer: {
  67384. type: Boolean,
  67385. default: function _default() {
  67386. return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
  67387. }
  67388. },
  67389. autoComplete: {
  67390. type: Boolean,
  67391. default: false
  67392. },
  67393. name: {
  67394. type: String
  67395. },
  67396. elementId: {
  67397. type: String
  67398. },
  67399. transferClassName: {
  67400. type: String
  67401. },
  67402. prefix: {
  67403. type: String
  67404. },
  67405. maxTagCount: {
  67406. type: Number
  67407. },
  67408. maxTagPlaceholder: {
  67409. type: Function
  67410. },
  67411. allowCreate: {
  67412. type: Boolean,
  67413. default: false
  67414. },
  67415. capture: {
  67416. type: Boolean,
  67417. default: function _default() {
  67418. return !this.$IVIEW ? true : this.$IVIEW.capture;
  67419. }
  67420. },
  67421. filterByLabel: {
  67422. type: Boolean,
  67423. default: false
  67424. },
  67425. eventsEnabled: {
  67426. type: Boolean,
  67427. default: false
  67428. }
  67429. },
  67430. mounted: function mounted() {
  67431. var _this = this;
  67432. this.$on('on-select-selected', this.onOptionClick);
  67433. if (!this.remote && this.selectOptions.length > 0) {
  67434. this.values = this.getInitialValue().map(function (value) {
  67435. (0, _newArrowCheck3.default)(this, _this);
  67436. if (typeof value !== 'number' && !value) return null;
  67437. return this.getOptionData(value);
  67438. }.bind(this)).filter(Boolean);
  67439. }
  67440. this.checkUpdateStatus();
  67441. if (this.remote && this.value && this.defaultLabel) {
  67442. if (!this.multiple) {
  67443. this.query = this.defaultLabel;
  67444. } else if (this.multiple && this.defaultLabel instanceof Array && this.value.length === this.defaultLabel.length) {
  67445. var values = this.value.map(function (item, index) {
  67446. (0, _newArrowCheck3.default)(this, _this);
  67447. return {
  67448. value: item,
  67449. label: this.defaultLabel[index]
  67450. };
  67451. }.bind(this));
  67452. this.$emit('on-set-default-options', JSON.parse((0, _stringify2.default)(values)));
  67453. setTimeout(function () {
  67454. (0, _newArrowCheck3.default)(this, _this);
  67455. this.values = values;
  67456. }.bind(this));
  67457. }
  67458. }
  67459. },
  67460. beforeDestroy: function beforeDestroy() {
  67461. this.$off('on-select-selected');
  67462. },
  67463. data: function data() {
  67464. return {
  67465. prefixCls: prefixCls,
  67466. values: [],
  67467. dropDownWidth: 0,
  67468. visible: false,
  67469. focusIndex: -1,
  67470. isFocused: false,
  67471. query: '',
  67472. initialLabel: this.label,
  67473. hasMouseHoverHead: false,
  67474. slotOptions: this.$slots.default,
  67475. caretPosition: -1,
  67476. lastRemoteQuery: '',
  67477. unchangedQuery: true,
  67478. hasExpectedValue: false,
  67479. isTyping: false,
  67480. preventRemoteCall: false,
  67481. filterQueryChange: false };
  67482. },
  67483. computed: {
  67484. classes: function classes() {
  67485. var _ref;
  67486. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-visible', this.visible), (0, _defineProperty3.default)(_ref, prefixCls + '-disabled', this.itemDisabled), (0, _defineProperty3.default)(_ref, prefixCls + '-multiple', this.multiple), (0, _defineProperty3.default)(_ref, prefixCls + '-single', !this.multiple), (0, _defineProperty3.default)(_ref, prefixCls + '-show-clear', this.showCloseIcon), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.size), !!this.size), _ref)];
  67487. },
  67488. dropdownCls: function dropdownCls() {
  67489. var _ref2;
  67490. return _ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-dropdown-transfer', this.transfer), (0, _defineProperty3.default)(_ref2, prefixCls + '-multiple', this.multiple && this.transfer), (0, _defineProperty3.default)(_ref2, 'ivu-auto-complete', this.autoComplete), (0, _defineProperty3.default)(_ref2, this.transferClassName, this.transferClassName), _ref2;
  67491. },
  67492. selectionCls: function selectionCls() {
  67493. var _ref3;
  67494. return _ref3 = {}, (0, _defineProperty3.default)(_ref3, prefixCls + '-selection', !this.autoComplete), (0, _defineProperty3.default)(_ref3, prefixCls + '-selection-focused', this.isFocused), _ref3;
  67495. },
  67496. localeNotFoundText: function localeNotFoundText() {
  67497. if (typeof this.notFoundText === 'undefined') {
  67498. return this.t('i.select.noMatch');
  67499. } else {
  67500. return this.notFoundText;
  67501. }
  67502. },
  67503. localeLoadingText: function localeLoadingText() {
  67504. if (typeof this.loadingText === 'undefined') {
  67505. return this.t('i.select.loading');
  67506. } else {
  67507. return this.loadingText;
  67508. }
  67509. },
  67510. showCreateItem: function showCreateItem() {
  67511. var _this2 = this;
  67512. var state = false;
  67513. if (this.allowCreate && this.query !== '') {
  67514. state = true;
  67515. var $options = (0, _assist.findComponentsDownward)(this, 'iOption');
  67516. if ($options && $options.length) {
  67517. if ($options.find(function (item) {
  67518. (0, _newArrowCheck3.default)(this, _this2);
  67519. return item.optionLabel === this.query;
  67520. }.bind(this))) state = false;
  67521. }
  67522. }
  67523. return state;
  67524. },
  67525. transitionName: function transitionName() {
  67526. return this.placement === 'bottom' ? 'slide-up' : 'slide-down';
  67527. },
  67528. dropVisible: function dropVisible() {
  67529. var status = true;
  67530. var noOptions = !this.selectOptions || this.selectOptions.length === 0;
  67531. if (!this.loading && this.remote && this.query === '' && noOptions) status = false;
  67532. if (this.autoComplete && noOptions) status = false;
  67533. return this.visible && status;
  67534. },
  67535. showNotFoundLabel: function showNotFoundLabel() {
  67536. var loading = this.loading,
  67537. remote = this.remote,
  67538. selectOptions = this.selectOptions;
  67539. return selectOptions && selectOptions.length === 0 && (!remote || remote && !loading);
  67540. },
  67541. publicValue: function publicValue() {
  67542. var _this3 = this;
  67543. return this.multiple ? this.values.map(function (option) {
  67544. (0, _newArrowCheck3.default)(this, _this3);
  67545. return option.value;
  67546. }.bind(this)) : (this.values[0] || {}).value;
  67547. },
  67548. canBeCleared: function canBeCleared() {
  67549. var uiStateMatch = this.hasMouseHoverHead || this.active;
  67550. var qualifiesForClear = !this.multiple && !this.itemDisabled && this.clearable;
  67551. return uiStateMatch && qualifiesForClear && this.reset;
  67552. },
  67553. selectOptions: function selectOptions() {
  67554. var _this4 = this;
  67555. var selectOptions = [];
  67556. var slotOptions = this.slotOptions || [];
  67557. var optionCounter = -1;
  67558. var currentIndex = this.focusIndex;
  67559. var selectedValues = this.values.filter(Boolean).map(function (_ref4) {
  67560. var value = _ref4.value;
  67561. (0, _newArrowCheck3.default)(this, _this4);
  67562. return value;
  67563. }.bind(this));
  67564. if (this.autoComplete) {
  67565. var copyChildren = function (node, fn) {
  67566. (0, _newArrowCheck3.default)(this, _this4);
  67567. return (0, _extends4.default)({}, node, {
  67568. children: (node.children || []).map(fn).map(function (child) {
  67569. (0, _newArrowCheck3.default)(this, _this4);
  67570. return copyChildren(child, fn);
  67571. }.bind(this))
  67572. });
  67573. }.bind(this);
  67574. var autoCompleteOptions = extractOptions(slotOptions);
  67575. var selectedSlotOption = autoCompleteOptions[currentIndex];
  67576. return slotOptions.map(function (node) {
  67577. (0, _newArrowCheck3.default)(this, _this4);
  67578. if (node === selectedSlotOption || getNestedProperty(node, 'componentOptions.propsData.value') === this.value) return applyProp(node, 'isFocused', true);
  67579. return copyChildren(node, function (child) {
  67580. (0, _newArrowCheck3.default)(this, _this4);
  67581. if (child !== selectedSlotOption) return child;
  67582. return applyProp(child, 'isFocused', true);
  67583. }.bind(this));
  67584. }.bind(this));
  67585. }
  67586. var _iteratorNormalCompletion = true;
  67587. var _didIteratorError = false;
  67588. var _iteratorError = undefined;
  67589. try {
  67590. for (var _iterator = (0, _getIterator3.default)(slotOptions), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  67591. var option = _step.value;
  67592. var cOptions = option.componentOptions;
  67593. if (!cOptions) continue;
  67594. if (optionGroupRegexp.test(cOptions.tag)) {
  67595. var children = cOptions.children;
  67596. if (this.filterable && this.isTyping) {
  67597. children = children.filter(function (_ref5) {
  67598. var componentOptions = _ref5.componentOptions;
  67599. (0, _newArrowCheck3.default)(this, _this4);
  67600. return this.validateOption(componentOptions);
  67601. }.bind(this));
  67602. }
  67603. children = children.map(function (opt) {
  67604. (0, _newArrowCheck3.default)(this, _this4);
  67605. optionCounter = optionCounter + 1;
  67606. return this.processOption(opt, selectedValues, optionCounter === currentIndex);
  67607. }.bind(this));
  67608. if (children.length > 0) selectOptions.push((0, _extends4.default)({}, option, { componentOptions: (0, _extends4.default)({}, cOptions, { children: children }) }));
  67609. } else {
  67610. if (this.filterQueryChange) {
  67611. var optionPassesFilter = this.filterable ? this.validateOption(cOptions) : option;
  67612. if (!optionPassesFilter) continue;
  67613. }
  67614. optionCounter = optionCounter + 1;
  67615. selectOptions.push(this.processOption(option, selectedValues, optionCounter === currentIndex));
  67616. }
  67617. }
  67618. } catch (err) {
  67619. _didIteratorError = true;
  67620. _iteratorError = err;
  67621. } finally {
  67622. try {
  67623. if (!_iteratorNormalCompletion && _iterator.return) {
  67624. _iterator.return();
  67625. }
  67626. } finally {
  67627. if (_didIteratorError) {
  67628. throw _iteratorError;
  67629. }
  67630. }
  67631. }
  67632. return selectOptions;
  67633. },
  67634. flatOptions: function flatOptions() {
  67635. return extractOptions(this.selectOptions);
  67636. },
  67637. selectTabindex: function selectTabindex() {
  67638. return this.itemDisabled || this.filterable ? -1 : 0;
  67639. },
  67640. remote: function remote() {
  67641. return typeof this.remoteMethod === 'function';
  67642. }
  67643. },
  67644. methods: {
  67645. setQuery: function setQuery(query) {
  67646. if (query) {
  67647. this.onQueryChange(query);
  67648. return;
  67649. }
  67650. if (query === null) {
  67651. this.onQueryChange('');
  67652. this.values = [];
  67653. this.lastRemoteQuery = '';
  67654. }
  67655. },
  67656. clearSingleSelect: function clearSingleSelect() {
  67657. if (!this.multiple) this.$emit('input', '');
  67658. this.$emit('on-clear');
  67659. this.hideMenu();
  67660. if (this.clearable) this.reset();
  67661. },
  67662. getOptionData: function getOptionData(value) {
  67663. var _this5 = this;
  67664. var option = this.flatOptions.find(function (_ref6) {
  67665. var componentOptions = _ref6.componentOptions;
  67666. (0, _newArrowCheck3.default)(this, _this5);
  67667. return componentOptions.propsData.value === value;
  67668. }.bind(this));
  67669. if (!option) return null;
  67670. var label = getOptionLabel(option);
  67671. var disabled = option.componentOptions.propsData.disabled;
  67672. return {
  67673. value: value,
  67674. label: label,
  67675. disabled: disabled
  67676. };
  67677. },
  67678. getInitialValue: function getInitialValue() {
  67679. var _this6 = this;
  67680. var multiple = this.multiple,
  67681. remote = this.remote,
  67682. value = this.value;
  67683. var initialValue = Array.isArray(value) ? value : [value];
  67684. if (!multiple && (typeof initialValue[0] === 'undefined' || String(initialValue[0]).trim() === '' && !(0, _isFinite2.default)(initialValue[0]))) initialValue = [];
  67685. if (remote && !multiple && value) {
  67686. var data = this.getOptionData(value);
  67687. this.query = data ? data.label : String(value);
  67688. }
  67689. return initialValue.filter(function (item) {
  67690. (0, _newArrowCheck3.default)(this, _this6);
  67691. return Boolean(item) || item === 0;
  67692. }.bind(this));
  67693. },
  67694. processOption: function processOption(option, values, isFocused) {
  67695. if (!option.componentOptions) return option;
  67696. var optionValue = option.componentOptions.propsData.value;
  67697. var disabled = option.componentOptions.propsData.disabled;
  67698. var isSelected = values.includes(optionValue);
  67699. var propsData = (0, _extends4.default)({}, option.componentOptions.propsData, {
  67700. selected: isSelected,
  67701. isFocused: isFocused,
  67702. disabled: typeof disabled === 'undefined' ? false : disabled !== false
  67703. });
  67704. return (0, _extends4.default)({}, option, {
  67705. componentOptions: (0, _extends4.default)({}, option.componentOptions, {
  67706. propsData: propsData
  67707. })
  67708. });
  67709. },
  67710. validateOption: function validateOption(_ref7) {
  67711. var _this7 = this;
  67712. var children = _ref7.children,
  67713. elm = _ref7.elm,
  67714. propsData = _ref7.propsData;
  67715. var value = propsData.value;
  67716. var label = propsData.label || '';
  67717. var textContent = elm && elm.textContent || (children || []).reduce(function (str, node) {
  67718. (0, _newArrowCheck3.default)(this, _this7);
  67719. var nodeText = node.elm ? node.elm.textContent : node.text;
  67720. return String(str) + ' ' + String(nodeText);
  67721. }.bind(this), '') || '';
  67722. var stringValues = this.filterByLabel ? [label].toString() : [value, label, textContent].toString();
  67723. var query = this.query.toLowerCase().trim();
  67724. return stringValues.toLowerCase().includes(query);
  67725. },
  67726. toggleMenu: function toggleMenu(e, force) {
  67727. if (this.itemDisabled) {
  67728. return false;
  67729. }
  67730. this.visible = typeof force !== 'undefined' ? force : !this.visible;
  67731. if (this.visible) {
  67732. this.dropDownWidth = this.$el.getBoundingClientRect().width;
  67733. this.broadcast('Drop', 'on-update-popper');
  67734. }
  67735. },
  67736. hideMenu: function hideMenu() {
  67737. var _this8 = this;
  67738. this.toggleMenu(null, false);
  67739. this.isTyping = false;
  67740. setTimeout(function () {
  67741. (0, _newArrowCheck3.default)(this, _this8);
  67742. return this.unchangedQuery = true;
  67743. }.bind(this), ANIMATION_TIMEOUT);
  67744. },
  67745. onClickOutside: function onClickOutside(event) {
  67746. var _this9 = this;
  67747. if (this.visible) {
  67748. if (event.type === 'mousedown') {
  67749. event.preventDefault();
  67750. return;
  67751. }
  67752. if (this.transfer) {
  67753. var $el = this.$refs.dropdown.$el;
  67754. if ($el === event.target || $el.contains(event.target)) {
  67755. return;
  67756. }
  67757. }
  67758. if (this.filterable) {
  67759. var input = this.$el.querySelector('input[type="text"]');
  67760. this.caretPosition = input.selectionStart;
  67761. this.$nextTick(function () {
  67762. (0, _newArrowCheck3.default)(this, _this9);
  67763. var caretPosition = this.caretPosition === -1 ? input.value.length : this.caretPosition;
  67764. input.setSelectionRange(caretPosition, caretPosition);
  67765. }.bind(this));
  67766. }
  67767. if (!this.autoComplete) event.stopPropagation();
  67768. event.preventDefault();
  67769. this.hideMenu();
  67770. this.isFocused = true;
  67771. this.$emit('on-clickoutside', event);
  67772. } else {
  67773. this.caretPosition = -1;
  67774. this.isFocused = false;
  67775. }
  67776. },
  67777. reset: function reset() {
  67778. this.query = '';
  67779. this.focusIndex = -1;
  67780. this.unchangedQuery = true;
  67781. this.values = [];
  67782. this.filterQueryChange = false;
  67783. },
  67784. handleKeydown: function handleKeydown(e) {
  67785. var key = e.key || e.code;
  67786. var keyCode = e.keyCode || e.which;
  67787. if (key === 'Backspace' || keyCode === 8) {
  67788. return;
  67789. }
  67790. if (this.visible) {
  67791. e.preventDefault();
  67792. if (key === 'Tab') {
  67793. e.stopPropagation();
  67794. }
  67795. if (key === 'Escape') {
  67796. e.stopPropagation();
  67797. this.hideMenu();
  67798. }
  67799. if (key === 'ArrowUp') {
  67800. this.navigateOptions(-1);
  67801. }
  67802. if (key === 'ArrowDown') {
  67803. this.navigateOptions(1);
  67804. }
  67805. if (key === 'Enter') {
  67806. if (this.focusIndex === -1) return this.hideMenu();
  67807. var optionComponent = this.flatOptions[this.focusIndex];
  67808. if (optionComponent) {
  67809. var option = this.getOptionData(optionComponent.componentOptions.propsData.value);
  67810. this.onOptionClick(option);
  67811. } else {
  67812. this.hideMenu();
  67813. }
  67814. }
  67815. } else {
  67816. var keysThatCanOpenSelect = ['ArrowUp', 'ArrowDown'];
  67817. if (keysThatCanOpenSelect.includes(e.key)) this.toggleMenu(null, true);
  67818. }
  67819. },
  67820. navigateOptions: function navigateOptions(direction) {
  67821. var optionsLength = this.flatOptions.length - 1;
  67822. if (optionsLength < 0) return;
  67823. var index = this.focusIndex + direction;
  67824. if (index < 0) index = optionsLength;
  67825. if (index > optionsLength) index = 0;
  67826. if (direction > 0) {
  67827. var nearestActiveOption = -1;
  67828. for (var i = 0; i < this.flatOptions.length; i++) {
  67829. var optionIsActive = !this.flatOptions[i].componentOptions.propsData.disabled;
  67830. if (optionIsActive) nearestActiveOption = i;
  67831. if (nearestActiveOption >= index) break;
  67832. }
  67833. index = nearestActiveOption;
  67834. } else {
  67835. var _nearestActiveOption = this.flatOptions.length;
  67836. for (var _i = optionsLength; _i >= 0; _i--) {
  67837. var _optionIsActive = !this.flatOptions[_i].componentOptions.propsData.disabled;
  67838. if (_optionIsActive) _nearestActiveOption = _i;
  67839. if (_nearestActiveOption <= index) break;
  67840. }
  67841. index = _nearestActiveOption;
  67842. }
  67843. this.focusIndex = index;
  67844. },
  67845. onOptionClick: function onOptionClick(option) {
  67846. var _this10 = this;
  67847. if (this.multiple) {
  67848. if (this.remote) this.lastRemoteQuery = this.lastRemoteQuery || this.query;else this.lastRemoteQuery = '';
  67849. var valueIsSelected = this.values.find(function (_ref8) {
  67850. var value = _ref8.value;
  67851. (0, _newArrowCheck3.default)(this, _this10);
  67852. return value === option.value;
  67853. }.bind(this));
  67854. if (valueIsSelected) {
  67855. this.values = this.values.filter(function (_ref9) {
  67856. var value = _ref9.value;
  67857. (0, _newArrowCheck3.default)(this, _this10);
  67858. return value !== option.value;
  67859. }.bind(this));
  67860. } else {
  67861. this.values = this.values.concat(option);
  67862. }
  67863. this.isFocused = true;
  67864. } else {
  67865. this.query = String(option.label).trim();
  67866. this.values = [option];
  67867. this.lastRemoteQuery = '';
  67868. this.hideMenu();
  67869. }
  67870. this.focusIndex = this.flatOptions.findIndex(function (opt) {
  67871. (0, _newArrowCheck3.default)(this, _this10);
  67872. if (!opt || !opt.componentOptions) return false;
  67873. return opt.componentOptions.propsData.value === option.value;
  67874. }.bind(this));
  67875. if (this.filterable) {
  67876. var inputField = this.$el.querySelector('input[type="text"]');
  67877. if (!this.autoComplete) this.$nextTick(function () {
  67878. (0, _newArrowCheck3.default)(this, _this10);
  67879. return inputField.focus();
  67880. }.bind(this));
  67881. }
  67882. this.$emit('on-select', option);
  67883. this.broadcast('Drop', 'on-update-popper');
  67884. setTimeout(function () {
  67885. (0, _newArrowCheck3.default)(this, _this10);
  67886. this.filterQueryChange = false;
  67887. }.bind(this), ANIMATION_TIMEOUT);
  67888. },
  67889. onQueryChange: function onQueryChange(query) {
  67890. this.isTyping = true;
  67891. if (query.length > 0 && query !== this.query) {
  67892. if (this.autoComplete) {
  67893. var isInputFocused = document.hasFocus && document.hasFocus() && document.activeElement === this.$el.querySelector('input');
  67894. this.visible = isInputFocused;
  67895. } else {
  67896. this.visible = true;
  67897. }
  67898. }
  67899. this.query = query;
  67900. this.unchangedQuery = this.visible;
  67901. this.filterQueryChange = true;
  67902. },
  67903. toggleHeaderFocus: function toggleHeaderFocus(_ref10) {
  67904. var type = _ref10.type;
  67905. if (this.itemDisabled) {
  67906. return;
  67907. }
  67908. this.isFocused = type === 'focus';
  67909. },
  67910. updateSlotOptions: function updateSlotOptions() {
  67911. this.slotOptions = this.$slots.default;
  67912. },
  67913. checkUpdateStatus: function checkUpdateStatus() {
  67914. if (this.getInitialValue().length > 0 && this.selectOptions.length === 0) {
  67915. this.hasExpectedValue = true;
  67916. }
  67917. },
  67918. handleCreateItem: function handleCreateItem() {
  67919. var _this11 = this;
  67920. if (this.allowCreate && this.query !== '' && this.showCreateItem) {
  67921. var query = this.query;
  67922. this.$emit('on-create', query);
  67923. this.query = '';
  67924. var option = {
  67925. value: query,
  67926. label: query,
  67927. tag: undefined
  67928. };
  67929. this.$nextTick(function () {
  67930. (0, _newArrowCheck3.default)(this, _this11);
  67931. return this.onOptionClick(option);
  67932. }.bind(this));
  67933. }
  67934. }
  67935. },
  67936. watch: {
  67937. value: function value(_value) {
  67938. var _this12 = this;
  67939. var getInitialValue = this.getInitialValue,
  67940. getOptionData = this.getOptionData,
  67941. publicValue = this.publicValue,
  67942. values = this.values;
  67943. this.checkUpdateStatus();
  67944. if (_value === '') this.values = [];else if (checkValuesNotEqual(_value, publicValue, values)) {
  67945. this.$nextTick(function () {
  67946. (0, _newArrowCheck3.default)(this, _this12);
  67947. return this.values = getInitialValue().map(getOptionData).filter(Boolean);
  67948. }.bind(this));
  67949. if (!this.multiple) this.dispatch('FormItem', 'on-form-change', this.publicValue);
  67950. }
  67951. },
  67952. values: function values(now, before) {
  67953. var newValue = (0, _stringify2.default)(now);
  67954. var oldValue = (0, _stringify2.default)(before);
  67955. var vModelValue = this.publicValue;
  67956. var shouldEmitInput = newValue !== oldValue && vModelValue !== this.value;
  67957. if (shouldEmitInput) {
  67958. var emitValue = this.publicValue;
  67959. if (this.labelInValue) {
  67960. if (this.multiple) {
  67961. emitValue = this.values;
  67962. } else {
  67963. emitValue = this.values[0];
  67964. }
  67965. }
  67966. if (Array.isArray(vModelValue) && !vModelValue.length && this.value === null) vModelValue = null;else if (vModelValue === undefined && this.value === null) vModelValue = null;
  67967. this.$emit('input', vModelValue);
  67968. this.$emit('on-change', emitValue);
  67969. this.dispatch('FormItem', 'on-form-change', emitValue);
  67970. }
  67971. },
  67972. query: function query(_query) {
  67973. var _this13 = this;
  67974. this.$emit('on-query-change', _query);
  67975. var remoteMethod = this.remoteMethod,
  67976. lastRemoteQuery = this.lastRemoteQuery;
  67977. var hasValidQuery = _query !== '' && (_query !== lastRemoteQuery || !lastRemoteQuery);
  67978. var shouldCallRemoteMethod = remoteMethod && hasValidQuery && !this.preventRemoteCall;
  67979. this.preventRemoteCall = false;
  67980. if (shouldCallRemoteMethod) {
  67981. this.focusIndex = -1;
  67982. var promise = this.remoteMethod(_query);
  67983. this.initialLabel = '';
  67984. if (promise && promise.then) {
  67985. promise.then(function (options) {
  67986. (0, _newArrowCheck3.default)(this, _this13);
  67987. if (options) this.options = options;
  67988. }.bind(this));
  67989. }
  67990. }
  67991. if (_query !== '' && this.remote) this.lastRemoteQuery = _query;
  67992. },
  67993. loading: function loading(state) {
  67994. if (state === false) {
  67995. this.updateSlotOptions();
  67996. }
  67997. },
  67998. isFocused: function isFocused(focused) {
  67999. var el = this.filterable ? this.$el.querySelector('input[type="text"]') : this.$el;
  68000. el[this.isFocused ? 'focus' : 'blur']();
  68001. var _values = (0, _slicedToArray3.default)(this.values, 1),
  68002. selectedOption = _values[0];
  68003. if (selectedOption && this.filterable && !this.multiple && !focused) {
  68004. var selectedLabel = String(selectedOption.label || selectedOption.value).trim();
  68005. if (selectedLabel && this.query !== selectedLabel) {
  68006. this.preventRemoteCall = true;
  68007. this.query = selectedLabel;
  68008. }
  68009. }
  68010. },
  68011. focusIndex: function focusIndex(index) {
  68012. var _this14 = this;
  68013. if (index < 0 || this.autoComplete) return;
  68014. var optionValue = this.flatOptions[index].componentOptions.propsData.value;
  68015. var optionInstance = findChild(this, function (_ref11) {
  68016. var $options = _ref11.$options;
  68017. (0, _newArrowCheck3.default)(this, _this14);
  68018. return $options.componentName === 'select-item' && $options.propsData.value === optionValue;
  68019. }.bind(this));
  68020. var bottomOverflowDistance = optionInstance.$el.getBoundingClientRect().bottom - this.$refs.dropdown.$el.getBoundingClientRect().bottom;
  68021. var topOverflowDistance = optionInstance.$el.getBoundingClientRect().top - this.$refs.dropdown.$el.getBoundingClientRect().top;
  68022. if (bottomOverflowDistance > 0) {
  68023. this.$refs.dropdown.$el.scrollTop += bottomOverflowDistance;
  68024. }
  68025. if (topOverflowDistance < 0) {
  68026. this.$refs.dropdown.$el.scrollTop += topOverflowDistance;
  68027. }
  68028. },
  68029. dropVisible: function dropVisible(open) {
  68030. this.broadcast('Drop', open ? 'on-update-popper' : 'on-destroy-popper');
  68031. },
  68032. selectOptions: function selectOptions() {
  68033. if (this.hasExpectedValue && this.selectOptions.length > 0) {
  68034. if (this.values.length === 0) {
  68035. this.values = this.getInitialValue();
  68036. }
  68037. this.values = this.values.map(this.getOptionData).filter(Boolean);
  68038. this.hasExpectedValue = false;
  68039. }
  68040. if (this.slotOptions && this.slotOptions.length === 0) {
  68041. this.query = '';
  68042. }
  68043. this.broadcast('Drop', 'on-update-popper');
  68044. },
  68045. visible: function visible(state) {
  68046. this.$emit('on-open-change', state);
  68047. },
  68048. slotOptions: function slotOptions(options, old) {
  68049. if (!this.remote) {
  68050. var values = this.getInitialValue();
  68051. if (this.flatOptions && this.flatOptions.length && values.length && !this.multiple) {
  68052. this.values = values.map(this.getOptionData).filter(Boolean);
  68053. }
  68054. }
  68055. if (options && old && options.length !== old.length) {
  68056. this.broadcast('Drop', 'on-update-popper');
  68057. }
  68058. }
  68059. }
  68060. };
  68061. /***/ }),
  68062. /* 111 */
  68063. /***/ (function(module, exports, __webpack_require__) {
  68064. module.exports = { "default": __webpack_require__(297), __esModule: true };
  68065. /***/ }),
  68066. /* 112 */
  68067. /***/ (function(module, exports, __webpack_require__) {
  68068. // call something on iterator step with safe closing on error
  68069. var anObject = __webpack_require__(22);
  68070. module.exports = function (iterator, fn, value, entries) {
  68071. try {
  68072. return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  68073. // 7.4.6 IteratorClose(iterator, completion)
  68074. } catch (e) {
  68075. var ret = iterator['return'];
  68076. if (ret !== undefined) anObject(ret.call(iterator));
  68077. throw e;
  68078. }
  68079. };
  68080. /***/ }),
  68081. /* 113 */
  68082. /***/ (function(module, exports, __webpack_require__) {
  68083. // check on default Array iterator
  68084. var Iterators = __webpack_require__(34);
  68085. var ITERATOR = __webpack_require__(10)('iterator');
  68086. var ArrayProto = Array.prototype;
  68087. module.exports = function (it) {
  68088. return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
  68089. };
  68090. /***/ }),
  68091. /* 114 */
  68092. /***/ (function(module, exports, __webpack_require__) {
  68093. var ITERATOR = __webpack_require__(10)('iterator');
  68094. var SAFE_CLOSING = false;
  68095. try {
  68096. var riter = [7][ITERATOR]();
  68097. riter['return'] = function () { SAFE_CLOSING = true; };
  68098. // eslint-disable-next-line no-throw-literal
  68099. Array.from(riter, function () { throw 2; });
  68100. } catch (e) { /* empty */ }
  68101. module.exports = function (exec, skipClosing) {
  68102. if (!skipClosing && !SAFE_CLOSING) return false;
  68103. var safe = false;
  68104. try {
  68105. var arr = [7];
  68106. var iter = arr[ITERATOR]();
  68107. iter.next = function () { return { done: safe = true }; };
  68108. arr[ITERATOR] = function () { return iter; };
  68109. exec(arr);
  68110. } catch (e) { /* empty */ }
  68111. return safe;
  68112. };
  68113. /***/ }),
  68114. /* 115 */
  68115. /***/ (function(module, exports, __webpack_require__) {
  68116. "use strict";
  68117. Object.defineProperty(exports, "__esModule", {
  68118. value: true
  68119. });
  68120. var _newArrowCheck2 = __webpack_require__(1);
  68121. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  68122. var _vue = __webpack_require__(16);
  68123. var _vue2 = _interopRequireDefault(_vue);
  68124. var _assist = __webpack_require__(3);
  68125. var _transferQueue = __webpack_require__(37);
  68126. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  68127. var isServer = _vue2.default.prototype.$isServer;
  68128. var Popper = isServer ? function () {} : __webpack_require__(116);exports.default = {
  68129. name: 'Drop',
  68130. props: {
  68131. placement: {
  68132. type: String,
  68133. default: 'bottom-start'
  68134. },
  68135. className: {
  68136. type: String
  68137. },
  68138. transfer: {
  68139. type: Boolean
  68140. },
  68141. eventsEnabled: {
  68142. type: Boolean,
  68143. default: false
  68144. }
  68145. },
  68146. data: function data() {
  68147. return {
  68148. popper: null,
  68149. width: '',
  68150. popperStatus: false,
  68151. tIndex: this.handleGetIndex()
  68152. };
  68153. },
  68154. computed: {
  68155. styles: function styles() {
  68156. var style = {};
  68157. if (this.width) style.minWidth = String(this.width) + 'px';
  68158. if (this.transfer) style['z-index'] = 1060 + this.tIndex;
  68159. return style;
  68160. }
  68161. },
  68162. methods: {
  68163. update: function update() {
  68164. var _this = this;
  68165. if (isServer) return;
  68166. this.$nextTick(function () {
  68167. (0, _newArrowCheck3.default)(this, _this);
  68168. if (this.popper) {
  68169. this.popper.update();
  68170. this.popperStatus = true;
  68171. } else {
  68172. this.popper = new Popper(this.$parent.$refs.reference, this.$el, {
  68173. eventsEnabled: this.eventsEnabled,
  68174. placement: this.placement,
  68175. modifiers: {
  68176. computeStyle: {
  68177. gpuAcceleration: false
  68178. },
  68179. preventOverflow: {
  68180. boundariesElement: 'window'
  68181. }
  68182. },
  68183. onCreate: function onCreate() {
  68184. (0, _newArrowCheck3.default)(this, _this);
  68185. this.resetTransformOrigin();
  68186. this.$nextTick(this.popper.update());
  68187. }.bind(this),
  68188. onUpdate: function onUpdate() {
  68189. (0, _newArrowCheck3.default)(this, _this);
  68190. this.resetTransformOrigin();
  68191. }.bind(this)
  68192. });
  68193. }
  68194. if (this.$parent.$options.name === 'iSelect') {
  68195. this.width = parseInt((0, _assist.getStyle)(this.$parent.$el, 'width'));
  68196. }
  68197. this.tIndex = this.handleGetIndex();
  68198. }.bind(this));
  68199. },
  68200. destroy: function destroy() {
  68201. var _this2 = this;
  68202. if (this.popper) {
  68203. setTimeout(function () {
  68204. (0, _newArrowCheck3.default)(this, _this2);
  68205. if (this.popper && !this.popperStatus) {
  68206. this.popper.popper.style.display = 'none';
  68207. this.popper.destroy();
  68208. this.popper = null;
  68209. }
  68210. this.popperStatus = false;
  68211. }.bind(this), 300);
  68212. }
  68213. },
  68214. resetTransformOrigin: function resetTransformOrigin() {
  68215. if (!this.popper) return;
  68216. var x_placement = this.popper.popper.getAttribute('x-placement');
  68217. var placementStart = x_placement.split('-')[0];
  68218. var placementEnd = x_placement.split('-')[1];
  68219. var leftOrRight = x_placement === 'left' || x_placement === 'right';
  68220. if (!leftOrRight) {
  68221. this.popper.popper.style.transformOrigin = placementStart === 'bottom' || placementStart !== 'top' && placementEnd === 'start' ? 'center top' : 'center bottom';
  68222. }
  68223. },
  68224. handleGetIndex: function handleGetIndex() {
  68225. (0, _transferQueue.transferIncrease)();
  68226. return _transferQueue.transferIndex;
  68227. }
  68228. },
  68229. created: function created() {
  68230. this.$on('on-update-popper', this.update);
  68231. this.$on('on-destroy-popper', this.destroy);
  68232. },
  68233. beforeDestroy: function beforeDestroy() {
  68234. this.$off('on-update-popper', this.update);
  68235. this.$off('on-destroy-popper', this.destroy);
  68236. if (this.popper) {
  68237. this.popper.destroy();
  68238. this.popper = null;
  68239. }
  68240. }
  68241. };
  68242. /***/ }),
  68243. /* 116 */
  68244. /***/ (function(module, exports, __webpack_require__) {
  68245. /* WEBPACK VAR INJECTION */(function(global) {/**!
  68246. * @fileOverview Kickass library to create and place poppers near their reference elements.
  68247. * @version 1.15.0
  68248. * @license
  68249. * Copyright (c) 2016 Federico Zivolo and contributors
  68250. *
  68251. * Permission is hereby granted, free of charge, to any person obtaining a copy
  68252. * of this software and associated documentation files (the "Software"), to deal
  68253. * in the Software without restriction, including without limitation the rights
  68254. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  68255. * copies of the Software, and to permit persons to whom the Software is
  68256. * furnished to do so, subject to the following conditions:
  68257. *
  68258. * The above copyright notice and this permission notice shall be included in all
  68259. * copies or substantial portions of the Software.
  68260. *
  68261. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  68262. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  68263. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  68264. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  68265. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  68266. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  68267. * SOFTWARE.
  68268. */
  68269. (function (global, factory) {
  68270. true ? module.exports = factory() :
  68271. typeof define === 'function' && define.amd ? define(factory) :
  68272. (global.Popper = factory());
  68273. }(this, (function () { 'use strict';
  68274. var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
  68275. var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
  68276. var timeoutDuration = 0;
  68277. for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
  68278. if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
  68279. timeoutDuration = 1;
  68280. break;
  68281. }
  68282. }
  68283. function microtaskDebounce(fn) {
  68284. var called = false;
  68285. return function () {
  68286. if (called) {
  68287. return;
  68288. }
  68289. called = true;
  68290. window.Promise.resolve().then(function () {
  68291. called = false;
  68292. fn();
  68293. });
  68294. };
  68295. }
  68296. function taskDebounce(fn) {
  68297. var scheduled = false;
  68298. return function () {
  68299. if (!scheduled) {
  68300. scheduled = true;
  68301. setTimeout(function () {
  68302. scheduled = false;
  68303. fn();
  68304. }, timeoutDuration);
  68305. }
  68306. };
  68307. }
  68308. var supportsMicroTasks = isBrowser && window.Promise;
  68309. /**
  68310. * Create a debounced version of a method, that's asynchronously deferred
  68311. * but called in the minimum time possible.
  68312. *
  68313. * @method
  68314. * @memberof Popper.Utils
  68315. * @argument {Function} fn
  68316. * @returns {Function}
  68317. */
  68318. var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
  68319. /**
  68320. * Check if the given variable is a function
  68321. * @method
  68322. * @memberof Popper.Utils
  68323. * @argument {Any} functionToCheck - variable to check
  68324. * @returns {Boolean} answer to: is a function?
  68325. */
  68326. function isFunction(functionToCheck) {
  68327. var getType = {};
  68328. return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
  68329. }
  68330. /**
  68331. * Get CSS computed property of the given element
  68332. * @method
  68333. * @memberof Popper.Utils
  68334. * @argument {Eement} element
  68335. * @argument {String} property
  68336. */
  68337. function getStyleComputedProperty(element, property) {
  68338. if (element.nodeType !== 1) {
  68339. return [];
  68340. }
  68341. // NOTE: 1 DOM access here
  68342. var window = element.ownerDocument.defaultView;
  68343. var css = window.getComputedStyle(element, null);
  68344. return property ? css[property] : css;
  68345. }
  68346. /**
  68347. * Returns the parentNode or the host of the element
  68348. * @method
  68349. * @memberof Popper.Utils
  68350. * @argument {Element} element
  68351. * @returns {Element} parent
  68352. */
  68353. function getParentNode(element) {
  68354. if (element.nodeName === 'HTML') {
  68355. return element;
  68356. }
  68357. return element.parentNode || element.host;
  68358. }
  68359. /**
  68360. * Returns the scrolling parent of the given element
  68361. * @method
  68362. * @memberof Popper.Utils
  68363. * @argument {Element} element
  68364. * @returns {Element} scroll parent
  68365. */
  68366. function getScrollParent(element) {
  68367. // Return body, `getScroll` will take care to get the correct `scrollTop` from it
  68368. if (!element) {
  68369. return document.body;
  68370. }
  68371. switch (element.nodeName) {
  68372. case 'HTML':
  68373. case 'BODY':
  68374. return element.ownerDocument.body;
  68375. case '#document':
  68376. return element.body;
  68377. }
  68378. // Firefox want us to check `-x` and `-y` variations as well
  68379. var _getStyleComputedProp = getStyleComputedProperty(element),
  68380. overflow = _getStyleComputedProp.overflow,
  68381. overflowX = _getStyleComputedProp.overflowX,
  68382. overflowY = _getStyleComputedProp.overflowY;
  68383. if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
  68384. return element;
  68385. }
  68386. return getScrollParent(getParentNode(element));
  68387. }
  68388. var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
  68389. var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
  68390. /**
  68391. * Determines if the browser is Internet Explorer
  68392. * @method
  68393. * @memberof Popper.Utils
  68394. * @param {Number} version to check
  68395. * @returns {Boolean} isIE
  68396. */
  68397. function isIE(version) {
  68398. if (version === 11) {
  68399. return isIE11;
  68400. }
  68401. if (version === 10) {
  68402. return isIE10;
  68403. }
  68404. return isIE11 || isIE10;
  68405. }
  68406. /**
  68407. * Returns the offset parent of the given element
  68408. * @method
  68409. * @memberof Popper.Utils
  68410. * @argument {Element} element
  68411. * @returns {Element} offset parent
  68412. */
  68413. function getOffsetParent(element) {
  68414. if (!element) {
  68415. return document.documentElement;
  68416. }
  68417. var noOffsetParent = isIE(10) ? document.body : null;
  68418. // NOTE: 1 DOM access here
  68419. var offsetParent = element.offsetParent || null;
  68420. // Skip hidden elements which don't have an offsetParent
  68421. while (offsetParent === noOffsetParent && element.nextElementSibling) {
  68422. offsetParent = (element = element.nextElementSibling).offsetParent;
  68423. }
  68424. var nodeName = offsetParent && offsetParent.nodeName;
  68425. if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
  68426. return element ? element.ownerDocument.documentElement : document.documentElement;
  68427. }
  68428. // .offsetParent will return the closest TH, TD or TABLE in case
  68429. // no offsetParent is present, I hate this job...
  68430. if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
  68431. return getOffsetParent(offsetParent);
  68432. }
  68433. return offsetParent;
  68434. }
  68435. function isOffsetContainer(element) {
  68436. var nodeName = element.nodeName;
  68437. if (nodeName === 'BODY') {
  68438. return false;
  68439. }
  68440. return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
  68441. }
  68442. /**
  68443. * Finds the root node (document, shadowDOM root) of the given element
  68444. * @method
  68445. * @memberof Popper.Utils
  68446. * @argument {Element} node
  68447. * @returns {Element} root node
  68448. */
  68449. function getRoot(node) {
  68450. if (node.parentNode !== null) {
  68451. return getRoot(node.parentNode);
  68452. }
  68453. return node;
  68454. }
  68455. /**
  68456. * Finds the offset parent common to the two provided nodes
  68457. * @method
  68458. * @memberof Popper.Utils
  68459. * @argument {Element} element1
  68460. * @argument {Element} element2
  68461. * @returns {Element} common offset parent
  68462. */
  68463. function findCommonOffsetParent(element1, element2) {
  68464. // This check is needed to avoid errors in case one of the elements isn't defined for any reason
  68465. if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
  68466. return document.documentElement;
  68467. }
  68468. // Here we make sure to give as "start" the element that comes first in the DOM
  68469. var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
  68470. var start = order ? element1 : element2;
  68471. var end = order ? element2 : element1;
  68472. // Get common ancestor container
  68473. var range = document.createRange();
  68474. range.setStart(start, 0);
  68475. range.setEnd(end, 0);
  68476. var commonAncestorContainer = range.commonAncestorContainer;
  68477. // Both nodes are inside #document
  68478. if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
  68479. if (isOffsetContainer(commonAncestorContainer)) {
  68480. return commonAncestorContainer;
  68481. }
  68482. return getOffsetParent(commonAncestorContainer);
  68483. }
  68484. // one of the nodes is inside shadowDOM, find which one
  68485. var element1root = getRoot(element1);
  68486. if (element1root.host) {
  68487. return findCommonOffsetParent(element1root.host, element2);
  68488. } else {
  68489. return findCommonOffsetParent(element1, getRoot(element2).host);
  68490. }
  68491. }
  68492. /**
  68493. * Gets the scroll value of the given element in the given side (top and left)
  68494. * @method
  68495. * @memberof Popper.Utils
  68496. * @argument {Element} element
  68497. * @argument {String} side `top` or `left`
  68498. * @returns {number} amount of scrolled pixels
  68499. */
  68500. function getScroll(element) {
  68501. var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
  68502. var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
  68503. var nodeName = element.nodeName;
  68504. if (nodeName === 'BODY' || nodeName === 'HTML') {
  68505. var html = element.ownerDocument.documentElement;
  68506. var scrollingElement = element.ownerDocument.scrollingElement || html;
  68507. return scrollingElement[upperSide];
  68508. }
  68509. return element[upperSide];
  68510. }
  68511. /*
  68512. * Sum or subtract the element scroll values (left and top) from a given rect object
  68513. * @method
  68514. * @memberof Popper.Utils
  68515. * @param {Object} rect - Rect object you want to change
  68516. * @param {HTMLElement} element - The element from the function reads the scroll values
  68517. * @param {Boolean} subtract - set to true if you want to subtract the scroll values
  68518. * @return {Object} rect - The modifier rect object
  68519. */
  68520. function includeScroll(rect, element) {
  68521. var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  68522. var scrollTop = getScroll(element, 'top');
  68523. var scrollLeft = getScroll(element, 'left');
  68524. var modifier = subtract ? -1 : 1;
  68525. rect.top += scrollTop * modifier;
  68526. rect.bottom += scrollTop * modifier;
  68527. rect.left += scrollLeft * modifier;
  68528. rect.right += scrollLeft * modifier;
  68529. return rect;
  68530. }
  68531. /*
  68532. * Helper to detect borders of a given element
  68533. * @method
  68534. * @memberof Popper.Utils
  68535. * @param {CSSStyleDeclaration} styles
  68536. * Result of `getStyleComputedProperty` on the given element
  68537. * @param {String} axis - `x` or `y`
  68538. * @return {number} borders - The borders size of the given axis
  68539. */
  68540. function getBordersSize(styles, axis) {
  68541. var sideA = axis === 'x' ? 'Left' : 'Top';
  68542. var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
  68543. return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
  68544. }
  68545. function getSize(axis, body, html, computedStyle) {
  68546. return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
  68547. }
  68548. function getWindowSizes(document) {
  68549. var body = document.body;
  68550. var html = document.documentElement;
  68551. var computedStyle = isIE(10) && getComputedStyle(html);
  68552. return {
  68553. height: getSize('Height', body, html, computedStyle),
  68554. width: getSize('Width', body, html, computedStyle)
  68555. };
  68556. }
  68557. var classCallCheck = function (instance, Constructor) {
  68558. if (!(instance instanceof Constructor)) {
  68559. throw new TypeError("Cannot call a class as a function");
  68560. }
  68561. };
  68562. var createClass = function () {
  68563. function defineProperties(target, props) {
  68564. for (var i = 0; i < props.length; i++) {
  68565. var descriptor = props[i];
  68566. descriptor.enumerable = descriptor.enumerable || false;
  68567. descriptor.configurable = true;
  68568. if ("value" in descriptor) descriptor.writable = true;
  68569. Object.defineProperty(target, descriptor.key, descriptor);
  68570. }
  68571. }
  68572. return function (Constructor, protoProps, staticProps) {
  68573. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  68574. if (staticProps) defineProperties(Constructor, staticProps);
  68575. return Constructor;
  68576. };
  68577. }();
  68578. var defineProperty = function (obj, key, value) {
  68579. if (key in obj) {
  68580. Object.defineProperty(obj, key, {
  68581. value: value,
  68582. enumerable: true,
  68583. configurable: true,
  68584. writable: true
  68585. });
  68586. } else {
  68587. obj[key] = value;
  68588. }
  68589. return obj;
  68590. };
  68591. var _extends = Object.assign || function (target) {
  68592. for (var i = 1; i < arguments.length; i++) {
  68593. var source = arguments[i];
  68594. for (var key in source) {
  68595. if (Object.prototype.hasOwnProperty.call(source, key)) {
  68596. target[key] = source[key];
  68597. }
  68598. }
  68599. }
  68600. return target;
  68601. };
  68602. /**
  68603. * Given element offsets, generate an output similar to getBoundingClientRect
  68604. * @method
  68605. * @memberof Popper.Utils
  68606. * @argument {Object} offsets
  68607. * @returns {Object} ClientRect like output
  68608. */
  68609. function getClientRect(offsets) {
  68610. return _extends({}, offsets, {
  68611. right: offsets.left + offsets.width,
  68612. bottom: offsets.top + offsets.height
  68613. });
  68614. }
  68615. /**
  68616. * Get bounding client rect of given element
  68617. * @method
  68618. * @memberof Popper.Utils
  68619. * @param {HTMLElement} element
  68620. * @return {Object} client rect
  68621. */
  68622. function getBoundingClientRect(element) {
  68623. var rect = {};
  68624. // IE10 10 FIX: Please, don't ask, the element isn't
  68625. // considered in DOM in some circumstances...
  68626. // This isn't reproducible in IE10 compatibility mode of IE11
  68627. try {
  68628. if (isIE(10)) {
  68629. rect = element.getBoundingClientRect();
  68630. var scrollTop = getScroll(element, 'top');
  68631. var scrollLeft = getScroll(element, 'left');
  68632. rect.top += scrollTop;
  68633. rect.left += scrollLeft;
  68634. rect.bottom += scrollTop;
  68635. rect.right += scrollLeft;
  68636. } else {
  68637. rect = element.getBoundingClientRect();
  68638. }
  68639. } catch (e) {}
  68640. var result = {
  68641. left: rect.left,
  68642. top: rect.top,
  68643. width: rect.right - rect.left,
  68644. height: rect.bottom - rect.top
  68645. };
  68646. // subtract scrollbar size from sizes
  68647. var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
  68648. var width = sizes.width || element.clientWidth || result.right - result.left;
  68649. var height = sizes.height || element.clientHeight || result.bottom - result.top;
  68650. var horizScrollbar = element.offsetWidth - width;
  68651. var vertScrollbar = element.offsetHeight - height;
  68652. // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
  68653. // we make this check conditional for performance reasons
  68654. if (horizScrollbar || vertScrollbar) {
  68655. var styles = getStyleComputedProperty(element);
  68656. horizScrollbar -= getBordersSize(styles, 'x');
  68657. vertScrollbar -= getBordersSize(styles, 'y');
  68658. result.width -= horizScrollbar;
  68659. result.height -= vertScrollbar;
  68660. }
  68661. return getClientRect(result);
  68662. }
  68663. function getOffsetRectRelativeToArbitraryNode(children, parent) {
  68664. var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  68665. var isIE10 = isIE(10);
  68666. var isHTML = parent.nodeName === 'HTML';
  68667. var childrenRect = getBoundingClientRect(children);
  68668. var parentRect = getBoundingClientRect(parent);
  68669. var scrollParent = getScrollParent(children);
  68670. var styles = getStyleComputedProperty(parent);
  68671. var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
  68672. var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);
  68673. // In cases where the parent is fixed, we must ignore negative scroll in offset calc
  68674. if (fixedPosition && isHTML) {
  68675. parentRect.top = Math.max(parentRect.top, 0);
  68676. parentRect.left = Math.max(parentRect.left, 0);
  68677. }
  68678. var offsets = getClientRect({
  68679. top: childrenRect.top - parentRect.top - borderTopWidth,
  68680. left: childrenRect.left - parentRect.left - borderLeftWidth,
  68681. width: childrenRect.width,
  68682. height: childrenRect.height
  68683. });
  68684. offsets.marginTop = 0;
  68685. offsets.marginLeft = 0;
  68686. // Subtract margins of documentElement in case it's being used as parent
  68687. // we do this only on HTML because it's the only element that behaves
  68688. // differently when margins are applied to it. The margins are included in
  68689. // the box of the documentElement, in the other cases not.
  68690. if (!isIE10 && isHTML) {
  68691. var marginTop = parseFloat(styles.marginTop, 10);
  68692. var marginLeft = parseFloat(styles.marginLeft, 10);
  68693. offsets.top -= borderTopWidth - marginTop;
  68694. offsets.bottom -= borderTopWidth - marginTop;
  68695. offsets.left -= borderLeftWidth - marginLeft;
  68696. offsets.right -= borderLeftWidth - marginLeft;
  68697. // Attach marginTop and marginLeft because in some circumstances we may need them
  68698. offsets.marginTop = marginTop;
  68699. offsets.marginLeft = marginLeft;
  68700. }
  68701. if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
  68702. offsets = includeScroll(offsets, parent);
  68703. }
  68704. return offsets;
  68705. }
  68706. function getViewportOffsetRectRelativeToArtbitraryNode(element) {
  68707. var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  68708. var html = element.ownerDocument.documentElement;
  68709. var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
  68710. var width = Math.max(html.clientWidth, window.innerWidth || 0);
  68711. var height = Math.max(html.clientHeight, window.innerHeight || 0);
  68712. var scrollTop = !excludeScroll ? getScroll(html) : 0;
  68713. var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
  68714. var offset = {
  68715. top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
  68716. left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
  68717. width: width,
  68718. height: height
  68719. };
  68720. return getClientRect(offset);
  68721. }
  68722. /**
  68723. * Check if the given element is fixed or is inside a fixed parent
  68724. * @method
  68725. * @memberof Popper.Utils
  68726. * @argument {Element} element
  68727. * @argument {Element} customContainer
  68728. * @returns {Boolean} answer to "isFixed?"
  68729. */
  68730. function isFixed(element) {
  68731. var nodeName = element.nodeName;
  68732. if (nodeName === 'BODY' || nodeName === 'HTML') {
  68733. return false;
  68734. }
  68735. if (getStyleComputedProperty(element, 'position') === 'fixed') {
  68736. return true;
  68737. }
  68738. var parentNode = getParentNode(element);
  68739. if (!parentNode) {
  68740. return false;
  68741. }
  68742. return isFixed(parentNode);
  68743. }
  68744. /**
  68745. * Finds the first parent of an element that has a transformed property defined
  68746. * @method
  68747. * @memberof Popper.Utils
  68748. * @argument {Element} element
  68749. * @returns {Element} first transformed parent or documentElement
  68750. */
  68751. function getFixedPositionOffsetParent(element) {
  68752. // This check is needed to avoid errors in case one of the elements isn't defined for any reason
  68753. if (!element || !element.parentElement || isIE()) {
  68754. return document.documentElement;
  68755. }
  68756. var el = element.parentElement;
  68757. while (el && getStyleComputedProperty(el, 'transform') === 'none') {
  68758. el = el.parentElement;
  68759. }
  68760. return el || document.documentElement;
  68761. }
  68762. /**
  68763. * Computed the boundaries limits and return them
  68764. * @method
  68765. * @memberof Popper.Utils
  68766. * @param {HTMLElement} popper
  68767. * @param {HTMLElement} reference
  68768. * @param {number} padding
  68769. * @param {HTMLElement} boundariesElement - Element used to define the boundaries
  68770. * @param {Boolean} fixedPosition - Is in fixed position mode
  68771. * @returns {Object} Coordinates of the boundaries
  68772. */
  68773. function getBoundaries(popper, reference, padding, boundariesElement) {
  68774. var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  68775. // NOTE: 1 DOM access here
  68776. var boundaries = { top: 0, left: 0 };
  68777. var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
  68778. // Handle viewport case
  68779. if (boundariesElement === 'viewport') {
  68780. boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
  68781. } else {
  68782. // Handle other cases based on DOM element used as boundaries
  68783. var boundariesNode = void 0;
  68784. if (boundariesElement === 'scrollParent') {
  68785. boundariesNode = getScrollParent(getParentNode(reference));
  68786. if (boundariesNode.nodeName === 'BODY') {
  68787. boundariesNode = popper.ownerDocument.documentElement;
  68788. }
  68789. } else if (boundariesElement === 'window') {
  68790. boundariesNode = popper.ownerDocument.documentElement;
  68791. } else {
  68792. boundariesNode = boundariesElement;
  68793. }
  68794. var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
  68795. // In case of HTML, we need a different computation
  68796. if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
  68797. var _getWindowSizes = getWindowSizes(popper.ownerDocument),
  68798. height = _getWindowSizes.height,
  68799. width = _getWindowSizes.width;
  68800. boundaries.top += offsets.top - offsets.marginTop;
  68801. boundaries.bottom = height + offsets.top;
  68802. boundaries.left += offsets.left - offsets.marginLeft;
  68803. boundaries.right = width + offsets.left;
  68804. } else {
  68805. // for all the other DOM elements, this one is good
  68806. boundaries = offsets;
  68807. }
  68808. }
  68809. // Add paddings
  68810. padding = padding || 0;
  68811. var isPaddingNumber = typeof padding === 'number';
  68812. boundaries.left += isPaddingNumber ? padding : padding.left || 0;
  68813. boundaries.top += isPaddingNumber ? padding : padding.top || 0;
  68814. boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
  68815. boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
  68816. return boundaries;
  68817. }
  68818. function getArea(_ref) {
  68819. var width = _ref.width,
  68820. height = _ref.height;
  68821. return width * height;
  68822. }
  68823. /**
  68824. * Utility used to transform the `auto` placement to the placement with more
  68825. * available space.
  68826. * @method
  68827. * @memberof Popper.Utils
  68828. * @argument {Object} data - The data object generated by update method
  68829. * @argument {Object} options - Modifiers configuration and options
  68830. * @returns {Object} The data object, properly modified
  68831. */
  68832. function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
  68833. var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
  68834. if (placement.indexOf('auto') === -1) {
  68835. return placement;
  68836. }
  68837. var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
  68838. var rects = {
  68839. top: {
  68840. width: boundaries.width,
  68841. height: refRect.top - boundaries.top
  68842. },
  68843. right: {
  68844. width: boundaries.right - refRect.right,
  68845. height: boundaries.height
  68846. },
  68847. bottom: {
  68848. width: boundaries.width,
  68849. height: boundaries.bottom - refRect.bottom
  68850. },
  68851. left: {
  68852. width: refRect.left - boundaries.left,
  68853. height: boundaries.height
  68854. }
  68855. };
  68856. var sortedAreas = Object.keys(rects).map(function (key) {
  68857. return _extends({
  68858. key: key
  68859. }, rects[key], {
  68860. area: getArea(rects[key])
  68861. });
  68862. }).sort(function (a, b) {
  68863. return b.area - a.area;
  68864. });
  68865. var filteredAreas = sortedAreas.filter(function (_ref2) {
  68866. var width = _ref2.width,
  68867. height = _ref2.height;
  68868. return width >= popper.clientWidth && height >= popper.clientHeight;
  68869. });
  68870. var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
  68871. var variation = placement.split('-')[1];
  68872. return computedPlacement + (variation ? '-' + variation : '');
  68873. }
  68874. /**
  68875. * Get offsets to the reference element
  68876. * @method
  68877. * @memberof Popper.Utils
  68878. * @param {Object} state
  68879. * @param {Element} popper - the popper element
  68880. * @param {Element} reference - the reference element (the popper will be relative to this)
  68881. * @param {Element} fixedPosition - is in fixed position mode
  68882. * @returns {Object} An object containing the offsets which will be applied to the popper
  68883. */
  68884. function getReferenceOffsets(state, popper, reference) {
  68885. var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
  68886. var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
  68887. return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
  68888. }
  68889. /**
  68890. * Get the outer sizes of the given element (offset size + margins)
  68891. * @method
  68892. * @memberof Popper.Utils
  68893. * @argument {Element} element
  68894. * @returns {Object} object containing width and height properties
  68895. */
  68896. function getOuterSizes(element) {
  68897. var window = element.ownerDocument.defaultView;
  68898. var styles = window.getComputedStyle(element);
  68899. var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
  68900. var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
  68901. var result = {
  68902. width: element.offsetWidth + y,
  68903. height: element.offsetHeight + x
  68904. };
  68905. return result;
  68906. }
  68907. /**
  68908. * Get the opposite placement of the given one
  68909. * @method
  68910. * @memberof Popper.Utils
  68911. * @argument {String} placement
  68912. * @returns {String} flipped placement
  68913. */
  68914. function getOppositePlacement(placement) {
  68915. var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
  68916. return placement.replace(/left|right|bottom|top/g, function (matched) {
  68917. return hash[matched];
  68918. });
  68919. }
  68920. /**
  68921. * Get offsets to the popper
  68922. * @method
  68923. * @memberof Popper.Utils
  68924. * @param {Object} position - CSS position the Popper will get applied
  68925. * @param {HTMLElement} popper - the popper element
  68926. * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
  68927. * @param {String} placement - one of the valid placement options
  68928. * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
  68929. */
  68930. function getPopperOffsets(popper, referenceOffsets, placement) {
  68931. placement = placement.split('-')[0];
  68932. // Get popper node sizes
  68933. var popperRect = getOuterSizes(popper);
  68934. // Add position, width and height to our offsets object
  68935. var popperOffsets = {
  68936. width: popperRect.width,
  68937. height: popperRect.height
  68938. };
  68939. // depending by the popper placement we have to compute its offsets slightly differently
  68940. var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
  68941. var mainSide = isHoriz ? 'top' : 'left';
  68942. var secondarySide = isHoriz ? 'left' : 'top';
  68943. var measurement = isHoriz ? 'height' : 'width';
  68944. var secondaryMeasurement = !isHoriz ? 'height' : 'width';
  68945. popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
  68946. if (placement === secondarySide) {
  68947. popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
  68948. } else {
  68949. popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
  68950. }
  68951. return popperOffsets;
  68952. }
  68953. /**
  68954. * Mimics the `find` method of Array
  68955. * @method
  68956. * @memberof Popper.Utils
  68957. * @argument {Array} arr
  68958. * @argument prop
  68959. * @argument value
  68960. * @returns index or -1
  68961. */
  68962. function find(arr, check) {
  68963. // use native find if supported
  68964. if (Array.prototype.find) {
  68965. return arr.find(check);
  68966. }
  68967. // use `filter` to obtain the same behavior of `find`
  68968. return arr.filter(check)[0];
  68969. }
  68970. /**
  68971. * Return the index of the matching object
  68972. * @method
  68973. * @memberof Popper.Utils
  68974. * @argument {Array} arr
  68975. * @argument prop
  68976. * @argument value
  68977. * @returns index or -1
  68978. */
  68979. function findIndex(arr, prop, value) {
  68980. // use native findIndex if supported
  68981. if (Array.prototype.findIndex) {
  68982. return arr.findIndex(function (cur) {
  68983. return cur[prop] === value;
  68984. });
  68985. }
  68986. // use `find` + `indexOf` if `findIndex` isn't supported
  68987. var match = find(arr, function (obj) {
  68988. return obj[prop] === value;
  68989. });
  68990. return arr.indexOf(match);
  68991. }
  68992. /**
  68993. * Loop trough the list of modifiers and run them in order,
  68994. * each of them will then edit the data object.
  68995. * @method
  68996. * @memberof Popper.Utils
  68997. * @param {dataObject} data
  68998. * @param {Array} modifiers
  68999. * @param {String} ends - Optional modifier name used as stopper
  69000. * @returns {dataObject}
  69001. */
  69002. function runModifiers(modifiers, data, ends) {
  69003. var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
  69004. modifiersToRun.forEach(function (modifier) {
  69005. if (modifier['function']) {
  69006. // eslint-disable-line dot-notation
  69007. console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
  69008. }
  69009. var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
  69010. if (modifier.enabled && isFunction(fn)) {
  69011. // Add properties to offsets to make them a complete clientRect object
  69012. // we do this before each modifier to make sure the previous one doesn't
  69013. // mess with these values
  69014. data.offsets.popper = getClientRect(data.offsets.popper);
  69015. data.offsets.reference = getClientRect(data.offsets.reference);
  69016. data = fn(data, modifier);
  69017. }
  69018. });
  69019. return data;
  69020. }
  69021. /**
  69022. * Updates the position of the popper, computing the new offsets and applying
  69023. * the new style.<br />
  69024. * Prefer `scheduleUpdate` over `update` because of performance reasons.
  69025. * @method
  69026. * @memberof Popper
  69027. */
  69028. function update() {
  69029. // if popper is destroyed, don't perform any further update
  69030. if (this.state.isDestroyed) {
  69031. return;
  69032. }
  69033. var data = {
  69034. instance: this,
  69035. styles: {},
  69036. arrowStyles: {},
  69037. attributes: {},
  69038. flipped: false,
  69039. offsets: {}
  69040. };
  69041. // compute reference element offsets
  69042. data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
  69043. // compute auto placement, store placement inside the data object,
  69044. // modifiers will be able to edit `placement` if needed
  69045. // and refer to originalPlacement to know the original value
  69046. data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
  69047. // store the computed placement inside `originalPlacement`
  69048. data.originalPlacement = data.placement;
  69049. data.positionFixed = this.options.positionFixed;
  69050. // compute the popper offsets
  69051. data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
  69052. data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
  69053. // run the modifiers
  69054. data = runModifiers(this.modifiers, data);
  69055. // the first `update` will call `onCreate` callback
  69056. // the other ones will call `onUpdate` callback
  69057. if (!this.state.isCreated) {
  69058. this.state.isCreated = true;
  69059. this.options.onCreate(data);
  69060. } else {
  69061. this.options.onUpdate(data);
  69062. }
  69063. }
  69064. /**
  69065. * Helper used to know if the given modifier is enabled.
  69066. * @method
  69067. * @memberof Popper.Utils
  69068. * @returns {Boolean}
  69069. */
  69070. function isModifierEnabled(modifiers, modifierName) {
  69071. return modifiers.some(function (_ref) {
  69072. var name = _ref.name,
  69073. enabled = _ref.enabled;
  69074. return enabled && name === modifierName;
  69075. });
  69076. }
  69077. /**
  69078. * Get the prefixed supported property name
  69079. * @method
  69080. * @memberof Popper.Utils
  69081. * @argument {String} property (camelCase)
  69082. * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
  69083. */
  69084. function getSupportedPropertyName(property) {
  69085. var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
  69086. var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
  69087. for (var i = 0; i < prefixes.length; i++) {
  69088. var prefix = prefixes[i];
  69089. var toCheck = prefix ? '' + prefix + upperProp : property;
  69090. if (typeof document.body.style[toCheck] !== 'undefined') {
  69091. return toCheck;
  69092. }
  69093. }
  69094. return null;
  69095. }
  69096. /**
  69097. * Destroys the popper.
  69098. * @method
  69099. * @memberof Popper
  69100. */
  69101. function destroy() {
  69102. this.state.isDestroyed = true;
  69103. // touch DOM only if `applyStyle` modifier is enabled
  69104. if (isModifierEnabled(this.modifiers, 'applyStyle')) {
  69105. this.popper.removeAttribute('x-placement');
  69106. this.popper.style.position = '';
  69107. this.popper.style.top = '';
  69108. this.popper.style.left = '';
  69109. this.popper.style.right = '';
  69110. this.popper.style.bottom = '';
  69111. this.popper.style.willChange = '';
  69112. this.popper.style[getSupportedPropertyName('transform')] = '';
  69113. }
  69114. this.disableEventListeners();
  69115. // remove the popper if user explicity asked for the deletion on destroy
  69116. // do not use `remove` because IE11 doesn't support it
  69117. if (this.options.removeOnDestroy) {
  69118. this.popper.parentNode.removeChild(this.popper);
  69119. }
  69120. return this;
  69121. }
  69122. /**
  69123. * Get the window associated with the element
  69124. * @argument {Element} element
  69125. * @returns {Window}
  69126. */
  69127. function getWindow(element) {
  69128. var ownerDocument = element.ownerDocument;
  69129. return ownerDocument ? ownerDocument.defaultView : window;
  69130. }
  69131. function attachToScrollParents(scrollParent, event, callback, scrollParents) {
  69132. var isBody = scrollParent.nodeName === 'BODY';
  69133. var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
  69134. target.addEventListener(event, callback, { passive: true });
  69135. if (!isBody) {
  69136. attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
  69137. }
  69138. scrollParents.push(target);
  69139. }
  69140. /**
  69141. * Setup needed event listeners used to update the popper position
  69142. * @method
  69143. * @memberof Popper.Utils
  69144. * @private
  69145. */
  69146. function setupEventListeners(reference, options, state, updateBound) {
  69147. // Resize event listener on window
  69148. state.updateBound = updateBound;
  69149. getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
  69150. // Scroll event listener on scroll parents
  69151. var scrollElement = getScrollParent(reference);
  69152. attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
  69153. state.scrollElement = scrollElement;
  69154. state.eventsEnabled = true;
  69155. return state;
  69156. }
  69157. /**
  69158. * It will add resize/scroll events and start recalculating
  69159. * position of the popper element when they are triggered.
  69160. * @method
  69161. * @memberof Popper
  69162. */
  69163. function enableEventListeners() {
  69164. if (!this.state.eventsEnabled) {
  69165. this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
  69166. }
  69167. }
  69168. /**
  69169. * Remove event listeners used to update the popper position
  69170. * @method
  69171. * @memberof Popper.Utils
  69172. * @private
  69173. */
  69174. function removeEventListeners(reference, state) {
  69175. // Remove resize event listener on window
  69176. getWindow(reference).removeEventListener('resize', state.updateBound);
  69177. // Remove scroll event listener on scroll parents
  69178. state.scrollParents.forEach(function (target) {
  69179. target.removeEventListener('scroll', state.updateBound);
  69180. });
  69181. // Reset state
  69182. state.updateBound = null;
  69183. state.scrollParents = [];
  69184. state.scrollElement = null;
  69185. state.eventsEnabled = false;
  69186. return state;
  69187. }
  69188. /**
  69189. * It will remove resize/scroll events and won't recalculate popper position
  69190. * when they are triggered. It also won't trigger `onUpdate` callback anymore,
  69191. * unless you call `update` method manually.
  69192. * @method
  69193. * @memberof Popper
  69194. */
  69195. function disableEventListeners() {
  69196. if (this.state.eventsEnabled) {
  69197. cancelAnimationFrame(this.scheduleUpdate);
  69198. this.state = removeEventListeners(this.reference, this.state);
  69199. }
  69200. }
  69201. /**
  69202. * Tells if a given input is a number
  69203. * @method
  69204. * @memberof Popper.Utils
  69205. * @param {*} input to check
  69206. * @return {Boolean}
  69207. */
  69208. function isNumeric(n) {
  69209. return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
  69210. }
  69211. /**
  69212. * Set the style to the given popper
  69213. * @method
  69214. * @memberof Popper.Utils
  69215. * @argument {Element} element - Element to apply the style to
  69216. * @argument {Object} styles
  69217. * Object with a list of properties and values which will be applied to the element
  69218. */
  69219. function setStyles(element, styles) {
  69220. Object.keys(styles).forEach(function (prop) {
  69221. var unit = '';
  69222. // add unit if the value is numeric and is one of the following
  69223. if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
  69224. unit = 'px';
  69225. }
  69226. element.style[prop] = styles[prop] + unit;
  69227. });
  69228. }
  69229. /**
  69230. * Set the attributes to the given popper
  69231. * @method
  69232. * @memberof Popper.Utils
  69233. * @argument {Element} element - Element to apply the attributes to
  69234. * @argument {Object} styles
  69235. * Object with a list of properties and values which will be applied to the element
  69236. */
  69237. function setAttributes(element, attributes) {
  69238. Object.keys(attributes).forEach(function (prop) {
  69239. var value = attributes[prop];
  69240. if (value !== false) {
  69241. element.setAttribute(prop, attributes[prop]);
  69242. } else {
  69243. element.removeAttribute(prop);
  69244. }
  69245. });
  69246. }
  69247. /**
  69248. * @function
  69249. * @memberof Modifiers
  69250. * @argument {Object} data - The data object generated by `update` method
  69251. * @argument {Object} data.styles - List of style properties - values to apply to popper element
  69252. * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
  69253. * @argument {Object} options - Modifiers configuration and options
  69254. * @returns {Object} The same data object
  69255. */
  69256. function applyStyle(data) {
  69257. // any property present in `data.styles` will be applied to the popper,
  69258. // in this way we can make the 3rd party modifiers add custom styles to it
  69259. // Be aware, modifiers could override the properties defined in the previous
  69260. // lines of this modifier!
  69261. setStyles(data.instance.popper, data.styles);
  69262. // any property present in `data.attributes` will be applied to the popper,
  69263. // they will be set as HTML attributes of the element
  69264. setAttributes(data.instance.popper, data.attributes);
  69265. // if arrowElement is defined and arrowStyles has some properties
  69266. if (data.arrowElement && Object.keys(data.arrowStyles).length) {
  69267. setStyles(data.arrowElement, data.arrowStyles);
  69268. }
  69269. return data;
  69270. }
  69271. /**
  69272. * Set the x-placement attribute before everything else because it could be used
  69273. * to add margins to the popper margins needs to be calculated to get the
  69274. * correct popper offsets.
  69275. * @method
  69276. * @memberof Popper.modifiers
  69277. * @param {HTMLElement} reference - The reference element used to position the popper
  69278. * @param {HTMLElement} popper - The HTML element used as popper
  69279. * @param {Object} options - Popper.js options
  69280. */
  69281. function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
  69282. // compute reference element offsets
  69283. var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
  69284. // compute auto placement, store placement inside the data object,
  69285. // modifiers will be able to edit `placement` if needed
  69286. // and refer to originalPlacement to know the original value
  69287. var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
  69288. popper.setAttribute('x-placement', placement);
  69289. // Apply `position` to popper before anything else because
  69290. // without the position applied we can't guarantee correct computations
  69291. setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
  69292. return options;
  69293. }
  69294. /**
  69295. * @function
  69296. * @memberof Popper.Utils
  69297. * @argument {Object} data - The data object generated by `update` method
  69298. * @argument {Boolean} shouldRound - If the offsets should be rounded at all
  69299. * @returns {Object} The popper's position offsets rounded
  69300. *
  69301. * The tale of pixel-perfect positioning. It's still not 100% perfect, but as
  69302. * good as it can be within reason.
  69303. * Discussion here: https://github.com/FezVrasta/popper.js/pull/715
  69304. *
  69305. * Low DPI screens cause a popper to be blurry if not using full pixels (Safari
  69306. * as well on High DPI screens).
  69307. *
  69308. * Firefox prefers no rounding for positioning and does not have blurriness on
  69309. * high DPI screens.
  69310. *
  69311. * Only horizontal placement and left/right values need to be considered.
  69312. */
  69313. function getRoundedOffsets(data, shouldRound) {
  69314. var _data$offsets = data.offsets,
  69315. popper = _data$offsets.popper,
  69316. reference = _data$offsets.reference;
  69317. var round = Math.round,
  69318. floor = Math.floor;
  69319. var noRound = function noRound(v) {
  69320. return v;
  69321. };
  69322. var referenceWidth = round(reference.width);
  69323. var popperWidth = round(popper.width);
  69324. var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
  69325. var isVariation = data.placement.indexOf('-') !== -1;
  69326. var sameWidthParity = referenceWidth % 2 === popperWidth % 2;
  69327. var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;
  69328. var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;
  69329. var verticalToInteger = !shouldRound ? noRound : round;
  69330. return {
  69331. left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),
  69332. top: verticalToInteger(popper.top),
  69333. bottom: verticalToInteger(popper.bottom),
  69334. right: horizontalToInteger(popper.right)
  69335. };
  69336. }
  69337. var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);
  69338. /**
  69339. * @function
  69340. * @memberof Modifiers
  69341. * @argument {Object} data - The data object generated by `update` method
  69342. * @argument {Object} options - Modifiers configuration and options
  69343. * @returns {Object} The data object, properly modified
  69344. */
  69345. function computeStyle(data, options) {
  69346. var x = options.x,
  69347. y = options.y;
  69348. var popper = data.offsets.popper;
  69349. // Remove this legacy support in Popper.js v2
  69350. var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
  69351. return modifier.name === 'applyStyle';
  69352. }).gpuAcceleration;
  69353. if (legacyGpuAccelerationOption !== undefined) {
  69354. console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
  69355. }
  69356. var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
  69357. var offsetParent = getOffsetParent(data.instance.popper);
  69358. var offsetParentRect = getBoundingClientRect(offsetParent);
  69359. // Styles
  69360. var styles = {
  69361. position: popper.position
  69362. };
  69363. var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);
  69364. var sideA = x === 'bottom' ? 'top' : 'bottom';
  69365. var sideB = y === 'right' ? 'left' : 'right';
  69366. // if gpuAcceleration is set to `true` and transform is supported,
  69367. // we use `translate3d` to apply the position to the popper we
  69368. // automatically use the supported prefixed version if needed
  69369. var prefixedProperty = getSupportedPropertyName('transform');
  69370. // now, let's make a step back and look at this code closely (wtf?)
  69371. // If the content of the popper grows once it's been positioned, it
  69372. // may happen that the popper gets misplaced because of the new content
  69373. // overflowing its reference element
  69374. // To avoid this problem, we provide two options (x and y), which allow
  69375. // the consumer to define the offset origin.
  69376. // If we position a popper on top of a reference element, we can set
  69377. // `x` to `top` to make the popper grow towards its top instead of
  69378. // its bottom.
  69379. var left = void 0,
  69380. top = void 0;
  69381. if (sideA === 'bottom') {
  69382. // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)
  69383. // and not the bottom of the html element
  69384. if (offsetParent.nodeName === 'HTML') {
  69385. top = -offsetParent.clientHeight + offsets.bottom;
  69386. } else {
  69387. top = -offsetParentRect.height + offsets.bottom;
  69388. }
  69389. } else {
  69390. top = offsets.top;
  69391. }
  69392. if (sideB === 'right') {
  69393. if (offsetParent.nodeName === 'HTML') {
  69394. left = -offsetParent.clientWidth + offsets.right;
  69395. } else {
  69396. left = -offsetParentRect.width + offsets.right;
  69397. }
  69398. } else {
  69399. left = offsets.left;
  69400. }
  69401. if (gpuAcceleration && prefixedProperty) {
  69402. styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
  69403. styles[sideA] = 0;
  69404. styles[sideB] = 0;
  69405. styles.willChange = 'transform';
  69406. } else {
  69407. // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
  69408. var invertTop = sideA === 'bottom' ? -1 : 1;
  69409. var invertLeft = sideB === 'right' ? -1 : 1;
  69410. styles[sideA] = top * invertTop;
  69411. styles[sideB] = left * invertLeft;
  69412. styles.willChange = sideA + ', ' + sideB;
  69413. }
  69414. // Attributes
  69415. var attributes = {
  69416. 'x-placement': data.placement
  69417. };
  69418. // Update `data` attributes, styles and arrowStyles
  69419. data.attributes = _extends({}, attributes, data.attributes);
  69420. data.styles = _extends({}, styles, data.styles);
  69421. data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
  69422. return data;
  69423. }
  69424. /**
  69425. * Helper used to know if the given modifier depends from another one.<br />
  69426. * It checks if the needed modifier is listed and enabled.
  69427. * @method
  69428. * @memberof Popper.Utils
  69429. * @param {Array} modifiers - list of modifiers
  69430. * @param {String} requestingName - name of requesting modifier
  69431. * @param {String} requestedName - name of requested modifier
  69432. * @returns {Boolean}
  69433. */
  69434. function isModifierRequired(modifiers, requestingName, requestedName) {
  69435. var requesting = find(modifiers, function (_ref) {
  69436. var name = _ref.name;
  69437. return name === requestingName;
  69438. });
  69439. var isRequired = !!requesting && modifiers.some(function (modifier) {
  69440. return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
  69441. });
  69442. if (!isRequired) {
  69443. var _requesting = '`' + requestingName + '`';
  69444. var requested = '`' + requestedName + '`';
  69445. console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
  69446. }
  69447. return isRequired;
  69448. }
  69449. /**
  69450. * @function
  69451. * @memberof Modifiers
  69452. * @argument {Object} data - The data object generated by update method
  69453. * @argument {Object} options - Modifiers configuration and options
  69454. * @returns {Object} The data object, properly modified
  69455. */
  69456. function arrow(data, options) {
  69457. var _data$offsets$arrow;
  69458. // arrow depends on keepTogether in order to work
  69459. if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
  69460. return data;
  69461. }
  69462. var arrowElement = options.element;
  69463. // if arrowElement is a string, suppose it's a CSS selector
  69464. if (typeof arrowElement === 'string') {
  69465. arrowElement = data.instance.popper.querySelector(arrowElement);
  69466. // if arrowElement is not found, don't run the modifier
  69467. if (!arrowElement) {
  69468. return data;
  69469. }
  69470. } else {
  69471. // if the arrowElement isn't a query selector we must check that the
  69472. // provided DOM node is child of its popper node
  69473. if (!data.instance.popper.contains(arrowElement)) {
  69474. console.warn('WARNING: `arrow.element` must be child of its popper element!');
  69475. return data;
  69476. }
  69477. }
  69478. var placement = data.placement.split('-')[0];
  69479. var _data$offsets = data.offsets,
  69480. popper = _data$offsets.popper,
  69481. reference = _data$offsets.reference;
  69482. var isVertical = ['left', 'right'].indexOf(placement) !== -1;
  69483. var len = isVertical ? 'height' : 'width';
  69484. var sideCapitalized = isVertical ? 'Top' : 'Left';
  69485. var side = sideCapitalized.toLowerCase();
  69486. var altSide = isVertical ? 'left' : 'top';
  69487. var opSide = isVertical ? 'bottom' : 'right';
  69488. var arrowElementSize = getOuterSizes(arrowElement)[len];
  69489. //
  69490. // extends keepTogether behavior making sure the popper and its
  69491. // reference have enough pixels in conjunction
  69492. //
  69493. // top/left side
  69494. if (reference[opSide] - arrowElementSize < popper[side]) {
  69495. data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
  69496. }
  69497. // bottom/right side
  69498. if (reference[side] + arrowElementSize > popper[opSide]) {
  69499. data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
  69500. }
  69501. data.offsets.popper = getClientRect(data.offsets.popper);
  69502. // compute center of the popper
  69503. var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
  69504. // Compute the sideValue using the updated popper offsets
  69505. // take popper margin in account because we don't have this info available
  69506. var css = getStyleComputedProperty(data.instance.popper);
  69507. var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);
  69508. var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);
  69509. var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
  69510. // prevent arrowElement from being placed not contiguously to its popper
  69511. sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
  69512. data.arrowElement = arrowElement;
  69513. data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
  69514. return data;
  69515. }
  69516. /**
  69517. * Get the opposite placement variation of the given one
  69518. * @method
  69519. * @memberof Popper.Utils
  69520. * @argument {String} placement variation
  69521. * @returns {String} flipped placement variation
  69522. */
  69523. function getOppositeVariation(variation) {
  69524. if (variation === 'end') {
  69525. return 'start';
  69526. } else if (variation === 'start') {
  69527. return 'end';
  69528. }
  69529. return variation;
  69530. }
  69531. /**
  69532. * List of accepted placements to use as values of the `placement` option.<br />
  69533. * Valid placements are:
  69534. * - `auto`
  69535. * - `top`
  69536. * - `right`
  69537. * - `bottom`
  69538. * - `left`
  69539. *
  69540. * Each placement can have a variation from this list:
  69541. * - `-start`
  69542. * - `-end`
  69543. *
  69544. * Variations are interpreted easily if you think of them as the left to right
  69545. * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
  69546. * is right.<br />
  69547. * Vertically (`left` and `right`), `start` is top and `end` is bottom.
  69548. *
  69549. * Some valid examples are:
  69550. * - `top-end` (on top of reference, right aligned)
  69551. * - `right-start` (on right of reference, top aligned)
  69552. * - `bottom` (on bottom, centered)
  69553. * - `auto-end` (on the side with more space available, alignment depends by placement)
  69554. *
  69555. * @static
  69556. * @type {Array}
  69557. * @enum {String}
  69558. * @readonly
  69559. * @method placements
  69560. * @memberof Popper
  69561. */
  69562. var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
  69563. // Get rid of `auto` `auto-start` and `auto-end`
  69564. var validPlacements = placements.slice(3);
  69565. /**
  69566. * Given an initial placement, returns all the subsequent placements
  69567. * clockwise (or counter-clockwise).
  69568. *
  69569. * @method
  69570. * @memberof Popper.Utils
  69571. * @argument {String} placement - A valid placement (it accepts variations)
  69572. * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
  69573. * @returns {Array} placements including their variations
  69574. */
  69575. function clockwise(placement) {
  69576. var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  69577. var index = validPlacements.indexOf(placement);
  69578. var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
  69579. return counter ? arr.reverse() : arr;
  69580. }
  69581. var BEHAVIORS = {
  69582. FLIP: 'flip',
  69583. CLOCKWISE: 'clockwise',
  69584. COUNTERCLOCKWISE: 'counterclockwise'
  69585. };
  69586. /**
  69587. * @function
  69588. * @memberof Modifiers
  69589. * @argument {Object} data - The data object generated by update method
  69590. * @argument {Object} options - Modifiers configuration and options
  69591. * @returns {Object} The data object, properly modified
  69592. */
  69593. function flip(data, options) {
  69594. // if `inner` modifier is enabled, we can't use the `flip` modifier
  69595. if (isModifierEnabled(data.instance.modifiers, 'inner')) {
  69596. return data;
  69597. }
  69598. if (data.flipped && data.placement === data.originalPlacement) {
  69599. // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
  69600. return data;
  69601. }
  69602. var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
  69603. var placement = data.placement.split('-')[0];
  69604. var placementOpposite = getOppositePlacement(placement);
  69605. var variation = data.placement.split('-')[1] || '';
  69606. var flipOrder = [];
  69607. switch (options.behavior) {
  69608. case BEHAVIORS.FLIP:
  69609. flipOrder = [placement, placementOpposite];
  69610. break;
  69611. case BEHAVIORS.CLOCKWISE:
  69612. flipOrder = clockwise(placement);
  69613. break;
  69614. case BEHAVIORS.COUNTERCLOCKWISE:
  69615. flipOrder = clockwise(placement, true);
  69616. break;
  69617. default:
  69618. flipOrder = options.behavior;
  69619. }
  69620. flipOrder.forEach(function (step, index) {
  69621. if (placement !== step || flipOrder.length === index + 1) {
  69622. return data;
  69623. }
  69624. placement = data.placement.split('-')[0];
  69625. placementOpposite = getOppositePlacement(placement);
  69626. var popperOffsets = data.offsets.popper;
  69627. var refOffsets = data.offsets.reference;
  69628. // using floor because the reference offsets may contain decimals we are not going to consider here
  69629. var floor = Math.floor;
  69630. var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
  69631. var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
  69632. var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
  69633. var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
  69634. var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
  69635. var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
  69636. // flip the variation if required
  69637. var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
  69638. // flips variation if reference element overflows boundaries
  69639. var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
  69640. // flips variation if popper content overflows boundaries
  69641. var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
  69642. var flippedVariation = flippedVariationByRef || flippedVariationByContent;
  69643. if (overlapsRef || overflowsBoundaries || flippedVariation) {
  69644. // this boolean to detect any flip loop
  69645. data.flipped = true;
  69646. if (overlapsRef || overflowsBoundaries) {
  69647. placement = flipOrder[index + 1];
  69648. }
  69649. if (flippedVariation) {
  69650. variation = getOppositeVariation(variation);
  69651. }
  69652. data.placement = placement + (variation ? '-' + variation : '');
  69653. // this object contains `position`, we want to preserve it along with
  69654. // any additional property we may add in the future
  69655. data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
  69656. data = runModifiers(data.instance.modifiers, data, 'flip');
  69657. }
  69658. });
  69659. return data;
  69660. }
  69661. /**
  69662. * @function
  69663. * @memberof Modifiers
  69664. * @argument {Object} data - The data object generated by update method
  69665. * @argument {Object} options - Modifiers configuration and options
  69666. * @returns {Object} The data object, properly modified
  69667. */
  69668. function keepTogether(data) {
  69669. var _data$offsets = data.offsets,
  69670. popper = _data$offsets.popper,
  69671. reference = _data$offsets.reference;
  69672. var placement = data.placement.split('-')[0];
  69673. var floor = Math.floor;
  69674. var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
  69675. var side = isVertical ? 'right' : 'bottom';
  69676. var opSide = isVertical ? 'left' : 'top';
  69677. var measurement = isVertical ? 'width' : 'height';
  69678. if (popper[side] < floor(reference[opSide])) {
  69679. data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
  69680. }
  69681. if (popper[opSide] > floor(reference[side])) {
  69682. data.offsets.popper[opSide] = floor(reference[side]);
  69683. }
  69684. return data;
  69685. }
  69686. /**
  69687. * Converts a string containing value + unit into a px value number
  69688. * @function
  69689. * @memberof {modifiers~offset}
  69690. * @private
  69691. * @argument {String} str - Value + unit string
  69692. * @argument {String} measurement - `height` or `width`
  69693. * @argument {Object} popperOffsets
  69694. * @argument {Object} referenceOffsets
  69695. * @returns {Number|String}
  69696. * Value in pixels, or original string if no values were extracted
  69697. */
  69698. function toValue(str, measurement, popperOffsets, referenceOffsets) {
  69699. // separate value from unit
  69700. var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
  69701. var value = +split[1];
  69702. var unit = split[2];
  69703. // If it's not a number it's an operator, I guess
  69704. if (!value) {
  69705. return str;
  69706. }
  69707. if (unit.indexOf('%') === 0) {
  69708. var element = void 0;
  69709. switch (unit) {
  69710. case '%p':
  69711. element = popperOffsets;
  69712. break;
  69713. case '%':
  69714. case '%r':
  69715. default:
  69716. element = referenceOffsets;
  69717. }
  69718. var rect = getClientRect(element);
  69719. return rect[measurement] / 100 * value;
  69720. } else if (unit === 'vh' || unit === 'vw') {
  69721. // if is a vh or vw, we calculate the size based on the viewport
  69722. var size = void 0;
  69723. if (unit === 'vh') {
  69724. size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
  69725. } else {
  69726. size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
  69727. }
  69728. return size / 100 * value;
  69729. } else {
  69730. // if is an explicit pixel unit, we get rid of the unit and keep the value
  69731. // if is an implicit unit, it's px, and we return just the value
  69732. return value;
  69733. }
  69734. }
  69735. /**
  69736. * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
  69737. * @function
  69738. * @memberof {modifiers~offset}
  69739. * @private
  69740. * @argument {String} offset
  69741. * @argument {Object} popperOffsets
  69742. * @argument {Object} referenceOffsets
  69743. * @argument {String} basePlacement
  69744. * @returns {Array} a two cells array with x and y offsets in numbers
  69745. */
  69746. function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
  69747. var offsets = [0, 0];
  69748. // Use height if placement is left or right and index is 0 otherwise use width
  69749. // in this way the first offset will use an axis and the second one
  69750. // will use the other one
  69751. var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
  69752. // Split the offset string to obtain a list of values and operands
  69753. // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
  69754. var fragments = offset.split(/(\+|\-)/).map(function (frag) {
  69755. return frag.trim();
  69756. });
  69757. // Detect if the offset string contains a pair of values or a single one
  69758. // they could be separated by comma or space
  69759. var divider = fragments.indexOf(find(fragments, function (frag) {
  69760. return frag.search(/,|\s/) !== -1;
  69761. }));
  69762. if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
  69763. console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
  69764. }
  69765. // If divider is found, we divide the list of values and operands to divide
  69766. // them by ofset X and Y.
  69767. var splitRegex = /\s*,\s*|\s+/;
  69768. var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
  69769. // Convert the values with units to absolute pixels to allow our computations
  69770. ops = ops.map(function (op, index) {
  69771. // Most of the units rely on the orientation of the popper
  69772. var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
  69773. var mergeWithPrevious = false;
  69774. return op
  69775. // This aggregates any `+` or `-` sign that aren't considered operators
  69776. // e.g.: 10 + +5 => [10, +, +5]
  69777. .reduce(function (a, b) {
  69778. if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
  69779. a[a.length - 1] = b;
  69780. mergeWithPrevious = true;
  69781. return a;
  69782. } else if (mergeWithPrevious) {
  69783. a[a.length - 1] += b;
  69784. mergeWithPrevious = false;
  69785. return a;
  69786. } else {
  69787. return a.concat(b);
  69788. }
  69789. }, [])
  69790. // Here we convert the string values into number values (in px)
  69791. .map(function (str) {
  69792. return toValue(str, measurement, popperOffsets, referenceOffsets);
  69793. });
  69794. });
  69795. // Loop trough the offsets arrays and execute the operations
  69796. ops.forEach(function (op, index) {
  69797. op.forEach(function (frag, index2) {
  69798. if (isNumeric(frag)) {
  69799. offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
  69800. }
  69801. });
  69802. });
  69803. return offsets;
  69804. }
  69805. /**
  69806. * @function
  69807. * @memberof Modifiers
  69808. * @argument {Object} data - The data object generated by update method
  69809. * @argument {Object} options - Modifiers configuration and options
  69810. * @argument {Number|String} options.offset=0
  69811. * The offset value as described in the modifier description
  69812. * @returns {Object} The data object, properly modified
  69813. */
  69814. function offset(data, _ref) {
  69815. var offset = _ref.offset;
  69816. var placement = data.placement,
  69817. _data$offsets = data.offsets,
  69818. popper = _data$offsets.popper,
  69819. reference = _data$offsets.reference;
  69820. var basePlacement = placement.split('-')[0];
  69821. var offsets = void 0;
  69822. if (isNumeric(+offset)) {
  69823. offsets = [+offset, 0];
  69824. } else {
  69825. offsets = parseOffset(offset, popper, reference, basePlacement);
  69826. }
  69827. if (basePlacement === 'left') {
  69828. popper.top += offsets[0];
  69829. popper.left -= offsets[1];
  69830. } else if (basePlacement === 'right') {
  69831. popper.top += offsets[0];
  69832. popper.left += offsets[1];
  69833. } else if (basePlacement === 'top') {
  69834. popper.left += offsets[0];
  69835. popper.top -= offsets[1];
  69836. } else if (basePlacement === 'bottom') {
  69837. popper.left += offsets[0];
  69838. popper.top += offsets[1];
  69839. }
  69840. data.popper = popper;
  69841. return data;
  69842. }
  69843. /**
  69844. * @function
  69845. * @memberof Modifiers
  69846. * @argument {Object} data - The data object generated by `update` method
  69847. * @argument {Object} options - Modifiers configuration and options
  69848. * @returns {Object} The data object, properly modified
  69849. */
  69850. function preventOverflow(data, options) {
  69851. var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
  69852. // If offsetParent is the reference element, we really want to
  69853. // go one step up and use the next offsetParent as reference to
  69854. // avoid to make this modifier completely useless and look like broken
  69855. if (data.instance.reference === boundariesElement) {
  69856. boundariesElement = getOffsetParent(boundariesElement);
  69857. }
  69858. // NOTE: DOM access here
  69859. // resets the popper's position so that the document size can be calculated excluding
  69860. // the size of the popper element itself
  69861. var transformProp = getSupportedPropertyName('transform');
  69862. var popperStyles = data.instance.popper.style; // assignment to help minification
  69863. var top = popperStyles.top,
  69864. left = popperStyles.left,
  69865. transform = popperStyles[transformProp];
  69866. popperStyles.top = '';
  69867. popperStyles.left = '';
  69868. popperStyles[transformProp] = '';
  69869. var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
  69870. // NOTE: DOM access here
  69871. // restores the original style properties after the offsets have been computed
  69872. popperStyles.top = top;
  69873. popperStyles.left = left;
  69874. popperStyles[transformProp] = transform;
  69875. options.boundaries = boundaries;
  69876. var order = options.priority;
  69877. var popper = data.offsets.popper;
  69878. var check = {
  69879. primary: function primary(placement) {
  69880. var value = popper[placement];
  69881. if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
  69882. value = Math.max(popper[placement], boundaries[placement]);
  69883. }
  69884. return defineProperty({}, placement, value);
  69885. },
  69886. secondary: function secondary(placement) {
  69887. var mainSide = placement === 'right' ? 'left' : 'top';
  69888. var value = popper[mainSide];
  69889. if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
  69890. value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
  69891. }
  69892. return defineProperty({}, mainSide, value);
  69893. }
  69894. };
  69895. order.forEach(function (placement) {
  69896. var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
  69897. popper = _extends({}, popper, check[side](placement));
  69898. });
  69899. data.offsets.popper = popper;
  69900. return data;
  69901. }
  69902. /**
  69903. * @function
  69904. * @memberof Modifiers
  69905. * @argument {Object} data - The data object generated by `update` method
  69906. * @argument {Object} options - Modifiers configuration and options
  69907. * @returns {Object} The data object, properly modified
  69908. */
  69909. function shift(data) {
  69910. var placement = data.placement;
  69911. var basePlacement = placement.split('-')[0];
  69912. var shiftvariation = placement.split('-')[1];
  69913. // if shift shiftvariation is specified, run the modifier
  69914. if (shiftvariation) {
  69915. var _data$offsets = data.offsets,
  69916. reference = _data$offsets.reference,
  69917. popper = _data$offsets.popper;
  69918. var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
  69919. var side = isVertical ? 'left' : 'top';
  69920. var measurement = isVertical ? 'width' : 'height';
  69921. var shiftOffsets = {
  69922. start: defineProperty({}, side, reference[side]),
  69923. end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
  69924. };
  69925. data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
  69926. }
  69927. return data;
  69928. }
  69929. /**
  69930. * @function
  69931. * @memberof Modifiers
  69932. * @argument {Object} data - The data object generated by update method
  69933. * @argument {Object} options - Modifiers configuration and options
  69934. * @returns {Object} The data object, properly modified
  69935. */
  69936. function hide(data) {
  69937. if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
  69938. return data;
  69939. }
  69940. var refRect = data.offsets.reference;
  69941. var bound = find(data.instance.modifiers, function (modifier) {
  69942. return modifier.name === 'preventOverflow';
  69943. }).boundaries;
  69944. if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
  69945. // Avoid unnecessary DOM access if visibility hasn't changed
  69946. if (data.hide === true) {
  69947. return data;
  69948. }
  69949. data.hide = true;
  69950. data.attributes['x-out-of-boundaries'] = '';
  69951. } else {
  69952. // Avoid unnecessary DOM access if visibility hasn't changed
  69953. if (data.hide === false) {
  69954. return data;
  69955. }
  69956. data.hide = false;
  69957. data.attributes['x-out-of-boundaries'] = false;
  69958. }
  69959. return data;
  69960. }
  69961. /**
  69962. * @function
  69963. * @memberof Modifiers
  69964. * @argument {Object} data - The data object generated by `update` method
  69965. * @argument {Object} options - Modifiers configuration and options
  69966. * @returns {Object} The data object, properly modified
  69967. */
  69968. function inner(data) {
  69969. var placement = data.placement;
  69970. var basePlacement = placement.split('-')[0];
  69971. var _data$offsets = data.offsets,
  69972. popper = _data$offsets.popper,
  69973. reference = _data$offsets.reference;
  69974. var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
  69975. var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
  69976. popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
  69977. data.placement = getOppositePlacement(placement);
  69978. data.offsets.popper = getClientRect(popper);
  69979. return data;
  69980. }
  69981. /**
  69982. * Modifier function, each modifier can have a function of this type assigned
  69983. * to its `fn` property.<br />
  69984. * These functions will be called on each update, this means that you must
  69985. * make sure they are performant enough to avoid performance bottlenecks.
  69986. *
  69987. * @function ModifierFn
  69988. * @argument {dataObject} data - The data object generated by `update` method
  69989. * @argument {Object} options - Modifiers configuration and options
  69990. * @returns {dataObject} The data object, properly modified
  69991. */
  69992. /**
  69993. * Modifiers are plugins used to alter the behavior of your poppers.<br />
  69994. * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
  69995. * needed by the library.
  69996. *
  69997. * Usually you don't want to override the `order`, `fn` and `onLoad` props.
  69998. * All the other properties are configurations that could be tweaked.
  69999. * @namespace modifiers
  70000. */
  70001. var modifiers = {
  70002. /**
  70003. * Modifier used to shift the popper on the start or end of its reference
  70004. * element.<br />
  70005. * It will read the variation of the `placement` property.<br />
  70006. * It can be one either `-end` or `-start`.
  70007. * @memberof modifiers
  70008. * @inner
  70009. */
  70010. shift: {
  70011. /** @prop {number} order=100 - Index used to define the order of execution */
  70012. order: 100,
  70013. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  70014. enabled: true,
  70015. /** @prop {ModifierFn} */
  70016. fn: shift
  70017. },
  70018. /**
  70019. * The `offset` modifier can shift your popper on both its axis.
  70020. *
  70021. * It accepts the following units:
  70022. * - `px` or unit-less, interpreted as pixels
  70023. * - `%` or `%r`, percentage relative to the length of the reference element
  70024. * - `%p`, percentage relative to the length of the popper element
  70025. * - `vw`, CSS viewport width unit
  70026. * - `vh`, CSS viewport height unit
  70027. *
  70028. * For length is intended the main axis relative to the placement of the popper.<br />
  70029. * This means that if the placement is `top` or `bottom`, the length will be the
  70030. * `width`. In case of `left` or `right`, it will be the `height`.
  70031. *
  70032. * You can provide a single value (as `Number` or `String`), or a pair of values
  70033. * as `String` divided by a comma or one (or more) white spaces.<br />
  70034. * The latter is a deprecated method because it leads to confusion and will be
  70035. * removed in v2.<br />
  70036. * Additionally, it accepts additions and subtractions between different units.
  70037. * Note that multiplications and divisions aren't supported.
  70038. *
  70039. * Valid examples are:
  70040. * ```
  70041. * 10
  70042. * '10%'
  70043. * '10, 10'
  70044. * '10%, 10'
  70045. * '10 + 10%'
  70046. * '10 - 5vh + 3%'
  70047. * '-10px + 5vh, 5px - 6%'
  70048. * ```
  70049. * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
  70050. * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
  70051. * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).
  70052. *
  70053. * @memberof modifiers
  70054. * @inner
  70055. */
  70056. offset: {
  70057. /** @prop {number} order=200 - Index used to define the order of execution */
  70058. order: 200,
  70059. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  70060. enabled: true,
  70061. /** @prop {ModifierFn} */
  70062. fn: offset,
  70063. /** @prop {Number|String} offset=0
  70064. * The offset value as described in the modifier description
  70065. */
  70066. offset: 0
  70067. },
  70068. /**
  70069. * Modifier used to prevent the popper from being positioned outside the boundary.
  70070. *
  70071. * A scenario exists where the reference itself is not within the boundaries.<br />
  70072. * We can say it has "escaped the boundaries" — or just "escaped".<br />
  70073. * In this case we need to decide whether the popper should either:
  70074. *
  70075. * - detach from the reference and remain "trapped" in the boundaries, or
  70076. * - if it should ignore the boundary and "escape with its reference"
  70077. *
  70078. * When `escapeWithReference` is set to`true` and reference is completely
  70079. * outside its boundaries, the popper will overflow (or completely leave)
  70080. * the boundaries in order to remain attached to the edge of the reference.
  70081. *
  70082. * @memberof modifiers
  70083. * @inner
  70084. */
  70085. preventOverflow: {
  70086. /** @prop {number} order=300 - Index used to define the order of execution */
  70087. order: 300,
  70088. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  70089. enabled: true,
  70090. /** @prop {ModifierFn} */
  70091. fn: preventOverflow,
  70092. /**
  70093. * @prop {Array} [priority=['left','right','top','bottom']]
  70094. * Popper will try to prevent overflow following these priorities by default,
  70095. * then, it could overflow on the left and on top of the `boundariesElement`
  70096. */
  70097. priority: ['left', 'right', 'top', 'bottom'],
  70098. /**
  70099. * @prop {number} padding=5
  70100. * Amount of pixel used to define a minimum distance between the boundaries
  70101. * and the popper. This makes sure the popper always has a little padding
  70102. * between the edges of its container
  70103. */
  70104. padding: 5,
  70105. /**
  70106. * @prop {String|HTMLElement} boundariesElement='scrollParent'
  70107. * Boundaries used by the modifier. Can be `scrollParent`, `window`,
  70108. * `viewport` or any DOM element.
  70109. */
  70110. boundariesElement: 'scrollParent'
  70111. },
  70112. /**
  70113. * Modifier used to make sure the reference and its popper stay near each other
  70114. * without leaving any gap between the two. Especially useful when the arrow is
  70115. * enabled and you want to ensure that it points to its reference element.
  70116. * It cares only about the first axis. You can still have poppers with margin
  70117. * between the popper and its reference element.
  70118. * @memberof modifiers
  70119. * @inner
  70120. */
  70121. keepTogether: {
  70122. /** @prop {number} order=400 - Index used to define the order of execution */
  70123. order: 400,
  70124. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  70125. enabled: true,
  70126. /** @prop {ModifierFn} */
  70127. fn: keepTogether
  70128. },
  70129. /**
  70130. * This modifier is used to move the `arrowElement` of the popper to make
  70131. * sure it is positioned between the reference element and its popper element.
  70132. * It will read the outer size of the `arrowElement` node to detect how many
  70133. * pixels of conjunction are needed.
  70134. *
  70135. * It has no effect if no `arrowElement` is provided.
  70136. * @memberof modifiers
  70137. * @inner
  70138. */
  70139. arrow: {
  70140. /** @prop {number} order=500 - Index used to define the order of execution */
  70141. order: 500,
  70142. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  70143. enabled: true,
  70144. /** @prop {ModifierFn} */
  70145. fn: arrow,
  70146. /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
  70147. element: '[x-arrow]'
  70148. },
  70149. /**
  70150. * Modifier used to flip the popper's placement when it starts to overlap its
  70151. * reference element.
  70152. *
  70153. * Requires the `preventOverflow` modifier before it in order to work.
  70154. *
  70155. * **NOTE:** this modifier will interrupt the current update cycle and will
  70156. * restart it if it detects the need to flip the placement.
  70157. * @memberof modifiers
  70158. * @inner
  70159. */
  70160. flip: {
  70161. /** @prop {number} order=600 - Index used to define the order of execution */
  70162. order: 600,
  70163. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  70164. enabled: true,
  70165. /** @prop {ModifierFn} */
  70166. fn: flip,
  70167. /**
  70168. * @prop {String|Array} behavior='flip'
  70169. * The behavior used to change the popper's placement. It can be one of
  70170. * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
  70171. * placements (with optional variations)
  70172. */
  70173. behavior: 'flip',
  70174. /**
  70175. * @prop {number} padding=5
  70176. * The popper will flip if it hits the edges of the `boundariesElement`
  70177. */
  70178. padding: 5,
  70179. /**
  70180. * @prop {String|HTMLElement} boundariesElement='viewport'
  70181. * The element which will define the boundaries of the popper position.
  70182. * The popper will never be placed outside of the defined boundaries
  70183. * (except if `keepTogether` is enabled)
  70184. */
  70185. boundariesElement: 'viewport',
  70186. /**
  70187. * @prop {Boolean} flipVariations=false
  70188. * The popper will switch placement variation between `-start` and `-end` when
  70189. * the reference element overlaps its boundaries.
  70190. *
  70191. * The original placement should have a set variation.
  70192. */
  70193. flipVariations: false,
  70194. /**
  70195. * @prop {Boolean} flipVariationsByContent=false
  70196. * The popper will switch placement variation between `-start` and `-end` when
  70197. * the popper element overlaps its reference boundaries.
  70198. *
  70199. * The original placement should have a set variation.
  70200. */
  70201. flipVariationsByContent: false
  70202. },
  70203. /**
  70204. * Modifier used to make the popper flow toward the inner of the reference element.
  70205. * By default, when this modifier is disabled, the popper will be placed outside
  70206. * the reference element.
  70207. * @memberof modifiers
  70208. * @inner
  70209. */
  70210. inner: {
  70211. /** @prop {number} order=700 - Index used to define the order of execution */
  70212. order: 700,
  70213. /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
  70214. enabled: false,
  70215. /** @prop {ModifierFn} */
  70216. fn: inner
  70217. },
  70218. /**
  70219. * Modifier used to hide the popper when its reference element is outside of the
  70220. * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
  70221. * be used to hide with a CSS selector the popper when its reference is
  70222. * out of boundaries.
  70223. *
  70224. * Requires the `preventOverflow` modifier before it in order to work.
  70225. * @memberof modifiers
  70226. * @inner
  70227. */
  70228. hide: {
  70229. /** @prop {number} order=800 - Index used to define the order of execution */
  70230. order: 800,
  70231. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  70232. enabled: true,
  70233. /** @prop {ModifierFn} */
  70234. fn: hide
  70235. },
  70236. /**
  70237. * Computes the style that will be applied to the popper element to gets
  70238. * properly positioned.
  70239. *
  70240. * Note that this modifier will not touch the DOM, it just prepares the styles
  70241. * so that `applyStyle` modifier can apply it. This separation is useful
  70242. * in case you need to replace `applyStyle` with a custom implementation.
  70243. *
  70244. * This modifier has `850` as `order` value to maintain backward compatibility
  70245. * with previous versions of Popper.js. Expect the modifiers ordering method
  70246. * to change in future major versions of the library.
  70247. *
  70248. * @memberof modifiers
  70249. * @inner
  70250. */
  70251. computeStyle: {
  70252. /** @prop {number} order=850 - Index used to define the order of execution */
  70253. order: 850,
  70254. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  70255. enabled: true,
  70256. /** @prop {ModifierFn} */
  70257. fn: computeStyle,
  70258. /**
  70259. * @prop {Boolean} gpuAcceleration=true
  70260. * If true, it uses the CSS 3D transformation to position the popper.
  70261. * Otherwise, it will use the `top` and `left` properties
  70262. */
  70263. gpuAcceleration: true,
  70264. /**
  70265. * @prop {string} [x='bottom']
  70266. * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
  70267. * Change this if your popper should grow in a direction different from `bottom`
  70268. */
  70269. x: 'bottom',
  70270. /**
  70271. * @prop {string} [x='left']
  70272. * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
  70273. * Change this if your popper should grow in a direction different from `right`
  70274. */
  70275. y: 'right'
  70276. },
  70277. /**
  70278. * Applies the computed styles to the popper element.
  70279. *
  70280. * All the DOM manipulations are limited to this modifier. This is useful in case
  70281. * you want to integrate Popper.js inside a framework or view library and you
  70282. * want to delegate all the DOM manipulations to it.
  70283. *
  70284. * Note that if you disable this modifier, you must make sure the popper element
  70285. * has its position set to `absolute` before Popper.js can do its work!
  70286. *
  70287. * Just disable this modifier and define your own to achieve the desired effect.
  70288. *
  70289. * @memberof modifiers
  70290. * @inner
  70291. */
  70292. applyStyle: {
  70293. /** @prop {number} order=900 - Index used to define the order of execution */
  70294. order: 900,
  70295. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  70296. enabled: true,
  70297. /** @prop {ModifierFn} */
  70298. fn: applyStyle,
  70299. /** @prop {Function} */
  70300. onLoad: applyStyleOnLoad,
  70301. /**
  70302. * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
  70303. * @prop {Boolean} gpuAcceleration=true
  70304. * If true, it uses the CSS 3D transformation to position the popper.
  70305. * Otherwise, it will use the `top` and `left` properties
  70306. */
  70307. gpuAcceleration: undefined
  70308. }
  70309. };
  70310. /**
  70311. * The `dataObject` is an object containing all the information used by Popper.js.
  70312. * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
  70313. * @name dataObject
  70314. * @property {Object} data.instance The Popper.js instance
  70315. * @property {String} data.placement Placement applied to popper
  70316. * @property {String} data.originalPlacement Placement originally defined on init
  70317. * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
  70318. * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
  70319. * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
  70320. * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
  70321. * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
  70322. * @property {Object} data.boundaries Offsets of the popper boundaries
  70323. * @property {Object} data.offsets The measurements of popper, reference and arrow elements
  70324. * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
  70325. * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
  70326. * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
  70327. */
  70328. /**
  70329. * Default options provided to Popper.js constructor.<br />
  70330. * These can be overridden using the `options` argument of Popper.js.<br />
  70331. * To override an option, simply pass an object with the same
  70332. * structure of the `options` object, as the 3rd argument. For example:
  70333. * ```
  70334. * new Popper(ref, pop, {
  70335. * modifiers: {
  70336. * preventOverflow: { enabled: false }
  70337. * }
  70338. * })
  70339. * ```
  70340. * @type {Object}
  70341. * @static
  70342. * @memberof Popper
  70343. */
  70344. var Defaults = {
  70345. /**
  70346. * Popper's placement.
  70347. * @prop {Popper.placements} placement='bottom'
  70348. */
  70349. placement: 'bottom',
  70350. /**
  70351. * Set this to true if you want popper to position it self in 'fixed' mode
  70352. * @prop {Boolean} positionFixed=false
  70353. */
  70354. positionFixed: false,
  70355. /**
  70356. * Whether events (resize, scroll) are initially enabled.
  70357. * @prop {Boolean} eventsEnabled=true
  70358. */
  70359. eventsEnabled: true,
  70360. /**
  70361. * Set to true if you want to automatically remove the popper when
  70362. * you call the `destroy` method.
  70363. * @prop {Boolean} removeOnDestroy=false
  70364. */
  70365. removeOnDestroy: false,
  70366. /**
  70367. * Callback called when the popper is created.<br />
  70368. * By default, it is set to no-op.<br />
  70369. * Access Popper.js instance with `data.instance`.
  70370. * @prop {onCreate}
  70371. */
  70372. onCreate: function onCreate() {},
  70373. /**
  70374. * Callback called when the popper is updated. This callback is not called
  70375. * on the initialization/creation of the popper, but only on subsequent
  70376. * updates.<br />
  70377. * By default, it is set to no-op.<br />
  70378. * Access Popper.js instance with `data.instance`.
  70379. * @prop {onUpdate}
  70380. */
  70381. onUpdate: function onUpdate() {},
  70382. /**
  70383. * List of modifiers used to modify the offsets before they are applied to the popper.
  70384. * They provide most of the functionalities of Popper.js.
  70385. * @prop {modifiers}
  70386. */
  70387. modifiers: modifiers
  70388. };
  70389. /**
  70390. * @callback onCreate
  70391. * @param {dataObject} data
  70392. */
  70393. /**
  70394. * @callback onUpdate
  70395. * @param {dataObject} data
  70396. */
  70397. // Utils
  70398. // Methods
  70399. var Popper = function () {
  70400. /**
  70401. * Creates a new Popper.js instance.
  70402. * @class Popper
  70403. * @param {Element|referenceObject} reference - The reference element used to position the popper
  70404. * @param {Element} popper - The HTML / XML element used as the popper
  70405. * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
  70406. * @return {Object} instance - The generated Popper.js instance
  70407. */
  70408. function Popper(reference, popper) {
  70409. var _this = this;
  70410. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  70411. classCallCheck(this, Popper);
  70412. this.scheduleUpdate = function () {
  70413. return requestAnimationFrame(_this.update);
  70414. };
  70415. // make update() debounced, so that it only runs at most once-per-tick
  70416. this.update = debounce(this.update.bind(this));
  70417. // with {} we create a new object with the options inside it
  70418. this.options = _extends({}, Popper.Defaults, options);
  70419. // init state
  70420. this.state = {
  70421. isDestroyed: false,
  70422. isCreated: false,
  70423. scrollParents: []
  70424. };
  70425. // get reference and popper elements (allow jQuery wrappers)
  70426. this.reference = reference && reference.jquery ? reference[0] : reference;
  70427. this.popper = popper && popper.jquery ? popper[0] : popper;
  70428. // Deep merge modifiers options
  70429. this.options.modifiers = {};
  70430. Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
  70431. _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
  70432. });
  70433. // Refactoring modifiers' list (Object => Array)
  70434. this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
  70435. return _extends({
  70436. name: name
  70437. }, _this.options.modifiers[name]);
  70438. })
  70439. // sort the modifiers by order
  70440. .sort(function (a, b) {
  70441. return a.order - b.order;
  70442. });
  70443. // modifiers have the ability to execute arbitrary code when Popper.js get inited
  70444. // such code is executed in the same order of its modifier
  70445. // they could add new properties to their options configuration
  70446. // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
  70447. this.modifiers.forEach(function (modifierOptions) {
  70448. if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
  70449. modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
  70450. }
  70451. });
  70452. // fire the first update to position the popper in the right place
  70453. this.update();
  70454. var eventsEnabled = this.options.eventsEnabled;
  70455. if (eventsEnabled) {
  70456. // setup event listeners, they will take care of update the position in specific situations
  70457. this.enableEventListeners();
  70458. }
  70459. this.state.eventsEnabled = eventsEnabled;
  70460. }
  70461. // We can't use class properties because they don't get listed in the
  70462. // class prototype and break stuff like Sinon stubs
  70463. createClass(Popper, [{
  70464. key: 'update',
  70465. value: function update$$1() {
  70466. return update.call(this);
  70467. }
  70468. }, {
  70469. key: 'destroy',
  70470. value: function destroy$$1() {
  70471. return destroy.call(this);
  70472. }
  70473. }, {
  70474. key: 'enableEventListeners',
  70475. value: function enableEventListeners$$1() {
  70476. return enableEventListeners.call(this);
  70477. }
  70478. }, {
  70479. key: 'disableEventListeners',
  70480. value: function disableEventListeners$$1() {
  70481. return disableEventListeners.call(this);
  70482. }
  70483. /**
  70484. * Schedules an update. It will run on the next UI update available.
  70485. * @method scheduleUpdate
  70486. * @memberof Popper
  70487. */
  70488. /**
  70489. * Collection of utilities useful when writing custom modifiers.
  70490. * Starting from version 1.7, this method is available only if you
  70491. * include `popper-utils.js` before `popper.js`.
  70492. *
  70493. * **DEPRECATION**: This way to access PopperUtils is deprecated
  70494. * and will be removed in v2! Use the PopperUtils module directly instead.
  70495. * Due to the high instability of the methods contained in Utils, we can't
  70496. * guarantee them to follow semver. Use them at your own risk!
  70497. * @static
  70498. * @private
  70499. * @type {Object}
  70500. * @deprecated since version 1.8
  70501. * @member Utils
  70502. * @memberof Popper
  70503. */
  70504. }]);
  70505. return Popper;
  70506. }();
  70507. /**
  70508. * The `referenceObject` is an object that provides an interface compatible with Popper.js
  70509. * and lets you use it as replacement of a real DOM node.<br />
  70510. * You can use this method to position a popper relatively to a set of coordinates
  70511. * in case you don't have a DOM node to use as reference.
  70512. *
  70513. * ```
  70514. * new Popper(referenceObject, popperNode);
  70515. * ```
  70516. *
  70517. * NB: This feature isn't supported in Internet Explorer 10.
  70518. * @name referenceObject
  70519. * @property {Function} data.getBoundingClientRect
  70520. * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
  70521. * @property {number} data.clientWidth
  70522. * An ES6 getter that will return the width of the virtual reference element.
  70523. * @property {number} data.clientHeight
  70524. * An ES6 getter that will return the height of the virtual reference element.
  70525. */
  70526. Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
  70527. Popper.placements = placements;
  70528. Popper.Defaults = Defaults;
  70529. return Popper;
  70530. })));
  70531. //# sourceMappingURL=popper.js.map
  70532. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(117)))
  70533. /***/ }),
  70534. /* 117 */
  70535. /***/ (function(module, exports) {
  70536. var g;
  70537. // This works in non-strict mode
  70538. g = (function() {
  70539. return this;
  70540. })();
  70541. try {
  70542. // This works if eval is allowed (see CSP)
  70543. g = g || Function("return this")() || (1,eval)("this");
  70544. } catch(e) {
  70545. // This works if the window reference is available
  70546. if(typeof window === "object")
  70547. g = window;
  70548. }
  70549. // g can still be undefined, but nothing to do about it...
  70550. // We return undefined, instead of nothing here, so it's
  70551. // easier to handle this case. if(!global) { ...}
  70552. module.exports = g;
  70553. /***/ }),
  70554. /* 118 */
  70555. /***/ (function(module, exports, __webpack_require__) {
  70556. // 7.2.2 IsArray(argument)
  70557. var cof = __webpack_require__(41);
  70558. module.exports = Array.isArray || function isArray(arg) {
  70559. return cof(arg) == 'Array';
  70560. };
  70561. /***/ }),
  70562. /* 119 */
  70563. /***/ (function(module, exports, __webpack_require__) {
  70564. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  70565. var $keys = __webpack_require__(96);
  70566. var hiddenKeys = __webpack_require__(68).concat('length', 'prototype');
  70567. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  70568. return $keys(O, hiddenKeys);
  70569. };
  70570. /***/ }),
  70571. /* 120 */
  70572. /***/ (function(module, exports, __webpack_require__) {
  70573. "use strict";
  70574. Object.defineProperty(exports, "__esModule", {
  70575. value: true
  70576. });
  70577. exports.i18n = exports.use = exports.t = undefined;
  70578. var _getPrototypeOf = __webpack_require__(317);
  70579. var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
  70580. var _zhCN = __webpack_require__(320);
  70581. var _zhCN2 = _interopRequireDefault(_zhCN);
  70582. var _vue = __webpack_require__(16);
  70583. var _vue2 = _interopRequireDefault(_vue);
  70584. var _deepmerge = __webpack_require__(322);
  70585. var _deepmerge2 = _interopRequireDefault(_deepmerge);
  70586. var _format = __webpack_require__(323);
  70587. var _format2 = _interopRequireDefault(_format);
  70588. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  70589. var format = (0, _format2.default)(_vue2.default);
  70590. var lang = _zhCN2.default;
  70591. var merged = false;
  70592. var i18nHandler = function i18nHandler() {
  70593. var vuei18n = (0, _getPrototypeOf2.default)(this || _vue2.default).$t;
  70594. if (typeof vuei18n === 'function' && !!_vue2.default.locale) {
  70595. if (!merged) {
  70596. merged = true;
  70597. _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, { clone: true }));
  70598. }
  70599. return vuei18n.apply(this, arguments);
  70600. }
  70601. };
  70602. var t = exports.t = function t(path, options) {
  70603. var value = i18nHandler.apply(this, arguments);
  70604. if (value !== null && value !== undefined) return value;
  70605. var array = path.split('.');
  70606. var current = lang;
  70607. for (var i = 0, j = array.length; i < j; i++) {
  70608. var property = array[i];
  70609. value = current[property];
  70610. if (i === j - 1) return format(value, options);
  70611. if (!value) return '';
  70612. current = value;
  70613. }
  70614. return '';
  70615. };
  70616. var use = exports.use = function use(l) {
  70617. lang = l || lang;
  70618. };
  70619. var i18n = exports.i18n = function i18n(fn) {
  70620. i18nHandler = fn || i18nHandler;
  70621. };
  70622. exports.default = { use: use, t: t, i18n: i18n };
  70623. /***/ }),
  70624. /* 121 */
  70625. /***/ (function(module, exports, __webpack_require__) {
  70626. "use strict";
  70627. Object.defineProperty(exports, "__esModule", {
  70628. value: true
  70629. });
  70630. var _slicedToArray2 = __webpack_require__(26);
  70631. var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
  70632. var _defineProperty2 = __webpack_require__(2);
  70633. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  70634. var _newArrowCheck2 = __webpack_require__(1);
  70635. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  70636. var _icon = __webpack_require__(19);
  70637. var _icon2 = _interopRequireDefault(_icon);
  70638. var _emitter = __webpack_require__(4);
  70639. var _emitter2 = _interopRequireDefault(_emitter);
  70640. var _locale = __webpack_require__(6);
  70641. var _locale2 = _interopRequireDefault(_locale);
  70642. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  70643. var prefixCls = 'ivu-select';
  70644. exports.default = {
  70645. name: 'iSelectHead',
  70646. mixins: [_emitter2.default, _locale2.default],
  70647. components: { Icon: _icon2.default },
  70648. props: {
  70649. disabled: {
  70650. type: Boolean,
  70651. default: false
  70652. },
  70653. filterable: {
  70654. type: Boolean,
  70655. default: false
  70656. },
  70657. multiple: {
  70658. type: Boolean,
  70659. default: false
  70660. },
  70661. remote: {
  70662. type: Boolean,
  70663. default: false
  70664. },
  70665. initialLabel: {
  70666. type: [String, Number, Array]
  70667. },
  70668. values: {
  70669. type: Array,
  70670. default: function _default() {
  70671. (0, _newArrowCheck3.default)(undefined, undefined);
  70672. return [];
  70673. }.bind(undefined)
  70674. },
  70675. clearable: {
  70676. type: [Function, Boolean],
  70677. default: false
  70678. },
  70679. inputElementId: {
  70680. type: String
  70681. },
  70682. placeholder: {
  70683. type: String
  70684. },
  70685. queryProp: {
  70686. type: String,
  70687. default: ''
  70688. },
  70689. prefix: {
  70690. type: String
  70691. },
  70692. maxTagCount: {
  70693. type: Number
  70694. },
  70695. maxTagPlaceholder: {
  70696. type: Function
  70697. },
  70698. allowCreate: {
  70699. type: Boolean
  70700. },
  70701. showCreateItem: {
  70702. type: Boolean
  70703. }
  70704. },
  70705. data: function data() {
  70706. return {
  70707. prefixCls: prefixCls,
  70708. query: '',
  70709. inputLength: 20,
  70710. remoteInitialLabel: this.initialLabel,
  70711. preventRemoteCall: false
  70712. };
  70713. },
  70714. computed: {
  70715. singleDisplayClasses: function singleDisplayClasses() {
  70716. var _ref;
  70717. var filterable = this.filterable,
  70718. multiple = this.multiple,
  70719. showPlaceholder = this.showPlaceholder;
  70720. return [(_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-head-with-prefix', this.$slots.prefix || this.prefix), (0, _defineProperty3.default)(_ref, prefixCls + '-placeholder', showPlaceholder && !filterable), (0, _defineProperty3.default)(_ref, prefixCls + '-selected-value', !showPlaceholder && !multiple && !filterable), _ref)];
  70721. },
  70722. singleDisplayValue: function singleDisplayValue() {
  70723. if (this.multiple && this.values.length > 0 || this.filterable) return '';
  70724. return '' + String(this.selectedSingle) || this.localePlaceholder;
  70725. },
  70726. showPlaceholder: function showPlaceholder() {
  70727. var status = false;
  70728. if (!this.multiple) {
  70729. var value = this.values[0];
  70730. if (typeof value === 'undefined' || String(value).trim() === '') {
  70731. status = !this.remoteInitialLabel;
  70732. }
  70733. } else {
  70734. if (!this.values.length > 0) {
  70735. status = true;
  70736. }
  70737. }
  70738. return status;
  70739. },
  70740. resetSelect: function resetSelect() {
  70741. return !this.showPlaceholder && this.clearable;
  70742. },
  70743. inputStyle: function inputStyle() {
  70744. var style = {};
  70745. if (this.multiple) {
  70746. if (this.showPlaceholder) {
  70747. style.width = '100%';
  70748. } else {
  70749. style.width = String(this.inputLength) + 'px';
  70750. }
  70751. }
  70752. return style;
  70753. },
  70754. localePlaceholder: function localePlaceholder() {
  70755. if (this.placeholder === undefined) {
  70756. return this.t('i.select.placeholder');
  70757. } else {
  70758. return this.placeholder;
  70759. }
  70760. },
  70761. selectedSingle: function selectedSingle() {
  70762. var selected = this.values[0];
  70763. return selected ? selected.label : this.remoteInitialLabel || '';
  70764. },
  70765. selectedMultiple: function selectedMultiple() {
  70766. return this.multiple ? this.values : [];
  70767. },
  70768. headCls: function headCls() {
  70769. return (0, _defineProperty3.default)({}, prefixCls + '-head-flex', this.filterable && (this.$slots.prefix || this.prefix));
  70770. },
  70771. arrowType: function arrowType() {
  70772. var type = 'ios-arrow-down';
  70773. if (this.$IVIEW) {
  70774. if (this.$IVIEW.select.customArrow) {
  70775. type = '';
  70776. } else if (this.$IVIEW.select.arrow) {
  70777. type = this.$IVIEW.select.arrow;
  70778. }
  70779. }
  70780. return type;
  70781. },
  70782. customArrowType: function customArrowType() {
  70783. var type = '';
  70784. if (this.$IVIEW) {
  70785. if (this.$IVIEW.select.customArrow) {
  70786. type = this.$IVIEW.select.customArrow;
  70787. }
  70788. }
  70789. return type;
  70790. },
  70791. arrowSize: function arrowSize() {
  70792. var size = '';
  70793. if (this.$IVIEW) {
  70794. if (this.$IVIEW.select.arrowSize) {
  70795. size = this.$IVIEW.select.arrowSize;
  70796. }
  70797. }
  70798. return size;
  70799. }
  70800. },
  70801. methods: {
  70802. onInputFocus: function onInputFocus() {
  70803. this.$emit('on-input-focus');
  70804. },
  70805. onInputBlur: function onInputBlur() {
  70806. if (this.showCreateItem) return;
  70807. if (!this.values.length) this.query = '';
  70808. this.$emit('on-input-blur');
  70809. },
  70810. removeTag: function removeTag(value) {
  70811. if (this.disabled) return false;
  70812. this.dispatch('iSelect', 'on-select-selected', value);
  70813. },
  70814. resetInputState: function resetInputState() {
  70815. this.inputLength = this.$refs.input.value.length * 12 + 20;
  70816. this.$emit('on-keydown');
  70817. },
  70818. handleInputDelete: function handleInputDelete(e) {
  70819. var targetValue = e.target.value;
  70820. if (this.multiple && this.selectedMultiple.length && this.query === '' && targetValue === '') {
  70821. this.removeTag(this.selectedMultiple[this.selectedMultiple.length - 1]);
  70822. }
  70823. },
  70824. handleInputEnter: function handleInputEnter(e) {
  70825. this.$emit('on-enter');
  70826. if (this.showCreateItem) e.stopPropagation();
  70827. },
  70828. onHeaderClick: function onHeaderClick(e) {
  70829. if (this.filterable && e.target === this.$el) {
  70830. this.$refs.input.focus();
  70831. }
  70832. },
  70833. onClear: function onClear() {
  70834. this.$emit('on-clear');
  70835. }
  70836. },
  70837. watch: {
  70838. values: function values(_ref3) {
  70839. var _this = this;
  70840. var _ref4 = (0, _slicedToArray3.default)(_ref3, 1),
  70841. value = _ref4[0];
  70842. if (!this.filterable) return;
  70843. this.preventRemoteCall = true;
  70844. if (this.multiple) {
  70845. this.query = '';
  70846. this.preventRemoteCall = false;
  70847. return;
  70848. }
  70849. if (typeof value === 'undefined' || value === '' || value === null) this.query = '';else this.query = value.label;
  70850. this.$nextTick(function () {
  70851. (0, _newArrowCheck3.default)(this, _this);
  70852. return this.preventRemoteCall = false;
  70853. }.bind(this));
  70854. },
  70855. query: function query(val) {
  70856. if (this.preventRemoteCall) {
  70857. this.preventRemoteCall = false;
  70858. return;
  70859. }
  70860. this.$emit('on-query-change', val);
  70861. },
  70862. queryProp: function queryProp(query) {
  70863. if (query !== this.query) this.query = query;
  70864. }
  70865. }
  70866. };
  70867. /***/ }),
  70868. /* 122 */
  70869. /***/ (function(module, exports, __webpack_require__) {
  70870. "use strict";
  70871. Object.defineProperty(exports, "__esModule", {
  70872. value: true
  70873. });
  70874. var _newArrowCheck2 = __webpack_require__(1);
  70875. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  70876. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  70877. var returnArrayFn = function () {
  70878. (0, _newArrowCheck3.default)(undefined, undefined);
  70879. return [];
  70880. }.bind(undefined);
  70881. exports.default = {
  70882. props: {
  70883. options: {
  70884. type: Array,
  70885. default: returnArrayFn
  70886. },
  70887. slotOptions: {
  70888. type: Array,
  70889. default: returnArrayFn
  70890. },
  70891. slotUpdateHook: {
  70892. type: Function,
  70893. default: function _default() {
  70894. (0, _newArrowCheck3.default)(undefined, undefined);
  70895. }.bind(undefined)
  70896. }
  70897. },
  70898. render: function render(h) {
  70899. if (this.slotOptions !== this.$parent.$slots.default) this.slotUpdateHook();
  70900. return h('ul', [this.$slots.default, this.options]);
  70901. }
  70902. };
  70903. /***/ }),
  70904. /* 123 */
  70905. /***/ (function(module, exports, __webpack_require__) {
  70906. "use strict";
  70907. Object.defineProperty(exports, "__esModule", {
  70908. value: true
  70909. });
  70910. var _defineProperty2 = __webpack_require__(2);
  70911. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  70912. var _emitter = __webpack_require__(4);
  70913. var _emitter2 = _interopRequireDefault(_emitter);
  70914. var _form = __webpack_require__(11);
  70915. var _form2 = _interopRequireDefault(_form);
  70916. var _assist = __webpack_require__(3);
  70917. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  70918. var prefixCls = 'ivu-select-item';
  70919. exports.default = {
  70920. name: 'iOption',
  70921. componentName: 'select-item',
  70922. mixins: [_emitter2.default, _form2.default],
  70923. props: {
  70924. value: {
  70925. type: [String, Number],
  70926. required: true
  70927. },
  70928. label: {
  70929. type: [String, Number]
  70930. },
  70931. disabled: {
  70932. type: Boolean,
  70933. default: false
  70934. },
  70935. selected: {
  70936. type: Boolean,
  70937. default: false
  70938. },
  70939. isFocused: {
  70940. type: Boolean,
  70941. default: false
  70942. },
  70943. tag: {
  70944. type: [String, Number]
  70945. }
  70946. },
  70947. data: function data() {
  70948. return {
  70949. searchLabel: '',
  70950. autoComplete: false
  70951. };
  70952. },
  70953. computed: {
  70954. classes: function classes() {
  70955. var _ref;
  70956. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-disabled', this.itemDisabled), (0, _defineProperty3.default)(_ref, prefixCls + '-selected', this.selected && !this.autoComplete), (0, _defineProperty3.default)(_ref, prefixCls + '-focus', this.isFocused), _ref)];
  70957. },
  70958. showLabel: function showLabel() {
  70959. return this.label ? this.label : this.value;
  70960. },
  70961. optionLabel: function optionLabel() {
  70962. return this.label || this.$el && this.$el.textContent;
  70963. }
  70964. },
  70965. methods: {
  70966. select: function select() {
  70967. if (this.itemDisabled) return false;
  70968. this.dispatch('iSelect', 'on-select-selected', {
  70969. value: this.value,
  70970. label: this.optionLabel,
  70971. tag: this.tag
  70972. });
  70973. this.$emit('on-select-selected', {
  70974. value: this.value,
  70975. label: this.optionLabel,
  70976. tag: this.tag
  70977. });
  70978. }
  70979. },
  70980. mounted: function mounted() {
  70981. var Select = (0, _assist.findComponentUpward)(this, 'iSelect');
  70982. if (Select) this.autoComplete = Select.autoComplete;
  70983. }
  70984. };
  70985. /***/ }),
  70986. /* 124 */
  70987. /***/ (function(module, exports, __webpack_require__) {
  70988. "use strict";
  70989. Object.defineProperty(exports, "__esModule", {
  70990. value: true
  70991. });
  70992. var _newArrowCheck2 = __webpack_require__(1);
  70993. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  70994. var _isNan = __webpack_require__(329);
  70995. var _isNan2 = _interopRequireDefault(_isNan);
  70996. var _defineProperty2 = __webpack_require__(2);
  70997. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  70998. var _assist = __webpack_require__(3);
  70999. var _calcTextareaHeight = __webpack_require__(332);
  71000. var _calcTextareaHeight2 = _interopRequireDefault(_calcTextareaHeight);
  71001. var _emitter = __webpack_require__(4);
  71002. var _emitter2 = _interopRequireDefault(_emitter);
  71003. var _form = __webpack_require__(11);
  71004. var _form2 = _interopRequireDefault(_form);
  71005. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  71006. var prefixCls = 'ivu-input';
  71007. exports.default = {
  71008. name: 'Input',
  71009. mixins: [_emitter2.default, _form2.default],
  71010. props: {
  71011. type: {
  71012. validator: function validator(value) {
  71013. return (0, _assist.oneOf)(value, ['text', 'textarea', 'password', 'url', 'email', 'date', 'number', 'tel']);
  71014. },
  71015. default: 'text'
  71016. },
  71017. value: {
  71018. type: [String, Number],
  71019. default: ''
  71020. },
  71021. size: {
  71022. validator: function validator(value) {
  71023. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  71024. },
  71025. default: function _default() {
  71026. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  71027. }
  71028. },
  71029. placeholder: {
  71030. type: String,
  71031. default: ''
  71032. },
  71033. maxlength: {
  71034. type: [String, Number]
  71035. },
  71036. disabled: {
  71037. type: Boolean,
  71038. default: false
  71039. },
  71040. icon: String,
  71041. autosize: {
  71042. type: [Boolean, Object],
  71043. default: false
  71044. },
  71045. rows: {
  71046. type: Number,
  71047. default: 2
  71048. },
  71049. readonly: {
  71050. type: Boolean,
  71051. default: false
  71052. },
  71053. name: {
  71054. type: String
  71055. },
  71056. number: {
  71057. type: Boolean,
  71058. default: false
  71059. },
  71060. autofocus: {
  71061. type: Boolean,
  71062. default: false
  71063. },
  71064. spellcheck: {
  71065. type: Boolean,
  71066. default: false
  71067. },
  71068. autocomplete: {
  71069. type: String,
  71070. default: 'off'
  71071. },
  71072. clearable: {
  71073. type: Boolean,
  71074. default: false
  71075. },
  71076. elementId: {
  71077. type: String
  71078. },
  71079. wrap: {
  71080. validator: function validator(value) {
  71081. return (0, _assist.oneOf)(value, ['hard', 'soft']);
  71082. },
  71083. default: 'soft'
  71084. },
  71085. prefix: {
  71086. type: String,
  71087. default: ''
  71088. },
  71089. suffix: {
  71090. type: String,
  71091. default: ''
  71092. },
  71093. search: {
  71094. type: Boolean,
  71095. default: false
  71096. },
  71097. enterButton: {
  71098. type: [Boolean, String],
  71099. default: false
  71100. },
  71101. showWordLimit: {
  71102. type: Boolean,
  71103. default: false
  71104. },
  71105. password: {
  71106. type: Boolean,
  71107. default: false
  71108. },
  71109. border: {
  71110. type: Boolean,
  71111. default: true
  71112. }
  71113. },
  71114. data: function data() {
  71115. return {
  71116. currentValue: this.value,
  71117. prefixCls: prefixCls,
  71118. slotReady: false,
  71119. textareaStyles: {},
  71120. isOnComposition: false,
  71121. showPassword: false,
  71122. clearableIconOffset: 0
  71123. };
  71124. },
  71125. computed: {
  71126. currentType: function currentType() {
  71127. var type = this.type;
  71128. if (type === 'password' && this.password && this.showPassword) type = 'text';
  71129. return type;
  71130. },
  71131. prepend: function prepend() {
  71132. var state = false;
  71133. if (this.type !== 'textarea') state = this.$slots.prepend !== undefined;
  71134. return state;
  71135. },
  71136. append: function append() {
  71137. var state = false;
  71138. if (this.type !== 'textarea') state = this.$slots.append !== undefined;
  71139. return state;
  71140. },
  71141. showPrefix: function showPrefix() {
  71142. var state = false;
  71143. if (this.type !== 'textarea') state = this.prefix !== '' || this.$slots.prefix !== undefined;
  71144. return state;
  71145. },
  71146. showSuffix: function showSuffix() {
  71147. var state = false;
  71148. if (this.type !== 'textarea') state = this.suffix !== '' || this.$slots.suffix !== undefined;
  71149. return state;
  71150. },
  71151. wrapClasses: function wrapClasses() {
  71152. var _ref;
  71153. return [prefixCls + '-wrapper', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-wrapper-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref, prefixCls + '-type-' + String(this.type), this.type), (0, _defineProperty3.default)(_ref, prefixCls + '-group', this.prepend || this.append || this.search && this.enterButton), (0, _defineProperty3.default)(_ref, prefixCls + '-group-' + String(this.size), (this.prepend || this.append || this.search && this.enterButton) && !!this.size), (0, _defineProperty3.default)(_ref, prefixCls + '-group-with-prepend', this.prepend), (0, _defineProperty3.default)(_ref, prefixCls + '-group-with-append', this.append || this.search && this.enterButton), (0, _defineProperty3.default)(_ref, prefixCls + '-hide-icon', this.append), (0, _defineProperty3.default)(_ref, prefixCls + '-with-search', this.search && this.enterButton), (0, _defineProperty3.default)(_ref, prefixCls + '-wrapper-disabled', this.itemDisabled), _ref)];
  71154. },
  71155. inputClasses: function inputClasses() {
  71156. var _ref2;
  71157. return ['' + prefixCls, (_ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref2, prefixCls + '-disabled', this.itemDisabled), (0, _defineProperty3.default)(_ref2, prefixCls + '-no-border', !this.border), (0, _defineProperty3.default)(_ref2, prefixCls + '-with-prefix', this.showPrefix), (0, _defineProperty3.default)(_ref2, prefixCls + '-with-suffix', this.showSuffix || this.search && this.enterButton === false), _ref2)];
  71158. },
  71159. textareaClasses: function textareaClasses() {
  71160. var _ref3;
  71161. return ['' + prefixCls, (_ref3 = {}, (0, _defineProperty3.default)(_ref3, prefixCls + '-disabled', this.itemDisabled), (0, _defineProperty3.default)(_ref3, prefixCls + '-no-border', !this.border), _ref3)];
  71162. },
  71163. upperLimit: function upperLimit() {
  71164. return this.maxlength;
  71165. },
  71166. textLength: function textLength() {
  71167. if (typeof this.value === 'number') {
  71168. return String(this.value).length;
  71169. }
  71170. return (this.value || '').length;
  71171. },
  71172. clearableStyles: function clearableStyles() {
  71173. var style = {};
  71174. var offset = this.clearableIconOffset;
  71175. if (offset) style.transform = 'translateX(-' + String(offset) + 'px)';
  71176. return style;
  71177. }
  71178. },
  71179. methods: {
  71180. handleEnter: function handleEnter(event) {
  71181. this.$emit('on-enter', event);
  71182. if (this.search) this.$emit('on-search', this.currentValue);
  71183. },
  71184. handleKeydown: function handleKeydown(event) {
  71185. this.$emit('on-keydown', event);
  71186. },
  71187. handleKeypress: function handleKeypress(event) {
  71188. this.$emit('on-keypress', event);
  71189. },
  71190. handleKeyup: function handleKeyup(event) {
  71191. this.$emit('on-keyup', event);
  71192. },
  71193. handleIconClick: function handleIconClick(event) {
  71194. this.$emit('on-click', event);
  71195. },
  71196. handleFocus: function handleFocus(event) {
  71197. this.$emit('on-focus', event);
  71198. },
  71199. handleBlur: function handleBlur(event) {
  71200. this.$emit('on-blur', event);
  71201. if (!(0, _assist.findComponentUpward)(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) {
  71202. this.dispatch('FormItem', 'on-form-blur', this.currentValue);
  71203. }
  71204. },
  71205. handleComposition: function handleComposition(event) {
  71206. if (event.type === 'compositionstart') {
  71207. this.isOnComposition = true;
  71208. }
  71209. if (event.type === 'compositionend') {
  71210. this.isOnComposition = false;
  71211. this.handleInput(event);
  71212. }
  71213. },
  71214. handleInput: function handleInput(event) {
  71215. if (this.isOnComposition) return;
  71216. var value = event.target.value;
  71217. if (this.number && value !== '') value = (0, _isNan2.default)(Number(value)) ? value : Number(value);
  71218. this.$emit('input', value);
  71219. this.setCurrentValue(value);
  71220. this.$emit('on-change', event);
  71221. },
  71222. handleChange: function handleChange(event) {
  71223. this.$emit('on-input-change', event);
  71224. },
  71225. setCurrentValue: function setCurrentValue(value) {
  71226. var _this = this;
  71227. if (value === this.currentValue) return;
  71228. this.$nextTick(function () {
  71229. (0, _newArrowCheck3.default)(this, _this);
  71230. this.resizeTextarea();
  71231. }.bind(this));
  71232. this.currentValue = value;
  71233. if (!(0, _assist.findComponentUpward)(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) {
  71234. this.dispatch('FormItem', 'on-form-change', value);
  71235. }
  71236. },
  71237. resizeTextarea: function resizeTextarea() {
  71238. var autosize = this.autosize;
  71239. if (!autosize || this.type !== 'textarea') {
  71240. return false;
  71241. }
  71242. var minRows = autosize.minRows;
  71243. var maxRows = autosize.maxRows;
  71244. this.textareaStyles = (0, _calcTextareaHeight2.default)(this.$refs.textarea, minRows, maxRows);
  71245. },
  71246. focus: function focus(option) {
  71247. var $el = this.type === 'textarea' ? this.$refs.textarea : this.$refs.input;
  71248. $el.focus(option);
  71249. var _ref4 = option || {},
  71250. cursor = _ref4.cursor;
  71251. if (cursor) {
  71252. var len = $el.value.length;
  71253. switch (cursor) {
  71254. case 'start':
  71255. $el.setSelectionRange(0, 0);
  71256. break;
  71257. case 'end':
  71258. $el.setSelectionRange(len, len);
  71259. break;
  71260. default:
  71261. $el.setSelectionRange(0, len);
  71262. }
  71263. }
  71264. },
  71265. blur: function blur() {
  71266. if (this.type === 'textarea') {
  71267. this.$refs.textarea.blur();
  71268. } else {
  71269. this.$refs.input.blur();
  71270. }
  71271. },
  71272. handleClear: function handleClear() {
  71273. var e = { target: { value: '' } };
  71274. this.$emit('input', '');
  71275. this.setCurrentValue('');
  71276. this.$emit('on-change', e);
  71277. this.$emit('on-clear');
  71278. },
  71279. handleSearch: function handleSearch() {
  71280. if (this.itemDisabled) return false;
  71281. this.$refs.input.focus();
  71282. this.$emit('on-search', this.currentValue);
  71283. },
  71284. handleToggleShowPassword: function handleToggleShowPassword() {
  71285. var _this2 = this;
  71286. if (this.itemDisabled) return false;
  71287. this.showPassword = !this.showPassword;
  71288. this.focus();
  71289. var len = this.currentValue.length;
  71290. setTimeout(function () {
  71291. (0, _newArrowCheck3.default)(this, _this2);
  71292. this.$refs.input.setSelectionRange(len, len);
  71293. }.bind(this), 0);
  71294. },
  71295. handleCalcIconOffset: function handleCalcIconOffset() {
  71296. var $el = this.$el.querySelectorAll('.ivu-input-group-append')[0];
  71297. if ($el) {
  71298. this.clearableIconOffset = $el.offsetWidth;
  71299. } else {
  71300. this.clearableIconOffset = 0;
  71301. }
  71302. }
  71303. },
  71304. watch: {
  71305. value: function value(val) {
  71306. this.setCurrentValue(val);
  71307. },
  71308. type: function type() {
  71309. this.$nextTick(this.handleCalcIconOffset);
  71310. }
  71311. },
  71312. mounted: function mounted() {
  71313. this.slotReady = true;
  71314. this.resizeTextarea();
  71315. this.handleCalcIconOffset();
  71316. },
  71317. updated: function updated() {
  71318. this.$nextTick(this.handleCalcIconOffset);
  71319. }
  71320. };
  71321. /***/ }),
  71322. /* 125 */
  71323. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  71324. "use strict";
  71325. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  71326. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_avatar_vue__ = __webpack_require__(126);
  71327. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_avatar_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_avatar_vue__);
  71328. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_avatar_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_avatar_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  71329. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_265ad4ab_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_avatar_vue__ = __webpack_require__(342);
  71330. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_265ad4ab_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_avatar_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_265ad4ab_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_avatar_vue__);
  71331. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  71332. /* script */
  71333. /* template */
  71334. /* template functional */
  71335. var __vue_template_functional__ = false
  71336. /* styles */
  71337. var __vue_styles__ = null
  71338. /* scopeId */
  71339. var __vue_scopeId__ = null
  71340. /* moduleIdentifier (server only) */
  71341. var __vue_module_identifier__ = null
  71342. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  71343. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_avatar_vue___default.a,
  71344. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_265ad4ab_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_avatar_vue__["render"],
  71345. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_265ad4ab_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_avatar_vue__["staticRenderFns"],
  71346. __vue_template_functional__,
  71347. __vue_styles__,
  71348. __vue_scopeId__,
  71349. __vue_module_identifier__
  71350. )
  71351. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  71352. /***/ }),
  71353. /* 126 */
  71354. /***/ (function(module, exports, __webpack_require__) {
  71355. "use strict";
  71356. Object.defineProperty(exports, "__esModule", {
  71357. value: true
  71358. });
  71359. var _defineProperty2 = __webpack_require__(2);
  71360. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  71361. var _icon = __webpack_require__(19);
  71362. var _icon2 = _interopRequireDefault(_icon);
  71363. var _assist = __webpack_require__(3);
  71364. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  71365. var prefixCls = 'ivu-avatar';
  71366. var sizeList = ['small', 'large', 'default'];
  71367. exports.default = {
  71368. name: 'Avatar',
  71369. components: { Icon: _icon2.default },
  71370. props: {
  71371. shape: {
  71372. validator: function validator(value) {
  71373. return (0, _assist.oneOf)(value, ['circle', 'square']);
  71374. },
  71375. default: 'circle'
  71376. },
  71377. size: {
  71378. type: [String, Number],
  71379. default: function _default() {
  71380. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  71381. }
  71382. },
  71383. src: {
  71384. type: String
  71385. },
  71386. icon: {
  71387. type: String
  71388. },
  71389. customIcon: {
  71390. type: String,
  71391. default: ''
  71392. }
  71393. },
  71394. data: function data() {
  71395. return {
  71396. prefixCls: prefixCls,
  71397. scale: 1,
  71398. childrenWidth: 0,
  71399. isSlotShow: false,
  71400. slotTemp: null
  71401. };
  71402. },
  71403. computed: {
  71404. classes: function classes() {
  71405. var _ref;
  71406. return ['' + prefixCls, prefixCls + '-' + String(this.shape), (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-image', !!this.src), (0, _defineProperty3.default)(_ref, prefixCls + '-icon', !!this.icon || !!this.customIcon), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.size), (0, _assist.oneOf)(this.size, sizeList)), _ref)];
  71407. },
  71408. styles: function styles() {
  71409. var style = {};
  71410. if (this.size && !(0, _assist.oneOf)(this.size, sizeList)) {
  71411. style.width = String(this.size) + 'px';
  71412. style.height = String(this.size) + 'px';
  71413. style.lineHeight = String(this.size) + 'px';
  71414. style.fontSize = this.size / 2 + 'px';
  71415. }
  71416. return style;
  71417. },
  71418. childrenStyle: function childrenStyle() {
  71419. var style = {};
  71420. if (this.isSlotShow) {
  71421. style = {
  71422. msTransform: 'scale(' + String(this.scale) + ')',
  71423. WebkitTransform: 'scale(' + String(this.scale) + ')',
  71424. transform: 'scale(' + String(this.scale) + ')',
  71425. position: 'absolute',
  71426. display: 'inline-block',
  71427. left: 'calc(50% - ' + String(Math.round(this.childrenWidth / 2)) + 'px)'
  71428. };
  71429. }
  71430. return style;
  71431. }
  71432. },
  71433. watch: {
  71434. size: function size(val, oldVal) {
  71435. if (val !== oldVal) this.setScale();
  71436. }
  71437. },
  71438. methods: {
  71439. setScale: function setScale() {
  71440. this.isSlotShow = !this.src && !this.icon;
  71441. if (this.$refs.children) {
  71442. this.childrenWidth = this.$refs.children.offsetWidth;
  71443. var avatarWidth = this.$el.getBoundingClientRect().width;
  71444. if (avatarWidth - 8 < this.childrenWidth) {
  71445. this.scale = (avatarWidth - 8) / this.childrenWidth;
  71446. } else {
  71447. this.scale = 1;
  71448. }
  71449. }
  71450. },
  71451. handleError: function handleError(e) {
  71452. this.$emit('on-error', e);
  71453. }
  71454. },
  71455. beforeCreate: function beforeCreate() {
  71456. this.slotTemp = this.$slots.default;
  71457. },
  71458. mounted: function mounted() {
  71459. this.setScale();
  71460. },
  71461. updated: function updated() {
  71462. if (this.$slots.default !== this.slotTemp) {
  71463. this.slotTemp = this.$slots.default;
  71464. this.setScale();
  71465. }
  71466. }
  71467. };
  71468. /***/ }),
  71469. /* 127 */
  71470. /***/ (function(module, exports, __webpack_require__) {
  71471. "use strict";
  71472. Object.defineProperty(exports, "__esModule", {
  71473. value: true
  71474. });
  71475. var _defineProperty2 = __webpack_require__(2);
  71476. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  71477. var _assist = __webpack_require__(3);
  71478. var _dom = __webpack_require__(12);
  71479. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  71480. var prefixCls = 'ivu-back-top';
  71481. exports.default = {
  71482. props: {
  71483. height: {
  71484. type: Number,
  71485. default: 400
  71486. },
  71487. bottom: {
  71488. type: Number,
  71489. default: 30
  71490. },
  71491. right: {
  71492. type: Number,
  71493. default: 30
  71494. },
  71495. duration: {
  71496. type: Number,
  71497. default: 1000
  71498. }
  71499. },
  71500. data: function data() {
  71501. return {
  71502. backTop: false
  71503. };
  71504. },
  71505. mounted: function mounted() {
  71506. (0, _dom.on)(window, 'scroll', this.handleScroll);
  71507. (0, _dom.on)(window, 'resize', this.handleScroll);
  71508. },
  71509. beforeDestroy: function beforeDestroy() {
  71510. (0, _dom.off)(window, 'scroll', this.handleScroll);
  71511. (0, _dom.off)(window, 'resize', this.handleScroll);
  71512. },
  71513. computed: {
  71514. classes: function classes() {
  71515. return ['' + prefixCls, (0, _defineProperty3.default)({}, prefixCls + '-show', this.backTop)];
  71516. },
  71517. styles: function styles() {
  71518. return {
  71519. bottom: String(this.bottom) + 'px',
  71520. right: String(this.right) + 'px'
  71521. };
  71522. },
  71523. innerClasses: function innerClasses() {
  71524. return prefixCls + '-inner';
  71525. }
  71526. },
  71527. methods: {
  71528. handleScroll: function handleScroll() {
  71529. this.backTop = window.pageYOffset >= this.height;
  71530. },
  71531. back: function back() {
  71532. var sTop = document.documentElement.scrollTop || document.body.scrollTop;
  71533. (0, _assist.scrollTop)(window, sTop, 0, this.duration);
  71534. this.$emit('on-click');
  71535. }
  71536. }
  71537. };
  71538. /***/ }),
  71539. /* 128 */
  71540. /***/ (function(module, exports, __webpack_require__) {
  71541. "use strict";
  71542. Object.defineProperty(exports, "__esModule", {
  71543. value: true
  71544. });
  71545. var _defineProperty2 = __webpack_require__(2);
  71546. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  71547. var _assist = __webpack_require__(3);
  71548. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  71549. var initColorList = ['blue', 'green', 'red', 'yellow', 'pink', 'magenta', 'volcano', 'orange', 'gold', 'lime', 'cyan', 'geekblue', 'purple'];
  71550. var prefixCls = 'ivu-badge';
  71551. exports.default = {
  71552. name: 'Badge',
  71553. props: {
  71554. count: Number,
  71555. dot: {
  71556. type: Boolean,
  71557. default: false
  71558. },
  71559. overflowCount: {
  71560. type: [Number, String],
  71561. default: 99
  71562. },
  71563. className: String,
  71564. showZero: {
  71565. type: Boolean,
  71566. default: false
  71567. },
  71568. text: {
  71569. type: String,
  71570. default: ''
  71571. },
  71572. status: {
  71573. validator: function validator(value) {
  71574. return (0, _assist.oneOf)(value, ['success', 'processing', 'default', 'error', 'warning']);
  71575. }
  71576. },
  71577. type: {
  71578. validator: function validator(value) {
  71579. return (0, _assist.oneOf)(value, ['success', 'primary', 'normal', 'error', 'warning', 'info']);
  71580. }
  71581. },
  71582. offset: {
  71583. type: Array
  71584. },
  71585. color: {
  71586. type: String
  71587. }
  71588. },
  71589. computed: {
  71590. classes: function classes() {
  71591. return '' + prefixCls;
  71592. },
  71593. dotClasses: function dotClasses() {
  71594. return prefixCls + '-dot';
  71595. },
  71596. countClasses: function countClasses() {
  71597. var _ref;
  71598. return [prefixCls + '-count', (_ref = {}, (0, _defineProperty3.default)(_ref, '' + String(this.className), !!this.className), (0, _defineProperty3.default)(_ref, prefixCls + '-count-alone', this.alone), (0, _defineProperty3.default)(_ref, prefixCls + '-count-' + String(this.type), !!this.type), _ref)];
  71599. },
  71600. customCountClasses: function customCountClasses() {
  71601. return [prefixCls + '-count', prefixCls + '-count-custom', (0, _defineProperty3.default)({}, '' + String(this.className), !!this.className)];
  71602. },
  71603. statusClasses: function statusClasses() {
  71604. var _ref3;
  71605. return [prefixCls + '-status-dot', (_ref3 = {}, (0, _defineProperty3.default)(_ref3, prefixCls + '-status-' + String(this.status), !!this.status), (0, _defineProperty3.default)(_ref3, prefixCls + '-status-' + String(this.color), !!this.color && (0, _assist.oneOf)(this.color, initColorList)), _ref3)];
  71606. },
  71607. statusStyles: function statusStyles() {
  71608. return (0, _assist.oneOf)(this.color, initColorList) ? {} : { backgroundColor: this.color };
  71609. },
  71610. styles: function styles() {
  71611. var style = {};
  71612. if (this.offset && this.offset.length === 2) {
  71613. style['margin-top'] = String(this.offset[0]) + 'px';
  71614. style['margin-right'] = String(this.offset[1]) + 'px';
  71615. }
  71616. return style;
  71617. },
  71618. finalCount: function finalCount() {
  71619. if (this.text !== '') return this.text;
  71620. return parseInt(this.count) >= parseInt(this.overflowCount) ? String(this.overflowCount) + '+' : this.count;
  71621. },
  71622. badge: function badge() {
  71623. var status = false;
  71624. if (this.count) {
  71625. status = !(parseInt(this.count) === 0);
  71626. }
  71627. if (this.dot) {
  71628. status = true;
  71629. if (this.count !== null) {
  71630. if (parseInt(this.count) === 0) {
  71631. status = false;
  71632. }
  71633. }
  71634. }
  71635. if (this.text !== '') status = true;
  71636. return status || this.showZero;
  71637. },
  71638. hasCount: function hasCount() {
  71639. if (this.count || this.text !== '') return true;
  71640. if (this.showZero && parseInt(this.count) === 0) return true;else return false;
  71641. },
  71642. alone: function alone() {
  71643. return this.$slots.default === undefined;
  71644. }
  71645. }
  71646. };
  71647. /***/ }),
  71648. /* 129 */
  71649. /***/ (function(module, exports, __webpack_require__) {
  71650. "use strict";
  71651. Object.defineProperty(exports, "__esModule", {
  71652. value: true
  71653. });
  71654. var _newArrowCheck2 = __webpack_require__(1);
  71655. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  71656. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  71657. var prefixCls = 'ivu-breadcrumb';
  71658. exports.default = {
  71659. name: 'Breadcrumb',
  71660. props: {
  71661. separator: {
  71662. type: String,
  71663. default: '/'
  71664. }
  71665. },
  71666. computed: {
  71667. classes: function classes() {
  71668. return '' + prefixCls;
  71669. }
  71670. },
  71671. mounted: function mounted() {
  71672. this.updateChildren();
  71673. },
  71674. updated: function updated() {
  71675. var _this = this;
  71676. this.$nextTick(function () {
  71677. (0, _newArrowCheck3.default)(this, _this);
  71678. this.updateChildren();
  71679. }.bind(this));
  71680. },
  71681. methods: {
  71682. updateChildren: function updateChildren() {
  71683. var _this2 = this;
  71684. this.$children.forEach(function (child) {
  71685. (0, _newArrowCheck3.default)(this, _this2);
  71686. child.separator = this.separator;
  71687. }.bind(this));
  71688. }
  71689. },
  71690. watch: {
  71691. separator: function separator() {
  71692. this.updateChildren();
  71693. }
  71694. }
  71695. };
  71696. /***/ }),
  71697. /* 130 */
  71698. /***/ (function(module, exports, __webpack_require__) {
  71699. "use strict";
  71700. Object.defineProperty(exports, "__esModule", {
  71701. value: true
  71702. });
  71703. var _link = __webpack_require__(48);
  71704. var _link2 = _interopRequireDefault(_link);
  71705. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  71706. var prefixCls = 'ivu-breadcrumb-item';
  71707. exports.default = {
  71708. name: 'BreadcrumbItem',
  71709. mixins: [_link2.default],
  71710. props: {},
  71711. data: function data() {
  71712. return {
  71713. separator: '',
  71714. showSeparator: false
  71715. };
  71716. },
  71717. computed: {
  71718. linkClasses: function linkClasses() {
  71719. return prefixCls + '-link';
  71720. },
  71721. separatorClasses: function separatorClasses() {
  71722. return prefixCls + '-separator';
  71723. }
  71724. },
  71725. mounted: function mounted() {
  71726. this.showSeparator = this.$slots.separator !== undefined;
  71727. }
  71728. };
  71729. /***/ }),
  71730. /* 131 */
  71731. /***/ (function(module, exports, __webpack_require__) {
  71732. "use strict";
  71733. Object.defineProperty(exports, "__esModule", {
  71734. value: true
  71735. });
  71736. var _defineProperty2 = __webpack_require__(2);
  71737. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  71738. var _icon = __webpack_require__(19);
  71739. var _icon2 = _interopRequireDefault(_icon);
  71740. var _assist = __webpack_require__(3);
  71741. var _link = __webpack_require__(48);
  71742. var _link2 = _interopRequireDefault(_link);
  71743. var _form = __webpack_require__(11);
  71744. var _form2 = _interopRequireDefault(_form);
  71745. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  71746. var prefixCls = 'ivu-btn';
  71747. exports.default = {
  71748. name: 'Button',
  71749. mixins: [_link2.default, _form2.default],
  71750. components: { Icon: _icon2.default },
  71751. props: {
  71752. type: {
  71753. validator: function validator(value) {
  71754. return (0, _assist.oneOf)(value, ['default', 'primary', 'dashed', 'text', 'info', 'success', 'warning', 'error']);
  71755. },
  71756. default: 'default'
  71757. },
  71758. shape: {
  71759. validator: function validator(value) {
  71760. return (0, _assist.oneOf)(value, ['circle', 'circle-outline']);
  71761. }
  71762. },
  71763. size: {
  71764. validator: function validator(value) {
  71765. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  71766. },
  71767. default: function _default() {
  71768. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  71769. }
  71770. },
  71771. loading: Boolean,
  71772. disabled: Boolean,
  71773. htmlType: {
  71774. default: 'button',
  71775. validator: function validator(value) {
  71776. return (0, _assist.oneOf)(value, ['button', 'submit', 'reset']);
  71777. }
  71778. },
  71779. icon: {
  71780. type: String,
  71781. default: ''
  71782. },
  71783. customIcon: {
  71784. type: String,
  71785. default: ''
  71786. },
  71787. long: {
  71788. type: Boolean,
  71789. default: false
  71790. },
  71791. ghost: {
  71792. type: Boolean,
  71793. default: false
  71794. }
  71795. },
  71796. computed: {
  71797. showSlot: function showSlot() {
  71798. return !!this.$slots.default;
  71799. },
  71800. classes: function classes() {
  71801. var _ref;
  71802. return ['' + prefixCls, prefixCls + '-' + String(this.type), (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-long', this.long), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.shape), !!this.shape), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.size), this.size !== 'default'), (0, _defineProperty3.default)(_ref, prefixCls + '-loading', this.loading != null && this.loading), (0, _defineProperty3.default)(_ref, prefixCls + '-icon-only', !this.showSlot && (!!this.icon || !!this.customIcon || this.loading)), (0, _defineProperty3.default)(_ref, prefixCls + '-ghost', this.ghost), _ref)];
  71803. },
  71804. isHrefPattern: function isHrefPattern() {
  71805. var to = this.to;
  71806. return !!to;
  71807. },
  71808. tagName: function tagName() {
  71809. var isHrefPattern = this.isHrefPattern;
  71810. return isHrefPattern ? 'a' : 'button';
  71811. },
  71812. tagProps: function tagProps() {
  71813. var isHrefPattern = this.isHrefPattern;
  71814. if (isHrefPattern) {
  71815. var linkUrl = this.linkUrl,
  71816. target = this.target;
  71817. return { href: linkUrl, target: target };
  71818. } else {
  71819. var htmlType = this.htmlType;
  71820. return { type: htmlType };
  71821. }
  71822. }
  71823. },
  71824. methods: {
  71825. handleClickLink: function handleClickLink(event) {
  71826. this.$emit('click', event);
  71827. var openInNewWindow = event.ctrlKey || event.metaKey;
  71828. this.handleCheckClick(event, openInNewWindow);
  71829. }
  71830. }
  71831. };
  71832. /***/ }),
  71833. /* 132 */
  71834. /***/ (function(module, exports, __webpack_require__) {
  71835. "use strict";
  71836. Object.defineProperty(exports, "__esModule", {
  71837. value: true
  71838. });
  71839. var _defineProperty2 = __webpack_require__(2);
  71840. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  71841. var _assist = __webpack_require__(3);
  71842. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  71843. var prefixCls = 'ivu-btn-group';
  71844. exports.default = {
  71845. name: 'ButtonGroup',
  71846. props: {
  71847. size: {
  71848. validator: function validator(value) {
  71849. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  71850. },
  71851. default: function _default() {
  71852. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  71853. }
  71854. },
  71855. shape: {
  71856. validator: function validator(value) {
  71857. return (0, _assist.oneOf)(value, ['circle', 'circle-outline']);
  71858. }
  71859. },
  71860. vertical: {
  71861. type: Boolean,
  71862. default: false
  71863. }
  71864. },
  71865. computed: {
  71866. classes: function classes() {
  71867. var _ref;
  71868. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.shape), !!this.shape), (0, _defineProperty3.default)(_ref, prefixCls + '-vertical', this.vertical), _ref)];
  71869. }
  71870. }
  71871. };
  71872. /***/ }),
  71873. /* 133 */
  71874. /***/ (function(module, exports, __webpack_require__) {
  71875. "use strict";
  71876. Object.defineProperty(exports, "__esModule", {
  71877. value: true
  71878. });
  71879. var _defineProperty2 = __webpack_require__(2);
  71880. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  71881. var _icon = __webpack_require__(8);
  71882. var _icon2 = _interopRequireDefault(_icon);
  71883. var _link = __webpack_require__(48);
  71884. var _link2 = _interopRequireDefault(_link);
  71885. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  71886. var prefixCls = 'ivu-card';
  71887. var defaultPadding = 16;
  71888. exports.default = {
  71889. name: 'Card',
  71890. mixins: [_link2.default],
  71891. components: { Icon: _icon2.default },
  71892. props: {
  71893. bordered: {
  71894. type: Boolean,
  71895. default: true
  71896. },
  71897. disHover: {
  71898. type: Boolean,
  71899. default: false
  71900. },
  71901. shadow: {
  71902. type: Boolean,
  71903. default: false
  71904. },
  71905. padding: {
  71906. type: Number,
  71907. default: defaultPadding
  71908. },
  71909. title: {
  71910. type: String
  71911. },
  71912. icon: {
  71913. type: String
  71914. }
  71915. },
  71916. data: function data() {
  71917. return {
  71918. showHead: true,
  71919. showExtra: true
  71920. };
  71921. },
  71922. computed: {
  71923. classes: function classes() {
  71924. var _ref;
  71925. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-bordered', this.bordered && !this.shadow), (0, _defineProperty3.default)(_ref, prefixCls + '-dis-hover', this.disHover || this.shadow), (0, _defineProperty3.default)(_ref, prefixCls + '-shadow', this.shadow), _ref)];
  71926. },
  71927. headClasses: function headClasses() {
  71928. return prefixCls + '-head';
  71929. },
  71930. extraClasses: function extraClasses() {
  71931. return prefixCls + '-extra';
  71932. },
  71933. bodyClasses: function bodyClasses() {
  71934. return prefixCls + '-body';
  71935. },
  71936. bodyStyles: function bodyStyles() {
  71937. if (this.padding !== defaultPadding) {
  71938. return {
  71939. padding: String(this.padding) + 'px'
  71940. };
  71941. } else {
  71942. return '';
  71943. }
  71944. },
  71945. isHrefPattern: function isHrefPattern() {
  71946. var to = this.to;
  71947. return !!to;
  71948. },
  71949. tagName: function tagName() {
  71950. var isHrefPattern = this.isHrefPattern;
  71951. return isHrefPattern ? 'a' : 'div';
  71952. },
  71953. tagProps: function tagProps() {
  71954. var isHrefPattern = this.isHrefPattern;
  71955. if (isHrefPattern) {
  71956. var linkUrl = this.linkUrl,
  71957. target = this.target;
  71958. return { href: linkUrl, target: target };
  71959. } else {
  71960. return {};
  71961. }
  71962. }
  71963. },
  71964. methods: {
  71965. handleClickLink: function handleClickLink(event) {
  71966. if (!this.isHrefPattern) return;
  71967. var openInNewWindow = event.ctrlKey || event.metaKey;
  71968. this.handleCheckClick(event, openInNewWindow);
  71969. }
  71970. },
  71971. mounted: function mounted() {
  71972. this.showHead = this.title || this.$slots.title !== undefined;
  71973. this.showExtra = this.$slots.extra !== undefined;
  71974. }
  71975. };
  71976. /***/ }),
  71977. /* 134 */
  71978. /***/ (function(module, exports, __webpack_require__) {
  71979. "use strict";
  71980. Object.defineProperty(exports, "__esModule", {
  71981. value: true
  71982. });
  71983. var _newArrowCheck2 = __webpack_require__(1);
  71984. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  71985. var _icon = __webpack_require__(8);
  71986. var _icon2 = _interopRequireDefault(_icon);
  71987. var _assist = __webpack_require__(3);
  71988. var _dom = __webpack_require__(12);
  71989. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  71990. var prefixCls = 'ivu-carousel';
  71991. exports.default = {
  71992. name: 'Carousel',
  71993. components: { Icon: _icon2.default },
  71994. props: {
  71995. arrow: {
  71996. type: String,
  71997. default: 'hover',
  71998. validator: function validator(value) {
  71999. return (0, _assist.oneOf)(value, ['hover', 'always', 'never']);
  72000. }
  72001. },
  72002. autoplay: {
  72003. type: Boolean,
  72004. default: false
  72005. },
  72006. autoplaySpeed: {
  72007. type: Number,
  72008. default: 2000
  72009. },
  72010. loop: {
  72011. type: Boolean,
  72012. default: false
  72013. },
  72014. easing: {
  72015. type: String,
  72016. default: 'ease'
  72017. },
  72018. dots: {
  72019. type: String,
  72020. default: 'inside',
  72021. validator: function validator(value) {
  72022. return (0, _assist.oneOf)(value, ['inside', 'outside', 'none']);
  72023. }
  72024. },
  72025. radiusDot: {
  72026. type: Boolean,
  72027. default: false
  72028. },
  72029. trigger: {
  72030. type: String,
  72031. default: 'click',
  72032. validator: function validator(value) {
  72033. return (0, _assist.oneOf)(value, ['click', 'hover']);
  72034. }
  72035. },
  72036. value: {
  72037. type: Number,
  72038. default: 0
  72039. },
  72040. height: {
  72041. type: [String, Number],
  72042. default: 'auto',
  72043. validator: function validator(value) {
  72044. return value === 'auto' || Object.prototype.toString.call(value) === '[object Number]';
  72045. }
  72046. }
  72047. },
  72048. data: function data() {
  72049. return {
  72050. prefixCls: prefixCls,
  72051. listWidth: 0,
  72052. trackWidth: 0,
  72053. trackOffset: 0,
  72054. trackCopyOffset: 0,
  72055. showCopyTrack: false,
  72056. slides: [],
  72057. slideInstances: [],
  72058. timer: null,
  72059. ready: false,
  72060. currentIndex: this.value,
  72061. trackIndex: this.value,
  72062. copyTrackIndex: this.value,
  72063. hideTrackPos: -1 };
  72064. },
  72065. computed: {
  72066. classes: function classes() {
  72067. return ['' + prefixCls];
  72068. },
  72069. trackStyles: function trackStyles() {
  72070. var visibleStyle = this.trackIndex === -1 ? 'hidden' : 'visible';
  72071. return {
  72072. width: String(this.trackWidth) + 'px',
  72073. transform: 'translate3d(' + -this.trackOffset + 'px, 0px, 0px)',
  72074. transition: 'transform 500ms ' + String(this.easing),
  72075. visibility: visibleStyle
  72076. };
  72077. },
  72078. copyTrackStyles: function copyTrackStyles() {
  72079. return {
  72080. width: String(this.trackWidth) + 'px',
  72081. transform: 'translate3d(' + -this.trackCopyOffset + 'px, 0px, 0px)',
  72082. transition: 'transform 500ms ' + String(this.easing),
  72083. position: 'absolute'
  72084. };
  72085. },
  72086. arrowClasses: function arrowClasses() {
  72087. return [prefixCls + '-arrow', prefixCls + '-arrow-' + String(this.arrow)];
  72088. },
  72089. dotsClasses: function dotsClasses() {
  72090. return [prefixCls + '-dots', prefixCls + '-dots-' + String(this.dots)];
  72091. }
  72092. },
  72093. methods: {
  72094. findChild: function findChild(cb) {
  72095. var _this2 = this;
  72096. var find = function find(child) {
  72097. var _this = this;
  72098. var name = child.$options.componentName;
  72099. if (name) {
  72100. cb(child);
  72101. } else if (child.$children.length) {
  72102. child.$children.forEach(function (innerChild) {
  72103. (0, _newArrowCheck3.default)(this, _this);
  72104. find(innerChild, cb);
  72105. }.bind(this));
  72106. }
  72107. };
  72108. if (this.slideInstances.length || !this.$children) {
  72109. this.slideInstances.forEach(function (child) {
  72110. (0, _newArrowCheck3.default)(this, _this2);
  72111. find(child);
  72112. }.bind(this));
  72113. } else {
  72114. this.$children.forEach(function (child) {
  72115. (0, _newArrowCheck3.default)(this, _this2);
  72116. find(child);
  72117. }.bind(this));
  72118. }
  72119. },
  72120. initCopyTrackDom: function initCopyTrackDom() {
  72121. var _this3 = this;
  72122. this.$nextTick(function () {
  72123. (0, _newArrowCheck3.default)(this, _this3);
  72124. this.$refs.copyTrack.innerHTML = this.$refs.originTrack.innerHTML;
  72125. }.bind(this));
  72126. },
  72127. updateSlides: function updateSlides(init) {
  72128. var _this4 = this;
  72129. var slides = [];
  72130. var index = 1;
  72131. this.findChild(function (child) {
  72132. (0, _newArrowCheck3.default)(this, _this4);
  72133. slides.push({
  72134. $el: child.$el
  72135. });
  72136. child.index = index++;
  72137. if (init) {
  72138. this.slideInstances.push(child);
  72139. }
  72140. }.bind(this));
  72141. this.slides = slides;
  72142. this.updatePos();
  72143. },
  72144. updatePos: function updatePos() {
  72145. var _this5 = this;
  72146. this.findChild(function (child) {
  72147. (0, _newArrowCheck3.default)(this, _this5);
  72148. child.width = this.listWidth;
  72149. child.height = typeof this.height === 'number' ? String(this.height) + 'px' : this.height;
  72150. }.bind(this));
  72151. this.trackWidth = (this.slides.length || 0) * this.listWidth;
  72152. },
  72153. slotChange: function slotChange() {
  72154. var _this6 = this;
  72155. this.$nextTick(function () {
  72156. (0, _newArrowCheck3.default)(this, _this6);
  72157. this.slides = [];
  72158. this.slideInstances = [];
  72159. this.updateSlides(true, true);
  72160. this.updatePos();
  72161. this.updateOffset();
  72162. }.bind(this));
  72163. },
  72164. handleResize: function handleResize() {
  72165. this.listWidth = parseInt((0, _assist.getStyle)(this.$el, 'width'));
  72166. this.updatePos();
  72167. this.updateOffset();
  72168. },
  72169. updateTrackPos: function updateTrackPos(index) {
  72170. if (this.showCopyTrack) {
  72171. this.trackIndex = index;
  72172. } else {
  72173. this.copyTrackIndex = index;
  72174. }
  72175. },
  72176. updateTrackIndex: function updateTrackIndex(index) {
  72177. if (this.showCopyTrack) {
  72178. this.copyTrackIndex = index;
  72179. } else {
  72180. this.trackIndex = index;
  72181. }
  72182. this.currentIndex = index;
  72183. },
  72184. add: function add(offset) {
  72185. var slidesLen = this.slides.length;
  72186. if (this.loop) {
  72187. if (offset > 0) {
  72188. this.hideTrackPos = -1;
  72189. } else {
  72190. this.hideTrackPos = slidesLen;
  72191. }
  72192. this.updateTrackPos(this.hideTrackPos);
  72193. }
  72194. var oldIndex = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex;
  72195. var index = oldIndex + offset;
  72196. while (index < 0) {
  72197. index += slidesLen;
  72198. }if ((offset > 0 && index === slidesLen || offset < 0 && index === slidesLen - 1) && this.loop) {
  72199. this.showCopyTrack = !this.showCopyTrack;
  72200. this.trackIndex += offset;
  72201. this.copyTrackIndex += offset;
  72202. } else {
  72203. if (!this.loop) index = index % this.slides.length;
  72204. this.updateTrackIndex(index);
  72205. }
  72206. this.currentIndex = index === this.slides.length ? 0 : index;
  72207. this.$emit('on-change', oldIndex, this.currentIndex);
  72208. this.$emit('input', this.currentIndex);
  72209. },
  72210. arrowEvent: function arrowEvent(offset) {
  72211. this.setAutoplay();
  72212. this.add(offset);
  72213. },
  72214. dotsEvent: function dotsEvent(event, n) {
  72215. var curIndex = this.showCopyTrack ? this.copyTrackIndex : this.trackIndex;
  72216. var oldCurrentIndex = this.currentIndex;
  72217. if (event === this.trigger && curIndex !== n) {
  72218. this.updateTrackIndex(n);
  72219. this.$emit('on-change', oldCurrentIndex, this.currentIndex);
  72220. this.$emit('input', n);
  72221. this.setAutoplay();
  72222. }
  72223. },
  72224. setAutoplay: function setAutoplay() {
  72225. var _this7 = this;
  72226. window.clearInterval(this.timer);
  72227. if (this.autoplay) {
  72228. this.timer = window.setInterval(function () {
  72229. (0, _newArrowCheck3.default)(this, _this7);
  72230. this.add(1);
  72231. }.bind(this), this.autoplaySpeed);
  72232. }
  72233. },
  72234. updateOffset: function updateOffset() {
  72235. var _this8 = this;
  72236. this.$nextTick(function () {
  72237. (0, _newArrowCheck3.default)(this, _this8);
  72238. var ofs = this.copyTrackIndex > 0 ? -1 : 1;
  72239. this.trackOffset = this.trackIndex * this.listWidth;
  72240. this.trackCopyOffset = this.copyTrackIndex * this.listWidth + ofs;
  72241. }.bind(this));
  72242. },
  72243. handleClick: function handleClick(type) {
  72244. this.$emit('on-click', this[type]);
  72245. }
  72246. },
  72247. watch: {
  72248. autoplay: function autoplay() {
  72249. this.setAutoplay();
  72250. },
  72251. autoplaySpeed: function autoplaySpeed() {
  72252. this.setAutoplay();
  72253. },
  72254. trackIndex: function trackIndex() {
  72255. this.updateOffset();
  72256. },
  72257. copyTrackIndex: function copyTrackIndex() {
  72258. this.updateOffset();
  72259. },
  72260. height: function height() {
  72261. this.updatePos();
  72262. },
  72263. value: function value(val) {
  72264. this.updateTrackIndex(val);
  72265. this.setAutoplay();
  72266. }
  72267. },
  72268. mounted: function mounted() {
  72269. this.updateSlides(true);
  72270. this.handleResize();
  72271. this.setAutoplay();
  72272. (0, _dom.on)(window, 'resize', this.handleResize);
  72273. },
  72274. beforeDestroy: function beforeDestroy() {
  72275. (0, _dom.off)(window, 'resize', this.handleResize);
  72276. }
  72277. };
  72278. /***/ }),
  72279. /* 135 */
  72280. /***/ (function(module, exports, __webpack_require__) {
  72281. "use strict";
  72282. Object.defineProperty(exports, "__esModule", {
  72283. value: true
  72284. });
  72285. var _newArrowCheck2 = __webpack_require__(1);
  72286. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  72287. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  72288. var prefixCls = 'ivu-carousel-item';
  72289. exports.default = {
  72290. componentName: 'carousel-item',
  72291. name: 'CarouselItem',
  72292. data: function data() {
  72293. return {
  72294. prefixCls: prefixCls,
  72295. width: 0,
  72296. height: 'auto',
  72297. left: 0
  72298. };
  72299. },
  72300. computed: {
  72301. styles: function styles() {
  72302. return {
  72303. width: String(this.width) + 'px',
  72304. height: '' + String(this.height),
  72305. left: String(this.left) + 'px'
  72306. };
  72307. }
  72308. },
  72309. mounted: function mounted() {
  72310. this.$parent.slotChange();
  72311. },
  72312. watch: {
  72313. width: function width(val) {
  72314. var _this = this;
  72315. if (val && this.$parent.loop) {
  72316. this.$nextTick(function () {
  72317. (0, _newArrowCheck3.default)(this, _this);
  72318. this.$parent.initCopyTrackDom();
  72319. }.bind(this));
  72320. }
  72321. },
  72322. height: function height(val) {
  72323. var _this2 = this;
  72324. if (val && this.$parent.loop) {
  72325. this.$nextTick(function () {
  72326. (0, _newArrowCheck3.default)(this, _this2);
  72327. this.$parent.initCopyTrackDom();
  72328. }.bind(this));
  72329. }
  72330. }
  72331. },
  72332. beforeDestroy: function beforeDestroy() {
  72333. this.$parent.slotChange();
  72334. }
  72335. };
  72336. /***/ }),
  72337. /* 136 */
  72338. /***/ (function(module, exports, __webpack_require__) {
  72339. "use strict";
  72340. Object.defineProperty(exports, "__esModule", {
  72341. value: true
  72342. });
  72343. var _assign = __webpack_require__(15);
  72344. var _assign2 = _interopRequireDefault(_assign);
  72345. var _stringify = __webpack_require__(57);
  72346. var _stringify2 = _interopRequireDefault(_stringify);
  72347. var _newArrowCheck2 = __webpack_require__(1);
  72348. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  72349. var _defineProperty2 = __webpack_require__(2);
  72350. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  72351. var _input = __webpack_require__(38);
  72352. var _input2 = _interopRequireDefault(_input);
  72353. var _dropdown = __webpack_require__(36);
  72354. var _dropdown2 = _interopRequireDefault(_dropdown);
  72355. var _icon = __webpack_require__(8);
  72356. var _icon2 = _interopRequireDefault(_icon);
  72357. var _caspanel = __webpack_require__(368);
  72358. var _caspanel2 = _interopRequireDefault(_caspanel);
  72359. var _clickoutside = __webpack_require__(82);
  72360. var _clickoutside2 = _interopRequireDefault(_clickoutside);
  72361. var _transferDom = __webpack_require__(23);
  72362. var _transferDom2 = _interopRequireDefault(_transferDom);
  72363. var _assist = __webpack_require__(3);
  72364. var _emitter = __webpack_require__(4);
  72365. var _emitter2 = _interopRequireDefault(_emitter);
  72366. var _locale = __webpack_require__(6);
  72367. var _locale2 = _interopRequireDefault(_locale);
  72368. var _form = __webpack_require__(11);
  72369. var _form2 = _interopRequireDefault(_form);
  72370. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  72371. var prefixCls = 'ivu-cascader';
  72372. var selectPrefixCls = 'ivu-select';
  72373. exports.default = {
  72374. name: 'Cascader',
  72375. mixins: [_emitter2.default, _locale2.default, _form2.default],
  72376. components: { iInput: _input2.default, Drop: _dropdown2.default, Icon: _icon2.default, Caspanel: _caspanel2.default },
  72377. directives: { clickOutside: _clickoutside2.default, TransferDom: _transferDom2.default },
  72378. props: {
  72379. data: {
  72380. type: Array,
  72381. default: function _default() {
  72382. return [];
  72383. }
  72384. },
  72385. value: {
  72386. type: Array,
  72387. default: function _default() {
  72388. return [];
  72389. }
  72390. },
  72391. disabled: {
  72392. type: Boolean,
  72393. default: false
  72394. },
  72395. clearable: {
  72396. type: Boolean,
  72397. default: true
  72398. },
  72399. placeholder: {
  72400. type: String
  72401. },
  72402. size: {
  72403. validator: function validator(value) {
  72404. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  72405. },
  72406. default: function _default() {
  72407. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  72408. }
  72409. },
  72410. trigger: {
  72411. validator: function validator(value) {
  72412. return (0, _assist.oneOf)(value, ['click', 'hover']);
  72413. },
  72414. default: 'click'
  72415. },
  72416. changeOnSelect: {
  72417. type: Boolean,
  72418. default: false
  72419. },
  72420. renderFormat: {
  72421. type: Function,
  72422. default: function _default(label) {
  72423. return label.join(' / ');
  72424. }
  72425. },
  72426. loadData: {
  72427. type: Function
  72428. },
  72429. filterable: {
  72430. type: Boolean,
  72431. default: false
  72432. },
  72433. notFoundText: {
  72434. type: String
  72435. },
  72436. transfer: {
  72437. type: Boolean,
  72438. default: function _default() {
  72439. return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
  72440. }
  72441. },
  72442. name: {
  72443. type: String
  72444. },
  72445. elementId: {
  72446. type: String
  72447. },
  72448. capture: {
  72449. type: Boolean,
  72450. default: function _default() {
  72451. return !this.$IVIEW ? true : this.$IVIEW.capture;
  72452. }
  72453. },
  72454. transferClassName: {
  72455. type: String
  72456. },
  72457. eventsEnabled: {
  72458. type: Boolean,
  72459. default: false
  72460. }
  72461. },
  72462. data: function data() {
  72463. return {
  72464. prefixCls: prefixCls,
  72465. selectPrefixCls: selectPrefixCls,
  72466. visible: false,
  72467. selected: [],
  72468. tmpSelected: [],
  72469. updatingValue: false,
  72470. currentValue: this.value || [],
  72471. query: '',
  72472. validDataStr: '',
  72473. isLoadedChildren: false,
  72474. isValueNull: false };
  72475. },
  72476. computed: {
  72477. classes: function classes() {
  72478. var _ref;
  72479. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-show-clear', this.showCloseIcon), (0, _defineProperty3.default)(_ref, prefixCls + '-size-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref, prefixCls + '-visible', this.visible), (0, _defineProperty3.default)(_ref, prefixCls + '-disabled', this.itemDisabled), (0, _defineProperty3.default)(_ref, prefixCls + '-not-found', this.filterable && this.query !== '' && !this.querySelections.length), _ref)];
  72480. },
  72481. showCloseIcon: function showCloseIcon() {
  72482. return this.currentValue && this.currentValue.length && this.clearable && !this.itemDisabled;
  72483. },
  72484. displayRender: function displayRender() {
  72485. var label = [];
  72486. for (var i = 0; i < this.selected.length; i++) {
  72487. label.push(this.selected[i].label);
  72488. }
  72489. return this.renderFormat(label, this.selected);
  72490. },
  72491. displayInputRender: function displayInputRender() {
  72492. return this.filterable ? '' : this.displayRender;
  72493. },
  72494. localePlaceholder: function localePlaceholder() {
  72495. if (this.placeholder === undefined) {
  72496. return this.t('i.select.placeholder');
  72497. } else {
  72498. return this.placeholder;
  72499. }
  72500. },
  72501. inputPlaceholder: function inputPlaceholder() {
  72502. return this.filterable && this.currentValue.length ? null : this.localePlaceholder;
  72503. },
  72504. localeNotFoundText: function localeNotFoundText() {
  72505. if (this.notFoundText === undefined) {
  72506. return this.t('i.select.noMatch');
  72507. } else {
  72508. return this.notFoundText;
  72509. }
  72510. },
  72511. querySelections: function querySelections() {
  72512. var _this = this;
  72513. var selections = [];
  72514. function getSelections(arr, label, value) {
  72515. for (var i = 0; i < arr.length; i++) {
  72516. var item = arr[i];
  72517. item.__label = label ? label + ' / ' + item.label : item.label;
  72518. item.__value = value ? value + ',' + item.value : item.value;
  72519. if (item.children && item.children.length) {
  72520. getSelections(item.children, item.__label, item.__value);
  72521. delete item.__label;
  72522. delete item.__value;
  72523. } else {
  72524. selections.push({
  72525. label: item.__label,
  72526. value: item.__value,
  72527. display: item.__label,
  72528. item: item,
  72529. disabled: !!item.disabled
  72530. });
  72531. }
  72532. }
  72533. }
  72534. getSelections(this.data);
  72535. selections = selections.filter(function (item) {
  72536. (0, _newArrowCheck3.default)(this, _this);
  72537. return item.label ? item.label.indexOf(this.query) > -1 : false;
  72538. }.bind(this)).map(function (item) {
  72539. (0, _newArrowCheck3.default)(this, _this);
  72540. item.display = item.display.replace(new RegExp(this.query, 'g'), '<span>' + String(this.query) + '</span>');
  72541. return item;
  72542. }.bind(this));
  72543. return selections;
  72544. },
  72545. arrowType: function arrowType() {
  72546. var type = 'ios-arrow-down';
  72547. if (this.$IVIEW) {
  72548. if (this.$IVIEW.cascader.customArrow) {
  72549. type = '';
  72550. } else if (this.$IVIEW.cascader.arrow) {
  72551. type = this.$IVIEW.cascader.arrow;
  72552. }
  72553. }
  72554. return type;
  72555. },
  72556. customArrowType: function customArrowType() {
  72557. var type = '';
  72558. if (this.$IVIEW) {
  72559. if (this.$IVIEW.cascader.customArrow) {
  72560. type = this.$IVIEW.cascader.customArrow;
  72561. }
  72562. }
  72563. return type;
  72564. },
  72565. arrowSize: function arrowSize() {
  72566. var size = '';
  72567. if (this.$IVIEW) {
  72568. if (this.$IVIEW.cascader.arrowSize) {
  72569. size = this.$IVIEW.cascader.arrowSize;
  72570. }
  72571. }
  72572. return size;
  72573. },
  72574. dropdownCls: function dropdownCls() {
  72575. var _ref2;
  72576. return _ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-transfer', this.transfer), (0, _defineProperty3.default)(_ref2, this.transferClassName, this.transferClassName), _ref2;
  72577. }
  72578. },
  72579. methods: {
  72580. clearSelect: function clearSelect() {
  72581. if (this.itemDisabled) return false;
  72582. var oldVal = (0, _stringify2.default)(this.currentValue);
  72583. this.currentValue = this.selected = this.tmpSelected = [];
  72584. this.handleClose();
  72585. this.emitValue(this.currentValue, oldVal);
  72586. this.broadcast('Caspanel', 'on-clear');
  72587. },
  72588. handleClose: function handleClose() {
  72589. this.visible = false;
  72590. },
  72591. toggleOpen: function toggleOpen() {
  72592. if (this.itemDisabled) return false;
  72593. if (this.visible) {
  72594. if (!this.filterable) this.handleClose();
  72595. } else {
  72596. this.onFocus();
  72597. }
  72598. },
  72599. onFocus: function onFocus() {
  72600. this.visible = true;
  72601. if (!this.currentValue.length) {
  72602. this.broadcast('Caspanel', 'on-clear');
  72603. }
  72604. },
  72605. updateResult: function updateResult(result) {
  72606. this.tmpSelected = result;
  72607. },
  72608. updateSelected: function updateSelected() {
  72609. var init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  72610. var changeOnSelectDataChange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  72611. if (!this.changeOnSelect || init || changeOnSelectDataChange) {
  72612. this.broadcast('Caspanel', 'on-find-selected', {
  72613. value: this.currentValue
  72614. });
  72615. }
  72616. },
  72617. emitValue: function emitValue(val, oldVal) {
  72618. var _this2 = this;
  72619. if ((0, _stringify2.default)(val) !== oldVal) {
  72620. this.$emit('on-change', this.currentValue, JSON.parse((0, _stringify2.default)(this.selected)));
  72621. this.$nextTick(function () {
  72622. (0, _newArrowCheck3.default)(this, _this2);
  72623. this.dispatch('FormItem', 'on-form-change', {
  72624. value: this.currentValue,
  72625. selected: JSON.parse((0, _stringify2.default)(this.selected))
  72626. });
  72627. }.bind(this));
  72628. }
  72629. },
  72630. handleInput: function handleInput(event) {
  72631. this.query = event.target.value;
  72632. },
  72633. handleSelectItem: function handleSelectItem(index) {
  72634. var _this3 = this;
  72635. var item = this.querySelections[index];
  72636. if (item.item.disabled) return false;
  72637. this.query = '';
  72638. this.$refs.input.currentValue = '';
  72639. var oldVal = (0, _stringify2.default)(this.currentValue);
  72640. this.currentValue = item.value.split(',');
  72641. setTimeout(function () {
  72642. (0, _newArrowCheck3.default)(this, _this3);
  72643. this.emitValue(this.currentValue, oldVal);
  72644. this.handleClose();
  72645. }.bind(this), 0);
  72646. },
  72647. handleFocus: function handleFocus() {
  72648. this.$refs.input.focus();
  72649. },
  72650. getValidData: function getValidData(data) {
  72651. var _this5 = this;
  72652. function deleteData(item) {
  72653. var _this4 = this;
  72654. var new_item = (0, _assign2.default)({}, item);
  72655. if ('loading' in new_item) {
  72656. delete new_item.loading;
  72657. }
  72658. if ('__value' in new_item) {
  72659. delete new_item.__value;
  72660. }
  72661. if ('__label' in new_item) {
  72662. delete new_item.__label;
  72663. }
  72664. if ('children' in new_item && new_item.children.length) {
  72665. new_item.children = new_item.children.map(function (i) {
  72666. (0, _newArrowCheck3.default)(this, _this4);
  72667. return deleteData(i);
  72668. }.bind(this));
  72669. }
  72670. return new_item;
  72671. }
  72672. return data.map(function (item) {
  72673. (0, _newArrowCheck3.default)(this, _this5);
  72674. return deleteData(item);
  72675. }.bind(this));
  72676. }
  72677. },
  72678. created: function created() {
  72679. var _this6 = this;
  72680. this.validDataStr = (0, _stringify2.default)(this.getValidData(this.data));
  72681. this.$on('on-result-change', function (params) {
  72682. (0, _newArrowCheck3.default)(this, _this6);
  72683. var lastValue = params.lastValue;
  72684. var changeOnSelect = params.changeOnSelect;
  72685. var fromInit = params.fromInit;
  72686. if (lastValue || changeOnSelect) {
  72687. var oldVal = (0, _stringify2.default)(this.currentValue);
  72688. this.selected = this.tmpSelected;
  72689. var newVal = [];
  72690. this.selected.forEach(function (item) {
  72691. (0, _newArrowCheck3.default)(this, _this6);
  72692. newVal.push(item.value);
  72693. }.bind(this));
  72694. if (!fromInit) {
  72695. this.updatingValue = true;
  72696. this.currentValue = newVal;
  72697. this.emitValue(this.currentValue, oldVal);
  72698. }
  72699. }
  72700. if (lastValue && !fromInit) {
  72701. this.handleClose();
  72702. }
  72703. }.bind(this));
  72704. },
  72705. mounted: function mounted() {
  72706. this.updateSelected(true);
  72707. },
  72708. watch: {
  72709. visible: function visible(val) {
  72710. if (val) {
  72711. if (this.currentValue.length) {
  72712. this.updateSelected();
  72713. }
  72714. if (this.transfer) {
  72715. this.$refs.drop.update();
  72716. }
  72717. this.broadcast('Drop', 'on-update-popper');
  72718. } else {
  72719. if (this.filterable) {
  72720. this.query = '';
  72721. this.$refs.input.currentValue = '';
  72722. }
  72723. if (this.transfer) {
  72724. this.$refs.drop.destroy();
  72725. }
  72726. this.broadcast('Drop', 'on-destroy-popper');
  72727. }
  72728. this.$emit('on-visible-change', val);
  72729. },
  72730. value: function value(val) {
  72731. if (val === null) this.isValueNull = true;
  72732. this.currentValue = val || [];
  72733. if (val === null || !val.length) this.selected = [];
  72734. },
  72735. currentValue: function currentValue() {
  72736. if (this.isValueNull) {
  72737. this.isValueNull = false;
  72738. this.$emit('input', null);
  72739. } else {
  72740. this.$emit('input', this.currentValue);
  72741. }
  72742. if (this.updatingValue) {
  72743. this.updatingValue = false;
  72744. return;
  72745. }
  72746. this.updateSelected(true);
  72747. },
  72748. data: {
  72749. deep: true,
  72750. handler: function handler() {
  72751. var _this7 = this;
  72752. var validDataStr = (0, _stringify2.default)(this.getValidData(this.data));
  72753. if (validDataStr !== this.validDataStr) {
  72754. this.validDataStr = validDataStr;
  72755. if (!this.isLoadedChildren) {
  72756. this.$nextTick(function () {
  72757. (0, _newArrowCheck3.default)(this, _this7);
  72758. return this.updateSelected(false, this.changeOnSelect);
  72759. }.bind(this));
  72760. }
  72761. this.isLoadedChildren = false;
  72762. }
  72763. }
  72764. }
  72765. }
  72766. };
  72767. /***/ }),
  72768. /* 137 */
  72769. /***/ (function(module, exports, __webpack_require__) {
  72770. "use strict";
  72771. Object.defineProperty(exports, "__esModule", {
  72772. value: true
  72773. });
  72774. var _toConsumableArray2 = __webpack_require__(17);
  72775. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  72776. var _assign = __webpack_require__(15);
  72777. var _assign2 = _interopRequireDefault(_assign);
  72778. var _newArrowCheck2 = __webpack_require__(1);
  72779. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  72780. var _casitem = __webpack_require__(369);
  72781. var _casitem2 = _interopRequireDefault(_casitem);
  72782. var _emitter = __webpack_require__(4);
  72783. var _emitter2 = _interopRequireDefault(_emitter);
  72784. var _assist = __webpack_require__(3);
  72785. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  72786. var key = 1;
  72787. exports.default = {
  72788. name: 'Caspanel',
  72789. mixins: [_emitter2.default],
  72790. components: { Casitem: _casitem2.default },
  72791. props: {
  72792. data: {
  72793. type: Array,
  72794. default: function _default() {
  72795. return [];
  72796. }
  72797. },
  72798. disabled: Boolean,
  72799. changeOnSelect: Boolean,
  72800. trigger: String,
  72801. prefixCls: String
  72802. },
  72803. data: function data() {
  72804. return {
  72805. tmpItem: {},
  72806. result: [],
  72807. sublist: []
  72808. };
  72809. },
  72810. watch: {
  72811. data: function data() {
  72812. this.sublist = [];
  72813. }
  72814. },
  72815. methods: {
  72816. handleClickItem: function handleClickItem(item) {
  72817. if (this.trigger !== 'click' && item.children && item.children.length) return;
  72818. this.handleTriggerItem(item, false, true);
  72819. },
  72820. handleHoverItem: function handleHoverItem(item) {
  72821. if (this.trigger !== 'hover' || !item.children || !item.children.length) return;
  72822. this.handleTriggerItem(item, false, true);
  72823. },
  72824. handleTriggerItem: function handleTriggerItem(item) {
  72825. var _this = this;
  72826. var fromInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  72827. var fromUser = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  72828. if (item.disabled) return;
  72829. var cascader = (0, _assist.findComponentUpward)(this, 'Cascader');
  72830. if (item.loading !== undefined && !item.children.length) {
  72831. if (cascader && cascader.loadData) {
  72832. cascader.loadData(item, function () {
  72833. (0, _newArrowCheck3.default)(this, _this);
  72834. if (fromUser) {
  72835. cascader.isLoadedChildren = true;
  72836. }
  72837. if (item.children.length) {
  72838. this.handleTriggerItem(item);
  72839. }
  72840. }.bind(this));
  72841. return;
  72842. }
  72843. }
  72844. var backItem = this.getBaseItem(item);
  72845. if (this.changeOnSelect || backItem.label !== this.tmpItem.label || backItem.value !== this.tmpItem.value || backItem.label === this.tmpItem.label && backItem.value === this.tmpItem.value) {
  72846. this.tmpItem = backItem;
  72847. this.emitUpdate([backItem]);
  72848. }
  72849. if (item.children && item.children.length) {
  72850. this.sublist = item.children;
  72851. this.dispatch('Cascader', 'on-result-change', {
  72852. lastValue: false,
  72853. changeOnSelect: this.changeOnSelect,
  72854. fromInit: fromInit
  72855. });
  72856. if (this.changeOnSelect) {
  72857. var Caspanel = (0, _assist.findComponentDownward)(this, 'Caspanel');
  72858. if (Caspanel) {
  72859. Caspanel.$emit('on-clear', true);
  72860. }
  72861. }
  72862. } else {
  72863. this.sublist = [];
  72864. this.dispatch('Cascader', 'on-result-change', {
  72865. lastValue: true,
  72866. changeOnSelect: this.changeOnSelect,
  72867. fromInit: fromInit
  72868. });
  72869. }
  72870. if (cascader) {
  72871. cascader.$refs.drop.update();
  72872. }
  72873. },
  72874. updateResult: function updateResult(item) {
  72875. this.result = [this.tmpItem].concat(item);
  72876. this.emitUpdate(this.result);
  72877. },
  72878. getBaseItem: function getBaseItem(item) {
  72879. var backItem = (0, _assign2.default)({}, item);
  72880. if (backItem.children) {
  72881. delete backItem.children;
  72882. }
  72883. return backItem;
  72884. },
  72885. emitUpdate: function emitUpdate(result) {
  72886. if (this.$parent.$options.name === 'Caspanel') {
  72887. this.$parent.updateResult(result);
  72888. } else {
  72889. this.$parent.$parent.updateResult(result);
  72890. }
  72891. },
  72892. getKey: function getKey() {
  72893. return key++;
  72894. }
  72895. },
  72896. mounted: function mounted() {
  72897. var _this2 = this;
  72898. this.$on('on-find-selected', function (params) {
  72899. (0, _newArrowCheck3.default)(this, _this2);
  72900. var val = params.value;
  72901. var value = [].concat((0, _toConsumableArray3.default)(val));
  72902. for (var i = 0; i < value.length; i++) {
  72903. for (var j = 0; j < this.data.length; j++) {
  72904. if (value[i] === this.data[j].value) {
  72905. this.handleTriggerItem(this.data[j], true);
  72906. value.splice(0, 1);
  72907. this.$nextTick(function () {
  72908. (0, _newArrowCheck3.default)(this, _this2);
  72909. this.broadcast('Caspanel', 'on-find-selected', {
  72910. value: value
  72911. });
  72912. }.bind(this));
  72913. return false;
  72914. }
  72915. }
  72916. }
  72917. }.bind(this));
  72918. this.$on('on-clear', function () {
  72919. var deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  72920. (0, _newArrowCheck3.default)(this, _this2);
  72921. this.sublist = [];
  72922. this.tmpItem = {};
  72923. if (deep) {
  72924. var Caspanel = (0, _assist.findComponentDownward)(this, 'Caspanel');
  72925. if (Caspanel) {
  72926. Caspanel.$emit('on-clear', true);
  72927. }
  72928. }
  72929. }.bind(this));
  72930. }
  72931. };
  72932. /***/ }),
  72933. /* 138 */
  72934. /***/ (function(module, exports, __webpack_require__) {
  72935. "use strict";
  72936. Object.defineProperty(exports, "__esModule", {
  72937. value: true
  72938. });
  72939. var _defineProperty2 = __webpack_require__(2);
  72940. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  72941. var _icon = __webpack_require__(8);
  72942. var _icon2 = _interopRequireDefault(_icon);
  72943. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  72944. exports.default = {
  72945. name: 'Casitem',
  72946. components: { Icon: _icon2.default },
  72947. props: {
  72948. data: Object,
  72949. prefixCls: String,
  72950. tmpItem: Object
  72951. },
  72952. computed: {
  72953. classes: function classes() {
  72954. var _ref;
  72955. return [String(this.prefixCls) + '-menu-item', (_ref = {}, (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-menu-item-active', this.tmpItem.value === this.data.value), (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-menu-item-disabled', this.data.disabled), _ref)];
  72956. },
  72957. showArrow: function showArrow() {
  72958. return this.data.children && this.data.children.length || 'loading' in this.data && !this.data.loading;
  72959. },
  72960. showLoading: function showLoading() {
  72961. return 'loading' in this.data && this.data.loading;
  72962. },
  72963. arrowType: function arrowType() {
  72964. var type = 'ios-arrow-forward';
  72965. if (this.$IVIEW) {
  72966. if (this.$IVIEW.cascader.customItemArrow) {
  72967. type = '';
  72968. } else if (this.$IVIEW.cascader.itemArrow) {
  72969. type = this.$IVIEW.cascader.itemArrow;
  72970. }
  72971. }
  72972. return type;
  72973. },
  72974. customArrowType: function customArrowType() {
  72975. var type = '';
  72976. if (this.$IVIEW) {
  72977. if (this.$IVIEW.cascader.customItemArrow) {
  72978. type = this.$IVIEW.cascader.customItemArrow;
  72979. }
  72980. }
  72981. return type;
  72982. },
  72983. arrowSize: function arrowSize() {
  72984. var size = '';
  72985. if (this.$IVIEW) {
  72986. if (this.$IVIEW.cascader.itemArrowSize) {
  72987. size = this.$IVIEW.cascader.itemArrowSize;
  72988. }
  72989. }
  72990. return size;
  72991. }
  72992. }
  72993. };
  72994. /***/ }),
  72995. /* 139 */
  72996. /***/ (function(module, exports, __webpack_require__) {
  72997. "use strict";
  72998. Object.defineProperty(exports, "__esModule", {
  72999. value: true
  73000. });
  73001. var _defineProperty2 = __webpack_require__(2);
  73002. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  73003. var _cellItem = __webpack_require__(375);
  73004. var _cellItem2 = _interopRequireDefault(_cellItem);
  73005. var _icon = __webpack_require__(8);
  73006. var _icon2 = _interopRequireDefault(_icon);
  73007. var _link = __webpack_require__(48);
  73008. var _link2 = _interopRequireDefault(_link);
  73009. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  73010. var prefixCls = 'ivu-cell';
  73011. exports.default = {
  73012. name: 'Cell',
  73013. inject: ['cellGroup'],
  73014. mixins: [_link2.default],
  73015. components: { CellItem: _cellItem2.default, Icon: _icon2.default },
  73016. props: {
  73017. name: {
  73018. type: [String, Number]
  73019. },
  73020. title: {
  73021. type: String,
  73022. default: ''
  73023. },
  73024. label: {
  73025. type: String,
  73026. default: ''
  73027. },
  73028. extra: {
  73029. type: String,
  73030. default: ''
  73031. },
  73032. disabled: {
  73033. type: Boolean,
  73034. default: false
  73035. },
  73036. selected: {
  73037. type: Boolean,
  73038. default: false
  73039. }
  73040. },
  73041. data: function data() {
  73042. return {
  73043. prefixCls: prefixCls
  73044. };
  73045. },
  73046. computed: {
  73047. classes: function classes() {
  73048. var _ref;
  73049. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-disabled', this.disabled), (0, _defineProperty3.default)(_ref, prefixCls + '-selected', this.selected), (0, _defineProperty3.default)(_ref, prefixCls + '-with-link', this.to), _ref)];
  73050. },
  73051. arrowType: function arrowType() {
  73052. var type = 'ios-arrow-forward';
  73053. if (this.$IVIEW) {
  73054. if (this.$IVIEW.cell.customArrow) {
  73055. type = '';
  73056. } else if (this.$IVIEW.cell.arrow) {
  73057. type = this.$IVIEW.cell.arrow;
  73058. }
  73059. }
  73060. return type;
  73061. },
  73062. customArrowType: function customArrowType() {
  73063. var type = '';
  73064. if (this.$IVIEW) {
  73065. if (this.$IVIEW.cell.customArrow) {
  73066. type = this.$IVIEW.cell.customArrow;
  73067. }
  73068. }
  73069. return type;
  73070. },
  73071. arrowSize: function arrowSize() {
  73072. var size = '';
  73073. if (this.$IVIEW) {
  73074. if (this.$IVIEW.cell.arrowSize) {
  73075. size = this.$IVIEW.cell.arrowSize;
  73076. }
  73077. }
  73078. return size;
  73079. }
  73080. },
  73081. methods: {
  73082. handleClickItem: function handleClickItem(event, new_window) {
  73083. this.cellGroup.handleClick(this.name);
  73084. this.handleCheckClick(event, new_window);
  73085. }
  73086. }
  73087. };
  73088. /***/ }),
  73089. /* 140 */
  73090. /***/ (function(module, exports, __webpack_require__) {
  73091. "use strict";
  73092. Object.defineProperty(exports, "__esModule", {
  73093. value: true
  73094. });
  73095. exports.default = {
  73096. props: {
  73097. title: {
  73098. type: String,
  73099. default: ''
  73100. },
  73101. label: {
  73102. type: String,
  73103. default: ''
  73104. },
  73105. extra: {
  73106. type: String,
  73107. default: ''
  73108. }
  73109. }
  73110. };
  73111. /***/ }),
  73112. /* 141 */
  73113. /***/ (function(module, exports, __webpack_require__) {
  73114. "use strict";
  73115. Object.defineProperty(exports, "__esModule", {
  73116. value: true
  73117. });
  73118. exports.default = {
  73119. name: 'CellGroup',
  73120. provide: function provide() {
  73121. return {
  73122. cellGroup: this
  73123. };
  73124. },
  73125. methods: {
  73126. handleClick: function handleClick(name) {
  73127. this.$emit('on-click', name);
  73128. }
  73129. }
  73130. };
  73131. /***/ }),
  73132. /* 142 */
  73133. /***/ (function(module, exports, __webpack_require__) {
  73134. "use strict";
  73135. Object.defineProperty(exports, "__esModule", {
  73136. value: true
  73137. });
  73138. var _defineProperty2 = __webpack_require__(2);
  73139. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  73140. var _assist = __webpack_require__(3);
  73141. var _emitter = __webpack_require__(4);
  73142. var _emitter2 = _interopRequireDefault(_emitter);
  73143. var _form = __webpack_require__(11);
  73144. var _form2 = _interopRequireDefault(_form);
  73145. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  73146. var prefixCls = 'ivu-checkbox';
  73147. exports.default = {
  73148. name: 'Checkbox',
  73149. mixins: [_emitter2.default, _form2.default],
  73150. props: {
  73151. disabled: {
  73152. type: Boolean,
  73153. default: false
  73154. },
  73155. value: {
  73156. type: [String, Number, Boolean],
  73157. default: false
  73158. },
  73159. trueValue: {
  73160. type: [String, Number, Boolean],
  73161. default: true
  73162. },
  73163. falseValue: {
  73164. type: [String, Number, Boolean],
  73165. default: false
  73166. },
  73167. label: {
  73168. type: [String, Number, Boolean]
  73169. },
  73170. indeterminate: {
  73171. type: Boolean,
  73172. default: false
  73173. },
  73174. size: {
  73175. validator: function validator(value) {
  73176. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  73177. },
  73178. default: function _default() {
  73179. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  73180. }
  73181. },
  73182. name: {
  73183. type: String
  73184. },
  73185. border: {
  73186. type: Boolean,
  73187. default: false
  73188. }
  73189. },
  73190. data: function data() {
  73191. return {
  73192. model: [],
  73193. currentValue: this.value,
  73194. group: false,
  73195. showSlot: true,
  73196. parent: (0, _assist.findComponentUpward)(this, 'CheckboxGroup'),
  73197. focusInner: false
  73198. };
  73199. },
  73200. computed: {
  73201. wrapClasses: function wrapClasses() {
  73202. var _ref;
  73203. return [prefixCls + '-wrapper', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-group-item', this.group), (0, _defineProperty3.default)(_ref, prefixCls + '-wrapper-checked', this.currentValue), (0, _defineProperty3.default)(_ref, prefixCls + '-wrapper-disabled', this.itemDisabled), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref, prefixCls + '-border', this.border), _ref)];
  73204. },
  73205. checkboxClasses: function checkboxClasses() {
  73206. var _ref2;
  73207. return ['' + prefixCls, (_ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-checked', this.currentValue), (0, _defineProperty3.default)(_ref2, prefixCls + '-disabled', this.itemDisabled), (0, _defineProperty3.default)(_ref2, prefixCls + '-indeterminate', this.indeterminate), _ref2)];
  73208. },
  73209. innerClasses: function innerClasses() {
  73210. return [prefixCls + '-inner', (0, _defineProperty3.default)({}, prefixCls + '-focus', this.focusInner)];
  73211. },
  73212. inputClasses: function inputClasses() {
  73213. return prefixCls + '-input';
  73214. }
  73215. },
  73216. mounted: function mounted() {
  73217. this.parent = (0, _assist.findComponentUpward)(this, 'CheckboxGroup');
  73218. if (this.parent) {
  73219. this.group = true;
  73220. }
  73221. if (this.group) {
  73222. this.parent.updateModel(true);
  73223. } else {
  73224. this.updateModel();
  73225. this.showSlot = this.$slots.default !== undefined;
  73226. }
  73227. },
  73228. methods: {
  73229. change: function change(event) {
  73230. if (this.itemDisabled) {
  73231. return false;
  73232. }
  73233. var checked = event.target.checked;
  73234. this.currentValue = checked;
  73235. var value = checked ? this.trueValue : this.falseValue;
  73236. this.$emit('input', value);
  73237. if (this.group) {
  73238. this.parent.change(this.model);
  73239. } else {
  73240. this.$emit('on-change', value);
  73241. this.dispatch('FormItem', 'on-form-change', value);
  73242. }
  73243. },
  73244. updateModel: function updateModel() {
  73245. this.currentValue = this.value === this.trueValue;
  73246. },
  73247. onBlur: function onBlur() {
  73248. this.focusInner = false;
  73249. },
  73250. onFocus: function onFocus() {
  73251. this.focusInner = true;
  73252. }
  73253. },
  73254. watch: {
  73255. value: function value(val) {
  73256. if (val === this.trueValue || val === this.falseValue) {
  73257. this.updateModel();
  73258. } else {
  73259. throw 'Value should be trueValue or falseValue.';
  73260. }
  73261. }
  73262. }
  73263. };
  73264. /***/ }),
  73265. /* 143 */
  73266. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  73267. "use strict";
  73268. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  73269. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_group_vue__ = __webpack_require__(144);
  73270. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_group_vue__);
  73271. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_group_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_group_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  73272. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a659251_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_checkbox_group_vue__ = __webpack_require__(382);
  73273. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a659251_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_checkbox_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a659251_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_checkbox_group_vue__);
  73274. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  73275. /* script */
  73276. /* template */
  73277. /* template functional */
  73278. var __vue_template_functional__ = false
  73279. /* styles */
  73280. var __vue_styles__ = null
  73281. /* scopeId */
  73282. var __vue_scopeId__ = null
  73283. /* moduleIdentifier (server only) */
  73284. var __vue_module_identifier__ = null
  73285. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  73286. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_checkbox_group_vue___default.a,
  73287. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a659251_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_checkbox_group_vue__["render"],
  73288. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a659251_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_checkbox_group_vue__["staticRenderFns"],
  73289. __vue_template_functional__,
  73290. __vue_styles__,
  73291. __vue_scopeId__,
  73292. __vue_module_identifier__
  73293. )
  73294. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  73295. /***/ }),
  73296. /* 144 */
  73297. /***/ (function(module, exports, __webpack_require__) {
  73298. "use strict";
  73299. Object.defineProperty(exports, "__esModule", {
  73300. value: true
  73301. });
  73302. var _newArrowCheck2 = __webpack_require__(1);
  73303. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  73304. var _defineProperty2 = __webpack_require__(2);
  73305. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  73306. var _assist = __webpack_require__(3);
  73307. var _emitter = __webpack_require__(4);
  73308. var _emitter2 = _interopRequireDefault(_emitter);
  73309. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  73310. var prefixCls = 'ivu-checkbox-group';
  73311. exports.default = {
  73312. name: 'CheckboxGroup',
  73313. mixins: [_emitter2.default],
  73314. props: {
  73315. value: {
  73316. type: Array,
  73317. default: function _default() {
  73318. return [];
  73319. }
  73320. },
  73321. size: {
  73322. validator: function validator(value) {
  73323. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  73324. },
  73325. default: function _default() {
  73326. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  73327. }
  73328. }
  73329. },
  73330. data: function data() {
  73331. return {
  73332. currentValue: this.value || [],
  73333. children: []
  73334. };
  73335. },
  73336. computed: {
  73337. classes: function classes() {
  73338. return ['' + prefixCls, (0, _defineProperty3.default)({}, 'ivu-checkbox-' + String(this.size), !!this.size)];
  73339. }
  73340. },
  73341. mounted: function mounted() {
  73342. this.updateModel(true);
  73343. },
  73344. methods: {
  73345. updateModel: function updateModel(update) {
  73346. var _this = this;
  73347. this.children = (0, _assist.findComponentsDownward)(this, 'Checkbox');
  73348. if (this.children) {
  73349. var value = this.value || [];
  73350. this.children.forEach(function (child) {
  73351. (0, _newArrowCheck3.default)(this, _this);
  73352. child.model = value;
  73353. if (update) {
  73354. child.currentValue = value.indexOf(child.label) >= 0;
  73355. child.group = true;
  73356. }
  73357. }.bind(this));
  73358. }
  73359. },
  73360. change: function change(data) {
  73361. this.currentValue = data;
  73362. this.$emit('input', data);
  73363. this.$emit('on-change', data);
  73364. this.dispatch('FormItem', 'on-form-change', data);
  73365. }
  73366. },
  73367. watch: {
  73368. value: function value() {
  73369. this.updateModel(true);
  73370. }
  73371. }
  73372. };
  73373. /***/ }),
  73374. /* 145 */
  73375. /***/ (function(module, exports, __webpack_require__) {
  73376. "use strict";
  73377. Object.defineProperty(exports, "__esModule", {
  73378. value: true
  73379. });
  73380. var _assist = __webpack_require__(3);
  73381. var _random_str = __webpack_require__(385);
  73382. var _random_str2 = _interopRequireDefault(_random_str);
  73383. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  73384. var prefixCls = 'ivu-chart-circle';
  73385. exports.default = {
  73386. name: 'iCircle',
  73387. props: {
  73388. percent: {
  73389. type: Number,
  73390. default: 0
  73391. },
  73392. size: {
  73393. type: Number,
  73394. default: 120
  73395. },
  73396. strokeWidth: {
  73397. type: Number,
  73398. default: 6
  73399. },
  73400. strokeColor: {
  73401. type: [String, Array],
  73402. default: '#2d8cf0'
  73403. },
  73404. strokeLinecap: {
  73405. validator: function validator(value) {
  73406. return (0, _assist.oneOf)(value, ['square', 'round']);
  73407. },
  73408. default: 'round'
  73409. },
  73410. trailWidth: {
  73411. type: Number,
  73412. default: 5
  73413. },
  73414. trailColor: {
  73415. type: String,
  73416. default: '#eaeef2'
  73417. },
  73418. dashboard: {
  73419. type: Boolean,
  73420. default: false
  73421. }
  73422. },
  73423. data: function data() {
  73424. return {
  73425. id: 'ivu-chart-circle-' + String((0, _random_str2.default)(3))
  73426. };
  73427. },
  73428. computed: {
  73429. circleSize: function circleSize() {
  73430. return {
  73431. width: String(this.size) + 'px',
  73432. height: String(this.size) + 'px'
  73433. };
  73434. },
  73435. computedStrokeWidth: function computedStrokeWidth() {
  73436. return this.percent === 0 && this.dashboard ? 0 : this.strokeWidth;
  73437. },
  73438. radius: function radius() {
  73439. return 50 - this.strokeWidth / 2;
  73440. },
  73441. pathString: function pathString() {
  73442. if (this.dashboard) {
  73443. return 'M 50,50 m 0,' + String(this.radius) + '\n a ' + String(this.radius) + ',' + String(this.radius) + ' 0 1 1 0,-' + 2 * this.radius + '\n a ' + String(this.radius) + ',' + String(this.radius) + ' 0 1 1 0,' + 2 * this.radius;
  73444. } else {
  73445. return 'M 50,50 m 0,-' + String(this.radius) + '\n a ' + String(this.radius) + ',' + String(this.radius) + ' 0 1 1 0,' + 2 * this.radius + '\n a ' + String(this.radius) + ',' + String(this.radius) + ' 0 1 1 0,-' + 2 * this.radius;
  73446. }
  73447. },
  73448. len: function len() {
  73449. return Math.PI * 2 * this.radius;
  73450. },
  73451. trailStyle: function trailStyle() {
  73452. var style = {};
  73453. if (this.dashboard) {
  73454. style = {
  73455. 'stroke-dasharray': this.len - 75 + 'px ' + String(this.len) + 'px',
  73456. 'stroke-dashoffset': '-' + 75 / 2 + 'px',
  73457. 'transition': 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s'
  73458. };
  73459. }
  73460. return style;
  73461. },
  73462. pathStyle: function pathStyle() {
  73463. var style = {};
  73464. if (this.dashboard) {
  73465. style = {
  73466. 'stroke-dasharray': this.percent / 100 * (this.len - 75) + 'px ' + String(this.len) + 'px',
  73467. 'stroke-dashoffset': '-' + 75 / 2 + 'px',
  73468. 'transition': 'stroke-dashoffset .3s ease 0s, stroke-dasharray .6s ease 0s, stroke .6s, stroke-width .06s ease .6s'
  73469. };
  73470. } else {
  73471. style = {
  73472. 'stroke-dasharray': String(this.len) + 'px ' + String(this.len) + 'px',
  73473. 'stroke-dashoffset': (100 - this.percent) / 100 * this.len + 'px',
  73474. 'transition': 'stroke-dashoffset 0.6s ease 0s, stroke 0.6s ease'
  73475. };
  73476. }
  73477. return style;
  73478. },
  73479. wrapClasses: function wrapClasses() {
  73480. return '' + prefixCls;
  73481. },
  73482. innerClasses: function innerClasses() {
  73483. return prefixCls + '-inner';
  73484. },
  73485. strokeValue: function strokeValue() {
  73486. var color = this.strokeColor;
  73487. if (typeof this.strokeColor !== 'string') {
  73488. color = 'url(#' + String(this.id) + ')';
  73489. }
  73490. return color;
  73491. },
  73492. showDefs: function showDefs() {
  73493. return typeof this.strokeColor !== 'string';
  73494. }
  73495. }
  73496. };
  73497. /***/ }),
  73498. /* 146 */
  73499. /***/ (function(module, exports, __webpack_require__) {
  73500. "use strict";
  73501. Object.defineProperty(exports, "__esModule", {
  73502. value: true
  73503. });
  73504. var _newArrowCheck2 = __webpack_require__(1);
  73505. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  73506. var _defineProperty2 = __webpack_require__(2);
  73507. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  73508. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  73509. var prefixCls = 'ivu-collapse';
  73510. exports.default = {
  73511. name: 'Collapse',
  73512. props: {
  73513. accordion: {
  73514. type: Boolean,
  73515. default: false
  73516. },
  73517. value: {
  73518. type: [Array, String]
  73519. },
  73520. simple: {
  73521. type: Boolean,
  73522. default: false
  73523. }
  73524. },
  73525. data: function data() {
  73526. return {
  73527. currentValue: this.value
  73528. };
  73529. },
  73530. computed: {
  73531. classes: function classes() {
  73532. return ['' + prefixCls, (0, _defineProperty3.default)({}, prefixCls + '-simple', this.simple)];
  73533. }
  73534. },
  73535. mounted: function mounted() {
  73536. this.setActive();
  73537. },
  73538. methods: {
  73539. setActive: function setActive() {
  73540. var _this = this;
  73541. var activeKey = this.getActiveKey();
  73542. this.$children.forEach(function (child, index) {
  73543. (0, _newArrowCheck3.default)(this, _this);
  73544. var name = child.name || index.toString();
  73545. child.isActive = activeKey.indexOf(name) > -1;
  73546. child.index = index;
  73547. }.bind(this));
  73548. },
  73549. getActiveKey: function getActiveKey() {
  73550. var activeKey = this.currentValue || [];
  73551. var accordion = this.accordion;
  73552. if (!Array.isArray(activeKey)) {
  73553. activeKey = [activeKey];
  73554. }
  73555. if (accordion && activeKey.length > 1) {
  73556. activeKey = [activeKey[0]];
  73557. }
  73558. for (var i = 0; i < activeKey.length; i++) {
  73559. activeKey[i] = activeKey[i].toString();
  73560. }
  73561. return activeKey;
  73562. },
  73563. toggle: function toggle(data) {
  73564. var name = data.name.toString();
  73565. var newActiveKey = [];
  73566. if (this.accordion) {
  73567. if (!data.isActive) {
  73568. newActiveKey.push(name);
  73569. }
  73570. } else {
  73571. var activeKey = this.getActiveKey();
  73572. var nameIndex = activeKey.indexOf(name);
  73573. if (data.isActive) {
  73574. if (nameIndex > -1) {
  73575. activeKey.splice(nameIndex, 1);
  73576. }
  73577. } else {
  73578. if (nameIndex < 0) {
  73579. activeKey.push(name);
  73580. }
  73581. }
  73582. newActiveKey = activeKey;
  73583. }
  73584. this.currentValue = newActiveKey;
  73585. this.$emit('input', newActiveKey);
  73586. this.$emit('on-change', newActiveKey);
  73587. }
  73588. },
  73589. watch: {
  73590. value: function value(val) {
  73591. this.currentValue = val;
  73592. },
  73593. currentValue: function currentValue() {
  73594. this.setActive();
  73595. }
  73596. }
  73597. };
  73598. /***/ }),
  73599. /* 147 */
  73600. /***/ (function(module, exports, __webpack_require__) {
  73601. "use strict";
  73602. Object.defineProperty(exports, "__esModule", {
  73603. value: true
  73604. });
  73605. var _defineProperty2 = __webpack_require__(2);
  73606. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  73607. var _icon = __webpack_require__(8);
  73608. var _icon2 = _interopRequireDefault(_icon);
  73609. var _collapseTransition = __webpack_require__(83);
  73610. var _collapseTransition2 = _interopRequireDefault(_collapseTransition);
  73611. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  73612. var prefixCls = 'ivu-collapse';
  73613. exports.default = {
  73614. name: 'Panel',
  73615. components: { Icon: _icon2.default, CollapseTransition: _collapseTransition2.default },
  73616. props: {
  73617. name: {
  73618. type: String
  73619. },
  73620. hideArrow: {
  73621. type: Boolean,
  73622. default: false
  73623. }
  73624. },
  73625. data: function data() {
  73626. return {
  73627. index: 0,
  73628. isActive: false,
  73629. mounted: false
  73630. };
  73631. },
  73632. computed: {
  73633. itemClasses: function itemClasses() {
  73634. return [prefixCls + '-item', (0, _defineProperty3.default)({}, prefixCls + '-item-active', this.isActive)];
  73635. },
  73636. headerClasses: function headerClasses() {
  73637. return prefixCls + '-header';
  73638. },
  73639. contentClasses: function contentClasses() {
  73640. return prefixCls + '-content';
  73641. },
  73642. boxClasses: function boxClasses() {
  73643. return prefixCls + '-content-box';
  73644. }
  73645. },
  73646. methods: {
  73647. toggle: function toggle() {
  73648. this.$parent.toggle({
  73649. name: this.name || this.index,
  73650. isActive: this.isActive
  73651. });
  73652. }
  73653. },
  73654. mounted: function mounted() {
  73655. this.mounted = true;
  73656. this.$parent.setActive();
  73657. }
  73658. };
  73659. /***/ }),
  73660. /* 148 */
  73661. /***/ (function(module, exports, __webpack_require__) {
  73662. "use strict";
  73663. Object.defineProperty(exports, "__esModule", {
  73664. value: true
  73665. });
  73666. var _defineProperty2 = __webpack_require__(2);
  73667. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  73668. var _tinycolor = __webpack_require__(149);
  73669. var _tinycolor2 = _interopRequireDefault(_tinycolor);
  73670. var _vClickOutsideX = __webpack_require__(76);
  73671. var _transferDom = __webpack_require__(23);
  73672. var _transferDom2 = _interopRequireDefault(_transferDom);
  73673. var _dropdown = __webpack_require__(36);
  73674. var _dropdown2 = _interopRequireDefault(_dropdown);
  73675. var _recommendColors = __webpack_require__(394);
  73676. var _recommendColors2 = _interopRequireDefault(_recommendColors);
  73677. var _saturation = __webpack_require__(396);
  73678. var _saturation2 = _interopRequireDefault(_saturation);
  73679. var _hue = __webpack_require__(398);
  73680. var _hue2 = _interopRequireDefault(_hue);
  73681. var _alpha = __webpack_require__(400);
  73682. var _alpha2 = _interopRequireDefault(_alpha);
  73683. var _input = __webpack_require__(38);
  73684. var _input2 = _interopRequireDefault(_input);
  73685. var _button = __webpack_require__(28);
  73686. var _button2 = _interopRequireDefault(_button);
  73687. var _icon = __webpack_require__(8);
  73688. var _icon2 = _interopRequireDefault(_icon);
  73689. var _locale = __webpack_require__(6);
  73690. var _locale2 = _interopRequireDefault(_locale);
  73691. var _assist = __webpack_require__(3);
  73692. var _emitter = __webpack_require__(4);
  73693. var _emitter2 = _interopRequireDefault(_emitter);
  73694. var _form = __webpack_require__(11);
  73695. var _form2 = _interopRequireDefault(_form);
  73696. var _prefixMixin = __webpack_require__(50);
  73697. var _prefixMixin2 = _interopRequireDefault(_prefixMixin);
  73698. var _utils = __webpack_require__(39);
  73699. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  73700. exports.default = {
  73701. name: 'ColorPicker',
  73702. components: { Drop: _dropdown2.default, RecommendColors: _recommendColors2.default, Saturation: _saturation2.default, Hue: _hue2.default, Alpha: _alpha2.default, iInput: _input2.default, iButton: _button2.default, Icon: _icon2.default },
  73703. directives: { clickOutside: _vClickOutsideX.directive, TransferDom: _transferDom2.default },
  73704. mixins: [_emitter2.default, _locale2.default, _prefixMixin2.default, _form2.default],
  73705. props: {
  73706. value: {
  73707. type: String,
  73708. default: undefined
  73709. },
  73710. hue: {
  73711. type: Boolean,
  73712. default: true
  73713. },
  73714. alpha: {
  73715. type: Boolean,
  73716. default: false
  73717. },
  73718. recommend: {
  73719. type: Boolean,
  73720. default: false
  73721. },
  73722. format: {
  73723. type: String,
  73724. validator: function validator(value) {
  73725. return (0, _assist.oneOf)(value, ['hsl', 'hsv', 'hex', 'rgb']);
  73726. },
  73727. default: undefined
  73728. },
  73729. colors: {
  73730. type: Array,
  73731. default: function _default() {
  73732. return [];
  73733. }
  73734. },
  73735. disabled: {
  73736. type: Boolean,
  73737. default: false
  73738. },
  73739. size: {
  73740. validator: function validator(value) {
  73741. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  73742. },
  73743. default: function _default() {
  73744. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  73745. }
  73746. },
  73747. hideDropDown: {
  73748. type: Boolean,
  73749. default: false
  73750. },
  73751. placement: {
  73752. type: String,
  73753. validator: function validator(value) {
  73754. return (0, _assist.oneOf)(value, ['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'right', 'right-start', 'right-end']);
  73755. },
  73756. default: 'bottom'
  73757. },
  73758. transfer: {
  73759. type: Boolean,
  73760. default: function _default() {
  73761. return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
  73762. }
  73763. },
  73764. name: {
  73765. type: String,
  73766. default: undefined
  73767. },
  73768. editable: {
  73769. type: Boolean,
  73770. default: true
  73771. },
  73772. capture: {
  73773. type: Boolean,
  73774. default: function _default() {
  73775. return !this.$IVIEW ? true : this.$IVIEW.capture;
  73776. }
  73777. },
  73778. transferClassName: {
  73779. type: String
  73780. },
  73781. eventsEnabled: {
  73782. type: Boolean,
  73783. default: false
  73784. }
  73785. },
  73786. data: function data() {
  73787. return {
  73788. val: (0, _utils.changeColor)(this.value || ''),
  73789. currentValue: this.value || '',
  73790. dragging: false,
  73791. visible: false,
  73792. recommendedColor: ['#2d8cf0', '#19be6b', '#ff9900', '#ed4014', '#00b5ff', '#19c919', '#f9e31c', '#ea1a1a', '#9b1dea', '#00c2b1', '#ac7a33', '#1d35ea', '#8bc34a', '#f16b62', '#ea4ca3', '#0d94aa', '#febd79', '#5d4037', '#00bcd4', '#f06292', '#cddc39', '#607d8b', '#000000', '#ffffff']
  73793. };
  73794. },
  73795. computed: {
  73796. arrowClasses: function arrowClasses() {
  73797. return [String(this.inputPrefixCls) + '-icon', String(this.inputPrefixCls) + '-icon-normal'];
  73798. },
  73799. transition: function transition() {
  73800. return (0, _assist.oneOf)(this.placement, ['bottom-start', 'bottom', 'bottom-end']) ? 'slide-up' : 'fade';
  73801. },
  73802. saturationColors: {
  73803. get: function get() {
  73804. return this.val;
  73805. },
  73806. set: function set(newVal) {
  73807. this.val = newVal;
  73808. this.$emit('on-active-change', this.formatColor);
  73809. }
  73810. },
  73811. classes: function classes() {
  73812. return ['' + String(this.prefixCls), (0, _defineProperty3.default)({}, String(this.prefixCls) + '-transfer', this.transfer)];
  73813. },
  73814. wrapClasses: function wrapClasses() {
  73815. return [String(this.prefixCls) + '-rel', String(this.prefixCls) + '-' + String(this.size), String(this.inputPrefixCls) + '-wrapper', String(this.inputPrefixCls) + '-wrapper-' + String(this.size), (0, _defineProperty3.default)({}, String(this.prefixCls) + '-disabled', this.itemDisabled)];
  73816. },
  73817. inputClasses: function inputClasses() {
  73818. var _ref3;
  73819. return [String(this.prefixCls) + '-input', '' + String(this.inputPrefixCls), String(this.inputPrefixCls) + '-' + String(this.size), (_ref3 = {}, (0, _defineProperty3.default)(_ref3, String(this.prefixCls) + '-focused', this.visible), (0, _defineProperty3.default)(_ref3, String(this.prefixCls) + '-disabled', this.itemDisabled), _ref3)];
  73820. },
  73821. dropClasses: function dropClasses() {
  73822. var _ref4;
  73823. return [String(this.transferPrefixCls) + '-no-max-height', (_ref4 = {}, (0, _defineProperty3.default)(_ref4, String(this.prefixCls) + '-transfer', this.transfer), (0, _defineProperty3.default)(_ref4, String(this.prefixCls) + '-hide-drop', this.hideDropDown), (0, _defineProperty3.default)(_ref4, this.transferClassName, this.transferClassName), _ref4)];
  73824. },
  73825. displayedColorStyle: function displayedColorStyle() {
  73826. return { backgroundColor: (0, _utils.toRGBAString)(this.visible ? this.saturationColors.rgba : (0, _tinycolor2.default)(this.value).toRgb()) };
  73827. },
  73828. formatColor: function formatColor() {
  73829. var format = this.format,
  73830. saturationColors = this.saturationColors;
  73831. if (format) {
  73832. if (format === 'hsl') {
  73833. return (0, _tinycolor2.default)(saturationColors.hsl).toHslString();
  73834. }
  73835. if (format === 'hsv') {
  73836. return (0, _tinycolor2.default)(saturationColors.hsv).toHsvString();
  73837. }
  73838. if (format === 'hex') {
  73839. return saturationColors.hex;
  73840. }
  73841. if (format === 'rgb') {
  73842. return (0, _utils.toRGBAString)(saturationColors.rgba);
  73843. }
  73844. } else if (this.alpha) {
  73845. return (0, _utils.toRGBAString)(saturationColors.rgba);
  73846. }
  73847. return saturationColors.hex;
  73848. },
  73849. confirmColorClasses: function confirmColorClasses() {
  73850. return [String(this.prefixCls) + '-confirm-color', (0, _defineProperty3.default)({}, String(this.prefixCls) + '-confirm-color-editable', this.editable)];
  73851. },
  73852. arrowType: function arrowType() {
  73853. var type = 'ios-arrow-down';
  73854. if (this.$IVIEW) {
  73855. if (this.$IVIEW.colorPicker.customArrow) {
  73856. type = '';
  73857. } else if (this.$IVIEW.colorPicker.arrow) {
  73858. type = this.$IVIEW.colorPicker.arrow;
  73859. }
  73860. }
  73861. return type;
  73862. },
  73863. customArrowType: function customArrowType() {
  73864. var type = '';
  73865. if (this.$IVIEW) {
  73866. if (this.$IVIEW.colorPicker.customArrow) {
  73867. type = this.$IVIEW.colorPicker.customArrow;
  73868. }
  73869. }
  73870. return type;
  73871. },
  73872. arrowSize: function arrowSize() {
  73873. var size = '';
  73874. if (this.$IVIEW) {
  73875. if (this.$IVIEW.colorPicker.arrowSize) {
  73876. size = this.$IVIEW.colorPicker.arrowSize;
  73877. }
  73878. }
  73879. return size;
  73880. }
  73881. },
  73882. watch: {
  73883. value: function value(newVal) {
  73884. this.val = (0, _utils.changeColor)(newVal || '');
  73885. },
  73886. visible: function visible(val) {
  73887. this.val = (0, _utils.changeColor)(this.value || '');
  73888. this.$refs.drop[val ? 'update' : 'destroy']();
  73889. this.$emit('on-open-change', Boolean(val));
  73890. }
  73891. },
  73892. mounted: function mounted() {
  73893. this.$on('on-escape-keydown', this.closer);
  73894. this.$on('on-dragging', this.setDragging);
  73895. },
  73896. methods: {
  73897. setDragging: function setDragging(value) {
  73898. this.dragging = value;
  73899. },
  73900. handleClose: function handleClose(event) {
  73901. if (this.visible) {
  73902. if (this.dragging || event.type === 'mousedown') {
  73903. if (this.$refs.editColorInput && event.target !== this.$refs.editColorInput.$el.querySelector('input')) {
  73904. event.preventDefault();
  73905. }
  73906. return;
  73907. }
  73908. if (this.transfer) {
  73909. var $el = this.$refs.drop.$el;
  73910. if ($el === event.target || $el.contains(event.target)) {
  73911. return;
  73912. }
  73913. }
  73914. this.closer(event);
  73915. return;
  73916. }
  73917. this.visible = false;
  73918. },
  73919. toggleVisible: function toggleVisible() {
  73920. if (this.itemDisabled) {
  73921. return;
  73922. }
  73923. this.visible = !this.visible;
  73924. this.$refs.input.focus();
  73925. },
  73926. childChange: function childChange(data) {
  73927. this.colorChange(data);
  73928. },
  73929. colorChange: function colorChange(data, oldHue) {
  73930. this.oldHue = this.saturationColors.hsl.h;
  73931. this.saturationColors = (0, _utils.changeColor)(data, oldHue || this.oldHue);
  73932. },
  73933. closer: function closer(event) {
  73934. if (event) {
  73935. event.preventDefault();
  73936. event.stopPropagation();
  73937. }
  73938. this.visible = false;
  73939. this.$refs.input.focus();
  73940. },
  73941. handleButtons: function handleButtons(event, value) {
  73942. this.currentValue = value;
  73943. this.$emit('input', value);
  73944. this.$emit('on-change', value);
  73945. this.dispatch('FormItem', 'on-form-change', value);
  73946. this.closer(event);
  73947. },
  73948. handleSuccess: function handleSuccess(event) {
  73949. this.handleButtons(event, this.formatColor);
  73950. this.$emit('on-pick-success');
  73951. },
  73952. handleClear: function handleClear(event) {
  73953. this.handleButtons(event, '');
  73954. this.$emit('on-pick-clear');
  73955. },
  73956. handleSelectColor: function handleSelectColor(color) {
  73957. this.val = (0, _utils.changeColor)(color);
  73958. this.$emit('on-active-change', this.formatColor);
  73959. },
  73960. handleEditColor: function handleEditColor(event) {
  73961. var value = event.target.value;
  73962. this.handleSelectColor(value);
  73963. },
  73964. handleFirstTab: function handleFirstTab(event) {
  73965. if (event.shiftKey) {
  73966. event.preventDefault();
  73967. event.stopPropagation();
  73968. this.$refs.ok.$el.focus();
  73969. }
  73970. },
  73971. handleLastTab: function handleLastTab(event) {
  73972. if (!event.shiftKey) {
  73973. event.preventDefault();
  73974. event.stopPropagation();
  73975. this.$refs.saturation.$el.focus();
  73976. }
  73977. },
  73978. onTab: function onTab(event) {
  73979. if (this.visible) {
  73980. event.preventDefault();
  73981. }
  73982. },
  73983. onEscape: function onEscape(event) {
  73984. if (this.visible) {
  73985. this.closer(event);
  73986. }
  73987. },
  73988. onArrow: function onArrow(event) {
  73989. if (!this.visible) {
  73990. event.preventDefault();
  73991. event.stopPropagation();
  73992. this.visible = true;
  73993. }
  73994. }
  73995. }
  73996. };
  73997. /***/ }),
  73998. /* 149 */
  73999. /***/ (function(module, exports, __webpack_require__) {
  74000. var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1
  74001. // https://github.com/bgrins/TinyColor
  74002. // Brian Grinstead, MIT License
  74003. (function(Math) {
  74004. var trimLeft = /^\s+/,
  74005. trimRight = /\s+$/,
  74006. tinyCounter = 0,
  74007. mathRound = Math.round,
  74008. mathMin = Math.min,
  74009. mathMax = Math.max,
  74010. mathRandom = Math.random;
  74011. function tinycolor (color, opts) {
  74012. color = (color) ? color : '';
  74013. opts = opts || { };
  74014. // If input is already a tinycolor, return itself
  74015. if (color instanceof tinycolor) {
  74016. return color;
  74017. }
  74018. // If we are called as a function, call using new instead
  74019. if (!(this instanceof tinycolor)) {
  74020. return new tinycolor(color, opts);
  74021. }
  74022. var rgb = inputToRGB(color);
  74023. this._originalInput = color,
  74024. this._r = rgb.r,
  74025. this._g = rgb.g,
  74026. this._b = rgb.b,
  74027. this._a = rgb.a,
  74028. this._roundA = mathRound(100*this._a) / 100,
  74029. this._format = opts.format || rgb.format;
  74030. this._gradientType = opts.gradientType;
  74031. // Don't let the range of [0,255] come back in [0,1].
  74032. // Potentially lose a little bit of precision here, but will fix issues where
  74033. // .5 gets interpreted as half of the total, instead of half of 1
  74034. // If it was supposed to be 128, this was already taken care of by `inputToRgb`
  74035. if (this._r < 1) { this._r = mathRound(this._r); }
  74036. if (this._g < 1) { this._g = mathRound(this._g); }
  74037. if (this._b < 1) { this._b = mathRound(this._b); }
  74038. this._ok = rgb.ok;
  74039. this._tc_id = tinyCounter++;
  74040. }
  74041. tinycolor.prototype = {
  74042. isDark: function() {
  74043. return this.getBrightness() < 128;
  74044. },
  74045. isLight: function() {
  74046. return !this.isDark();
  74047. },
  74048. isValid: function() {
  74049. return this._ok;
  74050. },
  74051. getOriginalInput: function() {
  74052. return this._originalInput;
  74053. },
  74054. getFormat: function() {
  74055. return this._format;
  74056. },
  74057. getAlpha: function() {
  74058. return this._a;
  74059. },
  74060. getBrightness: function() {
  74061. //http://www.w3.org/TR/AERT#color-contrast
  74062. var rgb = this.toRgb();
  74063. return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
  74064. },
  74065. getLuminance: function() {
  74066. //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
  74067. var rgb = this.toRgb();
  74068. var RsRGB, GsRGB, BsRGB, R, G, B;
  74069. RsRGB = rgb.r/255;
  74070. GsRGB = rgb.g/255;
  74071. BsRGB = rgb.b/255;
  74072. if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
  74073. if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
  74074. if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
  74075. return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
  74076. },
  74077. setAlpha: function(value) {
  74078. this._a = boundAlpha(value);
  74079. this._roundA = mathRound(100*this._a) / 100;
  74080. return this;
  74081. },
  74082. toHsv: function() {
  74083. var hsv = rgbToHsv(this._r, this._g, this._b);
  74084. return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
  74085. },
  74086. toHsvString: function() {
  74087. var hsv = rgbToHsv(this._r, this._g, this._b);
  74088. var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
  74089. return (this._a == 1) ?
  74090. "hsv(" + h + ", " + s + "%, " + v + "%)" :
  74091. "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
  74092. },
  74093. toHsl: function() {
  74094. var hsl = rgbToHsl(this._r, this._g, this._b);
  74095. return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
  74096. },
  74097. toHslString: function() {
  74098. var hsl = rgbToHsl(this._r, this._g, this._b);
  74099. var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
  74100. return (this._a == 1) ?
  74101. "hsl(" + h + ", " + s + "%, " + l + "%)" :
  74102. "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
  74103. },
  74104. toHex: function(allow3Char) {
  74105. return rgbToHex(this._r, this._g, this._b, allow3Char);
  74106. },
  74107. toHexString: function(allow3Char) {
  74108. return '#' + this.toHex(allow3Char);
  74109. },
  74110. toHex8: function(allow4Char) {
  74111. return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
  74112. },
  74113. toHex8String: function(allow4Char) {
  74114. return '#' + this.toHex8(allow4Char);
  74115. },
  74116. toRgb: function() {
  74117. return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
  74118. },
  74119. toRgbString: function() {
  74120. return (this._a == 1) ?
  74121. "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
  74122. "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
  74123. },
  74124. toPercentageRgb: function() {
  74125. return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
  74126. },
  74127. toPercentageRgbString: function() {
  74128. return (this._a == 1) ?
  74129. "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
  74130. "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
  74131. },
  74132. toName: function() {
  74133. if (this._a === 0) {
  74134. return "transparent";
  74135. }
  74136. if (this._a < 1) {
  74137. return false;
  74138. }
  74139. return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
  74140. },
  74141. toFilter: function(secondColor) {
  74142. var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
  74143. var secondHex8String = hex8String;
  74144. var gradientType = this._gradientType ? "GradientType = 1, " : "";
  74145. if (secondColor) {
  74146. var s = tinycolor(secondColor);
  74147. secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
  74148. }
  74149. return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
  74150. },
  74151. toString: function(format) {
  74152. var formatSet = !!format;
  74153. format = format || this._format;
  74154. var formattedString = false;
  74155. var hasAlpha = this._a < 1 && this._a >= 0;
  74156. var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
  74157. if (needsAlphaFormat) {
  74158. // Special case for "transparent", all other non-alpha formats
  74159. // will return rgba when there is transparency.
  74160. if (format === "name" && this._a === 0) {
  74161. return this.toName();
  74162. }
  74163. return this.toRgbString();
  74164. }
  74165. if (format === "rgb") {
  74166. formattedString = this.toRgbString();
  74167. }
  74168. if (format === "prgb") {
  74169. formattedString = this.toPercentageRgbString();
  74170. }
  74171. if (format === "hex" || format === "hex6") {
  74172. formattedString = this.toHexString();
  74173. }
  74174. if (format === "hex3") {
  74175. formattedString = this.toHexString(true);
  74176. }
  74177. if (format === "hex4") {
  74178. formattedString = this.toHex8String(true);
  74179. }
  74180. if (format === "hex8") {
  74181. formattedString = this.toHex8String();
  74182. }
  74183. if (format === "name") {
  74184. formattedString = this.toName();
  74185. }
  74186. if (format === "hsl") {
  74187. formattedString = this.toHslString();
  74188. }
  74189. if (format === "hsv") {
  74190. formattedString = this.toHsvString();
  74191. }
  74192. return formattedString || this.toHexString();
  74193. },
  74194. clone: function() {
  74195. return tinycolor(this.toString());
  74196. },
  74197. _applyModification: function(fn, args) {
  74198. var color = fn.apply(null, [this].concat([].slice.call(args)));
  74199. this._r = color._r;
  74200. this._g = color._g;
  74201. this._b = color._b;
  74202. this.setAlpha(color._a);
  74203. return this;
  74204. },
  74205. lighten: function() {
  74206. return this._applyModification(lighten, arguments);
  74207. },
  74208. brighten: function() {
  74209. return this._applyModification(brighten, arguments);
  74210. },
  74211. darken: function() {
  74212. return this._applyModification(darken, arguments);
  74213. },
  74214. desaturate: function() {
  74215. return this._applyModification(desaturate, arguments);
  74216. },
  74217. saturate: function() {
  74218. return this._applyModification(saturate, arguments);
  74219. },
  74220. greyscale: function() {
  74221. return this._applyModification(greyscale, arguments);
  74222. },
  74223. spin: function() {
  74224. return this._applyModification(spin, arguments);
  74225. },
  74226. _applyCombination: function(fn, args) {
  74227. return fn.apply(null, [this].concat([].slice.call(args)));
  74228. },
  74229. analogous: function() {
  74230. return this._applyCombination(analogous, arguments);
  74231. },
  74232. complement: function() {
  74233. return this._applyCombination(complement, arguments);
  74234. },
  74235. monochromatic: function() {
  74236. return this._applyCombination(monochromatic, arguments);
  74237. },
  74238. splitcomplement: function() {
  74239. return this._applyCombination(splitcomplement, arguments);
  74240. },
  74241. triad: function() {
  74242. return this._applyCombination(triad, arguments);
  74243. },
  74244. tetrad: function() {
  74245. return this._applyCombination(tetrad, arguments);
  74246. }
  74247. };
  74248. // If input is an object, force 1 into "1.0" to handle ratios properly
  74249. // String input requires "1.0" as input, so 1 will be treated as 1
  74250. tinycolor.fromRatio = function(color, opts) {
  74251. if (typeof color == "object") {
  74252. var newColor = {};
  74253. for (var i in color) {
  74254. if (color.hasOwnProperty(i)) {
  74255. if (i === "a") {
  74256. newColor[i] = color[i];
  74257. }
  74258. else {
  74259. newColor[i] = convertToPercentage(color[i]);
  74260. }
  74261. }
  74262. }
  74263. color = newColor;
  74264. }
  74265. return tinycolor(color, opts);
  74266. };
  74267. // Given a string or object, convert that input to RGB
  74268. // Possible string inputs:
  74269. //
  74270. // "red"
  74271. // "#f00" or "f00"
  74272. // "#ff0000" or "ff0000"
  74273. // "#ff000000" or "ff000000"
  74274. // "rgb 255 0 0" or "rgb (255, 0, 0)"
  74275. // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
  74276. // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
  74277. // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
  74278. // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
  74279. // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
  74280. // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
  74281. //
  74282. function inputToRGB(color) {
  74283. var rgb = { r: 0, g: 0, b: 0 };
  74284. var a = 1;
  74285. var s = null;
  74286. var v = null;
  74287. var l = null;
  74288. var ok = false;
  74289. var format = false;
  74290. if (typeof color == "string") {
  74291. color = stringInputToObject(color);
  74292. }
  74293. if (typeof color == "object") {
  74294. if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
  74295. rgb = rgbToRgb(color.r, color.g, color.b);
  74296. ok = true;
  74297. format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
  74298. }
  74299. else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
  74300. s = convertToPercentage(color.s);
  74301. v = convertToPercentage(color.v);
  74302. rgb = hsvToRgb(color.h, s, v);
  74303. ok = true;
  74304. format = "hsv";
  74305. }
  74306. else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
  74307. s = convertToPercentage(color.s);
  74308. l = convertToPercentage(color.l);
  74309. rgb = hslToRgb(color.h, s, l);
  74310. ok = true;
  74311. format = "hsl";
  74312. }
  74313. if (color.hasOwnProperty("a")) {
  74314. a = color.a;
  74315. }
  74316. }
  74317. a = boundAlpha(a);
  74318. return {
  74319. ok: ok,
  74320. format: color.format || format,
  74321. r: mathMin(255, mathMax(rgb.r, 0)),
  74322. g: mathMin(255, mathMax(rgb.g, 0)),
  74323. b: mathMin(255, mathMax(rgb.b, 0)),
  74324. a: a
  74325. };
  74326. }
  74327. // Conversion Functions
  74328. // --------------------
  74329. // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
  74330. // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
  74331. // `rgbToRgb`
  74332. // Handle bounds / percentage checking to conform to CSS color spec
  74333. // <http://www.w3.org/TR/css3-color/>
  74334. // *Assumes:* r, g, b in [0, 255] or [0, 1]
  74335. // *Returns:* { r, g, b } in [0, 255]
  74336. function rgbToRgb(r, g, b){
  74337. return {
  74338. r: bound01(r, 255) * 255,
  74339. g: bound01(g, 255) * 255,
  74340. b: bound01(b, 255) * 255
  74341. };
  74342. }
  74343. // `rgbToHsl`
  74344. // Converts an RGB color value to HSL.
  74345. // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
  74346. // *Returns:* { h, s, l } in [0,1]
  74347. function rgbToHsl(r, g, b) {
  74348. r = bound01(r, 255);
  74349. g = bound01(g, 255);
  74350. b = bound01(b, 255);
  74351. var max = mathMax(r, g, b), min = mathMin(r, g, b);
  74352. var h, s, l = (max + min) / 2;
  74353. if(max == min) {
  74354. h = s = 0; // achromatic
  74355. }
  74356. else {
  74357. var d = max - min;
  74358. s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
  74359. switch(max) {
  74360. case r: h = (g - b) / d + (g < b ? 6 : 0); break;
  74361. case g: h = (b - r) / d + 2; break;
  74362. case b: h = (r - g) / d + 4; break;
  74363. }
  74364. h /= 6;
  74365. }
  74366. return { h: h, s: s, l: l };
  74367. }
  74368. // `hslToRgb`
  74369. // Converts an HSL color value to RGB.
  74370. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
  74371. // *Returns:* { r, g, b } in the set [0, 255]
  74372. function hslToRgb(h, s, l) {
  74373. var r, g, b;
  74374. h = bound01(h, 360);
  74375. s = bound01(s, 100);
  74376. l = bound01(l, 100);
  74377. function hue2rgb(p, q, t) {
  74378. if(t < 0) t += 1;
  74379. if(t > 1) t -= 1;
  74380. if(t < 1/6) return p + (q - p) * 6 * t;
  74381. if(t < 1/2) return q;
  74382. if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
  74383. return p;
  74384. }
  74385. if(s === 0) {
  74386. r = g = b = l; // achromatic
  74387. }
  74388. else {
  74389. var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
  74390. var p = 2 * l - q;
  74391. r = hue2rgb(p, q, h + 1/3);
  74392. g = hue2rgb(p, q, h);
  74393. b = hue2rgb(p, q, h - 1/3);
  74394. }
  74395. return { r: r * 255, g: g * 255, b: b * 255 };
  74396. }
  74397. // `rgbToHsv`
  74398. // Converts an RGB color value to HSV
  74399. // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
  74400. // *Returns:* { h, s, v } in [0,1]
  74401. function rgbToHsv(r, g, b) {
  74402. r = bound01(r, 255);
  74403. g = bound01(g, 255);
  74404. b = bound01(b, 255);
  74405. var max = mathMax(r, g, b), min = mathMin(r, g, b);
  74406. var h, s, v = max;
  74407. var d = max - min;
  74408. s = max === 0 ? 0 : d / max;
  74409. if(max == min) {
  74410. h = 0; // achromatic
  74411. }
  74412. else {
  74413. switch(max) {
  74414. case r: h = (g - b) / d + (g < b ? 6 : 0); break;
  74415. case g: h = (b - r) / d + 2; break;
  74416. case b: h = (r - g) / d + 4; break;
  74417. }
  74418. h /= 6;
  74419. }
  74420. return { h: h, s: s, v: v };
  74421. }
  74422. // `hsvToRgb`
  74423. // Converts an HSV color value to RGB.
  74424. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
  74425. // *Returns:* { r, g, b } in the set [0, 255]
  74426. function hsvToRgb(h, s, v) {
  74427. h = bound01(h, 360) * 6;
  74428. s = bound01(s, 100);
  74429. v = bound01(v, 100);
  74430. var i = Math.floor(h),
  74431. f = h - i,
  74432. p = v * (1 - s),
  74433. q = v * (1 - f * s),
  74434. t = v * (1 - (1 - f) * s),
  74435. mod = i % 6,
  74436. r = [v, q, p, p, t, v][mod],
  74437. g = [t, v, v, q, p, p][mod],
  74438. b = [p, p, t, v, v, q][mod];
  74439. return { r: r * 255, g: g * 255, b: b * 255 };
  74440. }
  74441. // `rgbToHex`
  74442. // Converts an RGB color to hex
  74443. // Assumes r, g, and b are contained in the set [0, 255]
  74444. // Returns a 3 or 6 character hex
  74445. function rgbToHex(r, g, b, allow3Char) {
  74446. var hex = [
  74447. pad2(mathRound(r).toString(16)),
  74448. pad2(mathRound(g).toString(16)),
  74449. pad2(mathRound(b).toString(16))
  74450. ];
  74451. // Return a 3 character hex if possible
  74452. if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
  74453. return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
  74454. }
  74455. return hex.join("");
  74456. }
  74457. // `rgbaToHex`
  74458. // Converts an RGBA color plus alpha transparency to hex
  74459. // Assumes r, g, b are contained in the set [0, 255] and
  74460. // a in [0, 1]. Returns a 4 or 8 character rgba hex
  74461. function rgbaToHex(r, g, b, a, allow4Char) {
  74462. var hex = [
  74463. pad2(mathRound(r).toString(16)),
  74464. pad2(mathRound(g).toString(16)),
  74465. pad2(mathRound(b).toString(16)),
  74466. pad2(convertDecimalToHex(a))
  74467. ];
  74468. // Return a 4 character hex if possible
  74469. if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
  74470. return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
  74471. }
  74472. return hex.join("");
  74473. }
  74474. // `rgbaToArgbHex`
  74475. // Converts an RGBA color to an ARGB Hex8 string
  74476. // Rarely used, but required for "toFilter()"
  74477. function rgbaToArgbHex(r, g, b, a) {
  74478. var hex = [
  74479. pad2(convertDecimalToHex(a)),
  74480. pad2(mathRound(r).toString(16)),
  74481. pad2(mathRound(g).toString(16)),
  74482. pad2(mathRound(b).toString(16))
  74483. ];
  74484. return hex.join("");
  74485. }
  74486. // `equals`
  74487. // Can be called with any tinycolor input
  74488. tinycolor.equals = function (color1, color2) {
  74489. if (!color1 || !color2) { return false; }
  74490. return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
  74491. };
  74492. tinycolor.random = function() {
  74493. return tinycolor.fromRatio({
  74494. r: mathRandom(),
  74495. g: mathRandom(),
  74496. b: mathRandom()
  74497. });
  74498. };
  74499. // Modification Functions
  74500. // ----------------------
  74501. // Thanks to less.js for some of the basics here
  74502. // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
  74503. function desaturate(color, amount) {
  74504. amount = (amount === 0) ? 0 : (amount || 10);
  74505. var hsl = tinycolor(color).toHsl();
  74506. hsl.s -= amount / 100;
  74507. hsl.s = clamp01(hsl.s);
  74508. return tinycolor(hsl);
  74509. }
  74510. function saturate(color, amount) {
  74511. amount = (amount === 0) ? 0 : (amount || 10);
  74512. var hsl = tinycolor(color).toHsl();
  74513. hsl.s += amount / 100;
  74514. hsl.s = clamp01(hsl.s);
  74515. return tinycolor(hsl);
  74516. }
  74517. function greyscale(color) {
  74518. return tinycolor(color).desaturate(100);
  74519. }
  74520. function lighten (color, amount) {
  74521. amount = (amount === 0) ? 0 : (amount || 10);
  74522. var hsl = tinycolor(color).toHsl();
  74523. hsl.l += amount / 100;
  74524. hsl.l = clamp01(hsl.l);
  74525. return tinycolor(hsl);
  74526. }
  74527. function brighten(color, amount) {
  74528. amount = (amount === 0) ? 0 : (amount || 10);
  74529. var rgb = tinycolor(color).toRgb();
  74530. rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
  74531. rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
  74532. rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
  74533. return tinycolor(rgb);
  74534. }
  74535. function darken (color, amount) {
  74536. amount = (amount === 0) ? 0 : (amount || 10);
  74537. var hsl = tinycolor(color).toHsl();
  74538. hsl.l -= amount / 100;
  74539. hsl.l = clamp01(hsl.l);
  74540. return tinycolor(hsl);
  74541. }
  74542. // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
  74543. // Values outside of this range will be wrapped into this range.
  74544. function spin(color, amount) {
  74545. var hsl = tinycolor(color).toHsl();
  74546. var hue = (hsl.h + amount) % 360;
  74547. hsl.h = hue < 0 ? 360 + hue : hue;
  74548. return tinycolor(hsl);
  74549. }
  74550. // Combination Functions
  74551. // ---------------------
  74552. // Thanks to jQuery xColor for some of the ideas behind these
  74553. // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
  74554. function complement(color) {
  74555. var hsl = tinycolor(color).toHsl();
  74556. hsl.h = (hsl.h + 180) % 360;
  74557. return tinycolor(hsl);
  74558. }
  74559. function triad(color) {
  74560. var hsl = tinycolor(color).toHsl();
  74561. var h = hsl.h;
  74562. return [
  74563. tinycolor(color),
  74564. tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
  74565. tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
  74566. ];
  74567. }
  74568. function tetrad(color) {
  74569. var hsl = tinycolor(color).toHsl();
  74570. var h = hsl.h;
  74571. return [
  74572. tinycolor(color),
  74573. tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
  74574. tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
  74575. tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
  74576. ];
  74577. }
  74578. function splitcomplement(color) {
  74579. var hsl = tinycolor(color).toHsl();
  74580. var h = hsl.h;
  74581. return [
  74582. tinycolor(color),
  74583. tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
  74584. tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
  74585. ];
  74586. }
  74587. function analogous(color, results, slices) {
  74588. results = results || 6;
  74589. slices = slices || 30;
  74590. var hsl = tinycolor(color).toHsl();
  74591. var part = 360 / slices;
  74592. var ret = [tinycolor(color)];
  74593. for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
  74594. hsl.h = (hsl.h + part) % 360;
  74595. ret.push(tinycolor(hsl));
  74596. }
  74597. return ret;
  74598. }
  74599. function monochromatic(color, results) {
  74600. results = results || 6;
  74601. var hsv = tinycolor(color).toHsv();
  74602. var h = hsv.h, s = hsv.s, v = hsv.v;
  74603. var ret = [];
  74604. var modification = 1 / results;
  74605. while (results--) {
  74606. ret.push(tinycolor({ h: h, s: s, v: v}));
  74607. v = (v + modification) % 1;
  74608. }
  74609. return ret;
  74610. }
  74611. // Utility Functions
  74612. // ---------------------
  74613. tinycolor.mix = function(color1, color2, amount) {
  74614. amount = (amount === 0) ? 0 : (amount || 50);
  74615. var rgb1 = tinycolor(color1).toRgb();
  74616. var rgb2 = tinycolor(color2).toRgb();
  74617. var p = amount / 100;
  74618. var rgba = {
  74619. r: ((rgb2.r - rgb1.r) * p) + rgb1.r,
  74620. g: ((rgb2.g - rgb1.g) * p) + rgb1.g,
  74621. b: ((rgb2.b - rgb1.b) * p) + rgb1.b,
  74622. a: ((rgb2.a - rgb1.a) * p) + rgb1.a
  74623. };
  74624. return tinycolor(rgba);
  74625. };
  74626. // Readability Functions
  74627. // ---------------------
  74628. // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
  74629. // `contrast`
  74630. // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
  74631. tinycolor.readability = function(color1, color2) {
  74632. var c1 = tinycolor(color1);
  74633. var c2 = tinycolor(color2);
  74634. return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
  74635. };
  74636. // `isReadable`
  74637. // Ensure that foreground and background color combinations meet WCAG2 guidelines.
  74638. // The third argument is an optional Object.
  74639. // the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
  74640. // the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
  74641. // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
  74642. // *Example*
  74643. // tinycolor.isReadable("#000", "#111") => false
  74644. // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
  74645. tinycolor.isReadable = function(color1, color2, wcag2) {
  74646. var readability = tinycolor.readability(color1, color2);
  74647. var wcag2Parms, out;
  74648. out = false;
  74649. wcag2Parms = validateWCAG2Parms(wcag2);
  74650. switch (wcag2Parms.level + wcag2Parms.size) {
  74651. case "AAsmall":
  74652. case "AAAlarge":
  74653. out = readability >= 4.5;
  74654. break;
  74655. case "AAlarge":
  74656. out = readability >= 3;
  74657. break;
  74658. case "AAAsmall":
  74659. out = readability >= 7;
  74660. break;
  74661. }
  74662. return out;
  74663. };
  74664. // `mostReadable`
  74665. // Given a base color and a list of possible foreground or background
  74666. // colors for that base, returns the most readable color.
  74667. // Optionally returns Black or White if the most readable color is unreadable.
  74668. // *Example*
  74669. // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
  74670. // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
  74671. // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
  74672. // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
  74673. tinycolor.mostReadable = function(baseColor, colorList, args) {
  74674. var bestColor = null;
  74675. var bestScore = 0;
  74676. var readability;
  74677. var includeFallbackColors, level, size ;
  74678. args = args || {};
  74679. includeFallbackColors = args.includeFallbackColors ;
  74680. level = args.level;
  74681. size = args.size;
  74682. for (var i= 0; i < colorList.length ; i++) {
  74683. readability = tinycolor.readability(baseColor, colorList[i]);
  74684. if (readability > bestScore) {
  74685. bestScore = readability;
  74686. bestColor = tinycolor(colorList[i]);
  74687. }
  74688. }
  74689. if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
  74690. return bestColor;
  74691. }
  74692. else {
  74693. args.includeFallbackColors=false;
  74694. return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
  74695. }
  74696. };
  74697. // Big List of Colors
  74698. // ------------------
  74699. // <http://www.w3.org/TR/css3-color/#svg-color>
  74700. var names = tinycolor.names = {
  74701. aliceblue: "f0f8ff",
  74702. antiquewhite: "faebd7",
  74703. aqua: "0ff",
  74704. aquamarine: "7fffd4",
  74705. azure: "f0ffff",
  74706. beige: "f5f5dc",
  74707. bisque: "ffe4c4",
  74708. black: "000",
  74709. blanchedalmond: "ffebcd",
  74710. blue: "00f",
  74711. blueviolet: "8a2be2",
  74712. brown: "a52a2a",
  74713. burlywood: "deb887",
  74714. burntsienna: "ea7e5d",
  74715. cadetblue: "5f9ea0",
  74716. chartreuse: "7fff00",
  74717. chocolate: "d2691e",
  74718. coral: "ff7f50",
  74719. cornflowerblue: "6495ed",
  74720. cornsilk: "fff8dc",
  74721. crimson: "dc143c",
  74722. cyan: "0ff",
  74723. darkblue: "00008b",
  74724. darkcyan: "008b8b",
  74725. darkgoldenrod: "b8860b",
  74726. darkgray: "a9a9a9",
  74727. darkgreen: "006400",
  74728. darkgrey: "a9a9a9",
  74729. darkkhaki: "bdb76b",
  74730. darkmagenta: "8b008b",
  74731. darkolivegreen: "556b2f",
  74732. darkorange: "ff8c00",
  74733. darkorchid: "9932cc",
  74734. darkred: "8b0000",
  74735. darksalmon: "e9967a",
  74736. darkseagreen: "8fbc8f",
  74737. darkslateblue: "483d8b",
  74738. darkslategray: "2f4f4f",
  74739. darkslategrey: "2f4f4f",
  74740. darkturquoise: "00ced1",
  74741. darkviolet: "9400d3",
  74742. deeppink: "ff1493",
  74743. deepskyblue: "00bfff",
  74744. dimgray: "696969",
  74745. dimgrey: "696969",
  74746. dodgerblue: "1e90ff",
  74747. firebrick: "b22222",
  74748. floralwhite: "fffaf0",
  74749. forestgreen: "228b22",
  74750. fuchsia: "f0f",
  74751. gainsboro: "dcdcdc",
  74752. ghostwhite: "f8f8ff",
  74753. gold: "ffd700",
  74754. goldenrod: "daa520",
  74755. gray: "808080",
  74756. green: "008000",
  74757. greenyellow: "adff2f",
  74758. grey: "808080",
  74759. honeydew: "f0fff0",
  74760. hotpink: "ff69b4",
  74761. indianred: "cd5c5c",
  74762. indigo: "4b0082",
  74763. ivory: "fffff0",
  74764. khaki: "f0e68c",
  74765. lavender: "e6e6fa",
  74766. lavenderblush: "fff0f5",
  74767. lawngreen: "7cfc00",
  74768. lemonchiffon: "fffacd",
  74769. lightblue: "add8e6",
  74770. lightcoral: "f08080",
  74771. lightcyan: "e0ffff",
  74772. lightgoldenrodyellow: "fafad2",
  74773. lightgray: "d3d3d3",
  74774. lightgreen: "90ee90",
  74775. lightgrey: "d3d3d3",
  74776. lightpink: "ffb6c1",
  74777. lightsalmon: "ffa07a",
  74778. lightseagreen: "20b2aa",
  74779. lightskyblue: "87cefa",
  74780. lightslategray: "789",
  74781. lightslategrey: "789",
  74782. lightsteelblue: "b0c4de",
  74783. lightyellow: "ffffe0",
  74784. lime: "0f0",
  74785. limegreen: "32cd32",
  74786. linen: "faf0e6",
  74787. magenta: "f0f",
  74788. maroon: "800000",
  74789. mediumaquamarine: "66cdaa",
  74790. mediumblue: "0000cd",
  74791. mediumorchid: "ba55d3",
  74792. mediumpurple: "9370db",
  74793. mediumseagreen: "3cb371",
  74794. mediumslateblue: "7b68ee",
  74795. mediumspringgreen: "00fa9a",
  74796. mediumturquoise: "48d1cc",
  74797. mediumvioletred: "c71585",
  74798. midnightblue: "191970",
  74799. mintcream: "f5fffa",
  74800. mistyrose: "ffe4e1",
  74801. moccasin: "ffe4b5",
  74802. navajowhite: "ffdead",
  74803. navy: "000080",
  74804. oldlace: "fdf5e6",
  74805. olive: "808000",
  74806. olivedrab: "6b8e23",
  74807. orange: "ffa500",
  74808. orangered: "ff4500",
  74809. orchid: "da70d6",
  74810. palegoldenrod: "eee8aa",
  74811. palegreen: "98fb98",
  74812. paleturquoise: "afeeee",
  74813. palevioletred: "db7093",
  74814. papayawhip: "ffefd5",
  74815. peachpuff: "ffdab9",
  74816. peru: "cd853f",
  74817. pink: "ffc0cb",
  74818. plum: "dda0dd",
  74819. powderblue: "b0e0e6",
  74820. purple: "800080",
  74821. rebeccapurple: "663399",
  74822. red: "f00",
  74823. rosybrown: "bc8f8f",
  74824. royalblue: "4169e1",
  74825. saddlebrown: "8b4513",
  74826. salmon: "fa8072",
  74827. sandybrown: "f4a460",
  74828. seagreen: "2e8b57",
  74829. seashell: "fff5ee",
  74830. sienna: "a0522d",
  74831. silver: "c0c0c0",
  74832. skyblue: "87ceeb",
  74833. slateblue: "6a5acd",
  74834. slategray: "708090",
  74835. slategrey: "708090",
  74836. snow: "fffafa",
  74837. springgreen: "00ff7f",
  74838. steelblue: "4682b4",
  74839. tan: "d2b48c",
  74840. teal: "008080",
  74841. thistle: "d8bfd8",
  74842. tomato: "ff6347",
  74843. turquoise: "40e0d0",
  74844. violet: "ee82ee",
  74845. wheat: "f5deb3",
  74846. white: "fff",
  74847. whitesmoke: "f5f5f5",
  74848. yellow: "ff0",
  74849. yellowgreen: "9acd32"
  74850. };
  74851. // Make it easy to access colors via `hexNames[hex]`
  74852. var hexNames = tinycolor.hexNames = flip(names);
  74853. // Utilities
  74854. // ---------
  74855. // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
  74856. function flip(o) {
  74857. var flipped = { };
  74858. for (var i in o) {
  74859. if (o.hasOwnProperty(i)) {
  74860. flipped[o[i]] = i;
  74861. }
  74862. }
  74863. return flipped;
  74864. }
  74865. // Return a valid alpha value [0,1] with all invalid values being set to 1
  74866. function boundAlpha(a) {
  74867. a = parseFloat(a);
  74868. if (isNaN(a) || a < 0 || a > 1) {
  74869. a = 1;
  74870. }
  74871. return a;
  74872. }
  74873. // Take input from [0, n] and return it as [0, 1]
  74874. function bound01(n, max) {
  74875. if (isOnePointZero(n)) { n = "100%"; }
  74876. var processPercent = isPercentage(n);
  74877. n = mathMin(max, mathMax(0, parseFloat(n)));
  74878. // Automatically convert percentage into number
  74879. if (processPercent) {
  74880. n = parseInt(n * max, 10) / 100;
  74881. }
  74882. // Handle floating point rounding errors
  74883. if ((Math.abs(n - max) < 0.000001)) {
  74884. return 1;
  74885. }
  74886. // Convert into [0, 1] range if it isn't already
  74887. return (n % max) / parseFloat(max);
  74888. }
  74889. // Force a number between 0 and 1
  74890. function clamp01(val) {
  74891. return mathMin(1, mathMax(0, val));
  74892. }
  74893. // Parse a base-16 hex value into a base-10 integer
  74894. function parseIntFromHex(val) {
  74895. return parseInt(val, 16);
  74896. }
  74897. // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
  74898. // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
  74899. function isOnePointZero(n) {
  74900. return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
  74901. }
  74902. // Check to see if string passed in is a percentage
  74903. function isPercentage(n) {
  74904. return typeof n === "string" && n.indexOf('%') != -1;
  74905. }
  74906. // Force a hex value to have 2 characters
  74907. function pad2(c) {
  74908. return c.length == 1 ? '0' + c : '' + c;
  74909. }
  74910. // Replace a decimal with it's percentage value
  74911. function convertToPercentage(n) {
  74912. if (n <= 1) {
  74913. n = (n * 100) + "%";
  74914. }
  74915. return n;
  74916. }
  74917. // Converts a decimal to a hex value
  74918. function convertDecimalToHex(d) {
  74919. return Math.round(parseFloat(d) * 255).toString(16);
  74920. }
  74921. // Converts a hex value to a decimal
  74922. function convertHexToDecimal(h) {
  74923. return (parseIntFromHex(h) / 255);
  74924. }
  74925. var matchers = (function() {
  74926. // <http://www.w3.org/TR/css3-values/#integers>
  74927. var CSS_INTEGER = "[-\\+]?\\d+%?";
  74928. // <http://www.w3.org/TR/css3-values/#number-value>
  74929. var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
  74930. // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
  74931. var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
  74932. // Actual matching.
  74933. // Parentheses and commas are optional, but not required.
  74934. // Whitespace can take the place of commas or opening paren
  74935. var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
  74936. var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
  74937. return {
  74938. CSS_UNIT: new RegExp(CSS_UNIT),
  74939. rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
  74940. rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
  74941. hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
  74942. hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
  74943. hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
  74944. hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
  74945. hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  74946. hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  74947. hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  74948. hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  74949. };
  74950. })();
  74951. // `isValidCSSUnit`
  74952. // Take in a single string / number and check to see if it looks like a CSS unit
  74953. // (see `matchers` above for definition).
  74954. function isValidCSSUnit(color) {
  74955. return !!matchers.CSS_UNIT.exec(color);
  74956. }
  74957. // `stringInputToObject`
  74958. // Permissive string parsing. Take in a number of formats, and output an object
  74959. // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
  74960. function stringInputToObject(color) {
  74961. color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
  74962. var named = false;
  74963. if (names[color]) {
  74964. color = names[color];
  74965. named = true;
  74966. }
  74967. else if (color == 'transparent') {
  74968. return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  74969. }
  74970. // Try to match string input using regular expressions.
  74971. // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
  74972. // Just return an object and let the conversion functions handle that.
  74973. // This way the result will be the same whether the tinycolor is initialized with string or object.
  74974. var match;
  74975. if ((match = matchers.rgb.exec(color))) {
  74976. return { r: match[1], g: match[2], b: match[3] };
  74977. }
  74978. if ((match = matchers.rgba.exec(color))) {
  74979. return { r: match[1], g: match[2], b: match[3], a: match[4] };
  74980. }
  74981. if ((match = matchers.hsl.exec(color))) {
  74982. return { h: match[1], s: match[2], l: match[3] };
  74983. }
  74984. if ((match = matchers.hsla.exec(color))) {
  74985. return { h: match[1], s: match[2], l: match[3], a: match[4] };
  74986. }
  74987. if ((match = matchers.hsv.exec(color))) {
  74988. return { h: match[1], s: match[2], v: match[3] };
  74989. }
  74990. if ((match = matchers.hsva.exec(color))) {
  74991. return { h: match[1], s: match[2], v: match[3], a: match[4] };
  74992. }
  74993. if ((match = matchers.hex8.exec(color))) {
  74994. return {
  74995. r: parseIntFromHex(match[1]),
  74996. g: parseIntFromHex(match[2]),
  74997. b: parseIntFromHex(match[3]),
  74998. a: convertHexToDecimal(match[4]),
  74999. format: named ? "name" : "hex8"
  75000. };
  75001. }
  75002. if ((match = matchers.hex6.exec(color))) {
  75003. return {
  75004. r: parseIntFromHex(match[1]),
  75005. g: parseIntFromHex(match[2]),
  75006. b: parseIntFromHex(match[3]),
  75007. format: named ? "name" : "hex"
  75008. };
  75009. }
  75010. if ((match = matchers.hex4.exec(color))) {
  75011. return {
  75012. r: parseIntFromHex(match[1] + '' + match[1]),
  75013. g: parseIntFromHex(match[2] + '' + match[2]),
  75014. b: parseIntFromHex(match[3] + '' + match[3]),
  75015. a: convertHexToDecimal(match[4] + '' + match[4]),
  75016. format: named ? "name" : "hex8"
  75017. };
  75018. }
  75019. if ((match = matchers.hex3.exec(color))) {
  75020. return {
  75021. r: parseIntFromHex(match[1] + '' + match[1]),
  75022. g: parseIntFromHex(match[2] + '' + match[2]),
  75023. b: parseIntFromHex(match[3] + '' + match[3]),
  75024. format: named ? "name" : "hex"
  75025. };
  75026. }
  75027. return false;
  75028. }
  75029. function validateWCAG2Parms(parms) {
  75030. // return valid WCAG2 parms for isReadable.
  75031. // If input parms are invalid, return {"level":"AA", "size":"small"}
  75032. var level, size;
  75033. parms = parms || {"level":"AA", "size":"small"};
  75034. level = (parms.level || "AA").toUpperCase();
  75035. size = (parms.size || "small").toLowerCase();
  75036. if (level !== "AA" && level !== "AAA") {
  75037. level = "AA";
  75038. }
  75039. if (size !== "small" && size !== "large") {
  75040. size = "small";
  75041. }
  75042. return {"level":level, "size":size};
  75043. }
  75044. // Node: Export function
  75045. if (typeof module !== "undefined" && module.exports) {
  75046. module.exports = tinycolor;
  75047. }
  75048. // AMD/requirejs: Define the module
  75049. else if (true) {
  75050. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module),
  75051. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  75052. }
  75053. // Browser: Expose to window
  75054. else {
  75055. window.tinycolor = tinycolor;
  75056. }
  75057. })(Math);
  75058. /***/ }),
  75059. /* 150 */
  75060. /***/ (function(module, exports, __webpack_require__) {
  75061. "use strict";
  75062. Object.defineProperty(exports, "__esModule", {
  75063. value: true
  75064. });
  75065. var _extends2 = __webpack_require__(32);
  75066. var _extends3 = _interopRequireDefault(_extends2);
  75067. var _emitter = __webpack_require__(4);
  75068. var _emitter2 = _interopRequireDefault(_emitter);
  75069. var _handleEscapeMixin = __webpack_require__(151);
  75070. var _handleEscapeMixin2 = _interopRequireDefault(_handleEscapeMixin);
  75071. var _prefixMixin = __webpack_require__(50);
  75072. var _prefixMixin2 = _interopRequireDefault(_prefixMixin);
  75073. var _utils = __webpack_require__(39);
  75074. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  75075. exports.default = {
  75076. name: 'RecommendedColors',
  75077. mixins: [_emitter2.default, _handleEscapeMixin2.default, _prefixMixin2.default],
  75078. props: {
  75079. list: {
  75080. type: Array,
  75081. default: undefined
  75082. }
  75083. },
  75084. data: function data() {
  75085. var columns = 12;
  75086. var rows = Math.ceil(this.list.length / columns);
  75087. var normalStep = 1;
  75088. return {
  75089. left: -normalStep,
  75090. right: normalStep,
  75091. up: -normalStep,
  75092. down: normalStep,
  75093. powerKey: 'shiftKey',
  75094. grid: { x: 1, y: 1 },
  75095. rows: rows,
  75096. columns: columns
  75097. };
  75098. },
  75099. computed: {
  75100. hideClass: function hideClass() {
  75101. return String(this.prefixCls) + '-hide';
  75102. },
  75103. linearIndex: function linearIndex() {
  75104. return this.getLinearIndex(this.grid);
  75105. },
  75106. currentCircle: function currentCircle() {
  75107. return this.$refs['color-circle-' + String(this.linearIndex)][0];
  75108. }
  75109. },
  75110. methods: {
  75111. getLinearIndex: function getLinearIndex(grid) {
  75112. return this.columns * (grid.y - 1) + grid.x - 1;
  75113. },
  75114. getMaxLimit: function getMaxLimit(axis) {
  75115. return axis === 'x' ? this.columns : this.rows;
  75116. },
  75117. handleArrow: function handleArrow(e, axis, direction) {
  75118. e.preventDefault();
  75119. e.stopPropagation();
  75120. this.blurColor();
  75121. var grid = (0, _extends3.default)({}, this.grid);
  75122. if (e[this.powerKey]) {
  75123. if (direction < 0) {
  75124. grid[axis] = 1;
  75125. } else {
  75126. grid[axis] = this.getMaxLimit(axis);
  75127. }
  75128. } else {
  75129. grid[axis] += direction;
  75130. }
  75131. var index = this.getLinearIndex(grid);
  75132. if (index >= 0 && index < this.list.length) {
  75133. this.grid[axis] = (0, _utils.clamp)(grid[axis], 1, this.getMaxLimit(axis));
  75134. }
  75135. this.focusColor();
  75136. },
  75137. blurColor: function blurColor() {
  75138. this.currentCircle.classList.add(this.hideClass);
  75139. },
  75140. focusColor: function focusColor() {
  75141. this.currentCircle.classList.remove(this.hideClass);
  75142. },
  75143. handleEnter: function handleEnter(e) {
  75144. this.handleClick(e, this.currentCircle);
  75145. },
  75146. handleClick: function handleClick(e, circle) {
  75147. e.preventDefault();
  75148. e.stopPropagation();
  75149. this.$refs.reference.focus();
  75150. var target = circle || e.target;
  75151. var colorId = target.dataset.colorId || target.parentElement.dataset.colorId;
  75152. if (colorId) {
  75153. this.blurColor();
  75154. var id = Number(colorId) + 1;
  75155. this.grid.x = id % this.columns || this.columns;
  75156. this.grid.y = Math.ceil(id / this.columns);
  75157. this.focusColor();
  75158. this.$emit('picker-color', this.list[colorId]);
  75159. this.$emit('change', { hex: this.list[colorId], source: 'hex' });
  75160. }
  75161. },
  75162. lineBreak: function lineBreak(list, index) {
  75163. if (!index) {
  75164. return false;
  75165. }
  75166. var nextIndex = index + 1;
  75167. return nextIndex < list.length && nextIndex % this.columns === 0;
  75168. }
  75169. }
  75170. };
  75171. /***/ }),
  75172. /* 151 */
  75173. /***/ (function(module, exports, __webpack_require__) {
  75174. "use strict";
  75175. Object.defineProperty(exports, "__esModule", {
  75176. value: true
  75177. });
  75178. exports.default = {
  75179. methods: {
  75180. handleEscape: function handleEscape(e) {
  75181. this.dispatch('ColorPicker', 'on-escape-keydown', e);
  75182. }
  75183. }
  75184. };
  75185. /***/ }),
  75186. /* 152 */
  75187. /***/ (function(module, exports, __webpack_require__) {
  75188. "use strict";
  75189. Object.defineProperty(exports, "__esModule", {
  75190. value: true
  75191. });
  75192. var _hsaMixin = __webpack_require__(84);
  75193. var _hsaMixin2 = _interopRequireDefault(_hsaMixin);
  75194. var _prefixMixin = __webpack_require__(50);
  75195. var _prefixMixin2 = _interopRequireDefault(_prefixMixin);
  75196. var _utils = __webpack_require__(39);
  75197. var _dom = __webpack_require__(12);
  75198. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  75199. exports.default = {
  75200. name: 'Saturation',
  75201. mixins: [_hsaMixin2.default, _prefixMixin2.default],
  75202. data: function data() {
  75203. var normalStep = 0.01;
  75204. return {
  75205. left: -normalStep,
  75206. right: normalStep,
  75207. up: normalStep,
  75208. down: -normalStep,
  75209. multiplier: 10,
  75210. powerKey: 'shiftKey'
  75211. };
  75212. },
  75213. computed: {
  75214. bgColorStyle: function bgColorStyle() {
  75215. return { background: 'hsl(' + String(this.value.hsv.h) + ', 100%, 50%)' };
  75216. },
  75217. pointerStyle: function pointerStyle() {
  75218. return { top: -(this.value.hsv.v * 100) + 1 + 100 + '%', left: this.value.hsv.s * 100 + '%' };
  75219. }
  75220. },
  75221. methods: {
  75222. change: function change(h, s, v, a) {
  75223. this.$emit('change', { h: h, s: s, v: v, a: a, source: 'hsva' });
  75224. },
  75225. handleSlide: function handleSlide(e, direction, key) {
  75226. e.preventDefault();
  75227. e.stopPropagation();
  75228. var isPowerKey = e[this.powerKey];
  75229. var increment = isPowerKey ? direction * this.multiplier : direction;
  75230. var _value$hsv = this.value.hsv,
  75231. h = _value$hsv.h,
  75232. s = _value$hsv.s,
  75233. v = _value$hsv.v,
  75234. a = _value$hsv.a;
  75235. var saturation = (0, _utils.clamp)(s + (0, _utils.getIncrement)(key, ['left', 'right'], increment), 0, 1);
  75236. var bright = (0, _utils.clamp)(v + (0, _utils.getIncrement)(key, ['up', 'down'], increment), 0, 1);
  75237. this.change(h, saturation, bright, a);
  75238. },
  75239. handleChange: function handleChange(e) {
  75240. e.preventDefault();
  75241. e.stopPropagation();
  75242. var _$refs$container = this.$refs.container,
  75243. clientWidth = _$refs$container.clientWidth,
  75244. clientHeight = _$refs$container.clientHeight;
  75245. var left = (0, _utils.clamp)(this.getLeft(e), 0, clientWidth);
  75246. var top = (0, _utils.clamp)(this.getTop(e), 0, clientHeight);
  75247. var saturation = left / clientWidth;
  75248. var bright = (0, _utils.clamp)(1 - top / clientHeight, 0, 1);
  75249. this.change(this.value.hsv.h, saturation, bright, this.value.hsv.a);
  75250. },
  75251. handleMouseDown: function handleMouseDown(e) {
  75252. _hsaMixin2.default.methods.handleMouseDown.call(this, e);
  75253. (0, _dom.on)(window, 'mouseup', this.handleChange);
  75254. },
  75255. unbindEventListeners: function unbindEventListeners(e) {
  75256. _hsaMixin2.default.methods.unbindEventListeners.call(this, e);
  75257. (0, _dom.off)(window, 'mouseup', this.handleChange);
  75258. }
  75259. }
  75260. };
  75261. /***/ }),
  75262. /* 153 */
  75263. /***/ (function(module, exports, __webpack_require__) {
  75264. "use strict";
  75265. Object.defineProperty(exports, "__esModule", {
  75266. value: true
  75267. });
  75268. var _hsaMixin = __webpack_require__(84);
  75269. var _hsaMixin2 = _interopRequireDefault(_hsaMixin);
  75270. var _prefixMixin = __webpack_require__(50);
  75271. var _prefixMixin2 = _interopRequireDefault(_prefixMixin);
  75272. var _utils = __webpack_require__(39);
  75273. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  75274. exports.default = {
  75275. name: 'Hue',
  75276. mixins: [_hsaMixin2.default, _prefixMixin2.default],
  75277. data: function data() {
  75278. var normalStep = 1 / 360 * 25;
  75279. var jumpStep = 20 * normalStep;
  75280. return {
  75281. left: -normalStep,
  75282. right: normalStep,
  75283. up: jumpStep,
  75284. down: -jumpStep,
  75285. powerKey: 'shiftKey',
  75286. percent: (0, _utils.clamp)(this.value.hsl.h * 100 / 360, 0, 100)
  75287. };
  75288. },
  75289. watch: {
  75290. value: function value() {
  75291. this.percent = (0, _utils.clamp)(this.value.hsl.h * 100 / 360, 0, 100);
  75292. }
  75293. },
  75294. methods: {
  75295. change: function change(percent) {
  75296. this.percent = (0, _utils.clamp)(percent, 0, 100);
  75297. var _value$hsl = this.value.hsl,
  75298. h = _value$hsl.h,
  75299. s = _value$hsl.s,
  75300. l = _value$hsl.l,
  75301. a = _value$hsl.a;
  75302. var newHue = (0, _utils.clamp)(percent / 100 * 360, 0, 360);
  75303. if (h !== newHue) {
  75304. this.$emit('change', { h: newHue, s: s, l: l, a: a, source: 'hsl' });
  75305. }
  75306. },
  75307. handleSlide: function handleSlide(e, direction) {
  75308. e.preventDefault();
  75309. e.stopPropagation();
  75310. if (e[this.powerKey]) {
  75311. this.change(direction < 0 ? 0 : 100);
  75312. return;
  75313. }
  75314. this.change(this.percent + direction);
  75315. },
  75316. handleChange: function handleChange(e) {
  75317. e.preventDefault();
  75318. e.stopPropagation();
  75319. var left = this.getLeft(e);
  75320. if (left < 0) {
  75321. this.change(0);
  75322. return;
  75323. }
  75324. var clientWidth = this.$refs.container.clientWidth;
  75325. if (left > clientWidth) {
  75326. this.change(100);
  75327. return;
  75328. }
  75329. this.change(left * 100 / clientWidth);
  75330. }
  75331. }
  75332. };
  75333. /***/ }),
  75334. /* 154 */
  75335. /***/ (function(module, exports, __webpack_require__) {
  75336. "use strict";
  75337. Object.defineProperty(exports, "__esModule", {
  75338. value: true
  75339. });
  75340. var _hsaMixin = __webpack_require__(84);
  75341. var _hsaMixin2 = _interopRequireDefault(_hsaMixin);
  75342. var _prefixMixin = __webpack_require__(50);
  75343. var _prefixMixin2 = _interopRequireDefault(_prefixMixin);
  75344. var _utils = __webpack_require__(39);
  75345. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  75346. exports.default = {
  75347. name: 'Alpha',
  75348. mixins: [_hsaMixin2.default, _prefixMixin2.default],
  75349. data: function data() {
  75350. var normalStep = 1;
  75351. var jumpStep = 10;
  75352. return {
  75353. left: -normalStep,
  75354. right: normalStep,
  75355. up: jumpStep,
  75356. down: -jumpStep,
  75357. powerKey: 'shiftKey'
  75358. };
  75359. },
  75360. computed: {
  75361. gradientStyle: function gradientStyle() {
  75362. var _value$rgba = this.value.rgba,
  75363. r = _value$rgba.r,
  75364. g = _value$rgba.g,
  75365. b = _value$rgba.b;
  75366. var start = (0, _utils.toRGBAString)({ r: r, g: g, b: b, a: 0 });
  75367. var finish = (0, _utils.toRGBAString)({ r: r, g: g, b: b, a: 1 });
  75368. return { background: 'linear-gradient(to right, ' + String(start) + ' 0%, ' + String(finish) + ' 100%)' };
  75369. }
  75370. },
  75371. methods: {
  75372. change: function change(newAlpha) {
  75373. var _value$hsl = this.value.hsl,
  75374. h = _value$hsl.h,
  75375. s = _value$hsl.s,
  75376. l = _value$hsl.l;
  75377. var a = this.value.a;
  75378. if (a !== newAlpha) {
  75379. this.$emit('change', { h: h, s: s, l: l, a: newAlpha, source: 'rgba' });
  75380. }
  75381. },
  75382. handleSlide: function handleSlide(e, direction) {
  75383. e.preventDefault();
  75384. e.stopPropagation();
  75385. this.change((0, _utils.clamp)(e[this.powerKey] ? direction : Math.round(this.value.hsl.a * 100 + direction) / 100, 0, 1));
  75386. },
  75387. handleChange: function handleChange(e) {
  75388. e.preventDefault();
  75389. e.stopPropagation();
  75390. var left = this.getLeft(e);
  75391. if (left < 0) {
  75392. this.change(0);
  75393. return;
  75394. }
  75395. var clientWidth = this.$refs.container.clientWidth;
  75396. if (left > clientWidth) {
  75397. this.change(1);
  75398. return;
  75399. }
  75400. this.change(Math.round(left * 100 / clientWidth) / 100);
  75401. }
  75402. }
  75403. };
  75404. /***/ }),
  75405. /* 155 */
  75406. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  75407. "use strict";
  75408. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  75409. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_content_vue__ = __webpack_require__(156);
  75410. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_content_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_content_vue__);
  75411. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_content_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_content_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  75412. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e2768100_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_content_vue__ = __webpack_require__(404);
  75413. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e2768100_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_content_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e2768100_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_content_vue__);
  75414. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  75415. /* script */
  75416. /* template */
  75417. /* template functional */
  75418. var __vue_template_functional__ = false
  75419. /* styles */
  75420. var __vue_styles__ = null
  75421. /* scopeId */
  75422. var __vue_scopeId__ = null
  75423. /* moduleIdentifier (server only) */
  75424. var __vue_module_identifier__ = null
  75425. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  75426. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_content_vue___default.a,
  75427. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e2768100_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_content_vue__["render"],
  75428. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e2768100_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_content_vue__["staticRenderFns"],
  75429. __vue_template_functional__,
  75430. __vue_styles__,
  75431. __vue_scopeId__,
  75432. __vue_module_identifier__
  75433. )
  75434. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  75435. /***/ }),
  75436. /* 156 */
  75437. /***/ (function(module, exports, __webpack_require__) {
  75438. "use strict";
  75439. Object.defineProperty(exports, "__esModule", {
  75440. value: true
  75441. });
  75442. var prefixCls = 'ivu-layout';
  75443. exports.default = {
  75444. name: 'Content',
  75445. computed: {
  75446. wrapClasses: function wrapClasses() {
  75447. return prefixCls + '-content';
  75448. }
  75449. }
  75450. };
  75451. /***/ }),
  75452. /* 157 */
  75453. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  75454. "use strict";
  75455. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  75456. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue__ = __webpack_require__(158);
  75457. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue__);
  75458. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  75459. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4ff2e89a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__ = __webpack_require__(408);
  75460. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4ff2e89a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4ff2e89a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__);
  75461. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  75462. /* script */
  75463. /* template */
  75464. /* template functional */
  75465. var __vue_template_functional__ = false
  75466. /* styles */
  75467. var __vue_styles__ = null
  75468. /* scopeId */
  75469. var __vue_scopeId__ = null
  75470. /* moduleIdentifier (server only) */
  75471. var __vue_module_identifier__ = null
  75472. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  75473. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_picker_vue___default.a,
  75474. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4ff2e89a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__["render"],
  75475. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4ff2e89a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_picker_vue__["staticRenderFns"],
  75476. __vue_template_functional__,
  75477. __vue_styles__,
  75478. __vue_scopeId__,
  75479. __vue_module_identifier__
  75480. )
  75481. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  75482. /***/ }),
  75483. /* 158 */
  75484. /***/ (function(module, exports, __webpack_require__) {
  75485. "use strict";
  75486. Object.defineProperty(exports, "__esModule", {
  75487. value: true
  75488. });
  75489. var _typeof2 = __webpack_require__(27);
  75490. var _typeof3 = _interopRequireDefault(_typeof2);
  75491. var _stringify = __webpack_require__(57);
  75492. var _stringify2 = _interopRequireDefault(_stringify);
  75493. var _slicedToArray2 = __webpack_require__(26);
  75494. var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
  75495. var _extends2 = __webpack_require__(32);
  75496. var _extends3 = _interopRequireDefault(_extends2);
  75497. var _toConsumableArray2 = __webpack_require__(17);
  75498. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  75499. var _defineProperty2 = __webpack_require__(2);
  75500. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  75501. var _newArrowCheck2 = __webpack_require__(1);
  75502. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  75503. var _input = __webpack_require__(38);
  75504. var _input2 = _interopRequireDefault(_input);
  75505. var _dropdown = __webpack_require__(36);
  75506. var _dropdown2 = _interopRequireDefault(_dropdown);
  75507. var _icon = __webpack_require__(8);
  75508. var _icon2 = _interopRequireDefault(_icon);
  75509. var _vClickOutsideX = __webpack_require__(76);
  75510. var _transferDom = __webpack_require__(23);
  75511. var _transferDom2 = _interopRequireDefault(_transferDom);
  75512. var _assist = __webpack_require__(3);
  75513. var _util = __webpack_require__(20);
  75514. var _emitter = __webpack_require__(4);
  75515. var _emitter2 = _interopRequireDefault(_emitter);
  75516. var _form = __webpack_require__(11);
  75517. var _form2 = _interopRequireDefault(_form);
  75518. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  75519. var prefixCls = 'ivu-date-picker';
  75520. var pickerPrefixCls = 'ivu-picker';
  75521. var isEmptyArray = function (val) {
  75522. (0, _newArrowCheck3.default)(undefined, undefined);
  75523. return val.reduce(function (isEmpty, str) {
  75524. (0, _newArrowCheck3.default)(undefined, undefined);
  75525. return isEmpty && !str || typeof str === 'string' && str.trim() === '';
  75526. }.bind(undefined), true);
  75527. }.bind(undefined);
  75528. var keyValueMapper = {
  75529. 40: 'up',
  75530. 39: 'right',
  75531. 38: 'down',
  75532. 37: 'left'
  75533. };
  75534. var mapPossibleValues = function (key, horizontal, vertical) {
  75535. (0, _newArrowCheck3.default)(undefined, undefined);
  75536. if (key === 'left') return horizontal * -1;
  75537. if (key === 'right') return horizontal * 1;
  75538. if (key === 'up') return vertical * 1;
  75539. if (key === 'down') return vertical * -1;
  75540. }.bind(undefined);
  75541. var pulseElement = function (el) {
  75542. (0, _newArrowCheck3.default)(undefined, undefined);
  75543. var pulseClass = 'ivu-date-picker-btn-pulse';
  75544. el.classList.add(pulseClass);
  75545. setTimeout(function () {
  75546. (0, _newArrowCheck3.default)(undefined, undefined);
  75547. return el.classList.remove(pulseClass);
  75548. }.bind(undefined), 200);
  75549. }.bind(undefined);
  75550. var extractTime = function (date) {
  75551. (0, _newArrowCheck3.default)(undefined, undefined);
  75552. if (!date) return [0, 0, 0];
  75553. return [date.getHours(), date.getMinutes(), date.getSeconds()];
  75554. }.bind(undefined);
  75555. exports.default = {
  75556. mixins: [_emitter2.default, _form2.default],
  75557. components: { iInput: _input2.default, Drop: _dropdown2.default, Icon: _icon2.default },
  75558. directives: { clickOutside: _vClickOutsideX.directive, TransferDom: _transferDom2.default },
  75559. props: {
  75560. format: {
  75561. type: String
  75562. },
  75563. readonly: {
  75564. type: Boolean,
  75565. default: false
  75566. },
  75567. disabled: {
  75568. type: Boolean,
  75569. default: false
  75570. },
  75571. editable: {
  75572. type: Boolean,
  75573. default: true
  75574. },
  75575. clearable: {
  75576. type: Boolean,
  75577. default: true
  75578. },
  75579. confirm: {
  75580. type: Boolean,
  75581. default: false
  75582. },
  75583. open: {
  75584. type: Boolean,
  75585. default: null
  75586. },
  75587. multiple: {
  75588. type: Boolean,
  75589. default: false
  75590. },
  75591. timePickerOptions: {
  75592. default: function _default() {
  75593. (0, _newArrowCheck3.default)(undefined, undefined);
  75594. return {};
  75595. }.bind(undefined),
  75596. type: Object
  75597. },
  75598. splitPanels: {
  75599. type: Boolean,
  75600. default: false
  75601. },
  75602. showWeekNumbers: {
  75603. type: Boolean,
  75604. default: false
  75605. },
  75606. startDate: {
  75607. type: Date
  75608. },
  75609. size: {
  75610. validator: function validator(value) {
  75611. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  75612. },
  75613. default: function _default() {
  75614. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  75615. }
  75616. },
  75617. placeholder: {
  75618. type: String,
  75619. default: ''
  75620. },
  75621. placement: {
  75622. validator: function validator(value) {
  75623. return (0, _assist.oneOf)(value, ['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'right', 'right-start', 'right-end']);
  75624. },
  75625. default: 'bottom-start'
  75626. },
  75627. transfer: {
  75628. type: Boolean,
  75629. default: function _default() {
  75630. return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
  75631. }
  75632. },
  75633. name: {
  75634. type: String
  75635. },
  75636. elementId: {
  75637. type: String
  75638. },
  75639. steps: {
  75640. type: Array,
  75641. default: function _default() {
  75642. (0, _newArrowCheck3.default)(undefined, undefined);
  75643. return [];
  75644. }.bind(undefined)
  75645. },
  75646. value: {
  75647. type: [Date, String, Array]
  75648. },
  75649. options: {
  75650. type: Object,
  75651. default: function _default() {
  75652. (0, _newArrowCheck3.default)(undefined, undefined);
  75653. return {};
  75654. }.bind(undefined)
  75655. },
  75656. separator: {
  75657. type: String,
  75658. default: ' - '
  75659. },
  75660. capture: {
  75661. type: Boolean,
  75662. default: function _default() {
  75663. return !this.$IVIEW ? true : this.$IVIEW.capture;
  75664. }
  75665. },
  75666. transferClassName: {
  75667. type: String
  75668. },
  75669. eventsEnabled: {
  75670. type: Boolean,
  75671. default: false
  75672. }
  75673. },
  75674. data: function data() {
  75675. var isRange = this.type.includes('range');
  75676. var emptyArray = isRange ? [null, null] : [null];
  75677. var initialValue = isEmptyArray((isRange ? this.value : [this.value]) || []) ? emptyArray : this.parseDate(this.value);
  75678. var focusedTime = initialValue.map(extractTime);
  75679. return {
  75680. prefixCls: prefixCls,
  75681. showClose: false,
  75682. visible: false,
  75683. internalValue: initialValue,
  75684. disableClickOutSide: false,
  75685. disableCloseUnderTransfer: false,
  75686. selectionMode: this.onSelectionModeChange(this.type),
  75687. forceInputRerender: 1,
  75688. isFocused: false,
  75689. focusedDate: initialValue[0] || this.startDate || new Date(),
  75690. focusedTime: {
  75691. column: 0,
  75692. picker: 0,
  75693. time: focusedTime,
  75694. active: false
  75695. },
  75696. internalFocus: false,
  75697. isValueNull: false };
  75698. },
  75699. computed: {
  75700. wrapperClasses: function wrapperClasses() {
  75701. return [prefixCls, (0, _defineProperty3.default)({}, prefixCls + '-focused', this.isFocused)];
  75702. },
  75703. publicVModelValue: function publicVModelValue() {
  75704. var _this = this;
  75705. if (this.multiple) {
  75706. return this.internalValue.slice();
  75707. } else {
  75708. var isRange = this.type.includes('range');
  75709. var val = this.internalValue.map(function (date) {
  75710. (0, _newArrowCheck3.default)(this, _this);
  75711. return date instanceof Date ? new Date(date) : date || '';
  75712. }.bind(this));
  75713. if (this.type.match(/^time/)) val = val.map(this.formatDate);
  75714. return isRange || this.multiple ? val : val[0];
  75715. }
  75716. },
  75717. publicStringValue: function publicStringValue() {
  75718. var formatDate = this.formatDate,
  75719. publicVModelValue = this.publicVModelValue,
  75720. type = this.type;
  75721. if (type.match(/^time/)) return publicVModelValue;
  75722. if (this.multiple) return formatDate(publicVModelValue);
  75723. return Array.isArray(publicVModelValue) ? publicVModelValue.map(formatDate) : formatDate(publicVModelValue);
  75724. },
  75725. opened: function opened() {
  75726. return this.open === null ? this.visible : this.open;
  75727. },
  75728. transition: function transition() {
  75729. var bottomPlaced = this.placement.match(/^bottom/);
  75730. return bottomPlaced ? 'slide-up' : 'slide-down';
  75731. },
  75732. visualValue: function visualValue() {
  75733. return this.formatDate(this.internalValue);
  75734. },
  75735. isConfirm: function isConfirm() {
  75736. return this.confirm || this.type === 'datetime' || this.type === 'datetimerange' || this.multiple;
  75737. },
  75738. arrowType: function arrowType() {
  75739. var type = '';
  75740. if (this.type === 'time' || this.type === 'timerange') {
  75741. type = 'ios-time-outline';
  75742. if (this.$IVIEW) {
  75743. if (this.$IVIEW.timePicker.customIcon) {
  75744. type = '';
  75745. } else if (this.$IVIEW.timePicker.icon) {
  75746. type = this.$IVIEW.timePicker.icon;
  75747. }
  75748. }
  75749. } else {
  75750. type = 'ios-calendar-outline';
  75751. if (this.$IVIEW) {
  75752. if (this.$IVIEW.datePicker.customIcon) {
  75753. type = '';
  75754. } else if (this.$IVIEW.datePicker.icon) {
  75755. type = this.$IVIEW.datePicker.icon;
  75756. }
  75757. }
  75758. }
  75759. if (this.showClose) type = 'ios-close-circle';
  75760. return type;
  75761. },
  75762. customArrowType: function customArrowType() {
  75763. var type = '';
  75764. if (!this.showClose) {
  75765. if (this.type === 'time' || this.type === 'timerange') {
  75766. if (this.$IVIEW) {
  75767. if (this.$IVIEW.timePicker.customIcon) {
  75768. type = this.$IVIEW.timePicker.customIcon;
  75769. }
  75770. }
  75771. } else {
  75772. if (this.$IVIEW) {
  75773. if (this.$IVIEW.datePicker.customIcon) {
  75774. type = this.$IVIEW.datePicker.customIcon;
  75775. }
  75776. }
  75777. }
  75778. }
  75779. return type;
  75780. },
  75781. arrowSize: function arrowSize() {
  75782. var size = '';
  75783. if (!this.showClose) {
  75784. if (this.type === 'time' || this.type === 'timerange') {
  75785. if (this.$IVIEW) {
  75786. if (this.$IVIEW.timePicker.iconSize) {
  75787. size = this.$IVIEW.timePicker.iconSize;
  75788. }
  75789. }
  75790. } else {
  75791. if (this.$IVIEW) {
  75792. if (this.$IVIEW.datePicker.iconSize) {
  75793. size = this.$IVIEW.datePicker.iconSize;
  75794. }
  75795. }
  75796. }
  75797. }
  75798. return size;
  75799. },
  75800. dropdownCls: function dropdownCls() {
  75801. var _ref2;
  75802. return _ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-transfer', this.transfer), (0, _defineProperty3.default)(_ref2, this.transferClassName, this.transferClassName), _ref2;
  75803. }
  75804. },
  75805. methods: {
  75806. onSelectionModeChange: function onSelectionModeChange(type) {
  75807. if (type.match(/^date/)) type = 'date';
  75808. this.selectionMode = (0, _assist.oneOf)(type, ['year', 'month', 'date', 'time']) && type;
  75809. return this.selectionMode;
  75810. },
  75811. handleTransferClick: function handleTransferClick() {
  75812. if (this.transfer) this.disableCloseUnderTransfer = true;
  75813. },
  75814. handleClose: function handleClose(e) {
  75815. if (this.disableCloseUnderTransfer) {
  75816. this.disableCloseUnderTransfer = false;
  75817. return false;
  75818. }
  75819. if (e && e.type === 'mousedown' && this.visible) {
  75820. e.preventDefault();
  75821. e.stopPropagation();
  75822. return;
  75823. }
  75824. if (this.visible) {
  75825. var pickerPanel = this.$refs.pickerPanel && this.$refs.pickerPanel.$el;
  75826. if (e && pickerPanel && pickerPanel.contains(e.target)) return;
  75827. this.visible = false;
  75828. e && e.preventDefault();
  75829. e && e.stopPropagation();
  75830. this.$emit('on-clickoutside', e);
  75831. return;
  75832. }
  75833. this.isFocused = false;
  75834. this.disableClickOutSide = false;
  75835. },
  75836. handleFocus: function handleFocus(e) {
  75837. if (this.readonly) return;
  75838. this.isFocused = true;
  75839. if (e && e.type === 'focus') return;
  75840. if (!this.itemDisabled) {
  75841. this.visible = true;
  75842. }
  75843. },
  75844. handleBlur: function handleBlur(e) {
  75845. if (this.internalFocus) {
  75846. this.internalFocus = false;
  75847. return;
  75848. }
  75849. if (this.visible) {
  75850. e.preventDefault();
  75851. return;
  75852. }
  75853. this.isFocused = false;
  75854. this.onSelectionModeChange(this.type);
  75855. this.internalValue = this.internalValue.slice();
  75856. this.reset();
  75857. this.$refs.pickerPanel.onToggleVisibility(false);
  75858. },
  75859. handleKeydown: function handleKeydown(e) {
  75860. var _this2 = this;
  75861. var keyCode = e.keyCode;
  75862. if (keyCode === 9) {
  75863. if (this.visible) {
  75864. e.stopPropagation();
  75865. e.preventDefault();
  75866. if (this.isConfirm) {
  75867. var selector = '.' + pickerPrefixCls + '-confirm > *';
  75868. var tabbable = this.$refs.drop.$el.querySelectorAll(selector);
  75869. this.internalFocus = true;
  75870. var element = [].concat((0, _toConsumableArray3.default)(tabbable))[e.shiftKey ? 'pop' : 'shift']();
  75871. element.focus();
  75872. } else {
  75873. this.handleClose();
  75874. }
  75875. } else {
  75876. this.focused = false;
  75877. }
  75878. }
  75879. var arrows = [37, 38, 39, 40];
  75880. if (!this.visible && arrows.includes(keyCode)) {
  75881. this.visible = true;
  75882. return;
  75883. }
  75884. if (keyCode === 27) {
  75885. if (this.visible) {
  75886. e.stopPropagation();
  75887. this.handleClose();
  75888. }
  75889. }
  75890. if (keyCode === 13) {
  75891. var timePickers = (0, _assist.findComponentsDownward)(this, 'TimeSpinner');
  75892. if (timePickers.length > 0) {
  75893. var columnsPerPicker = timePickers[0].showSeconds ? 3 : 2;
  75894. var pickerIndex = Math.floor(this.focusedTime.column / columnsPerPicker);
  75895. var value = this.focusedTime.time[pickerIndex];
  75896. timePickers[pickerIndex].chooseValue(value);
  75897. return;
  75898. }
  75899. if (this.type.match(/range/)) {
  75900. this.$refs.pickerPanel.handleRangePick(this.focusedDate, 'date');
  75901. } else {
  75902. var panels = (0, _assist.findComponentsDownward)(this, 'PanelTable');
  75903. var compareDate = function (d) {
  75904. (0, _newArrowCheck3.default)(this, _this2);
  75905. var sliceIndex = ['year', 'month', 'date'].indexOf(this.type) + 1;
  75906. return [d.getFullYear(), d.getMonth(), d.getDate()].slice(0, sliceIndex).join('-');
  75907. }.bind(this);
  75908. var dateIsValid = panels.find(function (_ref3) {
  75909. var cells = _ref3.cells;
  75910. (0, _newArrowCheck3.default)(this, _this2);
  75911. return cells.find(function (_ref4) {
  75912. var date = _ref4.date,
  75913. disabled = _ref4.disabled;
  75914. (0, _newArrowCheck3.default)(this, _this2);
  75915. return compareDate(date) === compareDate(this.focusedDate) && !disabled;
  75916. }.bind(this));
  75917. }.bind(this));
  75918. if (dateIsValid) this.onPick(this.focusedDate, false, 'date');
  75919. }
  75920. }
  75921. if (!arrows.includes(keyCode)) return;
  75922. if (this.focusedTime.active) e.preventDefault();
  75923. this.navigateDatePanel(keyValueMapper[keyCode], e.shiftKey);
  75924. },
  75925. reset: function reset() {
  75926. this.$refs.pickerPanel.reset && this.$refs.pickerPanel.reset();
  75927. },
  75928. navigateTimePanel: function navigateTimePanel(direction) {
  75929. var _this3 = this;
  75930. this.focusedTime.active = true;
  75931. var horizontal = direction.match(/left|right/);
  75932. var vertical = direction.match(/up|down/);
  75933. var timePickers = (0, _assist.findComponentsDownward)(this, 'TimeSpinner');
  75934. var maxNrOfColumns = (timePickers[0].showSeconds ? 3 : 2) * timePickers.length;
  75935. var column = function (currentColumn) {
  75936. (0, _newArrowCheck3.default)(this, _this3);
  75937. var incremented = currentColumn + (horizontal ? direction === 'left' ? -1 : 1 : 0);
  75938. return (incremented + maxNrOfColumns) % maxNrOfColumns;
  75939. }.bind(this)(this.focusedTime.column);
  75940. var columnsPerPicker = maxNrOfColumns / timePickers.length;
  75941. var pickerIndex = Math.floor(column / columnsPerPicker);
  75942. var col = column % columnsPerPicker;
  75943. if (horizontal) {
  75944. var time = this.internalValue.map(extractTime);
  75945. this.focusedTime = (0, _extends3.default)({}, this.focusedTime, {
  75946. column: column,
  75947. time: time
  75948. });
  75949. timePickers.forEach(function (instance, i) {
  75950. (0, _newArrowCheck3.default)(this, _this3);
  75951. if (i === pickerIndex) instance.updateFocusedTime(col, time[pickerIndex]);else instance.updateFocusedTime(-1, instance.focusedTime);
  75952. }.bind(this));
  75953. }
  75954. if (vertical) {
  75955. var increment = direction === 'up' ? 1 : -1;
  75956. var timeParts = ['hours', 'minutes', 'seconds'];
  75957. var pickerPossibleValues = timePickers[pickerIndex][String(timeParts[col]) + 'List'];
  75958. var currentIndex = pickerPossibleValues.findIndex(function (_ref5) {
  75959. var text = _ref5.text;
  75960. (0, _newArrowCheck3.default)(this, _this3);
  75961. return this.focusedTime.time[pickerIndex][col] === text;
  75962. }.bind(this));
  75963. var nextIndex = (currentIndex + increment + pickerPossibleValues.length) % pickerPossibleValues.length;
  75964. var nextValue = pickerPossibleValues[nextIndex].text;
  75965. var times = this.focusedTime.time.map(function (time, i) {
  75966. (0, _newArrowCheck3.default)(this, _this3);
  75967. if (i !== pickerIndex) return time;
  75968. time[col] = nextValue;
  75969. return time;
  75970. }.bind(this));
  75971. this.focusedTime = (0, _extends3.default)({}, this.focusedTime, {
  75972. time: times
  75973. });
  75974. timePickers.forEach(function (instance, i) {
  75975. (0, _newArrowCheck3.default)(this, _this3);
  75976. if (i === pickerIndex) instance.updateFocusedTime(col, times[i]);else instance.updateFocusedTime(-1, instance.focusedTime);
  75977. }.bind(this));
  75978. }
  75979. },
  75980. navigateDatePanel: function navigateDatePanel(direction, shift) {
  75981. var timePickers = (0, _assist.findComponentsDownward)(this, 'TimeSpinner');
  75982. if (timePickers.length > 0) {
  75983. this.navigateTimePanel(direction, shift, timePickers);
  75984. return;
  75985. }
  75986. if (shift) {
  75987. if (this.type === 'year') {
  75988. this.focusedDate = new Date(this.focusedDate.getFullYear() + mapPossibleValues(direction, 0, 10), this.focusedDate.getMonth(), this.focusedDate.getDate());
  75989. } else {
  75990. this.focusedDate = new Date(this.focusedDate.getFullYear() + mapPossibleValues(direction, 0, 1), this.focusedDate.getMonth() + mapPossibleValues(direction, 1, 0), this.focusedDate.getDate());
  75991. }
  75992. var position = direction.match(/left|down/) ? 'prev' : 'next';
  75993. var double = direction.match(/up|down/) ? '-double' : '';
  75994. var button = this.$refs.drop.$el.querySelector('.ivu-date-picker-' + position + '-btn-arrow' + double);
  75995. if (button) pulseElement(button);
  75996. return;
  75997. }
  75998. var initialDate = this.focusedDate || this.internalValue && this.internalValue[0] || new Date();
  75999. var focusedDate = new Date(initialDate);
  76000. if (this.type.match(/^date/)) {
  76001. var lastOfMonth = (0, _util.getDayCountOfMonth)(initialDate.getFullYear(), initialDate.getMonth());
  76002. var startDay = initialDate.getDate();
  76003. var nextDay = focusedDate.getDate() + mapPossibleValues(direction, 1, 7);
  76004. if (nextDay < 1) {
  76005. if (direction.match(/left|right/)) {
  76006. focusedDate.setMonth(focusedDate.getMonth() + 1);
  76007. focusedDate.setDate(nextDay);
  76008. } else {
  76009. focusedDate.setDate(startDay + Math.floor((lastOfMonth - startDay) / 7) * 7);
  76010. }
  76011. } else if (nextDay > lastOfMonth) {
  76012. if (direction.match(/left|right/)) {
  76013. focusedDate.setMonth(focusedDate.getMonth() - 1);
  76014. focusedDate.setDate(nextDay);
  76015. } else {
  76016. focusedDate.setDate(startDay % 7);
  76017. }
  76018. } else {
  76019. focusedDate.setDate(nextDay);
  76020. }
  76021. }
  76022. if (this.type.match(/^month/)) {
  76023. focusedDate.setMonth(focusedDate.getMonth() + mapPossibleValues(direction, 1, 3));
  76024. }
  76025. if (this.type.match(/^year/)) {
  76026. focusedDate.setFullYear(focusedDate.getFullYear() + mapPossibleValues(direction, 1, 3));
  76027. }
  76028. this.focusedDate = focusedDate;
  76029. },
  76030. handleInputChange: function handleInputChange(event) {
  76031. var _this4 = this;
  76032. var isArrayValue = this.type.includes('range') || this.multiple;
  76033. var oldValue = this.visualValue;
  76034. var newValue = event.target.value;
  76035. var newDate = this.parseDate(newValue);
  76036. var disabledDateFn = this.options && typeof this.options.disabledDate === 'function' && this.options.disabledDate;
  76037. var valueToTest = isArrayValue ? newDate : newDate[0];
  76038. var isDisabled = disabledDateFn && disabledDateFn(valueToTest);
  76039. var isValidDate = newDate.reduce(function (valid, date) {
  76040. (0, _newArrowCheck3.default)(this, _this4);
  76041. return valid && date instanceof Date;
  76042. }.bind(this), true);
  76043. if (newValue !== oldValue && !isDisabled && isValidDate) {
  76044. this.emitChange(this.type);
  76045. this.internalValue = newDate;
  76046. } else {
  76047. this.forceInputRerender++;
  76048. }
  76049. },
  76050. handleInputMouseenter: function handleInputMouseenter() {
  76051. if (this.readonly || this.itemDisabled) return;
  76052. if (this.visualValue && this.clearable) {
  76053. this.showClose = true;
  76054. }
  76055. },
  76056. handleInputMouseleave: function handleInputMouseleave() {
  76057. this.showClose = false;
  76058. },
  76059. handleIconClick: function handleIconClick(e) {
  76060. if (this.showClose) {
  76061. if (e) e.stopPropagation();
  76062. this.handleClear();
  76063. } else if (!this.itemDisabled) {
  76064. this.handleFocus();
  76065. }
  76066. },
  76067. handleClear: function handleClear() {
  76068. var _this5 = this;
  76069. this.visible = false;
  76070. this.internalValue = this.internalValue.map(function () {
  76071. (0, _newArrowCheck3.default)(this, _this5);
  76072. return null;
  76073. }.bind(this));
  76074. this.$emit('on-clear');
  76075. this.dispatch('FormItem', 'on-form-change', '');
  76076. this.emitChange(this.type);
  76077. this.reset();
  76078. setTimeout(function () {
  76079. (0, _newArrowCheck3.default)(this, _this5);
  76080. return this.onSelectionModeChange(this.type);
  76081. }.bind(this), 500);
  76082. },
  76083. emitChange: function emitChange(type) {
  76084. var _this6 = this;
  76085. this.$nextTick(function () {
  76086. (0, _newArrowCheck3.default)(this, _this6);
  76087. this.$emit('on-change', this.publicStringValue, type);
  76088. this.dispatch('FormItem', 'on-form-change', this.publicStringValue);
  76089. }.bind(this));
  76090. },
  76091. parseDate: function parseDate(val) {
  76092. var _this7 = this;
  76093. var isRange = this.type.includes('range');
  76094. var type = this.type;
  76095. var parser = (_util.TYPE_VALUE_RESOLVER_MAP[type] || _util.TYPE_VALUE_RESOLVER_MAP['default']).parser;
  76096. var format = this.format || _util.DEFAULT_FORMATS[type];
  76097. var multipleParser = _util.TYPE_VALUE_RESOLVER_MAP['multiple'].parser;
  76098. if (val && type === 'time' && !(val instanceof Date)) {
  76099. val = parser(val, format, this.separator);
  76100. } else if (this.multiple && val) {
  76101. val = multipleParser(val, format, this.separator);
  76102. } else if (isRange) {
  76103. if (!val) {
  76104. val = [null, null];
  76105. } else {
  76106. if (typeof val === 'string') {
  76107. val = parser(val, format, this.separator);
  76108. } else if (type === 'timerange') {
  76109. val = parser(val, format, this.separator).map(function (v) {
  76110. (0, _newArrowCheck3.default)(this, _this7);
  76111. return v || '';
  76112. }.bind(this));
  76113. } else {
  76114. var _val = val,
  76115. _val2 = (0, _slicedToArray3.default)(_val, 2),
  76116. start = _val2[0],
  76117. end = _val2[1];
  76118. if (start instanceof Date && end instanceof Date) {
  76119. val = val.map(function (date) {
  76120. (0, _newArrowCheck3.default)(this, _this7);
  76121. return new Date(date);
  76122. }.bind(this));
  76123. } else if (typeof start === 'string' && typeof end === 'string') {
  76124. val = parser(val.join(this.separator), format, this.separator);
  76125. } else if (!start || !end) {
  76126. val = [null, null];
  76127. }
  76128. }
  76129. }
  76130. } else if (typeof val === 'string' && type.indexOf('time') !== 0) {
  76131. val = parser(val, format) || null;
  76132. }
  76133. return isRange || this.multiple ? val || [] : [val];
  76134. },
  76135. formatDate: function formatDate(value) {
  76136. var format = _util.DEFAULT_FORMATS[this.type];
  76137. if (this.multiple) {
  76138. var formatter = _util.TYPE_VALUE_RESOLVER_MAP.multiple.formatter;
  76139. return formatter(value, this.format || format, this.separator);
  76140. } else {
  76141. var _ref6 = _util.TYPE_VALUE_RESOLVER_MAP[this.type] || _util.TYPE_VALUE_RESOLVER_MAP['default'],
  76142. _formatter = _ref6.formatter;
  76143. return _formatter(value, this.format || format, this.separator);
  76144. }
  76145. },
  76146. onPick: function onPick(dates) {
  76147. var _this8 = this;
  76148. var visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  76149. var type = arguments[2];
  76150. if (this.multiple) {
  76151. var pickedTimeStamp = dates.getTime();
  76152. var indexOfPickedDate = this.internalValue.findIndex(function (date) {
  76153. (0, _newArrowCheck3.default)(this, _this8);
  76154. return date && date.getTime() === pickedTimeStamp;
  76155. }.bind(this));
  76156. var allDates = [].concat((0, _toConsumableArray3.default)(this.internalValue), [dates]).filter(Boolean);
  76157. var timeStamps = allDates.map(function (date) {
  76158. (0, _newArrowCheck3.default)(this, _this8);
  76159. return date.getTime();
  76160. }.bind(this)).filter(function (ts, i, arr) {
  76161. (0, _newArrowCheck3.default)(this, _this8);
  76162. return arr.indexOf(ts) === i && i !== indexOfPickedDate;
  76163. }.bind(this));
  76164. this.internalValue = timeStamps.map(function (ts) {
  76165. (0, _newArrowCheck3.default)(this, _this8);
  76166. return new Date(ts);
  76167. }.bind(this));
  76168. } else {
  76169. dates = this.parseDate(dates);
  76170. this.internalValue = Array.isArray(dates) ? dates : [dates];
  76171. }
  76172. if (this.internalValue[0]) this.focusedDate = this.internalValue[0];
  76173. this.focusedTime = (0, _extends3.default)({}, this.focusedTime, {
  76174. time: this.internalValue.map(extractTime)
  76175. });
  76176. if (!this.isConfirm) this.onSelectionModeChange(this.type);
  76177. if (!this.isConfirm) this.visible = visible;
  76178. this.emitChange(type);
  76179. },
  76180. onPickSuccess: function onPickSuccess() {
  76181. this.visible = false;
  76182. this.$emit('on-ok');
  76183. this.focus();
  76184. this.reset();
  76185. },
  76186. focus: function focus() {
  76187. this.$refs.input && this.$refs.input.focus();
  76188. },
  76189. updatePopper: function updatePopper() {
  76190. this.$refs.drop.update();
  76191. }
  76192. },
  76193. watch: {
  76194. visible: function visible(state) {
  76195. if (state === false) {
  76196. this.$refs.drop.destroy();
  76197. }
  76198. if (state) this.$refs.drop.update();
  76199. this.$emit('on-open-change', state);
  76200. },
  76201. value: function value(val) {
  76202. if (val === null) this.isValueNull = true;
  76203. this.internalValue = this.parseDate(val);
  76204. },
  76205. open: function open(val) {
  76206. this.visible = val === true;
  76207. },
  76208. type: function type(_type) {
  76209. this.onSelectionModeChange(_type);
  76210. },
  76211. publicVModelValue: function publicVModelValue(now, before) {
  76212. var newValue = (0, _stringify2.default)(now);
  76213. var oldValue = (0, _stringify2.default)(before);
  76214. var shouldEmitInput = newValue !== oldValue || (typeof now === 'undefined' ? 'undefined' : (0, _typeof3.default)(now)) !== (typeof before === 'undefined' ? 'undefined' : (0, _typeof3.default)(before));
  76215. if (shouldEmitInput) {
  76216. if (this.isValueNull) {
  76217. this.isValueNull = false;
  76218. this.$emit('input', null);
  76219. } else {
  76220. this.$emit('input', now);
  76221. }
  76222. }
  76223. }
  76224. },
  76225. mounted: function mounted() {
  76226. var _this9 = this;
  76227. if (this.open !== null) this.visible = this.open;
  76228. this.$on('focus-input', function () {
  76229. (0, _newArrowCheck3.default)(this, _this9);
  76230. return this.focus();
  76231. }.bind(this));
  76232. this.$on('update-popper', function () {
  76233. (0, _newArrowCheck3.default)(this, _this9);
  76234. return this.updatePopper();
  76235. }.bind(this));
  76236. },
  76237. beforeDestroy: function beforeDestroy() {
  76238. this.$off('focus-input');
  76239. this.$off('update-popper');
  76240. }
  76241. };
  76242. /***/ }),
  76243. /* 159 */
  76244. /***/ (function(module, exports, __webpack_require__) {
  76245. "use strict";
  76246. Object.defineProperty(exports, "__esModule", {
  76247. value: true
  76248. });
  76249. var _newArrowCheck2 = __webpack_require__(1);
  76250. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  76251. var _defineProperty2 = __webpack_require__(2);
  76252. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  76253. var _icon = __webpack_require__(8);
  76254. var _icon2 = _interopRequireDefault(_icon);
  76255. var _dateTable = __webpack_require__(160);
  76256. var _dateTable2 = _interopRequireDefault(_dateTable);
  76257. var _yearTable = __webpack_require__(162);
  76258. var _yearTable2 = _interopRequireDefault(_yearTable);
  76259. var _monthTable = __webpack_require__(164);
  76260. var _monthTable2 = _interopRequireDefault(_monthTable);
  76261. var _time = __webpack_require__(166);
  76262. var _time2 = _interopRequireDefault(_time);
  76263. var _confirm = __webpack_require__(59);
  76264. var _confirm2 = _interopRequireDefault(_confirm);
  76265. var _datePanelLabel = __webpack_require__(171);
  76266. var _datePanelLabel2 = _interopRequireDefault(_datePanelLabel);
  76267. var _panelMixin = __webpack_require__(60);
  76268. var _panelMixin2 = _interopRequireDefault(_panelMixin);
  76269. var _datePanelMixin = __webpack_require__(173);
  76270. var _datePanelMixin2 = _interopRequireDefault(_datePanelMixin);
  76271. var _locale = __webpack_require__(6);
  76272. var _locale2 = _interopRequireDefault(_locale);
  76273. var _util = __webpack_require__(20);
  76274. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  76275. var prefixCls = 'ivu-picker-panel';
  76276. var datePrefixCls = 'ivu-date-picker';
  76277. exports.default = {
  76278. name: 'DatePickerPanel',
  76279. mixins: [_panelMixin2.default, _locale2.default, _datePanelMixin2.default],
  76280. components: { Icon: _icon2.default, DateTable: _dateTable2.default, YearTable: _yearTable2.default, MonthTable: _monthTable2.default, TimePicker: _time2.default, Confirm: _confirm2.default, datePanelLabel: _datePanelLabel2.default },
  76281. props: {
  76282. multiple: {
  76283. type: Boolean,
  76284. default: false
  76285. }
  76286. },
  76287. data: function data() {
  76288. var selectionMode = this.selectionMode,
  76289. value = this.value;
  76290. var dates = value.slice().sort();
  76291. return {
  76292. prefixCls: prefixCls,
  76293. datePrefixCls: datePrefixCls,
  76294. currentView: selectionMode || 'date',
  76295. pickerTable: this.getTableType(selectionMode),
  76296. dates: dates,
  76297. panelDate: this.startDate || dates[0] || new Date()
  76298. };
  76299. },
  76300. computed: {
  76301. classes: function classes() {
  76302. return [prefixCls + '-body-wrapper', (0, _defineProperty3.default)({}, prefixCls + '-with-sidebar', this.shortcuts.length)];
  76303. },
  76304. panelPickerHandlers: function panelPickerHandlers() {
  76305. return this.pickerTable === String(this.currentView) + '-table' ? this.handlePick : this.handlePreSelection;
  76306. },
  76307. datePanelLabel: function datePanelLabel() {
  76308. var _this = this;
  76309. var locale = this.t('i.locale');
  76310. var datePanelLabel = this.t('i.datepicker.datePanelLabel');
  76311. var date = this.panelDate;
  76312. var _formatDateLabels = (0, _util.formatDateLabels)(locale, datePanelLabel, date),
  76313. labels = _formatDateLabels.labels,
  76314. separator = _formatDateLabels.separator;
  76315. var handler = function (type) {
  76316. (0, _newArrowCheck3.default)(this, _this);
  76317. return function () {
  76318. (0, _newArrowCheck3.default)(this, _this);
  76319. return this.pickerTable = this.getTableType(type);
  76320. }.bind(this);
  76321. }.bind(this);
  76322. return {
  76323. separator: separator,
  76324. labels: labels.map(function (obj) {
  76325. (0, _newArrowCheck3.default)(this, _this);
  76326. return obj.handler = handler(obj.type), obj;
  76327. }.bind(this))
  76328. };
  76329. },
  76330. timeDisabled: function timeDisabled() {
  76331. return !this.dates[0];
  76332. }
  76333. },
  76334. watch: {
  76335. value: function value(newVal) {
  76336. this.dates = newVal;
  76337. var panelDate = this.multiple ? this.dates[this.dates.length - 1] : this.startDate || this.dates[0];
  76338. this.panelDate = panelDate || new Date();
  76339. },
  76340. currentView: function currentView(_currentView) {
  76341. var _this2 = this;
  76342. this.$emit('on-selection-mode-change', _currentView);
  76343. if (this.currentView === 'time') {
  76344. this.$nextTick(function () {
  76345. (0, _newArrowCheck3.default)(this, _this2);
  76346. var spinner = this.$refs.timePicker.$refs.timeSpinner;
  76347. spinner.updateScroll();
  76348. }.bind(this));
  76349. }
  76350. },
  76351. selectionMode: function selectionMode(type) {
  76352. this.currentView = type;
  76353. this.pickerTable = this.getTableType(type);
  76354. },
  76355. focusedDate: function focusedDate(date) {
  76356. var isDifferentYear = date.getFullYear() !== this.panelDate.getFullYear();
  76357. var isDifferentMonth = isDifferentYear || date.getMonth() !== this.panelDate.getMonth();
  76358. if (isDifferentYear || isDifferentMonth) {
  76359. if (!this.multiple) this.panelDate = date;
  76360. }
  76361. }
  76362. },
  76363. methods: {
  76364. reset: function reset() {
  76365. this.currentView = this.selectionMode;
  76366. this.pickerTable = this.getTableType(this.currentView);
  76367. },
  76368. changeYear: function changeYear(dir) {
  76369. if (this.selectionMode === 'year' || this.pickerTable === 'year-table') {
  76370. this.panelDate = new Date(this.panelDate.getFullYear() + dir * 10, 0, 1);
  76371. } else {
  76372. this.panelDate = (0, _util.siblingMonth)(this.panelDate, dir * 12);
  76373. }
  76374. },
  76375. getTableType: function getTableType(currentView) {
  76376. return currentView.match(/^time/) ? 'time-picker' : String(currentView) + '-table';
  76377. },
  76378. changeMonth: function changeMonth(dir) {
  76379. this.panelDate = (0, _util.siblingMonth)(this.panelDate, dir);
  76380. },
  76381. handlePreSelection: function handlePreSelection(value) {
  76382. this.panelDate = value;
  76383. if (this.pickerTable === 'year-table') this.pickerTable = 'month-table';else this.pickerTable = this.getTableType(this.currentView);
  76384. },
  76385. handlePick: function handlePick(value, type) {
  76386. var selectionMode = this.selectionMode,
  76387. panelDate = this.panelDate;
  76388. if (selectionMode === 'year') value = new Date(value.getFullYear(), 0, 1);else if (selectionMode === 'month') value = new Date(panelDate.getFullYear(), value.getMonth(), 1);else value = new Date(value);
  76389. this.dates = [value];
  76390. this.$emit('on-pick', value, false, type || selectionMode);
  76391. }
  76392. }
  76393. };
  76394. /***/ }),
  76395. /* 160 */
  76396. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  76397. "use strict";
  76398. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  76399. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_table_vue__ = __webpack_require__(161);
  76400. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_table_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_table_vue__);
  76401. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_table_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_table_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  76402. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0fbb8b99_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_table_vue__ = __webpack_require__(414);
  76403. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0fbb8b99_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_table_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0fbb8b99_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_table_vue__);
  76404. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  76405. /* script */
  76406. /* template */
  76407. /* template functional */
  76408. var __vue_template_functional__ = false
  76409. /* styles */
  76410. var __vue_styles__ = null
  76411. /* scopeId */
  76412. var __vue_scopeId__ = null
  76413. /* moduleIdentifier (server only) */
  76414. var __vue_module_identifier__ = null
  76415. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  76416. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_table_vue___default.a,
  76417. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0fbb8b99_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_table_vue__["render"],
  76418. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0fbb8b99_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_table_vue__["staticRenderFns"],
  76419. __vue_template_functional__,
  76420. __vue_styles__,
  76421. __vue_scopeId__,
  76422. __vue_module_identifier__
  76423. )
  76424. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  76425. /***/ }),
  76426. /* 161 */
  76427. /***/ (function(module, exports, __webpack_require__) {
  76428. "use strict";
  76429. Object.defineProperty(exports, "__esModule", {
  76430. value: true
  76431. });
  76432. var _extends2 = __webpack_require__(32);
  76433. var _extends3 = _interopRequireDefault(_extends2);
  76434. var _slicedToArray2 = __webpack_require__(26);
  76435. var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
  76436. var _newArrowCheck2 = __webpack_require__(1);
  76437. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  76438. var _defineProperty2 = __webpack_require__(2);
  76439. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  76440. var _util = __webpack_require__(20);
  76441. var _locale = __webpack_require__(6);
  76442. var _locale2 = _interopRequireDefault(_locale);
  76443. var _jsCalendar = __webpack_require__(410);
  76444. var _jsCalendar2 = _interopRequireDefault(_jsCalendar);
  76445. var _mixin = __webpack_require__(85);
  76446. var _mixin2 = _interopRequireDefault(_mixin);
  76447. var _prefixCls = __webpack_require__(86);
  76448. var _prefixCls2 = _interopRequireDefault(_prefixCls);
  76449. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  76450. exports.default = {
  76451. mixins: [_locale2.default, _mixin2.default],
  76452. props: {
  76453. showWeekNumbers: {
  76454. type: Boolean,
  76455. default: false
  76456. }
  76457. },
  76458. data: function data() {
  76459. return {
  76460. prefixCls: _prefixCls2.default
  76461. };
  76462. },
  76463. computed: {
  76464. classes: function classes() {
  76465. return ['' + String(_prefixCls2.default), (0, _defineProperty3.default)({}, String(_prefixCls2.default) + '-show-week-numbers', this.showWeekNumbers)];
  76466. },
  76467. calendar: function calendar() {
  76468. var weekStartDay = Number(this.t('i.datepicker.weekStartDay'));
  76469. return new _jsCalendar2.default.Generator({ onlyDays: !this.showWeekNumbers, weekStart: weekStartDay });
  76470. },
  76471. headerDays: function headerDays() {
  76472. var _this = this;
  76473. var weekStartDay = Number(this.t('i.datepicker.weekStartDay'));
  76474. var translatedDays = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'].map(function (item) {
  76475. (0, _newArrowCheck3.default)(this, _this);
  76476. return this.t('i.datepicker.weeks.' + item);
  76477. }.bind(this));
  76478. var weekDays = translatedDays.splice(weekStartDay, 7 - weekStartDay).concat(translatedDays.splice(0, weekStartDay));
  76479. return this.showWeekNumbers ? [''].concat(weekDays) : weekDays;
  76480. },
  76481. cells: function cells() {
  76482. var _this2 = this;
  76483. var tableYear = this.tableDate.getFullYear();
  76484. var tableMonth = this.tableDate.getMonth();
  76485. var today = (0, _util.clearHours)(new Date());
  76486. var selectedDays = this.dates.filter(Boolean).map(_util.clearHours);
  76487. var _dates$map = this.dates.map(_util.clearHours),
  76488. _dates$map2 = (0, _slicedToArray3.default)(_dates$map, 2),
  76489. minDay = _dates$map2[0],
  76490. maxDay = _dates$map2[1];
  76491. var rangeStart = this.rangeState.from && (0, _util.clearHours)(this.rangeState.from);
  76492. var rangeEnd = this.rangeState.to && (0, _util.clearHours)(this.rangeState.to);
  76493. var isRange = this.selectionMode === 'range';
  76494. var disabledTestFn = typeof this.disabledDate === 'function' && this.disabledDate;
  76495. return this.calendar(tableYear, tableMonth, function (cell) {
  76496. (0, _newArrowCheck3.default)(this, _this2);
  76497. if (cell.date instanceof Date) cell.date.setTime(cell.date.getTime() + cell.date.getTimezoneOffset() * 60000 + 480 * 60 * 1000);
  76498. var time = cell.date && (0, _util.clearHours)(cell.date);
  76499. var dateIsInCurrentMonth = cell.date && tableMonth === cell.date.getMonth();
  76500. return (0, _extends3.default)({}, cell, {
  76501. type: time === today ? 'today' : cell.type,
  76502. selected: dateIsInCurrentMonth && selectedDays.includes(time),
  76503. disabled: cell.date && disabledTestFn && disabledTestFn(new Date(time)),
  76504. range: dateIsInCurrentMonth && isRange && (0, _util.isInRange)(time, rangeStart, rangeEnd),
  76505. start: dateIsInCurrentMonth && isRange && time === minDay,
  76506. end: dateIsInCurrentMonth && isRange && time === maxDay
  76507. });
  76508. }.bind(this)).cells.slice(this.showWeekNumbers ? 8 : 0);
  76509. }
  76510. },
  76511. methods: {
  76512. getCellCls: function getCellCls(cell) {
  76513. var _ref2;
  76514. return [String(_prefixCls2.default) + '-cell', (_ref2 = {}, (0, _defineProperty3.default)(_ref2, String(_prefixCls2.default) + '-cell-selected', cell.selected || cell.start || cell.end), (0, _defineProperty3.default)(_ref2, String(_prefixCls2.default) + '-cell-disabled', cell.disabled), (0, _defineProperty3.default)(_ref2, String(_prefixCls2.default) + '-cell-today', cell.type === 'today'), (0, _defineProperty3.default)(_ref2, String(_prefixCls2.default) + '-cell-prev-month', cell.type === 'prevMonth'), (0, _defineProperty3.default)(_ref2, String(_prefixCls2.default) + '-cell-next-month', cell.type === 'nextMonth'), (0, _defineProperty3.default)(_ref2, String(_prefixCls2.default) + '-cell-week-label', cell.type === 'weekLabel'), (0, _defineProperty3.default)(_ref2, String(_prefixCls2.default) + '-cell-range', cell.range && !cell.start && !cell.end), (0, _defineProperty3.default)(_ref2, String(_prefixCls2.default) + '-focused', (0, _util.clearHours)(cell.date) === (0, _util.clearHours)(this.focusedDate)), _ref2)];
  76515. }
  76516. }
  76517. };
  76518. /***/ }),
  76519. /* 162 */
  76520. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  76521. "use strict";
  76522. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  76523. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_year_table_vue__ = __webpack_require__(163);
  76524. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_year_table_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_year_table_vue__);
  76525. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_year_table_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_year_table_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  76526. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2bfabbb6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_year_table_vue__ = __webpack_require__(415);
  76527. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2bfabbb6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_year_table_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2bfabbb6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_year_table_vue__);
  76528. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  76529. /* script */
  76530. /* template */
  76531. /* template functional */
  76532. var __vue_template_functional__ = false
  76533. /* styles */
  76534. var __vue_styles__ = null
  76535. /* scopeId */
  76536. var __vue_scopeId__ = null
  76537. /* moduleIdentifier (server only) */
  76538. var __vue_module_identifier__ = null
  76539. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  76540. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_year_table_vue___default.a,
  76541. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2bfabbb6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_year_table_vue__["render"],
  76542. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2bfabbb6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_year_table_vue__["staticRenderFns"],
  76543. __vue_template_functional__,
  76544. __vue_styles__,
  76545. __vue_scopeId__,
  76546. __vue_module_identifier__
  76547. )
  76548. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  76549. /***/ }),
  76550. /* 163 */
  76551. /***/ (function(module, exports, __webpack_require__) {
  76552. "use strict";
  76553. Object.defineProperty(exports, "__esModule", {
  76554. value: true
  76555. });
  76556. var _defineProperty2 = __webpack_require__(2);
  76557. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  76558. var _newArrowCheck2 = __webpack_require__(1);
  76559. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  76560. var _util = __webpack_require__(20);
  76561. var _assist = __webpack_require__(3);
  76562. var _mixin = __webpack_require__(85);
  76563. var _mixin2 = _interopRequireDefault(_mixin);
  76564. var _prefixCls = __webpack_require__(86);
  76565. var _prefixCls2 = _interopRequireDefault(_prefixCls);
  76566. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  76567. exports.default = {
  76568. mixins: [_mixin2.default],
  76569. props: {},
  76570. computed: {
  76571. classes: function classes() {
  76572. return ['' + String(_prefixCls2.default), String(_prefixCls2.default) + '-year'];
  76573. },
  76574. startYear: function startYear() {
  76575. return Math.floor(this.tableDate.getFullYear() / 10) * 10;
  76576. },
  76577. cells: function cells() {
  76578. var _this = this;
  76579. var cells = [];
  76580. var cell_tmpl = {
  76581. text: '',
  76582. selected: false,
  76583. disabled: false
  76584. };
  76585. var selectedDays = this.dates.filter(Boolean).map(function (date) {
  76586. (0, _newArrowCheck3.default)(this, _this);
  76587. return (0, _util.clearHours)(new Date(date.getFullYear(), 0, 1));
  76588. }.bind(this));
  76589. var focusedDate = (0, _util.clearHours)(new Date(this.focusedDate.getFullYear(), 0, 1));
  76590. for (var i = 0; i < 10; i++) {
  76591. var cell = (0, _assist.deepCopy)(cell_tmpl);
  76592. cell.date = new Date(this.startYear + i, 0, 1);
  76593. cell.disabled = typeof this.disabledDate === 'function' && this.disabledDate(cell.date) && this.selectionMode === 'year';
  76594. var day = (0, _util.clearHours)(cell.date);
  76595. cell.selected = selectedDays.includes(day);
  76596. cell.focused = day === focusedDate;
  76597. cells.push(cell);
  76598. }
  76599. return cells;
  76600. }
  76601. },
  76602. methods: {
  76603. getCellCls: function getCellCls(cell) {
  76604. var _ref;
  76605. return [String(_prefixCls2.default) + '-cell', (_ref = {}, (0, _defineProperty3.default)(_ref, String(_prefixCls2.default) + '-cell-selected', cell.selected), (0, _defineProperty3.default)(_ref, String(_prefixCls2.default) + '-cell-disabled', cell.disabled), (0, _defineProperty3.default)(_ref, String(_prefixCls2.default) + '-cell-focused', cell.focused), (0, _defineProperty3.default)(_ref, String(_prefixCls2.default) + '-cell-range', cell.range && !cell.start && !cell.end), _ref)];
  76606. }
  76607. }
  76608. };
  76609. /***/ }),
  76610. /* 164 */
  76611. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  76612. "use strict";
  76613. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  76614. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_month_table_vue__ = __webpack_require__(165);
  76615. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_month_table_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_month_table_vue__);
  76616. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_month_table_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_month_table_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  76617. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ad59b08_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_month_table_vue__ = __webpack_require__(416);
  76618. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ad59b08_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_month_table_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ad59b08_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_month_table_vue__);
  76619. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  76620. /* script */
  76621. /* template */
  76622. /* template functional */
  76623. var __vue_template_functional__ = false
  76624. /* styles */
  76625. var __vue_styles__ = null
  76626. /* scopeId */
  76627. var __vue_scopeId__ = null
  76628. /* moduleIdentifier (server only) */
  76629. var __vue_module_identifier__ = null
  76630. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  76631. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_month_table_vue___default.a,
  76632. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ad59b08_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_month_table_vue__["render"],
  76633. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ad59b08_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_month_table_vue__["staticRenderFns"],
  76634. __vue_template_functional__,
  76635. __vue_styles__,
  76636. __vue_scopeId__,
  76637. __vue_module_identifier__
  76638. )
  76639. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  76640. /***/ }),
  76641. /* 165 */
  76642. /***/ (function(module, exports, __webpack_require__) {
  76643. "use strict";
  76644. Object.defineProperty(exports, "__esModule", {
  76645. value: true
  76646. });
  76647. var _defineProperty2 = __webpack_require__(2);
  76648. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  76649. var _newArrowCheck2 = __webpack_require__(1);
  76650. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  76651. var _util = __webpack_require__(20);
  76652. var _assist = __webpack_require__(3);
  76653. var _locale = __webpack_require__(6);
  76654. var _locale2 = _interopRequireDefault(_locale);
  76655. var _mixin = __webpack_require__(85);
  76656. var _mixin2 = _interopRequireDefault(_mixin);
  76657. var _prefixCls = __webpack_require__(86);
  76658. var _prefixCls2 = _interopRequireDefault(_prefixCls);
  76659. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  76660. exports.default = {
  76661. mixins: [_locale2.default, _mixin2.default],
  76662. props: {},
  76663. computed: {
  76664. classes: function classes() {
  76665. return ['' + String(_prefixCls2.default), String(_prefixCls2.default) + '-month'];
  76666. },
  76667. cells: function cells() {
  76668. var _this = this;
  76669. var cells = [];
  76670. var cell_tmpl = {
  76671. text: '',
  76672. selected: false,
  76673. disabled: false
  76674. };
  76675. var tableYear = this.tableDate.getFullYear();
  76676. var selectedDays = this.dates.filter(Boolean).map(function (date) {
  76677. (0, _newArrowCheck3.default)(this, _this);
  76678. return (0, _util.clearHours)(new Date(date.getFullYear(), date.getMonth(), 1));
  76679. }.bind(this));
  76680. var focusedDate = (0, _util.clearHours)(new Date(this.focusedDate.getFullYear(), this.focusedDate.getMonth(), 1));
  76681. for (var i = 0; i < 12; i++) {
  76682. var cell = (0, _assist.deepCopy)(cell_tmpl);
  76683. cell.date = new Date(tableYear, i, 1);
  76684. cell.text = this.tCell(i + 1);
  76685. var day = (0, _util.clearHours)(cell.date);
  76686. cell.disabled = typeof this.disabledDate === 'function' && this.disabledDate(cell.date) && this.selectionMode === 'month';
  76687. cell.selected = selectedDays.includes(day);
  76688. cell.focused = day === focusedDate;
  76689. cells.push(cell);
  76690. }
  76691. return cells;
  76692. }
  76693. },
  76694. methods: {
  76695. getCellCls: function getCellCls(cell) {
  76696. var _ref;
  76697. return [String(_prefixCls2.default) + '-cell', (_ref = {}, (0, _defineProperty3.default)(_ref, String(_prefixCls2.default) + '-cell-selected', cell.selected), (0, _defineProperty3.default)(_ref, String(_prefixCls2.default) + '-cell-disabled', cell.disabled), (0, _defineProperty3.default)(_ref, String(_prefixCls2.default) + '-cell-focused', cell.focused), (0, _defineProperty3.default)(_ref, String(_prefixCls2.default) + '-cell-range', cell.range && !cell.start && !cell.end), _ref)];
  76698. },
  76699. tCell: function tCell(nr) {
  76700. return this.t('i.datepicker.months.m' + String(nr));
  76701. }
  76702. }
  76703. };
  76704. /***/ }),
  76705. /* 166 */
  76706. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  76707. "use strict";
  76708. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  76709. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue__ = __webpack_require__(167);
  76710. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue__);
  76711. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  76712. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6e874f24_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_vue__ = __webpack_require__(419);
  76713. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6e874f24_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6e874f24_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_vue__);
  76714. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  76715. /* script */
  76716. /* template */
  76717. /* template functional */
  76718. var __vue_template_functional__ = false
  76719. /* styles */
  76720. var __vue_styles__ = null
  76721. /* scopeId */
  76722. var __vue_scopeId__ = null
  76723. /* moduleIdentifier (server only) */
  76724. var __vue_module_identifier__ = null
  76725. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  76726. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue___default.a,
  76727. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6e874f24_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_vue__["render"],
  76728. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6e874f24_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_vue__["staticRenderFns"],
  76729. __vue_template_functional__,
  76730. __vue_styles__,
  76731. __vue_scopeId__,
  76732. __vue_module_identifier__
  76733. )
  76734. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  76735. /***/ }),
  76736. /* 167 */
  76737. /***/ (function(module, exports, __webpack_require__) {
  76738. "use strict";
  76739. Object.defineProperty(exports, "__esModule", {
  76740. value: true
  76741. });
  76742. var _keys = __webpack_require__(21);
  76743. var _keys2 = _interopRequireDefault(_keys);
  76744. var _toConsumableArray2 = __webpack_require__(17);
  76745. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  76746. var _newArrowCheck2 = __webpack_require__(1);
  76747. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  76748. var _timeSpinner = __webpack_require__(168);
  76749. var _timeSpinner2 = _interopRequireDefault(_timeSpinner);
  76750. var _confirm = __webpack_require__(59);
  76751. var _confirm2 = _interopRequireDefault(_confirm);
  76752. var _timeMixins = __webpack_require__(58);
  76753. var _timeMixins2 = _interopRequireDefault(_timeMixins);
  76754. var _panelMixin = __webpack_require__(60);
  76755. var _panelMixin2 = _interopRequireDefault(_panelMixin);
  76756. var _locale = __webpack_require__(6);
  76757. var _locale2 = _interopRequireDefault(_locale);
  76758. var _util = __webpack_require__(20);
  76759. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  76760. var prefixCls = 'ivu-picker-panel';
  76761. var timePrefixCls = 'ivu-time-picker';
  76762. var capitalize = function (str) {
  76763. (0, _newArrowCheck3.default)(undefined, undefined);
  76764. return str[0].toUpperCase() + str.slice(1);
  76765. }.bind(undefined);
  76766. var mergeDateHMS = function (date, hours, minutes, seconds) {
  76767. (0, _newArrowCheck3.default)(undefined, undefined);
  76768. var newDate = new Date(date.getTime());
  76769. newDate.setHours(hours);
  76770. newDate.setMinutes(minutes);
  76771. newDate.setSeconds(seconds);
  76772. return newDate;
  76773. }.bind(undefined);
  76774. var unique = function (el, i, arr) {
  76775. (0, _newArrowCheck3.default)(undefined, undefined);
  76776. return arr.indexOf(el) === i;
  76777. }.bind(undefined);
  76778. var returnFalse = function () {
  76779. (0, _newArrowCheck3.default)(undefined, undefined);
  76780. return false;
  76781. }.bind(undefined);
  76782. exports.default = {
  76783. name: 'TimePickerPanel',
  76784. mixins: [_panelMixin2.default, _locale2.default, _timeMixins2.default],
  76785. components: { TimeSpinner: _timeSpinner2.default, Confirm: _confirm2.default },
  76786. props: {
  76787. disabledDate: {
  76788. type: Function,
  76789. default: returnFalse
  76790. },
  76791. steps: {
  76792. type: Array,
  76793. default: function _default() {
  76794. (0, _newArrowCheck3.default)(undefined, undefined);
  76795. return [];
  76796. }.bind(undefined)
  76797. },
  76798. format: {
  76799. type: String,
  76800. default: 'HH:mm:ss'
  76801. },
  76802. value: {
  76803. type: Array,
  76804. required: true
  76805. }
  76806. },
  76807. data: function data() {
  76808. return {
  76809. prefixCls: prefixCls,
  76810. timePrefixCls: timePrefixCls,
  76811. date: this.value[0] || (0, _util.initTimeDate)(),
  76812. showDate: false
  76813. };
  76814. },
  76815. computed: {
  76816. showSeconds: function showSeconds() {
  76817. return !!(this.format || '').match(/ss/);
  76818. },
  76819. visibleDate: function visibleDate() {
  76820. var date = this.date;
  76821. var month = date.getMonth() + 1;
  76822. var tYear = this.t('i.datepicker.year');
  76823. var tMonth = this.t('i.datepicker.month' + String(month));
  76824. return '' + String(date.getFullYear()) + String(tYear) + ' ' + String(tMonth);
  76825. },
  76826. timeSlots: function timeSlots() {
  76827. var _this = this;
  76828. if (!this.value[0]) return [];
  76829. return ['getHours', 'getMinutes', 'getSeconds'].map(function (slot) {
  76830. (0, _newArrowCheck3.default)(this, _this);
  76831. return this.date[slot]();
  76832. }.bind(this));
  76833. },
  76834. disabledHMS: function disabledHMS() {
  76835. var _this2 = this;
  76836. var disabledTypes = ['disabledHours', 'disabledMinutes', 'disabledSeconds'];
  76837. if (this.disabledDate === returnFalse || !this.value[0]) {
  76838. var disabled = disabledTypes.reduce(function (obj, type) {
  76839. (0, _newArrowCheck3.default)(this, _this2);
  76840. return obj[type] = this[type], obj;
  76841. }.bind(this), {});
  76842. return disabled;
  76843. } else {
  76844. var slots = [24, 60, 60];
  76845. var _disabled = ['Hours', 'Minutes', 'Seconds'].map(function (type) {
  76846. (0, _newArrowCheck3.default)(this, _this2);
  76847. return this['disabled' + String(type)];
  76848. }.bind(this));
  76849. var disabledHMS = _disabled.map(function (preDisabled, j) {
  76850. (0, _newArrowCheck3.default)(this, _this2);
  76851. var slot = slots[j];
  76852. var toDisable = preDisabled;
  76853. var _loop = function _loop(i) {
  76854. var hms = _this2.timeSlots.map(function (slot, x) {
  76855. (0, _newArrowCheck3.default)(this, _this2);
  76856. return x === j ? i : slot;
  76857. }.bind(_this2));
  76858. var testDateTime = mergeDateHMS.apply(undefined, [_this2.date].concat((0, _toConsumableArray3.default)(hms)));
  76859. if (_this2.disabledDate(testDateTime, true)) toDisable.push(i);
  76860. };
  76861. for (var i = 0; i < slot; i += this.steps[j] || 1) {
  76862. _loop(i);
  76863. }
  76864. return toDisable.filter(unique);
  76865. }.bind(this));
  76866. return disabledTypes.reduce(function (obj, type, i) {
  76867. (0, _newArrowCheck3.default)(this, _this2);
  76868. return obj[type] = disabledHMS[i], obj;
  76869. }.bind(this), {});
  76870. }
  76871. }
  76872. },
  76873. watch: {
  76874. value: function value(dates) {
  76875. var newVal = dates[0] || (0, _util.initTimeDate)();
  76876. newVal = new Date(newVal);
  76877. this.date = newVal;
  76878. }
  76879. },
  76880. methods: {
  76881. handleChange: function handleChange(date) {
  76882. var _this3 = this;
  76883. var emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  76884. var newDate = new Date(this.date);
  76885. (0, _keys2.default)(date).forEach(function (type) {
  76886. (0, _newArrowCheck3.default)(this, _this3);
  76887. return newDate['set' + String(capitalize(type))](date[type]);
  76888. }.bind(this));
  76889. if (emit) this.$emit('on-pick', newDate, 'time');
  76890. }
  76891. },
  76892. mounted: function mounted() {
  76893. if (this.$parent && this.$parent.$options.name === 'DatePicker') this.showDate = true;
  76894. }
  76895. };
  76896. /***/ }),
  76897. /* 168 */
  76898. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  76899. "use strict";
  76900. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  76901. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_spinner_vue__ = __webpack_require__(169);
  76902. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_spinner_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_spinner_vue__);
  76903. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_spinner_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_spinner_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  76904. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_496899f4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_spinner_vue__ = __webpack_require__(417);
  76905. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_496899f4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_spinner_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_496899f4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_spinner_vue__);
  76906. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  76907. /* script */
  76908. /* template */
  76909. /* template functional */
  76910. var __vue_template_functional__ = false
  76911. /* styles */
  76912. var __vue_styles__ = null
  76913. /* scopeId */
  76914. var __vue_scopeId__ = null
  76915. /* moduleIdentifier (server only) */
  76916. var __vue_module_identifier__ = null
  76917. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  76918. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_spinner_vue___default.a,
  76919. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_496899f4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_spinner_vue__["render"],
  76920. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_496899f4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_spinner_vue__["staticRenderFns"],
  76921. __vue_template_functional__,
  76922. __vue_styles__,
  76923. __vue_scopeId__,
  76924. __vue_module_identifier__
  76925. )
  76926. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  76927. /***/ }),
  76928. /* 169 */
  76929. /***/ (function(module, exports, __webpack_require__) {
  76930. "use strict";
  76931. Object.defineProperty(exports, "__esModule", {
  76932. value: true
  76933. });
  76934. var _keys = __webpack_require__(21);
  76935. var _keys2 = _interopRequireDefault(_keys);
  76936. var _extends3 = __webpack_require__(32);
  76937. var _extends4 = _interopRequireDefault(_extends3);
  76938. var _defineProperty2 = __webpack_require__(2);
  76939. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  76940. var _newArrowCheck2 = __webpack_require__(1);
  76941. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  76942. var _timeMixins = __webpack_require__(58);
  76943. var _timeMixins2 = _interopRequireDefault(_timeMixins);
  76944. var _assist = __webpack_require__(3);
  76945. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  76946. var prefixCls = 'ivu-time-picker-cells';
  76947. var timeParts = ['hours', 'minutes', 'seconds'];
  76948. exports.default = {
  76949. name: 'TimeSpinner',
  76950. mixins: [_timeMixins2.default],
  76951. props: {
  76952. hours: {
  76953. type: [Number, String],
  76954. default: NaN
  76955. },
  76956. minutes: {
  76957. type: [Number, String],
  76958. default: NaN
  76959. },
  76960. seconds: {
  76961. type: [Number, String],
  76962. default: NaN
  76963. },
  76964. showSeconds: {
  76965. type: Boolean,
  76966. default: true
  76967. },
  76968. steps: {
  76969. type: Array,
  76970. default: function _default() {
  76971. (0, _newArrowCheck3.default)(undefined, undefined);
  76972. return [];
  76973. }.bind(undefined)
  76974. }
  76975. },
  76976. data: function data() {
  76977. var _this = this;
  76978. return {
  76979. spinerSteps: [1, 1, 1].map(function (one, i) {
  76980. (0, _newArrowCheck3.default)(this, _this);
  76981. return Math.abs(this.steps[i]) || one;
  76982. }.bind(this)),
  76983. prefixCls: prefixCls,
  76984. compiled: false,
  76985. focusedColumn: -1,
  76986. focusedTime: [0, 0, 0] };
  76987. },
  76988. computed: {
  76989. classes: function classes() {
  76990. return ['' + prefixCls, (0, _defineProperty3.default)({}, prefixCls + '-with-seconds', this.showSeconds)];
  76991. },
  76992. hoursList: function hoursList() {
  76993. var hours = [];
  76994. var step = this.spinerSteps[0];
  76995. var focusedHour = this.focusedColumn === 0 && this.focusedTime[0];
  76996. var hour_tmpl = {
  76997. text: 0,
  76998. selected: false,
  76999. disabled: false,
  77000. hide: false
  77001. };
  77002. for (var i = 0; i < 24; i += step) {
  77003. var hour = (0, _assist.deepCopy)(hour_tmpl);
  77004. hour.text = i;
  77005. hour.focused = i === focusedHour;
  77006. if (this.disabledHours.length && this.disabledHours.indexOf(i) > -1) {
  77007. hour.disabled = true;
  77008. if (this.hideDisabledOptions) hour.hide = true;
  77009. }
  77010. if (this.hours === i) hour.selected = true;
  77011. hours.push(hour);
  77012. }
  77013. return hours;
  77014. },
  77015. minutesList: function minutesList() {
  77016. var minutes = [];
  77017. var step = this.spinerSteps[1];
  77018. var focusedMinute = this.focusedColumn === 1 && this.focusedTime[1];
  77019. var minute_tmpl = {
  77020. text: 0,
  77021. selected: false,
  77022. disabled: false,
  77023. hide: false
  77024. };
  77025. for (var i = 0; i < 60; i += step) {
  77026. var minute = (0, _assist.deepCopy)(minute_tmpl);
  77027. minute.text = i;
  77028. minute.focused = i === focusedMinute;
  77029. if (this.disabledMinutes.length && this.disabledMinutes.indexOf(i) > -1) {
  77030. minute.disabled = true;
  77031. if (this.hideDisabledOptions) minute.hide = true;
  77032. }
  77033. if (this.minutes === i) minute.selected = true;
  77034. minutes.push(minute);
  77035. }
  77036. return minutes;
  77037. },
  77038. secondsList: function secondsList() {
  77039. var seconds = [];
  77040. var step = this.spinerSteps[2];
  77041. var focusedMinute = this.focusedColumn === 2 && this.focusedTime[2];
  77042. var second_tmpl = {
  77043. text: 0,
  77044. selected: false,
  77045. disabled: false,
  77046. hide: false
  77047. };
  77048. for (var i = 0; i < 60; i += step) {
  77049. var second = (0, _assist.deepCopy)(second_tmpl);
  77050. second.text = i;
  77051. second.focused = i === focusedMinute;
  77052. if (this.disabledSeconds.length && this.disabledSeconds.indexOf(i) > -1) {
  77053. second.disabled = true;
  77054. if (this.hideDisabledOptions) second.hide = true;
  77055. }
  77056. if (this.seconds === i) second.selected = true;
  77057. seconds.push(second);
  77058. }
  77059. return seconds;
  77060. }
  77061. },
  77062. methods: {
  77063. getCellCls: function getCellCls(cell) {
  77064. var _ref2;
  77065. return [prefixCls + '-cell', (_ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-cell-selected', cell.selected), (0, _defineProperty3.default)(_ref2, prefixCls + '-cell-focused', cell.focused), (0, _defineProperty3.default)(_ref2, prefixCls + '-cell-disabled', cell.disabled), _ref2)];
  77066. },
  77067. chooseValue: function chooseValue(values) {
  77068. var _this2 = this;
  77069. var changes = timeParts.reduce(function (obj, part, i) {
  77070. (0, _newArrowCheck3.default)(this, _this2);
  77071. var value = values[i];
  77072. if (this[part] === value) return obj;
  77073. return (0, _extends4.default)({}, obj, (0, _defineProperty3.default)({}, part, value));
  77074. }.bind(this), {});
  77075. if ((0, _keys2.default)(changes).length > 0) {
  77076. this.emitChange(changes);
  77077. }
  77078. },
  77079. handleClick: function handleClick(type, cell) {
  77080. if (cell.disabled) return;
  77081. var data = (0, _defineProperty3.default)({}, type, cell.text);
  77082. this.emitChange(data);
  77083. },
  77084. emitChange: function emitChange(changes) {
  77085. this.$emit('on-change', changes);
  77086. this.$emit('on-pick-click');
  77087. },
  77088. scroll: function scroll(type, index) {
  77089. var from = this.$refs[type].scrollTop;
  77090. var to = 24 * this.getScrollIndex(type, index);
  77091. (0, _assist.scrollTop)(this.$refs[type], from, to, 500);
  77092. },
  77093. getScrollIndex: function getScrollIndex(type, index) {
  77094. var _this3 = this;
  77095. var Type = (0, _assist.firstUpperCase)(type);
  77096. var disabled = this['disabled' + String(Type)];
  77097. if (disabled.length && this.hideDisabledOptions) {
  77098. var _count = 0;
  77099. disabled.forEach(function (item) {
  77100. (0, _newArrowCheck3.default)(this, _this3);
  77101. return item <= index ? _count++ : '';
  77102. }.bind(this));
  77103. index -= _count;
  77104. }
  77105. return index;
  77106. },
  77107. updateScroll: function updateScroll() {
  77108. var _this4 = this;
  77109. this.$nextTick(function () {
  77110. (0, _newArrowCheck3.default)(this, _this4);
  77111. timeParts.forEach(function (type) {
  77112. (0, _newArrowCheck3.default)(this, _this4);
  77113. this.$refs[type].scrollTop = 24 * this[String(type) + 'List'].findIndex(function (obj) {
  77114. (0, _newArrowCheck3.default)(this, _this4);
  77115. return obj.text == this[type];
  77116. }.bind(this));
  77117. }.bind(this));
  77118. }.bind(this));
  77119. },
  77120. formatTime: function formatTime(text) {
  77121. return text < 10 ? '0' + text : text;
  77122. },
  77123. updateFocusedTime: function updateFocusedTime(col, time) {
  77124. this.focusedColumn = col;
  77125. this.focusedTime = time.slice();
  77126. }
  77127. },
  77128. watch: {
  77129. hours: function hours(val) {
  77130. var _this5 = this;
  77131. if (!this.compiled) return;
  77132. this.scroll('hours', this.hoursList.findIndex(function (obj) {
  77133. (0, _newArrowCheck3.default)(this, _this5);
  77134. return obj.text == val;
  77135. }.bind(this)));
  77136. },
  77137. minutes: function minutes(val) {
  77138. var _this6 = this;
  77139. if (!this.compiled) return;
  77140. this.scroll('minutes', this.minutesList.findIndex(function (obj) {
  77141. (0, _newArrowCheck3.default)(this, _this6);
  77142. return obj.text == val;
  77143. }.bind(this)));
  77144. },
  77145. seconds: function seconds(val) {
  77146. var _this7 = this;
  77147. if (!this.compiled) return;
  77148. this.scroll('seconds', this.secondsList.findIndex(function (obj) {
  77149. (0, _newArrowCheck3.default)(this, _this7);
  77150. return obj.text == val;
  77151. }.bind(this)));
  77152. },
  77153. focusedTime: function focusedTime(updated, old) {
  77154. var _this8 = this;
  77155. timeParts.forEach(function (part, i) {
  77156. (0, _newArrowCheck3.default)(this, _this8);
  77157. if (updated[i] === old[i] || typeof updated[i] === 'undefined') return;
  77158. var valueIndex = this[String(part) + 'List'].findIndex(function (obj) {
  77159. (0, _newArrowCheck3.default)(this, _this8);
  77160. return obj.text === updated[i];
  77161. }.bind(this));
  77162. this.scroll(part, valueIndex);
  77163. }.bind(this));
  77164. }
  77165. },
  77166. mounted: function mounted() {
  77167. var _this9 = this;
  77168. this.$nextTick(function () {
  77169. (0, _newArrowCheck3.default)(this, _this9);
  77170. return this.compiled = true;
  77171. }.bind(this));
  77172. }
  77173. };
  77174. /***/ }),
  77175. /* 170 */
  77176. /***/ (function(module, exports, __webpack_require__) {
  77177. "use strict";
  77178. Object.defineProperty(exports, "__esModule", {
  77179. value: true
  77180. });
  77181. var _toConsumableArray2 = __webpack_require__(17);
  77182. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  77183. var _newArrowCheck2 = __webpack_require__(1);
  77184. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  77185. var _button = __webpack_require__(28);
  77186. var _button2 = _interopRequireDefault(_button);
  77187. var _locale = __webpack_require__(6);
  77188. var _locale2 = _interopRequireDefault(_locale);
  77189. var _emitter = __webpack_require__(4);
  77190. var _emitter2 = _interopRequireDefault(_emitter);
  77191. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  77192. var prefixCls = 'ivu-picker';
  77193. exports.default = {
  77194. mixins: [_locale2.default, _emitter2.default],
  77195. components: { iButton: _button2.default },
  77196. props: {
  77197. showTime: false,
  77198. isTime: false,
  77199. timeDisabled: false
  77200. },
  77201. data: function data() {
  77202. return {
  77203. prefixCls: prefixCls
  77204. };
  77205. },
  77206. computed: {
  77207. timeClasses: function timeClasses() {
  77208. return prefixCls + '-confirm-time';
  77209. },
  77210. labels: function labels() {
  77211. var _this = this;
  77212. var labels = ['time', 'clear', 'ok'];
  77213. var values = [this.isTime ? 'selectDate' : 'selectTime', 'clear', 'ok'];
  77214. return labels.reduce(function (obj, key, i) {
  77215. (0, _newArrowCheck3.default)(this, _this);
  77216. obj[key] = this.t('i.datepicker.' + values[i]);
  77217. return obj;
  77218. }.bind(this), {});
  77219. }
  77220. },
  77221. methods: {
  77222. handleClear: function handleClear() {
  77223. this.$emit('on-pick-clear');
  77224. },
  77225. handleSuccess: function handleSuccess() {
  77226. this.$emit('on-pick-success');
  77227. },
  77228. handleToggleTime: function handleToggleTime() {
  77229. if (this.timeDisabled) return;
  77230. this.$emit('on-pick-toggle-time');
  77231. this.dispatch('CalendarPicker', 'focus-input');
  77232. this.dispatch('CalendarPicker', 'update-popper');
  77233. },
  77234. handleTab: function handleTab(e) {
  77235. var tabbables = [].concat((0, _toConsumableArray3.default)(this.$el.children));
  77236. var expectedFocus = tabbables[e.shiftKey ? 'shift' : 'pop']();
  77237. if (document.activeElement === expectedFocus) {
  77238. e.preventDefault();
  77239. e.stopPropagation();
  77240. this.dispatch('CalendarPicker', 'focus-input');
  77241. }
  77242. }
  77243. }
  77244. };
  77245. /***/ }),
  77246. /* 171 */
  77247. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  77248. "use strict";
  77249. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  77250. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_panel_label_vue__ = __webpack_require__(172);
  77251. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_panel_label_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_panel_label_vue__);
  77252. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_panel_label_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_panel_label_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  77253. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6a6bf5e7_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_panel_label_vue__ = __webpack_require__(420);
  77254. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6a6bf5e7_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_panel_label_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6a6bf5e7_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_panel_label_vue__);
  77255. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  77256. /* script */
  77257. /* template */
  77258. /* template functional */
  77259. var __vue_template_functional__ = false
  77260. /* styles */
  77261. var __vue_styles__ = null
  77262. /* scopeId */
  77263. var __vue_scopeId__ = null
  77264. /* moduleIdentifier (server only) */
  77265. var __vue_module_identifier__ = null
  77266. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  77267. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_panel_label_vue___default.a,
  77268. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6a6bf5e7_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_panel_label_vue__["render"],
  77269. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6a6bf5e7_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_panel_label_vue__["staticRenderFns"],
  77270. __vue_template_functional__,
  77271. __vue_styles__,
  77272. __vue_scopeId__,
  77273. __vue_module_identifier__
  77274. )
  77275. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  77276. /***/ }),
  77277. /* 172 */
  77278. /***/ (function(module, exports, __webpack_require__) {
  77279. "use strict";
  77280. Object.defineProperty(exports, "__esModule", {
  77281. value: true
  77282. });
  77283. exports.default = {
  77284. props: {
  77285. datePanelLabel: Object,
  77286. currentView: String,
  77287. datePrefixCls: String
  77288. }
  77289. };
  77290. /***/ }),
  77291. /* 173 */
  77292. /***/ (function(module, exports, __webpack_require__) {
  77293. "use strict";
  77294. Object.defineProperty(exports, "__esModule", {
  77295. value: true
  77296. });
  77297. var _newArrowCheck2 = __webpack_require__(1);
  77298. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  77299. var _assist = __webpack_require__(3);
  77300. var _util = __webpack_require__(20);
  77301. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  77302. exports.default = {
  77303. props: {
  77304. showTime: {
  77305. type: Boolean,
  77306. default: false
  77307. },
  77308. format: {
  77309. type: String,
  77310. default: 'yyyy-MM-dd'
  77311. },
  77312. selectionMode: {
  77313. type: String,
  77314. validator: function validator(value) {
  77315. return (0, _assist.oneOf)(value, ['year', 'month', 'date', 'time']);
  77316. },
  77317. default: 'date'
  77318. },
  77319. shortcuts: {
  77320. type: Array,
  77321. default: function _default() {
  77322. (0, _newArrowCheck3.default)(undefined, undefined);
  77323. return [];
  77324. }.bind(undefined)
  77325. },
  77326. disabledDate: {
  77327. type: Function,
  77328. default: function _default() {
  77329. (0, _newArrowCheck3.default)(undefined, undefined);
  77330. return false;
  77331. }.bind(undefined)
  77332. },
  77333. value: {
  77334. type: Array,
  77335. default: function _default() {
  77336. (0, _newArrowCheck3.default)(undefined, undefined);
  77337. return [(0, _util.initTimeDate)(), (0, _util.initTimeDate)()];
  77338. }.bind(undefined)
  77339. },
  77340. timePickerOptions: {
  77341. default: function _default() {
  77342. (0, _newArrowCheck3.default)(undefined, undefined);
  77343. return {};
  77344. }.bind(undefined),
  77345. type: Object
  77346. },
  77347. showWeekNumbers: {
  77348. type: Boolean,
  77349. default: false
  77350. },
  77351. startDate: {
  77352. type: Date
  77353. },
  77354. pickerType: {
  77355. type: String,
  77356. require: true
  77357. },
  77358. focusedDate: {
  77359. type: Date,
  77360. required: true
  77361. }
  77362. },
  77363. computed: {
  77364. isTime: function isTime() {
  77365. return this.currentView === 'time';
  77366. }
  77367. },
  77368. methods: {
  77369. handleToggleTime: function handleToggleTime() {
  77370. this.currentView = this.currentView === 'time' ? 'date' : 'time';
  77371. }
  77372. }
  77373. };
  77374. /***/ }),
  77375. /* 174 */
  77376. /***/ (function(module, exports, __webpack_require__) {
  77377. "use strict";
  77378. Object.defineProperty(exports, "__esModule", {
  77379. value: true
  77380. });
  77381. var _defineProperty2 = __webpack_require__(2);
  77382. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  77383. var _slicedToArray2 = __webpack_require__(26);
  77384. var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
  77385. var _newArrowCheck2 = __webpack_require__(1);
  77386. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  77387. var _icon = __webpack_require__(8);
  77388. var _icon2 = _interopRequireDefault(_icon);
  77389. var _dateTable = __webpack_require__(160);
  77390. var _dateTable2 = _interopRequireDefault(_dateTable);
  77391. var _yearTable = __webpack_require__(162);
  77392. var _yearTable2 = _interopRequireDefault(_yearTable);
  77393. var _monthTable = __webpack_require__(164);
  77394. var _monthTable2 = _interopRequireDefault(_monthTable);
  77395. var _timeRange = __webpack_require__(175);
  77396. var _timeRange2 = _interopRequireDefault(_timeRange);
  77397. var _confirm = __webpack_require__(59);
  77398. var _confirm2 = _interopRequireDefault(_confirm);
  77399. var _util = __webpack_require__(20);
  77400. var _datePanelLabel = __webpack_require__(171);
  77401. var _datePanelLabel2 = _interopRequireDefault(_datePanelLabel);
  77402. var _panelMixin = __webpack_require__(60);
  77403. var _panelMixin2 = _interopRequireDefault(_panelMixin);
  77404. var _datePanelMixin = __webpack_require__(173);
  77405. var _datePanelMixin2 = _interopRequireDefault(_datePanelMixin);
  77406. var _locale = __webpack_require__(6);
  77407. var _locale2 = _interopRequireDefault(_locale);
  77408. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  77409. var prefixCls = 'ivu-picker-panel';
  77410. var datePrefixCls = 'ivu-date-picker';
  77411. var dateSorter = function (a, b) {
  77412. (0, _newArrowCheck3.default)(undefined, undefined);
  77413. if (!a || !b) return 0;
  77414. return a.getTime() - b.getTime();
  77415. }.bind(undefined);
  77416. exports.default = {
  77417. name: 'RangeDatePickerPanel',
  77418. mixins: [_panelMixin2.default, _locale2.default, _datePanelMixin2.default],
  77419. components: { Icon: _icon2.default, DateTable: _dateTable2.default, YearTable: _yearTable2.default, MonthTable: _monthTable2.default, TimePicker: _timeRange2.default, Confirm: _confirm2.default, datePanelLabel: _datePanelLabel2.default },
  77420. props: {
  77421. splitPanels: {
  77422. type: Boolean,
  77423. default: false
  77424. }
  77425. },
  77426. data: function data() {
  77427. var _this = this;
  77428. var _value$map = this.value.map(function (date) {
  77429. (0, _newArrowCheck3.default)(this, _this);
  77430. return date || (0, _util.initTimeDate)();
  77431. }.bind(this)),
  77432. _value$map2 = (0, _slicedToArray3.default)(_value$map, 2),
  77433. minDate = _value$map2[0],
  77434. maxDate = _value$map2[1];
  77435. var leftPanelDate = this.startDate ? this.startDate : minDate;
  77436. return {
  77437. prefixCls: prefixCls,
  77438. datePrefixCls: datePrefixCls,
  77439. dates: this.value,
  77440. rangeState: { from: this.value[0], to: this.value[1], selecting: minDate && !maxDate },
  77441. currentView: this.selectionMode || 'range',
  77442. leftPickerTable: String(this.selectionMode) + '-table',
  77443. rightPickerTable: String(this.selectionMode) + '-table',
  77444. leftPanelDate: leftPanelDate,
  77445. rightPanelDate: new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, 1)
  77446. };
  77447. },
  77448. computed: {
  77449. classes: function classes() {
  77450. var _ref;
  77451. return [prefixCls + '-body-wrapper', datePrefixCls + '-with-range', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-with-sidebar', this.shortcuts.length), (0, _defineProperty3.default)(_ref, datePrefixCls + '-with-week-numbers', this.showWeekNumbers), _ref)];
  77452. },
  77453. panelBodyClasses: function panelBodyClasses() {
  77454. var _ref2;
  77455. return [prefixCls + '-body', (_ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-body-time', this.showTime), (0, _defineProperty3.default)(_ref2, prefixCls + '-body-date', !this.showTime), _ref2)];
  77456. },
  77457. leftDatePanelLabel: function leftDatePanelLabel() {
  77458. return this.panelLabelConfig('left');
  77459. },
  77460. rightDatePanelLabel: function rightDatePanelLabel() {
  77461. return this.panelLabelConfig('right');
  77462. },
  77463. leftDatePanelView: function leftDatePanelView() {
  77464. return this.leftPickerTable.split('-').shift();
  77465. },
  77466. rightDatePanelView: function rightDatePanelView() {
  77467. return this.rightPickerTable.split('-').shift();
  77468. },
  77469. timeDisabled: function timeDisabled() {
  77470. return !(this.dates[0] && this.dates[1]);
  77471. },
  77472. preSelecting: function preSelecting() {
  77473. var tableType = String(this.currentView) + '-table';
  77474. return {
  77475. left: this.leftPickerTable !== tableType,
  77476. right: this.rightPickerTable !== tableType
  77477. };
  77478. },
  77479. panelPickerHandlers: function panelPickerHandlers() {
  77480. return {
  77481. left: this.preSelecting.left ? this.handlePreSelection.bind(this, 'left') : this.handleRangePick,
  77482. right: this.preSelecting.right ? this.handlePreSelection.bind(this, 'right') : this.handleRangePick
  77483. };
  77484. }
  77485. },
  77486. watch: {
  77487. value: function value(newVal) {
  77488. var minDate = newVal[0] ? (0, _util.toDate)(newVal[0]) : null;
  77489. var maxDate = newVal[1] ? (0, _util.toDate)(newVal[1]) : null;
  77490. this.dates = [minDate, maxDate].sort(dateSorter);
  77491. this.rangeState = {
  77492. from: this.dates[0],
  77493. to: this.dates[1],
  77494. selecting: false
  77495. };
  77496. this.setPanelDates(this.startDate || this.dates[0] || new Date());
  77497. },
  77498. currentView: function currentView(_currentView) {
  77499. var leftMonth = this.leftPanelDate.getMonth();
  77500. var rightMonth = this.rightPanelDate.getMonth();
  77501. var isSameYear = this.leftPanelDate.getFullYear() === this.rightPanelDate.getFullYear();
  77502. if (_currentView === 'date' && isSameYear && leftMonth === rightMonth) {
  77503. this.changePanelDate('right', 'Month', 1);
  77504. }
  77505. if (_currentView === 'month' && isSameYear) {
  77506. this.changePanelDate('right', 'FullYear', 1);
  77507. }
  77508. if (_currentView === 'year' && isSameYear) {
  77509. this.changePanelDate('right', 'FullYear', 10);
  77510. }
  77511. },
  77512. selectionMode: function selectionMode(type) {
  77513. this.currentView = type || 'range';
  77514. },
  77515. focusedDate: function focusedDate(date) {
  77516. this.setPanelDates(date || new Date());
  77517. }
  77518. },
  77519. methods: {
  77520. reset: function reset() {
  77521. this.currentView = this.selectionMode;
  77522. this.leftPickerTable = String(this.currentView) + '-table';
  77523. this.rightPickerTable = String(this.currentView) + '-table';
  77524. },
  77525. setPanelDates: function setPanelDates(leftPanelDate) {
  77526. this.leftPanelDate = leftPanelDate;
  77527. var rightPanelDate = new Date(leftPanelDate.getFullYear(), leftPanelDate.getMonth() + 1, 1);
  77528. var splitRightPanelDate = this.dates[1] ? this.dates[1].getTime() : this.dates[1];
  77529. this.rightPanelDate = this.splitPanels ? new Date(Math.max(splitRightPanelDate, rightPanelDate.getTime())) : rightPanelDate;
  77530. },
  77531. panelLabelConfig: function panelLabelConfig(direction) {
  77532. var _this2 = this;
  77533. var locale = this.t('i.locale');
  77534. var datePanelLabel = this.t('i.datepicker.datePanelLabel');
  77535. var handler = function (type) {
  77536. (0, _newArrowCheck3.default)(this, _this2);
  77537. var fn = type == 'month' ? this.showMonthPicker : this.showYearPicker;
  77538. return function () {
  77539. (0, _newArrowCheck3.default)(this, _this2);
  77540. return fn(direction);
  77541. }.bind(this);
  77542. }.bind(this);
  77543. var date = this[String(direction) + 'PanelDate'];
  77544. var _formatDateLabels = (0, _util.formatDateLabels)(locale, datePanelLabel, date),
  77545. labels = _formatDateLabels.labels,
  77546. separator = _formatDateLabels.separator;
  77547. return {
  77548. separator: separator,
  77549. labels: labels.map(function (obj) {
  77550. (0, _newArrowCheck3.default)(this, _this2);
  77551. return obj.handler = handler(obj.type), obj;
  77552. }.bind(this))
  77553. };
  77554. },
  77555. prevYear: function prevYear(panel) {
  77556. var increment = this.currentView === 'year' ? -10 : -1;
  77557. this.changePanelDate(panel, 'FullYear', increment);
  77558. },
  77559. nextYear: function nextYear(panel) {
  77560. var increment = this.currentView === 'year' ? 10 : 1;
  77561. this.changePanelDate(panel, 'FullYear', increment);
  77562. },
  77563. prevMonth: function prevMonth(panel) {
  77564. this.changePanelDate(panel, 'Month', -1);
  77565. },
  77566. nextMonth: function nextMonth(panel) {
  77567. this.changePanelDate(panel, 'Month', 1);
  77568. },
  77569. changePanelDate: function changePanelDate(panel, type, increment) {
  77570. var updateOtherPanel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
  77571. var current = new Date(this[String(panel) + 'PanelDate']);
  77572. if (type === 'FullYear') current['set' + type](current['get' + type]() + increment);else current['set' + type](current['get' + type]() + increment, 1);
  77573. this[String(panel) + 'PanelDate'] = current;
  77574. if (!updateOtherPanel) return;
  77575. if (this.splitPanels) {
  77576. var otherPanel = panel === 'left' ? 'right' : 'left';
  77577. if (panel === 'left' && this.leftPanelDate >= this.rightPanelDate) {
  77578. this.changePanelDate(otherPanel, type, 1);
  77579. }
  77580. if (panel === 'right' && this.rightPanelDate <= this.leftPanelDate) {
  77581. this.changePanelDate(otherPanel, type, -1);
  77582. }
  77583. } else {
  77584. var _otherPanel = panel === 'left' ? 'right' : 'left';
  77585. var currentDate = this[_otherPanel + 'PanelDate'];
  77586. var temp = new Date(currentDate);
  77587. if (type === 'Month') {
  77588. var nextMonthLastDate = new Date(temp.getFullYear(), temp.getMonth() + increment + 1, 0).getDate();
  77589. temp.setDate(Math.min(nextMonthLastDate, temp.getDate()));
  77590. }
  77591. temp['set' + String(type)](temp['get' + String(type)]() + increment);
  77592. this[_otherPanel + 'PanelDate'] = temp;
  77593. }
  77594. },
  77595. showYearPicker: function showYearPicker(panel) {
  77596. this[String(panel) + 'PickerTable'] = 'year-table';
  77597. },
  77598. showMonthPicker: function showMonthPicker(panel) {
  77599. this[String(panel) + 'PickerTable'] = 'month-table';
  77600. },
  77601. handlePreSelection: function handlePreSelection(panel, value) {
  77602. this[String(panel) + 'PanelDate'] = value;
  77603. var currentViewType = this[String(panel) + 'PickerTable'];
  77604. if (currentViewType === 'year-table') this[String(panel) + 'PickerTable'] = 'month-table';else this[String(panel) + 'PickerTable'] = String(this.currentView) + '-table';
  77605. if (!this.splitPanels) {
  77606. var otherPanel = panel === 'left' ? 'right' : 'left';
  77607. this[otherPanel + 'PanelDate'] = value;
  77608. var increment = otherPanel === 'left' ? -1 : 1;
  77609. this.changePanelDate(otherPanel, 'Month', increment, false);
  77610. }
  77611. },
  77612. handleRangePick: function handleRangePick(val, type) {
  77613. if (this.rangeState.selecting || this.currentView === 'time') {
  77614. if (this.currentView === 'time') {
  77615. this.dates = val;
  77616. } else {
  77617. var _sort = [this.rangeState.from, val].sort(dateSorter),
  77618. _sort2 = (0, _slicedToArray3.default)(_sort, 2),
  77619. minDate = _sort2[0],
  77620. maxDate = _sort2[1];
  77621. this.dates = [minDate, maxDate];
  77622. this.rangeState = {
  77623. from: minDate,
  77624. to: maxDate,
  77625. selecting: false
  77626. };
  77627. }
  77628. this.handleConfirm(false, type || 'date');
  77629. } else {
  77630. this.rangeState = {
  77631. from: val,
  77632. to: null,
  77633. selecting: true
  77634. };
  77635. }
  77636. },
  77637. handleChangeRange: function handleChangeRange(val) {
  77638. this.rangeState.to = val;
  77639. }
  77640. }
  77641. };
  77642. /***/ }),
  77643. /* 175 */
  77644. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  77645. "use strict";
  77646. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  77647. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_range_vue__ = __webpack_require__(176);
  77648. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_range_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_range_vue__);
  77649. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_range_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_range_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  77650. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0a21dfb4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_range_vue__ = __webpack_require__(423);
  77651. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0a21dfb4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_range_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0a21dfb4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_range_vue__);
  77652. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  77653. /* script */
  77654. /* template */
  77655. /* template functional */
  77656. var __vue_template_functional__ = false
  77657. /* styles */
  77658. var __vue_styles__ = null
  77659. /* scopeId */
  77660. var __vue_scopeId__ = null
  77661. /* moduleIdentifier (server only) */
  77662. var __vue_module_identifier__ = null
  77663. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  77664. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_range_vue___default.a,
  77665. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0a21dfb4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_range_vue__["render"],
  77666. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0a21dfb4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_range_vue__["staticRenderFns"],
  77667. __vue_template_functional__,
  77668. __vue_styles__,
  77669. __vue_scopeId__,
  77670. __vue_module_identifier__
  77671. )
  77672. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  77673. /***/ }),
  77674. /* 176 */
  77675. /***/ (function(module, exports, __webpack_require__) {
  77676. "use strict";
  77677. Object.defineProperty(exports, "__esModule", {
  77678. value: true
  77679. });
  77680. var _keys = __webpack_require__(21);
  77681. var _keys2 = _interopRequireDefault(_keys);
  77682. var _defineProperty2 = __webpack_require__(2);
  77683. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  77684. var _slicedToArray2 = __webpack_require__(26);
  77685. var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
  77686. var _newArrowCheck2 = __webpack_require__(1);
  77687. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  77688. var _timeSpinner = __webpack_require__(168);
  77689. var _timeSpinner2 = _interopRequireDefault(_timeSpinner);
  77690. var _confirm = __webpack_require__(59);
  77691. var _confirm2 = _interopRequireDefault(_confirm);
  77692. var _timeMixins = __webpack_require__(58);
  77693. var _timeMixins2 = _interopRequireDefault(_timeMixins);
  77694. var _panelMixin = __webpack_require__(60);
  77695. var _panelMixin2 = _interopRequireDefault(_panelMixin);
  77696. var _locale = __webpack_require__(6);
  77697. var _locale2 = _interopRequireDefault(_locale);
  77698. var _util = __webpack_require__(20);
  77699. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  77700. var prefixCls = 'ivu-picker-panel';
  77701. var timePrefixCls = 'ivu-time-picker';
  77702. var capitalize = function (str) {
  77703. (0, _newArrowCheck3.default)(undefined, undefined);
  77704. return str[0].toUpperCase() + str.slice(1);
  77705. }.bind(undefined);
  77706. exports.default = {
  77707. name: 'RangeTimePickerPanel',
  77708. mixins: [_panelMixin2.default, _locale2.default, _timeMixins2.default],
  77709. components: { TimeSpinner: _timeSpinner2.default, Confirm: _confirm2.default },
  77710. props: {
  77711. steps: {
  77712. type: Array,
  77713. default: function _default() {
  77714. (0, _newArrowCheck3.default)(undefined, undefined);
  77715. return [];
  77716. }.bind(undefined)
  77717. },
  77718. format: {
  77719. type: String,
  77720. default: 'HH:mm:ss'
  77721. },
  77722. value: {
  77723. type: Array,
  77724. required: true
  77725. }
  77726. },
  77727. data: function data() {
  77728. var _value$slice = this.value.slice(),
  77729. _value$slice2 = (0, _slicedToArray3.default)(_value$slice, 2),
  77730. dateStart = _value$slice2[0],
  77731. dateEnd = _value$slice2[1];
  77732. return {
  77733. prefixCls: prefixCls,
  77734. timePrefixCls: timePrefixCls,
  77735. showDate: false,
  77736. dateStart: dateStart || (0, _util.initTimeDate)(),
  77737. dateEnd: dateEnd || (0, _util.initTimeDate)()
  77738. };
  77739. },
  77740. computed: {
  77741. classes: function classes() {
  77742. return [prefixCls + '-body-wrapper', timePrefixCls + '-with-range', (0, _defineProperty3.default)({}, timePrefixCls + '-with-seconds', this.showSeconds)];
  77743. },
  77744. showSeconds: function showSeconds() {
  77745. return !!(this.format || '').match(/ss/);
  77746. },
  77747. leftDatePanelLabel: function leftDatePanelLabel() {
  77748. return this.panelLabelConfig(this.date);
  77749. },
  77750. rightDatePanelLabel: function rightDatePanelLabel() {
  77751. return this.panelLabelConfig(this.dateEnd);
  77752. }
  77753. },
  77754. watch: {
  77755. value: function value(dates) {
  77756. var _dates$slice = dates.slice(),
  77757. _dates$slice2 = (0, _slicedToArray3.default)(_dates$slice, 2),
  77758. dateStart = _dates$slice2[0],
  77759. dateEnd = _dates$slice2[1];
  77760. this.dateStart = dateStart || (0, _util.initTimeDate)();
  77761. this.dateEnd = dateEnd || (0, _util.initTimeDate)();
  77762. }
  77763. },
  77764. methods: {
  77765. panelLabelConfig: function panelLabelConfig(date) {
  77766. var locale = this.t('i.locale');
  77767. var datePanelLabel = this.t('i.datepicker.datePanelLabel');
  77768. var _formatDateLabels = (0, _util.formatDateLabels)(locale, datePanelLabel, date || (0, _util.initTimeDate)()),
  77769. labels = _formatDateLabels.labels,
  77770. separator = _formatDateLabels.separator;
  77771. return [labels[0].label, separator, labels[1].label].join('');
  77772. },
  77773. handleChange: function handleChange(start, end) {
  77774. var _this = this;
  77775. var emit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  77776. var dateStart = new Date(this.dateStart);
  77777. var dateEnd = new Date(this.dateEnd);
  77778. (0, _keys2.default)(start).forEach(function (type) {
  77779. (0, _newArrowCheck3.default)(this, _this);
  77780. dateStart['set' + String(capitalize(type))](start[type]);
  77781. }.bind(this));
  77782. (0, _keys2.default)(end).forEach(function (type) {
  77783. (0, _newArrowCheck3.default)(this, _this);
  77784. dateEnd['set' + String(capitalize(type))](end[type]);
  77785. }.bind(this));
  77786. if (dateEnd < dateStart) dateEnd = dateStart;
  77787. if (emit) this.$emit('on-pick', [dateStart, dateEnd], 'time');
  77788. },
  77789. handleStartChange: function handleStartChange(date) {
  77790. this.handleChange(date, {});
  77791. },
  77792. handleEndChange: function handleEndChange(date) {
  77793. this.handleChange({}, date);
  77794. },
  77795. updateScroll: function updateScroll() {
  77796. this.$refs.timeSpinner.updateScroll();
  77797. this.$refs.timeSpinnerEnd.updateScroll();
  77798. }
  77799. },
  77800. mounted: function mounted() {
  77801. if (this.$parent && this.$parent.$options.name === 'DatePicker') this.showDate = true;
  77802. }
  77803. };
  77804. /***/ }),
  77805. /* 177 */
  77806. /***/ (function(module, exports, __webpack_require__) {
  77807. "use strict";
  77808. Object.defineProperty(exports, "__esModule", {
  77809. value: true
  77810. });
  77811. var _defineProperty2 = __webpack_require__(2);
  77812. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  77813. var _assist = __webpack_require__(3);
  77814. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  77815. var prefixCls = 'ivu-divider';
  77816. exports.default = {
  77817. name: 'Divider',
  77818. props: {
  77819. type: {
  77820. type: String,
  77821. default: 'horizontal',
  77822. validator: function validator(value) {
  77823. return (0, _assist.oneOf)(value, ['horizontal', 'vertical']);
  77824. }
  77825. },
  77826. orientation: {
  77827. type: String,
  77828. default: 'center',
  77829. validator: function validator(value) {
  77830. return (0, _assist.oneOf)(value, ['left', 'right', 'center']);
  77831. }
  77832. },
  77833. dashed: {
  77834. type: Boolean,
  77835. default: false
  77836. },
  77837. size: {
  77838. validator: function validator(value) {
  77839. return (0, _assist.oneOf)(value, ['small', 'default']);
  77840. },
  77841. default: 'default'
  77842. },
  77843. plain: {
  77844. type: Boolean,
  77845. default: false
  77846. }
  77847. },
  77848. computed: {
  77849. hasSlot: function hasSlot() {
  77850. return !!this.$slots.default;
  77851. },
  77852. classes: function classes() {
  77853. var _ref;
  77854. return ['' + prefixCls, prefixCls + '-' + String(this.type), prefixCls + '-' + String(this.size), (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-with-text', this.hasSlot && this.orientation === 'center'), (0, _defineProperty3.default)(_ref, prefixCls + '-with-text-' + String(this.orientation), this.hasSlot), (0, _defineProperty3.default)(_ref, prefixCls + '-dashed', !!this.dashed), (0, _defineProperty3.default)(_ref, prefixCls + '-plain', this.plain), _ref)];
  77855. },
  77856. slotClasses: function slotClasses() {
  77857. return [prefixCls + '-inner-text'];
  77858. }
  77859. }
  77860. };
  77861. /***/ }),
  77862. /* 178 */
  77863. /***/ (function(module, exports, __webpack_require__) {
  77864. "use strict";
  77865. Object.defineProperty(exports, "__esModule", {
  77866. value: true
  77867. });
  77868. var _newArrowCheck2 = __webpack_require__(1);
  77869. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  77870. var _assign = __webpack_require__(15);
  77871. var _assign2 = _interopRequireDefault(_assign);
  77872. var _defineProperty2 = __webpack_require__(2);
  77873. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  77874. var _icon = __webpack_require__(19);
  77875. var _icon2 = _interopRequireDefault(_icon);
  77876. var _assist = __webpack_require__(3);
  77877. var _transferDom = __webpack_require__(23);
  77878. var _transferDom2 = _interopRequireDefault(_transferDom);
  77879. var _emitter = __webpack_require__(4);
  77880. var _emitter2 = _interopRequireDefault(_emitter);
  77881. var _mixinsScrollbar = __webpack_require__(87);
  77882. var _mixinsScrollbar2 = _interopRequireDefault(_mixinsScrollbar);
  77883. var _dom = __webpack_require__(12);
  77884. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  77885. var prefixCls = 'ivu-drawer';
  77886. exports.default = {
  77887. name: 'Drawer',
  77888. mixins: [_emitter2.default, _mixinsScrollbar2.default],
  77889. components: { Icon: _icon2.default },
  77890. directives: { TransferDom: _transferDom2.default },
  77891. props: {
  77892. value: {
  77893. type: Boolean,
  77894. default: false
  77895. },
  77896. title: {
  77897. type: String
  77898. },
  77899. width: {
  77900. type: [Number, String],
  77901. default: 256
  77902. },
  77903. height: {
  77904. type: [Number, String],
  77905. default: 256
  77906. },
  77907. closable: {
  77908. type: Boolean,
  77909. default: true
  77910. },
  77911. maskClosable: {
  77912. type: Boolean,
  77913. default: true
  77914. },
  77915. mask: {
  77916. type: Boolean,
  77917. default: true
  77918. },
  77919. maskStyle: {
  77920. type: Object
  77921. },
  77922. styles: {
  77923. type: Object
  77924. },
  77925. scrollable: {
  77926. type: Boolean,
  77927. default: false
  77928. },
  77929. placement: {
  77930. validator: function validator(value) {
  77931. return (0, _assist.oneOf)(value, ['left', 'right', 'top', 'bottom']);
  77932. },
  77933. default: 'right'
  77934. },
  77935. zIndex: {
  77936. type: Number,
  77937. default: 1000
  77938. },
  77939. transfer: {
  77940. type: Boolean,
  77941. default: function _default() {
  77942. return !this.$IVIEW || this.$IVIEW.transfer === '' ? true : this.$IVIEW.transfer;
  77943. }
  77944. },
  77945. className: {
  77946. type: String
  77947. },
  77948. inner: {
  77949. type: Boolean,
  77950. default: false
  77951. },
  77952. draggable: {
  77953. type: Boolean,
  77954. default: false
  77955. },
  77956. beforeClose: Function
  77957. },
  77958. data: function data() {
  77959. return {
  77960. prefixCls: prefixCls,
  77961. visible: this.value,
  77962. wrapShow: false,
  77963. showHead: true,
  77964. canMove: false,
  77965. dragWidth: this.width,
  77966. dragHeight: this.height,
  77967. wrapperWidth: this.width,
  77968. wrapperHeight: this.height,
  77969. wrapperLeft: 0,
  77970. minWidth: 256,
  77971. minHeight: 256
  77972. };
  77973. },
  77974. computed: {
  77975. wrapClasses: function wrapClasses() {
  77976. var _ref;
  77977. return [prefixCls + '-wrap', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-hidden', !this.wrapShow), (0, _defineProperty3.default)(_ref, '' + String(this.className), !!this.className), (0, _defineProperty3.default)(_ref, prefixCls + '-no-mask', !this.mask), (0, _defineProperty3.default)(_ref, prefixCls + '-wrap-inner', this.inner), (0, _defineProperty3.default)(_ref, prefixCls + '-wrap-dragging', this.canMove), _ref)];
  77978. },
  77979. mainStyles: function mainStyles() {
  77980. var style = {};
  77981. if (this.placement === 'left' || this.placement === 'right') {
  77982. var width = parseInt(this.dragWidth);
  77983. var styleWidth = {
  77984. width: width <= 100 ? String(width) + '%' : String(width) + 'px'
  77985. };
  77986. (0, _assign2.default)(style, styleWidth);
  77987. } else {
  77988. var height = parseInt(this.dragHeight);
  77989. var styleHeight = {
  77990. height: height <= 100 ? String(height) + '%' : String(height) + 'px'
  77991. };
  77992. (0, _assign2.default)(style, styleHeight);
  77993. }
  77994. return style;
  77995. },
  77996. contentClasses: function contentClasses() {
  77997. return [prefixCls + '-content', (0, _defineProperty3.default)({}, prefixCls + '-content-no-mask', !this.mask)];
  77998. },
  77999. classes: function classes() {
  78000. var _ref3;
  78001. return ['' + prefixCls, prefixCls + '-' + String(this.placement), (_ref3 = {}, (0, _defineProperty3.default)(_ref3, prefixCls + '-no-header', !this.showHead), (0, _defineProperty3.default)(_ref3, prefixCls + '-inner', this.inner), _ref3)];
  78002. },
  78003. maskClasses: function maskClasses() {
  78004. return [prefixCls + '-mask', (0, _defineProperty3.default)({}, prefixCls + '-mask-inner', this.inner)];
  78005. },
  78006. transitionName: function transitionName() {
  78007. if (this.placement === 'left' || this.placement === 'right') return 'move-' + String(this.placement);else if (this.placement === 'top') return 'move-up';else return 'move-down';
  78008. }
  78009. },
  78010. methods: {
  78011. close: function close() {
  78012. var _this = this;
  78013. if (!this.beforeClose) {
  78014. return this.handleClose();
  78015. }
  78016. var before = this.beforeClose();
  78017. if (before && before.then) {
  78018. before.then(function () {
  78019. (0, _newArrowCheck3.default)(this, _this);
  78020. this.handleClose();
  78021. }.bind(this));
  78022. } else {
  78023. this.handleClose();
  78024. }
  78025. },
  78026. handleClose: function handleClose() {
  78027. this.visible = false;
  78028. this.$emit('input', false);
  78029. this.$emit('on-close');
  78030. },
  78031. handleMask: function handleMask() {
  78032. if (this.maskClosable && this.mask) {
  78033. this.close();
  78034. }
  78035. },
  78036. handleWrapClick: function handleWrapClick(event) {
  78037. var className = event.target.getAttribute('class');
  78038. if (className && className.indexOf(prefixCls + '-wrap') > -1) this.handleMask();
  78039. },
  78040. handleMousemove: function handleMousemove(event) {
  78041. if (!this.canMove || !this.draggable) return;
  78042. this.handleSetWrapperWidth();
  78043. var left = event.pageX - this.wrapperLeft;
  78044. var width = this.placement === 'right' ? this.wrapperWidth - left : left;
  78045. width = Math.max(width, parseFloat(this.minWidth));
  78046. event.atMin = width === parseFloat(this.minWidth);
  78047. if (width <= 100) width = width / this.wrapperWidth * 100;
  78048. this.dragWidth = width;
  78049. this.$emit('on-resize-width', parseInt(this.dragWidth));
  78050. },
  78051. handleSetWrapperWidth: function handleSetWrapperWidth() {
  78052. var _$el$getBoundingClien = this.$el.getBoundingClientRect(),
  78053. width = _$el$getBoundingClien.width,
  78054. left = _$el$getBoundingClien.left;
  78055. this.wrapperWidth = width;
  78056. this.wrapperLeft = left;
  78057. },
  78058. handleMouseup: function handleMouseup() {
  78059. if (!this.draggable) return;
  78060. this.canMove = false;
  78061. },
  78062. handleTriggerMousedown: function handleTriggerMousedown() {
  78063. this.canMove = true;
  78064. window.getSelection().removeAllRanges();
  78065. }
  78066. },
  78067. mounted: function mounted() {
  78068. if (this.visible) {
  78069. this.wrapShow = true;
  78070. }
  78071. var showHead = true;
  78072. if (this.$slots.header === undefined && !this.title) {
  78073. showHead = false;
  78074. }
  78075. this.showHead = showHead;
  78076. (0, _dom.on)(document, 'mousemove', this.handleMousemove);
  78077. (0, _dom.on)(document, 'mouseup', this.handleMouseup);
  78078. this.handleSetWrapperWidth();
  78079. },
  78080. beforeDestroy: function beforeDestroy() {
  78081. (0, _dom.off)(document, 'mousemove', this.handleMousemove);
  78082. (0, _dom.off)(document, 'mouseup', this.handleMouseup);
  78083. this.removeScrollEffect();
  78084. },
  78085. watch: {
  78086. value: function value(val) {
  78087. this.visible = val;
  78088. },
  78089. visible: function visible(val) {
  78090. var _this2 = this;
  78091. if (val === false) {
  78092. this.timer = setTimeout(function () {
  78093. (0, _newArrowCheck3.default)(this, _this2);
  78094. this.wrapShow = false;
  78095. var brotherDrawers = (0, _assist.findBrothersComponents)(this, 'Drawer') || [];
  78096. var parentDrawers = (0, _assist.findComponentsUpward)(this, 'Drawer') || [];
  78097. var otherDrawers = [].concat(brotherDrawers).concat(parentDrawers);
  78098. var isScrollDrawer = otherDrawers.some(function (item) {
  78099. (0, _newArrowCheck3.default)(this, _this2);
  78100. return item.visible && !item.scrollable;
  78101. }.bind(this));
  78102. if (!isScrollDrawer) {
  78103. this.removeScrollEffect();
  78104. }
  78105. }.bind(this), 300);
  78106. } else {
  78107. if (this.timer) clearTimeout(this.timer);
  78108. this.wrapShow = true;
  78109. if (!this.scrollable) {
  78110. this.addScrollEffect();
  78111. }
  78112. }
  78113. this.broadcast('Table', 'on-visible-change', val);
  78114. this.broadcast('Slider', 'on-visible-change', val);
  78115. this.$emit('on-visible-change', val);
  78116. },
  78117. scrollable: function scrollable(val) {
  78118. if (!val) {
  78119. this.addScrollEffect();
  78120. } else {
  78121. this.removeScrollEffect();
  78122. }
  78123. },
  78124. title: function title(val) {
  78125. if (this.$slots.header === undefined) {
  78126. this.showHead = !!val;
  78127. }
  78128. },
  78129. width: function width(val) {
  78130. this.dragWidth = val;
  78131. },
  78132. height: function height(val) {
  78133. this.dragHeight = val;
  78134. }
  78135. }
  78136. };
  78137. /***/ }),
  78138. /* 179 */
  78139. /***/ (function(module, exports, __webpack_require__) {
  78140. "use strict";
  78141. Object.defineProperty(exports, "__esModule", {
  78142. value: true
  78143. });
  78144. var _newArrowCheck2 = __webpack_require__(1);
  78145. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  78146. var _defineProperty2 = __webpack_require__(2);
  78147. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  78148. var _dropdown = __webpack_require__(36);
  78149. var _dropdown2 = _interopRequireDefault(_dropdown);
  78150. var _clickoutside = __webpack_require__(82);
  78151. var _clickoutside2 = _interopRequireDefault(_clickoutside);
  78152. var _transferDom = __webpack_require__(23);
  78153. var _transferDom2 = _interopRequireDefault(_transferDom);
  78154. var _assist = __webpack_require__(3);
  78155. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  78156. var prefixCls = 'ivu-dropdown';
  78157. exports.default = {
  78158. name: 'Dropdown',
  78159. directives: { clickOutside: _clickoutside2.default, TransferDom: _transferDom2.default },
  78160. components: { Drop: _dropdown2.default },
  78161. props: {
  78162. trigger: {
  78163. validator: function validator(value) {
  78164. return (0, _assist.oneOf)(value, ['click', 'hover', 'custom', 'contextMenu']);
  78165. },
  78166. default: 'hover'
  78167. },
  78168. placement: {
  78169. validator: function validator(value) {
  78170. return (0, _assist.oneOf)(value, ['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'right', 'right-start', 'right-end']);
  78171. },
  78172. default: 'bottom'
  78173. },
  78174. visible: {
  78175. type: Boolean,
  78176. default: false
  78177. },
  78178. transfer: {
  78179. type: Boolean,
  78180. default: function _default() {
  78181. return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
  78182. }
  78183. },
  78184. transferClassName: {
  78185. type: String
  78186. },
  78187. stopPropagation: {
  78188. type: Boolean,
  78189. default: false
  78190. },
  78191. capture: {
  78192. type: Boolean,
  78193. default: function _default() {
  78194. return !this.$IVIEW ? true : this.$IVIEW.capture;
  78195. }
  78196. },
  78197. eventsEnabled: {
  78198. type: Boolean,
  78199. default: false
  78200. }
  78201. },
  78202. computed: {
  78203. transition: function transition() {
  78204. return ['bottom-start', 'bottom', 'bottom-end'].indexOf(this.placement) > -1 ? 'slide-up' : 'fade';
  78205. },
  78206. dropdownCls: function dropdownCls() {
  78207. var _ref;
  78208. return _ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-transfer', this.transfer), (0, _defineProperty3.default)(_ref, this.transferClassName, this.transferClassName), _ref;
  78209. },
  78210. relClasses: function relClasses() {
  78211. return [prefixCls + '-rel', (0, _defineProperty3.default)({}, prefixCls + '-rel-user-select-none', this.trigger === 'contextMenu')];
  78212. }
  78213. },
  78214. data: function data() {
  78215. return {
  78216. prefixCls: prefixCls,
  78217. currentVisible: this.visible
  78218. };
  78219. },
  78220. watch: {
  78221. visible: function visible(val) {
  78222. this.currentVisible = val;
  78223. },
  78224. currentVisible: function currentVisible(val) {
  78225. if (val) {
  78226. this.$refs.drop.update();
  78227. } else {
  78228. this.$refs.drop.destroy();
  78229. }
  78230. this.$emit('on-visible-change', val);
  78231. }
  78232. },
  78233. methods: {
  78234. handleClick: function handleClick() {
  78235. if (this.trigger === 'custom') return false;
  78236. if (this.trigger !== 'click') {
  78237. return false;
  78238. }
  78239. var $parent = this.hasParent();
  78240. if (!$parent) this.currentVisible = !this.currentVisible;
  78241. },
  78242. handleRightClick: function handleRightClick() {
  78243. if (this.trigger === 'custom') return false;
  78244. if (this.trigger !== 'contextMenu') {
  78245. return false;
  78246. }
  78247. this.currentVisible = !this.currentVisible;
  78248. },
  78249. handleMouseenter: function handleMouseenter() {
  78250. var _this = this;
  78251. if (this.trigger === 'custom') return false;
  78252. if (this.trigger !== 'hover') {
  78253. return false;
  78254. }
  78255. if (this.timeout) clearTimeout(this.timeout);
  78256. this.timeout = setTimeout(function () {
  78257. (0, _newArrowCheck3.default)(this, _this);
  78258. this.currentVisible = true;
  78259. }.bind(this), 250);
  78260. },
  78261. handleMouseleave: function handleMouseleave() {
  78262. var _this2 = this;
  78263. if (this.trigger === 'custom') return false;
  78264. if (this.trigger !== 'hover') {
  78265. return false;
  78266. }
  78267. if (this.timeout) {
  78268. clearTimeout(this.timeout);
  78269. this.timeout = setTimeout(function () {
  78270. (0, _newArrowCheck3.default)(this, _this2);
  78271. this.currentVisible = false;
  78272. }.bind(this), 150);
  78273. }
  78274. },
  78275. onClickoutside: function onClickoutside(e) {
  78276. this.handleClose();
  78277. this.handleRightClose();
  78278. if (this.currentVisible) this.$emit('on-clickoutside', e);
  78279. },
  78280. handleClose: function handleClose() {
  78281. if (this.trigger === 'custom') return false;
  78282. if (this.trigger !== 'click') {
  78283. return false;
  78284. }
  78285. this.currentVisible = false;
  78286. },
  78287. handleRightClose: function handleRightClose() {
  78288. if (this.trigger === 'custom') return false;
  78289. if (this.trigger !== 'contextMenu') {
  78290. return false;
  78291. }
  78292. this.currentVisible = false;
  78293. },
  78294. hasParent: function hasParent() {
  78295. var $parent = (0, _assist.findComponentUpward)(this, 'Dropdown');
  78296. if ($parent) {
  78297. return $parent;
  78298. } else {
  78299. return false;
  78300. }
  78301. }
  78302. },
  78303. mounted: function mounted() {
  78304. var _this3 = this;
  78305. this.$on('on-click', function (key) {
  78306. (0, _newArrowCheck3.default)(this, _this3);
  78307. if (this.stopPropagation) return;
  78308. var $parent = this.hasParent();
  78309. if ($parent) $parent.$emit('on-click', key);
  78310. }.bind(this));
  78311. this.$on('on-hover-click', function () {
  78312. (0, _newArrowCheck3.default)(this, _this3);
  78313. var $parent = this.hasParent();
  78314. if ($parent) {
  78315. this.$nextTick(function () {
  78316. (0, _newArrowCheck3.default)(this, _this3);
  78317. if (this.trigger === 'custom') return false;
  78318. this.currentVisible = false;
  78319. }.bind(this));
  78320. $parent.$emit('on-hover-click');
  78321. } else {
  78322. this.$nextTick(function () {
  78323. (0, _newArrowCheck3.default)(this, _this3);
  78324. if (this.trigger === 'custom') return false;
  78325. this.currentVisible = false;
  78326. }.bind(this));
  78327. }
  78328. }.bind(this));
  78329. this.$on('on-haschild-click', function () {
  78330. (0, _newArrowCheck3.default)(this, _this3);
  78331. this.$nextTick(function () {
  78332. (0, _newArrowCheck3.default)(this, _this3);
  78333. if (this.trigger === 'custom') return false;
  78334. this.currentVisible = true;
  78335. }.bind(this));
  78336. var $parent = this.hasParent();
  78337. if ($parent) $parent.$emit('on-haschild-click');
  78338. }.bind(this));
  78339. }
  78340. };
  78341. /***/ }),
  78342. /* 180 */
  78343. /***/ (function(module, exports, __webpack_require__) {
  78344. "use strict";
  78345. Object.defineProperty(exports, "__esModule", {
  78346. value: true
  78347. });
  78348. exports.default = {
  78349. name: 'DropdownMenu'
  78350. };
  78351. /***/ }),
  78352. /* 181 */
  78353. /***/ (function(module, exports, __webpack_require__) {
  78354. "use strict";
  78355. Object.defineProperty(exports, "__esModule", {
  78356. value: true
  78357. });
  78358. var _defineProperty2 = __webpack_require__(2);
  78359. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  78360. var _assist = __webpack_require__(3);
  78361. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  78362. var prefixCls = 'ivu-dropdown-item';
  78363. exports.default = {
  78364. name: 'DropdownItem',
  78365. props: {
  78366. name: {
  78367. type: [String, Number]
  78368. },
  78369. disabled: {
  78370. type: Boolean,
  78371. default: false
  78372. },
  78373. selected: {
  78374. type: Boolean,
  78375. default: false
  78376. },
  78377. divided: {
  78378. type: Boolean,
  78379. default: false
  78380. }
  78381. },
  78382. computed: {
  78383. classes: function classes() {
  78384. var _ref;
  78385. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-disabled', this.disabled), (0, _defineProperty3.default)(_ref, prefixCls + '-selected', this.selected), (0, _defineProperty3.default)(_ref, prefixCls + '-divided', this.divided), _ref)];
  78386. }
  78387. },
  78388. methods: {
  78389. handleClick: function handleClick() {
  78390. if (this.disabled) return;
  78391. var $parent = (0, _assist.findComponentUpward)(this, 'Dropdown');
  78392. var hasChildren = this.$parent && this.$parent.$options.name === 'Dropdown';
  78393. if (hasChildren) {
  78394. this.$parent.$emit('on-haschild-click');
  78395. } else {
  78396. if ($parent && $parent.$options.name === 'Dropdown') {
  78397. $parent.$emit('on-hover-click');
  78398. }
  78399. }
  78400. $parent.$emit('on-click', this.name);
  78401. }
  78402. }
  78403. };
  78404. /***/ }),
  78405. /* 182 */
  78406. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  78407. "use strict";
  78408. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  78409. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_footer_vue__ = __webpack_require__(183);
  78410. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_footer_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_footer_vue__);
  78411. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_footer_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_footer_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  78412. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_fccdaa0c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_footer_vue__ = __webpack_require__(437);
  78413. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_fccdaa0c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_footer_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_fccdaa0c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_footer_vue__);
  78414. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  78415. /* script */
  78416. /* template */
  78417. /* template functional */
  78418. var __vue_template_functional__ = false
  78419. /* styles */
  78420. var __vue_styles__ = null
  78421. /* scopeId */
  78422. var __vue_scopeId__ = null
  78423. /* moduleIdentifier (server only) */
  78424. var __vue_module_identifier__ = null
  78425. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  78426. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_footer_vue___default.a,
  78427. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_fccdaa0c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_footer_vue__["render"],
  78428. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_fccdaa0c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_footer_vue__["staticRenderFns"],
  78429. __vue_template_functional__,
  78430. __vue_styles__,
  78431. __vue_scopeId__,
  78432. __vue_module_identifier__
  78433. )
  78434. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  78435. /***/ }),
  78436. /* 183 */
  78437. /***/ (function(module, exports, __webpack_require__) {
  78438. "use strict";
  78439. Object.defineProperty(exports, "__esModule", {
  78440. value: true
  78441. });
  78442. var prefixCls = 'ivu-layout';
  78443. exports.default = {
  78444. name: 'Footer',
  78445. computed: {
  78446. wrapClasses: function wrapClasses() {
  78447. return prefixCls + '-footer';
  78448. }
  78449. }
  78450. };
  78451. /***/ }),
  78452. /* 184 */
  78453. /***/ (function(module, exports, __webpack_require__) {
  78454. "use strict";
  78455. Object.defineProperty(exports, "__esModule", {
  78456. value: true
  78457. });
  78458. var _promise = __webpack_require__(185);
  78459. var _promise2 = _interopRequireDefault(_promise);
  78460. var _newArrowCheck2 = __webpack_require__(1);
  78461. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  78462. var _defineProperty2 = __webpack_require__(2);
  78463. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  78464. var _assist = __webpack_require__(3);
  78465. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  78466. var prefixCls = 'ivu-form';
  78467. exports.default = {
  78468. name: 'iForm',
  78469. props: {
  78470. model: {
  78471. type: Object
  78472. },
  78473. rules: {
  78474. type: Object
  78475. },
  78476. labelWidth: {
  78477. type: Number
  78478. },
  78479. labelPosition: {
  78480. validator: function validator(value) {
  78481. return (0, _assist.oneOf)(value, ['left', 'right', 'top']);
  78482. },
  78483. default: 'right'
  78484. },
  78485. inline: {
  78486. type: Boolean,
  78487. default: false
  78488. },
  78489. showMessage: {
  78490. type: Boolean,
  78491. default: true
  78492. },
  78493. autocomplete: {
  78494. validator: function validator(value) {
  78495. return (0, _assist.oneOf)(value, ['on', 'off']);
  78496. },
  78497. default: 'off'
  78498. },
  78499. hideRequiredMark: {
  78500. type: Boolean,
  78501. default: false
  78502. },
  78503. labelColon: {
  78504. type: [Boolean, String],
  78505. default: false
  78506. },
  78507. disabled: {
  78508. type: Boolean,
  78509. default: false
  78510. }
  78511. },
  78512. provide: function provide() {
  78513. return { FormInstance: this };
  78514. },
  78515. data: function data() {
  78516. return {
  78517. fields: []
  78518. };
  78519. },
  78520. computed: {
  78521. classes: function classes() {
  78522. var _ref;
  78523. return ['' + prefixCls, prefixCls + '-label-' + String(this.labelPosition), (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-inline', this.inline), (0, _defineProperty3.default)(_ref, prefixCls + '-hide-required-mark', this.hideRequiredMark), _ref)];
  78524. },
  78525. colon: function colon() {
  78526. var colon = '';
  78527. if (this.labelColon) {
  78528. colon = typeof this.labelColon === 'boolean' ? ':' : this.labelColon;
  78529. }
  78530. return colon;
  78531. }
  78532. },
  78533. methods: {
  78534. resetFields: function resetFields() {
  78535. var _this = this;
  78536. this.fields.forEach(function (field) {
  78537. (0, _newArrowCheck3.default)(this, _this);
  78538. field.resetField();
  78539. }.bind(this));
  78540. },
  78541. validate: function validate(callback) {
  78542. var _this2 = this;
  78543. return new _promise2.default(function (resolve) {
  78544. (0, _newArrowCheck3.default)(this, _this2);
  78545. var valid = true;
  78546. var count = 0;
  78547. if (this.fields.length === 0) {
  78548. resolve(valid);
  78549. if (typeof callback === 'function') {
  78550. callback(valid);
  78551. }
  78552. }
  78553. this.fields.forEach(function (field) {
  78554. (0, _newArrowCheck3.default)(this, _this2);
  78555. field.validate('', function (errors) {
  78556. (0, _newArrowCheck3.default)(this, _this2);
  78557. if (errors) {
  78558. valid = false;
  78559. }
  78560. if (++count === this.fields.length) {
  78561. resolve(valid);
  78562. if (typeof callback === 'function') {
  78563. callback(valid);
  78564. }
  78565. }
  78566. }.bind(this));
  78567. }.bind(this));
  78568. }.bind(this));
  78569. },
  78570. validateField: function validateField(prop, cb) {
  78571. var _this3 = this;
  78572. var field = this.fields.filter(function (field) {
  78573. (0, _newArrowCheck3.default)(this, _this3);
  78574. return field.prop === prop;
  78575. }.bind(this))[0];
  78576. if (!field) {
  78577. throw new Error('[iView warn]: must call validateField with valid prop string!');
  78578. }
  78579. field.validate('', cb);
  78580. }
  78581. },
  78582. watch: {
  78583. rules: function rules() {
  78584. this.validate();
  78585. }
  78586. },
  78587. created: function created() {
  78588. var _this4 = this;
  78589. this.$on('on-form-item-add', function (field) {
  78590. (0, _newArrowCheck3.default)(this, _this4);
  78591. if (field) this.fields.push(field);
  78592. return false;
  78593. }.bind(this));
  78594. this.$on('on-form-item-remove', function (field) {
  78595. (0, _newArrowCheck3.default)(this, _this4);
  78596. if (field.prop) this.fields.splice(this.fields.indexOf(field), 1);
  78597. return false;
  78598. }.bind(this));
  78599. }
  78600. };
  78601. /***/ }),
  78602. /* 185 */
  78603. /***/ (function(module, exports, __webpack_require__) {
  78604. module.exports = { "default": __webpack_require__(440), __esModule: true };
  78605. /***/ }),
  78606. /* 186 */
  78607. /***/ (function(module, exports, __webpack_require__) {
  78608. // 7.3.20 SpeciesConstructor(O, defaultConstructor)
  78609. var anObject = __webpack_require__(22);
  78610. var aFunction = __webpack_require__(43);
  78611. var SPECIES = __webpack_require__(10)('species');
  78612. module.exports = function (O, D) {
  78613. var C = anObject(O).constructor;
  78614. var S;
  78615. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
  78616. };
  78617. /***/ }),
  78618. /* 187 */
  78619. /***/ (function(module, exports, __webpack_require__) {
  78620. var ctx = __webpack_require__(24);
  78621. var invoke = __webpack_require__(442);
  78622. var html = __webpack_require__(105);
  78623. var cel = __webpack_require__(69);
  78624. var global = __webpack_require__(9);
  78625. var process = global.process;
  78626. var setTask = global.setImmediate;
  78627. var clearTask = global.clearImmediate;
  78628. var MessageChannel = global.MessageChannel;
  78629. var Dispatch = global.Dispatch;
  78630. var counter = 0;
  78631. var queue = {};
  78632. var ONREADYSTATECHANGE = 'onreadystatechange';
  78633. var defer, channel, port;
  78634. var run = function () {
  78635. var id = +this;
  78636. // eslint-disable-next-line no-prototype-builtins
  78637. if (queue.hasOwnProperty(id)) {
  78638. var fn = queue[id];
  78639. delete queue[id];
  78640. fn();
  78641. }
  78642. };
  78643. var listener = function (event) {
  78644. run.call(event.data);
  78645. };
  78646. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  78647. if (!setTask || !clearTask) {
  78648. setTask = function setImmediate(fn) {
  78649. var args = [];
  78650. var i = 1;
  78651. while (arguments.length > i) args.push(arguments[i++]);
  78652. queue[++counter] = function () {
  78653. // eslint-disable-next-line no-new-func
  78654. invoke(typeof fn == 'function' ? fn : Function(fn), args);
  78655. };
  78656. defer(counter);
  78657. return counter;
  78658. };
  78659. clearTask = function clearImmediate(id) {
  78660. delete queue[id];
  78661. };
  78662. // Node.js 0.8-
  78663. if (__webpack_require__(41)(process) == 'process') {
  78664. defer = function (id) {
  78665. process.nextTick(ctx(run, id, 1));
  78666. };
  78667. // Sphere (JS game engine) Dispatch API
  78668. } else if (Dispatch && Dispatch.now) {
  78669. defer = function (id) {
  78670. Dispatch.now(ctx(run, id, 1));
  78671. };
  78672. // Browsers with MessageChannel, includes WebWorkers
  78673. } else if (MessageChannel) {
  78674. channel = new MessageChannel();
  78675. port = channel.port2;
  78676. channel.port1.onmessage = listener;
  78677. defer = ctx(port.postMessage, port, 1);
  78678. // Browsers with postMessage, skip WebWorkers
  78679. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  78680. } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
  78681. defer = function (id) {
  78682. global.postMessage(id + '', '*');
  78683. };
  78684. global.addEventListener('message', listener, false);
  78685. // IE8-
  78686. } else if (ONREADYSTATECHANGE in cel('script')) {
  78687. defer = function (id) {
  78688. html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
  78689. html.removeChild(this);
  78690. run.call(id);
  78691. };
  78692. };
  78693. // Rest old browsers
  78694. } else {
  78695. defer = function (id) {
  78696. setTimeout(ctx(run, id, 1), 0);
  78697. };
  78698. }
  78699. }
  78700. module.exports = {
  78701. set: setTask,
  78702. clear: clearTask
  78703. };
  78704. /***/ }),
  78705. /* 188 */
  78706. /***/ (function(module, exports) {
  78707. module.exports = function (exec) {
  78708. try {
  78709. return { e: false, v: exec() };
  78710. } catch (e) {
  78711. return { e: true, v: e };
  78712. }
  78713. };
  78714. /***/ }),
  78715. /* 189 */
  78716. /***/ (function(module, exports, __webpack_require__) {
  78717. var anObject = __webpack_require__(22);
  78718. var isObject = __webpack_require__(18);
  78719. var newPromiseCapability = __webpack_require__(89);
  78720. module.exports = function (C, x) {
  78721. anObject(C);
  78722. if (isObject(x) && x.constructor === C) return x;
  78723. var promiseCapability = newPromiseCapability.f(C);
  78724. var resolve = promiseCapability.resolve;
  78725. resolve(x);
  78726. return promiseCapability.promise;
  78727. };
  78728. /***/ }),
  78729. /* 190 */
  78730. /***/ (function(module, exports, __webpack_require__) {
  78731. "use strict";
  78732. var global = __webpack_require__(9);
  78733. var core = __webpack_require__(5);
  78734. var dP = __webpack_require__(14);
  78735. var DESCRIPTORS = __webpack_require__(13);
  78736. var SPECIES = __webpack_require__(10)('species');
  78737. module.exports = function (KEY) {
  78738. var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
  78739. if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
  78740. configurable: true,
  78741. get: function () { return this; }
  78742. });
  78743. };
  78744. /***/ }),
  78745. /* 191 */
  78746. /***/ (function(module, exports, __webpack_require__) {
  78747. "use strict";
  78748. Object.defineProperty(exports, "__esModule", {
  78749. value: true
  78750. });
  78751. var _newArrowCheck2 = __webpack_require__(1);
  78752. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  78753. var _defineProperty2 = __webpack_require__(2);
  78754. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  78755. var _asyncValidator = __webpack_require__(449);
  78756. var _asyncValidator2 = _interopRequireDefault(_asyncValidator);
  78757. var _emitter = __webpack_require__(4);
  78758. var _emitter2 = _interopRequireDefault(_emitter);
  78759. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  78760. var prefixCls = 'ivu-form-item';
  78761. function getPropByPath(obj, path) {
  78762. var tempObj = obj;
  78763. path = path.replace(/\[(\w+)\]/g, '.$1');
  78764. path = path.replace(/^\./, '');
  78765. var keyArr = path.split('.');
  78766. var i = 0;
  78767. for (var len = keyArr.length; i < len - 1; ++i) {
  78768. var key = keyArr[i];
  78769. if (key in tempObj) {
  78770. tempObj = tempObj[key];
  78771. } else {
  78772. throw new Error('[iView warn]: please transfer a valid prop path to form item!');
  78773. }
  78774. }
  78775. return {
  78776. o: tempObj,
  78777. k: keyArr[i],
  78778. v: tempObj[keyArr[i]]
  78779. };
  78780. }
  78781. exports.default = {
  78782. name: 'FormItem',
  78783. mixins: [_emitter2.default],
  78784. props: {
  78785. label: {
  78786. type: String,
  78787. default: ''
  78788. },
  78789. labelWidth: {
  78790. type: Number
  78791. },
  78792. prop: {
  78793. type: String
  78794. },
  78795. required: {
  78796. type: Boolean,
  78797. default: false
  78798. },
  78799. rules: {
  78800. type: [Object, Array]
  78801. },
  78802. error: {
  78803. type: String
  78804. },
  78805. validateStatus: {
  78806. type: Boolean
  78807. },
  78808. showMessage: {
  78809. type: Boolean,
  78810. default: true
  78811. },
  78812. labelFor: {
  78813. type: String
  78814. }
  78815. },
  78816. data: function data() {
  78817. return {
  78818. prefixCls: prefixCls,
  78819. isRequired: false,
  78820. validateState: '',
  78821. validateMessage: '',
  78822. validateDisabled: false,
  78823. validator: {}
  78824. };
  78825. },
  78826. watch: {
  78827. error: {
  78828. handler: function handler(val) {
  78829. this.validateMessage = val;
  78830. this.validateState = val ? 'error' : '';
  78831. },
  78832. immediate: true
  78833. },
  78834. validateStatus: function validateStatus(val) {
  78835. this.validateState = val;
  78836. },
  78837. rules: function rules() {
  78838. this.setRules();
  78839. },
  78840. required: function required(n, o) {
  78841. this.isRequired = n;
  78842. if (o && !n) {
  78843. this.resetField();
  78844. }
  78845. }
  78846. },
  78847. inject: ['FormInstance'],
  78848. computed: {
  78849. classes: function classes() {
  78850. var _ref;
  78851. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-required', this.required || this.isRequired), (0, _defineProperty3.default)(_ref, prefixCls + '-error', this.validateState === 'error'), (0, _defineProperty3.default)(_ref, prefixCls + '-validating', this.validateState === 'validating'), _ref)];
  78852. },
  78853. fieldValue: function fieldValue() {
  78854. var model = this.FormInstance.model;
  78855. if (!model || !this.prop) {
  78856. return;
  78857. }
  78858. var path = this.prop;
  78859. if (path.indexOf(':') !== -1) {
  78860. path = path.replace(/:/, '.');
  78861. }
  78862. return getPropByPath(model, path).v;
  78863. },
  78864. labelStyles: function labelStyles() {
  78865. var style = {};
  78866. var labelWidth = this.labelWidth === 0 || this.labelWidth ? this.labelWidth : this.FormInstance.labelWidth;
  78867. if (labelWidth || labelWidth === 0) {
  78868. style.width = String(labelWidth) + 'px';
  78869. }
  78870. return style;
  78871. },
  78872. contentStyles: function contentStyles() {
  78873. var style = {};
  78874. var labelWidth = this.labelWidth === 0 || this.labelWidth ? this.labelWidth : this.FormInstance.labelWidth;
  78875. if (labelWidth || labelWidth === 0) {
  78876. style.marginLeft = String(labelWidth) + 'px';
  78877. }
  78878. return style;
  78879. }
  78880. },
  78881. methods: {
  78882. setRules: function setRules() {
  78883. var _this = this;
  78884. var rules = this.getRules();
  78885. if (rules.length && this.required) {
  78886. return;
  78887. } else if (rules.length) {
  78888. rules.every(function (rule) {
  78889. (0, _newArrowCheck3.default)(this, _this);
  78890. this.isRequired = rule.required;
  78891. }.bind(this));
  78892. } else if (this.required) {
  78893. this.isRequired = this.required;
  78894. }
  78895. this.$off('on-form-blur', this.onFieldBlur);
  78896. this.$off('on-form-change', this.onFieldChange);
  78897. this.$on('on-form-blur', this.onFieldBlur);
  78898. this.$on('on-form-change', this.onFieldChange);
  78899. },
  78900. getRules: function getRules() {
  78901. var formRules = this.FormInstance.rules;
  78902. var selfRules = this.rules;
  78903. formRules = formRules ? formRules[this.prop] : [];
  78904. return [].concat(selfRules || formRules || []);
  78905. },
  78906. getFilteredRule: function getFilteredRule(trigger) {
  78907. var _this2 = this;
  78908. var rules = this.getRules();
  78909. return rules.filter(function (rule) {
  78910. (0, _newArrowCheck3.default)(this, _this2);
  78911. return !rule.trigger || rule.trigger.indexOf(trigger) !== -1;
  78912. }.bind(this));
  78913. },
  78914. validate: function validate(trigger) {
  78915. var _this3 = this;
  78916. var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
  78917. var rules = this.getFilteredRule(trigger);
  78918. if (!rules || rules.length === 0) {
  78919. if (!this.required) {
  78920. callback();
  78921. return true;
  78922. } else {
  78923. rules = [{ required: true }];
  78924. }
  78925. }
  78926. this.validateState = 'validating';
  78927. var descriptor = {};
  78928. descriptor[this.prop] = rules;
  78929. var validator = new _asyncValidator2.default(descriptor);
  78930. var model = {};
  78931. model[this.prop] = this.fieldValue;
  78932. validator.validate(model, { firstFields: true }, function (errors) {
  78933. (0, _newArrowCheck3.default)(this, _this3);
  78934. this.validateState = !errors ? 'success' : 'error';
  78935. this.validateMessage = errors ? errors[0].message : '';
  78936. callback(this.validateMessage);
  78937. this.FormInstance && this.FormInstance.$emit('on-validate', this.prop, !errors, this.validateMessage || null);
  78938. }.bind(this));
  78939. this.validateDisabled = false;
  78940. },
  78941. resetField: function resetField() {
  78942. this.validateState = '';
  78943. this.validateMessage = '';
  78944. var model = this.FormInstance.model;
  78945. var value = this.fieldValue;
  78946. var path = this.prop;
  78947. if (path.indexOf(':') !== -1) {
  78948. path = path.replace(/:/, '.');
  78949. }
  78950. var prop = getPropByPath(model, path);
  78951. if (Array.isArray(value) && this.initialValue !== null) {
  78952. this.validateDisabled = true;
  78953. prop.o[prop.k] = [].concat(this.initialValue);
  78954. } else {
  78955. this.validateDisabled = true;
  78956. prop.o[prop.k] = this.initialValue;
  78957. }
  78958. },
  78959. onFieldBlur: function onFieldBlur() {
  78960. this.validate('blur');
  78961. },
  78962. onFieldChange: function onFieldChange() {
  78963. if (this.validateDisabled) {
  78964. this.validateDisabled = false;
  78965. return;
  78966. }
  78967. this.validate('change');
  78968. }
  78969. },
  78970. mounted: function mounted() {
  78971. if (this.prop) {
  78972. this.dispatch('iForm', 'on-form-item-add', this);
  78973. Object.defineProperty(this, 'initialValue', {
  78974. value: this.fieldValue
  78975. });
  78976. this.setRules();
  78977. }
  78978. },
  78979. beforeDestroy: function beforeDestroy() {
  78980. this.dispatch('iForm', 'on-form-item-remove', this);
  78981. }
  78982. };
  78983. /***/ }),
  78984. /* 192 */
  78985. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  78986. "use strict";
  78987. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  78988. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_header_vue__ = __webpack_require__(193);
  78989. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_header_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_header_vue__);
  78990. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_header_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_header_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  78991. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8cd48bf0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_header_vue__ = __webpack_require__(453);
  78992. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8cd48bf0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_header_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8cd48bf0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_header_vue__);
  78993. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  78994. /* script */
  78995. /* template */
  78996. /* template functional */
  78997. var __vue_template_functional__ = false
  78998. /* styles */
  78999. var __vue_styles__ = null
  79000. /* scopeId */
  79001. var __vue_scopeId__ = null
  79002. /* moduleIdentifier (server only) */
  79003. var __vue_module_identifier__ = null
  79004. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  79005. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_header_vue___default.a,
  79006. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8cd48bf0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_header_vue__["render"],
  79007. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8cd48bf0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_header_vue__["staticRenderFns"],
  79008. __vue_template_functional__,
  79009. __vue_styles__,
  79010. __vue_scopeId__,
  79011. __vue_module_identifier__
  79012. )
  79013. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  79014. /***/ }),
  79015. /* 193 */
  79016. /***/ (function(module, exports, __webpack_require__) {
  79017. "use strict";
  79018. Object.defineProperty(exports, "__esModule", {
  79019. value: true
  79020. });
  79021. var prefixCls = 'ivu-layout';
  79022. exports.default = {
  79023. name: 'Header',
  79024. computed: {
  79025. wrapClasses: function wrapClasses() {
  79026. return prefixCls + '-header';
  79027. }
  79028. }
  79029. };
  79030. /***/ }),
  79031. /* 194 */
  79032. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  79033. "use strict";
  79034. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  79035. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue__ = __webpack_require__(195);
  79036. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue__);
  79037. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  79038. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_213643b9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_number_vue__ = __webpack_require__(456);
  79039. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_213643b9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_number_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_213643b9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_number_vue__);
  79040. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  79041. /* script */
  79042. /* template */
  79043. /* template functional */
  79044. var __vue_template_functional__ = false
  79045. /* styles */
  79046. var __vue_styles__ = null
  79047. /* scopeId */
  79048. var __vue_scopeId__ = null
  79049. /* moduleIdentifier (server only) */
  79050. var __vue_module_identifier__ = null
  79051. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  79052. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_input_number_vue___default.a,
  79053. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_213643b9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_number_vue__["render"],
  79054. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_213643b9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_input_number_vue__["staticRenderFns"],
  79055. __vue_template_functional__,
  79056. __vue_styles__,
  79057. __vue_scopeId__,
  79058. __vue_module_identifier__
  79059. )
  79060. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  79061. /***/ }),
  79062. /* 195 */
  79063. /***/ (function(module, exports, __webpack_require__) {
  79064. "use strict";
  79065. Object.defineProperty(exports, "__esModule", {
  79066. value: true
  79067. });
  79068. var _newArrowCheck2 = __webpack_require__(1);
  79069. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  79070. var _defineProperty2 = __webpack_require__(2);
  79071. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  79072. var _assist = __webpack_require__(3);
  79073. var _emitter = __webpack_require__(4);
  79074. var _emitter2 = _interopRequireDefault(_emitter);
  79075. var _form = __webpack_require__(11);
  79076. var _form2 = _interopRequireDefault(_form);
  79077. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  79078. var prefixCls = 'ivu-input-number';
  79079. var iconPrefixCls = 'ivu-icon';
  79080. function addNum(num1, num2) {
  79081. var sq1 = void 0,
  79082. sq2 = void 0,
  79083. m = void 0;
  79084. try {
  79085. sq1 = num1.toString().split('.')[1].length;
  79086. } catch (e) {
  79087. sq1 = 0;
  79088. }
  79089. try {
  79090. sq2 = num2.toString().split('.')[1].length;
  79091. } catch (e) {
  79092. sq2 = 0;
  79093. }
  79094. m = Math.pow(10, Math.max(sq1, sq2));
  79095. return (Math.round(num1 * m) + Math.round(num2 * m)) / m;
  79096. }
  79097. exports.default = {
  79098. name: 'InputNumber',
  79099. mixins: [_emitter2.default, _form2.default],
  79100. props: {
  79101. max: {
  79102. type: Number,
  79103. default: Infinity
  79104. },
  79105. min: {
  79106. type: Number,
  79107. default: -Infinity
  79108. },
  79109. step: {
  79110. type: Number,
  79111. default: 1
  79112. },
  79113. activeChange: {
  79114. type: Boolean,
  79115. default: true
  79116. },
  79117. value: {
  79118. type: Number,
  79119. default: 1
  79120. },
  79121. size: {
  79122. validator: function validator(value) {
  79123. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  79124. },
  79125. default: function _default() {
  79126. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  79127. }
  79128. },
  79129. disabled: {
  79130. type: Boolean,
  79131. default: false
  79132. },
  79133. autofocus: {
  79134. type: Boolean,
  79135. default: false
  79136. },
  79137. readonly: {
  79138. type: Boolean,
  79139. default: false
  79140. },
  79141. editable: {
  79142. type: Boolean,
  79143. default: true
  79144. },
  79145. name: {
  79146. type: String
  79147. },
  79148. precision: {
  79149. type: Number
  79150. },
  79151. elementId: {
  79152. type: String
  79153. },
  79154. formatter: {
  79155. type: Function
  79156. },
  79157. parser: {
  79158. type: Function
  79159. },
  79160. placeholder: {
  79161. type: String,
  79162. default: ''
  79163. },
  79164. controlsOutside: {
  79165. type: Boolean,
  79166. default: false
  79167. }
  79168. },
  79169. data: function data() {
  79170. return {
  79171. focused: false,
  79172. upDisabled: false,
  79173. downDisabled: false,
  79174. currentValue: this.value
  79175. };
  79176. },
  79177. computed: {
  79178. wrapClasses: function wrapClasses() {
  79179. var _ref;
  79180. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref, prefixCls + '-disabled', this.itemDisabled), (0, _defineProperty3.default)(_ref, prefixCls + '-focused', this.focused), (0, _defineProperty3.default)(_ref, prefixCls + '-controls-outside', this.controlsOutside), _ref)];
  79181. },
  79182. handlerClasses: function handlerClasses() {
  79183. return prefixCls + '-handler-wrap';
  79184. },
  79185. upClasses: function upClasses() {
  79186. return [prefixCls + '-handler', prefixCls + '-handler-up', (0, _defineProperty3.default)({}, prefixCls + '-handler-up-disabled', this.upDisabled)];
  79187. },
  79188. innerUpClasses: function innerUpClasses() {
  79189. return prefixCls + '-handler-up-inner ' + iconPrefixCls + ' ' + iconPrefixCls + '-ios-arrow-up';
  79190. },
  79191. downClasses: function downClasses() {
  79192. return [prefixCls + '-handler', prefixCls + '-handler-down', (0, _defineProperty3.default)({}, prefixCls + '-handler-down-disabled', this.downDisabled)];
  79193. },
  79194. innerDownClasses: function innerDownClasses() {
  79195. return prefixCls + '-handler-down-inner ' + iconPrefixCls + ' ' + iconPrefixCls + '-ios-arrow-down';
  79196. },
  79197. inputWrapClasses: function inputWrapClasses() {
  79198. return prefixCls + '-input-wrap';
  79199. },
  79200. inputClasses: function inputClasses() {
  79201. return prefixCls + '-input';
  79202. },
  79203. precisionValue: function precisionValue() {
  79204. if (!this.currentValue) return this.currentValue;
  79205. return this.precision ? this.currentValue.toFixed(this.precision) : this.currentValue;
  79206. },
  79207. formatterValue: function formatterValue() {
  79208. if (this.formatter && this.precisionValue !== null) {
  79209. return this.formatter(this.precisionValue);
  79210. } else {
  79211. return this.precisionValue;
  79212. }
  79213. }
  79214. },
  79215. methods: {
  79216. preventDefault: function preventDefault(e) {
  79217. e.preventDefault();
  79218. },
  79219. up: function up(e) {
  79220. var targetVal = Number(e.target.value);
  79221. if (this.upDisabled && isNaN(targetVal)) {
  79222. return false;
  79223. }
  79224. this.changeStep('up', e);
  79225. },
  79226. down: function down(e) {
  79227. var targetVal = Number(e.target.value);
  79228. if (this.downDisabled && isNaN(targetVal)) {
  79229. return false;
  79230. }
  79231. this.changeStep('down', e);
  79232. },
  79233. changeStep: function changeStep(type, e) {
  79234. if (this.itemDisabled || this.readonly) {
  79235. return false;
  79236. }
  79237. var targetVal = Number(e.target.value);
  79238. var val = Number(this.currentValue);
  79239. var step = Number(this.step);
  79240. if (isNaN(val)) {
  79241. return false;
  79242. }
  79243. if (!isNaN(targetVal)) {
  79244. if (type === 'up') {
  79245. if (addNum(targetVal, step) <= this.max) {
  79246. val = targetVal;
  79247. } else {
  79248. return false;
  79249. }
  79250. } else if (type === 'down') {
  79251. if (addNum(targetVal, -step) >= this.min) {
  79252. val = targetVal;
  79253. } else {
  79254. return false;
  79255. }
  79256. }
  79257. }
  79258. if (type === 'up') {
  79259. val = addNum(val, step);
  79260. } else if (type === 'down') {
  79261. val = addNum(val, -step);
  79262. }
  79263. this.setValue(val);
  79264. },
  79265. setValue: function setValue(val) {
  79266. var _this = this;
  79267. if (val && !isNaN(this.precision)) val = Number(Number(val).toFixed(this.precision));
  79268. var min = this.min,
  79269. max = this.max;
  79270. if (val !== null) {
  79271. if (val > max) {
  79272. val = max;
  79273. } else if (val < min) {
  79274. val = min;
  79275. }
  79276. }
  79277. this.$nextTick(function () {
  79278. (0, _newArrowCheck3.default)(this, _this);
  79279. this.currentValue = val;
  79280. this.$emit('input', val);
  79281. this.$emit('on-change', val);
  79282. this.dispatch('FormItem', 'on-form-change', val);
  79283. }.bind(this));
  79284. },
  79285. focus: function focus(event) {
  79286. this.focused = true;
  79287. this.$emit('on-focus', event);
  79288. },
  79289. blur: function blur() {
  79290. this.focused = false;
  79291. this.$emit('on-blur');
  79292. if (!(0, _assist.findComponentUpward)(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) {
  79293. this.dispatch('FormItem', 'on-form-blur', this.currentValue);
  79294. }
  79295. },
  79296. keyDown: function keyDown(e) {
  79297. if (e.keyCode === 38) {
  79298. e.preventDefault();
  79299. this.up(e);
  79300. } else if (e.keyCode === 40) {
  79301. e.preventDefault();
  79302. this.down(e);
  79303. }
  79304. },
  79305. change: function change(event) {
  79306. if (event.type == 'change' && this.activeChange) return;
  79307. if (event.type == 'input' && !this.activeChange) return;
  79308. var val = event.target.value.trim();
  79309. if (this.parser) {
  79310. val = this.parser(val);
  79311. }
  79312. var isEmptyString = val.length === 0;
  79313. if (isEmptyString) {
  79314. this.setValue(null);
  79315. return;
  79316. }
  79317. if (event.type == 'input' && val.match(/^\-?\.?$|\.$/)) return;
  79318. val = Number(val);
  79319. if (!isNaN(val)) {
  79320. this.currentValue = val;
  79321. this.setValue(val);
  79322. } else {
  79323. event.target.value = this.currentValue;
  79324. }
  79325. },
  79326. changeVal: function changeVal(val) {
  79327. val = Number(val);
  79328. if (!isNaN(val)) {
  79329. var step = this.step;
  79330. this.upDisabled = val + step > this.max;
  79331. this.downDisabled = val - step < this.min;
  79332. } else {
  79333. this.upDisabled = true;
  79334. this.downDisabled = true;
  79335. }
  79336. }
  79337. },
  79338. mounted: function mounted() {
  79339. this.changeVal(this.currentValue);
  79340. },
  79341. watch: {
  79342. value: function value(val) {
  79343. this.currentValue = val;
  79344. },
  79345. currentValue: function currentValue(val) {
  79346. this.changeVal(val);
  79347. },
  79348. min: function min() {
  79349. this.changeVal(this.currentValue);
  79350. },
  79351. max: function max() {
  79352. this.changeVal(this.currentValue);
  79353. }
  79354. }
  79355. };
  79356. /***/ }),
  79357. /* 196 */
  79358. /***/ (function(module, exports, __webpack_require__) {
  79359. "use strict";
  79360. Object.defineProperty(exports, "__esModule", {
  79361. value: true
  79362. });
  79363. var _sign = __webpack_require__(459);
  79364. var _sign2 = _interopRequireDefault(_sign);
  79365. var _defineProperty2 = __webpack_require__(2);
  79366. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  79367. var _promise = __webpack_require__(185);
  79368. var _promise2 = _interopRequireDefault(_promise);
  79369. var _newArrowCheck2 = __webpack_require__(1);
  79370. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  79371. var _lodash = __webpack_require__(463);
  79372. var _lodash2 = _interopRequireDefault(_lodash);
  79373. var _loadingComponent = __webpack_require__(464);
  79374. var _loadingComponent2 = _interopRequireDefault(_loadingComponent);
  79375. var _dom = __webpack_require__(12);
  79376. var _locale = __webpack_require__(6);
  79377. var _locale2 = _interopRequireDefault(_locale);
  79378. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  79379. var prefixCls = 'ivu-scroll';
  79380. var dragConfig = {
  79381. sensitivity: 10,
  79382. minimumStartDragOffset: 5 };
  79383. var noop = function () {
  79384. (0, _newArrowCheck3.default)(undefined, undefined);
  79385. return _promise2.default.resolve();
  79386. }.bind(undefined);
  79387. exports.default = {
  79388. name: 'Scroll',
  79389. mixins: [_locale2.default],
  79390. components: { loader: _loadingComponent2.default },
  79391. props: {
  79392. height: {
  79393. type: [Number, String],
  79394. default: 300
  79395. },
  79396. onReachTop: {
  79397. type: Function
  79398. },
  79399. onReachBottom: {
  79400. type: Function
  79401. },
  79402. onReachEdge: {
  79403. type: Function
  79404. },
  79405. loadingText: {
  79406. type: String
  79407. },
  79408. distanceToEdge: [Number, Array],
  79409. stopSlide: {
  79410. type: Boolean,
  79411. default: false
  79412. }
  79413. },
  79414. data: function data() {
  79415. var _this = this;
  79416. var distanceToEdge = this.calculateProximityThreshold();
  79417. return {
  79418. showTopLoader: false,
  79419. showBottomLoader: false,
  79420. showBodyLoader: false,
  79421. lastScroll: 0,
  79422. reachedTopScrollLimit: true,
  79423. reachedBottomScrollLimit: false,
  79424. topRubberPadding: 0,
  79425. bottomRubberPadding: 0,
  79426. rubberRollBackTimeout: false,
  79427. isLoading: false,
  79428. pointerTouchDown: null,
  79429. touchScroll: false,
  79430. handleScroll: function handleScroll() {
  79431. (0, _newArrowCheck3.default)(this, _this);
  79432. }.bind(this),
  79433. pointerUpHandler: function pointerUpHandler() {
  79434. (0, _newArrowCheck3.default)(this, _this);
  79435. }.bind(this),
  79436. pointerMoveHandler: function pointerMoveHandler() {
  79437. (0, _newArrowCheck3.default)(this, _this);
  79438. }.bind(this),
  79439. topProximityThreshold: distanceToEdge[0],
  79440. bottomProximityThreshold: distanceToEdge[1]
  79441. };
  79442. },
  79443. computed: {
  79444. wrapClasses: function wrapClasses() {
  79445. return prefixCls + '-wrapper';
  79446. },
  79447. scrollContainerClasses: function scrollContainerClasses() {
  79448. return [prefixCls + '-container', (0, _defineProperty3.default)({}, prefixCls + '-container-loading', this.showBodyLoader && this.stopSlide)];
  79449. },
  79450. slotContainerClasses: function slotContainerClasses() {
  79451. return [prefixCls + '-content', (0, _defineProperty3.default)({}, prefixCls + '-content-loading', this.showBodyLoader)];
  79452. },
  79453. loaderClasses: function loaderClasses() {
  79454. return prefixCls + '-loader';
  79455. },
  79456. wrapperPadding: function wrapperPadding() {
  79457. return {
  79458. paddingTop: this.topRubberPadding + 'px',
  79459. paddingBottom: this.bottomRubberPadding + 'px'
  79460. };
  79461. },
  79462. localeLoadingText: function localeLoadingText() {
  79463. if (this.loadingText === undefined) {
  79464. return this.t('i.select.loading');
  79465. } else {
  79466. return this.loadingText;
  79467. }
  79468. }
  79469. },
  79470. methods: {
  79471. waitOneSecond: function waitOneSecond() {
  79472. var _this2 = this;
  79473. return new _promise2.default(function (resolve) {
  79474. (0, _newArrowCheck3.default)(this, _this2);
  79475. setTimeout(resolve, 1000);
  79476. }.bind(this));
  79477. },
  79478. calculateProximityThreshold: function calculateProximityThreshold() {
  79479. var dte = this.distanceToEdge;
  79480. if (typeof dte == 'undefined') return [20, 20];
  79481. return Array.isArray(dte) ? dte : [dte, dte];
  79482. },
  79483. onCallback: function onCallback(dir) {
  79484. var _this3 = this;
  79485. this.isLoading = true;
  79486. this.showBodyLoader = true;
  79487. if (dir > 0) {
  79488. this.showTopLoader = true;
  79489. this.topRubberPadding = 20;
  79490. } else {
  79491. (function () {
  79492. _this3.showBottomLoader = true;
  79493. _this3.bottomRubberPadding = 20;
  79494. var bottomLoaderHeight = 0;
  79495. var container = _this3.$refs.scrollContainer;
  79496. var initialScrollTop = container.scrollTop;
  79497. for (var i = 0; i < 20; i++) {
  79498. setTimeout(function () {
  79499. (0, _newArrowCheck3.default)(this, _this3);
  79500. bottomLoaderHeight = Math.max(bottomLoaderHeight, this.$refs.bottomLoader.getBoundingClientRect().height);
  79501. container.scrollTop = initialScrollTop + bottomLoaderHeight;
  79502. }.bind(_this3), i * 50);
  79503. }
  79504. })();
  79505. }
  79506. var callbacks = [this.waitOneSecond(), this.onReachEdge ? this.onReachEdge(dir) : noop()];
  79507. callbacks.push(dir > 0 ? this.onReachTop ? this.onReachTop() : noop() : this.onReachBottom ? this.onReachBottom() : noop());
  79508. var tooSlow = setTimeout(function () {
  79509. (0, _newArrowCheck3.default)(this, _this3);
  79510. this.reset();
  79511. }.bind(this), 5000);
  79512. _promise2.default.all(callbacks).then(function () {
  79513. (0, _newArrowCheck3.default)(this, _this3);
  79514. clearTimeout(tooSlow);
  79515. this.reset();
  79516. }.bind(this));
  79517. },
  79518. reset: function reset() {
  79519. var _this4 = this;
  79520. ['showTopLoader', 'showBottomLoader', 'showBodyLoader', 'isLoading', 'reachedTopScrollLimit', 'reachedBottomScrollLimit'].forEach(function (prop) {
  79521. (0, _newArrowCheck3.default)(this, _this4);
  79522. return this[prop] = false;
  79523. }.bind(this));
  79524. this.lastScroll = 0;
  79525. this.topRubberPadding = 0;
  79526. this.bottomRubberPadding = 0;
  79527. clearInterval(this.rubberRollBackTimeout);
  79528. if (this.touchScroll) {
  79529. setTimeout(function () {
  79530. (0, _newArrowCheck3.default)(this, _this4);
  79531. (0, _dom.off)(window, 'touchend', this.pointerUpHandler);
  79532. this.$refs.scrollContainer.removeEventListener('touchmove', this.pointerMoveHandler);
  79533. this.touchScroll = false;
  79534. }.bind(this), 500);
  79535. }
  79536. },
  79537. onWheel: function onWheel(event) {
  79538. if (this.isLoading) return;
  79539. var wheelDelta = event.wheelDelta ? event.wheelDelta : -(event.detail || event.deltaY);
  79540. this.stretchEdge(wheelDelta);
  79541. },
  79542. stretchEdge: function stretchEdge(direction) {
  79543. var _this5 = this;
  79544. clearTimeout(this.rubberRollBackTimeout);
  79545. if (!this.onReachEdge) {
  79546. if (direction > 0) {
  79547. if (!this.onReachTop) return;
  79548. } else {
  79549. if (!this.onReachBottom) return;
  79550. }
  79551. }
  79552. this.rubberRollBackTimeout = setTimeout(function () {
  79553. (0, _newArrowCheck3.default)(this, _this5);
  79554. if (!this.isLoading) this.reset();
  79555. }.bind(this), 250);
  79556. if (direction > 0 && this.reachedTopScrollLimit) {
  79557. this.topRubberPadding += 5 - this.topRubberPadding / 5;
  79558. if (this.topRubberPadding > this.topProximityThreshold) this.onCallback(1);
  79559. } else if (direction < 0 && this.reachedBottomScrollLimit) {
  79560. this.bottomRubberPadding += 6 - this.bottomRubberPadding / 4;
  79561. if (this.bottomRubberPadding > this.bottomProximityThreshold) this.onCallback(-1);
  79562. } else {
  79563. this.onScroll();
  79564. }
  79565. },
  79566. onScroll: function onScroll() {
  79567. var el = this.$refs.scrollContainer;
  79568. if (this.isLoading || !el) return;
  79569. var scrollDirection = (0, _sign2.default)(this.lastScroll - el.scrollTop);
  79570. var displacement = el.scrollHeight - el.clientHeight - el.scrollTop;
  79571. var topNegativeProximity = this.topProximityThreshold < 0 ? this.topProximityThreshold : 0;
  79572. var bottomNegativeProximity = this.bottomProximityThreshold < 0 ? this.bottomProximityThreshold : 0;
  79573. if (scrollDirection == -1 && displacement + bottomNegativeProximity <= dragConfig.sensitivity) {
  79574. this.reachedBottomScrollLimit = true;
  79575. } else if (scrollDirection >= 0 && el.scrollTop + topNegativeProximity <= 0) {
  79576. this.reachedTopScrollLimit = true;
  79577. } else {
  79578. this.reachedTopScrollLimit = false;
  79579. this.reachedBottomScrollLimit = false;
  79580. this.lastScroll = el.scrollTop;
  79581. }
  79582. },
  79583. getTouchCoordinates: function getTouchCoordinates(e) {
  79584. return {
  79585. x: e.touches[0].pageX,
  79586. y: e.touches[0].pageY
  79587. };
  79588. },
  79589. onPointerDown: function onPointerDown(e) {
  79590. var _this6 = this;
  79591. if (this.isLoading) return;
  79592. if (e.type == 'touchstart') {
  79593. var container = this.$refs.scrollContainer;
  79594. if (this.reachedTopScrollLimit) container.scrollTop = 5;else if (this.reachedBottomScrollLimit) container.scrollTop -= 5;
  79595. }
  79596. if (e.type == 'touchstart' && this.$refs.scrollContainer.scrollTop == 0) this.$refs.scrollContainer.scrollTop = 5;
  79597. this.pointerTouchDown = this.getTouchCoordinates(e);
  79598. (0, _dom.on)(window, 'touchend', this.pointerUpHandler);
  79599. this.$refs.scrollContainer.parentElement.addEventListener('touchmove', function (e) {
  79600. (0, _newArrowCheck3.default)(this, _this6);
  79601. e.stopPropagation();
  79602. this.pointerMoveHandler(e);
  79603. }.bind(this), { passive: false, useCapture: true });
  79604. },
  79605. onPointerMove: function onPointerMove(e) {
  79606. if (!this.pointerTouchDown) return;
  79607. if (this.isLoading) return;
  79608. var pointerPosition = this.getTouchCoordinates(e);
  79609. var yDiff = pointerPosition.y - this.pointerTouchDown.y;
  79610. this.stretchEdge(yDiff);
  79611. if (!this.touchScroll) {
  79612. var wasDragged = Math.abs(yDiff) > dragConfig.minimumStartDragOffset;
  79613. if (wasDragged) this.touchScroll = true;
  79614. }
  79615. },
  79616. onPointerUp: function onPointerUp() {
  79617. this.pointerTouchDown = null;
  79618. }
  79619. },
  79620. created: function created() {
  79621. this.handleScroll = (0, _lodash2.default)(this.onScroll, 150, { leading: false });
  79622. this.pointerUpHandler = this.onPointerUp.bind(this);
  79623. this.pointerMoveHandler = (0, _lodash2.default)(this.onPointerMove, 50, { leading: false });
  79624. }
  79625. };
  79626. /***/ }),
  79627. /* 197 */
  79628. /***/ (function(module, exports, __webpack_require__) {
  79629. "use strict";
  79630. Object.defineProperty(exports, "__esModule", {
  79631. value: true
  79632. });
  79633. var _defineProperty2 = __webpack_require__(2);
  79634. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  79635. var _spin = __webpack_require__(91);
  79636. var _spin2 = _interopRequireDefault(_spin);
  79637. var _icon = __webpack_require__(8);
  79638. var _icon2 = _interopRequireDefault(_icon);
  79639. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  79640. var prefixCls = 'ivu-scroll';
  79641. exports.default = {
  79642. props: ['text', 'active', 'spinnerHeight'],
  79643. components: { Spin: _spin2.default, Icon: _icon2.default },
  79644. computed: {
  79645. wrapperClasses: function wrapperClasses() {
  79646. return [prefixCls + '-loader-wrapper', (0, _defineProperty3.default)({}, prefixCls + '-loader-wrapper-active', this.active)];
  79647. },
  79648. spinnerClasses: function spinnerClasses() {
  79649. return prefixCls + '-spinner';
  79650. },
  79651. iconClasses: function iconClasses() {
  79652. return prefixCls + '-spinner-icon';
  79653. },
  79654. textClasses: function textClasses() {
  79655. return prefixCls + '-loader-text';
  79656. }
  79657. }
  79658. };
  79659. /***/ }),
  79660. /* 198 */
  79661. /***/ (function(module, exports, __webpack_require__) {
  79662. "use strict";
  79663. Object.defineProperty(exports, "__esModule", {
  79664. value: true
  79665. });
  79666. var _defineProperty2 = __webpack_require__(2);
  79667. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  79668. var _assist = __webpack_require__(3);
  79669. var _mixinsScrollbar = __webpack_require__(87);
  79670. var _mixinsScrollbar2 = _interopRequireDefault(_mixinsScrollbar);
  79671. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  79672. var prefixCls = 'ivu-spin';
  79673. exports.default = {
  79674. name: 'Spin',
  79675. mixins: [_mixinsScrollbar2.default],
  79676. props: {
  79677. size: {
  79678. validator: function validator(value) {
  79679. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  79680. },
  79681. default: function _default() {
  79682. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  79683. }
  79684. },
  79685. fix: {
  79686. type: Boolean,
  79687. default: false
  79688. },
  79689. fullscreen: {
  79690. type: Boolean,
  79691. default: false
  79692. }
  79693. },
  79694. data: function data() {
  79695. return {
  79696. showText: false,
  79697. visible: false
  79698. };
  79699. },
  79700. computed: {
  79701. classes: function classes() {
  79702. var _ref;
  79703. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref, prefixCls + '-fix', this.fix), (0, _defineProperty3.default)(_ref, prefixCls + '-show-text', this.showText), (0, _defineProperty3.default)(_ref, prefixCls + '-fullscreen', this.fullscreen), _ref)];
  79704. },
  79705. mainClasses: function mainClasses() {
  79706. return prefixCls + '-main';
  79707. },
  79708. dotClasses: function dotClasses() {
  79709. return prefixCls + '-dot';
  79710. },
  79711. textClasses: function textClasses() {
  79712. return prefixCls + '-text';
  79713. },
  79714. fullscreenVisible: function fullscreenVisible() {
  79715. if (this.fullscreen) {
  79716. return this.visible;
  79717. } else {
  79718. return true;
  79719. }
  79720. }
  79721. },
  79722. watch: {
  79723. visible: function visible(val) {
  79724. if (val) {
  79725. this.addScrollEffect();
  79726. } else {
  79727. this.removeScrollEffect();
  79728. }
  79729. }
  79730. },
  79731. mounted: function mounted() {
  79732. this.showText = this.$slots.default !== undefined;
  79733. }
  79734. };
  79735. /***/ }),
  79736. /* 199 */
  79737. /***/ (function(module, exports, __webpack_require__) {
  79738. "use strict";
  79739. Object.defineProperty(exports, "__esModule", {
  79740. value: true
  79741. });
  79742. var _newArrowCheck2 = __webpack_require__(1);
  79743. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  79744. var _defineProperty2 = __webpack_require__(2);
  79745. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  79746. var _assist = __webpack_require__(3);
  79747. var _dom = __webpack_require__(12);
  79748. var _trigger = __webpack_require__(470);
  79749. var _trigger2 = _interopRequireDefault(_trigger);
  79750. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  79751. exports.default = {
  79752. name: 'Split',
  79753. components: {
  79754. Trigger: _trigger2.default
  79755. },
  79756. props: {
  79757. value: {
  79758. type: [Number, String],
  79759. default: 0.5
  79760. },
  79761. mode: {
  79762. validator: function validator(value) {
  79763. return (0, _assist.oneOf)(value, ['horizontal', 'vertical']);
  79764. },
  79765. default: 'horizontal'
  79766. },
  79767. min: {
  79768. type: [Number, String],
  79769. default: '40px'
  79770. },
  79771. max: {
  79772. type: [Number, String],
  79773. default: '40px'
  79774. }
  79775. },
  79776. data: function data() {
  79777. return {
  79778. prefix: 'ivu-split',
  79779. offset: 0,
  79780. oldOffset: 0,
  79781. isMoving: false,
  79782. computedMin: 0,
  79783. computedMax: 0,
  79784. currentValue: 0.5
  79785. };
  79786. },
  79787. computed: {
  79788. wrapperClasses: function wrapperClasses() {
  79789. return [String(this.prefix) + '-wrapper', this.isMoving ? 'no-select' : ''];
  79790. },
  79791. paneClasses: function paneClasses() {
  79792. return [String(this.prefix) + '-pane', (0, _defineProperty3.default)({}, String(this.prefix) + '-pane-moving', this.isMoving)];
  79793. },
  79794. isHorizontal: function isHorizontal() {
  79795. return this.mode === 'horizontal';
  79796. },
  79797. anotherOffset: function anotherOffset() {
  79798. return 100 - this.offset;
  79799. },
  79800. valueIsPx: function valueIsPx() {
  79801. return typeof this.value === 'string';
  79802. },
  79803. offsetSize: function offsetSize() {
  79804. return this.isHorizontal ? 'offsetWidth' : 'offsetHeight';
  79805. }
  79806. },
  79807. methods: {
  79808. px2percent: function px2percent(numerator, denominator) {
  79809. return parseFloat(numerator) / parseFloat(denominator);
  79810. },
  79811. getComputedThresholdValue: function getComputedThresholdValue(type) {
  79812. var size = this.$refs.outerWrapper[this.offsetSize];
  79813. if (this.valueIsPx) return typeof this[type] === 'string' ? this[type] : size * this[type];else return typeof this[type] === 'string' ? this.px2percent(this[type], size) : this[type];
  79814. },
  79815. getMin: function getMin(value1, value2) {
  79816. if (this.valueIsPx) return String(Math.min(parseFloat(value1), parseFloat(value2))) + 'px';else return Math.min(value1, value2);
  79817. },
  79818. getMax: function getMax(value1, value2) {
  79819. if (this.valueIsPx) return String(Math.max(parseFloat(value1), parseFloat(value2))) + 'px';else return Math.max(value1, value2);
  79820. },
  79821. getAnotherOffset: function getAnotherOffset(value) {
  79822. var res = 0;
  79823. if (this.valueIsPx) res = this.$refs.outerWrapper[this.offsetSize] - parseFloat(value) + 'px';else res = 1 - value;
  79824. return res;
  79825. },
  79826. handleMove: function handleMove(e) {
  79827. var pageOffset = this.isHorizontal ? e.pageX : e.pageY;
  79828. var offset = pageOffset - this.initOffset;
  79829. var outerWidth = this.$refs.outerWrapper[this.offsetSize];
  79830. var value = this.valueIsPx ? String(parseFloat(this.oldOffset) + offset) + 'px' : this.px2percent(outerWidth * this.oldOffset + offset, outerWidth);
  79831. var anotherValue = this.getAnotherOffset(value);
  79832. if (parseFloat(value) <= parseFloat(this.computedMin)) value = this.getMax(value, this.computedMin);
  79833. if (parseFloat(anotherValue) <= parseFloat(this.computedMax)) value = this.getAnotherOffset(this.getMax(anotherValue, this.computedMax));
  79834. e.atMin = this.value === this.computedMin;
  79835. e.atMax = this.valueIsPx ? this.getAnotherOffset(this.value) === this.computedMax : this.getAnotherOffset(this.value).toFixed(5) === this.computedMax.toFixed(5);
  79836. this.$emit('input', value);
  79837. this.$emit('on-moving', e);
  79838. },
  79839. handleUp: function handleUp() {
  79840. this.isMoving = false;
  79841. (0, _dom.off)(document, 'mousemove', this.handleMove);
  79842. (0, _dom.off)(document, 'mouseup', this.handleUp);
  79843. this.$emit('on-move-end');
  79844. },
  79845. handleMousedown: function handleMousedown(e) {
  79846. this.initOffset = this.isHorizontal ? e.pageX : e.pageY;
  79847. this.oldOffset = this.value;
  79848. this.isMoving = true;
  79849. (0, _dom.on)(document, 'mousemove', this.handleMove);
  79850. (0, _dom.on)(document, 'mouseup', this.handleUp);
  79851. this.$emit('on-move-start');
  79852. },
  79853. computeOffset: function computeOffset() {
  79854. var _this = this;
  79855. this.$nextTick(function () {
  79856. (0, _newArrowCheck3.default)(this, _this);
  79857. this.computedMin = this.getComputedThresholdValue('min');
  79858. this.computedMax = this.getComputedThresholdValue('max');
  79859. this.offset = (this.valueIsPx ? this.px2percent(this.value, this.$refs.outerWrapper[this.offsetSize]) : this.value) * 10000 / 100;
  79860. }.bind(this));
  79861. }
  79862. },
  79863. watch: {
  79864. value: function value(val) {
  79865. if (val !== this.currentValue) {
  79866. this.currentValue = val;
  79867. this.computeOffset();
  79868. }
  79869. }
  79870. },
  79871. mounted: function mounted() {
  79872. var _this2 = this;
  79873. this.$nextTick(function () {
  79874. (0, _newArrowCheck3.default)(this, _this2);
  79875. this.computeOffset();
  79876. }.bind(this));
  79877. (0, _dom.on)(window, 'resize', this.computeOffset);
  79878. },
  79879. beforeDestroy: function beforeDestroy() {
  79880. (0, _dom.off)(window, 'resize', this.computeOffset);
  79881. }
  79882. };
  79883. /***/ }),
  79884. /* 200 */
  79885. /***/ (function(module, exports, __webpack_require__) {
  79886. "use strict";
  79887. Object.defineProperty(exports, "__esModule", {
  79888. value: true
  79889. });
  79890. exports.default = {
  79891. name: 'Trigger',
  79892. props: {
  79893. mode: String
  79894. },
  79895. data: function data() {
  79896. return {
  79897. prefix: 'ivu-split-trigger',
  79898. initOffset: 0
  79899. };
  79900. },
  79901. computed: {
  79902. isVertical: function isVertical() {
  79903. return this.mode === 'vertical';
  79904. },
  79905. classes: function classes() {
  79906. return [this.prefix, this.isVertical ? String(this.prefix) + '-vertical' : String(this.prefix) + '-horizontal'];
  79907. },
  79908. barConClasses: function barConClasses() {
  79909. return [String(this.prefix) + '-bar-con', this.isVertical ? 'vertical' : 'horizontal'];
  79910. }
  79911. }
  79912. };
  79913. /***/ }),
  79914. /* 201 */
  79915. /***/ (function(module, exports, __webpack_require__) {
  79916. "use strict";
  79917. Object.defineProperty(exports, "__esModule", {
  79918. value: true
  79919. });
  79920. var _newArrowCheck2 = __webpack_require__(1);
  79921. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  79922. var _defineProperty2 = __webpack_require__(2);
  79923. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  79924. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  79925. var prefixCls = 'ivu-layout';
  79926. exports.default = {
  79927. name: 'Layout',
  79928. data: function data() {
  79929. return {
  79930. hasSider: false
  79931. };
  79932. },
  79933. computed: {
  79934. wrapClasses: function wrapClasses() {
  79935. return ['' + prefixCls, (0, _defineProperty3.default)({}, prefixCls + '-has-sider', this.hasSider)];
  79936. }
  79937. },
  79938. methods: {
  79939. findSider: function findSider() {
  79940. var _this = this;
  79941. return this.$children.some(function (child) {
  79942. (0, _newArrowCheck3.default)(this, _this);
  79943. return child.$options.name === 'Sider';
  79944. }.bind(this));
  79945. }
  79946. },
  79947. mounted: function mounted() {
  79948. this.hasSider = this.findSider();
  79949. }
  79950. };
  79951. /***/ }),
  79952. /* 202 */
  79953. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  79954. "use strict";
  79955. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  79956. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_sider_vue__ = __webpack_require__(203);
  79957. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_sider_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_sider_vue__);
  79958. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_sider_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_sider_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  79959. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c013752_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_sider_vue__ = __webpack_require__(476);
  79960. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c013752_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_sider_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c013752_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_sider_vue__);
  79961. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  79962. /* script */
  79963. /* template */
  79964. /* template functional */
  79965. var __vue_template_functional__ = false
  79966. /* styles */
  79967. var __vue_styles__ = null
  79968. /* scopeId */
  79969. var __vue_scopeId__ = null
  79970. /* moduleIdentifier (server only) */
  79971. var __vue_module_identifier__ = null
  79972. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  79973. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_sider_vue___default.a,
  79974. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c013752_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_sider_vue__["render"],
  79975. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c013752_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_sider_vue__["staticRenderFns"],
  79976. __vue_template_functional__,
  79977. __vue_styles__,
  79978. __vue_scopeId__,
  79979. __vue_module_identifier__
  79980. )
  79981. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  79982. /***/ }),
  79983. /* 203 */
  79984. /***/ (function(module, exports, __webpack_require__) {
  79985. "use strict";
  79986. Object.defineProperty(exports, "__esModule", {
  79987. value: true
  79988. });
  79989. var _dom = __webpack_require__(12);
  79990. var _assist = __webpack_require__(3);
  79991. var prefixCls = 'ivu-layout-sider';
  79992. (0, _assist.setMatchMedia)();
  79993. exports.default = {
  79994. name: 'Sider',
  79995. props: {
  79996. value: {
  79997. type: Boolean,
  79998. default: false
  79999. },
  80000. width: {
  80001. type: [Number, String],
  80002. default: 200
  80003. },
  80004. collapsedWidth: {
  80005. type: [Number, String],
  80006. default: 64
  80007. },
  80008. hideTrigger: {
  80009. type: Boolean,
  80010. default: false
  80011. },
  80012. breakpoint: {
  80013. type: String,
  80014. validator: function validator(val) {
  80015. return (0, _assist.oneOf)(val, ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']);
  80016. }
  80017. },
  80018. collapsible: {
  80019. type: Boolean,
  80020. default: false
  80021. },
  80022. defaultCollapsed: {
  80023. type: Boolean,
  80024. default: false
  80025. },
  80026. reverseArrow: {
  80027. type: Boolean,
  80028. default: false
  80029. }
  80030. },
  80031. data: function data() {
  80032. return {
  80033. prefixCls: prefixCls,
  80034. mediaMatched: false
  80035. };
  80036. },
  80037. computed: {
  80038. wrapClasses: function wrapClasses() {
  80039. return ['' + prefixCls, this.siderWidth ? '' : prefixCls + '-zero-width', this.value ? prefixCls + '-collapsed' : ''];
  80040. },
  80041. wrapStyles: function wrapStyles() {
  80042. return {
  80043. width: String(this.siderWidth) + 'px',
  80044. minWidth: String(this.siderWidth) + 'px',
  80045. maxWidth: String(this.siderWidth) + 'px',
  80046. flex: '0 0 ' + String(this.siderWidth) + 'px'
  80047. };
  80048. },
  80049. triggerClasses: function triggerClasses() {
  80050. return [prefixCls + '-trigger', this.value ? prefixCls + '-trigger-collapsed' : ''];
  80051. },
  80052. childClasses: function childClasses() {
  80053. return String(this.prefixCls) + '-children';
  80054. },
  80055. zeroWidthTriggerClasses: function zeroWidthTriggerClasses() {
  80056. return [prefixCls + '-zero-width-trigger', this.reverseArrow ? prefixCls + '-zero-width-trigger-left' : ''];
  80057. },
  80058. triggerIconClasses: function triggerIconClasses() {
  80059. return ['ivu-icon', 'ivu-icon-ios-arrow-' + (this.reverseArrow ? 'forward' : 'back'), prefixCls + '-trigger-icon'];
  80060. },
  80061. siderWidth: function siderWidth() {
  80062. return this.collapsible ? this.value ? this.mediaMatched ? 0 : parseInt(this.collapsedWidth) : parseInt(this.width) : this.width;
  80063. },
  80064. showZeroTrigger: function showZeroTrigger() {
  80065. return this.collapsible ? this.mediaMatched && !this.hideTrigger || parseInt(this.collapsedWidth) === 0 && this.value && !this.hideTrigger : false;
  80066. },
  80067. showBottomTrigger: function showBottomTrigger() {
  80068. return this.collapsible ? !this.mediaMatched && !this.hideTrigger : false;
  80069. }
  80070. },
  80071. methods: {
  80072. toggleCollapse: function toggleCollapse() {
  80073. var value = this.collapsible ? !this.value : false;
  80074. this.$emit('input', value);
  80075. },
  80076. matchMedia: function matchMedia() {
  80077. var matchMedia = void 0;
  80078. if (window.matchMedia) {
  80079. matchMedia = window.matchMedia;
  80080. }
  80081. var mediaMatched = this.mediaMatched;
  80082. this.mediaMatched = matchMedia('(max-width: ' + String(_assist.dimensionMap[this.breakpoint]) + ')').matches;
  80083. if (this.mediaMatched !== mediaMatched) {
  80084. this.$emit('input', this.mediaMatched);
  80085. }
  80086. },
  80087. onWindowResize: function onWindowResize() {
  80088. this.matchMedia();
  80089. }
  80090. },
  80091. watch: {
  80092. value: function value(stat) {
  80093. this.$emit('on-collapse', stat);
  80094. }
  80095. },
  80096. mounted: function mounted() {
  80097. if (this.defaultCollapsed) {
  80098. this.$emit('input', this.defaultCollapsed);
  80099. }
  80100. if (this.breakpoint !== undefined) {
  80101. (0, _dom.on)(window, 'resize', this.onWindowResize);
  80102. this.matchMedia();
  80103. }
  80104. },
  80105. beforeDestroy: function beforeDestroy() {
  80106. if (this.breakpoint !== undefined) {
  80107. (0, _dom.off)(window, 'resize', this.onWindowResize);
  80108. }
  80109. }
  80110. };
  80111. /***/ }),
  80112. /* 204 */
  80113. /***/ (function(module, exports, __webpack_require__) {
  80114. "use strict";
  80115. Object.defineProperty(exports, "__esModule", {
  80116. value: true
  80117. });
  80118. var _defineProperty2 = __webpack_require__(2);
  80119. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  80120. var _assist = __webpack_require__(3);
  80121. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80122. var prefixCls = 'ivu-list';
  80123. exports.default = {
  80124. name: 'List',
  80125. provide: function provide() {
  80126. return {
  80127. ListInstance: this
  80128. };
  80129. },
  80130. props: {
  80131. border: {
  80132. type: Boolean,
  80133. default: false
  80134. },
  80135. itemLayout: {
  80136. validator: function validator(value) {
  80137. return (0, _assist.oneOf)(value, ['horizontal', 'vertical']);
  80138. },
  80139. default: 'horizontal'
  80140. },
  80141. header: {
  80142. type: String,
  80143. default: ''
  80144. },
  80145. footer: {
  80146. type: String,
  80147. default: ''
  80148. },
  80149. loading: {
  80150. type: Boolean,
  80151. default: false
  80152. },
  80153. size: {
  80154. validator: function validator(value) {
  80155. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  80156. },
  80157. default: function _default() {
  80158. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  80159. }
  80160. },
  80161. split: {
  80162. type: Boolean,
  80163. default: true
  80164. }
  80165. },
  80166. data: function data() {
  80167. return {};
  80168. },
  80169. computed: {
  80170. classes: function classes() {
  80171. var _ref;
  80172. return ['' + prefixCls, prefixCls + '-' + String(this.size), prefixCls + '-' + String(this.itemLayout), (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-bordered', this.border), (0, _defineProperty3.default)(_ref, prefixCls + '-split', this.split), _ref)];
  80173. }
  80174. },
  80175. methods: {}
  80176. };
  80177. /***/ }),
  80178. /* 205 */
  80179. /***/ (function(module, exports, __webpack_require__) {
  80180. "use strict";
  80181. Object.defineProperty(exports, "__esModule", {
  80182. value: true
  80183. });
  80184. var _newArrowCheck2 = __webpack_require__(1);
  80185. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  80186. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80187. exports.default = {
  80188. name: 'ListItem',
  80189. inject: ['ListInstance'],
  80190. props: {},
  80191. computed: {
  80192. itemLayout: function itemLayout() {
  80193. return this.ListInstance.itemLayout;
  80194. },
  80195. isItemContainsTextNode: function isItemContainsTextNode() {
  80196. var _this = this;
  80197. var result = void 0;
  80198. this.$slots.default.forEach(function (item) {
  80199. (0, _newArrowCheck3.default)(this, _this);
  80200. if (typeof item === 'string') {
  80201. result = true;
  80202. }
  80203. }.bind(this));
  80204. return result;
  80205. },
  80206. isFlexMode: function isFlexMode() {
  80207. var extra = this.$slots.extra;
  80208. if (this.itemLayout === 'vertical') {
  80209. return !!extra;
  80210. }
  80211. return !this.isItemContainsTextNode;
  80212. },
  80213. classes: function classes() {
  80214. return [{
  80215. 'ivu-list-item-no-flex': !this.isFlexMode
  80216. }];
  80217. }
  80218. }
  80219. };
  80220. /***/ }),
  80221. /* 206 */
  80222. /***/ (function(module, exports, __webpack_require__) {
  80223. "use strict";
  80224. Object.defineProperty(exports, "__esModule", {
  80225. value: true
  80226. });
  80227. var _avatar = __webpack_require__(125);
  80228. var _avatar2 = _interopRequireDefault(_avatar);
  80229. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80230. exports.default = {
  80231. name: 'ListItemMeta',
  80232. components: { Avatar: _avatar2.default },
  80233. props: {
  80234. avatar: {
  80235. type: String,
  80236. default: ''
  80237. },
  80238. title: {
  80239. type: String,
  80240. default: ''
  80241. },
  80242. description: {
  80243. type: String,
  80244. default: ''
  80245. }
  80246. }
  80247. };
  80248. /***/ }),
  80249. /* 207 */
  80250. /***/ (function(module, exports, __webpack_require__) {
  80251. "use strict";
  80252. Object.defineProperty(exports, "__esModule", {
  80253. value: true
  80254. });
  80255. var _defineProperty2 = __webpack_require__(2);
  80256. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  80257. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80258. var prefixCls = 'ivu-loading-bar';
  80259. exports.default = {
  80260. name: 'LoadingBar',
  80261. props: {
  80262. color: {
  80263. type: String,
  80264. default: 'primary'
  80265. },
  80266. failedColor: {
  80267. type: String,
  80268. default: 'error'
  80269. },
  80270. height: {
  80271. type: Number,
  80272. default: 2
  80273. }
  80274. },
  80275. data: function data() {
  80276. return {
  80277. percent: 0,
  80278. status: 'success',
  80279. show: false
  80280. };
  80281. },
  80282. computed: {
  80283. classes: function classes() {
  80284. return '' + prefixCls;
  80285. },
  80286. innerClasses: function innerClasses() {
  80287. var _ref;
  80288. return [prefixCls + '-inner', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-inner-color-primary', this.color === 'primary' && this.status === 'success'), (0, _defineProperty3.default)(_ref, prefixCls + '-inner-failed-color-error', this.failedColor === 'error' && this.status === 'error'), _ref)];
  80289. },
  80290. outerStyles: function outerStyles() {
  80291. return {
  80292. height: String(this.height) + 'px'
  80293. };
  80294. },
  80295. styles: function styles() {
  80296. var style = {
  80297. width: String(this.percent) + '%',
  80298. height: String(this.height) + 'px'
  80299. };
  80300. if (this.color !== 'primary' && this.status === 'success') {
  80301. style.backgroundColor = this.color;
  80302. }
  80303. if (this.failedColor !== 'error' && this.status === 'error') {
  80304. style.backgroundColor = this.failedColor;
  80305. }
  80306. return style;
  80307. }
  80308. }
  80309. };
  80310. /***/ }),
  80311. /* 208 */
  80312. /***/ (function(module, exports, __webpack_require__) {
  80313. "use strict";
  80314. Object.defineProperty(exports, "__esModule", {
  80315. value: true
  80316. });
  80317. var _newArrowCheck2 = __webpack_require__(1);
  80318. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  80319. var _toConsumableArray2 = __webpack_require__(17);
  80320. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  80321. var _defineProperty2 = __webpack_require__(2);
  80322. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  80323. var _assist = __webpack_require__(3);
  80324. var _emitter = __webpack_require__(4);
  80325. var _emitter2 = _interopRequireDefault(_emitter);
  80326. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80327. var prefixCls = 'ivu-menu';
  80328. exports.default = {
  80329. name: 'Menu',
  80330. mixins: [_emitter2.default],
  80331. props: {
  80332. mode: {
  80333. validator: function validator(value) {
  80334. return (0, _assist.oneOf)(value, ['horizontal', 'vertical']);
  80335. },
  80336. default: 'vertical'
  80337. },
  80338. theme: {
  80339. validator: function validator(value) {
  80340. return (0, _assist.oneOf)(value, ['light', 'dark', 'primary']);
  80341. },
  80342. default: 'light'
  80343. },
  80344. activeName: {
  80345. type: [String, Number]
  80346. },
  80347. openNames: {
  80348. type: Array,
  80349. default: function _default() {
  80350. return [];
  80351. }
  80352. },
  80353. accordion: {
  80354. type: Boolean,
  80355. default: false
  80356. },
  80357. width: {
  80358. type: String,
  80359. default: '240px'
  80360. }
  80361. },
  80362. data: function data() {
  80363. return {
  80364. currentActiveName: this.activeName,
  80365. openedNames: []
  80366. };
  80367. },
  80368. computed: {
  80369. classes: function classes() {
  80370. var theme = this.theme;
  80371. if (this.mode === 'vertical' && this.theme === 'primary') theme = 'light';
  80372. return ['' + prefixCls, prefixCls + '-' + String(theme), (0, _defineProperty3.default)({}, prefixCls + '-' + String(this.mode), this.mode)];
  80373. },
  80374. styles: function styles() {
  80375. var style = {};
  80376. if (this.mode === 'vertical') style.width = this.width;
  80377. return style;
  80378. }
  80379. },
  80380. methods: {
  80381. updateActiveName: function updateActiveName() {
  80382. if (this.currentActiveName === undefined) {
  80383. this.currentActiveName = -1;
  80384. }
  80385. this.broadcast('Submenu', 'on-update-active-name', false);
  80386. this.broadcast('MenuItem', 'on-update-active-name', this.currentActiveName);
  80387. },
  80388. updateOpenKeys: function updateOpenKeys(name) {
  80389. var _this = this;
  80390. var names = [].concat((0, _toConsumableArray3.default)(this.openedNames));
  80391. var index = names.indexOf(name);
  80392. if (this.accordion) (0, _assist.findComponentsDownward)(this, 'Submenu').forEach(function (item) {
  80393. (0, _newArrowCheck3.default)(this, _this);
  80394. item.opened = false;
  80395. }.bind(this));
  80396. if (index >= 0) {
  80397. var currentSubmenu = null;
  80398. (0, _assist.findComponentsDownward)(this, 'Submenu').forEach(function (item) {
  80399. (0, _newArrowCheck3.default)(this, _this);
  80400. if (item.name === name) {
  80401. currentSubmenu = item;
  80402. item.opened = false;
  80403. }
  80404. }.bind(this));
  80405. (0, _assist.findComponentsUpward)(currentSubmenu, 'Submenu').forEach(function (item) {
  80406. (0, _newArrowCheck3.default)(this, _this);
  80407. item.opened = true;
  80408. }.bind(this));
  80409. (0, _assist.findComponentsDownward)(currentSubmenu, 'Submenu').forEach(function (item) {
  80410. (0, _newArrowCheck3.default)(this, _this);
  80411. item.opened = false;
  80412. }.bind(this));
  80413. } else {
  80414. if (this.accordion) {
  80415. var _currentSubmenu = null;
  80416. (0, _assist.findComponentsDownward)(this, 'Submenu').forEach(function (item) {
  80417. (0, _newArrowCheck3.default)(this, _this);
  80418. if (item.name === name) {
  80419. _currentSubmenu = item;
  80420. item.opened = true;
  80421. }
  80422. }.bind(this));
  80423. (0, _assist.findComponentsUpward)(_currentSubmenu, 'Submenu').forEach(function (item) {
  80424. (0, _newArrowCheck3.default)(this, _this);
  80425. item.opened = true;
  80426. }.bind(this));
  80427. } else {
  80428. (0, _assist.findComponentsDownward)(this, 'Submenu').forEach(function (item) {
  80429. (0, _newArrowCheck3.default)(this, _this);
  80430. if (item.name === name) item.opened = true;
  80431. }.bind(this));
  80432. }
  80433. }
  80434. var openedNames = (0, _assist.findComponentsDownward)(this, 'Submenu').filter(function (item) {
  80435. (0, _newArrowCheck3.default)(this, _this);
  80436. return item.opened;
  80437. }.bind(this)).map(function (item) {
  80438. (0, _newArrowCheck3.default)(this, _this);
  80439. return item.name;
  80440. }.bind(this));
  80441. this.openedNames = [].concat((0, _toConsumableArray3.default)(openedNames));
  80442. this.$emit('on-open-change', openedNames);
  80443. },
  80444. updateOpened: function updateOpened() {
  80445. var _this2 = this;
  80446. var items = (0, _assist.findComponentsDownward)(this, 'Submenu');
  80447. if (items.length) {
  80448. items.forEach(function (item) {
  80449. (0, _newArrowCheck3.default)(this, _this2);
  80450. if (this.openedNames.indexOf(item.name) > -1) item.opened = true;else item.opened = false;
  80451. }.bind(this));
  80452. }
  80453. },
  80454. handleEmitSelectEvent: function handleEmitSelectEvent(name) {
  80455. this.$emit('on-select', name);
  80456. }
  80457. },
  80458. mounted: function mounted() {
  80459. var _this3 = this;
  80460. this.openedNames = [].concat((0, _toConsumableArray3.default)(this.openNames));
  80461. this.updateOpened();
  80462. this.$nextTick(function () {
  80463. (0, _newArrowCheck3.default)(this, _this3);
  80464. return this.updateActiveName();
  80465. }.bind(this));
  80466. this.$on('on-menu-item-select', function (name) {
  80467. (0, _newArrowCheck3.default)(this, _this3);
  80468. this.currentActiveName = name;
  80469. this.$emit('on-select', name);
  80470. }.bind(this));
  80471. },
  80472. watch: {
  80473. openNames: function openNames(names) {
  80474. this.openedNames = names;
  80475. },
  80476. activeName: function activeName(val) {
  80477. this.currentActiveName = val;
  80478. },
  80479. currentActiveName: function currentActiveName() {
  80480. this.updateActiveName();
  80481. }
  80482. }
  80483. };
  80484. /***/ }),
  80485. /* 209 */
  80486. /***/ (function(module, exports, __webpack_require__) {
  80487. "use strict";
  80488. Object.defineProperty(exports, "__esModule", {
  80489. value: true
  80490. });
  80491. var _mixin = __webpack_require__(92);
  80492. var _mixin2 = _interopRequireDefault(_mixin);
  80493. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80494. var prefixCls = 'ivu-menu';
  80495. exports.default = {
  80496. name: 'MenuGroup',
  80497. mixins: [_mixin2.default],
  80498. props: {
  80499. title: {
  80500. type: String,
  80501. default: ''
  80502. }
  80503. },
  80504. data: function data() {
  80505. return {
  80506. prefixCls: prefixCls
  80507. };
  80508. },
  80509. computed: {
  80510. groupStyle: function groupStyle() {
  80511. return this.hasParentSubmenu && this.mode !== 'horizontal' ? {
  80512. paddingLeft: 43 + (this.parentSubmenuNum - 1) * 28 + 'px'
  80513. } : {};
  80514. }
  80515. }
  80516. };
  80517. /***/ }),
  80518. /* 210 */
  80519. /***/ (function(module, exports, __webpack_require__) {
  80520. "use strict";
  80521. Object.defineProperty(exports, "__esModule", {
  80522. value: true
  80523. });
  80524. var _newArrowCheck2 = __webpack_require__(1);
  80525. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  80526. var _defineProperty2 = __webpack_require__(2);
  80527. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  80528. var _emitter = __webpack_require__(4);
  80529. var _emitter2 = _interopRequireDefault(_emitter);
  80530. var _assist = __webpack_require__(3);
  80531. var _mixin = __webpack_require__(92);
  80532. var _mixin2 = _interopRequireDefault(_mixin);
  80533. var _link = __webpack_require__(48);
  80534. var _link2 = _interopRequireDefault(_link);
  80535. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80536. var prefixCls = 'ivu-menu';
  80537. exports.default = {
  80538. name: 'MenuItem',
  80539. mixins: [_emitter2.default, _mixin2.default, _link2.default],
  80540. props: {
  80541. name: {
  80542. type: [String, Number],
  80543. required: true
  80544. },
  80545. disabled: {
  80546. type: Boolean,
  80547. default: false
  80548. }
  80549. },
  80550. data: function data() {
  80551. return {
  80552. active: false
  80553. };
  80554. },
  80555. computed: {
  80556. classes: function classes() {
  80557. var _ref;
  80558. return [prefixCls + '-item', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-item-active', this.active), (0, _defineProperty3.default)(_ref, prefixCls + '-item-selected', this.active), (0, _defineProperty3.default)(_ref, prefixCls + '-item-disabled', this.disabled), _ref)];
  80559. },
  80560. itemStyle: function itemStyle() {
  80561. return this.hasParentSubmenu && this.mode !== 'horizontal' ? {
  80562. paddingLeft: 43 + (this.parentSubmenuNum - 1) * 24 + 'px'
  80563. } : {};
  80564. }
  80565. },
  80566. methods: {
  80567. handleClickItem: function handleClickItem(event) {
  80568. var new_window = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  80569. if (this.disabled) return;
  80570. if (new_window || this.target === '_blank') {
  80571. this.handleCheckClick(event, new_window);
  80572. var parentMenu = (0, _assist.findComponentUpward)(this, 'Menu');
  80573. if (parentMenu) parentMenu.handleEmitSelectEvent(this.name);
  80574. } else {
  80575. var parent = (0, _assist.findComponentUpward)(this, 'Submenu');
  80576. if (parent) {
  80577. this.dispatch('Submenu', 'on-menu-item-select', this.name);
  80578. } else {
  80579. this.dispatch('Menu', 'on-menu-item-select', this.name);
  80580. }
  80581. this.handleCheckClick(event, new_window);
  80582. }
  80583. }
  80584. },
  80585. mounted: function mounted() {
  80586. var _this = this;
  80587. this.$on('on-update-active-name', function (name) {
  80588. (0, _newArrowCheck3.default)(this, _this);
  80589. if (this.name === name) {
  80590. this.active = true;
  80591. this.dispatch('Submenu', 'on-update-active-name', name);
  80592. } else {
  80593. this.active = false;
  80594. }
  80595. }.bind(this));
  80596. }
  80597. };
  80598. /***/ }),
  80599. /* 211 */
  80600. /***/ (function(module, exports, __webpack_require__) {
  80601. "use strict";
  80602. Object.defineProperty(exports, "__esModule", {
  80603. value: true
  80604. });
  80605. var _newArrowCheck2 = __webpack_require__(1);
  80606. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  80607. var _defineProperty2 = __webpack_require__(2);
  80608. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  80609. var _dropdown = __webpack_require__(36);
  80610. var _dropdown2 = _interopRequireDefault(_dropdown);
  80611. var _icon = __webpack_require__(8);
  80612. var _icon2 = _interopRequireDefault(_icon);
  80613. var _collapseTransition = __webpack_require__(83);
  80614. var _collapseTransition2 = _interopRequireDefault(_collapseTransition);
  80615. var _assist = __webpack_require__(3);
  80616. var _emitter = __webpack_require__(4);
  80617. var _emitter2 = _interopRequireDefault(_emitter);
  80618. var _mixin = __webpack_require__(92);
  80619. var _mixin2 = _interopRequireDefault(_mixin);
  80620. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80621. var prefixCls = 'ivu-menu';
  80622. exports.default = {
  80623. name: 'Submenu',
  80624. mixins: [_emitter2.default, _mixin2.default],
  80625. components: { Icon: _icon2.default, Drop: _dropdown2.default, CollapseTransition: _collapseTransition2.default },
  80626. props: {
  80627. name: {
  80628. type: [String, Number],
  80629. required: true
  80630. },
  80631. disabled: {
  80632. type: Boolean,
  80633. default: false
  80634. }
  80635. },
  80636. data: function data() {
  80637. return {
  80638. prefixCls: prefixCls,
  80639. active: false,
  80640. opened: false,
  80641. dropWidth: parseFloat((0, _assist.getStyle)(this.$el, 'width'))
  80642. };
  80643. },
  80644. computed: {
  80645. classes: function classes() {
  80646. var _ref;
  80647. return [prefixCls + '-submenu', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-item-active', this.active && !this.hasParentSubmenu), (0, _defineProperty3.default)(_ref, prefixCls + '-opened', this.opened), (0, _defineProperty3.default)(_ref, prefixCls + '-submenu-disabled', this.disabled), (0, _defineProperty3.default)(_ref, prefixCls + '-submenu-has-parent-submenu', this.hasParentSubmenu), (0, _defineProperty3.default)(_ref, prefixCls + '-child-item-active', this.active), _ref)];
  80648. },
  80649. accordion: function accordion() {
  80650. return this.menu.accordion;
  80651. },
  80652. dropStyle: function dropStyle() {
  80653. var style = {};
  80654. if (this.dropWidth) style.minWidth = String(this.dropWidth) + 'px';
  80655. return style;
  80656. },
  80657. titleStyle: function titleStyle() {
  80658. return this.hasParentSubmenu && this.mode !== 'horizontal' ? {
  80659. paddingLeft: 43 + (this.parentSubmenuNum - 1) * 24 + 'px'
  80660. } : {};
  80661. },
  80662. arrowType: function arrowType() {
  80663. var type = 'ios-arrow-down';
  80664. if (this.$IVIEW) {
  80665. if (this.$IVIEW.menu.customArrow) {
  80666. type = '';
  80667. } else if (this.$IVIEW.menu.arrow) {
  80668. type = this.$IVIEW.menu.arrow;
  80669. }
  80670. }
  80671. return type;
  80672. },
  80673. customArrowType: function customArrowType() {
  80674. var type = '';
  80675. if (this.$IVIEW) {
  80676. if (this.$IVIEW.menu.customArrow) {
  80677. type = this.$IVIEW.menu.customArrow;
  80678. }
  80679. }
  80680. return type;
  80681. },
  80682. arrowSize: function arrowSize() {
  80683. var size = '';
  80684. if (this.$IVIEW) {
  80685. if (this.$IVIEW.menu.arrowSize) {
  80686. size = this.$IVIEW.menu.arrowSize;
  80687. }
  80688. }
  80689. return size;
  80690. }
  80691. },
  80692. methods: {
  80693. handleMouseenter: function handleMouseenter() {
  80694. var _this = this;
  80695. if (this.disabled) return;
  80696. if (this.mode === 'vertical') return;
  80697. clearTimeout(this.timeout);
  80698. this.timeout = setTimeout(function () {
  80699. (0, _newArrowCheck3.default)(this, _this);
  80700. this.menu.updateOpenKeys(this.name);
  80701. this.opened = true;
  80702. }.bind(this), 250);
  80703. },
  80704. handleMouseleave: function handleMouseleave() {
  80705. var _this2 = this;
  80706. if (this.disabled) return;
  80707. if (this.mode === 'vertical') return;
  80708. clearTimeout(this.timeout);
  80709. this.timeout = setTimeout(function () {
  80710. (0, _newArrowCheck3.default)(this, _this2);
  80711. this.menu.updateOpenKeys(this.name);
  80712. this.opened = false;
  80713. }.bind(this), 150);
  80714. },
  80715. handleClick: function handleClick() {
  80716. var _this3 = this;
  80717. if (this.disabled) return;
  80718. if (this.mode === 'horizontal') return;
  80719. var opened = this.opened;
  80720. if (this.accordion) {
  80721. this.$parent.$children.forEach(function (item) {
  80722. (0, _newArrowCheck3.default)(this, _this3);
  80723. if (item.$options.name === 'Submenu') item.opened = false;
  80724. }.bind(this));
  80725. }
  80726. this.opened = !opened;
  80727. this.menu.updateOpenKeys(this.name);
  80728. }
  80729. },
  80730. watch: {
  80731. mode: function mode(val) {
  80732. if (val === 'horizontal') {
  80733. this.$refs.drop.update();
  80734. }
  80735. },
  80736. opened: function opened(val) {
  80737. if (this.mode === 'vertical') return;
  80738. if (val) {
  80739. this.dropWidth = parseFloat((0, _assist.getStyle)(this.$el, 'width'));
  80740. this.$refs.drop.update();
  80741. } else {
  80742. this.$refs.drop.destroy();
  80743. }
  80744. }
  80745. },
  80746. mounted: function mounted() {
  80747. var _this4 = this;
  80748. this.$on('on-menu-item-select', function (name) {
  80749. (0, _newArrowCheck3.default)(this, _this4);
  80750. if (this.mode === 'horizontal') this.opened = false;
  80751. this.dispatch('Menu', 'on-menu-item-select', name);
  80752. return true;
  80753. }.bind(this));
  80754. this.$on('on-update-active-name', function (status) {
  80755. (0, _newArrowCheck3.default)(this, _this4);
  80756. if ((0, _assist.findComponentUpward)(this, 'Submenu')) this.dispatch('Submenu', 'on-update-active-name', status);
  80757. if ((0, _assist.findComponentsDownward)(this, 'Submenu')) (0, _assist.findComponentsDownward)(this, 'Submenu').forEach(function (item) {
  80758. (0, _newArrowCheck3.default)(this, _this4);
  80759. item.active = false;
  80760. }.bind(this));
  80761. this.active = status;
  80762. }.bind(this));
  80763. }
  80764. };
  80765. /***/ }),
  80766. /* 212 */
  80767. /***/ (function(module, exports, __webpack_require__) {
  80768. "use strict";
  80769. Object.defineProperty(exports, "__esModule", {
  80770. value: true
  80771. });
  80772. var _newArrowCheck2 = __webpack_require__(1);
  80773. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  80774. var _notification = __webpack_require__(498);
  80775. var _notification2 = _interopRequireDefault(_notification);
  80776. var _vue = __webpack_require__(16);
  80777. var _vue2 = _interopRequireDefault(_vue);
  80778. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80779. _notification2.default.newInstance = function (properties) {
  80780. (0, _newArrowCheck3.default)(undefined, undefined);
  80781. var _props = properties || {};
  80782. var Instance = new _vue2.default({
  80783. render: function render(h) {
  80784. return h(_notification2.default, {
  80785. props: _props
  80786. });
  80787. }
  80788. });
  80789. var component = Instance.$mount();
  80790. document.body.appendChild(component.$el);
  80791. var notification = Instance.$children[0];
  80792. return {
  80793. notice: function notice(noticeProps) {
  80794. notification.add(noticeProps);
  80795. },
  80796. remove: function remove(name) {
  80797. notification.close(name);
  80798. },
  80799. component: notification,
  80800. destroy: function destroy(element) {
  80801. notification.closeAll();
  80802. setTimeout(function () {
  80803. document.body.removeChild(document.getElementsByClassName(element)[0]);
  80804. }, 500);
  80805. }
  80806. };
  80807. }.bind(undefined);
  80808. exports.default = _notification2.default;
  80809. /***/ }),
  80810. /* 213 */
  80811. /***/ (function(module, exports, __webpack_require__) {
  80812. "use strict";
  80813. Object.defineProperty(exports, "__esModule", {
  80814. value: true
  80815. });
  80816. var _assign = __webpack_require__(15);
  80817. var _assign2 = _interopRequireDefault(_assign);
  80818. var _defineProperty2 = __webpack_require__(2);
  80819. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  80820. var _notice2 = __webpack_require__(499);
  80821. var _notice3 = _interopRequireDefault(_notice2);
  80822. var _transferQueue = __webpack_require__(37);
  80823. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80824. var prefixCls = 'ivu-notification';
  80825. var seed = 0;
  80826. var now = Date.now();
  80827. function getUuid() {
  80828. return 'ivuNotification_' + now + '_' + seed++;
  80829. }
  80830. exports.default = {
  80831. components: { Notice: _notice3.default },
  80832. props: {
  80833. prefixCls: {
  80834. type: String,
  80835. default: prefixCls
  80836. },
  80837. styles: {
  80838. type: Object,
  80839. default: function _default() {
  80840. return {
  80841. top: '65px',
  80842. left: '50%'
  80843. };
  80844. }
  80845. },
  80846. content: {
  80847. type: String
  80848. },
  80849. className: {
  80850. type: String
  80851. }
  80852. },
  80853. data: function data() {
  80854. return {
  80855. notices: [],
  80856. tIndex: this.handleGetIndex()
  80857. };
  80858. },
  80859. computed: {
  80860. classes: function classes() {
  80861. return ['' + String(this.prefixCls), (0, _defineProperty3.default)({}, '' + String(this.className), !!this.className)];
  80862. },
  80863. wrapStyles: function wrapStyles() {
  80864. var styles = (0, _assign2.default)({}, this.styles);
  80865. styles['z-index'] = 1010 + this.tIndex;
  80866. return styles;
  80867. }
  80868. },
  80869. methods: {
  80870. add: function add(notice) {
  80871. var name = notice.name || getUuid();
  80872. var _notice = (0, _assign2.default)({
  80873. styles: {
  80874. right: '50%'
  80875. },
  80876. content: '',
  80877. duration: 1.5,
  80878. closable: false,
  80879. name: name
  80880. }, notice);
  80881. this.notices.push(_notice);
  80882. this.tIndex = this.handleGetIndex();
  80883. },
  80884. close: function close(name) {
  80885. var notices = this.notices;
  80886. for (var i = 0; i < notices.length; i++) {
  80887. if (notices[i].name === name) {
  80888. this.notices.splice(i, 1);
  80889. break;
  80890. }
  80891. }
  80892. },
  80893. closeAll: function closeAll() {
  80894. this.notices = [];
  80895. },
  80896. handleGetIndex: function handleGetIndex() {
  80897. (0, _transferQueue.transferIncrease)();
  80898. return _transferQueue.transferIndex;
  80899. }
  80900. }
  80901. };
  80902. /***/ }),
  80903. /* 214 */
  80904. /***/ (function(module, exports, __webpack_require__) {
  80905. "use strict";
  80906. Object.defineProperty(exports, "__esModule", {
  80907. value: true
  80908. });
  80909. var _newArrowCheck2 = __webpack_require__(1);
  80910. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  80911. var _defineProperty2 = __webpack_require__(2);
  80912. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  80913. var _render = __webpack_require__(215);
  80914. var _render2 = _interopRequireDefault(_render);
  80915. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  80916. exports.default = {
  80917. components: {
  80918. RenderCell: _render2.default
  80919. },
  80920. props: {
  80921. prefixCls: {
  80922. type: String,
  80923. default: ''
  80924. },
  80925. duration: {
  80926. type: Number,
  80927. default: 1.5
  80928. },
  80929. type: {
  80930. type: String
  80931. },
  80932. content: {
  80933. type: String,
  80934. default: ''
  80935. },
  80936. withIcon: Boolean,
  80937. render: {
  80938. type: Function
  80939. },
  80940. hasTitle: Boolean,
  80941. styles: {
  80942. type: Object,
  80943. default: function _default() {
  80944. return {
  80945. right: '50%'
  80946. };
  80947. }
  80948. },
  80949. closable: {
  80950. type: Boolean,
  80951. default: false
  80952. },
  80953. className: {
  80954. type: String
  80955. },
  80956. name: {
  80957. type: String,
  80958. required: true
  80959. },
  80960. onClose: {
  80961. type: Function
  80962. },
  80963. transitionName: {
  80964. type: String
  80965. },
  80966. background: {
  80967. type: Boolean,
  80968. default: false
  80969. },
  80970. msgType: {
  80971. type: String
  80972. }
  80973. },
  80974. data: function data() {
  80975. return {
  80976. withDesc: false
  80977. };
  80978. },
  80979. computed: {
  80980. baseClass: function baseClass() {
  80981. return String(this.prefixCls) + '-notice';
  80982. },
  80983. renderFunc: function renderFunc() {
  80984. return this.render || function () {};
  80985. },
  80986. classes: function classes() {
  80987. var _ref;
  80988. return [this.baseClass, (_ref = {}, (0, _defineProperty3.default)(_ref, '' + String(this.className), !!this.className), (0, _defineProperty3.default)(_ref, String(this.baseClass) + '-closable', this.closable), (0, _defineProperty3.default)(_ref, String(this.baseClass) + '-with-desc', this.withDesc), (0, _defineProperty3.default)(_ref, String(this.baseClass) + '-with-background', this.background), _ref)];
  80989. },
  80990. contentClasses: function contentClasses() {
  80991. return [String(this.baseClass) + '-content', this.render !== undefined ? String(this.baseClass) + '-content-with-render' : ''];
  80992. },
  80993. messageContentClasses: function messageContentClasses() {
  80994. var _ref2;
  80995. return [String(this.baseClass) + '-content', (_ref2 = {}, (0, _defineProperty3.default)(_ref2, String(this.baseClass) + '-content-' + String(this.msgType), this.msgType), (0, _defineProperty3.default)(_ref2, String(this.baseClass) + '-content-background', this.background), _ref2)];
  80996. },
  80997. contentWithIcon: function contentWithIcon() {
  80998. return [this.withIcon ? String(this.prefixCls) + '-content-with-icon' : '', !this.hasTitle && this.withIcon ? String(this.prefixCls) + '-content-with-render-notitle' : ''];
  80999. },
  81000. messageClasses: function messageClasses() {
  81001. return [String(this.baseClass) + '-content', this.render !== undefined ? String(this.baseClass) + '-content-with-render' : ''];
  81002. }
  81003. },
  81004. methods: {
  81005. clearCloseTimer: function clearCloseTimer() {
  81006. if (this.closeTimer) {
  81007. clearTimeout(this.closeTimer);
  81008. this.closeTimer = null;
  81009. }
  81010. },
  81011. close: function close() {
  81012. this.clearCloseTimer();
  81013. this.onClose();
  81014. this.$parent.close(this.name);
  81015. },
  81016. handleEnter: function handleEnter(el) {
  81017. if (this.type === 'message') {
  81018. el.style.height = el.scrollHeight + 'px';
  81019. }
  81020. },
  81021. handleLeave: function handleLeave(el) {
  81022. if (this.type === 'message') {
  81023. if (document.getElementsByClassName('ivu-message-notice').length !== 1) {
  81024. el.style.height = 0;
  81025. el.style.paddingTop = 0;
  81026. el.style.paddingBottom = 0;
  81027. }
  81028. }
  81029. }
  81030. },
  81031. mounted: function mounted() {
  81032. var _this = this;
  81033. this.clearCloseTimer();
  81034. if (this.duration !== 0) {
  81035. this.closeTimer = setTimeout(function () {
  81036. (0, _newArrowCheck3.default)(this, _this);
  81037. this.close();
  81038. }.bind(this), this.duration * 1000);
  81039. }
  81040. if (this.prefixCls === 'ivu-notice') {
  81041. var desc = this.$refs.content.querySelectorAll('.' + String(this.prefixCls) + '-desc')[0];
  81042. this.withDesc = this.render ? true : desc ? desc.innerHTML !== '' : false;
  81043. }
  81044. },
  81045. beforeDestroy: function beforeDestroy() {
  81046. this.clearCloseTimer();
  81047. }
  81048. };
  81049. /***/ }),
  81050. /* 215 */
  81051. /***/ (function(module, exports, __webpack_require__) {
  81052. "use strict";
  81053. Object.defineProperty(exports, "__esModule", {
  81054. value: true
  81055. });
  81056. var _newArrowCheck2 = __webpack_require__(1);
  81057. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  81058. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  81059. exports.default = {
  81060. name: 'RenderCell',
  81061. functional: true,
  81062. props: {
  81063. render: Function
  81064. },
  81065. render: function render(h, ctx) {
  81066. (0, _newArrowCheck3.default)(undefined, undefined);
  81067. return ctx.props.render(h);
  81068. }.bind(undefined)
  81069. };
  81070. /***/ }),
  81071. /* 216 */
  81072. /***/ (function(module, exports, __webpack_require__) {
  81073. "use strict";
  81074. Object.defineProperty(exports, "__esModule", {
  81075. value: true
  81076. });
  81077. var _newArrowCheck2 = __webpack_require__(1);
  81078. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  81079. var _assign = __webpack_require__(15);
  81080. var _assign2 = _interopRequireDefault(_assign);
  81081. var _defineProperty2 = __webpack_require__(2);
  81082. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  81083. var _icon = __webpack_require__(19);
  81084. var _icon2 = _interopRequireDefault(_icon);
  81085. var _button = __webpack_require__(28);
  81086. var _button2 = _interopRequireDefault(_button);
  81087. var _transferDom = __webpack_require__(23);
  81088. var _transferDom2 = _interopRequireDefault(_transferDom);
  81089. var _locale = __webpack_require__(6);
  81090. var _locale2 = _interopRequireDefault(_locale);
  81091. var _emitter = __webpack_require__(4);
  81092. var _emitter2 = _interopRequireDefault(_emitter);
  81093. var _mixinsScrollbar = __webpack_require__(87);
  81094. var _mixinsScrollbar2 = _interopRequireDefault(_mixinsScrollbar);
  81095. var _dom = __webpack_require__(12);
  81096. var _assist = __webpack_require__(3);
  81097. var _transferQueue = __webpack_require__(37);
  81098. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  81099. var prefixCls = 'ivu-modal';
  81100. var dragData = {
  81101. x: null,
  81102. y: null,
  81103. dragX: null,
  81104. dragY: null,
  81105. dragging: false,
  81106. rect: null
  81107. };
  81108. exports.default = {
  81109. name: 'Modal',
  81110. mixins: [_locale2.default, _emitter2.default, _mixinsScrollbar2.default],
  81111. components: { Icon: _icon2.default, iButton: _button2.default },
  81112. directives: { TransferDom: _transferDom2.default },
  81113. props: {
  81114. value: {
  81115. type: Boolean,
  81116. default: false
  81117. },
  81118. closable: {
  81119. type: Boolean,
  81120. default: true
  81121. },
  81122. maskClosable: {
  81123. type: Boolean,
  81124. default: function _default() {
  81125. return !this.$IVIEW || this.$IVIEW.modal.maskClosable === '' ? true : this.$IVIEW.modal.maskClosable;
  81126. }
  81127. },
  81128. title: {
  81129. type: String
  81130. },
  81131. width: {
  81132. type: [Number, String],
  81133. default: 520
  81134. },
  81135. okText: {
  81136. type: String
  81137. },
  81138. cancelText: {
  81139. type: String
  81140. },
  81141. loading: {
  81142. type: Boolean,
  81143. default: false
  81144. },
  81145. styles: {
  81146. type: Object,
  81147. default: function _default() {
  81148. return {};
  81149. }
  81150. },
  81151. className: {
  81152. type: String
  81153. },
  81154. footerHide: {
  81155. type: Boolean,
  81156. default: false
  81157. },
  81158. scrollable: {
  81159. type: Boolean,
  81160. default: false
  81161. },
  81162. transitionNames: {
  81163. type: Array,
  81164. default: function _default() {
  81165. return ['ease', 'fade'];
  81166. }
  81167. },
  81168. transfer: {
  81169. type: Boolean,
  81170. default: function _default() {
  81171. return !this.$IVIEW || this.$IVIEW.transfer === '' ? true : this.$IVIEW.transfer;
  81172. }
  81173. },
  81174. fullscreen: {
  81175. type: Boolean,
  81176. default: false
  81177. },
  81178. mask: {
  81179. type: Boolean,
  81180. default: true
  81181. },
  81182. draggable: {
  81183. type: Boolean,
  81184. default: false
  81185. },
  81186. sticky: {
  81187. type: Boolean,
  81188. default: false
  81189. },
  81190. stickyDistance: {
  81191. type: Number,
  81192. default: 10
  81193. },
  81194. resetDragPosition: {
  81195. type: Boolean,
  81196. default: false
  81197. },
  81198. zIndex: {
  81199. type: Number,
  81200. default: 1000
  81201. },
  81202. beforeClose: Function
  81203. },
  81204. data: function data() {
  81205. return {
  81206. prefixCls: prefixCls,
  81207. wrapShow: false,
  81208. showHead: true,
  81209. buttonLoading: false,
  81210. visible: this.value,
  81211. dragData: (0, _assist.deepCopy)(dragData),
  81212. modalIndex: this.handleGetModalIndex(),
  81213. isMouseTriggerIn: false };
  81214. },
  81215. computed: {
  81216. wrapClasses: function wrapClasses() {
  81217. var _ref;
  81218. return [prefixCls + '-wrap', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-hidden', !this.wrapShow), (0, _defineProperty3.default)(_ref, '' + String(this.className), !!this.className), (0, _defineProperty3.default)(_ref, prefixCls + '-no-mask', !this.showMask), _ref)];
  81219. },
  81220. wrapStyles: function wrapStyles() {
  81221. return {
  81222. zIndex: this.modalIndex + this.zIndex
  81223. };
  81224. },
  81225. maskClasses: function maskClasses() {
  81226. return prefixCls + '-mask';
  81227. },
  81228. classes: function classes() {
  81229. var _ref2;
  81230. return ['' + prefixCls, (_ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-fullscreen', this.fullscreen), (0, _defineProperty3.default)(_ref2, prefixCls + '-fullscreen-no-header', this.fullscreen && !this.showHead), (0, _defineProperty3.default)(_ref2, prefixCls + '-fullscreen-no-footer', this.fullscreen && this.footerHide), _ref2)];
  81231. },
  81232. contentClasses: function contentClasses() {
  81233. var _ref3;
  81234. return [prefixCls + '-content', (_ref3 = {}, (0, _defineProperty3.default)(_ref3, prefixCls + '-content-no-mask', !this.showMask), (0, _defineProperty3.default)(_ref3, prefixCls + '-content-drag', this.draggable && !this.fullscreen), (0, _defineProperty3.default)(_ref3, prefixCls + '-content-dragging', this.draggable && this.dragData.dragging), _ref3)];
  81235. },
  81236. mainStyles: function mainStyles() {
  81237. var style = {};
  81238. var width = parseInt(this.width);
  81239. var styleWidth = this.dragData.x !== null ? {
  81240. top: 0
  81241. } : {
  81242. width: width <= 100 ? String(width) + '%' : String(width) + 'px'
  81243. };
  81244. var customStyle = this.styles ? this.styles : {};
  81245. (0, _assign2.default)(style, styleWidth, customStyle);
  81246. return style;
  81247. },
  81248. contentStyles: function contentStyles() {
  81249. var style = {};
  81250. if (this.draggable && !this.fullscreen) {
  81251. var customTop = this.styles.top ? parseFloat(this.styles.top) : 0;
  81252. var customLeft = this.styles.left ? parseFloat(this.styles.left) : 0;
  81253. if (this.dragData.x !== null) style.left = this.dragData.x - customLeft + 'px';
  81254. if (this.dragData.y !== null) style.top = String(this.dragData.y) + 'px';
  81255. if (this.dragData.y !== null) style.top = this.dragData.y - customTop + 'px';
  81256. var width = parseInt(this.width);
  81257. var styleWidth = {
  81258. width: width <= 100 ? String(width) + '%' : String(width) + 'px'
  81259. };
  81260. (0, _assign2.default)(style, styleWidth);
  81261. }
  81262. return style;
  81263. },
  81264. localeOkText: function localeOkText() {
  81265. if (this.okText === undefined) {
  81266. return this.t('i.modal.okText');
  81267. } else {
  81268. return this.okText;
  81269. }
  81270. },
  81271. localeCancelText: function localeCancelText() {
  81272. if (this.cancelText === undefined) {
  81273. return this.t('i.modal.cancelText');
  81274. } else {
  81275. return this.cancelText;
  81276. }
  81277. },
  81278. showMask: function showMask() {
  81279. return this.mask;
  81280. }
  81281. },
  81282. methods: {
  81283. close: function close() {
  81284. var _this = this;
  81285. if (!this.beforeClose) {
  81286. return this.handleClose();
  81287. }
  81288. var before = this.beforeClose();
  81289. if (before && before.then) {
  81290. before.then(function () {
  81291. (0, _newArrowCheck3.default)(this, _this);
  81292. this.handleClose();
  81293. }.bind(this));
  81294. } else {
  81295. this.handleClose();
  81296. }
  81297. },
  81298. handleClose: function handleClose() {
  81299. this.visible = false;
  81300. this.$emit('input', false);
  81301. this.$emit('on-cancel');
  81302. },
  81303. handleMask: function handleMask() {
  81304. if (this.maskClosable && this.showMask) {
  81305. this.close();
  81306. }
  81307. },
  81308. handleWrapClick: function handleWrapClick(event) {
  81309. if (this.isMouseTriggerIn) {
  81310. this.isMouseTriggerIn = false;
  81311. return;
  81312. }
  81313. var className = event.target.getAttribute('class');
  81314. if (className && className.indexOf(prefixCls + '-wrap') > -1) this.handleMask();
  81315. },
  81316. handleMousedown: function handleMousedown() {
  81317. this.isMouseTriggerIn = true;
  81318. },
  81319. cancel: function cancel() {
  81320. this.close();
  81321. },
  81322. ok: function ok() {
  81323. if (this.loading) {
  81324. this.buttonLoading = true;
  81325. } else {
  81326. this.visible = false;
  81327. this.$emit('input', false);
  81328. }
  81329. this.$emit('on-ok');
  81330. },
  81331. EscClose: function EscClose(e) {
  81332. var _this2 = this;
  81333. if (this.visible && this.closable) {
  81334. if (e.keyCode === 27) {
  81335. var $Modals = (0, _assist.findComponentsDownward)(this.$root, 'Modal').filter(function (item) {
  81336. (0, _newArrowCheck3.default)(this, _this2);
  81337. return item.$data.visible && item.$props.closable;
  81338. }.bind(this));
  81339. var $TopModal = $Modals.sort(function (a, b) {
  81340. (0, _newArrowCheck3.default)(this, _this2);
  81341. return a.$data.modalIndex < b.$data.modalIndex ? 1 : -1;
  81342. }.bind(this))[0];
  81343. setTimeout(function () {
  81344. (0, _newArrowCheck3.default)(this, _this2);
  81345. $TopModal.close();
  81346. }.bind(this), 0);
  81347. }
  81348. }
  81349. },
  81350. animationFinish: function animationFinish() {
  81351. this.$emit('on-hidden');
  81352. },
  81353. handleMoveStart: function handleMoveStart(event) {
  81354. if (!this.draggable || this.fullscreen) return false;
  81355. var $content = this.$refs.content;
  81356. var rect = $content.getBoundingClientRect();
  81357. this.dragData.rect = rect;
  81358. this.dragData.x = rect.x || rect.left;
  81359. this.dragData.y = rect.y || rect.top;
  81360. var distance = {
  81361. x: event.clientX,
  81362. y: event.clientY
  81363. };
  81364. this.dragData.dragX = distance.x;
  81365. this.dragData.dragY = distance.y;
  81366. this.dragData.dragging = true;
  81367. (0, _dom.on)(window, 'mousemove', this.handleMoveMove);
  81368. (0, _dom.on)(window, 'mouseup', this.handleMoveEnd);
  81369. },
  81370. handleMoveMove: function handleMoveMove(event) {
  81371. if (!this.dragData.dragging || this.fullscreen) return false;
  81372. var distance = {
  81373. x: event.clientX,
  81374. y: event.clientY
  81375. };
  81376. var diff_distance = {
  81377. x: distance.x - this.dragData.dragX,
  81378. y: distance.y - this.dragData.dragY
  81379. };
  81380. if (this.sticky) {
  81381. var clientWidth = document.documentElement.clientWidth;
  81382. var clientHeight = document.documentElement.clientHeight;
  81383. if (this.dragData.x + diff_distance.x <= this.stickyDistance && diff_distance.x < 0) {
  81384. this.dragData.x = 0;
  81385. } else if (this.dragData.x + this.dragData.rect.width - clientWidth > -this.stickyDistance && diff_distance.x > 0) {
  81386. this.dragData.x = clientWidth - this.dragData.rect.width;
  81387. } else {
  81388. this.dragData.x += diff_distance.x;
  81389. }
  81390. if (this.dragData.y + diff_distance.y <= this.stickyDistance && diff_distance.y < 0) {
  81391. this.dragData.y = 0;
  81392. } else if (this.dragData.y + this.dragData.rect.height - clientHeight > -this.stickyDistance && diff_distance.y > 0) {
  81393. this.dragData.y = clientHeight - this.dragData.rect.height;
  81394. } else {
  81395. this.dragData.y += diff_distance.y;
  81396. }
  81397. } else {
  81398. this.dragData.x += diff_distance.x;
  81399. this.dragData.y += diff_distance.y;
  81400. }
  81401. this.dragData.dragX = distance.x;
  81402. this.dragData.dragY = distance.y;
  81403. },
  81404. handleMoveEnd: function handleMoveEnd() {
  81405. this.dragData.dragging = false;
  81406. (0, _dom.off)(window, 'mousemove', this.handleMoveMove);
  81407. (0, _dom.off)(window, 'mouseup', this.handleMoveEnd);
  81408. },
  81409. handleGetModalIndex: function handleGetModalIndex() {
  81410. (0, _transferQueue.transferIncrease)();
  81411. return _transferQueue.transferIndex;
  81412. },
  81413. handleClickModal: function handleClickModal() {
  81414. if (this.draggable) {
  81415. if (_transferQueue.lastVisibleIndex !== this.lastVisibleIndex) {
  81416. this.lastVisibleIndex = _transferQueue.lastVisibleIndex;
  81417. return;
  81418. }
  81419. this.modalIndex = this.handleGetModalIndex();
  81420. }
  81421. }
  81422. },
  81423. mounted: function mounted() {
  81424. if (this.visible) {
  81425. this.wrapShow = true;
  81426. }
  81427. var showHead = true;
  81428. if (this.$slots.header === undefined && !this.title) {
  81429. showHead = false;
  81430. }
  81431. this.showHead = showHead;
  81432. document.addEventListener('keydown', this.EscClose);
  81433. },
  81434. beforeDestroy: function beforeDestroy() {
  81435. document.removeEventListener('keydown', this.EscClose);
  81436. this.removeScrollEffect();
  81437. },
  81438. watch: {
  81439. value: function value(val) {
  81440. this.visible = val;
  81441. },
  81442. visible: function visible(val) {
  81443. var _this3 = this;
  81444. if (val === false) {
  81445. this.buttonLoading = false;
  81446. this.timer = setTimeout(function () {
  81447. (0, _newArrowCheck3.default)(this, _this3);
  81448. this.wrapShow = false;
  81449. this.removeScrollEffect();
  81450. }.bind(this), 300);
  81451. } else {
  81452. if (this.lastVisible !== val) {
  81453. this.modalIndex = this.handleGetModalIndex();
  81454. (0, _transferQueue.lastVisibleIncrease)();
  81455. }
  81456. if (this.timer) clearTimeout(this.timer);
  81457. this.wrapShow = true;
  81458. if (!this.scrollable) {
  81459. this.addScrollEffect();
  81460. }
  81461. }
  81462. this.broadcast('Table', 'on-visible-change', val);
  81463. this.broadcast('Slider', 'on-visible-change', val);
  81464. this.$emit('on-visible-change', val);
  81465. this.lastVisible = val;
  81466. this.lastVisibleIndex = _transferQueue.lastVisibleIndex;
  81467. if (val && this.resetDragPosition) {
  81468. this.dragData = (0, _assist.deepCopy)(dragData);
  81469. }
  81470. },
  81471. loading: function loading(val) {
  81472. if (!val) {
  81473. this.buttonLoading = false;
  81474. }
  81475. },
  81476. scrollable: function scrollable(val) {
  81477. if (!val) {
  81478. this.addScrollEffect();
  81479. } else {
  81480. this.removeScrollEffect();
  81481. }
  81482. },
  81483. title: function title(val) {
  81484. if (this.$slots.header === undefined) {
  81485. this.showHead = !!val;
  81486. }
  81487. }
  81488. }
  81489. };
  81490. /***/ }),
  81491. /* 217 */
  81492. /***/ (function(module, exports, __webpack_require__) {
  81493. "use strict";
  81494. Object.defineProperty(exports, "__esModule", {
  81495. value: true
  81496. });
  81497. var _defineProperty2 = __webpack_require__(2);
  81498. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  81499. var _assist = __webpack_require__(3);
  81500. var _options = __webpack_require__(509);
  81501. var _options2 = _interopRequireDefault(_options);
  81502. var _locale = __webpack_require__(6);
  81503. var _locale2 = _interopRequireDefault(_locale);
  81504. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  81505. var prefixCls = 'ivu-page';
  81506. exports.default = {
  81507. name: 'Page',
  81508. mixins: [_locale2.default],
  81509. components: { Options: _options2.default },
  81510. props: {
  81511. current: {
  81512. type: Number,
  81513. default: 1
  81514. },
  81515. total: {
  81516. type: Number,
  81517. default: 0
  81518. },
  81519. pageSize: {
  81520. type: Number,
  81521. default: 10
  81522. },
  81523. pageSizeOpts: {
  81524. type: Array,
  81525. default: function _default() {
  81526. return [10, 20, 30, 40];
  81527. }
  81528. },
  81529. placement: {
  81530. validator: function validator(value) {
  81531. return (0, _assist.oneOf)(value, ['top', 'bottom']);
  81532. },
  81533. default: 'bottom'
  81534. },
  81535. transfer: {
  81536. type: Boolean,
  81537. default: function _default() {
  81538. return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
  81539. }
  81540. },
  81541. size: {
  81542. validator: function validator(value) {
  81543. return (0, _assist.oneOf)(value, ['small', 'default']);
  81544. }
  81545. },
  81546. simple: {
  81547. type: Boolean,
  81548. default: false
  81549. },
  81550. showTotal: {
  81551. type: Boolean,
  81552. default: false
  81553. },
  81554. showElevator: {
  81555. type: Boolean,
  81556. default: false
  81557. },
  81558. showSizer: {
  81559. type: Boolean,
  81560. default: false
  81561. },
  81562. className: {
  81563. type: String
  81564. },
  81565. styles: {
  81566. type: Object
  81567. },
  81568. prevText: {
  81569. type: String,
  81570. default: ''
  81571. },
  81572. nextText: {
  81573. type: String,
  81574. default: ''
  81575. },
  81576. disabled: {
  81577. type: Boolean,
  81578. default: false
  81579. },
  81580. eventsEnabled: {
  81581. type: Boolean,
  81582. default: false
  81583. }
  81584. },
  81585. data: function data() {
  81586. return {
  81587. prefixCls: prefixCls,
  81588. currentPage: this.current,
  81589. currentPageSize: this.pageSize
  81590. };
  81591. },
  81592. watch: {
  81593. total: function total(val) {
  81594. var maxPage = Math.ceil(val / this.currentPageSize);
  81595. if (maxPage < this.currentPage) {
  81596. this.currentPage = maxPage === 0 ? 1 : maxPage;
  81597. }
  81598. },
  81599. current: function current(val) {
  81600. this.currentPage = val;
  81601. },
  81602. pageSize: function pageSize(val) {
  81603. this.currentPageSize = val;
  81604. }
  81605. },
  81606. computed: {
  81607. isSmall: function isSmall() {
  81608. return this.size === 'small';
  81609. },
  81610. allPages: function allPages() {
  81611. var allPage = Math.ceil(this.total / this.currentPageSize);
  81612. return allPage === 0 ? 1 : allPage;
  81613. },
  81614. simpleWrapClasses: function simpleWrapClasses() {
  81615. return ['' + prefixCls, prefixCls + '-simple', (0, _defineProperty3.default)({}, '' + String(this.className), !!this.className)];
  81616. },
  81617. simplePagerClasses: function simplePagerClasses() {
  81618. return prefixCls + '-simple-pager';
  81619. },
  81620. wrapClasses: function wrapClasses() {
  81621. var _ref2;
  81622. return ['' + prefixCls, (_ref2 = {}, (0, _defineProperty3.default)(_ref2, '' + String(this.className), !!this.className), (0, _defineProperty3.default)(_ref2, prefixCls + '-with-disabled', this.disabled), (0, _defineProperty3.default)(_ref2, 'mini', this.size === 'small'), _ref2)];
  81623. },
  81624. prevClasses: function prevClasses() {
  81625. var _ref3;
  81626. return [prefixCls + '-prev', (_ref3 = {}, (0, _defineProperty3.default)(_ref3, prefixCls + '-disabled', this.currentPage === 1 || this.disabled), (0, _defineProperty3.default)(_ref3, prefixCls + '-custom-text', this.prevText !== ''), _ref3)];
  81627. },
  81628. nextClasses: function nextClasses() {
  81629. var _ref4;
  81630. return [prefixCls + '-next', (_ref4 = {}, (0, _defineProperty3.default)(_ref4, prefixCls + '-disabled', this.currentPage === this.allPages || this.disabled), (0, _defineProperty3.default)(_ref4, prefixCls + '-custom-text', this.nextText !== ''), _ref4)];
  81631. },
  81632. firstPageClasses: function firstPageClasses() {
  81633. return [prefixCls + '-item', (0, _defineProperty3.default)({}, prefixCls + '-item-active', this.currentPage === 1)];
  81634. },
  81635. lastPageClasses: function lastPageClasses() {
  81636. return [prefixCls + '-item', (0, _defineProperty3.default)({}, prefixCls + '-item-active', this.currentPage === this.allPages)];
  81637. }
  81638. },
  81639. methods: {
  81640. changePage: function changePage(page) {
  81641. if (this.disabled) return;
  81642. if (this.currentPage != page) {
  81643. this.currentPage = page;
  81644. this.$emit('update:current', page);
  81645. this.$emit('on-change', page);
  81646. }
  81647. },
  81648. prev: function prev() {
  81649. if (this.disabled) return;
  81650. var current = this.currentPage;
  81651. if (current <= 1) {
  81652. return false;
  81653. }
  81654. this.changePage(current - 1);
  81655. this.$emit('on-prev', current - 1);
  81656. },
  81657. next: function next() {
  81658. if (this.disabled) return;
  81659. var current = this.currentPage;
  81660. if (current >= this.allPages) {
  81661. return false;
  81662. }
  81663. this.changePage(current + 1);
  81664. this.$emit('on-next', current + 1);
  81665. },
  81666. fastPrev: function fastPrev() {
  81667. if (this.disabled) return;
  81668. var page = this.currentPage - 5;
  81669. if (page > 0) {
  81670. this.changePage(page);
  81671. } else {
  81672. this.changePage(1);
  81673. }
  81674. },
  81675. fastNext: function fastNext() {
  81676. if (this.disabled) return;
  81677. var page = this.currentPage + 5;
  81678. if (page > this.allPages) {
  81679. this.changePage(this.allPages);
  81680. } else {
  81681. this.changePage(page);
  81682. }
  81683. },
  81684. onSize: function onSize(pageSize) {
  81685. if (this.disabled) return;
  81686. this.currentPageSize = pageSize;
  81687. this.$emit('on-page-size-change', pageSize);
  81688. this.changePage(1);
  81689. },
  81690. onPage: function onPage(page) {
  81691. if (this.disabled) return;
  81692. this.changePage(page);
  81693. },
  81694. keyDown: function keyDown(e) {
  81695. var key = e.keyCode;
  81696. var condition = key >= 48 && key <= 57 || key >= 96 && key <= 105 || key === 8 || key === 37 || key === 39;
  81697. if (!condition) {
  81698. e.preventDefault();
  81699. }
  81700. },
  81701. keyUp: function keyUp(e) {
  81702. var key = e.keyCode;
  81703. var val = parseInt(e.target.value);
  81704. if (key === 38) {
  81705. this.prev();
  81706. } else if (key === 40) {
  81707. this.next();
  81708. } else if (key === 13) {
  81709. var page = 1;
  81710. if (val > this.allPages) {
  81711. page = this.allPages;
  81712. } else if (val <= 0 || !val) {
  81713. page = 1;
  81714. } else {
  81715. page = val;
  81716. }
  81717. e.target.value = page;
  81718. this.changePage(page);
  81719. }
  81720. }
  81721. }
  81722. };
  81723. /***/ }),
  81724. /* 218 */
  81725. /***/ (function(module, exports, __webpack_require__) {
  81726. "use strict";
  81727. Object.defineProperty(exports, "__esModule", {
  81728. value: true
  81729. });
  81730. var _select = __webpack_require__(74);
  81731. var _select2 = _interopRequireDefault(_select);
  81732. var _option = __webpack_require__(81);
  81733. var _option2 = _interopRequireDefault(_option);
  81734. var _locale = __webpack_require__(6);
  81735. var _locale2 = _interopRequireDefault(_locale);
  81736. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  81737. var prefixCls = 'ivu-page';
  81738. function isValueNumber(value) {
  81739. return (/^[1-9][0-9]*$/.test(value + '')
  81740. );
  81741. }
  81742. exports.default = {
  81743. name: 'PageOption',
  81744. mixins: [_locale2.default],
  81745. components: { iSelect: _select2.default, iOption: _option2.default },
  81746. props: {
  81747. pageSizeOpts: Array,
  81748. showSizer: Boolean,
  81749. showElevator: Boolean,
  81750. current: Number,
  81751. _current: Number,
  81752. pageSize: Number,
  81753. allPages: Number,
  81754. isSmall: Boolean,
  81755. placement: String,
  81756. transfer: Boolean,
  81757. disabled: Boolean,
  81758. eventsEnabled: Boolean
  81759. },
  81760. data: function data() {
  81761. return {
  81762. currentPageSize: this.pageSize
  81763. };
  81764. },
  81765. watch: {
  81766. pageSize: function pageSize(val) {
  81767. this.currentPageSize = val;
  81768. }
  81769. },
  81770. computed: {
  81771. size: function size() {
  81772. return this.isSmall ? 'small' : 'default';
  81773. },
  81774. optsClasses: function optsClasses() {
  81775. return [prefixCls + '-options'];
  81776. },
  81777. sizerClasses: function sizerClasses() {
  81778. return [prefixCls + '-options-sizer'];
  81779. },
  81780. ElevatorClasses: function ElevatorClasses() {
  81781. return [prefixCls + '-options-elevator'];
  81782. }
  81783. },
  81784. methods: {
  81785. changeSize: function changeSize() {
  81786. this.$emit('on-size', this.currentPageSize);
  81787. },
  81788. changePage: function changePage(event) {
  81789. var val = event.target.value.trim();
  81790. var page = 0;
  81791. if (isValueNumber(val)) {
  81792. val = Number(val);
  81793. if (val != this.current) {
  81794. var allPages = this.allPages;
  81795. if (val > allPages) {
  81796. page = allPages;
  81797. } else {
  81798. page = val;
  81799. }
  81800. }
  81801. } else {
  81802. page = 1;
  81803. }
  81804. if (page) {
  81805. this.$emit('on-page', page);
  81806. event.target.value = page;
  81807. }
  81808. }
  81809. }
  81810. };
  81811. /***/ }),
  81812. /* 219 */
  81813. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  81814. "use strict";
  81815. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  81816. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_poptip_vue__ = __webpack_require__(220);
  81817. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_poptip_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_poptip_vue__);
  81818. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_poptip_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_poptip_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  81819. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4f9e410e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_poptip_vue__ = __webpack_require__(513);
  81820. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4f9e410e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_poptip_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4f9e410e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_poptip_vue__);
  81821. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  81822. /* script */
  81823. /* template */
  81824. /* template functional */
  81825. var __vue_template_functional__ = false
  81826. /* styles */
  81827. var __vue_styles__ = null
  81828. /* scopeId */
  81829. var __vue_scopeId__ = null
  81830. /* moduleIdentifier (server only) */
  81831. var __vue_module_identifier__ = null
  81832. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  81833. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_poptip_vue___default.a,
  81834. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4f9e410e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_poptip_vue__["render"],
  81835. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4f9e410e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_poptip_vue__["staticRenderFns"],
  81836. __vue_template_functional__,
  81837. __vue_styles__,
  81838. __vue_scopeId__,
  81839. __vue_module_identifier__
  81840. )
  81841. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  81842. /***/ }),
  81843. /* 220 */
  81844. /***/ (function(module, exports, __webpack_require__) {
  81845. "use strict";
  81846. Object.defineProperty(exports, "__esModule", {
  81847. value: true
  81848. });
  81849. var _newArrowCheck2 = __webpack_require__(1);
  81850. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  81851. var _defineProperty2 = __webpack_require__(2);
  81852. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  81853. var _popper = __webpack_require__(221);
  81854. var _popper2 = _interopRequireDefault(_popper);
  81855. var _button = __webpack_require__(28);
  81856. var _button2 = _interopRequireDefault(_button);
  81857. var _clickoutside = __webpack_require__(82);
  81858. var _clickoutside2 = _interopRequireDefault(_clickoutside);
  81859. var _transferDom = __webpack_require__(23);
  81860. var _transferDom2 = _interopRequireDefault(_transferDom);
  81861. var _assist = __webpack_require__(3);
  81862. var _transferQueue = __webpack_require__(37);
  81863. var _locale = __webpack_require__(6);
  81864. var _locale2 = _interopRequireDefault(_locale);
  81865. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  81866. var prefixCls = 'ivu-poptip';
  81867. exports.default = {
  81868. name: 'Poptip',
  81869. mixins: [_popper2.default, _locale2.default],
  81870. directives: { clickOutside: _clickoutside2.default, TransferDom: _transferDom2.default },
  81871. components: { iButton: _button2.default },
  81872. props: {
  81873. trigger: {
  81874. validator: function validator(value) {
  81875. return (0, _assist.oneOf)(value, ['click', 'focus', 'hover']);
  81876. },
  81877. default: 'click'
  81878. },
  81879. placement: {
  81880. validator: function validator(value) {
  81881. return (0, _assist.oneOf)(value, ['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'right', 'right-start', 'right-end']);
  81882. },
  81883. default: 'top'
  81884. },
  81885. title: {
  81886. type: [String, Number]
  81887. },
  81888. content: {
  81889. type: [String, Number],
  81890. default: ''
  81891. },
  81892. width: {
  81893. type: [String, Number]
  81894. },
  81895. confirm: {
  81896. type: Boolean,
  81897. default: false
  81898. },
  81899. okText: {
  81900. type: String
  81901. },
  81902. cancelText: {
  81903. type: String
  81904. },
  81905. transfer: {
  81906. type: Boolean,
  81907. default: function _default() {
  81908. return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
  81909. }
  81910. },
  81911. popperClass: {
  81912. type: String
  81913. },
  81914. wordWrap: {
  81915. type: Boolean,
  81916. default: false
  81917. },
  81918. padding: {
  81919. type: String
  81920. },
  81921. disabled: {
  81922. type: Boolean,
  81923. default: false
  81924. },
  81925. capture: {
  81926. type: Boolean,
  81927. default: function _default() {
  81928. return !this.$IVIEW ? false : this.$IVIEW.capture;
  81929. }
  81930. },
  81931. transferClassName: {
  81932. type: String
  81933. }
  81934. },
  81935. data: function data() {
  81936. return {
  81937. prefixCls: prefixCls,
  81938. showTitle: true,
  81939. isInput: false,
  81940. disableCloseUnderTransfer: false,
  81941. tIndex: this.handleGetIndex()
  81942. };
  81943. },
  81944. computed: {
  81945. classes: function classes() {
  81946. return ['' + prefixCls, (0, _defineProperty3.default)({}, prefixCls + '-confirm', this.confirm)];
  81947. },
  81948. popperClasses: function popperClasses() {
  81949. var _ref2;
  81950. return [prefixCls + '-popper', (_ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-confirm', this.transfer && this.confirm), (0, _defineProperty3.default)(_ref2, '' + String(this.popperClass), !!this.popperClass), (0, _defineProperty3.default)(_ref2, prefixCls + '-transfer', this.transfer), (0, _defineProperty3.default)(_ref2, this.transferClassName, this.transferClassName), _ref2)];
  81951. },
  81952. styles: function styles() {
  81953. var style = {};
  81954. if (this.width) {
  81955. style.width = String(this.width) + 'px';
  81956. }
  81957. if (this.transfer) style['z-index'] = 1060 + this.tIndex;
  81958. return style;
  81959. },
  81960. localeOkText: function localeOkText() {
  81961. if (this.okText === undefined) {
  81962. return this.t('i.poptip.okText');
  81963. } else {
  81964. return this.okText;
  81965. }
  81966. },
  81967. localeCancelText: function localeCancelText() {
  81968. if (this.cancelText === undefined) {
  81969. return this.t('i.poptip.cancelText');
  81970. } else {
  81971. return this.cancelText;
  81972. }
  81973. },
  81974. contentClasses: function contentClasses() {
  81975. return [prefixCls + '-body-content', (0, _defineProperty3.default)({}, prefixCls + '-body-content-word-wrap', this.wordWrap)];
  81976. },
  81977. contentPaddingStyle: function contentPaddingStyle() {
  81978. var styles = {};
  81979. if (this.padding !== '') styles['padding'] = this.padding;
  81980. return styles;
  81981. }
  81982. },
  81983. methods: {
  81984. handleClick: function handleClick() {
  81985. if (this.disabled) return;
  81986. if (this.confirm) {
  81987. this.visible = !this.visible;
  81988. return true;
  81989. }
  81990. if (this.trigger !== 'click') {
  81991. return false;
  81992. }
  81993. this.visible = !this.visible;
  81994. },
  81995. handleTransferClick: function handleTransferClick() {
  81996. if (this.transfer) this.disableCloseUnderTransfer = true;
  81997. },
  81998. handleClose: function handleClose() {
  81999. if (this.disableCloseUnderTransfer) {
  82000. this.disableCloseUnderTransfer = false;
  82001. return false;
  82002. }
  82003. if (this.confirm) {
  82004. this.visible = false;
  82005. return true;
  82006. }
  82007. if (this.trigger !== 'click') {
  82008. return false;
  82009. }
  82010. this.visible = false;
  82011. },
  82012. handleFocus: function handleFocus() {
  82013. var fromInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  82014. if (this.disabled) return;
  82015. if (this.trigger !== 'focus' || this.confirm || this.isInput && !fromInput) {
  82016. return false;
  82017. }
  82018. this.visible = true;
  82019. },
  82020. handleBlur: function handleBlur() {
  82021. var fromInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  82022. if (this.trigger !== 'focus' || this.confirm || this.isInput && !fromInput) {
  82023. return false;
  82024. }
  82025. this.visible = false;
  82026. },
  82027. handleMouseenter: function handleMouseenter() {
  82028. var _this = this;
  82029. if (this.disabled) return;
  82030. if (this.trigger !== 'hover' || this.confirm) {
  82031. return false;
  82032. }
  82033. if (this.enterTimer) clearTimeout(this.enterTimer);
  82034. this.enterTimer = setTimeout(function () {
  82035. (0, _newArrowCheck3.default)(this, _this);
  82036. this.visible = true;
  82037. }.bind(this), 100);
  82038. },
  82039. handleMouseleave: function handleMouseleave() {
  82040. var _this2 = this;
  82041. if (this.trigger !== 'hover' || this.confirm) {
  82042. return false;
  82043. }
  82044. if (this.enterTimer) {
  82045. clearTimeout(this.enterTimer);
  82046. this.enterTimer = setTimeout(function () {
  82047. (0, _newArrowCheck3.default)(this, _this2);
  82048. this.visible = false;
  82049. }.bind(this), 100);
  82050. }
  82051. },
  82052. cancel: function cancel() {
  82053. this.visible = false;
  82054. this.$emit('on-cancel');
  82055. },
  82056. ok: function ok() {
  82057. this.visible = false;
  82058. this.$emit('on-ok');
  82059. },
  82060. getInputChildren: function getInputChildren() {
  82061. var $input = this.$refs.reference.querySelectorAll('input');
  82062. var $textarea = this.$refs.reference.querySelectorAll('textarea');
  82063. var $children = null;
  82064. if ($input.length) {
  82065. $children = $input[0];
  82066. } else if ($textarea.length) {
  82067. $children = $textarea[0];
  82068. }
  82069. return $children;
  82070. },
  82071. handleGetIndex: function handleGetIndex() {
  82072. (0, _transferQueue.transferIncrease)();
  82073. return _transferQueue.transferIndex;
  82074. },
  82075. handleIndexIncrease: function handleIndexIncrease() {
  82076. this.tIndex = this.handleGetIndex();
  82077. }
  82078. },
  82079. mounted: function mounted() {
  82080. var _this3 = this;
  82081. if (!this.confirm) {
  82082. this.showTitle = this.$slots.title !== undefined || this.title;
  82083. }
  82084. if (this.trigger === 'focus') {
  82085. this.$nextTick(function () {
  82086. (0, _newArrowCheck3.default)(this, _this3);
  82087. var $children = this.getInputChildren();
  82088. if ($children) {
  82089. this.isInput = true;
  82090. $children.addEventListener('focus', this.handleFocus, false);
  82091. $children.addEventListener('blur', this.handleBlur, false);
  82092. }
  82093. }.bind(this));
  82094. }
  82095. },
  82096. beforeDestroy: function beforeDestroy() {
  82097. var $children = this.getInputChildren();
  82098. if ($children) {
  82099. $children.removeEventListener('focus', this.handleFocus, false);
  82100. $children.removeEventListener('blur', this.handleBlur, false);
  82101. }
  82102. }
  82103. };
  82104. /***/ }),
  82105. /* 221 */
  82106. /***/ (function(module, exports, __webpack_require__) {
  82107. "use strict";
  82108. Object.defineProperty(exports, "__esModule", {
  82109. value: true
  82110. });
  82111. var _newArrowCheck2 = __webpack_require__(1);
  82112. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  82113. var _vue = __webpack_require__(16);
  82114. var _vue2 = _interopRequireDefault(_vue);
  82115. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  82116. var isServer = _vue2.default.prototype.$isServer;
  82117. var Popper = isServer ? function () {} : __webpack_require__(116);exports.default = {
  82118. props: {
  82119. eventsEnabled: {
  82120. type: Boolean,
  82121. default: false
  82122. },
  82123. placement: {
  82124. type: String,
  82125. default: 'bottom'
  82126. },
  82127. boundariesPadding: {
  82128. type: Number,
  82129. default: 5
  82130. },
  82131. reference: Object,
  82132. popper: Object,
  82133. offset: {
  82134. default: 0
  82135. },
  82136. value: {
  82137. type: Boolean,
  82138. default: false
  82139. },
  82140. transition: String,
  82141. options: {
  82142. type: Object,
  82143. default: function _default() {
  82144. return {
  82145. modifiers: {
  82146. computeStyle: {
  82147. gpuAcceleration: false
  82148. },
  82149. preventOverflow: {
  82150. boundariesElement: 'window'
  82151. }
  82152. }
  82153. };
  82154. }
  82155. }
  82156. },
  82157. data: function data() {
  82158. return {
  82159. visible: this.value
  82160. };
  82161. },
  82162. watch: {
  82163. value: {
  82164. immediate: true,
  82165. handler: function handler(val) {
  82166. this.visible = val;
  82167. this.$emit('input', val);
  82168. }
  82169. },
  82170. visible: function visible(val) {
  82171. if (val) {
  82172. if (this.handleIndexIncrease) this.handleIndexIncrease();
  82173. this.updatePopper();
  82174. this.$emit('on-popper-show');
  82175. } else {
  82176. this.$emit('on-popper-hide');
  82177. }
  82178. this.$emit('input', val);
  82179. }
  82180. },
  82181. methods: {
  82182. createPopper: function createPopper() {
  82183. var _this = this;
  82184. if (isServer) return;
  82185. if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.placement)) {
  82186. return;
  82187. }
  82188. var options = this.options;
  82189. var popper = this.popper || this.$refs.popper;
  82190. var reference = this.reference || this.$refs.reference;
  82191. if (!popper || !reference) return;
  82192. if (this.popperJS && this.popperJS.hasOwnProperty('destroy')) {
  82193. this.popperJS.destroy();
  82194. }
  82195. options.eventsEnabled = this.eventsEnabled;
  82196. options.placement = this.placement;
  82197. if (!options.modifiers.offset) {
  82198. options.modifiers.offset = {};
  82199. }
  82200. options.modifiers.offset.offset = this.offset;
  82201. options.onCreate = function () {
  82202. (0, _newArrowCheck3.default)(this, _this);
  82203. this.$nextTick(this.updatePopper);
  82204. this.$emit('created', this);
  82205. }.bind(this);
  82206. this.popperJS = new Popper(reference, popper, options);
  82207. },
  82208. updatePopper: function updatePopper() {
  82209. if (isServer) return;
  82210. this.popperJS ? this.popperJS.update() : this.createPopper();
  82211. },
  82212. doDestroy: function doDestroy() {
  82213. if (isServer) return;
  82214. if (this.visible) return;
  82215. this.popperJS.destroy();
  82216. this.popperJS = null;
  82217. }
  82218. },
  82219. updated: function updated() {
  82220. var _this2 = this;
  82221. this.$nextTick(function () {
  82222. (0, _newArrowCheck3.default)(this, _this2);
  82223. return this.updatePopper();
  82224. }.bind(this));
  82225. },
  82226. beforeDestroy: function beforeDestroy() {
  82227. if (isServer) return;
  82228. if (this.popperJS) {
  82229. this.popperJS.destroy();
  82230. }
  82231. }
  82232. };
  82233. /***/ }),
  82234. /* 222 */
  82235. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  82236. "use strict";
  82237. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  82238. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_progress_vue__ = __webpack_require__(223);
  82239. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_progress_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_progress_vue__);
  82240. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_progress_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_progress_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  82241. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_664cfb15_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_progress_vue__ = __webpack_require__(515);
  82242. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_664cfb15_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_progress_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_664cfb15_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_progress_vue__);
  82243. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  82244. /* script */
  82245. /* template */
  82246. /* template functional */
  82247. var __vue_template_functional__ = false
  82248. /* styles */
  82249. var __vue_styles__ = null
  82250. /* scopeId */
  82251. var __vue_scopeId__ = null
  82252. /* moduleIdentifier (server only) */
  82253. var __vue_module_identifier__ = null
  82254. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  82255. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_progress_vue___default.a,
  82256. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_664cfb15_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_progress_vue__["render"],
  82257. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_664cfb15_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_progress_vue__["staticRenderFns"],
  82258. __vue_template_functional__,
  82259. __vue_styles__,
  82260. __vue_scopeId__,
  82261. __vue_module_identifier__
  82262. )
  82263. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  82264. /***/ }),
  82265. /* 223 */
  82266. /***/ (function(module, exports, __webpack_require__) {
  82267. "use strict";
  82268. Object.defineProperty(exports, "__esModule", {
  82269. value: true
  82270. });
  82271. var _defineProperty2 = __webpack_require__(2);
  82272. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  82273. var _icon = __webpack_require__(19);
  82274. var _icon2 = _interopRequireDefault(_icon);
  82275. var _assist = __webpack_require__(3);
  82276. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  82277. var prefixCls = 'ivu-progress';
  82278. exports.default = {
  82279. name: 'Progress',
  82280. components: { Icon: _icon2.default },
  82281. props: {
  82282. percent: {
  82283. type: Number,
  82284. default: 0
  82285. },
  82286. successPercent: {
  82287. type: Number,
  82288. default: 0
  82289. },
  82290. status: {
  82291. validator: function validator(value) {
  82292. return (0, _assist.oneOf)(value, ['normal', 'active', 'wrong', 'success']);
  82293. },
  82294. default: 'normal'
  82295. },
  82296. hideInfo: {
  82297. type: Boolean,
  82298. default: false
  82299. },
  82300. strokeWidth: {
  82301. type: Number,
  82302. default: 10
  82303. },
  82304. vertical: {
  82305. type: Boolean,
  82306. default: false
  82307. },
  82308. strokeColor: {
  82309. type: [String, Array]
  82310. },
  82311. textInside: {
  82312. type: Boolean,
  82313. default: false
  82314. }
  82315. },
  82316. data: function data() {
  82317. return {
  82318. currentStatus: this.status
  82319. };
  82320. },
  82321. computed: {
  82322. isStatus: function isStatus() {
  82323. return this.currentStatus == 'wrong' || this.currentStatus == 'success';
  82324. },
  82325. statusIcon: function statusIcon() {
  82326. var type = '';
  82327. switch (this.currentStatus) {
  82328. case 'wrong':
  82329. type = 'ios-close-circle';
  82330. break;
  82331. case 'success':
  82332. type = 'ios-checkmark-circle';
  82333. break;
  82334. }
  82335. return type;
  82336. },
  82337. bgStyle: function bgStyle() {
  82338. var style = this.vertical ? {
  82339. height: String(this.percent) + '%',
  82340. width: String(this.strokeWidth) + 'px'
  82341. } : {
  82342. width: String(this.percent) + '%',
  82343. height: String(this.strokeWidth) + 'px'
  82344. };
  82345. if (this.strokeColor) {
  82346. if (typeof this.strokeColor === 'string') {
  82347. style['background-color'] = this.strokeColor;
  82348. } else {
  82349. style['background-image'] = 'linear-gradient(to right, ' + String(this.strokeColor[0]) + ' 0%, ' + String(this.strokeColor[1]) + ' 100%)';
  82350. }
  82351. }
  82352. return style;
  82353. },
  82354. successBgStyle: function successBgStyle() {
  82355. return this.vertical ? {
  82356. height: String(this.successPercent) + '%',
  82357. width: String(this.strokeWidth) + 'px'
  82358. } : {
  82359. width: String(this.successPercent) + '%',
  82360. height: String(this.strokeWidth) + 'px'
  82361. };
  82362. },
  82363. wrapClasses: function wrapClasses() {
  82364. var _ref;
  82365. return ['' + prefixCls, prefixCls + '-' + String(this.currentStatus), (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-show-info', !this.hideInfo && !this.textInside), (0, _defineProperty3.default)(_ref, prefixCls + '-vertical', this.vertical), _ref)];
  82366. },
  82367. textClasses: function textClasses() {
  82368. return prefixCls + '-text';
  82369. },
  82370. textInnerClasses: function textInnerClasses() {
  82371. return prefixCls + '-text-inner';
  82372. },
  82373. outerClasses: function outerClasses() {
  82374. return prefixCls + '-outer';
  82375. },
  82376. innerClasses: function innerClasses() {
  82377. return prefixCls + '-inner';
  82378. },
  82379. bgClasses: function bgClasses() {
  82380. return prefixCls + '-bg';
  82381. },
  82382. successBgClasses: function successBgClasses() {
  82383. return prefixCls + '-success-bg';
  82384. }
  82385. },
  82386. created: function created() {
  82387. this.handleStatus();
  82388. },
  82389. methods: {
  82390. handleStatus: function handleStatus(isDown) {
  82391. if (isDown) {
  82392. this.currentStatus = 'normal';
  82393. this.$emit('on-status-change', 'normal');
  82394. } else {
  82395. if (parseInt(this.percent, 10) == 100) {
  82396. this.currentStatus = 'success';
  82397. this.$emit('on-status-change', 'success');
  82398. }
  82399. }
  82400. }
  82401. },
  82402. watch: {
  82403. percent: function percent(val, oldVal) {
  82404. if (val < oldVal) {
  82405. this.handleStatus(true);
  82406. } else {
  82407. this.handleStatus();
  82408. }
  82409. },
  82410. status: function status(val) {
  82411. this.currentStatus = val;
  82412. }
  82413. }
  82414. };
  82415. /***/ }),
  82416. /* 224 */
  82417. /***/ (function(module, exports, __webpack_require__) {
  82418. "use strict";
  82419. Object.defineProperty(exports, "__esModule", {
  82420. value: true
  82421. });
  82422. var _defineProperty2 = __webpack_require__(2);
  82423. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  82424. var _assist = __webpack_require__(3);
  82425. var _emitter = __webpack_require__(4);
  82426. var _emitter2 = _interopRequireDefault(_emitter);
  82427. var _form = __webpack_require__(11);
  82428. var _form2 = _interopRequireDefault(_form);
  82429. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  82430. var prefixCls = 'ivu-radio';
  82431. exports.default = {
  82432. name: 'Radio',
  82433. mixins: [_emitter2.default, _form2.default],
  82434. props: {
  82435. value: {
  82436. type: [String, Number, Boolean],
  82437. default: false
  82438. },
  82439. trueValue: {
  82440. type: [String, Number, Boolean],
  82441. default: true
  82442. },
  82443. falseValue: {
  82444. type: [String, Number, Boolean],
  82445. default: false
  82446. },
  82447. label: {
  82448. type: [String, Number]
  82449. },
  82450. disabled: {
  82451. type: Boolean,
  82452. default: false
  82453. },
  82454. size: {
  82455. validator: function validator(value) {
  82456. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  82457. },
  82458. default: function _default() {
  82459. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  82460. }
  82461. },
  82462. name: {
  82463. type: String
  82464. },
  82465. border: {
  82466. type: Boolean,
  82467. default: false
  82468. }
  82469. },
  82470. data: function data() {
  82471. return {
  82472. currentValue: this.value,
  82473. group: false,
  82474. groupName: this.name,
  82475. parent: (0, _assist.findComponentUpward)(this, 'RadioGroup'),
  82476. focusWrapper: false,
  82477. focusInner: false
  82478. };
  82479. },
  82480. computed: {
  82481. wrapClasses: function wrapClasses() {
  82482. var _ref;
  82483. return [prefixCls + '-wrapper', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-group-item', this.group), (0, _defineProperty3.default)(_ref, prefixCls + '-wrapper-checked', this.currentValue), (0, _defineProperty3.default)(_ref, prefixCls + '-wrapper-disabled', this.itemDisabled), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref, prefixCls + '-focus', this.focusWrapper), (0, _defineProperty3.default)(_ref, prefixCls + '-border', this.border), _ref)];
  82484. },
  82485. radioClasses: function radioClasses() {
  82486. var _ref2;
  82487. return ['' + prefixCls, (_ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-checked', this.currentValue), (0, _defineProperty3.default)(_ref2, prefixCls + '-disabled', this.itemDisabled), _ref2)];
  82488. },
  82489. innerClasses: function innerClasses() {
  82490. return [prefixCls + '-inner', (0, _defineProperty3.default)({}, prefixCls + '-focus', this.focusInner)];
  82491. },
  82492. inputClasses: function inputClasses() {
  82493. return prefixCls + '-input';
  82494. }
  82495. },
  82496. mounted: function mounted() {
  82497. if (this.parent) {
  82498. this.group = true;
  82499. if (this.name && this.name !== this.parent.name) {
  82500. if (console.warn) {
  82501. console.warn('[iview] Name does not match Radio Group name.');
  82502. }
  82503. } else {
  82504. this.groupName = this.parent.name;
  82505. }
  82506. }
  82507. if (this.group) {
  82508. this.parent.updateValue();
  82509. } else {
  82510. this.updateValue();
  82511. }
  82512. },
  82513. methods: {
  82514. change: function change(event) {
  82515. if (this.itemDisabled) {
  82516. return false;
  82517. }
  82518. var checked = event.target.checked;
  82519. this.currentValue = checked;
  82520. var value = checked ? this.trueValue : this.falseValue;
  82521. this.$emit('input', value);
  82522. if (this.group) {
  82523. if (this.label !== undefined) {
  82524. this.parent.change({
  82525. value: this.label,
  82526. checked: this.value
  82527. });
  82528. }
  82529. } else {
  82530. this.$emit('on-change', value);
  82531. this.dispatch('FormItem', 'on-form-change', value);
  82532. }
  82533. },
  82534. updateValue: function updateValue() {
  82535. this.currentValue = this.value === this.trueValue;
  82536. },
  82537. onBlur: function onBlur() {
  82538. this.focusWrapper = false;
  82539. this.focusInner = false;
  82540. },
  82541. onFocus: function onFocus() {
  82542. if (this.group && this.parent.type === 'button') {
  82543. this.focusWrapper = true;
  82544. } else {
  82545. this.focusInner = true;
  82546. }
  82547. }
  82548. },
  82549. watch: {
  82550. value: function value(val) {
  82551. if (val === this.trueValue || val === this.falseValue) {
  82552. this.updateValue();
  82553. } else {
  82554. throw 'Value should be trueValue or falseValue.';
  82555. }
  82556. }
  82557. }
  82558. };
  82559. /***/ }),
  82560. /* 225 */
  82561. /***/ (function(module, exports, __webpack_require__) {
  82562. "use strict";
  82563. Object.defineProperty(exports, "__esModule", {
  82564. value: true
  82565. });
  82566. var _defineProperty2 = __webpack_require__(2);
  82567. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  82568. var _newArrowCheck2 = __webpack_require__(1);
  82569. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  82570. var _assist = __webpack_require__(3);
  82571. var _emitter = __webpack_require__(4);
  82572. var _emitter2 = _interopRequireDefault(_emitter);
  82573. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  82574. var prefixCls = 'ivu-radio-group';
  82575. var seed = 0;
  82576. var now = Date.now();
  82577. var getUuid = function () {
  82578. (0, _newArrowCheck3.default)(undefined, undefined);
  82579. return 'ivuRadioGroup_' + String(now) + '_' + seed++;
  82580. }.bind(undefined);
  82581. exports.default = {
  82582. name: 'RadioGroup',
  82583. mixins: [_emitter2.default],
  82584. props: {
  82585. value: {
  82586. type: [String, Number],
  82587. default: ''
  82588. },
  82589. size: {
  82590. validator: function validator(value) {
  82591. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  82592. },
  82593. default: function _default() {
  82594. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  82595. }
  82596. },
  82597. type: {
  82598. validator: function validator(value) {
  82599. return (0, _assist.oneOf)(value, ['button']);
  82600. }
  82601. },
  82602. vertical: {
  82603. type: Boolean,
  82604. default: false
  82605. },
  82606. name: {
  82607. type: String,
  82608. default: getUuid
  82609. },
  82610. buttonStyle: {
  82611. validator: function validator(value) {
  82612. return (0, _assist.oneOf)(value, ['default', 'solid']);
  82613. },
  82614. default: 'default'
  82615. }
  82616. },
  82617. data: function data() {
  82618. return {
  82619. currentValue: this.value,
  82620. children: []
  82621. };
  82622. },
  82623. computed: {
  82624. classes: function classes() {
  82625. var _ref;
  82626. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref, 'ivu-radio-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.type), !!this.type), (0, _defineProperty3.default)(_ref, prefixCls + '-button-' + String(this.buttonStyle), this.type === 'button' && this.buttonStyle !== 'default'), (0, _defineProperty3.default)(_ref, prefixCls + '-vertical', this.vertical), _ref)];
  82627. }
  82628. },
  82629. mounted: function mounted() {
  82630. this.updateValue();
  82631. },
  82632. methods: {
  82633. updateValue: function updateValue() {
  82634. var _this = this;
  82635. this.children = (0, _assist.findComponentsDownward)(this, 'Radio');
  82636. if (this.children) {
  82637. this.children.forEach(function (child) {
  82638. (0, _newArrowCheck3.default)(this, _this);
  82639. child.currentValue = this.currentValue === child.label;
  82640. child.group = true;
  82641. }.bind(this));
  82642. }
  82643. },
  82644. change: function change(data) {
  82645. this.currentValue = data.value;
  82646. this.updateValue();
  82647. this.$emit('input', data.value);
  82648. this.$emit('on-change', data.value);
  82649. this.dispatch('FormItem', 'on-form-change', data.value);
  82650. }
  82651. },
  82652. watch: {
  82653. value: function value() {
  82654. var _this2 = this;
  82655. if (this.currentValue !== this.value) {
  82656. this.currentValue = this.value;
  82657. this.$nextTick(function () {
  82658. (0, _newArrowCheck3.default)(this, _this2);
  82659. this.updateValue();
  82660. }.bind(this));
  82661. }
  82662. }
  82663. }
  82664. };
  82665. /***/ }),
  82666. /* 226 */
  82667. /***/ (function(module, exports, __webpack_require__) {
  82668. "use strict";
  82669. Object.defineProperty(exports, "__esModule", {
  82670. value: true
  82671. });
  82672. var _defineProperty2 = __webpack_require__(2);
  82673. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  82674. var _locale = __webpack_require__(6);
  82675. var _locale2 = _interopRequireDefault(_locale);
  82676. var _emitter = __webpack_require__(4);
  82677. var _emitter2 = _interopRequireDefault(_emitter);
  82678. var _form = __webpack_require__(11);
  82679. var _form2 = _interopRequireDefault(_form);
  82680. var _icon = __webpack_require__(8);
  82681. var _icon2 = _interopRequireDefault(_icon);
  82682. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  82683. var prefixCls = 'ivu-rate';
  82684. exports.default = {
  82685. name: 'Rate',
  82686. mixins: [_locale2.default, _emitter2.default, _form2.default],
  82687. components: { Icon: _icon2.default },
  82688. props: {
  82689. count: {
  82690. type: Number,
  82691. default: 5
  82692. },
  82693. value: {
  82694. type: Number,
  82695. default: 0
  82696. },
  82697. allowHalf: {
  82698. type: Boolean,
  82699. default: false
  82700. },
  82701. disabled: {
  82702. type: Boolean,
  82703. default: false
  82704. },
  82705. showText: {
  82706. type: Boolean,
  82707. default: false
  82708. },
  82709. name: {
  82710. type: String
  82711. },
  82712. clearable: {
  82713. type: Boolean,
  82714. default: false
  82715. },
  82716. character: {
  82717. type: String,
  82718. default: ''
  82719. },
  82720. icon: {
  82721. type: String,
  82722. default: ''
  82723. },
  82724. customIcon: {
  82725. type: String,
  82726. default: ''
  82727. }
  82728. },
  82729. data: function data() {
  82730. var value = this.value || 0;
  82731. return {
  82732. prefixCls: prefixCls,
  82733. hoverIndex: -1,
  82734. isHover: false,
  82735. isHalf: this.allowHalf && value.toString().indexOf('.') >= 0,
  82736. currentValue: value
  82737. };
  82738. },
  82739. computed: {
  82740. classes: function classes() {
  82741. return ['' + prefixCls, (0, _defineProperty3.default)({}, prefixCls + '-disabled', this.itemDisabled)];
  82742. },
  82743. iconClasses: function iconClasses() {
  82744. var _ref2;
  82745. return ['ivu-icon', (_ref2 = {}, (0, _defineProperty3.default)(_ref2, 'ivu-icon-' + String(this.icon), this.icon !== ''), (0, _defineProperty3.default)(_ref2, '' + String(this.customIcon), this.customIcon !== ''), _ref2)];
  82746. },
  82747. showCharacter: function showCharacter() {
  82748. return this.character !== '' || this.icon !== '' || this.customIcon !== '';
  82749. }
  82750. },
  82751. watch: {
  82752. value: function value(val) {
  82753. this.currentValue = val || 0;
  82754. },
  82755. currentValue: function currentValue(val) {
  82756. this.setHalf(val);
  82757. }
  82758. },
  82759. methods: {
  82760. starCls: function starCls(value) {
  82761. var _ref3;
  82762. var hoverIndex = this.hoverIndex;
  82763. var currentIndex = this.isHover ? hoverIndex : this.currentValue;
  82764. var full = false;
  82765. var isLast = false;
  82766. if (currentIndex >= value) full = true;
  82767. if (this.isHover) {
  82768. isLast = currentIndex === value;
  82769. } else {
  82770. isLast = Math.ceil(this.currentValue) === value;
  82771. }
  82772. return [(_ref3 = {}, (0, _defineProperty3.default)(_ref3, prefixCls + '-star', !this.showCharacter), (0, _defineProperty3.default)(_ref3, prefixCls + '-star-chart', this.showCharacter), (0, _defineProperty3.default)(_ref3, prefixCls + '-star-full', !isLast && full || isLast && !this.isHalf), (0, _defineProperty3.default)(_ref3, prefixCls + '-star-half', isLast && this.isHalf), (0, _defineProperty3.default)(_ref3, prefixCls + '-star-zero', !full), _ref3)];
  82773. },
  82774. handleMousemove: function handleMousemove(value, event) {
  82775. if (this.itemDisabled) return;
  82776. this.isHover = true;
  82777. if (this.allowHalf) {
  82778. var type = event.target.getAttribute('type') || false;
  82779. this.isHalf = type === 'half';
  82780. } else {
  82781. this.isHalf = false;
  82782. }
  82783. this.hoverIndex = value;
  82784. },
  82785. handleMouseleave: function handleMouseleave() {
  82786. if (this.itemDisabled) return;
  82787. this.isHover = false;
  82788. this.setHalf(this.currentValue);
  82789. this.hoverIndex = -1;
  82790. },
  82791. setHalf: function setHalf(val) {
  82792. this.isHalf = this.allowHalf && val.toString().indexOf('.') >= 0;
  82793. },
  82794. handleClick: function handleClick(value) {
  82795. if (this.itemDisabled) return;
  82796. if (this.isHalf) value -= 0.5;
  82797. if (this.clearable && Math.abs(value - this.currentValue) < 0.01) {
  82798. value = 0;
  82799. }
  82800. this.currentValue = value;
  82801. this.$emit('input', value);
  82802. this.$emit('on-change', value);
  82803. this.dispatch('FormItem', 'on-form-change', value);
  82804. }
  82805. }
  82806. };
  82807. /***/ }),
  82808. /* 227 */
  82809. /***/ (function(module, exports, __webpack_require__) {
  82810. "use strict";
  82811. Object.defineProperty(exports, "__esModule", {
  82812. value: true
  82813. });
  82814. var _isFinite = __webpack_require__(75);
  82815. var _isFinite2 = _interopRequireDefault(_isFinite);
  82816. var _slicedToArray2 = __webpack_require__(26);
  82817. var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
  82818. var _keys = __webpack_require__(21);
  82819. var _keys2 = _interopRequireDefault(_keys);
  82820. var _defineProperty2 = __webpack_require__(2);
  82821. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  82822. var _newArrowCheck2 = __webpack_require__(1);
  82823. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  82824. var _toConsumableArray2 = __webpack_require__(17);
  82825. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  82826. var _inputNumber = __webpack_require__(194);
  82827. var _inputNumber2 = _interopRequireDefault(_inputNumber);
  82828. var _tooltip = __webpack_require__(93);
  82829. var _tooltip2 = _interopRequireDefault(_tooltip);
  82830. var _marker = __webpack_require__(528);
  82831. var _marker2 = _interopRequireDefault(_marker);
  82832. var _assist = __webpack_require__(3);
  82833. var _dom = __webpack_require__(12);
  82834. var _emitter = __webpack_require__(4);
  82835. var _emitter2 = _interopRequireDefault(_emitter);
  82836. var _form = __webpack_require__(11);
  82837. var _form2 = _interopRequireDefault(_form);
  82838. var _elementResizeDetector = __webpack_require__(94);
  82839. var _elementResizeDetector2 = _interopRequireDefault(_elementResizeDetector);
  82840. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  82841. var prefixCls = 'ivu-slider';
  82842. exports.default = {
  82843. name: 'Slider',
  82844. mixins: [_emitter2.default, _form2.default],
  82845. components: { InputNumber: _inputNumber2.default, Tooltip: _tooltip2.default, SliderMarker: _marker2.default },
  82846. props: {
  82847. min: {
  82848. type: Number,
  82849. default: 0
  82850. },
  82851. max: {
  82852. type: Number,
  82853. default: 100
  82854. },
  82855. step: {
  82856. type: Number,
  82857. default: 1
  82858. },
  82859. range: {
  82860. type: Boolean,
  82861. default: false
  82862. },
  82863. value: {
  82864. type: [Number, Array],
  82865. default: 0
  82866. },
  82867. disabled: {
  82868. type: Boolean,
  82869. default: false
  82870. },
  82871. showInput: {
  82872. type: Boolean,
  82873. default: false
  82874. },
  82875. inputSize: {
  82876. type: String,
  82877. default: 'default',
  82878. validator: function validator(value) {
  82879. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  82880. }
  82881. },
  82882. showStops: {
  82883. type: Boolean,
  82884. default: false
  82885. },
  82886. tipFormat: {
  82887. type: Function,
  82888. default: function _default(val) {
  82889. return val;
  82890. }
  82891. },
  82892. showTip: {
  82893. type: String,
  82894. default: 'hover',
  82895. validator: function validator(value) {
  82896. return (0, _assist.oneOf)(value, ['hover', 'always', 'never']);
  82897. }
  82898. },
  82899. name: {
  82900. type: String
  82901. },
  82902. activeChange: {
  82903. type: Boolean,
  82904. default: true
  82905. },
  82906. marks: {
  82907. type: Object
  82908. }
  82909. },
  82910. data: function data() {
  82911. var val = this.checkLimits(Array.isArray(this.value) ? this.value : [this.value]);
  82912. if (this.range && this.value === null) val = [0, 0];
  82913. return {
  82914. prefixCls: prefixCls,
  82915. currentValue: val,
  82916. dragging: false,
  82917. pointerDown: '',
  82918. startX: 0,
  82919. currentX: 0,
  82920. startPos: 0,
  82921. oldValue: [].concat((0, _toConsumableArray3.default)(val)),
  82922. valueIndex: {
  82923. min: 0,
  82924. max: 1
  82925. },
  82926. sliderWidth: 0,
  82927. isValueNull: false };
  82928. },
  82929. watch: {
  82930. value: function value(val) {
  82931. if (val === null) this.isValueNull = true;
  82932. val = this.checkLimits(Array.isArray(val) ? val : [val]);
  82933. if (!this.dragging && (val[0] !== this.currentValue[0] || val[1] !== this.currentValue[1])) {
  82934. if (this.isValueNull && this.range) this.currentValue = [0, 0];else this.currentValue = val;
  82935. }
  82936. },
  82937. exportValue: function exportValue(values) {
  82938. var _this = this;
  82939. this.$nextTick(function () {
  82940. (0, _newArrowCheck3.default)(this, _this);
  82941. this.$refs.minTooltip.updatePopper();
  82942. if (this.range) {
  82943. this.$refs.maxTooltip.updatePopper();
  82944. }
  82945. }.bind(this));
  82946. var value = this.range ? values : values[0];
  82947. if (this.isValueNull) {
  82948. this.isValueNull = false;
  82949. this.$emit('input', null);
  82950. } else {
  82951. this.$emit('input', value);
  82952. }
  82953. this.$emit('on-input', value);
  82954. }
  82955. },
  82956. computed: {
  82957. classes: function classes() {
  82958. var _ref;
  82959. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-input', this.showInput && !this.range), (0, _defineProperty3.default)(_ref, prefixCls + '-range', this.range), (0, _defineProperty3.default)(_ref, prefixCls + '-disabled', this.itemDisabled), _ref)];
  82960. },
  82961. minButtonClasses: function minButtonClasses() {
  82962. return [prefixCls + '-button', (0, _defineProperty3.default)({}, prefixCls + '-button-dragging', this.pointerDown === 'min')];
  82963. },
  82964. maxButtonClasses: function maxButtonClasses() {
  82965. return [prefixCls + '-button', (0, _defineProperty3.default)({}, prefixCls + '-button-dragging', this.pointerDown === 'max')];
  82966. },
  82967. exportValue: function exportValue() {
  82968. var _this2 = this;
  82969. var decimalCases = (String(this.step).split('.')[1] || '').length;
  82970. return this.currentValue.map(function (nr) {
  82971. (0, _newArrowCheck3.default)(this, _this2);
  82972. return Number(nr.toFixed(decimalCases));
  82973. }.bind(this));
  82974. },
  82975. minPosition: function minPosition() {
  82976. var val = this.currentValue;
  82977. return (val[0] - this.min) / this.valueRange * 100;
  82978. },
  82979. maxPosition: function maxPosition() {
  82980. var val = this.currentValue;
  82981. return (val[1] - this.min) / this.valueRange * 100;
  82982. },
  82983. barStyle: function barStyle() {
  82984. var style = {
  82985. width: (this.currentValue[0] - this.min) / this.valueRange * 100 + '%'
  82986. };
  82987. if (this.range) {
  82988. style.left = (this.currentValue[0] - this.min) / this.valueRange * 100 + '%';
  82989. style.width = (this.currentValue[1] - this.currentValue[0]) / this.valueRange * 100 + '%';
  82990. }
  82991. return style;
  82992. },
  82993. stops: function stops() {
  82994. var stopCount = this.valueRange / this.step;
  82995. var result = [];
  82996. var stepWidth = 100 * this.step / this.valueRange;
  82997. for (var i = 1; i < stopCount; i++) {
  82998. result.push(i * stepWidth);
  82999. }
  83000. return result;
  83001. },
  83002. markList: function markList() {
  83003. var _this3 = this;
  83004. if (!this.marks) return [];
  83005. var marksKeys = (0, _keys2.default)(this.marks);
  83006. return marksKeys.map(parseFloat).sort(function (a, b) {
  83007. (0, _newArrowCheck3.default)(this, _this3);
  83008. return a - b;
  83009. }.bind(this)).filter(function (point) {
  83010. (0, _newArrowCheck3.default)(this, _this3);
  83011. return point <= this.max && point >= this.min;
  83012. }.bind(this)).map(function (point) {
  83013. (0, _newArrowCheck3.default)(this, _this3);
  83014. return {
  83015. point: point,
  83016. position: (point - this.min) * 100 / (this.max - this.min),
  83017. mark: this.marks[point]
  83018. };
  83019. }.bind(this));
  83020. },
  83021. tipDisabled: function tipDisabled() {
  83022. return this.tipFormat(this.currentValue[0]) === null || this.showTip === 'never';
  83023. },
  83024. valueRange: function valueRange() {
  83025. return this.max - this.min;
  83026. },
  83027. firstPosition: function firstPosition() {
  83028. return this.currentValue[0];
  83029. },
  83030. secondPosition: function secondPosition() {
  83031. return this.currentValue[1];
  83032. }
  83033. },
  83034. methods: {
  83035. getPointerX: function getPointerX(e) {
  83036. return e.type.indexOf('touch') !== -1 ? e.touches[0].clientX : e.clientX;
  83037. },
  83038. checkLimits: function checkLimits(_ref4) {
  83039. var _ref5 = (0, _slicedToArray3.default)(_ref4, 2),
  83040. min = _ref5[0],
  83041. max = _ref5[1];
  83042. min = Math.max(this.min, min);
  83043. min = Math.min(this.max, min);
  83044. max = Math.max(this.min, min, max);
  83045. max = Math.min(this.max, max);
  83046. return [min, max];
  83047. },
  83048. getCurrentValue: function getCurrentValue(event, type) {
  83049. if (this.itemDisabled) {
  83050. return;
  83051. }
  83052. var index = this.valueIndex[type];
  83053. if (typeof index === 'undefined') {
  83054. return;
  83055. }
  83056. return this.currentValue[index];
  83057. },
  83058. onKeyLeft: function onKeyLeft(event, type) {
  83059. var value = this.getCurrentValue(event, type);
  83060. if ((0, _isFinite2.default)(value)) {
  83061. this.changeButtonPosition(value - this.step, type);
  83062. }
  83063. },
  83064. onKeyRight: function onKeyRight(event, type) {
  83065. var value = this.getCurrentValue(event, type);
  83066. if ((0, _isFinite2.default)(value)) {
  83067. this.changeButtonPosition(value + this.step, type);
  83068. }
  83069. },
  83070. onPointerDown: function onPointerDown(event, type) {
  83071. if (this.itemDisabled) return;
  83072. event.preventDefault();
  83073. this.pointerDown = type;
  83074. this.onPointerDragStart(event);
  83075. (0, _dom.on)(window, 'mousemove', this.onPointerDrag);
  83076. (0, _dom.on)(window, 'touchmove', this.onPointerDrag);
  83077. (0, _dom.on)(window, 'mouseup', this.onPointerDragEnd);
  83078. (0, _dom.on)(window, 'touchend', this.onPointerDragEnd);
  83079. },
  83080. onPointerDragStart: function onPointerDragStart(event) {
  83081. this.dragging = false;
  83082. this.startX = this.getPointerX(event);
  83083. this.startPos = this[String(this.pointerDown) + 'Position'] * this.valueRange / 100 + this.min;
  83084. },
  83085. onPointerDrag: function onPointerDrag(event) {
  83086. this.dragging = true;
  83087. this.$refs[String(this.pointerDown) + 'Tooltip'].visible = true;
  83088. this.currentX = this.getPointerX(event);
  83089. var diff = (this.currentX - this.startX) / this.sliderWidth * this.valueRange;
  83090. this.changeButtonPosition(this.startPos + diff);
  83091. },
  83092. onPointerDragEnd: function onPointerDragEnd() {
  83093. if (this.dragging) {
  83094. this.dragging = false;
  83095. this.$refs[String(this.pointerDown) + 'Tooltip'].visible = false;
  83096. this.emitChange();
  83097. }
  83098. this.pointerDown = '';
  83099. (0, _dom.off)(window, 'mousemove', this.onPointerDrag);
  83100. (0, _dom.off)(window, 'touchmove', this.onPointerDrag);
  83101. (0, _dom.off)(window, 'mouseup', this.onPointerDragEnd);
  83102. (0, _dom.off)(window, 'touchend', this.onPointerDragEnd);
  83103. },
  83104. changeButtonPosition: function changeButtonPosition(newPos, forceType) {
  83105. var type = forceType || this.pointerDown;
  83106. var index = type === 'min' ? 0 : 1;
  83107. if (type === 'min') newPos = this.checkLimits([newPos, this.max])[0];else newPos = this.checkLimits([this.min, newPos])[1];
  83108. var modulus = this.handleDecimal(newPos, this.step);
  83109. var value = this.currentValue;
  83110. value[index] = newPos - modulus;
  83111. if (this.range) {
  83112. if (type === 'min' && value[0] > value[1]) value[1] = value[0];
  83113. if (type === 'max' && value[0] > value[1]) value[0] = value[1];
  83114. }
  83115. this.currentValue = [].concat((0, _toConsumableArray3.default)(value));
  83116. if (!this.dragging) {
  83117. if (this.currentValue[index] !== this.oldValue[index]) {
  83118. this.emitChange();
  83119. this.oldValue[index] = this.currentValue[index];
  83120. }
  83121. }
  83122. },
  83123. handleDecimal: function handleDecimal(pos, step) {
  83124. if (step < 1) {
  83125. var sl = step.toString(),
  83126. multiple = 1,
  83127. m = void 0;
  83128. try {
  83129. m = sl.split('.')[1].length;
  83130. } catch (e) {
  83131. m = 0;
  83132. }
  83133. multiple = Math.pow(10, m);
  83134. return pos * multiple % (step * multiple) / multiple;
  83135. } else return pos % step;
  83136. },
  83137. emitChange: function emitChange() {
  83138. var value = this.range ? this.exportValue : this.exportValue[0];
  83139. this.$emit('on-change', value);
  83140. this.dispatch('FormItem', 'on-form-change', value);
  83141. },
  83142. sliderClick: function sliderClick(event) {
  83143. if (this.itemDisabled) return;
  83144. var currentX = this.getPointerX(event);
  83145. var sliderOffsetLeft = this.$refs.slider.getBoundingClientRect().left;
  83146. var newPos = (currentX - sliderOffsetLeft) / this.sliderWidth * this.valueRange + this.min;
  83147. var regularNewPos = newPos / this.valueRange * 100;
  83148. if (!this.range || regularNewPos <= this.minPosition) this.changeButtonPosition(newPos, 'min');else if (regularNewPos >= this.maxPosition) this.changeButtonPosition(newPos, 'max');else this.changeButtonPosition(newPos, newPos - this.firstPosition <= this.secondPosition - newPos ? 'min' : 'max');
  83149. },
  83150. handleInputChange: function handleInputChange(val) {
  83151. this.currentValue = [val === 0 ? 0 : val || this.min, this.currentValue[1]];
  83152. this.emitChange();
  83153. },
  83154. handleFocus: function handleFocus(type) {
  83155. this.$refs[String(type) + 'Tooltip'].handleShowPopper();
  83156. },
  83157. handleBlur: function handleBlur(type) {
  83158. this.$refs[String(type) + 'Tooltip'].handleClosePopper();
  83159. },
  83160. handleSetSliderWidth: function handleSetSliderWidth() {
  83161. this.sliderWidth = parseInt((0, _assist.getStyle)(this.$refs.slider, 'width'), 10);
  83162. }
  83163. },
  83164. mounted: function mounted() {
  83165. var _this4 = this;
  83166. this.$on('on-visible-change', function (val) {
  83167. (0, _newArrowCheck3.default)(this, _this4);
  83168. if (val && this.showTip === 'always') {
  83169. this.$refs.minTooltip.doDestroy();
  83170. if (this.range) {
  83171. this.$refs.maxTooltip.doDestroy();
  83172. }
  83173. this.$nextTick(function () {
  83174. (0, _newArrowCheck3.default)(this, _this4);
  83175. this.$refs.minTooltip.updatePopper();
  83176. if (this.range) {
  83177. this.$refs.maxTooltip.updatePopper();
  83178. }
  83179. }.bind(this));
  83180. }
  83181. }.bind(this));
  83182. this.observer = (0, _elementResizeDetector2.default)();
  83183. this.observer.listenTo(this.$refs.slider, this.handleSetSliderWidth);
  83184. },
  83185. beforeDestroy: function beforeDestroy() {
  83186. this.observer.removeListener(this.$refs.slider, this.handleSetSliderWidth);
  83187. }
  83188. };
  83189. /***/ }),
  83190. /* 228 */
  83191. /***/ (function(module, exports, __webpack_require__) {
  83192. "use strict";
  83193. Object.defineProperty(exports, "__esModule", {
  83194. value: true
  83195. });
  83196. var _newArrowCheck2 = __webpack_require__(1);
  83197. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  83198. var _defineProperty2 = __webpack_require__(2);
  83199. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  83200. var _popper = __webpack_require__(221);
  83201. var _popper2 = _interopRequireDefault(_popper);
  83202. var _transferDom = __webpack_require__(23);
  83203. var _transferDom2 = _interopRequireDefault(_transferDom);
  83204. var _assist = __webpack_require__(3);
  83205. var _transferQueue = __webpack_require__(37);
  83206. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  83207. var prefixCls = 'ivu-tooltip';
  83208. exports.default = {
  83209. name: 'Tooltip',
  83210. directives: { TransferDom: _transferDom2.default },
  83211. mixins: [_popper2.default],
  83212. props: {
  83213. placement: {
  83214. validator: function validator(value) {
  83215. return (0, _assist.oneOf)(value, ['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'right', 'right-start', 'right-end']);
  83216. },
  83217. default: 'bottom'
  83218. },
  83219. content: {
  83220. type: [String, Number],
  83221. default: ''
  83222. },
  83223. delay: {
  83224. type: Number,
  83225. default: 100
  83226. },
  83227. disabled: {
  83228. type: Boolean,
  83229. default: false
  83230. },
  83231. controlled: {
  83232. type: Boolean,
  83233. default: false
  83234. },
  83235. always: {
  83236. type: Boolean,
  83237. default: false
  83238. },
  83239. transfer: {
  83240. type: Boolean,
  83241. default: function _default() {
  83242. return !this.$IVIEW || this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
  83243. }
  83244. },
  83245. theme: {
  83246. validator: function validator(value) {
  83247. return (0, _assist.oneOf)(value, ['dark', 'light']);
  83248. },
  83249. default: 'dark'
  83250. },
  83251. maxWidth: {
  83252. type: [String, Number]
  83253. },
  83254. transferClassName: {
  83255. type: String
  83256. }
  83257. },
  83258. data: function data() {
  83259. return {
  83260. prefixCls: prefixCls,
  83261. tIndex: this.handleGetIndex()
  83262. };
  83263. },
  83264. computed: {
  83265. innerStyles: function innerStyles() {
  83266. var styles = {};
  83267. if (this.maxWidth) styles['max-width'] = String(this.maxWidth) + 'px';
  83268. return styles;
  83269. },
  83270. innerClasses: function innerClasses() {
  83271. return [prefixCls + '-inner', (0, _defineProperty3.default)({}, prefixCls + '-inner-with-width', !!this.maxWidth)];
  83272. },
  83273. dropStyles: function dropStyles() {
  83274. var styles = {};
  83275. if (this.transfer) styles['z-index'] = 1060 + this.tIndex;
  83276. return styles;
  83277. },
  83278. dropdownCls: function dropdownCls() {
  83279. var _ref2;
  83280. return [prefixCls + '-popper', prefixCls + '-' + String(this.theme), (_ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-transfer', this.transfer), (0, _defineProperty3.default)(_ref2, this.transferClassName, this.transferClassName), _ref2)];
  83281. }
  83282. },
  83283. watch: {
  83284. content: function content() {
  83285. this.updatePopper();
  83286. }
  83287. },
  83288. methods: {
  83289. handleShowPopper: function handleShowPopper() {
  83290. var _this = this;
  83291. if (this.timeout) clearTimeout(this.timeout);
  83292. this.timeout = setTimeout(function () {
  83293. (0, _newArrowCheck3.default)(this, _this);
  83294. this.visible = true;
  83295. }.bind(this), this.delay);
  83296. this.tIndex = this.handleGetIndex();
  83297. },
  83298. handleClosePopper: function handleClosePopper() {
  83299. var _this2 = this;
  83300. if (this.timeout) {
  83301. clearTimeout(this.timeout);
  83302. if (!this.controlled) {
  83303. this.timeout = setTimeout(function () {
  83304. (0, _newArrowCheck3.default)(this, _this2);
  83305. this.visible = false;
  83306. }.bind(this), 100);
  83307. }
  83308. }
  83309. },
  83310. handleGetIndex: function handleGetIndex() {
  83311. (0, _transferQueue.transferIncrease)();
  83312. return _transferQueue.transferIndex;
  83313. }
  83314. },
  83315. mounted: function mounted() {
  83316. if (this.always) {
  83317. this.updatePopper();
  83318. }
  83319. }
  83320. };
  83321. /***/ }),
  83322. /* 229 */
  83323. /***/ (function(module, exports, __webpack_require__) {
  83324. "use strict";
  83325. var utils = module.exports = {};
  83326. /**
  83327. * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value.
  83328. * @public
  83329. * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1.
  83330. * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned.
  83331. * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing.
  83332. */
  83333. utils.forEach = function(collection, callback) {
  83334. for(var i = 0; i < collection.length; i++) {
  83335. var result = callback(collection[i]);
  83336. if(result) {
  83337. return result;
  83338. }
  83339. }
  83340. };
  83341. /***/ }),
  83342. /* 230 */
  83343. /***/ (function(module, exports, __webpack_require__) {
  83344. "use strict";
  83345. var detector = module.exports = {};
  83346. detector.isIE = function(version) {
  83347. function isAnyIeVersion() {
  83348. var agent = navigator.userAgent.toLowerCase();
  83349. return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1;
  83350. }
  83351. if(!isAnyIeVersion()) {
  83352. return false;
  83353. }
  83354. if(!version) {
  83355. return true;
  83356. }
  83357. //Shamelessly stolen from https://gist.github.com/padolsey/527683
  83358. var ieVersion = (function(){
  83359. var undef,
  83360. v = 3,
  83361. div = document.createElement("div"),
  83362. all = div.getElementsByTagName("i");
  83363. do {
  83364. div.innerHTML = "<!--[if gt IE " + (++v) + "]><i></i><![endif]-->";
  83365. }
  83366. while (all[0]);
  83367. return v > 4 ? v : undef;
  83368. }());
  83369. return version === ieVersion;
  83370. };
  83371. detector.isLegacyOpera = function() {
  83372. return !!window.opera;
  83373. };
  83374. /***/ }),
  83375. /* 231 */
  83376. /***/ (function(module, exports, __webpack_require__) {
  83377. "use strict";
  83378. Object.defineProperty(exports, "__esModule", {
  83379. value: true
  83380. });
  83381. var _newArrowCheck2 = __webpack_require__(1);
  83382. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  83383. var _defineProperty2 = __webpack_require__(2);
  83384. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  83385. var _assist = __webpack_require__(3);
  83386. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  83387. var prefixCls = 'ivu-steps';
  83388. function debounce(fn) {
  83389. var waiting = void 0;
  83390. return function () {
  83391. if (waiting) return;
  83392. waiting = true;
  83393. var context = this,
  83394. args = arguments;
  83395. var later = function later() {
  83396. waiting = false;
  83397. fn.apply(context, args);
  83398. };
  83399. this.$nextTick(later);
  83400. };
  83401. }
  83402. exports.default = {
  83403. name: 'Steps',
  83404. props: {
  83405. current: {
  83406. type: Number,
  83407. default: 0
  83408. },
  83409. status: {
  83410. validator: function validator(value) {
  83411. return (0, _assist.oneOf)(value, ['wait', 'process', 'finish', 'error']);
  83412. },
  83413. default: 'process'
  83414. },
  83415. size: {
  83416. validator: function validator(value) {
  83417. return (0, _assist.oneOf)(value, ['small']);
  83418. }
  83419. },
  83420. direction: {
  83421. validator: function validator(value) {
  83422. return (0, _assist.oneOf)(value, ['horizontal', 'vertical']);
  83423. },
  83424. default: 'horizontal'
  83425. }
  83426. },
  83427. computed: {
  83428. classes: function classes() {
  83429. return ['' + prefixCls, prefixCls + '-' + String(this.direction), (0, _defineProperty3.default)({}, prefixCls + '-' + String(this.size), !!this.size)];
  83430. }
  83431. },
  83432. methods: {
  83433. updateChildProps: function updateChildProps(isInit) {
  83434. var _this = this;
  83435. var total = this.$children.length;
  83436. this.$children.forEach(function (child, index) {
  83437. (0, _newArrowCheck3.default)(this, _this);
  83438. child.stepNumber = index + 1;
  83439. if (this.direction === 'horizontal') {
  83440. child.total = total;
  83441. }
  83442. if (!(isInit && child.currentStatus)) {
  83443. if (index === this.current) {
  83444. if (this.status !== 'error') {
  83445. child.currentStatus = 'process';
  83446. }
  83447. } else if (index < this.current) {
  83448. child.currentStatus = 'finish';
  83449. } else {
  83450. child.currentStatus = 'wait';
  83451. }
  83452. }
  83453. if (child.currentStatus !== 'error' && index !== 0) {
  83454. this.$children[index - 1].nextError = false;
  83455. }
  83456. }.bind(this));
  83457. },
  83458. setNextError: function setNextError() {
  83459. var _this2 = this;
  83460. this.$children.forEach(function (child, index) {
  83461. (0, _newArrowCheck3.default)(this, _this2);
  83462. if (child.currentStatus === 'error' && index !== 0) {
  83463. this.$children[index - 1].nextError = true;
  83464. }
  83465. }.bind(this));
  83466. },
  83467. updateCurrent: function updateCurrent(isInit) {
  83468. if (this.current < 0 || this.current >= this.$children.length) {
  83469. return;
  83470. }
  83471. if (isInit) {
  83472. var current_status = this.$children[this.current].currentStatus;
  83473. if (!current_status) {
  83474. this.$children[this.current].currentStatus = this.status;
  83475. }
  83476. } else {
  83477. this.$children[this.current].currentStatus = this.status;
  83478. }
  83479. },
  83480. debouncedAppendRemove: function debouncedAppendRemove() {
  83481. return debounce(function () {
  83482. this.updateSteps();
  83483. });
  83484. },
  83485. updateSteps: function updateSteps() {
  83486. this.updateChildProps(true);
  83487. this.setNextError();
  83488. this.updateCurrent(true);
  83489. }
  83490. },
  83491. mounted: function mounted() {
  83492. this.updateSteps();
  83493. this.$on('append', this.debouncedAppendRemove());
  83494. this.$on('remove', this.debouncedAppendRemove());
  83495. },
  83496. watch: {
  83497. current: function current() {
  83498. this.updateChildProps();
  83499. },
  83500. status: function status() {
  83501. this.updateCurrent();
  83502. }
  83503. }
  83504. };
  83505. /***/ }),
  83506. /* 232 */
  83507. /***/ (function(module, exports, __webpack_require__) {
  83508. "use strict";
  83509. Object.defineProperty(exports, "__esModule", {
  83510. value: true
  83511. });
  83512. var _defineProperty2 = __webpack_require__(2);
  83513. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  83514. var _emitter = __webpack_require__(4);
  83515. var _emitter2 = _interopRequireDefault(_emitter);
  83516. var _assist = __webpack_require__(3);
  83517. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  83518. var prefixCls = 'ivu-steps';
  83519. var iconPrefixCls = 'ivu-icon';
  83520. exports.default = {
  83521. name: 'Step',
  83522. mixins: [_emitter2.default],
  83523. props: {
  83524. status: {
  83525. validator: function validator(value) {
  83526. return (0, _assist.oneOf)(value, ['wait', 'process', 'finish', 'error']);
  83527. }
  83528. },
  83529. title: {
  83530. type: String,
  83531. default: ''
  83532. },
  83533. content: {
  83534. type: String
  83535. },
  83536. icon: {
  83537. type: String
  83538. }
  83539. },
  83540. data: function data() {
  83541. return {
  83542. prefixCls: prefixCls,
  83543. stepNumber: '',
  83544. nextError: false,
  83545. total: 1,
  83546. currentStatus: ''
  83547. };
  83548. },
  83549. computed: {
  83550. wrapClasses: function wrapClasses() {
  83551. var _ref;
  83552. return [prefixCls + '-item', prefixCls + '-status-' + String(this.currentStatus), (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-custom', !!this.icon || !!this.$slots.icon), (0, _defineProperty3.default)(_ref, prefixCls + '-next-error', this.nextError), _ref)];
  83553. },
  83554. iconClasses: function iconClasses() {
  83555. var icon = '';
  83556. if (this.icon) {
  83557. icon = this.icon;
  83558. } else {
  83559. if (this.currentStatus === 'finish') {
  83560. icon = 'ios-checkmark';
  83561. } else if (this.currentStatus === 'error') {
  83562. icon = 'ios-close';
  83563. }
  83564. }
  83565. return [prefixCls + '-icon', '' + iconPrefixCls, (0, _defineProperty3.default)({}, iconPrefixCls + '-' + String(icon), icon !== '')];
  83566. }
  83567. },
  83568. watch: {
  83569. status: function status(val) {
  83570. this.currentStatus = val;
  83571. if (this.currentStatus === 'error') {
  83572. this.$parent.setNextError();
  83573. }
  83574. }
  83575. },
  83576. created: function created() {
  83577. this.currentStatus = this.status;
  83578. },
  83579. mounted: function mounted() {
  83580. this.dispatch('Steps', 'append');
  83581. },
  83582. beforeDestroy: function beforeDestroy() {
  83583. this.dispatch('Steps', 'remove');
  83584. }
  83585. };
  83586. /***/ }),
  83587. /* 233 */
  83588. /***/ (function(module, exports, __webpack_require__) {
  83589. "use strict";
  83590. Object.defineProperty(exports, "__esModule", {
  83591. value: true
  83592. });
  83593. var _newArrowCheck2 = __webpack_require__(1);
  83594. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  83595. var _defineProperty2 = __webpack_require__(2);
  83596. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  83597. var _assist = __webpack_require__(3);
  83598. var _emitter = __webpack_require__(4);
  83599. var _emitter2 = _interopRequireDefault(_emitter);
  83600. var _form = __webpack_require__(11);
  83601. var _form2 = _interopRequireDefault(_form);
  83602. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  83603. var prefixCls = 'ivu-switch';
  83604. exports.default = {
  83605. name: 'iSwitch',
  83606. mixins: [_emitter2.default, _form2.default],
  83607. props: {
  83608. value: {
  83609. type: [String, Number, Boolean],
  83610. default: false
  83611. },
  83612. trueValue: {
  83613. type: [String, Number, Boolean],
  83614. default: true
  83615. },
  83616. falseValue: {
  83617. type: [String, Number, Boolean],
  83618. default: false
  83619. },
  83620. disabled: {
  83621. type: Boolean,
  83622. default: false
  83623. },
  83624. size: {
  83625. validator: function validator(value) {
  83626. return (0, _assist.oneOf)(value, ['large', 'small', 'default']);
  83627. },
  83628. default: function _default() {
  83629. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  83630. }
  83631. },
  83632. name: {
  83633. type: String
  83634. },
  83635. loading: {
  83636. type: Boolean,
  83637. default: false
  83638. },
  83639. trueColor: {
  83640. type: String
  83641. },
  83642. falseColor: {
  83643. type: String
  83644. },
  83645. beforeChange: Function
  83646. },
  83647. data: function data() {
  83648. return {
  83649. currentValue: this.value
  83650. };
  83651. },
  83652. computed: {
  83653. wrapClasses: function wrapClasses() {
  83654. var _ref;
  83655. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-checked', this.currentValue === this.trueValue), (0, _defineProperty3.default)(_ref, prefixCls + '-disabled', this.itemDisabled), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref, prefixCls + '-loading', this.loading), _ref)];
  83656. },
  83657. wrapStyles: function wrapStyles() {
  83658. var style = {};
  83659. if (this.trueColor && this.currentValue === this.trueValue) {
  83660. style['border-color'] = this.trueColor;
  83661. style['background-color'] = this.trueColor;
  83662. } else if (this.falseColor && this.currentValue === this.falseValue) {
  83663. style['border-color'] = this.falseColor;
  83664. style['background-color'] = this.falseColor;
  83665. }
  83666. return style;
  83667. },
  83668. innerClasses: function innerClasses() {
  83669. return prefixCls + '-inner';
  83670. }
  83671. },
  83672. methods: {
  83673. handleToggle: function handleToggle() {
  83674. var checked = this.currentValue === this.trueValue ? this.falseValue : this.trueValue;
  83675. this.currentValue = checked;
  83676. this.$emit('input', checked);
  83677. this.$emit('on-change', checked);
  83678. this.dispatch('FormItem', 'on-form-change', checked);
  83679. },
  83680. toggle: function toggle(event) {
  83681. var _this = this;
  83682. event.preventDefault();
  83683. if (this.itemDisabled || this.loading) {
  83684. return false;
  83685. }
  83686. if (!this.beforeChange) {
  83687. return this.handleToggle();
  83688. }
  83689. var before = this.beforeChange();
  83690. if (before && before.then) {
  83691. before.then(function () {
  83692. (0, _newArrowCheck3.default)(this, _this);
  83693. this.handleToggle();
  83694. }.bind(this));
  83695. } else {
  83696. this.handleToggle();
  83697. }
  83698. }
  83699. },
  83700. watch: {
  83701. value: function value(val) {
  83702. if (val !== this.trueValue && val !== this.falseValue && val !== null) {
  83703. throw 'Value should be trueValue or falseValue.';
  83704. }
  83705. this.currentValue = val;
  83706. }
  83707. }
  83708. };
  83709. /***/ }),
  83710. /* 234 */
  83711. /***/ (function(module, exports, __webpack_require__) {
  83712. "use strict";
  83713. Object.defineProperty(exports, "__esModule", {
  83714. value: true
  83715. });
  83716. var _getIterator2 = __webpack_require__(45);
  83717. var _getIterator3 = _interopRequireDefault(_getIterator2);
  83718. var _set = __webpack_require__(552);
  83719. var _set2 = _interopRequireDefault(_set);
  83720. var _toConsumableArray2 = __webpack_require__(17);
  83721. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  83722. var _stringify = __webpack_require__(57);
  83723. var _stringify2 = _interopRequireDefault(_stringify);
  83724. var _newArrowCheck2 = __webpack_require__(1);
  83725. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  83726. var _defineProperty2 = __webpack_require__(2);
  83727. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  83728. var _tableHead = __webpack_require__(567);
  83729. var _tableHead2 = _interopRequireDefault(_tableHead);
  83730. var _tableBody = __webpack_require__(570);
  83731. var _tableBody2 = _interopRequireDefault(_tableBody);
  83732. var _summary = __webpack_require__(576);
  83733. var _summary2 = _interopRequireDefault(_summary);
  83734. var _dropdown = __webpack_require__(61);
  83735. var _dropdown2 = _interopRequireDefault(_dropdown);
  83736. var _dropdownMenu = __webpack_require__(62);
  83737. var _dropdownMenu2 = _interopRequireDefault(_dropdownMenu);
  83738. var _spin = __webpack_require__(91);
  83739. var _spin2 = _interopRequireDefault(_spin);
  83740. var _assist = __webpack_require__(3);
  83741. var _dom = __webpack_require__(12);
  83742. var _csv = __webpack_require__(578);
  83743. var _csv2 = _interopRequireDefault(_csv);
  83744. var _exportCsv = __webpack_require__(579);
  83745. var _exportCsv2 = _interopRequireDefault(_exportCsv);
  83746. var _locale = __webpack_require__(6);
  83747. var _locale2 = _interopRequireDefault(_locale);
  83748. var _elementResizeDetector = __webpack_require__(94);
  83749. var _elementResizeDetector2 = _interopRequireDefault(_elementResizeDetector);
  83750. var _util = __webpack_require__(580);
  83751. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  83752. var prefixCls = 'ivu-table';
  83753. var rowKey = 1;
  83754. var columnKey = 1;
  83755. exports.default = {
  83756. name: 'Table',
  83757. mixins: [_locale2.default],
  83758. components: { tableHead: _tableHead2.default, tableBody: _tableBody2.default, tableSummary: _summary2.default, Spin: _spin2.default, Dropdown: _dropdown2.default, DropdownMenu: _dropdownMenu2.default },
  83759. provide: function provide() {
  83760. return {
  83761. tableRoot: this
  83762. };
  83763. },
  83764. props: {
  83765. data: {
  83766. type: Array,
  83767. default: function _default() {
  83768. return [];
  83769. }
  83770. },
  83771. columns: {
  83772. type: Array,
  83773. default: function _default() {
  83774. return [];
  83775. }
  83776. },
  83777. size: {
  83778. validator: function validator(value) {
  83779. return (0, _assist.oneOf)(value, ['small', 'large', 'default']);
  83780. },
  83781. default: function _default() {
  83782. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  83783. }
  83784. },
  83785. width: {
  83786. type: [Number, String]
  83787. },
  83788. height: {
  83789. type: [Number, String]
  83790. },
  83791. maxHeight: {
  83792. type: [Number, String]
  83793. },
  83794. stripe: {
  83795. type: Boolean,
  83796. default: false
  83797. },
  83798. border: {
  83799. type: Boolean,
  83800. default: false
  83801. },
  83802. showHeader: {
  83803. type: Boolean,
  83804. default: true
  83805. },
  83806. highlightRow: {
  83807. type: Boolean,
  83808. default: false
  83809. },
  83810. rowClassName: {
  83811. type: Function,
  83812. default: function _default() {
  83813. return '';
  83814. }
  83815. },
  83816. context: {
  83817. type: Object
  83818. },
  83819. noDataText: {
  83820. type: String
  83821. },
  83822. noFilteredDataText: {
  83823. type: String
  83824. },
  83825. disabledHover: {
  83826. type: Boolean
  83827. },
  83828. loading: {
  83829. type: Boolean,
  83830. default: false
  83831. },
  83832. draggable: {
  83833. type: Boolean,
  83834. default: false
  83835. },
  83836. tooltipTheme: {
  83837. validator: function validator(value) {
  83838. return (0, _assist.oneOf)(value, ['dark', 'light']);
  83839. },
  83840. default: 'dark'
  83841. },
  83842. tooltipMaxWidth: {
  83843. type: Number,
  83844. default: 300
  83845. },
  83846. rowKey: {
  83847. type: [Boolean, String],
  83848. default: false
  83849. },
  83850. spanMethod: {
  83851. type: Function
  83852. },
  83853. showSummary: {
  83854. type: Boolean,
  83855. default: false
  83856. },
  83857. summaryMethod: {
  83858. type: Function
  83859. },
  83860. sumText: {
  83861. type: String
  83862. },
  83863. indentSize: {
  83864. type: Number,
  83865. default: 16
  83866. },
  83867. loadData: {
  83868. type: Function
  83869. },
  83870. updateShowChildren: {
  83871. type: Boolean,
  83872. default: false
  83873. },
  83874. contextMenu: {
  83875. type: Boolean,
  83876. default: false
  83877. },
  83878. showContextMenu: {
  83879. type: Boolean,
  83880. default: false
  83881. },
  83882. fixedShadow: {
  83883. validator: function validator(value) {
  83884. return (0, _assist.oneOf)(value, ['auto', 'show', 'hide']);
  83885. },
  83886. default: 'show'
  83887. }
  83888. },
  83889. data: function data() {
  83890. var colsWithId = this.makeColumnsId(this.columns);
  83891. return {
  83892. ready: false,
  83893. tableWidth: 0,
  83894. columnsWidth: {},
  83895. prefixCls: prefixCls,
  83896. compiledUids: [],
  83897. objData: this.makeObjData(),
  83898. rebuildData: [],
  83899. cloneColumns: this.makeColumns(colsWithId),
  83900. columnRows: this.makeColumnRows(false, colsWithId),
  83901. leftFixedColumnRows: this.makeColumnRows('left', colsWithId),
  83902. rightFixedColumnRows: this.makeColumnRows('right', colsWithId),
  83903. allColumns: (0, _util.getAllColumns)(colsWithId),
  83904. showSlotHeader: true,
  83905. showSlotFooter: true,
  83906. bodyHeight: 0,
  83907. scrollBarWidth: (0, _assist.getScrollBarSize)(),
  83908. currentContext: this.context,
  83909. cloneData: (0, _assist.deepCopy)(this.data),
  83910. showVerticalScrollBar: false,
  83911. showHorizontalScrollBar: false,
  83912. headerWidth: 0,
  83913. headerHeight: 0,
  83914. showResizeLine: false,
  83915. contextMenuVisible: false,
  83916. contextMenuStyles: {
  83917. top: 0,
  83918. left: 0
  83919. },
  83920. scrollOnTheLeft: false,
  83921. scrollOnTheRight: false
  83922. };
  83923. },
  83924. computed: {
  83925. localeNoDataText: function localeNoDataText() {
  83926. if (this.noDataText === undefined) {
  83927. return this.t('i.table.noDataText');
  83928. } else {
  83929. return this.noDataText;
  83930. }
  83931. },
  83932. localeNoFilteredDataText: function localeNoFilteredDataText() {
  83933. if (this.noFilteredDataText === undefined) {
  83934. return this.t('i.table.noFilteredDataText');
  83935. } else {
  83936. return this.noFilteredDataText;
  83937. }
  83938. },
  83939. localeSumText: function localeSumText() {
  83940. if (this.sumText === undefined) {
  83941. return this.t('i.table.sumText');
  83942. } else {
  83943. return this.sumText;
  83944. }
  83945. },
  83946. wrapClasses: function wrapClasses() {
  83947. var _ref;
  83948. return [prefixCls + '-wrapper', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-hide', !this.ready), (0, _defineProperty3.default)(_ref, prefixCls + '-with-header', this.showSlotHeader), (0, _defineProperty3.default)(_ref, prefixCls + '-with-footer', this.showSlotFooter), (0, _defineProperty3.default)(_ref, prefixCls + '-with-summary', this.showSummary), (0, _defineProperty3.default)(_ref, prefixCls + '-wrapper-with-border', this.border), _ref)];
  83949. },
  83950. classes: function classes() {
  83951. var _ref2;
  83952. return ['' + prefixCls, (_ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-' + String(this.size), !!this.size), (0, _defineProperty3.default)(_ref2, prefixCls + '-border', this.border), (0, _defineProperty3.default)(_ref2, prefixCls + '-stripe', this.stripe), (0, _defineProperty3.default)(_ref2, prefixCls + '-with-fixed-top', !!this.height), _ref2)];
  83953. },
  83954. fixedTableClasses: function fixedTableClasses() {
  83955. return [prefixCls + '-fixed', (0, _defineProperty3.default)({}, prefixCls + '-fixed-shadow', this.fixedShadow === 'show' || this.fixedShadow === 'auto' && !this.scrollOnTheLeft)];
  83956. },
  83957. fixedRightTableClasses: function fixedRightTableClasses() {
  83958. return [prefixCls + '-fixed-right', (0, _defineProperty3.default)({}, prefixCls + '-fixed-shadow', this.fixedShadow === 'show' || this.fixedShadow === 'auto' && !this.scrollOnTheRight)];
  83959. },
  83960. fixedHeaderClasses: function fixedHeaderClasses() {
  83961. return [prefixCls + '-fixed-header', (0, _defineProperty3.default)({}, prefixCls + '-fixed-header-with-empty', !this.rebuildData.length)];
  83962. },
  83963. styles: function styles() {
  83964. var style = {};
  83965. var summaryHeight = 0;
  83966. if (this.showSummary) {
  83967. if (this.size === 'small') summaryHeight = 40;else if (this.size === 'large') summaryHeight = 60;else summaryHeight = 48;
  83968. }
  83969. if (this.height) {
  83970. var height = parseInt(this.height) + summaryHeight;
  83971. style.height = String(height) + 'px';
  83972. }
  83973. if (this.maxHeight) {
  83974. var maxHeight = parseInt(this.maxHeight) + summaryHeight;
  83975. style.maxHeight = String(maxHeight) + 'px';
  83976. }
  83977. if (this.width) style.width = String(this.width) + 'px';
  83978. return style;
  83979. },
  83980. tableStyle: function tableStyle() {
  83981. var style = {};
  83982. if (this.tableWidth !== 0) {
  83983. var width = '';
  83984. if (this.bodyHeight === 0) {
  83985. width = this.tableWidth;
  83986. } else {
  83987. width = this.tableWidth - (this.showVerticalScrollBar ? this.scrollBarWidth : 0);
  83988. }
  83989. style.width = String(width) + 'px';
  83990. }
  83991. return style;
  83992. },
  83993. tableHeaderStyle: function tableHeaderStyle() {
  83994. var style = {};
  83995. if (this.tableWidth !== 0) {
  83996. var width = '';
  83997. width = this.tableWidth;
  83998. style.width = String(width) + 'px';
  83999. }
  84000. return style;
  84001. },
  84002. fixedTableStyle: function fixedTableStyle() {
  84003. var _this = this;
  84004. var style = {};
  84005. var width = 0;
  84006. this.leftFixedColumns.forEach(function (col) {
  84007. (0, _newArrowCheck3.default)(this, _this);
  84008. if (col.fixed && col.fixed === 'left') width += col._width;
  84009. }.bind(this));
  84010. style.width = String(width) + 'px';
  84011. return style;
  84012. },
  84013. fixedRightTableStyle: function fixedRightTableStyle() {
  84014. var _this2 = this;
  84015. var style = {};
  84016. var width = 0;
  84017. this.rightFixedColumns.forEach(function (col) {
  84018. (0, _newArrowCheck3.default)(this, _this2);
  84019. if (col.fixed && col.fixed === 'right') width += col._width;
  84020. }.bind(this));
  84021. style.width = String(width) + 'px';
  84022. style.right = String(this.showVerticalScrollBar ? this.scrollBarWidth : 0) + 'px';
  84023. return style;
  84024. },
  84025. fixedRightHeaderStyle: function fixedRightHeaderStyle() {
  84026. var style = {};
  84027. var width = 0;
  84028. var height = this.headerHeight + 1;
  84029. if (this.showVerticalScrollBar) {
  84030. width = this.scrollBarWidth;
  84031. }
  84032. style.width = String(width) + 'px';
  84033. style.height = String(height) + 'px';
  84034. return style;
  84035. },
  84036. bodyStyle: function bodyStyle() {
  84037. var style = {};
  84038. if (this.bodyHeight !== 0) {
  84039. var height = this.bodyHeight;
  84040. if (this.height) {
  84041. style.height = String(height) + 'px';
  84042. } else if (this.maxHeight) {
  84043. style.maxHeight = String(height) + 'px';
  84044. }
  84045. }
  84046. return style;
  84047. },
  84048. fixedBodyStyle: function fixedBodyStyle() {
  84049. var style = {};
  84050. if (this.bodyHeight !== 0) {
  84051. var height = this.bodyHeight - (this.showHorizontalScrollBar ? this.scrollBarWidth : 0);
  84052. var bodyHeight = this.showHorizontalScrollBar ? height + 'px' : height - 1 + 'px';
  84053. if (this.height) style.height = bodyHeight;else if (this.maxHeight) style.maxHeight = bodyHeight;
  84054. }
  84055. return style;
  84056. },
  84057. leftFixedColumns: function leftFixedColumns() {
  84058. return (0, _util.convertColumnOrder)(this.cloneColumns, 'left');
  84059. },
  84060. rightFixedColumns: function rightFixedColumns() {
  84061. return (0, _util.convertColumnOrder)(this.cloneColumns, 'right');
  84062. },
  84063. isLeftFixed: function isLeftFixed() {
  84064. var _this3 = this;
  84065. return this.columns.some(function (col) {
  84066. (0, _newArrowCheck3.default)(this, _this3);
  84067. return col.fixed && col.fixed === 'left';
  84068. }.bind(this));
  84069. },
  84070. isRightFixed: function isRightFixed() {
  84071. var _this4 = this;
  84072. return this.columns.some(function (col) {
  84073. (0, _newArrowCheck3.default)(this, _this4);
  84074. return col.fixed && col.fixed === 'right';
  84075. }.bind(this));
  84076. },
  84077. summaryData: function summaryData() {
  84078. var _this5 = this;
  84079. if (!this.showSummary) return {};
  84080. var sums = {};
  84081. if (this.summaryMethod) {
  84082. sums = this.summaryMethod({ columns: this.cloneColumns, data: this.rebuildData });
  84083. } else {
  84084. this.cloneColumns.forEach(function (column, index) {
  84085. (0, _newArrowCheck3.default)(this, _this5);
  84086. var key = column.key;
  84087. if (index === 0) {
  84088. sums[key] = {
  84089. key: column.key,
  84090. value: this.localeSumText
  84091. };
  84092. return;
  84093. }
  84094. var values = this.rebuildData.map(function (item) {
  84095. (0, _newArrowCheck3.default)(this, _this5);
  84096. return Number(item[column.key]);
  84097. }.bind(this));
  84098. var precisions = [];
  84099. var notNumber = true;
  84100. values.forEach(function (value) {
  84101. (0, _newArrowCheck3.default)(this, _this5);
  84102. if (!isNaN(value)) {
  84103. notNumber = false;
  84104. var decimal = ('' + value).split('.')[1];
  84105. precisions.push(decimal ? decimal.length : 0);
  84106. }
  84107. }.bind(this));
  84108. var precision = Math.max.apply(null, precisions);
  84109. if (!notNumber) {
  84110. var currentValue = values.reduce(function (prev, curr) {
  84111. (0, _newArrowCheck3.default)(this, _this5);
  84112. var value = Number(curr);
  84113. if (!isNaN(value)) {
  84114. return parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
  84115. } else {
  84116. return prev;
  84117. }
  84118. }.bind(this), 0);
  84119. sums[key] = {
  84120. key: column.key,
  84121. value: currentValue
  84122. };
  84123. } else {
  84124. sums[key] = {
  84125. key: column.key,
  84126. value: ''
  84127. };
  84128. }
  84129. }.bind(this));
  84130. }
  84131. return sums;
  84132. }
  84133. },
  84134. methods: {
  84135. rowClsName: function rowClsName(index) {
  84136. return this.rowClassName(this.data[index], index);
  84137. },
  84138. handleResize: function handleResize() {
  84139. var _this6 = this;
  84140. var tableWidth = this.$el.offsetWidth - 1;
  84141. var columnsWidth = {};
  84142. var sumMinWidth = 0;
  84143. var hasWidthColumns = [];
  84144. var noWidthColumns = [];
  84145. var maxWidthColumns = [];
  84146. var noMaxWidthColumns = [];
  84147. this.cloneColumns.forEach(function (col) {
  84148. (0, _newArrowCheck3.default)(this, _this6);
  84149. if (col.width) {
  84150. hasWidthColumns.push(col);
  84151. } else {
  84152. noWidthColumns.push(col);
  84153. if (col.minWidth) {
  84154. sumMinWidth += col.minWidth;
  84155. }
  84156. if (col.maxWidth) {
  84157. maxWidthColumns.push(col);
  84158. } else {
  84159. noMaxWidthColumns.push(col);
  84160. }
  84161. }
  84162. col._width = null;
  84163. }.bind(this));
  84164. var unUsableWidth = hasWidthColumns.map(function (cell) {
  84165. (0, _newArrowCheck3.default)(this, _this6);
  84166. return cell.width;
  84167. }.bind(this)).reduce(function (a, b) {
  84168. (0, _newArrowCheck3.default)(this, _this6);
  84169. return a + b;
  84170. }.bind(this), 0);
  84171. var usableWidth = tableWidth - unUsableWidth - sumMinWidth - (this.showVerticalScrollBar ? this.scrollBarWidth : 0) - 1;
  84172. var usableLength = noWidthColumns.length;
  84173. var columnWidth = 0;
  84174. if (usableWidth > 0 && usableLength > 0) {
  84175. columnWidth = parseInt(usableWidth / usableLength);
  84176. }
  84177. for (var i = 0; i < this.cloneColumns.length; i++) {
  84178. var column = this.cloneColumns[i];
  84179. var width = columnWidth + (column.minWidth ? column.minWidth : 0);
  84180. if (column.width) {
  84181. width = column.width;
  84182. } else {
  84183. if (column._width) {
  84184. width = column._width;
  84185. } else {
  84186. if (column.minWidth > width) {
  84187. width = column.minWidth;
  84188. } else if (column.maxWidth < width) {
  84189. width = column.maxWidth;
  84190. }
  84191. if (usableWidth > 0) {
  84192. usableWidth -= width - (column.minWidth ? column.minWidth : 0);
  84193. usableLength--;
  84194. if (usableLength > 0) {
  84195. columnWidth = parseInt(usableWidth / usableLength);
  84196. } else {
  84197. columnWidth = 0;
  84198. }
  84199. } else {
  84200. columnWidth = 0;
  84201. }
  84202. }
  84203. }
  84204. column._width = width;
  84205. columnsWidth[column._index] = {
  84206. width: width
  84207. };
  84208. }
  84209. if (usableWidth > 0) {
  84210. usableLength = noMaxWidthColumns.length;
  84211. columnWidth = parseInt(usableWidth / usableLength);
  84212. for (var _i = 0; _i < noMaxWidthColumns.length; _i++) {
  84213. var _column = noMaxWidthColumns[_i];
  84214. var _width = _column._width + columnWidth;
  84215. if (usableLength > 1) {
  84216. usableLength--;
  84217. usableWidth -= columnWidth;
  84218. columnWidth = parseInt(usableWidth / usableLength);
  84219. } else {
  84220. columnWidth = 0;
  84221. }
  84222. _column._width = _width;
  84223. columnsWidth[_column._index] = {
  84224. width: _width
  84225. };
  84226. }
  84227. }
  84228. this.tableWidth = this.cloneColumns.map(function (cell) {
  84229. (0, _newArrowCheck3.default)(this, _this6);
  84230. return cell._width;
  84231. }.bind(this)).reduce(function (a, b) {
  84232. (0, _newArrowCheck3.default)(this, _this6);
  84233. return a + b;
  84234. }.bind(this), 0) + (this.showVerticalScrollBar ? this.scrollBarWidth : 0) + 1;
  84235. this.columnsWidth = columnsWidth;
  84236. this.fixedHeader();
  84237. if (this.fixedShadow === 'auto') {
  84238. this.$nextTick(function () {
  84239. (0, _newArrowCheck3.default)(this, _this6);
  84240. var $body = this.$refs.body;
  84241. this.scrollOnTheLeft = $body.scrollLeft === 0;
  84242. this.scrollOnTheRight = $body.scrollWidth === $body.scrollLeft + $body.clientWidth;
  84243. }.bind(this));
  84244. }
  84245. },
  84246. handleMouseIn: function handleMouseIn(_index, rowKey) {
  84247. if (this.disabledHover) return;
  84248. var objData = rowKey ? this.getDataByRowKey(rowKey) : this.objData[_index];
  84249. if (objData._isHover) return;
  84250. objData._isHover = true;
  84251. },
  84252. handleMouseOut: function handleMouseOut(_index, rowKey) {
  84253. if (this.disabledHover) return;
  84254. var objData = rowKey ? this.getDataByRowKey(rowKey) : this.objData[_index];
  84255. objData._isHover = false;
  84256. },
  84257. handleCurrentRow: function handleCurrentRow(type, _index, rowKey) {
  84258. var objData = rowKey ? this.getDataByRowKey(rowKey) : this.objData[_index];
  84259. var oldData = null;
  84260. var oldIndex = -1;
  84261. for (var i in this.objData) {
  84262. if (this.objData[i]._isHighlight) {
  84263. oldIndex = parseInt(i);
  84264. this.objData[i]._isHighlight = false;
  84265. break;
  84266. } else if (this.objData[i].children && this.objData[i].children.length) {
  84267. var resetData = this.handleResetChildrenRow(this.objData[i]);
  84268. if (resetData) oldData = JSON.parse((0, _stringify2.default)(resetData));
  84269. }
  84270. }
  84271. if (type === 'highlight') objData._isHighlight = true;
  84272. if (oldIndex >= 0) {
  84273. oldData = JSON.parse((0, _stringify2.default)(this.cloneData[oldIndex]));
  84274. }
  84275. var newData = type === 'highlight' ? rowKey ? JSON.parse((0, _stringify2.default)(this.getBaseDataByRowKey(rowKey))) : JSON.parse((0, _stringify2.default)(this.cloneData[_index])) : null;
  84276. this.$emit('on-current-change', newData, oldData);
  84277. },
  84278. handleResetChildrenRow: function handleResetChildrenRow(objData) {
  84279. var data = null;
  84280. if (objData.children && objData.children.length) {
  84281. for (var i = 0; i < objData.children.length; i++) {
  84282. var item = objData.children[i];
  84283. if (item._isHighlight) {
  84284. item._isHighlight = false;
  84285. data = item;
  84286. break;
  84287. } else if (item.children && item.children.length) {
  84288. data = this.handleResetChildrenRow(item);
  84289. }
  84290. }
  84291. }
  84292. return data;
  84293. },
  84294. highlightCurrentRow: function highlightCurrentRow(_index, rowKey) {
  84295. var objData = rowKey ? this.getDataByRowKey(rowKey) : this.objData[_index];
  84296. if (!this.highlightRow || objData._isHighlight) return;
  84297. this.handleCurrentRow('highlight', _index, rowKey);
  84298. },
  84299. clearCurrentRow: function clearCurrentRow() {
  84300. if (!this.highlightRow) return;
  84301. this.handleCurrentRow('clear');
  84302. },
  84303. clickCurrentRow: function clickCurrentRow(_index, rowKey) {
  84304. this.highlightCurrentRow(_index, rowKey);
  84305. if (rowKey) {
  84306. this.$emit('on-row-click', JSON.parse((0, _stringify2.default)(this.getBaseDataByRowKey(rowKey))));
  84307. } else {
  84308. this.$emit('on-row-click', JSON.parse((0, _stringify2.default)(this.cloneData[_index])), _index);
  84309. }
  84310. },
  84311. dblclickCurrentRow: function dblclickCurrentRow(_index, rowKey) {
  84312. this.highlightCurrentRow(_index, rowKey);
  84313. if (rowKey) {
  84314. this.$emit('on-row-dblclick', JSON.parse((0, _stringify2.default)(this.getBaseDataByRowKey(rowKey))));
  84315. } else {
  84316. this.$emit('on-row-dblclick', JSON.parse((0, _stringify2.default)(this.cloneData[_index])), _index);
  84317. }
  84318. },
  84319. contextmenuCurrentRow: function contextmenuCurrentRow(_index, rowKey, event) {
  84320. var _this7 = this;
  84321. if (this.contextMenuVisible) this.handleClickContextMenuOutside();
  84322. this.$nextTick(function () {
  84323. (0, _newArrowCheck3.default)(this, _this7);
  84324. var $TableWrap = this.$refs.tableWrap;
  84325. var TableBounding = $TableWrap.getBoundingClientRect();
  84326. var position = {
  84327. left: event.clientX - TableBounding.left + 'px',
  84328. top: event.clientY - TableBounding.top + 'px'
  84329. };
  84330. this.contextMenuStyles = position;
  84331. this.contextMenuVisible = true;
  84332. if (rowKey) {
  84333. this.$emit('on-contextmenu', JSON.parse((0, _stringify2.default)(this.getBaseDataByRowKey(rowKey))), event, position);
  84334. } else {
  84335. this.$emit('on-contextmenu', JSON.parse((0, _stringify2.default)(this.cloneData[_index])), event, position);
  84336. }
  84337. }.bind(this));
  84338. },
  84339. getSelection: function getSelection() {
  84340. var _this8 = this;
  84341. var selectionIndexes = [];
  84342. var selectionRowKeys = [];
  84343. for (var i in this.objData) {
  84344. var objData = this.objData[i];
  84345. if (objData._isChecked) selectionIndexes.push(parseInt(i));
  84346. if (objData.children && objData.children.length) {
  84347. selectionRowKeys = selectionRowKeys.concat(this.getSelectionChildrenRowKeys(objData, selectionRowKeys));
  84348. }
  84349. }
  84350. selectionRowKeys = [].concat((0, _toConsumableArray3.default)(new _set2.default(selectionRowKeys)));
  84351. var selection = [];
  84352. this.data.forEach(function (item, index) {
  84353. (0, _newArrowCheck3.default)(this, _this8);
  84354. if (selectionIndexes.indexOf(index) > -1) {
  84355. selection = selection.concat(item);
  84356. }
  84357. if (item.children && item.children.length && selectionRowKeys.length) {
  84358. selection = selection.concat(this.getSelectionChildren(item, selection, selectionRowKeys));
  84359. }
  84360. }.bind(this));
  84361. selection = [].concat((0, _toConsumableArray3.default)(new _set2.default(selection)));
  84362. return JSON.parse((0, _stringify2.default)(selection));
  84363. },
  84364. getSelectionChildrenRowKeys: function getSelectionChildrenRowKeys(objData, selectionRowKeys) {
  84365. var _this9 = this;
  84366. if (objData.children && objData.children.length) {
  84367. objData.children.forEach(function (item) {
  84368. (0, _newArrowCheck3.default)(this, _this9);
  84369. if (item._isChecked) selectionRowKeys.push(item._rowKey);
  84370. if (item.children && item.children.length) {
  84371. selectionRowKeys = selectionRowKeys.concat(this.getSelectionChildrenRowKeys(item, selectionRowKeys));
  84372. }
  84373. }.bind(this));
  84374. }
  84375. return selectionRowKeys;
  84376. },
  84377. getSelectionChildren: function getSelectionChildren(data, selection, selectionRowKeys) {
  84378. var _this10 = this;
  84379. if (data.children && data.children.length) {
  84380. data.children.forEach(function (item) {
  84381. (0, _newArrowCheck3.default)(this, _this10);
  84382. if (selectionRowKeys.indexOf(item[this.rowKey]) > -1) {
  84383. selection = selection.concat(item);
  84384. }
  84385. if (item.children && item.children.length) {
  84386. selection = selection.concat(this.getSelectionChildren(item, selection, selectionRowKeys));
  84387. }
  84388. }.bind(this));
  84389. }
  84390. return selection;
  84391. },
  84392. toggleSelect: function toggleSelect(_index, rowKey) {
  84393. var data = {};
  84394. if (rowKey) {
  84395. data = this.getDataByRowKey(rowKey);
  84396. } else {
  84397. for (var i in this.objData) {
  84398. if (parseInt(i) === _index) {
  84399. data = this.objData[i];
  84400. break;
  84401. }
  84402. }
  84403. }
  84404. var status = !data._isChecked;
  84405. data._isChecked = status;
  84406. var selection = this.getSelection();
  84407. var selectedData = rowKey ? this.getBaseDataByRowKey(rowKey, this.data) : this.data[_index];
  84408. this.$emit(status ? 'on-select' : 'on-select-cancel', selection, JSON.parse((0, _stringify2.default)(selectedData)));
  84409. this.$emit('on-selection-change', selection);
  84410. },
  84411. toggleExpand: function toggleExpand(_index) {
  84412. var _this11 = this;
  84413. var data = {};
  84414. for (var i in this.objData) {
  84415. if (parseInt(i) === _index) {
  84416. data = this.objData[i];
  84417. break;
  84418. }
  84419. }
  84420. var status = !data._isExpanded;
  84421. this.objData[_index]._isExpanded = status;
  84422. this.$emit('on-expand', JSON.parse((0, _stringify2.default)(this.cloneData[_index])), status);
  84423. if (this.height || this.maxHeight) {
  84424. this.$nextTick(function () {
  84425. (0, _newArrowCheck3.default)(this, _this11);
  84426. return this.fixedBody();
  84427. }.bind(this));
  84428. }
  84429. },
  84430. toggleTree: function toggleTree(rowKey) {
  84431. var _this12 = this;
  84432. var data = this.getDataByRowKey(rowKey);
  84433. if ('_loading' in data && data._loading) return;
  84434. if ('_loading' in data && !data._loading && data.children.length === 0) {
  84435. var sourceData = this.getBaseDataByRowKey(rowKey, this.data);
  84436. this.$set(sourceData, '_loading', true);
  84437. this.loadData(sourceData, function (children) {
  84438. (0, _newArrowCheck3.default)(this, _this12);
  84439. this.$set(sourceData, '_loading', false);
  84440. if (children.length) {
  84441. this.$set(sourceData, 'children', children);
  84442. this.$nextTick(function () {
  84443. (0, _newArrowCheck3.default)(this, _this12);
  84444. var newData = this.getDataByRowKey(rowKey);
  84445. newData._isShowChildren = !newData._isShowChildren;
  84446. this.updateDataStatus(rowKey, '_showChildren', newData._isShowChildren);
  84447. }.bind(this));
  84448. }
  84449. }.bind(this));
  84450. return;
  84451. }
  84452. data._isShowChildren = !data._isShowChildren;
  84453. if (this.updateShowChildren) this.updateDataStatus(rowKey, '_showChildren', data._isShowChildren);
  84454. this.$emit('on-expand-tree', rowKey, data._isShowChildren);
  84455. },
  84456. updateDataStatus: function updateDataStatus(rowKey, key, value) {
  84457. var data = this.getBaseDataByRowKey(rowKey, this.data);
  84458. this.$set(data, key, value);
  84459. },
  84460. getDataByRowKey: function getDataByRowKey(rowKey) {
  84461. var objData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.objData;
  84462. var data = null;
  84463. for (var i in objData) {
  84464. var thisData = objData[i];
  84465. if (thisData._rowKey === rowKey) {
  84466. data = thisData;
  84467. break;
  84468. } else if (thisData.children && thisData.children.length) {
  84469. data = this.getChildrenByRowKey(rowKey, thisData);
  84470. if (data) {
  84471. break;
  84472. }
  84473. }
  84474. }
  84475. return data;
  84476. },
  84477. getChildrenByRowKey: function getChildrenByRowKey(rowKey, objData) {
  84478. var data = null;
  84479. if (objData.children && objData.children.length) {
  84480. for (var i = 0; i < objData.children.length; i++) {
  84481. var item = objData.children[i];
  84482. if (item._rowKey === rowKey) {
  84483. data = item;
  84484. break;
  84485. } else if (item.children && item.children.length) {
  84486. data = this.getChildrenByRowKey(rowKey, item);
  84487. if (data) {
  84488. break;
  84489. }
  84490. }
  84491. }
  84492. }
  84493. return data;
  84494. },
  84495. getBaseDataByRowKey: function getBaseDataByRowKey(rowKey) {
  84496. var sourceData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.cloneData;
  84497. var data = null;
  84498. for (var i = 0; i < sourceData.length; i++) {
  84499. var thisData = sourceData[i];
  84500. if (thisData[this.rowKey] === rowKey) {
  84501. data = thisData;
  84502. break;
  84503. } else if (thisData.children && thisData.children.length) {
  84504. data = this.getChildrenDataByRowKey(rowKey, thisData);
  84505. if (data && data[this.rowKey] === rowKey) return data;
  84506. }
  84507. }
  84508. return data;
  84509. },
  84510. getChildrenDataByRowKey: function getChildrenDataByRowKey(rowKey, cloneData) {
  84511. var data = null;
  84512. if (cloneData.children && cloneData.children.length) {
  84513. for (var i = 0; i < cloneData.children.length; i++) {
  84514. var item = cloneData.children[i];
  84515. if (item[this.rowKey] === rowKey) {
  84516. data = item;
  84517. break;
  84518. } else if (item.children && item.children.length) {
  84519. data = this.getChildrenDataByRowKey(rowKey, item);
  84520. if (data) {
  84521. break;
  84522. }
  84523. }
  84524. }
  84525. }
  84526. return data;
  84527. },
  84528. selectAll: function selectAll(status) {
  84529. var _iteratorNormalCompletion = true;
  84530. var _didIteratorError = false;
  84531. var _iteratorError = undefined;
  84532. try {
  84533. for (var _iterator = (0, _getIterator3.default)(this.rebuildData), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  84534. var data = _step.value;
  84535. var objData = this.objData[data._index];
  84536. if (!objData._isDisabled) {
  84537. objData._isChecked = status;
  84538. }
  84539. if (data.children && data.children.length) {
  84540. this.selectAllChildren(objData, status);
  84541. }
  84542. }
  84543. } catch (err) {
  84544. _didIteratorError = true;
  84545. _iteratorError = err;
  84546. } finally {
  84547. try {
  84548. if (!_iteratorNormalCompletion && _iterator.return) {
  84549. _iterator.return();
  84550. }
  84551. } finally {
  84552. if (_didIteratorError) {
  84553. throw _iteratorError;
  84554. }
  84555. }
  84556. }
  84557. var selection = this.getSelection();
  84558. if (status) {
  84559. this.$emit('on-select-all', selection);
  84560. } else {
  84561. this.$emit('on-select-all-cancel', selection);
  84562. }
  84563. this.$emit('on-selection-change', selection);
  84564. },
  84565. selectAllChildren: function selectAllChildren(data, status) {
  84566. var _this13 = this;
  84567. if (data.children && data.children.length) {
  84568. data.children.map(function (item) {
  84569. (0, _newArrowCheck3.default)(this, _this13);
  84570. if (!item._isDisabled) {
  84571. item._isChecked = status;
  84572. }
  84573. if (item.children && item.children.length) {
  84574. this.selectAllChildren(item, status);
  84575. }
  84576. }.bind(this));
  84577. }
  84578. },
  84579. fixedHeader: function fixedHeader() {
  84580. var _this14 = this;
  84581. if (this.height || this.maxHeight) {
  84582. this.$nextTick(function () {
  84583. (0, _newArrowCheck3.default)(this, _this14);
  84584. var titleHeight = parseInt((0, _assist.getStyle)(this.$refs.title, 'height')) || 0;
  84585. var headerHeight = parseInt((0, _assist.getStyle)(this.$refs.header, 'height')) || 0;
  84586. var footerHeight = parseInt((0, _assist.getStyle)(this.$refs.footer, 'height')) || 0;
  84587. if (this.height) {
  84588. this.bodyHeight = this.height - titleHeight - headerHeight - footerHeight;
  84589. } else if (this.maxHeight) {
  84590. this.bodyHeight = this.maxHeight - titleHeight - headerHeight - footerHeight;
  84591. }
  84592. this.$nextTick(function () {
  84593. (0, _newArrowCheck3.default)(this, _this14);
  84594. return this.fixedBody();
  84595. }.bind(this));
  84596. }.bind(this));
  84597. } else {
  84598. this.bodyHeight = 0;
  84599. this.$nextTick(function () {
  84600. (0, _newArrowCheck3.default)(this, _this14);
  84601. return this.fixedBody();
  84602. }.bind(this));
  84603. }
  84604. },
  84605. fixedBody: function fixedBody() {
  84606. if (this.$refs.header) {
  84607. this.headerWidth = this.$refs.header.children[0].offsetWidth;
  84608. this.headerHeight = this.$refs.header.children[0].offsetHeight;
  84609. }
  84610. if (!this.$refs.tbody || !this.data || this.data.length === 0) {
  84611. this.showVerticalScrollBar = false;
  84612. } else {
  84613. var bodyContentEl = this.$refs.tbody.$el;
  84614. var bodyEl = bodyContentEl.parentElement;
  84615. var bodyContentHeight = bodyContentEl.offsetHeight;
  84616. var bodyHeight = bodyEl.offsetHeight;
  84617. this.showHorizontalScrollBar = bodyEl.offsetWidth < bodyContentEl.offsetWidth + (this.showVerticalScrollBar ? this.scrollBarWidth : 0);
  84618. this.showVerticalScrollBar = this.bodyHeight ? bodyHeight - (this.showHorizontalScrollBar ? this.scrollBarWidth : 0) < bodyContentHeight : false;
  84619. if (this.showVerticalScrollBar) {
  84620. bodyEl.classList.add(this.prefixCls + '-overflowY');
  84621. } else {
  84622. bodyEl.classList.remove(this.prefixCls + '-overflowY');
  84623. }
  84624. if (this.showHorizontalScrollBar) {
  84625. bodyEl.classList.add(this.prefixCls + '-overflowX');
  84626. } else {
  84627. bodyEl.classList.remove(this.prefixCls + '-overflowX');
  84628. }
  84629. }
  84630. },
  84631. hideColumnFilter: function hideColumnFilter() {
  84632. var _this15 = this;
  84633. this.cloneColumns.forEach(function (col) {
  84634. (0, _newArrowCheck3.default)(this, _this15);
  84635. return col._filterVisible = false;
  84636. }.bind(this));
  84637. },
  84638. handleBodyScroll: function handleBodyScroll(event) {
  84639. this.scrollOnTheLeft = event.target.scrollLeft === 0;
  84640. this.scrollOnTheRight = event.target.scrollWidth === event.target.scrollLeft + event.target.clientWidth;
  84641. if (this.showHeader) this.$refs.header.scrollLeft = event.target.scrollLeft;
  84642. if (this.isLeftFixed) this.$refs.fixedBody.scrollTop = event.target.scrollTop;
  84643. if (this.isRightFixed) this.$refs.fixedRightBody.scrollTop = event.target.scrollTop;
  84644. if (this.showSummary && this.$refs.summary) this.$refs.summary.$el.scrollLeft = event.target.scrollLeft;
  84645. this.hideColumnFilter();
  84646. },
  84647. handleFixedMousewheel: function handleFixedMousewheel(event) {
  84648. var _this16 = this;
  84649. var deltaY = event.deltaY;
  84650. if (!deltaY && event.detail) {
  84651. deltaY = event.detail * 40;
  84652. }
  84653. if (!deltaY && event.wheelDeltaY) {
  84654. deltaY = -event.wheelDeltaY;
  84655. }
  84656. if (!deltaY && event.wheelDelta) {
  84657. deltaY = -event.wheelDelta;
  84658. }
  84659. if (!deltaY) return;
  84660. var body = this.$refs.body;
  84661. var currentScrollTop = body.scrollTop;
  84662. if (deltaY < 0 && currentScrollTop !== 0) {
  84663. event.preventDefault();
  84664. }
  84665. if (deltaY > 0 && body.scrollHeight - body.clientHeight > currentScrollTop) {
  84666. event.preventDefault();
  84667. }
  84668. var step = 0;
  84669. var timeId = setInterval(function () {
  84670. (0, _newArrowCheck3.default)(this, _this16);
  84671. step += 5;
  84672. if (deltaY > 0) {
  84673. body.scrollTop += 2;
  84674. } else {
  84675. body.scrollTop -= 2;
  84676. }
  84677. if (step >= Math.abs(deltaY)) {
  84678. clearInterval(timeId);
  84679. }
  84680. }.bind(this), 5);
  84681. },
  84682. handleMouseWheel: function handleMouseWheel(event) {
  84683. var deltaX = event.deltaX;
  84684. var $body = this.$refs.body;
  84685. if (deltaX > 0) {
  84686. $body.scrollLeft = $body.scrollLeft + 10;
  84687. } else {
  84688. $body.scrollLeft = $body.scrollLeft - 10;
  84689. }
  84690. },
  84691. sortData: function sortData(data, type, index) {
  84692. var _this17 = this;
  84693. var key = this.cloneColumns[index].key;
  84694. data.sort(function (a, b) {
  84695. (0, _newArrowCheck3.default)(this, _this17);
  84696. if (this.cloneColumns[index].sortMethod) {
  84697. return this.cloneColumns[index].sortMethod(a[key], b[key], type);
  84698. } else {
  84699. if (type === 'asc') {
  84700. return a[key] > b[key] ? 1 : -1;
  84701. } else if (type === 'desc') {
  84702. return a[key] < b[key] ? 1 : -1;
  84703. }
  84704. }
  84705. }.bind(this));
  84706. for (var i = 0; i < data.length; i++) {
  84707. if (data[i].children && data[i].children.length) {
  84708. data[i].children = this.sortData(data[i].children, type, index);
  84709. }
  84710. }
  84711. return data;
  84712. },
  84713. handleSort: function handleSort(_index, type) {
  84714. var _this18 = this;
  84715. var index = this.GetOriginalIndex(_index);
  84716. this.cloneColumns.forEach(function (col) {
  84717. (0, _newArrowCheck3.default)(this, _this18);
  84718. return col._sortType = 'normal';
  84719. }.bind(this));
  84720. var key = this.cloneColumns[index].key;
  84721. if (this.cloneColumns[index].sortable !== 'custom') {
  84722. if (type === 'normal') {
  84723. this.rebuildData = this.makeDataWithFilter();
  84724. } else {
  84725. this.rebuildData = this.sortData(this.rebuildData, type, index);
  84726. }
  84727. }
  84728. this.cloneColumns[index]._sortType = type;
  84729. this.$emit('on-sort-change', {
  84730. column: JSON.parse((0, _stringify2.default)(this.allColumns[this.cloneColumns[index]._index])),
  84731. key: key,
  84732. order: type
  84733. });
  84734. },
  84735. handleFilterHide: function handleFilterHide(index) {
  84736. if (!this.cloneColumns[index]._isFiltered) this.cloneColumns[index]._filterChecked = [];
  84737. },
  84738. filterData: function filterData(data, column) {
  84739. var _this19 = this;
  84740. return data.filter(function (row) {
  84741. (0, _newArrowCheck3.default)(this, _this19);
  84742. if (typeof column.filterRemote === 'function') return true;
  84743. var status = !column._filterChecked.length;
  84744. for (var i = 0; i < column._filterChecked.length; i++) {
  84745. status = column.filterMethod(column._filterChecked[i], row);
  84746. if (status) break;
  84747. }
  84748. return status;
  84749. }.bind(this));
  84750. },
  84751. filterOtherData: function filterOtherData(data, index) {
  84752. var _this20 = this;
  84753. var column = this.cloneColumns[index];
  84754. if (typeof column.filterRemote === 'function') {
  84755. column.filterRemote.call(this.$parent, column._filterChecked, column.key, column);
  84756. }
  84757. this.cloneColumns.forEach(function (col, colIndex) {
  84758. (0, _newArrowCheck3.default)(this, _this20);
  84759. if (colIndex !== index) {
  84760. data = this.filterData(data, col);
  84761. }
  84762. }.bind(this));
  84763. return data;
  84764. },
  84765. handleFilter: function handleFilter(index) {
  84766. var column = this.cloneColumns[index];
  84767. var filterData = this.makeDataWithSort();
  84768. filterData = this.filterOtherData(filterData, index);
  84769. this.rebuildData = this.filterData(filterData, column);
  84770. this.cloneColumns[index]._isFiltered = true;
  84771. this.cloneColumns[index]._filterVisible = false;
  84772. this.$emit('on-filter-change', column);
  84773. },
  84774. GetOriginalIndex: function GetOriginalIndex(_index) {
  84775. var _this21 = this;
  84776. return this.cloneColumns.findIndex(function (item) {
  84777. (0, _newArrowCheck3.default)(this, _this21);
  84778. return item._index === _index;
  84779. }.bind(this));
  84780. },
  84781. handleFilterSelect: function handleFilterSelect(_index, value) {
  84782. var index = this.GetOriginalIndex(_index);
  84783. this.cloneColumns[index]._filterChecked = [value];
  84784. this.handleFilter(index);
  84785. },
  84786. handleFilterReset: function handleFilterReset(_index) {
  84787. var index = this.GetOriginalIndex(_index);
  84788. this.cloneColumns[index]._isFiltered = false;
  84789. this.cloneColumns[index]._filterVisible = false;
  84790. this.cloneColumns[index]._filterChecked = [];
  84791. var filterData = this.makeDataWithSort();
  84792. filterData = this.filterOtherData(filterData, index);
  84793. this.rebuildData = filterData;
  84794. this.$emit('on-filter-change', this.cloneColumns[index]);
  84795. },
  84796. makeData: function makeData() {
  84797. var _this22 = this;
  84798. var data = (0, _assist.deepCopy)(this.data);
  84799. data.forEach(function (row, index) {
  84800. (0, _newArrowCheck3.default)(this, _this22);
  84801. row._index = index;
  84802. row._rowKey = typeof this.rowKey === 'string' ? row[this.rowKey] : rowKey++;
  84803. if (row.children && row.children.length) {
  84804. row.children = this.makeChildrenData(row);
  84805. }
  84806. }.bind(this));
  84807. return data;
  84808. },
  84809. makeChildrenData: function makeChildrenData(data) {
  84810. var _this23 = this;
  84811. if (data.children && data.children.length) {
  84812. return data.children.map(function (row, index) {
  84813. (0, _newArrowCheck3.default)(this, _this23);
  84814. var newRow = (0, _assist.deepCopy)(row);
  84815. newRow._index = index;
  84816. newRow._rowKey = typeof this.rowKey === 'string' ? newRow[this.rowKey] : rowKey++;
  84817. if (newRow.children && newRow.children.length) {
  84818. newRow.children = this.makeChildrenData(newRow);
  84819. }
  84820. return newRow;
  84821. }.bind(this));
  84822. } else {
  84823. return data;
  84824. }
  84825. },
  84826. makeDataWithSort: function makeDataWithSort() {
  84827. var data = this.makeData();
  84828. var sortType = 'normal';
  84829. var sortIndex = -1;
  84830. var isCustom = false;
  84831. for (var i = 0; i < this.cloneColumns.length; i++) {
  84832. if (this.cloneColumns[i]._sortType !== 'normal') {
  84833. sortType = this.cloneColumns[i]._sortType;
  84834. sortIndex = i;
  84835. isCustom = this.cloneColumns[i].sortable === 'custom';
  84836. break;
  84837. }
  84838. }
  84839. if (sortType !== 'normal' && !isCustom) data = this.sortData(data, sortType, sortIndex);
  84840. return data;
  84841. },
  84842. makeDataWithFilter: function makeDataWithFilter() {
  84843. var _this24 = this;
  84844. var data = this.makeData();
  84845. this.cloneColumns.forEach(function (col) {
  84846. (0, _newArrowCheck3.default)(this, _this24);
  84847. return data = this.filterData(data, col);
  84848. }.bind(this));
  84849. return data;
  84850. },
  84851. makeDataWithSortAndFilter: function makeDataWithSortAndFilter() {
  84852. var _this25 = this;
  84853. var data = this.makeDataWithSort();
  84854. this.cloneColumns.forEach(function (col) {
  84855. (0, _newArrowCheck3.default)(this, _this25);
  84856. return data = this.filterData(data, col);
  84857. }.bind(this));
  84858. return data;
  84859. },
  84860. makeObjBaseData: function makeObjBaseData(row) {
  84861. var newRow = (0, _assist.deepCopy)(row);
  84862. if (typeof this.rowKey === 'string') {
  84863. newRow._rowKey = newRow[this.rowKey];
  84864. }
  84865. newRow._isHover = false;
  84866. if (newRow._disabled) {
  84867. newRow._isDisabled = newRow._disabled;
  84868. } else {
  84869. newRow._isDisabled = false;
  84870. }
  84871. if (newRow._checked) {
  84872. newRow._isChecked = newRow._checked;
  84873. } else {
  84874. newRow._isChecked = false;
  84875. }
  84876. if (newRow._expanded) {
  84877. newRow._isExpanded = newRow._expanded;
  84878. } else {
  84879. newRow._isExpanded = false;
  84880. }
  84881. if (newRow._highlight) {
  84882. newRow._isHighlight = newRow._highlight;
  84883. } else {
  84884. newRow._isHighlight = false;
  84885. }
  84886. return newRow;
  84887. },
  84888. makeObjData: function makeObjData() {
  84889. var _this26 = this;
  84890. var data = {};
  84891. this.data.forEach(function (row, index) {
  84892. (0, _newArrowCheck3.default)(this, _this26);
  84893. var newRow = this.makeObjBaseData(row);
  84894. if (newRow.children && newRow.children.length) {
  84895. if (newRow._showChildren) {
  84896. newRow._isShowChildren = newRow._showChildren;
  84897. } else {
  84898. newRow._isShowChildren = false;
  84899. }
  84900. newRow.children = this.makeChildrenObjData(newRow);
  84901. }
  84902. data[index] = newRow;
  84903. }.bind(this));
  84904. return data;
  84905. },
  84906. makeChildrenObjData: function makeChildrenObjData(data) {
  84907. var _this27 = this;
  84908. if (data.children && data.children.length) {
  84909. return data.children.map(function (row) {
  84910. (0, _newArrowCheck3.default)(this, _this27);
  84911. var newRow = this.makeObjBaseData(row);
  84912. if (newRow._showChildren) {
  84913. newRow._isShowChildren = newRow._showChildren;
  84914. } else {
  84915. newRow._isShowChildren = false;
  84916. }
  84917. if (newRow.children && newRow.children.length) {
  84918. newRow.children = this.makeChildrenObjData(newRow);
  84919. }
  84920. return newRow;
  84921. }.bind(this));
  84922. } else {
  84923. return data;
  84924. }
  84925. },
  84926. makeColumnsId: function makeColumnsId(columns) {
  84927. var _this28 = this;
  84928. return columns.map(function (item) {
  84929. (0, _newArrowCheck3.default)(this, _this28);
  84930. if ('children' in item) this.makeColumnsId(item.children);
  84931. item.__id = (0, _util.getRandomStr)(6);
  84932. return item;
  84933. }.bind(this));
  84934. },
  84935. makeColumns: function makeColumns(cols) {
  84936. var _this29 = this;
  84937. var columns = (0, _assist.deepCopy)((0, _util.getAllColumns)(cols));
  84938. var left = [];
  84939. var right = [];
  84940. var center = [];
  84941. columns.forEach(function (column, index) {
  84942. (0, _newArrowCheck3.default)(this, _this29);
  84943. column._index = index;
  84944. column._columnKey = columnKey++;
  84945. column.width = parseInt(column.width);
  84946. column._width = column.width ? column.width : '';
  84947. column._sortType = 'normal';
  84948. column._filterVisible = false;
  84949. column._isFiltered = false;
  84950. column._filterChecked = [];
  84951. if ('filterMultiple' in column) {
  84952. column._filterMultiple = column.filterMultiple;
  84953. } else {
  84954. column._filterMultiple = true;
  84955. }
  84956. if ('filteredValue' in column) {
  84957. column._filterChecked = column.filteredValue;
  84958. column._isFiltered = true;
  84959. }
  84960. if ('sortType' in column) {
  84961. column._sortType = column.sortType;
  84962. }
  84963. if (column.fixed && column.fixed === 'left') {
  84964. left.push(column);
  84965. } else if (column.fixed && column.fixed === 'right') {
  84966. right.push(column);
  84967. } else {
  84968. center.push(column);
  84969. }
  84970. }.bind(this));
  84971. return left.concat(center).concat(right);
  84972. },
  84973. makeColumnRows: function makeColumnRows(fixedType, cols) {
  84974. return (0, _util.convertToRows)(cols, fixedType);
  84975. },
  84976. exportCsv: function exportCsv(params) {
  84977. if (params.filename) {
  84978. if (params.filename.indexOf('.csv') === -1) {
  84979. params.filename += '.csv';
  84980. }
  84981. } else {
  84982. params.filename = 'table.csv';
  84983. }
  84984. var columns = [];
  84985. var datas = [];
  84986. if (params.columns && params.data) {
  84987. columns = params.columns;
  84988. datas = params.data;
  84989. } else {
  84990. columns = this.allColumns;
  84991. if (!('original' in params)) params.original = true;
  84992. datas = params.original ? this.data : this.rebuildData;
  84993. }
  84994. var noHeader = false;
  84995. if ('noHeader' in params) noHeader = params.noHeader;
  84996. var data = (0, _csv2.default)(columns, datas, params, noHeader);
  84997. if (params.callback) params.callback(data);else _exportCsv2.default.download(params.filename, data);
  84998. },
  84999. dragAndDrop: function dragAndDrop(a, b) {
  85000. this.$emit('on-drag-drop', a, b);
  85001. },
  85002. handleClickContextMenuOutside: function handleClickContextMenuOutside() {
  85003. this.contextMenuVisible = false;
  85004. }
  85005. },
  85006. created: function created() {
  85007. if (!this.context) this.currentContext = this.$parent;
  85008. this.showSlotHeader = this.$slots.header !== undefined;
  85009. this.showSlotFooter = this.$slots.footer !== undefined;
  85010. this.rebuildData = this.makeDataWithSortAndFilter();
  85011. },
  85012. mounted: function mounted() {
  85013. var _this30 = this;
  85014. this.handleResize();
  85015. this.$nextTick(function () {
  85016. (0, _newArrowCheck3.default)(this, _this30);
  85017. return this.ready = true;
  85018. }.bind(this));
  85019. (0, _dom.on)(window, 'resize', this.handleResize);
  85020. this.observer = (0, _elementResizeDetector2.default)();
  85021. this.observer.listenTo(this.$el, this.handleResize);
  85022. this.$on('on-visible-change', function (val) {
  85023. (0, _newArrowCheck3.default)(this, _this30);
  85024. if (val) {
  85025. this.$nextTick(function () {
  85026. (0, _newArrowCheck3.default)(this, _this30);
  85027. this.handleResize();
  85028. }.bind(this));
  85029. }
  85030. }.bind(this));
  85031. },
  85032. beforeDestroy: function beforeDestroy() {
  85033. this.$off('on-visible-change');
  85034. (0, _dom.off)(window, 'resize', this.handleResize);
  85035. this.observer.removeAllListeners(this.$el);
  85036. this.observer.uninstall(this.$el);
  85037. this.observer = null;
  85038. },
  85039. watch: {
  85040. data: {
  85041. handler: function handler() {
  85042. var _this31 = this;
  85043. var oldDataLen = this.rebuildData.length;
  85044. this.objData = this.makeObjData();
  85045. this.rebuildData = this.makeDataWithSortAndFilter();
  85046. this.handleResize();
  85047. if (!oldDataLen) {
  85048. this.fixedHeader();
  85049. }
  85050. setTimeout(function () {
  85051. (0, _newArrowCheck3.default)(this, _this31);
  85052. this.cloneData = (0, _assist.deepCopy)(this.data);
  85053. }.bind(this), 0);
  85054. },
  85055. deep: true
  85056. },
  85057. columns: {
  85058. handler: function handler() {
  85059. var colsWithId = this.makeColumnsId(this.columns);
  85060. this.allColumns = (0, _util.getAllColumns)(colsWithId);
  85061. this.cloneColumns = this.makeColumns(colsWithId);
  85062. this.columnRows = this.makeColumnRows(false, colsWithId);
  85063. this.leftFixedColumnRows = this.makeColumnRows('left', colsWithId);
  85064. this.rightFixedColumnRows = this.makeColumnRows('right', colsWithId);
  85065. this.rebuildData = this.makeDataWithSortAndFilter();
  85066. this.handleResize();
  85067. },
  85068. deep: true
  85069. },
  85070. height: function height() {
  85071. this.handleResize();
  85072. },
  85073. maxHeight: function maxHeight() {
  85074. this.handleResize();
  85075. },
  85076. showHorizontalScrollBar: function showHorizontalScrollBar() {
  85077. this.handleResize();
  85078. },
  85079. showVerticalScrollBar: function showVerticalScrollBar() {
  85080. this.handleResize();
  85081. }
  85082. }
  85083. };
  85084. /***/ }),
  85085. /* 235 */
  85086. /***/ (function(module, exports, __webpack_require__) {
  85087. var isObject = __webpack_require__(18);
  85088. module.exports = function (it, TYPE) {
  85089. if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
  85090. return it;
  85091. };
  85092. /***/ }),
  85093. /* 236 */
  85094. /***/ (function(module, exports, __webpack_require__) {
  85095. "use strict";
  85096. Object.defineProperty(exports, "__esModule", {
  85097. value: true
  85098. });
  85099. var _newArrowCheck2 = __webpack_require__(1);
  85100. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  85101. var _defineProperty2 = __webpack_require__(2);
  85102. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  85103. var _assign = __webpack_require__(15);
  85104. var _assign2 = _interopRequireDefault(_assign);
  85105. var _checkboxGroup = __webpack_require__(143);
  85106. var _checkboxGroup2 = _interopRequireDefault(_checkboxGroup);
  85107. var _checkbox = __webpack_require__(49);
  85108. var _checkbox2 = _interopRequireDefault(_checkbox);
  85109. var _poptip = __webpack_require__(219);
  85110. var _poptip2 = _interopRequireDefault(_poptip);
  85111. var _button = __webpack_require__(28);
  85112. var _button2 = _interopRequireDefault(_button);
  85113. var _header = __webpack_require__(568);
  85114. var _header2 = _interopRequireDefault(_header);
  85115. var _mixin = __webpack_require__(95);
  85116. var _mixin2 = _interopRequireDefault(_mixin);
  85117. var _locale = __webpack_require__(6);
  85118. var _locale2 = _interopRequireDefault(_locale);
  85119. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  85120. exports.default = {
  85121. name: 'TableHead',
  85122. mixins: [_mixin2.default, _locale2.default],
  85123. components: { CheckboxGroup: _checkboxGroup2.default, Checkbox: _checkbox2.default, Poptip: _poptip2.default, iButton: _button2.default, renderHeader: _header2.default },
  85124. props: {
  85125. prefixCls: String,
  85126. styleObject: Object,
  85127. columns: Array,
  85128. objData: Object,
  85129. data: Array,
  85130. columnsWidth: Object,
  85131. fixed: {
  85132. type: [Boolean, String],
  85133. default: false
  85134. },
  85135. columnRows: Array,
  85136. fixedColumnRows: Array
  85137. },
  85138. data: function data() {
  85139. return {
  85140. draggingColumn: null,
  85141. dragging: false,
  85142. dragState: {}
  85143. };
  85144. },
  85145. computed: {
  85146. styles: function styles() {
  85147. var style = (0, _assign2.default)({}, this.styleObject);
  85148. var width = parseInt(this.styleObject.width);
  85149. style.width = String(width) + 'px';
  85150. return style;
  85151. },
  85152. isSelectAll: function isSelectAll() {
  85153. var isSelectAll = true;
  85154. if (!this.data.length) isSelectAll = false;
  85155. var isAllDisabledAndUnSelected = true;
  85156. for (var i in this.objData) {
  85157. var objData = this.objData[i];
  85158. if (!objData._isChecked && !objData._isDisabled) {
  85159. isSelectAll = false;
  85160. break;
  85161. } else if (objData.children && objData.children.length) {
  85162. isSelectAll = this.isChildrenSelected(objData, isSelectAll);
  85163. }
  85164. if (!(objData._isDisabled && !objData._isChecked)) {
  85165. isAllDisabledAndUnSelected = false;
  85166. } else if (objData.children && objData.children.length) {
  85167. isAllDisabledAndUnSelected = this.isChildrenAllDisabledAndUnSelected(objData, isAllDisabledAndUnSelected);
  85168. }
  85169. }
  85170. if (isAllDisabledAndUnSelected) isSelectAll = false;
  85171. return isSelectAll;
  85172. },
  85173. headRows: function headRows() {
  85174. var isGroup = this.columnRows.length > 1;
  85175. if (isGroup) {
  85176. return this.fixed ? this.fixedColumnRows : this.columnRows;
  85177. } else {
  85178. return [this.columns];
  85179. }
  85180. },
  85181. isSelectDisabled: function isSelectDisabled() {
  85182. var isSelectDisabled = true;
  85183. if (this.data.length) {
  85184. for (var i in this.objData) {
  85185. var objData = this.objData[i];
  85186. if (!objData._isDisabled) {
  85187. isSelectDisabled = false;
  85188. } else if (objData.children && objData.children.length) {
  85189. isSelectDisabled = this.isChildrenDisabled(objData, isSelectDisabled);
  85190. }
  85191. }
  85192. }
  85193. return isSelectDisabled;
  85194. }
  85195. },
  85196. methods: {
  85197. cellClasses: function cellClasses(column) {
  85198. var _ref;
  85199. return [String(this.prefixCls) + '-cell', (_ref = {}, (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-hidden', !this.fixed && column.fixed && (column.fixed === 'left' || column.fixed === 'right')), (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-cell-with-selection', column.type === 'selection'), _ref)];
  85200. },
  85201. scrollBarCellClass: function scrollBarCellClass() {
  85202. var hasRightFixed = false;
  85203. for (var i in this.headRows) {
  85204. for (var j in this.headRows[i]) {
  85205. if (this.headRows[i][j].fixed === 'right') {
  85206. hasRightFixed = true;
  85207. break;
  85208. }
  85209. if (hasRightFixed) break;
  85210. }
  85211. }
  85212. return [(0, _defineProperty3.default)({}, String(this.prefixCls) + '-hidden', hasRightFixed)];
  85213. },
  85214. itemClasses: function itemClasses(column, item) {
  85215. return [String(this.prefixCls) + '-filter-select-item', (0, _defineProperty3.default)({}, String(this.prefixCls) + '-filter-select-item-selected', column._filterChecked[0] === item.value)];
  85216. },
  85217. itemAllClasses: function itemAllClasses(column) {
  85218. return [String(this.prefixCls) + '-filter-select-item', (0, _defineProperty3.default)({}, String(this.prefixCls) + '-filter-select-item-selected', !column._filterChecked.length)];
  85219. },
  85220. selectAll: function selectAll() {
  85221. var status = !this.isSelectAll;
  85222. this.$parent.selectAll(status);
  85223. },
  85224. handleSort: function handleSort(index, type) {
  85225. var _this = this;
  85226. var column = this.columns.find(function (item) {
  85227. (0, _newArrowCheck3.default)(this, _this);
  85228. return item._index === index;
  85229. }.bind(this));
  85230. var _index = column._index;
  85231. if (column._sortType === type) {
  85232. type = 'normal';
  85233. }
  85234. this.$parent.handleSort(_index, type);
  85235. },
  85236. handleSortByHead: function handleSortByHead(index) {
  85237. var _this2 = this;
  85238. var column = this.columns.find(function (item) {
  85239. (0, _newArrowCheck3.default)(this, _this2);
  85240. return item._index === index;
  85241. }.bind(this));
  85242. if (column.sortable) {
  85243. var type = column._sortType;
  85244. if (type === 'normal') {
  85245. this.handleSort(index, 'asc');
  85246. } else if (type === 'asc') {
  85247. this.handleSort(index, 'desc');
  85248. } else {
  85249. this.handleSort(index, 'normal');
  85250. }
  85251. }
  85252. },
  85253. handleFilter: function handleFilter(index) {
  85254. this.$parent.handleFilter(index);
  85255. },
  85256. handleSelect: function handleSelect(index, value) {
  85257. this.$parent.handleFilterSelect(index, value);
  85258. },
  85259. handleReset: function handleReset(index) {
  85260. this.$parent.handleFilterReset(index);
  85261. },
  85262. handleFilterHide: function handleFilterHide(index) {
  85263. this.$parent.handleFilterHide(index);
  85264. },
  85265. getColumn: function getColumn(rowIndex, index) {
  85266. var _this3 = this;
  85267. var isGroup = this.columnRows.length > 1;
  85268. if (isGroup) {
  85269. var id = this.headRows[rowIndex][index].__id;
  85270. return this.columns.filter(function (item) {
  85271. (0, _newArrowCheck3.default)(this, _this3);
  85272. return item.__id === id;
  85273. }.bind(this))[0];
  85274. } else {
  85275. return this.headRows[rowIndex][index];
  85276. }
  85277. },
  85278. handleMouseDown: function handleMouseDown(column, event) {
  85279. var _this4 = this;
  85280. if (this.$isServer) return;
  85281. if (this.draggingColumn) {
  85282. this.dragging = true;
  85283. var table = this.$parent;
  85284. var tableEl = table.$el;
  85285. var tableLeft = tableEl.getBoundingClientRect().left;
  85286. var columnEl = this.$el.querySelector('th.ivu-table-column-' + String(column.__id));
  85287. var columnRect = columnEl.getBoundingClientRect();
  85288. var minLeft = columnRect.left - tableLeft + 30;
  85289. table.showResizeLine = true;
  85290. this.dragState = {
  85291. startMouseLeft: event.clientX,
  85292. startLeft: columnRect.right - tableLeft,
  85293. startColumnLeft: columnRect.left - tableLeft,
  85294. tableLeft: tableLeft
  85295. };
  85296. var resizeProxy = table.$refs.resizeLine;
  85297. resizeProxy.style.left = this.dragState.startLeft + 'px';
  85298. document.onselectstart = function () {
  85299. return false;
  85300. };
  85301. document.ondragstart = function () {
  85302. return false;
  85303. };
  85304. var handleMouseMove = function (event) {
  85305. (0, _newArrowCheck3.default)(this, _this4);
  85306. var deltaLeft = event.clientX - this.dragState.startMouseLeft;
  85307. var proxyLeft = this.dragState.startLeft + deltaLeft;
  85308. resizeProxy.style.left = Math.max(minLeft, proxyLeft) + 'px';
  85309. }.bind(this);
  85310. var handleMouseUp = function () {
  85311. (0, _newArrowCheck3.default)(this, _this4);
  85312. if (this.dragging) {
  85313. var _dragState = this.dragState,
  85314. startColumnLeft = _dragState.startColumnLeft,
  85315. startLeft = _dragState.startLeft;
  85316. var finalLeft = parseInt(resizeProxy.style.left, 10);
  85317. var columnWidth = finalLeft - startColumnLeft;
  85318. var _column = table.columns.find(function (item) {
  85319. (0, _newArrowCheck3.default)(this, _this4);
  85320. return item.__id === column.__id;
  85321. }.bind(this));
  85322. if (_column) _column.width = columnWidth;
  85323. table.$emit('on-column-width-resize', _column.width, startLeft - startColumnLeft, column, event);
  85324. document.body.style.cursor = '';
  85325. this.dragging = false;
  85326. this.draggingColumn = null;
  85327. this.dragState = {};
  85328. table.showResizeLine = false;
  85329. }
  85330. document.removeEventListener('mousemove', handleMouseMove);
  85331. document.removeEventListener('mouseup', handleMouseUp);
  85332. document.onselectstart = null;
  85333. document.ondragstart = null;
  85334. }.bind(this);
  85335. document.addEventListener('mousemove', handleMouseMove);
  85336. document.addEventListener('mouseup', handleMouseUp);
  85337. }
  85338. },
  85339. handleMouseMove: function handleMouseMove(column, event) {
  85340. var target = event.target;
  85341. while (target && target.tagName !== 'TH') {
  85342. target = target.parentNode;
  85343. }
  85344. if (!column || !column.resizable) return;
  85345. if (!this.dragging) {
  85346. var rect = target.getBoundingClientRect();
  85347. var bodyStyle = document.body.style;
  85348. if (rect.width > 12 && rect.right - event.pageX < 8) {
  85349. bodyStyle.cursor = 'col-resize';
  85350. this.draggingColumn = column;
  85351. } else if (!this.dragging) {
  85352. bodyStyle.cursor = '';
  85353. this.draggingColumn = null;
  85354. }
  85355. }
  85356. },
  85357. handleMouseOut: function handleMouseOut() {
  85358. if (this.$isServer) return;
  85359. document.body.style.cursor = '';
  85360. },
  85361. isChildrenSelected: function isChildrenSelected(objData, isSelectAll) {
  85362. var _this5 = this;
  85363. var status = isSelectAll;
  85364. if (objData.children && objData.children.length) {
  85365. objData.children.forEach(function (row) {
  85366. (0, _newArrowCheck3.default)(this, _this5);
  85367. if (!row._isChecked && !row._isDisabled) {
  85368. status = false;
  85369. } else if (row.children && row.children.length) {
  85370. status = this.isChildrenSelected(row, status);
  85371. }
  85372. }.bind(this));
  85373. }
  85374. return status;
  85375. },
  85376. isChildrenAllDisabledAndUnSelected: function isChildrenAllDisabledAndUnSelected(objData, isAllDisabledAndUnSelected) {
  85377. var _this6 = this;
  85378. var status = isAllDisabledAndUnSelected;
  85379. if (objData.children && objData.children.length) {
  85380. objData.children.forEach(function (row) {
  85381. (0, _newArrowCheck3.default)(this, _this6);
  85382. if (!(row._isDisabled && !row._isChecked)) {
  85383. status = false;
  85384. } else if (row.children && row.children.length) {
  85385. status = this.isChildrenAllDisabledAndUnSelected(row, status);
  85386. }
  85387. }.bind(this));
  85388. }
  85389. return status;
  85390. },
  85391. isChildrenDisabled: function isChildrenDisabled(objData, isSelectDisabled) {
  85392. var _this7 = this;
  85393. var status = isSelectDisabled;
  85394. if (objData.children && objData.children.length) {
  85395. objData.children.forEach(function (row) {
  85396. (0, _newArrowCheck3.default)(this, _this7);
  85397. if (!row._isDisabled) {
  85398. status = false;
  85399. } else if (row.children && row.children.length) {
  85400. status = this.isChildrenDisabled(row, status);
  85401. }
  85402. }.bind(this));
  85403. }
  85404. return status;
  85405. }
  85406. }
  85407. };
  85408. /***/ }),
  85409. /* 237 */
  85410. /***/ (function(module, exports, __webpack_require__) {
  85411. "use strict";
  85412. Object.defineProperty(exports, "__esModule", {
  85413. value: true
  85414. });
  85415. var _defineProperty2 = __webpack_require__(2);
  85416. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  85417. var _newArrowCheck2 = __webpack_require__(1);
  85418. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  85419. var _typeof2 = __webpack_require__(27);
  85420. var _typeof3 = _interopRequireDefault(_typeof2);
  85421. var _tableTr = __webpack_require__(571);
  85422. var _tableTr2 = _interopRequireDefault(_tableTr);
  85423. var _cell = __webpack_require__(573);
  85424. var _cell2 = _interopRequireDefault(_cell);
  85425. var _expand = __webpack_require__(240);
  85426. var _expand2 = _interopRequireDefault(_expand);
  85427. var _mixin = __webpack_require__(95);
  85428. var _mixin2 = _interopRequireDefault(_mixin);
  85429. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  85430. exports.default = {
  85431. name: 'TableBody',
  85432. mixins: [_mixin2.default],
  85433. components: { TableCell: _cell2.default, Expand: _expand2.default, TableTr: _tableTr2.default },
  85434. props: {
  85435. prefixCls: String,
  85436. styleObject: Object,
  85437. columns: Array,
  85438. data: Array,
  85439. objData: Object,
  85440. columnsWidth: Object,
  85441. fixed: {
  85442. type: [Boolean, String],
  85443. default: false
  85444. },
  85445. draggable: {
  85446. type: Boolean,
  85447. default: false
  85448. },
  85449. rowKey: {
  85450. type: [Boolean, String],
  85451. default: false
  85452. }
  85453. },
  85454. computed: {
  85455. expandRender: function expandRender() {
  85456. var render = function render() {
  85457. return '';
  85458. };
  85459. for (var i = 0; i < this.columns.length; i++) {
  85460. var column = this.columns[i];
  85461. if (column.type && column.type === 'expand') {
  85462. if (column.render) render = column.render;
  85463. }
  85464. }
  85465. return render;
  85466. }
  85467. },
  85468. methods: {
  85469. rowChecked: function rowChecked(_index) {
  85470. return this.objData[_index] && this.objData[_index]._isChecked;
  85471. },
  85472. rowDisabled: function rowDisabled(_index) {
  85473. return this.objData[_index] && this.objData[_index]._isDisabled;
  85474. },
  85475. rowExpanded: function rowExpanded(_index) {
  85476. return this.objData[_index] && this.objData[_index]._isExpanded;
  85477. },
  85478. rowStatusByRowKey: function rowStatusByRowKey(type, rowKey) {
  85479. var data = this.$parent.getDataByRowKey(rowKey);
  85480. return data[type];
  85481. },
  85482. handleMouseIn: function handleMouseIn(_index, event, rowKey) {
  85483. event.stopPropagation();
  85484. this.$parent.handleMouseIn(_index, rowKey);
  85485. },
  85486. handleMouseOut: function handleMouseOut(_index, event, rowKey) {
  85487. event.stopPropagation();
  85488. this.$parent.handleMouseOut(_index, rowKey);
  85489. },
  85490. clickCurrentRow: function clickCurrentRow(_index, event, rowKey) {
  85491. this.$parent.clickCurrentRow(_index, rowKey);
  85492. },
  85493. dblclickCurrentRow: function dblclickCurrentRow(_index, event, rowKey) {
  85494. event.stopPropagation();
  85495. this.$parent.dblclickCurrentRow(_index, rowKey);
  85496. },
  85497. clickCell: function clickCell(row, column, key, event) {
  85498. this.$parent.$emit('on-cell-click', row, column, row[key], event);
  85499. },
  85500. contextmenuCurrentRow: function contextmenuCurrentRow(_index, event, rowKey) {
  85501. event.stopPropagation();
  85502. if (this.$parent.contextMenu) event.preventDefault();
  85503. this.$parent.contextmenuCurrentRow(_index, rowKey, event);
  85504. },
  85505. selectStartCurrentRow: function selectStartCurrentRow() {
  85506. if (this.$parent.contextMenu) {}
  85507. },
  85508. getSpan: function getSpan(row, column, rowIndex, columnIndex) {
  85509. var fn = this.$parent.spanMethod;
  85510. if (typeof fn === 'function') {
  85511. var result = fn({
  85512. row: row,
  85513. column: column,
  85514. rowIndex: rowIndex,
  85515. columnIndex: columnIndex
  85516. });
  85517. var rowspan = 1;
  85518. var colspan = 1;
  85519. if (Array.isArray(result)) {
  85520. rowspan = result[0];
  85521. colspan = result[1];
  85522. } else if ((typeof result === 'undefined' ? 'undefined' : (0, _typeof3.default)(result)) === 'object') {
  85523. rowspan = result.rowspan;
  85524. colspan = result.colspan;
  85525. }
  85526. return {
  85527. rowspan: rowspan,
  85528. colspan: colspan
  85529. };
  85530. } else {
  85531. return {};
  85532. }
  85533. },
  85534. showWithSpan: function showWithSpan(row, column, rowIndex, columnIndex) {
  85535. var result = this.getSpan(row, column, rowIndex, columnIndex);
  85536. return !('rowspan' in result && result.rowspan === 0 || 'colspan' in result && result.colspan === 0);
  85537. },
  85538. isTrShow: function isTrShow(rowKey) {
  85539. var status = true;
  85540. var child = void 0;
  85541. for (var i in this.objData) {
  85542. var row = this.objData[i];
  85543. var showChildren = row._isShowChildren;
  85544. if (row._rowKey === rowKey) {
  85545. status = status && showChildren;
  85546. break;
  85547. } else if (row.children && row.children.length) {
  85548. child = this.getTrStatus(rowKey, row, status && showChildren);
  85549. if (child[0] && child[0]._rowKey === rowKey) {
  85550. return child[1];
  85551. }
  85552. }
  85553. }
  85554. return status;
  85555. },
  85556. getTrStatus: function getTrStatus(rowKey, data, parentStatus) {
  85557. var status = parentStatus;
  85558. var childData = void 0;
  85559. if (data.children && data.children.length) {
  85560. for (var i = 0; i < data.children.length; i++) {
  85561. var row = data.children[i];
  85562. var showChildren = row._isShowChildren;
  85563. if (row._rowKey === rowKey) {
  85564. childData = row;
  85565. status = status && showChildren;
  85566. break;
  85567. } else if (row.children && row.children.length) {
  85568. var child = this.getTrStatus(rowKey, row, status && showChildren);
  85569. if (child[0] && child[0]._rowKey === rowKey) {
  85570. return child;
  85571. }
  85572. }
  85573. }
  85574. }
  85575. return [childData, status];
  85576. },
  85577. getLevel: function getLevel(rowKey) {
  85578. var level = void 0;
  85579. var child = void 0;
  85580. for (var i = 0; i < this.data.length; i++) {
  85581. var row = this.data[i];
  85582. if (row[this.rowKey] === rowKey) {
  85583. level = 0;
  85584. break;
  85585. } else if (row.children && row.children.length) {
  85586. child = this.getChildLevel(row, rowKey, 1);
  85587. if (child[0] && child[0][this.rowKey] === rowKey) {
  85588. return child[1];
  85589. }
  85590. }
  85591. }
  85592. return level;
  85593. },
  85594. getChildLevel: function getChildLevel(data, rowKey, level) {
  85595. var newLevel = void 0;
  85596. var childData = void 0;
  85597. if (data.children && data.children.length) {
  85598. for (var i = 0; i < data.children.length; i++) {
  85599. var row = data.children[i];
  85600. if (row[this.rowKey] === rowKey) {
  85601. childData = row;
  85602. newLevel = level;
  85603. break;
  85604. } else if (row.children && row.children.length) {
  85605. var child = this.getChildLevel(row, rowKey, level + 1);
  85606. if (child[0] && child[0][this.rowKey] === rowKey) {
  85607. return child;
  85608. }
  85609. }
  85610. }
  85611. }
  85612. return [childData, newLevel];
  85613. },
  85614. getChildNode: function getChildNode(h, data, nodes) {
  85615. var _this = this;
  85616. if (data.children && data.children.length) {
  85617. data.children.forEach(function (row, index) {
  85618. (0, _newArrowCheck3.default)(this, _this);
  85619. var $tds = [];
  85620. this.columns.forEach(function (column, colIndex) {
  85621. (0, _newArrowCheck3.default)(this, _this);
  85622. if (this.showWithSpan(row, column, index, colIndex)) {
  85623. var $tableCell = h(_cell2.default, {
  85624. props: {
  85625. fixed: this.fixed,
  85626. 'prefix-cls': this.prefixCls,
  85627. row: row,
  85628. column: column,
  85629. 'natural-index': index,
  85630. index: row._index,
  85631. checked: this.rowStatusByRowKey('_isChecked', row._rowKey),
  85632. disabled: this.rowStatusByRowKey('_isDisabled', row._rowKey),
  85633. expanded: this.rowStatusByRowKey('_isExpanded', row._rowKey),
  85634. treeNode: true,
  85635. treeLevel: this.getLevel(row._rowKey)
  85636. },
  85637. key: column._columnKey
  85638. });
  85639. var $td = h('td', {
  85640. class: this.alignCls(column, row),
  85641. attrs: this.getSpan(row, column, index, colIndex),
  85642. on: {
  85643. click: function click(e) {
  85644. (0, _newArrowCheck3.default)(this, _this);
  85645. return this.clickCell(row, column, column.key, e);
  85646. }.bind(this)
  85647. }
  85648. }, [$tableCell]);
  85649. $tds.push($td);
  85650. }
  85651. }.bind(this));
  85652. var trStyle = {};
  85653. if (!this.isTrShow(data._rowKey)) trStyle.display = 'none';
  85654. var $tableTr = h(_tableTr2.default, {
  85655. props: {
  85656. draggable: false,
  85657. row: row,
  85658. 'prefix-cls': this.prefixCls,
  85659. isChildren: true
  85660. },
  85661. style: trStyle,
  85662. key: this.rowKey ? row._rowKey : index,
  85663. nativeOn: {
  85664. mouseenter: function mouseenter(e) {
  85665. (0, _newArrowCheck3.default)(this, _this);
  85666. return this.handleMouseIn(row._index, e, row._rowKey);
  85667. }.bind(this),
  85668. mouseleave: function mouseleave(e) {
  85669. (0, _newArrowCheck3.default)(this, _this);
  85670. return this.handleMouseOut(row._index, e, row._rowKey);
  85671. }.bind(this),
  85672. click: function click(e) {
  85673. (0, _newArrowCheck3.default)(this, _this);
  85674. return this.clickCurrentRow(row._index, e, row._rowKey);
  85675. }.bind(this),
  85676. dblclick: function dblclick(e) {
  85677. (0, _newArrowCheck3.default)(this, _this);
  85678. return this.dblclickCurrentRow(row._index, e, row._rowKey);
  85679. }.bind(this),
  85680. contextmenu: function contextmenu(e) {
  85681. (0, _newArrowCheck3.default)(this, _this);
  85682. return this.contextmenuCurrentRow(row._index, e, row._rowKey);
  85683. }.bind(this),
  85684. selectstart: function selectstart(e) {
  85685. (0, _newArrowCheck3.default)(this, _this);
  85686. return this.selectStartCurrentRow(row._index, e, row._rowKey);
  85687. }.bind(this)
  85688. }
  85689. }, $tds);
  85690. nodes.push($tableTr);
  85691. if (row.children && row.children.length) {
  85692. this.getChildNode(h, row, nodes);
  85693. }
  85694. }.bind(this));
  85695. return nodes;
  85696. } else {
  85697. return nodes;
  85698. }
  85699. }
  85700. },
  85701. render: function render(h) {
  85702. var _this2 = this;
  85703. var $cols = [];
  85704. this.columns.forEach(function (column) {
  85705. (0, _newArrowCheck3.default)(this, _this2);
  85706. var $col = h('col', {
  85707. attrs: {
  85708. width: this.setCellWidth(column)
  85709. }
  85710. });
  85711. $cols.push($col);
  85712. }.bind(this));
  85713. var $colgroup = h('colgroup', {}, $cols);
  85714. var $tableTrs = [];
  85715. this.data.forEach(function (row, index) {
  85716. (0, _newArrowCheck3.default)(this, _this2);
  85717. var $tds = [];
  85718. this.columns.forEach(function (column, colIndex) {
  85719. (0, _newArrowCheck3.default)(this, _this2);
  85720. if (this.showWithSpan(row, column, index, colIndex)) {
  85721. var $tableCell = h(_cell2.default, {
  85722. props: {
  85723. fixed: this.fixed,
  85724. 'prefix-cls': this.prefixCls,
  85725. row: row,
  85726. column: column,
  85727. 'natural-index': index,
  85728. index: row._index,
  85729. checked: this.rowChecked(row._index),
  85730. disabled: this.rowDisabled(row._index),
  85731. expanded: this.rowExpanded(row._index)
  85732. },
  85733. key: column._columnKey
  85734. });
  85735. var $td = h('td', {
  85736. class: this.alignCls(column, row),
  85737. attrs: this.getSpan(row, column, index, colIndex),
  85738. on: {
  85739. click: function click(e) {
  85740. (0, _newArrowCheck3.default)(this, _this2);
  85741. return this.clickCell(row, column, column.key, e);
  85742. }.bind(this)
  85743. }
  85744. }, [$tableCell]);
  85745. $tds.push($td);
  85746. }
  85747. }.bind(this));
  85748. var $tableTr = h(_tableTr2.default, {
  85749. props: {
  85750. draggable: this.draggable,
  85751. row: row,
  85752. 'prefix-cls': this.prefixCls
  85753. },
  85754. key: this.rowKey ? row._rowKey : index,
  85755. nativeOn: {
  85756. mouseenter: function mouseenter(e) {
  85757. (0, _newArrowCheck3.default)(this, _this2);
  85758. return this.handleMouseIn(row._index, e);
  85759. }.bind(this),
  85760. mouseleave: function mouseleave(e) {
  85761. (0, _newArrowCheck3.default)(this, _this2);
  85762. return this.handleMouseOut(row._index, e);
  85763. }.bind(this),
  85764. click: function click(e) {
  85765. (0, _newArrowCheck3.default)(this, _this2);
  85766. return this.clickCurrentRow(row._index, e);
  85767. }.bind(this),
  85768. dblclick: function dblclick(e) {
  85769. (0, _newArrowCheck3.default)(this, _this2);
  85770. return this.dblclickCurrentRow(row._index, e);
  85771. }.bind(this),
  85772. contextmenu: function contextmenu(e) {
  85773. (0, _newArrowCheck3.default)(this, _this2);
  85774. return this.contextmenuCurrentRow(row._index, e);
  85775. }.bind(this),
  85776. selectstart: function selectstart(e) {
  85777. (0, _newArrowCheck3.default)(this, _this2);
  85778. return this.selectStartCurrentRow(row._index, e);
  85779. }.bind(this)
  85780. }
  85781. }, $tds);
  85782. $tableTrs.push($tableTr);
  85783. if (this.rowExpanded(row._index)) {
  85784. var $Expand = h(_expand2.default, {
  85785. props: {
  85786. row: row,
  85787. render: this.expandRender,
  85788. index: row._index
  85789. },
  85790. key: this.rowKey ? row._rowKey : index
  85791. });
  85792. var $td = h('td', {
  85793. attrs: {
  85794. colspan: this.columns.length
  85795. },
  85796. class: this.prefixCls + '-expanded-cell'
  85797. }, [$Expand]);
  85798. var $tr = h('tr', {
  85799. class: (0, _defineProperty3.default)({}, this.prefixCls + '-expanded-hidden', this.fixed)
  85800. }, [$td]);
  85801. $tableTrs.push($tr);
  85802. }
  85803. if (row.children && row.children.length) {
  85804. var $childNodes = this.getChildNode(h, row, []);
  85805. $childNodes.forEach(function (item) {
  85806. (0, _newArrowCheck3.default)(this, _this2);
  85807. $tableTrs.push(item);
  85808. }.bind(this));
  85809. }
  85810. }.bind(this));
  85811. var $tbody = h('tbody', {
  85812. class: this.prefixCls + '-tbody'
  85813. }, [$tableTrs]);
  85814. return h('table', {
  85815. attrs: {
  85816. cellspacing: '0',
  85817. cellpadding: '0',
  85818. border: '0'
  85819. },
  85820. style: this.styleObject
  85821. }, [$colgroup, $tbody]);
  85822. }
  85823. };
  85824. /***/ }),
  85825. /* 238 */
  85826. /***/ (function(module, exports, __webpack_require__) {
  85827. "use strict";
  85828. Object.defineProperty(exports, "__esModule", {
  85829. value: true
  85830. });
  85831. var _defineProperty2 = __webpack_require__(2);
  85832. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  85833. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  85834. exports.default = {
  85835. props: {
  85836. row: Object,
  85837. prefixCls: String,
  85838. draggable: Boolean,
  85839. isChildren: Boolean },
  85840. computed: {
  85841. objData: function objData() {
  85842. return this.$parent.objData;
  85843. }
  85844. },
  85845. methods: {
  85846. onDrag: function onDrag(e, index) {
  85847. e.dataTransfer.setData('index', index);
  85848. },
  85849. onDrop: function onDrop(e, index) {
  85850. var dragIndex = e.dataTransfer.getData('index');
  85851. this.$parent.$parent.dragAndDrop(dragIndex, index);
  85852. e.preventDefault();
  85853. },
  85854. allowDrop: function allowDrop(e) {
  85855. e.preventDefault();
  85856. },
  85857. rowClasses: function rowClasses(_index) {
  85858. var _ref;
  85859. var objData = this.isChildren ? this.$parent.$parent.getDataByRowKey(this.row._rowKey) : this.objData[_index];
  85860. return [String(this.prefixCls) + '-row', this.rowClsName(_index), (_ref = {}, (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-row-highlight', objData && objData._isHighlight), (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-row-hover', objData && objData._isHover), _ref)];
  85861. },
  85862. rowClsName: function rowClsName(_index) {
  85863. return this.$parent.$parent.rowClassName(this.objData[_index], _index);
  85864. }
  85865. }
  85866. };
  85867. /***/ }),
  85868. /* 239 */
  85869. /***/ (function(module, exports, __webpack_require__) {
  85870. "use strict";
  85871. Object.defineProperty(exports, "__esModule", {
  85872. value: true
  85873. });
  85874. var _defineProperty2 = __webpack_require__(2);
  85875. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  85876. var _expand = __webpack_require__(240);
  85877. var _expand2 = _interopRequireDefault(_expand);
  85878. var _slot = __webpack_require__(574);
  85879. var _slot2 = _interopRequireDefault(_slot);
  85880. var _icon = __webpack_require__(8);
  85881. var _icon2 = _interopRequireDefault(_icon);
  85882. var _checkbox = __webpack_require__(49);
  85883. var _checkbox2 = _interopRequireDefault(_checkbox);
  85884. var _tooltip = __webpack_require__(93);
  85885. var _tooltip2 = _interopRequireDefault(_tooltip);
  85886. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  85887. exports.default = {
  85888. name: 'TableCell',
  85889. components: { Icon: _icon2.default, Checkbox: _checkbox2.default, TableExpand: _expand2.default, TableSlot: _slot2.default, Tooltip: _tooltip2.default },
  85890. inject: ['tableRoot'],
  85891. props: {
  85892. prefixCls: String,
  85893. row: Object,
  85894. column: Object,
  85895. naturalIndex: Number,
  85896. index: Number,
  85897. checked: Boolean,
  85898. disabled: Boolean,
  85899. expanded: Boolean,
  85900. fixed: {
  85901. type: [Boolean, String],
  85902. default: false
  85903. },
  85904. treeNode: Boolean,
  85905. treeLevel: {
  85906. type: Number,
  85907. default: 0
  85908. }
  85909. },
  85910. data: function data() {
  85911. return {
  85912. renderType: '',
  85913. uid: -1,
  85914. context: this.$parent.$parent.$parent.currentContext,
  85915. showTooltip: false };
  85916. },
  85917. computed: {
  85918. classes: function classes() {
  85919. var _ref;
  85920. return [String(this.prefixCls) + '-cell', (_ref = {}, (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-hidden', !this.fixed && this.column.fixed && (this.column.fixed === 'left' || this.column.fixed === 'right')), (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-cell-ellipsis', this.column.ellipsis || false), (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-cell-with-expand', this.renderType === 'expand'), (0, _defineProperty3.default)(_ref, String(this.prefixCls) + '-cell-with-selection', this.renderType === 'selection'), _ref)];
  85921. },
  85922. expandCls: function expandCls() {
  85923. return [String(this.prefixCls) + '-cell-expand', (0, _defineProperty3.default)({}, String(this.prefixCls) + '-cell-expand-expanded', this.expanded)];
  85924. },
  85925. showChildren: function showChildren() {
  85926. var status = false;
  85927. if (this.renderType === 'html' || this.renderType === 'normal' || this.renderType === 'render' || this.renderType === 'slot') {
  85928. var data = this.row;
  85929. if (data.children && data.children.length || '_loading' in data) {
  85930. if (this.column.tree) status = true;
  85931. }
  85932. }
  85933. return status;
  85934. },
  85935. showTreeNode: function showTreeNode() {
  85936. var status = false;
  85937. if (this.renderType === 'html' || this.renderType === 'normal' || this.renderType === 'render' || this.renderType === 'slot') {
  85938. if (this.column.tree && this.treeNode) status = true;
  85939. }
  85940. return status;
  85941. },
  85942. showLevel: function showLevel() {
  85943. var status = false;
  85944. if (this.renderType === 'html' || this.renderType === 'normal' || this.renderType === 'render' || this.renderType === 'slot') {
  85945. if (this.column.tree && this.treeNode) status = true;
  85946. }
  85947. return status;
  85948. },
  85949. treeLevelStyle: function treeLevelStyle() {
  85950. return {
  85951. 'padding-left': this.treeLevel * this.tableRoot.indentSize + 'px'
  85952. };
  85953. },
  85954. childrenExpand: function childrenExpand() {
  85955. var data = this.tableRoot.getDataByRowKey(this.row._rowKey);
  85956. return data._isShowChildren;
  85957. },
  85958. childrenLoading: function childrenLoading() {
  85959. var data = this.tableRoot.getDataByRowKey(this.row._rowKey);
  85960. return '_loading' in data && data._loading;
  85961. }
  85962. },
  85963. methods: {
  85964. toggleSelect: function toggleSelect() {
  85965. if (this.treeNode) {
  85966. this.$parent.$parent.$parent.toggleSelect(this.index, this.row._rowKey);
  85967. } else {
  85968. this.$parent.$parent.$parent.toggleSelect(this.index);
  85969. }
  85970. },
  85971. toggleExpand: function toggleExpand() {
  85972. this.$parent.$parent.$parent.toggleExpand(this.index);
  85973. },
  85974. handleClick: function handleClick() {},
  85975. handleTooltipIn: function handleTooltipIn() {
  85976. var $content = this.$refs.content;
  85977. var range = document.createRange();
  85978. range.setStart($content, 0);
  85979. range.setEnd($content, $content.childNodes.length);
  85980. var rangeWidth = range.getBoundingClientRect().width;
  85981. this.showTooltip = rangeWidth > $content.offsetWidth;
  85982. range = null;
  85983. },
  85984. handleToggleTree: function handleToggleTree() {
  85985. this.$parent.$parent.$parent.toggleTree(this.row._rowKey);
  85986. }
  85987. },
  85988. created: function created() {
  85989. if (this.column.type === 'index') {
  85990. this.renderType = 'index';
  85991. } else if (this.column.type === 'selection') {
  85992. this.renderType = 'selection';
  85993. } else if (this.column.type === 'html') {
  85994. this.renderType = 'html';
  85995. } else if (this.column.type === 'expand') {
  85996. this.renderType = 'expand';
  85997. } else if (this.column.render) {
  85998. this.renderType = 'render';
  85999. } else if (this.column.slot) {
  86000. this.renderType = 'slot';
  86001. } else {
  86002. this.renderType = 'normal';
  86003. }
  86004. }
  86005. };
  86006. /***/ }),
  86007. /* 240 */
  86008. /***/ (function(module, exports, __webpack_require__) {
  86009. "use strict";
  86010. Object.defineProperty(exports, "__esModule", {
  86011. value: true
  86012. });
  86013. var _newArrowCheck2 = __webpack_require__(1);
  86014. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  86015. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  86016. exports.default = {
  86017. name: 'TableExpand',
  86018. functional: true,
  86019. props: {
  86020. row: Object,
  86021. render: Function,
  86022. index: Number,
  86023. column: {
  86024. type: Object,
  86025. default: null
  86026. }
  86027. },
  86028. render: function render(h, ctx) {
  86029. (0, _newArrowCheck3.default)(undefined, undefined);
  86030. var params = {
  86031. row: ctx.props.row,
  86032. index: ctx.props.index
  86033. };
  86034. if (ctx.props.column) params.column = ctx.props.column;
  86035. return ctx.props.render(h, params);
  86036. }.bind(undefined)
  86037. };
  86038. /***/ }),
  86039. /* 241 */
  86040. /***/ (function(module, exports, __webpack_require__) {
  86041. "use strict";
  86042. Object.defineProperty(exports, "__esModule", {
  86043. value: true
  86044. });
  86045. var _defineProperty2 = __webpack_require__(2);
  86046. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  86047. var _mixin = __webpack_require__(95);
  86048. var _mixin2 = _interopRequireDefault(_mixin);
  86049. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  86050. exports.default = {
  86051. name: 'TableSummary',
  86052. mixins: [_mixin2.default],
  86053. props: {
  86054. prefixCls: String,
  86055. styleObject: Object,
  86056. columns: Array,
  86057. data: Object,
  86058. columnsWidth: Object,
  86059. fixed: {
  86060. type: [Boolean, String],
  86061. default: false
  86062. }
  86063. },
  86064. methods: {
  86065. cellCls: function cellCls(column) {
  86066. return [(0, _defineProperty3.default)({}, 'ivu-table-hidden', this.fixed === 'left' && column.fixed !== 'left' || this.fixed === 'right' && column.fixed !== 'right' || !this.fixed && column.fixed && (column.fixed === 'left' || column.fixed === 'right'))];
  86067. }
  86068. }
  86069. };
  86070. /***/ }),
  86071. /* 242 */
  86072. /***/ (function(module, exports, __webpack_require__) {
  86073. "use strict";
  86074. Object.defineProperty(exports, "__esModule", {
  86075. value: true
  86076. });
  86077. var _toConsumableArray2 = __webpack_require__(17);
  86078. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  86079. var _typeof2 = __webpack_require__(27);
  86080. var _typeof3 = _interopRequireDefault(_typeof2);
  86081. var _defineProperty2 = __webpack_require__(2);
  86082. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  86083. var _getIterator2 = __webpack_require__(45);
  86084. var _getIterator3 = _interopRequireDefault(_getIterator2);
  86085. var _newArrowCheck2 = __webpack_require__(1);
  86086. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  86087. var _icon = __webpack_require__(8);
  86088. var _icon2 = _interopRequireDefault(_icon);
  86089. var _render = __webpack_require__(215);
  86090. var _render2 = _interopRequireDefault(_render);
  86091. var _dropdown = __webpack_require__(61);
  86092. var _dropdown2 = _interopRequireDefault(_dropdown);
  86093. var _dropdownMenu = __webpack_require__(62);
  86094. var _dropdownMenu2 = _interopRequireDefault(_dropdownMenu);
  86095. var _assist = __webpack_require__(3);
  86096. var _emitter = __webpack_require__(4);
  86097. var _emitter2 = _interopRequireDefault(_emitter);
  86098. var _elementResizeDetector = __webpack_require__(94);
  86099. var _elementResizeDetector2 = _interopRequireDefault(_elementResizeDetector);
  86100. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  86101. var prefixCls = 'ivu-tabs';
  86102. var transitionTime = 300;
  86103. var getNextTab = function (list, activeKey, direction, countDisabledAlso) {
  86104. (0, _newArrowCheck3.default)(undefined, undefined);
  86105. var currentIndex = list.findIndex(function (tab) {
  86106. (0, _newArrowCheck3.default)(undefined, undefined);
  86107. return tab.name === activeKey;
  86108. }.bind(undefined));
  86109. var nextIndex = (currentIndex + direction + list.length) % list.length;
  86110. var nextTab = list[nextIndex];
  86111. if (nextTab.disabled) return getNextTab(list, nextTab.name, direction, countDisabledAlso);else return nextTab;
  86112. }.bind(undefined);
  86113. var focusFirst = function (element, root) {
  86114. (0, _newArrowCheck3.default)(undefined, undefined);
  86115. try {
  86116. element.focus();
  86117. } catch (err) {}
  86118. if (document.activeElement == element && element !== root) return true;
  86119. var candidates = element.children;
  86120. var _iteratorNormalCompletion = true;
  86121. var _didIteratorError = false;
  86122. var _iteratorError = undefined;
  86123. try {
  86124. for (var _iterator = (0, _getIterator3.default)(candidates), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
  86125. var candidate = _step.value;
  86126. if (focusFirst(candidate, root)) return true;
  86127. }
  86128. } catch (err) {
  86129. _didIteratorError = true;
  86130. _iteratorError = err;
  86131. } finally {
  86132. try {
  86133. if (!_iteratorNormalCompletion && _iterator.return) {
  86134. _iterator.return();
  86135. }
  86136. } finally {
  86137. if (_didIteratorError) {
  86138. throw _iteratorError;
  86139. }
  86140. }
  86141. }
  86142. return false;
  86143. }.bind(undefined);
  86144. exports.default = {
  86145. name: 'Tabs',
  86146. mixins: [_emitter2.default],
  86147. components: { Icon: _icon2.default, Render: _render2.default, Dropdown: _dropdown2.default, DropdownMenu: _dropdownMenu2.default },
  86148. provide: function provide() {
  86149. return { TabsInstance: this };
  86150. },
  86151. props: {
  86152. value: {
  86153. type: [String, Number]
  86154. },
  86155. type: {
  86156. validator: function validator(value) {
  86157. return (0, _assist.oneOf)(value, ['line', 'card']);
  86158. },
  86159. default: 'line'
  86160. },
  86161. size: {
  86162. validator: function validator(value) {
  86163. return (0, _assist.oneOf)(value, ['small', 'default']);
  86164. },
  86165. default: 'default'
  86166. },
  86167. animated: {
  86168. type: Boolean,
  86169. default: true
  86170. },
  86171. captureFocus: {
  86172. type: Boolean,
  86173. default: false
  86174. },
  86175. closable: {
  86176. type: Boolean,
  86177. default: false
  86178. },
  86179. beforeRemove: Function,
  86180. name: {
  86181. type: String
  86182. },
  86183. draggable: {
  86184. type: Boolean,
  86185. default: false
  86186. }
  86187. },
  86188. data: function data() {
  86189. return {
  86190. prefixCls: prefixCls,
  86191. navList: [],
  86192. barWidth: 0,
  86193. barOffset: 0,
  86194. activeKey: this.value,
  86195. focusedKey: this.value,
  86196. showSlot: false,
  86197. navStyle: {
  86198. transform: ''
  86199. },
  86200. scrollable: false,
  86201. transitioning: false,
  86202. contextMenuVisible: false,
  86203. contextMenuStyles: {
  86204. top: 0,
  86205. left: 0
  86206. }
  86207. };
  86208. },
  86209. computed: {
  86210. classes: function classes() {
  86211. var _ref;
  86212. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-card', this.type === 'card'), (0, _defineProperty3.default)(_ref, prefixCls + '-mini', this.size === 'small' && this.type === 'line'), (0, _defineProperty3.default)(_ref, prefixCls + '-no-animation', !this.animated), _ref)];
  86213. },
  86214. contentClasses: function contentClasses() {
  86215. return [prefixCls + '-content', (0, _defineProperty3.default)({}, prefixCls + '-content-animated', this.animated)];
  86216. },
  86217. barClasses: function barClasses() {
  86218. return [prefixCls + '-ink-bar', (0, _defineProperty3.default)({}, prefixCls + '-ink-bar-animated', this.animated)];
  86219. },
  86220. contentStyle: function contentStyle() {
  86221. var x = this.getTabIndex(this.activeKey);
  86222. var p = x === 0 ? '0%' : '-' + String(x) + '00%';
  86223. var style = {};
  86224. if (x > -1) {
  86225. style = {
  86226. transform: 'translateX(' + p + ') translateZ(0px)'
  86227. };
  86228. }
  86229. return style;
  86230. },
  86231. barStyle: function barStyle() {
  86232. var style = {
  86233. visibility: 'hidden',
  86234. width: String(this.barWidth) + 'px'
  86235. };
  86236. if (this.type === 'line') style.visibility = 'visible';
  86237. if (this.animated) {
  86238. style.transform = 'translate3d(' + String(this.barOffset) + 'px, 0px, 0px)';
  86239. } else {
  86240. style.left = String(this.barOffset) + 'px';
  86241. }
  86242. return style;
  86243. },
  86244. arrowType: function arrowType() {
  86245. var type = 'ios-close';
  86246. if (this.$IVIEW) {
  86247. if (this.$IVIEW.tabs.customCloseIcon) {
  86248. type = '';
  86249. } else if (this.$IVIEW.tabs.closeIcon) {
  86250. type = this.$IVIEW.tabs.closeIcon;
  86251. }
  86252. }
  86253. return type;
  86254. },
  86255. customArrowType: function customArrowType() {
  86256. var type = '';
  86257. if (this.$IVIEW) {
  86258. if (this.$IVIEW.tabs.customCloseIcon) {
  86259. type = this.$IVIEW.tabs.customCloseIcon;
  86260. }
  86261. }
  86262. return type;
  86263. },
  86264. arrowSize: function arrowSize() {
  86265. var size = '';
  86266. if (this.$IVIEW) {
  86267. if (this.$IVIEW.tabs.closeIconSize) {
  86268. size = this.$IVIEW.tabs.closeIconSize;
  86269. }
  86270. }
  86271. return size;
  86272. }
  86273. },
  86274. methods: {
  86275. getTabs: function getTabs() {
  86276. var _this = this;
  86277. var AllTabPanes = (0, _assist.findComponentsDownward)(this, 'TabPane');
  86278. var TabPanes = [];
  86279. AllTabPanes.forEach(function (item) {
  86280. (0, _newArrowCheck3.default)(this, _this);
  86281. if (item.tab && this.name) {
  86282. if (item.tab === this.name) {
  86283. TabPanes.push(item);
  86284. }
  86285. } else {
  86286. TabPanes.push(item);
  86287. }
  86288. }.bind(this));
  86289. TabPanes.sort(function (a, b) {
  86290. (0, _newArrowCheck3.default)(this, _this);
  86291. if (a.index && b.index) {
  86292. return a.index > b.index ? 1 : -1;
  86293. }
  86294. }.bind(this));
  86295. return TabPanes;
  86296. },
  86297. updateNav: function updateNav() {
  86298. var _this2 = this;
  86299. this.navList = [];
  86300. this.getTabs().forEach(function (pane, index) {
  86301. (0, _newArrowCheck3.default)(this, _this2);
  86302. this.navList.push({
  86303. labelType: (0, _typeof3.default)(pane.label),
  86304. label: pane.label,
  86305. icon: pane.icon || '',
  86306. name: pane.currentName || index,
  86307. disabled: pane.disabled,
  86308. closable: pane.closable,
  86309. contextMenu: pane.contextMenu
  86310. });
  86311. if (!pane.currentName) pane.currentName = index;
  86312. if (index === 0) {
  86313. if (!this.activeKey) this.activeKey = pane.currentName || index;
  86314. }
  86315. }.bind(this));
  86316. this.updateStatus();
  86317. this.updateBar();
  86318. },
  86319. updateBar: function updateBar() {
  86320. var _this3 = this;
  86321. this.$nextTick(function () {
  86322. (0, _newArrowCheck3.default)(this, _this3);
  86323. var index = this.getTabIndex(this.activeKey);
  86324. if (!this.$refs.nav) return;
  86325. var prevTabs = this.$refs.nav.querySelectorAll('.' + prefixCls + '-tab');
  86326. var tab = prevTabs[index];
  86327. this.barWidth = tab ? parseFloat(tab.offsetWidth) : 0;
  86328. if (index > 0) {
  86329. var offset = 0;
  86330. var gutter = this.size === 'small' ? 0 : 16;
  86331. for (var i = 0; i < index; i++) {
  86332. offset += parseFloat(prevTabs[i].offsetWidth) + gutter;
  86333. }
  86334. this.barOffset = offset;
  86335. } else {
  86336. this.barOffset = 0;
  86337. }
  86338. this.updateNavScroll();
  86339. }.bind(this));
  86340. },
  86341. updateStatus: function updateStatus() {
  86342. var _this4 = this;
  86343. var tabs = this.getTabs();
  86344. tabs.forEach(function (tab) {
  86345. (0, _newArrowCheck3.default)(this, _this4);
  86346. return tab.show = tab.currentName === this.activeKey || this.animated;
  86347. }.bind(this));
  86348. },
  86349. tabCls: function tabCls(item) {
  86350. var _ref4;
  86351. return [prefixCls + '-tab', (_ref4 = {}, (0, _defineProperty3.default)(_ref4, prefixCls + '-tab-disabled', item.disabled), (0, _defineProperty3.default)(_ref4, prefixCls + '-tab-active', item.name === this.activeKey), (0, _defineProperty3.default)(_ref4, prefixCls + '-tab-focused', item.name === this.focusedKey), _ref4)];
  86352. },
  86353. handleChange: function handleChange(index) {
  86354. var _this5 = this;
  86355. if (this.transitioning) return;
  86356. this.transitioning = true;
  86357. setTimeout(function () {
  86358. (0, _newArrowCheck3.default)(this, _this5);
  86359. return this.transitioning = false;
  86360. }.bind(this), transitionTime);
  86361. var nav = this.navList[index];
  86362. if (!nav || nav.disabled) return;
  86363. this.activeKey = nav.name;
  86364. this.$emit('input', nav.name);
  86365. this.$emit('on-click', nav.name);
  86366. },
  86367. handleDblclick: function handleDblclick(index) {
  86368. var nav = this.navList[index];
  86369. if (!nav || nav.disabled) return;
  86370. this.$emit('on-dblclick', nav.name);
  86371. },
  86372. handleContextmenu: function handleContextmenu(index, event) {
  86373. var _this6 = this;
  86374. if (this.contextMenuVisible) this.handleClickContextMenuOutside();
  86375. this.$nextTick(function () {
  86376. (0, _newArrowCheck3.default)(this, _this6);
  86377. var nav = this.navList[index];
  86378. if (!nav || nav.disabled || !nav.contextMenu) return;
  86379. event.preventDefault();
  86380. var $TabsWrap = this.$refs.tabsWrap;
  86381. var TabsBounding = $TabsWrap.getBoundingClientRect();
  86382. var position = {
  86383. left: event.clientX - TabsBounding.left + 'px',
  86384. top: event.clientY - TabsBounding.top + 'px'
  86385. };
  86386. this.contextMenuStyles = position;
  86387. this.contextMenuVisible = true;
  86388. this.$emit('on-contextmenu', nav, event, position);
  86389. }.bind(this));
  86390. },
  86391. handleClickContextMenuOutside: function handleClickContextMenuOutside() {
  86392. this.contextMenuVisible = false;
  86393. },
  86394. handlePreventSelect: function handlePreventSelect(index, event) {
  86395. var nav = this.navList[index];
  86396. if (!nav || nav.disabled || !nav.contextMenu) return;
  86397. event.preventDefault();
  86398. },
  86399. handleTabKeyNavigation: function handleTabKeyNavigation(e) {
  86400. if (e.keyCode !== 37 && e.keyCode !== 39) return;
  86401. var direction = e.keyCode === 39 ? 1 : -1;
  86402. var nextTab = getNextTab(this.navList, this.focusedKey, direction);
  86403. this.focusedKey = nextTab.name;
  86404. },
  86405. handleTabKeyboardSelect: function handleTabKeyboardSelect() {
  86406. var init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  86407. if (init) return;
  86408. var focused = this.focusedKey || 0;
  86409. var index = this.getTabIndex(focused);
  86410. this.handleChange(index);
  86411. },
  86412. handleRemove: function handleRemove(index) {
  86413. var _this7 = this;
  86414. if (!this.beforeRemove) {
  86415. return this.handleRemoveTab(index);
  86416. }
  86417. var before = this.beforeRemove(index);
  86418. if (before && before.then) {
  86419. before.then(function () {
  86420. (0, _newArrowCheck3.default)(this, _this7);
  86421. this.handleRemoveTab(index);
  86422. }.bind(this));
  86423. } else {
  86424. this.handleRemoveTab(index);
  86425. }
  86426. },
  86427. handleRemoveTab: function handleRemoveTab(index) {
  86428. var _this8 = this;
  86429. var tabs = this.getTabs();
  86430. var tab = tabs[index];
  86431. tab.$destroy();
  86432. if (tab.currentName === this.activeKey) {
  86433. var newTabs = this.getTabs();
  86434. var activeKey = -1;
  86435. if (newTabs.length) {
  86436. var leftNoDisabledTabs = tabs.filter(function (item, itemIndex) {
  86437. (0, _newArrowCheck3.default)(this, _this8);
  86438. return !item.disabled && itemIndex < index;
  86439. }.bind(this));
  86440. var rightNoDisabledTabs = tabs.filter(function (item, itemIndex) {
  86441. (0, _newArrowCheck3.default)(this, _this8);
  86442. return !item.disabled && itemIndex > index;
  86443. }.bind(this));
  86444. if (rightNoDisabledTabs.length) {
  86445. activeKey = rightNoDisabledTabs[0].currentName;
  86446. } else if (leftNoDisabledTabs.length) {
  86447. activeKey = leftNoDisabledTabs[leftNoDisabledTabs.length - 1].currentName;
  86448. } else {
  86449. activeKey = newTabs[0].currentName;
  86450. }
  86451. }
  86452. this.activeKey = activeKey;
  86453. this.$emit('input', activeKey);
  86454. }
  86455. this.$emit('on-tab-remove', tab.currentName);
  86456. this.updateNav();
  86457. },
  86458. showClose: function showClose(item) {
  86459. if (this.type === 'card') {
  86460. if (item.closable !== null) {
  86461. return item.closable;
  86462. } else {
  86463. return this.closable;
  86464. }
  86465. } else {
  86466. return false;
  86467. }
  86468. },
  86469. scrollPrev: function scrollPrev() {
  86470. var containerWidth = this.$refs.navScroll.offsetWidth;
  86471. var currentOffset = this.getCurrentScrollOffset();
  86472. if (!currentOffset) return;
  86473. var newOffset = currentOffset > containerWidth ? currentOffset - containerWidth : 0;
  86474. this.setOffset(newOffset);
  86475. },
  86476. scrollNext: function scrollNext() {
  86477. var navWidth = this.$refs.nav.offsetWidth;
  86478. var containerWidth = this.$refs.navScroll.offsetWidth;
  86479. var currentOffset = this.getCurrentScrollOffset();
  86480. if (navWidth - currentOffset <= containerWidth) return;
  86481. var newOffset = navWidth - currentOffset > containerWidth * 2 ? currentOffset + containerWidth : navWidth - containerWidth;
  86482. this.setOffset(newOffset);
  86483. },
  86484. getCurrentScrollOffset: function getCurrentScrollOffset() {
  86485. var navStyle = this.navStyle;
  86486. return navStyle.transform ? Number(navStyle.transform.match(/translateX\(-(\d+(\.\d+)*)px\)/)[1]) : 0;
  86487. },
  86488. getTabIndex: function getTabIndex(name) {
  86489. var _this9 = this;
  86490. return this.navList.findIndex(function (nav) {
  86491. (0, _newArrowCheck3.default)(this, _this9);
  86492. return nav.name === name;
  86493. }.bind(this));
  86494. },
  86495. setOffset: function setOffset(value) {
  86496. this.navStyle.transform = 'translateX(-' + String(value) + 'px)';
  86497. },
  86498. scrollToActiveTab: function scrollToActiveTab() {
  86499. if (!this.scrollable) return;
  86500. var nav = this.$refs.nav;
  86501. var activeTab = this.$el.querySelector('.' + prefixCls + '-tab-active');
  86502. if (!activeTab) return;
  86503. var navScroll = this.$refs.navScroll;
  86504. var activeTabBounding = activeTab.getBoundingClientRect();
  86505. var navScrollBounding = navScroll.getBoundingClientRect();
  86506. var navBounding = nav.getBoundingClientRect();
  86507. var currentOffset = this.getCurrentScrollOffset();
  86508. var newOffset = currentOffset;
  86509. if (navBounding.right < navScrollBounding.right) {
  86510. newOffset = nav.offsetWidth - navScrollBounding.width;
  86511. }
  86512. if (activeTabBounding.left < navScrollBounding.left) {
  86513. newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left);
  86514. } else if (activeTabBounding.right > navScrollBounding.right) {
  86515. newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right;
  86516. }
  86517. if (currentOffset !== newOffset) {
  86518. this.setOffset(Math.max(newOffset, 0));
  86519. }
  86520. },
  86521. updateNavScroll: function updateNavScroll() {
  86522. var navWidth = this.$refs.nav.offsetWidth;
  86523. var containerWidth = this.$refs.navScroll.offsetWidth;
  86524. var currentOffset = this.getCurrentScrollOffset();
  86525. if (containerWidth < navWidth) {
  86526. this.scrollable = true;
  86527. if (navWidth - currentOffset < containerWidth) {
  86528. this.setOffset(navWidth - containerWidth);
  86529. }
  86530. } else {
  86531. this.scrollable = false;
  86532. if (currentOffset > 0) {
  86533. this.setOffset(0);
  86534. }
  86535. }
  86536. },
  86537. handleScroll: function handleScroll(e) {
  86538. e.preventDefault();
  86539. e.stopPropagation();
  86540. var type = e.type;
  86541. var delta = 0;
  86542. if (type === 'DOMMouseScroll' || type === 'mousewheel') {
  86543. delta = e.wheelDelta ? e.wheelDelta : -(e.detail || 0) * 40;
  86544. }
  86545. if (delta > 0) {
  86546. this.scrollPrev();
  86547. } else {
  86548. this.scrollNext();
  86549. }
  86550. },
  86551. handleResize: function handleResize() {
  86552. this.updateNavScroll();
  86553. },
  86554. isInsideHiddenElement: function isInsideHiddenElement() {
  86555. var parentNode = this.$el.parentNode;
  86556. while (parentNode && parentNode !== document.body) {
  86557. if (parentNode.style && parentNode.style.display === 'none') {
  86558. return parentNode;
  86559. }
  86560. parentNode = parentNode.parentNode;
  86561. }
  86562. return false;
  86563. },
  86564. updateVisibility: function updateVisibility(index) {
  86565. var _this10 = this;
  86566. [].concat((0, _toConsumableArray3.default)(this.$refs.panes.querySelectorAll('.' + prefixCls + '-tabpane'))).forEach(function (el, i) {
  86567. (0, _newArrowCheck3.default)(this, _this10);
  86568. if (index === i) {
  86569. [].concat((0, _toConsumableArray3.default)(el.children)).filter(function (child) {
  86570. (0, _newArrowCheck3.default)(this, _this10);
  86571. return child.classList.contains(prefixCls + '-tabpane');
  86572. }.bind(this)).forEach(function (child) {
  86573. (0, _newArrowCheck3.default)(this, _this10);
  86574. return child.style.visibility = 'visible';
  86575. }.bind(this));
  86576. if (this.captureFocus) setTimeout(function () {
  86577. (0, _newArrowCheck3.default)(this, _this10);
  86578. return focusFirst(el, el);
  86579. }.bind(this), transitionTime);
  86580. } else {
  86581. setTimeout(function () {
  86582. (0, _newArrowCheck3.default)(this, _this10);
  86583. [].concat((0, _toConsumableArray3.default)(el.children)).filter(function (child) {
  86584. (0, _newArrowCheck3.default)(this, _this10);
  86585. return child.classList.contains(prefixCls + '-tabpane');
  86586. }.bind(this)).forEach(function (child) {
  86587. (0, _newArrowCheck3.default)(this, _this10);
  86588. return child.style.visibility = 'hidden';
  86589. }.bind(this));
  86590. }.bind(this), transitionTime);
  86591. }
  86592. }.bind(this));
  86593. },
  86594. handleDrag: function handleDrag(index, event) {
  86595. var nav = this.navList[index];
  86596. if (nav) {
  86597. event.dataTransfer.setData('tab-name', nav.name);
  86598. }
  86599. },
  86600. handleDrop: function handleDrop(index, event) {
  86601. var _this11 = this;
  86602. var nav = this.navList[index];
  86603. if (nav) {
  86604. var dragName = event.dataTransfer.getData('tab-name');
  86605. event.preventDefault();
  86606. var navNames = this.navList.map(function (item) {
  86607. (0, _newArrowCheck3.default)(this, _this11);
  86608. return item.name;
  86609. }.bind(this));
  86610. var a = parseInt(navNames.findIndex(function (item) {
  86611. (0, _newArrowCheck3.default)(this, _this11);
  86612. return item === dragName;
  86613. }.bind(this)));
  86614. var b = parseInt(navNames.findIndex(function (item) {
  86615. (0, _newArrowCheck3.default)(this, _this11);
  86616. return item === nav.name;
  86617. }.bind(this)));
  86618. navNames.splice.apply(navNames, [b, 1].concat((0, _toConsumableArray3.default)(navNames.splice(a, 1, navNames[b]))));
  86619. this.$emit('on-drag-drop', dragName, nav.name, a, b, navNames);
  86620. }
  86621. }
  86622. },
  86623. watch: {
  86624. value: function value(val) {
  86625. this.activeKey = val;
  86626. this.focusedKey = val;
  86627. },
  86628. activeKey: function activeKey(val) {
  86629. var _this12 = this;
  86630. this.focusedKey = val;
  86631. this.updateBar();
  86632. this.updateStatus();
  86633. this.broadcast('Table', 'on-visible-change', true);
  86634. this.$nextTick(function () {
  86635. (0, _newArrowCheck3.default)(this, _this12);
  86636. this.scrollToActiveTab();
  86637. }.bind(this));
  86638. var nextIndex = Math.max(this.getTabIndex(this.focusedKey), 0);
  86639. this.updateVisibility(nextIndex);
  86640. }
  86641. },
  86642. mounted: function mounted() {
  86643. var _this13 = this;
  86644. this.showSlot = this.$slots.extra !== undefined;
  86645. this.observer = (0, _elementResizeDetector2.default)();
  86646. this.observer.listenTo(this.$refs.navWrap, this.handleResize);
  86647. var hiddenParentNode = this.isInsideHiddenElement();
  86648. if (hiddenParentNode) {
  86649. this.mutationObserver = new _assist.MutationObserver(function () {
  86650. (0, _newArrowCheck3.default)(this, _this13);
  86651. if (hiddenParentNode.style.display !== 'none') {
  86652. this.updateBar();
  86653. this.mutationObserver.disconnect();
  86654. }
  86655. }.bind(this));
  86656. this.mutationObserver.observe(hiddenParentNode, { attributes: true, childList: true, characterData: true, attributeFilter: ['style'] });
  86657. }
  86658. this.handleTabKeyboardSelect(true);
  86659. this.updateVisibility(this.getTabIndex(this.activeKey));
  86660. },
  86661. beforeDestroy: function beforeDestroy() {
  86662. this.observer.removeListener(this.$refs.navWrap, this.handleResize);
  86663. if (this.mutationObserver) this.mutationObserver.disconnect();
  86664. }
  86665. };
  86666. /***/ }),
  86667. /* 243 */
  86668. /***/ (function(module, exports, __webpack_require__) {
  86669. "use strict";
  86670. Object.defineProperty(exports, "__esModule", {
  86671. value: true
  86672. });
  86673. var prefixCls = 'ivu-tabs-tabpane';
  86674. exports.default = {
  86675. name: 'TabPane',
  86676. inject: ['TabsInstance'],
  86677. props: {
  86678. name: {
  86679. type: String
  86680. },
  86681. label: {
  86682. type: [String, Function],
  86683. default: ''
  86684. },
  86685. icon: {
  86686. type: String
  86687. },
  86688. disabled: {
  86689. type: Boolean,
  86690. default: false
  86691. },
  86692. closable: {
  86693. type: Boolean,
  86694. default: null
  86695. },
  86696. tab: {
  86697. type: String
  86698. },
  86699. index: {
  86700. type: Number
  86701. },
  86702. contextMenu: {
  86703. type: Boolean,
  86704. default: false
  86705. }
  86706. },
  86707. data: function data() {
  86708. return {
  86709. prefixCls: prefixCls,
  86710. show: true,
  86711. currentName: this.name
  86712. };
  86713. },
  86714. computed: {
  86715. contentStyle: function contentStyle() {
  86716. return {
  86717. visibility: this.TabsInstance.activeKey !== this.currentName ? 'hidden' : 'visible'
  86718. };
  86719. }
  86720. },
  86721. methods: {
  86722. updateNav: function updateNav() {
  86723. this.TabsInstance.updateNav();
  86724. }
  86725. },
  86726. watch: {
  86727. name: function name(val) {
  86728. this.currentName = val;
  86729. this.updateNav();
  86730. },
  86731. label: function label() {
  86732. this.updateNav();
  86733. },
  86734. icon: function icon() {
  86735. this.updateNav();
  86736. },
  86737. disabled: function disabled() {
  86738. this.updateNav();
  86739. }
  86740. },
  86741. mounted: function mounted() {
  86742. this.updateNav();
  86743. },
  86744. destroyed: function destroyed() {
  86745. this.updateNav();
  86746. }
  86747. };
  86748. /***/ }),
  86749. /* 244 */
  86750. /***/ (function(module, exports, __webpack_require__) {
  86751. "use strict";
  86752. Object.defineProperty(exports, "__esModule", {
  86753. value: true
  86754. });
  86755. var _defineProperty2 = __webpack_require__(2);
  86756. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  86757. var _icon = __webpack_require__(19);
  86758. var _icon2 = _interopRequireDefault(_icon);
  86759. var _assist = __webpack_require__(3);
  86760. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  86761. var prefixCls = 'ivu-tag';
  86762. var initColorList = ['default', 'primary', 'success', 'warning', 'error', 'blue', 'green', 'red', 'yellow', 'pink', 'magenta', 'volcano', 'orange', 'gold', 'lime', 'cyan', 'geekblue', 'purple'];
  86763. var colorList = ['pink', 'magenta', 'volcano', 'orange', 'gold', 'lime', 'cyan', 'geekblue', 'purple'];
  86764. exports.default = {
  86765. name: 'Tag',
  86766. components: { Icon: _icon2.default },
  86767. props: {
  86768. closable: {
  86769. type: Boolean,
  86770. default: false
  86771. },
  86772. checkable: {
  86773. type: Boolean,
  86774. default: false
  86775. },
  86776. checked: {
  86777. type: Boolean,
  86778. default: true
  86779. },
  86780. color: {
  86781. type: String,
  86782. default: 'default'
  86783. },
  86784. type: {
  86785. validator: function validator(value) {
  86786. return (0, _assist.oneOf)(value, ['border', 'dot']);
  86787. }
  86788. },
  86789. name: {
  86790. type: [String, Number]
  86791. },
  86792. fade: {
  86793. type: Boolean,
  86794. default: true
  86795. },
  86796. size: {
  86797. validator: function validator(value) {
  86798. return (0, _assist.oneOf)(value, ['default', 'medium', 'large']);
  86799. },
  86800. default: 'default'
  86801. }
  86802. },
  86803. data: function data() {
  86804. return {
  86805. isChecked: this.checked
  86806. };
  86807. },
  86808. computed: {
  86809. classes: function classes() {
  86810. var _ref;
  86811. return ['' + prefixCls, prefixCls + '-size-' + String(this.size), (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.color), !!this.color && (0, _assist.oneOf)(this.color, initColorList)), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.type), !!this.type), (0, _defineProperty3.default)(_ref, prefixCls + '-closable', this.closable), (0, _defineProperty3.default)(_ref, prefixCls + '-checked', this.isChecked), _ref)];
  86812. },
  86813. wraperStyles: function wraperStyles() {
  86814. return (0, _assist.oneOf)(this.color, initColorList) ? {} : { background: this.isChecked ? this.defaultTypeColor : 'transparent', borderWidth: '1px', borderStyle: 'solid', borderColor: this.type !== 'dot' && this.type !== 'border' && this.isChecked ? this.borderColor : this.lineColor, color: this.lineColor };
  86815. },
  86816. textClasses: function textClasses() {
  86817. return [prefixCls + '-text', this.type === 'border' ? (0, _assist.oneOf)(this.color, initColorList) ? prefixCls + '-color-' + String(this.color) : '' : '', this.type !== 'dot' && this.type !== 'border' && this.color !== 'default' ? this.isChecked && colorList.indexOf(this.color) < 0 ? prefixCls + '-color-white' : '' : ''];
  86818. },
  86819. dotClasses: function dotClasses() {
  86820. return prefixCls + '-dot-inner';
  86821. },
  86822. iconClass: function iconClass() {
  86823. if (this.type === 'dot') {
  86824. return '';
  86825. } else if (this.type === 'border') {
  86826. return (0, _assist.oneOf)(this.color, initColorList) ? prefixCls + '-color-' + String(this.color) : '';
  86827. } else {
  86828. return this.color !== undefined ? this.color === 'default' ? '' : 'rgb(255, 255, 255)' : '';
  86829. }
  86830. },
  86831. showDot: function showDot() {
  86832. return !!this.type && this.type === 'dot';
  86833. },
  86834. lineColor: function lineColor() {
  86835. if (this.type === 'dot') {
  86836. return '';
  86837. } else if (this.type === 'border') {
  86838. return this.color !== undefined ? (0, _assist.oneOf)(this.color, initColorList) ? '' : this.color : '';
  86839. } else {
  86840. return this.color !== undefined ? this.color === 'default' ? '' : 'rgb(255, 255, 255)' : '';
  86841. }
  86842. },
  86843. borderColor: function borderColor() {
  86844. return this.color !== undefined ? this.color === 'default' ? '' : this.color : '';
  86845. },
  86846. dotColor: function dotColor() {
  86847. return this.color !== undefined ? (0, _assist.oneOf)(this.color, initColorList) ? '' : this.color : '';
  86848. },
  86849. textColorStyle: function textColorStyle() {
  86850. return (0, _assist.oneOf)(this.color, initColorList) ? {} : this.type !== 'dot' && this.type !== 'border' ? this.isChecked ? { color: this.lineColor } : {} : { color: this.lineColor };
  86851. },
  86852. bgColorStyle: function bgColorStyle() {
  86853. return (0, _assist.oneOf)(this.color, initColorList) ? {} : { background: this.dotColor };
  86854. },
  86855. defaultTypeColor: function defaultTypeColor() {
  86856. return this.type !== 'dot' && this.type !== 'border' ? this.color !== undefined ? (0, _assist.oneOf)(this.color, initColorList) ? '' : this.color : '' : '';
  86857. }
  86858. },
  86859. methods: {
  86860. close: function close(event) {
  86861. if (this.name === undefined) {
  86862. this.$emit('on-close', event);
  86863. } else {
  86864. this.$emit('on-close', event, this.name);
  86865. }
  86866. },
  86867. check: function check() {
  86868. if (!this.checkable) return;
  86869. var checked = !this.isChecked;
  86870. this.isChecked = checked;
  86871. if (this.name === undefined) {
  86872. this.$emit('on-change', checked);
  86873. } else {
  86874. this.$emit('on-change', checked, this.name);
  86875. }
  86876. }
  86877. },
  86878. watch: {
  86879. checked: function checked(val) {
  86880. this.isChecked = val;
  86881. }
  86882. }
  86883. };
  86884. /***/ }),
  86885. /* 245 */
  86886. /***/ (function(module, exports, __webpack_require__) {
  86887. "use strict";
  86888. Object.defineProperty(exports, "__esModule", {
  86889. value: true
  86890. });
  86891. var _newArrowCheck2 = __webpack_require__(1);
  86892. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  86893. var _typeof2 = __webpack_require__(27);
  86894. var _typeof3 = _interopRequireDefault(_typeof2);
  86895. var _defineProperty2 = __webpack_require__(2);
  86896. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  86897. var _vue = __webpack_require__(16);
  86898. var _vue2 = _interopRequireDefault(_vue);
  86899. var _assist = __webpack_require__(3);
  86900. var _locale = __webpack_require__(6);
  86901. var _locale2 = _interopRequireDefault(_locale);
  86902. var _time = __webpack_require__(592);
  86903. var _time2 = _interopRequireDefault(_time);
  86904. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  86905. var isServer = _vue2.default.prototype.$isServer;
  86906. var prefixCls = 'ivu-time';
  86907. exports.default = {
  86908. name: 'Time',
  86909. mixins: [_locale2.default],
  86910. props: {
  86911. time: {
  86912. type: [Number, Date, String],
  86913. required: true
  86914. },
  86915. type: {
  86916. type: String,
  86917. validator: function validator(value) {
  86918. return (0, _assist.oneOf)(value, ['relative', 'date', 'datetime']);
  86919. },
  86920. default: 'relative'
  86921. },
  86922. hash: {
  86923. type: String,
  86924. default: ''
  86925. },
  86926. interval: {
  86927. type: Number,
  86928. default: 60
  86929. }
  86930. },
  86931. data: function data() {
  86932. return {
  86933. date: ''
  86934. };
  86935. },
  86936. computed: {
  86937. classes: function classes() {
  86938. return ['' + prefixCls, (0, _defineProperty3.default)({}, prefixCls + '-with-hash', this.hash)];
  86939. }
  86940. },
  86941. watch: {
  86942. time: function time() {
  86943. if (!isServer) this.setTime();
  86944. }
  86945. },
  86946. methods: {
  86947. handleClick: function handleClick() {
  86948. if (this.hash !== '') window.location.hash = this.hash;
  86949. },
  86950. setTime: function setTime() {
  86951. var type = (0, _typeof3.default)(this.time);
  86952. var time = void 0;
  86953. if (type === 'number') {
  86954. var timestamp = this.time.toString().length > 10 ? this.time : this.time * 1000;
  86955. time = new Date(timestamp).getTime();
  86956. } else if (type === 'object') {
  86957. time = this.time.getTime();
  86958. } else if (type === 'string') {
  86959. time = new Date(this.time).getTime();
  86960. }
  86961. if (this.type === 'relative') {
  86962. this.date = (0, _time2.default)(time, this.t);
  86963. } else {
  86964. var date = new Date(this.time);
  86965. var year = date.getFullYear();
  86966. var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
  86967. var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
  86968. var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
  86969. var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
  86970. var second = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
  86971. if (this.type === 'datetime') {
  86972. this.date = String(year) + '-' + String(month) + '-' + String(day) + ' ' + String(hour) + ':' + String(minute) + ':' + String(second);
  86973. } else if (this.type === 'date') {
  86974. this.date = String(year) + '-' + String(month) + '-' + String(day);
  86975. }
  86976. }
  86977. }
  86978. },
  86979. mounted: function mounted() {
  86980. var _this = this;
  86981. this.setTime();
  86982. if (isServer) return;
  86983. this.timer = setInterval(function () {
  86984. (0, _newArrowCheck3.default)(this, _this);
  86985. this.setTime();
  86986. }.bind(this), 1000 * this.interval);
  86987. },
  86988. beforeDestroy: function beforeDestroy() {
  86989. if (this.timer) clearInterval(this.timer);
  86990. }
  86991. };
  86992. /***/ }),
  86993. /* 246 */
  86994. /***/ (function(module, exports, __webpack_require__) {
  86995. "use strict";
  86996. Object.defineProperty(exports, "__esModule", {
  86997. value: true
  86998. });
  86999. var _defineProperty2 = __webpack_require__(2);
  87000. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  87001. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  87002. var prefixCls = 'ivu-timeline';
  87003. exports.default = {
  87004. name: 'Timeline',
  87005. props: {
  87006. pending: {
  87007. type: Boolean,
  87008. default: false
  87009. }
  87010. },
  87011. computed: {
  87012. classes: function classes() {
  87013. return ['' + prefixCls, (0, _defineProperty3.default)({}, prefixCls + '-pending', this.pending)];
  87014. }
  87015. }
  87016. };
  87017. /***/ }),
  87018. /* 247 */
  87019. /***/ (function(module, exports, __webpack_require__) {
  87020. "use strict";
  87021. Object.defineProperty(exports, "__esModule", {
  87022. value: true
  87023. });
  87024. var _defineProperty2 = __webpack_require__(2);
  87025. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  87026. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  87027. var prefixCls = 'ivu-timeline';
  87028. exports.default = {
  87029. name: 'TimelineItem',
  87030. props: {
  87031. color: {
  87032. type: String,
  87033. default: 'blue'
  87034. }
  87035. },
  87036. data: function data() {
  87037. return {
  87038. dot: false
  87039. };
  87040. },
  87041. mounted: function mounted() {
  87042. this.dot = this.$refs.dot.innerHTML.length ? true : false;
  87043. },
  87044. computed: {
  87045. itemClasses: function itemClasses() {
  87046. return prefixCls + '-item';
  87047. },
  87048. tailClasses: function tailClasses() {
  87049. return prefixCls + '-item-tail';
  87050. },
  87051. headClasses: function headClasses() {
  87052. var _ref;
  87053. return [prefixCls + '-item-head', (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-item-head-custom', this.dot), (0, _defineProperty3.default)(_ref, prefixCls + '-item-head-' + String(this.color), this.headColorShow), _ref)];
  87054. },
  87055. headColorShow: function headColorShow() {
  87056. return this.color == 'blue' || this.color == 'red' || this.color == 'green';
  87057. },
  87058. customColor: function customColor() {
  87059. var style = {};
  87060. if (this.color) {
  87061. if (!this.headColorShow) {
  87062. style = {
  87063. 'color': this.color,
  87064. 'border-color': this.color
  87065. };
  87066. }
  87067. }
  87068. return style;
  87069. },
  87070. contentClasses: function contentClasses() {
  87071. return prefixCls + '-item-content';
  87072. }
  87073. }
  87074. };
  87075. /***/ }),
  87076. /* 248 */
  87077. /***/ (function(module, exports, __webpack_require__) {
  87078. "use strict";
  87079. Object.defineProperty(exports, "__esModule", {
  87080. value: true
  87081. });
  87082. var _toConsumableArray2 = __webpack_require__(17);
  87083. var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
  87084. var _newArrowCheck2 = __webpack_require__(1);
  87085. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  87086. var _list = __webpack_require__(604);
  87087. var _list2 = _interopRequireDefault(_list);
  87088. var _operation = __webpack_require__(608);
  87089. var _operation2 = _interopRequireDefault(_operation);
  87090. var _locale = __webpack_require__(6);
  87091. var _locale2 = _interopRequireDefault(_locale);
  87092. var _emitter = __webpack_require__(4);
  87093. var _emitter2 = _interopRequireDefault(_emitter);
  87094. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  87095. var prefixCls = 'ivu-transfer';
  87096. exports.default = {
  87097. name: 'Transfer',
  87098. mixins: [_emitter2.default, _locale2.default],
  87099. render: function render(h) {
  87100. var _this2 = this;
  87101. function cloneVNode(vnode) {
  87102. var _this = this;
  87103. var clonedChildren = vnode.children && vnode.children.map(function (vnode) {
  87104. (0, _newArrowCheck3.default)(this, _this);
  87105. return cloneVNode(vnode);
  87106. }.bind(this));
  87107. var cloned = h(vnode.tag, vnode.data, clonedChildren);
  87108. cloned.text = vnode.text;
  87109. cloned.isComment = vnode.isComment;
  87110. cloned.componentOptions = vnode.componentOptions;
  87111. cloned.elm = vnode.elm;
  87112. cloned.context = vnode.context;
  87113. cloned.ns = vnode.ns;
  87114. cloned.isStatic = vnode.isStatic;
  87115. cloned.key = vnode.key;
  87116. return cloned;
  87117. }
  87118. var vNodes = this.$slots.default === undefined ? [] : this.$slots.default;
  87119. var clonedVNodes = this.$slots.default === undefined ? [] : vNodes.map(function (vnode) {
  87120. (0, _newArrowCheck3.default)(this, _this2);
  87121. return cloneVNode(vnode);
  87122. }.bind(this));
  87123. return h('div', {
  87124. 'class': this.classes
  87125. }, [h(_list2.default, {
  87126. ref: 'left',
  87127. props: {
  87128. prefixCls: this.prefixCls + '-list',
  87129. data: this.leftData,
  87130. renderFormat: this.renderFormat,
  87131. checkedKeys: this.leftCheckedKeys,
  87132. validKeysCount: this.leftValidKeysCount,
  87133. listStyle: this.listStyle,
  87134. title: this.localeTitles[0],
  87135. filterable: this.filterable,
  87136. filterPlaceholder: this.localeFilterPlaceholder,
  87137. filterMethod: this.filterMethod,
  87138. notFoundText: this.localeNotFoundText
  87139. },
  87140. on: {
  87141. 'on-checked-keys-change': this.handleLeftCheckedKeysChange
  87142. }
  87143. }, vNodes), h(_operation2.default, {
  87144. props: {
  87145. prefixCls: this.prefixCls,
  87146. operations: this.operations,
  87147. leftActive: this.leftValidKeysCount > 0,
  87148. rightActive: this.rightValidKeysCount > 0,
  87149. reverseOperation: this.reverseOperation
  87150. }
  87151. }), h(_list2.default, {
  87152. ref: 'right',
  87153. props: {
  87154. prefixCls: this.prefixCls + '-list',
  87155. data: this.rightData,
  87156. renderFormat: this.renderFormat,
  87157. checkedKeys: this.rightCheckedKeys,
  87158. validKeysCount: this.rightValidKeysCount,
  87159. listStyle: this.listStyle,
  87160. title: this.localeTitles[1],
  87161. filterable: this.filterable,
  87162. filterPlaceholder: this.localeFilterPlaceholder,
  87163. filterMethod: this.filterMethod,
  87164. notFoundText: this.localeNotFoundText
  87165. },
  87166. on: {
  87167. 'on-checked-keys-change': this.handleRightCheckedKeysChange
  87168. }
  87169. }, clonedVNodes)]);
  87170. },
  87171. props: {
  87172. data: {
  87173. type: Array,
  87174. default: function _default() {
  87175. return [];
  87176. }
  87177. },
  87178. renderFormat: {
  87179. type: Function,
  87180. default: function _default(item) {
  87181. return item.label || item.key;
  87182. }
  87183. },
  87184. targetKeys: {
  87185. type: Array,
  87186. default: function _default() {
  87187. return [];
  87188. }
  87189. },
  87190. selectedKeys: {
  87191. type: Array,
  87192. default: function _default() {
  87193. return [];
  87194. }
  87195. },
  87196. listStyle: {
  87197. type: Object,
  87198. default: function _default() {
  87199. return {};
  87200. }
  87201. },
  87202. titles: {
  87203. type: Array
  87204. },
  87205. operations: {
  87206. type: Array,
  87207. default: function _default() {
  87208. return [];
  87209. }
  87210. },
  87211. filterable: {
  87212. type: Boolean,
  87213. default: false
  87214. },
  87215. filterPlaceholder: {
  87216. type: String
  87217. },
  87218. filterMethod: {
  87219. type: Function,
  87220. default: function _default(data, query) {
  87221. var type = 'label' in data ? 'label' : 'key';
  87222. return data[type].indexOf(query) > -1;
  87223. }
  87224. },
  87225. notFoundText: {
  87226. type: String
  87227. },
  87228. reverseOperation: {
  87229. type: Boolean,
  87230. default: false
  87231. }
  87232. },
  87233. data: function data() {
  87234. return {
  87235. prefixCls: prefixCls,
  87236. leftData: [],
  87237. rightData: [],
  87238. leftCheckedKeys: [],
  87239. rightCheckedKeys: []
  87240. };
  87241. },
  87242. computed: {
  87243. classes: function classes() {
  87244. return ['' + prefixCls];
  87245. },
  87246. leftValidKeysCount: function leftValidKeysCount() {
  87247. return this.getValidKeys('left').length;
  87248. },
  87249. rightValidKeysCount: function rightValidKeysCount() {
  87250. return this.getValidKeys('right').length;
  87251. },
  87252. localeFilterPlaceholder: function localeFilterPlaceholder() {
  87253. if (this.filterPlaceholder === undefined) {
  87254. return this.t('i.transfer.filterPlaceholder');
  87255. } else {
  87256. return this.filterPlaceholder;
  87257. }
  87258. },
  87259. localeNotFoundText: function localeNotFoundText() {
  87260. if (this.notFoundText === undefined) {
  87261. return this.t('i.transfer.notFoundText');
  87262. } else {
  87263. return this.notFoundText;
  87264. }
  87265. },
  87266. localeTitles: function localeTitles() {
  87267. if (this.titles === undefined) {
  87268. return [this.t('i.transfer.titles.source'), this.t('i.transfer.titles.target')];
  87269. } else {
  87270. return this.titles;
  87271. }
  87272. }
  87273. },
  87274. methods: {
  87275. getValidKeys: function getValidKeys(direction) {
  87276. var _this3 = this;
  87277. return this[String(direction) + 'Data'].filter(function (data) {
  87278. (0, _newArrowCheck3.default)(this, _this3);
  87279. return !data.disabled && this[String(direction) + 'CheckedKeys'].indexOf(data.key) > -1;
  87280. }.bind(this)).map(function (data) {
  87281. (0, _newArrowCheck3.default)(this, _this3);
  87282. return data.key;
  87283. }.bind(this));
  87284. },
  87285. splitData: function splitData() {
  87286. var _this4 = this;
  87287. var init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  87288. this.leftData = [].concat((0, _toConsumableArray3.default)(this.data));
  87289. this.rightData = [];
  87290. if (this.targetKeys.length > 0) {
  87291. this.targetKeys.forEach(function (targetKey) {
  87292. (0, _newArrowCheck3.default)(this, _this4);
  87293. var filteredData = this.leftData.filter(function (data, index) {
  87294. (0, _newArrowCheck3.default)(this, _this4);
  87295. if (data.key === targetKey) {
  87296. this.leftData.splice(index, 1);
  87297. return true;
  87298. }
  87299. return false;
  87300. }.bind(this));
  87301. if (filteredData && filteredData.length > 0) this.rightData.push(filteredData[0]);
  87302. }.bind(this));
  87303. }
  87304. if (init) {
  87305. this.splitSelectedKey();
  87306. }
  87307. },
  87308. splitSelectedKey: function splitSelectedKey() {
  87309. var _this5 = this;
  87310. var selectedKeys = this.selectedKeys;
  87311. if (selectedKeys.length > 0) {
  87312. this.leftCheckedKeys = this.leftData.filter(function (data) {
  87313. (0, _newArrowCheck3.default)(this, _this5);
  87314. return selectedKeys.indexOf(data.key) > -1;
  87315. }.bind(this)).map(function (data) {
  87316. (0, _newArrowCheck3.default)(this, _this5);
  87317. return data.key;
  87318. }.bind(this));
  87319. this.rightCheckedKeys = this.rightData.filter(function (data) {
  87320. (0, _newArrowCheck3.default)(this, _this5);
  87321. return selectedKeys.indexOf(data.key) > -1;
  87322. }.bind(this)).map(function (data) {
  87323. (0, _newArrowCheck3.default)(this, _this5);
  87324. return data.key;
  87325. }.bind(this));
  87326. }
  87327. },
  87328. moveTo: function moveTo(direction) {
  87329. var _this6 = this;
  87330. var targetKeys = this.targetKeys;
  87331. var opposite = direction === 'left' ? 'right' : 'left';
  87332. var moveKeys = this.getValidKeys(opposite);
  87333. var newTargetKeys = direction === 'right' ? moveKeys.concat(targetKeys) : targetKeys.filter(function (targetKey) {
  87334. (0, _newArrowCheck3.default)(this, _this6);
  87335. return !moveKeys.some(function (checkedKey) {
  87336. (0, _newArrowCheck3.default)(this, _this6);
  87337. return targetKey === checkedKey;
  87338. }.bind(this));
  87339. }.bind(this));
  87340. this.$refs[opposite].toggleSelectAll(false);
  87341. this.$emit('on-change', newTargetKeys, direction, moveKeys);
  87342. this.dispatch('FormItem', 'on-form-change', {
  87343. tarketKeys: newTargetKeys,
  87344. direction: direction,
  87345. moveKeys: moveKeys
  87346. });
  87347. },
  87348. handleLeftCheckedKeysChange: function handleLeftCheckedKeysChange(keys) {
  87349. this.leftCheckedKeys = keys;
  87350. },
  87351. handleRightCheckedKeysChange: function handleRightCheckedKeysChange(keys) {
  87352. this.rightCheckedKeys = keys;
  87353. },
  87354. handleCheckedKeys: function handleCheckedKeys() {
  87355. var sourceSelectedKeys = this.getValidKeys('left');
  87356. var targetSelectedKeys = this.getValidKeys('right');
  87357. this.$emit('on-selected-change', sourceSelectedKeys, targetSelectedKeys);
  87358. }
  87359. },
  87360. watch: {
  87361. targetKeys: function targetKeys() {
  87362. this.splitData(false);
  87363. },
  87364. data: function data() {
  87365. this.splitData(false);
  87366. }
  87367. },
  87368. mounted: function mounted() {
  87369. this.splitData(true);
  87370. }
  87371. };
  87372. /***/ }),
  87373. /* 249 */
  87374. /***/ (function(module, exports, __webpack_require__) {
  87375. "use strict";
  87376. Object.defineProperty(exports, "__esModule", {
  87377. value: true
  87378. });
  87379. var _newArrowCheck2 = __webpack_require__(1);
  87380. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  87381. var _defineProperty2 = __webpack_require__(2);
  87382. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  87383. var _search = __webpack_require__(605);
  87384. var _search2 = _interopRequireDefault(_search);
  87385. var _checkbox = __webpack_require__(49);
  87386. var _checkbox2 = _interopRequireDefault(_checkbox);
  87387. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  87388. exports.default = {
  87389. name: 'TransferList',
  87390. components: { Search: _search2.default, Checkbox: _checkbox2.default },
  87391. props: {
  87392. prefixCls: String,
  87393. data: Array,
  87394. renderFormat: Function,
  87395. checkedKeys: Array,
  87396. listStyle: Object,
  87397. title: [String, Number],
  87398. filterable: Boolean,
  87399. filterPlaceholder: String,
  87400. filterMethod: Function,
  87401. notFoundText: String,
  87402. validKeysCount: Number
  87403. },
  87404. data: function data() {
  87405. return {
  87406. showItems: [],
  87407. query: '',
  87408. showFooter: true
  87409. };
  87410. },
  87411. watch: {
  87412. data: function data() {
  87413. this.updateFilteredData();
  87414. }
  87415. },
  87416. computed: {
  87417. classes: function classes() {
  87418. return ['' + String(this.prefixCls), (0, _defineProperty3.default)({}, String(this.prefixCls) + '-with-footer', this.showFooter)];
  87419. },
  87420. bodyClasses: function bodyClasses() {
  87421. var _ref2;
  87422. return [String(this.prefixCls) + '-body', (_ref2 = {}, (0, _defineProperty3.default)(_ref2, String(this.prefixCls) + '-body-with-search', this.filterable), (0, _defineProperty3.default)(_ref2, String(this.prefixCls) + '-body-with-footer', this.showFooter), _ref2)];
  87423. },
  87424. count: function count() {
  87425. var validKeysCount = this.validKeysCount;
  87426. return (validKeysCount > 0 ? String(validKeysCount) + '/' : '') + ('' + String(this.data.length));
  87427. },
  87428. checkedAll: function checkedAll() {
  87429. var _this = this;
  87430. return this.filterData.filter(function (data) {
  87431. (0, _newArrowCheck3.default)(this, _this);
  87432. return !data.disabled;
  87433. }.bind(this)).length === this.validKeysCount && this.validKeysCount !== 0;
  87434. },
  87435. checkedAllDisabled: function checkedAllDisabled() {
  87436. var _this2 = this;
  87437. return this.filterData.filter(function (data) {
  87438. (0, _newArrowCheck3.default)(this, _this2);
  87439. return !data.disabled;
  87440. }.bind(this)).length <= 0;
  87441. },
  87442. filterData: function filterData() {
  87443. var _this3 = this;
  87444. return this.showItems.filter(function (item) {
  87445. (0, _newArrowCheck3.default)(this, _this3);
  87446. return this.filterMethod(item, this.query);
  87447. }.bind(this));
  87448. }
  87449. },
  87450. methods: {
  87451. itemClasses: function itemClasses(item) {
  87452. return [String(this.prefixCls) + '-content-item', (0, _defineProperty3.default)({}, String(this.prefixCls) + '-content-item-disabled', item.disabled)];
  87453. },
  87454. showLabel: function showLabel(item) {
  87455. return this.renderFormat(item);
  87456. },
  87457. isCheck: function isCheck(item) {
  87458. var _this4 = this;
  87459. return this.checkedKeys.some(function (key) {
  87460. (0, _newArrowCheck3.default)(this, _this4);
  87461. return key === item.key;
  87462. }.bind(this));
  87463. },
  87464. select: function select(item) {
  87465. if (item.disabled) return;
  87466. var index = this.checkedKeys.indexOf(item.key);
  87467. index > -1 ? this.checkedKeys.splice(index, 1) : this.checkedKeys.push(item.key);
  87468. this.$parent.handleCheckedKeys();
  87469. },
  87470. updateFilteredData: function updateFilteredData() {
  87471. this.showItems = this.data;
  87472. },
  87473. toggleSelectAll: function toggleSelectAll(status) {
  87474. var _this5 = this;
  87475. var keys = status ? this.filterData.filter(function (data) {
  87476. (0, _newArrowCheck3.default)(this, _this5);
  87477. return !data.disabled || this.checkedKeys.indexOf(data.key) > -1;
  87478. }.bind(this)).map(function (data) {
  87479. (0, _newArrowCheck3.default)(this, _this5);
  87480. return data.key;
  87481. }.bind(this)) : this.filterData.filter(function (data) {
  87482. (0, _newArrowCheck3.default)(this, _this5);
  87483. return data.disabled && this.checkedKeys.indexOf(data.key) > -1;
  87484. }.bind(this)).map(function (data) {
  87485. (0, _newArrowCheck3.default)(this, _this5);
  87486. return data.key;
  87487. }.bind(this));
  87488. this.$emit('on-checked-keys-change', keys);
  87489. },
  87490. handleQueryClear: function handleQueryClear() {
  87491. this.query = '';
  87492. },
  87493. handleQueryChange: function handleQueryChange(val) {
  87494. this.query = val;
  87495. }
  87496. },
  87497. created: function created() {
  87498. this.updateFilteredData();
  87499. },
  87500. mounted: function mounted() {
  87501. this.showFooter = this.$slots.default !== undefined;
  87502. }
  87503. };
  87504. /***/ }),
  87505. /* 250 */
  87506. /***/ (function(module, exports, __webpack_require__) {
  87507. "use strict";
  87508. Object.defineProperty(exports, "__esModule", {
  87509. value: true
  87510. });
  87511. var _input = __webpack_require__(38);
  87512. var _input2 = _interopRequireDefault(_input);
  87513. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  87514. exports.default = {
  87515. name: 'Search',
  87516. components: { iInput: _input2.default },
  87517. props: {
  87518. prefixCls: String,
  87519. placeholder: String,
  87520. query: String
  87521. },
  87522. data: function data() {
  87523. return {
  87524. currentQuery: this.query
  87525. };
  87526. },
  87527. watch: {
  87528. query: function query(val) {
  87529. this.currentQuery = val;
  87530. },
  87531. currentQuery: function currentQuery(val) {
  87532. this.$emit('on-query-change', val);
  87533. }
  87534. },
  87535. computed: {
  87536. icon: function icon() {
  87537. return this.query === '' ? 'ios-search' : 'ios-close-circle';
  87538. }
  87539. },
  87540. methods: {
  87541. handleClick: function handleClick() {
  87542. if (this.currentQuery === '') return;
  87543. this.currentQuery = '';
  87544. this.$emit('on-query-clear');
  87545. }
  87546. }
  87547. };
  87548. /***/ }),
  87549. /* 251 */
  87550. /***/ (function(module, exports, __webpack_require__) {
  87551. "use strict";
  87552. Object.defineProperty(exports, "__esModule", {
  87553. value: true
  87554. });
  87555. var _button = __webpack_require__(28);
  87556. var _button2 = _interopRequireDefault(_button);
  87557. var _icon = __webpack_require__(8);
  87558. var _icon2 = _interopRequireDefault(_icon);
  87559. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  87560. exports.default = {
  87561. name: 'Operation',
  87562. components: { iButton: _button2.default, Icon: _icon2.default },
  87563. props: {
  87564. prefixCls: String,
  87565. operations: Array,
  87566. leftActive: Boolean,
  87567. rightActive: Boolean,
  87568. reverseOperation: Boolean
  87569. },
  87570. methods: {
  87571. moveToLeft: function moveToLeft() {
  87572. this.$parent.moveTo('left');
  87573. },
  87574. moveToRight: function moveToRight() {
  87575. this.$parent.moveTo('right');
  87576. }
  87577. }
  87578. };
  87579. /***/ }),
  87580. /* 252 */
  87581. /***/ (function(module, exports, __webpack_require__) {
  87582. "use strict";
  87583. Object.defineProperty(exports, "__esModule", {
  87584. value: true
  87585. });
  87586. var _newArrowCheck2 = __webpack_require__(1);
  87587. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  87588. var _node = __webpack_require__(612);
  87589. var _node2 = _interopRequireDefault(_node);
  87590. var _dropdown = __webpack_require__(61);
  87591. var _dropdown2 = _interopRequireDefault(_dropdown);
  87592. var _dropdownMenu = __webpack_require__(62);
  87593. var _dropdownMenu2 = _interopRequireDefault(_dropdownMenu);
  87594. var _emitter = __webpack_require__(4);
  87595. var _emitter2 = _interopRequireDefault(_emitter);
  87596. var _locale = __webpack_require__(6);
  87597. var _locale2 = _interopRequireDefault(_locale);
  87598. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  87599. var prefixCls = 'ivu-tree';
  87600. exports.default = {
  87601. name: 'Tree',
  87602. mixins: [_emitter2.default, _locale2.default],
  87603. components: { TreeNode: _node2.default, Dropdown: _dropdown2.default, DropdownMenu: _dropdownMenu2.default },
  87604. provide: function provide() {
  87605. return { TreeInstance: this };
  87606. },
  87607. props: {
  87608. data: {
  87609. type: Array,
  87610. default: function _default() {
  87611. return [];
  87612. }
  87613. },
  87614. multiple: {
  87615. type: Boolean,
  87616. default: false
  87617. },
  87618. showCheckbox: {
  87619. type: Boolean,
  87620. default: false
  87621. },
  87622. checkStrictly: {
  87623. type: Boolean,
  87624. default: false
  87625. },
  87626. checkDirectly: {
  87627. type: Boolean,
  87628. default: false
  87629. },
  87630. emptyText: {
  87631. type: String
  87632. },
  87633. childrenKey: {
  87634. type: String,
  87635. default: 'children'
  87636. },
  87637. loadData: {
  87638. type: Function
  87639. },
  87640. render: {
  87641. type: Function
  87642. },
  87643. selectNode: {
  87644. type: Boolean,
  87645. default: true
  87646. },
  87647. expandNode: {
  87648. type: Boolean,
  87649. default: false
  87650. }
  87651. },
  87652. data: function data() {
  87653. return {
  87654. prefixCls: prefixCls,
  87655. stateTree: this.data,
  87656. flatState: [],
  87657. contextMenuVisible: false,
  87658. contextMenuStyles: {
  87659. top: 0,
  87660. left: 0
  87661. }
  87662. };
  87663. },
  87664. watch: {
  87665. data: {
  87666. deep: true,
  87667. handler: function handler() {
  87668. this.stateTree = this.data;
  87669. this.flatState = this.compileFlatState();
  87670. this.rebuildTree();
  87671. }
  87672. }
  87673. },
  87674. computed: {
  87675. localeEmptyText: function localeEmptyText() {
  87676. if (typeof this.emptyText === 'undefined') {
  87677. return this.t('i.tree.emptyText');
  87678. } else {
  87679. return this.emptyText;
  87680. }
  87681. }
  87682. },
  87683. methods: {
  87684. compileFlatState: function compileFlatState() {
  87685. var _this2 = this;
  87686. var keyCounter = 0;
  87687. var childrenKey = this.childrenKey;
  87688. var flatTree = [];
  87689. function flattenChildren(node, parent) {
  87690. var _this = this;
  87691. node.nodeKey = keyCounter++;
  87692. flatTree[node.nodeKey] = { node: node, nodeKey: node.nodeKey };
  87693. if (typeof parent != 'undefined') {
  87694. flatTree[node.nodeKey].parent = parent.nodeKey;
  87695. flatTree[parent.nodeKey][childrenKey].push(node.nodeKey);
  87696. }
  87697. if (node[childrenKey]) {
  87698. flatTree[node.nodeKey][childrenKey] = [];
  87699. node[childrenKey].forEach(function (child) {
  87700. (0, _newArrowCheck3.default)(this, _this);
  87701. return flattenChildren(child, node);
  87702. }.bind(this));
  87703. }
  87704. }
  87705. this.stateTree.forEach(function (rootNode) {
  87706. (0, _newArrowCheck3.default)(this, _this2);
  87707. flattenChildren(rootNode);
  87708. }.bind(this));
  87709. return flatTree;
  87710. },
  87711. updateTreeUp: function updateTreeUp(nodeKey) {
  87712. var _this3 = this;
  87713. var parentKey = this.flatState[nodeKey].parent;
  87714. if (typeof parentKey == 'undefined' || this.checkStrictly) return;
  87715. var node = this.flatState[nodeKey].node;
  87716. var parent = this.flatState[parentKey].node;
  87717. if (node.checked == parent.checked && node.indeterminate == parent.indeterminate) return;
  87718. if (node.checked == true) {
  87719. this.$set(parent, 'checked', parent[this.childrenKey].every(function (node) {
  87720. (0, _newArrowCheck3.default)(this, _this3);
  87721. return node.checked;
  87722. }.bind(this)));
  87723. this.$set(parent, 'indeterminate', !parent.checked);
  87724. } else {
  87725. this.$set(parent, 'checked', false);
  87726. this.$set(parent, 'indeterminate', parent[this.childrenKey].some(function (node) {
  87727. (0, _newArrowCheck3.default)(this, _this3);
  87728. return node.checked || node.indeterminate;
  87729. }.bind(this)));
  87730. }
  87731. this.updateTreeUp(parentKey);
  87732. },
  87733. rebuildTree: function rebuildTree() {
  87734. var _this4 = this;
  87735. var checkedNodes = this.getCheckedNodes();
  87736. checkedNodes.forEach(function (node) {
  87737. (0, _newArrowCheck3.default)(this, _this4);
  87738. this.updateTreeDown(node, { checked: true });
  87739. var parentKey = this.flatState[node.nodeKey].parent;
  87740. if (!parentKey && parentKey !== 0) return;
  87741. var parent = this.flatState[parentKey].node;
  87742. var childHasCheckSetter = typeof node.checked != 'undefined' && node.checked;
  87743. if (childHasCheckSetter && parent.checked != node.checked) {
  87744. this.updateTreeUp(node.nodeKey);
  87745. }
  87746. }.bind(this));
  87747. },
  87748. getSelectedNodes: function getSelectedNodes() {
  87749. var _this5 = this;
  87750. return this.flatState.filter(function (obj) {
  87751. (0, _newArrowCheck3.default)(this, _this5);
  87752. return obj.node.selected;
  87753. }.bind(this)).map(function (obj) {
  87754. (0, _newArrowCheck3.default)(this, _this5);
  87755. return obj.node;
  87756. }.bind(this));
  87757. },
  87758. getCheckedNodes: function getCheckedNodes() {
  87759. var _this6 = this;
  87760. return this.flatState.filter(function (obj) {
  87761. (0, _newArrowCheck3.default)(this, _this6);
  87762. return obj.node.checked;
  87763. }.bind(this)).map(function (obj) {
  87764. (0, _newArrowCheck3.default)(this, _this6);
  87765. return obj.node;
  87766. }.bind(this));
  87767. },
  87768. getCheckedAndIndeterminateNodes: function getCheckedAndIndeterminateNodes() {
  87769. var _this7 = this;
  87770. return this.flatState.filter(function (obj) {
  87771. (0, _newArrowCheck3.default)(this, _this7);
  87772. return obj.node.checked || obj.node.indeterminate;
  87773. }.bind(this)).map(function (obj) {
  87774. (0, _newArrowCheck3.default)(this, _this7);
  87775. return obj.node;
  87776. }.bind(this));
  87777. },
  87778. updateTreeDown: function updateTreeDown(node) {
  87779. var _this8 = this;
  87780. var changes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  87781. if (this.checkStrictly) return;
  87782. for (var key in changes) {
  87783. this.$set(node, key, changes[key]);
  87784. }
  87785. if (node[this.childrenKey]) {
  87786. node[this.childrenKey].forEach(function (child) {
  87787. (0, _newArrowCheck3.default)(this, _this8);
  87788. this.updateTreeDown(child, changes);
  87789. }.bind(this));
  87790. }
  87791. },
  87792. handleSelect: function handleSelect(nodeKey) {
  87793. var _this9 = this;
  87794. if (!this.flatState[nodeKey]) return;
  87795. var node = this.flatState[nodeKey].node;
  87796. if (!this.multiple) {
  87797. var currentSelectedKey = this.flatState.findIndex(function (obj) {
  87798. (0, _newArrowCheck3.default)(this, _this9);
  87799. return obj.node.selected;
  87800. }.bind(this));
  87801. if (currentSelectedKey >= 0 && currentSelectedKey !== nodeKey) this.$set(this.flatState[currentSelectedKey].node, 'selected', false);
  87802. }
  87803. this.$set(node, 'selected', !node.selected);
  87804. this.$emit('on-select-change', this.getSelectedNodes(), node);
  87805. },
  87806. handleCheck: function handleCheck(_ref) {
  87807. var checked = _ref.checked,
  87808. nodeKey = _ref.nodeKey;
  87809. if (!this.flatState[nodeKey]) return;
  87810. var node = this.flatState[nodeKey].node;
  87811. this.$set(node, 'checked', checked);
  87812. this.$set(node, 'indeterminate', false);
  87813. this.updateTreeUp(nodeKey);
  87814. this.updateTreeDown(node, { checked: checked, indeterminate: false });
  87815. this.$emit('on-check-change', this.getCheckedNodes(), node);
  87816. },
  87817. handleContextmenu: function handleContextmenu(_ref2) {
  87818. var _this10 = this;
  87819. var data = _ref2.data,
  87820. event = _ref2.event;
  87821. if (this.contextMenuVisible) this.handleClickContextMenuOutside();
  87822. this.$nextTick(function () {
  87823. (0, _newArrowCheck3.default)(this, _this10);
  87824. var $TreeWrap = this.$refs.treeWrap;
  87825. var TreeBounding = $TreeWrap.getBoundingClientRect();
  87826. var position = {
  87827. left: event.clientX - TreeBounding.left + 'px',
  87828. top: event.clientY - TreeBounding.top + 'px'
  87829. };
  87830. this.contextMenuStyles = position;
  87831. this.contextMenuVisible = true;
  87832. this.$emit('on-contextmenu', data, event, position);
  87833. }.bind(this));
  87834. },
  87835. handleClickContextMenuOutside: function handleClickContextMenuOutside() {
  87836. this.contextMenuVisible = false;
  87837. }
  87838. },
  87839. created: function created() {
  87840. this.flatState = this.compileFlatState();
  87841. this.rebuildTree();
  87842. },
  87843. mounted: function mounted() {
  87844. var _this11 = this;
  87845. this.$on('on-check', this.handleCheck);
  87846. this.$on('on-selected', this.handleSelect);
  87847. this.$on('toggle-expand', function (node) {
  87848. (0, _newArrowCheck3.default)(this, _this11);
  87849. return this.$emit('on-toggle-expand', node);
  87850. }.bind(this));
  87851. this.$on('contextmenu', this.handleContextmenu);
  87852. }
  87853. };
  87854. /***/ }),
  87855. /* 253 */
  87856. /***/ (function(module, exports, __webpack_require__) {
  87857. "use strict";
  87858. Object.defineProperty(exports, "__esModule", {
  87859. value: true
  87860. });
  87861. var _newArrowCheck2 = __webpack_require__(1);
  87862. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  87863. var _defineProperty2 = __webpack_require__(2);
  87864. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  87865. var _checkbox = __webpack_require__(49);
  87866. var _checkbox2 = _interopRequireDefault(_checkbox);
  87867. var _icon = __webpack_require__(8);
  87868. var _icon2 = _interopRequireDefault(_icon);
  87869. var _render = __webpack_require__(613);
  87870. var _render2 = _interopRequireDefault(_render);
  87871. var _collapseTransition = __webpack_require__(83);
  87872. var _collapseTransition2 = _interopRequireDefault(_collapseTransition);
  87873. var _emitter = __webpack_require__(4);
  87874. var _emitter2 = _interopRequireDefault(_emitter);
  87875. var _assist = __webpack_require__(3);
  87876. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  87877. var prefixCls = 'ivu-tree';
  87878. exports.default = {
  87879. name: 'TreeNode',
  87880. mixins: [_emitter2.default],
  87881. inject: ['TreeInstance'],
  87882. components: { Checkbox: _checkbox2.default, Icon: _icon2.default, CollapseTransition: _collapseTransition2.default, Render: _render2.default },
  87883. props: {
  87884. data: {
  87885. type: Object,
  87886. default: function _default() {
  87887. return {};
  87888. }
  87889. },
  87890. multiple: {
  87891. type: Boolean,
  87892. default: false
  87893. },
  87894. childrenKey: {
  87895. type: String,
  87896. default: 'children'
  87897. },
  87898. showCheckbox: {
  87899. type: Boolean,
  87900. default: false
  87901. },
  87902. appear: {
  87903. type: Boolean,
  87904. default: false
  87905. }
  87906. },
  87907. data: function data() {
  87908. return {
  87909. prefixCls: prefixCls,
  87910. appearByClickArrow: false
  87911. };
  87912. },
  87913. computed: {
  87914. classes: function classes() {
  87915. return [prefixCls + '-children'];
  87916. },
  87917. selectedCls: function selectedCls() {
  87918. return [(0, _defineProperty3.default)({}, prefixCls + '-node-selected', this.data.selected)];
  87919. },
  87920. arrowClasses: function arrowClasses() {
  87921. var _ref2;
  87922. return [prefixCls + '-arrow', (_ref2 = {}, (0, _defineProperty3.default)(_ref2, prefixCls + '-arrow-disabled', this.data.disabled), (0, _defineProperty3.default)(_ref2, prefixCls + '-arrow-open', this.data.expand), _ref2)];
  87923. },
  87924. titleClasses: function titleClasses() {
  87925. return [prefixCls + '-title', (0, _defineProperty3.default)({}, prefixCls + '-title-selected', this.data.selected)];
  87926. },
  87927. showArrow: function showArrow() {
  87928. return this.data[this.childrenKey] && this.data[this.childrenKey].length || 'loading' in this.data && !this.data.loading;
  87929. },
  87930. showLoading: function showLoading() {
  87931. return 'loading' in this.data && this.data.loading;
  87932. },
  87933. isParentRender: function isParentRender() {
  87934. var Tree = (0, _assist.findComponentUpward)(this, 'Tree');
  87935. return Tree && Tree.render;
  87936. },
  87937. parentRender: function parentRender() {
  87938. var Tree = (0, _assist.findComponentUpward)(this, 'Tree');
  87939. if (Tree && Tree.render) {
  87940. return Tree.render;
  87941. } else {
  87942. return null;
  87943. }
  87944. },
  87945. node: function node() {
  87946. var _this = this;
  87947. var Tree = (0, _assist.findComponentUpward)(this, 'Tree');
  87948. if (Tree) {
  87949. return [Tree.flatState, Tree.flatState.find(function (item) {
  87950. (0, _newArrowCheck3.default)(this, _this);
  87951. return item.nodeKey === this.data.nodeKey;
  87952. }.bind(this))];
  87953. } else {
  87954. return [];
  87955. }
  87956. },
  87957. children: function children() {
  87958. return this.data[this.childrenKey];
  87959. },
  87960. arrowType: function arrowType() {
  87961. var type = 'ios-arrow-forward';
  87962. if (this.$IVIEW) {
  87963. if (this.$IVIEW.tree.customArrow) {
  87964. type = '';
  87965. } else if (this.$IVIEW.tree.arrow) {
  87966. type = this.$IVIEW.tree.arrow;
  87967. }
  87968. }
  87969. return type;
  87970. },
  87971. customArrowType: function customArrowType() {
  87972. var type = '';
  87973. if (this.$IVIEW) {
  87974. if (this.$IVIEW.tree.customArrow) {
  87975. type = this.$IVIEW.tree.customArrow;
  87976. }
  87977. }
  87978. return type;
  87979. },
  87980. arrowSize: function arrowSize() {
  87981. var size = '';
  87982. if (this.$IVIEW) {
  87983. if (this.$IVIEW.tree.arrowSize) {
  87984. size = this.$IVIEW.tree.arrowSize;
  87985. }
  87986. }
  87987. return size;
  87988. }
  87989. },
  87990. methods: {
  87991. handleExpand: function handleExpand() {
  87992. var _this2 = this;
  87993. var item = this.data;
  87994. this.appearByClickArrow = true;
  87995. if (item[this.childrenKey].length === 0) {
  87996. var tree = (0, _assist.findComponentUpward)(this, 'Tree');
  87997. if (tree && tree.loadData) {
  87998. this.$set(this.data, 'loading', true);
  87999. tree.loadData(item, function (children) {
  88000. (0, _newArrowCheck3.default)(this, _this2);
  88001. this.$set(this.data, 'loading', false);
  88002. if (children.length) {
  88003. this.$set(this.data, this.childrenKey, children);
  88004. this.$nextTick(function () {
  88005. (0, _newArrowCheck3.default)(this, _this2);
  88006. return this.handleExpand();
  88007. }.bind(this));
  88008. }
  88009. }.bind(this));
  88010. return;
  88011. }
  88012. }
  88013. if (item[this.childrenKey] && item[this.childrenKey].length) {
  88014. this.$set(this.data, 'expand', !this.data.expand);
  88015. this.dispatch('Tree', 'toggle-expand', this.data);
  88016. }
  88017. },
  88018. handleClickNode: function handleClickNode() {
  88019. if (this.TreeInstance.expandNode) {
  88020. if (this.showArrow) this.handleExpand();
  88021. } else if (this.TreeInstance.selectNode) {
  88022. this.handleSelect();
  88023. }
  88024. },
  88025. handleSelect: function handleSelect() {
  88026. if (this.data.disabled) return;
  88027. if (this.TreeInstance.showCheckbox && this.TreeInstance.checkDirectly) {
  88028. this.handleCheck();
  88029. } else {
  88030. this.dispatch('Tree', 'on-selected', this.data.nodeKey);
  88031. }
  88032. },
  88033. handleCheck: function handleCheck() {
  88034. if (this.data.disabled) return;
  88035. var changes = {
  88036. checked: !this.data.checked && !this.data.indeterminate,
  88037. nodeKey: this.data.nodeKey
  88038. };
  88039. this.dispatch('Tree', 'on-check', changes);
  88040. },
  88041. handleContextmenu: function handleContextmenu(data, event) {
  88042. if (data.contextmenu) {
  88043. event.preventDefault();
  88044. this.dispatch('Tree', 'contextmenu', { data: data, event: event });
  88045. }
  88046. },
  88047. handlePreventSelect: function handlePreventSelect(data, event) {
  88048. if (data.contextmenu) {
  88049. event.preventDefault();
  88050. }
  88051. }
  88052. }
  88053. };
  88054. /***/ }),
  88055. /* 254 */
  88056. /***/ (function(module, exports, __webpack_require__) {
  88057. "use strict";
  88058. Object.defineProperty(exports, "__esModule", {
  88059. value: true
  88060. });
  88061. var _newArrowCheck2 = __webpack_require__(1);
  88062. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  88063. var _defineProperty2 = __webpack_require__(2);
  88064. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  88065. var _uploadList = __webpack_require__(618);
  88066. var _uploadList2 = _interopRequireDefault(_uploadList);
  88067. var _ajax = __webpack_require__(620);
  88068. var _ajax2 = _interopRequireDefault(_ajax);
  88069. var _assist = __webpack_require__(3);
  88070. var _emitter = __webpack_require__(4);
  88071. var _emitter2 = _interopRequireDefault(_emitter);
  88072. var _form = __webpack_require__(11);
  88073. var _form2 = _interopRequireDefault(_form);
  88074. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  88075. var prefixCls = 'ivu-upload';
  88076. exports.default = {
  88077. name: 'Upload',
  88078. mixins: [_emitter2.default, _form2.default],
  88079. components: { UploadList: _uploadList2.default },
  88080. props: {
  88081. action: {
  88082. type: String,
  88083. required: true
  88084. },
  88085. headers: {
  88086. type: Object,
  88087. default: function _default() {
  88088. return {};
  88089. }
  88090. },
  88091. multiple: {
  88092. type: Boolean,
  88093. default: false
  88094. },
  88095. data: {
  88096. type: Object
  88097. },
  88098. name: {
  88099. type: String,
  88100. default: 'file'
  88101. },
  88102. withCredentials: {
  88103. type: Boolean,
  88104. default: false
  88105. },
  88106. showUploadList: {
  88107. type: Boolean,
  88108. default: true
  88109. },
  88110. type: {
  88111. type: String,
  88112. validator: function validator(value) {
  88113. return (0, _assist.oneOf)(value, ['select', 'drag']);
  88114. },
  88115. default: 'select'
  88116. },
  88117. format: {
  88118. type: Array,
  88119. default: function _default() {
  88120. return [];
  88121. }
  88122. },
  88123. accept: {
  88124. type: String
  88125. },
  88126. maxSize: {
  88127. type: Number
  88128. },
  88129. beforeUpload: Function,
  88130. onProgress: {
  88131. type: Function,
  88132. default: function _default() {
  88133. return {};
  88134. }
  88135. },
  88136. onSuccess: {
  88137. type: Function,
  88138. default: function _default() {
  88139. return {};
  88140. }
  88141. },
  88142. onError: {
  88143. type: Function,
  88144. default: function _default() {
  88145. return {};
  88146. }
  88147. },
  88148. onRemove: {
  88149. type: Function,
  88150. default: function _default() {
  88151. return {};
  88152. }
  88153. },
  88154. onPreview: {
  88155. type: Function,
  88156. default: function _default() {
  88157. return {};
  88158. }
  88159. },
  88160. onExceededSize: {
  88161. type: Function,
  88162. default: function _default() {
  88163. return {};
  88164. }
  88165. },
  88166. onFormatError: {
  88167. type: Function,
  88168. default: function _default() {
  88169. return {};
  88170. }
  88171. },
  88172. defaultFileList: {
  88173. type: Array,
  88174. default: function _default() {
  88175. return [];
  88176. }
  88177. },
  88178. paste: {
  88179. type: Boolean,
  88180. default: false
  88181. },
  88182. disabled: {
  88183. type: Boolean,
  88184. default: false
  88185. },
  88186. webkitdirectory: {
  88187. type: Boolean,
  88188. default: false
  88189. }
  88190. },
  88191. data: function data() {
  88192. return {
  88193. prefixCls: prefixCls,
  88194. dragOver: false,
  88195. fileList: [],
  88196. tempIndex: 1
  88197. };
  88198. },
  88199. computed: {
  88200. classes: function classes() {
  88201. var _ref;
  88202. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-select', this.type === 'select'), (0, _defineProperty3.default)(_ref, prefixCls + '-drag', this.type === 'drag'), (0, _defineProperty3.default)(_ref, prefixCls + '-dragOver', this.type === 'drag' && this.dragOver), _ref)];
  88203. }
  88204. },
  88205. methods: {
  88206. handleClick: function handleClick() {
  88207. if (this.itemDisabled) return;
  88208. this.$refs.input.click();
  88209. },
  88210. handleChange: function handleChange(e) {
  88211. var files = e.target.files;
  88212. if (!files) {
  88213. return;
  88214. }
  88215. this.uploadFiles(files);
  88216. this.$refs.input.value = null;
  88217. },
  88218. onDrop: function onDrop(e) {
  88219. this.dragOver = false;
  88220. if (this.itemDisabled) return;
  88221. this.uploadFiles(e.dataTransfer.files);
  88222. },
  88223. handlePaste: function handlePaste(e) {
  88224. if (this.itemDisabled) return;
  88225. if (this.paste) {
  88226. this.uploadFiles(e.clipboardData.files);
  88227. }
  88228. },
  88229. uploadFiles: function uploadFiles(files) {
  88230. var _this = this;
  88231. var postFiles = Array.prototype.slice.call(files);
  88232. if (!this.multiple) postFiles = postFiles.slice(0, 1);
  88233. if (postFiles.length === 0) return;
  88234. postFiles.forEach(function (file) {
  88235. (0, _newArrowCheck3.default)(this, _this);
  88236. this.upload(file);
  88237. }.bind(this));
  88238. },
  88239. upload: function upload(file) {
  88240. var _this2 = this;
  88241. if (!this.beforeUpload) {
  88242. return this.post(file);
  88243. }
  88244. var before = this.beforeUpload(file);
  88245. if (before && before.then) {
  88246. before.then(function (processedFile) {
  88247. (0, _newArrowCheck3.default)(this, _this2);
  88248. if (Object.prototype.toString.call(processedFile) === '[object File]') {
  88249. this.post(processedFile);
  88250. } else {
  88251. this.post(file);
  88252. }
  88253. }.bind(this), function () {
  88254. (0, _newArrowCheck3.default)(this, _this2);
  88255. }.bind(this));
  88256. } else if (before !== false) {
  88257. this.post(file);
  88258. } else {}
  88259. },
  88260. post: function post(file) {
  88261. var _this3 = this;
  88262. if (this.format.length) {
  88263. var _file_format = file.name.split('.').pop().toLocaleLowerCase();
  88264. var checked = this.format.some(function (item) {
  88265. (0, _newArrowCheck3.default)(this, _this3);
  88266. return item.toLocaleLowerCase() === _file_format;
  88267. }.bind(this));
  88268. if (!checked) {
  88269. this.onFormatError(file, this.fileList);
  88270. return false;
  88271. }
  88272. }
  88273. if (this.maxSize) {
  88274. if (file.size > this.maxSize * 1024) {
  88275. this.onExceededSize(file, this.fileList);
  88276. return false;
  88277. }
  88278. }
  88279. this.handleStart(file);
  88280. var formData = new FormData();
  88281. formData.append(this.name, file);
  88282. (0, _ajax2.default)({
  88283. headers: this.headers,
  88284. withCredentials: this.withCredentials,
  88285. file: file,
  88286. data: this.data,
  88287. filename: this.name,
  88288. action: this.action,
  88289. onProgress: function onProgress(e) {
  88290. (0, _newArrowCheck3.default)(this, _this3);
  88291. this.handleProgress(e, file);
  88292. }.bind(this),
  88293. onSuccess: function onSuccess(res) {
  88294. (0, _newArrowCheck3.default)(this, _this3);
  88295. this.handleSuccess(res, file);
  88296. }.bind(this),
  88297. onError: function onError(err, response) {
  88298. (0, _newArrowCheck3.default)(this, _this3);
  88299. this.handleError(err, response, file);
  88300. }.bind(this)
  88301. });
  88302. },
  88303. handleStart: function handleStart(file) {
  88304. file.uid = Date.now() + this.tempIndex++;
  88305. var _file = {
  88306. status: 'uploading',
  88307. name: file.name,
  88308. size: file.size,
  88309. percentage: 0,
  88310. uid: file.uid,
  88311. showProgress: true
  88312. };
  88313. this.fileList.push(_file);
  88314. },
  88315. getFile: function getFile(file) {
  88316. var _this4 = this;
  88317. var fileList = this.fileList;
  88318. var target = void 0;
  88319. fileList.every(function (item) {
  88320. (0, _newArrowCheck3.default)(this, _this4);
  88321. target = file.uid === item.uid ? item : null;
  88322. return !target;
  88323. }.bind(this));
  88324. return target;
  88325. },
  88326. handleProgress: function handleProgress(e, file) {
  88327. var _file = this.getFile(file);
  88328. this.onProgress(e, _file, this.fileList);
  88329. _file.percentage = e.percent || 0;
  88330. },
  88331. handleSuccess: function handleSuccess(res, file) {
  88332. var _this5 = this;
  88333. var _file = this.getFile(file);
  88334. if (_file) {
  88335. _file.status = 'finished';
  88336. _file.response = res;
  88337. this.onSuccess(res, _file, this.fileList);
  88338. this.dispatch('FormItem', 'on-form-change', _file);
  88339. setTimeout(function () {
  88340. (0, _newArrowCheck3.default)(this, _this5);
  88341. _file.showProgress = false;
  88342. }.bind(this), 1000);
  88343. }
  88344. },
  88345. handleError: function handleError(err, response, file) {
  88346. var _file = this.getFile(file);
  88347. var fileList = this.fileList;
  88348. _file.status = 'fail';
  88349. fileList.splice(fileList.indexOf(_file), 1);
  88350. this.onError(err, response, file);
  88351. },
  88352. handleRemove: function handleRemove(file) {
  88353. var fileList = this.fileList;
  88354. fileList.splice(fileList.indexOf(file), 1);
  88355. this.onRemove(file, fileList);
  88356. },
  88357. handlePreview: function handlePreview(file) {
  88358. if (file.status === 'finished') {
  88359. this.onPreview(file);
  88360. }
  88361. },
  88362. clearFiles: function clearFiles() {
  88363. this.fileList = [];
  88364. }
  88365. },
  88366. watch: {
  88367. defaultFileList: {
  88368. immediate: true,
  88369. handler: function handler(fileList) {
  88370. var _this6 = this;
  88371. this.fileList = fileList.map(function (item) {
  88372. (0, _newArrowCheck3.default)(this, _this6);
  88373. item.status = 'finished';
  88374. item.percentage = 100;
  88375. item.uid = Date.now() + this.tempIndex++;
  88376. return item;
  88377. }.bind(this));
  88378. }
  88379. }
  88380. }
  88381. };
  88382. /***/ }),
  88383. /* 255 */
  88384. /***/ (function(module, exports, __webpack_require__) {
  88385. "use strict";
  88386. Object.defineProperty(exports, "__esModule", {
  88387. value: true
  88388. });
  88389. var _defineProperty2 = __webpack_require__(2);
  88390. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  88391. var _icon = __webpack_require__(8);
  88392. var _icon2 = _interopRequireDefault(_icon);
  88393. var _progress = __webpack_require__(222);
  88394. var _progress2 = _interopRequireDefault(_progress);
  88395. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  88396. var prefixCls = 'ivu-upload';
  88397. exports.default = {
  88398. name: 'UploadList',
  88399. components: { Icon: _icon2.default, iProgress: _progress2.default },
  88400. props: {
  88401. files: {
  88402. type: Array,
  88403. default: function _default() {
  88404. return [];
  88405. }
  88406. }
  88407. },
  88408. data: function data() {
  88409. return {
  88410. prefixCls: prefixCls
  88411. };
  88412. },
  88413. methods: {
  88414. fileCls: function fileCls(file) {
  88415. return [prefixCls + '-list-file', (0, _defineProperty3.default)({}, prefixCls + '-list-file-finish', file.status === 'finished')];
  88416. },
  88417. handleClick: function handleClick(file) {
  88418. this.$emit('on-file-click', file);
  88419. },
  88420. handlePreview: function handlePreview(file) {
  88421. this.$emit('on-file-preview', file);
  88422. },
  88423. handleRemove: function handleRemove(file) {
  88424. this.$emit('on-file-remove', file);
  88425. },
  88426. format: function format(file) {
  88427. var format = file.name.split('.').pop().toLocaleLowerCase() || '';
  88428. var type = 'ios-document-outline';
  88429. if (['gif', 'jpg', 'jpeg', 'png', 'bmp', 'webp'].indexOf(format) > -1) {
  88430. type = 'ios-image';
  88431. }
  88432. if (['mp4', 'm3u8', 'rmvb', 'avi', 'swf', '3gp', 'mkv', 'flv'].indexOf(format) > -1) {
  88433. type = 'ios-film';
  88434. }
  88435. if (['mp3', 'wav', 'wma', 'ogg', 'aac', 'flac'].indexOf(format) > -1) {
  88436. type = 'ios-musical-notes';
  88437. }
  88438. if (['doc', 'txt', 'docx', 'pages', 'epub', 'pdf'].indexOf(format) > -1) {
  88439. type = 'md-document';
  88440. }
  88441. if (['numbers', 'csv', 'xls', 'xlsx'].indexOf(format) > -1) {
  88442. type = 'ios-stats';
  88443. }
  88444. if (['keynote', 'ppt', 'pptx'].indexOf(format) > -1) {
  88445. type = 'ios-videocam';
  88446. }
  88447. return type;
  88448. },
  88449. parsePercentage: function parsePercentage(val) {
  88450. return parseInt(val, 10);
  88451. }
  88452. }
  88453. };
  88454. /***/ }),
  88455. /* 256 */
  88456. /***/ (function(module, exports, __webpack_require__) {
  88457. "use strict";
  88458. Object.defineProperty(exports, "__esModule", {
  88459. value: true
  88460. });
  88461. var _newArrowCheck2 = __webpack_require__(1);
  88462. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  88463. var _defineProperty2 = __webpack_require__(2);
  88464. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  88465. var _assist = __webpack_require__(3);
  88466. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  88467. var prefixCls = 'ivu-row';
  88468. exports.default = {
  88469. name: 'Row',
  88470. props: {
  88471. type: {
  88472. validator: function validator(value) {
  88473. return (0, _assist.oneOf)(value, ['flex']);
  88474. }
  88475. },
  88476. align: {
  88477. validator: function validator(value) {
  88478. return (0, _assist.oneOf)(value, ['top', 'middle', 'bottom']);
  88479. }
  88480. },
  88481. justify: {
  88482. validator: function validator(value) {
  88483. return (0, _assist.oneOf)(value, ['start', 'end', 'center', 'space-around', 'space-between']);
  88484. }
  88485. },
  88486. gutter: {
  88487. type: Number,
  88488. default: 0
  88489. },
  88490. className: String,
  88491. wrap: {
  88492. type: Boolean,
  88493. default: true
  88494. }
  88495. },
  88496. computed: {
  88497. classes: function classes() {
  88498. var _ref;
  88499. return ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.type), !!this.type), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.type) + '-' + String(this.align), !!this.align && this.type), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.type) + '-' + String(this.justify), !!this.justify && this.type), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.align), !!this.align), (0, _defineProperty3.default)(_ref, prefixCls + '-' + String(this.justify), !!this.justify), (0, _defineProperty3.default)(_ref, '' + String(this.className), !!this.className), (0, _defineProperty3.default)(_ref, prefixCls + '-no-wrap', !this.wrap), _ref)];
  88500. },
  88501. styles: function styles() {
  88502. var style = {};
  88503. if (this.gutter !== 0) {
  88504. style = {
  88505. marginLeft: this.gutter / -2 + 'px',
  88506. marginRight: this.gutter / -2 + 'px'
  88507. };
  88508. }
  88509. return style;
  88510. }
  88511. },
  88512. methods: {
  88513. updateGutter: function updateGutter(val) {
  88514. var _this = this;
  88515. var Col = (0, _assist.findComponentDownward)(this, 'iCol');
  88516. var Cols = (0, _assist.findBrothersComponents)(Col, 'iCol', false);
  88517. if (Cols.length) {
  88518. Cols.forEach(function (child) {
  88519. (0, _newArrowCheck3.default)(this, _this);
  88520. if (val !== 0) {
  88521. child.gutter = val;
  88522. }
  88523. }.bind(this));
  88524. }
  88525. }
  88526. },
  88527. watch: {
  88528. gutter: function gutter(val) {
  88529. this.updateGutter(val);
  88530. }
  88531. }
  88532. };
  88533. /***/ }),
  88534. /* 257 */
  88535. /***/ (function(module, exports, __webpack_require__) {
  88536. "use strict";
  88537. Object.defineProperty(exports, "__esModule", {
  88538. value: true
  88539. });
  88540. var _keys = __webpack_require__(21);
  88541. var _keys2 = _interopRequireDefault(_keys);
  88542. var _typeof2 = __webpack_require__(27);
  88543. var _typeof3 = _interopRequireDefault(_typeof2);
  88544. var _newArrowCheck2 = __webpack_require__(1);
  88545. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  88546. var _defineProperty2 = __webpack_require__(2);
  88547. var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  88548. var _assist = __webpack_require__(3);
  88549. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  88550. var prefixCls = 'ivu-col';
  88551. function parseFlex(flex) {
  88552. if (typeof flex === 'number') {
  88553. return flex + ' ' + flex + ' auto';
  88554. }
  88555. if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
  88556. return '0 0 ' + String(flex);
  88557. }
  88558. return flex;
  88559. }
  88560. exports.default = {
  88561. name: 'iCol',
  88562. props: {
  88563. span: [Number, String],
  88564. order: [Number, String],
  88565. offset: [Number, String],
  88566. push: [Number, String],
  88567. pull: [Number, String],
  88568. className: String,
  88569. xs: [Number, Object],
  88570. sm: [Number, Object],
  88571. md: [Number, Object],
  88572. lg: [Number, Object],
  88573. xl: [Number, Object],
  88574. xxl: [Number, Object],
  88575. flex: {
  88576. type: [Number, String],
  88577. default: ''
  88578. }
  88579. },
  88580. data: function data() {
  88581. return {
  88582. gutter: 0
  88583. };
  88584. },
  88585. computed: {
  88586. classes: function classes() {
  88587. var _ref,
  88588. _this = this;
  88589. var classList = ['' + prefixCls, (_ref = {}, (0, _defineProperty3.default)(_ref, prefixCls + '-span-' + String(this.span), this.span), (0, _defineProperty3.default)(_ref, prefixCls + '-order-' + String(this.order), this.order), (0, _defineProperty3.default)(_ref, prefixCls + '-offset-' + String(this.offset), this.offset), (0, _defineProperty3.default)(_ref, prefixCls + '-push-' + String(this.push), this.push), (0, _defineProperty3.default)(_ref, prefixCls + '-pull-' + String(this.pull), this.pull), (0, _defineProperty3.default)(_ref, '' + String(this.className), !!this.className), _ref)];
  88590. ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach(function (size) {
  88591. (0, _newArrowCheck3.default)(this, _this);
  88592. if (typeof this[size] === 'number') {
  88593. classList.push(prefixCls + '-span-' + String(size) + '-' + String(this[size]));
  88594. } else if ((0, _typeof3.default)(this[size]) === 'object') {
  88595. var props = this[size];
  88596. (0, _keys2.default)(props).forEach(function (prop) {
  88597. (0, _newArrowCheck3.default)(this, _this);
  88598. classList.push(prop !== 'span' ? prefixCls + '-' + String(size) + '-' + String(prop) + '-' + String(props[prop]) : prefixCls + '-span-' + String(size) + '-' + String(props[prop]));
  88599. }.bind(this));
  88600. }
  88601. }.bind(this));
  88602. return classList;
  88603. },
  88604. styles: function styles() {
  88605. var style = {};
  88606. if (this.gutter !== 0) {
  88607. style = {
  88608. paddingLeft: this.gutter / 2 + 'px',
  88609. paddingRight: this.gutter / 2 + 'px'
  88610. };
  88611. }
  88612. if (this.flex) {
  88613. style.flex = parseFlex(this.flex);
  88614. }
  88615. return style;
  88616. }
  88617. },
  88618. methods: {
  88619. updateGutter: function updateGutter() {
  88620. var Row = (0, _assist.findComponentUpward)(this, 'Row');
  88621. if (Row) {
  88622. Row.updateGutter(Row.gutter);
  88623. }
  88624. }
  88625. },
  88626. mounted: function mounted() {
  88627. this.updateGutter();
  88628. },
  88629. beforeDestroy: function beforeDestroy() {
  88630. this.updateGutter();
  88631. }
  88632. };
  88633. /***/ }),
  88634. /* 258 */
  88635. /***/ (function(module, exports, __webpack_require__) {
  88636. "use strict";
  88637. Object.defineProperty(exports, "__esModule", {
  88638. value: true
  88639. });
  88640. var _newArrowCheck2 = __webpack_require__(1);
  88641. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  88642. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  88643. var prefixCls = 'ivu-select-group';
  88644. exports.default = {
  88645. name: 'OptionGroup',
  88646. props: {
  88647. label: {
  88648. type: String,
  88649. default: ''
  88650. }
  88651. },
  88652. data: function data() {
  88653. return {
  88654. prefixCls: prefixCls,
  88655. hidden: false };
  88656. },
  88657. methods: {
  88658. queryChange: function queryChange() {
  88659. var _this = this;
  88660. this.$nextTick(function () {
  88661. (0, _newArrowCheck3.default)(this, _this);
  88662. var options = this.$refs.options.querySelectorAll('.ivu-select-item');
  88663. var hasVisibleOption = false;
  88664. for (var i = 0; i < options.length; i++) {
  88665. if (options[i].style.display !== 'none') {
  88666. hasVisibleOption = true;
  88667. break;
  88668. }
  88669. }
  88670. this.hidden = !hasVisibleOption;
  88671. }.bind(this));
  88672. }
  88673. },
  88674. mounted: function mounted() {
  88675. var _this2 = this;
  88676. this.$on('on-query-change', function () {
  88677. (0, _newArrowCheck3.default)(this, _this2);
  88678. this.queryChange();
  88679. return true;
  88680. }.bind(this));
  88681. },
  88682. beforeDestroy: function beforeDestroy() {
  88683. this.$off('on-query-change');
  88684. }
  88685. };
  88686. /***/ }),
  88687. /* 259 */
  88688. /***/ (function(module, exports, __webpack_require__) {
  88689. "use strict";
  88690. var _newArrowCheck2 = __webpack_require__(1);
  88691. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  88692. var _keys = __webpack_require__(21);
  88693. var _keys2 = _interopRequireDefault(_keys);
  88694. var _extends2 = __webpack_require__(32);
  88695. var _extends3 = _interopRequireDefault(_extends2);
  88696. var _affix = __webpack_require__(267);
  88697. var _affix2 = _interopRequireDefault(_affix);
  88698. var _alert = __webpack_require__(273);
  88699. var _alert2 = _interopRequireDefault(_alert);
  88700. var _anchor = __webpack_require__(283);
  88701. var _anchor2 = _interopRequireDefault(_anchor);
  88702. var _anchorLink = __webpack_require__(286);
  88703. var _anchorLink2 = _interopRequireDefault(_anchorLink);
  88704. var _autoComplete = __webpack_require__(289);
  88705. var _autoComplete2 = _interopRequireDefault(_autoComplete);
  88706. var _avatar = __webpack_require__(341);
  88707. var _avatar2 = _interopRequireDefault(_avatar);
  88708. var _backTop = __webpack_require__(343);
  88709. var _backTop2 = _interopRequireDefault(_backTop);
  88710. var _badge = __webpack_require__(346);
  88711. var _badge2 = _interopRequireDefault(_badge);
  88712. var _breadcrumb = __webpack_require__(349);
  88713. var _breadcrumb2 = _interopRequireDefault(_breadcrumb);
  88714. var _button = __webpack_require__(354);
  88715. var _button2 = _interopRequireDefault(_button);
  88716. var _card = __webpack_require__(358);
  88717. var _card2 = _interopRequireDefault(_card);
  88718. var _carousel = __webpack_require__(361);
  88719. var _carousel2 = _interopRequireDefault(_carousel);
  88720. var _cascader = __webpack_require__(366);
  88721. var _cascader2 = _interopRequireDefault(_cascader);
  88722. var _cell = __webpack_require__(373);
  88723. var _cell2 = _interopRequireDefault(_cell);
  88724. var _checkbox = __webpack_require__(380);
  88725. var _checkbox2 = _interopRequireDefault(_checkbox);
  88726. var _circle = __webpack_require__(383);
  88727. var _circle2 = _interopRequireDefault(_circle);
  88728. var _collapse = __webpack_require__(387);
  88729. var _collapse2 = _interopRequireDefault(_collapse);
  88730. var _colorPicker = __webpack_require__(392);
  88731. var _colorPicker2 = _interopRequireDefault(_colorPicker);
  88732. var _content = __webpack_require__(403);
  88733. var _content2 = _interopRequireDefault(_content);
  88734. var _datePicker = __webpack_require__(405);
  88735. var _datePicker2 = _interopRequireDefault(_datePicker);
  88736. var _divider = __webpack_require__(425);
  88737. var _divider2 = _interopRequireDefault(_divider);
  88738. var _drawer = __webpack_require__(428);
  88739. var _drawer2 = _interopRequireDefault(_drawer);
  88740. var _dropdown = __webpack_require__(431);
  88741. var _dropdown2 = _interopRequireDefault(_dropdown);
  88742. var _footer = __webpack_require__(436);
  88743. var _footer2 = _interopRequireDefault(_footer);
  88744. var _form = __webpack_require__(438);
  88745. var _form2 = _interopRequireDefault(_form);
  88746. var _header = __webpack_require__(452);
  88747. var _header2 = _interopRequireDefault(_header);
  88748. var _icon = __webpack_require__(19);
  88749. var _icon2 = _interopRequireDefault(_icon);
  88750. var _input = __webpack_require__(454);
  88751. var _input2 = _interopRequireDefault(_input);
  88752. var _inputNumber = __webpack_require__(455);
  88753. var _inputNumber2 = _interopRequireDefault(_inputNumber);
  88754. var _scroll = __webpack_require__(457);
  88755. var _scroll2 = _interopRequireDefault(_scroll);
  88756. var _split = __webpack_require__(468);
  88757. var _split2 = _interopRequireDefault(_split);
  88758. var _layout = __webpack_require__(473);
  88759. var _layout2 = _interopRequireDefault(_layout);
  88760. var _list = __webpack_require__(477);
  88761. var _list2 = _interopRequireDefault(_list);
  88762. var _loadingBar = __webpack_require__(484);
  88763. var _loadingBar2 = _interopRequireDefault(_loadingBar);
  88764. var _menu = __webpack_require__(488);
  88765. var _menu2 = _interopRequireDefault(_menu);
  88766. var _message = __webpack_require__(497);
  88767. var _message2 = _interopRequireDefault(_message);
  88768. var _modal = __webpack_require__(502);
  88769. var _modal2 = _interopRequireDefault(_modal);
  88770. var _notice = __webpack_require__(506);
  88771. var _notice2 = _interopRequireDefault(_notice);
  88772. var _page = __webpack_require__(507);
  88773. var _page2 = _interopRequireDefault(_page);
  88774. var _poptip = __webpack_require__(512);
  88775. var _poptip2 = _interopRequireDefault(_poptip);
  88776. var _progress = __webpack_require__(514);
  88777. var _progress2 = _interopRequireDefault(_progress);
  88778. var _radio = __webpack_require__(516);
  88779. var _radio2 = _interopRequireDefault(_radio);
  88780. var _rate = __webpack_require__(521);
  88781. var _rate2 = _interopRequireDefault(_rate);
  88782. var _sider = __webpack_require__(524);
  88783. var _sider2 = _interopRequireDefault(_sider);
  88784. var _slider = __webpack_require__(525);
  88785. var _slider2 = _interopRequireDefault(_slider);
  88786. var _spin = __webpack_require__(540);
  88787. var _spin2 = _interopRequireDefault(_spin);
  88788. var _steps = __webpack_require__(542);
  88789. var _steps2 = _interopRequireDefault(_steps);
  88790. var _switch = __webpack_require__(547);
  88791. var _switch2 = _interopRequireDefault(_switch);
  88792. var _table = __webpack_require__(550);
  88793. var _table2 = _interopRequireDefault(_table);
  88794. var _tabs = __webpack_require__(582);
  88795. var _tabs2 = _interopRequireDefault(_tabs);
  88796. var _tag = __webpack_require__(587);
  88797. var _tag2 = _interopRequireDefault(_tag);
  88798. var _time = __webpack_require__(590);
  88799. var _time2 = _interopRequireDefault(_time);
  88800. var _timeline = __webpack_require__(594);
  88801. var _timeline2 = _interopRequireDefault(_timeline);
  88802. var _timePicker = __webpack_require__(599);
  88803. var _timePicker2 = _interopRequireDefault(_timePicker);
  88804. var _tooltip = __webpack_require__(601);
  88805. var _tooltip2 = _interopRequireDefault(_tooltip);
  88806. var _transfer = __webpack_require__(602);
  88807. var _transfer2 = _interopRequireDefault(_transfer);
  88808. var _tree = __webpack_require__(610);
  88809. var _tree2 = _interopRequireDefault(_tree);
  88810. var _upload = __webpack_require__(616);
  88811. var _upload2 = _interopRequireDefault(_upload);
  88812. var _grid = __webpack_require__(622);
  88813. var _select = __webpack_require__(627);
  88814. var _index = __webpack_require__(120);
  88815. var _index2 = _interopRequireDefault(_index);
  88816. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  88817. var components = {
  88818. Affix: _affix2.default,
  88819. Alert: _alert2.default,
  88820. Anchor: _anchor2.default,
  88821. AnchorLink: _anchorLink2.default,
  88822. AutoComplete: _autoComplete2.default,
  88823. Avatar: _avatar2.default,
  88824. BackTop: _backTop2.default,
  88825. Badge: _badge2.default,
  88826. Breadcrumb: _breadcrumb2.default,
  88827. BreadcrumbItem: _breadcrumb2.default.Item,
  88828. Button: _button2.default,
  88829. ButtonGroup: _button2.default.Group,
  88830. Card: _card2.default,
  88831. Carousel: _carousel2.default,
  88832. CarouselItem: _carousel2.default.Item,
  88833. Cascader: _cascader2.default,
  88834. Cell: _cell2.default,
  88835. CellGroup: _cell2.default.Group,
  88836. Checkbox: _checkbox2.default,
  88837. CheckboxGroup: _checkbox2.default.Group,
  88838. Col: _grid.Col,
  88839. Collapse: _collapse2.default,
  88840. ColorPicker: _colorPicker2.default,
  88841. Content: _content2.default,
  88842. DatePicker: _datePicker2.default,
  88843. Divider: _divider2.default,
  88844. Drawer: _drawer2.default,
  88845. Dropdown: _dropdown2.default,
  88846. DropdownItem: _dropdown2.default.Item,
  88847. DropdownMenu: _dropdown2.default.Menu,
  88848. Footer: _footer2.default,
  88849. Form: _form2.default,
  88850. FormItem: _form2.default.Item,
  88851. Header: _header2.default,
  88852. Icon: _icon2.default,
  88853. Input: _input2.default,
  88854. InputNumber: _inputNumber2.default,
  88855. Scroll: _scroll2.default,
  88856. Sider: _sider2.default,
  88857. Split: _split2.default,
  88858. Submenu: _menu2.default.Sub,
  88859. Layout: _layout2.default,
  88860. List: _list2.default,
  88861. ListItem: _list2.default.Item,
  88862. ListItemMeta: _list2.default.Item.Meta,
  88863. LoadingBar: _loadingBar2.default,
  88864. Menu: _menu2.default,
  88865. MenuGroup: _menu2.default.Group,
  88866. MenuItem: _menu2.default.Item,
  88867. Message: _message2.default,
  88868. Modal: _modal2.default,
  88869. Notice: _notice2.default,
  88870. Option: _select.Option,
  88871. OptionGroup: _select.OptionGroup,
  88872. Page: _page2.default,
  88873. Panel: _collapse2.default.Panel,
  88874. Poptip: _poptip2.default,
  88875. Progress: _progress2.default,
  88876. Radio: _radio2.default,
  88877. RadioGroup: _radio2.default.Group,
  88878. Rate: _rate2.default,
  88879. Row: _grid.Row,
  88880. Select: _select.Select,
  88881. Slider: _slider2.default,
  88882. Spin: _spin2.default,
  88883. Step: _steps2.default.Step,
  88884. Steps: _steps2.default,
  88885. Table: _table2.default,
  88886. Tabs: _tabs2.default,
  88887. TabPane: _tabs2.default.Pane,
  88888. Tag: _tag2.default,
  88889. Time: _time2.default,
  88890. Timeline: _timeline2.default,
  88891. TimelineItem: _timeline2.default.Item,
  88892. TimePicker: _timePicker2.default,
  88893. Tooltip: _tooltip2.default,
  88894. Transfer: _transfer2.default,
  88895. Tree: _tree2.default,
  88896. Upload: _upload2.default
  88897. };
  88898. var iview = (0, _extends3.default)({}, components, {
  88899. iButton: _button2.default,
  88900. iCircle: _circle2.default,
  88901. iCol: _grid.Col,
  88902. iContent: _content2.default,
  88903. iForm: _form2.default,
  88904. iFooter: _footer2.default,
  88905. iHeader: _header2.default,
  88906. iInput: _input2.default,
  88907. iMenu: _menu2.default,
  88908. iOption: _select.Option,
  88909. iProgress: _progress2.default,
  88910. iSelect: _select.Select,
  88911. iSwitch: _switch2.default,
  88912. iTable: _table2.default,
  88913. iTime: _time2.default
  88914. });
  88915. var install = function install(Vue) {
  88916. var _this = this;
  88917. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  88918. if (install.installed) return;
  88919. _index2.default.use(opts.locale);
  88920. _index2.default.i18n(opts.i18n);
  88921. (0, _keys2.default)(iview).forEach(function (key) {
  88922. (0, _newArrowCheck3.default)(this, _this);
  88923. Vue.component(key, iview[key]);
  88924. }.bind(this));
  88925. Vue.prototype.$IVIEW = {
  88926. size: opts.size || '',
  88927. transfer: 'transfer' in opts ? opts.transfer : '',
  88928. capture: 'capture' in opts ? opts.capture : true,
  88929. select: {
  88930. arrow: opts.select ? opts.select.arrow ? opts.select.arrow : '' : '',
  88931. customArrow: opts.select ? opts.select.customArrow ? opts.select.customArrow : '' : '',
  88932. arrowSize: opts.select ? opts.select.arrowSize ? opts.select.arrowSize : '' : ''
  88933. },
  88934. cell: {
  88935. arrow: opts.cell ? opts.cell.arrow ? opts.cell.arrow : '' : '',
  88936. customArrow: opts.cell ? opts.cell.customArrow ? opts.cell.customArrow : '' : '',
  88937. arrowSize: opts.cell ? opts.cell.arrowSize ? opts.cell.arrowSize : '' : ''
  88938. },
  88939. menu: {
  88940. arrow: opts.menu ? opts.menu.arrow ? opts.menu.arrow : '' : '',
  88941. customArrow: opts.menu ? opts.menu.customArrow ? opts.menu.customArrow : '' : '',
  88942. arrowSize: opts.menu ? opts.menu.arrowSize ? opts.menu.arrowSize : '' : ''
  88943. },
  88944. tree: {
  88945. arrow: opts.tree ? opts.tree.arrow ? opts.tree.arrow : '' : '',
  88946. customArrow: opts.tree ? opts.tree.customArrow ? opts.tree.customArrow : '' : '',
  88947. arrowSize: opts.tree ? opts.tree.arrowSize ? opts.tree.arrowSize : '' : ''
  88948. },
  88949. cascader: {
  88950. arrow: opts.cascader ? opts.cascader.arrow ? opts.cascader.arrow : '' : '',
  88951. customArrow: opts.cascader ? opts.cascader.customArrow ? opts.cascader.customArrow : '' : '',
  88952. arrowSize: opts.cascader ? opts.cascader.arrowSize ? opts.cascader.arrowSize : '' : '',
  88953. itemArrow: opts.cascader ? opts.cascader.itemArrow ? opts.cascader.itemArrow : '' : '',
  88954. customItemArrow: opts.cascader ? opts.cascader.customItemArrow ? opts.cascader.customItemArrow : '' : '',
  88955. itemArrowSize: opts.cascader ? opts.cascader.itemArrowSize ? opts.cascader.itemArrowSize : '' : ''
  88956. },
  88957. colorPicker: {
  88958. arrow: opts.colorPicker ? opts.colorPicker.arrow ? opts.colorPicker.arrow : '' : '',
  88959. customArrow: opts.colorPicker ? opts.colorPicker.customArrow ? opts.colorPicker.customArrow : '' : '',
  88960. arrowSize: opts.colorPicker ? opts.colorPicker.arrowSize ? opts.colorPicker.arrowSize : '' : ''
  88961. },
  88962. datePicker: {
  88963. icon: opts.datePicker ? opts.datePicker.icon ? opts.datePicker.icon : '' : '',
  88964. customIcon: opts.datePicker ? opts.datePicker.customIcon ? opts.datePicker.customIcon : '' : '',
  88965. iconSize: opts.datePicker ? opts.datePicker.iconSize ? opts.datePicker.iconSize : '' : ''
  88966. },
  88967. timePicker: {
  88968. icon: opts.timePicker ? opts.timePicker.icon ? opts.timePicker.icon : '' : '',
  88969. customIcon: opts.timePicker ? opts.timePicker.customIcon ? opts.timePicker.customIcon : '' : '',
  88970. iconSize: opts.timePicker ? opts.timePicker.iconSize ? opts.timePicker.iconSize : '' : ''
  88971. },
  88972. tabs: {
  88973. closeIcon: opts.tabs ? opts.tabs.closeIcon ? opts.tabs.closeIcon : '' : '',
  88974. customCloseIcon: opts.tabs ? opts.tabs.customCloseIcon ? opts.tabs.customCloseIcon : '' : '',
  88975. closeIconSize: opts.tabs ? opts.tabs.closeIconSize ? opts.tabs.closeIconSize : '' : ''
  88976. },
  88977. modal: {
  88978. maskClosable: opts.modal ? 'maskClosable' in opts.modal ? opts.modal.maskClosable : '' : ''
  88979. }
  88980. };
  88981. Vue.prototype.$Loading = _loadingBar2.default;
  88982. Vue.prototype.$Message = _message2.default;
  88983. Vue.prototype.$Modal = _modal2.default;
  88984. Vue.prototype.$Notice = _notice2.default;
  88985. Vue.prototype.$Spin = _spin2.default;
  88986. };
  88987. if (typeof window !== 'undefined' && window.Vue) {
  88988. install(window.Vue);
  88989. }
  88990. var API = (0, _extends3.default)({
  88991. version: '4.7.0',
  88992. locale: _index2.default.use,
  88993. i18n: _index2.default.i18n,
  88994. install: install,
  88995. Circle: _circle2.default,
  88996. Switch: _switch2.default
  88997. }, components);
  88998. API.lang = function (code) {
  88999. (0, _newArrowCheck3.default)(undefined, undefined);
  89000. var langObject = window['iview/locale'].default;
  89001. if (code === langObject.i.locale) _index2.default.use(langObject);else console.log('The ' + String(code) + ' language pack is not loaded.');
  89002. }.bind(undefined);
  89003. module.exports.default = module.exports = API;
  89004. /***/ }),
  89005. /* 260 */
  89006. /***/ (function(module, exports, __webpack_require__) {
  89007. __webpack_require__(261);
  89008. module.exports = __webpack_require__(5).Object.keys;
  89009. /***/ }),
  89010. /* 261 */
  89011. /***/ (function(module, exports, __webpack_require__) {
  89012. // 19.1.2.14 Object.keys(O)
  89013. var toObject = __webpack_require__(29);
  89014. var $keys = __webpack_require__(40);
  89015. __webpack_require__(97)('keys', function () {
  89016. return function keys(it) {
  89017. return $keys(toObject(it));
  89018. };
  89019. });
  89020. /***/ }),
  89021. /* 262 */
  89022. /***/ (function(module, exports, __webpack_require__) {
  89023. // false -> Array#indexOf
  89024. // true -> Array#includes
  89025. var toIObject = __webpack_require__(33);
  89026. var toLength = __webpack_require__(52);
  89027. var toAbsoluteIndex = __webpack_require__(263);
  89028. module.exports = function (IS_INCLUDES) {
  89029. return function ($this, el, fromIndex) {
  89030. var O = toIObject($this);
  89031. var length = toLength(O.length);
  89032. var index = toAbsoluteIndex(fromIndex, length);
  89033. var value;
  89034. // Array#includes uses SameValueZero equality algorithm
  89035. // eslint-disable-next-line no-self-compare
  89036. if (IS_INCLUDES && el != el) while (length > index) {
  89037. value = O[index++];
  89038. // eslint-disable-next-line no-self-compare
  89039. if (value != value) return true;
  89040. // Array#indexOf ignores holes, Array#includes - not
  89041. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  89042. if (O[index] === el) return IS_INCLUDES || index || 0;
  89043. } return !IS_INCLUDES && -1;
  89044. };
  89045. };
  89046. /***/ }),
  89047. /* 263 */
  89048. /***/ (function(module, exports, __webpack_require__) {
  89049. var toInteger = __webpack_require__(65);
  89050. var max = Math.max;
  89051. var min = Math.min;
  89052. module.exports = function (index, length) {
  89053. index = toInteger(index);
  89054. return index < 0 ? max(index + length, 0) : min(index, length);
  89055. };
  89056. /***/ }),
  89057. /* 264 */
  89058. /***/ (function(module, exports, __webpack_require__) {
  89059. __webpack_require__(265);
  89060. module.exports = __webpack_require__(5).Object.assign;
  89061. /***/ }),
  89062. /* 265 */
  89063. /***/ (function(module, exports, __webpack_require__) {
  89064. // 19.1.3.1 Object.assign(target, source)
  89065. var $export = __webpack_require__(7);
  89066. $export($export.S + $export.F, 'Object', { assign: __webpack_require__(266) });
  89067. /***/ }),
  89068. /* 266 */
  89069. /***/ (function(module, exports, __webpack_require__) {
  89070. "use strict";
  89071. // 19.1.2.1 Object.assign(target, source, ...)
  89072. var DESCRIPTORS = __webpack_require__(13);
  89073. var getKeys = __webpack_require__(40);
  89074. var gOPS = __webpack_require__(71);
  89075. var pIE = __webpack_require__(54);
  89076. var toObject = __webpack_require__(29);
  89077. var IObject = __webpack_require__(64);
  89078. var $assign = Object.assign;
  89079. // should work with symbols and should have deterministic property order (V8 bug)
  89080. module.exports = !$assign || __webpack_require__(31)(function () {
  89081. var A = {};
  89082. var B = {};
  89083. // eslint-disable-next-line no-undef
  89084. var S = Symbol();
  89085. var K = 'abcdefghijklmnopqrst';
  89086. A[S] = 7;
  89087. K.split('').forEach(function (k) { B[k] = k; });
  89088. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  89089. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  89090. var T = toObject(target);
  89091. var aLen = arguments.length;
  89092. var index = 1;
  89093. var getSymbols = gOPS.f;
  89094. var isEnum = pIE.f;
  89095. while (aLen > index) {
  89096. var S = IObject(arguments[index++]);
  89097. var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
  89098. var length = keys.length;
  89099. var j = 0;
  89100. var key;
  89101. while (length > j) {
  89102. key = keys[j++];
  89103. if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
  89104. }
  89105. } return T;
  89106. } : $assign;
  89107. /***/ }),
  89108. /* 267 */
  89109. /***/ (function(module, exports, __webpack_require__) {
  89110. "use strict";
  89111. Object.defineProperty(exports, "__esModule", {
  89112. value: true
  89113. });
  89114. var _affix = __webpack_require__(268);
  89115. var _affix2 = _interopRequireDefault(_affix);
  89116. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  89117. exports.default = _affix2.default;
  89118. /***/ }),
  89119. /* 268 */
  89120. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  89121. "use strict";
  89122. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  89123. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_affix_vue__ = __webpack_require__(99);
  89124. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_affix_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_affix_vue__);
  89125. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_affix_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_affix_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  89126. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c6e81d2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_affix_vue__ = __webpack_require__(272);
  89127. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c6e81d2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_affix_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c6e81d2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_affix_vue__);
  89128. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  89129. /* script */
  89130. /* template */
  89131. /* template functional */
  89132. var __vue_template_functional__ = false
  89133. /* styles */
  89134. var __vue_styles__ = null
  89135. /* scopeId */
  89136. var __vue_scopeId__ = null
  89137. /* moduleIdentifier (server only) */
  89138. var __vue_module_identifier__ = null
  89139. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  89140. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_affix_vue___default.a,
  89141. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c6e81d2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_affix_vue__["render"],
  89142. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c6e81d2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_affix_vue__["staticRenderFns"],
  89143. __vue_template_functional__,
  89144. __vue_styles__,
  89145. __vue_scopeId__,
  89146. __vue_module_identifier__
  89147. )
  89148. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  89149. /***/ }),
  89150. /* 269 */
  89151. /***/ (function(module, exports, __webpack_require__) {
  89152. module.exports = { "default": __webpack_require__(270), __esModule: true };
  89153. /***/ }),
  89154. /* 270 */
  89155. /***/ (function(module, exports, __webpack_require__) {
  89156. __webpack_require__(271);
  89157. var $Object = __webpack_require__(5).Object;
  89158. module.exports = function defineProperty(it, key, desc) {
  89159. return $Object.defineProperty(it, key, desc);
  89160. };
  89161. /***/ }),
  89162. /* 271 */
  89163. /***/ (function(module, exports, __webpack_require__) {
  89164. var $export = __webpack_require__(7);
  89165. // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
  89166. $export($export.S + $export.F * !__webpack_require__(13), 'Object', { defineProperty: __webpack_require__(14).f });
  89167. /***/ }),
  89168. /* 272 */
  89169. /***/ (function(module, exports, __webpack_require__) {
  89170. "use strict";
  89171. Object.defineProperty(exports, "__esModule", {
  89172. value: true
  89173. });
  89174. var render = function render() {
  89175. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', [_c('div', { ref: "point", class: _vm.classes, style: _vm.styles }, [_vm._t("default")], 2), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.slot, expression: "slot" }], style: _vm.slotStyle })]);
  89176. };
  89177. var staticRenderFns = [];
  89178. exports.render = render;
  89179. exports.staticRenderFns = staticRenderFns;
  89180. /***/ }),
  89181. /* 273 */
  89182. /***/ (function(module, exports, __webpack_require__) {
  89183. "use strict";
  89184. Object.defineProperty(exports, "__esModule", {
  89185. value: true
  89186. });
  89187. var _alert = __webpack_require__(274);
  89188. var _alert2 = _interopRequireDefault(_alert);
  89189. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  89190. exports.default = _alert2.default;
  89191. /***/ }),
  89192. /* 274 */
  89193. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  89194. "use strict";
  89195. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  89196. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alert_vue__ = __webpack_require__(100);
  89197. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alert_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alert_vue__);
  89198. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alert_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alert_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  89199. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_72ea7b7c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_alert_vue__ = __webpack_require__(282);
  89200. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_72ea7b7c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_alert_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_72ea7b7c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_alert_vue__);
  89201. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  89202. /* script */
  89203. /* template */
  89204. /* template functional */
  89205. var __vue_template_functional__ = false
  89206. /* styles */
  89207. var __vue_styles__ = null
  89208. /* scopeId */
  89209. var __vue_scopeId__ = null
  89210. /* moduleIdentifier (server only) */
  89211. var __vue_module_identifier__ = null
  89212. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  89213. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alert_vue___default.a,
  89214. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_72ea7b7c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_alert_vue__["render"],
  89215. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_72ea7b7c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_alert_vue__["staticRenderFns"],
  89216. __vue_template_functional__,
  89217. __vue_styles__,
  89218. __vue_scopeId__,
  89219. __vue_module_identifier__
  89220. )
  89221. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  89222. /***/ }),
  89223. /* 275 */
  89224. /***/ (function(module, exports, __webpack_require__) {
  89225. "use strict";
  89226. Object.defineProperty(exports, "__esModule", {
  89227. value: true
  89228. });
  89229. var render = function render() {
  89230. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('i', { class: _vm.classes, style: _vm.styles, on: { "click": _vm.handleClick } });
  89231. };
  89232. var staticRenderFns = [];
  89233. exports.render = render;
  89234. exports.staticRenderFns = staticRenderFns;
  89235. /***/ }),
  89236. /* 276 */
  89237. /***/ (function(module, exports, __webpack_require__) {
  89238. __webpack_require__(46);
  89239. __webpack_require__(35);
  89240. module.exports = __webpack_require__(281);
  89241. /***/ }),
  89242. /* 277 */
  89243. /***/ (function(module, exports, __webpack_require__) {
  89244. "use strict";
  89245. var addToUnscopables = __webpack_require__(278);
  89246. var step = __webpack_require__(102);
  89247. var Iterators = __webpack_require__(34);
  89248. var toIObject = __webpack_require__(33);
  89249. // 22.1.3.4 Array.prototype.entries()
  89250. // 22.1.3.13 Array.prototype.keys()
  89251. // 22.1.3.29 Array.prototype.values()
  89252. // 22.1.3.30 Array.prototype[@@iterator]()
  89253. module.exports = __webpack_require__(72)(Array, 'Array', function (iterated, kind) {
  89254. this._t = toIObject(iterated); // target
  89255. this._i = 0; // next index
  89256. this._k = kind; // kind
  89257. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  89258. }, function () {
  89259. var O = this._t;
  89260. var kind = this._k;
  89261. var index = this._i++;
  89262. if (!O || index >= O.length) {
  89263. this._t = undefined;
  89264. return step(1);
  89265. }
  89266. if (kind == 'keys') return step(0, index);
  89267. if (kind == 'values') return step(0, O[index]);
  89268. return step(0, [index, O[index]]);
  89269. }, 'values');
  89270. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  89271. Iterators.Arguments = Iterators.Array;
  89272. addToUnscopables('keys');
  89273. addToUnscopables('values');
  89274. addToUnscopables('entries');
  89275. /***/ }),
  89276. /* 278 */
  89277. /***/ (function(module, exports) {
  89278. module.exports = function () { /* empty */ };
  89279. /***/ }),
  89280. /* 279 */
  89281. /***/ (function(module, exports, __webpack_require__) {
  89282. "use strict";
  89283. var create = __webpack_require__(55);
  89284. var descriptor = __webpack_require__(44);
  89285. var setToStringTag = __webpack_require__(47);
  89286. var IteratorPrototype = {};
  89287. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  89288. __webpack_require__(25)(IteratorPrototype, __webpack_require__(10)('iterator'), function () { return this; });
  89289. module.exports = function (Constructor, NAME, next) {
  89290. Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  89291. setToStringTag(Constructor, NAME + ' Iterator');
  89292. };
  89293. /***/ }),
  89294. /* 280 */
  89295. /***/ (function(module, exports, __webpack_require__) {
  89296. var toInteger = __webpack_require__(65);
  89297. var defined = __webpack_require__(63);
  89298. // true -> String#at
  89299. // false -> String#codePointAt
  89300. module.exports = function (TO_STRING) {
  89301. return function (that, pos) {
  89302. var s = String(defined(that));
  89303. var i = toInteger(pos);
  89304. var l = s.length;
  89305. var a, b;
  89306. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  89307. a = s.charCodeAt(i);
  89308. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
  89309. ? TO_STRING ? s.charAt(i) : a
  89310. : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  89311. };
  89312. };
  89313. /***/ }),
  89314. /* 281 */
  89315. /***/ (function(module, exports, __webpack_require__) {
  89316. var anObject = __webpack_require__(22);
  89317. var get = __webpack_require__(73);
  89318. module.exports = __webpack_require__(5).getIterator = function (it) {
  89319. var iterFn = get(it);
  89320. if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
  89321. return anObject(iterFn.call(it));
  89322. };
  89323. /***/ }),
  89324. /* 282 */
  89325. /***/ (function(module, exports, __webpack_require__) {
  89326. "use strict";
  89327. Object.defineProperty(exports, "__esModule", {
  89328. value: true
  89329. });
  89330. var render = function render() {
  89331. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('transition', { attrs: { "name": _vm.fade ? 'fade' : '' } }, [!_vm.closed ? _c('div', { class: _vm.wrapClasses }, [_vm.showIcon ? _c('span', { class: _vm.iconClasses }, [_vm._t("icon", [_c('Icon', { attrs: { "type": _vm.iconType } })])], 2) : _vm._e(), _vm._v(" "), _c('span', { class: _vm.messageClasses }, [_vm._t("default")], 2), _vm._v(" "), _c('span', { class: _vm.descClasses }, [_vm._t("desc")], 2), _vm._v(" "), _vm.closable ? _c('a', { class: _vm.closeClasses, on: { "click": _vm.close } }, [_vm._t("close", [_c('Icon', { attrs: { "type": "ios-close" } })])], 2) : _vm._e()]) : _vm._e()]);
  89332. };
  89333. var staticRenderFns = [];
  89334. exports.render = render;
  89335. exports.staticRenderFns = staticRenderFns;
  89336. /***/ }),
  89337. /* 283 */
  89338. /***/ (function(module, exports, __webpack_require__) {
  89339. "use strict";
  89340. Object.defineProperty(exports, "__esModule", {
  89341. value: true
  89342. });
  89343. var _anchor = __webpack_require__(284);
  89344. var _anchor2 = _interopRequireDefault(_anchor);
  89345. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  89346. exports.default = _anchor2.default;
  89347. /***/ }),
  89348. /* 284 */
  89349. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  89350. "use strict";
  89351. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  89352. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_vue__ = __webpack_require__(107);
  89353. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_vue__);
  89354. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  89355. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_13a5a54e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_anchor_vue__ = __webpack_require__(285);
  89356. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_13a5a54e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_anchor_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_13a5a54e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_anchor_vue__);
  89357. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  89358. /* script */
  89359. /* template */
  89360. /* template functional */
  89361. var __vue_template_functional__ = false
  89362. /* styles */
  89363. var __vue_styles__ = null
  89364. /* scopeId */
  89365. var __vue_scopeId__ = null
  89366. /* moduleIdentifier (server only) */
  89367. var __vue_module_identifier__ = null
  89368. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  89369. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_vue___default.a,
  89370. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_13a5a54e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_anchor_vue__["render"],
  89371. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_13a5a54e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_anchor_vue__["staticRenderFns"],
  89372. __vue_template_functional__,
  89373. __vue_styles__,
  89374. __vue_scopeId__,
  89375. __vue_module_identifier__
  89376. )
  89377. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  89378. /***/ }),
  89379. /* 285 */
  89380. /***/ (function(module, exports, __webpack_require__) {
  89381. "use strict";
  89382. Object.defineProperty(exports, "__esModule", {
  89383. value: true
  89384. });
  89385. var render = function render() {
  89386. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c(_vm.wrapperComponent, { tag: "component", attrs: { "offset-top": _vm.offsetTop, "offset-bottom": _vm.offsetBottom }, on: { "on-change": _vm.handleAffixStateChange } }, [_c('div', { class: _vm.prefix + "-wrapper", style: _vm.wrapperStyle }, [_c('div', { class: "" + _vm.prefix }, [_c('div', { class: _vm.prefix + "-ink" }, [_c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.showInk, expression: "showInk" }], class: _vm.prefix + "-ink-ball", style: { top: _vm.inkTop + "px" } })]), _vm._v(" "), _vm._t("default")], 2)])]);
  89387. };
  89388. var staticRenderFns = [];
  89389. exports.render = render;
  89390. exports.staticRenderFns = staticRenderFns;
  89391. /***/ }),
  89392. /* 286 */
  89393. /***/ (function(module, exports, __webpack_require__) {
  89394. "use strict";
  89395. Object.defineProperty(exports, "__esModule", {
  89396. value: true
  89397. });
  89398. var _anchorLink = __webpack_require__(287);
  89399. var _anchorLink2 = _interopRequireDefault(_anchorLink);
  89400. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  89401. exports.default = _anchorLink2.default;
  89402. /***/ }),
  89403. /* 287 */
  89404. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  89405. "use strict";
  89406. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  89407. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_link_vue__ = __webpack_require__(108);
  89408. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_link_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_link_vue__);
  89409. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_link_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_link_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  89410. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_14eb8c86_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_anchor_link_vue__ = __webpack_require__(288);
  89411. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_14eb8c86_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_anchor_link_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_14eb8c86_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_anchor_link_vue__);
  89412. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  89413. /* script */
  89414. /* template */
  89415. /* template functional */
  89416. var __vue_template_functional__ = false
  89417. /* styles */
  89418. var __vue_styles__ = null
  89419. /* scopeId */
  89420. var __vue_scopeId__ = null
  89421. /* moduleIdentifier (server only) */
  89422. var __vue_module_identifier__ = null
  89423. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  89424. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_anchor_link_vue___default.a,
  89425. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_14eb8c86_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_anchor_link_vue__["render"],
  89426. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_14eb8c86_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_anchor_link_vue__["staticRenderFns"],
  89427. __vue_template_functional__,
  89428. __vue_styles__,
  89429. __vue_scopeId__,
  89430. __vue_module_identifier__
  89431. )
  89432. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  89433. /***/ }),
  89434. /* 288 */
  89435. /***/ (function(module, exports, __webpack_require__) {
  89436. "use strict";
  89437. Object.defineProperty(exports, "__esModule", {
  89438. value: true
  89439. });
  89440. var render = function render() {
  89441. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.anchorLinkClasses }, [_c('a', { class: _vm.linkTitleClasses, attrs: { "href": _vm.href, "data-scroll-offset": _vm.scrollOffset, "data-href": _vm.href, "title": _vm.title }, on: { "click": function click($event) {
  89442. $event.preventDefault();return _vm.goAnchor($event);
  89443. } } }, [_vm._v(_vm._s(_vm.title))]), _vm._v(" "), _vm._t("default")], 2);
  89444. };
  89445. var staticRenderFns = [];
  89446. exports.render = render;
  89447. exports.staticRenderFns = staticRenderFns;
  89448. /***/ }),
  89449. /* 289 */
  89450. /***/ (function(module, exports, __webpack_require__) {
  89451. "use strict";
  89452. Object.defineProperty(exports, "__esModule", {
  89453. value: true
  89454. });
  89455. var _autoComplete = __webpack_require__(290);
  89456. var _autoComplete2 = _interopRequireDefault(_autoComplete);
  89457. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  89458. exports.default = _autoComplete2.default;
  89459. /***/ }),
  89460. /* 290 */
  89461. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  89462. "use strict";
  89463. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  89464. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_auto_complete_vue__ = __webpack_require__(109);
  89465. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_auto_complete_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_auto_complete_vue__);
  89466. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_auto_complete_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_auto_complete_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  89467. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_88c5f044_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_auto_complete_vue__ = __webpack_require__(340);
  89468. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_88c5f044_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_auto_complete_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_88c5f044_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_auto_complete_vue__);
  89469. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  89470. /* script */
  89471. /* template */
  89472. /* template functional */
  89473. var __vue_template_functional__ = false
  89474. /* styles */
  89475. var __vue_styles__ = null
  89476. /* scopeId */
  89477. var __vue_scopeId__ = null
  89478. /* moduleIdentifier (server only) */
  89479. var __vue_module_identifier__ = null
  89480. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  89481. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_auto_complete_vue___default.a,
  89482. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_88c5f044_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_auto_complete_vue__["render"],
  89483. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_88c5f044_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_auto_complete_vue__["staticRenderFns"],
  89484. __vue_template_functional__,
  89485. __vue_styles__,
  89486. __vue_scopeId__,
  89487. __vue_module_identifier__
  89488. )
  89489. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  89490. /***/ }),
  89491. /* 291 */
  89492. /***/ (function(module, exports, __webpack_require__) {
  89493. module.exports = { "default": __webpack_require__(292), __esModule: true };
  89494. /***/ }),
  89495. /* 292 */
  89496. /***/ (function(module, exports, __webpack_require__) {
  89497. __webpack_require__(46);
  89498. __webpack_require__(35);
  89499. module.exports = __webpack_require__(293);
  89500. /***/ }),
  89501. /* 293 */
  89502. /***/ (function(module, exports, __webpack_require__) {
  89503. var classof = __webpack_require__(56);
  89504. var ITERATOR = __webpack_require__(10)('iterator');
  89505. var Iterators = __webpack_require__(34);
  89506. module.exports = __webpack_require__(5).isIterable = function (it) {
  89507. var O = Object(it);
  89508. return O[ITERATOR] !== undefined
  89509. || '@@iterator' in O
  89510. // eslint-disable-next-line no-prototype-builtins
  89511. || Iterators.hasOwnProperty(classof(O));
  89512. };
  89513. /***/ }),
  89514. /* 294 */
  89515. /***/ (function(module, exports, __webpack_require__) {
  89516. __webpack_require__(295);
  89517. module.exports = __webpack_require__(5).Number.isFinite;
  89518. /***/ }),
  89519. /* 295 */
  89520. /***/ (function(module, exports, __webpack_require__) {
  89521. // 20.1.2.2 Number.isFinite(number)
  89522. var $export = __webpack_require__(7);
  89523. var _isFinite = __webpack_require__(9).isFinite;
  89524. $export($export.S, 'Number', {
  89525. isFinite: function isFinite(it) {
  89526. return typeof it == 'number' && _isFinite(it);
  89527. }
  89528. });
  89529. /***/ }),
  89530. /* 296 */
  89531. /***/ (function(module, exports, __webpack_require__) {
  89532. var core = __webpack_require__(5);
  89533. var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });
  89534. module.exports = function stringify(it) { // eslint-disable-line no-unused-vars
  89535. return $JSON.stringify.apply($JSON, arguments);
  89536. };
  89537. /***/ }),
  89538. /* 297 */
  89539. /***/ (function(module, exports, __webpack_require__) {
  89540. __webpack_require__(35);
  89541. __webpack_require__(298);
  89542. module.exports = __webpack_require__(5).Array.from;
  89543. /***/ }),
  89544. /* 298 */
  89545. /***/ (function(module, exports, __webpack_require__) {
  89546. "use strict";
  89547. var ctx = __webpack_require__(24);
  89548. var $export = __webpack_require__(7);
  89549. var toObject = __webpack_require__(29);
  89550. var call = __webpack_require__(112);
  89551. var isArrayIter = __webpack_require__(113);
  89552. var toLength = __webpack_require__(52);
  89553. var createProperty = __webpack_require__(299);
  89554. var getIterFn = __webpack_require__(73);
  89555. $export($export.S + $export.F * !__webpack_require__(114)(function (iter) { Array.from(iter); }), 'Array', {
  89556. // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  89557. from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  89558. var O = toObject(arrayLike);
  89559. var C = typeof this == 'function' ? this : Array;
  89560. var aLen = arguments.length;
  89561. var mapfn = aLen > 1 ? arguments[1] : undefined;
  89562. var mapping = mapfn !== undefined;
  89563. var index = 0;
  89564. var iterFn = getIterFn(O);
  89565. var length, result, step, iterator;
  89566. if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
  89567. // if object isn't iterable or it's array with default iterator - use simple case
  89568. if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
  89569. for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
  89570. createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
  89571. }
  89572. } else {
  89573. length = toLength(O.length);
  89574. for (result = new C(length); length > index; index++) {
  89575. createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
  89576. }
  89577. }
  89578. result.length = index;
  89579. return result;
  89580. }
  89581. });
  89582. /***/ }),
  89583. /* 299 */
  89584. /***/ (function(module, exports, __webpack_require__) {
  89585. "use strict";
  89586. var $defineProperty = __webpack_require__(14);
  89587. var createDesc = __webpack_require__(44);
  89588. module.exports = function (object, index, value) {
  89589. if (index in object) $defineProperty.f(object, index, createDesc(0, value));
  89590. else object[index] = value;
  89591. };
  89592. /***/ }),
  89593. /* 300 */
  89594. /***/ (function(module, exports, __webpack_require__) {
  89595. "use strict";
  89596. Object.defineProperty(exports, "__esModule", {
  89597. value: true
  89598. });
  89599. var render = function render() {
  89600. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: "ivu-select-dropdown", class: _vm.className, style: _vm.styles }, [_vm._t("default")], 2);
  89601. };
  89602. var staticRenderFns = [];
  89603. exports.render = render;
  89604. exports.staticRenderFns = staticRenderFns;
  89605. /***/ }),
  89606. /* 301 */
  89607. /***/ (function(module, exports, __webpack_require__) {
  89608. module.exports = { "default": __webpack_require__(302), __esModule: true };
  89609. /***/ }),
  89610. /* 302 */
  89611. /***/ (function(module, exports, __webpack_require__) {
  89612. __webpack_require__(35);
  89613. __webpack_require__(46);
  89614. module.exports = __webpack_require__(77).f('iterator');
  89615. /***/ }),
  89616. /* 303 */
  89617. /***/ (function(module, exports, __webpack_require__) {
  89618. module.exports = { "default": __webpack_require__(304), __esModule: true };
  89619. /***/ }),
  89620. /* 304 */
  89621. /***/ (function(module, exports, __webpack_require__) {
  89622. __webpack_require__(305);
  89623. __webpack_require__(80);
  89624. __webpack_require__(309);
  89625. __webpack_require__(310);
  89626. module.exports = __webpack_require__(5).Symbol;
  89627. /***/ }),
  89628. /* 305 */
  89629. /***/ (function(module, exports, __webpack_require__) {
  89630. "use strict";
  89631. // ECMAScript 6 symbols shim
  89632. var global = __webpack_require__(9);
  89633. var has = __webpack_require__(30);
  89634. var DESCRIPTORS = __webpack_require__(13);
  89635. var $export = __webpack_require__(7);
  89636. var redefine = __webpack_require__(103);
  89637. var META = __webpack_require__(78).KEY;
  89638. var $fails = __webpack_require__(31);
  89639. var shared = __webpack_require__(67);
  89640. var setToStringTag = __webpack_require__(47);
  89641. var uid = __webpack_require__(53);
  89642. var wks = __webpack_require__(10);
  89643. var wksExt = __webpack_require__(77);
  89644. var wksDefine = __webpack_require__(79);
  89645. var enumKeys = __webpack_require__(306);
  89646. var isArray = __webpack_require__(118);
  89647. var anObject = __webpack_require__(22);
  89648. var isObject = __webpack_require__(18);
  89649. var toObject = __webpack_require__(29);
  89650. var toIObject = __webpack_require__(33);
  89651. var toPrimitive = __webpack_require__(70);
  89652. var createDesc = __webpack_require__(44);
  89653. var _create = __webpack_require__(55);
  89654. var gOPNExt = __webpack_require__(307);
  89655. var $GOPD = __webpack_require__(308);
  89656. var $GOPS = __webpack_require__(71);
  89657. var $DP = __webpack_require__(14);
  89658. var $keys = __webpack_require__(40);
  89659. var gOPD = $GOPD.f;
  89660. var dP = $DP.f;
  89661. var gOPN = gOPNExt.f;
  89662. var $Symbol = global.Symbol;
  89663. var $JSON = global.JSON;
  89664. var _stringify = $JSON && $JSON.stringify;
  89665. var PROTOTYPE = 'prototype';
  89666. var HIDDEN = wks('_hidden');
  89667. var TO_PRIMITIVE = wks('toPrimitive');
  89668. var isEnum = {}.propertyIsEnumerable;
  89669. var SymbolRegistry = shared('symbol-registry');
  89670. var AllSymbols = shared('symbols');
  89671. var OPSymbols = shared('op-symbols');
  89672. var ObjectProto = Object[PROTOTYPE];
  89673. var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
  89674. var QObject = global.QObject;
  89675. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  89676. var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  89677. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  89678. var setSymbolDesc = DESCRIPTORS && $fails(function () {
  89679. return _create(dP({}, 'a', {
  89680. get: function () { return dP(this, 'a', { value: 7 }).a; }
  89681. })).a != 7;
  89682. }) ? function (it, key, D) {
  89683. var protoDesc = gOPD(ObjectProto, key);
  89684. if (protoDesc) delete ObjectProto[key];
  89685. dP(it, key, D);
  89686. if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
  89687. } : dP;
  89688. var wrap = function (tag) {
  89689. var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  89690. sym._k = tag;
  89691. return sym;
  89692. };
  89693. var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  89694. return typeof it == 'symbol';
  89695. } : function (it) {
  89696. return it instanceof $Symbol;
  89697. };
  89698. var $defineProperty = function defineProperty(it, key, D) {
  89699. if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  89700. anObject(it);
  89701. key = toPrimitive(key, true);
  89702. anObject(D);
  89703. if (has(AllSymbols, key)) {
  89704. if (!D.enumerable) {
  89705. if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
  89706. it[HIDDEN][key] = true;
  89707. } else {
  89708. if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
  89709. D = _create(D, { enumerable: createDesc(0, false) });
  89710. } return setSymbolDesc(it, key, D);
  89711. } return dP(it, key, D);
  89712. };
  89713. var $defineProperties = function defineProperties(it, P) {
  89714. anObject(it);
  89715. var keys = enumKeys(P = toIObject(P));
  89716. var i = 0;
  89717. var l = keys.length;
  89718. var key;
  89719. while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  89720. return it;
  89721. };
  89722. var $create = function create(it, P) {
  89723. return P === undefined ? _create(it) : $defineProperties(_create(it), P);
  89724. };
  89725. var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  89726. var E = isEnum.call(this, key = toPrimitive(key, true));
  89727. if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  89728. return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
  89729. };
  89730. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  89731. it = toIObject(it);
  89732. key = toPrimitive(key, true);
  89733. if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  89734. var D = gOPD(it, key);
  89735. if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  89736. return D;
  89737. };
  89738. var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  89739. var names = gOPN(toIObject(it));
  89740. var result = [];
  89741. var i = 0;
  89742. var key;
  89743. while (names.length > i) {
  89744. if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  89745. } return result;
  89746. };
  89747. var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  89748. var IS_OP = it === ObjectProto;
  89749. var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
  89750. var result = [];
  89751. var i = 0;
  89752. var key;
  89753. while (names.length > i) {
  89754. if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  89755. } return result;
  89756. };
  89757. // 19.4.1.1 Symbol([description])
  89758. if (!USE_NATIVE) {
  89759. $Symbol = function Symbol() {
  89760. if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
  89761. var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
  89762. var $set = function (value) {
  89763. if (this === ObjectProto) $set.call(OPSymbols, value);
  89764. if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  89765. setSymbolDesc(this, tag, createDesc(1, value));
  89766. };
  89767. if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
  89768. return wrap(tag);
  89769. };
  89770. redefine($Symbol[PROTOTYPE], 'toString', function toString() {
  89771. return this._k;
  89772. });
  89773. $GOPD.f = $getOwnPropertyDescriptor;
  89774. $DP.f = $defineProperty;
  89775. __webpack_require__(119).f = gOPNExt.f = $getOwnPropertyNames;
  89776. __webpack_require__(54).f = $propertyIsEnumerable;
  89777. $GOPS.f = $getOwnPropertySymbols;
  89778. if (DESCRIPTORS && !__webpack_require__(42)) {
  89779. redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  89780. }
  89781. wksExt.f = function (name) {
  89782. return wrap(wks(name));
  89783. };
  89784. }
  89785. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
  89786. for (var es6Symbols = (
  89787. // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  89788. 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
  89789. ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
  89790. for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
  89791. $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  89792. // 19.4.2.1 Symbol.for(key)
  89793. 'for': function (key) {
  89794. return has(SymbolRegistry, key += '')
  89795. ? SymbolRegistry[key]
  89796. : SymbolRegistry[key] = $Symbol(key);
  89797. },
  89798. // 19.4.2.5 Symbol.keyFor(sym)
  89799. keyFor: function keyFor(sym) {
  89800. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
  89801. for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  89802. },
  89803. useSetter: function () { setter = true; },
  89804. useSimple: function () { setter = false; }
  89805. });
  89806. $export($export.S + $export.F * !USE_NATIVE, 'Object', {
  89807. // 19.1.2.2 Object.create(O [, Properties])
  89808. create: $create,
  89809. // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  89810. defineProperty: $defineProperty,
  89811. // 19.1.2.3 Object.defineProperties(O, Properties)
  89812. defineProperties: $defineProperties,
  89813. // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  89814. getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  89815. // 19.1.2.7 Object.getOwnPropertyNames(O)
  89816. getOwnPropertyNames: $getOwnPropertyNames,
  89817. // 19.1.2.8 Object.getOwnPropertySymbols(O)
  89818. getOwnPropertySymbols: $getOwnPropertySymbols
  89819. });
  89820. // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
  89821. // https://bugs.chromium.org/p/v8/issues/detail?id=3443
  89822. var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
  89823. $export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
  89824. getOwnPropertySymbols: function getOwnPropertySymbols(it) {
  89825. return $GOPS.f(toObject(it));
  89826. }
  89827. });
  89828. // 24.3.2 JSON.stringify(value [, replacer [, space]])
  89829. $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  89830. var S = $Symbol();
  89831. // MS Edge converts symbol values to JSON as {}
  89832. // WebKit converts symbol values to JSON as null
  89833. // V8 throws on boxed symbols
  89834. return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
  89835. })), 'JSON', {
  89836. stringify: function stringify(it) {
  89837. var args = [it];
  89838. var i = 1;
  89839. var replacer, $replacer;
  89840. while (arguments.length > i) args.push(arguments[i++]);
  89841. $replacer = replacer = args[1];
  89842. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  89843. if (!isArray(replacer)) replacer = function (key, value) {
  89844. if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
  89845. if (!isSymbol(value)) return value;
  89846. };
  89847. args[1] = replacer;
  89848. return _stringify.apply($JSON, args);
  89849. }
  89850. });
  89851. // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
  89852. $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(25)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
  89853. // 19.4.3.5 Symbol.prototype[@@toStringTag]
  89854. setToStringTag($Symbol, 'Symbol');
  89855. // 20.2.1.9 Math[@@toStringTag]
  89856. setToStringTag(Math, 'Math', true);
  89857. // 24.3.3 JSON[@@toStringTag]
  89858. setToStringTag(global.JSON, 'JSON', true);
  89859. /***/ }),
  89860. /* 306 */
  89861. /***/ (function(module, exports, __webpack_require__) {
  89862. // all enumerable object keys, includes symbols
  89863. var getKeys = __webpack_require__(40);
  89864. var gOPS = __webpack_require__(71);
  89865. var pIE = __webpack_require__(54);
  89866. module.exports = function (it) {
  89867. var result = getKeys(it);
  89868. var getSymbols = gOPS.f;
  89869. if (getSymbols) {
  89870. var symbols = getSymbols(it);
  89871. var isEnum = pIE.f;
  89872. var i = 0;
  89873. var key;
  89874. while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  89875. } return result;
  89876. };
  89877. /***/ }),
  89878. /* 307 */
  89879. /***/ (function(module, exports, __webpack_require__) {
  89880. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  89881. var toIObject = __webpack_require__(33);
  89882. var gOPN = __webpack_require__(119).f;
  89883. var toString = {}.toString;
  89884. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  89885. ? Object.getOwnPropertyNames(window) : [];
  89886. var getWindowNames = function (it) {
  89887. try {
  89888. return gOPN(it);
  89889. } catch (e) {
  89890. return windowNames.slice();
  89891. }
  89892. };
  89893. module.exports.f = function getOwnPropertyNames(it) {
  89894. return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
  89895. };
  89896. /***/ }),
  89897. /* 308 */
  89898. /***/ (function(module, exports, __webpack_require__) {
  89899. var pIE = __webpack_require__(54);
  89900. var createDesc = __webpack_require__(44);
  89901. var toIObject = __webpack_require__(33);
  89902. var toPrimitive = __webpack_require__(70);
  89903. var has = __webpack_require__(30);
  89904. var IE8_DOM_DEFINE = __webpack_require__(98);
  89905. var gOPD = Object.getOwnPropertyDescriptor;
  89906. exports.f = __webpack_require__(13) ? gOPD : function getOwnPropertyDescriptor(O, P) {
  89907. O = toIObject(O);
  89908. P = toPrimitive(P, true);
  89909. if (IE8_DOM_DEFINE) try {
  89910. return gOPD(O, P);
  89911. } catch (e) { /* empty */ }
  89912. if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
  89913. };
  89914. /***/ }),
  89915. /* 309 */
  89916. /***/ (function(module, exports, __webpack_require__) {
  89917. __webpack_require__(79)('asyncIterator');
  89918. /***/ }),
  89919. /* 310 */
  89920. /***/ (function(module, exports, __webpack_require__) {
  89921. __webpack_require__(79)('observable');
  89922. /***/ }),
  89923. /* 311 */
  89924. /***/ (function(module, exports, __webpack_require__) {
  89925. module.exports = { "default": __webpack_require__(312), __esModule: true };
  89926. /***/ }),
  89927. /* 312 */
  89928. /***/ (function(module, exports, __webpack_require__) {
  89929. __webpack_require__(313);
  89930. var $Object = __webpack_require__(5).Object;
  89931. module.exports = function defineProperties(T, D) {
  89932. return $Object.defineProperties(T, D);
  89933. };
  89934. /***/ }),
  89935. /* 313 */
  89936. /***/ (function(module, exports, __webpack_require__) {
  89937. var $export = __webpack_require__(7);
  89938. // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
  89939. $export($export.S + $export.F * !__webpack_require__(13), 'Object', { defineProperties: __webpack_require__(104) });
  89940. /***/ }),
  89941. /* 314 */
  89942. /***/ (function(module, exports, __webpack_require__) {
  89943. module.exports = { "default": __webpack_require__(315), __esModule: true };
  89944. /***/ }),
  89945. /* 315 */
  89946. /***/ (function(module, exports, __webpack_require__) {
  89947. __webpack_require__(316);
  89948. var $Object = __webpack_require__(5).Object;
  89949. module.exports = function create(P, D) {
  89950. return $Object.create(P, D);
  89951. };
  89952. /***/ }),
  89953. /* 316 */
  89954. /***/ (function(module, exports, __webpack_require__) {
  89955. var $export = __webpack_require__(7);
  89956. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  89957. $export($export.S, 'Object', { create: __webpack_require__(55) });
  89958. /***/ }),
  89959. /* 317 */
  89960. /***/ (function(module, exports, __webpack_require__) {
  89961. module.exports = { "default": __webpack_require__(318), __esModule: true };
  89962. /***/ }),
  89963. /* 318 */
  89964. /***/ (function(module, exports, __webpack_require__) {
  89965. __webpack_require__(319);
  89966. module.exports = __webpack_require__(5).Object.getPrototypeOf;
  89967. /***/ }),
  89968. /* 319 */
  89969. /***/ (function(module, exports, __webpack_require__) {
  89970. // 19.1.2.9 Object.getPrototypeOf(O)
  89971. var toObject = __webpack_require__(29);
  89972. var $getPrototypeOf = __webpack_require__(106);
  89973. __webpack_require__(97)('getPrototypeOf', function () {
  89974. return function getPrototypeOf(it) {
  89975. return $getPrototypeOf(toObject(it));
  89976. };
  89977. });
  89978. /***/ }),
  89979. /* 320 */
  89980. /***/ (function(module, exports, __webpack_require__) {
  89981. "use strict";
  89982. Object.defineProperty(exports, "__esModule", {
  89983. value: true
  89984. });
  89985. var _lang = __webpack_require__(321);
  89986. var _lang2 = _interopRequireDefault(_lang);
  89987. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  89988. var lang = {
  89989. i: {
  89990. locale: 'zh-CN',
  89991. select: {
  89992. placeholder: '请选择',
  89993. noMatch: '无匹配数据',
  89994. loading: '加载中'
  89995. },
  89996. table: {
  89997. noDataText: '暂无数据',
  89998. noFilteredDataText: '暂无筛选结果',
  89999. confirmFilter: '筛选',
  90000. resetFilter: '重置',
  90001. clearFilter: '全部',
  90002. sumText: '合计'
  90003. },
  90004. datepicker: {
  90005. selectDate: '选择日期',
  90006. selectTime: '选择时间',
  90007. startTime: '开始时间',
  90008. endTime: '结束时间',
  90009. clear: '清空',
  90010. ok: '确定',
  90011. datePanelLabel: '[yyyy年] [m月]',
  90012. month: '月',
  90013. month1: '1 月',
  90014. month2: '2 月',
  90015. month3: '3 月',
  90016. month4: '4 月',
  90017. month5: '5 月',
  90018. month6: '6 月',
  90019. month7: '7 月',
  90020. month8: '8 月',
  90021. month9: '9 月',
  90022. month10: '10 月',
  90023. month11: '11 月',
  90024. month12: '12 月',
  90025. year: '年',
  90026. weekStartDay: '0',
  90027. weeks: {
  90028. sun: '日',
  90029. mon: '一',
  90030. tue: '二',
  90031. wed: '三',
  90032. thu: '四',
  90033. fri: '五',
  90034. sat: '六'
  90035. },
  90036. months: {
  90037. m1: '1月',
  90038. m2: '2月',
  90039. m3: '3月',
  90040. m4: '4月',
  90041. m5: '5月',
  90042. m6: '6月',
  90043. m7: '7月',
  90044. m8: '8月',
  90045. m9: '9月',
  90046. m10: '10月',
  90047. m11: '11月',
  90048. m12: '12月'
  90049. }
  90050. },
  90051. transfer: {
  90052. titles: {
  90053. source: '源列表',
  90054. target: '目的列表'
  90055. },
  90056. filterPlaceholder: '请输入搜索内容',
  90057. notFoundText: '列表为空'
  90058. },
  90059. modal: {
  90060. okText: '确定',
  90061. cancelText: '取消'
  90062. },
  90063. poptip: {
  90064. okText: '确定',
  90065. cancelText: '取消'
  90066. },
  90067. page: {
  90068. prev: '上一页',
  90069. next: '下一页',
  90070. total: '共',
  90071. item: '条',
  90072. items: '条',
  90073. prev5: '向前 5 页',
  90074. next5: '向后 5 页',
  90075. page: '条/页',
  90076. goto: '跳至',
  90077. p: '页'
  90078. },
  90079. rate: {
  90080. star: '星',
  90081. stars: '星'
  90082. },
  90083. time: {
  90084. before: '前',
  90085. after: '后',
  90086. just: '刚刚',
  90087. seconds: '秒',
  90088. minutes: '分钟',
  90089. hours: '小时',
  90090. days: '天'
  90091. },
  90092. tree: {
  90093. emptyText: '暂无数据'
  90094. }
  90095. }
  90096. };
  90097. (0, _lang2.default)(lang);
  90098. exports.default = lang;
  90099. /***/ }),
  90100. /* 321 */
  90101. /***/ (function(module, exports, __webpack_require__) {
  90102. "use strict";
  90103. Object.defineProperty(exports, "__esModule", {
  90104. value: true
  90105. });
  90106. exports.default = function (lang) {
  90107. if (!isServer) {
  90108. if (typeof window.iview !== 'undefined') {
  90109. if (!('langs' in iview)) {
  90110. iview.langs = {};
  90111. }
  90112. iview.langs[lang.i.locale] = lang;
  90113. }
  90114. }
  90115. };
  90116. var _vue = __webpack_require__(16);
  90117. var _vue2 = _interopRequireDefault(_vue);
  90118. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  90119. var isServer = _vue2.default.prototype.$isServer;
  90120. ;
  90121. /***/ }),
  90122. /* 322 */
  90123. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  90124. "use strict";
  90125. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  90126. var isMergeableObject = function isMergeableObject(value) {
  90127. return isNonNullObject(value)
  90128. && !isSpecial(value)
  90129. };
  90130. function isNonNullObject(value) {
  90131. return !!value && typeof value === 'object'
  90132. }
  90133. function isSpecial(value) {
  90134. var stringValue = Object.prototype.toString.call(value);
  90135. return stringValue === '[object RegExp]'
  90136. || stringValue === '[object Date]'
  90137. || isReactElement(value)
  90138. }
  90139. // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
  90140. var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
  90141. var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
  90142. function isReactElement(value) {
  90143. return value.$$typeof === REACT_ELEMENT_TYPE
  90144. }
  90145. function emptyTarget(val) {
  90146. return Array.isArray(val) ? [] : {}
  90147. }
  90148. function cloneUnlessOtherwiseSpecified(value, options) {
  90149. return (options.clone !== false && options.isMergeableObject(value))
  90150. ? deepmerge(emptyTarget(value), value, options)
  90151. : value
  90152. }
  90153. function defaultArrayMerge(target, source, options) {
  90154. return target.concat(source).map(function(element) {
  90155. return cloneUnlessOtherwiseSpecified(element, options)
  90156. })
  90157. }
  90158. function mergeObject(target, source, options) {
  90159. var destination = {};
  90160. if (options.isMergeableObject(target)) {
  90161. Object.keys(target).forEach(function(key) {
  90162. destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
  90163. });
  90164. }
  90165. Object.keys(source).forEach(function(key) {
  90166. if (!options.isMergeableObject(source[key]) || !target[key]) {
  90167. destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
  90168. } else {
  90169. destination[key] = deepmerge(target[key], source[key], options);
  90170. }
  90171. });
  90172. return destination
  90173. }
  90174. function deepmerge(target, source, options) {
  90175. options = options || {};
  90176. options.arrayMerge = options.arrayMerge || defaultArrayMerge;
  90177. options.isMergeableObject = options.isMergeableObject || isMergeableObject;
  90178. var sourceIsArray = Array.isArray(source);
  90179. var targetIsArray = Array.isArray(target);
  90180. var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
  90181. if (!sourceAndTargetTypesMatch) {
  90182. return cloneUnlessOtherwiseSpecified(source, options)
  90183. } else if (sourceIsArray) {
  90184. return options.arrayMerge(target, source, options)
  90185. } else {
  90186. return mergeObject(target, source, options)
  90187. }
  90188. }
  90189. deepmerge.all = function deepmergeAll(array, options) {
  90190. if (!Array.isArray(array)) {
  90191. throw new Error('first argument should be an array')
  90192. }
  90193. return array.reduce(function(prev, next) {
  90194. return deepmerge(prev, next, options)
  90195. }, {})
  90196. };
  90197. var deepmerge_1 = deepmerge;
  90198. /* harmony default export */ __webpack_exports__["default"] = (deepmerge_1);
  90199. /***/ }),
  90200. /* 323 */
  90201. /***/ (function(module, exports, __webpack_require__) {
  90202. "use strict";
  90203. Object.defineProperty(exports, "__esModule", {
  90204. value: true
  90205. });
  90206. var _newArrowCheck2 = __webpack_require__(1);
  90207. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  90208. var _typeof2 = __webpack_require__(27);
  90209. var _typeof3 = _interopRequireDefault(_typeof2);
  90210. exports.default = function () {
  90211. function hasOwn(obj, key) {
  90212. return Object.prototype.hasOwnProperty.call(obj, key);
  90213. }
  90214. function template(string) {
  90215. var _this = this;
  90216. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  90217. args[_key - 1] = arguments[_key];
  90218. }
  90219. if (args.length === 1 && (0, _typeof3.default)(args[0]) === 'object') {
  90220. args = args[0];
  90221. }
  90222. if (!args || !args.hasOwnProperty) {
  90223. args = {};
  90224. }
  90225. return string.replace(RE_NARGS, function (match, prefix, i, index) {
  90226. (0, _newArrowCheck3.default)(this, _this);
  90227. var result = void 0;
  90228. if (string[index - 1] === '{' && string[index + match.length] === '}') {
  90229. return i;
  90230. } else {
  90231. result = hasOwn(args, i) ? args[i] : null;
  90232. if (result === null || result === undefined) {
  90233. return '';
  90234. }
  90235. return result;
  90236. }
  90237. }.bind(this));
  90238. }
  90239. return template;
  90240. };
  90241. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  90242. var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
  90243. /***/ }),
  90244. /* 324 */
  90245. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  90246. "use strict";
  90247. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  90248. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_head_vue__ = __webpack_require__(121);
  90249. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_head_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_head_vue__);
  90250. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_head_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_head_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  90251. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_541b737c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_select_head_vue__ = __webpack_require__(325);
  90252. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_541b737c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_select_head_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_541b737c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_select_head_vue__);
  90253. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  90254. /* script */
  90255. /* template */
  90256. /* template functional */
  90257. var __vue_template_functional__ = false
  90258. /* styles */
  90259. var __vue_styles__ = null
  90260. /* scopeId */
  90261. var __vue_scopeId__ = null
  90262. /* moduleIdentifier (server only) */
  90263. var __vue_module_identifier__ = null
  90264. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  90265. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_select_head_vue___default.a,
  90266. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_541b737c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_select_head_vue__["render"],
  90267. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_541b737c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_select_head_vue__["staticRenderFns"],
  90268. __vue_template_functional__,
  90269. __vue_styles__,
  90270. __vue_scopeId__,
  90271. __vue_module_identifier__
  90272. )
  90273. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  90274. /***/ }),
  90275. /* 325 */
  90276. /***/ (function(module, exports, __webpack_require__) {
  90277. "use strict";
  90278. Object.defineProperty(exports, "__esModule", {
  90279. value: true
  90280. });
  90281. var render = function render() {
  90282. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.headCls, on: { "click": _vm.onHeaderClick } }, [_vm.$slots.prefix || _vm.prefix ? _c('span', { class: [_vm.prefixCls + '-prefix'] }, [_vm._t("prefix", [_vm.prefix ? _c('Icon', { attrs: { "type": _vm.prefix } }) : _vm._e()])], 2) : _vm._e(), _vm._v(" "), _vm._l(_vm.selectedMultiple, function (item, index) {
  90283. return _vm.maxTagCount === undefined || index < _vm.maxTagCount ? _c('div', { staticClass: "ivu-tag ivu-tag-checked" }, [_c('span', { staticClass: "ivu-tag-text", class: { 'ivu-select-multiple-tag-hidden': item.disabled } }, [_vm._v(_vm._s(item.tag !== undefined ? item.tag : item.label))]), _vm._v(" "), !item.disabled ? _c('Icon', { attrs: { "type": "ios-close" }, nativeOn: { "click": function click($event) {
  90284. $event.stopPropagation();return _vm.removeTag(item);
  90285. } } }) : _vm._e()], 1) : _vm._e();
  90286. }), _vm.maxTagCount !== undefined && _vm.selectedMultiple.length > _vm.maxTagCount ? _c('div', { staticClass: "ivu-tag ivu-tag-checked" }, [_c('span', { staticClass: "ivu-tag-text ivu-select-max-tag" }, [_vm.maxTagPlaceholder ? [_vm._v(_vm._s(_vm.maxTagPlaceholder(_vm.selectedMultiple.length - _vm.maxTagCount)))] : [_vm._v("+ " + _vm._s(_vm.selectedMultiple.length - _vm.maxTagCount) + "...")]], 2)]) : _vm._e(), _vm._v(" "), _c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.singleDisplayValue, expression: "singleDisplayValue" }], class: _vm.singleDisplayClasses }, [_vm._v(_vm._s(_vm.singleDisplayValue))]), _vm._v(" "), _vm.filterable ? _c('input', { directives: [{ name: "model", rawName: "v-model", value: _vm.query, expression: "query" }], ref: "input", class: [_vm.prefixCls + '-input'], style: _vm.inputStyle, attrs: { "id": _vm.inputElementId, "type": "text", "disabled": _vm.disabled, "placeholder": _vm.showPlaceholder ? _vm.localePlaceholder : '', "autocomplete": "off", "spellcheck": "false" }, domProps: { "value": _vm.query }, on: { "keydown": [_vm.resetInputState, function ($event) {
  90287. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "delete", [8, 46], $event.key, ["Backspace", "Delete", "Del"])) {
  90288. return null;
  90289. }return _vm.handleInputDelete($event);
  90290. }, function ($event) {
  90291. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
  90292. return null;
  90293. }return _vm.handleInputEnter($event);
  90294. }], "focus": _vm.onInputFocus, "blur": _vm.onInputBlur, "input": function input($event) {
  90295. if ($event.target.composing) {
  90296. return;
  90297. }_vm.query = $event.target.value;
  90298. } } }) : _vm._e(), _vm._v(" "), _vm.resetSelect ? _c('Icon', { class: [_vm.prefixCls + '-arrow'], attrs: { "type": "ios-close-circle" }, nativeOn: { "click": function click($event) {
  90299. $event.stopPropagation();return _vm.onClear($event);
  90300. } } }) : _vm._e(), _vm._v(" "), !_vm.resetSelect && !_vm.remote ? _c('Icon', { class: [_vm.prefixCls + '-arrow'], attrs: { "type": _vm.arrowType, "custom": _vm.customArrowType, "size": _vm.arrowSize } }) : _vm._e()], 2);
  90301. };
  90302. var staticRenderFns = [];
  90303. exports.render = render;
  90304. exports.staticRenderFns = staticRenderFns;
  90305. /***/ }),
  90306. /* 326 */
  90307. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  90308. "use strict";
  90309. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  90310. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_functional_options_vue__ = __webpack_require__(122);
  90311. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_functional_options_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_functional_options_vue__);
  90312. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_functional_options_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_functional_options_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  90313. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  90314. /* script */
  90315. /* template */
  90316. var __vue_render__, __vue_static_render_fns__
  90317. /* template functional */
  90318. var __vue_template_functional__ = false
  90319. /* styles */
  90320. var __vue_styles__ = null
  90321. /* scopeId */
  90322. var __vue_scopeId__ = null
  90323. /* moduleIdentifier (server only) */
  90324. var __vue_module_identifier__ = null
  90325. var Component = Object(__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  90326. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_functional_options_vue___default.a,
  90327. __vue_render__,
  90328. __vue_static_render_fns__,
  90329. __vue_template_functional__,
  90330. __vue_styles__,
  90331. __vue_scopeId__,
  90332. __vue_module_identifier__
  90333. )
  90334. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  90335. /***/ }),
  90336. /* 327 */
  90337. /***/ (function(module, exports, __webpack_require__) {
  90338. "use strict";
  90339. Object.defineProperty(exports, "__esModule", {
  90340. value: true
  90341. });
  90342. var render = function render() {
  90343. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "click-outside", rawName: "v-click-outside:[capture]", value: _vm.onClickOutside, expression: "onClickOutside", arg: _vm.capture }, { name: "click-outside", rawName: "v-click-outside:[capture].mousedown", value: _vm.onClickOutside, expression: "onClickOutside", arg: _vm.capture, modifiers: { "mousedown": true } }, { name: "click-outside", rawName: "v-click-outside:[capture].touchstart", value: _vm.onClickOutside, expression: "onClickOutside", arg: _vm.capture, modifiers: { "touchstart": true } }], class: _vm.classes }, [_c('div', { ref: "reference", class: _vm.selectionCls, attrs: { "tabindex": _vm.selectTabindex }, on: { "blur": _vm.toggleHeaderFocus, "focus": _vm.toggleHeaderFocus, "click": _vm.toggleMenu, "keydown": [function ($event) {
  90344. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) {
  90345. return null;
  90346. }return _vm.handleKeydown($event);
  90347. }, function ($event) {
  90348. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
  90349. return null;
  90350. }return _vm.handleKeydown($event);
  90351. }, function ($event) {
  90352. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
  90353. return null;
  90354. }$event.preventDefault();return _vm.handleKeydown($event);
  90355. }, function ($event) {
  90356. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
  90357. return null;
  90358. }$event.preventDefault();return _vm.handleKeydown($event);
  90359. }, function ($event) {
  90360. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) {
  90361. return null;
  90362. }return _vm.handleKeydown($event);
  90363. }, function ($event) {
  90364. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "delete", [8, 46], $event.key, ["Backspace", "Delete", "Del"])) {
  90365. return null;
  90366. }return _vm.handleKeydown($event);
  90367. }], "mouseenter": function mouseenter($event) {
  90368. _vm.hasMouseHoverHead = true;
  90369. }, "mouseleave": function mouseleave($event) {
  90370. _vm.hasMouseHoverHead = false;
  90371. } } }, [_vm._t("input", [_c('input', { attrs: { "type": "hidden", "name": _vm.name }, domProps: { "value": _vm.publicValue } }), _vm._v(" "), _c('select-head', { attrs: { "filterable": _vm.filterable, "multiple": _vm.multiple, "values": _vm.values, "clearable": _vm.canBeCleared, "prefix": _vm.prefix, "disabled": _vm.itemDisabled, "remote": _vm.remote, "input-element-id": _vm.elementId, "initial-label": _vm.initialLabel, "placeholder": _vm.placeholder, "query-prop": _vm.query, "max-tag-count": _vm.maxTagCount, "max-tag-placeholder": _vm.maxTagPlaceholder, "allow-create": _vm.allowCreate, "show-create-item": _vm.showCreateItem }, on: { "on-query-change": _vm.onQueryChange, "on-input-focus": function onInputFocus($event) {
  90372. _vm.isFocused = true;
  90373. }, "on-input-blur": function onInputBlur($event) {
  90374. _vm.isFocused = false;
  90375. }, "on-clear": _vm.clearSingleSelect, "on-enter": _vm.handleCreateItem } }, [_vm._t("prefix", null, { "slot": "prefix" })], 2)])], 2), _vm._v(" "), _c('transition', { attrs: { "name": "transition-drop" } }, [_c('Drop', { directives: [{ name: "show", rawName: "v-show", value: _vm.dropVisible, expression: "dropVisible" }, { name: "transfer-dom", rawName: "v-transfer-dom" }], ref: "dropdown", class: _vm.dropdownCls, attrs: { "placement": _vm.placement, "data-transfer": _vm.transfer, "transfer": _vm.transfer, "eventsEnabled": _vm.eventsEnabled } }, [_c('ul', { directives: [{ name: "show", rawName: "v-show", value: _vm.showNotFoundLabel && !_vm.allowCreate, expression: "showNotFoundLabel && !allowCreate" }], class: [_vm.prefixCls + '-not-found'] }, [_c('li', [_vm._v(_vm._s(_vm.localeNotFoundText))])]), _vm._v(" "), !_vm.remote || _vm.remote && !_vm.loading ? _c('functional-options', { class: _vm.prefixCls + '-dropdown-list', attrs: { "options": _vm.selectOptions, "slot-update-hook": _vm.updateSlotOptions, "slot-options": _vm.slotOptions } }, [_vm.showCreateItem ? _c('li', { class: _vm.prefixCls + '-item', on: { "click": _vm.handleCreateItem } }, [_vm._v("\n " + _vm._s(_vm.query) + "\n "), _c('Icon', { class: _vm.prefixCls + '-item-enter', attrs: { "type": "md-return-left" } })], 1) : _vm._e()]) : _c('ul', { class: _vm.prefixCls + '-dropdown-list' }, [_vm.showCreateItem ? _c('li', { class: _vm.prefixCls + '-item', on: { "click": _vm.handleCreateItem } }, [_vm._v("\n " + _vm._s(_vm.query) + "\n "), _c('Icon', { class: _vm.prefixCls + '-item-enter', attrs: { "type": "md-return-left" } })], 1) : _vm._e()]), _vm._v(" "), _c('ul', { directives: [{ name: "show", rawName: "v-show", value: _vm.loading, expression: "loading" }], class: [_vm.prefixCls + '-loading'] }, [_vm._v(_vm._s(_vm.localeLoadingText))])], 1)], 1)], 1);
  90376. };
  90377. var staticRenderFns = [];
  90378. exports.render = render;
  90379. exports.staticRenderFns = staticRenderFns;
  90380. /***/ }),
  90381. /* 328 */
  90382. /***/ (function(module, exports, __webpack_require__) {
  90383. "use strict";
  90384. Object.defineProperty(exports, "__esModule", {
  90385. value: true
  90386. });
  90387. var render = function render() {
  90388. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('li', { class: _vm.classes, on: { "click": function click($event) {
  90389. $event.stopPropagation();return _vm.select($event);
  90390. }, "mousedown": function mousedown($event) {
  90391. $event.preventDefault();
  90392. } } }, [_vm._t("default", [_vm._v(_vm._s(_vm.showLabel))])], 2);
  90393. };
  90394. var staticRenderFns = [];
  90395. exports.render = render;
  90396. exports.staticRenderFns = staticRenderFns;
  90397. /***/ }),
  90398. /* 329 */
  90399. /***/ (function(module, exports, __webpack_require__) {
  90400. module.exports = { "default": __webpack_require__(330), __esModule: true };
  90401. /***/ }),
  90402. /* 330 */
  90403. /***/ (function(module, exports, __webpack_require__) {
  90404. __webpack_require__(331);
  90405. module.exports = __webpack_require__(5).Number.isNaN;
  90406. /***/ }),
  90407. /* 331 */
  90408. /***/ (function(module, exports, __webpack_require__) {
  90409. // 20.1.2.4 Number.isNaN(number)
  90410. var $export = __webpack_require__(7);
  90411. $export($export.S, 'Number', {
  90412. isNaN: function isNaN(number) {
  90413. // eslint-disable-next-line no-self-compare
  90414. return number != number;
  90415. }
  90416. });
  90417. /***/ }),
  90418. /* 332 */
  90419. /***/ (function(module, exports, __webpack_require__) {
  90420. "use strict";
  90421. Object.defineProperty(exports, "__esModule", {
  90422. value: true
  90423. });
  90424. var _maxSafeInteger = __webpack_require__(333);
  90425. var _maxSafeInteger2 = _interopRequireDefault(_maxSafeInteger);
  90426. var _minSafeInteger = __webpack_require__(336);
  90427. var _minSafeInteger2 = _interopRequireDefault(_minSafeInteger);
  90428. var _newArrowCheck2 = __webpack_require__(1);
  90429. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  90430. exports.default = calcTextareaHeight;
  90431. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  90432. var HIDDEN_TEXTAREA_STYLE = '\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n';
  90433. var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
  90434. var computedStyleCache = {};
  90435. var hiddenTextarea = void 0;
  90436. function calculateNodeStyling(node) {
  90437. var _this = this;
  90438. var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  90439. var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name');
  90440. if (useCache && computedStyleCache[nodeRef]) {
  90441. return computedStyleCache[nodeRef];
  90442. }
  90443. var style = window.getComputedStyle(node);
  90444. var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing');
  90445. var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
  90446. var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
  90447. var sizingStyle = SIZING_STYLE.map(function (name) {
  90448. (0, _newArrowCheck3.default)(this, _this);
  90449. return String(name) + ':' + String(style.getPropertyValue(name));
  90450. }.bind(this)).join(';');
  90451. var nodeInfo = {
  90452. sizingStyle: sizingStyle,
  90453. paddingSize: paddingSize,
  90454. borderSize: borderSize,
  90455. boxSizing: boxSizing
  90456. };
  90457. if (useCache && nodeRef) {
  90458. computedStyleCache[nodeRef] = nodeInfo;
  90459. }
  90460. return nodeInfo;
  90461. }
  90462. function calcTextareaHeight(uiTextNode) {
  90463. var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  90464. var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  90465. var useCache = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  90466. if (!hiddenTextarea) {
  90467. hiddenTextarea = document.createElement('textarea');
  90468. document.body.appendChild(hiddenTextarea);
  90469. }
  90470. if (uiTextNode.getAttribute('wrap')) {
  90471. hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap'));
  90472. } else {
  90473. hiddenTextarea.removeAttribute('wrap');
  90474. }
  90475. var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache),
  90476. paddingSize = _calculateNodeStyling.paddingSize,
  90477. borderSize = _calculateNodeStyling.borderSize,
  90478. boxSizing = _calculateNodeStyling.boxSizing,
  90479. sizingStyle = _calculateNodeStyling.sizingStyle;
  90480. hiddenTextarea.setAttribute('style', String(sizingStyle) + ';' + HIDDEN_TEXTAREA_STYLE);
  90481. hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
  90482. var minHeight = _minSafeInteger2.default;
  90483. var maxHeight = _maxSafeInteger2.default;
  90484. var height = hiddenTextarea.scrollHeight;
  90485. var overflowY = void 0;
  90486. if (boxSizing === 'border-box') {
  90487. height = height + borderSize;
  90488. } else if (boxSizing === 'content-box') {
  90489. height = height - paddingSize;
  90490. }
  90491. if (minRows !== null || maxRows !== null) {
  90492. hiddenTextarea.value = ' ';
  90493. var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
  90494. if (minRows !== null) {
  90495. minHeight = singleRowHeight * minRows;
  90496. if (boxSizing === 'border-box') {
  90497. minHeight = minHeight + paddingSize + borderSize;
  90498. }
  90499. height = Math.max(minHeight, height);
  90500. }
  90501. if (maxRows !== null) {
  90502. maxHeight = singleRowHeight * maxRows;
  90503. if (boxSizing === 'border-box') {
  90504. maxHeight = maxHeight + paddingSize + borderSize;
  90505. }
  90506. overflowY = height > maxHeight ? '' : 'hidden';
  90507. height = Math.min(maxHeight, height);
  90508. }
  90509. }
  90510. if (!maxRows) {
  90511. overflowY = 'hidden';
  90512. }
  90513. return {
  90514. height: String(height) + 'px',
  90515. minHeight: String(minHeight) + 'px',
  90516. maxHeight: String(maxHeight) + 'px',
  90517. overflowY: overflowY
  90518. };
  90519. }
  90520. /***/ }),
  90521. /* 333 */
  90522. /***/ (function(module, exports, __webpack_require__) {
  90523. module.exports = { "default": __webpack_require__(334), __esModule: true };
  90524. /***/ }),
  90525. /* 334 */
  90526. /***/ (function(module, exports, __webpack_require__) {
  90527. __webpack_require__(335);
  90528. module.exports = 0x1fffffffffffff;
  90529. /***/ }),
  90530. /* 335 */
  90531. /***/ (function(module, exports, __webpack_require__) {
  90532. // 20.1.2.6 Number.MAX_SAFE_INTEGER
  90533. var $export = __webpack_require__(7);
  90534. $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
  90535. /***/ }),
  90536. /* 336 */
  90537. /***/ (function(module, exports, __webpack_require__) {
  90538. module.exports = { "default": __webpack_require__(337), __esModule: true };
  90539. /***/ }),
  90540. /* 337 */
  90541. /***/ (function(module, exports, __webpack_require__) {
  90542. __webpack_require__(338);
  90543. module.exports = -0x1fffffffffffff;
  90544. /***/ }),
  90545. /* 338 */
  90546. /***/ (function(module, exports, __webpack_require__) {
  90547. // 20.1.2.10 Number.MIN_SAFE_INTEGER
  90548. var $export = __webpack_require__(7);
  90549. $export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
  90550. /***/ }),
  90551. /* 339 */
  90552. /***/ (function(module, exports, __webpack_require__) {
  90553. "use strict";
  90554. Object.defineProperty(exports, "__esModule", {
  90555. value: true
  90556. });
  90557. var render = function render() {
  90558. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses }, [_vm.type !== 'textarea' ? [_vm.prepend ? _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.slotReady, expression: "slotReady" }], class: [_vm.prefixCls + '-group-prepend'] }, [_vm._t("prepend")], 2) : _vm._e(), _vm._v(" "), _vm.clearable && _vm.currentValue && !_vm.itemDisabled ? _c('i', { staticClass: "ivu-icon", class: ['ivu-icon-ios-close-circle', _vm.prefixCls + '-icon', _vm.prefixCls + '-icon-clear', _vm.prefixCls + '-icon-normal'], style: _vm.clearableStyles, on: { "click": _vm.handleClear } }) : _vm.icon ? _c('i', { staticClass: "ivu-icon", class: ['ivu-icon-' + _vm.icon, _vm.prefixCls + '-icon', _vm.prefixCls + '-icon-normal'], on: { "click": _vm.handleIconClick } }) : _vm.search && _vm.enterButton === false ? _c('i', { staticClass: "ivu-icon ivu-icon-ios-search", class: [_vm.prefixCls + '-icon', _vm.prefixCls + '-icon-normal', _vm.prefixCls + '-search-icon'], on: { "click": _vm.handleSearch } }) : _vm.showSuffix ? _c('span', { staticClass: "ivu-input-suffix" }, [_vm._t("suffix", [_vm.suffix ? _c('i', { staticClass: "ivu-icon", class: ['ivu-icon-' + _vm.suffix] }) : _vm._e()])], 2) : _vm.showWordLimit ? _c('span', { staticClass: "ivu-input-word-count" }, [_vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit))]) : _vm.password ? _c('span', { staticClass: "ivu-input-suffix", on: { "click": _vm.handleToggleShowPassword } }, [_vm.showPassword ? _c('i', { staticClass: "ivu-icon ivu-icon-ios-eye-outline" }) : _c('i', { staticClass: "ivu-icon ivu-icon-ios-eye-off-outline" })]) : _vm._e(), _vm._v(" "), _c('transition', { attrs: { "name": "fade" } }, [!_vm.icon ? _c('i', { staticClass: "ivu-icon ivu-icon-ios-loading ivu-load-loop", class: [_vm.prefixCls + '-icon', _vm.prefixCls + '-icon-validate'] }) : _vm._e()]), _vm._v(" "), _c('input', { ref: "input", class: _vm.inputClasses, attrs: { "id": _vm.elementId, "autocomplete": _vm.autocomplete, "spellcheck": _vm.spellcheck, "type": _vm.currentType, "placeholder": _vm.placeholder, "disabled": _vm.itemDisabled, "maxlength": _vm.maxlength, "readonly": _vm.readonly, "name": _vm.name, "number": _vm.number, "autofocus": _vm.autofocus }, domProps: { "value": _vm.currentValue }, on: { "keyup": [function ($event) {
  90559. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
  90560. return null;
  90561. }return _vm.handleEnter($event);
  90562. }, _vm.handleKeyup], "keypress": _vm.handleKeypress, "keydown": _vm.handleKeydown, "focus": _vm.handleFocus, "blur": _vm.handleBlur, "compositionstart": _vm.handleComposition, "compositionupdate": _vm.handleComposition, "compositionend": _vm.handleComposition, "input": _vm.handleInput, "change": _vm.handleChange } }), _vm._v(" "), _vm.append ? _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.slotReady, expression: "slotReady" }], class: [_vm.prefixCls + '-group-append'] }, [_vm._t("append")], 2) : _vm.search && _vm.enterButton ? _c('div', { class: [_vm.prefixCls + '-group-append', _vm.prefixCls + '-search'], on: { "click": _vm.handleSearch } }, [_vm.enterButton === true ? _c('i', { staticClass: "ivu-icon ivu-icon-ios-search" }) : [_vm._v(_vm._s(_vm.enterButton))]], 2) : _vm.showPrefix ? _c('span', { staticClass: "ivu-input-prefix" }, [_vm._t("prefix", [_vm.prefix ? _c('i', { staticClass: "ivu-icon", class: ['ivu-icon-' + _vm.prefix] }) : _vm._e()])], 2) : _vm._e()] : [_c('textarea', { ref: "textarea", class: _vm.textareaClasses, style: _vm.textareaStyles, attrs: { "id": _vm.elementId, "wrap": _vm.wrap, "autocomplete": _vm.autocomplete, "spellcheck": _vm.spellcheck, "placeholder": _vm.placeholder, "disabled": _vm.itemDisabled, "rows": _vm.rows, "maxlength": _vm.maxlength, "readonly": _vm.readonly, "name": _vm.name, "autofocus": _vm.autofocus }, domProps: { "value": _vm.currentValue }, on: { "keyup": [function ($event) {
  90563. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
  90564. return null;
  90565. }return _vm.handleEnter($event);
  90566. }, _vm.handleKeyup], "keypress": _vm.handleKeypress, "keydown": _vm.handleKeydown, "focus": _vm.handleFocus, "blur": _vm.handleBlur, "compositionstart": _vm.handleComposition, "compositionupdate": _vm.handleComposition, "compositionend": _vm.handleComposition, "input": _vm.handleInput } }), _vm._v(" "), _vm.showWordLimit ? _c('span', { staticClass: "ivu-input-word-count" }, [_vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit))]) : _vm._e()]], 2);
  90567. };
  90568. var staticRenderFns = [];
  90569. exports.render = render;
  90570. exports.staticRenderFns = staticRenderFns;
  90571. /***/ }),
  90572. /* 340 */
  90573. /***/ (function(module, exports, __webpack_require__) {
  90574. "use strict";
  90575. Object.defineProperty(exports, "__esModule", {
  90576. value: true
  90577. });
  90578. var render = function render() {
  90579. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('i-select', { ref: "select", staticClass: "ivu-auto-complete", attrs: { "label": _vm.label, "disabled": _vm.itemDisabled, "clearable": _vm.clearable, "placeholder": _vm.placeholder, "size": _vm.size, "placement": _vm.placement, "value": _vm.currentValue, "transfer-class-name": _vm.transferClassName, "filterable": "", "remote": "", "auto-complete": "", "remote-method": _vm.remoteMethod, "transfer": _vm.transfer, "capture": _vm.capture, "eventsEnabled": _vm.eventsEnabled }, on: { "on-select": _vm.handleSelect, "on-clickoutside": _vm.handleClickOutside } }, [_vm._t("input", [_c('i-input', { ref: "input", attrs: { "slot": "input", "element-id": _vm.elementId, "name": _vm.name, "placeholder": _vm.placeholder, "disabled": _vm.itemDisabled, "size": _vm.size, "icon": _vm.inputIcon }, on: { "on-click": _vm.handleClear, "on-focus": _vm.handleFocus, "on-blur": _vm.handleBlur }, slot: "input", model: { value: _vm.currentValue, callback: function callback($$v) {
  90580. _vm.currentValue = $$v;
  90581. }, expression: "currentValue" } })]), _vm._v(" "), _vm._t("default", _vm._l(_vm.filteredData, function (item) {
  90582. return _c('i-option', { key: item, attrs: { "value": item } }, [_vm._v(_vm._s(item))]);
  90583. }))], 2);
  90584. };
  90585. var staticRenderFns = [];
  90586. exports.render = render;
  90587. exports.staticRenderFns = staticRenderFns;
  90588. /***/ }),
  90589. /* 341 */
  90590. /***/ (function(module, exports, __webpack_require__) {
  90591. "use strict";
  90592. Object.defineProperty(exports, "__esModule", {
  90593. value: true
  90594. });
  90595. var _avatar = __webpack_require__(125);
  90596. var _avatar2 = _interopRequireDefault(_avatar);
  90597. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  90598. exports.default = _avatar2.default;
  90599. /***/ }),
  90600. /* 342 */
  90601. /***/ (function(module, exports, __webpack_require__) {
  90602. "use strict";
  90603. Object.defineProperty(exports, "__esModule", {
  90604. value: true
  90605. });
  90606. var render = function render() {
  90607. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('span', { class: _vm.classes, style: _vm.styles }, [_vm.src ? _c('img', { attrs: { "src": _vm.src }, on: { "error": _vm.handleError } }) : _vm.icon || _vm.customIcon ? _c('Icon', { attrs: { "type": _vm.icon, "custom": _vm.customIcon } }) : _c('span', { ref: "children", class: [_vm.prefixCls + '-string'], style: _vm.childrenStyle }, [_vm._t("default")], 2)], 1);
  90608. };
  90609. var staticRenderFns = [];
  90610. exports.render = render;
  90611. exports.staticRenderFns = staticRenderFns;
  90612. /***/ }),
  90613. /* 343 */
  90614. /***/ (function(module, exports, __webpack_require__) {
  90615. "use strict";
  90616. Object.defineProperty(exports, "__esModule", {
  90617. value: true
  90618. });
  90619. var _backTop = __webpack_require__(344);
  90620. var _backTop2 = _interopRequireDefault(_backTop);
  90621. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  90622. exports.default = _backTop2.default;
  90623. /***/ }),
  90624. /* 344 */
  90625. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  90626. "use strict";
  90627. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  90628. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_back_top_vue__ = __webpack_require__(127);
  90629. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_back_top_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_back_top_vue__);
  90630. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_back_top_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_back_top_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  90631. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_30ee77ed_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_back_top_vue__ = __webpack_require__(345);
  90632. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_30ee77ed_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_back_top_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_30ee77ed_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_back_top_vue__);
  90633. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  90634. /* script */
  90635. /* template */
  90636. /* template functional */
  90637. var __vue_template_functional__ = false
  90638. /* styles */
  90639. var __vue_styles__ = null
  90640. /* scopeId */
  90641. var __vue_scopeId__ = null
  90642. /* moduleIdentifier (server only) */
  90643. var __vue_module_identifier__ = null
  90644. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  90645. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_back_top_vue___default.a,
  90646. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_30ee77ed_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_back_top_vue__["render"],
  90647. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_30ee77ed_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_back_top_vue__["staticRenderFns"],
  90648. __vue_template_functional__,
  90649. __vue_styles__,
  90650. __vue_scopeId__,
  90651. __vue_module_identifier__
  90652. )
  90653. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  90654. /***/ }),
  90655. /* 345 */
  90656. /***/ (function(module, exports, __webpack_require__) {
  90657. "use strict";
  90658. Object.defineProperty(exports, "__esModule", {
  90659. value: true
  90660. });
  90661. var render = function render() {
  90662. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes, style: _vm.styles, on: { "click": _vm.back } }, [_vm._t("default", [_c('div', { class: _vm.innerClasses }, [_c('i', { staticClass: "ivu-icon ivu-icon-ios-arrow-up" })])])], 2);
  90663. };
  90664. var staticRenderFns = [];
  90665. exports.render = render;
  90666. exports.staticRenderFns = staticRenderFns;
  90667. /***/ }),
  90668. /* 346 */
  90669. /***/ (function(module, exports, __webpack_require__) {
  90670. "use strict";
  90671. Object.defineProperty(exports, "__esModule", {
  90672. value: true
  90673. });
  90674. var _badge = __webpack_require__(347);
  90675. var _badge2 = _interopRequireDefault(_badge);
  90676. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  90677. exports.default = _badge2.default;
  90678. /***/ }),
  90679. /* 347 */
  90680. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  90681. "use strict";
  90682. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  90683. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_badge_vue__ = __webpack_require__(128);
  90684. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_badge_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_badge_vue__);
  90685. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_badge_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_badge_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  90686. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5343a9da_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_badge_vue__ = __webpack_require__(348);
  90687. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5343a9da_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_badge_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5343a9da_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_badge_vue__);
  90688. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  90689. /* script */
  90690. /* template */
  90691. /* template functional */
  90692. var __vue_template_functional__ = false
  90693. /* styles */
  90694. var __vue_styles__ = null
  90695. /* scopeId */
  90696. var __vue_scopeId__ = null
  90697. /* moduleIdentifier (server only) */
  90698. var __vue_module_identifier__ = null
  90699. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  90700. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_badge_vue___default.a,
  90701. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5343a9da_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_badge_vue__["render"],
  90702. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5343a9da_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_badge_vue__["staticRenderFns"],
  90703. __vue_template_functional__,
  90704. __vue_styles__,
  90705. __vue_scopeId__,
  90706. __vue_module_identifier__
  90707. )
  90708. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  90709. /***/ }),
  90710. /* 348 */
  90711. /***/ (function(module, exports, __webpack_require__) {
  90712. "use strict";
  90713. Object.defineProperty(exports, "__esModule", {
  90714. value: true
  90715. });
  90716. var render = function render() {
  90717. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _vm.dot ? _c('span', { ref: "badge", class: _vm.classes }, [_vm._t("default"), _vm._v(" "), _c('sup', { directives: [{ name: "show", rawName: "v-show", value: _vm.badge, expression: "badge" }], class: _vm.dotClasses, style: _vm.styles })], 2) : _vm.status || _vm.color ? _c('span', { ref: "badge", staticClass: "ivu-badge-status", class: _vm.classes }, [_c('span', { class: _vm.statusClasses, style: _vm.statusStyles }), _vm._v(" "), _c('span', { staticClass: "ivu-badge-status-text" }, [_vm._t("text", [_vm._v(_vm._s(_vm.text))])], 2)]) : _c('span', { ref: "badge", class: _vm.classes }, [_vm._t("default"), _vm._v(" "), _vm.$slots.count ? _c('sup', { class: _vm.customCountClasses, style: _vm.styles }, [_vm._t("count")], 2) : _vm.hasCount ? _c('sup', { directives: [{ name: "show", rawName: "v-show", value: _vm.badge, expression: "badge" }], class: _vm.countClasses, style: _vm.styles }, [_vm._t("text", [_vm._v(_vm._s(_vm.finalCount))])], 2) : _vm._e()], 2);
  90718. };
  90719. var staticRenderFns = [];
  90720. exports.render = render;
  90721. exports.staticRenderFns = staticRenderFns;
  90722. /***/ }),
  90723. /* 349 */
  90724. /***/ (function(module, exports, __webpack_require__) {
  90725. "use strict";
  90726. Object.defineProperty(exports, "__esModule", {
  90727. value: true
  90728. });
  90729. var _breadcrumb = __webpack_require__(350);
  90730. var _breadcrumb2 = _interopRequireDefault(_breadcrumb);
  90731. var _breadcrumbItem = __webpack_require__(352);
  90732. var _breadcrumbItem2 = _interopRequireDefault(_breadcrumbItem);
  90733. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  90734. _breadcrumb2.default.Item = _breadcrumbItem2.default;
  90735. exports.default = _breadcrumb2.default;
  90736. /***/ }),
  90737. /* 350 */
  90738. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  90739. "use strict";
  90740. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  90741. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_vue__ = __webpack_require__(129);
  90742. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_vue__);
  90743. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  90744. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_53b534b8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_breadcrumb_vue__ = __webpack_require__(351);
  90745. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_53b534b8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_breadcrumb_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_53b534b8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_breadcrumb_vue__);
  90746. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  90747. /* script */
  90748. /* template */
  90749. /* template functional */
  90750. var __vue_template_functional__ = false
  90751. /* styles */
  90752. var __vue_styles__ = null
  90753. /* scopeId */
  90754. var __vue_scopeId__ = null
  90755. /* moduleIdentifier (server only) */
  90756. var __vue_module_identifier__ = null
  90757. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  90758. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_vue___default.a,
  90759. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_53b534b8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_breadcrumb_vue__["render"],
  90760. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_53b534b8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_breadcrumb_vue__["staticRenderFns"],
  90761. __vue_template_functional__,
  90762. __vue_styles__,
  90763. __vue_scopeId__,
  90764. __vue_module_identifier__
  90765. )
  90766. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  90767. /***/ }),
  90768. /* 351 */
  90769. /***/ (function(module, exports, __webpack_require__) {
  90770. "use strict";
  90771. Object.defineProperty(exports, "__esModule", {
  90772. value: true
  90773. });
  90774. var render = function render() {
  90775. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_vm._t("default")], 2);
  90776. };
  90777. var staticRenderFns = [];
  90778. exports.render = render;
  90779. exports.staticRenderFns = staticRenderFns;
  90780. /***/ }),
  90781. /* 352 */
  90782. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  90783. "use strict";
  90784. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  90785. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_item_vue__ = __webpack_require__(130);
  90786. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_item_vue__);
  90787. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_item_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_item_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  90788. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70d61118_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_breadcrumb_item_vue__ = __webpack_require__(353);
  90789. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70d61118_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_breadcrumb_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70d61118_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_breadcrumb_item_vue__);
  90790. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  90791. /* script */
  90792. /* template */
  90793. /* template functional */
  90794. var __vue_template_functional__ = false
  90795. /* styles */
  90796. var __vue_styles__ = null
  90797. /* scopeId */
  90798. var __vue_scopeId__ = null
  90799. /* moduleIdentifier (server only) */
  90800. var __vue_module_identifier__ = null
  90801. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  90802. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_breadcrumb_item_vue___default.a,
  90803. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70d61118_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_breadcrumb_item_vue__["render"],
  90804. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70d61118_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_breadcrumb_item_vue__["staticRenderFns"],
  90805. __vue_template_functional__,
  90806. __vue_styles__,
  90807. __vue_scopeId__,
  90808. __vue_module_identifier__
  90809. )
  90810. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  90811. /***/ }),
  90812. /* 353 */
  90813. /***/ (function(module, exports, __webpack_require__) {
  90814. "use strict";
  90815. Object.defineProperty(exports, "__esModule", {
  90816. value: true
  90817. });
  90818. var render = function render() {
  90819. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('span', [_vm.to ? _c('a', { class: _vm.linkClasses, attrs: { "href": _vm.linkUrl, "target": _vm.target }, on: { "click": [function ($event) {
  90820. if ($event.ctrlKey || $event.shiftKey || $event.altKey || $event.metaKey) {
  90821. return null;
  90822. }return _vm.handleCheckClick($event, false);
  90823. }, function ($event) {
  90824. if (!$event.ctrlKey) {
  90825. return null;
  90826. }return _vm.handleCheckClick($event, true);
  90827. }, function ($event) {
  90828. if (!$event.metaKey) {
  90829. return null;
  90830. }return _vm.handleCheckClick($event, true);
  90831. }] } }, [_vm._t("default")], 2) : _c('span', { class: _vm.linkClasses }, [_vm._t("default")], 2), _vm._v(" "), !_vm.showSeparator ? _c('span', { class: _vm.separatorClasses, domProps: { "innerHTML": _vm._s(_vm.separator) } }) : _c('span', { class: _vm.separatorClasses }, [_vm._t("separator")], 2)]);
  90832. };
  90833. var staticRenderFns = [];
  90834. exports.render = render;
  90835. exports.staticRenderFns = staticRenderFns;
  90836. /***/ }),
  90837. /* 354 */
  90838. /***/ (function(module, exports, __webpack_require__) {
  90839. "use strict";
  90840. Object.defineProperty(exports, "__esModule", {
  90841. value: true
  90842. });
  90843. var _button = __webpack_require__(28);
  90844. var _button2 = _interopRequireDefault(_button);
  90845. var _buttonGroup = __webpack_require__(356);
  90846. var _buttonGroup2 = _interopRequireDefault(_buttonGroup);
  90847. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  90848. _button2.default.Group = _buttonGroup2.default;
  90849. exports.default = _button2.default;
  90850. /***/ }),
  90851. /* 355 */
  90852. /***/ (function(module, exports, __webpack_require__) {
  90853. "use strict";
  90854. Object.defineProperty(exports, "__esModule", {
  90855. value: true
  90856. });
  90857. var render = function render() {
  90858. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c(_vm.tagName, _vm._b({ tag: "component", class: _vm.classes, attrs: { "disabled": _vm.itemDisabled }, on: { "click": _vm.handleClickLink } }, 'component', _vm.tagProps, false), [_vm.loading ? _c('Icon', { staticClass: "ivu-load-loop", attrs: { "type": "ios-loading" } }) : _vm._e(), _vm._v(" "), (_vm.icon || _vm.customIcon) && !_vm.loading ? _c('Icon', { attrs: { "type": _vm.icon, "custom": _vm.customIcon } }) : _vm._e(), _vm._v(" "), _vm.showSlot ? _c('span', { ref: "slot" }, [_vm._t("default")], 2) : _vm._e()], 1);
  90859. };
  90860. var staticRenderFns = [];
  90861. exports.render = render;
  90862. exports.staticRenderFns = staticRenderFns;
  90863. /***/ }),
  90864. /* 356 */
  90865. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  90866. "use strict";
  90867. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  90868. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_group_vue__ = __webpack_require__(132);
  90869. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_group_vue__);
  90870. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_group_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_group_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  90871. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_592f1b56_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_group_vue__ = __webpack_require__(357);
  90872. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_592f1b56_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_592f1b56_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_group_vue__);
  90873. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  90874. /* script */
  90875. /* template */
  90876. /* template functional */
  90877. var __vue_template_functional__ = false
  90878. /* styles */
  90879. var __vue_styles__ = null
  90880. /* scopeId */
  90881. var __vue_scopeId__ = null
  90882. /* moduleIdentifier (server only) */
  90883. var __vue_module_identifier__ = null
  90884. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  90885. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_button_group_vue___default.a,
  90886. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_592f1b56_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_group_vue__["render"],
  90887. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_592f1b56_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_button_group_vue__["staticRenderFns"],
  90888. __vue_template_functional__,
  90889. __vue_styles__,
  90890. __vue_scopeId__,
  90891. __vue_module_identifier__
  90892. )
  90893. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  90894. /***/ }),
  90895. /* 357 */
  90896. /***/ (function(module, exports, __webpack_require__) {
  90897. "use strict";
  90898. Object.defineProperty(exports, "__esModule", {
  90899. value: true
  90900. });
  90901. var render = function render() {
  90902. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_vm._t("default")], 2);
  90903. };
  90904. var staticRenderFns = [];
  90905. exports.render = render;
  90906. exports.staticRenderFns = staticRenderFns;
  90907. /***/ }),
  90908. /* 358 */
  90909. /***/ (function(module, exports, __webpack_require__) {
  90910. "use strict";
  90911. Object.defineProperty(exports, "__esModule", {
  90912. value: true
  90913. });
  90914. var _card = __webpack_require__(359);
  90915. var _card2 = _interopRequireDefault(_card);
  90916. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  90917. exports.default = _card2.default;
  90918. /***/ }),
  90919. /* 359 */
  90920. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  90921. "use strict";
  90922. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  90923. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_card_vue__ = __webpack_require__(133);
  90924. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_card_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_card_vue__);
  90925. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_card_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_card_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  90926. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_23408e01_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_card_vue__ = __webpack_require__(360);
  90927. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_23408e01_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_card_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_23408e01_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_card_vue__);
  90928. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  90929. /* script */
  90930. /* template */
  90931. /* template functional */
  90932. var __vue_template_functional__ = false
  90933. /* styles */
  90934. var __vue_styles__ = null
  90935. /* scopeId */
  90936. var __vue_scopeId__ = null
  90937. /* moduleIdentifier (server only) */
  90938. var __vue_module_identifier__ = null
  90939. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  90940. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_card_vue___default.a,
  90941. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_23408e01_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_card_vue__["render"],
  90942. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_23408e01_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_card_vue__["staticRenderFns"],
  90943. __vue_template_functional__,
  90944. __vue_styles__,
  90945. __vue_scopeId__,
  90946. __vue_module_identifier__
  90947. )
  90948. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  90949. /***/ }),
  90950. /* 360 */
  90951. /***/ (function(module, exports, __webpack_require__) {
  90952. "use strict";
  90953. Object.defineProperty(exports, "__esModule", {
  90954. value: true
  90955. });
  90956. var render = function render() {
  90957. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c(_vm.tagName, _vm._b({ tag: "component", class: _vm.classes, on: { "click": _vm.handleClickLink } }, 'component', _vm.tagProps, false), [_vm.showHead ? _c('div', { class: _vm.headClasses }, [_vm._t("title", [_vm.title ? _c('p', [_vm.icon ? _c('Icon', { attrs: { "type": _vm.icon } }) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.title))])], 1) : _vm._e()])], 2) : _vm._e(), _vm._v(" "), _vm.showExtra ? _c('div', { class: _vm.extraClasses }, [_vm._t("extra")], 2) : _vm._e(), _vm._v(" "), _c('div', { class: _vm.bodyClasses, style: _vm.bodyStyles }, [_vm._t("default")], 2)]);
  90958. };
  90959. var staticRenderFns = [];
  90960. exports.render = render;
  90961. exports.staticRenderFns = staticRenderFns;
  90962. /***/ }),
  90963. /* 361 */
  90964. /***/ (function(module, exports, __webpack_require__) {
  90965. "use strict";
  90966. Object.defineProperty(exports, "__esModule", {
  90967. value: true
  90968. });
  90969. var _carousel = __webpack_require__(362);
  90970. var _carousel2 = _interopRequireDefault(_carousel);
  90971. var _carouselItem = __webpack_require__(364);
  90972. var _carouselItem2 = _interopRequireDefault(_carouselItem);
  90973. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  90974. _carousel2.default.Item = _carouselItem2.default;
  90975. exports.default = _carousel2.default;
  90976. /***/ }),
  90977. /* 362 */
  90978. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  90979. "use strict";
  90980. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  90981. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_vue__ = __webpack_require__(134);
  90982. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_vue__);
  90983. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  90984. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0c091c07_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_carousel_vue__ = __webpack_require__(363);
  90985. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0c091c07_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_carousel_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0c091c07_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_carousel_vue__);
  90986. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  90987. /* script */
  90988. /* template */
  90989. /* template functional */
  90990. var __vue_template_functional__ = false
  90991. /* styles */
  90992. var __vue_styles__ = null
  90993. /* scopeId */
  90994. var __vue_scopeId__ = null
  90995. /* moduleIdentifier (server only) */
  90996. var __vue_module_identifier__ = null
  90997. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  90998. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_vue___default.a,
  90999. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0c091c07_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_carousel_vue__["render"],
  91000. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0c091c07_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_carousel_vue__["staticRenderFns"],
  91001. __vue_template_functional__,
  91002. __vue_styles__,
  91003. __vue_scopeId__,
  91004. __vue_module_identifier__
  91005. )
  91006. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91007. /***/ }),
  91008. /* 363 */
  91009. /***/ (function(module, exports, __webpack_require__) {
  91010. "use strict";
  91011. Object.defineProperty(exports, "__esModule", {
  91012. value: true
  91013. });
  91014. var render = function render() {
  91015. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_c('button', { staticClass: "left", class: _vm.arrowClasses, attrs: { "type": "button" }, on: { "click": function click($event) {
  91016. return _vm.arrowEvent(-1);
  91017. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-back" } })], 1), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-list'] }, [_c('div', { ref: "originTrack", class: [_vm.prefixCls + '-track', _vm.showCopyTrack ? '' : 'higher'], style: _vm.trackStyles, on: { "click": function click($event) {
  91018. return _vm.handleClick('currentIndex');
  91019. } } }, [_vm._t("default")], 2), _vm._v(" "), _vm.loop ? _c('div', { ref: "copyTrack", class: [_vm.prefixCls + '-track', _vm.showCopyTrack ? 'higher' : ''], style: _vm.copyTrackStyles, on: { "click": function click($event) {
  91020. return _vm.handleClick('copyTrackIndex');
  91021. } } }) : _vm._e()]), _vm._v(" "), _c('button', { staticClass: "right", class: _vm.arrowClasses, attrs: { "type": "button" }, on: { "click": function click($event) {
  91022. return _vm.arrowEvent(1);
  91023. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1), _vm._v(" "), _c('ul', { class: _vm.dotsClasses }, [_vm._l(_vm.slides.length, function (n) {
  91024. return [_c('li', { class: [n - 1 === _vm.currentIndex ? _vm.prefixCls + '-active' : ''], on: { "click": function click($event) {
  91025. return _vm.dotsEvent('click', n - 1);
  91026. }, "mouseover": function mouseover($event) {
  91027. return _vm.dotsEvent('hover', n - 1);
  91028. } } }, [_c('button', { class: [_vm.radiusDot ? 'radius' : ''], attrs: { "type": "button" } })])];
  91029. })], 2)]);
  91030. };
  91031. var staticRenderFns = [];
  91032. exports.render = render;
  91033. exports.staticRenderFns = staticRenderFns;
  91034. /***/ }),
  91035. /* 364 */
  91036. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91037. "use strict";
  91038. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91039. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_item_vue__ = __webpack_require__(135);
  91040. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_item_vue__);
  91041. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_item_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_item_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91042. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5d35b7f7_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_carousel_item_vue__ = __webpack_require__(365);
  91043. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5d35b7f7_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_carousel_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5d35b7f7_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_carousel_item_vue__);
  91044. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91045. /* script */
  91046. /* template */
  91047. /* template functional */
  91048. var __vue_template_functional__ = false
  91049. /* styles */
  91050. var __vue_styles__ = null
  91051. /* scopeId */
  91052. var __vue_scopeId__ = null
  91053. /* moduleIdentifier (server only) */
  91054. var __vue_module_identifier__ = null
  91055. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91056. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_carousel_item_vue___default.a,
  91057. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5d35b7f7_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_carousel_item_vue__["render"],
  91058. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5d35b7f7_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_carousel_item_vue__["staticRenderFns"],
  91059. __vue_template_functional__,
  91060. __vue_styles__,
  91061. __vue_scopeId__,
  91062. __vue_module_identifier__
  91063. )
  91064. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91065. /***/ }),
  91066. /* 365 */
  91067. /***/ (function(module, exports, __webpack_require__) {
  91068. "use strict";
  91069. Object.defineProperty(exports, "__esModule", {
  91070. value: true
  91071. });
  91072. var render = function render() {
  91073. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.prefixCls, style: _vm.styles }, [_vm._t("default")], 2);
  91074. };
  91075. var staticRenderFns = [];
  91076. exports.render = render;
  91077. exports.staticRenderFns = staticRenderFns;
  91078. /***/ }),
  91079. /* 366 */
  91080. /***/ (function(module, exports, __webpack_require__) {
  91081. "use strict";
  91082. Object.defineProperty(exports, "__esModule", {
  91083. value: true
  91084. });
  91085. var _cascader = __webpack_require__(367);
  91086. var _cascader2 = _interopRequireDefault(_cascader);
  91087. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  91088. exports.default = _cascader2.default;
  91089. /***/ }),
  91090. /* 367 */
  91091. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91092. "use strict";
  91093. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91094. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cascader_vue__ = __webpack_require__(136);
  91095. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cascader_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cascader_vue__);
  91096. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cascader_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cascader_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91097. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_035d76bf_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cascader_vue__ = __webpack_require__(372);
  91098. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_035d76bf_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cascader_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_035d76bf_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cascader_vue__);
  91099. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91100. /* script */
  91101. /* template */
  91102. /* template functional */
  91103. var __vue_template_functional__ = false
  91104. /* styles */
  91105. var __vue_styles__ = null
  91106. /* scopeId */
  91107. var __vue_scopeId__ = null
  91108. /* moduleIdentifier (server only) */
  91109. var __vue_module_identifier__ = null
  91110. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91111. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cascader_vue___default.a,
  91112. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_035d76bf_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cascader_vue__["render"],
  91113. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_035d76bf_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cascader_vue__["staticRenderFns"],
  91114. __vue_template_functional__,
  91115. __vue_styles__,
  91116. __vue_scopeId__,
  91117. __vue_module_identifier__
  91118. )
  91119. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91120. /***/ }),
  91121. /* 368 */
  91122. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91123. "use strict";
  91124. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91125. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_caspanel_vue__ = __webpack_require__(137);
  91126. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_caspanel_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_caspanel_vue__);
  91127. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_caspanel_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_caspanel_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91128. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_cb61ec76_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_caspanel_vue__ = __webpack_require__(371);
  91129. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_cb61ec76_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_caspanel_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_cb61ec76_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_caspanel_vue__);
  91130. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91131. /* script */
  91132. /* template */
  91133. /* template functional */
  91134. var __vue_template_functional__ = false
  91135. /* styles */
  91136. var __vue_styles__ = null
  91137. /* scopeId */
  91138. var __vue_scopeId__ = null
  91139. /* moduleIdentifier (server only) */
  91140. var __vue_module_identifier__ = null
  91141. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91142. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_caspanel_vue___default.a,
  91143. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_cb61ec76_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_caspanel_vue__["render"],
  91144. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_cb61ec76_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_caspanel_vue__["staticRenderFns"],
  91145. __vue_template_functional__,
  91146. __vue_styles__,
  91147. __vue_scopeId__,
  91148. __vue_module_identifier__
  91149. )
  91150. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91151. /***/ }),
  91152. /* 369 */
  91153. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91154. "use strict";
  91155. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91156. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_casitem_vue__ = __webpack_require__(138);
  91157. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_casitem_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_casitem_vue__);
  91158. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_casitem_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_casitem_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91159. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6ca89d2a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_casitem_vue__ = __webpack_require__(370);
  91160. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6ca89d2a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_casitem_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6ca89d2a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_casitem_vue__);
  91161. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91162. /* script */
  91163. /* template */
  91164. /* template functional */
  91165. var __vue_template_functional__ = false
  91166. /* styles */
  91167. var __vue_styles__ = null
  91168. /* scopeId */
  91169. var __vue_scopeId__ = null
  91170. /* moduleIdentifier (server only) */
  91171. var __vue_module_identifier__ = null
  91172. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91173. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_casitem_vue___default.a,
  91174. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6ca89d2a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_casitem_vue__["render"],
  91175. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6ca89d2a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_casitem_vue__["staticRenderFns"],
  91176. __vue_template_functional__,
  91177. __vue_styles__,
  91178. __vue_scopeId__,
  91179. __vue_module_identifier__
  91180. )
  91181. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91182. /***/ }),
  91183. /* 370 */
  91184. /***/ (function(module, exports, __webpack_require__) {
  91185. "use strict";
  91186. Object.defineProperty(exports, "__esModule", {
  91187. value: true
  91188. });
  91189. var render = function render() {
  91190. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('li', { class: _vm.classes }, [_vm._v("\n " + _vm._s(_vm.data.label) + "\n "), _vm.showArrow ? _c('Icon', { attrs: { "type": _vm.arrowType, "custom": _vm.customArrowType, "size": _vm.arrowSize } }) : _vm._e(), _vm._v(" "), _vm.showLoading ? _c('i', { staticClass: "ivu-icon ivu-icon-ios-loading ivu-load-loop ivu-cascader-menu-item-loading" }) : _vm._e()], 1);
  91191. };
  91192. var staticRenderFns = [];
  91193. exports.render = render;
  91194. exports.staticRenderFns = staticRenderFns;
  91195. /***/ }),
  91196. /* 371 */
  91197. /***/ (function(module, exports, __webpack_require__) {
  91198. "use strict";
  91199. Object.defineProperty(exports, "__esModule", {
  91200. value: true
  91201. });
  91202. var render = function render() {
  91203. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('span', [_vm.data && _vm.data.length ? _c('ul', { class: [_vm.prefixCls + '-menu'] }, _vm._l(_vm.data, function (item) {
  91204. return _c('Casitem', { key: _vm.getKey(), attrs: { "prefix-cls": _vm.prefixCls, "data": item, "tmp-item": _vm.tmpItem }, nativeOn: { "click": function click($event) {
  91205. $event.stopPropagation();return _vm.handleClickItem(item);
  91206. }, "mouseenter": function mouseenter($event) {
  91207. $event.stopPropagation();return _vm.handleHoverItem(item);
  91208. } } });
  91209. }), 1) : _vm._e(), _vm.sublist && _vm.sublist.length ? _c('Caspanel', { attrs: { "prefix-cls": _vm.prefixCls, "data": _vm.sublist, "disabled": _vm.disabled, "trigger": _vm.trigger, "change-on-select": _vm.changeOnSelect } }) : _vm._e()], 1);
  91210. };
  91211. var staticRenderFns = [];
  91212. exports.render = render;
  91213. exports.staticRenderFns = staticRenderFns;
  91214. /***/ }),
  91215. /* 372 */
  91216. /***/ (function(module, exports, __webpack_require__) {
  91217. "use strict";
  91218. Object.defineProperty(exports, "__esModule", {
  91219. value: true
  91220. });
  91221. var render = function render() {
  91222. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "click-outside", rawName: "v-click-outside", value: _vm.handleClose, expression: "handleClose" }], class: _vm.classes }, [_c('div', { ref: "reference", class: [_vm.prefixCls + '-rel'], on: { "click": _vm.toggleOpen } }, [_c('input', { attrs: { "type": "hidden", "name": _vm.name }, domProps: { "value": _vm.currentValue } }), _vm._v(" "), _vm._t("default", [_c('i-input', { ref: "input", attrs: { "element-id": _vm.elementId, "readonly": !_vm.filterable, "disabled": _vm.itemDisabled, "value": _vm.displayInputRender, "size": _vm.size, "placeholder": _vm.inputPlaceholder }, on: { "on-change": _vm.handleInput } }), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.filterable && _vm.query === '', expression: "filterable && query === ''" }], class: [_vm.prefixCls + '-label'], on: { "click": _vm.handleFocus } }, [_vm._v(_vm._s(_vm.displayRender))]), _vm._v(" "), _c('Icon', { directives: [{ name: "show", rawName: "v-show", value: _vm.showCloseIcon, expression: "showCloseIcon" }], class: [_vm.prefixCls + '-arrow'], attrs: { "type": "ios-close-circle" }, nativeOn: { "click": function click($event) {
  91223. $event.stopPropagation();return _vm.clearSelect($event);
  91224. } } }), _vm._v(" "), _c('Icon', { class: [_vm.prefixCls + '-arrow'], attrs: { "type": _vm.arrowType, "custom": _vm.customArrowType, "size": _vm.arrowSize } })])], 2), _vm._v(" "), _c('transition', { attrs: { "name": "transition-drop" } }, [_c('Drop', { directives: [{ name: "show", rawName: "v-show", value: _vm.visible, expression: "visible" }, { name: "transfer-dom", rawName: "v-transfer-dom" }], ref: "drop", class: _vm.dropdownCls, attrs: { "eventsEnabled": _vm.eventsEnabled, "data-transfer": _vm.transfer, "transfer": _vm.transfer } }, [_c('div', [_c('Caspanel', { directives: [{ name: "show", rawName: "v-show", value: !_vm.filterable || _vm.filterable && _vm.query === '', expression: "!filterable || (filterable && query === '')" }], ref: "caspanel", attrs: { "prefix-cls": _vm.prefixCls, "data": _vm.data, "disabled": _vm.itemDisabled, "change-on-select": _vm.changeOnSelect, "trigger": _vm.trigger } }), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.filterable && _vm.query !== '' && _vm.querySelections.length, expression: "filterable && query !== '' && querySelections.length" }], class: [_vm.prefixCls + '-dropdown'] }, [_c('ul', { class: [_vm.selectPrefixCls + '-dropdown-list'] }, _vm._l(_vm.querySelections, function (item, index) {
  91225. var _obj;
  91226. return _c('li', { class: [_vm.selectPrefixCls + '-item', (_obj = {}, _obj[_vm.selectPrefixCls + '-item-disabled'] = item.disabled, _obj)], domProps: { "innerHTML": _vm._s(item.display) }, on: { "click": function click($event) {
  91227. return _vm.handleSelectItem(index);
  91228. } } });
  91229. }), 0)]), _vm._v(" "), _c('ul', { directives: [{ name: "show", rawName: "v-show", value: _vm.filterable && _vm.query !== '' && !_vm.querySelections.length || !_vm.data.length, expression: "(filterable && query !== '' && !querySelections.length) || !data.length" }], class: [_vm.prefixCls + '-not-found-tip'] }, [_c('li', [_vm._v(_vm._s(_vm.localeNotFoundText))])])], 1)])], 1)], 1);
  91230. };
  91231. var staticRenderFns = [];
  91232. exports.render = render;
  91233. exports.staticRenderFns = staticRenderFns;
  91234. /***/ }),
  91235. /* 373 */
  91236. /***/ (function(module, exports, __webpack_require__) {
  91237. "use strict";
  91238. Object.defineProperty(exports, "__esModule", {
  91239. value: true
  91240. });
  91241. var _cell = __webpack_require__(374);
  91242. var _cell2 = _interopRequireDefault(_cell);
  91243. var _cellGroup = __webpack_require__(378);
  91244. var _cellGroup2 = _interopRequireDefault(_cellGroup);
  91245. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  91246. _cell2.default.Group = _cellGroup2.default;
  91247. exports.default = _cell2.default;
  91248. /***/ }),
  91249. /* 374 */
  91250. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91251. "use strict";
  91252. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91253. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue__ = __webpack_require__(139);
  91254. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue__);
  91255. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91256. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_45b2aeb6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_vue__ = __webpack_require__(377);
  91257. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_45b2aeb6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_45b2aeb6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_vue__);
  91258. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91259. /* script */
  91260. /* template */
  91261. /* template functional */
  91262. var __vue_template_functional__ = false
  91263. /* styles */
  91264. var __vue_styles__ = null
  91265. /* scopeId */
  91266. var __vue_scopeId__ = null
  91267. /* moduleIdentifier (server only) */
  91268. var __vue_module_identifier__ = null
  91269. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91270. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue___default.a,
  91271. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_45b2aeb6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_vue__["render"],
  91272. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_45b2aeb6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_vue__["staticRenderFns"],
  91273. __vue_template_functional__,
  91274. __vue_styles__,
  91275. __vue_scopeId__,
  91276. __vue_module_identifier__
  91277. )
  91278. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91279. /***/ }),
  91280. /* 375 */
  91281. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91282. "use strict";
  91283. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91284. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_item_vue__ = __webpack_require__(140);
  91285. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_item_vue__);
  91286. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_item_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_item_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91287. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7f3078d4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_item_vue__ = __webpack_require__(376);
  91288. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7f3078d4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7f3078d4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_item_vue__);
  91289. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91290. /* script */
  91291. /* template */
  91292. /* template functional */
  91293. var __vue_template_functional__ = false
  91294. /* styles */
  91295. var __vue_styles__ = null
  91296. /* scopeId */
  91297. var __vue_scopeId__ = null
  91298. /* moduleIdentifier (server only) */
  91299. var __vue_module_identifier__ = null
  91300. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91301. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_item_vue___default.a,
  91302. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7f3078d4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_item_vue__["render"],
  91303. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7f3078d4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_item_vue__["staticRenderFns"],
  91304. __vue_template_functional__,
  91305. __vue_styles__,
  91306. __vue_scopeId__,
  91307. __vue_module_identifier__
  91308. )
  91309. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91310. /***/ }),
  91311. /* 376 */
  91312. /***/ (function(module, exports, __webpack_require__) {
  91313. "use strict";
  91314. Object.defineProperty(exports, "__esModule", {
  91315. value: true
  91316. });
  91317. var render = function render() {
  91318. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: "ivu-cell-item" }, [_c('div', { staticClass: "ivu-cell-icon" }, [_vm._t("icon")], 2), _vm._v(" "), _c('div', { staticClass: "ivu-cell-main" }, [_c('div', { staticClass: "ivu-cell-title" }, [_vm._t("default", [_vm._v(_vm._s(_vm.title))])], 2), _vm._v(" "), _c('div', { staticClass: "ivu-cell-label" }, [_vm._t("label", [_vm._v(_vm._s(_vm.label))])], 2)]), _vm._v(" "), _c('div', { staticClass: "ivu-cell-footer" }, [_c('span', { staticClass: "ivu-cell-extra" }, [_vm._t("extra", [_vm._v(_vm._s(_vm.extra))])], 2)])]);
  91319. };
  91320. var staticRenderFns = [];
  91321. exports.render = render;
  91322. exports.staticRenderFns = staticRenderFns;
  91323. /***/ }),
  91324. /* 377 */
  91325. /***/ (function(module, exports, __webpack_require__) {
  91326. "use strict";
  91327. Object.defineProperty(exports, "__esModule", {
  91328. value: true
  91329. });
  91330. var render = function render() {
  91331. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_vm.to ? _c('a', { staticClass: "ivu-cell-link", attrs: { "href": _vm.linkUrl, "target": _vm.target }, on: { "click": [function ($event) {
  91332. if ($event.ctrlKey || $event.shiftKey || $event.altKey || $event.metaKey) {
  91333. return null;
  91334. }return _vm.handleClickItem($event, false);
  91335. }, function ($event) {
  91336. if (!$event.ctrlKey) {
  91337. return null;
  91338. }return _vm.handleClickItem($event, true);
  91339. }, function ($event) {
  91340. if (!$event.metaKey) {
  91341. return null;
  91342. }return _vm.handleClickItem($event, true);
  91343. }] } }, [_c('CellItem', { attrs: { "title": _vm.title, "label": _vm.label, "extra": _vm.extra } }, [_vm._t("icon", null, { "slot": "icon" }), _vm._v(" "), _vm._t("default", null, { "slot": "default" }), _vm._v(" "), _vm._t("extra", null, { "slot": "extra" }), _vm._v(" "), _vm._t("label", null, { "slot": "label" })], 2)], 1) : _c('div', { staticClass: "ivu-cell-link", on: { "click": _vm.handleClickItem } }, [_c('CellItem', { attrs: { "title": _vm.title, "label": _vm.label, "extra": _vm.extra } }, [_vm._t("icon", null, { "slot": "icon" }), _vm._v(" "), _vm._t("default", null, { "slot": "default" }), _vm._v(" "), _vm._t("extra", null, { "slot": "extra" }), _vm._v(" "), _vm._t("label", null, { "slot": "label" })], 2)], 1), _vm._v(" "), _vm.to ? _c('div', { staticClass: "ivu-cell-arrow" }, [_vm._t("arrow", [_c('Icon', { attrs: { "type": _vm.arrowType, "custom": _vm.customArrowType, "size": _vm.arrowSize } })])], 2) : _vm._e()]);
  91344. };
  91345. var staticRenderFns = [];
  91346. exports.render = render;
  91347. exports.staticRenderFns = staticRenderFns;
  91348. /***/ }),
  91349. /* 378 */
  91350. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91351. "use strict";
  91352. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91353. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_group_vue__ = __webpack_require__(141);
  91354. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_group_vue__);
  91355. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_group_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_group_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91356. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4dc556d9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_group_vue__ = __webpack_require__(379);
  91357. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4dc556d9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4dc556d9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_group_vue__);
  91358. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91359. /* script */
  91360. /* template */
  91361. /* template functional */
  91362. var __vue_template_functional__ = false
  91363. /* styles */
  91364. var __vue_styles__ = null
  91365. /* scopeId */
  91366. var __vue_scopeId__ = null
  91367. /* moduleIdentifier (server only) */
  91368. var __vue_module_identifier__ = null
  91369. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91370. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_group_vue___default.a,
  91371. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4dc556d9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_group_vue__["render"],
  91372. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4dc556d9_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_group_vue__["staticRenderFns"],
  91373. __vue_template_functional__,
  91374. __vue_styles__,
  91375. __vue_scopeId__,
  91376. __vue_module_identifier__
  91377. )
  91378. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91379. /***/ }),
  91380. /* 379 */
  91381. /***/ (function(module, exports, __webpack_require__) {
  91382. "use strict";
  91383. Object.defineProperty(exports, "__esModule", {
  91384. value: true
  91385. });
  91386. var render = function render() {
  91387. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: "ivu-cell-group" }, [_vm._t("default")], 2);
  91388. };
  91389. var staticRenderFns = [];
  91390. exports.render = render;
  91391. exports.staticRenderFns = staticRenderFns;
  91392. /***/ }),
  91393. /* 380 */
  91394. /***/ (function(module, exports, __webpack_require__) {
  91395. "use strict";
  91396. Object.defineProperty(exports, "__esModule", {
  91397. value: true
  91398. });
  91399. var _checkbox = __webpack_require__(49);
  91400. var _checkbox2 = _interopRequireDefault(_checkbox);
  91401. var _checkboxGroup = __webpack_require__(143);
  91402. var _checkboxGroup2 = _interopRequireDefault(_checkboxGroup);
  91403. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  91404. _checkbox2.default.Group = _checkboxGroup2.default;
  91405. exports.default = _checkbox2.default;
  91406. /***/ }),
  91407. /* 381 */
  91408. /***/ (function(module, exports, __webpack_require__) {
  91409. "use strict";
  91410. Object.defineProperty(exports, "__esModule", {
  91411. value: true
  91412. });
  91413. var render = function render() {
  91414. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('label', { class: _vm.wrapClasses }, [_c('span', { class: _vm.checkboxClasses }, [_c('span', { class: _vm.innerClasses }), _vm._v(" "), _vm.group ? _c('input', { directives: [{ name: "model", rawName: "v-model", value: _vm.model, expression: "model" }], class: _vm.inputClasses, attrs: { "type": "checkbox", "disabled": _vm.itemDisabled, "name": _vm.name }, domProps: { "value": _vm.label, "checked": Array.isArray(_vm.model) ? _vm._i(_vm.model, _vm.label) > -1 : _vm.model }, on: { "change": [function ($event) {
  91415. var $$a = _vm.model,
  91416. $$el = $event.target,
  91417. $$c = $$el.checked ? true : false;if (Array.isArray($$a)) {
  91418. var $$v = _vm.label,
  91419. $$i = _vm._i($$a, $$v);if ($$el.checked) {
  91420. $$i < 0 && (_vm.model = $$a.concat([$$v]));
  91421. } else {
  91422. $$i > -1 && (_vm.model = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
  91423. }
  91424. } else {
  91425. _vm.model = $$c;
  91426. }
  91427. }, _vm.change], "focus": _vm.onFocus, "blur": _vm.onBlur } }) : _c('input', { class: _vm.inputClasses, attrs: { "type": "checkbox", "disabled": _vm.itemDisabled, "name": _vm.name }, domProps: { "checked": _vm.currentValue }, on: { "change": _vm.change, "focus": _vm.onFocus, "blur": _vm.onBlur } })]), _vm._v(" "), _vm._t("default", [_vm.showSlot ? _c('span', [_vm._v(_vm._s(_vm.label))]) : _vm._e()])], 2);
  91428. };
  91429. var staticRenderFns = [];
  91430. exports.render = render;
  91431. exports.staticRenderFns = staticRenderFns;
  91432. /***/ }),
  91433. /* 382 */
  91434. /***/ (function(module, exports, __webpack_require__) {
  91435. "use strict";
  91436. Object.defineProperty(exports, "__esModule", {
  91437. value: true
  91438. });
  91439. var render = function render() {
  91440. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_vm._t("default")], 2);
  91441. };
  91442. var staticRenderFns = [];
  91443. exports.render = render;
  91444. exports.staticRenderFns = staticRenderFns;
  91445. /***/ }),
  91446. /* 383 */
  91447. /***/ (function(module, exports, __webpack_require__) {
  91448. "use strict";
  91449. Object.defineProperty(exports, "__esModule", {
  91450. value: true
  91451. });
  91452. var _circle = __webpack_require__(384);
  91453. var _circle2 = _interopRequireDefault(_circle);
  91454. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  91455. exports.default = _circle2.default;
  91456. /***/ }),
  91457. /* 384 */
  91458. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91459. "use strict";
  91460. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91461. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_circle_vue__ = __webpack_require__(145);
  91462. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_circle_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_circle_vue__);
  91463. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_circle_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_circle_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91464. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_02f73f92_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_circle_vue__ = __webpack_require__(386);
  91465. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_02f73f92_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_circle_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_02f73f92_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_circle_vue__);
  91466. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91467. /* script */
  91468. /* template */
  91469. /* template functional */
  91470. var __vue_template_functional__ = false
  91471. /* styles */
  91472. var __vue_styles__ = null
  91473. /* scopeId */
  91474. var __vue_scopeId__ = null
  91475. /* moduleIdentifier (server only) */
  91476. var __vue_module_identifier__ = null
  91477. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91478. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_circle_vue___default.a,
  91479. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_02f73f92_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_circle_vue__["render"],
  91480. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_02f73f92_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_circle_vue__["staticRenderFns"],
  91481. __vue_template_functional__,
  91482. __vue_styles__,
  91483. __vue_scopeId__,
  91484. __vue_module_identifier__
  91485. )
  91486. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91487. /***/ }),
  91488. /* 385 */
  91489. /***/ (function(module, exports, __webpack_require__) {
  91490. "use strict";
  91491. Object.defineProperty(exports, "__esModule", {
  91492. value: true
  91493. });
  91494. exports.default = function () {
  91495. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  91496. var $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
  91497. var maxPos = $chars.length;
  91498. var str = '';
  91499. for (var i = 0; i < len; i++) {
  91500. str += $chars.charAt(Math.floor(Math.random() * maxPos));
  91501. }
  91502. return str;
  91503. };
  91504. /***/ }),
  91505. /* 386 */
  91506. /***/ (function(module, exports, __webpack_require__) {
  91507. "use strict";
  91508. Object.defineProperty(exports, "__esModule", {
  91509. value: true
  91510. });
  91511. var render = function render() {
  91512. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses, style: _vm.circleSize }, [_c('svg', { attrs: { "viewBox": "0 0 100 100" } }, [_vm.showDefs ? _c('defs', [_c('linearGradient', { attrs: { "id": _vm.id, "x1": "100%", "y1": "0%", "x2": "0%", "y2": "0%" } }, [_c('stop', { attrs: { "offset": "0%", "stop-color": _vm.strokeColor[0] } }), _vm._v(" "), _c('stop', { attrs: { "offset": "100%", "stop-color": _vm.strokeColor[1] } })], 1)], 1) : _vm._e(), _vm._v(" "), _c('path', { style: _vm.trailStyle, attrs: { "d": _vm.pathString, "stroke": _vm.trailColor, "stroke-width": _vm.trailWidth, "fill-opacity": 0, "stroke-linecap": _vm.strokeLinecap } }), _vm._v(" "), _c('path', { style: _vm.pathStyle, attrs: { "d": _vm.pathString, "stroke-linecap": _vm.strokeLinecap, "stroke": _vm.strokeValue, "stroke-width": _vm.computedStrokeWidth, "fill-opacity": "0" } })]), _vm._v(" "), _c('div', { class: _vm.innerClasses }, [_vm._t("default")], 2)]);
  91513. };
  91514. var staticRenderFns = [];
  91515. exports.render = render;
  91516. exports.staticRenderFns = staticRenderFns;
  91517. /***/ }),
  91518. /* 387 */
  91519. /***/ (function(module, exports, __webpack_require__) {
  91520. "use strict";
  91521. Object.defineProperty(exports, "__esModule", {
  91522. value: true
  91523. });
  91524. var _collapse = __webpack_require__(388);
  91525. var _collapse2 = _interopRequireDefault(_collapse);
  91526. var _panel = __webpack_require__(390);
  91527. var _panel2 = _interopRequireDefault(_panel);
  91528. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  91529. _collapse2.default.Panel = _panel2.default;
  91530. exports.default = _collapse2.default;
  91531. /***/ }),
  91532. /* 388 */
  91533. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91534. "use strict";
  91535. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91536. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_collapse_vue__ = __webpack_require__(146);
  91537. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_collapse_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_collapse_vue__);
  91538. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_collapse_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_collapse_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91539. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_63c3031f_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_collapse_vue__ = __webpack_require__(389);
  91540. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_63c3031f_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_collapse_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_63c3031f_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_collapse_vue__);
  91541. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91542. /* script */
  91543. /* template */
  91544. /* template functional */
  91545. var __vue_template_functional__ = false
  91546. /* styles */
  91547. var __vue_styles__ = null
  91548. /* scopeId */
  91549. var __vue_scopeId__ = null
  91550. /* moduleIdentifier (server only) */
  91551. var __vue_module_identifier__ = null
  91552. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91553. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_collapse_vue___default.a,
  91554. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_63c3031f_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_collapse_vue__["render"],
  91555. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_63c3031f_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_collapse_vue__["staticRenderFns"],
  91556. __vue_template_functional__,
  91557. __vue_styles__,
  91558. __vue_scopeId__,
  91559. __vue_module_identifier__
  91560. )
  91561. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91562. /***/ }),
  91563. /* 389 */
  91564. /***/ (function(module, exports, __webpack_require__) {
  91565. "use strict";
  91566. Object.defineProperty(exports, "__esModule", {
  91567. value: true
  91568. });
  91569. var render = function render() {
  91570. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_vm._t("default")], 2);
  91571. };
  91572. var staticRenderFns = [];
  91573. exports.render = render;
  91574. exports.staticRenderFns = staticRenderFns;
  91575. /***/ }),
  91576. /* 390 */
  91577. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91578. "use strict";
  91579. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91580. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_panel_vue__ = __webpack_require__(147);
  91581. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_panel_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_panel_vue__);
  91582. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_panel_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_panel_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91583. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_21f3ec22_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_panel_vue__ = __webpack_require__(391);
  91584. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_21f3ec22_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_panel_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_21f3ec22_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_panel_vue__);
  91585. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91586. /* script */
  91587. /* template */
  91588. /* template functional */
  91589. var __vue_template_functional__ = false
  91590. /* styles */
  91591. var __vue_styles__ = null
  91592. /* scopeId */
  91593. var __vue_scopeId__ = null
  91594. /* moduleIdentifier (server only) */
  91595. var __vue_module_identifier__ = null
  91596. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91597. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_panel_vue___default.a,
  91598. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_21f3ec22_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_panel_vue__["render"],
  91599. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_21f3ec22_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_panel_vue__["staticRenderFns"],
  91600. __vue_template_functional__,
  91601. __vue_styles__,
  91602. __vue_scopeId__,
  91603. __vue_module_identifier__
  91604. )
  91605. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91606. /***/ }),
  91607. /* 391 */
  91608. /***/ (function(module, exports, __webpack_require__) {
  91609. "use strict";
  91610. Object.defineProperty(exports, "__esModule", {
  91611. value: true
  91612. });
  91613. var render = function render() {
  91614. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.itemClasses }, [_c('div', { class: _vm.headerClasses, on: { "click": _vm.toggle } }, [!_vm.hideArrow ? _c('Icon', { attrs: { "type": "ios-arrow-forward" } }) : _vm._e(), _vm._v(" "), _vm._t("default")], 2), _vm._v(" "), _vm.mounted ? _c('collapse-transition', [_c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.isActive, expression: "isActive" }], class: _vm.contentClasses }, [_c('div', { class: _vm.boxClasses }, [_vm._t("content")], 2)])]) : _vm._e()], 1);
  91615. };
  91616. var staticRenderFns = [];
  91617. exports.render = render;
  91618. exports.staticRenderFns = staticRenderFns;
  91619. /***/ }),
  91620. /* 392 */
  91621. /***/ (function(module, exports, __webpack_require__) {
  91622. "use strict";
  91623. Object.defineProperty(exports, "__esModule", {
  91624. value: true
  91625. });
  91626. var _colorPicker = __webpack_require__(393);
  91627. var _colorPicker2 = _interopRequireDefault(_colorPicker);
  91628. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  91629. exports.default = _colorPicker2.default;
  91630. /***/ }),
  91631. /* 393 */
  91632. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91633. "use strict";
  91634. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91635. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_color_picker_vue__ = __webpack_require__(148);
  91636. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_color_picker_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_color_picker_vue__);
  91637. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_color_picker_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_color_picker_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91638. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e2bfa368_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_color_picker_vue__ = __webpack_require__(402);
  91639. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e2bfa368_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_color_picker_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e2bfa368_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_color_picker_vue__);
  91640. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91641. /* script */
  91642. /* template */
  91643. /* template functional */
  91644. var __vue_template_functional__ = false
  91645. /* styles */
  91646. var __vue_styles__ = null
  91647. /* scopeId */
  91648. var __vue_scopeId__ = null
  91649. /* moduleIdentifier (server only) */
  91650. var __vue_module_identifier__ = null
  91651. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91652. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_color_picker_vue___default.a,
  91653. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e2bfa368_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_color_picker_vue__["render"],
  91654. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e2bfa368_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_color_picker_vue__["staticRenderFns"],
  91655. __vue_template_functional__,
  91656. __vue_styles__,
  91657. __vue_scopeId__,
  91658. __vue_module_identifier__
  91659. )
  91660. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91661. /***/ }),
  91662. /* 394 */
  91663. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91664. "use strict";
  91665. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91666. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_recommend_colors_vue__ = __webpack_require__(150);
  91667. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_recommend_colors_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_recommend_colors_vue__);
  91668. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_recommend_colors_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_recommend_colors_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91669. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0ac3e803_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_recommend_colors_vue__ = __webpack_require__(395);
  91670. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0ac3e803_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_recommend_colors_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0ac3e803_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_recommend_colors_vue__);
  91671. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91672. /* script */
  91673. /* template */
  91674. /* template functional */
  91675. var __vue_template_functional__ = false
  91676. /* styles */
  91677. var __vue_styles__ = null
  91678. /* scopeId */
  91679. var __vue_scopeId__ = null
  91680. /* moduleIdentifier (server only) */
  91681. var __vue_module_identifier__ = null
  91682. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91683. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_recommend_colors_vue___default.a,
  91684. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0ac3e803_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_recommend_colors_vue__["render"],
  91685. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0ac3e803_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_recommend_colors_vue__["staticRenderFns"],
  91686. __vue_template_functional__,
  91687. __vue_styles__,
  91688. __vue_scopeId__,
  91689. __vue_module_identifier__
  91690. )
  91691. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91692. /***/ }),
  91693. /* 395 */
  91694. /***/ (function(module, exports, __webpack_require__) {
  91695. "use strict";
  91696. Object.defineProperty(exports, "__esModule", {
  91697. value: true
  91698. });
  91699. var render = function render() {
  91700. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { ref: "reference", attrs: { "tabindex": "0" }, on: { "click": _vm.handleClick, "keydown": [function ($event) {
  91701. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) {
  91702. return null;
  91703. }return _vm.handleEscape($event);
  91704. }, function ($event) {
  91705. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
  91706. return null;
  91707. }return _vm.handleEnter($event);
  91708. }, function ($event) {
  91709. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "left", 37, $event.key, ["Left", "ArrowLeft"])) {
  91710. return null;
  91711. }if ('button' in $event && $event.button !== 0) {
  91712. return null;
  91713. }return _vm.handleArrow($event, 'x', _vm.left);
  91714. }, function ($event) {
  91715. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "right", 39, $event.key, ["Right", "ArrowRight"])) {
  91716. return null;
  91717. }if ('button' in $event && $event.button !== 2) {
  91718. return null;
  91719. }return _vm.handleArrow($event, 'x', _vm.right);
  91720. }, function ($event) {
  91721. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
  91722. return null;
  91723. }return _vm.handleArrow($event, 'y', _vm.up);
  91724. }, function ($event) {
  91725. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
  91726. return null;
  91727. }return _vm.handleArrow($event, 'y', _vm.down);
  91728. }], "blur": _vm.blurColor, "focus": _vm.focusColor } }, [_vm._l(_vm.list, function (item, index) {
  91729. return [_c('div', { key: item + ':' + index, class: [_vm.prefixCls + '-picker-colors-wrapper'] }, [_c('div', { attrs: { "data-color-id": index } }, [_c('div', { class: [_vm.prefixCls + '-picker-colors-wrapper-color'], style: { background: item } }), _vm._v(" "), _c('div', { ref: 'color-circle-' + index, refInFor: true, class: [_vm.prefixCls + '-picker-colors-wrapper-circle', _vm.hideClass] })])]), _vm._v(" "), _vm.lineBreak(_vm.list, index) ? _c('br') : _vm._e()];
  91730. })], 2);
  91731. };
  91732. var staticRenderFns = [];
  91733. exports.render = render;
  91734. exports.staticRenderFns = staticRenderFns;
  91735. /***/ }),
  91736. /* 396 */
  91737. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91738. "use strict";
  91739. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91740. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_saturation_vue__ = __webpack_require__(152);
  91741. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_saturation_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_saturation_vue__);
  91742. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_saturation_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_saturation_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91743. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0757ab84_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_saturation_vue__ = __webpack_require__(397);
  91744. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0757ab84_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_saturation_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0757ab84_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_saturation_vue__);
  91745. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91746. /* script */
  91747. /* template */
  91748. /* template functional */
  91749. var __vue_template_functional__ = false
  91750. /* styles */
  91751. var __vue_styles__ = null
  91752. /* scopeId */
  91753. var __vue_scopeId__ = null
  91754. /* moduleIdentifier (server only) */
  91755. var __vue_module_identifier__ = null
  91756. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91757. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_saturation_vue___default.a,
  91758. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0757ab84_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_saturation_vue__["render"],
  91759. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0757ab84_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_saturation_vue__["staticRenderFns"],
  91760. __vue_template_functional__,
  91761. __vue_styles__,
  91762. __vue_scopeId__,
  91763. __vue_module_identifier__
  91764. )
  91765. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91766. /***/ }),
  91767. /* 397 */
  91768. /***/ (function(module, exports, __webpack_require__) {
  91769. "use strict";
  91770. Object.defineProperty(exports, "__esModule", {
  91771. value: true
  91772. });
  91773. var render = function render() {
  91774. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: [_vm.prefixCls + '-saturation-wrapper'], attrs: { "tabindex": "0" }, on: { "keydown": [function ($event) {
  91775. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) {
  91776. return null;
  91777. }return _vm.handleEscape($event);
  91778. }, function ($event) {
  91779. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "left", 37, $event.key, ["Left", "ArrowLeft"])) {
  91780. return null;
  91781. }if ('button' in $event && $event.button !== 0) {
  91782. return null;
  91783. }return _vm.handleLeft($event);
  91784. }, function ($event) {
  91785. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "right", 39, $event.key, ["Right", "ArrowRight"])) {
  91786. return null;
  91787. }if ('button' in $event && $event.button !== 2) {
  91788. return null;
  91789. }return _vm.handleRight($event);
  91790. }, function ($event) {
  91791. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
  91792. return null;
  91793. }return _vm.handleUp($event);
  91794. }, function ($event) {
  91795. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
  91796. return null;
  91797. }return _vm.handleDown($event);
  91798. }], "click": function click($event) {
  91799. return _vm.$el.focus();
  91800. } } }, [_c('div', { ref: "container", class: [_vm.prefixCls + '-saturation'], style: _vm.bgColorStyle, on: { "mousedown": _vm.handleMouseDown } }, [_c('div', { class: [_vm.prefixCls + '-saturation--white'] }), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-saturation--black'] }), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-saturation-pointer'], style: _vm.pointerStyle }, [_c('div', { class: [_vm.prefixCls + '-saturation-circle'] })])])]);
  91801. };
  91802. var staticRenderFns = [];
  91803. exports.render = render;
  91804. exports.staticRenderFns = staticRenderFns;
  91805. /***/ }),
  91806. /* 398 */
  91807. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91808. "use strict";
  91809. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91810. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_hue_vue__ = __webpack_require__(153);
  91811. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_hue_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_hue_vue__);
  91812. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_hue_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_hue_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91813. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4a42dff6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_hue_vue__ = __webpack_require__(399);
  91814. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4a42dff6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_hue_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4a42dff6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_hue_vue__);
  91815. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91816. /* script */
  91817. /* template */
  91818. /* template functional */
  91819. var __vue_template_functional__ = false
  91820. /* styles */
  91821. var __vue_styles__ = null
  91822. /* scopeId */
  91823. var __vue_scopeId__ = null
  91824. /* moduleIdentifier (server only) */
  91825. var __vue_module_identifier__ = null
  91826. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91827. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_hue_vue___default.a,
  91828. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4a42dff6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_hue_vue__["render"],
  91829. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4a42dff6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_hue_vue__["staticRenderFns"],
  91830. __vue_template_functional__,
  91831. __vue_styles__,
  91832. __vue_scopeId__,
  91833. __vue_module_identifier__
  91834. )
  91835. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91836. /***/ }),
  91837. /* 399 */
  91838. /***/ (function(module, exports, __webpack_require__) {
  91839. "use strict";
  91840. Object.defineProperty(exports, "__esModule", {
  91841. value: true
  91842. });
  91843. var render = function render() {
  91844. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: [_vm.prefixCls + '-hue'], attrs: { "tabindex": "0" }, on: { "click": function click($event) {
  91845. return _vm.$el.focus();
  91846. }, "keydown": [function ($event) {
  91847. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) {
  91848. return null;
  91849. }return _vm.handleEscape($event);
  91850. }, function ($event) {
  91851. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "left", 37, $event.key, ["Left", "ArrowLeft"])) {
  91852. return null;
  91853. }if ('button' in $event && $event.button !== 0) {
  91854. return null;
  91855. }return _vm.handleLeft($event);
  91856. }, function ($event) {
  91857. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "right", 39, $event.key, ["Right", "ArrowRight"])) {
  91858. return null;
  91859. }if ('button' in $event && $event.button !== 2) {
  91860. return null;
  91861. }return _vm.handleRight($event);
  91862. }, function ($event) {
  91863. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
  91864. return null;
  91865. }return _vm.handleUp($event);
  91866. }, function ($event) {
  91867. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
  91868. return null;
  91869. }return _vm.handleDown($event);
  91870. }] } }, [_c('div', { ref: "container", class: [_vm.prefixCls + '-hue-container'], on: { "mousedown": _vm.handleMouseDown, "touchmove": _vm.handleChange, "touchstart": _vm.handleChange } }, [_c('div', { class: [_vm.prefixCls + '-hue-pointer'], style: { top: 0, left: _vm.percent + "%" } }, [_c('div', { class: [_vm.prefixCls + '-hue-picker'] })])])]);
  91871. };
  91872. var staticRenderFns = [];
  91873. exports.render = render;
  91874. exports.staticRenderFns = staticRenderFns;
  91875. /***/ }),
  91876. /* 400 */
  91877. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91878. "use strict";
  91879. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  91880. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alpha_vue__ = __webpack_require__(154);
  91881. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alpha_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alpha_vue__);
  91882. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alpha_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alpha_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  91883. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_be7eaa8a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_alpha_vue__ = __webpack_require__(401);
  91884. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_be7eaa8a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_alpha_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_be7eaa8a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_alpha_vue__);
  91885. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  91886. /* script */
  91887. /* template */
  91888. /* template functional */
  91889. var __vue_template_functional__ = false
  91890. /* styles */
  91891. var __vue_styles__ = null
  91892. /* scopeId */
  91893. var __vue_scopeId__ = null
  91894. /* moduleIdentifier (server only) */
  91895. var __vue_module_identifier__ = null
  91896. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  91897. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_alpha_vue___default.a,
  91898. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_be7eaa8a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_alpha_vue__["render"],
  91899. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_be7eaa8a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_alpha_vue__["staticRenderFns"],
  91900. __vue_template_functional__,
  91901. __vue_styles__,
  91902. __vue_scopeId__,
  91903. __vue_module_identifier__
  91904. )
  91905. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  91906. /***/ }),
  91907. /* 401 */
  91908. /***/ (function(module, exports, __webpack_require__) {
  91909. "use strict";
  91910. Object.defineProperty(exports, "__esModule", {
  91911. value: true
  91912. });
  91913. var render = function render() {
  91914. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: [_vm.prefixCls + '-alpha'], attrs: { "tabindex": "0" }, on: { "click": function click($event) {
  91915. return _vm.$el.focus();
  91916. }, "keydown": [function ($event) {
  91917. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) {
  91918. return null;
  91919. }return _vm.handleEscape($event);
  91920. }, function ($event) {
  91921. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "left", 37, $event.key, ["Left", "ArrowLeft"])) {
  91922. return null;
  91923. }if ('button' in $event && $event.button !== 0) {
  91924. return null;
  91925. }return _vm.handleLeft($event);
  91926. }, function ($event) {
  91927. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "right", 39, $event.key, ["Right", "ArrowRight"])) {
  91928. return null;
  91929. }if ('button' in $event && $event.button !== 2) {
  91930. return null;
  91931. }return _vm.handleRight($event);
  91932. }, function ($event) {
  91933. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
  91934. return null;
  91935. }return _vm.handleUp($event);
  91936. }, function ($event) {
  91937. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
  91938. return null;
  91939. }return _vm.handleDown($event);
  91940. }] } }, [_c('div', { class: [_vm.prefixCls + '-alpha-checkboard-wrap'] }, [_c('div', { class: [_vm.prefixCls + '-alpha-checkerboard'] })]), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-alpha-gradient'], style: _vm.gradientStyle }), _vm._v(" "), _c('div', { ref: "container", class: [_vm.prefixCls + '-alpha-container'], on: { "mousedown": _vm.handleMouseDown, "touchmove": _vm.handleChange, "touchstart": _vm.handleChange } }, [_c('div', { class: [_vm.prefixCls + '-alpha-pointer'], style: { top: 0, left: _vm.value.a * 100 + "%" } }, [_c('div', { class: [_vm.prefixCls + '-alpha-picker'] })])])]);
  91941. };
  91942. var staticRenderFns = [];
  91943. exports.render = render;
  91944. exports.staticRenderFns = staticRenderFns;
  91945. /***/ }),
  91946. /* 402 */
  91947. /***/ (function(module, exports, __webpack_require__) {
  91948. "use strict";
  91949. Object.defineProperty(exports, "__esModule", {
  91950. value: true
  91951. });
  91952. var render = function render() {
  91953. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "click-outside", rawName: "v-click-outside:[capture]", value: _vm.handleClose, expression: "handleClose", arg: _vm.capture }], class: _vm.classes }, [_c('div', { ref: "reference", class: _vm.wrapClasses, on: { "click": _vm.toggleVisible } }, [_c('input', { attrs: { "name": _vm.name, "type": "hidden" }, domProps: { "value": _vm.currentValue } }), _vm._v(" "), _c('Icon', { class: _vm.arrowClasses, attrs: { "type": _vm.arrowType, "custom": _vm.customArrowType, "size": _vm.arrowSize } }), _vm._v(" "), _c('div', { ref: "input", class: _vm.inputClasses, attrs: { "tabindex": _vm.itemDisabled ? undefined : 0 }, on: { "keydown": [function ($event) {
  91954. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) {
  91955. return null;
  91956. }return _vm.onTab($event);
  91957. }, function ($event) {
  91958. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) {
  91959. return null;
  91960. }return _vm.onEscape($event);
  91961. }, function ($event) {
  91962. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
  91963. return null;
  91964. }return _vm.onArrow($event);
  91965. }, function ($event) {
  91966. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
  91967. return null;
  91968. }return _vm.onArrow($event);
  91969. }] } }, [_c('div', { class: [_vm.prefixCls + '-color'] }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.value === '' && !_vm.visible, expression: "value === '' && !visible" }], class: [_vm.prefixCls + '-color-empty'] }, [_c('i', { class: [_vm.iconPrefixCls, _vm.iconPrefixCls + '-ios-close'] })]), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.value || _vm.visible, expression: "value || visible" }], style: _vm.displayedColorStyle })])])], 1), _vm._v(" "), _c('transition', { attrs: { "name": "transition-drop" } }, [_c('Drop', { directives: [{ name: "transfer-dom", rawName: "v-transfer-dom" }, { name: "show", rawName: "v-show", value: _vm.visible, expression: "visible" }], ref: "drop", class: _vm.dropClasses, attrs: { "placement": _vm.placement, "data-transfer": _vm.transfer, "transfer": _vm.transfer, "eventsEnabled": _vm.eventsEnabled } }, [_c('transition', { attrs: { "name": "fade" } }, [_vm.visible ? _c('div', { class: [_vm.prefixCls + '-picker'] }, [_c('div', { class: [_vm.prefixCls + '-picker-wrapper'] }, [_c('div', { class: [_vm.prefixCls + '-picker-panel'] }, [_c('Saturation', { ref: "saturation", attrs: { "focused": _vm.visible }, on: { "change": _vm.childChange }, nativeOn: { "keydown": function keydown($event) {
  91970. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) {
  91971. return null;
  91972. }return _vm.handleFirstTab($event);
  91973. } }, model: { value: _vm.saturationColors, callback: function callback($$v) {
  91974. _vm.saturationColors = $$v;
  91975. }, expression: "saturationColors" } })], 1), _vm._v(" "), _vm.hue ? _c('div', { class: [_vm.prefixCls + '-picker-hue-slider'] }, [_c('Hue', { on: { "change": _vm.childChange }, model: { value: _vm.saturationColors, callback: function callback($$v) {
  91976. _vm.saturationColors = $$v;
  91977. }, expression: "saturationColors" } })], 1) : _vm._e(), _vm._v(" "), _vm.alpha ? _c('div', { class: [_vm.prefixCls + '-picker-alpha-slider'] }, [_c('Alpha', { on: { "change": _vm.childChange }, model: { value: _vm.saturationColors, callback: function callback($$v) {
  91978. _vm.saturationColors = $$v;
  91979. }, expression: "saturationColors" } })], 1) : _vm._e(), _vm._v(" "), _vm.colors.length ? _c('recommend-colors', { class: [_vm.prefixCls + '-picker-colors'], attrs: { "list": _vm.colors }, on: { "picker-color": _vm.handleSelectColor } }) : _vm._e(), _vm._v(" "), !_vm.colors.length && _vm.recommend ? _c('recommend-colors', { class: [_vm.prefixCls + '-picker-colors'], attrs: { "list": _vm.recommendedColor }, on: { "picker-color": _vm.handleSelectColor } }) : _vm._e()], 1), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-confirm'] }, [_c('span', { class: _vm.confirmColorClasses }, [_vm.editable ? [_c('i-input', { ref: "editColorInput", attrs: { "value": _vm.formatColor, "size": "small" }, on: { "on-enter": _vm.handleEditColor, "on-blur": _vm.handleEditColor } })] : [_vm._v(_vm._s(_vm.formatColor))]], 2), _vm._v(" "), _c('i-button', { ref: "clear", attrs: { "tabindex": 0, "size": "small" }, on: { "keydown": function keydown($event) {
  91980. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
  91981. return null;
  91982. }return _vm.handleClear($event);
  91983. } }, nativeOn: { "click": function click($event) {
  91984. return _vm.handleClear($event);
  91985. }, "keydown": function keydown($event) {
  91986. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) {
  91987. return null;
  91988. }return _vm.closer($event);
  91989. } } }, [_vm._v(_vm._s(_vm.t('i.datepicker.clear')))]), _vm._v(" "), _c('i-button', { ref: "ok", attrs: { "tabindex": 0, "size": "small", "type": "primary" }, on: { "keydown": function keydown($event) {
  91990. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
  91991. return null;
  91992. }return _vm.handleSuccess($event);
  91993. } }, nativeOn: { "click": function click($event) {
  91994. return _vm.handleSuccess($event);
  91995. }, "keydown": [function ($event) {
  91996. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) {
  91997. return null;
  91998. }return _vm.handleLastTab($event);
  91999. }, function ($event) {
  92000. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) {
  92001. return null;
  92002. }return _vm.closer($event);
  92003. }] } }, [_vm._v(_vm._s(_vm.t('i.datepicker.ok')))])], 1)]) : _vm._e()])], 1)], 1)], 1);
  92004. };
  92005. var staticRenderFns = [];
  92006. exports.render = render;
  92007. exports.staticRenderFns = staticRenderFns;
  92008. /***/ }),
  92009. /* 403 */
  92010. /***/ (function(module, exports, __webpack_require__) {
  92011. "use strict";
  92012. Object.defineProperty(exports, "__esModule", {
  92013. value: true
  92014. });
  92015. var _content = __webpack_require__(155);
  92016. var _content2 = _interopRequireDefault(_content);
  92017. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  92018. exports.default = _content2.default;
  92019. /***/ }),
  92020. /* 404 */
  92021. /***/ (function(module, exports, __webpack_require__) {
  92022. "use strict";
  92023. Object.defineProperty(exports, "__esModule", {
  92024. value: true
  92025. });
  92026. var render = function render() {
  92027. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses }, [_vm._t("default")], 2);
  92028. };
  92029. var staticRenderFns = [];
  92030. exports.render = render;
  92031. exports.staticRenderFns = staticRenderFns;
  92032. /***/ }),
  92033. /* 405 */
  92034. /***/ (function(module, exports, __webpack_require__) {
  92035. "use strict";
  92036. Object.defineProperty(exports, "__esModule", {
  92037. value: true
  92038. });
  92039. var _datePicker = __webpack_require__(406);
  92040. var _datePicker2 = _interopRequireDefault(_datePicker);
  92041. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  92042. exports.default = _datePicker2.default;
  92043. /***/ }),
  92044. /* 406 */
  92045. /***/ (function(module, exports, __webpack_require__) {
  92046. "use strict";
  92047. Object.defineProperty(exports, "__esModule", {
  92048. value: true
  92049. });
  92050. var _picker = __webpack_require__(157);
  92051. var _picker2 = _interopRequireDefault(_picker);
  92052. var _date = __webpack_require__(409);
  92053. var _date2 = _interopRequireDefault(_date);
  92054. var _dateRange = __webpack_require__(422);
  92055. var _dateRange2 = _interopRequireDefault(_dateRange);
  92056. var _assist = __webpack_require__(3);
  92057. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  92058. exports.default = {
  92059. name: 'CalendarPicker',
  92060. mixins: [_picker2.default],
  92061. props: {
  92062. type: {
  92063. validator: function validator(value) {
  92064. return (0, _assist.oneOf)(value, ['year', 'month', 'date', 'daterange', 'datetime', 'datetimerange']);
  92065. },
  92066. default: 'date'
  92067. }
  92068. },
  92069. components: { DatePickerPanel: _date2.default, RangeDatePickerPanel: _dateRange2.default },
  92070. computed: {
  92071. panel: function panel() {
  92072. var isRange = this.type === 'daterange' || this.type === 'datetimerange';
  92073. return isRange ? 'RangeDatePickerPanel' : 'DatePickerPanel';
  92074. },
  92075. ownPickerProps: function ownPickerProps() {
  92076. return this.options;
  92077. }
  92078. }
  92079. };
  92080. /***/ }),
  92081. /* 407 */
  92082. /***/ (function(module, exports, __webpack_require__) {
  92083. "use strict";
  92084. var __WEBPACK_AMD_DEFINE_RESULT__;
  92085. (function (main) {
  92086. 'use strict';
  92087. var fecha = {};
  92088. var token = /d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
  92089. var twoDigits = /\d\d?/;
  92090. var threeDigits = /\d{3}/;
  92091. var fourDigits = /\d{4}/;
  92092. var word = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
  92093. var noop = function noop() {};
  92094. function shorten(arr, sLen) {
  92095. var newArr = [];
  92096. for (var i = 0, len = arr.length; i < len; i++) {
  92097. newArr.push(arr[i].substr(0, sLen));
  92098. }
  92099. return newArr;
  92100. }
  92101. function monthUpdate(arrName) {
  92102. return function (d, v, i18n) {
  92103. var index = i18n[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());
  92104. if (~index) {
  92105. d.month = index;
  92106. }
  92107. };
  92108. }
  92109. function pad(val, len) {
  92110. val = String(val);
  92111. len = len || 2;
  92112. while (val.length < len) {
  92113. val = '0' + val;
  92114. }
  92115. return val;
  92116. }
  92117. var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
  92118. var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  92119. var monthNamesShort = shorten(monthNames, 3);
  92120. var dayNamesShort = shorten(dayNames, 3);
  92121. fecha.i18n = {
  92122. dayNamesShort: dayNamesShort,
  92123. dayNames: dayNames,
  92124. monthNamesShort: monthNamesShort,
  92125. monthNames: monthNames,
  92126. amPm: ['am', 'pm'],
  92127. DoFn: function DoFn(D) {
  92128. return D + ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];
  92129. }
  92130. };
  92131. var formatFlags = {
  92132. D: function D(dateObj) {
  92133. return dateObj.getDay();
  92134. },
  92135. DD: function DD(dateObj) {
  92136. return pad(dateObj.getDay());
  92137. },
  92138. Do: function Do(dateObj, i18n) {
  92139. return i18n.DoFn(dateObj.getDate());
  92140. },
  92141. d: function d(dateObj) {
  92142. return dateObj.getDate();
  92143. },
  92144. dd: function dd(dateObj) {
  92145. return pad(dateObj.getDate());
  92146. },
  92147. ddd: function ddd(dateObj, i18n) {
  92148. return i18n.dayNamesShort[dateObj.getDay()];
  92149. },
  92150. dddd: function dddd(dateObj, i18n) {
  92151. return i18n.dayNames[dateObj.getDay()];
  92152. },
  92153. M: function M(dateObj) {
  92154. return dateObj.getMonth() + 1;
  92155. },
  92156. MM: function MM(dateObj) {
  92157. return pad(dateObj.getMonth() + 1);
  92158. },
  92159. MMM: function MMM(dateObj, i18n) {
  92160. return i18n.monthNamesShort[dateObj.getMonth()];
  92161. },
  92162. MMMM: function MMMM(dateObj, i18n) {
  92163. return i18n.monthNames[dateObj.getMonth()];
  92164. },
  92165. yy: function yy(dateObj) {
  92166. return String(dateObj.getFullYear()).substr(2);
  92167. },
  92168. yyyy: function yyyy(dateObj) {
  92169. return dateObj.getFullYear();
  92170. },
  92171. h: function h(dateObj) {
  92172. return dateObj.getHours() % 12 || 12;
  92173. },
  92174. hh: function hh(dateObj) {
  92175. return pad(dateObj.getHours() % 12 || 12);
  92176. },
  92177. H: function H(dateObj) {
  92178. return dateObj.getHours();
  92179. },
  92180. HH: function HH(dateObj) {
  92181. return pad(dateObj.getHours());
  92182. },
  92183. m: function m(dateObj) {
  92184. return dateObj.getMinutes();
  92185. },
  92186. mm: function mm(dateObj) {
  92187. return pad(dateObj.getMinutes());
  92188. },
  92189. s: function s(dateObj) {
  92190. return dateObj.getSeconds();
  92191. },
  92192. ss: function ss(dateObj) {
  92193. return pad(dateObj.getSeconds());
  92194. },
  92195. S: function S(dateObj) {
  92196. return Math.round(dateObj.getMilliseconds() / 100);
  92197. },
  92198. SS: function SS(dateObj) {
  92199. return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
  92200. },
  92201. SSS: function SSS(dateObj) {
  92202. return pad(dateObj.getMilliseconds(), 3);
  92203. },
  92204. a: function a(dateObj, i18n) {
  92205. return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];
  92206. },
  92207. A: function A(dateObj, i18n) {
  92208. return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase();
  92209. },
  92210. ZZ: function ZZ(dateObj) {
  92211. var o = dateObj.getTimezoneOffset();
  92212. return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);
  92213. }
  92214. };
  92215. var parseFlags = {
  92216. d: [twoDigits, function (d, v) {
  92217. d.day = v;
  92218. }],
  92219. M: [twoDigits, function (d, v) {
  92220. d.month = v - 1;
  92221. }],
  92222. yy: [twoDigits, function (d, v) {
  92223. var da = new Date(),
  92224. cent = +('' + da.getFullYear()).substr(0, 2);
  92225. d.year = '' + (v > 68 ? cent - 1 : cent) + v;
  92226. }],
  92227. h: [twoDigits, function (d, v) {
  92228. d.hour = v;
  92229. }],
  92230. m: [twoDigits, function (d, v) {
  92231. d.minute = v;
  92232. }],
  92233. s: [twoDigits, function (d, v) {
  92234. d.second = v;
  92235. }],
  92236. yyyy: [fourDigits, function (d, v) {
  92237. d.year = v;
  92238. }],
  92239. S: [/\d/, function (d, v) {
  92240. d.millisecond = v * 100;
  92241. }],
  92242. SS: [/\d{2}/, function (d, v) {
  92243. d.millisecond = v * 10;
  92244. }],
  92245. SSS: [threeDigits, function (d, v) {
  92246. d.millisecond = v;
  92247. }],
  92248. D: [twoDigits, noop],
  92249. ddd: [word, noop],
  92250. MMM: [word, monthUpdate('monthNamesShort')],
  92251. MMMM: [word, monthUpdate('monthNames')],
  92252. a: [word, function (d, v, i18n) {
  92253. var val = v.toLowerCase();
  92254. if (val === i18n.amPm[0]) {
  92255. d.isPm = false;
  92256. } else if (val === i18n.amPm[1]) {
  92257. d.isPm = true;
  92258. }
  92259. }],
  92260. ZZ: [/[\+\-]\d\d:?\d\d/, function (d, v) {
  92261. var parts = (v + '').match(/([\+\-]|\d\d)/gi),
  92262. minutes;
  92263. if (parts) {
  92264. minutes = +(parts[1] * 60) + parseInt(parts[2], 10);
  92265. d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;
  92266. }
  92267. }]
  92268. };
  92269. parseFlags.DD = parseFlags.DD;
  92270. parseFlags.dddd = parseFlags.ddd;
  92271. parseFlags.Do = parseFlags.dd = parseFlags.d;
  92272. parseFlags.mm = parseFlags.m;
  92273. parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;
  92274. parseFlags.MM = parseFlags.M;
  92275. parseFlags.ss = parseFlags.s;
  92276. parseFlags.A = parseFlags.a;
  92277. fecha.masks = {
  92278. 'default': 'ddd MMM dd yyyy HH:mm:ss',
  92279. shortDate: 'M/D/yy',
  92280. mediumDate: 'MMM d, yyyy',
  92281. longDate: 'MMMM d, yyyy',
  92282. fullDate: 'dddd, MMMM d, yyyy',
  92283. shortTime: 'HH:mm',
  92284. mediumTime: 'HH:mm:ss',
  92285. longTime: 'HH:mm:ss.SSS'
  92286. };
  92287. fecha.format = function (dateObj, mask, i18nSettings) {
  92288. var i18n = i18nSettings || fecha.i18n;
  92289. if (typeof dateObj === 'number') {
  92290. dateObj = new Date(dateObj);
  92291. }
  92292. if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {
  92293. throw new Error('Invalid Date in fecha.format');
  92294. }
  92295. mask = fecha.masks[mask] || mask || fecha.masks['default'];
  92296. return mask.replace(token, function ($0) {
  92297. return $0 in formatFlags ? formatFlags[$0](dateObj, i18n) : $0.slice(1, $0.length - 1);
  92298. });
  92299. };
  92300. fecha.parse = function (dateStr, format, i18nSettings) {
  92301. var i18n = i18nSettings || fecha.i18n;
  92302. if (typeof format !== 'string') {
  92303. throw new Error('Invalid format in fecha.parse');
  92304. }
  92305. format = fecha.masks[format] || format;
  92306. if (dateStr.length > 1000) {
  92307. return false;
  92308. }
  92309. var isValid = true;
  92310. var dateInfo = {};
  92311. format.replace(token, function ($0) {
  92312. if (parseFlags[$0]) {
  92313. var info = parseFlags[$0];
  92314. var index = dateStr.search(info[0]);
  92315. if (!~index) {
  92316. isValid = false;
  92317. } else {
  92318. dateStr.replace(info[0], function (result) {
  92319. info[1](dateInfo, result, i18n);
  92320. dateStr = dateStr.substr(index + result.length);
  92321. return result;
  92322. });
  92323. }
  92324. }
  92325. return parseFlags[$0] ? '' : $0.slice(1, $0.length - 1);
  92326. });
  92327. if (!isValid) {
  92328. return false;
  92329. }
  92330. var today = new Date();
  92331. if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {
  92332. dateInfo.hour = +dateInfo.hour + 12;
  92333. } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {
  92334. dateInfo.hour = 0;
  92335. }
  92336. var date;
  92337. if (dateInfo.timezoneOffset != null) {
  92338. dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;
  92339. date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));
  92340. } else {
  92341. date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);
  92342. }
  92343. return date;
  92344. };
  92345. if (typeof module !== 'undefined' && module.exports) {
  92346. module.exports = fecha;
  92347. } else if (true) {
  92348. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  92349. return fecha;
  92350. }).call(exports, __webpack_require__, exports, module),
  92351. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  92352. } else {
  92353. main.fecha = fecha;
  92354. }
  92355. })(undefined);
  92356. /***/ }),
  92357. /* 408 */
  92358. /***/ (function(module, exports, __webpack_require__) {
  92359. "use strict";
  92360. Object.defineProperty(exports, "__esModule", {
  92361. value: true
  92362. });
  92363. var render = function render() {
  92364. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "click-outside", rawName: "v-click-outside:[capture].mousedown", value: _vm.handleClose, expression: "handleClose", arg: _vm.capture, modifiers: { "mousedown": true } }, { name: "click-outside", rawName: "v-click-outside:[capture].touchstart", value: _vm.handleClose, expression: "handleClose", arg: _vm.capture, modifiers: { "touchstart": true } }, { name: "click-outside", rawName: "v-click-outside:[capture]", value: _vm.handleClose, expression: "handleClose", arg: _vm.capture }], class: _vm.wrapperClasses }, [_c('div', { ref: "reference", class: [_vm.prefixCls + '-rel'] }, [_vm._t("default", [_c('i-input', { key: _vm.forceInputRerender, ref: "input", class: [_vm.prefixCls + '-editor'], attrs: { "element-id": _vm.elementId, "readonly": !_vm.editable || _vm.readonly, "disabled": _vm.itemDisabled, "size": _vm.size, "placeholder": _vm.placeholder, "value": _vm.visualValue, "name": _vm.name }, on: { "on-input-change": _vm.handleInputChange, "on-focus": _vm.handleFocus, "on-blur": _vm.handleBlur }, nativeOn: { "click": function click($event) {
  92365. return _vm.handleFocus($event);
  92366. }, "keydown": function keydown($event) {
  92367. return _vm.handleKeydown($event);
  92368. }, "mouseenter": function mouseenter($event) {
  92369. return _vm.handleInputMouseenter($event);
  92370. }, "mouseleave": function mouseleave($event) {
  92371. return _vm.handleInputMouseleave($event);
  92372. } } }, [_c('Icon', { attrs: { "slot": "suffix", "type": _vm.arrowType, "custom": _vm.customArrowType, "size": _vm.arrowSize }, on: { "click": _vm.handleIconClick }, slot: "suffix" })], 1)])], 2), _vm._v(" "), _c('transition', { attrs: { "name": "transition-drop" } }, [_c('Drop', { directives: [{ name: "show", rawName: "v-show", value: _vm.opened, expression: "opened" }, { name: "transfer-dom", rawName: "v-transfer-dom" }], ref: "drop", class: _vm.dropdownCls, attrs: { "placement": _vm.placement, "eventsEnabled": _vm.eventsEnabled, "data-transfer": _vm.transfer, "transfer": _vm.transfer }, nativeOn: { "click": function click($event) {
  92373. return _vm.handleTransferClick($event);
  92374. } } }, [_c('div', [_c(_vm.panel, _vm._b({ ref: "pickerPanel", tag: "component", attrs: { "visible": _vm.visible, "showTime": _vm.type === 'datetime' || _vm.type === 'datetimerange', "confirm": _vm.isConfirm, "selectionMode": _vm.selectionMode, "steps": _vm.steps, "format": _vm.format, "value": _vm.internalValue, "start-date": _vm.startDate, "split-panels": _vm.splitPanels, "show-week-numbers": _vm.showWeekNumbers, "picker-type": _vm.type, "multiple": _vm.multiple, "focused-date": _vm.focusedDate, "time-picker-options": _vm.timePickerOptions }, on: { "on-pick": _vm.onPick, "on-pick-clear": _vm.handleClear, "on-pick-success": _vm.onPickSuccess, "on-pick-click": function onPickClick($event) {
  92375. _vm.disableClickOutSide = true;
  92376. }, "on-selection-mode-change": _vm.onSelectionModeChange } }, 'component', _vm.ownPickerProps, false))], 1)])], 1)], 1);
  92377. };
  92378. var staticRenderFns = [];
  92379. exports.render = render;
  92380. exports.staticRenderFns = staticRenderFns;
  92381. /***/ }),
  92382. /* 409 */
  92383. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  92384. "use strict";
  92385. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  92386. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue__ = __webpack_require__(159);
  92387. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue__);
  92388. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  92389. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6c43856e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__ = __webpack_require__(421);
  92390. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6c43856e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6c43856e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__);
  92391. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  92392. /* script */
  92393. /* template */
  92394. /* template functional */
  92395. var __vue_template_functional__ = false
  92396. /* styles */
  92397. var __vue_styles__ = null
  92398. /* scopeId */
  92399. var __vue_scopeId__ = null
  92400. /* moduleIdentifier (server only) */
  92401. var __vue_module_identifier__ = null
  92402. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  92403. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_vue___default.a,
  92404. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6c43856e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__["render"],
  92405. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6c43856e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_vue__["staticRenderFns"],
  92406. __vue_template_functional__,
  92407. __vue_styles__,
  92408. __vue_scopeId__,
  92409. __vue_module_identifier__
  92410. )
  92411. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  92412. /***/ }),
  92413. /* 410 */
  92414. /***/ (function(module, exports, __webpack_require__) {
  92415. module.exports = {
  92416. Generator: __webpack_require__(411),
  92417. addLabels: __webpack_require__(412)
  92418. }
  92419. /***/ }),
  92420. /* 411 */
  92421. /***/ (function(module, exports) {
  92422. // calendar with 8 column x 7 rows
  92423. var oneDay = 1000 * 60 * 60 * 24;
  92424. function daysInMonth(year, month) {
  92425. return new Date(year, month + 1, 0).getDate();
  92426. }
  92427. function getYear(year, month, weekNr){
  92428. if (month === 0 && weekNr > 50) return year - 1;
  92429. else if(month === 11 && weekNr < 10) return year + 1;
  92430. else return year;
  92431. }
  92432. function getDateInfo(y, m, d, iso) {
  92433. if (m > 11){
  92434. m = 0;
  92435. y++;
  92436. }
  92437. var currentDay = new Date(y, m, d);
  92438. if (iso) currentDay.setDate(currentDay.getDate() + 4 - (currentDay.getDay() || 7));
  92439. var year = iso ? currentDay.getFullYear() : y;
  92440. var firstOfJanuary = new Date(year, 0, 1);
  92441. var numberOfDays = 1 + Math.round((currentDay - firstOfJanuary) / oneDay);
  92442. if (!iso) numberOfDays += firstOfJanuary.getDay();
  92443. var w = Math.ceil(numberOfDays / 7);
  92444. if (!iso) {
  92445. var initialDay = new Date(y, m, d);
  92446. var beginOfNextYear = new Date(y + 1, 0, 1);
  92447. var startDayOfNextYear = beginOfNextYear.getDay();
  92448. if (initialDay.getTime() >= beginOfNextYear.getTime() - (oneDay * startDayOfNextYear)) w = 1;
  92449. }
  92450. return w;
  92451. }
  92452. function getMonthCalender(year, month, iteratorFns){
  92453. // config passed by binding
  92454. var lang = this.lang || 'en';
  92455. var onlyDays = this.onlyDays;
  92456. var weekStart = typeof this.weekStart === 'undefined' ? 1 : this.weekStart;
  92457. var iso = weekStart === 1;
  92458. var cells = [];
  92459. var monthStartDate = new Date(year, month, 1); // make a date object
  92460. var dayOfWeek = monthStartDate.getDay() || (iso ? 7 : 0); // month week day for day 1
  92461. var currentDay = weekStart - dayOfWeek; // starting position of first day in the week
  92462. var weekNr = getDateInfo(year, month, 1, iso); // get week number of month start
  92463. var maxDays = daysInMonth(year, month); // total days in current month
  92464. var lastMonthMaxDays = daysInMonth(year, month - 1);
  92465. var currentMonth, day, dayBefore;
  92466. var currentYear = getYear(year, month, weekNr);
  92467. var returnObject = {
  92468. month: month,
  92469. year: year,
  92470. daysInMonth: maxDays
  92471. };
  92472. for (var i = 0; i < 7; i++){ // 7 rows in the calendar
  92473. dayBefore = currentDay;
  92474. for (var j = 0; j < 8; j++){ // 8 columns: week nr + 7 days p/ week
  92475. if (i > 0 && j > 0) currentDay++; // not first row, not week nr column
  92476. if (currentDay > maxDays || currentDay < 1){ // day belongs to sibling month
  92477. // calculate day in sibling month
  92478. day = currentDay > maxDays ? currentDay - maxDays : lastMonthMaxDays + currentDay;
  92479. currentMonth = currentDay > maxDays ? month + 1 : month - 1;
  92480. } else {
  92481. day = currentDay;
  92482. currentMonth = month;
  92483. }
  92484. var type = (function(){
  92485. if (j === 0) return 'weekLabel';
  92486. else if (i === 0) return 'dayLabel';
  92487. else if (currentDay < 1) return 'prevMonth';
  92488. else if (currentDay > maxDays) return 'nextMonth';
  92489. else return 'monthDay';
  92490. })();
  92491. var isDay = dayBefore !== currentDay && i > 0;
  92492. var dayData = {
  92493. desc: isDay ? day : weekNr,
  92494. week: weekNr,
  92495. type: type,
  92496. format: iso ? 'ISO 8601' : 'US',
  92497. date: isDay ? new Date(Date.UTC(year, currentMonth, day)) : false,
  92498. year: currentYear,
  92499. index: cells.length
  92500. };
  92501. if (iteratorFns){
  92502. if (typeof iteratorFns === "function") dayData = iteratorFns.call(returnObject, dayData, lang);
  92503. else iteratorFns.forEach(function(fn){
  92504. dayData = fn.call(returnObject, dayData, lang);
  92505. });
  92506. }
  92507. if (onlyDays && isDay) cells.push(dayData); // add only days
  92508. else if (!onlyDays) cells.push(dayData); // add also week numbers and labels
  92509. }
  92510. if (i > 0) weekNr = getDateInfo(year, currentMonth, day + 1, iso);
  92511. currentYear = getYear(year, month, weekNr);
  92512. }
  92513. returnObject.cells = cells;
  92514. return returnObject;
  92515. }
  92516. module.exports = function (config){
  92517. return getMonthCalender.bind(config);
  92518. }
  92519. /***/ }),
  92520. /* 412 */
  92521. /***/ (function(module, exports, __webpack_require__) {
  92522. // calendar with 8 column x 7 rows
  92523. var labels = __webpack_require__(413);
  92524. function isIterable(variable){
  92525. if (variable == null) return false;
  92526. if (variable.constructor === Array) return true;
  92527. if (variable.constructor === Object) return true;
  92528. return false;
  92529. }
  92530. function merge(_new, _old){
  92531. for (var prop in _new){
  92532. if (!_old[prop]) _old[prop] = _new[prop];
  92533. else if (isIterable(_new[prop])) merge(_new[prop], _old[prop]);
  92534. }
  92535. }
  92536. function addLabels(dayObject, lang){
  92537. var cssClass = [labels.classes[dayObject.type]];
  92538. if (dayObject.class) dayObject.class = (typeof dayObject.class == 'string' ? [dayObject.class] : dayObject.class).concat(cssClass);
  92539. else dayObject.class = cssClass;
  92540. if (dayObject.type.indexOf('Label') > 0){
  92541. if (dayObject.index == 0 && labels.weekPlaceholder) dayObject.desc = labels.weekPlaceholder;
  92542. else if (dayObject.index < 8) dayObject.desc = labels.columnNames[lang][dayObject.index];
  92543. else if (dayObject.index % 8 == 0) dayObject.desc = dayObject.week;
  92544. }
  92545. if (dayObject.date) dayObject.monthName = labels.monthNames[lang][dayObject.date.getMonth()];
  92546. if (!this.monthName) this.monthName = labels.monthNames[lang][this.month];
  92547. if (!this.labels) this.labels = {
  92548. monthNames: labels.monthNames[lang],
  92549. columnNames: labels.columnNames[lang],
  92550. classes: labels.classes
  92551. }
  92552. return dayObject;
  92553. }
  92554. addLabels.setLabels = function(newOptions){
  92555. merge(newOptions, labels);
  92556. };
  92557. module.exports = addLabels;
  92558. /***/ }),
  92559. /* 413 */
  92560. /***/ (function(module, exports) {
  92561. module.exports = {
  92562. weekPlaceholder: '',
  92563. columnNames: {
  92564. en: {
  92565. 0: 'w',
  92566. 1: 'monday',
  92567. 2: 'tuesday',
  92568. 3: 'wednesday',
  92569. 4: 'thursday',
  92570. 5: 'friday',
  92571. 6: 'saturday',
  92572. 7: 'sunday'
  92573. },
  92574. sv: {
  92575. 0: 'v',
  92576. 1: 'måndag',
  92577. 2: 'tisdag',
  92578. 3: 'onsdag',
  92579. 4: 'torsdag',
  92580. 5: 'fredag',
  92581. 6: 'lördag',
  92582. 7: 'söndag'
  92583. },
  92584. pt: {
  92585. 0: 's',
  92586. 1: 'segunda',
  92587. 2: 'terça',
  92588. 3: 'quarta',
  92589. 4: 'quinta',
  92590. 5: 'sexta',
  92591. 6: 'sábado',
  92592. 7: 'domingo'
  92593. }
  92594. },
  92595. monthNames: {
  92596. en: [
  92597. "January",
  92598. "February",
  92599. "March",
  92600. "April",
  92601. "May",
  92602. "June",
  92603. "July",
  92604. "August",
  92605. "September",
  92606. "October",
  92607. "November",
  92608. "December"
  92609. ],
  92610. sv: [
  92611. "januari",
  92612. "februari",
  92613. "mars",
  92614. "april",
  92615. "maj",
  92616. "juni",
  92617. "juli",
  92618. "augusti",
  92619. "september",
  92620. "oktober",
  92621. "november",
  92622. "december"
  92623. ],
  92624. pt: [
  92625. "Janeiro",
  92626. "Fevereiro",
  92627. "Março",
  92628. "Abril",
  92629. "Maio",
  92630. "Junho",
  92631. "Julho",
  92632. "Agosto",
  92633. "Setembro",
  92634. "Outubro",
  92635. "Novembro",
  92636. "Dezembro"
  92637. ]
  92638. },
  92639. classes: {
  92640. dayLabel: 'day-of-week',
  92641. weekLabel: 'week-number',
  92642. prevMonth: 'inactive',
  92643. nextMonth: 'inactive',
  92644. monthDay: 'day-in-month'
  92645. }
  92646. };
  92647. /***/ }),
  92648. /* 414 */
  92649. /***/ (function(module, exports, __webpack_require__) {
  92650. "use strict";
  92651. Object.defineProperty(exports, "__esModule", {
  92652. value: true
  92653. });
  92654. var render = function render() {
  92655. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_c('div', { class: [_vm.prefixCls + '-header'] }, _vm._l(_vm.headerDays, function (day) {
  92656. return _c('span', { key: day }, [_vm._v("\n " + _vm._s(day) + "\n ")]);
  92657. }), 0), _vm._v(" "), _vm._l(_vm.cells, function (cell, i) {
  92658. return _c('span', { key: String(cell.date) + i, class: _vm.getCellCls(cell), on: { "click": function click($event) {
  92659. return _vm.handleClick(cell, $event);
  92660. }, "mouseenter": function mouseenter($event) {
  92661. return _vm.handleMouseMove(cell);
  92662. } } }, [_c('em', [_vm._v(_vm._s(cell.desc))])]);
  92663. })], 2);
  92664. };
  92665. var staticRenderFns = [];
  92666. exports.render = render;
  92667. exports.staticRenderFns = staticRenderFns;
  92668. /***/ }),
  92669. /* 415 */
  92670. /***/ (function(module, exports, __webpack_require__) {
  92671. "use strict";
  92672. Object.defineProperty(exports, "__esModule", {
  92673. value: true
  92674. });
  92675. var render = function render() {
  92676. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, _vm._l(_vm.cells, function (cell) {
  92677. return _c('span', { class: _vm.getCellCls(cell), on: { "click": function click($event) {
  92678. return _vm.handleClick(cell, $event);
  92679. }, "mouseenter": function mouseenter($event) {
  92680. return _vm.handleMouseMove(cell);
  92681. } } }, [_c('em', [_vm._v(_vm._s(cell.date.getFullYear()))])]);
  92682. }), 0);
  92683. };
  92684. var staticRenderFns = [];
  92685. exports.render = render;
  92686. exports.staticRenderFns = staticRenderFns;
  92687. /***/ }),
  92688. /* 416 */
  92689. /***/ (function(module, exports, __webpack_require__) {
  92690. "use strict";
  92691. Object.defineProperty(exports, "__esModule", {
  92692. value: true
  92693. });
  92694. var render = function render() {
  92695. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, _vm._l(_vm.cells, function (cell) {
  92696. return _c('span', { class: _vm.getCellCls(cell), on: { "click": function click($event) {
  92697. return _vm.handleClick(cell, $event);
  92698. }, "mouseenter": function mouseenter($event) {
  92699. return _vm.handleMouseMove(cell);
  92700. } } }, [_c('em', [_vm._v(_vm._s(cell.text))])]);
  92701. }), 0);
  92702. };
  92703. var staticRenderFns = [];
  92704. exports.render = render;
  92705. exports.staticRenderFns = staticRenderFns;
  92706. /***/ }),
  92707. /* 417 */
  92708. /***/ (function(module, exports, __webpack_require__) {
  92709. "use strict";
  92710. Object.defineProperty(exports, "__esModule", {
  92711. value: true
  92712. });
  92713. var render = function render() {
  92714. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_c('div', { ref: "hours", class: [_vm.prefixCls + '-list'] }, [_c('ul', { class: [_vm.prefixCls + '-ul'] }, _vm._l(_vm.hoursList, function (item) {
  92715. return _c('li', { directives: [{ name: "show", rawName: "v-show", value: !item.hide, expression: "!item.hide" }], class: _vm.getCellCls(item), on: { "click": function click($event) {
  92716. return _vm.handleClick('hours', item);
  92717. } } }, [_vm._v(_vm._s(_vm.formatTime(item.text)))]);
  92718. }), 0)]), _vm._v(" "), _c('div', { ref: "minutes", class: [_vm.prefixCls + '-list'] }, [_c('ul', { class: [_vm.prefixCls + '-ul'] }, _vm._l(_vm.minutesList, function (item) {
  92719. return _c('li', { directives: [{ name: "show", rawName: "v-show", value: !item.hide, expression: "!item.hide" }], class: _vm.getCellCls(item), on: { "click": function click($event) {
  92720. return _vm.handleClick('minutes', item);
  92721. } } }, [_vm._v(_vm._s(_vm.formatTime(item.text)))]);
  92722. }), 0)]), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.showSeconds, expression: "showSeconds" }], ref: "seconds", class: [_vm.prefixCls + '-list'] }, [_c('ul', { class: [_vm.prefixCls + '-ul'] }, _vm._l(_vm.secondsList, function (item) {
  92723. return _c('li', { directives: [{ name: "show", rawName: "v-show", value: !item.hide, expression: "!item.hide" }], class: _vm.getCellCls(item), on: { "click": function click($event) {
  92724. return _vm.handleClick('seconds', item);
  92725. } } }, [_vm._v(_vm._s(_vm.formatTime(item.text)))]);
  92726. }), 0)])]);
  92727. };
  92728. var staticRenderFns = [];
  92729. exports.render = render;
  92730. exports.staticRenderFns = staticRenderFns;
  92731. /***/ }),
  92732. /* 418 */
  92733. /***/ (function(module, exports, __webpack_require__) {
  92734. "use strict";
  92735. Object.defineProperty(exports, "__esModule", {
  92736. value: true
  92737. });
  92738. var render = function render() {
  92739. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: [_vm.prefixCls + '-confirm'], on: { "!keydown": function keydown($event) {
  92740. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "tab", 9, $event.key, "Tab")) {
  92741. return null;
  92742. }return _vm.handleTab($event);
  92743. } } }, [_vm.showTime ? _c('i-button', { class: _vm.timeClasses, attrs: { "size": "small", "type": "text", "disabled": _vm.timeDisabled }, on: { "click": _vm.handleToggleTime } }, [_vm._v("\n " + _vm._s(_vm.labels.time) + "\n ")]) : _vm._e(), _vm._v(" "), _c('i-button', { attrs: { "size": "small" }, nativeOn: { "click": function click($event) {
  92744. return _vm.handleClear($event);
  92745. }, "keydown": function keydown($event) {
  92746. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
  92747. return null;
  92748. }return _vm.handleClear($event);
  92749. } } }, [_vm._v("\n " + _vm._s(_vm.labels.clear) + "\n ")]), _vm._v(" "), _c('i-button', { attrs: { "size": "small", "type": "primary" }, nativeOn: { "click": function click($event) {
  92750. return _vm.handleSuccess($event);
  92751. }, "keydown": function keydown($event) {
  92752. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
  92753. return null;
  92754. }return _vm.handleSuccess($event);
  92755. } } }, [_vm._v("\n " + _vm._s(_vm.labels.ok) + "\n ")])], 1);
  92756. };
  92757. var staticRenderFns = [];
  92758. exports.render = render;
  92759. exports.staticRenderFns = staticRenderFns;
  92760. /***/ }),
  92761. /* 419 */
  92762. /***/ (function(module, exports, __webpack_require__) {
  92763. "use strict";
  92764. Object.defineProperty(exports, "__esModule", {
  92765. value: true
  92766. });
  92767. var render = function render() {
  92768. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: [_vm.prefixCls + '-body-wrapper'], on: { "mousedown": function mousedown($event) {
  92769. $event.preventDefault();
  92770. } } }, [_c('div', { class: [_vm.prefixCls + '-body'] }, [_vm.showDate ? _c('div', { class: [_vm.timePrefixCls + '-header'] }, [_vm._v(_vm._s(_vm.visibleDate))]) : _vm._e(), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-content'] }, [_c('time-spinner', { ref: "timeSpinner", attrs: { "show-seconds": _vm.showSeconds, "steps": _vm.steps, "hours": _vm.timeSlots[0], "minutes": _vm.timeSlots[1], "seconds": _vm.timeSlots[2], "disabled-hours": _vm.disabledHMS.disabledHours, "disabled-minutes": _vm.disabledHMS.disabledMinutes, "disabled-seconds": _vm.disabledHMS.disabledSeconds, "hide-disabled-options": _vm.hideDisabledOptions }, on: { "on-change": _vm.handleChange, "on-pick-click": _vm.handlePickClick } })], 1), _vm._v(" "), _vm.confirm ? _c('Confirm', { on: { "on-pick-clear": _vm.handlePickClear, "on-pick-success": _vm.handlePickSuccess } }) : _vm._e()], 1)]);
  92771. };
  92772. var staticRenderFns = [];
  92773. exports.render = render;
  92774. exports.staticRenderFns = staticRenderFns;
  92775. /***/ }),
  92776. /* 420 */
  92777. /***/ (function(module, exports, __webpack_require__) {
  92778. "use strict";
  92779. Object.defineProperty(exports, "__esModule", {
  92780. value: true
  92781. });
  92782. var render = function render() {
  92783. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('span', [_vm.datePanelLabel ? _c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.datePanelLabel.labels[0].type === 'year' || _vm.currentView === 'date', expression: "datePanelLabel.labels[0].type === 'year' || currentView === 'date'" }], class: [_vm.datePrefixCls + '-header-label'], on: { "click": _vm.datePanelLabel.labels[0].handler } }, [_vm._v(_vm._s(_vm.datePanelLabel.labels[0].label))]) : _vm._e(), _vm._v(" "), _vm.datePanelLabel && _vm.currentView === 'date' ? [_vm._v(_vm._s(_vm.datePanelLabel.separator))] : _vm._e(), _vm._v(" "), _vm.datePanelLabel ? _c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.datePanelLabel.labels[1].type === 'year' || _vm.currentView === 'date', expression: "datePanelLabel.labels[1].type === 'year' || currentView === 'date'" }], class: [_vm.datePrefixCls + '-header-label'], on: { "click": _vm.datePanelLabel.labels[1].handler } }, [_vm._v(_vm._s(_vm.datePanelLabel.labels[1].label))]) : _vm._e()], 2);
  92784. };
  92785. var staticRenderFns = [];
  92786. exports.render = render;
  92787. exports.staticRenderFns = staticRenderFns;
  92788. /***/ }),
  92789. /* 421 */
  92790. /***/ (function(module, exports, __webpack_require__) {
  92791. "use strict";
  92792. Object.defineProperty(exports, "__esModule", {
  92793. value: true
  92794. });
  92795. var render = function render() {
  92796. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes, on: { "mousedown": function mousedown($event) {
  92797. $event.preventDefault();
  92798. } } }, [_vm.shortcuts.length ? _c('div', { class: [_vm.prefixCls + '-sidebar'] }, _vm._l(_vm.shortcuts, function (shortcut) {
  92799. return _c('div', { class: [_vm.prefixCls + '-shortcut'], on: { "click": function click($event) {
  92800. return _vm.handleShortcutClick(shortcut);
  92801. } } }, [_vm._v(_vm._s(shortcut.text))]);
  92802. }), 0) : _vm._e(), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-body'] }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentView !== 'time', expression: "currentView !== 'time'" }], class: [_vm.datePrefixCls + '-header'] }, [_c('span', { class: _vm.iconBtnCls('prev', '-double'), on: { "click": function click($event) {
  92803. return _vm.changeYear(-1);
  92804. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-back" } })], 1), _vm._v(" "), _vm.pickerTable === 'date-table' ? _c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentView === 'date', expression: "currentView === 'date'" }], class: _vm.iconBtnCls('prev'), on: { "click": function click($event) {
  92805. return _vm.changeMonth(-1);
  92806. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-back" } })], 1) : _vm._e(), _vm._v(" "), _c('date-panel-label', { attrs: { "date-panel-label": _vm.datePanelLabel, "current-view": _vm.pickerTable.split('-').shift(), "date-prefix-cls": _vm.datePrefixCls } }), _vm._v(" "), _c('span', { class: _vm.iconBtnCls('next', '-double'), on: { "click": function click($event) {
  92807. return _vm.changeYear(+1);
  92808. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1), _vm._v(" "), _vm.pickerTable === 'date-table' ? _c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentView === 'date', expression: "currentView === 'date'" }], class: _vm.iconBtnCls('next'), on: { "click": function click($event) {
  92809. return _vm.changeMonth(+1);
  92810. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1) : _vm._e()], 1), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-content'] }, [_vm.currentView !== 'time' ? _c(_vm.pickerTable, { ref: "pickerTable", tag: "component", attrs: { "table-date": _vm.panelDate, "show-week-numbers": _vm.showWeekNumbers, "value": _vm.dates, "selection-mode": _vm.selectionMode, "disabled-date": _vm.disabledDate, "focused-date": _vm.focusedDate }, on: { "on-pick": _vm.panelPickerHandlers, "on-pick-click": _vm.handlePickClick } }) : _vm._e()], 1), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.isTime, expression: "isTime" }], class: [_vm.prefixCls + '-content'] }, [_vm.currentView === 'time' ? _c('time-picker', _vm._b({ ref: "timePicker", attrs: { "value": _vm.dates, "format": _vm.format, "time-disabled": _vm.timeDisabled, "disabled-date": _vm.disabledDate, "focused-date": _vm.focusedDate }, on: { "on-pick": _vm.handlePick, "on-pick-click": _vm.handlePickClick, "on-pick-clear": _vm.handlePickClear, "on-pick-success": _vm.handlePickSuccess, "on-pick-toggle-time": _vm.handleToggleTime } }, 'time-picker', _vm.timePickerOptions, false)) : _vm._e()], 1), _vm._v(" "), _vm.confirm ? _c('Confirm', { attrs: { "show-time": _vm.showTime, "is-time": _vm.isTime }, on: { "on-pick-toggle-time": _vm.handleToggleTime, "on-pick-clear": _vm.handlePickClear, "on-pick-success": _vm.handlePickSuccess } }) : _vm._e()], 1)]);
  92811. };
  92812. var staticRenderFns = [];
  92813. exports.render = render;
  92814. exports.staticRenderFns = staticRenderFns;
  92815. /***/ }),
  92816. /* 422 */
  92817. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  92818. "use strict";
  92819. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  92820. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_range_vue__ = __webpack_require__(174);
  92821. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_range_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_range_vue__);
  92822. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_range_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_range_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  92823. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_9beaae5e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_range_vue__ = __webpack_require__(424);
  92824. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_9beaae5e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_range_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_9beaae5e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_range_vue__);
  92825. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  92826. /* script */
  92827. /* template */
  92828. /* template functional */
  92829. var __vue_template_functional__ = false
  92830. /* styles */
  92831. var __vue_styles__ = null
  92832. /* scopeId */
  92833. var __vue_scopeId__ = null
  92834. /* moduleIdentifier (server only) */
  92835. var __vue_module_identifier__ = null
  92836. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  92837. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_date_range_vue___default.a,
  92838. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_9beaae5e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_range_vue__["render"],
  92839. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_9beaae5e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_date_range_vue__["staticRenderFns"],
  92840. __vue_template_functional__,
  92841. __vue_styles__,
  92842. __vue_scopeId__,
  92843. __vue_module_identifier__
  92844. )
  92845. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  92846. /***/ }),
  92847. /* 423 */
  92848. /***/ (function(module, exports, __webpack_require__) {
  92849. "use strict";
  92850. Object.defineProperty(exports, "__esModule", {
  92851. value: true
  92852. });
  92853. var render = function render() {
  92854. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes, on: { "mousedown": function mousedown($event) {
  92855. $event.preventDefault();
  92856. } } }, [_c('div', { class: [_vm.prefixCls + '-body'] }, [_c('div', { class: [_vm.prefixCls + '-content', _vm.prefixCls + '-content-left'] }, [_c('div', { class: [_vm.timePrefixCls + '-header'] }, [_vm.showDate ? [_vm._v(_vm._s(_vm.leftDatePanelLabel))] : [_vm._v(_vm._s(_vm.t('i.datepicker.startTime')))]], 2), _vm._v(" "), _c('time-spinner', { ref: "timeSpinner", attrs: { "steps": _vm.steps, "show-seconds": _vm.showSeconds, "hours": _vm.value[0] && _vm.dateStart.getHours(), "minutes": _vm.value[0] && _vm.dateStart.getMinutes(), "seconds": _vm.value[0] && _vm.dateStart.getSeconds(), "disabled-hours": _vm.disabledHours, "disabled-minutes": _vm.disabledMinutes, "disabled-seconds": _vm.disabledSeconds, "hide-disabled-options": _vm.hideDisabledOptions }, on: { "on-change": _vm.handleStartChange, "on-pick-click": _vm.handlePickClick } })], 1), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-content', _vm.prefixCls + '-content-right'] }, [_c('div', { class: [_vm.timePrefixCls + '-header'] }, [_vm.showDate ? [_vm._v(_vm._s(_vm.rightDatePanelLabel))] : [_vm._v(_vm._s(_vm.t('i.datepicker.endTime')))]], 2), _vm._v(" "), _c('time-spinner', { ref: "timeSpinnerEnd", attrs: { "steps": _vm.steps, "show-seconds": _vm.showSeconds, "hours": _vm.value[1] && _vm.dateEnd.getHours(), "minutes": _vm.value[1] && _vm.dateEnd.getMinutes(), "seconds": _vm.value[1] && _vm.dateEnd.getSeconds(), "disabled-hours": _vm.disabledHours, "disabled-minutes": _vm.disabledMinutes, "disabled-seconds": _vm.disabledSeconds, "hide-disabled-options": _vm.hideDisabledOptions }, on: { "on-change": _vm.handleEndChange, "on-pick-click": _vm.handlePickClick } })], 1), _vm._v(" "), _vm.confirm ? _c('Confirm', { on: { "on-pick-clear": _vm.handlePickClear, "on-pick-success": _vm.handlePickSuccess } }) : _vm._e()], 1)]);
  92857. };
  92858. var staticRenderFns = [];
  92859. exports.render = render;
  92860. exports.staticRenderFns = staticRenderFns;
  92861. /***/ }),
  92862. /* 424 */
  92863. /***/ (function(module, exports, __webpack_require__) {
  92864. "use strict";
  92865. Object.defineProperty(exports, "__esModule", {
  92866. value: true
  92867. });
  92868. var render = function render() {
  92869. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes, on: { "mousedown": function mousedown($event) {
  92870. $event.preventDefault();
  92871. } } }, [_vm.shortcuts.length ? _c('div', { class: [_vm.prefixCls + '-sidebar'] }, _vm._l(_vm.shortcuts, function (shortcut) {
  92872. return _c('div', { class: [_vm.prefixCls + '-shortcut'], on: { "click": function click($event) {
  92873. return _vm.handleShortcutClick(shortcut);
  92874. } } }, [_vm._v(_vm._s(shortcut.text))]);
  92875. }), 0) : _vm._e(), _vm._v(" "), _c('div', { class: _vm.panelBodyClasses }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: !_vm.isTime, expression: "!isTime" }], class: [_vm.prefixCls + '-content', _vm.prefixCls + '-content-left'] }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentView !== 'time', expression: "currentView !== 'time'" }], class: [_vm.datePrefixCls + '-header'] }, [_c('span', { class: _vm.iconBtnCls('prev', '-double'), on: { "click": function click($event) {
  92876. return _vm.prevYear('left');
  92877. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-back" } })], 1), _vm._v(" "), _vm.leftPickerTable === 'date-table' ? _c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentView === 'date', expression: "currentView === 'date'" }], class: _vm.iconBtnCls('prev'), on: { "click": function click($event) {
  92878. return _vm.prevMonth('left');
  92879. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-back" } })], 1) : _vm._e(), _vm._v(" "), _c('date-panel-label', { attrs: { "date-panel-label": _vm.leftDatePanelLabel, "current-view": _vm.leftDatePanelView, "date-prefix-cls": _vm.datePrefixCls } }), _vm._v(" "), _vm.splitPanels || _vm.leftPickerTable !== 'date-table' ? _c('span', { class: _vm.iconBtnCls('next', '-double'), on: { "click": function click($event) {
  92880. return _vm.nextYear('left');
  92881. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1) : _vm._e(), _vm._v(" "), _vm.splitPanels && _vm.leftPickerTable === 'date-table' ? _c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentView === 'date', expression: "currentView === 'date'" }], class: _vm.iconBtnCls('next'), on: { "click": function click($event) {
  92882. return _vm.nextMonth('left');
  92883. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1) : _vm._e()], 1), _vm._v(" "), _vm.currentView !== 'time' ? _c(_vm.leftPickerTable, { ref: "leftYearTable", tag: "component", attrs: { "table-date": _vm.leftPanelDate, "selection-mode": "range", "disabled-date": _vm.disabledDate, "range-state": _vm.rangeState, "show-week-numbers": _vm.showWeekNumbers, "value": _vm.preSelecting.left ? [_vm.dates[0]] : _vm.dates, "focused-date": _vm.focusedDate }, on: { "on-change-range": _vm.handleChangeRange, "on-pick": _vm.panelPickerHandlers.left, "on-pick-click": _vm.handlePickClick } }) : _vm._e()], 1), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: !_vm.isTime, expression: "!isTime" }], class: [_vm.prefixCls + '-content', _vm.prefixCls + '-content-right'] }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentView !== 'time', expression: "currentView !== 'time'" }], class: [_vm.datePrefixCls + '-header'] }, [_vm.splitPanels || _vm.rightPickerTable !== 'date-table' ? _c('span', { class: _vm.iconBtnCls('prev', '-double'), on: { "click": function click($event) {
  92884. return _vm.prevYear('right');
  92885. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-back" } })], 1) : _vm._e(), _vm._v(" "), _vm.splitPanels && _vm.rightPickerTable === 'date-table' ? _c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentView === 'date', expression: "currentView === 'date'" }], class: _vm.iconBtnCls('prev'), on: { "click": function click($event) {
  92886. return _vm.prevMonth('right');
  92887. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-back" } })], 1) : _vm._e(), _vm._v(" "), _c('date-panel-label', { attrs: { "date-panel-label": _vm.rightDatePanelLabel, "current-view": _vm.rightDatePanelView, "date-prefix-cls": _vm.datePrefixCls } }), _vm._v(" "), _c('span', { class: _vm.iconBtnCls('next', '-double'), on: { "click": function click($event) {
  92888. return _vm.nextYear('right');
  92889. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1), _vm._v(" "), _vm.rightPickerTable === 'date-table' ? _c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentView === 'date', expression: "currentView === 'date'" }], class: _vm.iconBtnCls('next'), on: { "click": function click($event) {
  92890. return _vm.nextMonth('right');
  92891. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1) : _vm._e()], 1), _vm._v(" "), _vm.currentView !== 'time' ? _c(_vm.rightPickerTable, { ref: "rightYearTable", tag: "component", attrs: { "table-date": _vm.rightPanelDate, "selection-mode": "range", "range-state": _vm.rangeState, "disabled-date": _vm.disabledDate, "show-week-numbers": _vm.showWeekNumbers, "value": _vm.preSelecting.right ? [_vm.dates[_vm.dates.length - 1]] : _vm.dates, "focused-date": _vm.focusedDate }, on: { "on-change-range": _vm.handleChangeRange, "on-pick": _vm.panelPickerHandlers.right, "on-pick-click": _vm.handlePickClick } }) : _vm._e()], 1), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.isTime, expression: "isTime" }], class: [_vm.prefixCls + '-content'] }, [_vm.currentView === 'time' ? _c('time-picker', _vm._b({ ref: "timePicker", attrs: { "value": _vm.dates, "format": _vm.format, "time-disabled": _vm.timeDisabled }, on: { "on-pick": _vm.handleRangePick, "on-pick-click": _vm.handlePickClick, "on-pick-clear": _vm.handlePickClear, "on-pick-success": _vm.handlePickSuccess, "on-pick-toggle-time": _vm.handleToggleTime } }, 'time-picker', _vm.timePickerOptions, false)) : _vm._e()], 1), _vm._v(" "), _vm.confirm ? _c('Confirm', { attrs: { "show-time": _vm.showTime, "is-time": _vm.isTime, "time-disabled": _vm.timeDisabled }, on: { "on-pick-toggle-time": _vm.handleToggleTime, "on-pick-clear": _vm.handlePickClear, "on-pick-success": _vm.handlePickSuccess } }) : _vm._e()], 1)]);
  92892. };
  92893. var staticRenderFns = [];
  92894. exports.render = render;
  92895. exports.staticRenderFns = staticRenderFns;
  92896. /***/ }),
  92897. /* 425 */
  92898. /***/ (function(module, exports, __webpack_require__) {
  92899. "use strict";
  92900. Object.defineProperty(exports, "__esModule", {
  92901. value: true
  92902. });
  92903. var _divider = __webpack_require__(426);
  92904. var _divider2 = _interopRequireDefault(_divider);
  92905. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  92906. exports.default = _divider2.default;
  92907. /***/ }),
  92908. /* 426 */
  92909. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  92910. "use strict";
  92911. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  92912. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_divider_vue__ = __webpack_require__(177);
  92913. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_divider_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_divider_vue__);
  92914. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_divider_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_divider_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  92915. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_79adba88_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_divider_vue__ = __webpack_require__(427);
  92916. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_79adba88_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_divider_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_79adba88_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_divider_vue__);
  92917. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  92918. /* script */
  92919. /* template */
  92920. /* template functional */
  92921. var __vue_template_functional__ = false
  92922. /* styles */
  92923. var __vue_styles__ = null
  92924. /* scopeId */
  92925. var __vue_scopeId__ = null
  92926. /* moduleIdentifier (server only) */
  92927. var __vue_module_identifier__ = null
  92928. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  92929. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_divider_vue___default.a,
  92930. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_79adba88_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_divider_vue__["render"],
  92931. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_79adba88_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_divider_vue__["staticRenderFns"],
  92932. __vue_template_functional__,
  92933. __vue_styles__,
  92934. __vue_scopeId__,
  92935. __vue_module_identifier__
  92936. )
  92937. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  92938. /***/ }),
  92939. /* 427 */
  92940. /***/ (function(module, exports, __webpack_require__) {
  92941. "use strict";
  92942. Object.defineProperty(exports, "__esModule", {
  92943. value: true
  92944. });
  92945. var render = function render() {
  92946. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_vm.hasSlot ? _c('span', { class: _vm.slotClasses }, [_vm._t("default")], 2) : _vm._e()]);
  92947. };
  92948. var staticRenderFns = [];
  92949. exports.render = render;
  92950. exports.staticRenderFns = staticRenderFns;
  92951. /***/ }),
  92952. /* 428 */
  92953. /***/ (function(module, exports, __webpack_require__) {
  92954. "use strict";
  92955. Object.defineProperty(exports, "__esModule", {
  92956. value: true
  92957. });
  92958. var _drawer = __webpack_require__(429);
  92959. var _drawer2 = _interopRequireDefault(_drawer);
  92960. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  92961. exports.default = _drawer2.default;
  92962. /***/ }),
  92963. /* 429 */
  92964. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  92965. "use strict";
  92966. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  92967. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_drawer_vue__ = __webpack_require__(178);
  92968. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_drawer_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_drawer_vue__);
  92969. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_drawer_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_drawer_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  92970. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_131de97c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_drawer_vue__ = __webpack_require__(430);
  92971. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_131de97c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_drawer_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_131de97c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_drawer_vue__);
  92972. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  92973. /* script */
  92974. /* template */
  92975. /* template functional */
  92976. var __vue_template_functional__ = false
  92977. /* styles */
  92978. var __vue_styles__ = null
  92979. /* scopeId */
  92980. var __vue_scopeId__ = null
  92981. /* moduleIdentifier (server only) */
  92982. var __vue_module_identifier__ = null
  92983. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  92984. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_drawer_vue___default.a,
  92985. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_131de97c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_drawer_vue__["render"],
  92986. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_131de97c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_drawer_vue__["staticRenderFns"],
  92987. __vue_template_functional__,
  92988. __vue_styles__,
  92989. __vue_scopeId__,
  92990. __vue_module_identifier__
  92991. )
  92992. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  92993. /***/ }),
  92994. /* 430 */
  92995. /***/ (function(module, exports, __webpack_require__) {
  92996. "use strict";
  92997. Object.defineProperty(exports, "__esModule", {
  92998. value: true
  92999. });
  93000. var render = function render() {
  93001. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "transfer-dom", rawName: "v-transfer-dom" }], attrs: { "data-transfer": _vm.transfer } }, [_c('transition', { attrs: { "name": "fade" } }, [_vm.mask ? _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.visible, expression: "visible" }], class: _vm.maskClasses, style: _vm.maskStyle, on: { "click": _vm.handleMask } }) : _vm._e()]), _vm._v(" "), _c('div', { class: _vm.wrapClasses, on: { "click": _vm.handleWrapClick } }, [_c('transition', { attrs: { "name": _vm.transitionName } }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.visible, expression: "visible" }], class: _vm.classes, style: _vm.mainStyles }, [_c('div', { ref: "content", class: _vm.contentClasses }, [_vm.closable ? _c('a', { staticClass: "ivu-drawer-close", on: { "click": _vm.close } }, [_vm._t("close", [_c('Icon', { attrs: { "type": "ios-close" } })])], 2) : _vm._e(), _vm._v(" "), _vm.showHead ? _c('div', { class: [_vm.prefixCls + '-header'] }, [_vm._t("header", [_c('div', { class: [_vm.prefixCls + '-header-inner'] }, [_vm._v(_vm._s(_vm.title))])])], 2) : _vm._e(), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-body'], style: _vm.styles }, [_vm._t("default")], 2)]), _vm._v(" "), _vm.draggable && (_vm.placement === 'left' || _vm.placement === 'right') ? _c('div', { staticClass: "ivu-drawer-drag", class: 'ivu-drawer-drag-' + _vm.placement, on: { "mousedown": _vm.handleTriggerMousedown } }, [_vm._t("trigger", [_c('div', { staticClass: "ivu-drawer-drag-move-trigger" }, [_c('div', { staticClass: "ivu-drawer-drag-move-trigger-point" }, [_c('i'), _c('i'), _c('i'), _c('i'), _c('i')])])])], 2) : _vm._e()])])], 1)], 1);
  93002. };
  93003. var staticRenderFns = [];
  93004. exports.render = render;
  93005. exports.staticRenderFns = staticRenderFns;
  93006. /***/ }),
  93007. /* 431 */
  93008. /***/ (function(module, exports, __webpack_require__) {
  93009. "use strict";
  93010. Object.defineProperty(exports, "__esModule", {
  93011. value: true
  93012. });
  93013. var _dropdown = __webpack_require__(61);
  93014. var _dropdown2 = _interopRequireDefault(_dropdown);
  93015. var _dropdownMenu = __webpack_require__(62);
  93016. var _dropdownMenu2 = _interopRequireDefault(_dropdownMenu);
  93017. var _dropdownItem = __webpack_require__(434);
  93018. var _dropdownItem2 = _interopRequireDefault(_dropdownItem);
  93019. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  93020. _dropdown2.default.Menu = _dropdownMenu2.default;
  93021. _dropdown2.default.Item = _dropdownItem2.default;
  93022. exports.default = _dropdown2.default;
  93023. /***/ }),
  93024. /* 432 */
  93025. /***/ (function(module, exports, __webpack_require__) {
  93026. "use strict";
  93027. Object.defineProperty(exports, "__esModule", {
  93028. value: true
  93029. });
  93030. var render = function render() {
  93031. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "click-outside", rawName: "v-click-outside", value: _vm.onClickoutside, expression: "onClickoutside" }], class: [_vm.prefixCls], on: { "mouseenter": _vm.handleMouseenter, "mouseleave": _vm.handleMouseleave } }, [_c('div', { ref: "reference", class: _vm.relClasses, on: { "click": _vm.handleClick, "contextmenu": function contextmenu($event) {
  93032. $event.preventDefault();return _vm.handleRightClick($event);
  93033. } } }, [_vm._t("default")], 2), _vm._v(" "), _c('transition', { attrs: { "name": "transition-drop" } }, [_c('Drop', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentVisible, expression: "currentVisible" }, { name: "transfer-dom", rawName: "v-transfer-dom" }], ref: "drop", class: _vm.dropdownCls, attrs: { "placement": _vm.placement, "eventsEnabled": _vm.eventsEnabled, "data-transfer": _vm.transfer, "transfer": _vm.transfer }, nativeOn: { "mouseenter": function mouseenter($event) {
  93034. return _vm.handleMouseenter($event);
  93035. }, "mouseleave": function mouseleave($event) {
  93036. return _vm.handleMouseleave($event);
  93037. } } }, [_vm._t("list")], 2)], 1)], 1);
  93038. };
  93039. var staticRenderFns = [];
  93040. exports.render = render;
  93041. exports.staticRenderFns = staticRenderFns;
  93042. /***/ }),
  93043. /* 433 */
  93044. /***/ (function(module, exports, __webpack_require__) {
  93045. "use strict";
  93046. Object.defineProperty(exports, "__esModule", {
  93047. value: true
  93048. });
  93049. var render = function render() {
  93050. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('ul', { staticClass: "ivu-dropdown-menu" }, [_vm._t("default")], 2);
  93051. };
  93052. var staticRenderFns = [];
  93053. exports.render = render;
  93054. exports.staticRenderFns = staticRenderFns;
  93055. /***/ }),
  93056. /* 434 */
  93057. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  93058. "use strict";
  93059. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  93060. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_item_vue__ = __webpack_require__(181);
  93061. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_item_vue__);
  93062. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_item_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_item_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  93063. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a5fd88a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_item_vue__ = __webpack_require__(435);
  93064. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a5fd88a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a5fd88a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_item_vue__);
  93065. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  93066. /* script */
  93067. /* template */
  93068. /* template functional */
  93069. var __vue_template_functional__ = false
  93070. /* styles */
  93071. var __vue_styles__ = null
  93072. /* scopeId */
  93073. var __vue_scopeId__ = null
  93074. /* moduleIdentifier (server only) */
  93075. var __vue_module_identifier__ = null
  93076. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  93077. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_dropdown_item_vue___default.a,
  93078. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a5fd88a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_item_vue__["render"],
  93079. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a5fd88a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_dropdown_item_vue__["staticRenderFns"],
  93080. __vue_template_functional__,
  93081. __vue_styles__,
  93082. __vue_scopeId__,
  93083. __vue_module_identifier__
  93084. )
  93085. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  93086. /***/ }),
  93087. /* 435 */
  93088. /***/ (function(module, exports, __webpack_require__) {
  93089. "use strict";
  93090. Object.defineProperty(exports, "__esModule", {
  93091. value: true
  93092. });
  93093. var render = function render() {
  93094. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('li', { class: _vm.classes, on: { "click": _vm.handleClick } }, [_vm._t("default")], 2);
  93095. };
  93096. var staticRenderFns = [];
  93097. exports.render = render;
  93098. exports.staticRenderFns = staticRenderFns;
  93099. /***/ }),
  93100. /* 436 */
  93101. /***/ (function(module, exports, __webpack_require__) {
  93102. "use strict";
  93103. Object.defineProperty(exports, "__esModule", {
  93104. value: true
  93105. });
  93106. var _footer = __webpack_require__(182);
  93107. var _footer2 = _interopRequireDefault(_footer);
  93108. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  93109. exports.default = _footer2.default;
  93110. /***/ }),
  93111. /* 437 */
  93112. /***/ (function(module, exports, __webpack_require__) {
  93113. "use strict";
  93114. Object.defineProperty(exports, "__esModule", {
  93115. value: true
  93116. });
  93117. var render = function render() {
  93118. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses }, [_vm._t("default")], 2);
  93119. };
  93120. var staticRenderFns = [];
  93121. exports.render = render;
  93122. exports.staticRenderFns = staticRenderFns;
  93123. /***/ }),
  93124. /* 438 */
  93125. /***/ (function(module, exports, __webpack_require__) {
  93126. "use strict";
  93127. Object.defineProperty(exports, "__esModule", {
  93128. value: true
  93129. });
  93130. var _form = __webpack_require__(439);
  93131. var _form2 = _interopRequireDefault(_form);
  93132. var _formItem = __webpack_require__(448);
  93133. var _formItem2 = _interopRequireDefault(_formItem);
  93134. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  93135. _form2.default.Item = _formItem2.default;
  93136. exports.default = _form2.default;
  93137. /***/ }),
  93138. /* 439 */
  93139. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  93140. "use strict";
  93141. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  93142. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_vue__ = __webpack_require__(184);
  93143. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_vue__);
  93144. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  93145. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_09971178_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_vue__ = __webpack_require__(447);
  93146. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_09971178_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_09971178_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_vue__);
  93147. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  93148. /* script */
  93149. /* template */
  93150. /* template functional */
  93151. var __vue_template_functional__ = false
  93152. /* styles */
  93153. var __vue_styles__ = null
  93154. /* scopeId */
  93155. var __vue_scopeId__ = null
  93156. /* moduleIdentifier (server only) */
  93157. var __vue_module_identifier__ = null
  93158. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  93159. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_vue___default.a,
  93160. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_09971178_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_vue__["render"],
  93161. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_09971178_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_vue__["staticRenderFns"],
  93162. __vue_template_functional__,
  93163. __vue_styles__,
  93164. __vue_scopeId__,
  93165. __vue_module_identifier__
  93166. )
  93167. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  93168. /***/ }),
  93169. /* 440 */
  93170. /***/ (function(module, exports, __webpack_require__) {
  93171. __webpack_require__(80);
  93172. __webpack_require__(35);
  93173. __webpack_require__(46);
  93174. __webpack_require__(441);
  93175. __webpack_require__(445);
  93176. __webpack_require__(446);
  93177. module.exports = __webpack_require__(5).Promise;
  93178. /***/ }),
  93179. /* 441 */
  93180. /***/ (function(module, exports, __webpack_require__) {
  93181. "use strict";
  93182. var LIBRARY = __webpack_require__(42);
  93183. var global = __webpack_require__(9);
  93184. var ctx = __webpack_require__(24);
  93185. var classof = __webpack_require__(56);
  93186. var $export = __webpack_require__(7);
  93187. var isObject = __webpack_require__(18);
  93188. var aFunction = __webpack_require__(43);
  93189. var anInstance = __webpack_require__(88);
  93190. var forOf = __webpack_require__(51);
  93191. var speciesConstructor = __webpack_require__(186);
  93192. var task = __webpack_require__(187).set;
  93193. var microtask = __webpack_require__(443)();
  93194. var newPromiseCapabilityModule = __webpack_require__(89);
  93195. var perform = __webpack_require__(188);
  93196. var userAgent = __webpack_require__(444);
  93197. var promiseResolve = __webpack_require__(189);
  93198. var PROMISE = 'Promise';
  93199. var TypeError = global.TypeError;
  93200. var process = global.process;
  93201. var versions = process && process.versions;
  93202. var v8 = versions && versions.v8 || '';
  93203. var $Promise = global[PROMISE];
  93204. var isNode = classof(process) == 'process';
  93205. var empty = function () { /* empty */ };
  93206. var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
  93207. var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
  93208. var USE_NATIVE = !!function () {
  93209. try {
  93210. // correct subclassing with @@species support
  93211. var promise = $Promise.resolve(1);
  93212. var FakePromise = (promise.constructor = {})[__webpack_require__(10)('species')] = function (exec) {
  93213. exec(empty, empty);
  93214. };
  93215. // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  93216. return (isNode || typeof PromiseRejectionEvent == 'function')
  93217. && promise.then(empty) instanceof FakePromise
  93218. // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  93219. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  93220. // we can't detect it synchronously, so just check versions
  93221. && v8.indexOf('6.6') !== 0
  93222. && userAgent.indexOf('Chrome/66') === -1;
  93223. } catch (e) { /* empty */ }
  93224. }();
  93225. // helpers
  93226. var isThenable = function (it) {
  93227. var then;
  93228. return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
  93229. };
  93230. var notify = function (promise, isReject) {
  93231. if (promise._n) return;
  93232. promise._n = true;
  93233. var chain = promise._c;
  93234. microtask(function () {
  93235. var value = promise._v;
  93236. var ok = promise._s == 1;
  93237. var i = 0;
  93238. var run = function (reaction) {
  93239. var handler = ok ? reaction.ok : reaction.fail;
  93240. var resolve = reaction.resolve;
  93241. var reject = reaction.reject;
  93242. var domain = reaction.domain;
  93243. var result, then, exited;
  93244. try {
  93245. if (handler) {
  93246. if (!ok) {
  93247. if (promise._h == 2) onHandleUnhandled(promise);
  93248. promise._h = 1;
  93249. }
  93250. if (handler === true) result = value;
  93251. else {
  93252. if (domain) domain.enter();
  93253. result = handler(value); // may throw
  93254. if (domain) {
  93255. domain.exit();
  93256. exited = true;
  93257. }
  93258. }
  93259. if (result === reaction.promise) {
  93260. reject(TypeError('Promise-chain cycle'));
  93261. } else if (then = isThenable(result)) {
  93262. then.call(result, resolve, reject);
  93263. } else resolve(result);
  93264. } else reject(value);
  93265. } catch (e) {
  93266. if (domain && !exited) domain.exit();
  93267. reject(e);
  93268. }
  93269. };
  93270. while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
  93271. promise._c = [];
  93272. promise._n = false;
  93273. if (isReject && !promise._h) onUnhandled(promise);
  93274. });
  93275. };
  93276. var onUnhandled = function (promise) {
  93277. task.call(global, function () {
  93278. var value = promise._v;
  93279. var unhandled = isUnhandled(promise);
  93280. var result, handler, console;
  93281. if (unhandled) {
  93282. result = perform(function () {
  93283. if (isNode) {
  93284. process.emit('unhandledRejection', value, promise);
  93285. } else if (handler = global.onunhandledrejection) {
  93286. handler({ promise: promise, reason: value });
  93287. } else if ((console = global.console) && console.error) {
  93288. console.error('Unhandled promise rejection', value);
  93289. }
  93290. });
  93291. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  93292. promise._h = isNode || isUnhandled(promise) ? 2 : 1;
  93293. } promise._a = undefined;
  93294. if (unhandled && result.e) throw result.v;
  93295. });
  93296. };
  93297. var isUnhandled = function (promise) {
  93298. return promise._h !== 1 && (promise._a || promise._c).length === 0;
  93299. };
  93300. var onHandleUnhandled = function (promise) {
  93301. task.call(global, function () {
  93302. var handler;
  93303. if (isNode) {
  93304. process.emit('rejectionHandled', promise);
  93305. } else if (handler = global.onrejectionhandled) {
  93306. handler({ promise: promise, reason: promise._v });
  93307. }
  93308. });
  93309. };
  93310. var $reject = function (value) {
  93311. var promise = this;
  93312. if (promise._d) return;
  93313. promise._d = true;
  93314. promise = promise._w || promise; // unwrap
  93315. promise._v = value;
  93316. promise._s = 2;
  93317. if (!promise._a) promise._a = promise._c.slice();
  93318. notify(promise, true);
  93319. };
  93320. var $resolve = function (value) {
  93321. var promise = this;
  93322. var then;
  93323. if (promise._d) return;
  93324. promise._d = true;
  93325. promise = promise._w || promise; // unwrap
  93326. try {
  93327. if (promise === value) throw TypeError("Promise can't be resolved itself");
  93328. if (then = isThenable(value)) {
  93329. microtask(function () {
  93330. var wrapper = { _w: promise, _d: false }; // wrap
  93331. try {
  93332. then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
  93333. } catch (e) {
  93334. $reject.call(wrapper, e);
  93335. }
  93336. });
  93337. } else {
  93338. promise._v = value;
  93339. promise._s = 1;
  93340. notify(promise, false);
  93341. }
  93342. } catch (e) {
  93343. $reject.call({ _w: promise, _d: false }, e); // wrap
  93344. }
  93345. };
  93346. // constructor polyfill
  93347. if (!USE_NATIVE) {
  93348. // 25.4.3.1 Promise(executor)
  93349. $Promise = function Promise(executor) {
  93350. anInstance(this, $Promise, PROMISE, '_h');
  93351. aFunction(executor);
  93352. Internal.call(this);
  93353. try {
  93354. executor(ctx($resolve, this, 1), ctx($reject, this, 1));
  93355. } catch (err) {
  93356. $reject.call(this, err);
  93357. }
  93358. };
  93359. // eslint-disable-next-line no-unused-vars
  93360. Internal = function Promise(executor) {
  93361. this._c = []; // <- awaiting reactions
  93362. this._a = undefined; // <- checked in isUnhandled reactions
  93363. this._s = 0; // <- state
  93364. this._d = false; // <- done
  93365. this._v = undefined; // <- value
  93366. this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
  93367. this._n = false; // <- notify
  93368. };
  93369. Internal.prototype = __webpack_require__(90)($Promise.prototype, {
  93370. // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
  93371. then: function then(onFulfilled, onRejected) {
  93372. var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
  93373. reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
  93374. reaction.fail = typeof onRejected == 'function' && onRejected;
  93375. reaction.domain = isNode ? process.domain : undefined;
  93376. this._c.push(reaction);
  93377. if (this._a) this._a.push(reaction);
  93378. if (this._s) notify(this, false);
  93379. return reaction.promise;
  93380. },
  93381. // 25.4.5.1 Promise.prototype.catch(onRejected)
  93382. 'catch': function (onRejected) {
  93383. return this.then(undefined, onRejected);
  93384. }
  93385. });
  93386. OwnPromiseCapability = function () {
  93387. var promise = new Internal();
  93388. this.promise = promise;
  93389. this.resolve = ctx($resolve, promise, 1);
  93390. this.reject = ctx($reject, promise, 1);
  93391. };
  93392. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  93393. return C === $Promise || C === Wrapper
  93394. ? new OwnPromiseCapability(C)
  93395. : newGenericPromiseCapability(C);
  93396. };
  93397. }
  93398. $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
  93399. __webpack_require__(47)($Promise, PROMISE);
  93400. __webpack_require__(190)(PROMISE);
  93401. Wrapper = __webpack_require__(5)[PROMISE];
  93402. // statics
  93403. $export($export.S + $export.F * !USE_NATIVE, PROMISE, {
  93404. // 25.4.4.5 Promise.reject(r)
  93405. reject: function reject(r) {
  93406. var capability = newPromiseCapability(this);
  93407. var $$reject = capability.reject;
  93408. $$reject(r);
  93409. return capability.promise;
  93410. }
  93411. });
  93412. $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
  93413. // 25.4.4.6 Promise.resolve(x)
  93414. resolve: function resolve(x) {
  93415. return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
  93416. }
  93417. });
  93418. $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(114)(function (iter) {
  93419. $Promise.all(iter)['catch'](empty);
  93420. })), PROMISE, {
  93421. // 25.4.4.1 Promise.all(iterable)
  93422. all: function all(iterable) {
  93423. var C = this;
  93424. var capability = newPromiseCapability(C);
  93425. var resolve = capability.resolve;
  93426. var reject = capability.reject;
  93427. var result = perform(function () {
  93428. var values = [];
  93429. var index = 0;
  93430. var remaining = 1;
  93431. forOf(iterable, false, function (promise) {
  93432. var $index = index++;
  93433. var alreadyCalled = false;
  93434. values.push(undefined);
  93435. remaining++;
  93436. C.resolve(promise).then(function (value) {
  93437. if (alreadyCalled) return;
  93438. alreadyCalled = true;
  93439. values[$index] = value;
  93440. --remaining || resolve(values);
  93441. }, reject);
  93442. });
  93443. --remaining || resolve(values);
  93444. });
  93445. if (result.e) reject(result.v);
  93446. return capability.promise;
  93447. },
  93448. // 25.4.4.4 Promise.race(iterable)
  93449. race: function race(iterable) {
  93450. var C = this;
  93451. var capability = newPromiseCapability(C);
  93452. var reject = capability.reject;
  93453. var result = perform(function () {
  93454. forOf(iterable, false, function (promise) {
  93455. C.resolve(promise).then(capability.resolve, reject);
  93456. });
  93457. });
  93458. if (result.e) reject(result.v);
  93459. return capability.promise;
  93460. }
  93461. });
  93462. /***/ }),
  93463. /* 442 */
  93464. /***/ (function(module, exports) {
  93465. // fast apply, http://jsperf.lnkit.com/fast-apply/5
  93466. module.exports = function (fn, args, that) {
  93467. var un = that === undefined;
  93468. switch (args.length) {
  93469. case 0: return un ? fn()
  93470. : fn.call(that);
  93471. case 1: return un ? fn(args[0])
  93472. : fn.call(that, args[0]);
  93473. case 2: return un ? fn(args[0], args[1])
  93474. : fn.call(that, args[0], args[1]);
  93475. case 3: return un ? fn(args[0], args[1], args[2])
  93476. : fn.call(that, args[0], args[1], args[2]);
  93477. case 4: return un ? fn(args[0], args[1], args[2], args[3])
  93478. : fn.call(that, args[0], args[1], args[2], args[3]);
  93479. } return fn.apply(that, args);
  93480. };
  93481. /***/ }),
  93482. /* 443 */
  93483. /***/ (function(module, exports, __webpack_require__) {
  93484. var global = __webpack_require__(9);
  93485. var macrotask = __webpack_require__(187).set;
  93486. var Observer = global.MutationObserver || global.WebKitMutationObserver;
  93487. var process = global.process;
  93488. var Promise = global.Promise;
  93489. var isNode = __webpack_require__(41)(process) == 'process';
  93490. module.exports = function () {
  93491. var head, last, notify;
  93492. var flush = function () {
  93493. var parent, fn;
  93494. if (isNode && (parent = process.domain)) parent.exit();
  93495. while (head) {
  93496. fn = head.fn;
  93497. head = head.next;
  93498. try {
  93499. fn();
  93500. } catch (e) {
  93501. if (head) notify();
  93502. else last = undefined;
  93503. throw e;
  93504. }
  93505. } last = undefined;
  93506. if (parent) parent.enter();
  93507. };
  93508. // Node.js
  93509. if (isNode) {
  93510. notify = function () {
  93511. process.nextTick(flush);
  93512. };
  93513. // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
  93514. } else if (Observer && !(global.navigator && global.navigator.standalone)) {
  93515. var toggle = true;
  93516. var node = document.createTextNode('');
  93517. new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
  93518. notify = function () {
  93519. node.data = toggle = !toggle;
  93520. };
  93521. // environments with maybe non-completely correct, but existent Promise
  93522. } else if (Promise && Promise.resolve) {
  93523. // Promise.resolve without an argument throws an error in LG WebOS 2
  93524. var promise = Promise.resolve(undefined);
  93525. notify = function () {
  93526. promise.then(flush);
  93527. };
  93528. // for other environments - macrotask based on:
  93529. // - setImmediate
  93530. // - MessageChannel
  93531. // - window.postMessag
  93532. // - onreadystatechange
  93533. // - setTimeout
  93534. } else {
  93535. notify = function () {
  93536. // strange IE + webpack dev server bug - use .call(global)
  93537. macrotask.call(global, flush);
  93538. };
  93539. }
  93540. return function (fn) {
  93541. var task = { fn: fn, next: undefined };
  93542. if (last) last.next = task;
  93543. if (!head) {
  93544. head = task;
  93545. notify();
  93546. } last = task;
  93547. };
  93548. };
  93549. /***/ }),
  93550. /* 444 */
  93551. /***/ (function(module, exports, __webpack_require__) {
  93552. var global = __webpack_require__(9);
  93553. var navigator = global.navigator;
  93554. module.exports = navigator && navigator.userAgent || '';
  93555. /***/ }),
  93556. /* 445 */
  93557. /***/ (function(module, exports, __webpack_require__) {
  93558. "use strict";
  93559. // https://github.com/tc39/proposal-promise-finally
  93560. var $export = __webpack_require__(7);
  93561. var core = __webpack_require__(5);
  93562. var global = __webpack_require__(9);
  93563. var speciesConstructor = __webpack_require__(186);
  93564. var promiseResolve = __webpack_require__(189);
  93565. $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
  93566. var C = speciesConstructor(this, core.Promise || global.Promise);
  93567. var isFunction = typeof onFinally == 'function';
  93568. return this.then(
  93569. isFunction ? function (x) {
  93570. return promiseResolve(C, onFinally()).then(function () { return x; });
  93571. } : onFinally,
  93572. isFunction ? function (e) {
  93573. return promiseResolve(C, onFinally()).then(function () { throw e; });
  93574. } : onFinally
  93575. );
  93576. } });
  93577. /***/ }),
  93578. /* 446 */
  93579. /***/ (function(module, exports, __webpack_require__) {
  93580. "use strict";
  93581. // https://github.com/tc39/proposal-promise-try
  93582. var $export = __webpack_require__(7);
  93583. var newPromiseCapability = __webpack_require__(89);
  93584. var perform = __webpack_require__(188);
  93585. $export($export.S, 'Promise', { 'try': function (callbackfn) {
  93586. var promiseCapability = newPromiseCapability.f(this);
  93587. var result = perform(callbackfn);
  93588. (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
  93589. return promiseCapability.promise;
  93590. } });
  93591. /***/ }),
  93592. /* 447 */
  93593. /***/ (function(module, exports, __webpack_require__) {
  93594. "use strict";
  93595. Object.defineProperty(exports, "__esModule", {
  93596. value: true
  93597. });
  93598. var render = function render() {
  93599. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('form', { class: _vm.classes, attrs: { "autocomplete": _vm.autocomplete } }, [_vm._t("default")], 2);
  93600. };
  93601. var staticRenderFns = [];
  93602. exports.render = render;
  93603. exports.staticRenderFns = staticRenderFns;
  93604. /***/ }),
  93605. /* 448 */
  93606. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  93607. "use strict";
  93608. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  93609. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue__ = __webpack_require__(191);
  93610. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue__);
  93611. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  93612. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_771964ee_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__ = __webpack_require__(451);
  93613. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_771964ee_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_771964ee_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__);
  93614. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  93615. /* script */
  93616. /* template */
  93617. /* template functional */
  93618. var __vue_template_functional__ = false
  93619. /* styles */
  93620. var __vue_styles__ = null
  93621. /* scopeId */
  93622. var __vue_scopeId__ = null
  93623. /* moduleIdentifier (server only) */
  93624. var __vue_module_identifier__ = null
  93625. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  93626. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_form_item_vue___default.a,
  93627. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_771964ee_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__["render"],
  93628. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_771964ee_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_form_item_vue__["staticRenderFns"],
  93629. __vue_template_functional__,
  93630. __vue_styles__,
  93631. __vue_scopeId__,
  93632. __vue_module_identifier__
  93633. )
  93634. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  93635. /***/ }),
  93636. /* 449 */
  93637. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  93638. "use strict";
  93639. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  93640. /* WEBPACK VAR INJECTION */(function(process) {function _extends() {
  93641. _extends = Object.assign || function (target) {
  93642. for (var i = 1; i < arguments.length; i++) {
  93643. var source = arguments[i];
  93644. for (var key in source) {
  93645. if (Object.prototype.hasOwnProperty.call(source, key)) {
  93646. target[key] = source[key];
  93647. }
  93648. }
  93649. }
  93650. return target;
  93651. };
  93652. return _extends.apply(this, arguments);
  93653. }
  93654. function _inheritsLoose(subClass, superClass) {
  93655. subClass.prototype = Object.create(superClass.prototype);
  93656. subClass.prototype.constructor = subClass;
  93657. subClass.__proto__ = superClass;
  93658. }
  93659. function _getPrototypeOf(o) {
  93660. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  93661. return o.__proto__ || Object.getPrototypeOf(o);
  93662. };
  93663. return _getPrototypeOf(o);
  93664. }
  93665. function _setPrototypeOf(o, p) {
  93666. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  93667. o.__proto__ = p;
  93668. return o;
  93669. };
  93670. return _setPrototypeOf(o, p);
  93671. }
  93672. function _isNativeReflectConstruct() {
  93673. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  93674. if (Reflect.construct.sham) return false;
  93675. if (typeof Proxy === "function") return true;
  93676. try {
  93677. Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
  93678. return true;
  93679. } catch (e) {
  93680. return false;
  93681. }
  93682. }
  93683. function _construct(Parent, args, Class) {
  93684. if (_isNativeReflectConstruct()) {
  93685. _construct = Reflect.construct;
  93686. } else {
  93687. _construct = function _construct(Parent, args, Class) {
  93688. var a = [null];
  93689. a.push.apply(a, args);
  93690. var Constructor = Function.bind.apply(Parent, a);
  93691. var instance = new Constructor();
  93692. if (Class) _setPrototypeOf(instance, Class.prototype);
  93693. return instance;
  93694. };
  93695. }
  93696. return _construct.apply(null, arguments);
  93697. }
  93698. function _isNativeFunction(fn) {
  93699. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  93700. }
  93701. function _wrapNativeSuper(Class) {
  93702. var _cache = typeof Map === "function" ? new Map() : undefined;
  93703. _wrapNativeSuper = function _wrapNativeSuper(Class) {
  93704. if (Class === null || !_isNativeFunction(Class)) return Class;
  93705. if (typeof Class !== "function") {
  93706. throw new TypeError("Super expression must either be null or a function");
  93707. }
  93708. if (typeof _cache !== "undefined") {
  93709. if (_cache.has(Class)) return _cache.get(Class);
  93710. _cache.set(Class, Wrapper);
  93711. }
  93712. function Wrapper() {
  93713. return _construct(Class, arguments, _getPrototypeOf(this).constructor);
  93714. }
  93715. Wrapper.prototype = Object.create(Class.prototype, {
  93716. constructor: {
  93717. value: Wrapper,
  93718. enumerable: false,
  93719. writable: true,
  93720. configurable: true
  93721. }
  93722. });
  93723. return _setPrototypeOf(Wrapper, Class);
  93724. };
  93725. return _wrapNativeSuper(Class);
  93726. }
  93727. /* eslint no-console:0 */
  93728. var formatRegExp = /%[sdj%]/g;
  93729. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  93730. if (typeof process !== 'undefined' && Object({"NODE_ENV":"production"}) && "production" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
  93731. warning = function warning(type, errors) {
  93732. if (typeof console !== 'undefined' && console.warn) {
  93733. if (errors.every(function (e) {
  93734. return typeof e === 'string';
  93735. })) {
  93736. console.warn(type, errors);
  93737. }
  93738. }
  93739. };
  93740. }
  93741. function convertFieldsError(errors) {
  93742. if (!errors || !errors.length) return null;
  93743. var fields = {};
  93744. errors.forEach(function (error) {
  93745. var field = error.field;
  93746. fields[field] = fields[field] || [];
  93747. fields[field].push(error);
  93748. });
  93749. return fields;
  93750. }
  93751. function format() {
  93752. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  93753. args[_key] = arguments[_key];
  93754. }
  93755. var i = 1;
  93756. var f = args[0];
  93757. var len = args.length;
  93758. if (typeof f === 'function') {
  93759. return f.apply(null, args.slice(1));
  93760. }
  93761. if (typeof f === 'string') {
  93762. var str = String(f).replace(formatRegExp, function (x) {
  93763. if (x === '%%') {
  93764. return '%';
  93765. }
  93766. if (i >= len) {
  93767. return x;
  93768. }
  93769. switch (x) {
  93770. case '%s':
  93771. return String(args[i++]);
  93772. case '%d':
  93773. return Number(args[i++]);
  93774. case '%j':
  93775. try {
  93776. return JSON.stringify(args[i++]);
  93777. } catch (_) {
  93778. return '[Circular]';
  93779. }
  93780. break;
  93781. default:
  93782. return x;
  93783. }
  93784. });
  93785. for (var arg = args[i]; i < len; arg = args[++i]) {
  93786. str += " " + arg;
  93787. }
  93788. return str;
  93789. }
  93790. return f;
  93791. }
  93792. function isNativeStringType(type) {
  93793. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  93794. }
  93795. function isEmptyValue(value, type) {
  93796. if (value === undefined || value === null) {
  93797. return true;
  93798. }
  93799. if (type === 'array' && Array.isArray(value) && !value.length) {
  93800. return true;
  93801. }
  93802. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  93803. return true;
  93804. }
  93805. return false;
  93806. }
  93807. function asyncParallelArray(arr, func, callback) {
  93808. var results = [];
  93809. var total = 0;
  93810. var arrLength = arr.length;
  93811. function count(errors) {
  93812. results.push.apply(results, errors);
  93813. total++;
  93814. if (total === arrLength) {
  93815. callback(results);
  93816. }
  93817. }
  93818. arr.forEach(function (a) {
  93819. func(a, count);
  93820. });
  93821. }
  93822. function asyncSerialArray(arr, func, callback) {
  93823. var index = 0;
  93824. var arrLength = arr.length;
  93825. function next(errors) {
  93826. if (errors && errors.length) {
  93827. callback(errors);
  93828. return;
  93829. }
  93830. var original = index;
  93831. index = index + 1;
  93832. if (original < arrLength) {
  93833. func(arr[original], next);
  93834. } else {
  93835. callback([]);
  93836. }
  93837. }
  93838. next([]);
  93839. }
  93840. function flattenObjArr(objArr) {
  93841. var ret = [];
  93842. Object.keys(objArr).forEach(function (k) {
  93843. ret.push.apply(ret, objArr[k]);
  93844. });
  93845. return ret;
  93846. }
  93847. var AsyncValidationError = /*#__PURE__*/function (_Error) {
  93848. _inheritsLoose(AsyncValidationError, _Error);
  93849. function AsyncValidationError(errors, fields) {
  93850. var _this;
  93851. _this = _Error.call(this, 'Async Validation Error') || this;
  93852. _this.errors = errors;
  93853. _this.fields = fields;
  93854. return _this;
  93855. }
  93856. return AsyncValidationError;
  93857. }( /*#__PURE__*/_wrapNativeSuper(Error));
  93858. function asyncMap(objArr, option, func, callback) {
  93859. if (option.first) {
  93860. var _pending = new Promise(function (resolve, reject) {
  93861. var next = function next(errors) {
  93862. callback(errors);
  93863. return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve();
  93864. };
  93865. var flattenArr = flattenObjArr(objArr);
  93866. asyncSerialArray(flattenArr, func, next);
  93867. });
  93868. _pending["catch"](function (e) {
  93869. return e;
  93870. });
  93871. return _pending;
  93872. }
  93873. var firstFields = option.firstFields || [];
  93874. if (firstFields === true) {
  93875. firstFields = Object.keys(objArr);
  93876. }
  93877. var objArrKeys = Object.keys(objArr);
  93878. var objArrLength = objArrKeys.length;
  93879. var total = 0;
  93880. var results = [];
  93881. var pending = new Promise(function (resolve, reject) {
  93882. var next = function next(errors) {
  93883. results.push.apply(results, errors);
  93884. total++;
  93885. if (total === objArrLength) {
  93886. callback(results);
  93887. return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve();
  93888. }
  93889. };
  93890. if (!objArrKeys.length) {
  93891. callback(results);
  93892. resolve();
  93893. }
  93894. objArrKeys.forEach(function (key) {
  93895. var arr = objArr[key];
  93896. if (firstFields.indexOf(key) !== -1) {
  93897. asyncSerialArray(arr, func, next);
  93898. } else {
  93899. asyncParallelArray(arr, func, next);
  93900. }
  93901. });
  93902. });
  93903. pending["catch"](function (e) {
  93904. return e;
  93905. });
  93906. return pending;
  93907. }
  93908. function complementError(rule) {
  93909. return function (oe) {
  93910. if (oe && oe.message) {
  93911. oe.field = oe.field || rule.fullField;
  93912. return oe;
  93913. }
  93914. return {
  93915. message: typeof oe === 'function' ? oe() : oe,
  93916. field: oe.field || rule.fullField
  93917. };
  93918. };
  93919. }
  93920. function deepMerge(target, source) {
  93921. if (source) {
  93922. for (var s in source) {
  93923. if (source.hasOwnProperty(s)) {
  93924. var value = source[s];
  93925. if (typeof value === 'object' && typeof target[s] === 'object') {
  93926. target[s] = _extends(_extends({}, target[s]), value);
  93927. } else {
  93928. target[s] = value;
  93929. }
  93930. }
  93931. }
  93932. }
  93933. return target;
  93934. }
  93935. /**
  93936. * Rule for validating required fields.
  93937. *
  93938. * @param rule The validation rule.
  93939. * @param value The value of the field on the source object.
  93940. * @param source The source object being validated.
  93941. * @param errors An array of errors that this rule may add
  93942. * validation errors to.
  93943. * @param options The validation options.
  93944. * @param options.messages The validation messages.
  93945. */
  93946. function required(rule, value, source, errors, options, type) {
  93947. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  93948. errors.push(format(options.messages.required, rule.fullField));
  93949. }
  93950. }
  93951. /**
  93952. * Rule for validating whitespace.
  93953. *
  93954. * @param rule The validation rule.
  93955. * @param value The value of the field on the source object.
  93956. * @param source The source object being validated.
  93957. * @param errors An array of errors that this rule may add
  93958. * validation errors to.
  93959. * @param options The validation options.
  93960. * @param options.messages The validation messages.
  93961. */
  93962. function whitespace(rule, value, source, errors, options) {
  93963. if (/^\s+$/.test(value) || value === '') {
  93964. errors.push(format(options.messages.whitespace, rule.fullField));
  93965. }
  93966. }
  93967. /* eslint max-len:0 */
  93968. var pattern = {
  93969. // http://emailregex.com/
  93970. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  93971. url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'),
  93972. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  93973. };
  93974. var types = {
  93975. integer: function integer(value) {
  93976. return types.number(value) && parseInt(value, 10) === value;
  93977. },
  93978. "float": function float(value) {
  93979. return types.number(value) && !types.integer(value);
  93980. },
  93981. array: function array(value) {
  93982. return Array.isArray(value);
  93983. },
  93984. regexp: function regexp(value) {
  93985. if (value instanceof RegExp) {
  93986. return true;
  93987. }
  93988. try {
  93989. return !!new RegExp(value);
  93990. } catch (e) {
  93991. return false;
  93992. }
  93993. },
  93994. date: function date(value) {
  93995. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
  93996. },
  93997. number: function number(value) {
  93998. if (isNaN(value)) {
  93999. return false;
  94000. }
  94001. return typeof value === 'number';
  94002. },
  94003. object: function object(value) {
  94004. return typeof value === 'object' && !types.array(value);
  94005. },
  94006. method: function method(value) {
  94007. return typeof value === 'function';
  94008. },
  94009. email: function email(value) {
  94010. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  94011. },
  94012. url: function url(value) {
  94013. return typeof value === 'string' && !!value.match(pattern.url);
  94014. },
  94015. hex: function hex(value) {
  94016. return typeof value === 'string' && !!value.match(pattern.hex);
  94017. }
  94018. };
  94019. /**
  94020. * Rule for validating the type of a value.
  94021. *
  94022. * @param rule The validation rule.
  94023. * @param value The value of the field on the source object.
  94024. * @param source The source object being validated.
  94025. * @param errors An array of errors that this rule may add
  94026. * validation errors to.
  94027. * @param options The validation options.
  94028. * @param options.messages The validation messages.
  94029. */
  94030. function type(rule, value, source, errors, options) {
  94031. if (rule.required && value === undefined) {
  94032. required(rule, value, source, errors, options);
  94033. return;
  94034. }
  94035. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  94036. var ruleType = rule.type;
  94037. if (custom.indexOf(ruleType) > -1) {
  94038. if (!types[ruleType](value)) {
  94039. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  94040. } // straight typeof check
  94041. } else if (ruleType && typeof value !== rule.type) {
  94042. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  94043. }
  94044. }
  94045. /**
  94046. * Rule for validating minimum and maximum allowed values.
  94047. *
  94048. * @param rule The validation rule.
  94049. * @param value The value of the field on the source object.
  94050. * @param source The source object being validated.
  94051. * @param errors An array of errors that this rule may add
  94052. * validation errors to.
  94053. * @param options The validation options.
  94054. * @param options.messages The validation messages.
  94055. */
  94056. function range(rule, value, source, errors, options) {
  94057. var len = typeof rule.len === 'number';
  94058. var min = typeof rule.min === 'number';
  94059. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  94060. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  94061. var val = value;
  94062. var key = null;
  94063. var num = typeof value === 'number';
  94064. var str = typeof value === 'string';
  94065. var arr = Array.isArray(value);
  94066. if (num) {
  94067. key = 'number';
  94068. } else if (str) {
  94069. key = 'string';
  94070. } else if (arr) {
  94071. key = 'array';
  94072. } // if the value is not of a supported type for range validation
  94073. // the validation rule rule should use the
  94074. // type property to also test for a particular type
  94075. if (!key) {
  94076. return false;
  94077. }
  94078. if (arr) {
  94079. val = value.length;
  94080. }
  94081. if (str) {
  94082. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
  94083. val = value.replace(spRegexp, '_').length;
  94084. }
  94085. if (len) {
  94086. if (val !== rule.len) {
  94087. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  94088. }
  94089. } else if (min && !max && val < rule.min) {
  94090. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  94091. } else if (max && !min && val > rule.max) {
  94092. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  94093. } else if (min && max && (val < rule.min || val > rule.max)) {
  94094. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  94095. }
  94096. }
  94097. var ENUM = 'enum';
  94098. /**
  94099. * Rule for validating a value exists in an enumerable list.
  94100. *
  94101. * @param rule The validation rule.
  94102. * @param value The value of the field on the source object.
  94103. * @param source The source object being validated.
  94104. * @param errors An array of errors that this rule may add
  94105. * validation errors to.
  94106. * @param options The validation options.
  94107. * @param options.messages The validation messages.
  94108. */
  94109. function enumerable(rule, value, source, errors, options) {
  94110. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  94111. if (rule[ENUM].indexOf(value) === -1) {
  94112. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  94113. }
  94114. }
  94115. /**
  94116. * Rule for validating a regular expression pattern.
  94117. *
  94118. * @param rule The validation rule.
  94119. * @param value The value of the field on the source object.
  94120. * @param source The source object being validated.
  94121. * @param errors An array of errors that this rule may add
  94122. * validation errors to.
  94123. * @param options The validation options.
  94124. * @param options.messages The validation messages.
  94125. */
  94126. function pattern$1(rule, value, source, errors, options) {
  94127. if (rule.pattern) {
  94128. if (rule.pattern instanceof RegExp) {
  94129. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  94130. // flag is accidentally set to `true`, which in a validation scenario
  94131. // is not necessary and the result might be misleading
  94132. rule.pattern.lastIndex = 0;
  94133. if (!rule.pattern.test(value)) {
  94134. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  94135. }
  94136. } else if (typeof rule.pattern === 'string') {
  94137. var _pattern = new RegExp(rule.pattern);
  94138. if (!_pattern.test(value)) {
  94139. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  94140. }
  94141. }
  94142. }
  94143. }
  94144. var rules = {
  94145. required: required,
  94146. whitespace: whitespace,
  94147. type: type,
  94148. range: range,
  94149. "enum": enumerable,
  94150. pattern: pattern$1
  94151. };
  94152. /**
  94153. * Performs validation for string types.
  94154. *
  94155. * @param rule The validation rule.
  94156. * @param value The value of the field on the source object.
  94157. * @param callback The callback function.
  94158. * @param source The source object being validated.
  94159. * @param options The validation options.
  94160. * @param options.messages The validation messages.
  94161. */
  94162. function string(rule, value, callback, source, options) {
  94163. var errors = [];
  94164. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94165. if (validate) {
  94166. if (isEmptyValue(value, 'string') && !rule.required) {
  94167. return callback();
  94168. }
  94169. rules.required(rule, value, source, errors, options, 'string');
  94170. if (!isEmptyValue(value, 'string')) {
  94171. rules.type(rule, value, source, errors, options);
  94172. rules.range(rule, value, source, errors, options);
  94173. rules.pattern(rule, value, source, errors, options);
  94174. if (rule.whitespace === true) {
  94175. rules.whitespace(rule, value, source, errors, options);
  94176. }
  94177. }
  94178. }
  94179. callback(errors);
  94180. }
  94181. /**
  94182. * Validates a function.
  94183. *
  94184. * @param rule The validation rule.
  94185. * @param value The value of the field on the source object.
  94186. * @param callback The callback function.
  94187. * @param source The source object being validated.
  94188. * @param options The validation options.
  94189. * @param options.messages The validation messages.
  94190. */
  94191. function method(rule, value, callback, source, options) {
  94192. var errors = [];
  94193. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94194. if (validate) {
  94195. if (isEmptyValue(value) && !rule.required) {
  94196. return callback();
  94197. }
  94198. rules.required(rule, value, source, errors, options);
  94199. if (value !== undefined) {
  94200. rules.type(rule, value, source, errors, options);
  94201. }
  94202. }
  94203. callback(errors);
  94204. }
  94205. /**
  94206. * Validates a number.
  94207. *
  94208. * @param rule The validation rule.
  94209. * @param value The value of the field on the source object.
  94210. * @param callback The callback function.
  94211. * @param source The source object being validated.
  94212. * @param options The validation options.
  94213. * @param options.messages The validation messages.
  94214. */
  94215. function number(rule, value, callback, source, options) {
  94216. var errors = [];
  94217. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94218. if (validate) {
  94219. if (value === '') {
  94220. value = undefined;
  94221. }
  94222. if (isEmptyValue(value) && !rule.required) {
  94223. return callback();
  94224. }
  94225. rules.required(rule, value, source, errors, options);
  94226. if (value !== undefined) {
  94227. rules.type(rule, value, source, errors, options);
  94228. rules.range(rule, value, source, errors, options);
  94229. }
  94230. }
  94231. callback(errors);
  94232. }
  94233. /**
  94234. * Validates a boolean.
  94235. *
  94236. * @param rule The validation rule.
  94237. * @param value The value of the field on the source object.
  94238. * @param callback The callback function.
  94239. * @param source The source object being validated.
  94240. * @param options The validation options.
  94241. * @param options.messages The validation messages.
  94242. */
  94243. function _boolean(rule, value, callback, source, options) {
  94244. var errors = [];
  94245. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94246. if (validate) {
  94247. if (isEmptyValue(value) && !rule.required) {
  94248. return callback();
  94249. }
  94250. rules.required(rule, value, source, errors, options);
  94251. if (value !== undefined) {
  94252. rules.type(rule, value, source, errors, options);
  94253. }
  94254. }
  94255. callback(errors);
  94256. }
  94257. /**
  94258. * Validates the regular expression type.
  94259. *
  94260. * @param rule The validation rule.
  94261. * @param value The value of the field on the source object.
  94262. * @param callback The callback function.
  94263. * @param source The source object being validated.
  94264. * @param options The validation options.
  94265. * @param options.messages The validation messages.
  94266. */
  94267. function regexp(rule, value, callback, source, options) {
  94268. var errors = [];
  94269. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94270. if (validate) {
  94271. if (isEmptyValue(value) && !rule.required) {
  94272. return callback();
  94273. }
  94274. rules.required(rule, value, source, errors, options);
  94275. if (!isEmptyValue(value)) {
  94276. rules.type(rule, value, source, errors, options);
  94277. }
  94278. }
  94279. callback(errors);
  94280. }
  94281. /**
  94282. * Validates a number is an integer.
  94283. *
  94284. * @param rule The validation rule.
  94285. * @param value The value of the field on the source object.
  94286. * @param callback The callback function.
  94287. * @param source The source object being validated.
  94288. * @param options The validation options.
  94289. * @param options.messages The validation messages.
  94290. */
  94291. function integer(rule, value, callback, source, options) {
  94292. var errors = [];
  94293. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94294. if (validate) {
  94295. if (isEmptyValue(value) && !rule.required) {
  94296. return callback();
  94297. }
  94298. rules.required(rule, value, source, errors, options);
  94299. if (value !== undefined) {
  94300. rules.type(rule, value, source, errors, options);
  94301. rules.range(rule, value, source, errors, options);
  94302. }
  94303. }
  94304. callback(errors);
  94305. }
  94306. /**
  94307. * Validates a number is a floating point number.
  94308. *
  94309. * @param rule The validation rule.
  94310. * @param value The value of the field on the source object.
  94311. * @param callback The callback function.
  94312. * @param source The source object being validated.
  94313. * @param options The validation options.
  94314. * @param options.messages The validation messages.
  94315. */
  94316. function floatFn(rule, value, callback, source, options) {
  94317. var errors = [];
  94318. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94319. if (validate) {
  94320. if (isEmptyValue(value) && !rule.required) {
  94321. return callback();
  94322. }
  94323. rules.required(rule, value, source, errors, options);
  94324. if (value !== undefined) {
  94325. rules.type(rule, value, source, errors, options);
  94326. rules.range(rule, value, source, errors, options);
  94327. }
  94328. }
  94329. callback(errors);
  94330. }
  94331. /**
  94332. * Validates an array.
  94333. *
  94334. * @param rule The validation rule.
  94335. * @param value The value of the field on the source object.
  94336. * @param callback The callback function.
  94337. * @param source The source object being validated.
  94338. * @param options The validation options.
  94339. * @param options.messages The validation messages.
  94340. */
  94341. function array(rule, value, callback, source, options) {
  94342. var errors = [];
  94343. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94344. if (validate) {
  94345. if (isEmptyValue(value, 'array') && !rule.required) {
  94346. return callback();
  94347. }
  94348. rules.required(rule, value, source, errors, options, 'array');
  94349. if (!isEmptyValue(value, 'array')) {
  94350. rules.type(rule, value, source, errors, options);
  94351. rules.range(rule, value, source, errors, options);
  94352. }
  94353. }
  94354. callback(errors);
  94355. }
  94356. /**
  94357. * Validates an object.
  94358. *
  94359. * @param rule The validation rule.
  94360. * @param value The value of the field on the source object.
  94361. * @param callback The callback function.
  94362. * @param source The source object being validated.
  94363. * @param options The validation options.
  94364. * @param options.messages The validation messages.
  94365. */
  94366. function object(rule, value, callback, source, options) {
  94367. var errors = [];
  94368. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94369. if (validate) {
  94370. if (isEmptyValue(value) && !rule.required) {
  94371. return callback();
  94372. }
  94373. rules.required(rule, value, source, errors, options);
  94374. if (value !== undefined) {
  94375. rules.type(rule, value, source, errors, options);
  94376. }
  94377. }
  94378. callback(errors);
  94379. }
  94380. var ENUM$1 = 'enum';
  94381. /**
  94382. * Validates an enumerable list.
  94383. *
  94384. * @param rule The validation rule.
  94385. * @param value The value of the field on the source object.
  94386. * @param callback The callback function.
  94387. * @param source The source object being validated.
  94388. * @param options The validation options.
  94389. * @param options.messages The validation messages.
  94390. */
  94391. function enumerable$1(rule, value, callback, source, options) {
  94392. var errors = [];
  94393. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94394. if (validate) {
  94395. if (isEmptyValue(value) && !rule.required) {
  94396. return callback();
  94397. }
  94398. rules.required(rule, value, source, errors, options);
  94399. if (value !== undefined) {
  94400. rules[ENUM$1](rule, value, source, errors, options);
  94401. }
  94402. }
  94403. callback(errors);
  94404. }
  94405. /**
  94406. * Validates a regular expression pattern.
  94407. *
  94408. * Performs validation when a rule only contains
  94409. * a pattern property but is not declared as a string type.
  94410. *
  94411. * @param rule The validation rule.
  94412. * @param value The value of the field on the source object.
  94413. * @param callback The callback function.
  94414. * @param source The source object being validated.
  94415. * @param options The validation options.
  94416. * @param options.messages The validation messages.
  94417. */
  94418. function pattern$2(rule, value, callback, source, options) {
  94419. var errors = [];
  94420. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94421. if (validate) {
  94422. if (isEmptyValue(value, 'string') && !rule.required) {
  94423. return callback();
  94424. }
  94425. rules.required(rule, value, source, errors, options);
  94426. if (!isEmptyValue(value, 'string')) {
  94427. rules.pattern(rule, value, source, errors, options);
  94428. }
  94429. }
  94430. callback(errors);
  94431. }
  94432. function date(rule, value, callback, source, options) {
  94433. // console.log('integer rule called %j', rule);
  94434. var errors = [];
  94435. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value);
  94436. if (validate) {
  94437. if (isEmptyValue(value) && !rule.required) {
  94438. return callback();
  94439. }
  94440. rules.required(rule, value, source, errors, options);
  94441. if (!isEmptyValue(value)) {
  94442. var dateObject;
  94443. if (typeof value === 'number') {
  94444. dateObject = new Date(value);
  94445. } else {
  94446. dateObject = value;
  94447. }
  94448. rules.type(rule, dateObject, source, errors, options);
  94449. if (dateObject) {
  94450. rules.range(rule, dateObject.getTime(), source, errors, options);
  94451. }
  94452. }
  94453. }
  94454. callback(errors);
  94455. }
  94456. function required$1(rule, value, callback, source, options) {
  94457. var errors = [];
  94458. var type = Array.isArray(value) ? 'array' : typeof value;
  94459. rules.required(rule, value, source, errors, options, type);
  94460. callback(errors);
  94461. }
  94462. function type$1(rule, value, callback, source, options) {
  94463. var ruleType = rule.type;
  94464. var errors = [];
  94465. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94466. if (validate) {
  94467. if (isEmptyValue(value, ruleType) && !rule.required) {
  94468. return callback();
  94469. }
  94470. rules.required(rule, value, source, errors, options, ruleType);
  94471. if (!isEmptyValue(value, ruleType)) {
  94472. rules.type(rule, value, source, errors, options);
  94473. }
  94474. }
  94475. callback(errors);
  94476. }
  94477. /**
  94478. * Performs validation for any type.
  94479. *
  94480. * @param rule The validation rule.
  94481. * @param value The value of the field on the source object.
  94482. * @param callback The callback function.
  94483. * @param source The source object being validated.
  94484. * @param options The validation options.
  94485. * @param options.messages The validation messages.
  94486. */
  94487. function any(rule, value, callback, source, options) {
  94488. var errors = [];
  94489. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  94490. if (validate) {
  94491. if (isEmptyValue(value) && !rule.required) {
  94492. return callback();
  94493. }
  94494. rules.required(rule, value, source, errors, options);
  94495. }
  94496. callback(errors);
  94497. }
  94498. var validators = {
  94499. string: string,
  94500. method: method,
  94501. number: number,
  94502. "boolean": _boolean,
  94503. regexp: regexp,
  94504. integer: integer,
  94505. "float": floatFn,
  94506. array: array,
  94507. object: object,
  94508. "enum": enumerable$1,
  94509. pattern: pattern$2,
  94510. date: date,
  94511. url: type$1,
  94512. hex: type$1,
  94513. email: type$1,
  94514. required: required$1,
  94515. any: any
  94516. };
  94517. function newMessages() {
  94518. return {
  94519. "default": 'Validation error on field %s',
  94520. required: '%s is required',
  94521. "enum": '%s must be one of %s',
  94522. whitespace: '%s cannot be empty',
  94523. date: {
  94524. format: '%s date %s is invalid for format %s',
  94525. parse: '%s date could not be parsed, %s is invalid ',
  94526. invalid: '%s date %s is invalid'
  94527. },
  94528. types: {
  94529. string: '%s is not a %s',
  94530. method: '%s is not a %s (function)',
  94531. array: '%s is not an %s',
  94532. object: '%s is not an %s',
  94533. number: '%s is not a %s',
  94534. date: '%s is not a %s',
  94535. "boolean": '%s is not a %s',
  94536. integer: '%s is not an %s',
  94537. "float": '%s is not a %s',
  94538. regexp: '%s is not a valid %s',
  94539. email: '%s is not a valid %s',
  94540. url: '%s is not a valid %s',
  94541. hex: '%s is not a valid %s'
  94542. },
  94543. string: {
  94544. len: '%s must be exactly %s characters',
  94545. min: '%s must be at least %s characters',
  94546. max: '%s cannot be longer than %s characters',
  94547. range: '%s must be between %s and %s characters'
  94548. },
  94549. number: {
  94550. len: '%s must equal %s',
  94551. min: '%s cannot be less than %s',
  94552. max: '%s cannot be greater than %s',
  94553. range: '%s must be between %s and %s'
  94554. },
  94555. array: {
  94556. len: '%s must be exactly %s in length',
  94557. min: '%s cannot be less than %s in length',
  94558. max: '%s cannot be greater than %s in length',
  94559. range: '%s must be between %s and %s in length'
  94560. },
  94561. pattern: {
  94562. mismatch: '%s value %s does not match pattern %s'
  94563. },
  94564. clone: function clone() {
  94565. var cloned = JSON.parse(JSON.stringify(this));
  94566. cloned.clone = this.clone;
  94567. return cloned;
  94568. }
  94569. };
  94570. }
  94571. var messages = newMessages();
  94572. /**
  94573. * Encapsulates a validation schema.
  94574. *
  94575. * @param descriptor An object declaring validation rules
  94576. * for this schema.
  94577. */
  94578. function Schema(descriptor) {
  94579. this.rules = null;
  94580. this._messages = messages;
  94581. this.define(descriptor);
  94582. }
  94583. Schema.prototype = {
  94584. messages: function messages(_messages) {
  94585. if (_messages) {
  94586. this._messages = deepMerge(newMessages(), _messages);
  94587. }
  94588. return this._messages;
  94589. },
  94590. define: function define(rules) {
  94591. if (!rules) {
  94592. throw new Error('Cannot configure a schema with no rules');
  94593. }
  94594. if (typeof rules !== 'object' || Array.isArray(rules)) {
  94595. throw new Error('Rules must be an object');
  94596. }
  94597. this.rules = {};
  94598. var z;
  94599. var item;
  94600. for (z in rules) {
  94601. if (rules.hasOwnProperty(z)) {
  94602. item = rules[z];
  94603. this.rules[z] = Array.isArray(item) ? item : [item];
  94604. }
  94605. }
  94606. },
  94607. validate: function validate(source_, o, oc) {
  94608. var _this = this;
  94609. if (o === void 0) {
  94610. o = {};
  94611. }
  94612. if (oc === void 0) {
  94613. oc = function oc() {};
  94614. }
  94615. var source = source_;
  94616. var options = o;
  94617. var callback = oc;
  94618. if (typeof options === 'function') {
  94619. callback = options;
  94620. options = {};
  94621. }
  94622. if (!this.rules || Object.keys(this.rules).length === 0) {
  94623. if (callback) {
  94624. callback();
  94625. }
  94626. return Promise.resolve();
  94627. }
  94628. function complete(results) {
  94629. var i;
  94630. var errors = [];
  94631. var fields = {};
  94632. function add(e) {
  94633. if (Array.isArray(e)) {
  94634. var _errors;
  94635. errors = (_errors = errors).concat.apply(_errors, e);
  94636. } else {
  94637. errors.push(e);
  94638. }
  94639. }
  94640. for (i = 0; i < results.length; i++) {
  94641. add(results[i]);
  94642. }
  94643. if (!errors.length) {
  94644. errors = null;
  94645. fields = null;
  94646. } else {
  94647. fields = convertFieldsError(errors);
  94648. }
  94649. callback(errors, fields);
  94650. }
  94651. if (options.messages) {
  94652. var messages$1 = this.messages();
  94653. if (messages$1 === messages) {
  94654. messages$1 = newMessages();
  94655. }
  94656. deepMerge(messages$1, options.messages);
  94657. options.messages = messages$1;
  94658. } else {
  94659. options.messages = this.messages();
  94660. }
  94661. var arr;
  94662. var value;
  94663. var series = {};
  94664. var keys = options.keys || Object.keys(this.rules);
  94665. keys.forEach(function (z) {
  94666. arr = _this.rules[z];
  94667. value = source[z];
  94668. arr.forEach(function (r) {
  94669. var rule = r;
  94670. if (typeof rule.transform === 'function') {
  94671. if (source === source_) {
  94672. source = _extends({}, source);
  94673. }
  94674. value = source[z] = rule.transform(value);
  94675. }
  94676. if (typeof rule === 'function') {
  94677. rule = {
  94678. validator: rule
  94679. };
  94680. } else {
  94681. rule = _extends({}, rule);
  94682. }
  94683. rule.validator = _this.getValidationMethod(rule);
  94684. rule.field = z;
  94685. rule.fullField = rule.fullField || z;
  94686. rule.type = _this.getType(rule);
  94687. if (!rule.validator) {
  94688. return;
  94689. }
  94690. series[z] = series[z] || [];
  94691. series[z].push({
  94692. rule: rule,
  94693. value: value,
  94694. source: source,
  94695. field: z
  94696. });
  94697. });
  94698. });
  94699. var errorFields = {};
  94700. return asyncMap(series, options, function (data, doIt) {
  94701. var rule = data.rule;
  94702. var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField === 'object');
  94703. deep = deep && (rule.required || !rule.required && data.value);
  94704. rule.field = data.field;
  94705. function addFullfield(key, schema) {
  94706. return _extends(_extends({}, schema), {}, {
  94707. fullField: rule.fullField + "." + key
  94708. });
  94709. }
  94710. function cb(e) {
  94711. if (e === void 0) {
  94712. e = [];
  94713. }
  94714. var errors = e;
  94715. if (!Array.isArray(errors)) {
  94716. errors = [errors];
  94717. }
  94718. if (!options.suppressWarning && errors.length) {
  94719. Schema.warning('async-validator:', errors);
  94720. }
  94721. if (errors.length && rule.message) {
  94722. errors = [].concat(rule.message);
  94723. }
  94724. errors = errors.map(complementError(rule));
  94725. if (options.first && errors.length) {
  94726. errorFields[rule.field] = 1;
  94727. return doIt(errors);
  94728. }
  94729. if (!deep) {
  94730. doIt(errors);
  94731. } else {
  94732. // if rule is required but the target object
  94733. // does not exist fail at the rule level and don't
  94734. // go deeper
  94735. if (rule.required && !data.value) {
  94736. if (rule.message) {
  94737. errors = [].concat(rule.message).map(complementError(rule));
  94738. } else if (options.error) {
  94739. errors = [options.error(rule, format(options.messages.required, rule.field))];
  94740. }
  94741. return doIt(errors);
  94742. }
  94743. var fieldsSchema = {};
  94744. if (rule.defaultField) {
  94745. for (var k in data.value) {
  94746. if (data.value.hasOwnProperty(k)) {
  94747. fieldsSchema[k] = rule.defaultField;
  94748. }
  94749. }
  94750. }
  94751. fieldsSchema = _extends(_extends({}, fieldsSchema), data.rule.fields);
  94752. for (var f in fieldsSchema) {
  94753. if (fieldsSchema.hasOwnProperty(f)) {
  94754. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  94755. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  94756. }
  94757. }
  94758. var schema = new Schema(fieldsSchema);
  94759. schema.messages(options.messages);
  94760. if (data.rule.options) {
  94761. data.rule.options.messages = options.messages;
  94762. data.rule.options.error = options.error;
  94763. }
  94764. schema.validate(data.value, data.rule.options || options, function (errs) {
  94765. var finalErrors = [];
  94766. if (errors && errors.length) {
  94767. finalErrors.push.apply(finalErrors, errors);
  94768. }
  94769. if (errs && errs.length) {
  94770. finalErrors.push.apply(finalErrors, errs);
  94771. }
  94772. doIt(finalErrors.length ? finalErrors : null);
  94773. });
  94774. }
  94775. }
  94776. var res;
  94777. if (rule.asyncValidator) {
  94778. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  94779. } else if (rule.validator) {
  94780. res = rule.validator(rule, data.value, cb, data.source, options);
  94781. if (res === true) {
  94782. cb();
  94783. } else if (res === false) {
  94784. cb(rule.message || rule.field + " fails");
  94785. } else if (res instanceof Array) {
  94786. cb(res);
  94787. } else if (res instanceof Error) {
  94788. cb(res.message);
  94789. }
  94790. }
  94791. if (res && res.then) {
  94792. res.then(function () {
  94793. return cb();
  94794. }, function (e) {
  94795. return cb(e);
  94796. });
  94797. }
  94798. }, function (results) {
  94799. complete(results);
  94800. });
  94801. },
  94802. getType: function getType(rule) {
  94803. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  94804. rule.type = 'pattern';
  94805. }
  94806. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  94807. throw new Error(format('Unknown rule type %s', rule.type));
  94808. }
  94809. return rule.type || 'string';
  94810. },
  94811. getValidationMethod: function getValidationMethod(rule) {
  94812. if (typeof rule.validator === 'function') {
  94813. return rule.validator;
  94814. }
  94815. var keys = Object.keys(rule);
  94816. var messageIndex = keys.indexOf('message');
  94817. if (messageIndex !== -1) {
  94818. keys.splice(messageIndex, 1);
  94819. }
  94820. if (keys.length === 1 && keys[0] === 'required') {
  94821. return validators.required;
  94822. }
  94823. return validators[this.getType(rule)] || false;
  94824. }
  94825. };
  94826. Schema.register = function register(type, validator) {
  94827. if (typeof validator !== 'function') {
  94828. throw new Error('Cannot register a validator by type, validator is not a function');
  94829. }
  94830. validators[type] = validator;
  94831. };
  94832. Schema.warning = warning;
  94833. Schema.messages = messages;
  94834. Schema.validators = validators;
  94835. /* harmony default export */ __webpack_exports__["default"] = (Schema);
  94836. //# sourceMappingURL=index.js.map
  94837. /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(450)))
  94838. /***/ }),
  94839. /* 450 */
  94840. /***/ (function(module, exports) {
  94841. // shim for using process in browser
  94842. var process = module.exports = {};
  94843. // cached from whatever global is present so that test runners that stub it
  94844. // don't break things. But we need to wrap it in a try catch in case it is
  94845. // wrapped in strict mode code which doesn't define any globals. It's inside a
  94846. // function because try/catches deoptimize in certain engines.
  94847. var cachedSetTimeout;
  94848. var cachedClearTimeout;
  94849. function defaultSetTimout() {
  94850. throw new Error('setTimeout has not been defined');
  94851. }
  94852. function defaultClearTimeout () {
  94853. throw new Error('clearTimeout has not been defined');
  94854. }
  94855. (function () {
  94856. try {
  94857. if (typeof setTimeout === 'function') {
  94858. cachedSetTimeout = setTimeout;
  94859. } else {
  94860. cachedSetTimeout = defaultSetTimout;
  94861. }
  94862. } catch (e) {
  94863. cachedSetTimeout = defaultSetTimout;
  94864. }
  94865. try {
  94866. if (typeof clearTimeout === 'function') {
  94867. cachedClearTimeout = clearTimeout;
  94868. } else {
  94869. cachedClearTimeout = defaultClearTimeout;
  94870. }
  94871. } catch (e) {
  94872. cachedClearTimeout = defaultClearTimeout;
  94873. }
  94874. } ())
  94875. function runTimeout(fun) {
  94876. if (cachedSetTimeout === setTimeout) {
  94877. //normal enviroments in sane situations
  94878. return setTimeout(fun, 0);
  94879. }
  94880. // if setTimeout wasn't available but was latter defined
  94881. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  94882. cachedSetTimeout = setTimeout;
  94883. return setTimeout(fun, 0);
  94884. }
  94885. try {
  94886. // when when somebody has screwed with setTimeout but no I.E. maddness
  94887. return cachedSetTimeout(fun, 0);
  94888. } catch(e){
  94889. try {
  94890. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  94891. return cachedSetTimeout.call(null, fun, 0);
  94892. } catch(e){
  94893. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  94894. return cachedSetTimeout.call(this, fun, 0);
  94895. }
  94896. }
  94897. }
  94898. function runClearTimeout(marker) {
  94899. if (cachedClearTimeout === clearTimeout) {
  94900. //normal enviroments in sane situations
  94901. return clearTimeout(marker);
  94902. }
  94903. // if clearTimeout wasn't available but was latter defined
  94904. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  94905. cachedClearTimeout = clearTimeout;
  94906. return clearTimeout(marker);
  94907. }
  94908. try {
  94909. // when when somebody has screwed with setTimeout but no I.E. maddness
  94910. return cachedClearTimeout(marker);
  94911. } catch (e){
  94912. try {
  94913. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  94914. return cachedClearTimeout.call(null, marker);
  94915. } catch (e){
  94916. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  94917. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  94918. return cachedClearTimeout.call(this, marker);
  94919. }
  94920. }
  94921. }
  94922. var queue = [];
  94923. var draining = false;
  94924. var currentQueue;
  94925. var queueIndex = -1;
  94926. function cleanUpNextTick() {
  94927. if (!draining || !currentQueue) {
  94928. return;
  94929. }
  94930. draining = false;
  94931. if (currentQueue.length) {
  94932. queue = currentQueue.concat(queue);
  94933. } else {
  94934. queueIndex = -1;
  94935. }
  94936. if (queue.length) {
  94937. drainQueue();
  94938. }
  94939. }
  94940. function drainQueue() {
  94941. if (draining) {
  94942. return;
  94943. }
  94944. var timeout = runTimeout(cleanUpNextTick);
  94945. draining = true;
  94946. var len = queue.length;
  94947. while(len) {
  94948. currentQueue = queue;
  94949. queue = [];
  94950. while (++queueIndex < len) {
  94951. if (currentQueue) {
  94952. currentQueue[queueIndex].run();
  94953. }
  94954. }
  94955. queueIndex = -1;
  94956. len = queue.length;
  94957. }
  94958. currentQueue = null;
  94959. draining = false;
  94960. runClearTimeout(timeout);
  94961. }
  94962. process.nextTick = function (fun) {
  94963. var args = new Array(arguments.length - 1);
  94964. if (arguments.length > 1) {
  94965. for (var i = 1; i < arguments.length; i++) {
  94966. args[i - 1] = arguments[i];
  94967. }
  94968. }
  94969. queue.push(new Item(fun, args));
  94970. if (queue.length === 1 && !draining) {
  94971. runTimeout(drainQueue);
  94972. }
  94973. };
  94974. // v8 likes predictible objects
  94975. function Item(fun, array) {
  94976. this.fun = fun;
  94977. this.array = array;
  94978. }
  94979. Item.prototype.run = function () {
  94980. this.fun.apply(null, this.array);
  94981. };
  94982. process.title = 'browser';
  94983. process.browser = true;
  94984. process.env = {};
  94985. process.argv = [];
  94986. process.version = ''; // empty string to avoid regexp issues
  94987. process.versions = {};
  94988. function noop() {}
  94989. process.on = noop;
  94990. process.addListener = noop;
  94991. process.once = noop;
  94992. process.off = noop;
  94993. process.removeListener = noop;
  94994. process.removeAllListeners = noop;
  94995. process.emit = noop;
  94996. process.prependListener = noop;
  94997. process.prependOnceListener = noop;
  94998. process.listeners = function (name) { return [] }
  94999. process.binding = function (name) {
  95000. throw new Error('process.binding is not supported');
  95001. };
  95002. process.cwd = function () { return '/' };
  95003. process.chdir = function (dir) {
  95004. throw new Error('process.chdir is not supported');
  95005. };
  95006. process.umask = function() { return 0; };
  95007. /***/ }),
  95008. /* 451 */
  95009. /***/ (function(module, exports, __webpack_require__) {
  95010. "use strict";
  95011. Object.defineProperty(exports, "__esModule", {
  95012. value: true
  95013. });
  95014. var render = function render() {
  95015. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_vm.label || _vm.$slots.label ? _c('label', { class: [_vm.prefixCls + '-label'], style: _vm.labelStyles, attrs: { "for": _vm.labelFor } }, [_vm._t("label", [_vm._v(_vm._s(_vm.label) + _vm._s(_vm.FormInstance.colon))])], 2) : _vm._e(), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-content'], style: _vm.contentStyles }, [_vm._t("default"), _vm._v(" "), _c('transition', { attrs: { "name": "fade" } }, [_vm.validateState === 'error' && _vm.showMessage && _vm.FormInstance.showMessage ? _c('div', { class: [_vm.prefixCls + '-error-tip'] }, [_vm._v(_vm._s(_vm.validateMessage))]) : _vm._e()])], 2)]);
  95016. };
  95017. var staticRenderFns = [];
  95018. exports.render = render;
  95019. exports.staticRenderFns = staticRenderFns;
  95020. /***/ }),
  95021. /* 452 */
  95022. /***/ (function(module, exports, __webpack_require__) {
  95023. "use strict";
  95024. Object.defineProperty(exports, "__esModule", {
  95025. value: true
  95026. });
  95027. var _header = __webpack_require__(192);
  95028. var _header2 = _interopRequireDefault(_header);
  95029. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  95030. exports.default = _header2.default;
  95031. /***/ }),
  95032. /* 453 */
  95033. /***/ (function(module, exports, __webpack_require__) {
  95034. "use strict";
  95035. Object.defineProperty(exports, "__esModule", {
  95036. value: true
  95037. });
  95038. var render = function render() {
  95039. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses }, [_vm._t("default")], 2);
  95040. };
  95041. var staticRenderFns = [];
  95042. exports.render = render;
  95043. exports.staticRenderFns = staticRenderFns;
  95044. /***/ }),
  95045. /* 454 */
  95046. /***/ (function(module, exports, __webpack_require__) {
  95047. "use strict";
  95048. Object.defineProperty(exports, "__esModule", {
  95049. value: true
  95050. });
  95051. var _input = __webpack_require__(38);
  95052. var _input2 = _interopRequireDefault(_input);
  95053. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  95054. exports.default = _input2.default;
  95055. /***/ }),
  95056. /* 455 */
  95057. /***/ (function(module, exports, __webpack_require__) {
  95058. "use strict";
  95059. Object.defineProperty(exports, "__esModule", {
  95060. value: true
  95061. });
  95062. var _inputNumber = __webpack_require__(194);
  95063. var _inputNumber2 = _interopRequireDefault(_inputNumber);
  95064. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  95065. exports.default = _inputNumber2.default;
  95066. /***/ }),
  95067. /* 456 */
  95068. /***/ (function(module, exports, __webpack_require__) {
  95069. "use strict";
  95070. Object.defineProperty(exports, "__esModule", {
  95071. value: true
  95072. });
  95073. var render = function render() {
  95074. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses }, [!_vm.controlsOutside ? _c('div', { class: _vm.handlerClasses }, [_c('a', { class: _vm.upClasses, on: { "click": _vm.up } }, [_c('span', { class: _vm.innerUpClasses, on: { "click": _vm.preventDefault } })]), _vm._v(" "), _c('a', { class: _vm.downClasses, on: { "click": _vm.down } }, [_c('span', { class: _vm.innerDownClasses, on: { "click": _vm.preventDefault } })])]) : _vm._e(), _vm._v(" "), _vm.controlsOutside ? _c('div', { staticClass: "ivu-input-number-controls-outside-btn ivu-input-number-controls-outside-down", class: { 'ivu-input-number-controls-outside-btn-disabled': _vm.downDisabled }, on: { "click": _vm.down } }, [_c('i', { staticClass: "ivu-icon ivu-icon-ios-remove" })]) : _vm._e(), _vm._v(" "), _vm.controlsOutside ? _c('div', { staticClass: "ivu-input-number-controls-outside-btn ivu-input-number-controls-outside-up", class: { 'ivu-input-number-controls-outside-btn-disabled': _vm.upDisabled }, on: { "click": _vm.up } }, [_c('i', { staticClass: "ivu-icon ivu-icon-ios-add" })]) : _vm._e(), _vm._v(" "), _c('div', { class: _vm.inputWrapClasses }, [_c('input', { class: _vm.inputClasses, attrs: { "id": _vm.elementId, "disabled": _vm.itemDisabled, "autocomplete": "off", "spellcheck": "false", "autofocus": _vm.autofocus, "readonly": _vm.readonly || !_vm.editable, "name": _vm.name, "placeholder": _vm.placeholder }, domProps: { "value": _vm.formatterValue }, on: { "focus": _vm.focus, "blur": _vm.blur, "keydown": function keydown($event) {
  95075. $event.stopPropagation();return _vm.keyDown($event);
  95076. }, "input": _vm.change, "mouseup": _vm.preventDefault, "change": _vm.change } })])]);
  95077. };
  95078. var staticRenderFns = [];
  95079. exports.render = render;
  95080. exports.staticRenderFns = staticRenderFns;
  95081. /***/ }),
  95082. /* 457 */
  95083. /***/ (function(module, exports, __webpack_require__) {
  95084. "use strict";
  95085. Object.defineProperty(exports, "__esModule", {
  95086. value: true
  95087. });
  95088. var _scroll = __webpack_require__(458);
  95089. var _scroll2 = _interopRequireDefault(_scroll);
  95090. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  95091. exports.default = _scroll2.default;
  95092. /***/ }),
  95093. /* 458 */
  95094. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  95095. "use strict";
  95096. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  95097. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_scroll_vue__ = __webpack_require__(196);
  95098. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_scroll_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_scroll_vue__);
  95099. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_scroll_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_scroll_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  95100. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8b51c556_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_scroll_vue__ = __webpack_require__(467);
  95101. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8b51c556_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_scroll_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8b51c556_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_scroll_vue__);
  95102. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  95103. /* script */
  95104. /* template */
  95105. /* template functional */
  95106. var __vue_template_functional__ = false
  95107. /* styles */
  95108. var __vue_styles__ = null
  95109. /* scopeId */
  95110. var __vue_scopeId__ = null
  95111. /* moduleIdentifier (server only) */
  95112. var __vue_module_identifier__ = null
  95113. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  95114. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_scroll_vue___default.a,
  95115. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8b51c556_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_scroll_vue__["render"],
  95116. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8b51c556_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_scroll_vue__["staticRenderFns"],
  95117. __vue_template_functional__,
  95118. __vue_styles__,
  95119. __vue_scopeId__,
  95120. __vue_module_identifier__
  95121. )
  95122. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  95123. /***/ }),
  95124. /* 459 */
  95125. /***/ (function(module, exports, __webpack_require__) {
  95126. module.exports = { "default": __webpack_require__(460), __esModule: true };
  95127. /***/ }),
  95128. /* 460 */
  95129. /***/ (function(module, exports, __webpack_require__) {
  95130. __webpack_require__(461);
  95131. module.exports = __webpack_require__(5).Math.sign;
  95132. /***/ }),
  95133. /* 461 */
  95134. /***/ (function(module, exports, __webpack_require__) {
  95135. // 20.2.2.28 Math.sign(x)
  95136. var $export = __webpack_require__(7);
  95137. $export($export.S, 'Math', { sign: __webpack_require__(462) });
  95138. /***/ }),
  95139. /* 462 */
  95140. /***/ (function(module, exports) {
  95141. // 20.2.2.28 Math.sign(x)
  95142. module.exports = Math.sign || function sign(x) {
  95143. // eslint-disable-next-line no-self-compare
  95144. return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
  95145. };
  95146. /***/ }),
  95147. /* 463 */
  95148. /***/ (function(module, exports, __webpack_require__) {
  95149. /* WEBPACK VAR INJECTION */(function(global) {/**
  95150. * lodash (Custom Build) <https://lodash.com/>
  95151. * Build: `lodash modularize exports="npm" -o ./`
  95152. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  95153. * Released under MIT license <https://lodash.com/license>
  95154. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  95155. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  95156. */
  95157. /** Used as the `TypeError` message for "Functions" methods. */
  95158. var FUNC_ERROR_TEXT = 'Expected a function';
  95159. /** Used as references for various `Number` constants. */
  95160. var NAN = 0 / 0;
  95161. /** `Object#toString` result references. */
  95162. var symbolTag = '[object Symbol]';
  95163. /** Used to match leading and trailing whitespace. */
  95164. var reTrim = /^\s+|\s+$/g;
  95165. /** Used to detect bad signed hexadecimal string values. */
  95166. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  95167. /** Used to detect binary string values. */
  95168. var reIsBinary = /^0b[01]+$/i;
  95169. /** Used to detect octal string values. */
  95170. var reIsOctal = /^0o[0-7]+$/i;
  95171. /** Built-in method references without a dependency on `root`. */
  95172. var freeParseInt = parseInt;
  95173. /** Detect free variable `global` from Node.js. */
  95174. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  95175. /** Detect free variable `self`. */
  95176. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  95177. /** Used as a reference to the global object. */
  95178. var root = freeGlobal || freeSelf || Function('return this')();
  95179. /** Used for built-in method references. */
  95180. var objectProto = Object.prototype;
  95181. /**
  95182. * Used to resolve the
  95183. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  95184. * of values.
  95185. */
  95186. var objectToString = objectProto.toString;
  95187. /* Built-in method references for those with the same name as other `lodash` methods. */
  95188. var nativeMax = Math.max,
  95189. nativeMin = Math.min;
  95190. /**
  95191. * Gets the timestamp of the number of milliseconds that have elapsed since
  95192. * the Unix epoch (1 January 1970 00:00:00 UTC).
  95193. *
  95194. * @static
  95195. * @memberOf _
  95196. * @since 2.4.0
  95197. * @category Date
  95198. * @returns {number} Returns the timestamp.
  95199. * @example
  95200. *
  95201. * _.defer(function(stamp) {
  95202. * console.log(_.now() - stamp);
  95203. * }, _.now());
  95204. * // => Logs the number of milliseconds it took for the deferred invocation.
  95205. */
  95206. var now = function() {
  95207. return root.Date.now();
  95208. };
  95209. /**
  95210. * Creates a debounced function that delays invoking `func` until after `wait`
  95211. * milliseconds have elapsed since the last time the debounced function was
  95212. * invoked. The debounced function comes with a `cancel` method to cancel
  95213. * delayed `func` invocations and a `flush` method to immediately invoke them.
  95214. * Provide `options` to indicate whether `func` should be invoked on the
  95215. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  95216. * with the last arguments provided to the debounced function. Subsequent
  95217. * calls to the debounced function return the result of the last `func`
  95218. * invocation.
  95219. *
  95220. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  95221. * invoked on the trailing edge of the timeout only if the debounced function
  95222. * is invoked more than once during the `wait` timeout.
  95223. *
  95224. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  95225. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  95226. *
  95227. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  95228. * for details over the differences between `_.debounce` and `_.throttle`.
  95229. *
  95230. * @static
  95231. * @memberOf _
  95232. * @since 0.1.0
  95233. * @category Function
  95234. * @param {Function} func The function to debounce.
  95235. * @param {number} [wait=0] The number of milliseconds to delay.
  95236. * @param {Object} [options={}] The options object.
  95237. * @param {boolean} [options.leading=false]
  95238. * Specify invoking on the leading edge of the timeout.
  95239. * @param {number} [options.maxWait]
  95240. * The maximum time `func` is allowed to be delayed before it's invoked.
  95241. * @param {boolean} [options.trailing=true]
  95242. * Specify invoking on the trailing edge of the timeout.
  95243. * @returns {Function} Returns the new debounced function.
  95244. * @example
  95245. *
  95246. * // Avoid costly calculations while the window size is in flux.
  95247. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  95248. *
  95249. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  95250. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  95251. * 'leading': true,
  95252. * 'trailing': false
  95253. * }));
  95254. *
  95255. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  95256. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  95257. * var source = new EventSource('/stream');
  95258. * jQuery(source).on('message', debounced);
  95259. *
  95260. * // Cancel the trailing debounced invocation.
  95261. * jQuery(window).on('popstate', debounced.cancel);
  95262. */
  95263. function debounce(func, wait, options) {
  95264. var lastArgs,
  95265. lastThis,
  95266. maxWait,
  95267. result,
  95268. timerId,
  95269. lastCallTime,
  95270. lastInvokeTime = 0,
  95271. leading = false,
  95272. maxing = false,
  95273. trailing = true;
  95274. if (typeof func != 'function') {
  95275. throw new TypeError(FUNC_ERROR_TEXT);
  95276. }
  95277. wait = toNumber(wait) || 0;
  95278. if (isObject(options)) {
  95279. leading = !!options.leading;
  95280. maxing = 'maxWait' in options;
  95281. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  95282. trailing = 'trailing' in options ? !!options.trailing : trailing;
  95283. }
  95284. function invokeFunc(time) {
  95285. var args = lastArgs,
  95286. thisArg = lastThis;
  95287. lastArgs = lastThis = undefined;
  95288. lastInvokeTime = time;
  95289. result = func.apply(thisArg, args);
  95290. return result;
  95291. }
  95292. function leadingEdge(time) {
  95293. // Reset any `maxWait` timer.
  95294. lastInvokeTime = time;
  95295. // Start the timer for the trailing edge.
  95296. timerId = setTimeout(timerExpired, wait);
  95297. // Invoke the leading edge.
  95298. return leading ? invokeFunc(time) : result;
  95299. }
  95300. function remainingWait(time) {
  95301. var timeSinceLastCall = time - lastCallTime,
  95302. timeSinceLastInvoke = time - lastInvokeTime,
  95303. result = wait - timeSinceLastCall;
  95304. return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
  95305. }
  95306. function shouldInvoke(time) {
  95307. var timeSinceLastCall = time - lastCallTime,
  95308. timeSinceLastInvoke = time - lastInvokeTime;
  95309. // Either this is the first call, activity has stopped and we're at the
  95310. // trailing edge, the system time has gone backwards and we're treating
  95311. // it as the trailing edge, or we've hit the `maxWait` limit.
  95312. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  95313. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  95314. }
  95315. function timerExpired() {
  95316. var time = now();
  95317. if (shouldInvoke(time)) {
  95318. return trailingEdge(time);
  95319. }
  95320. // Restart the timer.
  95321. timerId = setTimeout(timerExpired, remainingWait(time));
  95322. }
  95323. function trailingEdge(time) {
  95324. timerId = undefined;
  95325. // Only invoke if we have `lastArgs` which means `func` has been
  95326. // debounced at least once.
  95327. if (trailing && lastArgs) {
  95328. return invokeFunc(time);
  95329. }
  95330. lastArgs = lastThis = undefined;
  95331. return result;
  95332. }
  95333. function cancel() {
  95334. if (timerId !== undefined) {
  95335. clearTimeout(timerId);
  95336. }
  95337. lastInvokeTime = 0;
  95338. lastArgs = lastCallTime = lastThis = timerId = undefined;
  95339. }
  95340. function flush() {
  95341. return timerId === undefined ? result : trailingEdge(now());
  95342. }
  95343. function debounced() {
  95344. var time = now(),
  95345. isInvoking = shouldInvoke(time);
  95346. lastArgs = arguments;
  95347. lastThis = this;
  95348. lastCallTime = time;
  95349. if (isInvoking) {
  95350. if (timerId === undefined) {
  95351. return leadingEdge(lastCallTime);
  95352. }
  95353. if (maxing) {
  95354. // Handle invocations in a tight loop.
  95355. timerId = setTimeout(timerExpired, wait);
  95356. return invokeFunc(lastCallTime);
  95357. }
  95358. }
  95359. if (timerId === undefined) {
  95360. timerId = setTimeout(timerExpired, wait);
  95361. }
  95362. return result;
  95363. }
  95364. debounced.cancel = cancel;
  95365. debounced.flush = flush;
  95366. return debounced;
  95367. }
  95368. /**
  95369. * Creates a throttled function that only invokes `func` at most once per
  95370. * every `wait` milliseconds. The throttled function comes with a `cancel`
  95371. * method to cancel delayed `func` invocations and a `flush` method to
  95372. * immediately invoke them. Provide `options` to indicate whether `func`
  95373. * should be invoked on the leading and/or trailing edge of the `wait`
  95374. * timeout. The `func` is invoked with the last arguments provided to the
  95375. * throttled function. Subsequent calls to the throttled function return the
  95376. * result of the last `func` invocation.
  95377. *
  95378. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  95379. * invoked on the trailing edge of the timeout only if the throttled function
  95380. * is invoked more than once during the `wait` timeout.
  95381. *
  95382. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  95383. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  95384. *
  95385. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  95386. * for details over the differences between `_.throttle` and `_.debounce`.
  95387. *
  95388. * @static
  95389. * @memberOf _
  95390. * @since 0.1.0
  95391. * @category Function
  95392. * @param {Function} func The function to throttle.
  95393. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  95394. * @param {Object} [options={}] The options object.
  95395. * @param {boolean} [options.leading=true]
  95396. * Specify invoking on the leading edge of the timeout.
  95397. * @param {boolean} [options.trailing=true]
  95398. * Specify invoking on the trailing edge of the timeout.
  95399. * @returns {Function} Returns the new throttled function.
  95400. * @example
  95401. *
  95402. * // Avoid excessively updating the position while scrolling.
  95403. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  95404. *
  95405. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  95406. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  95407. * jQuery(element).on('click', throttled);
  95408. *
  95409. * // Cancel the trailing throttled invocation.
  95410. * jQuery(window).on('popstate', throttled.cancel);
  95411. */
  95412. function throttle(func, wait, options) {
  95413. var leading = true,
  95414. trailing = true;
  95415. if (typeof func != 'function') {
  95416. throw new TypeError(FUNC_ERROR_TEXT);
  95417. }
  95418. if (isObject(options)) {
  95419. leading = 'leading' in options ? !!options.leading : leading;
  95420. trailing = 'trailing' in options ? !!options.trailing : trailing;
  95421. }
  95422. return debounce(func, wait, {
  95423. 'leading': leading,
  95424. 'maxWait': wait,
  95425. 'trailing': trailing
  95426. });
  95427. }
  95428. /**
  95429. * Checks if `value` is the
  95430. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  95431. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  95432. *
  95433. * @static
  95434. * @memberOf _
  95435. * @since 0.1.0
  95436. * @category Lang
  95437. * @param {*} value The value to check.
  95438. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  95439. * @example
  95440. *
  95441. * _.isObject({});
  95442. * // => true
  95443. *
  95444. * _.isObject([1, 2, 3]);
  95445. * // => true
  95446. *
  95447. * _.isObject(_.noop);
  95448. * // => true
  95449. *
  95450. * _.isObject(null);
  95451. * // => false
  95452. */
  95453. function isObject(value) {
  95454. var type = typeof value;
  95455. return !!value && (type == 'object' || type == 'function');
  95456. }
  95457. /**
  95458. * Checks if `value` is object-like. A value is object-like if it's not `null`
  95459. * and has a `typeof` result of "object".
  95460. *
  95461. * @static
  95462. * @memberOf _
  95463. * @since 4.0.0
  95464. * @category Lang
  95465. * @param {*} value The value to check.
  95466. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  95467. * @example
  95468. *
  95469. * _.isObjectLike({});
  95470. * // => true
  95471. *
  95472. * _.isObjectLike([1, 2, 3]);
  95473. * // => true
  95474. *
  95475. * _.isObjectLike(_.noop);
  95476. * // => false
  95477. *
  95478. * _.isObjectLike(null);
  95479. * // => false
  95480. */
  95481. function isObjectLike(value) {
  95482. return !!value && typeof value == 'object';
  95483. }
  95484. /**
  95485. * Checks if `value` is classified as a `Symbol` primitive or object.
  95486. *
  95487. * @static
  95488. * @memberOf _
  95489. * @since 4.0.0
  95490. * @category Lang
  95491. * @param {*} value The value to check.
  95492. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  95493. * @example
  95494. *
  95495. * _.isSymbol(Symbol.iterator);
  95496. * // => true
  95497. *
  95498. * _.isSymbol('abc');
  95499. * // => false
  95500. */
  95501. function isSymbol(value) {
  95502. return typeof value == 'symbol' ||
  95503. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  95504. }
  95505. /**
  95506. * Converts `value` to a number.
  95507. *
  95508. * @static
  95509. * @memberOf _
  95510. * @since 4.0.0
  95511. * @category Lang
  95512. * @param {*} value The value to process.
  95513. * @returns {number} Returns the number.
  95514. * @example
  95515. *
  95516. * _.toNumber(3.2);
  95517. * // => 3.2
  95518. *
  95519. * _.toNumber(Number.MIN_VALUE);
  95520. * // => 5e-324
  95521. *
  95522. * _.toNumber(Infinity);
  95523. * // => Infinity
  95524. *
  95525. * _.toNumber('3.2');
  95526. * // => 3.2
  95527. */
  95528. function toNumber(value) {
  95529. if (typeof value == 'number') {
  95530. return value;
  95531. }
  95532. if (isSymbol(value)) {
  95533. return NAN;
  95534. }
  95535. if (isObject(value)) {
  95536. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  95537. value = isObject(other) ? (other + '') : other;
  95538. }
  95539. if (typeof value != 'string') {
  95540. return value === 0 ? value : +value;
  95541. }
  95542. value = value.replace(reTrim, '');
  95543. var isBinary = reIsBinary.test(value);
  95544. return (isBinary || reIsOctal.test(value))
  95545. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  95546. : (reIsBadHex.test(value) ? NAN : +value);
  95547. }
  95548. module.exports = throttle;
  95549. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(117)))
  95550. /***/ }),
  95551. /* 464 */
  95552. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  95553. "use strict";
  95554. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  95555. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_component_vue__ = __webpack_require__(197);
  95556. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_component_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_component_vue__);
  95557. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_component_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_component_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  95558. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4cec29bd_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_loading_component_vue__ = __webpack_require__(466);
  95559. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4cec29bd_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_loading_component_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4cec29bd_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_loading_component_vue__);
  95560. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  95561. /* script */
  95562. /* template */
  95563. /* template functional */
  95564. var __vue_template_functional__ = false
  95565. /* styles */
  95566. var __vue_styles__ = null
  95567. /* scopeId */
  95568. var __vue_scopeId__ = null
  95569. /* moduleIdentifier (server only) */
  95570. var __vue_module_identifier__ = null
  95571. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  95572. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_component_vue___default.a,
  95573. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4cec29bd_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_loading_component_vue__["render"],
  95574. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4cec29bd_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_loading_component_vue__["staticRenderFns"],
  95575. __vue_template_functional__,
  95576. __vue_styles__,
  95577. __vue_scopeId__,
  95578. __vue_module_identifier__
  95579. )
  95580. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  95581. /***/ }),
  95582. /* 465 */
  95583. /***/ (function(module, exports, __webpack_require__) {
  95584. "use strict";
  95585. Object.defineProperty(exports, "__esModule", {
  95586. value: true
  95587. });
  95588. var render = function render() {
  95589. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('transition', { attrs: { "name": "fade" } }, [_vm.fullscreenVisible ? _c('div', { class: _vm.classes }, [_c('div', { class: _vm.mainClasses }, [_c('span', { class: _vm.dotClasses }), _vm._v(" "), _c('div', { class: _vm.textClasses }, [_vm._t("default")], 2)])]) : _vm._e()]);
  95590. };
  95591. var staticRenderFns = [];
  95592. exports.render = render;
  95593. exports.staticRenderFns = staticRenderFns;
  95594. /***/ }),
  95595. /* 466 */
  95596. /***/ (function(module, exports, __webpack_require__) {
  95597. "use strict";
  95598. Object.defineProperty(exports, "__esModule", {
  95599. value: true
  95600. });
  95601. var render = function render() {
  95602. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapperClasses }, [_c('div', { class: _vm.spinnerClasses }, [_c('Spin', { attrs: { "fix": "" } }, [_c('Icon', { class: _vm.iconClasses, attrs: { "type": "ios-loading", "size": "18" } }), _vm._v(" "), _vm.text ? _c('div', { class: _vm.textClasses }, [_vm._v(_vm._s(_vm.text))]) : _vm._e()], 1)], 1)]);
  95603. };
  95604. var staticRenderFns = [];
  95605. exports.render = render;
  95606. exports.staticRenderFns = staticRenderFns;
  95607. /***/ }),
  95608. /* 467 */
  95609. /***/ (function(module, exports, __webpack_require__) {
  95610. "use strict";
  95611. Object.defineProperty(exports, "__esModule", {
  95612. value: true
  95613. });
  95614. var render = function render() {
  95615. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses, staticStyle: { "touch-action": "none" } }, [_c('div', { ref: "scrollContainer", class: _vm.scrollContainerClasses, style: { height: _vm.height + 'px' }, on: { "scroll": _vm.handleScroll, "wheel": _vm.onWheel, "touchstart": _vm.onPointerDown } }, [_c('div', { ref: "toploader", class: _vm.loaderClasses, style: { paddingTop: _vm.wrapperPadding.paddingTop } }, [_c('loader', { attrs: { "text": _vm.localeLoadingText, "active": _vm.showTopLoader } })], 1), _vm._v(" "), _c('div', { ref: "scrollContent", class: _vm.slotContainerClasses }, [_vm._t("default")], 2), _vm._v(" "), _c('div', { ref: "bottomLoader", class: _vm.loaderClasses, style: { paddingBottom: _vm.wrapperPadding.paddingBottom } }, [_c('loader', { attrs: { "text": _vm.localeLoadingText, "active": _vm.showBottomLoader } })], 1)])]);
  95616. };
  95617. var staticRenderFns = [];
  95618. exports.render = render;
  95619. exports.staticRenderFns = staticRenderFns;
  95620. /***/ }),
  95621. /* 468 */
  95622. /***/ (function(module, exports, __webpack_require__) {
  95623. "use strict";
  95624. Object.defineProperty(exports, "__esModule", {
  95625. value: true
  95626. });
  95627. var _split = __webpack_require__(469);
  95628. var _split2 = _interopRequireDefault(_split);
  95629. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  95630. exports.default = _split2.default;
  95631. /***/ }),
  95632. /* 469 */
  95633. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  95634. "use strict";
  95635. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  95636. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_split_vue__ = __webpack_require__(199);
  95637. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_split_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_split_vue__);
  95638. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_split_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_split_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  95639. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70c87a13_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_split_vue__ = __webpack_require__(472);
  95640. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70c87a13_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_split_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70c87a13_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_split_vue__);
  95641. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  95642. /* script */
  95643. /* template */
  95644. /* template functional */
  95645. var __vue_template_functional__ = false
  95646. /* styles */
  95647. var __vue_styles__ = null
  95648. /* scopeId */
  95649. var __vue_scopeId__ = null
  95650. /* moduleIdentifier (server only) */
  95651. var __vue_module_identifier__ = null
  95652. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  95653. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_split_vue___default.a,
  95654. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70c87a13_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_split_vue__["render"],
  95655. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_70c87a13_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_split_vue__["staticRenderFns"],
  95656. __vue_template_functional__,
  95657. __vue_styles__,
  95658. __vue_scopeId__,
  95659. __vue_module_identifier__
  95660. )
  95661. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  95662. /***/ }),
  95663. /* 470 */
  95664. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  95665. "use strict";
  95666. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  95667. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_trigger_vue__ = __webpack_require__(200);
  95668. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_trigger_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_trigger_vue__);
  95669. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_trigger_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_trigger_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  95670. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0291c3a0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_trigger_vue__ = __webpack_require__(471);
  95671. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0291c3a0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_trigger_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0291c3a0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_trigger_vue__);
  95672. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  95673. /* script */
  95674. /* template */
  95675. /* template functional */
  95676. var __vue_template_functional__ = false
  95677. /* styles */
  95678. var __vue_styles__ = null
  95679. /* scopeId */
  95680. var __vue_scopeId__ = null
  95681. /* moduleIdentifier (server only) */
  95682. var __vue_module_identifier__ = null
  95683. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  95684. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_trigger_vue___default.a,
  95685. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0291c3a0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_trigger_vue__["render"],
  95686. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0291c3a0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_trigger_vue__["staticRenderFns"],
  95687. __vue_template_functional__,
  95688. __vue_styles__,
  95689. __vue_scopeId__,
  95690. __vue_module_identifier__
  95691. )
  95692. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  95693. /***/ }),
  95694. /* 471 */
  95695. /***/ (function(module, exports, __webpack_require__) {
  95696. "use strict";
  95697. Object.defineProperty(exports, "__esModule", {
  95698. value: true
  95699. });
  95700. var render = function render() {
  95701. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_c('div', { class: _vm.barConClasses }, _vm._m(0), 0)]);
  95702. };
  95703. var staticRenderFns = [function () {
  95704. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _vm._l(8, function (i) {
  95705. return _c('i', { key: "trigger-" + i, class: _vm.prefix + "-bar" });
  95706. });
  95707. }];
  95708. exports.render = render;
  95709. exports.staticRenderFns = staticRenderFns;
  95710. /***/ }),
  95711. /* 472 */
  95712. /***/ (function(module, exports, __webpack_require__) {
  95713. "use strict";
  95714. Object.defineProperty(exports, "__esModule", {
  95715. value: true
  95716. });
  95717. var render = function render() {
  95718. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { ref: "outerWrapper", class: _vm.wrapperClasses }, [_vm.isHorizontal ? _c('div', { class: _vm.prefix + "-horizontal" }, [_c('div', { staticClass: "left-pane", class: _vm.paneClasses, style: { right: _vm.anotherOffset + "%" } }, [_vm._t("left")], 2), _vm._v(" "), _c('div', { class: _vm.prefix + "-trigger-con", style: { left: _vm.offset + "%" }, on: { "mousedown": _vm.handleMousedown } }, [_vm._t("trigger", [_c('trigger', { attrs: { "mode": "vertical" } })])], 2), _vm._v(" "), _c('div', { staticClass: "right-pane", class: _vm.paneClasses, style: { left: _vm.offset + "%" } }, [_vm._t("right")], 2)]) : _c('div', { class: _vm.prefix + "-vertical" }, [_c('div', { staticClass: "top-pane", class: _vm.paneClasses, style: { bottom: _vm.anotherOffset + "%" } }, [_vm._t("top")], 2), _vm._v(" "), _c('div', { class: _vm.prefix + "-trigger-con", style: { top: _vm.offset + "%" }, on: { "mousedown": _vm.handleMousedown } }, [_vm._t("trigger", [_c('trigger', { attrs: { "mode": "horizontal" } })])], 2), _vm._v(" "), _c('div', { staticClass: "bottom-pane", class: _vm.paneClasses, style: { top: _vm.offset + "%" } }, [_vm._t("bottom")], 2)])]);
  95719. };
  95720. var staticRenderFns = [];
  95721. exports.render = render;
  95722. exports.staticRenderFns = staticRenderFns;
  95723. /***/ }),
  95724. /* 473 */
  95725. /***/ (function(module, exports, __webpack_require__) {
  95726. "use strict";
  95727. Object.defineProperty(exports, "__esModule", {
  95728. value: true
  95729. });
  95730. var _layout = __webpack_require__(474);
  95731. var _layout2 = _interopRequireDefault(_layout);
  95732. var _header = __webpack_require__(192);
  95733. var _header2 = _interopRequireDefault(_header);
  95734. var _sider = __webpack_require__(202);
  95735. var _sider2 = _interopRequireDefault(_sider);
  95736. var _content = __webpack_require__(155);
  95737. var _content2 = _interopRequireDefault(_content);
  95738. var _footer = __webpack_require__(182);
  95739. var _footer2 = _interopRequireDefault(_footer);
  95740. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  95741. _layout2.default.Header = _header2.default;
  95742. _layout2.default.Sider = _sider2.default;
  95743. _layout2.default.Content = _content2.default;
  95744. _layout2.default.Footer = _footer2.default;
  95745. exports.default = _layout2.default;
  95746. /***/ }),
  95747. /* 474 */
  95748. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  95749. "use strict";
  95750. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  95751. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_layout_vue__ = __webpack_require__(201);
  95752. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_layout_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_layout_vue__);
  95753. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_layout_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_layout_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  95754. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_56315e54_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_layout_vue__ = __webpack_require__(475);
  95755. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_56315e54_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_layout_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_56315e54_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_layout_vue__);
  95756. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  95757. /* script */
  95758. /* template */
  95759. /* template functional */
  95760. var __vue_template_functional__ = false
  95761. /* styles */
  95762. var __vue_styles__ = null
  95763. /* scopeId */
  95764. var __vue_scopeId__ = null
  95765. /* moduleIdentifier (server only) */
  95766. var __vue_module_identifier__ = null
  95767. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  95768. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_layout_vue___default.a,
  95769. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_56315e54_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_layout_vue__["render"],
  95770. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_56315e54_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_layout_vue__["staticRenderFns"],
  95771. __vue_template_functional__,
  95772. __vue_styles__,
  95773. __vue_scopeId__,
  95774. __vue_module_identifier__
  95775. )
  95776. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  95777. /***/ }),
  95778. /* 475 */
  95779. /***/ (function(module, exports, __webpack_require__) {
  95780. "use strict";
  95781. Object.defineProperty(exports, "__esModule", {
  95782. value: true
  95783. });
  95784. var render = function render() {
  95785. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses }, [_vm._t("default")], 2);
  95786. };
  95787. var staticRenderFns = [];
  95788. exports.render = render;
  95789. exports.staticRenderFns = staticRenderFns;
  95790. /***/ }),
  95791. /* 476 */
  95792. /***/ (function(module, exports, __webpack_require__) {
  95793. "use strict";
  95794. Object.defineProperty(exports, "__esModule", {
  95795. value: true
  95796. });
  95797. var render = function render() {
  95798. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses, style: _vm.wrapStyles }, [_c('span', { directives: [{ name: "show", rawName: "v-show", value: _vm.showZeroTrigger, expression: "showZeroTrigger" }], class: _vm.zeroWidthTriggerClasses, on: { "click": _vm.toggleCollapse } }, [_c('i', { staticClass: "ivu-icon ivu-icon-ios-menu" })]), _vm._v(" "), _c('div', { class: _vm.childClasses }, [_vm._t("default")], 2), _vm._v(" "), _vm._t("trigger", [_c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.showBottomTrigger, expression: "showBottomTrigger" }], class: _vm.triggerClasses, style: { width: _vm.siderWidth + 'px' }, on: { "click": _vm.toggleCollapse } }, [_c('i', { class: _vm.triggerIconClasses })])])], 2);
  95799. };
  95800. var staticRenderFns = [];
  95801. exports.render = render;
  95802. exports.staticRenderFns = staticRenderFns;
  95803. /***/ }),
  95804. /* 477 */
  95805. /***/ (function(module, exports, __webpack_require__) {
  95806. "use strict";
  95807. Object.defineProperty(exports, "__esModule", {
  95808. value: true
  95809. });
  95810. var _list = __webpack_require__(478);
  95811. var _list2 = _interopRequireDefault(_list);
  95812. var _listItem = __webpack_require__(480);
  95813. var _listItem2 = _interopRequireDefault(_listItem);
  95814. var _listItemMeta = __webpack_require__(482);
  95815. var _listItemMeta2 = _interopRequireDefault(_listItemMeta);
  95816. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  95817. _list2.default.Item = _listItem2.default;
  95818. _list2.default.Item.Meta = _listItemMeta2.default;
  95819. exports.default = _list2.default;
  95820. /***/ }),
  95821. /* 478 */
  95822. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  95823. "use strict";
  95824. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  95825. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue__ = __webpack_require__(204);
  95826. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue__);
  95827. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  95828. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c78b22c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_vue__ = __webpack_require__(479);
  95829. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c78b22c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c78b22c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_vue__);
  95830. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  95831. /* script */
  95832. /* template */
  95833. /* template functional */
  95834. var __vue_template_functional__ = false
  95835. /* styles */
  95836. var __vue_styles__ = null
  95837. /* scopeId */
  95838. var __vue_scopeId__ = null
  95839. /* moduleIdentifier (server only) */
  95840. var __vue_module_identifier__ = null
  95841. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  95842. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue___default.a,
  95843. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c78b22c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_vue__["render"],
  95844. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c78b22c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_vue__["staticRenderFns"],
  95845. __vue_template_functional__,
  95846. __vue_styles__,
  95847. __vue_scopeId__,
  95848. __vue_module_identifier__
  95849. )
  95850. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  95851. /***/ }),
  95852. /* 479 */
  95853. /***/ (function(module, exports, __webpack_require__) {
  95854. "use strict";
  95855. Object.defineProperty(exports, "__esModule", {
  95856. value: true
  95857. });
  95858. var render = function render() {
  95859. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_vm.header || _vm.$slots.header ? _c('div', { staticClass: "ivu-list-header" }, [_vm._t("header", [_vm._v(_vm._s(_vm.header))])], 2) : _vm._e(), _vm._v(" "), _c('div', { staticClass: "ivu-list-container" }, [_c('ul', { staticClass: "ivu-list-items" }, [_vm._t("default")], 2)]), _vm._v(" "), _vm.loading ? _c('Spin', { attrs: { "fix": "", "size": "large" } }, [_vm._t("spin")], 2) : _vm._e(), _vm._v(" "), _vm.footer || _vm.$slots.footer ? _c('div', { staticClass: "ivu-list-footer" }, [_vm._t("footer", [_vm._v(_vm._s(_vm.footer))])], 2) : _vm._e()], 1);
  95860. };
  95861. var staticRenderFns = [];
  95862. exports.render = render;
  95863. exports.staticRenderFns = staticRenderFns;
  95864. /***/ }),
  95865. /* 480 */
  95866. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  95867. "use strict";
  95868. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  95869. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_vue__ = __webpack_require__(205);
  95870. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_vue__);
  95871. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  95872. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3e180205_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_item_vue__ = __webpack_require__(481);
  95873. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3e180205_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3e180205_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_item_vue__);
  95874. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  95875. /* script */
  95876. /* template */
  95877. /* template functional */
  95878. var __vue_template_functional__ = false
  95879. /* styles */
  95880. var __vue_styles__ = null
  95881. /* scopeId */
  95882. var __vue_scopeId__ = null
  95883. /* moduleIdentifier (server only) */
  95884. var __vue_module_identifier__ = null
  95885. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  95886. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_vue___default.a,
  95887. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3e180205_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_item_vue__["render"],
  95888. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3e180205_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_item_vue__["staticRenderFns"],
  95889. __vue_template_functional__,
  95890. __vue_styles__,
  95891. __vue_scopeId__,
  95892. __vue_module_identifier__
  95893. )
  95894. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  95895. /***/ }),
  95896. /* 481 */
  95897. /***/ (function(module, exports, __webpack_require__) {
  95898. "use strict";
  95899. Object.defineProperty(exports, "__esModule", {
  95900. value: true
  95901. });
  95902. var render = function render() {
  95903. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('li', { staticClass: "ivu-list-item", class: _vm.classes }, [_vm.itemLayout === 'vertical' && _vm.$slots.extra ? [_c('div', { staticClass: "ivu-list-item-main" }, [_vm._t("default"), _vm._v(" "), _vm.$slots.action ? _c('ul', { staticClass: "ivu-list-item-action" }, [_vm._t("action")], 2) : _vm._e()], 2), _vm._v(" "), _c('div', { staticClass: "ivu-list-item-extra" }, [_vm._t("extra")], 2)] : [_vm._t("default"), _vm._v(" "), _vm.$slots.action ? _c('ul', { staticClass: "ivu-list-item-action" }, [_vm._t("action")], 2) : _vm._e(), _vm._v(" "), _c('div', { staticClass: "ivu-list-item-extra" }, [_vm._t("extra")], 2)]], 2);
  95904. };
  95905. var staticRenderFns = [];
  95906. exports.render = render;
  95907. exports.staticRenderFns = staticRenderFns;
  95908. /***/ }),
  95909. /* 482 */
  95910. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  95911. "use strict";
  95912. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  95913. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_meta_vue__ = __webpack_require__(206);
  95914. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_meta_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_meta_vue__);
  95915. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_meta_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_meta_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  95916. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_52a75980_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_item_meta_vue__ = __webpack_require__(483);
  95917. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_52a75980_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_item_meta_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_52a75980_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_item_meta_vue__);
  95918. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  95919. /* script */
  95920. /* template */
  95921. /* template functional */
  95922. var __vue_template_functional__ = false
  95923. /* styles */
  95924. var __vue_styles__ = null
  95925. /* scopeId */
  95926. var __vue_scopeId__ = null
  95927. /* moduleIdentifier (server only) */
  95928. var __vue_module_identifier__ = null
  95929. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  95930. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_item_meta_vue___default.a,
  95931. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_52a75980_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_item_meta_vue__["render"],
  95932. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_52a75980_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_item_meta_vue__["staticRenderFns"],
  95933. __vue_template_functional__,
  95934. __vue_styles__,
  95935. __vue_scopeId__,
  95936. __vue_module_identifier__
  95937. )
  95938. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  95939. /***/ }),
  95940. /* 483 */
  95941. /***/ (function(module, exports, __webpack_require__) {
  95942. "use strict";
  95943. Object.defineProperty(exports, "__esModule", {
  95944. value: true
  95945. });
  95946. var render = function render() {
  95947. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: "ivu-list-item-meta" }, [_vm.avatar || _vm.$slots.avatar ? _c('div', { staticClass: "ivu-list-item-meta-avatar" }, [_vm._t("avatar", [_c('Avatar', { attrs: { "src": _vm.avatar } })])], 2) : _vm._e(), _vm._v(" "), _c('div', { staticClass: "ivu-list-item-meta-content" }, [_vm.title || _vm.$slots.title ? _c('div', { staticClass: "ivu-list-item-meta-title" }, [_vm._t("title", [_vm._v(_vm._s(_vm.title))])], 2) : _vm._e(), _vm._v(" "), _vm.description || _vm.$slots.description ? _c('div', { staticClass: "ivu-list-item-meta-description" }, [_vm._t("description", [_vm._v(_vm._s(_vm.description))])], 2) : _vm._e()])]);
  95948. };
  95949. var staticRenderFns = [];
  95950. exports.render = render;
  95951. exports.staticRenderFns = staticRenderFns;
  95952. /***/ }),
  95953. /* 484 */
  95954. /***/ (function(module, exports, __webpack_require__) {
  95955. "use strict";
  95956. Object.defineProperty(exports, "__esModule", {
  95957. value: true
  95958. });
  95959. var _newArrowCheck2 = __webpack_require__(1);
  95960. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  95961. var _loadingBar = __webpack_require__(485);
  95962. var _loadingBar2 = _interopRequireDefault(_loadingBar);
  95963. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  95964. var loadingBarInstance = void 0;
  95965. var color = 'primary';
  95966. var duration = 800;
  95967. var failedColor = 'error';
  95968. var height = 2;
  95969. var timer = void 0;
  95970. function getLoadingBarInstance() {
  95971. loadingBarInstance = loadingBarInstance || _loadingBar2.default.newInstance({
  95972. color: color,
  95973. failedColor: failedColor,
  95974. height: height
  95975. });
  95976. return loadingBarInstance;
  95977. }
  95978. function _update(options) {
  95979. var instance = getLoadingBarInstance();
  95980. instance.update(options);
  95981. }
  95982. function hide() {
  95983. var _this = this;
  95984. setTimeout(function () {
  95985. (0, _newArrowCheck3.default)(this, _this);
  95986. _update({
  95987. show: false
  95988. });
  95989. setTimeout(function () {
  95990. (0, _newArrowCheck3.default)(this, _this);
  95991. _update({
  95992. percent: 0
  95993. });
  95994. }.bind(this), 200);
  95995. }.bind(this), duration);
  95996. }
  95997. function clearTimer() {
  95998. if (timer) {
  95999. clearInterval(timer);
  96000. timer = null;
  96001. }
  96002. }
  96003. exports.default = {
  96004. start: function start() {
  96005. var _this2 = this;
  96006. if (timer) return;
  96007. var percent = 0;
  96008. _update({
  96009. percent: percent,
  96010. status: 'success',
  96011. show: true
  96012. });
  96013. timer = setInterval(function () {
  96014. (0, _newArrowCheck3.default)(this, _this2);
  96015. percent += Math.floor(Math.random() * 3 + 1);
  96016. if (percent > 95) {
  96017. clearTimer();
  96018. }
  96019. _update({
  96020. percent: percent,
  96021. status: 'success',
  96022. show: true
  96023. });
  96024. }.bind(this), 200);
  96025. },
  96026. update: function update(percent) {
  96027. clearTimer();
  96028. _update({
  96029. percent: percent,
  96030. status: 'success',
  96031. show: true
  96032. });
  96033. },
  96034. finish: function finish() {
  96035. clearTimer();
  96036. _update({
  96037. percent: 100,
  96038. status: 'success',
  96039. show: true
  96040. });
  96041. hide();
  96042. },
  96043. error: function error() {
  96044. clearTimer();
  96045. _update({
  96046. percent: 100,
  96047. status: 'error',
  96048. show: true
  96049. });
  96050. hide();
  96051. },
  96052. config: function config(options) {
  96053. if (options.color) {
  96054. color = options.color;
  96055. }
  96056. if (options.duration) {
  96057. duration = options.duration;
  96058. }
  96059. if (options.failedColor) {
  96060. failedColor = options.failedColor;
  96061. }
  96062. if (options.height) {
  96063. height = options.height;
  96064. }
  96065. },
  96066. destroy: function destroy() {
  96067. clearTimer();
  96068. var instance = getLoadingBarInstance();
  96069. loadingBarInstance = null;
  96070. instance.destroy();
  96071. }
  96072. };
  96073. /***/ }),
  96074. /* 485 */
  96075. /***/ (function(module, exports, __webpack_require__) {
  96076. "use strict";
  96077. Object.defineProperty(exports, "__esModule", {
  96078. value: true
  96079. });
  96080. var _newArrowCheck2 = __webpack_require__(1);
  96081. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  96082. var _loadingBar = __webpack_require__(486);
  96083. var _loadingBar2 = _interopRequireDefault(_loadingBar);
  96084. var _vue = __webpack_require__(16);
  96085. var _vue2 = _interopRequireDefault(_vue);
  96086. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  96087. _loadingBar2.default.newInstance = function (properties) {
  96088. (0, _newArrowCheck3.default)(undefined, undefined);
  96089. var _props = properties || {};
  96090. var Instance = new _vue2.default({
  96091. data: _props,
  96092. render: function render(h) {
  96093. return h(_loadingBar2.default, {
  96094. props: _props
  96095. });
  96096. }
  96097. });
  96098. var component = Instance.$mount();
  96099. document.body.appendChild(component.$el);
  96100. var loading_bar = Instance.$children[0];
  96101. return {
  96102. update: function update(options) {
  96103. if ('percent' in options) {
  96104. loading_bar.percent = options.percent;
  96105. }
  96106. if (options.status) {
  96107. loading_bar.status = options.status;
  96108. }
  96109. if ('show' in options) {
  96110. loading_bar.show = options.show;
  96111. }
  96112. },
  96113. component: loading_bar,
  96114. destroy: function destroy() {
  96115. document.body.removeChild(document.getElementsByClassName('ivu-loading-bar')[0]);
  96116. }
  96117. };
  96118. }.bind(undefined);
  96119. exports.default = _loadingBar2.default;
  96120. /***/ }),
  96121. /* 486 */
  96122. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  96123. "use strict";
  96124. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  96125. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_bar_vue__ = __webpack_require__(207);
  96126. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_bar_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_bar_vue__);
  96127. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_bar_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_bar_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  96128. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_538863ac_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_loading_bar_vue__ = __webpack_require__(487);
  96129. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_538863ac_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_loading_bar_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_538863ac_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_loading_bar_vue__);
  96130. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  96131. /* script */
  96132. /* template */
  96133. /* template functional */
  96134. var __vue_template_functional__ = false
  96135. /* styles */
  96136. var __vue_styles__ = null
  96137. /* scopeId */
  96138. var __vue_scopeId__ = null
  96139. /* moduleIdentifier (server only) */
  96140. var __vue_module_identifier__ = null
  96141. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  96142. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_loading_bar_vue___default.a,
  96143. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_538863ac_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_loading_bar_vue__["render"],
  96144. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_538863ac_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_loading_bar_vue__["staticRenderFns"],
  96145. __vue_template_functional__,
  96146. __vue_styles__,
  96147. __vue_scopeId__,
  96148. __vue_module_identifier__
  96149. )
  96150. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  96151. /***/ }),
  96152. /* 487 */
  96153. /***/ (function(module, exports, __webpack_require__) {
  96154. "use strict";
  96155. Object.defineProperty(exports, "__esModule", {
  96156. value: true
  96157. });
  96158. var render = function render() {
  96159. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('transition', { attrs: { "name": "fade" } }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.show, expression: "show" }], class: _vm.classes, style: _vm.outerStyles }, [_c('div', { class: _vm.innerClasses, style: _vm.styles })])]);
  96160. };
  96161. var staticRenderFns = [];
  96162. exports.render = render;
  96163. exports.staticRenderFns = staticRenderFns;
  96164. /***/ }),
  96165. /* 488 */
  96166. /***/ (function(module, exports, __webpack_require__) {
  96167. "use strict";
  96168. Object.defineProperty(exports, "__esModule", {
  96169. value: true
  96170. });
  96171. var _menu = __webpack_require__(489);
  96172. var _menu2 = _interopRequireDefault(_menu);
  96173. var _menuGroup = __webpack_require__(491);
  96174. var _menuGroup2 = _interopRequireDefault(_menuGroup);
  96175. var _menuItem = __webpack_require__(493);
  96176. var _menuItem2 = _interopRequireDefault(_menuItem);
  96177. var _submenu = __webpack_require__(495);
  96178. var _submenu2 = _interopRequireDefault(_submenu);
  96179. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  96180. _menu2.default.Group = _menuGroup2.default;
  96181. _menu2.default.Item = _menuItem2.default;
  96182. _menu2.default.Sub = _submenu2.default;
  96183. exports.default = _menu2.default;
  96184. /***/ }),
  96185. /* 489 */
  96186. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  96187. "use strict";
  96188. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  96189. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_vue__ = __webpack_require__(208);
  96190. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_vue__);
  96191. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  96192. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_16a703f2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_vue__ = __webpack_require__(490);
  96193. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_16a703f2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_16a703f2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_vue__);
  96194. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  96195. /* script */
  96196. /* template */
  96197. /* template functional */
  96198. var __vue_template_functional__ = false
  96199. /* styles */
  96200. var __vue_styles__ = null
  96201. /* scopeId */
  96202. var __vue_scopeId__ = null
  96203. /* moduleIdentifier (server only) */
  96204. var __vue_module_identifier__ = null
  96205. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  96206. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_vue___default.a,
  96207. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_16a703f2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_vue__["render"],
  96208. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_16a703f2_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_vue__["staticRenderFns"],
  96209. __vue_template_functional__,
  96210. __vue_styles__,
  96211. __vue_scopeId__,
  96212. __vue_module_identifier__
  96213. )
  96214. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  96215. /***/ }),
  96216. /* 490 */
  96217. /***/ (function(module, exports, __webpack_require__) {
  96218. "use strict";
  96219. Object.defineProperty(exports, "__esModule", {
  96220. value: true
  96221. });
  96222. var render = function render() {
  96223. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('ul', { class: _vm.classes, style: _vm.styles }, [_vm._t("default")], 2);
  96224. };
  96225. var staticRenderFns = [];
  96226. exports.render = render;
  96227. exports.staticRenderFns = staticRenderFns;
  96228. /***/ }),
  96229. /* 491 */
  96230. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  96231. "use strict";
  96232. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  96233. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_group_vue__ = __webpack_require__(209);
  96234. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_group_vue__);
  96235. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_group_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_group_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  96236. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6f7e247e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_group_vue__ = __webpack_require__(492);
  96237. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6f7e247e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6f7e247e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_group_vue__);
  96238. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  96239. /* script */
  96240. /* template */
  96241. /* template functional */
  96242. var __vue_template_functional__ = false
  96243. /* styles */
  96244. var __vue_styles__ = null
  96245. /* scopeId */
  96246. var __vue_scopeId__ = null
  96247. /* moduleIdentifier (server only) */
  96248. var __vue_module_identifier__ = null
  96249. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  96250. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_group_vue___default.a,
  96251. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6f7e247e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_group_vue__["render"],
  96252. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6f7e247e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_group_vue__["staticRenderFns"],
  96253. __vue_template_functional__,
  96254. __vue_styles__,
  96255. __vue_scopeId__,
  96256. __vue_module_identifier__
  96257. )
  96258. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  96259. /***/ }),
  96260. /* 492 */
  96261. /***/ (function(module, exports, __webpack_require__) {
  96262. "use strict";
  96263. Object.defineProperty(exports, "__esModule", {
  96264. value: true
  96265. });
  96266. var render = function render() {
  96267. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('li', { class: [_vm.prefixCls + '-item-group'] }, [_c('div', { class: [_vm.prefixCls + '-item-group-title'], style: _vm.groupStyle }, [_vm._v(_vm._s(_vm.title))]), _vm._v(" "), _c('ul', [_vm._t("default")], 2)]);
  96268. };
  96269. var staticRenderFns = [];
  96270. exports.render = render;
  96271. exports.staticRenderFns = staticRenderFns;
  96272. /***/ }),
  96273. /* 493 */
  96274. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  96275. "use strict";
  96276. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  96277. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_item_vue__ = __webpack_require__(210);
  96278. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_item_vue__);
  96279. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_item_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_item_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  96280. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1709792e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_item_vue__ = __webpack_require__(494);
  96281. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1709792e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1709792e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_item_vue__);
  96282. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  96283. /* script */
  96284. /* template */
  96285. /* template functional */
  96286. var __vue_template_functional__ = false
  96287. /* styles */
  96288. var __vue_styles__ = null
  96289. /* scopeId */
  96290. var __vue_scopeId__ = null
  96291. /* moduleIdentifier (server only) */
  96292. var __vue_module_identifier__ = null
  96293. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  96294. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_menu_item_vue___default.a,
  96295. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1709792e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_item_vue__["render"],
  96296. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1709792e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_menu_item_vue__["staticRenderFns"],
  96297. __vue_template_functional__,
  96298. __vue_styles__,
  96299. __vue_scopeId__,
  96300. __vue_module_identifier__
  96301. )
  96302. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  96303. /***/ }),
  96304. /* 494 */
  96305. /***/ (function(module, exports, __webpack_require__) {
  96306. "use strict";
  96307. Object.defineProperty(exports, "__esModule", {
  96308. value: true
  96309. });
  96310. var render = function render() {
  96311. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _vm.to ? _c('a', { class: _vm.classes, style: _vm.itemStyle, attrs: { "href": _vm.linkUrl, "target": _vm.target }, on: { "click": [function ($event) {
  96312. if ($event.ctrlKey || $event.shiftKey || $event.altKey || $event.metaKey) {
  96313. return null;
  96314. }return _vm.handleClickItem($event, false);
  96315. }, function ($event) {
  96316. if (!$event.ctrlKey) {
  96317. return null;
  96318. }return _vm.handleClickItem($event, true);
  96319. }, function ($event) {
  96320. if (!$event.metaKey) {
  96321. return null;
  96322. }return _vm.handleClickItem($event, true);
  96323. }] } }, [_vm._t("default")], 2) : _c('li', { class: _vm.classes, style: _vm.itemStyle, on: { "click": function click($event) {
  96324. $event.stopPropagation();return _vm.handleClickItem($event);
  96325. } } }, [_vm._t("default")], 2);
  96326. };
  96327. var staticRenderFns = [];
  96328. exports.render = render;
  96329. exports.staticRenderFns = staticRenderFns;
  96330. /***/ }),
  96331. /* 495 */
  96332. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  96333. "use strict";
  96334. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  96335. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_submenu_vue__ = __webpack_require__(211);
  96336. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_submenu_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_submenu_vue__);
  96337. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_submenu_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_submenu_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  96338. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a1f8bd1a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_submenu_vue__ = __webpack_require__(496);
  96339. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a1f8bd1a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_submenu_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a1f8bd1a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_submenu_vue__);
  96340. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  96341. /* script */
  96342. /* template */
  96343. /* template functional */
  96344. var __vue_template_functional__ = false
  96345. /* styles */
  96346. var __vue_styles__ = null
  96347. /* scopeId */
  96348. var __vue_scopeId__ = null
  96349. /* moduleIdentifier (server only) */
  96350. var __vue_module_identifier__ = null
  96351. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  96352. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_submenu_vue___default.a,
  96353. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a1f8bd1a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_submenu_vue__["render"],
  96354. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a1f8bd1a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_submenu_vue__["staticRenderFns"],
  96355. __vue_template_functional__,
  96356. __vue_styles__,
  96357. __vue_scopeId__,
  96358. __vue_module_identifier__
  96359. )
  96360. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  96361. /***/ }),
  96362. /* 496 */
  96363. /***/ (function(module, exports, __webpack_require__) {
  96364. "use strict";
  96365. Object.defineProperty(exports, "__esModule", {
  96366. value: true
  96367. });
  96368. var render = function render() {
  96369. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('li', { class: _vm.classes, on: { "mouseenter": _vm.handleMouseenter, "mouseleave": _vm.handleMouseleave } }, [_c('div', { ref: "reference", class: [_vm.prefixCls + '-submenu-title'], style: _vm.titleStyle, on: { "click": function click($event) {
  96370. $event.stopPropagation();return _vm.handleClick($event);
  96371. } } }, [_vm._t("title"), _vm._v(" "), _c('Icon', { class: [_vm.prefixCls + '-submenu-title-icon'], attrs: { "type": _vm.arrowType, "custom": _vm.customArrowType, "size": _vm.arrowSize } })], 2), _vm._v(" "), _vm.mode === 'vertical' ? _c('collapse-transition', [_c('ul', { directives: [{ name: "show", rawName: "v-show", value: _vm.opened, expression: "opened" }], class: [_vm.prefixCls] }, [_vm._t("default")], 2)]) : _c('transition', { attrs: { "name": "slide-up" } }, [_c('Drop', { directives: [{ name: "show", rawName: "v-show", value: _vm.opened, expression: "opened" }], ref: "drop", style: _vm.dropStyle, attrs: { "placement": "bottom" } }, [_c('ul', { class: [_vm.prefixCls + '-drop-list'] }, [_vm._t("default")], 2)])], 1)], 1);
  96372. };
  96373. var staticRenderFns = [];
  96374. exports.render = render;
  96375. exports.staticRenderFns = staticRenderFns;
  96376. /***/ }),
  96377. /* 497 */
  96378. /***/ (function(module, exports, __webpack_require__) {
  96379. "use strict";
  96380. Object.defineProperty(exports, "__esModule", {
  96381. value: true
  96382. });
  96383. var _notification = __webpack_require__(212);
  96384. var _notification2 = _interopRequireDefault(_notification);
  96385. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  96386. var prefixCls = 'ivu-message';
  96387. var iconPrefixCls = 'ivu-icon';
  96388. var prefixKey = 'ivu_message_key_';
  96389. var defaults = {
  96390. top: 24,
  96391. duration: 1.5
  96392. };
  96393. var messageInstance = void 0;
  96394. var name = 1;
  96395. var iconTypes = {
  96396. 'info': 'ios-information-circle',
  96397. 'success': 'ios-checkmark-circle',
  96398. 'warning': 'ios-alert',
  96399. 'error': 'ios-close-circle',
  96400. 'loading': 'ios-loading'
  96401. };
  96402. function getMessageInstance() {
  96403. messageInstance = messageInstance || _notification2.default.newInstance({
  96404. prefixCls: prefixCls,
  96405. styles: {
  96406. top: String(defaults.top) + 'px'
  96407. }
  96408. });
  96409. return messageInstance;
  96410. }
  96411. function notice() {
  96412. var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  96413. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaults.duration;
  96414. var type = arguments[2];
  96415. var onClose = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {};
  96416. var closable = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  96417. var render = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : function () {};
  96418. var background = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
  96419. var iconType = iconTypes[type];
  96420. var loadCls = type === 'loading' ? ' ivu-load-loop' : '';
  96421. var instance = getMessageInstance();
  96422. instance.notice({
  96423. name: '' + prefixKey + name,
  96424. duration: duration,
  96425. styles: {},
  96426. transitionName: 'move-up',
  96427. content: '\n <div class="' + prefixCls + '-custom-content ' + prefixCls + '-' + String(type) + '">\n <i class="' + iconPrefixCls + ' ' + iconPrefixCls + '-' + String(iconType) + ' ' + loadCls + '"></i>\n <span>' + String(content) + '</span>\n </div>\n ',
  96428. render: render,
  96429. onClose: onClose,
  96430. closable: closable,
  96431. type: 'message',
  96432. msgType: type,
  96433. background: background
  96434. });
  96435. return function () {
  96436. var target = name++;
  96437. return function () {
  96438. instance.remove('' + prefixKey + target);
  96439. };
  96440. }();
  96441. }
  96442. exports.default = {
  96443. name: 'Message',
  96444. info: function info(options) {
  96445. return this.message('info', options);
  96446. },
  96447. success: function success(options) {
  96448. return this.message('success', options);
  96449. },
  96450. warning: function warning(options) {
  96451. return this.message('warning', options);
  96452. },
  96453. error: function error(options) {
  96454. return this.message('error', options);
  96455. },
  96456. loading: function loading(options) {
  96457. return this.message('loading', options);
  96458. },
  96459. message: function message(type, options) {
  96460. if (typeof options === 'string') {
  96461. options = {
  96462. content: options
  96463. };
  96464. }
  96465. return notice(options.content, options.duration, type, options.onClose, options.closable, options.render, options.background);
  96466. },
  96467. config: function config(options) {
  96468. if (options.top || options.top === 0) {
  96469. defaults.top = options.top;
  96470. }
  96471. if (options.duration || options.duration === 0) {
  96472. defaults.duration = options.duration;
  96473. }
  96474. },
  96475. destroy: function destroy() {
  96476. var instance = getMessageInstance();
  96477. messageInstance = null;
  96478. instance.destroy('ivu-message');
  96479. }
  96480. };
  96481. /***/ }),
  96482. /* 498 */
  96483. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  96484. "use strict";
  96485. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  96486. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notification_vue__ = __webpack_require__(213);
  96487. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notification_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notification_vue__);
  96488. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notification_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notification_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  96489. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_746d1da0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_notification_vue__ = __webpack_require__(501);
  96490. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_746d1da0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_notification_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_746d1da0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_notification_vue__);
  96491. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  96492. /* script */
  96493. /* template */
  96494. /* template functional */
  96495. var __vue_template_functional__ = false
  96496. /* styles */
  96497. var __vue_styles__ = null
  96498. /* scopeId */
  96499. var __vue_scopeId__ = null
  96500. /* moduleIdentifier (server only) */
  96501. var __vue_module_identifier__ = null
  96502. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  96503. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notification_vue___default.a,
  96504. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_746d1da0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_notification_vue__["render"],
  96505. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_746d1da0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_notification_vue__["staticRenderFns"],
  96506. __vue_template_functional__,
  96507. __vue_styles__,
  96508. __vue_scopeId__,
  96509. __vue_module_identifier__
  96510. )
  96511. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  96512. /***/ }),
  96513. /* 499 */
  96514. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  96515. "use strict";
  96516. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  96517. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notice_vue__ = __webpack_require__(214);
  96518. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notice_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notice_vue__);
  96519. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notice_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notice_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  96520. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_067694d8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_notice_vue__ = __webpack_require__(500);
  96521. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_067694d8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_notice_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_067694d8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_notice_vue__);
  96522. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  96523. /* script */
  96524. /* template */
  96525. /* template functional */
  96526. var __vue_template_functional__ = false
  96527. /* styles */
  96528. var __vue_styles__ = null
  96529. /* scopeId */
  96530. var __vue_scopeId__ = null
  96531. /* moduleIdentifier (server only) */
  96532. var __vue_module_identifier__ = null
  96533. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  96534. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_notice_vue___default.a,
  96535. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_067694d8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_notice_vue__["render"],
  96536. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_067694d8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_notice_vue__["staticRenderFns"],
  96537. __vue_template_functional__,
  96538. __vue_styles__,
  96539. __vue_scopeId__,
  96540. __vue_module_identifier__
  96541. )
  96542. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  96543. /***/ }),
  96544. /* 500 */
  96545. /***/ (function(module, exports, __webpack_require__) {
  96546. "use strict";
  96547. Object.defineProperty(exports, "__esModule", {
  96548. value: true
  96549. });
  96550. var render = function render() {
  96551. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('transition', { attrs: { "name": _vm.transitionName, "appear": "" }, on: { "enter": _vm.handleEnter, "leave": _vm.handleLeave } }, [_c('div', { class: _vm.classes, style: _vm.styles }, [_vm.type === 'notice' ? [_c('div', { ref: "content", class: _vm.contentClasses, domProps: { "innerHTML": _vm._s(_vm.content) } }), _vm._v(" "), _c('div', { class: _vm.contentWithIcon }, [_c('render-cell', { attrs: { "render": _vm.renderFunc } })], 1), _vm._v(" "), _vm.closable ? _c('a', { class: [_vm.baseClass + '-close'], on: { "click": _vm.close } }, [_c('i', { staticClass: "ivu-icon ivu-icon-ios-close" })]) : _vm._e()] : _vm._e(), _vm._v(" "), _vm.type === 'message' ? [_c('div', { ref: "content", class: _vm.messageContentClasses }, [_c('div', { class: [_vm.baseClass + '-content-text'], domProps: { "innerHTML": _vm._s(_vm.content) } }), _vm._v(" "), _c('div', { class: [_vm.baseClass + '-content-text'] }, [_c('render-cell', { attrs: { "render": _vm.renderFunc } })], 1), _vm._v(" "), _vm.closable ? _c('a', { class: [_vm.baseClass + '-close'], on: { "click": _vm.close } }, [_c('i', { staticClass: "ivu-icon ivu-icon-ios-close" })]) : _vm._e()])] : _vm._e()], 2)]);
  96552. };
  96553. var staticRenderFns = [];
  96554. exports.render = render;
  96555. exports.staticRenderFns = staticRenderFns;
  96556. /***/ }),
  96557. /* 501 */
  96558. /***/ (function(module, exports, __webpack_require__) {
  96559. "use strict";
  96560. Object.defineProperty(exports, "__esModule", {
  96561. value: true
  96562. });
  96563. var render = function render() {
  96564. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes, style: _vm.wrapStyles }, _vm._l(_vm.notices, function (notice) {
  96565. return _c('Notice', { key: notice.name, attrs: { "prefix-cls": _vm.prefixCls, "styles": notice.styles, "type": notice.type, "content": notice.content, "duration": notice.duration, "render": notice.render, "has-title": notice.hasTitle, "withIcon": notice.withIcon, "closable": notice.closable, "name": notice.name, "transition-name": notice.transitionName, "background": notice.background, "msg-type": notice.msgType, "on-close": notice.onClose } });
  96566. }), 1);
  96567. };
  96568. var staticRenderFns = [];
  96569. exports.render = render;
  96570. exports.staticRenderFns = staticRenderFns;
  96571. /***/ }),
  96572. /* 502 */
  96573. /***/ (function(module, exports, __webpack_require__) {
  96574. "use strict";
  96575. Object.defineProperty(exports, "__esModule", {
  96576. value: true
  96577. });
  96578. var _confirm = __webpack_require__(503);
  96579. var _confirm2 = _interopRequireDefault(_confirm);
  96580. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  96581. var modalInstance = void 0;
  96582. function getModalInstance() {
  96583. var render = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  96584. var lockScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  96585. modalInstance = modalInstance || _confirm2.default.newInstance({
  96586. closable: false,
  96587. maskClosable: false,
  96588. footerHide: true,
  96589. render: render,
  96590. lockScroll: lockScroll
  96591. });
  96592. return modalInstance;
  96593. }
  96594. function confirm(options) {
  96595. var render = 'render' in options ? options.render : undefined;
  96596. var lockScroll = 'lockScroll' in options ? options.lockScroll : true;
  96597. var instance = getModalInstance(render, lockScroll);
  96598. options.onRemove = function () {
  96599. modalInstance = null;
  96600. };
  96601. instance.show(options);
  96602. }
  96603. _confirm2.default.info = function () {
  96604. var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  96605. props.icon = 'info';
  96606. props.showCancel = false;
  96607. return confirm(props);
  96608. };
  96609. _confirm2.default.success = function () {
  96610. var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  96611. props.icon = 'success';
  96612. props.showCancel = false;
  96613. return confirm(props);
  96614. };
  96615. _confirm2.default.warning = function () {
  96616. var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  96617. props.icon = 'warning';
  96618. props.showCancel = false;
  96619. return confirm(props);
  96620. };
  96621. _confirm2.default.error = function () {
  96622. var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  96623. props.icon = 'error';
  96624. props.showCancel = false;
  96625. return confirm(props);
  96626. };
  96627. _confirm2.default.confirm = function () {
  96628. var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  96629. props.icon = 'confirm';
  96630. props.showCancel = true;
  96631. return confirm(props);
  96632. };
  96633. _confirm2.default.remove = function () {
  96634. if (!modalInstance) {
  96635. return false;
  96636. }
  96637. var instance = getModalInstance();
  96638. instance.remove();
  96639. };
  96640. exports.default = _confirm2.default;
  96641. /***/ }),
  96642. /* 503 */
  96643. /***/ (function(module, exports, __webpack_require__) {
  96644. "use strict";
  96645. Object.defineProperty(exports, "__esModule", {
  96646. value: true
  96647. });
  96648. var _assign = __webpack_require__(15);
  96649. var _assign2 = _interopRequireDefault(_assign);
  96650. var _newArrowCheck2 = __webpack_require__(1);
  96651. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  96652. var _vue = __webpack_require__(16);
  96653. var _vue2 = _interopRequireDefault(_vue);
  96654. var _modal = __webpack_require__(504);
  96655. var _modal2 = _interopRequireDefault(_modal);
  96656. var _button = __webpack_require__(28);
  96657. var _button2 = _interopRequireDefault(_button);
  96658. var _locale = __webpack_require__(6);
  96659. var _locale2 = _interopRequireDefault(_locale);
  96660. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  96661. var prefixCls = 'ivu-modal-confirm';
  96662. _modal2.default.newInstance = function (properties) {
  96663. (0, _newArrowCheck3.default)(undefined, undefined);
  96664. var _props = properties || {};
  96665. var Instance = new _vue2.default({
  96666. mixins: [_locale2.default],
  96667. data: (0, _assign2.default)({}, _props, {
  96668. visible: false,
  96669. width: 416,
  96670. title: '',
  96671. body: '',
  96672. iconType: '',
  96673. iconName: '',
  96674. okText: undefined,
  96675. cancelText: undefined,
  96676. showCancel: false,
  96677. loading: false,
  96678. buttonLoading: false,
  96679. scrollable: false,
  96680. closable: false,
  96681. closing: false }),
  96682. render: function render(h) {
  96683. var _this = this;
  96684. var footerVNodes = [];
  96685. if (this.showCancel) {
  96686. footerVNodes.push(h(_button2.default, {
  96687. props: {
  96688. type: 'text'
  96689. },
  96690. on: {
  96691. click: this.cancel
  96692. }
  96693. }, this.localeCancelText));
  96694. }
  96695. footerVNodes.push(h(_button2.default, {
  96696. props: {
  96697. type: 'primary',
  96698. loading: this.buttonLoading
  96699. },
  96700. on: {
  96701. click: this.ok
  96702. }
  96703. }, this.localeOkText));
  96704. var body_render = void 0;
  96705. if (this.render) {
  96706. body_render = h('div', {
  96707. attrs: {
  96708. class: prefixCls + '-body ' + prefixCls + '-body-render'
  96709. }
  96710. }, [this.render(h)]);
  96711. } else {
  96712. body_render = h('div', {
  96713. attrs: {
  96714. class: prefixCls + '-body'
  96715. }
  96716. }, [h('div', {
  96717. domProps: {
  96718. innerHTML: this.body
  96719. }
  96720. })]);
  96721. }
  96722. var head_render = void 0;
  96723. if (this.title) {
  96724. head_render = h('div', {
  96725. attrs: {
  96726. class: prefixCls + '-head'
  96727. }
  96728. }, [h('div', {
  96729. class: this.iconTypeCls
  96730. }, [h('i', {
  96731. class: this.iconNameCls
  96732. })]), h('div', {
  96733. attrs: {
  96734. class: prefixCls + '-head-title'
  96735. },
  96736. domProps: {
  96737. innerHTML: this.title
  96738. }
  96739. })]);
  96740. }
  96741. return h(_modal2.default, {
  96742. props: (0, _assign2.default)({}, _props, {
  96743. width: this.width,
  96744. scrollable: this.scrollable,
  96745. closable: this.closable
  96746. }),
  96747. domProps: {
  96748. value: this.visible
  96749. },
  96750. on: {
  96751. input: function input(status) {
  96752. (0, _newArrowCheck3.default)(this, _this);
  96753. this.visible = status;
  96754. }.bind(this),
  96755. 'on-cancel': this.cancel
  96756. }
  96757. }, [h('div', {
  96758. attrs: {
  96759. class: prefixCls
  96760. }
  96761. }, [head_render, body_render, h('div', {
  96762. attrs: {
  96763. class: prefixCls + '-footer'
  96764. }
  96765. }, footerVNodes)])]);
  96766. },
  96767. computed: {
  96768. iconTypeCls: function iconTypeCls() {
  96769. return [prefixCls + '-head-icon', prefixCls + '-head-icon-' + String(this.iconType)];
  96770. },
  96771. iconNameCls: function iconNameCls() {
  96772. return ['ivu-icon', 'ivu-icon-' + String(this.iconName)];
  96773. },
  96774. localeOkText: function localeOkText() {
  96775. if (this.okText) {
  96776. return this.okText;
  96777. } else {
  96778. return this.t('i.modal.okText');
  96779. }
  96780. },
  96781. localeCancelText: function localeCancelText() {
  96782. if (this.cancelText) {
  96783. return this.cancelText;
  96784. } else {
  96785. return this.t('i.modal.cancelText');
  96786. }
  96787. }
  96788. },
  96789. methods: {
  96790. cancel: function cancel() {
  96791. if (this.closing) return;
  96792. this.$children[0].visible = false;
  96793. this.buttonLoading = false;
  96794. this.onCancel();
  96795. this.remove();
  96796. },
  96797. ok: function ok() {
  96798. if (this.closing) return;
  96799. if (this.loading) {
  96800. this.buttonLoading = true;
  96801. } else {
  96802. this.$children[0].visible = false;
  96803. this.remove();
  96804. }
  96805. this.onOk();
  96806. },
  96807. remove: function remove() {
  96808. var _this2 = this;
  96809. this.closing = true;
  96810. setTimeout(function () {
  96811. (0, _newArrowCheck3.default)(this, _this2);
  96812. this.closing = false;
  96813. this.destroy();
  96814. }.bind(this), 300);
  96815. },
  96816. destroy: function destroy() {
  96817. this.$destroy();
  96818. if (this.$el) document.body.removeChild(this.$el);
  96819. this.onRemove();
  96820. },
  96821. onOk: function onOk() {},
  96822. onCancel: function onCancel() {},
  96823. onRemove: function onRemove() {}
  96824. }
  96825. });
  96826. var component = Instance.$mount();
  96827. document.body.appendChild(component.$el);
  96828. var modal = Instance.$children[0];
  96829. return {
  96830. show: function show(props) {
  96831. modal.$parent.showCancel = props.showCancel;
  96832. modal.$parent.iconType = props.icon;
  96833. switch (props.icon) {
  96834. case 'info':
  96835. modal.$parent.iconName = 'ios-information-circle';
  96836. break;
  96837. case 'success':
  96838. modal.$parent.iconName = 'ios-checkmark-circle';
  96839. break;
  96840. case 'warning':
  96841. modal.$parent.iconName = 'ios-alert';
  96842. break;
  96843. case 'error':
  96844. modal.$parent.iconName = 'ios-close-circle';
  96845. break;
  96846. case 'confirm':
  96847. modal.$parent.iconName = 'ios-help-circle';
  96848. break;
  96849. }
  96850. if ('width' in props) {
  96851. modal.$parent.width = props.width;
  96852. }
  96853. if ('closable' in props) {
  96854. modal.$parent.closable = props.closable;
  96855. }
  96856. if ('title' in props) {
  96857. modal.$parent.title = props.title;
  96858. }
  96859. if ('content' in props) {
  96860. modal.$parent.body = props.content;
  96861. }
  96862. if ('okText' in props) {
  96863. modal.$parent.okText = props.okText;
  96864. }
  96865. if ('cancelText' in props) {
  96866. modal.$parent.cancelText = props.cancelText;
  96867. }
  96868. if ('onCancel' in props) {
  96869. modal.$parent.onCancel = props.onCancel;
  96870. }
  96871. if ('onOk' in props) {
  96872. modal.$parent.onOk = props.onOk;
  96873. }
  96874. if ('loading' in props) {
  96875. modal.$parent.loading = props.loading;
  96876. }
  96877. if ('scrollable' in props) {
  96878. modal.$parent.scrollable = props.scrollable;
  96879. }
  96880. modal.$parent.onRemove = props.onRemove;
  96881. modal.visible = true;
  96882. },
  96883. remove: function remove() {
  96884. modal.visible = false;
  96885. modal.$parent.buttonLoading = false;
  96886. modal.$parent.remove();
  96887. },
  96888. component: modal
  96889. };
  96890. }.bind(undefined);
  96891. exports.default = _modal2.default;
  96892. /***/ }),
  96893. /* 504 */
  96894. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  96895. "use strict";
  96896. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  96897. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_modal_vue__ = __webpack_require__(216);
  96898. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_modal_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_modal_vue__);
  96899. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_modal_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_modal_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  96900. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_f1458b66_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_modal_vue__ = __webpack_require__(505);
  96901. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_f1458b66_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_modal_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_f1458b66_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_modal_vue__);
  96902. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  96903. /* script */
  96904. /* template */
  96905. /* template functional */
  96906. var __vue_template_functional__ = false
  96907. /* styles */
  96908. var __vue_styles__ = null
  96909. /* scopeId */
  96910. var __vue_scopeId__ = null
  96911. /* moduleIdentifier (server only) */
  96912. var __vue_module_identifier__ = null
  96913. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  96914. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_modal_vue___default.a,
  96915. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_f1458b66_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_modal_vue__["render"],
  96916. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_f1458b66_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_modal_vue__["staticRenderFns"],
  96917. __vue_template_functional__,
  96918. __vue_styles__,
  96919. __vue_scopeId__,
  96920. __vue_module_identifier__
  96921. )
  96922. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  96923. /***/ }),
  96924. /* 505 */
  96925. /***/ (function(module, exports, __webpack_require__) {
  96926. "use strict";
  96927. Object.defineProperty(exports, "__esModule", {
  96928. value: true
  96929. });
  96930. var render = function render() {
  96931. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "transfer-dom", rawName: "v-transfer-dom" }], attrs: { "data-transfer": _vm.transfer } }, [_c('transition', { attrs: { "name": _vm.transitionNames[1] } }, [_vm.showMask ? _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.visible, expression: "visible" }], class: _vm.maskClasses, style: _vm.wrapStyles, on: { "click": _vm.handleMask } }) : _vm._e()]), _vm._v(" "), _c('div', { class: _vm.wrapClasses, style: _vm.wrapStyles, on: { "click": _vm.handleWrapClick } }, [_c('transition', { attrs: { "name": _vm.transitionNames[0] }, on: { "after-leave": _vm.animationFinish } }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.visible, expression: "visible" }], class: _vm.classes, style: _vm.mainStyles, on: { "mousedown": _vm.handleMousedown } }, [_c('div', { ref: "content", class: _vm.contentClasses, style: _vm.contentStyles, on: { "click": _vm.handleClickModal } }, [_vm.closable ? _c('a', { class: [_vm.prefixCls + '-close'], on: { "click": _vm.close } }, [_vm._t("close", [_c('Icon', { attrs: { "type": "ios-close" } })])], 2) : _vm._e(), _vm._v(" "), _vm.showHead ? _c('div', { class: [_vm.prefixCls + '-header'], on: { "mousedown": _vm.handleMoveStart } }, [_vm._t("header", [_c('div', { class: [_vm.prefixCls + '-header-inner'] }, [_vm._v(_vm._s(_vm.title))])])], 2) : _vm._e(), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-body'] }, [_vm._t("default")], 2), _vm._v(" "), !_vm.footerHide ? _c('div', { class: [_vm.prefixCls + '-footer'] }, [_vm._t("footer", [_c('i-button', { attrs: { "type": "text" }, nativeOn: { "click": function click($event) {
  96932. return _vm.cancel($event);
  96933. } } }, [_vm._v(_vm._s(_vm.localeCancelText))]), _vm._v(" "), _c('i-button', { attrs: { "type": "primary", "loading": _vm.buttonLoading }, nativeOn: { "click": function click($event) {
  96934. return _vm.ok($event);
  96935. } } }, [_vm._v(_vm._s(_vm.localeOkText))])])], 2) : _vm._e()])])])], 1)], 1);
  96936. };
  96937. var staticRenderFns = [];
  96938. exports.render = render;
  96939. exports.staticRenderFns = staticRenderFns;
  96940. /***/ }),
  96941. /* 506 */
  96942. /***/ (function(module, exports, __webpack_require__) {
  96943. "use strict";
  96944. Object.defineProperty(exports, "__esModule", {
  96945. value: true
  96946. });
  96947. var _notification = __webpack_require__(212);
  96948. var _notification2 = _interopRequireDefault(_notification);
  96949. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  96950. var prefixCls = 'ivu-notice';
  96951. var iconPrefixCls = 'ivu-icon';
  96952. var prefixKey = 'ivu_notice_key_';
  96953. var top = 24;
  96954. var defaultDuration = 4.5;
  96955. var noticeInstance = void 0;
  96956. var name = 1;
  96957. var iconTypes = {
  96958. 'info': 'ios-information-circle',
  96959. 'success': 'ios-checkmark-circle',
  96960. 'warning': 'ios-alert',
  96961. 'error': 'ios-close-circle'
  96962. };
  96963. function getNoticeInstance() {
  96964. noticeInstance = noticeInstance || _notification2.default.newInstance({
  96965. prefixCls: prefixCls,
  96966. styles: {
  96967. top: top + 'px',
  96968. right: 0
  96969. }
  96970. });
  96971. return noticeInstance;
  96972. }
  96973. function notice(type, options) {
  96974. var title = options.title || '';
  96975. var desc = options.desc || '';
  96976. var noticeKey = options.name || '' + prefixKey + name;
  96977. var onClose = options.onClose || function () {};
  96978. var render = options.render;
  96979. var duration = options.duration === 0 ? 0 : options.duration || defaultDuration;
  96980. name++;
  96981. var instance = getNoticeInstance();
  96982. var content = void 0;
  96983. var withIcon = void 0;
  96984. var with_desc = options.render && !title ? '' : desc || options.render ? ' ' + prefixCls + '-with-desc' : '';
  96985. if (type == 'normal') {
  96986. withIcon = false;
  96987. content = '\n <div class="' + prefixCls + '-custom-content ' + prefixCls + '-with-normal ' + with_desc + '">\n <div class="' + prefixCls + '-title">' + String(title) + '</div>\n <div class="' + prefixCls + '-desc">' + String(desc) + '</div>\n </div>\n ';
  96988. } else {
  96989. var iconType = iconTypes[type];
  96990. var outlineIcon = with_desc === '' ? '' : '-outline';
  96991. withIcon = true;
  96992. content = '\n <div class="' + prefixCls + '-custom-content ' + prefixCls + '-with-icon ' + prefixCls + '-with-' + String(type) + ' ' + with_desc + '">\n <span class="' + prefixCls + '-icon ' + prefixCls + '-icon-' + String(type) + '">\n <i class="' + iconPrefixCls + ' ' + iconPrefixCls + '-' + String(iconType) + outlineIcon + '"></i>\n </span>\n <div class="' + prefixCls + '-title">' + String(title) + '</div>\n <div class="' + prefixCls + '-desc">' + String(desc) + '</div>\n </div>\n ';
  96993. }
  96994. instance.notice({
  96995. name: noticeKey.toString(),
  96996. duration: duration,
  96997. styles: {},
  96998. transitionName: 'move-notice',
  96999. content: content,
  97000. withIcon: withIcon,
  97001. render: render,
  97002. hasTitle: !!title,
  97003. onClose: onClose,
  97004. closable: true,
  97005. type: 'notice'
  97006. });
  97007. }
  97008. exports.default = {
  97009. open: function open(options) {
  97010. return notice('normal', options);
  97011. },
  97012. info: function info(options) {
  97013. return notice('info', options);
  97014. },
  97015. success: function success(options) {
  97016. return notice('success', options);
  97017. },
  97018. warning: function warning(options) {
  97019. return notice('warning', options);
  97020. },
  97021. error: function error(options) {
  97022. return notice('error', options);
  97023. },
  97024. config: function config(options) {
  97025. if (options.top) {
  97026. top = options.top;
  97027. }
  97028. if (options.duration || options.duration === 0) {
  97029. defaultDuration = options.duration;
  97030. }
  97031. },
  97032. close: function close(name) {
  97033. if (name) {
  97034. name = name.toString();
  97035. if (noticeInstance) {
  97036. noticeInstance.remove(name);
  97037. }
  97038. } else {
  97039. return false;
  97040. }
  97041. },
  97042. destroy: function destroy() {
  97043. var instance = getNoticeInstance();
  97044. noticeInstance = null;
  97045. instance.destroy('ivu-notice');
  97046. }
  97047. };
  97048. /***/ }),
  97049. /* 507 */
  97050. /***/ (function(module, exports, __webpack_require__) {
  97051. "use strict";
  97052. Object.defineProperty(exports, "__esModule", {
  97053. value: true
  97054. });
  97055. var _page = __webpack_require__(508);
  97056. var _page2 = _interopRequireDefault(_page);
  97057. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  97058. exports.default = _page2.default;
  97059. /***/ }),
  97060. /* 508 */
  97061. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  97062. "use strict";
  97063. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  97064. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_page_vue__ = __webpack_require__(217);
  97065. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_page_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_page_vue__);
  97066. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_page_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_page_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  97067. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e094ac82_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_page_vue__ = __webpack_require__(511);
  97068. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e094ac82_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_page_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e094ac82_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_page_vue__);
  97069. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  97070. /* script */
  97071. /* template */
  97072. /* template functional */
  97073. var __vue_template_functional__ = false
  97074. /* styles */
  97075. var __vue_styles__ = null
  97076. /* scopeId */
  97077. var __vue_scopeId__ = null
  97078. /* moduleIdentifier (server only) */
  97079. var __vue_module_identifier__ = null
  97080. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  97081. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_page_vue___default.a,
  97082. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e094ac82_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_page_vue__["render"],
  97083. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_e094ac82_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_page_vue__["staticRenderFns"],
  97084. __vue_template_functional__,
  97085. __vue_styles__,
  97086. __vue_scopeId__,
  97087. __vue_module_identifier__
  97088. )
  97089. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  97090. /***/ }),
  97091. /* 509 */
  97092. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  97093. "use strict";
  97094. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  97095. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_options_vue__ = __webpack_require__(218);
  97096. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_options_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_options_vue__);
  97097. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_options_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_options_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  97098. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c35237a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_options_vue__ = __webpack_require__(510);
  97099. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c35237a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_options_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c35237a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_options_vue__);
  97100. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  97101. /* script */
  97102. /* template */
  97103. /* template functional */
  97104. var __vue_template_functional__ = false
  97105. /* styles */
  97106. var __vue_styles__ = null
  97107. /* scopeId */
  97108. var __vue_scopeId__ = null
  97109. /* moduleIdentifier (server only) */
  97110. var __vue_module_identifier__ = null
  97111. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  97112. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_options_vue___default.a,
  97113. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c35237a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_options_vue__["render"],
  97114. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_4c35237a_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_options_vue__["staticRenderFns"],
  97115. __vue_template_functional__,
  97116. __vue_styles__,
  97117. __vue_scopeId__,
  97118. __vue_module_identifier__
  97119. )
  97120. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  97121. /***/ }),
  97122. /* 510 */
  97123. /***/ (function(module, exports, __webpack_require__) {
  97124. "use strict";
  97125. Object.defineProperty(exports, "__esModule", {
  97126. value: true
  97127. });
  97128. var render = function render() {
  97129. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _vm.showSizer || _vm.showElevator ? _c('div', { class: _vm.optsClasses }, [_vm.showSizer ? _c('div', { class: _vm.sizerClasses }, [_c('i-select', { attrs: { "size": _vm.size, "placement": _vm.placement, "transfer": _vm.transfer, "disabled": _vm.disabled, "eventsEnabled": _vm.eventsEnabled }, on: { "on-change": _vm.changeSize }, model: { value: _vm.currentPageSize, callback: function callback($$v) {
  97130. _vm.currentPageSize = $$v;
  97131. }, expression: "currentPageSize" } }, _vm._l(_vm.pageSizeOpts, function (item) {
  97132. return _c('i-option', { key: item, staticStyle: { "text-align": "center" }, attrs: { "value": item } }, [_vm._v(_vm._s(item) + " " + _vm._s(_vm.t('i.page.page')))]);
  97133. }), 1)], 1) : _vm._e(), _vm._v(" "), _vm.showElevator ? _c('div', { class: _vm.ElevatorClasses }, [_vm._v("\n " + _vm._s(_vm.t('i.page.goto')) + "\n "), _c('input', { attrs: { "type": "text", "autocomplete": "off", "spellcheck": "false", "disabled": _vm.disabled }, domProps: { "value": _vm._current }, on: { "keyup": function keyup($event) {
  97134. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) {
  97135. return null;
  97136. }return _vm.changePage($event);
  97137. } } }), _vm._v("\n " + _vm._s(_vm.t('i.page.p')) + "\n ")]) : _vm._e()]) : _vm._e();
  97138. };
  97139. var staticRenderFns = [];
  97140. exports.render = render;
  97141. exports.staticRenderFns = staticRenderFns;
  97142. /***/ }),
  97143. /* 511 */
  97144. /***/ (function(module, exports, __webpack_require__) {
  97145. "use strict";
  97146. Object.defineProperty(exports, "__esModule", {
  97147. value: true
  97148. });
  97149. var render = function render() {
  97150. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _vm.simple ? _c('ul', { class: _vm.simpleWrapClasses, style: _vm.styles }, [_c('li', { class: _vm.prevClasses, attrs: { "title": _vm.t('i.page.prev') }, on: { "click": _vm.prev } }, [_vm._m(0)]), _vm._v(" "), _c('div', { class: _vm.simplePagerClasses, attrs: { "title": _vm.currentPage + '/' + _vm.allPages } }, [_c('input', { attrs: { "type": "text", "autocomplete": "off", "spellcheck": "false", "disabled": _vm.disabled }, domProps: { "value": _vm.currentPage }, on: { "keydown": _vm.keyDown, "keyup": _vm.keyUp, "change": _vm.keyUp } }), _vm._v(" "), _c('span', [_vm._v("/")]), _vm._v("\n " + _vm._s(_vm.allPages) + "\n ")]), _vm._v(" "), _c('li', { class: _vm.nextClasses, attrs: { "title": _vm.t('i.page.next') }, on: { "click": _vm.next } }, [_vm._m(1)])]) : _c('ul', { class: _vm.wrapClasses, style: _vm.styles }, [_vm.showTotal ? _c('span', { class: [_vm.prefixCls + '-total'] }, [_vm._t("default", [_vm._v(_vm._s(_vm.t('i.page.total')) + " " + _vm._s(_vm.total) + " "), _vm.total <= 1 ? [_vm._v(_vm._s(_vm.t('i.page.item')))] : [_vm._v(_vm._s(_vm.t('i.page.items')))]])], 2) : _vm._e(), _vm._v(" "), _c('li', { class: _vm.prevClasses, attrs: { "title": _vm.t('i.page.prev') }, on: { "click": _vm.prev } }, [_c('a', [_vm.prevText !== '' ? [_vm._v(_vm._s(_vm.prevText))] : _c('i', { staticClass: "ivu-icon ivu-icon-ios-arrow-back" })], 2)]), _vm._v(" "), _c('li', { class: _vm.firstPageClasses, attrs: { "title": "1" }, on: { "click": function click($event) {
  97151. return _vm.changePage(1);
  97152. } } }, [_c('a', [_vm._v("1")])]), _vm._v(" "), _vm.currentPage > 5 ? _c('li', { class: [_vm.prefixCls + '-item-jump-prev'], attrs: { "title": _vm.t('i.page.prev5') }, on: { "click": _vm.fastPrev } }, [_vm._m(2)]) : _vm._e(), _vm._v(" "), _vm.currentPage === 5 ? _c('li', { class: [_vm.prefixCls + '-item'], attrs: { "title": _vm.currentPage - 3 }, on: { "click": function click($event) {
  97153. return _vm.changePage(_vm.currentPage - 3);
  97154. } } }, [_c('a', [_vm._v(_vm._s(_vm.currentPage - 3))])]) : _vm._e(), _vm._v(" "), _vm.currentPage - 2 > 1 ? _c('li', { class: [_vm.prefixCls + '-item'], attrs: { "title": _vm.currentPage - 2 }, on: { "click": function click($event) {
  97155. return _vm.changePage(_vm.currentPage - 2);
  97156. } } }, [_c('a', [_vm._v(_vm._s(_vm.currentPage - 2))])]) : _vm._e(), _vm._v(" "), _vm.currentPage - 1 > 1 ? _c('li', { class: [_vm.prefixCls + '-item'], attrs: { "title": _vm.currentPage - 1 }, on: { "click": function click($event) {
  97157. return _vm.changePage(_vm.currentPage - 1);
  97158. } } }, [_c('a', [_vm._v(_vm._s(_vm.currentPage - 1))])]) : _vm._e(), _vm._v(" "), _vm.currentPage != 1 && _vm.currentPage != _vm.allPages ? _c('li', { class: [_vm.prefixCls + '-item', _vm.prefixCls + '-item-active'], attrs: { "title": _vm.currentPage } }, [_c('a', [_vm._v(_vm._s(_vm.currentPage))])]) : _vm._e(), _vm._v(" "), _vm.currentPage + 1 < _vm.allPages ? _c('li', { class: [_vm.prefixCls + '-item'], attrs: { "title": _vm.currentPage + 1 }, on: { "click": function click($event) {
  97159. return _vm.changePage(_vm.currentPage + 1);
  97160. } } }, [_c('a', [_vm._v(_vm._s(_vm.currentPage + 1))])]) : _vm._e(), _vm._v(" "), _vm.currentPage + 2 < _vm.allPages ? _c('li', { class: [_vm.prefixCls + '-item'], attrs: { "title": _vm.currentPage + 2 }, on: { "click": function click($event) {
  97161. return _vm.changePage(_vm.currentPage + 2);
  97162. } } }, [_c('a', [_vm._v(_vm._s(_vm.currentPage + 2))])]) : _vm._e(), _vm._v(" "), _vm.allPages - _vm.currentPage === 4 ? _c('li', { class: [_vm.prefixCls + '-item'], attrs: { "title": _vm.currentPage + 3 }, on: { "click": function click($event) {
  97163. return _vm.changePage(_vm.currentPage + 3);
  97164. } } }, [_c('a', [_vm._v(_vm._s(_vm.currentPage + 3))])]) : _vm._e(), _vm._v(" "), _vm.allPages - _vm.currentPage >= 5 ? _c('li', { class: [_vm.prefixCls + '-item-jump-next'], attrs: { "title": _vm.t('i.page.next5') }, on: { "click": _vm.fastNext } }, [_vm._m(3)]) : _vm._e(), _vm._v(" "), _vm.allPages > 1 ? _c('li', { class: _vm.lastPageClasses, attrs: { "title": _vm.allPages }, on: { "click": function click($event) {
  97165. return _vm.changePage(_vm.allPages);
  97166. } } }, [_c('a', [_vm._v(_vm._s(_vm.allPages))])]) : _vm._e(), _vm._v(" "), _c('li', { class: _vm.nextClasses, attrs: { "title": _vm.t('i.page.next') }, on: { "click": _vm.next } }, [_c('a', [_vm.nextText !== '' ? [_vm._v(_vm._s(_vm.nextText))] : _c('i', { staticClass: "ivu-icon ivu-icon-ios-arrow-forward" })], 2)]), _vm._v(" "), _c('Options', { attrs: { "show-sizer": _vm.showSizer, "page-size": _vm.currentPageSize, "page-size-opts": _vm.pageSizeOpts, "placement": _vm.placement, "transfer": _vm.transfer, "show-elevator": _vm.showElevator, "_current": _vm.currentPage, "current": _vm.currentPage, "disabled": _vm.disabled, "all-pages": _vm.allPages, "is-small": _vm.isSmall, "eventsEnabled": _vm.eventsEnabled }, on: { "on-size": _vm.onSize, "on-page": _vm.onPage } })], 1);
  97167. };
  97168. var staticRenderFns = [function () {
  97169. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('a', [_c('i', { staticClass: "ivu-icon ivu-icon-ios-arrow-back" })]);
  97170. }, function () {
  97171. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('a', [_c('i', { staticClass: "ivu-icon ivu-icon-ios-arrow-forward" })]);
  97172. }, function () {
  97173. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('a', [_c('i', { staticClass: "ivu-icon ivu-icon-ios-arrow-back" }), _c('i', { staticClass: "ivu-icon ivu-icon-ios-more" })]);
  97174. }, function () {
  97175. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('a', [_c('i', { staticClass: "ivu-icon ivu-icon-ios-arrow-forward" }), _c('i', { staticClass: "ivu-icon ivu-icon-ios-more" })]);
  97176. }];
  97177. exports.render = render;
  97178. exports.staticRenderFns = staticRenderFns;
  97179. /***/ }),
  97180. /* 512 */
  97181. /***/ (function(module, exports, __webpack_require__) {
  97182. "use strict";
  97183. Object.defineProperty(exports, "__esModule", {
  97184. value: true
  97185. });
  97186. var _poptip = __webpack_require__(219);
  97187. var _poptip2 = _interopRequireDefault(_poptip);
  97188. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  97189. exports.default = _poptip2.default;
  97190. /***/ }),
  97191. /* 513 */
  97192. /***/ (function(module, exports, __webpack_require__) {
  97193. "use strict";
  97194. Object.defineProperty(exports, "__esModule", {
  97195. value: true
  97196. });
  97197. var render = function render() {
  97198. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "click-outside", rawName: "v-click-outside", value: _vm.handleClose, expression: "handleClose" }], class: _vm.classes, on: { "mouseenter": _vm.handleMouseenter, "mouseleave": _vm.handleMouseleave } }, [_c('div', { ref: "reference", class: [_vm.prefixCls + '-rel'], on: { "click": _vm.handleClick, "mousedown": function mousedown($event) {
  97199. return _vm.handleFocus(false);
  97200. }, "mouseup": function mouseup($event) {
  97201. return _vm.handleBlur(false);
  97202. } } }, [_vm._t("default")], 2), _vm._v(" "), _c('transition', { attrs: { "name": "fade" } }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.visible, expression: "visible" }, { name: "transfer-dom", rawName: "v-transfer-dom" }], ref: "popper", class: _vm.popperClasses, style: _vm.styles, attrs: { "data-transfer": _vm.transfer }, on: { "click": _vm.handleTransferClick, "mouseenter": _vm.handleMouseenter, "mouseleave": _vm.handleMouseleave } }, [_c('div', { class: [_vm.prefixCls + '-content'] }, [_c('div', { class: [_vm.prefixCls + '-arrow'] }), _vm._v(" "), _vm.confirm ? _c('div', { class: [_vm.prefixCls + '-inner'] }, [_c('div', { class: [_vm.prefixCls + '-body'] }, [_c('i', { staticClass: "ivu-icon ivu-icon-ios-help-circle" }), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-body-message'] }, [_vm._t("title", [_vm._v(_vm._s(_vm.title))])], 2)]), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-footer'] }, [_c('i-button', { attrs: { "type": "text", "size": "small" }, nativeOn: { "click": function click($event) {
  97203. return _vm.cancel($event);
  97204. } } }, [_vm._v(_vm._s(_vm.localeCancelText))]), _vm._v(" "), _c('i-button', { attrs: { "type": "primary", "size": "small" }, nativeOn: { "click": function click($event) {
  97205. return _vm.ok($event);
  97206. } } }, [_vm._v(_vm._s(_vm.localeOkText))])], 1)]) : _vm._e(), _vm._v(" "), !_vm.confirm ? _c('div', { class: [_vm.prefixCls + '-inner'] }, [_vm.showTitle ? _c('div', { ref: "title", class: [_vm.prefixCls + '-title'], style: _vm.contentPaddingStyle }, [_vm._t("title", [_c('div', { class: [_vm.prefixCls + '-title-inner'] }, [_vm._v(_vm._s(_vm.title))])])], 2) : _vm._e(), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-body'], style: _vm.contentPaddingStyle }, [_c('div', { class: _vm.contentClasses }, [_vm._t("content", [_c('div', { class: [_vm.prefixCls + '-body-content-inner'] }, [_vm._v(_vm._s(_vm.content))])])], 2)])]) : _vm._e()])])])], 1);
  97207. };
  97208. var staticRenderFns = [];
  97209. exports.render = render;
  97210. exports.staticRenderFns = staticRenderFns;
  97211. /***/ }),
  97212. /* 514 */
  97213. /***/ (function(module, exports, __webpack_require__) {
  97214. "use strict";
  97215. Object.defineProperty(exports, "__esModule", {
  97216. value: true
  97217. });
  97218. var _progress = __webpack_require__(222);
  97219. var _progress2 = _interopRequireDefault(_progress);
  97220. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  97221. exports.default = _progress2.default;
  97222. /***/ }),
  97223. /* 515 */
  97224. /***/ (function(module, exports, __webpack_require__) {
  97225. "use strict";
  97226. Object.defineProperty(exports, "__esModule", {
  97227. value: true
  97228. });
  97229. var render = function render() {
  97230. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses }, [_c('div', { class: _vm.outerClasses }, [_c('div', { class: _vm.innerClasses }, [_c('div', { class: _vm.bgClasses, style: _vm.bgStyle }, [_vm.textInside ? _c('div', { staticClass: "ivu-progress-inner-text" }, [_vm._v(_vm._s(_vm.percent) + "%")]) : _vm._e()]), _c('div', { class: _vm.successBgClasses, style: _vm.successBgStyle })])]), _vm._v(" "), !_vm.hideInfo && !_vm.textInside ? _c('span', { class: _vm.textClasses }, [_vm._t("default", [_vm.isStatus ? _c('span', { class: _vm.textInnerClasses }, [_c('Icon', { attrs: { "type": _vm.statusIcon } })], 1) : _c('span', { class: _vm.textInnerClasses }, [_vm._v("\n " + _vm._s(_vm.percent) + "%\n ")])])], 2) : _vm._e()]);
  97231. };
  97232. var staticRenderFns = [];
  97233. exports.render = render;
  97234. exports.staticRenderFns = staticRenderFns;
  97235. /***/ }),
  97236. /* 516 */
  97237. /***/ (function(module, exports, __webpack_require__) {
  97238. "use strict";
  97239. Object.defineProperty(exports, "__esModule", {
  97240. value: true
  97241. });
  97242. var _radio = __webpack_require__(517);
  97243. var _radio2 = _interopRequireDefault(_radio);
  97244. var _radioGroup = __webpack_require__(519);
  97245. var _radioGroup2 = _interopRequireDefault(_radioGroup);
  97246. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  97247. _radio2.default.Group = _radioGroup2.default;
  97248. exports.default = _radio2.default;
  97249. /***/ }),
  97250. /* 517 */
  97251. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  97252. "use strict";
  97253. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  97254. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_vue__ = __webpack_require__(224);
  97255. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_vue__);
  97256. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  97257. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b634bcde_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_radio_vue__ = __webpack_require__(518);
  97258. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b634bcde_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_radio_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b634bcde_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_radio_vue__);
  97259. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  97260. /* script */
  97261. /* template */
  97262. /* template functional */
  97263. var __vue_template_functional__ = false
  97264. /* styles */
  97265. var __vue_styles__ = null
  97266. /* scopeId */
  97267. var __vue_scopeId__ = null
  97268. /* moduleIdentifier (server only) */
  97269. var __vue_module_identifier__ = null
  97270. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  97271. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_vue___default.a,
  97272. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b634bcde_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_radio_vue__["render"],
  97273. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b634bcde_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_radio_vue__["staticRenderFns"],
  97274. __vue_template_functional__,
  97275. __vue_styles__,
  97276. __vue_scopeId__,
  97277. __vue_module_identifier__
  97278. )
  97279. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  97280. /***/ }),
  97281. /* 518 */
  97282. /***/ (function(module, exports, __webpack_require__) {
  97283. "use strict";
  97284. Object.defineProperty(exports, "__esModule", {
  97285. value: true
  97286. });
  97287. var render = function render() {
  97288. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('label', { class: _vm.wrapClasses }, [_c('span', { class: _vm.radioClasses }, [_c('span', { class: _vm.innerClasses }), _vm._v(" "), _c('input', { class: _vm.inputClasses, attrs: { "type": "radio", "disabled": _vm.itemDisabled, "name": _vm.groupName }, domProps: { "checked": _vm.currentValue }, on: { "change": _vm.change, "focus": _vm.onFocus, "blur": _vm.onBlur } })]), _vm._t("default", [_vm._v(_vm._s(_vm.label))])], 2);
  97289. };
  97290. var staticRenderFns = [];
  97291. exports.render = render;
  97292. exports.staticRenderFns = staticRenderFns;
  97293. /***/ }),
  97294. /* 519 */
  97295. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  97296. "use strict";
  97297. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  97298. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_group_vue__ = __webpack_require__(225);
  97299. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_group_vue__);
  97300. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_group_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_group_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  97301. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5c606d93_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_radio_group_vue__ = __webpack_require__(520);
  97302. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5c606d93_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_radio_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5c606d93_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_radio_group_vue__);
  97303. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  97304. /* script */
  97305. /* template */
  97306. /* template functional */
  97307. var __vue_template_functional__ = false
  97308. /* styles */
  97309. var __vue_styles__ = null
  97310. /* scopeId */
  97311. var __vue_scopeId__ = null
  97312. /* moduleIdentifier (server only) */
  97313. var __vue_module_identifier__ = null
  97314. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  97315. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_radio_group_vue___default.a,
  97316. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5c606d93_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_radio_group_vue__["render"],
  97317. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_5c606d93_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_radio_group_vue__["staticRenderFns"],
  97318. __vue_template_functional__,
  97319. __vue_styles__,
  97320. __vue_scopeId__,
  97321. __vue_module_identifier__
  97322. )
  97323. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  97324. /***/ }),
  97325. /* 520 */
  97326. /***/ (function(module, exports, __webpack_require__) {
  97327. "use strict";
  97328. Object.defineProperty(exports, "__esModule", {
  97329. value: true
  97330. });
  97331. var render = function render() {
  97332. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes, attrs: { "name": _vm.name } }, [_vm._t("default")], 2);
  97333. };
  97334. var staticRenderFns = [];
  97335. exports.render = render;
  97336. exports.staticRenderFns = staticRenderFns;
  97337. /***/ }),
  97338. /* 521 */
  97339. /***/ (function(module, exports, __webpack_require__) {
  97340. "use strict";
  97341. Object.defineProperty(exports, "__esModule", {
  97342. value: true
  97343. });
  97344. var _rate = __webpack_require__(522);
  97345. var _rate2 = _interopRequireDefault(_rate);
  97346. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  97347. exports.default = _rate2.default;
  97348. /***/ }),
  97349. /* 522 */
  97350. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  97351. "use strict";
  97352. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  97353. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_rate_vue__ = __webpack_require__(226);
  97354. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_rate_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_rate_vue__);
  97355. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_rate_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_rate_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  97356. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a2c4c6f4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_rate_vue__ = __webpack_require__(523);
  97357. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a2c4c6f4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_rate_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a2c4c6f4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_rate_vue__);
  97358. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  97359. /* script */
  97360. /* template */
  97361. /* template functional */
  97362. var __vue_template_functional__ = false
  97363. /* styles */
  97364. var __vue_styles__ = null
  97365. /* scopeId */
  97366. var __vue_scopeId__ = null
  97367. /* moduleIdentifier (server only) */
  97368. var __vue_module_identifier__ = null
  97369. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  97370. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_rate_vue___default.a,
  97371. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a2c4c6f4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_rate_vue__["render"],
  97372. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a2c4c6f4_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_rate_vue__["staticRenderFns"],
  97373. __vue_template_functional__,
  97374. __vue_styles__,
  97375. __vue_scopeId__,
  97376. __vue_module_identifier__
  97377. )
  97378. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  97379. /***/ }),
  97380. /* 523 */
  97381. /***/ (function(module, exports, __webpack_require__) {
  97382. "use strict";
  97383. Object.defineProperty(exports, "__esModule", {
  97384. value: true
  97385. });
  97386. var render = function render() {
  97387. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes, on: { "mouseleave": _vm.handleMouseleave } }, [_c('input', { attrs: { "type": "hidden", "name": _vm.name }, domProps: { "value": _vm.currentValue } }), _vm._v(" "), _vm._l(_vm.count, function (item) {
  97388. return _c('div', { key: item, class: _vm.starCls(item), on: { "mousemove": function mousemove($event) {
  97389. return _vm.handleMousemove(item, $event);
  97390. }, "click": function click($event) {
  97391. return _vm.handleClick(item);
  97392. } } }, [!_vm.showCharacter ? [_c('span', { class: [_vm.prefixCls + '-star-content'], attrs: { "type": "half" } })] : [_c('span', { class: [_vm.prefixCls + '-star-first'], attrs: { "type": "half" } }, [_vm.character !== '' ? [_vm._v(_vm._s(_vm.character))] : _c('i', { class: _vm.iconClasses, attrs: { "type": "half" } })], 2), _vm._v(" "), _c('span', { class: [_vm.prefixCls + '-star-second'] }, [_vm.character !== '' ? [_vm._v(_vm._s(_vm.character))] : _c('i', { class: _vm.iconClasses })], 2)]], 2);
  97393. }), _vm._v(" "), _vm.showText ? _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.currentValue > 0, expression: "currentValue > 0" }], class: [_vm.prefixCls + '-text'] }, [_vm._t("default", [_c('span', [_vm._v(_vm._s(_vm.currentValue))]), _vm._v(" "), _vm.currentValue <= 1 ? _c('span', [_vm._v(_vm._s(_vm.t('i.rate.star')))]) : _c('span', [_vm._v(_vm._s(_vm.t('i.rate.stars')))])])], 2) : _vm._e()], 2);
  97394. };
  97395. var staticRenderFns = [];
  97396. exports.render = render;
  97397. exports.staticRenderFns = staticRenderFns;
  97398. /***/ }),
  97399. /* 524 */
  97400. /***/ (function(module, exports, __webpack_require__) {
  97401. "use strict";
  97402. Object.defineProperty(exports, "__esModule", {
  97403. value: true
  97404. });
  97405. var _sider = __webpack_require__(202);
  97406. var _sider2 = _interopRequireDefault(_sider);
  97407. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  97408. exports.default = _sider2.default;
  97409. /***/ }),
  97410. /* 525 */
  97411. /***/ (function(module, exports, __webpack_require__) {
  97412. "use strict";
  97413. Object.defineProperty(exports, "__esModule", {
  97414. value: true
  97415. });
  97416. var _slider = __webpack_require__(526);
  97417. var _slider2 = _interopRequireDefault(_slider);
  97418. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  97419. exports.default = _slider2.default;
  97420. /***/ }),
  97421. /* 526 */
  97422. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  97423. "use strict";
  97424. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  97425. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_slider_vue__ = __webpack_require__(227);
  97426. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_slider_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_slider_vue__);
  97427. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_slider_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_slider_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  97428. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3cedd8c5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_slider_vue__ = __webpack_require__(539);
  97429. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3cedd8c5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_slider_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3cedd8c5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_slider_vue__);
  97430. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  97431. /* script */
  97432. /* template */
  97433. /* template functional */
  97434. var __vue_template_functional__ = false
  97435. /* styles */
  97436. var __vue_styles__ = null
  97437. /* scopeId */
  97438. var __vue_scopeId__ = null
  97439. /* moduleIdentifier (server only) */
  97440. var __vue_module_identifier__ = null
  97441. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  97442. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_slider_vue___default.a,
  97443. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3cedd8c5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_slider_vue__["render"],
  97444. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_3cedd8c5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_slider_vue__["staticRenderFns"],
  97445. __vue_template_functional__,
  97446. __vue_styles__,
  97447. __vue_scopeId__,
  97448. __vue_module_identifier__
  97449. )
  97450. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  97451. /***/ }),
  97452. /* 527 */
  97453. /***/ (function(module, exports, __webpack_require__) {
  97454. "use strict";
  97455. Object.defineProperty(exports, "__esModule", {
  97456. value: true
  97457. });
  97458. var render = function render() {
  97459. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: [_vm.prefixCls], on: { "mouseenter": _vm.handleShowPopper, "mouseleave": _vm.handleClosePopper } }, [_c('div', { ref: "reference", class: [_vm.prefixCls + '-rel'] }, [_vm._t("default")], 2), _vm._v(" "), _c('transition', { attrs: { "name": "fade" } }, [_c('div', { directives: [{ name: "show", rawName: "v-show", value: !_vm.disabled && (_vm.visible || _vm.always), expression: "!disabled && (visible || always)" }, { name: "transfer-dom", rawName: "v-transfer-dom" }], ref: "popper", class: _vm.dropdownCls, style: _vm.dropStyles, attrs: { "data-transfer": _vm.transfer }, on: { "mouseenter": _vm.handleShowPopper, "mouseleave": _vm.handleClosePopper } }, [_c('div', { class: [_vm.prefixCls + '-content'] }, [_c('div', { class: [_vm.prefixCls + '-arrow'] }), _vm._v(" "), _c('div', { class: _vm.innerClasses, style: _vm.innerStyles }, [_vm._t("content", [_vm._v(_vm._s(_vm.content))])], 2)])])])], 1);
  97460. };
  97461. var staticRenderFns = [];
  97462. exports.render = render;
  97463. exports.staticRenderFns = staticRenderFns;
  97464. /***/ }),
  97465. /* 528 */
  97466. /***/ (function(module, exports, __webpack_require__) {
  97467. "use strict";
  97468. Object.defineProperty(exports, "__esModule", {
  97469. value: true
  97470. });
  97471. exports.default = {
  97472. name: 'SliderMarker',
  97473. props: {
  97474. mark: {
  97475. type: [String, Object]
  97476. }
  97477. },
  97478. render: function render(h) {
  97479. var label = typeof this.mark === 'string' ? this.mark : [this.mark.label];
  97480. return h('div', {
  97481. class: 'ivu-slider-marks-item',
  97482. style: this.mark.style || {}
  97483. }, label);
  97484. }
  97485. };
  97486. /***/ }),
  97487. /* 529 */
  97488. /***/ (function(module, exports, __webpack_require__) {
  97489. "use strict";
  97490. module.exports = function(options) {
  97491. var getState = options.stateHandler.getState;
  97492. /**
  97493. * Tells if the element has been made detectable and ready to be listened for resize events.
  97494. * @public
  97495. * @param {element} The element to check.
  97496. * @returns {boolean} True or false depending on if the element is detectable or not.
  97497. */
  97498. function isDetectable(element) {
  97499. var state = getState(element);
  97500. return state && !!state.isDetectable;
  97501. }
  97502. /**
  97503. * Marks the element that it has been made detectable and ready to be listened for resize events.
  97504. * @public
  97505. * @param {element} The element to mark.
  97506. */
  97507. function markAsDetectable(element) {
  97508. getState(element).isDetectable = true;
  97509. }
  97510. /**
  97511. * Tells if the element is busy or not.
  97512. * @public
  97513. * @param {element} The element to check.
  97514. * @returns {boolean} True or false depending on if the element is busy or not.
  97515. */
  97516. function isBusy(element) {
  97517. return !!getState(element).busy;
  97518. }
  97519. /**
  97520. * Marks the object is busy and should not be made detectable.
  97521. * @public
  97522. * @param {element} element The element to mark.
  97523. * @param {boolean} busy If the element is busy or not.
  97524. */
  97525. function markBusy(element, busy) {
  97526. getState(element).busy = !!busy;
  97527. }
  97528. return {
  97529. isDetectable: isDetectable,
  97530. markAsDetectable: markAsDetectable,
  97531. isBusy: isBusy,
  97532. markBusy: markBusy
  97533. };
  97534. };
  97535. /***/ }),
  97536. /* 530 */
  97537. /***/ (function(module, exports, __webpack_require__) {
  97538. "use strict";
  97539. module.exports = function(idHandler) {
  97540. var eventListeners = {};
  97541. /**
  97542. * Gets all listeners for the given element.
  97543. * @public
  97544. * @param {element} element The element to get all listeners for.
  97545. * @returns All listeners for the given element.
  97546. */
  97547. function getListeners(element) {
  97548. var id = idHandler.get(element);
  97549. if (id === undefined) {
  97550. return [];
  97551. }
  97552. return eventListeners[id] || [];
  97553. }
  97554. /**
  97555. * Stores the given listener for the given element. Will not actually add the listener to the element.
  97556. * @public
  97557. * @param {element} element The element that should have the listener added.
  97558. * @param {function} listener The callback that the element has added.
  97559. */
  97560. function addListener(element, listener) {
  97561. var id = idHandler.get(element);
  97562. if(!eventListeners[id]) {
  97563. eventListeners[id] = [];
  97564. }
  97565. eventListeners[id].push(listener);
  97566. }
  97567. function removeListener(element, listener) {
  97568. var listeners = getListeners(element);
  97569. for (var i = 0, len = listeners.length; i < len; ++i) {
  97570. if (listeners[i] === listener) {
  97571. listeners.splice(i, 1);
  97572. break;
  97573. }
  97574. }
  97575. }
  97576. function removeAllListeners(element) {
  97577. var listeners = getListeners(element);
  97578. if (!listeners) { return; }
  97579. listeners.length = 0;
  97580. }
  97581. return {
  97582. get: getListeners,
  97583. add: addListener,
  97584. removeListener: removeListener,
  97585. removeAllListeners: removeAllListeners
  97586. };
  97587. };
  97588. /***/ }),
  97589. /* 531 */
  97590. /***/ (function(module, exports, __webpack_require__) {
  97591. "use strict";
  97592. module.exports = function() {
  97593. var idCount = 1;
  97594. /**
  97595. * Generates a new unique id in the context.
  97596. * @public
  97597. * @returns {number} A unique id in the context.
  97598. */
  97599. function generate() {
  97600. return idCount++;
  97601. }
  97602. return {
  97603. generate: generate
  97604. };
  97605. };
  97606. /***/ }),
  97607. /* 532 */
  97608. /***/ (function(module, exports, __webpack_require__) {
  97609. "use strict";
  97610. module.exports = function(options) {
  97611. var idGenerator = options.idGenerator;
  97612. var getState = options.stateHandler.getState;
  97613. /**
  97614. * Gets the resize detector id of the element.
  97615. * @public
  97616. * @param {element} element The target element to get the id of.
  97617. * @returns {string|number|null} The id of the element. Null if it has no id.
  97618. */
  97619. function getId(element) {
  97620. var state = getState(element);
  97621. if (state && state.id !== undefined) {
  97622. return state.id;
  97623. }
  97624. return null;
  97625. }
  97626. /**
  97627. * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.
  97628. * @public
  97629. * @param {element} element The target element to set the id of.
  97630. * @returns {string|number|null} The id of the element.
  97631. */
  97632. function setId(element) {
  97633. var state = getState(element);
  97634. if (!state) {
  97635. throw new Error("setId required the element to have a resize detection state.");
  97636. }
  97637. var id = idGenerator.generate();
  97638. state.id = id;
  97639. return id;
  97640. }
  97641. return {
  97642. get: getId,
  97643. set: setId
  97644. };
  97645. };
  97646. /***/ }),
  97647. /* 533 */
  97648. /***/ (function(module, exports, __webpack_require__) {
  97649. "use strict";
  97650. /* global console: false */
  97651. /**
  97652. * Reporter that handles the reporting of logs, warnings and errors.
  97653. * @public
  97654. * @param {boolean} quiet Tells if the reporter should be quiet or not.
  97655. */
  97656. module.exports = function(quiet) {
  97657. function noop() {
  97658. //Does nothing.
  97659. }
  97660. var reporter = {
  97661. log: noop,
  97662. warn: noop,
  97663. error: noop
  97664. };
  97665. if(!quiet && window.console) {
  97666. var attachFunction = function(reporter, name) {
  97667. //The proxy is needed to be able to call the method with the console context,
  97668. //since we cannot use bind.
  97669. reporter[name] = function reporterProxy() {
  97670. var f = console[name];
  97671. if (f.apply) { //IE9 does not support console.log.apply :)
  97672. f.apply(console, arguments);
  97673. } else {
  97674. for (var i = 0; i < arguments.length; i++) {
  97675. f(arguments[i]);
  97676. }
  97677. }
  97678. };
  97679. };
  97680. attachFunction(reporter, "log");
  97681. attachFunction(reporter, "warn");
  97682. attachFunction(reporter, "error");
  97683. }
  97684. return reporter;
  97685. };
  97686. /***/ }),
  97687. /* 534 */
  97688. /***/ (function(module, exports, __webpack_require__) {
  97689. "use strict";
  97690. var utils = __webpack_require__(535);
  97691. module.exports = function batchProcessorMaker(options) {
  97692. options = options || {};
  97693. var reporter = options.reporter;
  97694. var asyncProcess = utils.getOption(options, "async", true);
  97695. var autoProcess = utils.getOption(options, "auto", true);
  97696. if(autoProcess && !asyncProcess) {
  97697. reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true.");
  97698. asyncProcess = true;
  97699. }
  97700. var batch = Batch();
  97701. var asyncFrameHandler;
  97702. var isProcessing = false;
  97703. function addFunction(level, fn) {
  97704. if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) {
  97705. // Since this is async, it is guaranteed to be executed after that the fn is added to the batch.
  97706. // This needs to be done before, since we're checking the size of the batch to be 0.
  97707. processBatchAsync();
  97708. }
  97709. batch.add(level, fn);
  97710. }
  97711. function processBatch() {
  97712. // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch.
  97713. // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on).
  97714. isProcessing = true;
  97715. while (batch.size()) {
  97716. var processingBatch = batch;
  97717. batch = Batch();
  97718. processingBatch.process();
  97719. }
  97720. isProcessing = false;
  97721. }
  97722. function forceProcessBatch(localAsyncProcess) {
  97723. if (isProcessing) {
  97724. return;
  97725. }
  97726. if(localAsyncProcess === undefined) {
  97727. localAsyncProcess = asyncProcess;
  97728. }
  97729. if(asyncFrameHandler) {
  97730. cancelFrame(asyncFrameHandler);
  97731. asyncFrameHandler = null;
  97732. }
  97733. if(localAsyncProcess) {
  97734. processBatchAsync();
  97735. } else {
  97736. processBatch();
  97737. }
  97738. }
  97739. function processBatchAsync() {
  97740. asyncFrameHandler = requestFrame(processBatch);
  97741. }
  97742. function clearBatch() {
  97743. batch = {};
  97744. batchSize = 0;
  97745. topLevel = 0;
  97746. bottomLevel = 0;
  97747. }
  97748. function cancelFrame(listener) {
  97749. // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
  97750. var cancel = clearTimeout;
  97751. return cancel(listener);
  97752. }
  97753. function requestFrame(callback) {
  97754. // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); };
  97755. var raf = function(fn) { return setTimeout(fn, 0); };
  97756. return raf(callback);
  97757. }
  97758. return {
  97759. add: addFunction,
  97760. force: forceProcessBatch
  97761. };
  97762. };
  97763. function Batch() {
  97764. var batch = {};
  97765. var size = 0;
  97766. var topLevel = 0;
  97767. var bottomLevel = 0;
  97768. function add(level, fn) {
  97769. if(!fn) {
  97770. fn = level;
  97771. level = 0;
  97772. }
  97773. if(level > topLevel) {
  97774. topLevel = level;
  97775. } else if(level < bottomLevel) {
  97776. bottomLevel = level;
  97777. }
  97778. if(!batch[level]) {
  97779. batch[level] = [];
  97780. }
  97781. batch[level].push(fn);
  97782. size++;
  97783. }
  97784. function process() {
  97785. for(var level = bottomLevel; level <= topLevel; level++) {
  97786. var fns = batch[level];
  97787. for(var i = 0; i < fns.length; i++) {
  97788. var fn = fns[i];
  97789. fn();
  97790. }
  97791. }
  97792. }
  97793. function getSize() {
  97794. return size;
  97795. }
  97796. return {
  97797. add: add,
  97798. process: process,
  97799. size: getSize
  97800. };
  97801. }
  97802. /***/ }),
  97803. /* 535 */
  97804. /***/ (function(module, exports, __webpack_require__) {
  97805. "use strict";
  97806. var utils = module.exports = {};
  97807. utils.getOption = getOption;
  97808. function getOption(options, name, defaultValue) {
  97809. var value = options[name];
  97810. if((value === undefined || value === null) && defaultValue !== undefined) {
  97811. return defaultValue;
  97812. }
  97813. return value;
  97814. }
  97815. /***/ }),
  97816. /* 536 */
  97817. /***/ (function(module, exports, __webpack_require__) {
  97818. "use strict";
  97819. var prop = "_erd";
  97820. function initState(element) {
  97821. element[prop] = {};
  97822. return getState(element);
  97823. }
  97824. function getState(element) {
  97825. return element[prop];
  97826. }
  97827. function cleanState(element) {
  97828. delete element[prop];
  97829. }
  97830. module.exports = {
  97831. initState: initState,
  97832. getState: getState,
  97833. cleanState: cleanState
  97834. };
  97835. /***/ }),
  97836. /* 537 */
  97837. /***/ (function(module, exports, __webpack_require__) {
  97838. "use strict";
  97839. /**
  97840. * Resize detection strategy that injects objects to elements in order to detect resize events.
  97841. * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
  97842. */
  97843. var browserDetector = __webpack_require__(230);
  97844. module.exports = function(options) {
  97845. options = options || {};
  97846. var reporter = options.reporter;
  97847. var batchProcessor = options.batchProcessor;
  97848. var getState = options.stateHandler.getState;
  97849. if(!reporter) {
  97850. throw new Error("Missing required dependency: reporter.");
  97851. }
  97852. /**
  97853. * Adds a resize event listener to the element.
  97854. * @public
  97855. * @param {element} element The element that should have the listener added.
  97856. * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
  97857. */
  97858. function addListener(element, listener) {
  97859. function listenerProxy() {
  97860. listener(element);
  97861. }
  97862. if(browserDetector.isIE(8)) {
  97863. //IE 8 does not support object, but supports the resize event directly on elements.
  97864. getState(element).object = {
  97865. proxy: listenerProxy
  97866. };
  97867. element.attachEvent("onresize", listenerProxy);
  97868. } else {
  97869. var object = getObject(element);
  97870. if(!object) {
  97871. throw new Error("Element is not detectable by this strategy.");
  97872. }
  97873. object.contentDocument.defaultView.addEventListener("resize", listenerProxy);
  97874. }
  97875. }
  97876. function buildCssTextString(rules) {
  97877. var seperator = options.important ? " !important; " : "; ";
  97878. return (rules.join(seperator) + seperator).trim();
  97879. }
  97880. /**
  97881. * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
  97882. * @private
  97883. * @param {object} options Optional options object.
  97884. * @param {element} element The element to make detectable
  97885. * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
  97886. */
  97887. function makeDetectable(options, element, callback) {
  97888. if (!callback) {
  97889. callback = element;
  97890. element = options;
  97891. options = null;
  97892. }
  97893. options = options || {};
  97894. var debug = options.debug;
  97895. function injectObject(element, callback) {
  97896. var OBJECT_STYLE = buildCssTextString(["display: block", "position: absolute", "top: 0", "left: 0", "width: 100%", "height: 100%", "border: none", "padding: 0", "margin: 0", "opacity: 0", "z-index: -1000", "pointer-events: none"]);
  97897. //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element.
  97898. // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not.
  97899. var positionCheckPerformed = false;
  97900. // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers.
  97901. // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM.
  97902. var style = window.getComputedStyle(element);
  97903. var width = element.offsetWidth;
  97904. var height = element.offsetHeight;
  97905. getState(element).startSize = {
  97906. width: width,
  97907. height: height
  97908. };
  97909. function mutateDom() {
  97910. function alterPositionStyles() {
  97911. if(style.position === "static") {
  97912. element.style.setProperty("position", "relative", options.important ? "important" : "");
  97913. var removeRelativeStyles = function(reporter, element, style, property) {
  97914. function getNumericalValue(value) {
  97915. return value.replace(/[^-\d\.]/g, "");
  97916. }
  97917. var value = style[property];
  97918. if(value !== "auto" && getNumericalValue(value) !== "0") {
  97919. reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
  97920. element.style.setProperty(property, "0", options.important ? "important" : "");
  97921. }
  97922. };
  97923. //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
  97924. //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
  97925. removeRelativeStyles(reporter, element, style, "top");
  97926. removeRelativeStyles(reporter, element, style, "right");
  97927. removeRelativeStyles(reporter, element, style, "bottom");
  97928. removeRelativeStyles(reporter, element, style, "left");
  97929. }
  97930. }
  97931. function onObjectLoad() {
  97932. // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM.
  97933. if (!positionCheckPerformed) {
  97934. alterPositionStyles();
  97935. }
  97936. /*jshint validthis: true */
  97937. function getDocument(element, callback) {
  97938. //Opera 12 seem to call the object.onload before the actual document has been created.
  97939. //So if it is not present, poll it with an timeout until it is present.
  97940. //TODO: Could maybe be handled better with object.onreadystatechange or similar.
  97941. if(!element.contentDocument) {
  97942. setTimeout(function checkForObjectDocument() {
  97943. getDocument(element, callback);
  97944. }, 100);
  97945. return;
  97946. }
  97947. callback(element.contentDocument);
  97948. }
  97949. //Mutating the object element here seems to fire another load event.
  97950. //Mutating the inner document of the object element is fine though.
  97951. var objectElement = this;
  97952. //Create the style element to be added to the object.
  97953. getDocument(objectElement, function onObjectDocumentReady(objectDocument) {
  97954. //Notify that the element is ready to be listened to.
  97955. callback(element);
  97956. });
  97957. }
  97958. // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements.
  97959. // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible.
  97960. if (style.position !== "") {
  97961. alterPositionStyles(style);
  97962. positionCheckPerformed = true;
  97963. }
  97964. //Add an object element as a child to the target element that will be listened to for resize events.
  97965. var object = document.createElement("object");
  97966. object.style.cssText = OBJECT_STYLE;
  97967. object.tabIndex = -1;
  97968. object.type = "text/html";
  97969. object.onload = onObjectLoad;
  97970. //Safari: This must occur before adding the object to the DOM.
  97971. //IE: Does not like that this happens before, even if it is also added after.
  97972. if(!browserDetector.isIE()) {
  97973. object.data = "about:blank";
  97974. }
  97975. if (!getState(element)) {
  97976. // The element has been uninstalled before the actual loading happened.
  97977. return;
  97978. }
  97979. element.appendChild(object);
  97980. getState(element).object = object;
  97981. //IE: This must occur after adding the object to the DOM.
  97982. if(browserDetector.isIE()) {
  97983. object.data = "about:blank";
  97984. }
  97985. }
  97986. if(batchProcessor) {
  97987. batchProcessor.add(mutateDom);
  97988. } else {
  97989. mutateDom();
  97990. }
  97991. }
  97992. if(browserDetector.isIE(8)) {
  97993. //IE 8 does not support objects properly. Luckily they do support the resize event.
  97994. //So do not inject the object and notify that the element is already ready to be listened to.
  97995. //The event handler for the resize event is attached in the utils.addListener instead.
  97996. callback(element);
  97997. } else {
  97998. injectObject(element, callback);
  97999. }
  98000. }
  98001. /**
  98002. * Returns the child object of the target element.
  98003. * @private
  98004. * @param {element} element The target element.
  98005. * @returns The object element of the target.
  98006. */
  98007. function getObject(element) {
  98008. return getState(element).object;
  98009. }
  98010. function uninstall(element) {
  98011. if (!getState(element)) {
  98012. return;
  98013. }
  98014. var object = getObject(element);
  98015. if (!object) {
  98016. return;
  98017. }
  98018. if (browserDetector.isIE(8)) {
  98019. element.detachEvent("onresize", object.proxy);
  98020. } else {
  98021. element.removeChild(object);
  98022. }
  98023. delete getState(element).object;
  98024. }
  98025. return {
  98026. makeDetectable: makeDetectable,
  98027. addListener: addListener,
  98028. uninstall: uninstall
  98029. };
  98030. };
  98031. /***/ }),
  98032. /* 538 */
  98033. /***/ (function(module, exports, __webpack_require__) {
  98034. "use strict";
  98035. /**
  98036. * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events.
  98037. * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js
  98038. */
  98039. var forEach = __webpack_require__(229).forEach;
  98040. module.exports = function(options) {
  98041. options = options || {};
  98042. var reporter = options.reporter;
  98043. var batchProcessor = options.batchProcessor;
  98044. var getState = options.stateHandler.getState;
  98045. var hasState = options.stateHandler.hasState;
  98046. var idHandler = options.idHandler;
  98047. if (!batchProcessor) {
  98048. throw new Error("Missing required dependency: batchProcessor");
  98049. }
  98050. if (!reporter) {
  98051. throw new Error("Missing required dependency: reporter.");
  98052. }
  98053. //TODO: Could this perhaps be done at installation time?
  98054. var scrollbarSizes = getScrollbarSizes();
  98055. var styleId = "erd_scroll_detection_scrollbar_style";
  98056. var detectionContainerClass = "erd_scroll_detection_container";
  98057. function initDocument(targetDocument) {
  98058. // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome.
  98059. // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements).
  98060. injectScrollStyle(targetDocument, styleId, detectionContainerClass);
  98061. }
  98062. initDocument(window.document);
  98063. function buildCssTextString(rules) {
  98064. var seperator = options.important ? " !important; " : "; ";
  98065. return (rules.join(seperator) + seperator).trim();
  98066. }
  98067. function getScrollbarSizes() {
  98068. var width = 500;
  98069. var height = 500;
  98070. var child = document.createElement("div");
  98071. child.style.cssText = buildCssTextString(["position: absolute", "width: " + width*2 + "px", "height: " + height*2 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
  98072. var container = document.createElement("div");
  98073. container.style.cssText = buildCssTextString(["position: absolute", "width: " + width + "px", "height: " + height + "px", "overflow: scroll", "visibility: none", "top: " + -width*3 + "px", "left: " + -height*3 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
  98074. container.appendChild(child);
  98075. document.body.insertBefore(container, document.body.firstChild);
  98076. var widthSize = width - container.clientWidth;
  98077. var heightSize = height - container.clientHeight;
  98078. document.body.removeChild(container);
  98079. return {
  98080. width: widthSize,
  98081. height: heightSize
  98082. };
  98083. }
  98084. function injectScrollStyle(targetDocument, styleId, containerClass) {
  98085. function injectStyle(style, method) {
  98086. method = method || function (element) {
  98087. targetDocument.head.appendChild(element);
  98088. };
  98089. var styleElement = targetDocument.createElement("style");
  98090. styleElement.innerHTML = style;
  98091. styleElement.id = styleId;
  98092. method(styleElement);
  98093. return styleElement;
  98094. }
  98095. if (!targetDocument.getElementById(styleId)) {
  98096. var containerAnimationClass = containerClass + "_animation";
  98097. var containerAnimationActiveClass = containerClass + "_animation_active";
  98098. var style = "/* Created by the element-resize-detector library. */\n";
  98099. style += "." + containerClass + " > div::-webkit-scrollbar { " + buildCssTextString(["display: none"]) + " }\n\n";
  98100. style += "." + containerAnimationActiveClass + " { " + buildCssTextString(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + containerAnimationClass, "animation-name: " + containerAnimationClass]) + " }\n";
  98101. style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n";
  98102. style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }";
  98103. injectStyle(style);
  98104. }
  98105. }
  98106. function addAnimationClass(element) {
  98107. element.className += " " + detectionContainerClass + "_animation_active";
  98108. }
  98109. function addEvent(el, name, cb) {
  98110. if (el.addEventListener) {
  98111. el.addEventListener(name, cb);
  98112. } else if(el.attachEvent) {
  98113. el.attachEvent("on" + name, cb);
  98114. } else {
  98115. return reporter.error("[scroll] Don't know how to add event listeners.");
  98116. }
  98117. }
  98118. function removeEvent(el, name, cb) {
  98119. if (el.removeEventListener) {
  98120. el.removeEventListener(name, cb);
  98121. } else if(el.detachEvent) {
  98122. el.detachEvent("on" + name, cb);
  98123. } else {
  98124. return reporter.error("[scroll] Don't know how to remove event listeners.");
  98125. }
  98126. }
  98127. function getExpandElement(element) {
  98128. return getState(element).container.childNodes[0].childNodes[0].childNodes[0];
  98129. }
  98130. function getShrinkElement(element) {
  98131. return getState(element).container.childNodes[0].childNodes[0].childNodes[1];
  98132. }
  98133. /**
  98134. * Adds a resize event listener to the element.
  98135. * @public
  98136. * @param {element} element The element that should have the listener added.
  98137. * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.
  98138. */
  98139. function addListener(element, listener) {
  98140. var listeners = getState(element).listeners;
  98141. if (!listeners.push) {
  98142. throw new Error("Cannot add listener to an element that is not detectable.");
  98143. }
  98144. getState(element).listeners.push(listener);
  98145. }
  98146. /**
  98147. * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes.
  98148. * @private
  98149. * @param {object} options Optional options object.
  98150. * @param {element} element The element to make detectable
  98151. * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter.
  98152. */
  98153. function makeDetectable(options, element, callback) {
  98154. if (!callback) {
  98155. callback = element;
  98156. element = options;
  98157. options = null;
  98158. }
  98159. options = options || {};
  98160. function debug() {
  98161. if (options.debug) {
  98162. var args = Array.prototype.slice.call(arguments);
  98163. args.unshift(idHandler.get(element), "Scroll: ");
  98164. if (reporter.log.apply) {
  98165. reporter.log.apply(null, args);
  98166. } else {
  98167. for (var i = 0; i < args.length; i++) {
  98168. reporter.log(args[i]);
  98169. }
  98170. }
  98171. }
  98172. }
  98173. function isDetached(element) {
  98174. function isInDocument(element) {
  98175. return element === element.ownerDocument.body || element.ownerDocument.body.contains(element);
  98176. }
  98177. if (!isInDocument(element)) {
  98178. return true;
  98179. }
  98180. // FireFox returns null style in hidden iframes. See https://github.com/wnr/element-resize-detector/issues/68 and https://bugzilla.mozilla.org/show_bug.cgi?id=795520
  98181. if (window.getComputedStyle(element) === null) {
  98182. return true;
  98183. }
  98184. return false;
  98185. }
  98186. function isUnrendered(element) {
  98187. // Check the absolute positioned container since the top level container is display: inline.
  98188. var container = getState(element).container.childNodes[0];
  98189. var style = window.getComputedStyle(container);
  98190. return !style.width || style.width.indexOf("px") === -1; //Can only compute pixel value when rendered.
  98191. }
  98192. function getStyle() {
  98193. // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here,
  98194. // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching).
  98195. var elementStyle = window.getComputedStyle(element);
  98196. var style = {};
  98197. style.position = elementStyle.position;
  98198. style.width = element.offsetWidth;
  98199. style.height = element.offsetHeight;
  98200. style.top = elementStyle.top;
  98201. style.right = elementStyle.right;
  98202. style.bottom = elementStyle.bottom;
  98203. style.left = elementStyle.left;
  98204. style.widthCSS = elementStyle.width;
  98205. style.heightCSS = elementStyle.height;
  98206. return style;
  98207. }
  98208. function storeStartSize() {
  98209. var style = getStyle();
  98210. getState(element).startSize = {
  98211. width: style.width,
  98212. height: style.height
  98213. };
  98214. debug("Element start size", getState(element).startSize);
  98215. }
  98216. function initListeners() {
  98217. getState(element).listeners = [];
  98218. }
  98219. function storeStyle() {
  98220. debug("storeStyle invoked.");
  98221. if (!getState(element)) {
  98222. debug("Aborting because element has been uninstalled");
  98223. return;
  98224. }
  98225. var style = getStyle();
  98226. getState(element).style = style;
  98227. }
  98228. function storeCurrentSize(element, width, height) {
  98229. getState(element).lastWidth = width;
  98230. getState(element).lastHeight = height;
  98231. }
  98232. function getExpandChildElement(element) {
  98233. return getExpandElement(element).childNodes[0];
  98234. }
  98235. function getWidthOffset() {
  98236. return 2 * scrollbarSizes.width + 1;
  98237. }
  98238. function getHeightOffset() {
  98239. return 2 * scrollbarSizes.height + 1;
  98240. }
  98241. function getExpandWidth(width) {
  98242. return width + 10 + getWidthOffset();
  98243. }
  98244. function getExpandHeight(height) {
  98245. return height + 10 + getHeightOffset();
  98246. }
  98247. function getShrinkWidth(width) {
  98248. return width * 2 + getWidthOffset();
  98249. }
  98250. function getShrinkHeight(height) {
  98251. return height * 2 + getHeightOffset();
  98252. }
  98253. function positionScrollbars(element, width, height) {
  98254. var expand = getExpandElement(element);
  98255. var shrink = getShrinkElement(element);
  98256. var expandWidth = getExpandWidth(width);
  98257. var expandHeight = getExpandHeight(height);
  98258. var shrinkWidth = getShrinkWidth(width);
  98259. var shrinkHeight = getShrinkHeight(height);
  98260. expand.scrollLeft = expandWidth;
  98261. expand.scrollTop = expandHeight;
  98262. shrink.scrollLeft = shrinkWidth;
  98263. shrink.scrollTop = shrinkHeight;
  98264. }
  98265. function injectContainerElement() {
  98266. var container = getState(element).container;
  98267. if (!container) {
  98268. container = document.createElement("div");
  98269. container.className = detectionContainerClass;
  98270. container.style.cssText = buildCssTextString(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]);
  98271. getState(element).container = container;
  98272. addAnimationClass(container);
  98273. element.appendChild(container);
  98274. var onAnimationStart = function () {
  98275. getState(element).onRendered && getState(element).onRendered();
  98276. };
  98277. addEvent(container, "animationstart", onAnimationStart);
  98278. // Store the event handler here so that they may be removed when uninstall is called.
  98279. // See uninstall function for an explanation why it is needed.
  98280. getState(element).onAnimationStart = onAnimationStart;
  98281. }
  98282. return container;
  98283. }
  98284. function injectScrollElements() {
  98285. function alterPositionStyles() {
  98286. var style = getState(element).style;
  98287. if(style.position === "static") {
  98288. element.style.setProperty("position", "relative",options.important ? "important" : "");
  98289. var removeRelativeStyles = function(reporter, element, style, property) {
  98290. function getNumericalValue(value) {
  98291. return value.replace(/[^-\d\.]/g, "");
  98292. }
  98293. var value = style[property];
  98294. if(value !== "auto" && getNumericalValue(value) !== "0") {
  98295. reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element);
  98296. element.style[property] = 0;
  98297. }
  98298. };
  98299. //Check so that there are no accidental styles that will make the element styled differently now that is is relative.
  98300. //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway).
  98301. removeRelativeStyles(reporter, element, style, "top");
  98302. removeRelativeStyles(reporter, element, style, "right");
  98303. removeRelativeStyles(reporter, element, style, "bottom");
  98304. removeRelativeStyles(reporter, element, style, "left");
  98305. }
  98306. }
  98307. function getLeftTopBottomRightCssText(left, top, bottom, right) {
  98308. left = (!left ? "0" : (left + "px"));
  98309. top = (!top ? "0" : (top + "px"));
  98310. bottom = (!bottom ? "0" : (bottom + "px"));
  98311. right = (!right ? "0" : (right + "px"));
  98312. return ["left: " + left, "top: " + top, "right: " + right, "bottom: " + bottom];
  98313. }
  98314. debug("Injecting elements");
  98315. if (!getState(element)) {
  98316. debug("Aborting because element has been uninstalled");
  98317. return;
  98318. }
  98319. alterPositionStyles();
  98320. var rootContainer = getState(element).container;
  98321. if (!rootContainer) {
  98322. rootContainer = injectContainerElement();
  98323. }
  98324. // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari),
  98325. // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than
  98326. // the targeted element.
  98327. // When the bug is resolved, "containerContainer" may be removed.
  98328. // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980).
  98329. // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px.
  98330. var scrollbarWidth = scrollbarSizes.width;
  98331. var scrollbarHeight = scrollbarSizes.height;
  98332. var containerContainerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]);
  98333. var containerStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth)));
  98334. var expandStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
  98335. var shrinkStyle = buildCssTextString(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]);
  98336. var expandChildStyle = buildCssTextString(["position: absolute", "left: 0", "top: 0"]);
  98337. var shrinkChildStyle = buildCssTextString(["position: absolute", "width: 200%", "height: 200%"]);
  98338. var containerContainer = document.createElement("div");
  98339. var container = document.createElement("div");
  98340. var expand = document.createElement("div");
  98341. var expandChild = document.createElement("div");
  98342. var shrink = document.createElement("div");
  98343. var shrinkChild = document.createElement("div");
  98344. // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56
  98345. // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers.
  98346. containerContainer.dir = "ltr";
  98347. containerContainer.style.cssText = containerContainerStyle;
  98348. containerContainer.className = detectionContainerClass;
  98349. container.className = detectionContainerClass;
  98350. container.style.cssText = containerStyle;
  98351. expand.style.cssText = expandStyle;
  98352. expandChild.style.cssText = expandChildStyle;
  98353. shrink.style.cssText = shrinkStyle;
  98354. shrinkChild.style.cssText = shrinkChildStyle;
  98355. expand.appendChild(expandChild);
  98356. shrink.appendChild(shrinkChild);
  98357. container.appendChild(expand);
  98358. container.appendChild(shrink);
  98359. containerContainer.appendChild(container);
  98360. rootContainer.appendChild(containerContainer);
  98361. function onExpandScroll() {
  98362. getState(element).onExpand && getState(element).onExpand();
  98363. }
  98364. function onShrinkScroll() {
  98365. getState(element).onShrink && getState(element).onShrink();
  98366. }
  98367. addEvent(expand, "scroll", onExpandScroll);
  98368. addEvent(shrink, "scroll", onShrinkScroll);
  98369. // Store the event handlers here so that they may be removed when uninstall is called.
  98370. // See uninstall function for an explanation why it is needed.
  98371. getState(element).onExpandScroll = onExpandScroll;
  98372. getState(element).onShrinkScroll = onShrinkScroll;
  98373. }
  98374. function registerListenersAndPositionElements() {
  98375. function updateChildSizes(element, width, height) {
  98376. var expandChild = getExpandChildElement(element);
  98377. var expandWidth = getExpandWidth(width);
  98378. var expandHeight = getExpandHeight(height);
  98379. expandChild.style.setProperty("width", expandWidth + "px", options.important ? "important" : "");
  98380. expandChild.style.setProperty("height", expandHeight + "px", options.important ? "important" : "");
  98381. }
  98382. function updateDetectorElements(done) {
  98383. var width = element.offsetWidth;
  98384. var height = element.offsetHeight;
  98385. // Check whether the size has actually changed since last time the algorithm ran. If not, some steps may be skipped.
  98386. var sizeChanged = width !== getState(element).lastWidth || height !== getState(element).lastHeight;
  98387. debug("Storing current size", width, height);
  98388. // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners.
  98389. // Otherwise the if-check in handleScroll is useless.
  98390. storeCurrentSize(element, width, height);
  98391. // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute.
  98392. // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch.
  98393. batchProcessor.add(0, function performUpdateChildSizes() {
  98394. if (!sizeChanged) {
  98395. return;
  98396. }
  98397. if (!getState(element)) {
  98398. debug("Aborting because element has been uninstalled");
  98399. return;
  98400. }
  98401. if (!areElementsInjected()) {
  98402. debug("Aborting because element container has not been initialized");
  98403. return;
  98404. }
  98405. if (options.debug) {
  98406. var w = element.offsetWidth;
  98407. var h = element.offsetHeight;
  98408. if (w !== width || h !== height) {
  98409. reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements.");
  98410. }
  98411. }
  98412. updateChildSizes(element, width, height);
  98413. });
  98414. batchProcessor.add(1, function updateScrollbars() {
  98415. // This function needs to be invoked event though the size is unchanged. The element could have been resized very quickly and then
  98416. // been restored to the original size, which will have changed the scrollbar positions.
  98417. if (!getState(element)) {
  98418. debug("Aborting because element has been uninstalled");
  98419. return;
  98420. }
  98421. if (!areElementsInjected()) {
  98422. debug("Aborting because element container has not been initialized");
  98423. return;
  98424. }
  98425. positionScrollbars(element, width, height);
  98426. });
  98427. if (sizeChanged && done) {
  98428. batchProcessor.add(2, function () {
  98429. if (!getState(element)) {
  98430. debug("Aborting because element has been uninstalled");
  98431. return;
  98432. }
  98433. if (!areElementsInjected()) {
  98434. debug("Aborting because element container has not been initialized");
  98435. return;
  98436. }
  98437. done();
  98438. });
  98439. }
  98440. }
  98441. function areElementsInjected() {
  98442. return !!getState(element).container;
  98443. }
  98444. function notifyListenersIfNeeded() {
  98445. function isFirstNotify() {
  98446. return getState(element).lastNotifiedWidth === undefined;
  98447. }
  98448. debug("notifyListenersIfNeeded invoked");
  98449. var state = getState(element);
  98450. // Don't notify if the current size is the start size, and this is the first notification.
  98451. if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) {
  98452. return debug("Not notifying: Size is the same as the start size, and there has been no notification yet.");
  98453. }
  98454. // Don't notify if the size already has been notified.
  98455. if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) {
  98456. return debug("Not notifying: Size already notified");
  98457. }
  98458. debug("Current size not notified, notifying...");
  98459. state.lastNotifiedWidth = state.lastWidth;
  98460. state.lastNotifiedHeight = state.lastHeight;
  98461. forEach(getState(element).listeners, function (listener) {
  98462. listener(element);
  98463. });
  98464. }
  98465. function handleRender() {
  98466. debug("startanimation triggered.");
  98467. if (isUnrendered(element)) {
  98468. debug("Ignoring since element is still unrendered...");
  98469. return;
  98470. }
  98471. debug("Element rendered.");
  98472. var expand = getExpandElement(element);
  98473. var shrink = getShrinkElement(element);
  98474. if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) {
  98475. debug("Scrollbars out of sync. Updating detector elements...");
  98476. updateDetectorElements(notifyListenersIfNeeded);
  98477. }
  98478. }
  98479. function handleScroll() {
  98480. debug("Scroll detected.");
  98481. if (isUnrendered(element)) {
  98482. // Element is still unrendered. Skip this scroll event.
  98483. debug("Scroll event fired while unrendered. Ignoring...");
  98484. return;
  98485. }
  98486. updateDetectorElements(notifyListenersIfNeeded);
  98487. }
  98488. debug("registerListenersAndPositionElements invoked.");
  98489. if (!getState(element)) {
  98490. debug("Aborting because element has been uninstalled");
  98491. return;
  98492. }
  98493. getState(element).onRendered = handleRender;
  98494. getState(element).onExpand = handleScroll;
  98495. getState(element).onShrink = handleScroll;
  98496. var style = getState(element).style;
  98497. updateChildSizes(element, style.width, style.height);
  98498. }
  98499. function finalizeDomMutation() {
  98500. debug("finalizeDomMutation invoked.");
  98501. if (!getState(element)) {
  98502. debug("Aborting because element has been uninstalled");
  98503. return;
  98504. }
  98505. var style = getState(element).style;
  98506. storeCurrentSize(element, style.width, style.height);
  98507. positionScrollbars(element, style.width, style.height);
  98508. }
  98509. function ready() {
  98510. callback(element);
  98511. }
  98512. function install() {
  98513. debug("Installing...");
  98514. initListeners();
  98515. storeStartSize();
  98516. batchProcessor.add(0, storeStyle);
  98517. batchProcessor.add(1, injectScrollElements);
  98518. batchProcessor.add(2, registerListenersAndPositionElements);
  98519. batchProcessor.add(3, finalizeDomMutation);
  98520. batchProcessor.add(4, ready);
  98521. }
  98522. debug("Making detectable...");
  98523. if (isDetached(element)) {
  98524. debug("Element is detached");
  98525. injectContainerElement();
  98526. debug("Waiting until element is attached...");
  98527. getState(element).onRendered = function () {
  98528. debug("Element is now attached");
  98529. install();
  98530. };
  98531. } else {
  98532. install();
  98533. }
  98534. }
  98535. function uninstall(element) {
  98536. var state = getState(element);
  98537. if (!state) {
  98538. // Uninstall has been called on a non-erd element.
  98539. return;
  98540. }
  98541. // Uninstall may have been called in the following scenarios:
  98542. // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected).
  98543. // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected).
  98544. // (3) After the installation process (here, state.busy = false and all the stuff has been injected).
  98545. // So to be on the safe side, let's check for each thing before removing.
  98546. // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element.
  98547. state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll);
  98548. state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll);
  98549. state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart);
  98550. state.container && element.removeChild(state.container);
  98551. }
  98552. return {
  98553. makeDetectable: makeDetectable,
  98554. addListener: addListener,
  98555. uninstall: uninstall,
  98556. initDocument: initDocument
  98557. };
  98558. };
  98559. /***/ }),
  98560. /* 539 */
  98561. /***/ (function(module, exports, __webpack_require__) {
  98562. "use strict";
  98563. Object.defineProperty(exports, "__esModule", {
  98564. value: true
  98565. });
  98566. var render = function render() {
  98567. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [!_vm.range && _vm.showInput ? _c('Input-number', { attrs: { "min": _vm.min, "size": _vm.inputSize, "max": _vm.max, "step": _vm.step, "value": _vm.exportValue[0], "disabled": _vm.itemDisabled, "active-change": _vm.activeChange }, on: { "on-change": _vm.handleInputChange } }) : _vm._e(), _vm._v(" "), _c('div', { ref: "slider", class: [_vm.prefixCls + '-wrap'], on: { "click": function click($event) {
  98568. if ($event.target !== $event.currentTarget) {
  98569. return null;
  98570. }return _vm.sliderClick($event);
  98571. } } }, [_c('input', { attrs: { "type": "hidden", "name": _vm.name }, domProps: { "value": _vm.exportValue } }), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-bar'], style: _vm.barStyle, on: { "click": function click($event) {
  98572. if ($event.target !== $event.currentTarget) {
  98573. return null;
  98574. }return _vm.sliderClick($event);
  98575. } } }), _vm._v(" "), _vm.showStops ? _vm._l(_vm.stops, function (item) {
  98576. return _c('div', { class: [_vm.prefixCls + '-stop'], style: { 'left': item + '%' }, on: { "click": function click($event) {
  98577. if ($event.target !== $event.currentTarget) {
  98578. return null;
  98579. }return _vm.sliderClick($event);
  98580. } } });
  98581. }) : _vm._e(), _vm._v(" "), _vm.markList.length > 0 ? [_vm._l(_vm.markList, function (item, key) {
  98582. return _c('div', { key: key, class: [_vm.prefixCls + '-stop'], style: { 'left': item.position + '%' }, on: { "click": function click($event) {
  98583. if ($event.target !== $event.currentTarget) {
  98584. return null;
  98585. }return _vm.sliderClick($event);
  98586. } } });
  98587. }), _vm._v(" "), _c('div', { staticClass: "ivu-slider-marks" }, _vm._l(_vm.markList, function (item, key) {
  98588. return _c('SliderMarker', { key: key, style: { 'left': item.position + '%' }, attrs: { "mark": item.mark }, nativeOn: { "click": function click($event) {
  98589. return _vm.sliderClick($event);
  98590. } } });
  98591. }), 1)] : _vm._e(), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-button-wrap'], style: { left: _vm.minPosition + '%' }, on: { "touchstart": function touchstart($event) {
  98592. return _vm.onPointerDown($event, 'min');
  98593. }, "mousedown": function mousedown($event) {
  98594. return _vm.onPointerDown($event, 'min');
  98595. } } }, [_c('Tooltip', { ref: "minTooltip", attrs: { "controlled": _vm.pointerDown === 'min', "placement": "top", "content": _vm.tipFormat(_vm.exportValue[0]), "disabled": _vm.tipDisabled, "always": _vm.showTip === 'always' } }, [_c('div', { class: _vm.minButtonClasses, attrs: { "tabindex": "0" }, on: { "focus": function focus($event) {
  98596. return _vm.handleFocus('min');
  98597. }, "blur": function blur($event) {
  98598. return _vm.handleBlur('min');
  98599. }, "keydown": [function ($event) {
  98600. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "left", 37, $event.key, ["Left", "ArrowLeft"])) {
  98601. return null;
  98602. }if ('button' in $event && $event.button !== 0) {
  98603. return null;
  98604. }return _vm.onKeyLeft($event, 'min');
  98605. }, function ($event) {
  98606. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
  98607. return null;
  98608. }return _vm.onKeyLeft($event, 'min');
  98609. }, function ($event) {
  98610. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "right", 39, $event.key, ["Right", "ArrowRight"])) {
  98611. return null;
  98612. }if ('button' in $event && $event.button !== 2) {
  98613. return null;
  98614. }return _vm.onKeyRight($event, 'min');
  98615. }, function ($event) {
  98616. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
  98617. return null;
  98618. }return _vm.onKeyRight($event, 'min');
  98619. }] } })])], 1), _vm._v(" "), _vm.range ? _c('div', { class: [_vm.prefixCls + '-button-wrap'], style: { left: _vm.maxPosition + '%' }, on: { "touchstart": function touchstart($event) {
  98620. return _vm.onPointerDown($event, 'max');
  98621. }, "mousedown": function mousedown($event) {
  98622. return _vm.onPointerDown($event, 'max');
  98623. } } }, [_c('Tooltip', { ref: "maxTooltip", attrs: { "controlled": _vm.pointerDown === 'max', "placement": "top", "content": _vm.tipFormat(_vm.exportValue[1]), "disabled": _vm.tipDisabled, "always": _vm.showTip === 'always' } }, [_c('div', { class: _vm.maxButtonClasses, attrs: { "tabindex": "0" }, on: { "focus": function focus($event) {
  98624. return _vm.handleFocus('max');
  98625. }, "blur": function blur($event) {
  98626. return _vm.handleBlur('max');
  98627. }, "keydown": [function ($event) {
  98628. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "left", 37, $event.key, ["Left", "ArrowLeft"])) {
  98629. return null;
  98630. }if ('button' in $event && $event.button !== 0) {
  98631. return null;
  98632. }return _vm.onKeyLeft($event, 'max');
  98633. }, function ($event) {
  98634. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"])) {
  98635. return null;
  98636. }return _vm.onKeyLeft($event, 'max');
  98637. }, function ($event) {
  98638. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "right", 39, $event.key, ["Right", "ArrowRight"])) {
  98639. return null;
  98640. }if ('button' in $event && $event.button !== 2) {
  98641. return null;
  98642. }return _vm.onKeyRight($event, 'max');
  98643. }, function ($event) {
  98644. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"])) {
  98645. return null;
  98646. }return _vm.onKeyRight($event, 'max');
  98647. }] } })])], 1) : _vm._e()], 2)], 1);
  98648. };
  98649. var staticRenderFns = [];
  98650. exports.render = render;
  98651. exports.staticRenderFns = staticRenderFns;
  98652. /***/ }),
  98653. /* 540 */
  98654. /***/ (function(module, exports, __webpack_require__) {
  98655. "use strict";
  98656. Object.defineProperty(exports, "__esModule", {
  98657. value: true
  98658. });
  98659. var _newArrowCheck2 = __webpack_require__(1);
  98660. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  98661. var _spin = __webpack_require__(541);
  98662. var _spin2 = _interopRequireDefault(_spin);
  98663. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  98664. var spinInstance = void 0;
  98665. function getSpinInstance() {
  98666. var render = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  98667. spinInstance = spinInstance || _spin2.default.newInstance({
  98668. render: render
  98669. });
  98670. return spinInstance;
  98671. }
  98672. function loading(options) {
  98673. var render = 'render' in options ? options.render : undefined;
  98674. var instance = getSpinInstance(render);
  98675. instance.show(options);
  98676. }
  98677. _spin2.default.show = function () {
  98678. var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  98679. return loading(props);
  98680. };
  98681. _spin2.default.hide = function () {
  98682. var _this = this;
  98683. if (!spinInstance) return false;
  98684. var instance = getSpinInstance();
  98685. instance.remove(function () {
  98686. (0, _newArrowCheck3.default)(this, _this);
  98687. spinInstance = null;
  98688. }.bind(this));
  98689. };
  98690. exports.default = _spin2.default;
  98691. /***/ }),
  98692. /* 541 */
  98693. /***/ (function(module, exports, __webpack_require__) {
  98694. "use strict";
  98695. Object.defineProperty(exports, "__esModule", {
  98696. value: true
  98697. });
  98698. var _assign = __webpack_require__(15);
  98699. var _assign2 = _interopRequireDefault(_assign);
  98700. var _newArrowCheck2 = __webpack_require__(1);
  98701. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  98702. var _vue = __webpack_require__(16);
  98703. var _vue2 = _interopRequireDefault(_vue);
  98704. var _spin = __webpack_require__(91);
  98705. var _spin2 = _interopRequireDefault(_spin);
  98706. var _transferQueue = __webpack_require__(37);
  98707. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  98708. function handleGetIndex() {
  98709. (0, _transferQueue.transferIncrease)();
  98710. return _transferQueue.transferIndex;
  98711. }
  98712. var tIndex = handleGetIndex();
  98713. _spin2.default.newInstance = function (properties) {
  98714. (0, _newArrowCheck3.default)(undefined, undefined);
  98715. var _props = properties || {};
  98716. var Instance = new _vue2.default({
  98717. data: (0, _assign2.default)({}, _props, {}),
  98718. render: function render(h) {
  98719. var vnode = '';
  98720. if (this.render) {
  98721. vnode = h(_spin2.default, {
  98722. props: {
  98723. fix: true,
  98724. fullscreen: true
  98725. }
  98726. }, [this.render(h)]);
  98727. } else {
  98728. vnode = h(_spin2.default, {
  98729. props: {
  98730. size: 'large',
  98731. fix: true,
  98732. fullscreen: true
  98733. }
  98734. });
  98735. }
  98736. return h('div', {
  98737. 'class': 'ivu-spin-fullscreen ivu-spin-fullscreen-wrapper',
  98738. 'style': {
  98739. 'z-index': 2010 + tIndex
  98740. }
  98741. }, [vnode]);
  98742. }
  98743. });
  98744. var component = Instance.$mount();
  98745. document.body.appendChild(component.$el);
  98746. var spin = Instance.$children[0];
  98747. return {
  98748. show: function show() {
  98749. spin.visible = true;
  98750. tIndex = handleGetIndex();
  98751. },
  98752. remove: function remove(cb) {
  98753. spin.visible = false;
  98754. setTimeout(function () {
  98755. spin.$parent.$destroy();
  98756. if (document.getElementsByClassName('ivu-spin-fullscreen')[0] !== undefined) {
  98757. document.body.removeChild(document.getElementsByClassName('ivu-spin-fullscreen')[0]);
  98758. }
  98759. cb();
  98760. }, 500);
  98761. },
  98762. component: spin
  98763. };
  98764. }.bind(undefined);
  98765. exports.default = _spin2.default;
  98766. /***/ }),
  98767. /* 542 */
  98768. /***/ (function(module, exports, __webpack_require__) {
  98769. "use strict";
  98770. Object.defineProperty(exports, "__esModule", {
  98771. value: true
  98772. });
  98773. var _steps = __webpack_require__(543);
  98774. var _steps2 = _interopRequireDefault(_steps);
  98775. var _step = __webpack_require__(545);
  98776. var _step2 = _interopRequireDefault(_step);
  98777. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  98778. _steps2.default.Step = _step2.default;
  98779. exports.default = _steps2.default;
  98780. /***/ }),
  98781. /* 543 */
  98782. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  98783. "use strict";
  98784. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  98785. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_steps_vue__ = __webpack_require__(231);
  98786. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_steps_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_steps_vue__);
  98787. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_steps_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_steps_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  98788. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8443af9e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_steps_vue__ = __webpack_require__(544);
  98789. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8443af9e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_steps_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8443af9e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_steps_vue__);
  98790. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  98791. /* script */
  98792. /* template */
  98793. /* template functional */
  98794. var __vue_template_functional__ = false
  98795. /* styles */
  98796. var __vue_styles__ = null
  98797. /* scopeId */
  98798. var __vue_scopeId__ = null
  98799. /* moduleIdentifier (server only) */
  98800. var __vue_module_identifier__ = null
  98801. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  98802. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_steps_vue___default.a,
  98803. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8443af9e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_steps_vue__["render"],
  98804. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_8443af9e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_steps_vue__["staticRenderFns"],
  98805. __vue_template_functional__,
  98806. __vue_styles__,
  98807. __vue_scopeId__,
  98808. __vue_module_identifier__
  98809. )
  98810. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  98811. /***/ }),
  98812. /* 544 */
  98813. /***/ (function(module, exports, __webpack_require__) {
  98814. "use strict";
  98815. Object.defineProperty(exports, "__esModule", {
  98816. value: true
  98817. });
  98818. var render = function render() {
  98819. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes }, [_vm._t("default")], 2);
  98820. };
  98821. var staticRenderFns = [];
  98822. exports.render = render;
  98823. exports.staticRenderFns = staticRenderFns;
  98824. /***/ }),
  98825. /* 545 */
  98826. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  98827. "use strict";
  98828. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  98829. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_step_vue__ = __webpack_require__(232);
  98830. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_step_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_step_vue__);
  98831. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_step_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_step_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  98832. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_069bd654_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_step_vue__ = __webpack_require__(546);
  98833. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_069bd654_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_step_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_069bd654_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_step_vue__);
  98834. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  98835. /* script */
  98836. /* template */
  98837. /* template functional */
  98838. var __vue_template_functional__ = false
  98839. /* styles */
  98840. var __vue_styles__ = null
  98841. /* scopeId */
  98842. var __vue_scopeId__ = null
  98843. /* moduleIdentifier (server only) */
  98844. var __vue_module_identifier__ = null
  98845. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  98846. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_step_vue___default.a,
  98847. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_069bd654_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_step_vue__["render"],
  98848. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_069bd654_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_step_vue__["staticRenderFns"],
  98849. __vue_template_functional__,
  98850. __vue_styles__,
  98851. __vue_scopeId__,
  98852. __vue_module_identifier__
  98853. )
  98854. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  98855. /***/ }),
  98856. /* 546 */
  98857. /***/ (function(module, exports, __webpack_require__) {
  98858. "use strict";
  98859. Object.defineProperty(exports, "__esModule", {
  98860. value: true
  98861. });
  98862. var render = function render() {
  98863. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.wrapClasses }, [_c('div', { class: [_vm.prefixCls + '-tail'] }, [_c('i')]), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-head'] }, [_c('div', { class: [_vm.prefixCls + '-head-inner'] }, [!_vm.icon && !_vm.$slots.icon && _vm.currentStatus !== 'finish' && _vm.currentStatus !== 'error' ? _c('span', [_vm._v(_vm._s(_vm.stepNumber))]) : _vm.$slots.icon ? _c('span', { staticClass: "ivu-steps-icon" }, [_vm._t("icon")], 2) : _c('span', { class: _vm.iconClasses })])]), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-main'] }, [_c('div', { class: [_vm.prefixCls + '-title'] }, [_vm._t("title", [_vm._v(_vm._s(_vm.title))])], 2), _vm._v(" "), _vm.content || _vm.$slots.content ? _c('div', { class: [_vm.prefixCls + '-content'] }, [_vm._t("content", [_vm._v(_vm._s(_vm.content))])], 2) : _vm._e()])]);
  98864. };
  98865. var staticRenderFns = [];
  98866. exports.render = render;
  98867. exports.staticRenderFns = staticRenderFns;
  98868. /***/ }),
  98869. /* 547 */
  98870. /***/ (function(module, exports, __webpack_require__) {
  98871. "use strict";
  98872. Object.defineProperty(exports, "__esModule", {
  98873. value: true
  98874. });
  98875. var _switch = __webpack_require__(548);
  98876. var _switch2 = _interopRequireDefault(_switch);
  98877. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  98878. exports.default = _switch2.default;
  98879. /***/ }),
  98880. /* 548 */
  98881. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  98882. "use strict";
  98883. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  98884. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_switch_vue__ = __webpack_require__(233);
  98885. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_switch_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_switch_vue__);
  98886. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_switch_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_switch_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  98887. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_08098bc5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_switch_vue__ = __webpack_require__(549);
  98888. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_08098bc5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_switch_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_08098bc5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_switch_vue__);
  98889. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  98890. /* script */
  98891. /* template */
  98892. /* template functional */
  98893. var __vue_template_functional__ = false
  98894. /* styles */
  98895. var __vue_styles__ = null
  98896. /* scopeId */
  98897. var __vue_scopeId__ = null
  98898. /* moduleIdentifier (server only) */
  98899. var __vue_module_identifier__ = null
  98900. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  98901. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_switch_vue___default.a,
  98902. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_08098bc5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_switch_vue__["render"],
  98903. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_08098bc5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_switch_vue__["staticRenderFns"],
  98904. __vue_template_functional__,
  98905. __vue_styles__,
  98906. __vue_scopeId__,
  98907. __vue_module_identifier__
  98908. )
  98909. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  98910. /***/ }),
  98911. /* 549 */
  98912. /***/ (function(module, exports, __webpack_require__) {
  98913. "use strict";
  98914. Object.defineProperty(exports, "__esModule", {
  98915. value: true
  98916. });
  98917. var render = function render() {
  98918. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('span', { class: _vm.wrapClasses, style: _vm.wrapStyles, attrs: { "tabindex": "0" }, on: { "click": _vm.toggle, "keydown": function keydown($event) {
  98919. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "space", 32, $event.key, [" ", "Spacebar"])) {
  98920. return null;
  98921. }return _vm.toggle($event);
  98922. } } }, [_c('input', { attrs: { "type": "hidden", "name": _vm.name }, domProps: { "value": _vm.currentValue } }), _vm._v(" "), _c('span', { class: _vm.innerClasses }, [_vm.currentValue === _vm.trueValue ? _vm._t("open") : _vm._e(), _vm._v(" "), _vm.currentValue === _vm.falseValue ? _vm._t("close") : _vm._e()], 2)]);
  98923. };
  98924. var staticRenderFns = [];
  98925. exports.render = render;
  98926. exports.staticRenderFns = staticRenderFns;
  98927. /***/ }),
  98928. /* 550 */
  98929. /***/ (function(module, exports, __webpack_require__) {
  98930. "use strict";
  98931. Object.defineProperty(exports, "__esModule", {
  98932. value: true
  98933. });
  98934. var _table = __webpack_require__(551);
  98935. var _table2 = _interopRequireDefault(_table);
  98936. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  98937. exports.default = _table2.default;
  98938. /***/ }),
  98939. /* 551 */
  98940. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  98941. "use strict";
  98942. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  98943. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_vue__ = __webpack_require__(234);
  98944. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_vue__);
  98945. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  98946. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_429b3321_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_vue__ = __webpack_require__(581);
  98947. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_429b3321_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_429b3321_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_vue__);
  98948. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  98949. /* script */
  98950. /* template */
  98951. /* template functional */
  98952. var __vue_template_functional__ = false
  98953. /* styles */
  98954. var __vue_styles__ = null
  98955. /* scopeId */
  98956. var __vue_scopeId__ = null
  98957. /* moduleIdentifier (server only) */
  98958. var __vue_module_identifier__ = null
  98959. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  98960. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_vue___default.a,
  98961. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_429b3321_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_vue__["render"],
  98962. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_429b3321_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_vue__["staticRenderFns"],
  98963. __vue_template_functional__,
  98964. __vue_styles__,
  98965. __vue_scopeId__,
  98966. __vue_module_identifier__
  98967. )
  98968. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  98969. /***/ }),
  98970. /* 552 */
  98971. /***/ (function(module, exports, __webpack_require__) {
  98972. module.exports = { "default": __webpack_require__(553), __esModule: true };
  98973. /***/ }),
  98974. /* 553 */
  98975. /***/ (function(module, exports, __webpack_require__) {
  98976. __webpack_require__(80);
  98977. __webpack_require__(35);
  98978. __webpack_require__(46);
  98979. __webpack_require__(554);
  98980. __webpack_require__(560);
  98981. __webpack_require__(563);
  98982. __webpack_require__(565);
  98983. module.exports = __webpack_require__(5).Set;
  98984. /***/ }),
  98985. /* 554 */
  98986. /***/ (function(module, exports, __webpack_require__) {
  98987. "use strict";
  98988. var strong = __webpack_require__(555);
  98989. var validate = __webpack_require__(235);
  98990. var SET = 'Set';
  98991. // 23.2 Set Objects
  98992. module.exports = __webpack_require__(556)(SET, function (get) {
  98993. return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
  98994. }, {
  98995. // 23.2.3.1 Set.prototype.add(value)
  98996. add: function add(value) {
  98997. return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
  98998. }
  98999. }, strong);
  99000. /***/ }),
  99001. /* 555 */
  99002. /***/ (function(module, exports, __webpack_require__) {
  99003. "use strict";
  99004. var dP = __webpack_require__(14).f;
  99005. var create = __webpack_require__(55);
  99006. var redefineAll = __webpack_require__(90);
  99007. var ctx = __webpack_require__(24);
  99008. var anInstance = __webpack_require__(88);
  99009. var forOf = __webpack_require__(51);
  99010. var $iterDefine = __webpack_require__(72);
  99011. var step = __webpack_require__(102);
  99012. var setSpecies = __webpack_require__(190);
  99013. var DESCRIPTORS = __webpack_require__(13);
  99014. var fastKey = __webpack_require__(78).fastKey;
  99015. var validate = __webpack_require__(235);
  99016. var SIZE = DESCRIPTORS ? '_s' : 'size';
  99017. var getEntry = function (that, key) {
  99018. // fast case
  99019. var index = fastKey(key);
  99020. var entry;
  99021. if (index !== 'F') return that._i[index];
  99022. // frozen object case
  99023. for (entry = that._f; entry; entry = entry.n) {
  99024. if (entry.k == key) return entry;
  99025. }
  99026. };
  99027. module.exports = {
  99028. getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
  99029. var C = wrapper(function (that, iterable) {
  99030. anInstance(that, C, NAME, '_i');
  99031. that._t = NAME; // collection type
  99032. that._i = create(null); // index
  99033. that._f = undefined; // first entry
  99034. that._l = undefined; // last entry
  99035. that[SIZE] = 0; // size
  99036. if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
  99037. });
  99038. redefineAll(C.prototype, {
  99039. // 23.1.3.1 Map.prototype.clear()
  99040. // 23.2.3.2 Set.prototype.clear()
  99041. clear: function clear() {
  99042. for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
  99043. entry.r = true;
  99044. if (entry.p) entry.p = entry.p.n = undefined;
  99045. delete data[entry.i];
  99046. }
  99047. that._f = that._l = undefined;
  99048. that[SIZE] = 0;
  99049. },
  99050. // 23.1.3.3 Map.prototype.delete(key)
  99051. // 23.2.3.4 Set.prototype.delete(value)
  99052. 'delete': function (key) {
  99053. var that = validate(this, NAME);
  99054. var entry = getEntry(that, key);
  99055. if (entry) {
  99056. var next = entry.n;
  99057. var prev = entry.p;
  99058. delete that._i[entry.i];
  99059. entry.r = true;
  99060. if (prev) prev.n = next;
  99061. if (next) next.p = prev;
  99062. if (that._f == entry) that._f = next;
  99063. if (that._l == entry) that._l = prev;
  99064. that[SIZE]--;
  99065. } return !!entry;
  99066. },
  99067. // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
  99068. // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
  99069. forEach: function forEach(callbackfn /* , that = undefined */) {
  99070. validate(this, NAME);
  99071. var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  99072. var entry;
  99073. while (entry = entry ? entry.n : this._f) {
  99074. f(entry.v, entry.k, this);
  99075. // revert to the last existing entry
  99076. while (entry && entry.r) entry = entry.p;
  99077. }
  99078. },
  99079. // 23.1.3.7 Map.prototype.has(key)
  99080. // 23.2.3.7 Set.prototype.has(value)
  99081. has: function has(key) {
  99082. return !!getEntry(validate(this, NAME), key);
  99083. }
  99084. });
  99085. if (DESCRIPTORS) dP(C.prototype, 'size', {
  99086. get: function () {
  99087. return validate(this, NAME)[SIZE];
  99088. }
  99089. });
  99090. return C;
  99091. },
  99092. def: function (that, key, value) {
  99093. var entry = getEntry(that, key);
  99094. var prev, index;
  99095. // change existing entry
  99096. if (entry) {
  99097. entry.v = value;
  99098. // create new entry
  99099. } else {
  99100. that._l = entry = {
  99101. i: index = fastKey(key, true), // <- index
  99102. k: key, // <- key
  99103. v: value, // <- value
  99104. p: prev = that._l, // <- previous entry
  99105. n: undefined, // <- next entry
  99106. r: false // <- removed
  99107. };
  99108. if (!that._f) that._f = entry;
  99109. if (prev) prev.n = entry;
  99110. that[SIZE]++;
  99111. // add to index
  99112. if (index !== 'F') that._i[index] = entry;
  99113. } return that;
  99114. },
  99115. getEntry: getEntry,
  99116. setStrong: function (C, NAME, IS_MAP) {
  99117. // add .keys, .values, .entries, [@@iterator]
  99118. // 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
  99119. $iterDefine(C, NAME, function (iterated, kind) {
  99120. this._t = validate(iterated, NAME); // target
  99121. this._k = kind; // kind
  99122. this._l = undefined; // previous
  99123. }, function () {
  99124. var that = this;
  99125. var kind = that._k;
  99126. var entry = that._l;
  99127. // revert to the last existing entry
  99128. while (entry && entry.r) entry = entry.p;
  99129. // get next entry
  99130. if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
  99131. // or finish the iteration
  99132. that._t = undefined;
  99133. return step(1);
  99134. }
  99135. // return step by kind
  99136. if (kind == 'keys') return step(0, entry.k);
  99137. if (kind == 'values') return step(0, entry.v);
  99138. return step(0, [entry.k, entry.v]);
  99139. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  99140. // add [@@species], 23.1.2.2, 23.2.2.2
  99141. setSpecies(NAME);
  99142. }
  99143. };
  99144. /***/ }),
  99145. /* 556 */
  99146. /***/ (function(module, exports, __webpack_require__) {
  99147. "use strict";
  99148. var global = __webpack_require__(9);
  99149. var $export = __webpack_require__(7);
  99150. var meta = __webpack_require__(78);
  99151. var fails = __webpack_require__(31);
  99152. var hide = __webpack_require__(25);
  99153. var redefineAll = __webpack_require__(90);
  99154. var forOf = __webpack_require__(51);
  99155. var anInstance = __webpack_require__(88);
  99156. var isObject = __webpack_require__(18);
  99157. var setToStringTag = __webpack_require__(47);
  99158. var dP = __webpack_require__(14).f;
  99159. var each = __webpack_require__(557)(0);
  99160. var DESCRIPTORS = __webpack_require__(13);
  99161. module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  99162. var Base = global[NAME];
  99163. var C = Base;
  99164. var ADDER = IS_MAP ? 'set' : 'add';
  99165. var proto = C && C.prototype;
  99166. var O = {};
  99167. if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
  99168. new C().entries().next();
  99169. }))) {
  99170. // create collection constructor
  99171. C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
  99172. redefineAll(C.prototype, methods);
  99173. meta.NEED = true;
  99174. } else {
  99175. C = wrapper(function (target, iterable) {
  99176. anInstance(target, C, NAME, '_c');
  99177. target._c = new Base();
  99178. if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target);
  99179. });
  99180. each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) {
  99181. var IS_ADDER = KEY == 'add' || KEY == 'set';
  99182. if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) {
  99183. anInstance(this, C, KEY);
  99184. if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;
  99185. var result = this._c[KEY](a === 0 ? 0 : a, b);
  99186. return IS_ADDER ? this : result;
  99187. });
  99188. });
  99189. IS_WEAK || dP(C.prototype, 'size', {
  99190. get: function () {
  99191. return this._c.size;
  99192. }
  99193. });
  99194. }
  99195. setToStringTag(C, NAME);
  99196. O[NAME] = C;
  99197. $export($export.G + $export.W + $export.F, O);
  99198. if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
  99199. return C;
  99200. };
  99201. /***/ }),
  99202. /* 557 */
  99203. /***/ (function(module, exports, __webpack_require__) {
  99204. // 0 -> Array#forEach
  99205. // 1 -> Array#map
  99206. // 2 -> Array#filter
  99207. // 3 -> Array#some
  99208. // 4 -> Array#every
  99209. // 5 -> Array#find
  99210. // 6 -> Array#findIndex
  99211. var ctx = __webpack_require__(24);
  99212. var IObject = __webpack_require__(64);
  99213. var toObject = __webpack_require__(29);
  99214. var toLength = __webpack_require__(52);
  99215. var asc = __webpack_require__(558);
  99216. module.exports = function (TYPE, $create) {
  99217. var IS_MAP = TYPE == 1;
  99218. var IS_FILTER = TYPE == 2;
  99219. var IS_SOME = TYPE == 3;
  99220. var IS_EVERY = TYPE == 4;
  99221. var IS_FIND_INDEX = TYPE == 6;
  99222. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  99223. var create = $create || asc;
  99224. return function ($this, callbackfn, that) {
  99225. var O = toObject($this);
  99226. var self = IObject(O);
  99227. var f = ctx(callbackfn, that, 3);
  99228. var length = toLength(self.length);
  99229. var index = 0;
  99230. var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  99231. var val, res;
  99232. for (;length > index; index++) if (NO_HOLES || index in self) {
  99233. val = self[index];
  99234. res = f(val, index, O);
  99235. if (TYPE) {
  99236. if (IS_MAP) result[index] = res; // map
  99237. else if (res) switch (TYPE) {
  99238. case 3: return true; // some
  99239. case 5: return val; // find
  99240. case 6: return index; // findIndex
  99241. case 2: result.push(val); // filter
  99242. } else if (IS_EVERY) return false; // every
  99243. }
  99244. }
  99245. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  99246. };
  99247. };
  99248. /***/ }),
  99249. /* 558 */
  99250. /***/ (function(module, exports, __webpack_require__) {
  99251. // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
  99252. var speciesConstructor = __webpack_require__(559);
  99253. module.exports = function (original, length) {
  99254. return new (speciesConstructor(original))(length);
  99255. };
  99256. /***/ }),
  99257. /* 559 */
  99258. /***/ (function(module, exports, __webpack_require__) {
  99259. var isObject = __webpack_require__(18);
  99260. var isArray = __webpack_require__(118);
  99261. var SPECIES = __webpack_require__(10)('species');
  99262. module.exports = function (original) {
  99263. var C;
  99264. if (isArray(original)) {
  99265. C = original.constructor;
  99266. // cross-realm fallback
  99267. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  99268. if (isObject(C)) {
  99269. C = C[SPECIES];
  99270. if (C === null) C = undefined;
  99271. }
  99272. } return C === undefined ? Array : C;
  99273. };
  99274. /***/ }),
  99275. /* 560 */
  99276. /***/ (function(module, exports, __webpack_require__) {
  99277. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  99278. var $export = __webpack_require__(7);
  99279. $export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(561)('Set') });
  99280. /***/ }),
  99281. /* 561 */
  99282. /***/ (function(module, exports, __webpack_require__) {
  99283. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  99284. var classof = __webpack_require__(56);
  99285. var from = __webpack_require__(562);
  99286. module.exports = function (NAME) {
  99287. return function toJSON() {
  99288. if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
  99289. return from(this);
  99290. };
  99291. };
  99292. /***/ }),
  99293. /* 562 */
  99294. /***/ (function(module, exports, __webpack_require__) {
  99295. var forOf = __webpack_require__(51);
  99296. module.exports = function (iter, ITERATOR) {
  99297. var result = [];
  99298. forOf(iter, false, result.push, result, ITERATOR);
  99299. return result;
  99300. };
  99301. /***/ }),
  99302. /* 563 */
  99303. /***/ (function(module, exports, __webpack_require__) {
  99304. // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
  99305. __webpack_require__(564)('Set');
  99306. /***/ }),
  99307. /* 564 */
  99308. /***/ (function(module, exports, __webpack_require__) {
  99309. "use strict";
  99310. // https://tc39.github.io/proposal-setmap-offrom/
  99311. var $export = __webpack_require__(7);
  99312. module.exports = function (COLLECTION) {
  99313. $export($export.S, COLLECTION, { of: function of() {
  99314. var length = arguments.length;
  99315. var A = new Array(length);
  99316. while (length--) A[length] = arguments[length];
  99317. return new this(A);
  99318. } });
  99319. };
  99320. /***/ }),
  99321. /* 565 */
  99322. /***/ (function(module, exports, __webpack_require__) {
  99323. // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
  99324. __webpack_require__(566)('Set');
  99325. /***/ }),
  99326. /* 566 */
  99327. /***/ (function(module, exports, __webpack_require__) {
  99328. "use strict";
  99329. // https://tc39.github.io/proposal-setmap-offrom/
  99330. var $export = __webpack_require__(7);
  99331. var aFunction = __webpack_require__(43);
  99332. var ctx = __webpack_require__(24);
  99333. var forOf = __webpack_require__(51);
  99334. module.exports = function (COLLECTION) {
  99335. $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
  99336. var mapFn = arguments[1];
  99337. var mapping, A, n, cb;
  99338. aFunction(this);
  99339. mapping = mapFn !== undefined;
  99340. if (mapping) aFunction(mapFn);
  99341. if (source == undefined) return new this();
  99342. A = [];
  99343. if (mapping) {
  99344. n = 0;
  99345. cb = ctx(mapFn, arguments[2], 2);
  99346. forOf(source, false, function (nextItem) {
  99347. A.push(cb(nextItem, n++));
  99348. });
  99349. } else {
  99350. forOf(source, false, A.push, A);
  99351. }
  99352. return new this(A);
  99353. } });
  99354. };
  99355. /***/ }),
  99356. /* 567 */
  99357. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99358. "use strict";
  99359. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  99360. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_head_vue__ = __webpack_require__(236);
  99361. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_head_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_head_vue__);
  99362. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_head_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_head_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  99363. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0b7aa13e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_head_vue__ = __webpack_require__(569);
  99364. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0b7aa13e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_head_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0b7aa13e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_head_vue__);
  99365. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  99366. /* script */
  99367. /* template */
  99368. /* template functional */
  99369. var __vue_template_functional__ = false
  99370. /* styles */
  99371. var __vue_styles__ = null
  99372. /* scopeId */
  99373. var __vue_scopeId__ = null
  99374. /* moduleIdentifier (server only) */
  99375. var __vue_module_identifier__ = null
  99376. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  99377. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_head_vue___default.a,
  99378. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0b7aa13e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_head_vue__["render"],
  99379. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0b7aa13e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_head_vue__["staticRenderFns"],
  99380. __vue_template_functional__,
  99381. __vue_styles__,
  99382. __vue_scopeId__,
  99383. __vue_module_identifier__
  99384. )
  99385. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  99386. /***/ }),
  99387. /* 568 */
  99388. /***/ (function(module, exports, __webpack_require__) {
  99389. "use strict";
  99390. Object.defineProperty(exports, "__esModule", {
  99391. value: true
  99392. });
  99393. var _newArrowCheck2 = __webpack_require__(1);
  99394. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  99395. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  99396. exports.default = {
  99397. name: 'TableRenderHeader',
  99398. functional: true,
  99399. props: {
  99400. render: Function,
  99401. column: Object,
  99402. index: Number
  99403. },
  99404. render: function render(h, ctx) {
  99405. (0, _newArrowCheck3.default)(undefined, undefined);
  99406. var params = {
  99407. column: ctx.props.column,
  99408. index: ctx.props.index
  99409. };
  99410. return ctx.props.render(h, params);
  99411. }.bind(undefined)
  99412. };
  99413. /***/ }),
  99414. /* 569 */
  99415. /***/ (function(module, exports, __webpack_require__) {
  99416. "use strict";
  99417. Object.defineProperty(exports, "__esModule", {
  99418. value: true
  99419. });
  99420. var render = function render() {
  99421. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('table', { style: _vm.styles, attrs: { "cellspacing": "0", "cellpadding": "0", "border": "0" } }, [_c('colgroup', [_vm._l(_vm.columns, function (column, index) {
  99422. return _c('col', { attrs: { "width": _vm.setCellWidth(column) } });
  99423. }), _vm._v(" "), _vm.$parent.showVerticalScrollBar ? _c('col', { attrs: { "width": _vm.$parent.scrollBarWidth } }) : _vm._e()], 2), _vm._v(" "), _c('thead', _vm._l(_vm.headRows, function (cols, rowIndex) {
  99424. return _c('tr', [_vm._l(cols, function (column, index) {
  99425. var _obj;
  99426. return _c('th', { class: _vm.alignCls(column), attrs: { "colspan": column.colSpan, "rowspan": column.rowSpan } }, [_c('div', { class: _vm.cellClasses(column) }, [column.type === 'expand' ? [!column.renderHeader ? _c('span', [_vm._v(_vm._s(column.title || ''))]) : _c('render-header', { attrs: { "render": column.renderHeader, "column": column, "index": index } })] : column.type === 'selection' ? [!column.hideSelectAll ? _c('Checkbox', { attrs: { "value": _vm.isSelectAll, "disabled": _vm.isSelectDisabled }, on: { "on-change": _vm.selectAll } }) : _vm._e()] : [!column.renderHeader ? _c('span', { class: (_obj = {}, _obj[_vm.prefixCls + '-cell-sort'] = column.sortable, _obj), on: { "click": function click($event) {
  99427. column.sortable && _vm.handleSortByHead(_vm.getColumn(rowIndex, index)._index);
  99428. } } }, [_vm._v(_vm._s(column.title || '#'))]) : _c('render-header', { attrs: { "render": column.renderHeader, "column": column, "index": index } }), _vm._v(" "), column.sortable ? _c('span', { class: [_vm.prefixCls + '-sort'] }, [_c('i', { staticClass: "ivu-icon ivu-icon-md-arrow-dropup", class: { on: _vm.getColumn(rowIndex, index)._sortType === 'asc' }, on: { "click": function click($event) {
  99429. _vm.handleSort(_vm.getColumn(rowIndex, index)._index, 'asc');
  99430. } } }), _vm._v(" "), _c('i', { staticClass: "ivu-icon ivu-icon-md-arrow-dropdown", class: { on: _vm.getColumn(rowIndex, index)._sortType === 'desc' }, on: { "click": function click($event) {
  99431. _vm.handleSort(_vm.getColumn(rowIndex, index)._index, 'desc');
  99432. } } })]) : _vm._e(), _vm._v(" "), _vm.isPopperShow(column) ? _c('Poptip', { attrs: { "placement": "bottom", "popper-class": "ivu-table-popper", "transfer": "", "capture": false }, on: { "on-popper-hide": function onPopperHide($event) {
  99433. _vm.handleFilterHide(_vm.getColumn(rowIndex, index)._index);
  99434. } }, model: { value: _vm.getColumn(rowIndex, index)._filterVisible, callback: function callback($$v) {
  99435. _vm.$set(_vm.getColumn(rowIndex, index), "_filterVisible", $$v);
  99436. }, expression: "getColumn(rowIndex, index)._filterVisible" } }, [_c('span', { class: [_vm.prefixCls + '-filter'] }, [_c('i', { staticClass: "ivu-icon ivu-icon-ios-funnel", class: { on: _vm.getColumn(rowIndex, index)._isFiltered } })]), _vm._v(" "), _vm.getColumn(rowIndex, index)._filterMultiple ? _c('div', { class: [_vm.prefixCls + '-filter-list'], attrs: { "slot": "content" }, slot: "content" }, [_c('div', { class: [_vm.prefixCls + '-filter-list-item'] }, [_c('checkbox-group', { model: { value: _vm.getColumn(rowIndex, index)._filterChecked, callback: function callback($$v) {
  99437. _vm.$set(_vm.getColumn(rowIndex, index), "_filterChecked", $$v);
  99438. }, expression: "getColumn(rowIndex, index)._filterChecked" } }, _vm._l(column.filters, function (item, index) {
  99439. return _c('checkbox', { key: index, attrs: { "label": item.value } }, [_vm._v(_vm._s(item.label))]);
  99440. }), 1)], 1), _vm._v(" "), _c('div', { class: [_vm.prefixCls + '-filter-footer'] }, [_c('i-button', { attrs: { "type": "text", "size": "small", "disabled": !_vm.getColumn(rowIndex, index)._filterChecked.length }, nativeOn: { "click": function click($event) {
  99441. _vm.handleFilter(_vm.getColumn(rowIndex, index)._index);
  99442. } } }, [_vm._v(_vm._s(_vm.t('i.table.confirmFilter')))]), _vm._v(" "), _c('i-button', { attrs: { "type": "text", "size": "small" }, nativeOn: { "click": function click($event) {
  99443. _vm.handleReset(_vm.getColumn(rowIndex, index)._index);
  99444. } } }, [_vm._v(_vm._s(_vm.t('i.table.resetFilter')))])], 1)]) : _c('div', { class: [_vm.prefixCls + '-filter-list'], attrs: { "slot": "content" }, slot: "content" }, [_c('ul', { class: [_vm.prefixCls + '-filter-list-single'] }, [_c('li', { class: _vm.itemAllClasses(_vm.getColumn(rowIndex, index)), on: { "click": function click($event) {
  99445. _vm.handleReset(_vm.getColumn(rowIndex, index)._index);
  99446. } } }, [_vm._v(_vm._s(_vm.t('i.table.clearFilter')))]), _vm._v(" "), _vm._l(column.filters, function (item) {
  99447. return _c('li', { class: _vm.itemClasses(_vm.getColumn(rowIndex, index), item), on: { "click": function click($event) {
  99448. _vm.handleSelect(_vm.getColumn(rowIndex, index)._index, item.value);
  99449. } } }, [_vm._v(_vm._s(item.label))]);
  99450. })], 2)])]) : _vm._e()]], 2), _vm._v(" "), column.resizable ? _c('div', { staticClass: "ivu-table-header-resizable", on: { "mousedown": function mousedown($event) {
  99451. return _vm.handleMouseDown(column, $event);
  99452. }, "mousemove": function mousemove($event) {
  99453. return _vm.handleMouseMove(column, $event);
  99454. }, "mouseout": _vm.handleMouseOut } }) : _vm._e()]);
  99455. }), _vm._v(" "), _vm.$parent.showVerticalScrollBar && rowIndex === 0 ? _c('th', { class: _vm.scrollBarCellClass(), attrs: { "rowspan": _vm.headRows.length } }) : _vm._e()], 2);
  99456. }), 0)]);
  99457. };
  99458. var staticRenderFns = [];
  99459. exports.render = render;
  99460. exports.staticRenderFns = staticRenderFns;
  99461. /***/ }),
  99462. /* 570 */
  99463. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99464. "use strict";
  99465. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  99466. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_body_vue__ = __webpack_require__(237);
  99467. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_body_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_body_vue__);
  99468. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_body_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_body_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  99469. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  99470. /* script */
  99471. /* template */
  99472. var __vue_render__, __vue_static_render_fns__
  99473. /* template functional */
  99474. var __vue_template_functional__ = false
  99475. /* styles */
  99476. var __vue_styles__ = null
  99477. /* scopeId */
  99478. var __vue_scopeId__ = null
  99479. /* moduleIdentifier (server only) */
  99480. var __vue_module_identifier__ = null
  99481. var Component = Object(__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  99482. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_body_vue___default.a,
  99483. __vue_render__,
  99484. __vue_static_render_fns__,
  99485. __vue_template_functional__,
  99486. __vue_styles__,
  99487. __vue_scopeId__,
  99488. __vue_module_identifier__
  99489. )
  99490. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  99491. /***/ }),
  99492. /* 571 */
  99493. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99494. "use strict";
  99495. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  99496. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_tr_vue__ = __webpack_require__(238);
  99497. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_tr_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_tr_vue__);
  99498. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_tr_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_tr_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  99499. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_44e7e90c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_tr_vue__ = __webpack_require__(572);
  99500. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_44e7e90c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_tr_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_44e7e90c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_tr_vue__);
  99501. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  99502. /* script */
  99503. /* template */
  99504. /* template functional */
  99505. var __vue_template_functional__ = false
  99506. /* styles */
  99507. var __vue_styles__ = null
  99508. /* scopeId */
  99509. var __vue_scopeId__ = null
  99510. /* moduleIdentifier (server only) */
  99511. var __vue_module_identifier__ = null
  99512. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  99513. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_table_tr_vue___default.a,
  99514. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_44e7e90c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_tr_vue__["render"],
  99515. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_44e7e90c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_table_tr_vue__["staticRenderFns"],
  99516. __vue_template_functional__,
  99517. __vue_styles__,
  99518. __vue_scopeId__,
  99519. __vue_module_identifier__
  99520. )
  99521. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  99522. /***/ }),
  99523. /* 572 */
  99524. /***/ (function(module, exports, __webpack_require__) {
  99525. "use strict";
  99526. Object.defineProperty(exports, "__esModule", {
  99527. value: true
  99528. });
  99529. var render = function render() {
  99530. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _vm.draggable ? _c('tr', { class: _vm.rowClasses(_vm.row._index), attrs: { "draggable": _vm.draggable }, on: { "dragstart": function dragstart($event) {
  99531. return _vm.onDrag($event, _vm.row._index);
  99532. }, "drop": function drop($event) {
  99533. return _vm.onDrop($event, _vm.row._index);
  99534. }, "dragover": function dragover($event) {
  99535. return _vm.allowDrop($event);
  99536. } } }, [_vm._t("default")], 2) : _c('tr', { class: _vm.rowClasses(_vm.row._index), attrs: { "draggable": false } }, [_vm._t("default")], 2);
  99537. };
  99538. var staticRenderFns = [];
  99539. exports.render = render;
  99540. exports.staticRenderFns = staticRenderFns;
  99541. /***/ }),
  99542. /* 573 */
  99543. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99544. "use strict";
  99545. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  99546. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue__ = __webpack_require__(239);
  99547. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue__);
  99548. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  99549. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1c727cfe_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_vue__ = __webpack_require__(575);
  99550. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1c727cfe_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1c727cfe_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_vue__);
  99551. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  99552. /* script */
  99553. /* template */
  99554. /* template functional */
  99555. var __vue_template_functional__ = false
  99556. /* styles */
  99557. var __vue_styles__ = null
  99558. /* scopeId */
  99559. var __vue_scopeId__ = null
  99560. /* moduleIdentifier (server only) */
  99561. var __vue_module_identifier__ = null
  99562. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  99563. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_cell_vue___default.a,
  99564. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1c727cfe_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_vue__["render"],
  99565. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_1c727cfe_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_cell_vue__["staticRenderFns"],
  99566. __vue_template_functional__,
  99567. __vue_styles__,
  99568. __vue_scopeId__,
  99569. __vue_module_identifier__
  99570. )
  99571. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  99572. /***/ }),
  99573. /* 574 */
  99574. /***/ (function(module, exports, __webpack_require__) {
  99575. "use strict";
  99576. Object.defineProperty(exports, "__esModule", {
  99577. value: true
  99578. });
  99579. var _newArrowCheck2 = __webpack_require__(1);
  99580. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  99581. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  99582. exports.default = {
  99583. name: 'TableSlot',
  99584. functional: true,
  99585. inject: ['tableRoot'],
  99586. props: {
  99587. row: Object,
  99588. index: Number,
  99589. column: {
  99590. type: Object,
  99591. default: null
  99592. },
  99593. display: {
  99594. type: String,
  99595. default: 'block'
  99596. }
  99597. },
  99598. render: function render(h, ctx) {
  99599. (0, _newArrowCheck3.default)(undefined, undefined);
  99600. return h('div', {
  99601. 'class': {
  99602. 'ivu-table-cell-slot': true,
  99603. 'ivu-table-cell-slot-inline': ctx.props.display === 'inline',
  99604. 'ivu-table-cell-slot-inline-block': ctx.props.display === 'inline-block'
  99605. }
  99606. }, ctx.injections.tableRoot.$scopedSlots[ctx.props.column.slot]({
  99607. row: ctx.props.row,
  99608. column: ctx.props.column,
  99609. index: ctx.props.index
  99610. }));
  99611. }.bind(undefined)
  99612. };
  99613. /***/ }),
  99614. /* 575 */
  99615. /***/ (function(module, exports, __webpack_require__) {
  99616. "use strict";
  99617. Object.defineProperty(exports, "__esModule", {
  99618. value: true
  99619. });
  99620. var render = function render() {
  99621. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { ref: "cell", class: _vm.classes }, [_vm.renderType === 'index' ? [_c('span', [_vm._v(_vm._s(_vm.column.indexMethod ? _vm.column.indexMethod(_vm.row, _vm.naturalIndex) : _vm.naturalIndex + 1))])] : _vm._e(), _vm._v(" "), _vm.renderType === 'selection' ? [_c('Checkbox', { attrs: { "value": _vm.checked, "disabled": _vm.disabled }, on: { "on-change": _vm.toggleSelect }, nativeOn: { "click": function click($event) {
  99622. $event.stopPropagation();return _vm.handleClick($event);
  99623. } } })] : _vm._e(), _vm._v(" "), _vm.showLevel ? _c('div', { staticClass: "ivu-table-cell-tree-level", style: _vm.treeLevelStyle }) : _vm._e(), _vm._v(" "), _vm.showChildren ? _c('div', { staticClass: "ivu-table-cell-tree", class: { 'ivu-table-cell-tree-loading': _vm.childrenLoading }, on: { "click": function click($event) {
  99624. $event.preventDefault();$event.stopPropagation();return _vm.handleToggleTree($event);
  99625. } } }, [_vm.childrenLoading ? _c('Icon', { staticClass: "ivu-load-loop", attrs: { "type": "ios-loading" } }) : !_vm.childrenExpand ? _c('Icon', { attrs: { "type": "ios-add" } }) : _c('Icon', { attrs: { "type": "ios-remove" } })], 1) : _vm.showTreeNode ? _c('div', { staticClass: "ivu-table-cell-tree ivu-table-cell-tree-empty" }) : _vm._e(), _vm._v(" "), _vm.renderType === 'html' ? [_c('span', { domProps: { "innerHTML": _vm._s(_vm.row[_vm.column.key]) } })] : _vm._e(), _vm._v(" "), _vm.renderType === 'normal' ? [_vm.column.tooltip ? [_c('Tooltip', { staticClass: "ivu-table-cell-tooltip", attrs: { "transfer": "", "content": _vm.row[_vm.column.key], "theme": _vm.column.tooltipTheme ? _vm.column.tooltipTheme : _vm.tableRoot.tooltipTheme, "disabled": !_vm.showTooltip, "max-width": _vm.column.tooltipMaxWidth ? _vm.column.tooltipMaxWidth : _vm.tableRoot.tooltipMaxWidth } }, [_c('span', { ref: "content", staticClass: "ivu-table-cell-tooltip-content", on: { "mouseenter": _vm.handleTooltipIn } }, [_vm._v(_vm._s(_vm.row[_vm.column.key]))])])] : _c('span', [_vm._v(_vm._s(_vm.row[_vm.column.key]))])] : _vm._e(), _vm._v(" "), _vm.renderType === 'expand' && !_vm.row._disableExpand ? [_c('div', { class: _vm.expandCls, on: { "click": _vm.toggleExpand } }, [_c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1)] : _vm._e(), _vm._v(" "), _vm.renderType === 'render' ? _c('table-expand', { attrs: { "row": _vm.row, "column": _vm.column, "index": _vm.index, "render": _vm.column.render } }) : _vm._e(), _vm._v(" "), _vm.renderType === 'slot' ? _c('table-slot', { attrs: { "row": _vm.row, "column": _vm.column, "display": _vm.column.display || 'block', "index": _vm.index } }) : _vm._e()], 2);
  99626. };
  99627. var staticRenderFns = [];
  99628. exports.render = render;
  99629. exports.staticRenderFns = staticRenderFns;
  99630. /***/ }),
  99631. /* 576 */
  99632. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99633. "use strict";
  99634. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  99635. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_summary_vue__ = __webpack_require__(241);
  99636. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_summary_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_summary_vue__);
  99637. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_summary_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_summary_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  99638. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6f7ddc60_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_summary_vue__ = __webpack_require__(577);
  99639. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6f7ddc60_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_summary_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6f7ddc60_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_summary_vue__);
  99640. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  99641. /* script */
  99642. /* template */
  99643. /* template functional */
  99644. var __vue_template_functional__ = false
  99645. /* styles */
  99646. var __vue_styles__ = null
  99647. /* scopeId */
  99648. var __vue_scopeId__ = null
  99649. /* moduleIdentifier (server only) */
  99650. var __vue_module_identifier__ = null
  99651. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  99652. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_summary_vue___default.a,
  99653. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6f7ddc60_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_summary_vue__["render"],
  99654. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6f7ddc60_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_summary_vue__["staticRenderFns"],
  99655. __vue_template_functional__,
  99656. __vue_styles__,
  99657. __vue_scopeId__,
  99658. __vue_module_identifier__
  99659. )
  99660. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  99661. /***/ }),
  99662. /* 577 */
  99663. /***/ (function(module, exports, __webpack_require__) {
  99664. "use strict";
  99665. Object.defineProperty(exports, "__esModule", {
  99666. value: true
  99667. });
  99668. var render = function render() {
  99669. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticStyle: { "overflow": "hidden" } }, [_c('table', { staticClass: "ivu-table-summary", style: _vm.styleObject, attrs: { "cellspacing": "0", "cellpadding": "0", "border": "0" } }, [_c('colgroup', _vm._l(_vm.columns, function (column, index) {
  99670. return _c('col', { attrs: { "width": _vm.setCellWidth(column) } });
  99671. }), 0), _vm._v(" "), _c('tbody', { class: [_vm.prefixCls + '-tbody'] }, [_c('tr', { staticClass: "ivu-table-row" }, _vm._l(_vm.columns, function (column, index) {
  99672. return _c('td', { class: _vm.alignCls(column) }, [_c('div', { staticClass: "ivu-table-cell", class: _vm.cellCls(column) }, [_c('span', [_vm._v(_vm._s(_vm.data[column.key].value))])])]);
  99673. }), 0)])])]);
  99674. };
  99675. var staticRenderFns = [];
  99676. exports.render = render;
  99677. exports.staticRenderFns = staticRenderFns;
  99678. /***/ }),
  99679. /* 578 */
  99680. /***/ (function(module, exports, __webpack_require__) {
  99681. "use strict";
  99682. Object.defineProperty(exports, "__esModule", {
  99683. value: true
  99684. });
  99685. var _keys = __webpack_require__(21);
  99686. var _keys2 = _interopRequireDefault(_keys);
  99687. var _assign = __webpack_require__(15);
  99688. var _assign2 = _interopRequireDefault(_assign);
  99689. var _newArrowCheck2 = __webpack_require__(1);
  99690. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  99691. exports.default = csv;
  99692. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  99693. var newLine = '\r\n';
  99694. var appendLine = function (content, row, _ref) {
  99695. var separator = _ref.separator,
  99696. quoted = _ref.quoted;
  99697. (0, _newArrowCheck3.default)(undefined, undefined);
  99698. var line = row.map(function (data) {
  99699. (0, _newArrowCheck3.default)(undefined, undefined);
  99700. if (!quoted) return data;
  99701. data = typeof data === 'string' ? data.replace(/"/g, '"') : data;
  99702. return '"' + String(data) + '"';
  99703. }.bind(undefined));
  99704. content.push(line.join(separator));
  99705. }.bind(undefined);
  99706. var defaults = {
  99707. separator: ',',
  99708. quoted: false
  99709. };
  99710. function csv(columns, datas, options) {
  99711. var _this = this;
  99712. var noHeader = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  99713. options = (0, _assign2.default)({}, defaults, options);
  99714. var columnOrder = void 0;
  99715. var content = [];
  99716. var column = [];
  99717. if (columns) {
  99718. columnOrder = columns.map(function (v) {
  99719. (0, _newArrowCheck3.default)(this, _this);
  99720. if (typeof v === 'string') return v;
  99721. if (!noHeader) {
  99722. column.push(typeof v.title !== 'undefined' ? v.title : v.key);
  99723. }
  99724. return v.key;
  99725. }.bind(this));
  99726. if (column.length > 0) appendLine(content, column, options);
  99727. } else {
  99728. columnOrder = [];
  99729. datas.forEach(function (v) {
  99730. (0, _newArrowCheck3.default)(this, _this);
  99731. if (!Array.isArray(v)) {
  99732. columnOrder = columnOrder.concat((0, _keys2.default)(v));
  99733. }
  99734. }.bind(this));
  99735. if (columnOrder.length > 0) {
  99736. columnOrder = columnOrder.filter(function (value, index, self) {
  99737. (0, _newArrowCheck3.default)(this, _this);
  99738. return self.indexOf(value) === index;
  99739. }.bind(this));
  99740. if (!noHeader) appendLine(content, columnOrder, options);
  99741. }
  99742. }
  99743. if (Array.isArray(datas)) {
  99744. datas.forEach(function (row) {
  99745. (0, _newArrowCheck3.default)(this, _this);
  99746. if (!Array.isArray(row)) {
  99747. row = columnOrder.map(function (k) {
  99748. (0, _newArrowCheck3.default)(this, _this);
  99749. return typeof row[k] !== 'undefined' ? row[k] : '';
  99750. }.bind(this));
  99751. }
  99752. appendLine(content, row, options);
  99753. }.bind(this));
  99754. }
  99755. return content.join(newLine);
  99756. }
  99757. /***/ }),
  99758. /* 579 */
  99759. /***/ (function(module, exports, __webpack_require__) {
  99760. "use strict";
  99761. Object.defineProperty(exports, "__esModule", {
  99762. value: true
  99763. });
  99764. function has(browser) {
  99765. var ua = navigator.userAgent;
  99766. if (browser === 'ie') {
  99767. var isIE = ua.indexOf('compatible') > -1 && ua.indexOf('MSIE') > -1;
  99768. if (isIE) {
  99769. var reIE = new RegExp('MSIE (\\d+\\.\\d+);');
  99770. reIE.test(ua);
  99771. return parseFloat(RegExp['$1']);
  99772. } else {
  99773. return false;
  99774. }
  99775. } else {
  99776. return ua.indexOf(browser) > -1;
  99777. }
  99778. }
  99779. var csv = {
  99780. _isIE11: function _isIE11() {
  99781. var iev = 0;
  99782. var ieold = /MSIE (\d+\.\d+);/.test(navigator.userAgent);
  99783. var trident = !!navigator.userAgent.match(/Trident\/7.0/);
  99784. var rv = navigator.userAgent.indexOf('rv:11.0');
  99785. if (ieold) {
  99786. iev = Number(RegExp.$1);
  99787. }
  99788. if (navigator.appVersion.indexOf('MSIE 10') !== -1) {
  99789. iev = 10;
  99790. }
  99791. if (trident && rv !== -1) {
  99792. iev = 11;
  99793. }
  99794. return iev === 11;
  99795. },
  99796. _isEdge: function _isEdge() {
  99797. return (/Edge/.test(navigator.userAgent)
  99798. );
  99799. },
  99800. _getDownloadUrl: function _getDownloadUrl(text) {
  99801. var BOM = '\uFEFF';
  99802. if (window.Blob && window.URL && window.URL.createObjectURL) {
  99803. var csvData = new Blob([BOM + text], { type: 'text/csv' });
  99804. return URL.createObjectURL(csvData);
  99805. } else {
  99806. return 'data:attachment/csv;charset=utf-8,' + BOM + encodeURIComponent(text);
  99807. }
  99808. },
  99809. download: function download(filename, text) {
  99810. if (has('ie') && has('ie') < 10) {
  99811. var oWin = window.top.open('about:blank', '_blank');
  99812. oWin.document.charset = 'utf-8';
  99813. oWin.document.write(text);
  99814. oWin.document.close();
  99815. oWin.document.execCommand('SaveAs', filename);
  99816. oWin.close();
  99817. } else if (has('ie') === 10 || this._isIE11() || this._isEdge()) {
  99818. var BOM = '\uFEFF';
  99819. var csvData = new Blob([BOM + text], { type: 'text/csv' });
  99820. navigator.msSaveBlob(csvData, filename);
  99821. } else {
  99822. var link = document.createElement('a');
  99823. link.download = filename;
  99824. link.href = this._getDownloadUrl(text);
  99825. document.body.appendChild(link);
  99826. link.click();
  99827. document.body.removeChild(link);
  99828. }
  99829. }
  99830. };
  99831. exports.default = csv;
  99832. /***/ }),
  99833. /* 580 */
  99834. /***/ (function(module, exports, __webpack_require__) {
  99835. "use strict";
  99836. Object.defineProperty(exports, "__esModule", {
  99837. value: true
  99838. });
  99839. exports.getRandomStr = exports.convertToRows = exports.getAllColumns = exports.convertColumnOrder = undefined;
  99840. var _newArrowCheck2 = __webpack_require__(1);
  99841. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  99842. var _assist = __webpack_require__(3);
  99843. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  99844. var convertColumnOrder = function (columns, fixedType) {
  99845. (0, _newArrowCheck3.default)(undefined, undefined);
  99846. var list = [];
  99847. var other = [];
  99848. columns.forEach(function (col) {
  99849. (0, _newArrowCheck3.default)(undefined, undefined);
  99850. if (col.fixed && col.fixed === fixedType) {
  99851. list.push(col);
  99852. } else {
  99853. other.push(col);
  99854. }
  99855. }.bind(undefined));
  99856. return list.concat(other);
  99857. }.bind(undefined);
  99858. exports.convertColumnOrder = convertColumnOrder;
  99859. var getAllColumns = function (cols) {
  99860. var forTableHead = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  99861. (0, _newArrowCheck3.default)(undefined, undefined);
  99862. var columns = (0, _assist.deepCopy)(cols);
  99863. var result = [];
  99864. columns.forEach(function (column) {
  99865. (0, _newArrowCheck3.default)(undefined, undefined);
  99866. if (column.children) {
  99867. if (forTableHead) result.push(column);
  99868. result.push.apply(result, getAllColumns(column.children, forTableHead));
  99869. } else {
  99870. result.push(column);
  99871. }
  99872. }.bind(undefined));
  99873. return result;
  99874. }.bind(undefined);
  99875. exports.getAllColumns = getAllColumns;
  99876. var convertToRows = function (columns) {
  99877. var fixedType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  99878. (0, _newArrowCheck3.default)(undefined, undefined);
  99879. var originColumns = fixedType ? fixedType === 'left' ? (0, _assist.deepCopy)(convertColumnOrder(columns, 'left')) : (0, _assist.deepCopy)(convertColumnOrder(columns, 'right')) : (0, _assist.deepCopy)(columns);
  99880. var maxLevel = 1;
  99881. var traverse = function (column, parent) {
  99882. (0, _newArrowCheck3.default)(undefined, undefined);
  99883. if (parent) {
  99884. column.level = parent.level + 1;
  99885. if (maxLevel < column.level) {
  99886. maxLevel = column.level;
  99887. }
  99888. }
  99889. if (column.children) {
  99890. var colSpan = 0;
  99891. column.children.forEach(function (subColumn) {
  99892. (0, _newArrowCheck3.default)(undefined, undefined);
  99893. traverse(subColumn, column);
  99894. colSpan += subColumn.colSpan;
  99895. }.bind(undefined));
  99896. column.colSpan = colSpan;
  99897. } else {
  99898. column.colSpan = 1;
  99899. }
  99900. }.bind(undefined);
  99901. originColumns.forEach(function (column) {
  99902. (0, _newArrowCheck3.default)(undefined, undefined);
  99903. column.level = 1;
  99904. traverse(column);
  99905. }.bind(undefined));
  99906. var rows = [];
  99907. for (var i = 0; i < maxLevel; i++) {
  99908. rows.push([]);
  99909. }
  99910. var allColumns = getAllColumns(originColumns, true);
  99911. allColumns.forEach(function (column) {
  99912. (0, _newArrowCheck3.default)(undefined, undefined);
  99913. if (!column.children) {
  99914. column.rowSpan = maxLevel - column.level + 1;
  99915. } else {
  99916. column.rowSpan = 1;
  99917. }
  99918. rows[column.level - 1].push(column);
  99919. }.bind(undefined));
  99920. return rows;
  99921. }.bind(undefined);
  99922. exports.convertToRows = convertToRows;
  99923. var getRandomStr = function getRandomStr() {
  99924. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  99925. var $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
  99926. var maxPos = $chars.length;
  99927. var str = '';
  99928. for (var i = 0; i < len; i++) {
  99929. str += $chars.charAt(Math.floor(Math.random() * maxPos));
  99930. }
  99931. return str;
  99932. };
  99933. exports.getRandomStr = getRandomStr;
  99934. /***/ }),
  99935. /* 581 */
  99936. /***/ (function(module, exports, __webpack_require__) {
  99937. "use strict";
  99938. Object.defineProperty(exports, "__esModule", {
  99939. value: true
  99940. });
  99941. var render = function render() {
  99942. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { ref: "tableWrap", class: _vm.wrapClasses, style: _vm.styles }, [_c('div', { class: _vm.classes }, [_vm.showSlotHeader ? _c('div', { ref: "title", class: [_vm.prefixCls + '-title'] }, [_vm._t("header")], 2) : _vm._e(), _vm._v(" "), _vm.showHeader ? _c('div', { ref: "header", class: [_vm.prefixCls + '-header'], on: { "mousewheel": _vm.handleMouseWheel } }, [_c('table-head', { attrs: { "prefix-cls": _vm.prefixCls, "styleObject": _vm.tableHeaderStyle, "columns": _vm.cloneColumns, "column-rows": _vm.columnRows, "obj-data": _vm.objData, "columns-width": _vm.columnsWidth, "data": _vm.rebuildData } })], 1) : _vm._e(), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: !(!!_vm.localeNoDataText && (!_vm.data || _vm.data.length === 0) || !!_vm.localeNoFilteredDataText && (!_vm.rebuildData || _vm.rebuildData.length === 0)), expression: "!((!!localeNoDataText && (!data || data.length === 0)) || (!!localeNoFilteredDataText && (!rebuildData || rebuildData.length === 0)))" }], ref: "body", class: [_vm.prefixCls + '-body'], style: _vm.bodyStyle, on: { "scroll": _vm.handleBodyScroll } }, [_c('table-body', { ref: "tbody", attrs: { "draggable": _vm.draggable, "prefix-cls": _vm.prefixCls, "styleObject": _vm.tableStyle, "columns": _vm.cloneColumns, "data": _vm.rebuildData, "row-key": _vm.rowKey, "columns-width": _vm.columnsWidth, "obj-data": _vm.objData } })], 1), _vm._v(" "), _vm.showSummary && _vm.data && _vm.data.length ? _c('table-summary', { ref: "summary", attrs: { "prefix-cls": _vm.prefixCls, "styleObject": _vm.tableStyle, "columns": _vm.cloneColumns, "data": _vm.summaryData, "columns-width": _vm.columnsWidth } }) : _vm._e(), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: !!_vm.localeNoDataText && (!_vm.data || _vm.data.length === 0) || !!_vm.localeNoFilteredDataText && (!_vm.rebuildData || _vm.rebuildData.length === 0), expression: "((!!localeNoDataText && (!data || data.length === 0)) || (!!localeNoFilteredDataText && (!rebuildData || rebuildData.length === 0)))" }], class: [_vm.prefixCls + '-tip'], style: _vm.bodyStyle, on: { "scroll": _vm.handleBodyScroll } }, [_c('table', { attrs: { "cellspacing": "0", "cellpadding": "0", "border": "0" } }, [_c('tbody', [_c('tr', [_c('td', { style: { 'height': _vm.bodyStyle.height, 'width': this.headerWidth + "px" } }, [!_vm.data || _vm.data.length === 0 ? _c('span', { domProps: { "innerHTML": _vm._s(_vm.localeNoDataText) } }) : _c('span', { domProps: { "innerHTML": _vm._s(_vm.localeNoFilteredDataText) } })])])])])]), _vm._v(" "), _vm.isLeftFixed ? _c('div', { class: _vm.fixedTableClasses, style: _vm.fixedTableStyle }, [_vm.showHeader ? _c('div', { class: _vm.fixedHeaderClasses }, [_c('table-head', { attrs: { "fixed": "left", "prefix-cls": _vm.prefixCls, "styleObject": _vm.fixedTableStyle, "columns": _vm.leftFixedColumns, "column-rows": _vm.columnRows, "fixed-column-rows": _vm.leftFixedColumnRows, "obj-data": _vm.objData, "columns-width": _vm.columnsWidth, "data": _vm.rebuildData } })], 1) : _vm._e(), _vm._v(" "), _c('div', { ref: "fixedBody", class: [_vm.prefixCls + '-fixed-body'], style: _vm.fixedBodyStyle, on: { "mousewheel": _vm.handleFixedMousewheel, "DOMMouseScroll": _vm.handleFixedMousewheel } }, [_c('table-body', { attrs: { "fixed": "left", "draggable": _vm.draggable, "prefix-cls": _vm.prefixCls, "styleObject": _vm.fixedTableStyle, "columns": _vm.leftFixedColumns, "data": _vm.rebuildData, "row-key": _vm.rowKey, "columns-width": _vm.columnsWidth, "obj-data": _vm.objData } })], 1), _vm._v(" "), _vm.showSummary && _vm.data && _vm.data.length ? _c('table-summary', { style: { 'margin-top': _vm.showHorizontalScrollBar ? _vm.scrollBarWidth + 'px' : 0 }, attrs: { "fixed": "left", "prefix-cls": _vm.prefixCls, "styleObject": _vm.fixedTableStyle, "columns": _vm.leftFixedColumns, "data": _vm.summaryData, "columns-width": _vm.columnsWidth } }) : _vm._e()], 1) : _vm._e(), _vm._v(" "), _vm.isRightFixed ? _c('div', { class: _vm.fixedRightTableClasses, style: _vm.fixedRightTableStyle }, [_vm.showHeader ? _c('div', { class: _vm.fixedHeaderClasses }, [_c('table-head', { attrs: { "fixed": "right", "prefix-cls": _vm.prefixCls, "styleObject": _vm.fixedRightTableStyle, "columns": _vm.rightFixedColumns, "column-rows": _vm.columnRows, "fixed-column-rows": _vm.rightFixedColumnRows, "obj-data": _vm.objData, "columns-width": _vm.columnsWidth, "data": _vm.rebuildData } })], 1) : _vm._e(), _vm._v(" "), _c('div', { ref: "fixedRightBody", class: [_vm.prefixCls + '-fixed-body'], style: _vm.fixedBodyStyle, on: { "mousewheel": _vm.handleFixedMousewheel, "DOMMouseScroll": _vm.handleFixedMousewheel } }, [_c('table-body', { attrs: { "fixed": "right", "draggable": _vm.draggable, "prefix-cls": _vm.prefixCls, "styleObject": _vm.fixedRightTableStyle, "columns": _vm.rightFixedColumns, "data": _vm.rebuildData, "row-key": _vm.rowKey, "columns-width": _vm.columnsWidth, "obj-data": _vm.objData } })], 1), _vm._v(" "), _vm.showSummary && _vm.data && _vm.data.length ? _c('table-summary', { style: { 'margin-top': _vm.showHorizontalScrollBar ? _vm.scrollBarWidth + 'px' : 0 }, attrs: { "fixed": "right", "prefix-cls": _vm.prefixCls, "styleObject": _vm.fixedRightTableStyle, "columns": _vm.rightFixedColumns, "data": _vm.summaryData, "columns-width": _vm.columnsWidth } }) : _vm._e()], 1) : _vm._e(), _vm._v(" "), _vm.isRightFixed ? _c('div', { class: [_vm.prefixCls + '-fixed-right-header'], style: _vm.fixedRightHeaderStyle }) : _vm._e(), _vm._v(" "), _vm.showSlotFooter ? _c('div', { ref: "footer", class: [_vm.prefixCls + '-footer'] }, [_vm._t("footer")], 2) : _vm._e()], 1), _vm._v(" "), _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.showResizeLine, expression: "showResizeLine" }], ref: "resizeLine", staticClass: "ivu-table-resize-line" }), _vm._v(" "), _vm.showContextMenu ? _c('div', { staticClass: "ivu-table-context-menu", style: _vm.contextMenuStyles }, [_c('Dropdown', { attrs: { "trigger": "custom", "visible": _vm.contextMenuVisible, "transfer": "" }, on: { "on-clickoutside": _vm.handleClickContextMenuOutside } }, [_c('DropdownMenu', { attrs: { "slot": "list" }, slot: "list" }, [_vm._t("contextMenu")], 2)], 1)], 1) : _vm._e(), _vm._v(" "), _vm.loading ? _c('Spin', { attrs: { "fix": "", "size": "large" } }, [_vm._t("loading")], 2) : _vm._e()], 1);
  99943. };
  99944. var staticRenderFns = [];
  99945. exports.render = render;
  99946. exports.staticRenderFns = staticRenderFns;
  99947. /***/ }),
  99948. /* 582 */
  99949. /***/ (function(module, exports, __webpack_require__) {
  99950. "use strict";
  99951. Object.defineProperty(exports, "__esModule", {
  99952. value: true
  99953. });
  99954. var _tabs = __webpack_require__(583);
  99955. var _tabs2 = _interopRequireDefault(_tabs);
  99956. var _pane = __webpack_require__(585);
  99957. var _pane2 = _interopRequireDefault(_pane);
  99958. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  99959. _tabs2.default.Pane = _pane2.default;
  99960. exports.default = _tabs2.default;
  99961. /***/ }),
  99962. /* 583 */
  99963. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99964. "use strict";
  99965. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  99966. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue__ = __webpack_require__(242);
  99967. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue__);
  99968. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  99969. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a114a97e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__ = __webpack_require__(584);
  99970. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a114a97e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a114a97e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__);
  99971. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  99972. /* script */
  99973. /* template */
  99974. /* template functional */
  99975. var __vue_template_functional__ = false
  99976. /* styles */
  99977. var __vue_styles__ = null
  99978. /* scopeId */
  99979. var __vue_scopeId__ = null
  99980. /* moduleIdentifier (server only) */
  99981. var __vue_module_identifier__ = null
  99982. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  99983. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tabs_vue___default.a,
  99984. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a114a97e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__["render"],
  99985. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a114a97e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tabs_vue__["staticRenderFns"],
  99986. __vue_template_functional__,
  99987. __vue_styles__,
  99988. __vue_scopeId__,
  99989. __vue_module_identifier__
  99990. )
  99991. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  99992. /***/ }),
  99993. /* 584 */
  99994. /***/ (function(module, exports, __webpack_require__) {
  99995. "use strict";
  99996. Object.defineProperty(exports, "__esModule", {
  99997. value: true
  99998. });
  99999. var render = function render() {
  100000. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { ref: "tabsWrap", class: _vm.classes }, [_c('div', { class: [_vm.prefixCls + '-bar'] }, [_vm.showSlot ? _c('div', { class: [_vm.prefixCls + '-nav-right'] }, [_vm._t("extra")], 2) : _vm._e(), _vm._v(" "), _c('div', { ref: "navContainer", class: [_vm.prefixCls + '-nav-container'], attrs: { "tabindex": "0" }, on: { "keydown": [_vm.handleTabKeyNavigation, function ($event) {
  100001. if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "space", 32, $event.key, [" ", "Spacebar"])) {
  100002. return null;
  100003. }$event.preventDefault();return _vm.handleTabKeyboardSelect(false);
  100004. }] } }, [_c('div', { ref: "navWrap", class: [_vm.prefixCls + '-nav-wrap', _vm.scrollable ? _vm.prefixCls + '-nav-scrollable' : ''] }, [_c('span', { class: [_vm.prefixCls + '-nav-prev', _vm.scrollable ? '' : _vm.prefixCls + '-nav-scroll-disabled'], on: { "click": _vm.scrollPrev } }, [_c('Icon', { attrs: { "type": "ios-arrow-back" } })], 1), _vm._v(" "), _c('span', { class: [_vm.prefixCls + '-nav-next', _vm.scrollable ? '' : _vm.prefixCls + '-nav-scroll-disabled'], on: { "click": _vm.scrollNext } }, [_c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1), _vm._v(" "), _c('div', { ref: "navScroll", class: [_vm.prefixCls + '-nav-scroll'], on: { "DOMMouseScroll": _vm.handleScroll, "mousewheel": _vm.handleScroll } }, [_c('div', { ref: "nav", class: [_vm.prefixCls + '-nav'], style: _vm.navStyle }, [_c('div', { class: _vm.barClasses, style: _vm.barStyle }), _vm._v(" "), _vm._l(_vm.navList, function (item, index) {
  100005. return _c('div', { class: _vm.tabCls(item), attrs: { "draggable": _vm.draggable }, on: { "click": function click($event) {
  100006. return _vm.handleChange(index);
  100007. }, "dblclick": function dblclick($event) {
  100008. return _vm.handleDblclick(index);
  100009. }, "contextmenu": function contextmenu($event) {
  100010. $event.stopPropagation();return _vm.handleContextmenu(index, $event);
  100011. }, "selectstart": function selectstart($event) {
  100012. $event.stopPropagation();return _vm.handlePreventSelect(index, $event);
  100013. }, "dragstart": function dragstart($event) {
  100014. return _vm.handleDrag(index, $event);
  100015. }, "drop": function drop($event) {
  100016. return _vm.handleDrop(index, $event);
  100017. }, "dragover": function dragover($event) {
  100018. $event.preventDefault();
  100019. } } }, [item.icon !== '' ? _c('Icon', { attrs: { "type": item.icon } }) : _vm._e(), _vm._v(" "), item.labelType === 'function' ? _c('Render', { attrs: { "render": item.label } }) : [_vm._v(_vm._s(item.label))], _vm._v(" "), _vm.showClose(item) ? _c('Icon', { class: [_vm.prefixCls + '-close'], attrs: { "type": _vm.arrowType, "custom": _vm.customArrowType, "size": _vm.arrowSize }, nativeOn: { "click": function click($event) {
  100020. $event.stopPropagation();return _vm.handleRemove(index);
  100021. } } }) : _vm._e()], 2);
  100022. })], 2)])])])]), _vm._v(" "), _c('div', { ref: "panes", class: _vm.contentClasses, style: _vm.contentStyle }, [_vm._t("default")], 2), _vm._v(" "), _c('div', { staticClass: "ivu-tabs-context-menu", style: _vm.contextMenuStyles }, [_c('Dropdown', { attrs: { "trigger": "custom", "visible": _vm.contextMenuVisible, "transfer": "" }, on: { "on-clickoutside": _vm.handleClickContextMenuOutside } }, [_c('DropdownMenu', { attrs: { "slot": "list" }, slot: "list" }, [_vm._t("contextMenu")], 2)], 1)], 1)]);
  100023. };
  100024. var staticRenderFns = [];
  100025. exports.render = render;
  100026. exports.staticRenderFns = staticRenderFns;
  100027. /***/ }),
  100028. /* 585 */
  100029. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100030. "use strict";
  100031. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100032. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_pane_vue__ = __webpack_require__(243);
  100033. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_pane_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_pane_vue__);
  100034. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_pane_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_pane_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100035. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0df6e880_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_pane_vue__ = __webpack_require__(586);
  100036. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0df6e880_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_pane_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0df6e880_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_pane_vue__);
  100037. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100038. /* script */
  100039. /* template */
  100040. /* template functional */
  100041. var __vue_template_functional__ = false
  100042. /* styles */
  100043. var __vue_styles__ = null
  100044. /* scopeId */
  100045. var __vue_scopeId__ = null
  100046. /* moduleIdentifier (server only) */
  100047. var __vue_module_identifier__ = null
  100048. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100049. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_pane_vue___default.a,
  100050. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0df6e880_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_pane_vue__["render"],
  100051. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_0df6e880_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_pane_vue__["staticRenderFns"],
  100052. __vue_template_functional__,
  100053. __vue_styles__,
  100054. __vue_scopeId__,
  100055. __vue_module_identifier__
  100056. )
  100057. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100058. /***/ }),
  100059. /* 586 */
  100060. /***/ (function(module, exports, __webpack_require__) {
  100061. "use strict";
  100062. Object.defineProperty(exports, "__esModule", {
  100063. value: true
  100064. });
  100065. var render = function render() {
  100066. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "show", rawName: "v-show", value: _vm.show, expression: "show" }], class: _vm.prefixCls, style: _vm.contentStyle }, [_vm._t("default")], 2);
  100067. };
  100068. var staticRenderFns = [];
  100069. exports.render = render;
  100070. exports.staticRenderFns = staticRenderFns;
  100071. /***/ }),
  100072. /* 587 */
  100073. /***/ (function(module, exports, __webpack_require__) {
  100074. "use strict";
  100075. Object.defineProperty(exports, "__esModule", {
  100076. value: true
  100077. });
  100078. var _tag = __webpack_require__(588);
  100079. var _tag2 = _interopRequireDefault(_tag);
  100080. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100081. exports.default = _tag2.default;
  100082. /***/ }),
  100083. /* 588 */
  100084. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100085. "use strict";
  100086. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100087. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tag_vue__ = __webpack_require__(244);
  100088. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tag_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tag_vue__);
  100089. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tag_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tag_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100090. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_765e6050_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tag_vue__ = __webpack_require__(589);
  100091. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_765e6050_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tag_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_765e6050_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tag_vue__);
  100092. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100093. /* script */
  100094. /* template */
  100095. /* template functional */
  100096. var __vue_template_functional__ = false
  100097. /* styles */
  100098. var __vue_styles__ = null
  100099. /* scopeId */
  100100. var __vue_scopeId__ = null
  100101. /* moduleIdentifier (server only) */
  100102. var __vue_module_identifier__ = null
  100103. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100104. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tag_vue___default.a,
  100105. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_765e6050_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tag_vue__["render"],
  100106. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_765e6050_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tag_vue__["staticRenderFns"],
  100107. __vue_template_functional__,
  100108. __vue_styles__,
  100109. __vue_scopeId__,
  100110. __vue_module_identifier__
  100111. )
  100112. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100113. /***/ }),
  100114. /* 589 */
  100115. /***/ (function(module, exports, __webpack_require__) {
  100116. "use strict";
  100117. Object.defineProperty(exports, "__esModule", {
  100118. value: true
  100119. });
  100120. var render = function render() {
  100121. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _vm.fade ? _c('transition', { attrs: { "name": "fade" } }, [_c('div', { class: _vm.classes, style: _vm.wraperStyles, on: { "click": function click($event) {
  100122. $event.stopPropagation();return _vm.check($event);
  100123. } } }, [_vm.showDot ? _c('span', { class: _vm.dotClasses, style: _vm.bgColorStyle }) : _vm._e(), _vm._v(" "), _c('span', { class: _vm.textClasses, style: _vm.textColorStyle }, [_vm._t("default")], 2), _vm._v(" "), _vm.closable ? _c('Icon', { class: _vm.iconClass, attrs: { "color": _vm.lineColor, "type": "ios-close" }, nativeOn: { "click": function click($event) {
  100124. $event.stopPropagation();return _vm.close($event);
  100125. } } }) : _vm._e()], 1)]) : _c('div', { class: _vm.classes, style: _vm.wraperStyles, on: { "click": function click($event) {
  100126. $event.stopPropagation();return _vm.check($event);
  100127. } } }, [_vm.showDot ? _c('span', { class: _vm.dotClasses, style: _vm.bgColorStyle }) : _vm._e(), _vm._v(" "), _c('span', { class: _vm.textClasses, style: _vm.textColorStyle }, [_vm._t("default")], 2), _vm._v(" "), _vm.closable ? _c('Icon', { class: _vm.iconClass, attrs: { "color": _vm.lineColor, "type": "ios-close" }, nativeOn: { "click": function click($event) {
  100128. $event.stopPropagation();return _vm.close($event);
  100129. } } }) : _vm._e()], 1);
  100130. };
  100131. var staticRenderFns = [];
  100132. exports.render = render;
  100133. exports.staticRenderFns = staticRenderFns;
  100134. /***/ }),
  100135. /* 590 */
  100136. /***/ (function(module, exports, __webpack_require__) {
  100137. "use strict";
  100138. Object.defineProperty(exports, "__esModule", {
  100139. value: true
  100140. });
  100141. var _time = __webpack_require__(591);
  100142. var _time2 = _interopRequireDefault(_time);
  100143. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100144. exports.default = _time2.default;
  100145. /***/ }),
  100146. /* 591 */
  100147. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100148. "use strict";
  100149. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100150. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue__ = __webpack_require__(245);
  100151. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue__);
  100152. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100153. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_47132a92_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_vue__ = __webpack_require__(593);
  100154. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_47132a92_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_47132a92_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_vue__);
  100155. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100156. /* script */
  100157. /* template */
  100158. /* template functional */
  100159. var __vue_template_functional__ = false
  100160. /* styles */
  100161. var __vue_styles__ = null
  100162. /* scopeId */
  100163. var __vue_scopeId__ = null
  100164. /* moduleIdentifier (server only) */
  100165. var __vue_module_identifier__ = null
  100166. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100167. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_time_vue___default.a,
  100168. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_47132a92_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_vue__["render"],
  100169. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_47132a92_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_time_vue__["staticRenderFns"],
  100170. __vue_template_functional__,
  100171. __vue_styles__,
  100172. __vue_scopeId__,
  100173. __vue_module_identifier__
  100174. )
  100175. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100176. /***/ }),
  100177. /* 592 */
  100178. /***/ (function(module, exports, __webpack_require__) {
  100179. "use strict";
  100180. Object.defineProperty(exports, "__esModule", {
  100181. value: true
  100182. });
  100183. exports.getRelativeTime = undefined;
  100184. var _newArrowCheck2 = __webpack_require__(1);
  100185. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  100186. exports.default = function (timestamp, locale) {
  100187. return getRelativeTime(timestamp, locale);
  100188. };
  100189. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100190. var isEarly = function (timeStamp, currentTime) {
  100191. (0, _newArrowCheck3.default)(undefined, undefined);
  100192. return timeStamp <= currentTime;
  100193. }.bind(undefined);
  100194. var getHandledValue = function (num) {
  100195. (0, _newArrowCheck3.default)(undefined, undefined);
  100196. return num < 10 ? '0' + num : num;
  100197. }.bind(undefined);
  100198. var getDate = function (timeStamp, startType) {
  100199. (0, _newArrowCheck3.default)(undefined, undefined);
  100200. var d = new Date(timeStamp);
  100201. var year = d.getFullYear();
  100202. var month = getHandledValue(d.getMonth() + 1);
  100203. var date = getHandledValue(d.getDate());
  100204. var hours = getHandledValue(d.getHours());
  100205. var minutes = getHandledValue(d.getMinutes());
  100206. var second = getHandledValue(d.getSeconds());
  100207. var resStr = '';
  100208. if (startType === 'year') resStr = year + '-' + month + '-' + date + ' ' + hours + ':' + minutes + ':' + second;else resStr = month + '-' + date + ' ' + hours + ':' + minutes;
  100209. return resStr;
  100210. }.bind(undefined);
  100211. var getRelativeTime = exports.getRelativeTime = function (timeStamp, locale) {
  100212. (0, _newArrowCheck3.default)(undefined, undefined);
  100213. var currentTime = new Date().getTime();
  100214. var IS_EARLY = isEarly(timeStamp, currentTime);
  100215. var diff = currentTime - timeStamp;
  100216. if (!IS_EARLY) diff = -diff;
  100217. var resStr = '';
  100218. var dirStr = IS_EARLY ? locale('i.time.before') || '前' : locale('i.time.after') || '后';
  100219. if (diff < 1000) resStr = locale('i.time.just') || '刚刚';else if (diff < 60000) resStr = parseInt(diff / 1000) + (locale('i.time.seconds') || '秒') + dirStr;else if (diff >= 60000 && diff < 3600000) resStr = Math.floor(diff / 60000) + (locale('i.time.minutes') || '分钟') + dirStr;else if (diff >= 3600000 && diff < 86400000) resStr = Math.floor(diff / 3600000) + (locale('i.time.hours') || '小时') + dirStr;else if (diff >= 86400000 && diff < 2623860000) resStr = Math.floor(diff / 86400000) + (locale('i.time.days') || '天') + dirStr;else if (diff >= 2623860000 && diff <= 31567860000 && IS_EARLY) resStr = getDate(timeStamp);else resStr = getDate(timeStamp, 'year');
  100220. return resStr;
  100221. }.bind(undefined);
  100222. /***/ }),
  100223. /* 593 */
  100224. /***/ (function(module, exports, __webpack_require__) {
  100225. "use strict";
  100226. Object.defineProperty(exports, "__esModule", {
  100227. value: true
  100228. });
  100229. var render = function render() {
  100230. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('span', { class: _vm.classes, on: { "click": _vm.handleClick } }, [_vm._v(_vm._s(_vm.date))]);
  100231. };
  100232. var staticRenderFns = [];
  100233. exports.render = render;
  100234. exports.staticRenderFns = staticRenderFns;
  100235. /***/ }),
  100236. /* 594 */
  100237. /***/ (function(module, exports, __webpack_require__) {
  100238. "use strict";
  100239. Object.defineProperty(exports, "__esModule", {
  100240. value: true
  100241. });
  100242. var _timeline = __webpack_require__(595);
  100243. var _timeline2 = _interopRequireDefault(_timeline);
  100244. var _timelineItem = __webpack_require__(597);
  100245. var _timelineItem2 = _interopRequireDefault(_timelineItem);
  100246. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100247. _timeline2.default.Item = _timelineItem2.default;
  100248. exports.default = _timeline2.default;
  100249. /***/ }),
  100250. /* 595 */
  100251. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100252. "use strict";
  100253. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100254. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_vue__ = __webpack_require__(246);
  100255. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_vue__);
  100256. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100257. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_af320bf0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_timeline_vue__ = __webpack_require__(596);
  100258. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_af320bf0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_timeline_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_af320bf0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_timeline_vue__);
  100259. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100260. /* script */
  100261. /* template */
  100262. /* template functional */
  100263. var __vue_template_functional__ = false
  100264. /* styles */
  100265. var __vue_styles__ = null
  100266. /* scopeId */
  100267. var __vue_scopeId__ = null
  100268. /* moduleIdentifier (server only) */
  100269. var __vue_module_identifier__ = null
  100270. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100271. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_vue___default.a,
  100272. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_af320bf0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_timeline_vue__["render"],
  100273. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_af320bf0_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_timeline_vue__["staticRenderFns"],
  100274. __vue_template_functional__,
  100275. __vue_styles__,
  100276. __vue_scopeId__,
  100277. __vue_module_identifier__
  100278. )
  100279. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100280. /***/ }),
  100281. /* 596 */
  100282. /***/ (function(module, exports, __webpack_require__) {
  100283. "use strict";
  100284. Object.defineProperty(exports, "__esModule", {
  100285. value: true
  100286. });
  100287. var render = function render() {
  100288. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('ul', { class: _vm.classes }, [_vm._t("default")], 2);
  100289. };
  100290. var staticRenderFns = [];
  100291. exports.render = render;
  100292. exports.staticRenderFns = staticRenderFns;
  100293. /***/ }),
  100294. /* 597 */
  100295. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100296. "use strict";
  100297. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100298. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_item_vue__ = __webpack_require__(247);
  100299. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_item_vue__);
  100300. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_item_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_item_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100301. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_cf28fc44_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_timeline_item_vue__ = __webpack_require__(598);
  100302. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_cf28fc44_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_timeline_item_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_cf28fc44_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_timeline_item_vue__);
  100303. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100304. /* script */
  100305. /* template */
  100306. /* template functional */
  100307. var __vue_template_functional__ = false
  100308. /* styles */
  100309. var __vue_styles__ = null
  100310. /* scopeId */
  100311. var __vue_scopeId__ = null
  100312. /* moduleIdentifier (server only) */
  100313. var __vue_module_identifier__ = null
  100314. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100315. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_timeline_item_vue___default.a,
  100316. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_cf28fc44_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_timeline_item_vue__["render"],
  100317. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_cf28fc44_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_timeline_item_vue__["staticRenderFns"],
  100318. __vue_template_functional__,
  100319. __vue_styles__,
  100320. __vue_scopeId__,
  100321. __vue_module_identifier__
  100322. )
  100323. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100324. /***/ }),
  100325. /* 598 */
  100326. /***/ (function(module, exports, __webpack_require__) {
  100327. "use strict";
  100328. Object.defineProperty(exports, "__esModule", {
  100329. value: true
  100330. });
  100331. var render = function render() {
  100332. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('li', { class: _vm.itemClasses }, [_c('div', { class: _vm.tailClasses }), _vm._v(" "), _c('div', { ref: "dot", class: _vm.headClasses, style: _vm.customColor }, [_vm._t("dot")], 2), _vm._v(" "), _c('div', { class: _vm.contentClasses }, [_vm._t("default")], 2)]);
  100333. };
  100334. var staticRenderFns = [];
  100335. exports.render = render;
  100336. exports.staticRenderFns = staticRenderFns;
  100337. /***/ }),
  100338. /* 599 */
  100339. /***/ (function(module, exports, __webpack_require__) {
  100340. "use strict";
  100341. Object.defineProperty(exports, "__esModule", {
  100342. value: true
  100343. });
  100344. var _timePicker = __webpack_require__(600);
  100345. var _timePicker2 = _interopRequireDefault(_timePicker);
  100346. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100347. exports.default = _timePicker2.default;
  100348. /***/ }),
  100349. /* 600 */
  100350. /***/ (function(module, exports, __webpack_require__) {
  100351. "use strict";
  100352. Object.defineProperty(exports, "__esModule", {
  100353. value: true
  100354. });
  100355. var _newArrowCheck2 = __webpack_require__(1);
  100356. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  100357. var _picker = __webpack_require__(157);
  100358. var _picker2 = _interopRequireDefault(_picker);
  100359. var _time = __webpack_require__(166);
  100360. var _time2 = _interopRequireDefault(_time);
  100361. var _timeRange = __webpack_require__(175);
  100362. var _timeRange2 = _interopRequireDefault(_timeRange);
  100363. var _timeMixins = __webpack_require__(58);
  100364. var _timeMixins2 = _interopRequireDefault(_timeMixins);
  100365. var _assist = __webpack_require__(3);
  100366. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100367. exports.default = {
  100368. mixins: [_picker2.default, _timeMixins2.default],
  100369. components: { TimePickerPanel: _time2.default, RangeTimePickerPanel: _timeRange2.default },
  100370. props: {
  100371. type: {
  100372. validator: function validator(value) {
  100373. return (0, _assist.oneOf)(value, ['time', 'timerange']);
  100374. },
  100375. default: 'time'
  100376. }
  100377. },
  100378. computed: {
  100379. panel: function panel() {
  100380. var isRange = this.type === 'timerange';
  100381. return isRange ? 'RangeTimePickerPanel' : 'TimePickerPanel';
  100382. },
  100383. ownPickerProps: function ownPickerProps() {
  100384. return {
  100385. disabledHours: this.disabledHours,
  100386. disabledMinutes: this.disabledMinutes,
  100387. disabledSeconds: this.disabledSeconds,
  100388. hideDisabledOptions: this.hideDisabledOptions
  100389. };
  100390. }
  100391. },
  100392. watch: {
  100393. visible: function visible(_visible) {
  100394. var _this = this;
  100395. if (_visible) {
  100396. this.$nextTick(function () {
  100397. (0, _newArrowCheck3.default)(this, _this);
  100398. var spinners = (0, _assist.findComponentsDownward)(this, 'TimeSpinner');
  100399. spinners.forEach(function (instance) {
  100400. (0, _newArrowCheck3.default)(this, _this);
  100401. return instance.updateScroll();
  100402. }.bind(this));
  100403. }.bind(this));
  100404. }
  100405. }
  100406. }
  100407. };
  100408. /***/ }),
  100409. /* 601 */
  100410. /***/ (function(module, exports, __webpack_require__) {
  100411. "use strict";
  100412. Object.defineProperty(exports, "__esModule", {
  100413. value: true
  100414. });
  100415. var _tooltip = __webpack_require__(93);
  100416. var _tooltip2 = _interopRequireDefault(_tooltip);
  100417. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100418. exports.default = _tooltip2.default;
  100419. /***/ }),
  100420. /* 602 */
  100421. /***/ (function(module, exports, __webpack_require__) {
  100422. "use strict";
  100423. Object.defineProperty(exports, "__esModule", {
  100424. value: true
  100425. });
  100426. var _transfer = __webpack_require__(603);
  100427. var _transfer2 = _interopRequireDefault(_transfer);
  100428. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100429. exports.default = _transfer2.default;
  100430. /***/ }),
  100431. /* 603 */
  100432. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100433. "use strict";
  100434. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100435. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_transfer_vue__ = __webpack_require__(248);
  100436. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_transfer_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_transfer_vue__);
  100437. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_transfer_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_transfer_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100438. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100439. /* script */
  100440. /* template */
  100441. var __vue_render__, __vue_static_render_fns__
  100442. /* template functional */
  100443. var __vue_template_functional__ = false
  100444. /* styles */
  100445. var __vue_styles__ = null
  100446. /* scopeId */
  100447. var __vue_scopeId__ = null
  100448. /* moduleIdentifier (server only) */
  100449. var __vue_module_identifier__ = null
  100450. var Component = Object(__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100451. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_transfer_vue___default.a,
  100452. __vue_render__,
  100453. __vue_static_render_fns__,
  100454. __vue_template_functional__,
  100455. __vue_styles__,
  100456. __vue_scopeId__,
  100457. __vue_module_identifier__
  100458. )
  100459. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100460. /***/ }),
  100461. /* 604 */
  100462. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100463. "use strict";
  100464. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100465. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue__ = __webpack_require__(249);
  100466. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue__);
  100467. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100468. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_00c5b8d8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_vue__ = __webpack_require__(607);
  100469. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_00c5b8d8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_00c5b8d8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_vue__);
  100470. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100471. /* script */
  100472. /* template */
  100473. /* template functional */
  100474. var __vue_template_functional__ = false
  100475. /* styles */
  100476. var __vue_styles__ = null
  100477. /* scopeId */
  100478. var __vue_scopeId__ = null
  100479. /* moduleIdentifier (server only) */
  100480. var __vue_module_identifier__ = null
  100481. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100482. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_list_vue___default.a,
  100483. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_00c5b8d8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_vue__["render"],
  100484. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_00c5b8d8_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_list_vue__["staticRenderFns"],
  100485. __vue_template_functional__,
  100486. __vue_styles__,
  100487. __vue_scopeId__,
  100488. __vue_module_identifier__
  100489. )
  100490. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100491. /***/ }),
  100492. /* 605 */
  100493. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100494. "use strict";
  100495. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100496. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_search_vue__ = __webpack_require__(250);
  100497. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_search_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_search_vue__);
  100498. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_search_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_search_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100499. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a86e25ae_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_search_vue__ = __webpack_require__(606);
  100500. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a86e25ae_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_search_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a86e25ae_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_search_vue__);
  100501. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100502. /* script */
  100503. /* template */
  100504. /* template functional */
  100505. var __vue_template_functional__ = false
  100506. /* styles */
  100507. var __vue_styles__ = null
  100508. /* scopeId */
  100509. var __vue_scopeId__ = null
  100510. /* moduleIdentifier (server only) */
  100511. var __vue_module_identifier__ = null
  100512. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100513. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_search_vue___default.a,
  100514. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a86e25ae_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_search_vue__["render"],
  100515. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_a86e25ae_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_search_vue__["staticRenderFns"],
  100516. __vue_template_functional__,
  100517. __vue_styles__,
  100518. __vue_scopeId__,
  100519. __vue_module_identifier__
  100520. )
  100521. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100522. /***/ }),
  100523. /* 606 */
  100524. /***/ (function(module, exports, __webpack_require__) {
  100525. "use strict";
  100526. Object.defineProperty(exports, "__esModule", {
  100527. value: true
  100528. });
  100529. var render = function render() {
  100530. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.prefixCls }, [_c('i-input', { attrs: { "size": "small", "icon": _vm.icon, "placeholder": _vm.placeholder }, on: { "on-click": _vm.handleClick }, model: { value: _vm.currentQuery, callback: function callback($$v) {
  100531. _vm.currentQuery = $$v;
  100532. }, expression: "currentQuery" } })], 1);
  100533. };
  100534. var staticRenderFns = [];
  100535. exports.render = render;
  100536. exports.staticRenderFns = staticRenderFns;
  100537. /***/ }),
  100538. /* 607 */
  100539. /***/ (function(module, exports, __webpack_require__) {
  100540. "use strict";
  100541. Object.defineProperty(exports, "__esModule", {
  100542. value: true
  100543. });
  100544. var render = function render() {
  100545. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes, style: _vm.listStyle }, [_c('div', { class: _vm.prefixCls + '-header' }, [_c('Checkbox', { attrs: { "value": _vm.checkedAll, "disabled": _vm.checkedAllDisabled }, on: { "on-change": _vm.toggleSelectAll } }), _vm._v(" "), _c('span', { class: _vm.prefixCls + '-header-title', on: { "click": function click($event) {
  100546. return _vm.toggleSelectAll(!_vm.checkedAll);
  100547. } } }, [_vm._v(_vm._s(_vm.title))]), _vm._v(" "), _c('span', { class: _vm.prefixCls + '-header-count' }, [_vm._v(_vm._s(_vm.count))])], 1), _vm._v(" "), _c('div', { class: _vm.bodyClasses }, [_vm.filterable ? _c('div', { class: _vm.prefixCls + '-body-search-wrapper' }, [_c('Search', { attrs: { "prefix-cls": _vm.prefixCls + '-search', "query": _vm.query, "placeholder": _vm.filterPlaceholder }, on: { "on-query-clear": _vm.handleQueryClear, "on-query-change": _vm.handleQueryChange } })], 1) : _vm._e(), _vm._v(" "), _c('ul', { class: _vm.prefixCls + '-content' }, [_vm._l(_vm.filterData, function (item) {
  100548. return _c('li', { class: _vm.itemClasses(item), on: { "click": function click($event) {
  100549. $event.preventDefault();return _vm.select(item);
  100550. } } }, [_c('Checkbox', { attrs: { "value": _vm.isCheck(item), "disabled": item.disabled } }), _vm._v(" "), _c('span', { domProps: { "innerHTML": _vm._s(_vm.showLabel(item)) } })], 1);
  100551. }), _vm._v(" "), _c('li', { class: _vm.prefixCls + '-content-not-found' }, [_vm._v(_vm._s(_vm.notFoundText))])], 2)]), _vm._v(" "), _vm.showFooter ? _c('div', { class: _vm.prefixCls + '-footer' }, [_vm._t("default")], 2) : _vm._e()]);
  100552. };
  100553. var staticRenderFns = [];
  100554. exports.render = render;
  100555. exports.staticRenderFns = staticRenderFns;
  100556. /***/ }),
  100557. /* 608 */
  100558. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100559. "use strict";
  100560. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100561. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_operation_vue__ = __webpack_require__(251);
  100562. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_operation_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_operation_vue__);
  100563. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_operation_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_operation_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100564. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_c9576318_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_operation_vue__ = __webpack_require__(609);
  100565. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_c9576318_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_operation_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_c9576318_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_operation_vue__);
  100566. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100567. /* script */
  100568. /* template */
  100569. /* template functional */
  100570. var __vue_template_functional__ = false
  100571. /* styles */
  100572. var __vue_styles__ = null
  100573. /* scopeId */
  100574. var __vue_scopeId__ = null
  100575. /* moduleIdentifier (server only) */
  100576. var __vue_module_identifier__ = null
  100577. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100578. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_operation_vue___default.a,
  100579. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_c9576318_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_operation_vue__["render"],
  100580. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_c9576318_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_operation_vue__["staticRenderFns"],
  100581. __vue_template_functional__,
  100582. __vue_styles__,
  100583. __vue_scopeId__,
  100584. __vue_module_identifier__
  100585. )
  100586. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100587. /***/ }),
  100588. /* 609 */
  100589. /***/ (function(module, exports, __webpack_require__) {
  100590. "use strict";
  100591. Object.defineProperty(exports, "__esModule", {
  100592. value: true
  100593. });
  100594. var render = function render() {
  100595. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.prefixCls + '-operation' }, [_vm.reverseOperation ? [_c('i-button', { attrs: { "type": "primary", "size": "small", "disabled": !_vm.leftActive }, nativeOn: { "click": function click($event) {
  100596. return _vm.moveToRight($event);
  100597. } } }, [_c('span', [_vm._v(_vm._s(_vm.operations[1]))]), _vm._v(" "), _c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1), _vm._v(" "), _c('i-button', { attrs: { "type": "primary", "size": "small", "disabled": !_vm.rightActive }, nativeOn: { "click": function click($event) {
  100598. return _vm.moveToLeft($event);
  100599. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-back" } }), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.operations[0]))])], 1)] : [_c('i-button', { attrs: { "type": "primary", "size": "small", "disabled": !_vm.rightActive }, nativeOn: { "click": function click($event) {
  100600. return _vm.moveToLeft($event);
  100601. } } }, [_c('Icon', { attrs: { "type": "ios-arrow-back" } }), _vm._v(" "), _c('span', [_vm._v(_vm._s(_vm.operations[0]))])], 1), _vm._v(" "), _c('i-button', { attrs: { "type": "primary", "size": "small", "disabled": !_vm.leftActive }, nativeOn: { "click": function click($event) {
  100602. return _vm.moveToRight($event);
  100603. } } }, [_c('span', [_vm._v(_vm._s(_vm.operations[1]))]), _vm._v(" "), _c('Icon', { attrs: { "type": "ios-arrow-forward" } })], 1)]], 2);
  100604. };
  100605. var staticRenderFns = [];
  100606. exports.render = render;
  100607. exports.staticRenderFns = staticRenderFns;
  100608. /***/ }),
  100609. /* 610 */
  100610. /***/ (function(module, exports, __webpack_require__) {
  100611. "use strict";
  100612. Object.defineProperty(exports, "__esModule", {
  100613. value: true
  100614. });
  100615. var _tree = __webpack_require__(611);
  100616. var _tree2 = _interopRequireDefault(_tree);
  100617. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100618. exports.default = _tree2.default;
  100619. /***/ }),
  100620. /* 611 */
  100621. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100622. "use strict";
  100623. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100624. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tree_vue__ = __webpack_require__(252);
  100625. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tree_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tree_vue__);
  100626. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tree_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tree_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100627. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7524cbf5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tree_vue__ = __webpack_require__(615);
  100628. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7524cbf5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tree_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7524cbf5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tree_vue__);
  100629. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100630. /* script */
  100631. /* template */
  100632. /* template functional */
  100633. var __vue_template_functional__ = false
  100634. /* styles */
  100635. var __vue_styles__ = null
  100636. /* scopeId */
  100637. var __vue_scopeId__ = null
  100638. /* moduleIdentifier (server only) */
  100639. var __vue_module_identifier__ = null
  100640. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100641. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_tree_vue___default.a,
  100642. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7524cbf5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tree_vue__["render"],
  100643. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_7524cbf5_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_tree_vue__["staticRenderFns"],
  100644. __vue_template_functional__,
  100645. __vue_styles__,
  100646. __vue_scopeId__,
  100647. __vue_module_identifier__
  100648. )
  100649. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100650. /***/ }),
  100651. /* 612 */
  100652. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100653. "use strict";
  100654. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100655. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_node_vue__ = __webpack_require__(253);
  100656. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_node_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_node_vue__);
  100657. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_node_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_node_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100658. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_58a4fe4c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_node_vue__ = __webpack_require__(614);
  100659. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_58a4fe4c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_node_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_58a4fe4c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_node_vue__);
  100660. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100661. /* script */
  100662. /* template */
  100663. /* template functional */
  100664. var __vue_template_functional__ = false
  100665. /* styles */
  100666. var __vue_styles__ = null
  100667. /* scopeId */
  100668. var __vue_scopeId__ = null
  100669. /* moduleIdentifier (server only) */
  100670. var __vue_module_identifier__ = null
  100671. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100672. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_node_vue___default.a,
  100673. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_58a4fe4c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_node_vue__["render"],
  100674. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_58a4fe4c_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_node_vue__["staticRenderFns"],
  100675. __vue_template_functional__,
  100676. __vue_styles__,
  100677. __vue_scopeId__,
  100678. __vue_module_identifier__
  100679. )
  100680. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100681. /***/ }),
  100682. /* 613 */
  100683. /***/ (function(module, exports, __webpack_require__) {
  100684. "use strict";
  100685. Object.defineProperty(exports, "__esModule", {
  100686. value: true
  100687. });
  100688. var _newArrowCheck2 = __webpack_require__(1);
  100689. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  100690. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100691. exports.default = {
  100692. name: 'RenderCell',
  100693. functional: true,
  100694. props: {
  100695. render: Function,
  100696. data: Object,
  100697. node: Array
  100698. },
  100699. render: function render(h, ctx) {
  100700. (0, _newArrowCheck3.default)(undefined, undefined);
  100701. var params = {
  100702. root: ctx.props.node[0],
  100703. node: ctx.props.node[1],
  100704. data: ctx.props.data
  100705. };
  100706. return ctx.props.render(h, params);
  100707. }.bind(undefined)
  100708. };
  100709. /***/ }),
  100710. /* 614 */
  100711. /***/ (function(module, exports, __webpack_require__) {
  100712. "use strict";
  100713. Object.defineProperty(exports, "__esModule", {
  100714. value: true
  100715. });
  100716. var render = function render() {
  100717. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('collapse-transition', { attrs: { "appear": _vm.appear } }, [_c('ul', { class: _vm.classes }, [_c('li', { on: { "contextmenu": function contextmenu($event) {
  100718. $event.stopPropagation();return _vm.handleContextmenu(_vm.data, $event);
  100719. }, "selectstart": function selectstart($event) {
  100720. $event.stopPropagation();return _vm.handlePreventSelect(_vm.data, $event);
  100721. } } }, [_c('span', { class: _vm.arrowClasses, on: { "click": _vm.handleExpand } }, [_vm.showArrow ? _c('Icon', { attrs: { "type": _vm.arrowType, "custom": _vm.customArrowType, "size": _vm.arrowSize } }) : _vm._e(), _vm._v(" "), _vm.showLoading ? _c('Icon', { staticClass: "ivu-load-loop", attrs: { "type": "ios-loading" } }) : _vm._e()], 1), _vm._v(" "), _vm.showCheckbox ? _c('Checkbox', { attrs: { "value": _vm.data.checked, "indeterminate": _vm.data.indeterminate, "disabled": _vm.data.disabled || _vm.data.disableCheckbox }, nativeOn: { "click": function click($event) {
  100722. $event.preventDefault();return _vm.handleCheck($event);
  100723. } } }) : _vm._e(), _vm._v(" "), _c('span', { class: _vm.titleClasses, on: { "click": _vm.handleClickNode } }, [_vm.data.render ? _c('Render', { attrs: { "render": _vm.data.render, "data": _vm.data, "node": _vm.node } }) : _vm.isParentRender ? _c('Render', { attrs: { "render": _vm.parentRender, "data": _vm.data, "node": _vm.node } }) : [_vm._v(_vm._s(_vm.data.title))]], 2), _vm._v(" "), _vm._l(_vm.children, function (item, i) {
  100724. return _vm.data.expand ? _c('Tree-node', { key: i, attrs: { "appear": _vm.appearByClickArrow, "data": item, "multiple": _vm.multiple, "show-checkbox": _vm.showCheckbox, "children-key": _vm.childrenKey } }) : _vm._e();
  100725. })], 2)])]);
  100726. };
  100727. var staticRenderFns = [];
  100728. exports.render = render;
  100729. exports.staticRenderFns = staticRenderFns;
  100730. /***/ }),
  100731. /* 615 */
  100732. /***/ (function(module, exports, __webpack_require__) {
  100733. "use strict";
  100734. Object.defineProperty(exports, "__esModule", {
  100735. value: true
  100736. });
  100737. var render = function render() {
  100738. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { ref: "treeWrap", class: _vm.prefixCls }, [_vm._l(_vm.stateTree, function (item, i) {
  100739. return _c('Tree-node', { key: i, attrs: { "data": item, "visible": "", "multiple": _vm.multiple, "show-checkbox": _vm.showCheckbox, "children-key": _vm.childrenKey } });
  100740. }), _vm._v(" "), !_vm.stateTree.length ? _c('div', { class: [_vm.prefixCls + '-empty'] }, [_vm._v(_vm._s(_vm.localeEmptyText))]) : _vm._e(), _vm._v(" "), _c('div', { staticClass: "ivu-tree-context-menu", style: _vm.contextMenuStyles }, [_c('Dropdown', { attrs: { "trigger": "custom", "visible": _vm.contextMenuVisible, "transfer": "" }, on: { "on-clickoutside": _vm.handleClickContextMenuOutside } }, [_c('DropdownMenu', { attrs: { "slot": "list" }, slot: "list" }, [_vm._t("contextMenu")], 2)], 1)], 1)], 2);
  100741. };
  100742. var staticRenderFns = [];
  100743. exports.render = render;
  100744. exports.staticRenderFns = staticRenderFns;
  100745. /***/ }),
  100746. /* 616 */
  100747. /***/ (function(module, exports, __webpack_require__) {
  100748. "use strict";
  100749. Object.defineProperty(exports, "__esModule", {
  100750. value: true
  100751. });
  100752. var _upload = __webpack_require__(617);
  100753. var _upload2 = _interopRequireDefault(_upload);
  100754. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100755. exports.default = _upload2.default;
  100756. /***/ }),
  100757. /* 617 */
  100758. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100759. "use strict";
  100760. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100761. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_vue__ = __webpack_require__(254);
  100762. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_vue__);
  100763. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100764. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_31b06543_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_upload_vue__ = __webpack_require__(621);
  100765. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_31b06543_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_upload_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_31b06543_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_upload_vue__);
  100766. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100767. /* script */
  100768. /* template */
  100769. /* template functional */
  100770. var __vue_template_functional__ = false
  100771. /* styles */
  100772. var __vue_styles__ = null
  100773. /* scopeId */
  100774. var __vue_scopeId__ = null
  100775. /* moduleIdentifier (server only) */
  100776. var __vue_module_identifier__ = null
  100777. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100778. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_vue___default.a,
  100779. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_31b06543_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_upload_vue__["render"],
  100780. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_31b06543_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_upload_vue__["staticRenderFns"],
  100781. __vue_template_functional__,
  100782. __vue_styles__,
  100783. __vue_scopeId__,
  100784. __vue_module_identifier__
  100785. )
  100786. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100787. /***/ }),
  100788. /* 618 */
  100789. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100790. "use strict";
  100791. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100792. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_list_vue__ = __webpack_require__(255);
  100793. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_list_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_list_vue__);
  100794. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_list_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_list_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100795. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_50571a34_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_upload_list_vue__ = __webpack_require__(619);
  100796. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_50571a34_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_upload_list_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_50571a34_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_upload_list_vue__);
  100797. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100798. /* script */
  100799. /* template */
  100800. /* template functional */
  100801. var __vue_template_functional__ = false
  100802. /* styles */
  100803. var __vue_styles__ = null
  100804. /* scopeId */
  100805. var __vue_scopeId__ = null
  100806. /* moduleIdentifier (server only) */
  100807. var __vue_module_identifier__ = null
  100808. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100809. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_upload_list_vue___default.a,
  100810. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_50571a34_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_upload_list_vue__["render"],
  100811. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_50571a34_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_upload_list_vue__["staticRenderFns"],
  100812. __vue_template_functional__,
  100813. __vue_styles__,
  100814. __vue_scopeId__,
  100815. __vue_module_identifier__
  100816. )
  100817. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100818. /***/ }),
  100819. /* 619 */
  100820. /***/ (function(module, exports, __webpack_require__) {
  100821. "use strict";
  100822. Object.defineProperty(exports, "__esModule", {
  100823. value: true
  100824. });
  100825. var render = function render() {
  100826. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('ul', { class: [_vm.prefixCls + '-list'] }, _vm._l(_vm.files, function (file) {
  100827. return _c('li', { class: _vm.fileCls(file), on: { "click": function click($event) {
  100828. return _vm.handleClick(file);
  100829. } } }, [_c('span', { on: { "click": function click($event) {
  100830. return _vm.handlePreview(file);
  100831. } } }, [_c('Icon', { attrs: { "type": _vm.format(file) } }), _vm._v(" " + _vm._s(file.name) + "\n ")], 1), _vm._v(" "), _c('Icon', { directives: [{ name: "show", rawName: "v-show", value: file.status === 'finished', expression: "file.status === 'finished'" }], class: [_vm.prefixCls + '-list-remove'], attrs: { "type": "ios-close" }, nativeOn: { "click": function click($event) {
  100832. return _vm.handleRemove(file);
  100833. } } }), _vm._v(" "), _c('transition', { attrs: { "name": "fade" } }, [file.showProgress ? _c('i-progress', { attrs: { "stroke-width": 2, "percent": _vm.parsePercentage(file.percentage), "status": file.status === 'finished' && file.showProgress ? 'success' : 'normal' } }) : _vm._e()], 1)], 1);
  100834. }), 0);
  100835. };
  100836. var staticRenderFns = [];
  100837. exports.render = render;
  100838. exports.staticRenderFns = staticRenderFns;
  100839. /***/ }),
  100840. /* 620 */
  100841. /***/ (function(module, exports, __webpack_require__) {
  100842. "use strict";
  100843. Object.defineProperty(exports, "__esModule", {
  100844. value: true
  100845. });
  100846. var _newArrowCheck2 = __webpack_require__(1);
  100847. var _newArrowCheck3 = _interopRequireDefault(_newArrowCheck2);
  100848. var _keys = __webpack_require__(21);
  100849. var _keys2 = _interopRequireDefault(_keys);
  100850. exports.default = upload;
  100851. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100852. function getError(action, option, xhr) {
  100853. var msg = 'fail to post ' + String(action) + ' ' + String(xhr.status) + '\'';
  100854. var err = new Error(msg);
  100855. err.status = xhr.status;
  100856. err.method = 'post';
  100857. err.url = action;
  100858. return err;
  100859. }
  100860. function getBody(xhr) {
  100861. var text = xhr.responseText || xhr.response;
  100862. if (!text) {
  100863. return text;
  100864. }
  100865. try {
  100866. return JSON.parse(text);
  100867. } catch (e) {
  100868. return text;
  100869. }
  100870. }
  100871. function upload(option) {
  100872. var _this = this;
  100873. if (typeof XMLHttpRequest === 'undefined') {
  100874. return;
  100875. }
  100876. var xhr = new XMLHttpRequest();
  100877. var action = option.action;
  100878. if (xhr.upload) {
  100879. xhr.upload.onprogress = function progress(e) {
  100880. if (e.total > 0) {
  100881. e.percent = e.loaded / e.total * 100;
  100882. }
  100883. option.onProgress(e);
  100884. };
  100885. }
  100886. var formData = new FormData();
  100887. if (option.data) {
  100888. (0, _keys2.default)(option.data).map(function (key) {
  100889. (0, _newArrowCheck3.default)(this, _this);
  100890. formData.append(key, option.data[key]);
  100891. }.bind(this));
  100892. }
  100893. formData.append(option.filename, option.file);
  100894. xhr.onerror = function error(e) {
  100895. option.onError(e);
  100896. };
  100897. xhr.onload = function onload() {
  100898. if (xhr.status < 200 || xhr.status >= 300) {
  100899. return option.onError(getError(action, option, xhr), getBody(xhr));
  100900. }
  100901. option.onSuccess(getBody(xhr));
  100902. };
  100903. xhr.open('post', action, true);
  100904. if (option.withCredentials && 'withCredentials' in xhr) {
  100905. xhr.withCredentials = true;
  100906. }
  100907. var headers = option.headers || {};
  100908. for (var item in headers) {
  100909. if (headers.hasOwnProperty(item) && headers[item] !== null) {
  100910. xhr.setRequestHeader(item, headers[item]);
  100911. }
  100912. }
  100913. xhr.send(formData);
  100914. }
  100915. /***/ }),
  100916. /* 621 */
  100917. /***/ (function(module, exports, __webpack_require__) {
  100918. "use strict";
  100919. Object.defineProperty(exports, "__esModule", {
  100920. value: true
  100921. });
  100922. var render = function render() {
  100923. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: [_vm.prefixCls] }, [_c('div', { class: _vm.classes, on: { "click": _vm.handleClick, "drop": function drop($event) {
  100924. $event.preventDefault();return _vm.onDrop($event);
  100925. }, "paste": _vm.handlePaste, "dragover": function dragover($event) {
  100926. $event.preventDefault();_vm.dragOver = true;
  100927. }, "dragleave": function dragleave($event) {
  100928. $event.preventDefault();_vm.dragOver = false;
  100929. } } }, [_c('input', { ref: "input", class: [_vm.prefixCls + '-input'], attrs: { "type": "file", "multiple": _vm.multiple, "webkitdirectory": _vm.webkitdirectory, "accept": _vm.accept }, on: { "change": _vm.handleChange } }), _vm._v(" "), _vm._t("default")], 2), _vm._v(" "), _vm._t("tip"), _vm._v(" "), _vm.showUploadList ? _c('upload-list', { attrs: { "files": _vm.fileList }, on: { "on-file-remove": _vm.handleRemove, "on-file-preview": _vm.handlePreview } }) : _vm._e()], 2);
  100930. };
  100931. var staticRenderFns = [];
  100932. exports.render = render;
  100933. exports.staticRenderFns = staticRenderFns;
  100934. /***/ }),
  100935. /* 622 */
  100936. /***/ (function(module, exports, __webpack_require__) {
  100937. "use strict";
  100938. Object.defineProperty(exports, "__esModule", {
  100939. value: true
  100940. });
  100941. exports.Col = exports.Row = undefined;
  100942. var _row = __webpack_require__(623);
  100943. var _row2 = _interopRequireDefault(_row);
  100944. var _col = __webpack_require__(625);
  100945. var _col2 = _interopRequireDefault(_col);
  100946. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  100947. exports.Row = _row2.default;
  100948. exports.Col = _col2.default;
  100949. /***/ }),
  100950. /* 623 */
  100951. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100952. "use strict";
  100953. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100954. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_row_vue__ = __webpack_require__(256);
  100955. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_row_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_row_vue__);
  100956. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_row_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_row_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  100957. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6520bda6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_row_vue__ = __webpack_require__(624);
  100958. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6520bda6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_row_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6520bda6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_row_vue__);
  100959. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  100960. /* script */
  100961. /* template */
  100962. /* template functional */
  100963. var __vue_template_functional__ = false
  100964. /* styles */
  100965. var __vue_styles__ = null
  100966. /* scopeId */
  100967. var __vue_scopeId__ = null
  100968. /* moduleIdentifier (server only) */
  100969. var __vue_module_identifier__ = null
  100970. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  100971. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_row_vue___default.a,
  100972. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6520bda6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_row_vue__["render"],
  100973. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_6520bda6_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_row_vue__["staticRenderFns"],
  100974. __vue_template_functional__,
  100975. __vue_styles__,
  100976. __vue_scopeId__,
  100977. __vue_module_identifier__
  100978. )
  100979. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  100980. /***/ }),
  100981. /* 624 */
  100982. /***/ (function(module, exports, __webpack_require__) {
  100983. "use strict";
  100984. Object.defineProperty(exports, "__esModule", {
  100985. value: true
  100986. });
  100987. var render = function render() {
  100988. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes, style: _vm.styles }, [_vm._t("default")], 2);
  100989. };
  100990. var staticRenderFns = [];
  100991. exports.render = render;
  100992. exports.staticRenderFns = staticRenderFns;
  100993. /***/ }),
  100994. /* 625 */
  100995. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  100996. "use strict";
  100997. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  100998. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_col_vue__ = __webpack_require__(257);
  100999. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_col_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_col_vue__);
  101000. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_col_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_col_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  101001. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b6acf052_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_col_vue__ = __webpack_require__(626);
  101002. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b6acf052_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_col_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b6acf052_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_col_vue__);
  101003. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  101004. /* script */
  101005. /* template */
  101006. /* template functional */
  101007. var __vue_template_functional__ = false
  101008. /* styles */
  101009. var __vue_styles__ = null
  101010. /* scopeId */
  101011. var __vue_scopeId__ = null
  101012. /* moduleIdentifier (server only) */
  101013. var __vue_module_identifier__ = null
  101014. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  101015. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_col_vue___default.a,
  101016. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b6acf052_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_col_vue__["render"],
  101017. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_b6acf052_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_col_vue__["staticRenderFns"],
  101018. __vue_template_functional__,
  101019. __vue_styles__,
  101020. __vue_scopeId__,
  101021. __vue_module_identifier__
  101022. )
  101023. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  101024. /***/ }),
  101025. /* 626 */
  101026. /***/ (function(module, exports, __webpack_require__) {
  101027. "use strict";
  101028. Object.defineProperty(exports, "__esModule", {
  101029. value: true
  101030. });
  101031. var render = function render() {
  101032. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { class: _vm.classes, style: _vm.styles }, [_vm._t("default")], 2);
  101033. };
  101034. var staticRenderFns = [];
  101035. exports.render = render;
  101036. exports.staticRenderFns = staticRenderFns;
  101037. /***/ }),
  101038. /* 627 */
  101039. /***/ (function(module, exports, __webpack_require__) {
  101040. "use strict";
  101041. Object.defineProperty(exports, "__esModule", {
  101042. value: true
  101043. });
  101044. exports.OptionGroup = exports.Option = exports.Select = undefined;
  101045. var _select = __webpack_require__(74);
  101046. var _select2 = _interopRequireDefault(_select);
  101047. var _option = __webpack_require__(81);
  101048. var _option2 = _interopRequireDefault(_option);
  101049. var _optionGroup = __webpack_require__(628);
  101050. var _optionGroup2 = _interopRequireDefault(_optionGroup);
  101051. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  101052. exports.Select = _select2.default;
  101053. exports.Option = _option2.default;
  101054. exports.OptionGroup = _optionGroup2.default;
  101055. exports.default = _select2.default;
  101056. /***/ }),
  101057. /* 628 */
  101058. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  101059. "use strict";
  101060. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  101061. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_group_vue__ = __webpack_require__(258);
  101062. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_group_vue__);
  101063. /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_group_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_group_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  101064. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_267e9f7e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_option_group_vue__ = __webpack_require__(629);
  101065. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_267e9f7e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_option_group_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_267e9f7e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_option_group_vue__);
  101066. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__ = __webpack_require__(0);
  101067. /* script */
  101068. /* template */
  101069. /* template functional */
  101070. var __vue_template_functional__ = false
  101071. /* styles */
  101072. var __vue_styles__ = null
  101073. /* scopeId */
  101074. var __vue_scopeId__ = null
  101075. /* moduleIdentifier (server only) */
  101076. var __vue_module_identifier__ = null
  101077. var Component = Object(__WEBPACK_IMPORTED_MODULE_2__node_modules_vue_loader_lib_runtime_component_normalizer__["a" /* default */])(
  101078. __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_option_group_vue___default.a,
  101079. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_267e9f7e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_option_group_vue__["render"],
  101080. __WEBPACK_IMPORTED_MODULE_1__babel_loader_sourceMap_node_modules_vue_loader_lib_template_compiler_index_id_data_v_267e9f7e_hasScoped_false_optionsId_0_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_option_group_vue__["staticRenderFns"],
  101081. __vue_template_functional__,
  101082. __vue_styles__,
  101083. __vue_scopeId__,
  101084. __vue_module_identifier__
  101085. )
  101086. /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
  101087. /***/ }),
  101088. /* 629 */
  101089. /***/ (function(module, exports, __webpack_require__) {
  101090. "use strict";
  101091. Object.defineProperty(exports, "__esModule", {
  101092. value: true
  101093. });
  101094. var render = function render() {
  101095. var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('li', { directives: [{ name: "show", rawName: "v-show", value: !_vm.hidden, expression: "!hidden" }], class: [_vm.prefixCls + '-wrap'] }, [_c('div', { class: [_vm.prefixCls + '-title'] }, [_vm._v(_vm._s(_vm.label))]), _vm._v(" "), _c('ul', [_c('li', { ref: "options", class: [_vm.prefixCls] }, [_vm._t("default")], 2)])]);
  101096. };
  101097. var staticRenderFns = [];
  101098. exports.render = render;
  101099. exports.staticRenderFns = staticRenderFns;
  101100. /***/ })
  101101. /******/ ]);
  101102. });
  101103. //# sourceMappingURL=iview.js.map
  101104. /***/ }),
  101105. /* 194 */
  101106. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  101107. "use strict";
  101108. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  101109. var languageListenerObjects = [];
  101110. /* harmony default export */ __webpack_exports__["a"] = ({
  101111. install: function install(Vue) {
  101112. Vue.mixin({
  101113. data: function data() {
  101114. return {
  101115. languageInit: false,
  101116. languageData: {},
  101117. languageType: window.localStorage['__language:type__'] || 'zh'
  101118. };
  101119. },
  101120. watch: {
  101121. languageType: {
  101122. handler: function handler(type) {
  101123. if (type && typeof this.initLanguage === "function") {
  101124. this.initLanguage();
  101125. }
  101126. },
  101127. immediate: true
  101128. }
  101129. },
  101130. methods: {
  101131. /**
  101132. * 初始化语言数据
  101133. * @private
  101134. */
  101135. __initLanguageData: function __initLanguageData() {
  101136. var _this = this;
  101137. if (this.languageInit === false) {
  101138. this.languageInit = true;
  101139. //
  101140. this.addLanguageData({
  101141. en: __webpack_require__(195).default,
  101142. zh: __webpack_require__(196).default
  101143. });
  101144. //
  101145. languageListenerObjects.push(function (lang) {
  101146. _this.languageType = lang;
  101147. });
  101148. }
  101149. },
  101150. /**
  101151. * 监听语言变化
  101152. * @param callback
  101153. */
  101154. setLanguageListener: function setLanguageListener(callback) {
  101155. if (typeof callback === 'function') {
  101156. languageListenerObjects.push(function (lang) {
  101157. callback(lang);
  101158. });
  101159. }
  101160. },
  101161. /**
  101162. * 语言包数据
  101163. * @param language
  101164. * @param data
  101165. */
  101166. addLanguageData: function addLanguageData(language, data) {
  101167. var _this2 = this;
  101168. if ((typeof language === 'undefined' ? 'undefined' : _typeof(language)) === 'object') {
  101169. Object.keys(language).forEach(function (key) {
  101170. _this2.addLanguageData(key, language[key]);
  101171. });
  101172. return;
  101173. }
  101174. if (!language || (typeof data === 'undefined' ? 'undefined' : _typeof(data)) !== "object") {
  101175. return;
  101176. }
  101177. this.__initLanguageData();
  101178. if (typeof this.languageData[language] === "undefined") {
  101179. this.languageData[language] = {};
  101180. }
  101181. Object.assign(this.languageData[language], data);
  101182. //
  101183. if (language === 'en') {
  101184. if (typeof this.languageData['zh'] === "undefined") {
  101185. this.languageData['zh'] = {};
  101186. }
  101187. var cnData = {};
  101188. for (var key in data) {
  101189. if (data.hasOwnProperty(key) && typeof this.languageData['zh'][data[key]] === 'undefined') {
  101190. cnData[data[key]] = key;
  101191. }
  101192. }
  101193. Object.assign(this.languageData['zh'], cnData);
  101194. } else if (language === 'zh') {
  101195. if (typeof this.languageData['en'] === "undefined") {
  101196. this.languageData['en'] = {};
  101197. }
  101198. var enData = {};
  101199. for (var _key in data) {
  101200. if (data.hasOwnProperty(_key) && typeof this.languageData['en'][data[_key]] === 'undefined') {
  101201. enData[data[_key]] = _key;
  101202. }
  101203. }
  101204. Object.assign(this.languageData['en'], enData);
  101205. }
  101206. },
  101207. /**
  101208. * 变化语言
  101209. * @param language
  101210. */
  101211. setLanguage: function setLanguage(language) {
  101212. this.__initLanguageData();
  101213. window.localStorage['__language:type__'] = language;
  101214. languageListenerObjects.forEach(function (call) {
  101215. if (typeof call === 'function') {
  101216. call(language);
  101217. }
  101218. });
  101219. },
  101220. /**
  101221. * 获取语言
  101222. * @returns {*}
  101223. */
  101224. getLanguage: function getLanguage() {
  101225. this.__initLanguageData();
  101226. return this.languageType;
  101227. },
  101228. /**
  101229. * 替换%遍历
  101230. * @param text
  101231. * @param objects
  101232. */
  101233. replaceArgumentsLanguage: function replaceArgumentsLanguage(text, objects) {
  101234. var j = 1;
  101235. while (text.indexOf("%") !== -1) {
  101236. if (_typeof(objects[j]) === "object") {
  101237. text = text.replace("%", "");
  101238. } else {
  101239. text = text.replace("%", objects[j]);
  101240. }
  101241. j++;
  101242. }
  101243. return text;
  101244. },
  101245. /**
  101246. * 显示语言
  101247. * @return {string}
  101248. */
  101249. $L: function $L(text) {
  101250. if (text) {
  101251. this.__initLanguageData();
  101252. //
  101253. if (_typeof(this.languageData[this.languageType]) === "object") {
  101254. var temp = this.languageData[this.languageType][text];
  101255. if (temp === null) {
  101256. return this.replaceArgumentsLanguage(text, arguments);
  101257. }
  101258. if (typeof temp !== 'undefined') {
  101259. return this.replaceArgumentsLanguage(temp, arguments);
  101260. }
  101261. }
  101262. //
  101263. try {
  101264. var key = '__language:Undefined__';
  101265. var tmpData = JSON.parse(window.localStorage[key] || '{}');
  101266. if (_typeof(tmpData[this.languageType]) !== "object") {
  101267. tmpData[this.languageType] = {};
  101268. }
  101269. tmpData[this.languageType][text] = "";
  101270. window.localStorage[key] = JSON.stringify(tmpData);
  101271. } catch (e) {
  101272. //
  101273. }
  101274. }
  101275. return this.replaceArgumentsLanguage(text, arguments);
  101276. }
  101277. }
  101278. });
  101279. }
  101280. });
  101281. /***/ }),
  101282. /* 195 */
  101283. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  101284. "use strict";
  101285. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  101286. /* harmony default export */ __webpack_exports__["default"] = ({
  101287. "3天": "3 days",
  101288. "5天": "5 days",
  101289. "7天": "7 days",
  101290. "Github/Gitee图标": "Github/Gitee icon",
  101291. "MD编辑器": "Markdown Cell",
  101292. "[任务消息]": "[Task message]",
  101293. "[图片]": "[image]",
  101294. "[工作报告]": "[Work report]",
  101295. "[已超期]": "[Expired]",
  101296. "[文件]": "[file]",
  101297. "[未知类型]": "[Unknown type]",
  101298. "[来自关注任务]": "[Attention from the task]",
  101299. "[来自工作报告]": "[From work report]",
  101300. "[管理员]": "[Administrator]",
  101301. "[视频通话]": "[Video call]",
  101302. "[语音通话]": "[Voice call]",
  101303. "上传": "Upload",
  101304. "上传/浏览 图片": "Upload / browse pictures",
  101305. "上传图片": "Upload image",
  101306. "上传失败": "Upload failed",
  101307. "上传文件": "Upload files",
  101308. "上传时间": "Upload time",
  101309. "上传者": "Uploaded by",
  101310. "上午": "Morning",
  101311. "下午": "In the afternoon",
  101312. "下载": "Download",
  101313. "下载次数": "Download times",
  101314. "不重要不紧急": "Unimportant and not urgent",
  101315. "两次密码输入不一致!": "Inconsistent new passwords!",
  101316. "个人中心": "Personal Center",
  101317. "个人资料": "Personal information",
  101318. "产品开发": "Product development",
  101319. "产品规划": "Product Planning",
  101320. "产品计划": "Product plans",
  101321. "仅作者可以修改。": "Only the author can modify it.",
  101322. "仅作者可以阅读分享地址。": "Only the author can read the shared link.",
  101323. "仅作者和文档成员可以修改。": "Only authors and document members can modify it.",
  101324. "仅作者和文档成员可以阅读分享地址。": "Only authors and document members can read the shared link.",
  101325. "仅有修改权限的人员。": "Only personnel with modification authority.",
  101326. "仅项目负责人、任务创建人、任务负责人或任务关注人可查看任务详情。": "Only the project leader, task creator, task Leader, or task follower can view task details.",
  101327. "今天": "Today",
  101328. "以“http://”或“https://”开头": "Start with \"http: //\" or \"https: //\"",
  101329. "任务内容": "Summary",
  101330. "任务列表": "Task list",
  101331. "任务列表为空,请先添加任务。": "The task list is empty, please add the task first.",
  101332. "任务名称": "Task name",
  101333. "任务完成 % 天后自动归档。": "Tasks are automatically archived % days after completion.",
  101334. "任务已删除,点击确定关闭窗口。": "Task has been deleted, click OK to close the window.",
  101335. "任务权限": "Mandate",
  101336. "任务状态:": "Task Status:",
  101337. "任务等级": "Level",
  101338. "任务负责人": "Task leader",
  101339. "任务负责人已改变,点击确定关闭窗口。": "The person-in-charge has been changed, click OK to close the window.",
  101340. "企业版": "Enterprise Edition",
  101341. "优先级": "Priority",
  101342. "优先级:": "Priority:",
  101343. "会员信息": "Member information",
  101344. "你确定你要删除这个子任务吗?": "Are you sure you want to delete this subtask?",
  101345. "你确定修改负责人设置为“%”吗?": "Are you sure to modify the person-in-charge to \"%\"?",
  101346. "你确定取消管理员身份的操作吗?": "Are you sure to cancel the administrator?",
  101347. "你确定将任务计划时间取消吗?": "Are you sure to cancel the scheduled time?",
  101348. "你确定将任务计划时间设置为“%”吗?": "Are you sure to reschedule the task to \"%\" do?",
  101349. "你确定要删除%【%】吗?": "Are you sure you want to delete % [%]?",
  101350. "你确定要删除此列表吗?": "Are you sure to delete this list?",
  101351. "你确定要删除此团队成员吗?": "Are you sure you want to delete this team?",
  101352. "你确定要删除此对话吗?": "Are you sure you want to delete this conversation?",
  101353. "你确定要删除此文件吗?": "Are you sure to delete this file?",
  101354. "你确定要删除此文档吗?": "Are you sure you want to delete this document?",
  101355. "你确定要删除此知识库吗?": "Are you sure you want to delete this knowledge base it?",
  101356. "你确定要删除此项目吗?": "Are you sure you want to delete this project?",
  101357. "你确定要删除汇报吗?": "Are you sure to delete the report?",
  101358. "你确定要发送汇报吗?": "Are you sure to send the report?",
  101359. "你确定要取消归档吗?": "Are you sure you want to cancel the archive?",
  101360. "你确定要取消收藏此项目吗?": "Are you sure you want to unsubscribe this project?",
  101361. "你确定要将此成员移出项目吗?": "Are you sure you want to do this project out of the members?",
  101362. "你确定要将这些团队成员%[%]吗?": "Are you sure you want to these team members% [%] do?",
  101363. "你确定要清除聊天记录吗?": "Are you sure you want to clear the chat history?",
  101364. "你确定要解散群聊吗?": "Are you sure you want to disband a group chat?",
  101365. "你确定要退出此项目吗?": "Are you sure you want to quit this project?",
  101366. "你确定设置管理员的操作吗?": "Are you sure to set him/her as administrator?",
  101367. "使用我上次抄送的人": "Use the person I cc'd last time",
  101368. "使用换行添加多个子任务": "Add multiple subtasks using line feeds",
  101369. "保存": "Save",
  101370. "保存并发送": "Save and Send",
  101371. "保存并返回": "Save and Return",
  101372. "修改": "Modify",
  101373. "修改了工作报告": "Revised work report",
  101374. "修改任务": "Modify task",
  101375. "修改团队成员": "Modify team member",
  101376. "修改成功": "Successfully modified",
  101377. "修改成功,请重新登录!": "Modified successfully, please log in again!",
  101378. "修改成员信息": "Modify",
  101379. "修改文档标题": "Modify the document title",
  101380. "修改权限": "Modify permissions",
  101381. "修改标题": "Modify Title",
  101382. "修改群资料": "Modify group information",
  101383. "修改计划时间": "Modify the scheduled time",
  101384. "修改负责人": "Modify the person in charge",
  101385. "修改项目任务": "Modify the project tasks",
  101386. "偏好设置": "Preferences",
  101387. "允许": "Allowed",
  101388. "允许注册": "Allowed register",
  101389. "全局团队管理": "Global Management Team",
  101390. "全局知识库查看和管理": "View and manage the global knowledge base",
  101391. "全局项目查看和管理": "View and manage the overall project",
  101392. "全屏": "Full Screen",
  101393. "全部": "All",
  101394. "全部任务": "All tasks",
  101395. "关注人": "Subscribers ",
  101396. "关注任务": "Subscribe task",
  101397. "关注时间": "Attention time",
  101398. "关注的任务": "Task concern",
  101399. "关注者:": "Followers:",
  101400. "关键词": "Keywords",
  101401. "关闭": "Shut down",
  101402. "其它": "Other",
  101403. "内容加载中.....": "Content Loading .....",
  101404. "准备发布": "Ready for release",
  101405. "分享": "Share",
  101406. "分享文档": "Share documents",
  101407. "分组": "Packet",
  101408. "分组名称": "Group Name",
  101409. "列表": "List",
  101410. "列表开头": "Beginning of the list",
  101411. "列表结尾": "End of the list",
  101412. "创建于:": "Built in:",
  101413. "创建人": "Founder",
  101414. "创建日期": "Created Date",
  101415. "创建时间": "Created date",
  101416. "创建的任务": "Tasks created",
  101417. "删除": "Delete",
  101418. "删除任务": "Delete task",
  101419. "删除列表": "Delete List",
  101420. "删除团队成员": "Remove team members",
  101421. "删除对话": "Delete a conversation",
  101422. "删除成员": "Remove members",
  101423. "删除提示": "Delete Tip",
  101424. "删除文件": "Delete Files",
  101425. "删除文档": "Delete Document",
  101426. "删除汇报": "Delete report",
  101427. "删除知识库": "Delete repository",
  101428. "删除项目": "Remove project",
  101429. "删除项目任务": "Delete project tasks",
  101430. "刷新": "Refresh",
  101431. "刷新列表": "Refresh",
  101432. "刷新成功!": "Refresh success!",
  101433. "前一周": "Prev Week",
  101434. "前一天": "Prev Day",
  101435. "前端开发": "Front-end development",
  101436. "功能开启": "Feature is turned on",
  101437. "加入IP": "Join IP",
  101438. "加入分组": "Join Group",
  101439. "加入时间": "Joined date",
  101440. "加载下一页": "Next loading",
  101441. "加载下一页...": "Loads next ...",
  101442. "加载中...": "Loading...",
  101443. "加载更多": "Load more",
  101444. "加载更多...": "Load more...",
  101445. "加载组件中...": "Loading...",
  101446. "动态": "History",
  101447. "历史消息": "Message History",
  101448. "历史版本": "Historic version",
  101449. "原计划时间": "Original time",
  101450. "参与的项目": "Involved Projects",
  101451. "发布": "Release",
  101452. "发布成功": "Successfully posted",
  101453. "发起群聊": "Start a group chat",
  101454. "发送": "Send",
  101455. "发送了工作报告": "Send the work report",
  101456. "发送人": "Sender",
  101457. "发送汇报": "Send report",
  101458. "取消": "Cancel",
  101459. "取消关注": "Unsubscribe",
  101460. "取消归档": "Unarchiving",
  101461. "取消收藏": "Unfavorite",
  101462. "取消筛选": "Remove Filter",
  101463. "取消管理员": "Cancel administrator",
  101464. "取消计划时间": "Cancel a scheduled time",
  101465. "同修改权限": "Same as modify permissions",
  101466. "后一周": "Next Week",
  101467. "后一天": "Next Day",
  101468. "后端开发": "Back-end development",
  101469. "周报": "Weekly",
  101470. "周报/日报": "Weekly / Daily",
  101471. "周视图": "Week",
  101472. "呼叫失败!": "Call failed!",
  101473. "团队": "Team",
  101474. "团队分组管理": "Group Management Team",
  101475. "团队成员": "Team member",
  101476. "团队成员(%)更新了内容,<br/>更新时间:%。<br/><br/>点击【确定】加载最新内容。": "Team members (%) updated content, <br/> update time: %. <br/><br/> click \"ok\" to load the latest content.",
  101477. "图形": "Graph",
  101478. "图片": "Image",
  101479. "在线知识库": "Online Knowledge Base",
  101480. "在线知识库:在线流程图,在线文档,以及可视化的目录编排,文档管理无忧。": "Online Knowledge Base: Online flowchart, online documentation, and visualization of the catalog layout, document management worries.",
  101481. "在这里输入事项,回车即可保存": "Here input matters, Enter to save",
  101482. "基本信息": "Basic Information",
  101483. "复制失败!": "Copy failed!",
  101484. "复制成功!": "Copy successful!",
  101485. "复制链接": "Copy Link",
  101486. "大小": "Size",
  101487. "天": "Day",
  101488. "天空蓝": "Sky blue",
  101489. "天视图": "Day",
  101490. "头像": "Avatar",
  101491. "如果不指定任务负责人则项目所有成员均可领此任务。": "If you do not specify a task leader, all members of the project can take the task.",
  101492. "子任务": "Subtasks",
  101493. "子任务描述...": "Subtask description...",
  101494. "存档日期": "Archived Date",
  101495. "完全开放": "Open",
  101496. "完成": "Complete",
  101497. "完成并归档": "Complete and Archive",
  101498. "完成时间": "Complete time",
  101499. "完成自动归档": "Auto archiving",
  101500. "密码": "Password",
  101501. "密码错长度至少6位!": "Wrong password length of at least 6!",
  101502. "密码长度至少6位!": " Passwords must be at least 6 characters!",
  101503. "对方:": "Person: ",
  101504. "对方:拒绝接听": "Person: Refuse to answer",
  101505. "导出": "Export",
  101506. "导出CSV": "Export to CSV",
  101507. "导出JPG图片": "Export to JPG",
  101508. "导出PDF文件": "Export to PDF",
  101509. "导出PNG图片": "Export to PNG",
  101510. "导出TXT": "Export to TXT",
  101511. "导出XLS": "Export to XLS",
  101512. "导出XLSX": "Export to XLSX",
  101513. "导出任务": "Export Task",
  101514. "导出列表": "Export List",
  101515. "导出结果": "Export Results",
  101516. "将项目任务标记已完成": "The project marks the task has been completed",
  101517. "将项目任务标记归档或未归档": "The project task tag archive or archives",
  101518. "尊敬的会员": "Dear Member",
  101519. "小时": "Hour",
  101520. "居中": "Center",
  101521. "展开全部节点": "Expand all nodes",
  101522. "展开到一级节点": "Expand to a node",
  101523. "展开到三级节点": "Expand the node to three",
  101524. "展开到二级节点": "Expand the node to two",
  101525. "展开到五级节点": "Expand the node to five",
  101526. "展开到四级节点": "Expand to four nodes",
  101527. "已发送": "Sent",
  101528. "已完成": "Completed",
  101529. "已完成任务": "Completed tasks",
  101530. "已完成数": "Completed Number",
  101531. "已完成的任务": "Completed Tasks",
  101532. "已归档": "Archived",
  101533. "已归档任务": "Archived tasks",
  101534. "已签到": "Checked in",
  101535. "已超期": "Overdue",
  101536. "已锁定": "Locked",
  101537. "建议尺寸:%": "Suggested size: %",
  101538. "开启": "Open",
  101539. "开放任务": "Open task",
  101540. "归档": "Archive",
  101541. "归档任务": "Archive task",
  101542. "归档时间": "Archive Time",
  101543. "归档权限": "Archive Permissions",
  101544. "当前浏览器不支持音视频通话!": "Current browser does not support audio/video calls!",
  101545. "待办": "Pending",
  101546. "待办四象限": "Upcoming Quadrant",
  101547. "待办四象限:突出事情优先级,帮助员工合理安排时间,提高工作效率。": "Four quadrant to-do: highlight what priority, to help employees arrange your time, improve work efficiency.",
  101548. "待办日程": "Upcoming Schedule",
  101549. "必须指定负责人,负责人需确认接收任务。": "You must specify the person in charge, the responsible person to be confirmed receiving task.",
  101550. "恭喜你!已完成了所有待办": "Congratulations! You have completed all the to-do",
  101551. "恭喜您成为管理员。": "Congratulations on becoming an administrator.",
  101552. "您的帐号在其他地方(%)登录,您被迫退出,如果这不是您本人的操作,请注意帐号安全!": "Your account is logged in elsewhere (%), you are forced to log out, if this is not your own operation, please pay attention to account security!",
  101553. "您的管理员身份已被撤销。": "Your administrator status has been revoked.",
  101554. "您确定要删除此任务吗?": "Are you sure to delete this task?",
  101555. "您确定要退出登录吗?": "Are you sure you want to sign out?",
  101556. "成员": "Member",
  101557. "成员分组": "Members of the group",
  101558. "成员开放": "Members",
  101559. "成员管理": "Members Management",
  101560. "成员角色": "Member role",
  101561. "我关注的任务": "Concerned Tasks",
  101562. "我创建的任务": "Created tasks",
  101563. "我归档的任务": "Archived tasks",
  101564. "我的待办": "My to-do",
  101565. "我的汇报": "My report",
  101566. "我的知识库": "My Knowledge",
  101567. "我管理的项目": "Managed Projects",
  101568. "我负责的任务": "Tasks-in-charge",
  101569. "所属知识库": "Knowledge belongs",
  101570. "所属项目:": "View project:",
  101571. "所有人(含游客)都可以阅读分享地址。": "Everyone (including visitors) can read the shared link.",
  101572. "所有会员都可以修改。": "All members can modify it.",
  101573. "所有会员都可以阅读分享地址。": "All members can read the shared link.",
  101574. "手动": "Manually",
  101575. "打开": "Open",
  101576. "批量添加子任务": "Batch add subtasks",
  101577. "抄送人": "Cc",
  101578. "折叠": "Fold",
  101579. "拒绝": "Refused",
  101580. "拖动到这里发送给 %": "Send to drag%",
  101581. "拖动到这里添加附件至 %": "Drag here to add attachments to%",
  101582. "指定任务": "Specify the task",
  101583. "接受": "Accept",
  101584. "描述": "Description",
  101585. "提交": "Submit",
  101586. "搜索": "Search",
  101587. "搜索成员": "Search members",
  101588. "搜索知识库": "Search the Knowledge Base",
  101589. "搜索项目、任务": "Search projects, tasks",
  101590. "操作": "Operating",
  101591. "操作员": "Operator",
  101592. "操作记录": "Operation Records",
  101593. "收到的汇报": "Received reports",
  101594. "收藏": "Collect",
  101595. "收藏时间": "Favorite time",
  101596. "收藏的项目": "Favorite Projects",
  101597. "放弃保存": "Discard",
  101598. "敬请期待!": "Stay tuned!",
  101599. "数据加载中.....": "Loading....",
  101600. "数据加载失败!": "Loading failed!",
  101601. "文件": "File",
  101602. "文件 % 上传失败 %": "File upload failed%%",
  101603. "文件 % 上传失败,%": "File upload failed%,%",
  101604. "文件 % 太大,不能超过%。": "File % is too large to exceed %.",
  101605. "文件 % 格式不正确,仅支持上传:%": "% File format is not correct, only supports uploading:%",
  101606. "文件 % 格式不正确,请上传 jpg、jpeg、gif、png 格式的图片。": "% File format is incorrect, only jpg, jpeg, gif, png formats are supported.",
  101607. "文件/图片": "File / Picture",
  101608. "文件列表": "Document list",
  101609. "文件名": "File name",
  101610. "文件格式不正确": "File format is incorrect",
  101611. "文本": "Text",
  101612. "文本编辑器": "Text Cell",
  101613. "文档历史版本": "Historical versions",
  101614. "文档成员": "Members",
  101615. "文档标题": "Document Title",
  101616. "文档标题长度至少2位!": "Document title length of at least two!",
  101617. "文档类型": "Document Type",
  101618. "文档编辑": "Document editing",
  101619. "文档设置": "Settings",
  101620. "文档链接": "Links",
  101621. "新增章节": "New Chapter",
  101622. "新密码": "New password",
  101623. "新建文档": "New Document",
  101624. "新建汇报": "New report",
  101625. "新建知识库": "New Knowledge",
  101626. "新建项目": "New Project",
  101627. "新计划时间": "New time",
  101628. "无标题": "Untitled",
  101629. "日报": "Daily",
  101630. "日期": "Date",
  101631. "日期范围": "Date range",
  101632. "日程管理": "Calendar",
  101633. "日程管理:可视化日程管理,快速搞定工作计划,了解工作宏观安排。": "Calendar: visual schedule management, quick to get the work plan, understand the macro work arrangements.",
  101634. "旧密码": "Old password",
  101635. "明天": "Tomorrow",
  101636. "星期一": "Monday",
  101637. "星期三": "Wednesday",
  101638. "星期二": "Tuesday",
  101639. "星期五": "Friday",
  101640. "星期六": "Saturday",
  101641. "星期四": "Thursday",
  101642. "星期日": "Sunday",
  101643. "是否放弃保存修改的内容?": "Do you want to abandon the modified contents?",
  101644. "是否放弃修改的内容并返回?": "Whether to give up the modification and return?",
  101645. "昵称": "Nickname",
  101646. "昵称长度至少2位!": "Nicknames must be at least 2 characters!",
  101647. "显示": "Show",
  101648. "显示已完成": "Display completed",
  101649. "晚上": "At night",
  101650. "暂无子任务": "No subtasks",
  101651. "暂无群公告": "No group bulletin",
  101652. "更新提示": "Update",
  101653. "最后登录IP": "Last Login IP",
  101654. "最后登录时间": "Last login time",
  101655. "最多只能上传 % 张图片。": "Can only upload % pictures.",
  101656. "最多只能选择 % 张图片。": "Select at most % pictures.",
  101657. "最少6位数": "At least 6 digits",
  101658. "月视图": "Month",
  101659. "有%条新消息": "There are new messages%",
  101660. "未保存计划时间": "Unsaved planned time",
  101661. "未完成": "Unfinished",
  101662. "未完成任务": "Unfinished tasks",
  101663. "未完成数": "Uncompleted Number",
  101664. "未归档": "Unfiled",
  101665. "本周": "This week",
  101666. "本月": "This month",
  101667. "权限": "Competence",
  101668. "权限设置": "Permission Settings",
  101669. "来自关注任务": "Attention from the task",
  101670. "来自工作报告": "From work report",
  101671. "查看": "View",
  101672. "查看任务列表": "View Task List",
  101673. "查看及管理项目成员": "View and manage project members",
  101674. "查看图片": "View image",
  101675. "查看已归档任务": "View archived task",
  101676. "查看归档任务": "View archived task",
  101677. "查看成员统计页面": "View member statistics page",
  101678. "查看文件列表": "View File List",
  101679. "查看权限": "View permissions",
  101680. "查看甘特图": "View Gantt",
  101681. "查看项目动态": "View Project News",
  101682. "查看项目统计": "View project statistics",
  101683. "标记": "Mark",
  101684. "标记完成": "Mark completed",
  101685. "标记已完成": "Mark as completed",
  101686. "标记未完成": "Mark as unfinished",
  101687. "标题": "Title",
  101688. "样式": "Style",
  101689. "欢迎您": "Welcome",
  101690. "正在协作会员": "Collaborating member",
  101691. "正在研发": "Under developing",
  101692. "正在视频通话...": "On a video call...",
  101693. "正在设计": "Under designing",
  101694. "正在语音通话...": "On a voice call...",
  101695. "正在进行其他操作,请稍后重试...": "Other operations in progress, please try again later...",
  101696. "汇报标题": "Report title",
  101697. "没有任何修改!": "No changes!",
  101698. "没有相关内容": "No related content",
  101699. "没有相关的数据": "No record",
  101700. "没有相关的文件": "No related documents",
  101701. "注册": "Register",
  101702. "注册会员": "Registered",
  101703. "注册账号": "Register",
  101704. "注明:系统管理员拥有以下所有权限": "Note: Administrators have all of the following rights",
  101705. "注:将同时删除列表下所有任务": "Note: This will delete all tasks in the list",
  101706. "流程图": "Flow Chart",
  101707. "测试": "Test",
  101708. "浏览": "Browse",
  101709. "浏览器不支持音视频通话!": "The browser does not support audio and video calls!",
  101710. "浏览器阻止不是https的网站访问音视频,所以请尝试安装SSL!": "Browsers prevent sites that are not HTTPS from accessing audio and video, so try installing SSL!",
  101711. "浏览图片": "View picture",
  101712. "浏览图片空间的图片": "Browse pictures from Image Space",
  101713. "浏览文档": "View the document",
  101714. "添加": "Add",
  101715. "添加一个新列表": "Add a new list",
  101716. "添加任务": "Add a task",
  101717. "添加任务至": "Adding to the task",
  101718. "添加位置": "Add location",
  101719. "添加分组": "Adding Grouping",
  101720. "添加列表": "Add List",
  101721. "添加后不可修改,使用英文逗号添加多个。": "Do not modify after adding, use [,] to add multiple.",
  101722. "添加团队成员": "Add team members",
  101723. "添加子任务": "Add subtasks",
  101724. "添加成员": "Add Members",
  101725. "添加流程": "Adding Process",
  101726. "添加至列表结尾": "Add to the end of the list",
  101727. "添加详细描述...": "Add a detailed description ...",
  101728. "添加附件": "Add attachments",
  101729. "添加项目任务": "Add project tasks",
  101730. "清除聊天记录": "Clear chat history",
  101731. "清除记录": "Clear History",
  101732. "温柔冷光": "Gentle cold",
  101733. "温馨提示": "Tips",
  101734. "点击下载 (%)": "Click to download (%)",
  101735. "点击可快速添加需要处理的事项": "Click to quickly add items need to be addressed",
  101736. "点击弹出": "Click the pop-up",
  101737. "状态": "Status",
  101738. "现在": "Now",
  101739. "甘特图": "Gantt chart",
  101740. "用户名": "Username",
  101741. "用户名长度至少2位!": "Username length of at least two!",
  101742. "用户登录": "User login",
  101743. "留空不修改": "Does not modify the blank",
  101744. "留空默认: 自己": "Blank default: own",
  101745. "留空默认:WookTeam © 2018-2020": "Default:WookTeam © 2018-2020",
  101746. "登录": "Log in",
  101747. "登录密码": "Login password",
  101748. "登录成功": "Login successful",
  101749. "登录有效时间": "Log effective time",
  101750. "登录窗口": "Login window",
  101751. "登录身份 % 小时过期,过期后需要重新登录。": "Log on as% hours expired, you need to log in again after expired.",
  101752. "登录验证码": "Login verification code",
  101753. "目录": "Table of Contents",
  101754. "直接弹出": "Direct pop",
  101755. "相关任务": "Related Tasks",
  101756. "相关工作报告": "Related work report",
  101757. "相关知识库": "Related Knowledge",
  101758. "相关项目": "Related projects",
  101759. "知识库": "Knowledge",
  101760. "知识库名称": "Knowledge Name",
  101761. "知识库名称长度至少2位!": "Knowledge name must be at least 2 characters!",
  101762. "知识库目录": "Knowledge directory",
  101763. "确定": "Determine",
  101764. "确定操作": "Approve the operation",
  101765. "确定要修改任务【%】的计划时间吗?<br/>开始时间:%<br/>结束时间:%": "Are you sure you want to change the scheduled time for task [%]? <br/> start time: %<br/> end time: %",
  101766. "确认密码": "Confirm password",
  101767. "确认密码错长度至少6位!": "Make sure the password is at least 6 digits long!",
  101768. "确认操作": "Confirm the operation",
  101769. "确认新密码": "Confirm the new password",
  101770. "禁止": "Forbid",
  101771. "私有文库": "Private",
  101772. "移交项目": "Transfer",
  101773. "移出分组": "Out of the grouping",
  101774. "移出成员": "Members removed",
  101775. "移动": "Mobile",
  101776. "空白模板": "Blank template",
  101777. "立即登陆": "Sign in",
  101778. "第一次签到": "The first sign",
  101779. "第二次签到": "The second sign",
  101780. "等级": "Grade",
  101781. "筛选": "Filter",
  101782. "签到": "Attendance",
  101783. "签到弹窗": "Check-pop",
  101784. "签到时间时未签到时自动弹出签到窗口": "Automatic pop-up window when not in attendance when attendance time attendance",
  101785. "签到时间:": "Check-in time:",
  101786. "签到记录": "Attendance record",
  101787. "签到设置": "Set sign",
  101788. "管理权限": "Management permissions",
  101789. "管理的项目": "Managed Projects",
  101790. "类型": "Type",
  101791. "系统提示": "System prompt",
  101792. "系统皮肤": "Skin System",
  101793. "系统设置": "System Settings",
  101794. "紧凑冷光": "Compact cold light",
  101795. "紧凑天盘": "Compact disc days",
  101796. "紧凑经典": "Compact Classic",
  101797. "紧急不重要": "Emergency and unimportant",
  101798. "累计登陆次数": "Cumulative number of landing",
  101799. "级别": "Level",
  101800. "线框": "Wireframe",
  101801. "组员权限": "Crew permission",
  101802. "组长": "Leader",
  101803. "经典天盘": "Classic Tin plate",
  101804. "编辑": "Edit",
  101805. "缩放": "Scaling",
  101806. "网络繁忙,保存失败!": "The Internet is busy, save failed!",
  101807. "网络繁忙,请稍后再试!": "Internet is busy, please try again later!",
  101808. "群公告": "Group bulletin",
  101809. "群名": "Group name",
  101810. "群名称": "Group name",
  101811. "群头像": "Group picture",
  101812. "群聊": "Group chat",
  101813. "群聊名称": "Group chat name",
  101814. "职位/职称": "Position / Title",
  101815. "脑图": "Brain Mapping",
  101816. "脑图经典": "Figure classic brain",
  101817. "自动": "Automatic",
  101818. "自定义图片地址": "Custom Image URL",
  101819. "自定义地址": "Custom address",
  101820. "自己": "Own",
  101821. "至": "To",
  101822. "表情": "Emoji",
  101823. "表格": "Form",
  101824. "视频聊天": "Video chat",
  101825. "视频通话": "Video call",
  101826. "解散群聊": "Disbanded group chat",
  101827. "解锁文档": "Unlock",
  101828. "计划时间": "Schedule",
  101829. "计划时间:": "Planning time:",
  101830. "设为管理员": "Set as administrator",
  101831. "设置": "Settings",
  101832. "评论": "Comments",
  101833. "详细内容加载中.....": "Details Loading .....",
  101834. "语音聊天": "Voice chat",
  101835. "语音通话": "Voice call",
  101836. "请填写文档标题!": "Please fill out the document title!",
  101837. "请填写用户名!": "Please enter username!",
  101838. "请填写登录密码!": "Please fill in the login password!",
  101839. "请填写知识库名称!": "Please fill in the knowledge base name!",
  101840. "请填写确认密码!": "Please fill in the confirmation password!",
  101841. "请填写项目名称!": "Please fill in project name!",
  101842. "请稍候...": "Please wait...",
  101843. "请输入列表名称": "Please enter a list of names",
  101844. "请输入新密码!": "Please enter a new password!",
  101845. "请输入新的列表名称": "Enter a new list name",
  101846. "请输入新的文件名称": "Please enter a new file name",
  101847. "请输入新的项目名称": "Please enter a new project name",
  101848. "请输入旧密码!": "Please enter your old password!",
  101849. "请输入昵称/用户名搜索": "Search by nickname or username",
  101850. "请输入昵称!": "Please enter a nickname!",
  101851. "请输入流程名称,多个可用英文逗号分隔。": "Use [,] to add multiple.",
  101852. "请输入要发送的消息": "Please enter the message to be sent",
  101853. "请重新输入新密码!": "Please re-enter the new password!",
  101854. "负责人": "Principal",
  101855. "负责人:": "Principle:",
  101856. "负责的任务": "Responsible for tasks",
  101857. "账号": "Account",
  101858. "账号密码": "Account password",
  101859. "超出文件大小限制": "File size limit exceeded",
  101860. "超期": "Extended",
  101861. "超期任务": "Overdue tasks",
  101862. "软件开发": "Software Development",
  101863. "轻量级的团队在线协作": "Lightweight online teamwork ",
  101864. "输入任务,回车即可保存": "Enter the task, press Enter to save",
  101865. "输入关键词搜索": "Enter search keywords",
  101866. "输入评论,Enter发表评论,Shift+Enter换行": "Enter a comment, Enter comment, Shift + Enter Wrap",
  101867. "还原": "Restore",
  101868. "退出": "Drop out",
  101869. "退出全屏": "Exit Full Screen",
  101870. "退出登录": "Sign out",
  101871. "退出群聊": "Exit group chat",
  101872. "退出项目": "Quit Project",
  101873. "选中节点,按enter键添加同级节点,tab键添加子节点": "Select the node, press Enter to add siblings, and TAB to add children",
  101874. "选择关注人": "Select subscriber",
  101875. "选择日期范围": "Select a date range",
  101876. "选择负责人": "Select the person in charge",
  101877. "选择起止时间": "Select the starting and ending time",
  101878. "通话时长:%": "Length of call: %",
  101879. "邀请视频通话...": "Invite video calls...",
  101880. "邀请语音通话...": "Inviting voice calls...",
  101881. "酷团队协作工具就从这里开始": "Cool team collaboration tools from here",
  101882. "重命名": "Rename",
  101883. "重命名列表": "Rename list",
  101884. "重命名文件名": "Rename the file",
  101885. "重命名项目": "Rename the project",
  101886. "重置": "Reset",
  101887. "重要不紧急": "Important but not urgent",
  101888. "重要且紧急": "Important and urgent",
  101889. "锁定后其他会员将无法修改保存文档。": "After locking, other members will not be able to modify the saved document.",
  101890. "锁定文档": "Lock",
  101891. "错误详情": "Error Details",
  101892. "阅读权限": "Read permissions",
  101893. "阶段": "Stage",
  101894. "附件": "Attachments",
  101895. "隐藏": "Hidden",
  101896. "面板显示": "Panel displays",
  101897. "音视频通话": "Audio video call",
  101898. "项目": "Project",
  101899. "项目信息": "Project information",
  101900. "项目动态": "Project News",
  101901. "项目名称": "Project name",
  101902. "项目名称至少2个字!": "Project Name at least two words!",
  101903. "项目名称:": "Project name:",
  101904. "项目成员": "Project Members",
  101905. "项目成员均可查看任务详情。": "Project members can view task details.",
  101906. "项目权限": "Project Permissions",
  101907. "项目模板": "Project Templates",
  101908. "项目流程": "Project Flow",
  101909. "项目简介": "Project introduction",
  101910. "项目管理": "Project management",
  101911. "项目管理:自定义项目看板,可视化任务安排。": "Project Management: Project custom signage, visualization tasks scheduled.",
  101912. "项目统计": "Project Statistics",
  101913. "项目设置": "Project Settings",
  101914. "项目负责人": "Project leader",
  101915. "项目面板": "Project panel",
  101916. "项目面板是否显示已完成的任务": "Project panel for completed tasks",
  101917. "项目面板显示已完成的任务。": "The project panel displays the completed tasks.",
  101918. "项目面板隐藏已完成的任务。": "The project panel hides completed tasks.",
  101919. "首次登陆需修改密码": "Password must be changed for the first login",
  101920. "首页Logo": "Logo",
  101921. "鱼骨图": "Fishbone Diagram",
  101922. "默认节点": "The default node",
  101923. "个人总计": "Total personal",
  101924. "项目总任务数": "The total number of project tasks",
  101925. "项目已完成数": "Number of projects have been completed",
  101926. "项目未完成数": "The number of unfinished projects",
  101927. "发送日期": "Send date"
  101928. });
  101929. /***/ }),
  101930. /* 196 */
  101931. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  101932. "use strict";
  101933. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  101934. /* harmony default export */ __webpack_exports__["default"] = ({});
  101935. /***/ }),
  101936. /* 197 */
  101937. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  101938. "use strict";
  101939. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  101940. /* harmony default export */ __webpack_exports__["a"] = ({
  101941. install: function install(Vue) {
  101942. Vue.mixin({
  101943. data: function data() {
  101944. return {
  101945. mixinId: 0,
  101946. //用户信息
  101947. usrLogin: false,
  101948. usrInfo: {},
  101949. usrName: '',
  101950. //浏览器宽度≤768返回true
  101951. windowMax768: window.innerWidth <= 768
  101952. };
  101953. },
  101954. mounted: function mounted() {
  101955. var _this = this;
  101956. if (typeof window.__mixinId != "number") window.__mixinId = 0;
  101957. this.mixinId = window.__mixinId++;
  101958. //
  101959. this.usrLogin = $A.getToken() !== false;
  101960. this.usrInfo = $A.getUserInfo();
  101961. this.usrName = this.usrInfo.username || '';
  101962. $A.setOnUserInfoListener('mixins_' + this.mixinId, function (data, isLogin) {
  101963. _this.usrLogin = isLogin;
  101964. _this.usrInfo = data;
  101965. _this.usrName = _this.usrInfo.username || '';
  101966. });
  101967. //
  101968. window.addEventListener('resize', this.windowMax768Listener);
  101969. },
  101970. beforeDestroy: function beforeDestroy() {
  101971. $A.removeUserInfoListener('mixins_' + this.mixinId);
  101972. window.removeEventListener('resize', this.windowMax768Listener);
  101973. },
  101974. methods: {
  101975. isArray: function isArray(obj) {
  101976. return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) == "object" && Object.prototype.toString.call(obj).toLowerCase() == '[object array]' && typeof obj.length == "number";
  101977. },
  101978. isJson: function isJson(obj) {
  101979. return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && typeof obj.length == "undefined";
  101980. },
  101981. windowMax768Listener: function windowMax768Listener() {
  101982. this.windowMax768 = window.innerWidth <= 768;
  101983. }
  101984. }
  101985. });
  101986. }
  101987. });
  101988. /***/ }),
  101989. /* 198 */
  101990. /***/ (function(module, exports) {
  101991. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  101992. function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
  101993. function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }
  101994. /**
  101995. * 基础函数
  101996. */
  101997. (function (window, $, undefined) {
  101998. var _serverUrl = window.location.origin + '/';
  101999. /**
  102000. * =============================================================================
  102001. * ************************** 基础函数类 **************************
  102002. * =============================================================================
  102003. */
  102004. $.extend({
  102005. /**
  102006. * 身份识别码
  102007. * @param text
  102008. * @returns {*|string}
  102009. */
  102010. token: function token(text) {
  102011. var token = this.storage('token') || '';
  102012. if (typeof text === 'string') {
  102013. this.storage('token', text);
  102014. token = text;
  102015. }
  102016. return token;
  102017. },
  102018. /**
  102019. * 随机获取范围
  102020. * @param Min
  102021. * @param Max
  102022. * @returns {*}
  102023. */
  102024. randNum: function randNum(Min, Max) {
  102025. var Range = Max - Min;
  102026. var Rand = Math.random();
  102027. return Min + Math.round(Rand * Range); //四舍五入
  102028. },
  102029. /**
  102030. * 获取数组最后一个值
  102031. * @param array
  102032. * @returns {boolean}
  102033. */
  102034. last: function last(array) {
  102035. var str = false;
  102036. if ((typeof array === 'undefined' ? 'undefined' : _typeof(array)) === 'object' && array.length > 0) {
  102037. str = array[array.length - 1];
  102038. }
  102039. return str;
  102040. },
  102041. /**
  102042. * 字符串是否包含
  102043. * @param string
  102044. * @param find
  102045. * @param lower
  102046. * @returns {boolean}
  102047. */
  102048. strExists: function strExists(string, find) {
  102049. var lower = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  102050. string += "";
  102051. find += "";
  102052. if (lower !== true) {
  102053. string = string.toLowerCase();
  102054. find = find.toLowerCase();
  102055. }
  102056. return string.indexOf(find) !== -1;
  102057. },
  102058. /**
  102059. * 字符串是否左边包含
  102060. * @param string
  102061. * @param find
  102062. * @param lower
  102063. * @returns {boolean}
  102064. */
  102065. leftExists: function leftExists(string, find) {
  102066. var lower = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  102067. string += "";
  102068. find += "";
  102069. if (lower !== true) {
  102070. string = string.toLowerCase();
  102071. find = find.toLowerCase();
  102072. }
  102073. return string.substring(0, find.length) === find;
  102074. },
  102075. /**
  102076. * 删除左边字符串
  102077. * @param string
  102078. * @param find
  102079. * @param lower
  102080. * @returns {string}
  102081. */
  102082. leftDelete: function leftDelete(string, find) {
  102083. var lower = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  102084. string += "";
  102085. find += "";
  102086. if (this.leftExists(string, find, lower)) {
  102087. string = string.substring(find.length);
  102088. }
  102089. return string ? string : '';
  102090. },
  102091. /**
  102092. * 字符串是否右边包含
  102093. * @param string
  102094. * @param find
  102095. * @param lower
  102096. * @returns {boolean}
  102097. */
  102098. rightExists: function rightExists(string, find) {
  102099. var lower = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  102100. string += "";
  102101. find += "";
  102102. if (lower !== true) {
  102103. string = string.toLowerCase();
  102104. find = find.toLowerCase();
  102105. }
  102106. return string.substring(string.length - find.length) === find;
  102107. },
  102108. /**
  102109. * 取字符串中间
  102110. * @param string
  102111. * @param start
  102112. * @param end
  102113. * @returns {*}
  102114. */
  102115. getMiddle: function getMiddle(string, start, end) {
  102116. string = string.toString();
  102117. if (this.ishave(start) && this.strExists(string, start)) {
  102118. string = string.substring(string.indexOf(start) + start.length);
  102119. }
  102120. if (this.ishave(end) && this.strExists(string, end)) {
  102121. string = string.substring(0, string.indexOf(end));
  102122. }
  102123. return string;
  102124. },
  102125. /**
  102126. * 截取字符串
  102127. * @param string
  102128. * @param start
  102129. * @param end
  102130. * @returns {string}
  102131. */
  102132. subString: function subString(string, start, end) {
  102133. string += "";
  102134. if (!this.ishave(end)) {
  102135. end = string.length;
  102136. }
  102137. return string.substring(start, end);
  102138. },
  102139. /**
  102140. * 随机字符
  102141. * @param len
  102142. * @returns {string}
  102143. */
  102144. randomString: function randomString(len) {
  102145. len = len || 32;
  102146. var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678oOLl9gqVvUuI1';
  102147. var maxPos = $chars.length;
  102148. var pwd = '';
  102149. for (var i = 0; i < len; i++) {
  102150. pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
  102151. }
  102152. return pwd;
  102153. },
  102154. /**
  102155. * 判断是否有
  102156. * @param set
  102157. * @returns {boolean}
  102158. */
  102159. ishave: function ishave(set) {
  102160. return !!(set !== null && set !== "null" && set !== undefined && set !== "undefined" && set);
  102161. },
  102162. /**
  102163. * 相当于 intval
  102164. * @param str
  102165. * @param fixed
  102166. * @returns {number}
  102167. */
  102168. runNum: function runNum(str, fixed) {
  102169. var _s = Number(str);
  102170. if (_s + "" === "NaN") {
  102171. _s = 0;
  102172. }
  102173. if (/^[0-9]*[1-9][0-9]*$/.test(fixed)) {
  102174. _s = _s.toFixed(fixed);
  102175. var rs = _s.indexOf('.');
  102176. if (rs < 0) {
  102177. _s += ".";
  102178. for (var i = 0; i < fixed; i++) {
  102179. _s += "0";
  102180. }
  102181. }
  102182. }
  102183. return _s;
  102184. },
  102185. /**
  102186. * 服务器地址
  102187. * @param str
  102188. * @returns {string}
  102189. */
  102190. serverUrl: function serverUrl(str) {
  102191. if (str.substring(0, 2) === "//" || str.substring(0, 7) === "http://" || str.substring(0, 8) === "https://" || str.substring(0, 6) === "ftp://" || str.substring(0, 1) === "/") {
  102192. return str;
  102193. }
  102194. return _serverUrl + str;
  102195. },
  102196. /**
  102197. * 获取IP地址详情
  102198. * @param ip
  102199. * @param callback
  102200. */
  102201. getIpInfo: function getIpInfo(ip, callback) {
  102202. var _this = this;
  102203. if (!this.strExists(ip, ".")) {
  102204. return;
  102205. }
  102206. var keyName = '__ip' + ip.substring(0, 1) + '__';
  102207. var key = this.getMiddle(ip, '', '.');
  102208. var res = this.loadFromlLocal(key, ip, '', keyName);
  102209. if ((typeof res === 'undefined' ? 'undefined' : _typeof(res)) == "object") {
  102210. if (typeof callback == "function") {
  102211. callback(res);
  102212. }
  102213. return;
  102214. }
  102215. $A.ajax({
  102216. url: $A.serverUrl('api/system/get/ipinfo'),
  102217. data: { ip: ip },
  102218. timeout: 8000,
  102219. success: function success(res) {
  102220. _this.savaToLocal(key, ip, res, keyName);
  102221. if (typeof callback == "function") {
  102222. callback(res);
  102223. }
  102224. }
  102225. });
  102226. },
  102227. /**
  102228. * 新增&&获取缓存数据
  102229. * @param key
  102230. * @param value
  102231. * @returns {*}
  102232. */
  102233. storage: function storage(key, value) {
  102234. var keyName = 'app';
  102235. switch (window.location.pathname) {
  102236. case "/admin":
  102237. keyName += ":" + window.location.pathname.substr(1);
  102238. break;
  102239. }
  102240. if (typeof value === 'undefined') {
  102241. return this.loadFromlLocal('__::', key, '', '__' + keyName + '__');
  102242. } else {
  102243. this.savaToLocal('__::', key, value, '__' + keyName + '__');
  102244. }
  102245. },
  102246. /**
  102247. * 新增&&修改本地缓存
  102248. * @param {string} id 唯一id
  102249. * @param {string} key 标示
  102250. * @param value 新增&修改的值
  102251. * @param keyName 主键名称
  102252. */
  102253. savaToLocal: function savaToLocal(id, key, value, keyName) {
  102254. try {
  102255. if (typeof keyName === 'undefined') keyName = '__seller__';
  102256. var seller = window.localStorage[keyName];
  102257. if (!seller) {
  102258. seller = {};
  102259. seller[id] = {};
  102260. } else {
  102261. seller = JSON.parse(seller);
  102262. if (!seller[id]) {
  102263. seller[id] = {};
  102264. }
  102265. }
  102266. seller[id][key] = value;
  102267. window.localStorage[keyName] = JSON.stringify(seller);
  102268. } catch (e) {}
  102269. },
  102270. /**
  102271. * 查询本地缓存
  102272. * @param {string} id 唯一id
  102273. * @param {string} key 标示
  102274. * @param def 如果查询不到显示的值
  102275. * @param keyName 主键名称
  102276. */
  102277. loadFromlLocal: function loadFromlLocal(id, key, def, keyName) {
  102278. if (typeof keyName === 'undefined') keyName = '__seller__';
  102279. var seller = window.localStorage[keyName];
  102280. if (!seller) {
  102281. return def;
  102282. }
  102283. seller = JSON.parse(seller)[id];
  102284. if (!seller) {
  102285. return def;
  102286. }
  102287. var ret = seller[key];
  102288. return ret || def;
  102289. },
  102290. /**
  102291. * 补零
  102292. * @param str
  102293. * @param length
  102294. * @param after
  102295. * @returns {*}
  102296. */
  102297. zeroFill: function zeroFill(str, length, after) {
  102298. str += "";
  102299. if (str.length >= length) {
  102300. return str;
  102301. }
  102302. var _str = '',
  102303. _ret = '';
  102304. for (var i = 0; i < length; i++) {
  102305. _str += '0';
  102306. }
  102307. if (after || typeof after === 'undefined') {
  102308. _ret = (_str + "" + str).substr(length * -1);
  102309. } else {
  102310. _ret = (str + "" + _str).substr(0, length);
  102311. }
  102312. return _ret;
  102313. },
  102314. /**
  102315. * 时间戳转时间格式
  102316. * @param format
  102317. * @param v
  102318. * @returns {string}
  102319. */
  102320. formatDate: function formatDate(format, v) {
  102321. if (format === '') {
  102322. format = 'Y-m-d H:i:s';
  102323. }
  102324. var dateObj = void 0;
  102325. if (v instanceof Date) {
  102326. dateObj = v;
  102327. } else {
  102328. if (typeof v === 'undefined') {
  102329. v = new Date().getTime();
  102330. } else if (/^(-)?\d{1,10}$/.test(v)) {
  102331. v = v * 1000;
  102332. } else if (/^(-)?\d{1,13}$/.test(v)) {
  102333. v = v * 1000;
  102334. } else if (/^(-)?\d{1,14}$/.test(v)) {
  102335. v = v * 100;
  102336. } else if (/^(-)?\d{1,15}$/.test(v)) {
  102337. v = v * 10;
  102338. } else if (/^(-)?\d{1,16}$/.test(v)) {
  102339. v = v * 1;
  102340. } else {
  102341. return v;
  102342. }
  102343. dateObj = new Date(v);
  102344. }
  102345. //
  102346. format = format.replace(/Y/g, dateObj.getFullYear());
  102347. format = format.replace(/m/g, this.zeroFill(dateObj.getMonth() + 1, 2));
  102348. format = format.replace(/d/g, this.zeroFill(dateObj.getDate(), 2));
  102349. format = format.replace(/H/g, this.zeroFill(dateObj.getHours(), 2));
  102350. format = format.replace(/i/g, this.zeroFill(dateObj.getMinutes(), 2));
  102351. format = format.replace(/s/g, this.zeroFill(dateObj.getSeconds(), 2));
  102352. return format;
  102353. },
  102354. /**
  102355. * 租用时间差(不够1个小时算一个小时)
  102356. * @param s
  102357. * @param e
  102358. * @returns {*}
  102359. */
  102360. timeDiff: function timeDiff(s, e) {
  102361. if (typeof e === 'undefined') {
  102362. e = Math.round(new Date().getTime() / 1000);
  102363. }
  102364. var d = e - s;
  102365. if (d > 86400) {
  102366. var day = Math.floor(d / 86400);
  102367. var hour = Math.ceil((d - day * 86400) / 3600);
  102368. if (hour > 0) {
  102369. return day + '天' + hour + '小时';
  102370. } else {
  102371. return day + '天';
  102372. }
  102373. } else if (d > 3600) {
  102374. return Math.ceil(d / 3600) + '小时';
  102375. } else if (d > 60) {
  102376. return Math.ceil(d / 60) + '分钟';
  102377. } else if (d > 10) {
  102378. return d + '秒';
  102379. } else {
  102380. return '刚刚';
  102381. }
  102382. },
  102383. /**
  102384. * 检测手机号码格式
  102385. * @param str
  102386. * @returns {boolean}
  102387. */
  102388. isMobile: function isMobile(str) {
  102389. return (/^1([3456789])\d{9}$/.test(str)
  102390. );
  102391. },
  102392. /**
  102393. * 是否手机号码
  102394. * @param phone
  102395. * @returns {boolean}
  102396. */
  102397. isPhone: function isPhone(phone) {
  102398. return this.isMobile(phone);
  102399. },
  102400. /**
  102401. * 根据两点间的经纬度计算距离
  102402. * @param lng1
  102403. * @param lat1
  102404. * @param lng2
  102405. * @param lat2
  102406. * @returns {string|*}
  102407. */
  102408. getDistance: function getDistance(lng1, lat1, lng2, lat2) {
  102409. var DEF_PI = 3.14159265359; // PI
  102410. var DEF_2PI = 6.28318530712; // 2*PI
  102411. var DEF_PI180 = 0.01745329252; // PI/180.0
  102412. var DEF_R = 6370693.5; // radius of earth
  102413. //
  102414. var ew1 = void 0,
  102415. ns1 = void 0,
  102416. ew2 = void 0,
  102417. ns2 = void 0;
  102418. var dx = void 0,
  102419. dy = void 0,
  102420. dew = void 0;
  102421. var distance = void 0;
  102422. // 角度转换为弧度
  102423. ew1 = lng1 * DEF_PI180;
  102424. ns1 = lat1 * DEF_PI180;
  102425. ew2 = lng2 * DEF_PI180;
  102426. ns2 = lat2 * DEF_PI180;
  102427. // 经度差
  102428. dew = ew1 - ew2;
  102429. // 若跨东经和西经180 度,进行调整
  102430. if (dew > DEF_PI) dew = DEF_2PI - dew;else if (dew < -DEF_PI) dew = DEF_2PI + dew;
  102431. dx = DEF_R * Math.cos(ns1) * dew; // 东西方向长度(在纬度圈上的投影长度)
  102432. dy = DEF_R * (ns1 - ns2); // 南北方向长度(在经度圈上的投影长度)
  102433. // 勾股定理求斜边长
  102434. distance = Math.sqrt(dx * dx + dy * dy).toFixed(0);
  102435. return distance;
  102436. },
  102437. /**
  102438. * 设置网页标题
  102439. * @param title
  102440. */
  102441. setTile: function setTile(title) {
  102442. document.title = title;
  102443. var mobile = navigator.userAgent.toLowerCase();
  102444. if (/iphone|ipad|ipod/.test(mobile)) {
  102445. var iframe = document.createElement('iframe');
  102446. iframe.style.display = 'none';
  102447. iframe.setAttribute('src', '/favicon.ico');
  102448. var iframeCallback = function iframeCallback() {
  102449. setTimeout(function () {
  102450. iframe.removeEventListener('load', iframeCallback);
  102451. document.body.removeChild(iframe);
  102452. }, 0);
  102453. };
  102454. iframe.addEventListener('load', iframeCallback);
  102455. document.body.appendChild(iframe);
  102456. }
  102457. },
  102458. /**
  102459. * 克隆对象
  102460. * @param myObj
  102461. * @returns {*}
  102462. */
  102463. cloneData: function cloneData(myObj) {
  102464. if ((typeof myObj === 'undefined' ? 'undefined' : _typeof(myObj)) !== 'object') return myObj;
  102465. if (myObj === null) return myObj;
  102466. //
  102467. if (typeof myObj.length === 'number') {
  102468. var _myObj = _toArray(myObj),
  102469. myNewObj = _myObj.slice(0);
  102470. return myNewObj;
  102471. } else {
  102472. var _myNewObj = _objectWithoutProperties(myObj, []);
  102473. return _myNewObj;
  102474. }
  102475. },
  102476. /**
  102477. * 将一个 JSON 字符串转换为对象(已try)
  102478. * @param str
  102479. * @param defaultVal
  102480. * @returns {*}
  102481. */
  102482. jsonParse: function jsonParse(str, defaultVal) {
  102483. if (str === null) {
  102484. return defaultVal ? defaultVal : {};
  102485. }
  102486. if ((typeof str === 'undefined' ? 'undefined' : _typeof(str)) === "object") {
  102487. return str;
  102488. }
  102489. try {
  102490. return JSON.parse(str);
  102491. } catch (e) {
  102492. return defaultVal ? defaultVal : {};
  102493. }
  102494. },
  102495. /**
  102496. * 将 JavaScript 值转换为 JSON 字符串(已try)
  102497. * @param json
  102498. * @param defaultVal
  102499. * @returns {string}
  102500. */
  102501. jsonStringify: function jsonStringify(json, defaultVal) {
  102502. if ((typeof json === 'undefined' ? 'undefined' : _typeof(json)) !== 'object') {
  102503. return json;
  102504. }
  102505. try {
  102506. return JSON.stringify(json);
  102507. } catch (e) {
  102508. return defaultVal ? defaultVal : "";
  102509. }
  102510. },
  102511. /**
  102512. * 监听对象尺寸发生改变
  102513. * @param obj
  102514. * @param callback
  102515. */
  102516. resize: function resize(obj, callback) {
  102517. var myObj = $A(obj);
  102518. if (myObj.length === 0) return;
  102519. var height = parseInt(myObj.outerHeight()),
  102520. width = parseInt(myObj.outerWidth());
  102521. var inter = setInterval(function () {
  102522. if (myObj.length === 0) clearInterval(inter);
  102523. var tmpHeight = parseInt(myObj.outerHeight()),
  102524. tmpWidth = parseInt(myObj.outerWidth());
  102525. if (height !== tmpHeight || width !== tmpWidth) {
  102526. height = tmpHeight;
  102527. width = tmpWidth;
  102528. console.log(width, height);
  102529. if (typeof callback === 'function') callback();
  102530. }
  102531. }, 250);
  102532. },
  102533. /**
  102534. * 是否IOS
  102535. * @returns {boolean|string}
  102536. */
  102537. isIos: function isIos() {
  102538. var ua = typeof window !== 'undefined' && window.navigator.userAgent.toLowerCase();
  102539. return ua && /iphone|ipad|ipod|ios/.test(ua);
  102540. },
  102541. /**
  102542. * 是否安卓
  102543. * @returns {boolean|string}
  102544. */
  102545. isAndroid: function isAndroid() {
  102546. var ua = typeof window !== 'undefined' && window.navigator.userAgent.toLowerCase();
  102547. return ua && ua.indexOf('android') > 0;
  102548. },
  102549. /**
  102550. * 是否微信
  102551. * @returns {boolean}
  102552. */
  102553. isWeixin: function isWeixin() {
  102554. var ua = typeof window !== 'undefined' && window.navigator.userAgent.toLowerCase();
  102555. return ua.match(/MicroMessenger/i) + '' === 'micromessenger';
  102556. },
  102557. /**
  102558. * 获取对象
  102559. * @param obj
  102560. * @param keys
  102561. * @returns {string|*}
  102562. */
  102563. getObject: function getObject(obj, keys) {
  102564. var object = obj;
  102565. if (this.count(obj) === 0 || this.count(keys) === 0) {
  102566. return "";
  102567. }
  102568. var arr = keys.replace(/,/g, "|").replace(/\./g, "|").split("|");
  102569. $A.each(arr, function (index, key) {
  102570. object = typeof object[key] === "undefined" ? "" : object[key];
  102571. });
  102572. return object;
  102573. },
  102574. /**
  102575. * 统计数组或对象长度
  102576. * @param obj
  102577. * @returns {number}
  102578. */
  102579. count: function count(obj) {
  102580. try {
  102581. if (typeof obj === "undefined") {
  102582. return 0;
  102583. }
  102584. if (typeof obj === "number") {
  102585. obj += "";
  102586. }
  102587. if (typeof obj.length === 'number') {
  102588. return obj.length;
  102589. } else {
  102590. var i = 0,
  102591. key = void 0;
  102592. for (key in obj) {
  102593. i++;
  102594. }
  102595. return i;
  102596. }
  102597. } catch (e) {
  102598. return 0;
  102599. }
  102600. },
  102601. /**
  102602. * 将数组或对象内容部分拼成字符串
  102603. * @param obj
  102604. * @returns {string}
  102605. */
  102606. objImplode: function objImplode(obj) {
  102607. var _this2 = this;
  102608. if (obj === null) {
  102609. return "";
  102610. }
  102611. var str = "";
  102612. $A.each(obj, function (key, val) {
  102613. if (val !== null) {
  102614. if ((typeof val === 'undefined' ? 'undefined' : _typeof(val)) === "object" && _this2.count(val) > 0) {
  102615. str += _this2.objImplode(val);
  102616. } else {
  102617. str += String(val);
  102618. }
  102619. }
  102620. });
  102621. return str.replace(/\s/g, "").replace(/undefined/g, "");
  102622. },
  102623. /**
  102624. * 指定键获取url参数
  102625. * @param key
  102626. * @returns {*}
  102627. */
  102628. urlParameter: function urlParameter(key) {
  102629. var params = this.urlParameterAll();
  102630. return typeof key === "undefined" ? params : params[key];
  102631. },
  102632. urlParameterAll: function urlParameterAll() {
  102633. var search = window.location.search || "";
  102634. var arr = [];
  102635. if (this.strExists(search, "?")) {
  102636. arr = this.getMiddle(search, "?").split("&");
  102637. }
  102638. var params = {};
  102639. for (var i = 0; i < arr.length; i++) {
  102640. var data = arr[i].split("=");
  102641. if (data.length === 2) {
  102642. params[data[0]] = data[1];
  102643. }
  102644. }
  102645. return params;
  102646. },
  102647. /**
  102648. * 删除地址中的参数
  102649. * @param url
  102650. * @param parameter
  102651. * @returns {string|*}
  102652. */
  102653. removeURLParameter: function removeURLParameter(url, parameter) {
  102654. if (parameter instanceof Array) {
  102655. parameter.forEach(function (key) {
  102656. url = $A.removeURLParameter(url, key);
  102657. });
  102658. return url;
  102659. }
  102660. var urlparts = url.split('?');
  102661. if (urlparts.length >= 2) {
  102662. //参数名前缀
  102663. var prefix = encodeURIComponent(parameter) + '=';
  102664. var pars = urlparts[1].split(/[&;]/g);
  102665. //循环查找匹配参数
  102666. for (var i = pars.length; i-- > 0;) {
  102667. if (pars[i].lastIndexOf(prefix, 0) !== -1) {
  102668. //存在则删除
  102669. pars.splice(i, 1);
  102670. }
  102671. }
  102672. return urlparts[0] + (pars.length > 0 ? '?' + pars.join('&') : '');
  102673. }
  102674. return url;
  102675. },
  102676. /**
  102677. * 连接加上参数
  102678. * @param url
  102679. * @param params
  102680. * @returns {*}
  102681. */
  102682. urlAddParams: function urlAddParams(url, params) {
  102683. if ((typeof params === 'undefined' ? 'undefined' : _typeof(params)) === "object" && params !== null) {
  102684. url += "";
  102685. url += url.indexOf("?") === -1 ? '?' : '';
  102686. for (var key in params) {
  102687. if (!params.hasOwnProperty(key)) {
  102688. continue;
  102689. }
  102690. url += '&' + key + '=' + params[key];
  102691. }
  102692. }
  102693. return url.replace("?&", "?");
  102694. },
  102695. /**
  102696. * 链接字符串
  102697. * @param value 第一个参数为连接符
  102698. * @returns {string}
  102699. */
  102700. stringConnect: function stringConnect() {
  102701. var s = null;
  102702. var text = "";
  102703. for (var _len = arguments.length, value = Array(_len), _key = 0; _key < _len; _key++) {
  102704. value[_key] = arguments[_key];
  102705. }
  102706. value.forEach(function (val) {
  102707. if (s === null) {
  102708. s = val;
  102709. } else if (val) {
  102710. if (val && text) text += s;
  102711. text += val;
  102712. }
  102713. });
  102714. return text;
  102715. },
  102716. /**
  102717. * 判断两个对象是否相等
  102718. * @param x
  102719. * @param y
  102720. * @returns {boolean}
  102721. */
  102722. objEquals: function objEquals(x, y) {
  102723. var f1 = x instanceof Object;
  102724. var f2 = y instanceof Object;
  102725. if (!f1 || !f2) {
  102726. return x === y;
  102727. }
  102728. if (Object.keys(x).length !== Object.keys(y).length) {
  102729. return false;
  102730. }
  102731. for (var p in x) {
  102732. if (x.hasOwnProperty(p)) {
  102733. var a = x[p] instanceof Object;
  102734. var b = y[p] instanceof Object;
  102735. if (a && b) {
  102736. if (!this.objEquals(x[p], y[p])) {
  102737. return false;
  102738. }
  102739. } else if (x[p] != y[p]) {
  102740. return false;
  102741. }
  102742. }
  102743. }
  102744. return true;
  102745. },
  102746. /**
  102747. * 输入框内插入文本
  102748. * @param object
  102749. * @param content
  102750. */
  102751. insert2Input: function insert2Input(object, content) {
  102752. if (object === null || (typeof object === 'undefined' ? 'undefined' : _typeof(object)) !== "object") return;
  102753. if (typeof object.length === 'number' && object.length > 0) object = object[0];
  102754. var ele = _typeof(object.$el) === "object" ? $A(object.$el) : $A(object);
  102755. if (ele.length === 0) return;
  102756. var eleDom = ele[0];
  102757. if (eleDom.tagName != "INPUT" && eleDom.tagName != "TEXTAREA") {
  102758. if (ele.find("input").length === 0) {
  102759. ele = ele.find("textarea");
  102760. } else {
  102761. ele = ele.find("input");
  102762. }
  102763. }
  102764. if (ele.length === 0) return;
  102765. eleDom = ele[0];
  102766. if (eleDom.tagName != "INPUT" && eleDom.tagName != "TEXTAREA") return;
  102767. var text = ele.val();
  102768. var _eleDom = eleDom,
  102769. selectionStart = _eleDom.selectionStart,
  102770. selectionEnd = _eleDom.selectionEnd;
  102771. ele.val('' + text.substring(0, selectionStart) + content + text.substring(selectionEnd, text.length));
  102772. eleDom.dispatchEvent(new Event('input'));
  102773. setTimeout(function () {
  102774. if (eleDom.setSelectionRange) {
  102775. var pos = text.substring(0, selectionStart).length + content.length;
  102776. eleDom.focus();
  102777. eleDom.setSelectionRange(pos, pos);
  102778. }
  102779. }, 10);
  102780. },
  102781. /**
  102782. * iOS上虚拟键盘引起的触控错位
  102783. */
  102784. iOSKeyboardFixer: function iOSKeyboardFixer() {
  102785. if (!this.isIos()) {
  102786. return;
  102787. }
  102788. document.body.scrollTop = document.body.scrollTop + 1;
  102789. document.body.scrollTop = document.body.scrollTop - 1;
  102790. },
  102791. autoDevwid: function autoDevwid(width) {
  102792. var _width = width || 640;
  102793. new function () {
  102794. var _self = this;
  102795. _self.width = _width; //设置默认最大宽度
  102796. _self.fontSize = 30; //默认字体大小
  102797. _self.widthProportion = function () {
  102798. var p = (document.body && document.body.clientWidth || document.getElementsByTagName("html")[0].offsetWidth) / _self.width;
  102799. return p > 1 ? 1 : p < 0.38 ? 0.38 : p;
  102800. };
  102801. _self.changePage = function () {
  102802. document.getElementsByTagName("html")[0].setAttribute("style", "font-size:" + _self.widthProportion() * _self.fontSize + "px !important");
  102803. };
  102804. _self.changePage();
  102805. window.addEventListener('resize', function () {
  102806. _self.changePage();
  102807. }, false);
  102808. }();
  102809. //
  102810. var scale = $A(window).width() / _width;
  102811. $A(".__auto").each(function () {
  102812. if ($A(this).attr("data-original") !== "1") {
  102813. $A(this).attr("data-original-top", parseInt($A(this).css("top")));
  102814. $A(this).attr("data-original-right", parseInt($A(this).css("right")));
  102815. $A(this).attr("data-original-bottom", parseInt($A(this).css("bottom")));
  102816. $A(this).attr("data-original-left", parseInt($A(this).css("left")));
  102817. $A(this).attr("data-original-width", parseInt($A(this).css("width")));
  102818. $A(this).attr("data-original-height", parseInt($A(this).css("height")));
  102819. $A(this).attr("data-original-line-height", parseInt($A(this).css("line-height")));
  102820. $A(this).attr("data-original", "1");
  102821. }
  102822. var _t = parseInt($A(this).attr("data-original-top"));
  102823. var _r = parseInt($A(this).attr("data-original-right"));
  102824. var _b = parseInt($A(this).attr("data-original-bottom"));
  102825. var _l = parseInt($A(this).attr("data-original-left"));
  102826. var _w = parseInt($A(this).attr("data-original-width"));
  102827. var _h = parseInt($A(this).attr("data-original-height"));
  102828. var _lh = parseInt($A(this).attr("data-original-line-height"));
  102829. //
  102830. var _css = {};
  102831. if (_t > 0) _css['top'] = _t * scale;
  102832. if (_r > 0) _css['right'] = _r * scale;
  102833. if (_b > 0) _css['bottom'] = _b * scale;
  102834. if (_l > 0) _css['left'] = _l * scale;
  102835. if (_w > 0) _css['width'] = _w * scale;
  102836. if (_h > 0) _css['height'] = _h * scale;
  102837. if (_lh > 0) _css['line-height'] = _lh * scale + 'px';
  102838. $A(this).css(_css);
  102839. });
  102840. return scale;
  102841. }
  102842. });
  102843. /**
  102844. * =============================================================================
  102845. * **************************** ihttp ****************************
  102846. * =============================================================================
  102847. */
  102848. $.extend({
  102849. serializeObject: function serializeObject(obj, parents) {
  102850. if (typeof obj === 'string') return obj;
  102851. var resultArray = [];
  102852. var separator = '&';
  102853. parents = parents || [];
  102854. var newParents = void 0;
  102855. function var_name(name) {
  102856. if (parents.length > 0) {
  102857. var _parents = '';
  102858. for (var j = 0; j < parents.length; j++) {
  102859. if (j === 0) _parents += parents[j];else _parents += '[' + encodeURIComponent(parents[j]) + ']';
  102860. }
  102861. return _parents + '[' + encodeURIComponent(name) + ']';
  102862. } else {
  102863. return encodeURIComponent(name);
  102864. }
  102865. }
  102866. function var_value(value) {
  102867. return encodeURIComponent(value);
  102868. }
  102869. for (var prop in obj) {
  102870. if (obj.hasOwnProperty(prop)) {
  102871. var toPush = void 0;
  102872. if (Array.isArray(obj[prop])) {
  102873. toPush = [];
  102874. for (var i = 0; i < obj[prop].length; i++) {
  102875. if (!Array.isArray(obj[prop][i]) && _typeof(obj[prop][i]) === 'object') {
  102876. newParents = parents.slice();
  102877. newParents.push(prop);
  102878. newParents.push(i + '');
  102879. toPush.push($.serializeObject(obj[prop][i], newParents));
  102880. } else {
  102881. toPush.push(var_name(prop) + '[]=' + var_value(obj[prop][i]));
  102882. }
  102883. }
  102884. if (toPush.length > 0) resultArray.push(toPush.join(separator));
  102885. } else if (obj[prop] === null) {
  102886. resultArray.push(var_name(prop) + '=');
  102887. } else if (_typeof(obj[prop]) === 'object') {
  102888. // Object, convert to named array
  102889. newParents = parents.slice();
  102890. newParents.push(prop);
  102891. toPush = $.serializeObject(obj[prop], newParents);
  102892. if (toPush !== '') resultArray.push(toPush);
  102893. } else if (typeof obj[prop] !== 'undefined' && obj[prop] !== '') {
  102894. // Should be string or plain value
  102895. resultArray.push(var_name(prop) + '=' + var_value(obj[prop]));
  102896. } else if (obj[prop] === '') resultArray.push(var_name(prop));
  102897. }
  102898. }
  102899. return resultArray.join(separator);
  102900. },
  102901. // Global Ajax Setup
  102902. globalAjaxOptions: {},
  102903. ajaxSetup: function ajaxSetup(options) {
  102904. if (options.type) options.method = options.type;
  102905. $.each(options, function (optionName, optionValue) {
  102906. $.globalAjaxOptions[optionName] = optionValue;
  102907. });
  102908. },
  102909. // Ajax
  102910. _jsonpRequests: 0,
  102911. ihttp: function ihttp(options) {
  102912. var defaults = {
  102913. method: 'GET',
  102914. data: false,
  102915. async: true,
  102916. cache: true,
  102917. user: '',
  102918. password: '',
  102919. headers: {},
  102920. xhrFields: {},
  102921. statusCode: {},
  102922. processData: true,
  102923. dataType: 'text',
  102924. contentType: 'application/x-www-form-urlencoded',
  102925. timeout: 0
  102926. };
  102927. var callbacks = ['beforeSend', 'error', 'complete', 'success', 'statusCode'];
  102928. //For jQuery guys
  102929. if (options.type) options.method = options.type;
  102930. // Merge global and defaults
  102931. $.each($.globalAjaxOptions, function (globalOptionName, globalOptionValue) {
  102932. if (callbacks.indexOf(globalOptionName) < 0) defaults[globalOptionName] = globalOptionValue;
  102933. });
  102934. // Function to run XHR callbacks and events
  102935. function fireAjaxCallback(eventName, eventData, callbackName) {
  102936. var a = arguments;
  102937. if (eventName) $(document).trigger(eventName, eventData);
  102938. if (callbackName) {
  102939. // Global callback
  102940. if (callbackName in $.globalAjaxOptions) $.globalAjaxOptions[callbackName](a[3], a[4], a[5], a[6]);
  102941. // Options callback
  102942. if (options[callbackName]) options[callbackName](a[3], a[4], a[5], a[6]);
  102943. }
  102944. }
  102945. // Merge options and defaults
  102946. $.each(defaults, function (prop, defaultValue) {
  102947. if (!(prop in options)) options[prop] = defaultValue;
  102948. });
  102949. // Default URL
  102950. if (!options.url) {
  102951. options.url = window.location.toString();
  102952. }
  102953. // Parameters Prefix
  102954. var paramsPrefix = options.url.indexOf('?') >= 0 ? '&' : '?';
  102955. // UC method
  102956. var _method = options.method.toUpperCase();
  102957. // Data to modify GET URL
  102958. if ((_method === 'GET' || _method === 'HEAD' || _method === 'OPTIONS' || _method === 'DELETE') && options.data) {
  102959. var stringData = void 0;
  102960. if (typeof options.data === 'string') {
  102961. // Should be key=value string
  102962. if (options.data.indexOf('?') >= 0) stringData = options.data.split('?')[1];else stringData = options.data;
  102963. } else {
  102964. // Should be key=value object
  102965. stringData = $.serializeObject(options.data);
  102966. }
  102967. if (stringData.length) {
  102968. options.url += paramsPrefix + stringData;
  102969. if (paramsPrefix === '?') paramsPrefix = '&';
  102970. }
  102971. }
  102972. // JSONP
  102973. if (options.dataType === 'json' && options.url.indexOf('callback=') >= 0) {
  102974. var callbackName = 'f7jsonp_' + Date.now() + $._jsonpRequests++;
  102975. var abortTimeout = void 0;
  102976. var callbackSplit = options.url.split('callback=');
  102977. var requestUrl = callbackSplit[0] + 'callback=' + callbackName;
  102978. if (callbackSplit[1].indexOf('&') >= 0) {
  102979. var addVars = callbackSplit[1].split('&').filter(function (el) {
  102980. return el.indexOf('=') > 0;
  102981. }).join('&');
  102982. if (addVars.length > 0) requestUrl += '&' + addVars;
  102983. }
  102984. // Create script
  102985. var script = document.createElement('script');
  102986. script.type = 'text/javascript';
  102987. script.onerror = function () {
  102988. clearTimeout(abortTimeout);
  102989. fireAjaxCallback(undefined, undefined, 'error', null, 'scripterror');
  102990. fireAjaxCallback('ajaxComplete ajax:complete', { scripterror: true }, 'complete', null, 'scripterror');
  102991. };
  102992. script.src = requestUrl;
  102993. // Handler
  102994. window[callbackName] = function (data) {
  102995. clearTimeout(abortTimeout);
  102996. fireAjaxCallback(undefined, undefined, 'success', data);
  102997. script.parentNode.removeChild(script);
  102998. script = null;
  102999. delete window[callbackName];
  103000. };
  103001. document.querySelector('head').appendChild(script);
  103002. if (options.timeout > 0) {
  103003. abortTimeout = setTimeout(function () {
  103004. script.parentNode.removeChild(script);
  103005. script = null;
  103006. fireAjaxCallback(undefined, undefined, 'error', null, 'timeout');
  103007. }, options.timeout);
  103008. }
  103009. return;
  103010. }
  103011. // Cache for GET/HEAD requests
  103012. if (_method === 'GET' || _method === 'HEAD' || _method === 'OPTIONS' || _method === 'DELETE') {
  103013. if (options.cache === false) {
  103014. options.url += paramsPrefix + '_nocache=' + Date.now();
  103015. }
  103016. }
  103017. // Create XHR
  103018. var xhr = new XMLHttpRequest();
  103019. // Save Request URL
  103020. xhr.requestUrl = options.url;
  103021. xhr.requestParameters = options;
  103022. // Open XHR
  103023. xhr.open(_method, options.url, options.async, options.user, options.password);
  103024. // Create POST Data
  103025. var postData = null;
  103026. if ((_method === 'POST' || _method === 'PUT' || _method === 'PATCH') && options.data) {
  103027. if (options.processData) {
  103028. var postDataInstances = [ArrayBuffer, Blob, Document, FormData];
  103029. // Post Data
  103030. if (postDataInstances.indexOf(options.data.constructor) >= 0) {
  103031. postData = options.data;
  103032. } else {
  103033. // POST Headers
  103034. var boundary = '---------------------------' + Date.now().toString(16);
  103035. if (options.contentType === 'multipart\/form-data') {
  103036. xhr.setRequestHeader('Content-Type', 'multipart\/form-data; boundary=' + boundary);
  103037. } else {
  103038. xhr.setRequestHeader('Content-Type', options.contentType);
  103039. }
  103040. postData = '';
  103041. var _data = $.serializeObject(options.data);
  103042. if (options.contentType === 'multipart\/form-data') {
  103043. boundary = '---------------------------' + Date.now().toString(16);
  103044. _data = _data.split('&');
  103045. var _newData = [];
  103046. for (var i = 0; i < _data.length; i++) {
  103047. _newData.push('Content-Disposition: form-data; name="' + _data[i].split('=')[0] + '"\r\n\r\n' + _data[i].split('=')[1] + '\r\n');
  103048. }
  103049. postData = '--' + boundary + '\r\n' + _newData.join('--' + boundary + '\r\n') + '--' + boundary + '--\r\n';
  103050. } else {
  103051. postData = _data;
  103052. }
  103053. }
  103054. } else {
  103055. postData = options.data;
  103056. }
  103057. }
  103058. // Additional headers
  103059. if (options.headers) {
  103060. $.each(options.headers, function (headerName, headerCallback) {
  103061. xhr.setRequestHeader(headerName, headerCallback);
  103062. });
  103063. }
  103064. // Check for crossDomain
  103065. if (typeof options.crossDomain === 'undefined') {
  103066. options.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(options.url) && RegExp.$2 !== window.location.host;
  103067. }
  103068. if (!options.crossDomain) {
  103069. xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
  103070. }
  103071. if (options.xhrFields) {
  103072. $.each(options.xhrFields, function (fieldName, fieldValue) {
  103073. xhr[fieldName] = fieldValue;
  103074. });
  103075. }
  103076. var xhrTimeout = void 0;
  103077. // Handle XHR
  103078. xhr.onload = function (e) {
  103079. if (xhrTimeout) clearTimeout(xhrTimeout);
  103080. if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 0) {
  103081. var responseData = void 0;
  103082. if (options.dataType === 'json') {
  103083. try {
  103084. responseData = JSON.parse(xhr.responseText);
  103085. fireAjaxCallback('ajaxSuccess ajax:success', { xhr: xhr }, 'success', responseData, xhr.status, xhr);
  103086. } catch (err) {
  103087. fireAjaxCallback('ajaxError ajax:error', {
  103088. xhr: xhr,
  103089. parseerror: true
  103090. }, 'error', xhr, 'parseerror');
  103091. }
  103092. } else {
  103093. responseData = xhr.responseType === 'text' || xhr.responseType === '' ? xhr.responseText : xhr.response;
  103094. fireAjaxCallback('ajaxSuccess ajax:success', { xhr: xhr }, 'success', responseData, xhr.status, xhr);
  103095. }
  103096. } else {
  103097. fireAjaxCallback('ajaxError ajax:error', { xhr: xhr }, 'error', xhr, xhr.status);
  103098. }
  103099. if (options.statusCode) {
  103100. if ($.globalAjaxOptions.statusCode && $.globalAjaxOptions.statusCode[xhr.status]) $.globalAjaxOptions.statusCode[xhr.status](xhr);
  103101. if (options.statusCode[xhr.status]) options.statusCode[xhr.status](xhr);
  103102. }
  103103. fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr }, 'complete', xhr, xhr.status);
  103104. };
  103105. xhr.onerror = function (e) {
  103106. if (xhrTimeout) clearTimeout(xhrTimeout);
  103107. fireAjaxCallback('ajaxError ajax:error', { xhr: xhr }, 'error', xhr, xhr.status);
  103108. fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr, error: true }, 'complete', xhr, 'error');
  103109. };
  103110. // Ajax start callback
  103111. fireAjaxCallback('ajaxStart ajax:start', { xhr: xhr }, 'start', xhr);
  103112. fireAjaxCallback(undefined, undefined, 'beforeSend', xhr);
  103113. // Timeout
  103114. if (options.timeout > 0) {
  103115. xhr.onabort = function () {
  103116. if (xhrTimeout) clearTimeout(xhrTimeout);
  103117. };
  103118. xhrTimeout = setTimeout(function () {
  103119. xhr.abort();
  103120. fireAjaxCallback('ajaxError ajax:error', { xhr: xhr, timeout: true }, 'error', xhr, 'timeout');
  103121. fireAjaxCallback('ajaxComplete ajax:complete', {
  103122. xhr: xhr,
  103123. timeout: true
  103124. }, 'complete', xhr, 'timeout');
  103125. }, options.timeout);
  103126. }
  103127. // Send XHR
  103128. xhr.send(postData);
  103129. // Return XHR object
  103130. return xhr;
  103131. }
  103132. });
  103133. /**
  103134. * =============================================================================
  103135. * ************************* Bootstrap extend ************************
  103136. * =============================================================================
  103137. */
  103138. $.extend({
  103139. toast: function toast(params, timeout, template) {
  103140. var _bg = function _bg(num) {
  103141. var container = $A(".__bootstrap_toast_container");
  103142. if (container.length > 0) {
  103143. var bgobj = container.find(".alert-bg");
  103144. var bgnum = parseInt(bgobj.attr("data-num"));
  103145. bgnum += num;
  103146. bgobj.attr("data-num", bgnum);
  103147. if (bgnum > 0) {
  103148. bgobj.show();
  103149. } else {
  103150. bgobj.hide();
  103151. }
  103152. }
  103153. };
  103154. if (!params) return false;
  103155. if ((typeof params === 'undefined' ? 'undefined' : _typeof(params)) === 'object' && params.length > 0) {
  103156. if (params.attr("data-show-bg") === "true") _bg(-1);
  103157. params.css({ width: Math.ceil(params.outerWidth()) });
  103158. params.addClass("leave");
  103159. setTimeout(function () {
  103160. params.remove();
  103161. }, 300);
  103162. return;
  103163. }
  103164. if (typeof timeout === 'string') {
  103165. template = timeout;
  103166. timeout = 2500;
  103167. }
  103168. if (typeof params === 'string') params = { title: params };
  103169. if (typeof params.timeout === 'undefined') params.timeout = 2500;
  103170. if (typeof params.template === 'undefined') params.template = 'success';
  103171. if (typeof params.fixed === 'undefined') params.fixed = false;
  103172. if (typeof params.close === 'undefined') params.close = true;
  103173. if (typeof timeout !== 'undefined') params.timeout = timeout;
  103174. if (typeof template !== 'undefined') params.template = template;
  103175. //
  103176. var container = $A(".__bootstrap_toast_container");
  103177. if (container.length === 0) {
  103178. $A("<style>").attr({ type: "text/css" }).html(".__bootstrap_toast_container{position:fixed;z-index:99999;top:5%;right:5%;padding:0;text-align:right;}" + ".__bootstrap_toast_container .alert-bg{position:fixed;display:none;z-index:1;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.6);}" + ".__bootstrap_toast_container .alert-body{position:relative;z-index:2;display:block;min-width:180px;text-align:left;opacity:0;transform:translate3d(0,100px,0);-webkit-transform:translate3d(0,100px,0);transition-duration:300ms;-webkit-transition-duration:300ms;}" + ".__bootstrap_toast_container .alert-body.enter{opacity:1;transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);}" + ".__bootstrap_toast_container .alert-body.leave{position:absolute;top:0;right:0;z-index:3;opacity:0;transform:translate3d(100%,0,0);-webkit-transform:translate3d(100%,0,0);transition-duration:200ms;-webkit-transition-duration:300ms;}" + "").appendTo("head");
  103179. $A("body").append("<div class='__bootstrap_toast_container'><div class='alert-bg' data-num='0'></div></div>");
  103180. container = $A(".__bootstrap_toast_container");
  103181. }
  103182. //
  103183. var $intemp = $A('<div class="alert-body alert alert-' + params.template + ' alert-dismissible" role="alert"><button type="button" class="close"><span aria-hidden="true">&times;</span></button>' + params.title + '</div>');
  103184. if (params.close === false) {
  103185. $intemp.removeClass("alert-dismissible");
  103186. $intemp.find(".close").remove();
  103187. } else {
  103188. $intemp.find(".close").click(function () {
  103189. $A.toast($intemp);
  103190. });
  103191. }
  103192. if (params.fixed === true) {
  103193. _bg(1);
  103194. $intemp.attr("data-show-bg", "true");
  103195. }
  103196. container.append($intemp);
  103197. //
  103198. if (typeof params.timeout === 'number') {
  103199. setTimeout(function () {
  103200. $A.toast($intemp);
  103201. }, params.timeout);
  103202. }
  103203. setTimeout(function () {
  103204. $intemp.addClass("enter");
  103205. }, 10);
  103206. //
  103207. return $intemp;
  103208. }
  103209. });
  103210. /**
  103211. * =============================================================================
  103212. * ***************************** ajax ****************************
  103213. * =============================================================================
  103214. */
  103215. $.extend({
  103216. ajax: function ajax(params) {
  103217. if (!params) return false;
  103218. if (typeof params.url === 'undefined') return false;
  103219. if (typeof params.data === 'undefined') params.data = {};
  103220. if (typeof params.cache === 'undefined') params.cache = false;
  103221. if (typeof params.method === 'undefined') params.method = 'GET';
  103222. if (typeof params.timeout === 'undefined') params.timeout = 30000;
  103223. if (typeof params.dataType === 'undefined') params.dataType = 'json';
  103224. if (typeof params.beforeSend === 'undefined') params.beforeSend = function () {};
  103225. if (typeof params.complete === 'undefined') params.complete = function () {};
  103226. if (typeof params.afterComplete === 'undefined') params.afterComplete = function () {};
  103227. if (typeof params.success === 'undefined') params.success = function () {};
  103228. if (typeof params.error === 'undefined') params.error = function () {};
  103229. //
  103230. var loadText = "数据加载中.....";
  103231. var busyNetwork = "网络繁忙,请稍后再试!";
  103232. if (_typeof($A.app) === 'object' && typeof $A.app.$L === 'function') {
  103233. loadText = $A.app.$L(loadText);
  103234. busyNetwork = $A.app.$L(busyNetwork);
  103235. }
  103236. //
  103237. var toastID = null,
  103238. beforeTitle = '',
  103239. errorTitle = '';
  103240. if (_typeof($A.app) === 'object' && _typeof($A.app.$Message) === 'object') {
  103241. if (typeof params.beforeSend === 'string') {
  103242. beforeTitle = params.beforeSend;
  103243. params.beforeSend = function () {
  103244. toastID = $A.app.$Message.loading({ content: beforeTitle, duration: 0 });
  103245. };
  103246. } else if (params.beforeSend === true) {
  103247. params.beforeSend = function () {
  103248. toastID = $A.app.$Message.loading({ content: loadText, duration: 0 });
  103249. };
  103250. }
  103251. if (typeof params.error === 'string') {
  103252. errorTitle = params.error;
  103253. params.error = function () {
  103254. $A.app.$Message.error({ content: errorTitle, duration: 5 });
  103255. };
  103256. } else if (params.error === true) {
  103257. params.error = function () {
  103258. $A.app.$Message.error({ content: busyNetwork, duration: 5 });
  103259. };
  103260. }
  103261. if (params.complete === true) {
  103262. params.complete = function () {
  103263. toastID ? toastID() : '';
  103264. };
  103265. }
  103266. } else {
  103267. if (typeof params.beforeSend === 'string') {
  103268. beforeTitle = params.beforeSend;
  103269. params.beforeSend = function () {
  103270. toastID = $A.toast({ title: beforeTitle, fixed: true, timeout: false });
  103271. };
  103272. } else if (params.beforeSend === true) {
  103273. params.beforeSend = function () {
  103274. toastID = $A.toast({ title: loadText, fixed: true, timeout: false });
  103275. };
  103276. }
  103277. if (typeof params.error === 'string') {
  103278. errorTitle = params.error;
  103279. params.error = function () {
  103280. $A.toast(errorTitle, "danger");
  103281. };
  103282. } else if (params.error === true) {
  103283. params.error = function () {
  103284. $A.toast(busyNetwork, "danger");
  103285. };
  103286. }
  103287. if (params.complete === true) {
  103288. params.complete = function () {
  103289. toastID ? $A.toast(toastID) : '';
  103290. };
  103291. }
  103292. }
  103293. //
  103294. if (_typeof(params.header) !== 'object') params.header = {};
  103295. params.header['Content-Type'] = 'application/json';
  103296. params.header['language'] = window.localStorage['__language:type__'] || 'zh';
  103297. params.header['token'] = $A.token();
  103298. //
  103299. params.data['__Access-Control-Allow-Origin'] = true;
  103300. params.beforeSend();
  103301. $A.ihttp({
  103302. url: params.url,
  103303. data: params.data,
  103304. cache: params.cache,
  103305. headers: params.header,
  103306. method: params.method.toUpperCase(),
  103307. contentType: "OPTIONS",
  103308. crossDomain: true,
  103309. dataType: params.dataType,
  103310. timeout: params.timeout,
  103311. success: function success(data, status, xhr) {
  103312. params.complete();
  103313. params.success(data, status, xhr);
  103314. params.afterComplete(true);
  103315. },
  103316. error: function error(xhr, status) {
  103317. params.complete();
  103318. params.error(xhr, status);
  103319. params.afterComplete(false);
  103320. }
  103321. });
  103322. }
  103323. });
  103324. /**
  103325. * =============================================================================
  103326. * ***************************** manage assist ****************************
  103327. * =============================================================================
  103328. */
  103329. $.extend({
  103330. /**
  103331. * 对象中有Date格式的转成指定格式
  103332. * @param myObj
  103333. * @param format 默认格式:Y-m-d
  103334. * @returns {*}
  103335. */
  103336. date2string: function date2string(myObj, format) {
  103337. if (myObj === null) {
  103338. return myObj;
  103339. }
  103340. if (typeof format === "undefined") {
  103341. format = "Y-m-d";
  103342. }
  103343. if ((typeof myObj === 'undefined' ? 'undefined' : _typeof(myObj)) === "object") {
  103344. if (myObj instanceof Date) {
  103345. return $A.formatDate(format, myObj);
  103346. }
  103347. $A.each(myObj, function (key, val) {
  103348. myObj[key] = $A.date2string(val, format);
  103349. });
  103350. return myObj;
  103351. }
  103352. return myObj;
  103353. },
  103354. /**
  103355. * 获取一些指定时间
  103356. * @param str
  103357. * @param retInt
  103358. * @returns {*|string}
  103359. */
  103360. getData: function getData(str) {
  103361. var retInt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  103362. var now = new Date(); //当前日期
  103363. var nowDayOfWeek = now.getDay(); //今天本周的第几天
  103364. var nowDay = now.getDate(); //当前日
  103365. var nowMonth = now.getMonth(); //当前月
  103366. var nowYear = now.getYear(); //当前年
  103367. nowYear += nowYear < 2000 ? 1900 : 0;
  103368. var lastMonthDate = new Date(); //上月日期
  103369. lastMonthDate.setDate(1);
  103370. lastMonthDate.setMonth(lastMonthDate.getMonth() - 1);
  103371. var lastMonth = lastMonthDate.getMonth();
  103372. var getQuarterStartMonth = function getQuarterStartMonth() {
  103373. var quarterStartMonth = 0;
  103374. if (nowMonth < 3) {
  103375. quarterStartMonth = 0;
  103376. }
  103377. if (2 < nowMonth && nowMonth < 6) {
  103378. quarterStartMonth = 3;
  103379. }
  103380. if (5 < nowMonth && nowMonth < 9) {
  103381. quarterStartMonth = 6;
  103382. }
  103383. if (nowMonth > 8) {
  103384. quarterStartMonth = 9;
  103385. }
  103386. return quarterStartMonth;
  103387. };
  103388. var getMonthDays = function getMonthDays(myMonth) {
  103389. var monthStartDate = new Date(nowYear, myMonth, 1);
  103390. var monthEndDate = new Date(nowYear, myMonth + 1, 1);
  103391. return (monthEndDate - monthStartDate) / (1000 * 60 * 60 * 24);
  103392. };
  103393. //
  103394. var time = now.getTime();
  103395. switch (str) {
  103396. case '今天':
  103397. time = now;
  103398. break;
  103399. case '昨天':
  103400. time = now - 86400000;
  103401. break;
  103402. case '前天':
  103403. time = now - 86400000 * 2;
  103404. break;
  103405. case '本周':
  103406. time = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek);
  103407. break;
  103408. case '本周结束':
  103409. time = new Date(nowYear, nowMonth, nowDay + (6 - nowDayOfWeek));
  103410. break;
  103411. case '上周':
  103412. time = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek - 7);
  103413. break;
  103414. case '上周结束':
  103415. time = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek - 1);
  103416. break;
  103417. case '本周2':
  103418. time = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek + 1);
  103419. break;
  103420. case '本周结束2':
  103421. time = new Date(nowYear, nowMonth, nowDay + (6 - nowDayOfWeek) + 1);
  103422. break;
  103423. case '上周2':
  103424. time = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek - 7 + 1);
  103425. break;
  103426. case '上周结束2':
  103427. time = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek - 1 + 1);
  103428. break;
  103429. case '本月':
  103430. time = new Date(nowYear, nowMonth, 1);
  103431. break;
  103432. case '本月结束':
  103433. time = new Date(nowYear, nowMonth, getMonthDays(nowMonth));
  103434. break;
  103435. case '上个月':
  103436. time = new Date(nowYear, lastMonth, 1);
  103437. break;
  103438. case '上个月结束':
  103439. time = new Date(nowYear, lastMonth, getMonthDays(lastMonth));
  103440. break;
  103441. case '本季度':
  103442. time = new Date(nowYear, getQuarterStartMonth(), 1);
  103443. break;
  103444. case '本季度结束':
  103445. var quarterEndMonth = getQuarterStartMonth() + 2;
  103446. time = new Date(nowYear, quarterEndMonth, getMonthDays(quarterEndMonth));
  103447. break;
  103448. }
  103449. if (retInt === true) {
  103450. return time;
  103451. }
  103452. return $A.formatDate("Y-m-d", parseInt(time / 1000));
  103453. },
  103454. /**
  103455. * 字节转换
  103456. * @param bytes
  103457. * @returns {string}
  103458. */
  103459. bytesToSize: function bytesToSize(bytes) {
  103460. if (bytes === 0) return '0 B';
  103461. var k = 1024;
  103462. var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
  103463. var i = Math.floor(Math.log(bytes) / Math.log(k));
  103464. if (typeof sizes[i] === "undefined") {
  103465. return '0 B';
  103466. }
  103467. return $A.runNum(bytes / Math.pow(k, i), 2) + ' ' + sizes[i];
  103468. }
  103469. });
  103470. window.$A = $;
  103471. })(window, window.jQuery);
  103472. /***/ }),
  103473. /* 199 */
  103474. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  103475. "use strict";
  103476. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sass_main_scss__ = __webpack_require__(200);
  103477. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__sass_main_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__sass_main_scss__);
  103478. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  103479. /**
  103480. * 页面专用
  103481. */
  103482. (function (window) {
  103483. var _apiUrl = window.location.origin + '/api/';
  103484. var $ = window.$A;
  103485. $.extend({
  103486. fillUrl: function fillUrl(str) {
  103487. if (str.substring(0, 2) === "//" || str.substring(0, 7) === "http://" || str.substring(0, 8) === "https://" || str.substring(0, 6) === "ftp://" || str.substring(0, 1) === "/") {
  103488. return str;
  103489. }
  103490. return window.location.origin + '/' + str;
  103491. },
  103492. webUrl: function webUrl(str) {
  103493. return $A.fillUrl(str || '');
  103494. },
  103495. apiUrl: function apiUrl(str) {
  103496. if (str.substring(0, 2) === "//" || str.substring(0, 7) === "http://" || str.substring(0, 8) === "https://" || str.substring(0, 6) === "ftp://" || str.substring(0, 1) === "/") {
  103497. return str;
  103498. }
  103499. return _apiUrl + str;
  103500. },
  103501. apiAjax: function apiAjax(params) {
  103502. if ((typeof params === 'undefined' ? 'undefined' : _typeof(params)) !== 'object') return false;
  103503. if (typeof params.success === 'undefined') params.success = function () {};
  103504. params.url = this.apiUrl(params.url);
  103505. //
  103506. var beforeCall = params.beforeSend;
  103507. params.beforeSend = function () {
  103508. $A.aAjaxLoad++;
  103509. $A(".w-spinner").show();
  103510. //
  103511. if (typeof beforeCall == "function") {
  103512. beforeCall();
  103513. }
  103514. };
  103515. //
  103516. var completeCall = params.complete;
  103517. params.complete = function () {
  103518. $A.aAjaxLoad--;
  103519. if ($A.aAjaxLoad <= 0) {
  103520. $A(".w-spinner").hide();
  103521. }
  103522. //
  103523. if (typeof completeCall == "function") {
  103524. completeCall();
  103525. }
  103526. };
  103527. //
  103528. var callback = params.success;
  103529. params.success = function (data, status, xhr) {
  103530. if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
  103531. if (data.ret === -1 && params.checkRole !== false) {
  103532. //身份丢失
  103533. $A.app.$Modal.error({
  103534. title: '温馨提示',
  103535. content: data.msg,
  103536. onOk: function onOk() {
  103537. $A.userLogout();
  103538. }
  103539. });
  103540. return;
  103541. }
  103542. if (data.ret === -2 && params.role !== false) {
  103543. //没有权限
  103544. $A.app.$Modal.error({
  103545. title: '权限不足',
  103546. content: data.msg ? data.msg : "你没有相关的权限查看或编辑!"
  103547. });
  103548. }
  103549. }
  103550. if (typeof callback === "function") {
  103551. callback(data, status, xhr);
  103552. }
  103553. };
  103554. //
  103555. $A.ajax(params);
  103556. },
  103557. aAjaxLoad: 0,
  103558. /**
  103559. * 编辑器参数配置
  103560. * @returns {{modules: {toolbar: *[]}}}
  103561. */
  103562. editorOption: function editorOption() {
  103563. return {
  103564. modules: {
  103565. toolbar: [['bold', 'italic'], [{ 'list': 'ordered' }, { 'list': 'bullet' }], [{ 'size': ['small', false, 'large', 'huge'] }], [{ 'header': [1, 2, 3, 4, 5, 6, false] }], [{ 'color': [] }, { 'background': [] }], [{ 'align': [] }]]
  103566. }
  103567. };
  103568. },
  103569. /**
  103570. * 获取token
  103571. * @returns {boolean}
  103572. */
  103573. getToken: function getToken() {
  103574. var token = $A.token();
  103575. return $A.count(token) < 10 ? false : token;
  103576. },
  103577. /**
  103578. * 设置token
  103579. * @param token
  103580. */
  103581. setToken: function setToken(token) {
  103582. $A.token(token);
  103583. },
  103584. /**
  103585. * 获取会员账号
  103586. * @returns string
  103587. */
  103588. getUserName: function getUserName() {
  103589. if ($A.getToken() === false) {
  103590. return "";
  103591. }
  103592. var userInfo = $A.getUserInfo();
  103593. return $A.ishave(userInfo.username) ? userInfo.username : '';
  103594. },
  103595. /**
  103596. * 获取会员昵称
  103597. * @param nullName
  103598. * @returns {string|*}
  103599. */
  103600. getNickName: function getNickName() {
  103601. var nullName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  103602. if ($A.getToken() === false) {
  103603. return "";
  103604. }
  103605. var userInfo = $A.getUserInfo();
  103606. return $A.ishave(userInfo.nickname) ? userInfo.nickname : nullName ? $A.getUserName() : '';
  103607. },
  103608. /**
  103609. * 获取用户信息(并保存)
  103610. * @param callback 网络请求获取到用户信息回调(监听用户信息发生变化)
  103611. * @returns Object
  103612. */
  103613. getUserInfo: function getUserInfo(callback) {
  103614. if (typeof callback === 'function' || callback === true) {
  103615. $A.apiAjax({
  103616. url: 'users/info',
  103617. error: function error() {
  103618. $A.userLogout();
  103619. },
  103620. success: function success(res) {
  103621. if (res.ret === 1) {
  103622. $A.storage("userInfo", res.data);
  103623. $A.setToken(res.data.token);
  103624. $A.triggerUserInfoListener(res.data);
  103625. typeof callback === "function" && callback(res.data, $A.getToken() !== false);
  103626. }
  103627. }
  103628. });
  103629. }
  103630. return $A.jsonParse($A.storage("userInfo"));
  103631. },
  103632. /**
  103633. * 根据用户名获取用户基本信息
  103634. * @param username
  103635. * @param callback
  103636. * @param cacheTime
  103637. */
  103638. getUserBasic: function getUserBasic(username, callback) {
  103639. var cacheTime = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
  103640. if (typeof callback !== "function") {
  103641. return;
  103642. }
  103643. if (!username) {
  103644. callback({}, false);
  103645. return;
  103646. }
  103647. //
  103648. var keyName = '__userBasic:' + username.substring(0, 1) + '__';
  103649. var localData = $A.jsonParse(window.localStorage[keyName]);
  103650. if ($A.getObject(localData, username + '.success') === true) {
  103651. callback(localData[username].data, true);
  103652. if (localData[username].update + cacheTime > Math.round(new Date().getTime() / 1000)) {
  103653. return;
  103654. }
  103655. }
  103656. //
  103657. $A.__userBasicObject.push({
  103658. username: username,
  103659. callback: callback
  103660. });
  103661. //
  103662. $A.__userBasicTimeout++;
  103663. var timeout = $A.__userBasicTimeout;
  103664. setTimeout(function () {
  103665. timeout === $A.__userBasicTimeout && $A.__userBasicEvent();
  103666. }, 100);
  103667. },
  103668. __userBasicEvent: function __userBasicEvent() {
  103669. if ($A.__userBasicLoading === true) {
  103670. return;
  103671. }
  103672. $A.__userBasicLoading = true;
  103673. //
  103674. var userArray = [];
  103675. $A.__userBasicObject.some(function (item) {
  103676. userArray.push(item.username);
  103677. if (userArray.length >= 30) {
  103678. return true;
  103679. }
  103680. });
  103681. //
  103682. $A.apiAjax({
  103683. url: 'users/basic',
  103684. data: {
  103685. username: $A.jsonStringify(userArray)
  103686. },
  103687. error: function error() {
  103688. userArray.forEach(function (username) {
  103689. var tmpLists = $A.__userBasicObject.filter(function (item) {
  103690. return item.username == username;
  103691. });
  103692. tmpLists.forEach(function (item) {
  103693. if (typeof item.callback === "function") {
  103694. item.callback({}, false);
  103695. item.callback = null;
  103696. }
  103697. });
  103698. });
  103699. //
  103700. $A.__userBasicLoading = false;
  103701. $A.__userBasicObject = $A.__userBasicObject.filter(function (item) {
  103702. return typeof item.callback === "function";
  103703. });
  103704. if ($A.__userBasicObject.length > 0) {
  103705. $A.__userBasicEvent();
  103706. }
  103707. },
  103708. success: function success(res) {
  103709. if (res.ret === 1) {
  103710. res.data.forEach(function (data) {
  103711. var keyName = '__userBasic:' + data.username.substring(0, 1) + '__';
  103712. var localData = $A.jsonParse(window.localStorage[keyName]);
  103713. localData[data.username] = {
  103714. success: true,
  103715. update: Math.round(new Date().getTime() / 1000),
  103716. data: data
  103717. };
  103718. window.localStorage[keyName] = $A.jsonStringify(localData);
  103719. });
  103720. }
  103721. userArray.forEach(function (username) {
  103722. var tmpLists = $A.__userBasicObject.filter(function (item) {
  103723. return item.username == username;
  103724. });
  103725. tmpLists.forEach(function (item) {
  103726. if (typeof item.callback === "function") {
  103727. var info = res.data.filter(function (data) {
  103728. return data.username == username;
  103729. });
  103730. if (info.length === 0) {
  103731. item.callback({}, false);
  103732. } else {
  103733. item.callback(info[0], true);
  103734. }
  103735. item.callback = null;
  103736. }
  103737. });
  103738. });
  103739. //
  103740. $A.__userBasicLoading = false;
  103741. $A.__userBasicObject = $A.__userBasicObject.filter(function (item) {
  103742. return typeof item.callback === "function";
  103743. });
  103744. if ($A.__userBasicObject.length > 0) {
  103745. $A.__userBasicEvent();
  103746. }
  103747. }
  103748. });
  103749. },
  103750. __userBasicTimeout: 0,
  103751. __userBasicLoading: false,
  103752. __userBasicObject: [],
  103753. /**
  103754. * 打开登录页面
  103755. */
  103756. userLogout: function userLogout() {
  103757. $A.token("");
  103758. $A.storage("userInfo", {});
  103759. $A.triggerUserInfoListener({});
  103760. var from = window.location.pathname == '/' ? '' : encodeURIComponent(window.location.href);
  103761. if (_typeof($A.app) === "object") {
  103762. $A.app.goForward({ path: '/', query: from ? { from: from } : {} }, true);
  103763. } else {
  103764. window.location.replace($A.webUrl() + (from ? '?from=' + from : ''));
  103765. }
  103766. },
  103767. /**
  103768. * 权限是否通过
  103769. * @param role
  103770. * @returns {boolean}
  103771. */
  103772. identity: function identity(role) {
  103773. var userInfo = $A.getUserInfo();
  103774. return $A.identityRaw(role, userInfo.identity);
  103775. },
  103776. /**
  103777. * 权限是否通过
  103778. * @param role
  103779. * @returns {boolean}
  103780. */
  103781. identityRaw: function identityRaw(role, identity) {
  103782. var isRole = false;
  103783. $A.each(identity, function (index, res) {
  103784. if (res === role) {
  103785. isRole = true;
  103786. }
  103787. });
  103788. return isRole;
  103789. },
  103790. /**
  103791. * 监听用户信息发生变化
  103792. * @param listenerName 监听标识
  103793. * @param callback 监听回调
  103794. */
  103795. setOnUserInfoListener: function setOnUserInfoListener(listenerName, callback) {
  103796. if (typeof listenerName != "string") {
  103797. return;
  103798. }
  103799. if (typeof callback === "function") {
  103800. $A.__userInfoListenerObject[listenerName] = {
  103801. callback: callback
  103802. };
  103803. }
  103804. },
  103805. removeUserInfoListener: function removeUserInfoListener(listenerName) {
  103806. if (typeof listenerName != "string") {
  103807. return;
  103808. }
  103809. if (typeof $A.__userInfoListenerObject[listenerName] != "undefined") {
  103810. delete $A.__userInfoListenerObject[listenerName];
  103811. }
  103812. },
  103813. triggerUserInfoListener: function triggerUserInfoListener(userInfo) {
  103814. var key = void 0,
  103815. item = void 0;
  103816. for (key in $A.__userInfoListenerObject) {
  103817. if (!$A.__userInfoListenerObject.hasOwnProperty(key)) continue;
  103818. item = $A.__userInfoListenerObject[key];
  103819. if (typeof item.callback === "function") {
  103820. item.callback(userInfo, $A.getToken() !== false);
  103821. }
  103822. }
  103823. },
  103824. __userInfoListenerObject: {},
  103825. /**
  103826. * 监听任务发生变化
  103827. * @param listenerName 监听标识
  103828. * @param callback 监听回调
  103829. * @param callSpecial 是否监听几种特殊事件(非操作任务的)
  103830. */
  103831. setOnTaskInfoListener: function setOnTaskInfoListener(listenerName, callback, callSpecial) {
  103832. if (typeof listenerName != "string") {
  103833. return;
  103834. }
  103835. if (typeof callback === "function") {
  103836. $A.__taskInfoListenerObject[listenerName] = {
  103837. special: callSpecial === true,
  103838. callback: callback
  103839. };
  103840. }
  103841. },
  103842. triggerTaskInfoListener: function triggerTaskInfoListener(act, taskDetail) {
  103843. var sendToWS = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  103844. var key = void 0,
  103845. item = void 0;
  103846. for (key in $A.__taskInfoListenerObject) {
  103847. if (!$A.__taskInfoListenerObject.hasOwnProperty(key)) continue;
  103848. item = $A.__taskInfoListenerObject[key];
  103849. if (typeof item.callback === "function") {
  103850. if (['addlabel', 'deleteproject', 'deletelabel', 'labelsort', 'tasksort'].indexOf(act) === -1 || item.special === true) {
  103851. if (typeof taskDetail.__modifyUsername === "undefined") {
  103852. taskDetail.__modifyUsername = $A.getUserName();
  103853. }
  103854. item.callback(act, taskDetail);
  103855. }
  103856. }
  103857. }
  103858. if (sendToWS === true) {
  103859. $A.WSOB.sendTo('team', {
  103860. type: "taskA",
  103861. act: act,
  103862. taskDetail: taskDetail
  103863. });
  103864. }
  103865. },
  103866. __taskInfoListenerObject: {},
  103867. /**
  103868. * 获取待推送的日志并推送
  103869. * @param taskid
  103870. */
  103871. triggerTaskInfoChange: function triggerTaskInfoChange(taskid) {
  103872. $A.apiAjax({
  103873. url: 'project/task/pushlog',
  103874. data: {
  103875. taskid: taskid,
  103876. pagesize: 20
  103877. },
  103878. success: function success(res) {
  103879. if (res.ret === 1) {
  103880. res.data.lists.forEach(function (item) {
  103881. var msgData = {
  103882. type: 'taskB',
  103883. username: item.username,
  103884. userimg: item.userimg,
  103885. indate: item.indate,
  103886. text: item.detail,
  103887. other: item.other
  103888. };
  103889. res.data.follower.forEach(function (username) {
  103890. if (username != msgData.username && username != $A.getUserName()) {
  103891. $A.WSOB.sendTo('user', username, msgData, 'special');
  103892. }
  103893. });
  103894. });
  103895. }
  103896. }
  103897. });
  103898. },
  103899. /**
  103900. * 推送任务至钉钉
  103901. * @param taskid
  103902. */
  103903. triggerTaskDing: function triggerTaskDing(ajaxData) {
  103904. $A.apiAjax({
  103905. url: 'ding/notice/push',
  103906. method: 'post',
  103907. data: ajaxData,
  103908. success: function success(res) {}
  103909. });
  103910. }
  103911. });
  103912. /**
  103913. * =============================================================================
  103914. * ***************************** websocket assist ****************************
  103915. * =============================================================================
  103916. */
  103917. $.extend({
  103918. /**
  103919. * @param config {username, url, token, channel, logCallback}
  103920. */
  103921. WTWS: function WTWS(config) {
  103922. this.__instance = null;
  103923. this.__connected = false;
  103924. this.__callbackid = {};
  103925. this.__openNum = 0;
  103926. this.__autoNum = 0;
  103927. this.__autoLine = function (timeout) {
  103928. var tempNum = this.__autoNum;
  103929. var thas = this;
  103930. setTimeout(function () {
  103931. if (tempNum === thas.__autoNum) {
  103932. thas.__autoNum++;
  103933. if (!thas.__config.token) {
  103934. thas.__log("[WS] No token");
  103935. thas.__autoLine(timeout + 5);
  103936. } else {
  103937. thas.sendTo('refresh', function (res) {
  103938. thas.__log("[WS] Connection " + (res.status ? 'success' : 'error'));
  103939. thas.__autoLine(timeout + 5);
  103940. });
  103941. }
  103942. }
  103943. }, Math.min(timeout, 30) * 1000);
  103944. };
  103945. this.__log = function (text, event) {
  103946. typeof this.__config.logCallback === "function" && this.__config.logCallback(text, event);
  103947. };
  103948. this.__lExists = function (string, find, lower) {
  103949. string += "";
  103950. find += "";
  103951. if (lower !== true) {
  103952. string = string.toLowerCase();
  103953. find = find.toLowerCase();
  103954. }
  103955. return string.substring(0, find.length) === find;
  103956. };
  103957. this.__rNum = function (str, fixed) {
  103958. var _s = Number(str);
  103959. if (_s + "" === "NaN") {
  103960. _s = 0;
  103961. }
  103962. if (/^[0-9]*[1-9][0-9]*$/.test(fixed)) {
  103963. _s = _s.toFixed(fixed);
  103964. var rs = _s.indexOf('.');
  103965. if (rs < 0) {
  103966. _s += ".";
  103967. for (var i = 0; i < fixed; i++) {
  103968. _s += "0";
  103969. }
  103970. }
  103971. }
  103972. return _s;
  103973. };
  103974. this.__jParse = function (str, defaultVal) {
  103975. if (str === null) {
  103976. return defaultVal ? defaultVal : {};
  103977. }
  103978. if ((typeof str === 'undefined' ? 'undefined' : _typeof(str)) === "object") {
  103979. return str;
  103980. }
  103981. try {
  103982. return JSON.parse(str);
  103983. } catch (e) {
  103984. return defaultVal ? defaultVal : {};
  103985. }
  103986. };
  103987. this.__randString = function (len) {
  103988. len = len || 32;
  103989. var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678oOLl9gqVvUuI1';
  103990. var maxPos = $chars.length;
  103991. var pwd = '';
  103992. for (var i = 0; i < len; i++) {
  103993. pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
  103994. }
  103995. return pwd;
  103996. };
  103997. this.__urlParams = function (url, params) {
  103998. if ((typeof params === 'undefined' ? 'undefined' : _typeof(params)) === "object" && params !== null) {
  103999. url += "";
  104000. url += url.indexOf("?") === -1 ? '?' : '';
  104001. for (var key in params) {
  104002. if (!params.hasOwnProperty(key)) {
  104003. continue;
  104004. }
  104005. url += '&' + key + '=' + params[key];
  104006. }
  104007. }
  104008. return url.replace("?&", "?");
  104009. };
  104010. this.__isArr = function (obj) {
  104011. return Object.prototype.toString.call(obj) == '[object Array]';
  104012. };
  104013. /**
  104014. * 设置参数
  104015. * @param config
  104016. */
  104017. this.config = function (config) {
  104018. if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) !== "object" || config === null) {
  104019. config = {};
  104020. }
  104021. config.username = config.username || '';
  104022. config.url = config.url || '';
  104023. config.token = config.token || '';
  104024. config.channel = config.channel || '';
  104025. config.logCallback = config.logCallback || null;
  104026. this.__config = config;
  104027. return this;
  104028. };
  104029. /**
  104030. * 连接
  104031. * @param force
  104032. */
  104033. this.connection = function (force) {
  104034. if (!this.__lExists(this.__config.url, "ws://") && !this.__lExists(this.__config.url, "wss://")) {
  104035. this.__log("[WS] No connection address");
  104036. return this;
  104037. }
  104038. if (!this.__config.token) {
  104039. this.__log("[WS] No connected token");
  104040. return this;
  104041. }
  104042. if (this.__instance !== null && force !== true) {
  104043. this.__log("[WS] Connection exists");
  104044. return this;
  104045. }
  104046. var thas = this;
  104047. // 初始化客户端套接字并建立连接
  104048. this.__instance = new WebSocket(this.__urlParams(this.__config.url, {
  104049. token: this.__config.token,
  104050. channel: this.__config.channel
  104051. }));
  104052. // 连接建立时触发
  104053. this.__instance.onopen = function (event) {
  104054. thas.__log("[WS] Connection opened", event);
  104055. };
  104056. // 接收到服务端推送时执行
  104057. this.__instance.onmessage = function (event) {
  104058. var msgDetail = thas.__jParse(event.data);
  104059. if (msgDetail.messageType === 'open') {
  104060. thas.__log("[WS] Connection connected");
  104061. msgDetail.openNum = thas.__openNum;
  104062. msgDetail.config = thas.__config;
  104063. thas.__openNum++;
  104064. thas.__connected = true;
  104065. thas.__autoLine(30);
  104066. } else if (msgDetail.messageType === 'back') {
  104067. typeof thas.__callbackid[msgDetail.messageId] === "function" && thas.__callbackid[msgDetail.messageId](msgDetail.body);
  104068. delete thas.__callbackid[msgDetail.messageId];
  104069. return;
  104070. }
  104071. if (thas.__rNum(msgDetail.contentId) > 0) {
  104072. thas.sendTo('roger', msgDetail.contentId);
  104073. }
  104074. thas.triggerMsgListener(msgDetail);
  104075. };
  104076. // 连接关闭时触发
  104077. this.__instance.onclose = function (event) {
  104078. thas.__log("[WS] Connection closed", event);
  104079. thas.__connected = false;
  104080. thas.__instance = null;
  104081. thas.__autoLine(5);
  104082. };
  104083. // 连接出错
  104084. this.__instance.onerror = function (event) {
  104085. thas.__log("[WS] Connection error", event);
  104086. thas.__connected = false;
  104087. thas.__instance = null;
  104088. thas.__autoLine(5);
  104089. };
  104090. return this;
  104091. };
  104092. /**
  104093. * 添加消息监听
  104094. * @param listenerName
  104095. * @param listenerType
  104096. * @param callback
  104097. */
  104098. this.setOnMsgListener = function (listenerName, listenerType, callback) {
  104099. if (typeof listenerName != "string") {
  104100. return this;
  104101. }
  104102. if (typeof listenerType === "function") {
  104103. callback = listenerType;
  104104. listenerType = [];
  104105. }
  104106. if (!this.__isArr(listenerType)) {
  104107. listenerType = [listenerType];
  104108. }
  104109. if (typeof callback === "function") {
  104110. this.__msgListenerObject[listenerName] = {
  104111. callback: callback,
  104112. listenerType: listenerType
  104113. };
  104114. }
  104115. return this;
  104116. };
  104117. this.triggerMsgListener = function (msgDetail) {
  104118. var key, item;
  104119. for (key in this.__msgListenerObject) {
  104120. if (!this.__msgListenerObject.hasOwnProperty(key)) {
  104121. continue;
  104122. }
  104123. item = this.__msgListenerObject[key];
  104124. if (item.listenerType.length > 0 && item.listenerType.indexOf(msgDetail.messageType) === -1) {
  104125. continue;
  104126. }
  104127. if (typeof item.callback === "function") {
  104128. item.callback(msgDetail);
  104129. }
  104130. }
  104131. };
  104132. this.__msgListenerObject = {};
  104133. /**
  104134. * 添加特殊监听
  104135. * @param listenerName
  104136. * @param callback
  104137. */
  104138. this.setOnSpecialListener = function (listenerName, callback) {
  104139. if (typeof listenerName != "string") {
  104140. return this;
  104141. }
  104142. if (typeof callback === "function") {
  104143. this.__specialListenerObject[listenerName] = {
  104144. callback: callback
  104145. };
  104146. }
  104147. return this;
  104148. };
  104149. this.triggerSpecialListener = function (simpleMsg) {
  104150. var key, item;
  104151. for (key in this.__specialListenerObject) {
  104152. if (!this.__specialListenerObject.hasOwnProperty(key)) {
  104153. continue;
  104154. }
  104155. item = this.__specialListenerObject[key];
  104156. if (typeof item.callback === "function") {
  104157. item.callback(simpleMsg);
  104158. }
  104159. }
  104160. };
  104161. this.__specialListenerObject = {};
  104162. /**
  104163. * 发送消息
  104164. * @param messageType 会话类型
  104165. * - refresh: 刷新
  104166. * - unread: 未读信息总数量
  104167. * - read: 已读会员信息
  104168. * - roger: 收到信息回执
  104169. * - user: 发送消息,指定target
  104170. * - info: 发送消息(不保存),指定target
  104171. * - team: 团队会员
  104172. * - docs: 知识库
  104173. * @param target 发送目标
  104174. * @param body 发送内容(对象或数组)
  104175. * @param callback 发送回调
  104176. * @param againNum
  104177. */
  104178. this.sendTo = function (messageType, target, body, callback) {
  104179. var againNum = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  104180. if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) === "object" && typeof body === "undefined") {
  104181. body = target;
  104182. target = null;
  104183. }
  104184. if (typeof target === "function") {
  104185. body = target;
  104186. target = null;
  104187. }
  104188. if (typeof body === "function") {
  104189. callback = body;
  104190. body = null;
  104191. }
  104192. if (body === null || (typeof body === 'undefined' ? 'undefined' : _typeof(body)) !== "object") {
  104193. body = {};
  104194. }
  104195. //
  104196. var thas = this;
  104197. if (this.__instance === null || this.__connected === false) {
  104198. if (againNum < 10 && messageType != 'team') {
  104199. setTimeout(function () {
  104200. thas.sendTo(messageType, target, body, callback, thas.__rNum(againNum) + 1);
  104201. }, 600);
  104202. if (againNum === 0) {
  104203. this.connection();
  104204. }
  104205. } else {
  104206. if (this.__instance === null) {
  104207. this.__log("[WS] Service not connected");
  104208. typeof callback === "function" && callback({ status: 0, message: '服务未连接' });
  104209. } else {
  104210. this.__log("[WS] Failed connection");
  104211. typeof callback === "function" && callback({ status: 0, message: '未连接成功' });
  104212. }
  104213. }
  104214. return this;
  104215. }
  104216. if (['refresh', 'unread', 'read', 'roger', 'user', 'info', 'team', 'docs'].indexOf(messageType) === -1) {
  104217. this.__log("[WS] Wrong message messageType: " + messageType);
  104218. typeof callback === "function" && callback({ status: 0, message: '错误的消息类型: ' + messageType });
  104219. return this;
  104220. }
  104221. //
  104222. var contentId = 0;
  104223. if (messageType === 'roger') {
  104224. contentId = target;
  104225. target = null;
  104226. }
  104227. var messageId = '';
  104228. if (typeof callback === "string" && callback === 'special') {
  104229. callback = function callback(res) {
  104230. res.status === 1 && thas.triggerSpecialListener({
  104231. target: target,
  104232. body: body
  104233. });
  104234. };
  104235. }
  104236. if (typeof callback === "function") {
  104237. messageId = this.__randString(16);
  104238. this.__callbackid[messageId] = callback;
  104239. }
  104240. this.__instance.send(JSON.stringify({
  104241. messageType: messageType,
  104242. messageId: messageId,
  104243. contentId: contentId,
  104244. channel: this.__config.channel,
  104245. username: this.__config.username,
  104246. target: target,
  104247. body: body,
  104248. time: Math.round(new Date().getTime() / 1000)
  104249. }));
  104250. return this;
  104251. };
  104252. /**
  104253. * 关闭连接
  104254. */
  104255. this.close = function () {
  104256. if (this.__instance === null) {
  104257. this.__log("[WS] Service not connected");
  104258. return this;
  104259. }
  104260. if (this.__connected === false) {
  104261. this.__log("[WS] Failed connection");
  104262. return this;
  104263. }
  104264. this.__instance.close();
  104265. return this;
  104266. };
  104267. return this.config(config);
  104268. },
  104269. WSOB: {
  104270. instance: null,
  104271. isClose: false,
  104272. /**
  104273. * 初始化
  104274. */
  104275. initialize: function initialize() {
  104276. var url = $A.getObject(window.webSocketConfig, 'URL');
  104277. if (!url) {
  104278. url = window.location.origin;
  104279. url = url.replace("https://", "wss://");
  104280. url = url.replace("http://", "ws://");
  104281. url += "/ws";
  104282. }
  104283. var config = {
  104284. username: $A.getUserName(),
  104285. url: url,
  104286. token: $A.getToken(),
  104287. channel: 'web'
  104288. };
  104289. if (this.instance === null) {
  104290. this.instance = new $A.WTWS(config);
  104291. this.instance.connection();
  104292. } else if (this.isClose) {
  104293. this.isClose = false;
  104294. this.instance.config(config);
  104295. this.instance.connection();
  104296. }
  104297. },
  104298. /**
  104299. * 主动连接
  104300. */
  104301. connection: function connection() {
  104302. this.initialize();
  104303. this.instance.connection();
  104304. },
  104305. /**
  104306. * 监听消息
  104307. * @param listenerName
  104308. * @param listenerType
  104309. * @param callback
  104310. */
  104311. setOnMsgListener: function setOnMsgListener(listenerName, listenerType, callback) {
  104312. this.initialize();
  104313. this.instance.setOnMsgListener(listenerName, listenerType, callback);
  104314. },
  104315. /**
  104316. * 添加特殊监听
  104317. * @param listenerName
  104318. * @param callback
  104319. */
  104320. setOnSpecialListener: function setOnSpecialListener(listenerName, callback) {
  104321. this.initialize();
  104322. this.instance.setOnSpecialListener(listenerName, callback);
  104323. },
  104324. /**
  104325. * 发送消息
  104326. * @param messageType
  104327. * @param target
  104328. * @param body
  104329. * @param callback
  104330. */
  104331. sendTo: function sendTo(messageType, target, body, callback) {
  104332. this.initialize();
  104333. this.instance.sendTo(messageType, target, body, callback);
  104334. },
  104335. /**
  104336. * 关闭连接
  104337. */
  104338. close: function close() {
  104339. if (this.instance === null) {
  104340. return;
  104341. }
  104342. this.isClose = true;
  104343. this.instance.config(null).close();
  104344. },
  104345. /**
  104346. * 获取消息描述
  104347. * @param content
  104348. * @returns {string}
  104349. */
  104350. getMsgDesc: function getMsgDesc(content) {
  104351. var desc = void 0;
  104352. switch (content.type) {
  104353. case 'text':
  104354. desc = content.text;
  104355. break;
  104356. case 'image':
  104357. desc = $A.app.$L('[图片]');
  104358. break;
  104359. case 'file':
  104360. desc = $A.app.$L('[文件]');
  104361. break;
  104362. case 'taskB':
  104363. desc = content.text + " " + $A.app.$L("[来自关注任务]");
  104364. break;
  104365. case 'report':
  104366. desc = content.text + " " + $A.app.$L("[来自工作报告]");
  104367. break;
  104368. case 'video':
  104369. desc = $A.app.$L('[视频通话]');
  104370. break;
  104371. case 'voice':
  104372. desc = $A.app.$L('[语音通话]');
  104373. break;
  104374. default:
  104375. desc = $A.app.$L('[未知类型]');
  104376. break;
  104377. }
  104378. return desc;
  104379. }
  104380. }
  104381. });
  104382. window.$A = $;
  104383. })(window);
  104384. /***/ }),
  104385. /* 200 */
  104386. /***/ (function(module, exports, __webpack_require__) {
  104387. // style-loader: Adds some css to the DOM by adding a <style> tag
  104388. // load the styles
  104389. var content = __webpack_require__(201);
  104390. if(typeof content === 'string') content = [[module.i, content, '']];
  104391. // Prepare cssTransformation
  104392. var transform;
  104393. var options = {}
  104394. options.transform = transform
  104395. // add the styles to the DOM
  104396. var update = __webpack_require__(50)(content, options);
  104397. if(content.locals) module.exports = content.locals;
  104398. // Hot Module Replacement
  104399. if(false) {
  104400. // When the styles change, update the <style> tags
  104401. if(!content.locals) {
  104402. module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/sass-loader/lib/loader.js!./main.scss", function() {
  104403. var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/sass-loader/lib/loader.js!./main.scss");
  104404. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  104405. update(newContent);
  104406. });
  104407. }
  104408. // When the module is disposed, remove the <style> tags
  104409. module.hot.dispose(function() { update(); });
  104410. }
  104411. /***/ }),
  104412. /* 201 */
  104413. /***/ (function(module, exports, __webpack_require__) {
  104414. exports = module.exports = __webpack_require__(0)(false);
  104415. // imports
  104416. // module
  104417. exports.push([module.i, "*[hidden=\"hidden\"] {\n display: none !important; }\n\n.z-row {\n text-rendering: optimizespeed;\n display: flex;\n align-items: stretch;\n flex-flow: row wrap; }\n\n.z-row.gap .z-1, .z-row.gap .z-3, .z-row.gap .z-4, .z-row.gap .z-6, .z-row.gap .z-8, .z-row.gap .z-12, .z-row.gap .z-16, .z-row.gap .z-18, .z-row.gap .z-20, .z-row.gap .z-21, .z-row.gap .z-col {\n padding: .35rem .5rem; }\n\n.z-row > .z-row {\n width: 100%; }\n\n.z-1, .z-3, .z-4, .z-6, .z-8, .z-12, .z-16, .z-18, .z-20, .z-21, .z-col {\n display: inline-block;\n zoom: 1;\n box-sizing: border-box;\n vertical-align: top;\n text-rendering: auto; }\n\n.z-1 {\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0;\n max-width: 100%; }\n\n.z-3 {\n width: 12.5%;\n max-width: 12.5%; }\n\n.z-4 {\n width: 16.6667%;\n max-width: 16.6667%; }\n\n.z-6 {\n width: 25%; }\n\n.z-8 {\n width: 33.3333%; }\n\n.z-12 {\n width: 50%; }\n\n.z-16 {\n width: 66.6667%; }\n\n.z-18 {\n width: 75%; }\n\n.z-20 {\n width: 83.3333%; }\n\n.z-21 {\n width: 87.5%; }\n\n.f-12 {\n font-size: 12px !important; }\n\n.f-14 {\n font-size: 14px !important; }\n\n.f-16 {\n font-size: 16px !important; }\n\n.w-box {\n -webkit-box-sizing: content-box;\n box-sizing: content-box; }\n .w-box * {\n -webkit-box-sizing: content-box;\n box-sizing: content-box; }\n\n.w-main {\n position: absolute;\n color: #000000;\n top: 0;\n left: 0;\n min-width: 100%;\n min-height: 100%;\n padding: 0;\n margin: 0; }\n .w-main .w-nav {\n position: fixed;\n left: 0;\n right: 0;\n top: 40px;\n font-size: 14px;\n z-index: 12;\n color: #606266;\n height: 32px;\n line-height: 34px;\n background-color: rgba(255, 255, 255, 0.9);\n box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1); }\n .w-main .w-nav .nav-row {\n margin: 0 32px;\n display: flex;\n flex-direction: row;\n align-items: center; }\n .w-main .w-nav .nav-row:before, .w-main .w-nav .nav-row:after {\n display: table;\n content: \"\"; }\n .w-main .w-nav .nav-row:after {\n clear: both; }\n .w-main .w-nav .nav-row span {\n margin: 0 12px 0 0;\n cursor: pointer; }\n .w-main .w-nav .nav-row span.active {\n color: #0285d7;\n font-weight: 500; }\n .w-main .w-nav .nav-row span + span {\n padding-left: 12px;\n border-left: 1px solid #ccc; }\n .w-main .w-nav .nav-row .icon {\n font-size: 16px;\n margin-right: 2px; }\n .w-main .w-nav .nav-row .w-nav-left {\n white-space: nowrap;\n padding-right: 24px; }\n .w-main .w-nav .nav-row .w-nav-flex {\n flex: 1; }\n .w-main .w-nav .nav-row .w-nav-right {\n margin-top: -2px;\n white-space: nowrap;\n overflow: hidden;\n overflow-x: auto;\n -webkit-backface-visibility: hidden;\n -webkit-overflow-scrolling: touch; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-wrapper {\n margin-top: -2px;\n width: auto; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-wrapper input {\n padding: 0 26px 0 6px;\n font-size: 14px;\n width: 140px;\n height: 24px;\n line-height: 24px;\n border: none;\n box-shadow: none;\n transition: all 0.2s;\n transform: translateZ(0); }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-wrapper input:focus {\n width: 180px; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-wrapper.substantial input {\n width: 180px;\n background-color: #eeeeee; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-wrapper.showclose input {\n padding-right: 48px; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-suffix {\n display: flex;\n align-items: center;\n margin: 0 6px 0 0;\n width: auto; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-suffix .nav-sreach-loading {\n display: flex;\n align-items: center;\n margin-right: 6px; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-suffix .nav-sreach-loading .w-loading {\n width: 12px;\n height: 12px; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-suffix i {\n font-size: 16px; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-suffix i.suffix-close {\n font-size: 22px; }\n .w-main .w-nav .nav-row .page-nav-left {\n display: flex;\n flex-direction: row;\n align-items: center;\n min-width: 138px; }\n .w-main .w-nav .nav-row .page-nav-left:hover .page-nav-refresh em {\n display: block; }\n .w-main .w-nav .nav-row .page-nav-left > span {\n margin-right: 8px; }\n .w-main .w-nav .nav-row .page-nav-left > span.bold {\n font-weight: bold; }\n .w-main .w-nav .nav-row .page-nav-left .page-nav-loading {\n width: 18px;\n height: 18px;\n display: flex; }\n .w-main .w-nav .nav-row .page-nav-left .page-nav-refresh {\n min-width: 36px;\n height: 100%;\n display: flex;\n flex-direction: row;\n align-items: center; }\n .w-main .w-nav .nav-row .page-nav-left .page-nav-refresh em {\n display: none;\n padding-left: 4px;\n padding-right: 4px;\n color: #048be0;\n cursor: pointer; }\n .w-main .w-nav .nav-row .page-nav-left .page-nav-refresh em:hover {\n text-decoration: underline; }\n @media (max-width: 768px) {\n .w-main .w-nav .nav-row {\n margin: 0 16px; }\n .w-main .w-nav .nav-row span {\n margin: 0 8px 0 0; }\n .w-main .w-nav .nav-row span + span {\n margin: 0;\n padding-left: 8px; }\n .w-main .w-nav .nav-row .w-nav-left {\n padding-right: 12px; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-wrapper input {\n width: 140px; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-wrapper input:focus {\n width: 140px; }\n .w-main .w-nav .nav-row .nav-sreach .ivu-input-wrapper.substantial input {\n width: 140px; } }\n\n.w-sreach-main {\n position: fixed;\n top: 76px;\n right: 6px;\n left: 0;\n bottom: 0;\n z-index: 20; }\n .w-sreach-main .w-sreach-box {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-end; }\n .w-sreach-main .sreach-none,\n .w-sreach-main .sreach-ul {\n background: #ffffff;\n border-radius: 4px;\n box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2); }\n .w-sreach-main .sreach-none {\n text-align: center;\n color: #666;\n padding: 16px 32px; }\n .w-sreach-main .sreach-ul {\n width: 480px;\n max-width: 96%;\n max-height: 100%;\n padding: 16px 12px;\n margin: 0 0 6px 0;\n overflow: auto;\n opacity: 0;\n transform: translate(50%, 0);\n transition: all 0.2s; }\n .w-sreach-main .sreach-ul.sreach-enter {\n opacity: 1;\n transform: translate(0, 0); }\n .w-sreach-main .sreach-ul > li {\n list-style-type: none;\n padding: 6px 12px;\n margin: 0; }\n .w-sreach-main .sreach-ul > li.sreach-result {\n font-size: 12px;\n color: #999; }\n .w-sreach-main .sreach-ul > li:last-child {\n border-bottom: 0; }\n .w-sreach-main .sreach-ul > li .sreach-title {\n font-size: 14px;\n color: #555555;\n font-weight: 400;\n cursor: pointer;\n border-bottom: 1px solid #eeeeee;\n padding-bottom: 6px; }\n .w-sreach-main .sreach-ul > li .sreach-title .sreach-tag {\n background-color: #cccccc;\n display: inline-block;\n padding: 0 3px;\n color: #ffffff;\n border-radius: 2px;\n transform: scale(0.96);\n font-size: 12px; }\n .w-sreach-main .sreach-ul > li .sreach-title .sreach-tag.p1 {\n background: rgba(248, 14, 21, 0.6); }\n .w-sreach-main .sreach-ul > li .sreach-title .sreach-tag.p2 {\n background: rgba(236, 196, 2, 0.5); }\n .w-sreach-main .sreach-ul > li .sreach-title .sreach-tag.p3 {\n background: rgba(0, 159, 227, 0.7); }\n .w-sreach-main .sreach-ul > li .sreach-title .sreach-tag.p4 {\n background: rgba(121, 170, 28, 0.7); }\n .w-sreach-main .sreach-ul > li .sreach-title .sreach-tag.overdue {\n background: #ff0000; }\n .w-sreach-main .sreach-ul > li .sreach-title:hover {\n color: #333333; }\n .w-sreach-main .sreach-ul > li .sreach-text {\n font-size: 13px;\n color: #888888;\n font-weight: 400;\n cursor: pointer;\n padding-top: 4px; }\n .w-sreach-main .sreach-ul > li .sreach-text:hover {\n color: #333333; }\n .w-sreach-main .sreach-ul > li > ul {\n padding-top: 3px;\n padding-left: 24px; }\n .w-sreach-main .sreach-ul > li > ul > li {\n padding: 6px 0;\n border-bottom: 1px dotted #eeeeee; }\n .w-sreach-main .sreach-ul > li > ul > li .sreach-title {\n font-size: 13px;\n border-bottom: 0;\n padding-bottom: 0; }\n\n.tableFill .ivu-table table {\n width: 100% !important; }\n .tableFill .ivu-table table .ivu-table-cell {\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n padding-left: 12px;\n padding-right: 12px; }\n .tableFill .ivu-table table .ivu-table-cell > div {\n max-width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n vertical-align: middle; }\n .tableFill .ivu-table table .ivu-table-cell > div .ivu-tooltip-rel {\n vertical-align: middle; }\n\n.tableFill .ivu-table:before {\n background-color: #efefef; }\n\n.tableFlex .ivu-table {\n display: flex;\n flex-direction: column; }\n .tableFlex .ivu-table .ivu-table-header {\n flex-grow: 0;\n flex-shrink: 0; }\n .tableFlex .ivu-table .ivu-table-body {\n overflow-y: auto; }\n\n.tableSelection .ivu-table .ivu-table-cell {\n padding-left: 12px;\n padding-right: 12px; }\n .tableSelection .ivu-table .ivu-table-cell.ivu-table-cell-with-selection {\n padding-right: 2px; }\n\n.pageBox {\n text-align: center;\n margin-bottom: 12px; }\n\n.sreachBox > .item {\n margin-bottom: 8px; }\n\n.sreachBox .item > div {\n display: block;\n float: left;\n padding-right: 10px; }\n .sreachBox .item > div:last-child {\n padding-right: 0; }\n .sreachBox .item > div .ivu-input-wrapper, .sreachBox .item > div .ivu-select {\n margin-top: 2px; }\n .sreachBox .item > div input, .sreachBox .item > div .ivu-select-placeholder {\n font-weight: normal; }\n\n.sreachBox .item .item-1 {\n width: 100%; }\n\n.sreachBox .item .item-2 {\n width: 50%; }\n\n.sreachBox .item .item-3 {\n width: 33.33%; }\n\n.sreachBox .item .item-4 {\n width: 25%; }\n\n.sreachBox .item .item-5 {\n width: 20%; }\n\n.sreachBox .item:after {\n content: '';\n display: block;\n height: 0;\n clear: both;\n visibility: hidden; }\n\n.sreachBox .item-title,\n.sreachBox .item-title-active {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 600; }\n\n.sreachBox .item-title-active {\n color: #ff0000; }\n\n.sreachBox .item-button {\n text-align: right;\n margin-top: 10px;\n margin-bottom: 0; }\n .sreachBox .item-button .ivu-input-wrapper {\n float: none;\n width: 150px;\n display: inline-block; }\n\n.sreachBox .ivu-date-picker {\n width: 100%;\n position: relative;\n vertical-align: middle; }\n\n.sreachBox .item-button .ivu-btn {\n margin-left: 8px; }\n\n.sreachBox .item-button .left-btn {\n float: left;\n margin-right: 8px;\n margin-left: 0; }\n\n.sreach-highlight {\n color: #c00; }\n\n.drawer-tabs .ivu-tabs-tabpane {\n position: relative; }\n\n.drawer-box {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column; }\n .drawer-box .drawer-content {\n flex: 1;\n width: 100%;\n overflow: auto;\n padding: 16px;\n position: relative;\n transform: translateZ(0); }\n .drawer-box .drawer-footer {\n width: 100%;\n border-top: 1px solid #e8e8e8;\n padding: 10px 16px;\n text-align: right;\n background: #fff; }\n\n.ivu-drawer-body .ivu-tabs-bar {\n padding-right: 32px; }\n\n.ivu-select-dropdown-max {\n max-height: 300px; }\n\n.ivu-modal-wrap.simple-modal .ivu-modal-header,\n.ivu-modal-wrap.simple-modal .ivu-modal-footer {\n border-color: transparent; }\n\n.ivu-dropdown-item.dropdown-active {\n color: #058ce4; }\n\n.upload-control-spin-icon-load {\n font-size: 18px;\n animation: upload-control-spin-icon-animation 1s linear infinite; }\n\n@keyframes upload-control-spin-icon-animation {\n from {\n transform: rotate(0deg); }\n 50% {\n transform: rotate(180deg); }\n to {\n transform: rotate(360deg); } }\n\n.m768-show,\n.m768-show-i,\n.m768-show-ib {\n display: none; }\n\n.m768-hide {\n display: block; }\n\n.m768-hide-i {\n display: inline; }\n\n.m768-hide-ib {\n display: inline-block; }\n\n@media (max-width: 768px) {\n .m768-show {\n display: block; }\n .m768-show-i {\n display: inline; }\n .m768-show-ib {\n display: inline-block; }\n .m768-hide,\n .m768-hide-i,\n .m768-hide-ib {\n display: none; } }\n", ""]);
  104418. // exports
  104419. /***/ }),
  104420. /* 202 */
  104421. /***/ (function(module, exports, __webpack_require__) {
  104422. var disposed = false
  104423. var normalizeComponent = __webpack_require__(2)
  104424. /* script */
  104425. var __vue_script__ = __webpack_require__(203)
  104426. /* template */
  104427. var __vue_template__ = __webpack_require__(204)
  104428. /* template functional */
  104429. var __vue_template_functional__ = false
  104430. /* styles */
  104431. var __vue_styles__ = null
  104432. /* scopeId */
  104433. var __vue_scopeId__ = null
  104434. /* moduleIdentifier (server only) */
  104435. var __vue_module_identifier__ = null
  104436. var Component = normalizeComponent(
  104437. __vue_script__,
  104438. __vue_template__,
  104439. __vue_template_functional__,
  104440. __vue_styles__,
  104441. __vue_scopeId__,
  104442. __vue_module_identifier__
  104443. )
  104444. Component.options.__file = "resources/assets/js/_components/Title.vue"
  104445. /* hot reload */
  104446. if (false) {(function () {
  104447. var hotAPI = require("vue-hot-reload-api")
  104448. hotAPI.install(require("vue"), false)
  104449. if (!hotAPI.compatible) return
  104450. module.hot.accept()
  104451. if (!module.hot.data) {
  104452. hotAPI.createRecord("data-v-ada52cc8", Component.options)
  104453. } else {
  104454. hotAPI.reload("data-v-ada52cc8", Component.options)
  104455. }
  104456. module.hot.dispose(function (data) {
  104457. disposed = true
  104458. })
  104459. })()}
  104460. module.exports = Component.exports
  104461. /***/ }),
  104462. /* 203 */
  104463. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  104464. "use strict";
  104465. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  104466. //
  104467. //
  104468. //
  104469. //
  104470. /* harmony default export */ __webpack_exports__["default"] = ({
  104471. name: 'v-title',
  104472. data: function data() {
  104473. return {};
  104474. },
  104475. mounted: function mounted() {
  104476. this.updateTitle();
  104477. },
  104478. beforeUpdate: function beforeUpdate() {
  104479. this.updateTitle();
  104480. },
  104481. activated: function activated() {
  104482. this.updateTitle();
  104483. },
  104484. methods: {
  104485. updateTitle: function updateTitle() {
  104486. var slots = this.$slots.default;
  104487. if (typeof slots === 'undefined' || slots.length < 1 || typeof slots[0].text !== 'string') {
  104488. return;
  104489. }
  104490. var text = slots[0].text;
  104491. var _document = document,
  104492. title = _document.title;
  104493. if (text !== title) this.setTile(text);
  104494. },
  104495. setTile: function setTile(title) {
  104496. document.title = title;
  104497. var mobile = navigator.userAgent.toLowerCase();
  104498. if (/iphone|ipad|ipod/.test(mobile)) {
  104499. var iframe = document.createElement('iframe');
  104500. iframe.style.display = 'none';
  104501. var iframeCallback = function iframeCallback() {
  104502. setTimeout(function () {
  104503. iframe.removeEventListener('load', iframeCallback);
  104504. document.body.removeChild(iframe);
  104505. }, 0);
  104506. };
  104507. iframe.addEventListener('load', iframeCallback);
  104508. document.body.appendChild(iframe);
  104509. }
  104510. }
  104511. }
  104512. });
  104513. /***/ }),
  104514. /* 204 */
  104515. /***/ (function(module, exports, __webpack_require__) {
  104516. var render = function() {
  104517. var _vm = this
  104518. var _h = _vm.$createElement
  104519. var _c = _vm._self._c || _h
  104520. return false ? _c("h1", [_vm._t("default")], 2) : _vm._e()
  104521. }
  104522. var staticRenderFns = []
  104523. render._withStripped = true
  104524. module.exports = { render: render, staticRenderFns: staticRenderFns }
  104525. if (false) {
  104526. module.hot.accept()
  104527. if (module.hot.data) {
  104528. require("vue-hot-reload-api") .rerender("data-v-ada52cc8", module.exports)
  104529. }
  104530. }
  104531. /***/ }),
  104532. /* 205 */
  104533. /***/ (function(module, exports, __webpack_require__) {
  104534. var disposed = false
  104535. var normalizeComponent = __webpack_require__(2)
  104536. /* script */
  104537. var __vue_script__ = __webpack_require__(206)
  104538. /* template */
  104539. var __vue_template__ = __webpack_require__(207)
  104540. /* template functional */
  104541. var __vue_template_functional__ = false
  104542. /* styles */
  104543. var __vue_styles__ = null
  104544. /* scopeId */
  104545. var __vue_scopeId__ = null
  104546. /* moduleIdentifier (server only) */
  104547. var __vue_module_identifier__ = null
  104548. var Component = normalizeComponent(
  104549. __vue_script__,
  104550. __vue_template__,
  104551. __vue_template_functional__,
  104552. __vue_styles__,
  104553. __vue_scopeId__,
  104554. __vue_module_identifier__
  104555. )
  104556. Component.options.__file = "resources/assets/js/_components/sreachTitle.vue"
  104557. /* hot reload */
  104558. if (false) {(function () {
  104559. var hotAPI = require("vue-hot-reload-api")
  104560. hotAPI.install(require("vue"), false)
  104561. if (!hotAPI.compatible) return
  104562. module.hot.accept()
  104563. if (!module.hot.data) {
  104564. hotAPI.createRecord("data-v-0e8d1888", Component.options)
  104565. } else {
  104566. hotAPI.reload("data-v-0e8d1888", Component.options)
  104567. }
  104568. module.hot.dispose(function (data) {
  104569. disposed = true
  104570. })
  104571. })()}
  104572. module.exports = Component.exports
  104573. /***/ }),
  104574. /* 206 */
  104575. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  104576. "use strict";
  104577. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  104578. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  104579. //
  104580. //
  104581. //
  104582. //
  104583. /* harmony default export */ __webpack_exports__["default"] = ({
  104584. name: 'sreach-title',
  104585. props: {
  104586. val: {}
  104587. },
  104588. methods: {
  104589. count: function count(obj) {
  104590. var _this = this;
  104591. try {
  104592. if (typeof obj === "undefined") {
  104593. return 0;
  104594. }
  104595. if (typeof obj === "number" || obj instanceof Date) {
  104596. obj += "";
  104597. }
  104598. if (typeof obj.length === 'number') {
  104599. if ((typeof obj === "undefined" ? "undefined" : _typeof(obj)) === 'object') {
  104600. var i = 0;
  104601. $A.each(obj, function (key, val) {
  104602. if (_this.count(val) > 0) i++;
  104603. });
  104604. return i;
  104605. }
  104606. return obj.length;
  104607. } else {
  104608. var _i = 0,
  104609. key = void 0;
  104610. for (key in obj) {
  104611. if (this.count(obj) > 0) _i++;
  104612. }
  104613. return _i;
  104614. }
  104615. } catch (e) {
  104616. return 0;
  104617. }
  104618. }
  104619. }
  104620. });
  104621. /***/ }),
  104622. /* 207 */
  104623. /***/ (function(module, exports, __webpack_require__) {
  104624. var render = function() {
  104625. var _vm = this
  104626. var _h = _vm.$createElement
  104627. var _c = _vm._self._c || _h
  104628. return _c(
  104629. "div",
  104630. { class: [_vm.count(_vm.val) > 0 ? "item-title-active" : "item-title"] },
  104631. [_vm._t("default")],
  104632. 2
  104633. )
  104634. }
  104635. var staticRenderFns = []
  104636. render._withStripped = true
  104637. module.exports = { render: render, staticRenderFns: staticRenderFns }
  104638. if (false) {
  104639. module.hot.accept()
  104640. if (module.hot.data) {
  104641. require("vue-hot-reload-api") .rerender("data-v-0e8d1888", module.exports)
  104642. }
  104643. }
  104644. /***/ }),
  104645. /* 208 */
  104646. /***/ (function(module, exports, __webpack_require__) {
  104647. var disposed = false
  104648. function injectStyle (ssrContext) {
  104649. if (disposed) return
  104650. __webpack_require__(209)
  104651. __webpack_require__(211)
  104652. }
  104653. var normalizeComponent = __webpack_require__(2)
  104654. /* script */
  104655. var __vue_script__ = __webpack_require__(213)
  104656. /* template */
  104657. var __vue_template__ = __webpack_require__(218)
  104658. /* template functional */
  104659. var __vue_template_functional__ = false
  104660. /* styles */
  104661. var __vue_styles__ = injectStyle
  104662. /* scopeId */
  104663. var __vue_scopeId__ = "data-v-453021ba"
  104664. /* moduleIdentifier (server only) */
  104665. var __vue_module_identifier__ = null
  104666. var Component = normalizeComponent(
  104667. __vue_script__,
  104668. __vue_template__,
  104669. __vue_template_functional__,
  104670. __vue_styles__,
  104671. __vue_scopeId__,
  104672. __vue_module_identifier__
  104673. )
  104674. Component.options.__file = "resources/assets/js/main/components/UserInput.vue"
  104675. /* hot reload */
  104676. if (false) {(function () {
  104677. var hotAPI = require("vue-hot-reload-api")
  104678. hotAPI.install(require("vue"), false)
  104679. if (!hotAPI.compatible) return
  104680. module.hot.accept()
  104681. if (!module.hot.data) {
  104682. hotAPI.createRecord("data-v-453021ba", Component.options)
  104683. } else {
  104684. hotAPI.reload("data-v-453021ba", Component.options)
  104685. }
  104686. module.hot.dispose(function (data) {
  104687. disposed = true
  104688. })
  104689. })()}
  104690. module.exports = Component.exports
  104691. /***/ }),
  104692. /* 209 */
  104693. /***/ (function(module, exports, __webpack_require__) {
  104694. // style-loader: Adds some css to the DOM by adding a <style> tag
  104695. // load the styles
  104696. var content = __webpack_require__(210);
  104697. if(typeof content === 'string') content = [[module.i, content, '']];
  104698. if(content.locals) module.exports = content.locals;
  104699. // add the styles to the DOM
  104700. var update = __webpack_require__(1)("6a134112", content, false, {});
  104701. // Hot Module Replacement
  104702. if(false) {
  104703. // When the styles change, update the <style> tags
  104704. if(!content.locals) {
  104705. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-453021ba\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./UserInput.vue", function() {
  104706. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-453021ba\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./UserInput.vue");
  104707. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  104708. update(newContent);
  104709. });
  104710. }
  104711. // When the module is disposed, remove the <style> tags
  104712. module.hot.dispose(function() { update(); });
  104713. }
  104714. /***/ }),
  104715. /* 210 */
  104716. /***/ (function(module, exports, __webpack_require__) {
  104717. exports = module.exports = __webpack_require__(0)(false);
  104718. // imports
  104719. // module
  104720. exports.push([module.i, "\n.user-id-multiple[data-v-453021ba] {\n margin-bottom: 6px;\n overflow: auto;\n white-space: normal;\n}\n.user-id-multiple .ivu-tag[data-v-453021ba] {\n padding-left: 7px;\n}\n.user-id-multiple .user-id-multiple-item[data-v-453021ba] {\n display: inline-block;\n}\n.user-id-multiple .user-view-inline[data-v-453021ba] {\n height: 20px;\n line-height: 20px;\n vertical-align: top;\n}\n.user-id-input[data-v-453021ba] {\n display: inline-block;\n width: 100%;\n position: relative;\n vertical-align: middle;\n z-index: 5;\n}\n.user-id-input .user-id-subtitle[data-v-453021ba] {\n position: absolute;\n top: 2px;\n right: 32px;\n height: 30px;\n line-height: 30px;\n color: #cccccc;\n z-index: 2;\n}\n.user-id-input .user-id-spin[data-v-453021ba] {\n width: 14px;\n height: 14px;\n position: absolute;\n top: 50%;\n right: 34px;\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.user-id-input .user-id-spin > div[data-v-453021ba] {\n width: 100%;\n height: 100%;\n}\n", ""]);
  104721. // exports
  104722. /***/ }),
  104723. /* 211 */
  104724. /***/ (function(module, exports, __webpack_require__) {
  104725. // style-loader: Adds some css to the DOM by adding a <style> tag
  104726. // load the styles
  104727. var content = __webpack_require__(212);
  104728. if(typeof content === 'string') content = [[module.i, content, '']];
  104729. if(content.locals) module.exports = content.locals;
  104730. // add the styles to the DOM
  104731. var update = __webpack_require__(1)("6fd99c4c", content, false, {});
  104732. // Hot Module Replacement
  104733. if(false) {
  104734. // When the styles change, update the <style> tags
  104735. if(!content.locals) {
  104736. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-453021ba\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./UserInput.vue", function() {
  104737. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-453021ba\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./UserInput.vue");
  104738. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  104739. update(newContent);
  104740. });
  104741. }
  104742. // When the module is disposed, remove the <style> tags
  104743. module.hot.dispose(function() { update(); });
  104744. }
  104745. /***/ }),
  104746. /* 212 */
  104747. /***/ (function(module, exports, __webpack_require__) {
  104748. exports = module.exports = __webpack_require__(0)(false);
  104749. // imports
  104750. // module
  104751. exports.push([module.i, "\n.user-id-input-body {\n z-index: 99999;\n}\n.user-id-input-table {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n border-radius: 4px;\n overflow: hidden;\n -webkit-box-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.1);\n box-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.1);\n background-color: #ffffff;\n}\n.user-id-input-table .ivu-table table {\n width: 100% !important;\n}\n.user-id-input-table .ivu-table:before, .user-id-input-table .ivu-table:after {\n display: none !important;\n}\n.user-id-input-table .ivu-table-body {\n max-height: 180px;\n overflow: auto;\n}\n.user-id-input-table .ivu-table-small td {\n cursor: pointer;\n}\n.user-id-input-table .user-id-input-bottom {\n padding: 8px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n.user-id-input-table .user-id-input-bottom > button {\n font-size: 13px;\n margin-left: 10px;\n}\n", ""]);
  104752. // exports
  104753. /***/ }),
  104754. /* 213 */
  104755. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  104756. "use strict";
  104757. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  104758. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__modules_directives_clickoutside__ = __webpack_require__(214);
  104759. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__modules_directives_transfer_dom__ = __webpack_require__(215);
  104760. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__modules_directives_popper_novalue__ = __webpack_require__(216);
  104761. //
  104762. //
  104763. //
  104764. //
  104765. //
  104766. //
  104767. //
  104768. //
  104769. //
  104770. //
  104771. //
  104772. //
  104773. //
  104774. //
  104775. //
  104776. //
  104777. //
  104778. //
  104779. //
  104780. //
  104781. //
  104782. //
  104783. //
  104784. //
  104785. //
  104786. //
  104787. //
  104788. //
  104789. //
  104790. //
  104791. //
  104792. //
  104793. //
  104794. //
  104795. //
  104796. //
  104797. //
  104798. //
  104799. //
  104800. //
  104801. //
  104802. //
  104803. //
  104804. //
  104805. //
  104806. //
  104807. //
  104808. //
  104809. //
  104810. //
  104811. //
  104812. //
  104813. //
  104814. //
  104815. //
  104816. //
  104817. //
  104818. //
  104819. //
  104820. //
  104821. //
  104822. //
  104823. //
  104824. //
  104825. //
  104826. //
  104827. //
  104828. //
  104829. //
  104830. //
  104831. //
  104832. //
  104833. //
  104834. //
  104835. //
  104836. //
  104837. //
  104838. //
  104839. //
  104840. //
  104841. //
  104842. //
  104843. //
  104844. //
  104845. //
  104846. //
  104847. //
  104848. //
  104849. //
  104850. //
  104851. //
  104852. //
  104853. //
  104854. //
  104855. //
  104856. //
  104857. //
  104858. //
  104859. //
  104860. //
  104861. //
  104862. //
  104863. //
  104864. //
  104865. //
  104866. //
  104867. //
  104868. //
  104869. //
  104870. //
  104871. //
  104872. //
  104873. //
  104874. //
  104875. //
  104876. //
  104877. //
  104878. //
  104879. //
  104880. //
  104881. //
  104882. //
  104883. //
  104884. //
  104885. //
  104886. //
  104887. //
  104888. //
  104889. //
  104890. //
  104891. //
  104892. //
  104893. //
  104894. //
  104895. //
  104896. //
  104897. //
  104898. //
  104899. //
  104900. //
  104901. //
  104902. //
  104903. //
  104904. //
  104905. //
  104906. //
  104907. /* harmony default export */ __webpack_exports__["default"] = ({
  104908. name: 'UserInput',
  104909. directives: { clickoutside: __WEBPACK_IMPORTED_MODULE_0__modules_directives_clickoutside__["a" /* default */], TransferDom: __WEBPACK_IMPORTED_MODULE_1__modules_directives_transfer_dom__["a" /* default */] },
  104910. mixins: [__WEBPACK_IMPORTED_MODULE_2__modules_directives_popper_novalue__["a" /* default */]],
  104911. props: {
  104912. placement: {
  104913. default: 'bottom'
  104914. },
  104915. value: {
  104916. default: ''
  104917. },
  104918. identity: {
  104919. default: ''
  104920. },
  104921. noidentity: {
  104922. default: ''
  104923. },
  104924. nousername: {
  104925. default: ''
  104926. },
  104927. noprojectid: {
  104928. default: ''
  104929. },
  104930. projectid: {
  104931. default: ''
  104932. },
  104933. nobookid: {
  104934. default: ''
  104935. },
  104936. nogroupid: {
  104937. default: ''
  104938. },
  104939. placeholder: {
  104940. default: ''
  104941. },
  104942. disabled: {
  104943. type: Boolean,
  104944. default: false
  104945. },
  104946. transfer: {
  104947. type: Boolean,
  104948. default: function _default() {
  104949. return true;
  104950. }
  104951. },
  104952. loadstatus: {
  104953. default: false
  104954. },
  104955. multiple: {
  104956. type: Boolean,
  104957. default: false
  104958. },
  104959. multipleDisabled: {
  104960. default: ''
  104961. }
  104962. },
  104963. data: function data() {
  104964. return {
  104965. multipleLists: [],
  104966. userName: '',
  104967. nickName: '',
  104968. nickName__: '',
  104969. seleName: '',
  104970. searchShow: false,
  104971. spinShow: false,
  104972. skipSearch: false,
  104973. isConfirm: false,
  104974. tempName: '',
  104975. winStyle: {},
  104976. columns: [],
  104977. userLists: [],
  104978. noDataText: ''
  104979. };
  104980. },
  104981. watch: {
  104982. value: function value(val) {
  104983. if (this.multiple) {
  104984. this.multipleLists = this.formatMultipleLists(val);
  104985. return;
  104986. }
  104987. this.userName = $A.cloneData(val);
  104988. },
  104989. userName: function userName(val) {
  104990. var _this = this;
  104991. if (this.skipSearch === true) {
  104992. this.skipSearch = false;
  104993. } else {
  104994. this.nickName = '';
  104995. if (val) {
  104996. var where = { usernameequal: val };
  104997. if (typeof this.identity === "string") {
  104998. where['identity'] = this.identity;
  104999. }
  105000. if (typeof this.noidentity === "string") {
  105001. where['noidentity'] = this.noidentity;
  105002. }
  105003. if (typeof this.nousername === "string") {
  105004. where['nousername'] = this.nousername;
  105005. }
  105006. if (this.noprojectid) {
  105007. where['noprojectid'] = this.noprojectid;
  105008. }
  105009. if (this.projectid) {
  105010. where['projectid'] = this.projectid;
  105011. }
  105012. if (this.nobookid) {
  105013. where['nobookid'] = this.nobookid;
  105014. }
  105015. if (this.nogroupid) {
  105016. where['nogroupid'] = this.nogroupid;
  105017. }
  105018. this.noDataText = this.$L("数据加载中.....");
  105019. $A.apiAjax({
  105020. url: 'users/searchinfo',
  105021. data: {
  105022. where: where,
  105023. take: 1
  105024. },
  105025. beforeSend: function beforeSend() {
  105026. _this.spinShow = true;
  105027. },
  105028. complete: function complete() {
  105029. _this.spinShow = false;
  105030. _this.noDataText = _this.$L("没有相关的数据");
  105031. },
  105032. error: function error() {
  105033. _this.noDataText = _this.$L("数据加载失败!");
  105034. },
  105035. success: function success(res) {
  105036. if (res.ret === 1 && $A.count(res.data) > 0) {
  105037. var tmpData = res.data[0];
  105038. if (_this.multiple) {
  105039. _this.addMultipleLists(tmpData);
  105040. } else {
  105041. _this.userName = tmpData.username;
  105042. _this.seleName = tmpData.nickname || tmpData.username;
  105043. _this.nickName = tmpData.nickname || tmpData.username;
  105044. _this.nickName__ = tmpData.nickname || tmpData.username;
  105045. _this.$emit('input', _this.userName);
  105046. _this.$emit('change', tmpData);
  105047. }
  105048. }
  105049. }
  105050. });
  105051. }
  105052. }
  105053. },
  105054. nickName: function nickName(val) {
  105055. if (val != this.seleName || val == '') {
  105056. this.userName = '';
  105057. if (!this.multiple) {
  105058. this.$emit('input', this.userName);
  105059. this.$emit('change', {});
  105060. }
  105061. }
  105062. },
  105063. spinShow: function spinShow(val) {
  105064. if (typeof this.loadstatus === 'number') {
  105065. this.$emit('update:loadstatus', val ? this.loadstatus + 1 : this.loadstatus - 1);
  105066. } else if (typeof this.loadstatus === 'boolean') {
  105067. this.$emit('update:loadstatus', val);
  105068. }
  105069. },
  105070. searchShow: function searchShow(val) {
  105071. if (val) {
  105072. this.handleShowPopper();
  105073. this.updateMultipleLists();
  105074. } else {
  105075. this.handleClosePopper();
  105076. }
  105077. },
  105078. multipleLists: {
  105079. handler: function handler() {
  105080. if (this.searchShow) {
  105081. this.updateMultipleLists();
  105082. }
  105083. this.emitMultipleLists();
  105084. },
  105085. deep: true
  105086. }
  105087. },
  105088. computed: {
  105089. tableStyle: function tableStyle() {
  105090. return this.winStyle;
  105091. }
  105092. },
  105093. methods: {
  105094. initLanguage: function initLanguage() {
  105095. this.columns = [{
  105096. "title": this.$L("头像"),
  105097. "width": 60,
  105098. "align": 'center',
  105099. render: function render(h, params) {
  105100. return h('UserImg', {
  105101. props: {
  105102. info: params.row
  105103. },
  105104. style: {
  105105. width: "26px",
  105106. height: "26px",
  105107. fontSize: "13px",
  105108. lineHeight: "26px",
  105109. borderRadius: "50%",
  105110. verticalAlign: "middle"
  105111. }
  105112. });
  105113. }
  105114. }, {
  105115. "title": this.$L("用户名"),
  105116. "key": "username",
  105117. "minWidth": 80,
  105118. "ellipsis": true
  105119. }, {
  105120. "title": this.$L("昵称"),
  105121. "key": "nickname",
  105122. "minWidth": 80,
  105123. "ellipsis": true,
  105124. render: function render(h, params) {
  105125. return h('span', params.row.nickname || '-');
  105126. }
  105127. }];
  105128. if (this.multiple) {
  105129. this.columns.unshift({
  105130. type: 'selection',
  105131. width: 30,
  105132. align: 'center'
  105133. });
  105134. }
  105135. this.noDataText = this.$L("数据加载中.....");
  105136. this.isConfirm = this.$listeners['on-confirm'];
  105137. },
  105138. inputChange: function inputChange() {
  105139. var _this2 = this;
  105140. var val = this.nickName;
  105141. this.spinShow = false;
  105142. this.tempName = '';
  105143. if (val != '') {
  105144. setTimeout(function () {
  105145. if (val == _this2.nickName && val != _this2.tempName) {
  105146. _this2.searchEnter(false, function (res) {
  105147. return val == _this2.nickName;
  105148. });
  105149. }
  105150. }, 500);
  105151. } else {
  105152. this.searchShow = false;
  105153. }
  105154. },
  105155. handleShowPopper: function handleShowPopper() {
  105156. var _this3 = this;
  105157. if (this.timeout) clearTimeout(this.timeout);
  105158. this.timeout = setTimeout(function () {
  105159. _this3.visible = true;
  105160. }, this.delay);
  105161. },
  105162. handleClosePopper: function handleClosePopper() {
  105163. var _this4 = this;
  105164. if (this.timeout) {
  105165. clearTimeout(this.timeout);
  105166. if (!this.controlled) {
  105167. this.timeout = setTimeout(function () {
  105168. _this4.visible = false;
  105169. }, 100);
  105170. }
  105171. }
  105172. },
  105173. updateStyle: function updateStyle() {
  105174. this.winStyle = {
  105175. width: Math.max(this.$el.offsetWidth, 230) + 'px'
  105176. };
  105177. },
  105178. emptyAll: function emptyAll() {
  105179. this.userName = '';
  105180. this.nickName = '';
  105181. this.nickName__ = '';
  105182. this.seleName = '';
  105183. this.searchShow = false;
  105184. this.spinShow = false;
  105185. },
  105186. searchEnter: function searchEnter(verify, callback) {
  105187. var _this5 = this;
  105188. if (this.disabled === true) {
  105189. return;
  105190. }
  105191. if (this.spinShow === true) {
  105192. return;
  105193. }
  105194. if (verify === true) {
  105195. if (this.nickName === '') {
  105196. this.nickName__ = this.nickName;
  105197. }
  105198. if (this.nickName__ === this.nickName) {
  105199. return;
  105200. }
  105201. }
  105202. this.updateStyle();
  105203. this.nickName__ = this.nickName;
  105204. //
  105205. var where = { username: this.nickName };
  105206. if (typeof this.identity === "string") {
  105207. where['identity'] = this.identity;
  105208. }
  105209. if (typeof this.noidentity === "string") {
  105210. where['noidentity'] = this.noidentity;
  105211. }
  105212. if (typeof this.nousername === "string") {
  105213. where['nousername'] = this.nousername;
  105214. }
  105215. if (this.noprojectid) {
  105216. where['noprojectid'] = this.noprojectid;
  105217. }
  105218. if (this.projectid) {
  105219. where['projectid'] = this.projectid;
  105220. }
  105221. if (this.nobookid) {
  105222. where['nobookid'] = this.nobookid;
  105223. }
  105224. if (this.nogroupid) {
  105225. where['nogroupid'] = this.nogroupid;
  105226. }
  105227. this.tempName = where.username;
  105228. this.noDataText = this.$L("数据加载中.....");
  105229. $A.apiAjax({
  105230. url: 'users/searchinfo',
  105231. data: {
  105232. where: where,
  105233. take: 30
  105234. },
  105235. beforeSend: function beforeSend() {
  105236. _this5.spinShow = true;
  105237. },
  105238. complete: function complete() {
  105239. _this5.spinShow = false;
  105240. _this5.noDataText = _this5.$L("没有相关的数据");
  105241. },
  105242. error: function error() {
  105243. _this5.noDataText = _this5.$L("数据加载失败!");
  105244. },
  105245. success: function success(res) {
  105246. if (typeof callback === "function" && callback(res) === false) {
  105247. return;
  105248. }
  105249. if (res.ret === 1) {
  105250. _this5.userLists = res.data;
  105251. _this5.userLists.forEach(function (item) {
  105252. if (_this5.multiple) {
  105253. if (_this5.existMultipleDisabled(item.username)) {
  105254. item._disabled = true;
  105255. }
  105256. } else {
  105257. if (item.username == _this5.userName) {
  105258. item._highlight = true;
  105259. }
  105260. }
  105261. });
  105262. _this5.searchShow = true;
  105263. } else {
  105264. _this5.$Message.warning(res.msg);
  105265. _this5.emptyAll();
  105266. }
  105267. }
  105268. });
  105269. },
  105270. userChange: function userChange(item) {
  105271. if (this.multiple) {
  105272. if (this.existMultipleDisabled(item.username)) {
  105273. return;
  105274. }
  105275. var tempLists = this.multipleLists.filter(function (_ref) {
  105276. var username = _ref.username;
  105277. return username == item.username;
  105278. });
  105279. if (tempLists.length > 0) {
  105280. this.multipleLists = this.multipleLists.filter(function (_ref2) {
  105281. var username = _ref2.username;
  105282. return username != item.username;
  105283. });
  105284. } else {
  105285. this.addMultipleLists(item);
  105286. }
  105287. } else {
  105288. this.userName = item.username;
  105289. this.seleName = item.nickname || item.username;
  105290. this.nickName = item.nickname || item.username;
  105291. this.nickName__ = item.nickname || item.username;
  105292. this.skipSearch = true;
  105293. this.searchShow = false;
  105294. this.$emit('input', this.userName);
  105295. this.$emit('change', item);
  105296. }
  105297. },
  105298. userSelect: function userSelect() {
  105299. var _this6 = this;
  105300. if (this.multiple) {
  105301. (function () {
  105302. var lists = _this6.$refs.myTable.objData,
  105303. item = void 0,
  105304. inThe = void 0;
  105305. for (var index in lists) {
  105306. if (lists.hasOwnProperty(index)) {
  105307. item = lists[index];
  105308. inThe = _this6.multipleLists.find(function (_ref3) {
  105309. var username = _ref3.username;
  105310. return username == item.username;
  105311. });
  105312. if (item._isChecked) {
  105313. !inThe && _this6.multipleLists.push(item);
  105314. } else {
  105315. inThe && (_this6.multipleLists = _this6.multipleLists.filter(function (_ref4) {
  105316. var username = _ref4.username;
  105317. return username != item.username;
  105318. }));
  105319. }
  105320. }
  105321. }
  105322. })();
  105323. }
  105324. },
  105325. handleClose: function handleClose(e) {
  105326. if (this.multiple && $A(e.target).parents('.user-id-input-table').length > 0) {
  105327. return;
  105328. }
  105329. if (this.searchShow === true) {
  105330. this.searchShow = false;
  105331. }
  105332. },
  105333. existMultipleDisabled: function existMultipleDisabled(username) {
  105334. return this.multipleDisabled && $A.strExists(',' + this.multipleDisabled + ',', ',' + username + ',');
  105335. },
  105336. addMultipleLists: function addMultipleLists(item) {
  105337. var inThe = this.multipleLists.find(function (_ref5) {
  105338. var username = _ref5.username;
  105339. return username == item.username;
  105340. });
  105341. if (!inThe) {
  105342. this.multipleLists.push(item);
  105343. }
  105344. },
  105345. updateMultipleLists: function updateMultipleLists() {
  105346. var _this7 = this;
  105347. this.$nextTick(function () {
  105348. var lists = _this7.$refs.myTable.objData,
  105349. item = void 0,
  105350. inThe = void 0;
  105351. for (var index in lists) {
  105352. if (lists.hasOwnProperty(index)) {
  105353. item = lists[index];
  105354. inThe = _this7.multipleLists.find(function (_ref6) {
  105355. var username = _ref6.username;
  105356. return username == item.username;
  105357. });
  105358. _this7.$set(item, "_isChecked", !!inThe);
  105359. }
  105360. }
  105361. });
  105362. },
  105363. emitMultipleLists: function emitMultipleLists() {
  105364. var val = '';
  105365. this.multipleLists.forEach(function (tmp) {
  105366. if (val) {
  105367. val += ",";
  105368. }
  105369. val += tmp.username;
  105370. });
  105371. this.$emit('input', val);
  105372. },
  105373. formatMultipleLists: function formatMultipleLists(val) {
  105374. var arr = (val + ",").split(",");
  105375. var narr = [];
  105376. arr.forEach(function (uname) {
  105377. if (uname) {
  105378. var inn = false;
  105379. narr.some(function (tmp) {
  105380. if (tmp.username == uname) {
  105381. return inn = true;
  105382. }
  105383. });
  105384. if (!inn) {
  105385. narr.push({
  105386. username: uname
  105387. });
  105388. }
  105389. }
  105390. });
  105391. return narr;
  105392. },
  105393. onConfirm: function onConfirm(e) {
  105394. this.searchShow = false;
  105395. this.$emit('on-confirm', e);
  105396. }
  105397. },
  105398. mounted: function mounted() {
  105399. this.updatePopper();
  105400. //
  105401. if (this.multiple) {
  105402. this.multipleLists = this.formatMultipleLists(this.value);
  105403. } else if ($A.count(this.value) > 0) {
  105404. this.userName = this.value;
  105405. }
  105406. }
  105407. });
  105408. /***/ }),
  105409. /* 214 */
  105410. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  105411. "use strict";
  105412. /* harmony default export */ __webpack_exports__["a"] = ({
  105413. bind: function bind(el, binding, vnode) {
  105414. function documentHandler(e) {
  105415. if (el.contains(e.target)) {
  105416. return false;
  105417. }
  105418. if (binding.expression) {
  105419. binding.value(e);
  105420. }
  105421. }
  105422. el.__vueClickOutside__ = documentHandler;
  105423. document.addEventListener('click', documentHandler);
  105424. },
  105425. update: function update() {},
  105426. unbind: function unbind(el, binding) {
  105427. document.removeEventListener('click', el.__vueClickOutside__);
  105428. delete el.__vueClickOutside__;
  105429. }
  105430. });
  105431. /***/ }),
  105432. /* 215 */
  105433. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  105434. "use strict";
  105435. // Thanks to: https://github.com/airyland/vux/blob/v2/src/directives/transfer-dom/index.js
  105436. // Thanks to: https://github.com/calebroseland/vue-dom-portal
  105437. /**
  105438. * Get target DOM Node
  105439. * @param {(Node|string|Boolean)} [node=document.body] DOM Node, CSS selector, or Boolean
  105440. * @return {Node} The target that the el will be appended to
  105441. */
  105442. function getTarget(node) {
  105443. if (node === void 0) {
  105444. node = document.body;
  105445. }
  105446. if (node === true) {
  105447. return document.body;
  105448. }
  105449. return node instanceof window.Node ? node : document.querySelector(node);
  105450. }
  105451. var directive = {
  105452. inserted: function inserted(el, _ref, vnode) {
  105453. var value = _ref.value;
  105454. if (el.dataset && el.dataset.transfer !== 'true') return false;
  105455. el.className = el.className ? el.className + ' v-transfer-dom' : 'v-transfer-dom';
  105456. var parentNode = el.parentNode;
  105457. if (!parentNode) return;
  105458. var home = document.createComment('');
  105459. var hasMovedOut = false;
  105460. if (value !== false) {
  105461. parentNode.replaceChild(home, el); // moving out, el is no longer in the document
  105462. getTarget(value).appendChild(el); // moving into new place
  105463. hasMovedOut = true;
  105464. }
  105465. if (!el.__transferDomData) {
  105466. el.__transferDomData = {
  105467. parentNode: parentNode,
  105468. home: home,
  105469. target: getTarget(value),
  105470. hasMovedOut: hasMovedOut
  105471. };
  105472. }
  105473. },
  105474. componentUpdated: function componentUpdated(el, _ref2) {
  105475. var value = _ref2.value;
  105476. if (el.dataset && el.dataset.transfer !== 'true') return false;
  105477. // need to make sure children are done updating (vs. `update`)
  105478. var ref$1 = el.__transferDomData;
  105479. if (!ref$1) return;
  105480. // homes.get(el)
  105481. var parentNode = ref$1.parentNode;
  105482. var home = ref$1.home;
  105483. var hasMovedOut = ref$1.hasMovedOut; // recall where home is
  105484. if (!hasMovedOut && value) {
  105485. // remove from document and leave placeholder
  105486. parentNode.replaceChild(home, el);
  105487. // append to target
  105488. getTarget(value).appendChild(el);
  105489. el.__transferDomData = Object.assign({}, el.__transferDomData, { hasMovedOut: true, target: getTarget(value) });
  105490. } else if (hasMovedOut && value === false) {
  105491. // previously moved, coming back home
  105492. parentNode.replaceChild(el, home);
  105493. el.__transferDomData = Object.assign({}, el.__transferDomData, { hasMovedOut: false, target: getTarget(value) });
  105494. } else if (value) {
  105495. // already moved, going somewhere else
  105496. getTarget(value).appendChild(el);
  105497. }
  105498. },
  105499. unbind: function unbind(el) {
  105500. if (el.dataset && el.dataset.transfer !== 'true') return false;
  105501. el.className = el.className.replace('v-transfer-dom', '');
  105502. var ref$1 = el.__transferDomData;
  105503. if (!ref$1) return;
  105504. if (el.__transferDomData.hasMovedOut === true) {
  105505. el.__transferDomData.parentNode && el.__transferDomData.parentNode.appendChild(el);
  105506. }
  105507. el.__transferDomData = null;
  105508. }
  105509. };
  105510. /* harmony default export */ __webpack_exports__["a"] = (directive);
  105511. /***/ }),
  105512. /* 216 */
  105513. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  105514. "use strict";
  105515. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(4);
  105516. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__);
  105517. /**
  105518. * https://github.com/freeze-component/vue-popper
  105519. * */
  105520. var isServer = __WEBPACK_IMPORTED_MODULE_0_vue___default.a.prototype.$isServer;
  105521. var Popper = isServer ? function () {} : __webpack_require__(217); // eslint-disable-line
  105522. /* harmony default export */ __webpack_exports__["a"] = ({
  105523. props: {
  105524. placement: {
  105525. type: String,
  105526. default: 'bottom'
  105527. },
  105528. boundariesPadding: {
  105529. type: Number,
  105530. default: 5
  105531. },
  105532. reference: Object,
  105533. popper: Object,
  105534. offset: {
  105535. default: 0
  105536. },
  105537. transition: String,
  105538. options: {
  105539. type: Object,
  105540. default: function _default() {
  105541. return {
  105542. modifiers: {
  105543. computeStyle: {
  105544. gpuAcceleration: false
  105545. },
  105546. preventOverflow: {
  105547. boundariesElement: 'window'
  105548. }
  105549. }
  105550. };
  105551. }
  105552. }
  105553. },
  105554. data: function data() {
  105555. return {
  105556. visible: false
  105557. };
  105558. },
  105559. watch: {
  105560. visible: function visible(val) {
  105561. if (val) {
  105562. if (this.handleIndexIncrease) this.handleIndexIncrease(); // just use for Poptip
  105563. this.updatePopper();
  105564. this.$emit('on-popper-show');
  105565. } else {
  105566. this.$emit('on-popper-hide');
  105567. }
  105568. }
  105569. },
  105570. methods: {
  105571. createPopper: function createPopper() {
  105572. var _this = this;
  105573. if (isServer) return;
  105574. if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.placement)) {
  105575. return;
  105576. }
  105577. var options = this.options;
  105578. var popper = this.popper || this.$refs.popper;
  105579. var reference = this.reference || this.$refs.reference;
  105580. if (!popper || !reference) return;
  105581. if (this.popperJS && this.popperJS.hasOwnProperty('destroy')) {
  105582. this.popperJS.destroy();
  105583. }
  105584. options.placement = this.placement;
  105585. if (!options.modifiers.offset) {
  105586. options.modifiers.offset = {};
  105587. }
  105588. options.modifiers.offset.offset = this.offset;
  105589. options.onCreate = function () {
  105590. _this.$nextTick(_this.updatePopper);
  105591. _this.$emit('created', _this);
  105592. };
  105593. this.popperJS = new Popper(reference, popper, options);
  105594. },
  105595. updatePopper: function updatePopper() {
  105596. if (isServer) return;
  105597. this.popperJS ? this.popperJS.update() : this.createPopper();
  105598. },
  105599. doDestroy: function doDestroy() {
  105600. if (isServer) return;
  105601. if (this.visible) return;
  105602. this.popperJS.destroy();
  105603. this.popperJS = null;
  105604. }
  105605. },
  105606. updated: function updated() {
  105607. var _this2 = this;
  105608. this.$nextTick(function () {
  105609. return _this2.updatePopper();
  105610. });
  105611. },
  105612. beforeDestroy: function beforeDestroy() {
  105613. if (isServer) return;
  105614. if (this.popperJS) {
  105615. this.popperJS.destroy();
  105616. }
  105617. }
  105618. });
  105619. /***/ }),
  105620. /* 217 */
  105621. /***/ (function(module, exports, __webpack_require__) {
  105622. /* WEBPACK VAR INJECTION */(function(global) {/**!
  105623. * @fileOverview Kickass library to create and place poppers near their reference elements.
  105624. * @version 1.16.1
  105625. * @license
  105626. * Copyright (c) 2016 Federico Zivolo and contributors
  105627. *
  105628. * Permission is hereby granted, free of charge, to any person obtaining a copy
  105629. * of this software and associated documentation files (the "Software"), to deal
  105630. * in the Software without restriction, including without limitation the rights
  105631. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  105632. * copies of the Software, and to permit persons to whom the Software is
  105633. * furnished to do so, subject to the following conditions:
  105634. *
  105635. * The above copyright notice and this permission notice shall be included in all
  105636. * copies or substantial portions of the Software.
  105637. *
  105638. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  105639. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  105640. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  105641. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  105642. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  105643. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  105644. * SOFTWARE.
  105645. */
  105646. (function (global, factory) {
  105647. true ? module.exports = factory() :
  105648. typeof define === 'function' && define.amd ? define(factory) :
  105649. (global.Popper = factory());
  105650. }(this, (function () { 'use strict';
  105651. var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
  105652. var timeoutDuration = function () {
  105653. var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
  105654. for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
  105655. if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
  105656. return 1;
  105657. }
  105658. }
  105659. return 0;
  105660. }();
  105661. function microtaskDebounce(fn) {
  105662. var called = false;
  105663. return function () {
  105664. if (called) {
  105665. return;
  105666. }
  105667. called = true;
  105668. window.Promise.resolve().then(function () {
  105669. called = false;
  105670. fn();
  105671. });
  105672. };
  105673. }
  105674. function taskDebounce(fn) {
  105675. var scheduled = false;
  105676. return function () {
  105677. if (!scheduled) {
  105678. scheduled = true;
  105679. setTimeout(function () {
  105680. scheduled = false;
  105681. fn();
  105682. }, timeoutDuration);
  105683. }
  105684. };
  105685. }
  105686. var supportsMicroTasks = isBrowser && window.Promise;
  105687. /**
  105688. * Create a debounced version of a method, that's asynchronously deferred
  105689. * but called in the minimum time possible.
  105690. *
  105691. * @method
  105692. * @memberof Popper.Utils
  105693. * @argument {Function} fn
  105694. * @returns {Function}
  105695. */
  105696. var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
  105697. /**
  105698. * Check if the given variable is a function
  105699. * @method
  105700. * @memberof Popper.Utils
  105701. * @argument {Any} functionToCheck - variable to check
  105702. * @returns {Boolean} answer to: is a function?
  105703. */
  105704. function isFunction(functionToCheck) {
  105705. var getType = {};
  105706. return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
  105707. }
  105708. /**
  105709. * Get CSS computed property of the given element
  105710. * @method
  105711. * @memberof Popper.Utils
  105712. * @argument {Eement} element
  105713. * @argument {String} property
  105714. */
  105715. function getStyleComputedProperty(element, property) {
  105716. if (element.nodeType !== 1) {
  105717. return [];
  105718. }
  105719. // NOTE: 1 DOM access here
  105720. var window = element.ownerDocument.defaultView;
  105721. var css = window.getComputedStyle(element, null);
  105722. return property ? css[property] : css;
  105723. }
  105724. /**
  105725. * Returns the parentNode or the host of the element
  105726. * @method
  105727. * @memberof Popper.Utils
  105728. * @argument {Element} element
  105729. * @returns {Element} parent
  105730. */
  105731. function getParentNode(element) {
  105732. if (element.nodeName === 'HTML') {
  105733. return element;
  105734. }
  105735. return element.parentNode || element.host;
  105736. }
  105737. /**
  105738. * Returns the scrolling parent of the given element
  105739. * @method
  105740. * @memberof Popper.Utils
  105741. * @argument {Element} element
  105742. * @returns {Element} scroll parent
  105743. */
  105744. function getScrollParent(element) {
  105745. // Return body, `getScroll` will take care to get the correct `scrollTop` from it
  105746. if (!element) {
  105747. return document.body;
  105748. }
  105749. switch (element.nodeName) {
  105750. case 'HTML':
  105751. case 'BODY':
  105752. return element.ownerDocument.body;
  105753. case '#document':
  105754. return element.body;
  105755. }
  105756. // Firefox want us to check `-x` and `-y` variations as well
  105757. var _getStyleComputedProp = getStyleComputedProperty(element),
  105758. overflow = _getStyleComputedProp.overflow,
  105759. overflowX = _getStyleComputedProp.overflowX,
  105760. overflowY = _getStyleComputedProp.overflowY;
  105761. if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
  105762. return element;
  105763. }
  105764. return getScrollParent(getParentNode(element));
  105765. }
  105766. /**
  105767. * Returns the reference node of the reference object, or the reference object itself.
  105768. * @method
  105769. * @memberof Popper.Utils
  105770. * @param {Element|Object} reference - the reference element (the popper will be relative to this)
  105771. * @returns {Element} parent
  105772. */
  105773. function getReferenceNode(reference) {
  105774. return reference && reference.referenceNode ? reference.referenceNode : reference;
  105775. }
  105776. var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
  105777. var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
  105778. /**
  105779. * Determines if the browser is Internet Explorer
  105780. * @method
  105781. * @memberof Popper.Utils
  105782. * @param {Number} version to check
  105783. * @returns {Boolean} isIE
  105784. */
  105785. function isIE(version) {
  105786. if (version === 11) {
  105787. return isIE11;
  105788. }
  105789. if (version === 10) {
  105790. return isIE10;
  105791. }
  105792. return isIE11 || isIE10;
  105793. }
  105794. /**
  105795. * Returns the offset parent of the given element
  105796. * @method
  105797. * @memberof Popper.Utils
  105798. * @argument {Element} element
  105799. * @returns {Element} offset parent
  105800. */
  105801. function getOffsetParent(element) {
  105802. if (!element) {
  105803. return document.documentElement;
  105804. }
  105805. var noOffsetParent = isIE(10) ? document.body : null;
  105806. // NOTE: 1 DOM access here
  105807. var offsetParent = element.offsetParent || null;
  105808. // Skip hidden elements which don't have an offsetParent
  105809. while (offsetParent === noOffsetParent && element.nextElementSibling) {
  105810. offsetParent = (element = element.nextElementSibling).offsetParent;
  105811. }
  105812. var nodeName = offsetParent && offsetParent.nodeName;
  105813. if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
  105814. return element ? element.ownerDocument.documentElement : document.documentElement;
  105815. }
  105816. // .offsetParent will return the closest TH, TD or TABLE in case
  105817. // no offsetParent is present, I hate this job...
  105818. if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
  105819. return getOffsetParent(offsetParent);
  105820. }
  105821. return offsetParent;
  105822. }
  105823. function isOffsetContainer(element) {
  105824. var nodeName = element.nodeName;
  105825. if (nodeName === 'BODY') {
  105826. return false;
  105827. }
  105828. return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
  105829. }
  105830. /**
  105831. * Finds the root node (document, shadowDOM root) of the given element
  105832. * @method
  105833. * @memberof Popper.Utils
  105834. * @argument {Element} node
  105835. * @returns {Element} root node
  105836. */
  105837. function getRoot(node) {
  105838. if (node.parentNode !== null) {
  105839. return getRoot(node.parentNode);
  105840. }
  105841. return node;
  105842. }
  105843. /**
  105844. * Finds the offset parent common to the two provided nodes
  105845. * @method
  105846. * @memberof Popper.Utils
  105847. * @argument {Element} element1
  105848. * @argument {Element} element2
  105849. * @returns {Element} common offset parent
  105850. */
  105851. function findCommonOffsetParent(element1, element2) {
  105852. // This check is needed to avoid errors in case one of the elements isn't defined for any reason
  105853. if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
  105854. return document.documentElement;
  105855. }
  105856. // Here we make sure to give as "start" the element that comes first in the DOM
  105857. var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
  105858. var start = order ? element1 : element2;
  105859. var end = order ? element2 : element1;
  105860. // Get common ancestor container
  105861. var range = document.createRange();
  105862. range.setStart(start, 0);
  105863. range.setEnd(end, 0);
  105864. var commonAncestorContainer = range.commonAncestorContainer;
  105865. // Both nodes are inside #document
  105866. if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
  105867. if (isOffsetContainer(commonAncestorContainer)) {
  105868. return commonAncestorContainer;
  105869. }
  105870. return getOffsetParent(commonAncestorContainer);
  105871. }
  105872. // one of the nodes is inside shadowDOM, find which one
  105873. var element1root = getRoot(element1);
  105874. if (element1root.host) {
  105875. return findCommonOffsetParent(element1root.host, element2);
  105876. } else {
  105877. return findCommonOffsetParent(element1, getRoot(element2).host);
  105878. }
  105879. }
  105880. /**
  105881. * Gets the scroll value of the given element in the given side (top and left)
  105882. * @method
  105883. * @memberof Popper.Utils
  105884. * @argument {Element} element
  105885. * @argument {String} side `top` or `left`
  105886. * @returns {number} amount of scrolled pixels
  105887. */
  105888. function getScroll(element) {
  105889. var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
  105890. var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
  105891. var nodeName = element.nodeName;
  105892. if (nodeName === 'BODY' || nodeName === 'HTML') {
  105893. var html = element.ownerDocument.documentElement;
  105894. var scrollingElement = element.ownerDocument.scrollingElement || html;
  105895. return scrollingElement[upperSide];
  105896. }
  105897. return element[upperSide];
  105898. }
  105899. /*
  105900. * Sum or subtract the element scroll values (left and top) from a given rect object
  105901. * @method
  105902. * @memberof Popper.Utils
  105903. * @param {Object} rect - Rect object you want to change
  105904. * @param {HTMLElement} element - The element from the function reads the scroll values
  105905. * @param {Boolean} subtract - set to true if you want to subtract the scroll values
  105906. * @return {Object} rect - The modifier rect object
  105907. */
  105908. function includeScroll(rect, element) {
  105909. var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  105910. var scrollTop = getScroll(element, 'top');
  105911. var scrollLeft = getScroll(element, 'left');
  105912. var modifier = subtract ? -1 : 1;
  105913. rect.top += scrollTop * modifier;
  105914. rect.bottom += scrollTop * modifier;
  105915. rect.left += scrollLeft * modifier;
  105916. rect.right += scrollLeft * modifier;
  105917. return rect;
  105918. }
  105919. /*
  105920. * Helper to detect borders of a given element
  105921. * @method
  105922. * @memberof Popper.Utils
  105923. * @param {CSSStyleDeclaration} styles
  105924. * Result of `getStyleComputedProperty` on the given element
  105925. * @param {String} axis - `x` or `y`
  105926. * @return {number} borders - The borders size of the given axis
  105927. */
  105928. function getBordersSize(styles, axis) {
  105929. var sideA = axis === 'x' ? 'Left' : 'Top';
  105930. var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
  105931. return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);
  105932. }
  105933. function getSize(axis, body, html, computedStyle) {
  105934. return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
  105935. }
  105936. function getWindowSizes(document) {
  105937. var body = document.body;
  105938. var html = document.documentElement;
  105939. var computedStyle = isIE(10) && getComputedStyle(html);
  105940. return {
  105941. height: getSize('Height', body, html, computedStyle),
  105942. width: getSize('Width', body, html, computedStyle)
  105943. };
  105944. }
  105945. var classCallCheck = function (instance, Constructor) {
  105946. if (!(instance instanceof Constructor)) {
  105947. throw new TypeError("Cannot call a class as a function");
  105948. }
  105949. };
  105950. var createClass = function () {
  105951. function defineProperties(target, props) {
  105952. for (var i = 0; i < props.length; i++) {
  105953. var descriptor = props[i];
  105954. descriptor.enumerable = descriptor.enumerable || false;
  105955. descriptor.configurable = true;
  105956. if ("value" in descriptor) descriptor.writable = true;
  105957. Object.defineProperty(target, descriptor.key, descriptor);
  105958. }
  105959. }
  105960. return function (Constructor, protoProps, staticProps) {
  105961. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  105962. if (staticProps) defineProperties(Constructor, staticProps);
  105963. return Constructor;
  105964. };
  105965. }();
  105966. var defineProperty = function (obj, key, value) {
  105967. if (key in obj) {
  105968. Object.defineProperty(obj, key, {
  105969. value: value,
  105970. enumerable: true,
  105971. configurable: true,
  105972. writable: true
  105973. });
  105974. } else {
  105975. obj[key] = value;
  105976. }
  105977. return obj;
  105978. };
  105979. var _extends = Object.assign || function (target) {
  105980. for (var i = 1; i < arguments.length; i++) {
  105981. var source = arguments[i];
  105982. for (var key in source) {
  105983. if (Object.prototype.hasOwnProperty.call(source, key)) {
  105984. target[key] = source[key];
  105985. }
  105986. }
  105987. }
  105988. return target;
  105989. };
  105990. /**
  105991. * Given element offsets, generate an output similar to getBoundingClientRect
  105992. * @method
  105993. * @memberof Popper.Utils
  105994. * @argument {Object} offsets
  105995. * @returns {Object} ClientRect like output
  105996. */
  105997. function getClientRect(offsets) {
  105998. return _extends({}, offsets, {
  105999. right: offsets.left + offsets.width,
  106000. bottom: offsets.top + offsets.height
  106001. });
  106002. }
  106003. /**
  106004. * Get bounding client rect of given element
  106005. * @method
  106006. * @memberof Popper.Utils
  106007. * @param {HTMLElement} element
  106008. * @return {Object} client rect
  106009. */
  106010. function getBoundingClientRect(element) {
  106011. var rect = {};
  106012. // IE10 10 FIX: Please, don't ask, the element isn't
  106013. // considered in DOM in some circumstances...
  106014. // This isn't reproducible in IE10 compatibility mode of IE11
  106015. try {
  106016. if (isIE(10)) {
  106017. rect = element.getBoundingClientRect();
  106018. var scrollTop = getScroll(element, 'top');
  106019. var scrollLeft = getScroll(element, 'left');
  106020. rect.top += scrollTop;
  106021. rect.left += scrollLeft;
  106022. rect.bottom += scrollTop;
  106023. rect.right += scrollLeft;
  106024. } else {
  106025. rect = element.getBoundingClientRect();
  106026. }
  106027. } catch (e) {}
  106028. var result = {
  106029. left: rect.left,
  106030. top: rect.top,
  106031. width: rect.right - rect.left,
  106032. height: rect.bottom - rect.top
  106033. };
  106034. // subtract scrollbar size from sizes
  106035. var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
  106036. var width = sizes.width || element.clientWidth || result.width;
  106037. var height = sizes.height || element.clientHeight || result.height;
  106038. var horizScrollbar = element.offsetWidth - width;
  106039. var vertScrollbar = element.offsetHeight - height;
  106040. // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
  106041. // we make this check conditional for performance reasons
  106042. if (horizScrollbar || vertScrollbar) {
  106043. var styles = getStyleComputedProperty(element);
  106044. horizScrollbar -= getBordersSize(styles, 'x');
  106045. vertScrollbar -= getBordersSize(styles, 'y');
  106046. result.width -= horizScrollbar;
  106047. result.height -= vertScrollbar;
  106048. }
  106049. return getClientRect(result);
  106050. }
  106051. function getOffsetRectRelativeToArbitraryNode(children, parent) {
  106052. var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  106053. var isIE10 = isIE(10);
  106054. var isHTML = parent.nodeName === 'HTML';
  106055. var childrenRect = getBoundingClientRect(children);
  106056. var parentRect = getBoundingClientRect(parent);
  106057. var scrollParent = getScrollParent(children);
  106058. var styles = getStyleComputedProperty(parent);
  106059. var borderTopWidth = parseFloat(styles.borderTopWidth);
  106060. var borderLeftWidth = parseFloat(styles.borderLeftWidth);
  106061. // In cases where the parent is fixed, we must ignore negative scroll in offset calc
  106062. if (fixedPosition && isHTML) {
  106063. parentRect.top = Math.max(parentRect.top, 0);
  106064. parentRect.left = Math.max(parentRect.left, 0);
  106065. }
  106066. var offsets = getClientRect({
  106067. top: childrenRect.top - parentRect.top - borderTopWidth,
  106068. left: childrenRect.left - parentRect.left - borderLeftWidth,
  106069. width: childrenRect.width,
  106070. height: childrenRect.height
  106071. });
  106072. offsets.marginTop = 0;
  106073. offsets.marginLeft = 0;
  106074. // Subtract margins of documentElement in case it's being used as parent
  106075. // we do this only on HTML because it's the only element that behaves
  106076. // differently when margins are applied to it. The margins are included in
  106077. // the box of the documentElement, in the other cases not.
  106078. if (!isIE10 && isHTML) {
  106079. var marginTop = parseFloat(styles.marginTop);
  106080. var marginLeft = parseFloat(styles.marginLeft);
  106081. offsets.top -= borderTopWidth - marginTop;
  106082. offsets.bottom -= borderTopWidth - marginTop;
  106083. offsets.left -= borderLeftWidth - marginLeft;
  106084. offsets.right -= borderLeftWidth - marginLeft;
  106085. // Attach marginTop and marginLeft because in some circumstances we may need them
  106086. offsets.marginTop = marginTop;
  106087. offsets.marginLeft = marginLeft;
  106088. }
  106089. if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
  106090. offsets = includeScroll(offsets, parent);
  106091. }
  106092. return offsets;
  106093. }
  106094. function getViewportOffsetRectRelativeToArtbitraryNode(element) {
  106095. var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  106096. var html = element.ownerDocument.documentElement;
  106097. var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
  106098. var width = Math.max(html.clientWidth, window.innerWidth || 0);
  106099. var height = Math.max(html.clientHeight, window.innerHeight || 0);
  106100. var scrollTop = !excludeScroll ? getScroll(html) : 0;
  106101. var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
  106102. var offset = {
  106103. top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
  106104. left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
  106105. width: width,
  106106. height: height
  106107. };
  106108. return getClientRect(offset);
  106109. }
  106110. /**
  106111. * Check if the given element is fixed or is inside a fixed parent
  106112. * @method
  106113. * @memberof Popper.Utils
  106114. * @argument {Element} element
  106115. * @argument {Element} customContainer
  106116. * @returns {Boolean} answer to "isFixed?"
  106117. */
  106118. function isFixed(element) {
  106119. var nodeName = element.nodeName;
  106120. if (nodeName === 'BODY' || nodeName === 'HTML') {
  106121. return false;
  106122. }
  106123. if (getStyleComputedProperty(element, 'position') === 'fixed') {
  106124. return true;
  106125. }
  106126. var parentNode = getParentNode(element);
  106127. if (!parentNode) {
  106128. return false;
  106129. }
  106130. return isFixed(parentNode);
  106131. }
  106132. /**
  106133. * Finds the first parent of an element that has a transformed property defined
  106134. * @method
  106135. * @memberof Popper.Utils
  106136. * @argument {Element} element
  106137. * @returns {Element} first transformed parent or documentElement
  106138. */
  106139. function getFixedPositionOffsetParent(element) {
  106140. // This check is needed to avoid errors in case one of the elements isn't defined for any reason
  106141. if (!element || !element.parentElement || isIE()) {
  106142. return document.documentElement;
  106143. }
  106144. var el = element.parentElement;
  106145. while (el && getStyleComputedProperty(el, 'transform') === 'none') {
  106146. el = el.parentElement;
  106147. }
  106148. return el || document.documentElement;
  106149. }
  106150. /**
  106151. * Computed the boundaries limits and return them
  106152. * @method
  106153. * @memberof Popper.Utils
  106154. * @param {HTMLElement} popper
  106155. * @param {HTMLElement} reference
  106156. * @param {number} padding
  106157. * @param {HTMLElement} boundariesElement - Element used to define the boundaries
  106158. * @param {Boolean} fixedPosition - Is in fixed position mode
  106159. * @returns {Object} Coordinates of the boundaries
  106160. */
  106161. function getBoundaries(popper, reference, padding, boundariesElement) {
  106162. var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  106163. // NOTE: 1 DOM access here
  106164. var boundaries = { top: 0, left: 0 };
  106165. var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
  106166. // Handle viewport case
  106167. if (boundariesElement === 'viewport') {
  106168. boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
  106169. } else {
  106170. // Handle other cases based on DOM element used as boundaries
  106171. var boundariesNode = void 0;
  106172. if (boundariesElement === 'scrollParent') {
  106173. boundariesNode = getScrollParent(getParentNode(reference));
  106174. if (boundariesNode.nodeName === 'BODY') {
  106175. boundariesNode = popper.ownerDocument.documentElement;
  106176. }
  106177. } else if (boundariesElement === 'window') {
  106178. boundariesNode = popper.ownerDocument.documentElement;
  106179. } else {
  106180. boundariesNode = boundariesElement;
  106181. }
  106182. var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
  106183. // In case of HTML, we need a different computation
  106184. if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
  106185. var _getWindowSizes = getWindowSizes(popper.ownerDocument),
  106186. height = _getWindowSizes.height,
  106187. width = _getWindowSizes.width;
  106188. boundaries.top += offsets.top - offsets.marginTop;
  106189. boundaries.bottom = height + offsets.top;
  106190. boundaries.left += offsets.left - offsets.marginLeft;
  106191. boundaries.right = width + offsets.left;
  106192. } else {
  106193. // for all the other DOM elements, this one is good
  106194. boundaries = offsets;
  106195. }
  106196. }
  106197. // Add paddings
  106198. padding = padding || 0;
  106199. var isPaddingNumber = typeof padding === 'number';
  106200. boundaries.left += isPaddingNumber ? padding : padding.left || 0;
  106201. boundaries.top += isPaddingNumber ? padding : padding.top || 0;
  106202. boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
  106203. boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
  106204. return boundaries;
  106205. }
  106206. function getArea(_ref) {
  106207. var width = _ref.width,
  106208. height = _ref.height;
  106209. return width * height;
  106210. }
  106211. /**
  106212. * Utility used to transform the `auto` placement to the placement with more
  106213. * available space.
  106214. * @method
  106215. * @memberof Popper.Utils
  106216. * @argument {Object} data - The data object generated by update method
  106217. * @argument {Object} options - Modifiers configuration and options
  106218. * @returns {Object} The data object, properly modified
  106219. */
  106220. function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
  106221. var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
  106222. if (placement.indexOf('auto') === -1) {
  106223. return placement;
  106224. }
  106225. var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
  106226. var rects = {
  106227. top: {
  106228. width: boundaries.width,
  106229. height: refRect.top - boundaries.top
  106230. },
  106231. right: {
  106232. width: boundaries.right - refRect.right,
  106233. height: boundaries.height
  106234. },
  106235. bottom: {
  106236. width: boundaries.width,
  106237. height: boundaries.bottom - refRect.bottom
  106238. },
  106239. left: {
  106240. width: refRect.left - boundaries.left,
  106241. height: boundaries.height
  106242. }
  106243. };
  106244. var sortedAreas = Object.keys(rects).map(function (key) {
  106245. return _extends({
  106246. key: key
  106247. }, rects[key], {
  106248. area: getArea(rects[key])
  106249. });
  106250. }).sort(function (a, b) {
  106251. return b.area - a.area;
  106252. });
  106253. var filteredAreas = sortedAreas.filter(function (_ref2) {
  106254. var width = _ref2.width,
  106255. height = _ref2.height;
  106256. return width >= popper.clientWidth && height >= popper.clientHeight;
  106257. });
  106258. var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
  106259. var variation = placement.split('-')[1];
  106260. return computedPlacement + (variation ? '-' + variation : '');
  106261. }
  106262. /**
  106263. * Get offsets to the reference element
  106264. * @method
  106265. * @memberof Popper.Utils
  106266. * @param {Object} state
  106267. * @param {Element} popper - the popper element
  106268. * @param {Element} reference - the reference element (the popper will be relative to this)
  106269. * @param {Element} fixedPosition - is in fixed position mode
  106270. * @returns {Object} An object containing the offsets which will be applied to the popper
  106271. */
  106272. function getReferenceOffsets(state, popper, reference) {
  106273. var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
  106274. var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
  106275. return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
  106276. }
  106277. /**
  106278. * Get the outer sizes of the given element (offset size + margins)
  106279. * @method
  106280. * @memberof Popper.Utils
  106281. * @argument {Element} element
  106282. * @returns {Object} object containing width and height properties
  106283. */
  106284. function getOuterSizes(element) {
  106285. var window = element.ownerDocument.defaultView;
  106286. var styles = window.getComputedStyle(element);
  106287. var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
  106288. var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
  106289. var result = {
  106290. width: element.offsetWidth + y,
  106291. height: element.offsetHeight + x
  106292. };
  106293. return result;
  106294. }
  106295. /**
  106296. * Get the opposite placement of the given one
  106297. * @method
  106298. * @memberof Popper.Utils
  106299. * @argument {String} placement
  106300. * @returns {String} flipped placement
  106301. */
  106302. function getOppositePlacement(placement) {
  106303. var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
  106304. return placement.replace(/left|right|bottom|top/g, function (matched) {
  106305. return hash[matched];
  106306. });
  106307. }
  106308. /**
  106309. * Get offsets to the popper
  106310. * @method
  106311. * @memberof Popper.Utils
  106312. * @param {Object} position - CSS position the Popper will get applied
  106313. * @param {HTMLElement} popper - the popper element
  106314. * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
  106315. * @param {String} placement - one of the valid placement options
  106316. * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
  106317. */
  106318. function getPopperOffsets(popper, referenceOffsets, placement) {
  106319. placement = placement.split('-')[0];
  106320. // Get popper node sizes
  106321. var popperRect = getOuterSizes(popper);
  106322. // Add position, width and height to our offsets object
  106323. var popperOffsets = {
  106324. width: popperRect.width,
  106325. height: popperRect.height
  106326. };
  106327. // depending by the popper placement we have to compute its offsets slightly differently
  106328. var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
  106329. var mainSide = isHoriz ? 'top' : 'left';
  106330. var secondarySide = isHoriz ? 'left' : 'top';
  106331. var measurement = isHoriz ? 'height' : 'width';
  106332. var secondaryMeasurement = !isHoriz ? 'height' : 'width';
  106333. popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
  106334. if (placement === secondarySide) {
  106335. popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
  106336. } else {
  106337. popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
  106338. }
  106339. return popperOffsets;
  106340. }
  106341. /**
  106342. * Mimics the `find` method of Array
  106343. * @method
  106344. * @memberof Popper.Utils
  106345. * @argument {Array} arr
  106346. * @argument prop
  106347. * @argument value
  106348. * @returns index or -1
  106349. */
  106350. function find(arr, check) {
  106351. // use native find if supported
  106352. if (Array.prototype.find) {
  106353. return arr.find(check);
  106354. }
  106355. // use `filter` to obtain the same behavior of `find`
  106356. return arr.filter(check)[0];
  106357. }
  106358. /**
  106359. * Return the index of the matching object
  106360. * @method
  106361. * @memberof Popper.Utils
  106362. * @argument {Array} arr
  106363. * @argument prop
  106364. * @argument value
  106365. * @returns index or -1
  106366. */
  106367. function findIndex(arr, prop, value) {
  106368. // use native findIndex if supported
  106369. if (Array.prototype.findIndex) {
  106370. return arr.findIndex(function (cur) {
  106371. return cur[prop] === value;
  106372. });
  106373. }
  106374. // use `find` + `indexOf` if `findIndex` isn't supported
  106375. var match = find(arr, function (obj) {
  106376. return obj[prop] === value;
  106377. });
  106378. return arr.indexOf(match);
  106379. }
  106380. /**
  106381. * Loop trough the list of modifiers and run them in order,
  106382. * each of them will then edit the data object.
  106383. * @method
  106384. * @memberof Popper.Utils
  106385. * @param {dataObject} data
  106386. * @param {Array} modifiers
  106387. * @param {String} ends - Optional modifier name used as stopper
  106388. * @returns {dataObject}
  106389. */
  106390. function runModifiers(modifiers, data, ends) {
  106391. var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
  106392. modifiersToRun.forEach(function (modifier) {
  106393. if (modifier['function']) {
  106394. // eslint-disable-line dot-notation
  106395. console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
  106396. }
  106397. var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
  106398. if (modifier.enabled && isFunction(fn)) {
  106399. // Add properties to offsets to make them a complete clientRect object
  106400. // we do this before each modifier to make sure the previous one doesn't
  106401. // mess with these values
  106402. data.offsets.popper = getClientRect(data.offsets.popper);
  106403. data.offsets.reference = getClientRect(data.offsets.reference);
  106404. data = fn(data, modifier);
  106405. }
  106406. });
  106407. return data;
  106408. }
  106409. /**
  106410. * Updates the position of the popper, computing the new offsets and applying
  106411. * the new style.<br />
  106412. * Prefer `scheduleUpdate` over `update` because of performance reasons.
  106413. * @method
  106414. * @memberof Popper
  106415. */
  106416. function update() {
  106417. // if popper is destroyed, don't perform any further update
  106418. if (this.state.isDestroyed) {
  106419. return;
  106420. }
  106421. var data = {
  106422. instance: this,
  106423. styles: {},
  106424. arrowStyles: {},
  106425. attributes: {},
  106426. flipped: false,
  106427. offsets: {}
  106428. };
  106429. // compute reference element offsets
  106430. data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
  106431. // compute auto placement, store placement inside the data object,
  106432. // modifiers will be able to edit `placement` if needed
  106433. // and refer to originalPlacement to know the original value
  106434. data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
  106435. // store the computed placement inside `originalPlacement`
  106436. data.originalPlacement = data.placement;
  106437. data.positionFixed = this.options.positionFixed;
  106438. // compute the popper offsets
  106439. data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
  106440. data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
  106441. // run the modifiers
  106442. data = runModifiers(this.modifiers, data);
  106443. // the first `update` will call `onCreate` callback
  106444. // the other ones will call `onUpdate` callback
  106445. if (!this.state.isCreated) {
  106446. this.state.isCreated = true;
  106447. this.options.onCreate(data);
  106448. } else {
  106449. this.options.onUpdate(data);
  106450. }
  106451. }
  106452. /**
  106453. * Helper used to know if the given modifier is enabled.
  106454. * @method
  106455. * @memberof Popper.Utils
  106456. * @returns {Boolean}
  106457. */
  106458. function isModifierEnabled(modifiers, modifierName) {
  106459. return modifiers.some(function (_ref) {
  106460. var name = _ref.name,
  106461. enabled = _ref.enabled;
  106462. return enabled && name === modifierName;
  106463. });
  106464. }
  106465. /**
  106466. * Get the prefixed supported property name
  106467. * @method
  106468. * @memberof Popper.Utils
  106469. * @argument {String} property (camelCase)
  106470. * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
  106471. */
  106472. function getSupportedPropertyName(property) {
  106473. var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
  106474. var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
  106475. for (var i = 0; i < prefixes.length; i++) {
  106476. var prefix = prefixes[i];
  106477. var toCheck = prefix ? '' + prefix + upperProp : property;
  106478. if (typeof document.body.style[toCheck] !== 'undefined') {
  106479. return toCheck;
  106480. }
  106481. }
  106482. return null;
  106483. }
  106484. /**
  106485. * Destroys the popper.
  106486. * @method
  106487. * @memberof Popper
  106488. */
  106489. function destroy() {
  106490. this.state.isDestroyed = true;
  106491. // touch DOM only if `applyStyle` modifier is enabled
  106492. if (isModifierEnabled(this.modifiers, 'applyStyle')) {
  106493. this.popper.removeAttribute('x-placement');
  106494. this.popper.style.position = '';
  106495. this.popper.style.top = '';
  106496. this.popper.style.left = '';
  106497. this.popper.style.right = '';
  106498. this.popper.style.bottom = '';
  106499. this.popper.style.willChange = '';
  106500. this.popper.style[getSupportedPropertyName('transform')] = '';
  106501. }
  106502. this.disableEventListeners();
  106503. // remove the popper if user explicitly asked for the deletion on destroy
  106504. // do not use `remove` because IE11 doesn't support it
  106505. if (this.options.removeOnDestroy) {
  106506. this.popper.parentNode.removeChild(this.popper);
  106507. }
  106508. return this;
  106509. }
  106510. /**
  106511. * Get the window associated with the element
  106512. * @argument {Element} element
  106513. * @returns {Window}
  106514. */
  106515. function getWindow(element) {
  106516. var ownerDocument = element.ownerDocument;
  106517. return ownerDocument ? ownerDocument.defaultView : window;
  106518. }
  106519. function attachToScrollParents(scrollParent, event, callback, scrollParents) {
  106520. var isBody = scrollParent.nodeName === 'BODY';
  106521. var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
  106522. target.addEventListener(event, callback, { passive: true });
  106523. if (!isBody) {
  106524. attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
  106525. }
  106526. scrollParents.push(target);
  106527. }
  106528. /**
  106529. * Setup needed event listeners used to update the popper position
  106530. * @method
  106531. * @memberof Popper.Utils
  106532. * @private
  106533. */
  106534. function setupEventListeners(reference, options, state, updateBound) {
  106535. // Resize event listener on window
  106536. state.updateBound = updateBound;
  106537. getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
  106538. // Scroll event listener on scroll parents
  106539. var scrollElement = getScrollParent(reference);
  106540. attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
  106541. state.scrollElement = scrollElement;
  106542. state.eventsEnabled = true;
  106543. return state;
  106544. }
  106545. /**
  106546. * It will add resize/scroll events and start recalculating
  106547. * position of the popper element when they are triggered.
  106548. * @method
  106549. * @memberof Popper
  106550. */
  106551. function enableEventListeners() {
  106552. if (!this.state.eventsEnabled) {
  106553. this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
  106554. }
  106555. }
  106556. /**
  106557. * Remove event listeners used to update the popper position
  106558. * @method
  106559. * @memberof Popper.Utils
  106560. * @private
  106561. */
  106562. function removeEventListeners(reference, state) {
  106563. // Remove resize event listener on window
  106564. getWindow(reference).removeEventListener('resize', state.updateBound);
  106565. // Remove scroll event listener on scroll parents
  106566. state.scrollParents.forEach(function (target) {
  106567. target.removeEventListener('scroll', state.updateBound);
  106568. });
  106569. // Reset state
  106570. state.updateBound = null;
  106571. state.scrollParents = [];
  106572. state.scrollElement = null;
  106573. state.eventsEnabled = false;
  106574. return state;
  106575. }
  106576. /**
  106577. * It will remove resize/scroll events and won't recalculate popper position
  106578. * when they are triggered. It also won't trigger `onUpdate` callback anymore,
  106579. * unless you call `update` method manually.
  106580. * @method
  106581. * @memberof Popper
  106582. */
  106583. function disableEventListeners() {
  106584. if (this.state.eventsEnabled) {
  106585. cancelAnimationFrame(this.scheduleUpdate);
  106586. this.state = removeEventListeners(this.reference, this.state);
  106587. }
  106588. }
  106589. /**
  106590. * Tells if a given input is a number
  106591. * @method
  106592. * @memberof Popper.Utils
  106593. * @param {*} input to check
  106594. * @return {Boolean}
  106595. */
  106596. function isNumeric(n) {
  106597. return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
  106598. }
  106599. /**
  106600. * Set the style to the given popper
  106601. * @method
  106602. * @memberof Popper.Utils
  106603. * @argument {Element} element - Element to apply the style to
  106604. * @argument {Object} styles
  106605. * Object with a list of properties and values which will be applied to the element
  106606. */
  106607. function setStyles(element, styles) {
  106608. Object.keys(styles).forEach(function (prop) {
  106609. var unit = '';
  106610. // add unit if the value is numeric and is one of the following
  106611. if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
  106612. unit = 'px';
  106613. }
  106614. element.style[prop] = styles[prop] + unit;
  106615. });
  106616. }
  106617. /**
  106618. * Set the attributes to the given popper
  106619. * @method
  106620. * @memberof Popper.Utils
  106621. * @argument {Element} element - Element to apply the attributes to
  106622. * @argument {Object} styles
  106623. * Object with a list of properties and values which will be applied to the element
  106624. */
  106625. function setAttributes(element, attributes) {
  106626. Object.keys(attributes).forEach(function (prop) {
  106627. var value = attributes[prop];
  106628. if (value !== false) {
  106629. element.setAttribute(prop, attributes[prop]);
  106630. } else {
  106631. element.removeAttribute(prop);
  106632. }
  106633. });
  106634. }
  106635. /**
  106636. * @function
  106637. * @memberof Modifiers
  106638. * @argument {Object} data - The data object generated by `update` method
  106639. * @argument {Object} data.styles - List of style properties - values to apply to popper element
  106640. * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
  106641. * @argument {Object} options - Modifiers configuration and options
  106642. * @returns {Object} The same data object
  106643. */
  106644. function applyStyle(data) {
  106645. // any property present in `data.styles` will be applied to the popper,
  106646. // in this way we can make the 3rd party modifiers add custom styles to it
  106647. // Be aware, modifiers could override the properties defined in the previous
  106648. // lines of this modifier!
  106649. setStyles(data.instance.popper, data.styles);
  106650. // any property present in `data.attributes` will be applied to the popper,
  106651. // they will be set as HTML attributes of the element
  106652. setAttributes(data.instance.popper, data.attributes);
  106653. // if arrowElement is defined and arrowStyles has some properties
  106654. if (data.arrowElement && Object.keys(data.arrowStyles).length) {
  106655. setStyles(data.arrowElement, data.arrowStyles);
  106656. }
  106657. return data;
  106658. }
  106659. /**
  106660. * Set the x-placement attribute before everything else because it could be used
  106661. * to add margins to the popper margins needs to be calculated to get the
  106662. * correct popper offsets.
  106663. * @method
  106664. * @memberof Popper.modifiers
  106665. * @param {HTMLElement} reference - The reference element used to position the popper
  106666. * @param {HTMLElement} popper - The HTML element used as popper
  106667. * @param {Object} options - Popper.js options
  106668. */
  106669. function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
  106670. // compute reference element offsets
  106671. var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
  106672. // compute auto placement, store placement inside the data object,
  106673. // modifiers will be able to edit `placement` if needed
  106674. // and refer to originalPlacement to know the original value
  106675. var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
  106676. popper.setAttribute('x-placement', placement);
  106677. // Apply `position` to popper before anything else because
  106678. // without the position applied we can't guarantee correct computations
  106679. setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
  106680. return options;
  106681. }
  106682. /**
  106683. * @function
  106684. * @memberof Popper.Utils
  106685. * @argument {Object} data - The data object generated by `update` method
  106686. * @argument {Boolean} shouldRound - If the offsets should be rounded at all
  106687. * @returns {Object} The popper's position offsets rounded
  106688. *
  106689. * The tale of pixel-perfect positioning. It's still not 100% perfect, but as
  106690. * good as it can be within reason.
  106691. * Discussion here: https://github.com/FezVrasta/popper.js/pull/715
  106692. *
  106693. * Low DPI screens cause a popper to be blurry if not using full pixels (Safari
  106694. * as well on High DPI screens).
  106695. *
  106696. * Firefox prefers no rounding for positioning and does not have blurriness on
  106697. * high DPI screens.
  106698. *
  106699. * Only horizontal placement and left/right values need to be considered.
  106700. */
  106701. function getRoundedOffsets(data, shouldRound) {
  106702. var _data$offsets = data.offsets,
  106703. popper = _data$offsets.popper,
  106704. reference = _data$offsets.reference;
  106705. var round = Math.round,
  106706. floor = Math.floor;
  106707. var noRound = function noRound(v) {
  106708. return v;
  106709. };
  106710. var referenceWidth = round(reference.width);
  106711. var popperWidth = round(popper.width);
  106712. var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
  106713. var isVariation = data.placement.indexOf('-') !== -1;
  106714. var sameWidthParity = referenceWidth % 2 === popperWidth % 2;
  106715. var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;
  106716. var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;
  106717. var verticalToInteger = !shouldRound ? noRound : round;
  106718. return {
  106719. left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),
  106720. top: verticalToInteger(popper.top),
  106721. bottom: verticalToInteger(popper.bottom),
  106722. right: horizontalToInteger(popper.right)
  106723. };
  106724. }
  106725. var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);
  106726. /**
  106727. * @function
  106728. * @memberof Modifiers
  106729. * @argument {Object} data - The data object generated by `update` method
  106730. * @argument {Object} options - Modifiers configuration and options
  106731. * @returns {Object} The data object, properly modified
  106732. */
  106733. function computeStyle(data, options) {
  106734. var x = options.x,
  106735. y = options.y;
  106736. var popper = data.offsets.popper;
  106737. // Remove this legacy support in Popper.js v2
  106738. var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
  106739. return modifier.name === 'applyStyle';
  106740. }).gpuAcceleration;
  106741. if (legacyGpuAccelerationOption !== undefined) {
  106742. console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
  106743. }
  106744. var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
  106745. var offsetParent = getOffsetParent(data.instance.popper);
  106746. var offsetParentRect = getBoundingClientRect(offsetParent);
  106747. // Styles
  106748. var styles = {
  106749. position: popper.position
  106750. };
  106751. var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);
  106752. var sideA = x === 'bottom' ? 'top' : 'bottom';
  106753. var sideB = y === 'right' ? 'left' : 'right';
  106754. // if gpuAcceleration is set to `true` and transform is supported,
  106755. // we use `translate3d` to apply the position to the popper we
  106756. // automatically use the supported prefixed version if needed
  106757. var prefixedProperty = getSupportedPropertyName('transform');
  106758. // now, let's make a step back and look at this code closely (wtf?)
  106759. // If the content of the popper grows once it's been positioned, it
  106760. // may happen that the popper gets misplaced because of the new content
  106761. // overflowing its reference element
  106762. // To avoid this problem, we provide two options (x and y), which allow
  106763. // the consumer to define the offset origin.
  106764. // If we position a popper on top of a reference element, we can set
  106765. // `x` to `top` to make the popper grow towards its top instead of
  106766. // its bottom.
  106767. var left = void 0,
  106768. top = void 0;
  106769. if (sideA === 'bottom') {
  106770. // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)
  106771. // and not the bottom of the html element
  106772. if (offsetParent.nodeName === 'HTML') {
  106773. top = -offsetParent.clientHeight + offsets.bottom;
  106774. } else {
  106775. top = -offsetParentRect.height + offsets.bottom;
  106776. }
  106777. } else {
  106778. top = offsets.top;
  106779. }
  106780. if (sideB === 'right') {
  106781. if (offsetParent.nodeName === 'HTML') {
  106782. left = -offsetParent.clientWidth + offsets.right;
  106783. } else {
  106784. left = -offsetParentRect.width + offsets.right;
  106785. }
  106786. } else {
  106787. left = offsets.left;
  106788. }
  106789. if (gpuAcceleration && prefixedProperty) {
  106790. styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
  106791. styles[sideA] = 0;
  106792. styles[sideB] = 0;
  106793. styles.willChange = 'transform';
  106794. } else {
  106795. // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
  106796. var invertTop = sideA === 'bottom' ? -1 : 1;
  106797. var invertLeft = sideB === 'right' ? -1 : 1;
  106798. styles[sideA] = top * invertTop;
  106799. styles[sideB] = left * invertLeft;
  106800. styles.willChange = sideA + ', ' + sideB;
  106801. }
  106802. // Attributes
  106803. var attributes = {
  106804. 'x-placement': data.placement
  106805. };
  106806. // Update `data` attributes, styles and arrowStyles
  106807. data.attributes = _extends({}, attributes, data.attributes);
  106808. data.styles = _extends({}, styles, data.styles);
  106809. data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
  106810. return data;
  106811. }
  106812. /**
  106813. * Helper used to know if the given modifier depends from another one.<br />
  106814. * It checks if the needed modifier is listed and enabled.
  106815. * @method
  106816. * @memberof Popper.Utils
  106817. * @param {Array} modifiers - list of modifiers
  106818. * @param {String} requestingName - name of requesting modifier
  106819. * @param {String} requestedName - name of requested modifier
  106820. * @returns {Boolean}
  106821. */
  106822. function isModifierRequired(modifiers, requestingName, requestedName) {
  106823. var requesting = find(modifiers, function (_ref) {
  106824. var name = _ref.name;
  106825. return name === requestingName;
  106826. });
  106827. var isRequired = !!requesting && modifiers.some(function (modifier) {
  106828. return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
  106829. });
  106830. if (!isRequired) {
  106831. var _requesting = '`' + requestingName + '`';
  106832. var requested = '`' + requestedName + '`';
  106833. console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
  106834. }
  106835. return isRequired;
  106836. }
  106837. /**
  106838. * @function
  106839. * @memberof Modifiers
  106840. * @argument {Object} data - The data object generated by update method
  106841. * @argument {Object} options - Modifiers configuration and options
  106842. * @returns {Object} The data object, properly modified
  106843. */
  106844. function arrow(data, options) {
  106845. var _data$offsets$arrow;
  106846. // arrow depends on keepTogether in order to work
  106847. if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
  106848. return data;
  106849. }
  106850. var arrowElement = options.element;
  106851. // if arrowElement is a string, suppose it's a CSS selector
  106852. if (typeof arrowElement === 'string') {
  106853. arrowElement = data.instance.popper.querySelector(arrowElement);
  106854. // if arrowElement is not found, don't run the modifier
  106855. if (!arrowElement) {
  106856. return data;
  106857. }
  106858. } else {
  106859. // if the arrowElement isn't a query selector we must check that the
  106860. // provided DOM node is child of its popper node
  106861. if (!data.instance.popper.contains(arrowElement)) {
  106862. console.warn('WARNING: `arrow.element` must be child of its popper element!');
  106863. return data;
  106864. }
  106865. }
  106866. var placement = data.placement.split('-')[0];
  106867. var _data$offsets = data.offsets,
  106868. popper = _data$offsets.popper,
  106869. reference = _data$offsets.reference;
  106870. var isVertical = ['left', 'right'].indexOf(placement) !== -1;
  106871. var len = isVertical ? 'height' : 'width';
  106872. var sideCapitalized = isVertical ? 'Top' : 'Left';
  106873. var side = sideCapitalized.toLowerCase();
  106874. var altSide = isVertical ? 'left' : 'top';
  106875. var opSide = isVertical ? 'bottom' : 'right';
  106876. var arrowElementSize = getOuterSizes(arrowElement)[len];
  106877. //
  106878. // extends keepTogether behavior making sure the popper and its
  106879. // reference have enough pixels in conjunction
  106880. //
  106881. // top/left side
  106882. if (reference[opSide] - arrowElementSize < popper[side]) {
  106883. data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
  106884. }
  106885. // bottom/right side
  106886. if (reference[side] + arrowElementSize > popper[opSide]) {
  106887. data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
  106888. }
  106889. data.offsets.popper = getClientRect(data.offsets.popper);
  106890. // compute center of the popper
  106891. var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
  106892. // Compute the sideValue using the updated popper offsets
  106893. // take popper margin in account because we don't have this info available
  106894. var css = getStyleComputedProperty(data.instance.popper);
  106895. var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);
  106896. var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);
  106897. var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
  106898. // prevent arrowElement from being placed not contiguously to its popper
  106899. sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
  106900. data.arrowElement = arrowElement;
  106901. data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
  106902. return data;
  106903. }
  106904. /**
  106905. * Get the opposite placement variation of the given one
  106906. * @method
  106907. * @memberof Popper.Utils
  106908. * @argument {String} placement variation
  106909. * @returns {String} flipped placement variation
  106910. */
  106911. function getOppositeVariation(variation) {
  106912. if (variation === 'end') {
  106913. return 'start';
  106914. } else if (variation === 'start') {
  106915. return 'end';
  106916. }
  106917. return variation;
  106918. }
  106919. /**
  106920. * List of accepted placements to use as values of the `placement` option.<br />
  106921. * Valid placements are:
  106922. * - `auto`
  106923. * - `top`
  106924. * - `right`
  106925. * - `bottom`
  106926. * - `left`
  106927. *
  106928. * Each placement can have a variation from this list:
  106929. * - `-start`
  106930. * - `-end`
  106931. *
  106932. * Variations are interpreted easily if you think of them as the left to right
  106933. * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
  106934. * is right.<br />
  106935. * Vertically (`left` and `right`), `start` is top and `end` is bottom.
  106936. *
  106937. * Some valid examples are:
  106938. * - `top-end` (on top of reference, right aligned)
  106939. * - `right-start` (on right of reference, top aligned)
  106940. * - `bottom` (on bottom, centered)
  106941. * - `auto-end` (on the side with more space available, alignment depends by placement)
  106942. *
  106943. * @static
  106944. * @type {Array}
  106945. * @enum {String}
  106946. * @readonly
  106947. * @method placements
  106948. * @memberof Popper
  106949. */
  106950. var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
  106951. // Get rid of `auto` `auto-start` and `auto-end`
  106952. var validPlacements = placements.slice(3);
  106953. /**
  106954. * Given an initial placement, returns all the subsequent placements
  106955. * clockwise (or counter-clockwise).
  106956. *
  106957. * @method
  106958. * @memberof Popper.Utils
  106959. * @argument {String} placement - A valid placement (it accepts variations)
  106960. * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
  106961. * @returns {Array} placements including their variations
  106962. */
  106963. function clockwise(placement) {
  106964. var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  106965. var index = validPlacements.indexOf(placement);
  106966. var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
  106967. return counter ? arr.reverse() : arr;
  106968. }
  106969. var BEHAVIORS = {
  106970. FLIP: 'flip',
  106971. CLOCKWISE: 'clockwise',
  106972. COUNTERCLOCKWISE: 'counterclockwise'
  106973. };
  106974. /**
  106975. * @function
  106976. * @memberof Modifiers
  106977. * @argument {Object} data - The data object generated by update method
  106978. * @argument {Object} options - Modifiers configuration and options
  106979. * @returns {Object} The data object, properly modified
  106980. */
  106981. function flip(data, options) {
  106982. // if `inner` modifier is enabled, we can't use the `flip` modifier
  106983. if (isModifierEnabled(data.instance.modifiers, 'inner')) {
  106984. return data;
  106985. }
  106986. if (data.flipped && data.placement === data.originalPlacement) {
  106987. // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
  106988. return data;
  106989. }
  106990. var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
  106991. var placement = data.placement.split('-')[0];
  106992. var placementOpposite = getOppositePlacement(placement);
  106993. var variation = data.placement.split('-')[1] || '';
  106994. var flipOrder = [];
  106995. switch (options.behavior) {
  106996. case BEHAVIORS.FLIP:
  106997. flipOrder = [placement, placementOpposite];
  106998. break;
  106999. case BEHAVIORS.CLOCKWISE:
  107000. flipOrder = clockwise(placement);
  107001. break;
  107002. case BEHAVIORS.COUNTERCLOCKWISE:
  107003. flipOrder = clockwise(placement, true);
  107004. break;
  107005. default:
  107006. flipOrder = options.behavior;
  107007. }
  107008. flipOrder.forEach(function (step, index) {
  107009. if (placement !== step || flipOrder.length === index + 1) {
  107010. return data;
  107011. }
  107012. placement = data.placement.split('-')[0];
  107013. placementOpposite = getOppositePlacement(placement);
  107014. var popperOffsets = data.offsets.popper;
  107015. var refOffsets = data.offsets.reference;
  107016. // using floor because the reference offsets may contain decimals we are not going to consider here
  107017. var floor = Math.floor;
  107018. var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
  107019. var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
  107020. var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
  107021. var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
  107022. var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
  107023. var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
  107024. // flip the variation if required
  107025. var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
  107026. // flips variation if reference element overflows boundaries
  107027. var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
  107028. // flips variation if popper content overflows boundaries
  107029. var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
  107030. var flippedVariation = flippedVariationByRef || flippedVariationByContent;
  107031. if (overlapsRef || overflowsBoundaries || flippedVariation) {
  107032. // this boolean to detect any flip loop
  107033. data.flipped = true;
  107034. if (overlapsRef || overflowsBoundaries) {
  107035. placement = flipOrder[index + 1];
  107036. }
  107037. if (flippedVariation) {
  107038. variation = getOppositeVariation(variation);
  107039. }
  107040. data.placement = placement + (variation ? '-' + variation : '');
  107041. // this object contains `position`, we want to preserve it along with
  107042. // any additional property we may add in the future
  107043. data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
  107044. data = runModifiers(data.instance.modifiers, data, 'flip');
  107045. }
  107046. });
  107047. return data;
  107048. }
  107049. /**
  107050. * @function
  107051. * @memberof Modifiers
  107052. * @argument {Object} data - The data object generated by update method
  107053. * @argument {Object} options - Modifiers configuration and options
  107054. * @returns {Object} The data object, properly modified
  107055. */
  107056. function keepTogether(data) {
  107057. var _data$offsets = data.offsets,
  107058. popper = _data$offsets.popper,
  107059. reference = _data$offsets.reference;
  107060. var placement = data.placement.split('-')[0];
  107061. var floor = Math.floor;
  107062. var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
  107063. var side = isVertical ? 'right' : 'bottom';
  107064. var opSide = isVertical ? 'left' : 'top';
  107065. var measurement = isVertical ? 'width' : 'height';
  107066. if (popper[side] < floor(reference[opSide])) {
  107067. data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
  107068. }
  107069. if (popper[opSide] > floor(reference[side])) {
  107070. data.offsets.popper[opSide] = floor(reference[side]);
  107071. }
  107072. return data;
  107073. }
  107074. /**
  107075. * Converts a string containing value + unit into a px value number
  107076. * @function
  107077. * @memberof {modifiers~offset}
  107078. * @private
  107079. * @argument {String} str - Value + unit string
  107080. * @argument {String} measurement - `height` or `width`
  107081. * @argument {Object} popperOffsets
  107082. * @argument {Object} referenceOffsets
  107083. * @returns {Number|String}
  107084. * Value in pixels, or original string if no values were extracted
  107085. */
  107086. function toValue(str, measurement, popperOffsets, referenceOffsets) {
  107087. // separate value from unit
  107088. var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
  107089. var value = +split[1];
  107090. var unit = split[2];
  107091. // If it's not a number it's an operator, I guess
  107092. if (!value) {
  107093. return str;
  107094. }
  107095. if (unit.indexOf('%') === 0) {
  107096. var element = void 0;
  107097. switch (unit) {
  107098. case '%p':
  107099. element = popperOffsets;
  107100. break;
  107101. case '%':
  107102. case '%r':
  107103. default:
  107104. element = referenceOffsets;
  107105. }
  107106. var rect = getClientRect(element);
  107107. return rect[measurement] / 100 * value;
  107108. } else if (unit === 'vh' || unit === 'vw') {
  107109. // if is a vh or vw, we calculate the size based on the viewport
  107110. var size = void 0;
  107111. if (unit === 'vh') {
  107112. size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
  107113. } else {
  107114. size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
  107115. }
  107116. return size / 100 * value;
  107117. } else {
  107118. // if is an explicit pixel unit, we get rid of the unit and keep the value
  107119. // if is an implicit unit, it's px, and we return just the value
  107120. return value;
  107121. }
  107122. }
  107123. /**
  107124. * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
  107125. * @function
  107126. * @memberof {modifiers~offset}
  107127. * @private
  107128. * @argument {String} offset
  107129. * @argument {Object} popperOffsets
  107130. * @argument {Object} referenceOffsets
  107131. * @argument {String} basePlacement
  107132. * @returns {Array} a two cells array with x and y offsets in numbers
  107133. */
  107134. function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
  107135. var offsets = [0, 0];
  107136. // Use height if placement is left or right and index is 0 otherwise use width
  107137. // in this way the first offset will use an axis and the second one
  107138. // will use the other one
  107139. var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
  107140. // Split the offset string to obtain a list of values and operands
  107141. // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
  107142. var fragments = offset.split(/(\+|\-)/).map(function (frag) {
  107143. return frag.trim();
  107144. });
  107145. // Detect if the offset string contains a pair of values or a single one
  107146. // they could be separated by comma or space
  107147. var divider = fragments.indexOf(find(fragments, function (frag) {
  107148. return frag.search(/,|\s/) !== -1;
  107149. }));
  107150. if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
  107151. console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
  107152. }
  107153. // If divider is found, we divide the list of values and operands to divide
  107154. // them by ofset X and Y.
  107155. var splitRegex = /\s*,\s*|\s+/;
  107156. var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
  107157. // Convert the values with units to absolute pixels to allow our computations
  107158. ops = ops.map(function (op, index) {
  107159. // Most of the units rely on the orientation of the popper
  107160. var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
  107161. var mergeWithPrevious = false;
  107162. return op
  107163. // This aggregates any `+` or `-` sign that aren't considered operators
  107164. // e.g.: 10 + +5 => [10, +, +5]
  107165. .reduce(function (a, b) {
  107166. if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
  107167. a[a.length - 1] = b;
  107168. mergeWithPrevious = true;
  107169. return a;
  107170. } else if (mergeWithPrevious) {
  107171. a[a.length - 1] += b;
  107172. mergeWithPrevious = false;
  107173. return a;
  107174. } else {
  107175. return a.concat(b);
  107176. }
  107177. }, [])
  107178. // Here we convert the string values into number values (in px)
  107179. .map(function (str) {
  107180. return toValue(str, measurement, popperOffsets, referenceOffsets);
  107181. });
  107182. });
  107183. // Loop trough the offsets arrays and execute the operations
  107184. ops.forEach(function (op, index) {
  107185. op.forEach(function (frag, index2) {
  107186. if (isNumeric(frag)) {
  107187. offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
  107188. }
  107189. });
  107190. });
  107191. return offsets;
  107192. }
  107193. /**
  107194. * @function
  107195. * @memberof Modifiers
  107196. * @argument {Object} data - The data object generated by update method
  107197. * @argument {Object} options - Modifiers configuration and options
  107198. * @argument {Number|String} options.offset=0
  107199. * The offset value as described in the modifier description
  107200. * @returns {Object} The data object, properly modified
  107201. */
  107202. function offset(data, _ref) {
  107203. var offset = _ref.offset;
  107204. var placement = data.placement,
  107205. _data$offsets = data.offsets,
  107206. popper = _data$offsets.popper,
  107207. reference = _data$offsets.reference;
  107208. var basePlacement = placement.split('-')[0];
  107209. var offsets = void 0;
  107210. if (isNumeric(+offset)) {
  107211. offsets = [+offset, 0];
  107212. } else {
  107213. offsets = parseOffset(offset, popper, reference, basePlacement);
  107214. }
  107215. if (basePlacement === 'left') {
  107216. popper.top += offsets[0];
  107217. popper.left -= offsets[1];
  107218. } else if (basePlacement === 'right') {
  107219. popper.top += offsets[0];
  107220. popper.left += offsets[1];
  107221. } else if (basePlacement === 'top') {
  107222. popper.left += offsets[0];
  107223. popper.top -= offsets[1];
  107224. } else if (basePlacement === 'bottom') {
  107225. popper.left += offsets[0];
  107226. popper.top += offsets[1];
  107227. }
  107228. data.popper = popper;
  107229. return data;
  107230. }
  107231. /**
  107232. * @function
  107233. * @memberof Modifiers
  107234. * @argument {Object} data - The data object generated by `update` method
  107235. * @argument {Object} options - Modifiers configuration and options
  107236. * @returns {Object} The data object, properly modified
  107237. */
  107238. function preventOverflow(data, options) {
  107239. var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
  107240. // If offsetParent is the reference element, we really want to
  107241. // go one step up and use the next offsetParent as reference to
  107242. // avoid to make this modifier completely useless and look like broken
  107243. if (data.instance.reference === boundariesElement) {
  107244. boundariesElement = getOffsetParent(boundariesElement);
  107245. }
  107246. // NOTE: DOM access here
  107247. // resets the popper's position so that the document size can be calculated excluding
  107248. // the size of the popper element itself
  107249. var transformProp = getSupportedPropertyName('transform');
  107250. var popperStyles = data.instance.popper.style; // assignment to help minification
  107251. var top = popperStyles.top,
  107252. left = popperStyles.left,
  107253. transform = popperStyles[transformProp];
  107254. popperStyles.top = '';
  107255. popperStyles.left = '';
  107256. popperStyles[transformProp] = '';
  107257. var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
  107258. // NOTE: DOM access here
  107259. // restores the original style properties after the offsets have been computed
  107260. popperStyles.top = top;
  107261. popperStyles.left = left;
  107262. popperStyles[transformProp] = transform;
  107263. options.boundaries = boundaries;
  107264. var order = options.priority;
  107265. var popper = data.offsets.popper;
  107266. var check = {
  107267. primary: function primary(placement) {
  107268. var value = popper[placement];
  107269. if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
  107270. value = Math.max(popper[placement], boundaries[placement]);
  107271. }
  107272. return defineProperty({}, placement, value);
  107273. },
  107274. secondary: function secondary(placement) {
  107275. var mainSide = placement === 'right' ? 'left' : 'top';
  107276. var value = popper[mainSide];
  107277. if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
  107278. value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
  107279. }
  107280. return defineProperty({}, mainSide, value);
  107281. }
  107282. };
  107283. order.forEach(function (placement) {
  107284. var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
  107285. popper = _extends({}, popper, check[side](placement));
  107286. });
  107287. data.offsets.popper = popper;
  107288. return data;
  107289. }
  107290. /**
  107291. * @function
  107292. * @memberof Modifiers
  107293. * @argument {Object} data - The data object generated by `update` method
  107294. * @argument {Object} options - Modifiers configuration and options
  107295. * @returns {Object} The data object, properly modified
  107296. */
  107297. function shift(data) {
  107298. var placement = data.placement;
  107299. var basePlacement = placement.split('-')[0];
  107300. var shiftvariation = placement.split('-')[1];
  107301. // if shift shiftvariation is specified, run the modifier
  107302. if (shiftvariation) {
  107303. var _data$offsets = data.offsets,
  107304. reference = _data$offsets.reference,
  107305. popper = _data$offsets.popper;
  107306. var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
  107307. var side = isVertical ? 'left' : 'top';
  107308. var measurement = isVertical ? 'width' : 'height';
  107309. var shiftOffsets = {
  107310. start: defineProperty({}, side, reference[side]),
  107311. end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
  107312. };
  107313. data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
  107314. }
  107315. return data;
  107316. }
  107317. /**
  107318. * @function
  107319. * @memberof Modifiers
  107320. * @argument {Object} data - The data object generated by update method
  107321. * @argument {Object} options - Modifiers configuration and options
  107322. * @returns {Object} The data object, properly modified
  107323. */
  107324. function hide(data) {
  107325. if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
  107326. return data;
  107327. }
  107328. var refRect = data.offsets.reference;
  107329. var bound = find(data.instance.modifiers, function (modifier) {
  107330. return modifier.name === 'preventOverflow';
  107331. }).boundaries;
  107332. if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
  107333. // Avoid unnecessary DOM access if visibility hasn't changed
  107334. if (data.hide === true) {
  107335. return data;
  107336. }
  107337. data.hide = true;
  107338. data.attributes['x-out-of-boundaries'] = '';
  107339. } else {
  107340. // Avoid unnecessary DOM access if visibility hasn't changed
  107341. if (data.hide === false) {
  107342. return data;
  107343. }
  107344. data.hide = false;
  107345. data.attributes['x-out-of-boundaries'] = false;
  107346. }
  107347. return data;
  107348. }
  107349. /**
  107350. * @function
  107351. * @memberof Modifiers
  107352. * @argument {Object} data - The data object generated by `update` method
  107353. * @argument {Object} options - Modifiers configuration and options
  107354. * @returns {Object} The data object, properly modified
  107355. */
  107356. function inner(data) {
  107357. var placement = data.placement;
  107358. var basePlacement = placement.split('-')[0];
  107359. var _data$offsets = data.offsets,
  107360. popper = _data$offsets.popper,
  107361. reference = _data$offsets.reference;
  107362. var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
  107363. var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
  107364. popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
  107365. data.placement = getOppositePlacement(placement);
  107366. data.offsets.popper = getClientRect(popper);
  107367. return data;
  107368. }
  107369. /**
  107370. * Modifier function, each modifier can have a function of this type assigned
  107371. * to its `fn` property.<br />
  107372. * These functions will be called on each update, this means that you must
  107373. * make sure they are performant enough to avoid performance bottlenecks.
  107374. *
  107375. * @function ModifierFn
  107376. * @argument {dataObject} data - The data object generated by `update` method
  107377. * @argument {Object} options - Modifiers configuration and options
  107378. * @returns {dataObject} The data object, properly modified
  107379. */
  107380. /**
  107381. * Modifiers are plugins used to alter the behavior of your poppers.<br />
  107382. * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
  107383. * needed by the library.
  107384. *
  107385. * Usually you don't want to override the `order`, `fn` and `onLoad` props.
  107386. * All the other properties are configurations that could be tweaked.
  107387. * @namespace modifiers
  107388. */
  107389. var modifiers = {
  107390. /**
  107391. * Modifier used to shift the popper on the start or end of its reference
  107392. * element.<br />
  107393. * It will read the variation of the `placement` property.<br />
  107394. * It can be one either `-end` or `-start`.
  107395. * @memberof modifiers
  107396. * @inner
  107397. */
  107398. shift: {
  107399. /** @prop {number} order=100 - Index used to define the order of execution */
  107400. order: 100,
  107401. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  107402. enabled: true,
  107403. /** @prop {ModifierFn} */
  107404. fn: shift
  107405. },
  107406. /**
  107407. * The `offset` modifier can shift your popper on both its axis.
  107408. *
  107409. * It accepts the following units:
  107410. * - `px` or unit-less, interpreted as pixels
  107411. * - `%` or `%r`, percentage relative to the length of the reference element
  107412. * - `%p`, percentage relative to the length of the popper element
  107413. * - `vw`, CSS viewport width unit
  107414. * - `vh`, CSS viewport height unit
  107415. *
  107416. * For length is intended the main axis relative to the placement of the popper.<br />
  107417. * This means that if the placement is `top` or `bottom`, the length will be the
  107418. * `width`. In case of `left` or `right`, it will be the `height`.
  107419. *
  107420. * You can provide a single value (as `Number` or `String`), or a pair of values
  107421. * as `String` divided by a comma or one (or more) white spaces.<br />
  107422. * The latter is a deprecated method because it leads to confusion and will be
  107423. * removed in v2.<br />
  107424. * Additionally, it accepts additions and subtractions between different units.
  107425. * Note that multiplications and divisions aren't supported.
  107426. *
  107427. * Valid examples are:
  107428. * ```
  107429. * 10
  107430. * '10%'
  107431. * '10, 10'
  107432. * '10%, 10'
  107433. * '10 + 10%'
  107434. * '10 - 5vh + 3%'
  107435. * '-10px + 5vh, 5px - 6%'
  107436. * ```
  107437. * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
  107438. * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
  107439. * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).
  107440. *
  107441. * @memberof modifiers
  107442. * @inner
  107443. */
  107444. offset: {
  107445. /** @prop {number} order=200 - Index used to define the order of execution */
  107446. order: 200,
  107447. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  107448. enabled: true,
  107449. /** @prop {ModifierFn} */
  107450. fn: offset,
  107451. /** @prop {Number|String} offset=0
  107452. * The offset value as described in the modifier description
  107453. */
  107454. offset: 0
  107455. },
  107456. /**
  107457. * Modifier used to prevent the popper from being positioned outside the boundary.
  107458. *
  107459. * A scenario exists where the reference itself is not within the boundaries.<br />
  107460. * We can say it has "escaped the boundaries" — or just "escaped".<br />
  107461. * In this case we need to decide whether the popper should either:
  107462. *
  107463. * - detach from the reference and remain "trapped" in the boundaries, or
  107464. * - if it should ignore the boundary and "escape with its reference"
  107465. *
  107466. * When `escapeWithReference` is set to`true` and reference is completely
  107467. * outside its boundaries, the popper will overflow (or completely leave)
  107468. * the boundaries in order to remain attached to the edge of the reference.
  107469. *
  107470. * @memberof modifiers
  107471. * @inner
  107472. */
  107473. preventOverflow: {
  107474. /** @prop {number} order=300 - Index used to define the order of execution */
  107475. order: 300,
  107476. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  107477. enabled: true,
  107478. /** @prop {ModifierFn} */
  107479. fn: preventOverflow,
  107480. /**
  107481. * @prop {Array} [priority=['left','right','top','bottom']]
  107482. * Popper will try to prevent overflow following these priorities by default,
  107483. * then, it could overflow on the left and on top of the `boundariesElement`
  107484. */
  107485. priority: ['left', 'right', 'top', 'bottom'],
  107486. /**
  107487. * @prop {number} padding=5
  107488. * Amount of pixel used to define a minimum distance between the boundaries
  107489. * and the popper. This makes sure the popper always has a little padding
  107490. * between the edges of its container
  107491. */
  107492. padding: 5,
  107493. /**
  107494. * @prop {String|HTMLElement} boundariesElement='scrollParent'
  107495. * Boundaries used by the modifier. Can be `scrollParent`, `window`,
  107496. * `viewport` or any DOM element.
  107497. */
  107498. boundariesElement: 'scrollParent'
  107499. },
  107500. /**
  107501. * Modifier used to make sure the reference and its popper stay near each other
  107502. * without leaving any gap between the two. Especially useful when the arrow is
  107503. * enabled and you want to ensure that it points to its reference element.
  107504. * It cares only about the first axis. You can still have poppers with margin
  107505. * between the popper and its reference element.
  107506. * @memberof modifiers
  107507. * @inner
  107508. */
  107509. keepTogether: {
  107510. /** @prop {number} order=400 - Index used to define the order of execution */
  107511. order: 400,
  107512. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  107513. enabled: true,
  107514. /** @prop {ModifierFn} */
  107515. fn: keepTogether
  107516. },
  107517. /**
  107518. * This modifier is used to move the `arrowElement` of the popper to make
  107519. * sure it is positioned between the reference element and its popper element.
  107520. * It will read the outer size of the `arrowElement` node to detect how many
  107521. * pixels of conjunction are needed.
  107522. *
  107523. * It has no effect if no `arrowElement` is provided.
  107524. * @memberof modifiers
  107525. * @inner
  107526. */
  107527. arrow: {
  107528. /** @prop {number} order=500 - Index used to define the order of execution */
  107529. order: 500,
  107530. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  107531. enabled: true,
  107532. /** @prop {ModifierFn} */
  107533. fn: arrow,
  107534. /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
  107535. element: '[x-arrow]'
  107536. },
  107537. /**
  107538. * Modifier used to flip the popper's placement when it starts to overlap its
  107539. * reference element.
  107540. *
  107541. * Requires the `preventOverflow` modifier before it in order to work.
  107542. *
  107543. * **NOTE:** this modifier will interrupt the current update cycle and will
  107544. * restart it if it detects the need to flip the placement.
  107545. * @memberof modifiers
  107546. * @inner
  107547. */
  107548. flip: {
  107549. /** @prop {number} order=600 - Index used to define the order of execution */
  107550. order: 600,
  107551. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  107552. enabled: true,
  107553. /** @prop {ModifierFn} */
  107554. fn: flip,
  107555. /**
  107556. * @prop {String|Array} behavior='flip'
  107557. * The behavior used to change the popper's placement. It can be one of
  107558. * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
  107559. * placements (with optional variations)
  107560. */
  107561. behavior: 'flip',
  107562. /**
  107563. * @prop {number} padding=5
  107564. * The popper will flip if it hits the edges of the `boundariesElement`
  107565. */
  107566. padding: 5,
  107567. /**
  107568. * @prop {String|HTMLElement} boundariesElement='viewport'
  107569. * The element which will define the boundaries of the popper position.
  107570. * The popper will never be placed outside of the defined boundaries
  107571. * (except if `keepTogether` is enabled)
  107572. */
  107573. boundariesElement: 'viewport',
  107574. /**
  107575. * @prop {Boolean} flipVariations=false
  107576. * The popper will switch placement variation between `-start` and `-end` when
  107577. * the reference element overlaps its boundaries.
  107578. *
  107579. * The original placement should have a set variation.
  107580. */
  107581. flipVariations: false,
  107582. /**
  107583. * @prop {Boolean} flipVariationsByContent=false
  107584. * The popper will switch placement variation between `-start` and `-end` when
  107585. * the popper element overlaps its reference boundaries.
  107586. *
  107587. * The original placement should have a set variation.
  107588. */
  107589. flipVariationsByContent: false
  107590. },
  107591. /**
  107592. * Modifier used to make the popper flow toward the inner of the reference element.
  107593. * By default, when this modifier is disabled, the popper will be placed outside
  107594. * the reference element.
  107595. * @memberof modifiers
  107596. * @inner
  107597. */
  107598. inner: {
  107599. /** @prop {number} order=700 - Index used to define the order of execution */
  107600. order: 700,
  107601. /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
  107602. enabled: false,
  107603. /** @prop {ModifierFn} */
  107604. fn: inner
  107605. },
  107606. /**
  107607. * Modifier used to hide the popper when its reference element is outside of the
  107608. * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
  107609. * be used to hide with a CSS selector the popper when its reference is
  107610. * out of boundaries.
  107611. *
  107612. * Requires the `preventOverflow` modifier before it in order to work.
  107613. * @memberof modifiers
  107614. * @inner
  107615. */
  107616. hide: {
  107617. /** @prop {number} order=800 - Index used to define the order of execution */
  107618. order: 800,
  107619. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  107620. enabled: true,
  107621. /** @prop {ModifierFn} */
  107622. fn: hide
  107623. },
  107624. /**
  107625. * Computes the style that will be applied to the popper element to gets
  107626. * properly positioned.
  107627. *
  107628. * Note that this modifier will not touch the DOM, it just prepares the styles
  107629. * so that `applyStyle` modifier can apply it. This separation is useful
  107630. * in case you need to replace `applyStyle` with a custom implementation.
  107631. *
  107632. * This modifier has `850` as `order` value to maintain backward compatibility
  107633. * with previous versions of Popper.js. Expect the modifiers ordering method
  107634. * to change in future major versions of the library.
  107635. *
  107636. * @memberof modifiers
  107637. * @inner
  107638. */
  107639. computeStyle: {
  107640. /** @prop {number} order=850 - Index used to define the order of execution */
  107641. order: 850,
  107642. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  107643. enabled: true,
  107644. /** @prop {ModifierFn} */
  107645. fn: computeStyle,
  107646. /**
  107647. * @prop {Boolean} gpuAcceleration=true
  107648. * If true, it uses the CSS 3D transformation to position the popper.
  107649. * Otherwise, it will use the `top` and `left` properties
  107650. */
  107651. gpuAcceleration: true,
  107652. /**
  107653. * @prop {string} [x='bottom']
  107654. * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
  107655. * Change this if your popper should grow in a direction different from `bottom`
  107656. */
  107657. x: 'bottom',
  107658. /**
  107659. * @prop {string} [x='left']
  107660. * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
  107661. * Change this if your popper should grow in a direction different from `right`
  107662. */
  107663. y: 'right'
  107664. },
  107665. /**
  107666. * Applies the computed styles to the popper element.
  107667. *
  107668. * All the DOM manipulations are limited to this modifier. This is useful in case
  107669. * you want to integrate Popper.js inside a framework or view library and you
  107670. * want to delegate all the DOM manipulations to it.
  107671. *
  107672. * Note that if you disable this modifier, you must make sure the popper element
  107673. * has its position set to `absolute` before Popper.js can do its work!
  107674. *
  107675. * Just disable this modifier and define your own to achieve the desired effect.
  107676. *
  107677. * @memberof modifiers
  107678. * @inner
  107679. */
  107680. applyStyle: {
  107681. /** @prop {number} order=900 - Index used to define the order of execution */
  107682. order: 900,
  107683. /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
  107684. enabled: true,
  107685. /** @prop {ModifierFn} */
  107686. fn: applyStyle,
  107687. /** @prop {Function} */
  107688. onLoad: applyStyleOnLoad,
  107689. /**
  107690. * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
  107691. * @prop {Boolean} gpuAcceleration=true
  107692. * If true, it uses the CSS 3D transformation to position the popper.
  107693. * Otherwise, it will use the `top` and `left` properties
  107694. */
  107695. gpuAcceleration: undefined
  107696. }
  107697. };
  107698. /**
  107699. * The `dataObject` is an object containing all the information used by Popper.js.
  107700. * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
  107701. * @name dataObject
  107702. * @property {Object} data.instance The Popper.js instance
  107703. * @property {String} data.placement Placement applied to popper
  107704. * @property {String} data.originalPlacement Placement originally defined on init
  107705. * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
  107706. * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
  107707. * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
  107708. * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
  107709. * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
  107710. * @property {Object} data.boundaries Offsets of the popper boundaries
  107711. * @property {Object} data.offsets The measurements of popper, reference and arrow elements
  107712. * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
  107713. * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
  107714. * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
  107715. */
  107716. /**
  107717. * Default options provided to Popper.js constructor.<br />
  107718. * These can be overridden using the `options` argument of Popper.js.<br />
  107719. * To override an option, simply pass an object with the same
  107720. * structure of the `options` object, as the 3rd argument. For example:
  107721. * ```
  107722. * new Popper(ref, pop, {
  107723. * modifiers: {
  107724. * preventOverflow: { enabled: false }
  107725. * }
  107726. * })
  107727. * ```
  107728. * @type {Object}
  107729. * @static
  107730. * @memberof Popper
  107731. */
  107732. var Defaults = {
  107733. /**
  107734. * Popper's placement.
  107735. * @prop {Popper.placements} placement='bottom'
  107736. */
  107737. placement: 'bottom',
  107738. /**
  107739. * Set this to true if you want popper to position it self in 'fixed' mode
  107740. * @prop {Boolean} positionFixed=false
  107741. */
  107742. positionFixed: false,
  107743. /**
  107744. * Whether events (resize, scroll) are initially enabled.
  107745. * @prop {Boolean} eventsEnabled=true
  107746. */
  107747. eventsEnabled: true,
  107748. /**
  107749. * Set to true if you want to automatically remove the popper when
  107750. * you call the `destroy` method.
  107751. * @prop {Boolean} removeOnDestroy=false
  107752. */
  107753. removeOnDestroy: false,
  107754. /**
  107755. * Callback called when the popper is created.<br />
  107756. * By default, it is set to no-op.<br />
  107757. * Access Popper.js instance with `data.instance`.
  107758. * @prop {onCreate}
  107759. */
  107760. onCreate: function onCreate() {},
  107761. /**
  107762. * Callback called when the popper is updated. This callback is not called
  107763. * on the initialization/creation of the popper, but only on subsequent
  107764. * updates.<br />
  107765. * By default, it is set to no-op.<br />
  107766. * Access Popper.js instance with `data.instance`.
  107767. * @prop {onUpdate}
  107768. */
  107769. onUpdate: function onUpdate() {},
  107770. /**
  107771. * List of modifiers used to modify the offsets before they are applied to the popper.
  107772. * They provide most of the functionalities of Popper.js.
  107773. * @prop {modifiers}
  107774. */
  107775. modifiers: modifiers
  107776. };
  107777. /**
  107778. * @callback onCreate
  107779. * @param {dataObject} data
  107780. */
  107781. /**
  107782. * @callback onUpdate
  107783. * @param {dataObject} data
  107784. */
  107785. // Utils
  107786. // Methods
  107787. var Popper = function () {
  107788. /**
  107789. * Creates a new Popper.js instance.
  107790. * @class Popper
  107791. * @param {Element|referenceObject} reference - The reference element used to position the popper
  107792. * @param {Element} popper - The HTML / XML element used as the popper
  107793. * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
  107794. * @return {Object} instance - The generated Popper.js instance
  107795. */
  107796. function Popper(reference, popper) {
  107797. var _this = this;
  107798. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  107799. classCallCheck(this, Popper);
  107800. this.scheduleUpdate = function () {
  107801. return requestAnimationFrame(_this.update);
  107802. };
  107803. // make update() debounced, so that it only runs at most once-per-tick
  107804. this.update = debounce(this.update.bind(this));
  107805. // with {} we create a new object with the options inside it
  107806. this.options = _extends({}, Popper.Defaults, options);
  107807. // init state
  107808. this.state = {
  107809. isDestroyed: false,
  107810. isCreated: false,
  107811. scrollParents: []
  107812. };
  107813. // get reference and popper elements (allow jQuery wrappers)
  107814. this.reference = reference && reference.jquery ? reference[0] : reference;
  107815. this.popper = popper && popper.jquery ? popper[0] : popper;
  107816. // Deep merge modifiers options
  107817. this.options.modifiers = {};
  107818. Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
  107819. _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
  107820. });
  107821. // Refactoring modifiers' list (Object => Array)
  107822. this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
  107823. return _extends({
  107824. name: name
  107825. }, _this.options.modifiers[name]);
  107826. })
  107827. // sort the modifiers by order
  107828. .sort(function (a, b) {
  107829. return a.order - b.order;
  107830. });
  107831. // modifiers have the ability to execute arbitrary code when Popper.js get inited
  107832. // such code is executed in the same order of its modifier
  107833. // they could add new properties to their options configuration
  107834. // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
  107835. this.modifiers.forEach(function (modifierOptions) {
  107836. if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
  107837. modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
  107838. }
  107839. });
  107840. // fire the first update to position the popper in the right place
  107841. this.update();
  107842. var eventsEnabled = this.options.eventsEnabled;
  107843. if (eventsEnabled) {
  107844. // setup event listeners, they will take care of update the position in specific situations
  107845. this.enableEventListeners();
  107846. }
  107847. this.state.eventsEnabled = eventsEnabled;
  107848. }
  107849. // We can't use class properties because they don't get listed in the
  107850. // class prototype and break stuff like Sinon stubs
  107851. createClass(Popper, [{
  107852. key: 'update',
  107853. value: function update$$1() {
  107854. return update.call(this);
  107855. }
  107856. }, {
  107857. key: 'destroy',
  107858. value: function destroy$$1() {
  107859. return destroy.call(this);
  107860. }
  107861. }, {
  107862. key: 'enableEventListeners',
  107863. value: function enableEventListeners$$1() {
  107864. return enableEventListeners.call(this);
  107865. }
  107866. }, {
  107867. key: 'disableEventListeners',
  107868. value: function disableEventListeners$$1() {
  107869. return disableEventListeners.call(this);
  107870. }
  107871. /**
  107872. * Schedules an update. It will run on the next UI update available.
  107873. * @method scheduleUpdate
  107874. * @memberof Popper
  107875. */
  107876. /**
  107877. * Collection of utilities useful when writing custom modifiers.
  107878. * Starting from version 1.7, this method is available only if you
  107879. * include `popper-utils.js` before `popper.js`.
  107880. *
  107881. * **DEPRECATION**: This way to access PopperUtils is deprecated
  107882. * and will be removed in v2! Use the PopperUtils module directly instead.
  107883. * Due to the high instability of the methods contained in Utils, we can't
  107884. * guarantee them to follow semver. Use them at your own risk!
  107885. * @static
  107886. * @private
  107887. * @type {Object}
  107888. * @deprecated since version 1.8
  107889. * @member Utils
  107890. * @memberof Popper
  107891. */
  107892. }]);
  107893. return Popper;
  107894. }();
  107895. /**
  107896. * The `referenceObject` is an object that provides an interface compatible with Popper.js
  107897. * and lets you use it as replacement of a real DOM node.<br />
  107898. * You can use this method to position a popper relatively to a set of coordinates
  107899. * in case you don't have a DOM node to use as reference.
  107900. *
  107901. * ```
  107902. * new Popper(referenceObject, popperNode);
  107903. * ```
  107904. *
  107905. * NB: This feature isn't supported in Internet Explorer 10.
  107906. * @name referenceObject
  107907. * @property {Function} data.getBoundingClientRect
  107908. * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
  107909. * @property {number} data.clientWidth
  107910. * An ES6 getter that will return the width of the virtual reference element.
  107911. * @property {number} data.clientHeight
  107912. * An ES6 getter that will return the height of the virtual reference element.
  107913. */
  107914. Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
  107915. Popper.placements = placements;
  107916. Popper.Defaults = Defaults;
  107917. return Popper;
  107918. })));
  107919. //# sourceMappingURL=popper.js.map
  107920. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
  107921. /***/ }),
  107922. /* 218 */
  107923. /***/ (function(module, exports, __webpack_require__) {
  107924. var render = function() {
  107925. var _vm = this
  107926. var _h = _vm.$createElement
  107927. var _c = _vm._self._c || _h
  107928. return _c(
  107929. "div",
  107930. {
  107931. directives: [
  107932. {
  107933. name: "clickoutside",
  107934. rawName: "v-clickoutside",
  107935. value: _vm.handleClose,
  107936. expression: "handleClose"
  107937. }
  107938. ],
  107939. on: { click: _vm.handleClose }
  107940. },
  107941. [
  107942. _vm.multipleLists.length > 0
  107943. ? _c(
  107944. "div",
  107945. { staticClass: "user-id-multiple" },
  107946. _vm._l(_vm.multipleLists, function(item, index) {
  107947. return _c(
  107948. "div",
  107949. { key: index, staticClass: "user-id-multiple-item" },
  107950. [
  107951. _c(
  107952. "Tag",
  107953. {
  107954. attrs: {
  107955. closable: !_vm.existMultipleDisabled(item.username)
  107956. },
  107957. on: {
  107958. "on-close": function($event) {
  107959. return _vm.multipleLists.splice(index, 1)
  107960. }
  107961. }
  107962. },
  107963. [
  107964. _c("UserView", {
  107965. attrs: { username: item.username, showimg: "" }
  107966. })
  107967. ],
  107968. 1
  107969. )
  107970. ],
  107971. 1
  107972. )
  107973. }),
  107974. 0
  107975. )
  107976. : _vm._e(),
  107977. _vm._v(" "),
  107978. _c(
  107979. "div",
  107980. { ref: "reference", staticClass: "user-id-input" },
  107981. [
  107982. _c(
  107983. "Input",
  107984. {
  107985. attrs: {
  107986. placeholder: _vm.placeholder,
  107987. disabled: _vm.disabled,
  107988. icon: "md-search"
  107989. },
  107990. on: {
  107991. "on-click": _vm.searchEnter,
  107992. "on-enter": _vm.searchEnter,
  107993. "on-blur": function($event) {
  107994. return _vm.searchEnter(true)
  107995. },
  107996. "on-change": _vm.inputChange
  107997. },
  107998. model: {
  107999. value: _vm.nickName,
  108000. callback: function($$v) {
  108001. _vm.nickName = $$v
  108002. },
  108003. expression: "nickName"
  108004. }
  108005. },
  108006. [
  108007. _vm.$slots.prepend !== undefined
  108008. ? _c(
  108009. "div",
  108010. { attrs: { slot: "prepend" }, slot: "prepend" },
  108011. [_vm._t("prepend")],
  108012. 2
  108013. )
  108014. : _vm._e(),
  108015. _vm._v(" "),
  108016. _vm.$slots.append !== undefined
  108017. ? _c(
  108018. "div",
  108019. { attrs: { slot: "append" }, slot: "append" },
  108020. [_vm._t("append")],
  108021. 2
  108022. )
  108023. : _vm._e()
  108024. ]
  108025. ),
  108026. _vm._v(" "),
  108027. _vm.userName
  108028. ? _c("div", { staticClass: "user-id-subtitle" }, [
  108029. _vm._v(_vm._s(_vm.$L("用户名")) + ": " + _vm._s(_vm.userName))
  108030. ])
  108031. : _vm._e(),
  108032. _vm._v(" "),
  108033. _vm.spinShow
  108034. ? _c("div", { staticClass: "user-id-spin" }, [
  108035. _c("div", [_c("w-loading")], 1)
  108036. ])
  108037. : _vm._e()
  108038. ],
  108039. 1
  108040. ),
  108041. _vm._v(" "),
  108042. _c("transition", { attrs: { name: "fade" } }, [
  108043. _c(
  108044. "div",
  108045. {
  108046. directives: [
  108047. {
  108048. name: "show",
  108049. rawName: "v-show",
  108050. value: !_vm.disabled && _vm.visible,
  108051. expression: "!disabled && visible"
  108052. },
  108053. { name: "transfer-dom", rawName: "v-transfer-dom" }
  108054. ],
  108055. ref: "popper",
  108056. staticClass: "user-id-input-body",
  108057. attrs: { "data-transfer": _vm.transfer }
  108058. },
  108059. [
  108060. _c(
  108061. "div",
  108062. { staticClass: "user-id-input-table" },
  108063. [
  108064. _vm.searchShow
  108065. ? _c("Table", {
  108066. ref: "myTable",
  108067. staticClass: "tableSelection",
  108068. style: _vm.tableStyle,
  108069. attrs: {
  108070. "highlight-row": "",
  108071. size: "small",
  108072. columns: _vm.columns,
  108073. data: _vm.userLists,
  108074. "no-data-text": _vm.noDataText
  108075. },
  108076. on: {
  108077. "on-row-click": _vm.userChange,
  108078. "on-selection-change": _vm.userSelect
  108079. }
  108080. })
  108081. : _vm._e(),
  108082. _vm._v(" "),
  108083. _vm.isConfirm && _vm.searchShow
  108084. ? _c(
  108085. "div",
  108086. { staticClass: "user-id-input-bottom" },
  108087. [
  108088. _c(
  108089. "Button",
  108090. {
  108091. attrs: { type: "default", size: "small" },
  108092. on: {
  108093. click: function($event) {
  108094. _vm.visible = false
  108095. }
  108096. }
  108097. },
  108098. [_vm._v(_vm._s(_vm.$L("取消")))]
  108099. ),
  108100. _vm._v(" "),
  108101. _c(
  108102. "Button",
  108103. {
  108104. attrs: { type: "primary", size: "small" },
  108105. on: { click: _vm.onConfirm }
  108106. },
  108107. [_vm._v(_vm._s(_vm.$L("确定")))]
  108108. )
  108109. ],
  108110. 1
  108111. )
  108112. : _vm._e()
  108113. ],
  108114. 1
  108115. )
  108116. ]
  108117. )
  108118. ])
  108119. ],
  108120. 1
  108121. )
  108122. }
  108123. var staticRenderFns = []
  108124. render._withStripped = true
  108125. module.exports = { render: render, staticRenderFns: staticRenderFns }
  108126. if (false) {
  108127. module.hot.accept()
  108128. if (module.hot.data) {
  108129. require("vue-hot-reload-api") .rerender("data-v-453021ba", module.exports)
  108130. }
  108131. }
  108132. /***/ }),
  108133. /* 219 */
  108134. /***/ (function(module, exports, __webpack_require__) {
  108135. var disposed = false
  108136. function injectStyle (ssrContext) {
  108137. if (disposed) return
  108138. __webpack_require__(220)
  108139. __webpack_require__(222)
  108140. }
  108141. var normalizeComponent = __webpack_require__(2)
  108142. /* script */
  108143. var __vue_script__ = __webpack_require__(224)
  108144. /* template */
  108145. var __vue_template__ = __webpack_require__(225)
  108146. /* template functional */
  108147. var __vue_template_functional__ = false
  108148. /* styles */
  108149. var __vue_styles__ = injectStyle
  108150. /* scopeId */
  108151. var __vue_scopeId__ = "data-v-6f741b65"
  108152. /* moduleIdentifier (server only) */
  108153. var __vue_module_identifier__ = null
  108154. var Component = normalizeComponent(
  108155. __vue_script__,
  108156. __vue_template__,
  108157. __vue_template_functional__,
  108158. __vue_styles__,
  108159. __vue_scopeId__,
  108160. __vue_module_identifier__
  108161. )
  108162. Component.options.__file = "resources/assets/js/main/components/UserView.vue"
  108163. /* hot reload */
  108164. if (false) {(function () {
  108165. var hotAPI = require("vue-hot-reload-api")
  108166. hotAPI.install(require("vue"), false)
  108167. if (!hotAPI.compatible) return
  108168. module.hot.accept()
  108169. if (!module.hot.data) {
  108170. hotAPI.createRecord("data-v-6f741b65", Component.options)
  108171. } else {
  108172. hotAPI.reload("data-v-6f741b65", Component.options)
  108173. }
  108174. module.hot.dispose(function (data) {
  108175. disposed = true
  108176. })
  108177. })()}
  108178. module.exports = Component.exports
  108179. /***/ }),
  108180. /* 220 */
  108181. /***/ (function(module, exports, __webpack_require__) {
  108182. // style-loader: Adds some css to the DOM by adding a <style> tag
  108183. // load the styles
  108184. var content = __webpack_require__(221);
  108185. if(typeof content === 'string') content = [[module.i, content, '']];
  108186. if(content.locals) module.exports = content.locals;
  108187. // add the styles to the DOM
  108188. var update = __webpack_require__(1)("1b76010a", content, false, {});
  108189. // Hot Module Replacement
  108190. if(false) {
  108191. // When the styles change, update the <style> tags
  108192. if(!content.locals) {
  108193. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-6f741b65\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./UserView.vue", function() {
  108194. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-6f741b65\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./UserView.vue");
  108195. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  108196. update(newContent);
  108197. });
  108198. }
  108199. // When the module is disposed, remove the <style> tags
  108200. module.hot.dispose(function() { update(); });
  108201. }
  108202. /***/ }),
  108203. /* 221 */
  108204. /***/ (function(module, exports, __webpack_require__) {
  108205. exports = module.exports = __webpack_require__(0)(false);
  108206. // imports
  108207. // module
  108208. exports.push([module.i, "\n.user-view-inline .ivu-tooltip {\n max-width: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.user-view-inline .ivu-tooltip .ivu-tooltip-rel {\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.user-view-inline .ivu-tooltip .ivu-tooltip-rel .user-view-info .user-view-img .usertext-container-text {\n -webkit-transform: scale(0.86);\n transform: scale(0.86);\n}\n", ""]);
  108209. // exports
  108210. /***/ }),
  108211. /* 222 */
  108212. /***/ (function(module, exports, __webpack_require__) {
  108213. // style-loader: Adds some css to the DOM by adding a <style> tag
  108214. // load the styles
  108215. var content = __webpack_require__(223);
  108216. if(typeof content === 'string') content = [[module.i, content, '']];
  108217. if(content.locals) module.exports = content.locals;
  108218. // add the styles to the DOM
  108219. var update = __webpack_require__(1)("62f3f1a0", content, false, {});
  108220. // Hot Module Replacement
  108221. if(false) {
  108222. // When the styles change, update the <style> tags
  108223. if(!content.locals) {
  108224. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-6f741b65\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./UserView.vue", function() {
  108225. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-6f741b65\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./UserView.vue");
  108226. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  108227. update(newContent);
  108228. });
  108229. }
  108230. // When the module is disposed, remove the <style> tags
  108231. module.hot.dispose(function() { update(); });
  108232. }
  108233. /***/ }),
  108234. /* 223 */
  108235. /***/ (function(module, exports, __webpack_require__) {
  108236. exports = module.exports = __webpack_require__(0)(false);
  108237. // imports
  108238. // module
  108239. exports.push([module.i, "\n.user-view-inline[data-v-6f741b65] {\n display: inline-block;\n max-width: 100%;\n}\n.user-view-inline .user-view-info[data-v-6f741b65] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.user-view-inline .user-view-info .user-view-img[data-v-6f741b65] {\n width: 16px;\n height: 16px;\n font-size: 12px;\n line-height: 16px;\n border-radius: 50%;\n margin-right: 3px;\n}\n.user-view-inline .user-view-info .user-view-title[data-v-6f741b65] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n line-height: 1.2;\n}\n", ""]);
  108240. // exports
  108241. /***/ }),
  108242. /* 224 */
  108243. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  108244. "use strict";
  108245. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  108246. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  108247. //
  108248. //
  108249. //
  108250. //
  108251. //
  108252. //
  108253. //
  108254. //
  108255. //
  108256. //
  108257. //
  108258. //
  108259. //
  108260. //
  108261. //
  108262. //
  108263. //
  108264. //
  108265. //
  108266. //
  108267. //
  108268. //
  108269. //
  108270. //
  108271. //
  108272. //
  108273. //
  108274. //
  108275. //
  108276. //
  108277. //
  108278. //
  108279. //
  108280. //
  108281. //
  108282. //
  108283. //
  108284. //
  108285. //
  108286. //
  108287. //
  108288. //
  108289. //
  108290. //
  108291. //
  108292. //
  108293. //
  108294. //
  108295. //
  108296. //
  108297. //
  108298. //
  108299. //
  108300. //
  108301. //
  108302. //
  108303. //
  108304. //
  108305. //
  108306. //
  108307. //
  108308. //
  108309. //
  108310. //
  108311. //
  108312. //
  108313. //
  108314. //
  108315. /* harmony default export */ __webpack_exports__["default"] = ({
  108316. name: 'UserView',
  108317. props: {
  108318. username: {
  108319. default: ''
  108320. },
  108321. delay: {
  108322. type: Number,
  108323. default: 600
  108324. },
  108325. transfer: {
  108326. type: Boolean,
  108327. default: true
  108328. },
  108329. placement: {
  108330. default: 'bottom'
  108331. },
  108332. showimg: {
  108333. type: Boolean,
  108334. default: false
  108335. },
  108336. imgsize: {},
  108337. imgfontsize: {},
  108338. showname: {
  108339. type: Boolean,
  108340. default: true
  108341. },
  108342. info: {
  108343. default: null
  108344. }
  108345. },
  108346. data: function data() {
  108347. return {
  108348. loadIng: true,
  108349. nickname: null,
  108350. userimg: '',
  108351. profession: ''
  108352. };
  108353. },
  108354. mounted: function mounted() {
  108355. this.getUserData(300);
  108356. },
  108357. watch: {
  108358. username: function username() {
  108359. this.getUserData(300);
  108360. },
  108361. info: {
  108362. handler: function handler() {
  108363. this.upInfo();
  108364. },
  108365. deep: true
  108366. }
  108367. },
  108368. computed: {
  108369. userInfo: function userInfo() {
  108370. var username = this.username,
  108371. nickname = this.nickname,
  108372. userimg = this.userimg;
  108373. return { username: username, nickname: nickname, userimg: userimg };
  108374. },
  108375. imgStyle: function imgStyle() {
  108376. var imgsize = this.imgsize,
  108377. imgfontsize = this.imgfontsize;
  108378. var myStyle = {};
  108379. if (imgsize) {
  108380. var size = /^\d+$/.test(imgsize) ? imgsize + 'px' : imgsize;
  108381. myStyle.width = size;
  108382. myStyle.height = size;
  108383. myStyle.lineHeight = size;
  108384. }
  108385. if (imgfontsize) {
  108386. myStyle.fontSize = /^\d+$/.test(imgfontsize) ? imgfontsize + 'px' : imgfontsize;
  108387. }
  108388. return myStyle;
  108389. }
  108390. },
  108391. methods: {
  108392. isJson: function isJson(obj) {
  108393. return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && typeof obj.length == "undefined";
  108394. },
  108395. upInfo: function upInfo() {
  108396. if (this.isJson(this.info)) {
  108397. this.$set(this.info, 'nickname', this.nickname);
  108398. this.$set(this.info, 'userimg', this.userimg);
  108399. }
  108400. },
  108401. getUserData: function getUserData(cacheTime) {
  108402. var _this = this;
  108403. $A.getUserBasic(this.username, function (data, success) {
  108404. if (success) {
  108405. _this.nickname = data.nickname;
  108406. _this.userimg = data.userimg;
  108407. _this.profession = data.profession;
  108408. } else {
  108409. _this.nickname = '';
  108410. _this.userimg = '';
  108411. _this.profession = '';
  108412. }
  108413. _this.loadIng = false;
  108414. _this.$emit("on-result", data);
  108415. _this.upInfo();
  108416. }, cacheTime);
  108417. }
  108418. }
  108419. });
  108420. /***/ }),
  108421. /* 225 */
  108422. /***/ (function(module, exports, __webpack_require__) {
  108423. var render = function() {
  108424. var _vm = this
  108425. var _h = _vm.$createElement
  108426. var _c = _vm._self._c || _h
  108427. return _c(
  108428. "div",
  108429. { staticClass: "user-view-inline" },
  108430. [
  108431. _c(
  108432. "Tooltip",
  108433. {
  108434. attrs: {
  108435. disabled: _vm.loadIng,
  108436. delay: _vm.delay,
  108437. transfer: _vm.transfer,
  108438. placement: _vm.placement,
  108439. maxWidth: "auto"
  108440. },
  108441. on: {
  108442. "on-popper-show": function($event) {
  108443. return _vm.getUserData(30)
  108444. }
  108445. }
  108446. },
  108447. [
  108448. _c(
  108449. "div",
  108450. { staticClass: "user-view-info" },
  108451. [
  108452. _vm.showimg
  108453. ? _c("UserImg", {
  108454. staticClass: "user-view-img",
  108455. style: _vm.imgStyle,
  108456. attrs: { info: _vm.userInfo }
  108457. })
  108458. : _vm._e(),
  108459. _vm._v(" "),
  108460. _vm.showname
  108461. ? _c("div", { staticClass: "user-view-name" }, [
  108462. _vm._v(_vm._s(_vm.nickname || _vm.username))
  108463. ])
  108464. : _vm._e()
  108465. ],
  108466. 1
  108467. ),
  108468. _vm._v(" "),
  108469. _c(
  108470. "div",
  108471. {
  108472. staticStyle: { "white-space": "normal" },
  108473. attrs: { slot: "content" },
  108474. slot: "content"
  108475. },
  108476. [
  108477. !_vm.showname
  108478. ? _c("div", [
  108479. _vm._v(
  108480. _vm._s(_vm.$L("昵称")) +
  108481. ": " +
  108482. _vm._s(_vm.nickname || "-")
  108483. )
  108484. ])
  108485. : _vm._e(),
  108486. _vm._v(" "),
  108487. _c("div", [
  108488. _vm._v(_vm._s(_vm.$L("用户名")) + ": " + _vm._s(_vm.username))
  108489. ]),
  108490. _vm._v(" "),
  108491. _c("div", [
  108492. _vm._v(
  108493. _vm._s(_vm.$L("职位/职称")) +
  108494. ": " +
  108495. _vm._s(_vm.profession || "-")
  108496. )
  108497. ])
  108498. ]
  108499. )
  108500. ]
  108501. )
  108502. ],
  108503. 1
  108504. )
  108505. }
  108506. var staticRenderFns = []
  108507. render._withStripped = true
  108508. module.exports = { render: render, staticRenderFns: staticRenderFns }
  108509. if (false) {
  108510. module.hot.accept()
  108511. if (module.hot.data) {
  108512. require("vue-hot-reload-api") .rerender("data-v-6f741b65", module.exports)
  108513. }
  108514. }
  108515. /***/ }),
  108516. /* 226 */
  108517. /***/ (function(module, exports, __webpack_require__) {
  108518. var disposed = false
  108519. function injectStyle (ssrContext) {
  108520. if (disposed) return
  108521. __webpack_require__(227)
  108522. }
  108523. var normalizeComponent = __webpack_require__(2)
  108524. /* script */
  108525. var __vue_script__ = __webpack_require__(229)
  108526. /* template */
  108527. var __vue_template__ = __webpack_require__(230)
  108528. /* template functional */
  108529. var __vue_template_functional__ = false
  108530. /* styles */
  108531. var __vue_styles__ = injectStyle
  108532. /* scopeId */
  108533. var __vue_scopeId__ = "data-v-6b3af333"
  108534. /* moduleIdentifier (server only) */
  108535. var __vue_module_identifier__ = null
  108536. var Component = normalizeComponent(
  108537. __vue_script__,
  108538. __vue_template__,
  108539. __vue_template_functional__,
  108540. __vue_styles__,
  108541. __vue_scopeId__,
  108542. __vue_module_identifier__
  108543. )
  108544. Component.options.__file = "resources/assets/js/main/components/UserImg.vue"
  108545. /* hot reload */
  108546. if (false) {(function () {
  108547. var hotAPI = require("vue-hot-reload-api")
  108548. hotAPI.install(require("vue"), false)
  108549. if (!hotAPI.compatible) return
  108550. module.hot.accept()
  108551. if (!module.hot.data) {
  108552. hotAPI.createRecord("data-v-6b3af333", Component.options)
  108553. } else {
  108554. hotAPI.reload("data-v-6b3af333", Component.options)
  108555. }
  108556. module.hot.dispose(function (data) {
  108557. disposed = true
  108558. })
  108559. })()}
  108560. module.exports = Component.exports
  108561. /***/ }),
  108562. /* 227 */
  108563. /***/ (function(module, exports, __webpack_require__) {
  108564. // style-loader: Adds some css to the DOM by adding a <style> tag
  108565. // load the styles
  108566. var content = __webpack_require__(228);
  108567. if(typeof content === 'string') content = [[module.i, content, '']];
  108568. if(content.locals) module.exports = content.locals;
  108569. // add the styles to the DOM
  108570. var update = __webpack_require__(1)("33f5f999", content, false, {});
  108571. // Hot Module Replacement
  108572. if(false) {
  108573. // When the styles change, update the <style> tags
  108574. if(!content.locals) {
  108575. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-6b3af333\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./UserImg.vue", function() {
  108576. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-6b3af333\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./UserImg.vue");
  108577. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  108578. update(newContent);
  108579. });
  108580. }
  108581. // When the module is disposed, remove the <style> tags
  108582. module.hot.dispose(function() { update(); });
  108583. }
  108584. /***/ }),
  108585. /* 228 */
  108586. /***/ (function(module, exports, __webpack_require__) {
  108587. exports = module.exports = __webpack_require__(0)(false);
  108588. // imports
  108589. // module
  108590. exports.push([module.i, "\n.userimg-container[data-v-6b3af333] {\n display: inline-block;\n max-width: 100%;\n max-height: 100%;\n position: relative;\n overflow: hidden;\n}\n.userimg-container.usering-scale[data-v-6b3af333] {\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n -webkit-transform: scale(1);\n transform: scale(1);\n}\n.userimg-container.usering-scale[data-v-6b3af333]:hover {\n z-index: 1;\n -webkit-transform: scale(1.2);\n transform: scale(1.2);\n}\n.userimg-container .userimg-container-img[data-v-6b3af333] {\n width: 100%;\n height: 100%;\n display: table;\n}\n.userimg-container .userimg-container-box[data-v-6b3af333] {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n font-weight: 400;\n color: #ffffff;\n}\n.userimg-container .userimg-container-box .usertext-container-text[data-v-6b3af333] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n white-space: nowrap;\n}\n", ""]);
  108591. // exports
  108592. /***/ }),
  108593. /* 229 */
  108594. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  108595. "use strict";
  108596. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  108597. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  108598. //
  108599. //
  108600. //
  108601. //
  108602. //
  108603. //
  108604. //
  108605. //
  108606. //
  108607. //
  108608. //
  108609. //
  108610. //
  108611. //
  108612. //
  108613. //
  108614. //
  108615. //
  108616. //
  108617. //
  108618. //
  108619. //
  108620. //
  108621. //
  108622. //
  108623. //
  108624. //
  108625. //
  108626. //
  108627. //
  108628. //
  108629. //
  108630. //
  108631. //
  108632. //
  108633. //
  108634. //
  108635. //
  108636. //
  108637. //
  108638. //
  108639. //
  108640. //
  108641. //
  108642. //
  108643. //
  108644. //
  108645. //
  108646. //
  108647. //
  108648. //
  108649. //
  108650. //
  108651. //
  108652. /* harmony default export */ __webpack_exports__["default"] = ({
  108653. name: 'UserImg',
  108654. props: {
  108655. info: {
  108656. default: {} //{username, nickname, userimg}
  108657. },
  108658. size: {},
  108659. scale: {
  108660. type: Boolean,
  108661. default: false
  108662. },
  108663. twoWords: {
  108664. type: Boolean,
  108665. default: false
  108666. },
  108667. showTitle: {
  108668. type: Boolean,
  108669. default: false
  108670. }
  108671. },
  108672. data: function data() {
  108673. return {
  108674. imgError: false,
  108675. againUrl: ''
  108676. };
  108677. },
  108678. computed: {
  108679. textStyle: function textStyle() {
  108680. var style = {
  108681. backgroundColor: '#A0D7F1'
  108682. };
  108683. var size = this.size;
  108684. if (size) {
  108685. style.fontSize = /^\d+$/.test(size) ? size + 'px' : size;
  108686. }
  108687. var username = this.info.username;
  108688. if (username) {
  108689. var bgColor = '';
  108690. for (var i = 0; i < username.length; i++) {
  108691. bgColor += parseInt(username[i].charCodeAt(0), 10).toString(16);
  108692. }
  108693. style.backgroundColor = '#' + bgColor.slice(1, 4);
  108694. }
  108695. return style;
  108696. },
  108697. nameStyle: function nameStyle() {
  108698. var style = {};
  108699. if (this.twoWords) {
  108700. if ((this.userName + "").length >= 2) {
  108701. style.transform = 'scale(0.68)';
  108702. }
  108703. }
  108704. return style;
  108705. },
  108706. userName: function userName() {
  108707. if (!this.isJson(this.info)) {
  108708. return '';
  108709. }
  108710. var name = this.info.send_username || this.info.username;
  108711. if (this.info.nickname && !this.isEmojiPrefix(this.info.nickname)) {
  108712. name = this.info.nickname;
  108713. }
  108714. if (this.twoWords) {
  108715. if (this.allChina(name) && $A.count(name) == 3) {
  108716. return name.substring(1, 3).toLocaleUpperCase();
  108717. } else {
  108718. return (name + " ").substring(0, 2).toLocaleUpperCase();
  108719. }
  108720. } else {
  108721. return (name + " ").substring(0, 1).toLocaleUpperCase();
  108722. }
  108723. },
  108724. fullName: function fullName() {
  108725. if (!this.isJson(this.info)) {
  108726. return '';
  108727. }
  108728. var name = this.info.send_username || this.info.username;
  108729. if (this.info.nickname && !this.isEmojiPrefix(this.info.nickname)) {
  108730. name = this.info.nickname;
  108731. }
  108732. return name;
  108733. },
  108734. userImg: function userImg() {
  108735. if (!this.isJson(this.info)) {
  108736. return '';
  108737. }
  108738. if (this.againUrl) {
  108739. return this.againUrl;
  108740. }
  108741. return this.info.send_userimg || this.info.userimg;
  108742. }
  108743. },
  108744. methods: {
  108745. isJson: function isJson(obj) {
  108746. return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && typeof obj.length == "undefined";
  108747. },
  108748. isShowImg: function isShowImg(url) {
  108749. return !!(url && !$A.rightExists(url, 'images/other/avatar.png'));
  108750. },
  108751. isEmojiPrefix: function isEmojiPrefix(text) {
  108752. return (/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(text)
  108753. );
  108754. },
  108755. allChina: function allChina(str) {
  108756. if (/^[\u4e00-\u9fa5]+$/.test(str)) {
  108757. return true; //全是中文
  108758. } else {
  108759. return false;
  108760. }
  108761. },
  108762. loadError: function loadError() {
  108763. if (!this.againUrl) {
  108764. if ($A.rightExists(this.userImg, 'images/other/system-message.png')) {
  108765. this.againUrl = $A.fillUrl('images/other/system-message.png');
  108766. return;
  108767. } else if ($A.rightExists(this.userImg, 'images/other/group.png')) {
  108768. this.againUrl = $A.fillUrl('images/other/group.png');
  108769. return;
  108770. }
  108771. }
  108772. this.imgError = true;
  108773. },
  108774. onClick: function onClick(e) {
  108775. this.$emit('click', e);
  108776. }
  108777. }
  108778. });
  108779. /***/ }),
  108780. /* 230 */
  108781. /***/ (function(module, exports, __webpack_require__) {
  108782. var render = function() {
  108783. var _vm = this
  108784. var _h = _vm.$createElement
  108785. var _c = _vm._self._c || _h
  108786. return _c(
  108787. "div",
  108788. {
  108789. staticClass: "userimg-container",
  108790. class: { "usering-scale": _vm.scale },
  108791. attrs: { title: _vm.showTitle ? _vm.fullName : "" },
  108792. on: { click: _vm.onClick }
  108793. },
  108794. [
  108795. this.isJson(_vm.info)
  108796. ? [
  108797. _vm.isShowImg(_vm.userImg) && !_vm.imgError
  108798. ? _c("img", {
  108799. staticClass: "userimg-container-img",
  108800. attrs: { src: _vm.userImg },
  108801. on: { error: _vm.loadError }
  108802. })
  108803. : _c(
  108804. "div",
  108805. {
  108806. staticClass: "userimg-container-box",
  108807. style: _vm.textStyle
  108808. },
  108809. [
  108810. _c(
  108811. "div",
  108812. {
  108813. staticClass: "usertext-container-text",
  108814. style: _vm.nameStyle
  108815. },
  108816. [_vm._v(_vm._s(_vm.userName))]
  108817. )
  108818. ]
  108819. )
  108820. ]
  108821. : _vm._e()
  108822. ],
  108823. 2
  108824. )
  108825. }
  108826. var staticRenderFns = []
  108827. render._withStripped = true
  108828. module.exports = { render: render, staticRenderFns: staticRenderFns }
  108829. if (false) {
  108830. module.hot.accept()
  108831. if (module.hot.data) {
  108832. require("vue-hot-reload-api") .rerender("data-v-6b3af333", module.exports)
  108833. }
  108834. }
  108835. /***/ }),
  108836. /* 231 */
  108837. /***/ (function(module, exports, __webpack_require__) {
  108838. var disposed = false
  108839. function injectStyle (ssrContext) {
  108840. if (disposed) return
  108841. __webpack_require__(232)
  108842. }
  108843. var normalizeComponent = __webpack_require__(2)
  108844. /* script */
  108845. var __vue_script__ = __webpack_require__(234)
  108846. /* template */
  108847. var __vue_template__ = __webpack_require__(235)
  108848. /* template functional */
  108849. var __vue_template_functional__ = false
  108850. /* styles */
  108851. var __vue_styles__ = injectStyle
  108852. /* scopeId */
  108853. var __vue_scopeId__ = "data-v-3f1dd09a"
  108854. /* moduleIdentifier (server only) */
  108855. var __vue_module_identifier__ = null
  108856. var Component = normalizeComponent(
  108857. __vue_script__,
  108858. __vue_template__,
  108859. __vue_template_functional__,
  108860. __vue_styles__,
  108861. __vue_scopeId__,
  108862. __vue_module_identifier__
  108863. )
  108864. Component.options.__file = "resources/assets/js/main/components/WLoading.vue"
  108865. /* hot reload */
  108866. if (false) {(function () {
  108867. var hotAPI = require("vue-hot-reload-api")
  108868. hotAPI.install(require("vue"), false)
  108869. if (!hotAPI.compatible) return
  108870. module.hot.accept()
  108871. if (!module.hot.data) {
  108872. hotAPI.createRecord("data-v-3f1dd09a", Component.options)
  108873. } else {
  108874. hotAPI.reload("data-v-3f1dd09a", Component.options)
  108875. }
  108876. module.hot.dispose(function (data) {
  108877. disposed = true
  108878. })
  108879. })()}
  108880. module.exports = Component.exports
  108881. /***/ }),
  108882. /* 232 */
  108883. /***/ (function(module, exports, __webpack_require__) {
  108884. // style-loader: Adds some css to the DOM by adding a <style> tag
  108885. // load the styles
  108886. var content = __webpack_require__(233);
  108887. if(typeof content === 'string') content = [[module.i, content, '']];
  108888. if(content.locals) module.exports = content.locals;
  108889. // add the styles to the DOM
  108890. var update = __webpack_require__(1)("6e0ddf92", content, false, {});
  108891. // Hot Module Replacement
  108892. if(false) {
  108893. // When the styles change, update the <style> tags
  108894. if(!content.locals) {
  108895. module.hot.accept("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-3f1dd09a\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./WLoading.vue", function() {
  108896. var newContent = require("!!../../../../../node_modules/css-loader/index.js!../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-3f1dd09a\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../node_modules/sass-loader/lib/loader.js!../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./WLoading.vue");
  108897. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  108898. update(newContent);
  108899. });
  108900. }
  108901. // When the module is disposed, remove the <style> tags
  108902. module.hot.dispose(function() { update(); });
  108903. }
  108904. /***/ }),
  108905. /* 233 */
  108906. /***/ (function(module, exports, __webpack_require__) {
  108907. exports = module.exports = __webpack_require__(0)(false);
  108908. // imports
  108909. // module
  108910. exports.push([module.i, "\n.w-loading[data-v-3f1dd09a] {\n -webkit-animation: rotate-data-v-3f1dd09a 2s linear infinite;\n animation: rotate-data-v-3f1dd09a 2s linear infinite;\n -webkit-transform-origin: center center;\n transform-origin: center center;\n width: 30px;\n height: 30px;\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n overflow: hidden;\n}\n.w-loading .w-path[data-v-3f1dd09a] {\n stroke-dasharray: 1,200;\n stroke-dashoffset: 0;\n -webkit-animation: dash-data-v-3f1dd09a 1.5s ease-in-out infinite,color-data-v-3f1dd09a 6s ease-in-out infinite;\n animation: dash-data-v-3f1dd09a 1.5s ease-in-out infinite,color-data-v-3f1dd09a 6s ease-in-out infinite;\n stroke-linecap: round;\n}\n@-webkit-keyframes rotate-data-v-3f1dd09a {\nto {\n -webkit-transform: rotate(1turn);\n transform: rotate(1turn);\n}\n}\n@keyframes rotate-data-v-3f1dd09a {\nto {\n -webkit-transform: rotate(1turn);\n transform: rotate(1turn);\n}\n}\n@-webkit-keyframes dash-data-v-3f1dd09a {\n0% {\n stroke-dasharray: 1,200;\n stroke-dashoffset: 0;\n}\n50% {\n stroke-dasharray: 89,200;\n stroke-dashoffset: -35;\n}\nto {\n stroke-dasharray: 89,200;\n stroke-dashoffset: -124;\n}\n}\n@keyframes dash-data-v-3f1dd09a {\n0% {\n stroke-dasharray: 1,200;\n stroke-dashoffset: 0;\n}\n50% {\n stroke-dasharray: 89,200;\n stroke-dashoffset: -35;\n}\nto {\n stroke-dasharray: 89,200;\n stroke-dashoffset: -124;\n}\n}\n@-webkit-keyframes color-data-v-3f1dd09a {\n0%, to {\n stroke: #d62d20;\n}\n40% {\n stroke: #0057e7;\n}\n66% {\n stroke: #008744;\n}\n80%, 90% {\n stroke: #ffa700;\n}\n}\n@keyframes color-data-v-3f1dd09a {\n0%, to {\n stroke: #d62d20;\n}\n40% {\n stroke: #0057e7;\n}\n66% {\n stroke: #008744;\n}\n80%, 90% {\n stroke: #ffa700;\n}\n}\n", ""]);
  108911. // exports
  108912. /***/ }),
  108913. /* 234 */
  108914. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  108915. "use strict";
  108916. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  108917. //
  108918. //
  108919. //
  108920. //
  108921. //
  108922. //
  108923. //
  108924. //
  108925. //
  108926. //
  108927. //
  108928. //
  108929. //
  108930. //
  108931. //
  108932. //
  108933. //
  108934. //
  108935. //
  108936. //
  108937. //
  108938. //
  108939. //
  108940. //
  108941. //
  108942. //
  108943. //
  108944. //
  108945. //
  108946. //
  108947. //
  108948. //
  108949. //
  108950. //
  108951. //
  108952. //
  108953. //
  108954. //
  108955. //
  108956. //
  108957. //
  108958. //
  108959. //
  108960. //
  108961. //
  108962. //
  108963. //
  108964. //
  108965. //
  108966. //
  108967. //
  108968. //
  108969. //
  108970. //
  108971. //
  108972. //
  108973. //
  108974. //
  108975. //
  108976. //
  108977. //
  108978. //
  108979. //
  108980. //
  108981. //
  108982. //
  108983. //
  108984. //
  108985. //
  108986. //
  108987. //
  108988. //
  108989. //
  108990. //
  108991. //
  108992. //
  108993. //
  108994. //
  108995. //
  108996. //
  108997. //
  108998. //
  108999. //
  109000. //
  109001. //
  109002. //
  109003. //
  109004. //
  109005. //
  109006. //
  109007. //
  109008. //
  109009. //
  109010. //
  109011. //
  109012. //
  109013. //
  109014. //
  109015. //
  109016. //
  109017. //
  109018. //
  109019. //
  109020. /* harmony default export */ __webpack_exports__["default"] = ({
  109021. name: 'WLoading'
  109022. });
  109023. /***/ }),
  109024. /* 235 */
  109025. /***/ (function(module, exports, __webpack_require__) {
  109026. var render = function() {
  109027. var _vm = this
  109028. var _h = _vm.$createElement
  109029. var _c = _vm._self._c || _h
  109030. return _c(
  109031. "svg",
  109032. { staticClass: "w-loading", attrs: { viewBox: "25 25 50 50" } },
  109033. [
  109034. _c("circle", {
  109035. staticClass: "w-path",
  109036. attrs: {
  109037. cx: "50",
  109038. cy: "50",
  109039. r: "20",
  109040. fill: "none",
  109041. "stroke-width": "5",
  109042. "stroke-miterlimit": "10"
  109043. }
  109044. })
  109045. ]
  109046. )
  109047. }
  109048. var staticRenderFns = []
  109049. render._withStripped = true
  109050. module.exports = { render: render, staticRenderFns: staticRenderFns }
  109051. if (false) {
  109052. module.hot.accept()
  109053. if (module.hot.data) {
  109054. require("vue-hot-reload-api") .rerender("data-v-3f1dd09a", module.exports)
  109055. }
  109056. }
  109057. /***/ }),
  109058. /* 236 */
  109059. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  109060. "use strict";
  109061. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(4);
  109062. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__);
  109063. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__detail_vue__ = __webpack_require__(237);
  109064. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__detail_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__detail_vue__);
  109065. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  109066. function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
  109067. function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }
  109068. var detailElement = function detailElement(taskid) {
  109069. var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  109070. var cloneData = function cloneData(myObj) {
  109071. if ((typeof myObj === 'undefined' ? 'undefined' : _typeof(myObj)) !== 'object') return myObj;
  109072. if (myObj === null) return myObj;
  109073. //
  109074. if (typeof myObj.length === 'number') {
  109075. var _myObj = _toArray(myObj),
  109076. myNewObj = _myObj.slice(0);
  109077. return myNewObj;
  109078. } else {
  109079. var _myNewObj = _objectWithoutProperties(myObj, []);
  109080. return _myNewObj;
  109081. }
  109082. };
  109083. var isArray = function isArray(myObj) {
  109084. return Object.prototype.toString.call(myObj) == '[object Array]';
  109085. };
  109086. return new Promise(function () {
  109087. var custom = __WEBPACK_IMPORTED_MODULE_0_vue___default.a.extend(__WEBPACK_IMPORTED_MODULE_1__detail_vue___default.a);
  109088. if ((typeof taskid === 'undefined' ? 'undefined' : _typeof(taskid)) === 'object' && taskid !== null) {
  109089. detail = cloneData(taskid);
  109090. taskid = parseInt(taskid.id);
  109091. if (isNaN(taskid)) {
  109092. taskid = 0;
  109093. }
  109094. }
  109095. if ((typeof detail === 'undefined' ? 'undefined' : _typeof(detail)) !== 'object' || detail === null) {
  109096. detail = {};
  109097. }
  109098. if (typeof taskid === "number") {
  109099. detail.taskid = taskid;
  109100. }
  109101. if (!isArray(detail.subtask)) {
  109102. detail.subtask = [];
  109103. }
  109104. var data = {
  109105. taskid: taskid,
  109106. detail: detail
  109107. };
  109108. var instance = new custom({
  109109. data: data
  109110. });
  109111. instance.$mount();
  109112. document.body.appendChild(instance.$el);
  109113. });
  109114. };
  109115. /* harmony default export */ __webpack_exports__["a"] = (detailElement);
  109116. /***/ }),
  109117. /* 237 */
  109118. /***/ (function(module, exports, __webpack_require__) {
  109119. var disposed = false
  109120. function injectStyle (ssrContext) {
  109121. if (disposed) return
  109122. __webpack_require__(238)
  109123. __webpack_require__(240)
  109124. }
  109125. var normalizeComponent = __webpack_require__(2)
  109126. /* script */
  109127. var __vue_script__ = __webpack_require__(242)
  109128. /* template */
  109129. var __vue_template__ = __webpack_require__(280)
  109130. /* template functional */
  109131. var __vue_template_functional__ = false
  109132. /* styles */
  109133. var __vue_styles__ = injectStyle
  109134. /* scopeId */
  109135. var __vue_scopeId__ = "data-v-57fd86f0"
  109136. /* moduleIdentifier (server only) */
  109137. var __vue_module_identifier__ = null
  109138. var Component = normalizeComponent(
  109139. __vue_script__,
  109140. __vue_template__,
  109141. __vue_template_functional__,
  109142. __vue_styles__,
  109143. __vue_scopeId__,
  109144. __vue_module_identifier__
  109145. )
  109146. Component.options.__file = "resources/assets/js/main/components/project/task/detail/detail.vue"
  109147. /* hot reload */
  109148. if (false) {(function () {
  109149. var hotAPI = require("vue-hot-reload-api")
  109150. hotAPI.install(require("vue"), false)
  109151. if (!hotAPI.compatible) return
  109152. module.hot.accept()
  109153. if (!module.hot.data) {
  109154. hotAPI.createRecord("data-v-57fd86f0", Component.options)
  109155. } else {
  109156. hotAPI.reload("data-v-57fd86f0", Component.options)
  109157. }
  109158. module.hot.dispose(function (data) {
  109159. disposed = true
  109160. })
  109161. })()}
  109162. module.exports = Component.exports
  109163. /***/ }),
  109164. /* 238 */
  109165. /***/ (function(module, exports, __webpack_require__) {
  109166. // style-loader: Adds some css to the DOM by adding a <style> tag
  109167. // load the styles
  109168. var content = __webpack_require__(239);
  109169. if(typeof content === 'string') content = [[module.i, content, '']];
  109170. if(content.locals) module.exports = content.locals;
  109171. // add the styles to the DOM
  109172. var update = __webpack_require__(1)("4d2f9578", content, false, {});
  109173. // Hot Module Replacement
  109174. if(false) {
  109175. // When the styles change, update the <style> tags
  109176. if(!content.locals) {
  109177. module.hot.accept("!!../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-57fd86f0\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./detail.vue", function() {
  109178. var newContent = require("!!../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-57fd86f0\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./detail.vue");
  109179. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  109180. update(newContent);
  109181. });
  109182. }
  109183. // When the module is disposed, remove the <style> tags
  109184. module.hot.dispose(function() { update(); });
  109185. }
  109186. /***/ }),
  109187. /* 239 */
  109188. /***/ (function(module, exports, __webpack_require__) {
  109189. exports = module.exports = __webpack_require__(0)(false);
  109190. // imports
  109191. // module
  109192. exports.push([module.i, "\n.project-task-detail-window .detail-title-box .detail-title-input textarea {\n margin: -7px 0 3px -2px;\n font-size: 20px;\n font-weight: 600;\n border: 2px solid #ffffff;\n padding: 2px;\n cursor: pointer;\n color: #172b4d;\n background: #ffffff;\n width: 100%;\n border-radius: 3px;\n resize: none;\n}\n.project-task-detail-window .detail-subtask-input {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n border: 0;\n background: #ffffff;\n margin-left: 2px;\n border-bottom: 1px solid #f6f6f6;\n}\n.project-task-detail-window .detail-subtask-input textarea {\n border: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n outline: none;\n resize: none;\n min-height: auto;\n padding-left: 0;\n padding-right: 0;\n}\n.project-task-detail-window .detail-subtask-input textarea:focus {\n color: #333333;\n}\n.project-task-detail-window .detail-subtask-input.subtask-complete textarea {\n text-decoration: line-through;\n color: #999;\n}\n", ""]);
  109193. // exports
  109194. /***/ }),
  109195. /* 240 */
  109196. /***/ (function(module, exports, __webpack_require__) {
  109197. // style-loader: Adds some css to the DOM by adding a <style> tag
  109198. // load the styles
  109199. var content = __webpack_require__(241);
  109200. if(typeof content === 'string') content = [[module.i, content, '']];
  109201. if(content.locals) module.exports = content.locals;
  109202. // add the styles to the DOM
  109203. var update = __webpack_require__(1)("4f5f86a8", content, false, {});
  109204. // Hot Module Replacement
  109205. if(false) {
  109206. // When the styles change, update the <style> tags
  109207. if(!content.locals) {
  109208. module.hot.accept("!!../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-57fd86f0\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./detail.vue", function() {
  109209. var newContent = require("!!../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-57fd86f0\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./detail.vue");
  109210. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  109211. update(newContent);
  109212. });
  109213. }
  109214. // When the module is disposed, remove the <style> tags
  109215. module.hot.dispose(function() { update(); });
  109216. }
  109217. /***/ }),
  109218. /* 241 */
  109219. /***/ (function(module, exports, __webpack_require__) {
  109220. exports = module.exports = __webpack_require__(0)(false);
  109221. // imports
  109222. // module
  109223. exports.push([module.i, "\n.project-task-detail-window[data-v-57fd86f0] {\n position: fixed;\n z-index: 1001;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n -webkit-transition: all .3s;\n transition: all .3s;\n opacity: 0;\n pointer-events: unset;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.project-task-detail-window.task-detail-show[data-v-57fd86f0] {\n opacity: 1;\n}\n.project-task-detail-window .task-detail-bg[data-v-57fd86f0] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: -1;\n}\n.project-task-detail-window .task-detail-main[data-v-57fd86f0] {\n position: relative;\n z-index: 1;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n width: 92%;\n max-width: 800px;\n max-height: 92%;\n background: #ffffff;\n overflow: visible;\n border-radius: 4px;\n padding: 10px 20px 2px;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n}\n.project-task-detail-window .task-detail-main .detail-left[data-v-57fd86f0] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 8px;\n overflow: auto;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-h2[data-v-57fd86f0] {\n color: #172b4d;\n font-size: 16px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n line-height: 26px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-h2 strong[data-v-57fd86f0] {\n font-size: 14px;\n font-weight: normal;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-h2 strong.link[data-v-57fd86f0] {\n cursor: pointer;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-h2 strong.active[data-v-57fd86f0] {\n font-size: 16px;\n font-weight: bold;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-h2 em[data-v-57fd86f0] {\n margin: 0 9px;\n width: 1px;\n height: 10px;\n background: #cccccc;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-h2 .detail-button[data-v-57fd86f0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: absolute;\n right: 12px;\n top: 50%;\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-h2 .detail-button:hover .detail-button-batch[data-v-57fd86f0] {\n display: inline-block;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-h2 .detail-button .detail-button-btn[data-v-57fd86f0],\n .project-task-detail-window .task-detail-main .detail-left .detail-h2 .detail-button .detail-button-batch[data-v-57fd86f0] {\n font-size: 12px;\n opacity: 0.9;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n margin-left: 5px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-h2 .detail-button .detail-button-btn[data-v-57fd86f0]:hover,\n .project-task-detail-window .task-detail-main .detail-left .detail-h2 .detail-button .detail-button-batch[data-v-57fd86f0]:hover {\n opacity: 1;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-h2 .detail-button .detail-button-batch[data-v-57fd86f0] {\n display: none;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-icon[data-v-57fd86f0] {\n position: relative;\n padding-left: 26px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-icon[data-v-57fd86f0]:before {\n font-family: zenicon;\n font-size: 20px;\n color: #42526e;\n font-weight: 600;\n position: absolute;\n top: 0;\n left: 0;\n width: 26px;\n height: 26px;\n line-height: 26px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-title-box[data-v-57fd86f0] {\n margin-top: 12px;\n margin-bottom: 12px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-title-box[data-v-57fd86f0]:before {\n content: \"\\E740\";\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-title-box .subtitle[data-v-57fd86f0] {\n padding-top: 3px;\n font-size: 12px;\n color: #606266;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-title-box .subtitle .project-title[data-v-57fd86f0] {\n cursor: pointer;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-title-box .subtitle .project-title[data-v-57fd86f0]:hover {\n color: #57a3f3;\n text-decoration: underline;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-desc-box[data-v-57fd86f0]:before {\n content: \"\\E75E\";\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box[data-v-57fd86f0] {\n margin-bottom: 12px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li[data-v-57fd86f0] {\n color: #606266;\n font-size: 14px;\n line-height: 32px;\n word-break: break-all;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li[data-v-57fd86f0]:before {\n font-weight: normal;\n color: #606266;\n font-size: 14px;\n padding-left: 4px;\n line-height: 32px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li.text-time[data-v-57fd86f0]:before {\n content: \"\\E706\";\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li.text-username[data-v-57fd86f0]:before {\n content: \"\\E903\";\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li.text-username .uname-no[data-v-57fd86f0] {\n display: inline-block;\n color: #888888;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li.text-username .uname-button[data-v-57fd86f0] {\n font-size: 12px;\n margin-left: 6px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li.text-username .uname-text[data-v-57fd86f0] {\n line-height: 24px;\n color: #666666;\n font-size: 12px;\n margin-left: 6px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li.text-follower[data-v-57fd86f0]:before {\n content: \"\\E90D\";\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li.text-follower .ivu-tag[data-v-57fd86f0] {\n padding: 0 6px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li.text-follower .user-view-inline[data-v-57fd86f0] {\n height: 20px;\n line-height: 20px;\n vertical-align: top;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li.text-level[data-v-57fd86f0]:before {\n content: \"\\E725\";\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li.text-status[data-v-57fd86f0]:before {\n content: \"\\E6AF\";\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li > span[data-v-57fd86f0] {\n white-space: nowrap;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li > em[data-v-57fd86f0] {\n margin-left: 4px;\n padding-top: 5px;\n line-height: 22px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li > em.p1[data-v-57fd86f0] {\n color: #ed3f14;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li > em.p2[data-v-57fd86f0] {\n color: #ff9900;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li > em.p3[data-v-57fd86f0] {\n color: #19be6b;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li > em.p4[data-v-57fd86f0] {\n color: #666666;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li > em.complete[data-v-57fd86f0] {\n color: #666666;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li > em.complete .completedate[data-v-57fd86f0] {\n font-size: 12px;\n padding-left: 4px;\n opacity: 0.6;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li > em.overdue[data-v-57fd86f0],\n .project-task-detail-window .task-detail-main .detail-left .detail-text-box li > em > em.overdue[data-v-57fd86f0] {\n color: #ff0000;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-text-box li > em.unfinished[data-v-57fd86f0] {\n color: #19be6b;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-file-box[data-v-57fd86f0]:before {\n content: \"\\E8B9\";\n font-size: 16px;\n padding-left: 2px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-subtask-icon[data-v-57fd86f0]:before {\n content: \"\\E819\";\n font-size: 16px;\n padding-left: 2px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-subtask-box[data-v-57fd86f0] {\n padding: 12px;\n margin-bottom: 4px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-subtask-box .detail-subtask-progress[data-v-57fd86f0] {\n margin: 2px 0 6px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-subtask-box .detail-subtask-item[data-v-57fd86f0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n margin: 0 2px 0 -6px;\n padding-top: 4px;\n padding-left: 8px;\n position: relative;\n background-color: #ffffff;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-subtask-box .detail-subtask-item:hover .detail-subtask-right[data-v-57fd86f0] {\n opacity: 1;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-subtask-box .detail-subtask-item .detail-subtask-right[data-v-57fd86f0] {\n opacity: 0;\n position: absolute;\n top: 50%;\n right: 0;\n padding: 0 6px;\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n background: #ffffff;\n border-radius: 3px 0 0 3px;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n cursor: pointer;\n -webkit-box-shadow: -3px 0px 3px 0px rgba(45, 45, 45, 0.1);\n box-shadow: -3px 0px 3px 0px rgba(45, 45, 45, 0.1);\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-subtask-box .detail-subtask-item .detail-subtask-right .detail-subtask-ricon[data-v-57fd86f0] {\n display: inline-block;\n opacity: 0.9;\n width: 18px;\n height: 26px;\n line-height: 26px;\n font-size: 16px;\n text-align: center;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-subtask-box .detail-subtask-item .detail-subtask-right .detail-subtask-ricon[data-v-57fd86f0]:hover {\n opacity: 1;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-subtask-box .detail-subtask-none[data-v-57fd86f0] {\n color: #666666;\n padding: 0 12px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-comment-box[data-v-57fd86f0]:before {\n content: \"\\E753\";\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-footer-box[data-v-57fd86f0] {\n border-top: 1px solid #e5e5e5;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n padding-top: 20px;\n padding-bottom: 16px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-footer-box .comment-input[data-v-57fd86f0] {\n margin-right: 12px;\n}\n.project-task-detail-window .task-detail-main .detail-right[data-v-57fd86f0] {\n margin: 38px 0 6px;\n padding-left: 12px;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.project-task-detail-window .task-detail-main .detail-right .block[data-v-57fd86f0] {\n display: block;\n}\n.project-task-detail-window .task-detail-main .detail-right .block .p1[data-v-57fd86f0] {\n color: #ed3f14;\n}\n.project-task-detail-window .task-detail-main .detail-right .block .p2[data-v-57fd86f0] {\n color: #ff9900;\n}\n.project-task-detail-window .task-detail-main .detail-right .block .p3[data-v-57fd86f0] {\n color: #19be6b;\n}\n.project-task-detail-window .task-detail-main .detail-right .block .p4[data-v-57fd86f0] {\n color: #666666;\n}\n.project-task-detail-window .task-detail-main .detail-right .block .checkmark[data-v-57fd86f0] {\n margin-left: 8px;\n margin-right: -8px;\n}\n.project-task-detail-window .task-detail-main .detail-right .btn[data-v-57fd86f0] {\n display: block;\n width: 118px;\n text-align: left;\n margin-top: 8px;\n padding-left: 10px;\n padding-right: 10px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.project-task-detail-window .task-detail-main .detail-complete[data-v-57fd86f0] {\n display: inline-block;\n pointer-events: none;\n position: absolute;\n top: 6px;\n right: 23%;\n font-size: 72px;\n color: #19be6b;\n opacity: 0.2;\n z-index: 1;\n}\n.project-task-detail-window .task-detail-main .detail-menu[data-v-57fd86f0] {\n display: none;\n position: absolute;\n top: 10px;\n right: 64px;\n text-align: right;\n width: auto;\n height: 38px;\n z-index: 5;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.project-task-detail-window .task-detail-main .detail-cancel[data-v-57fd86f0] {\n position: absolute;\n top: 10px;\n right: 20px;\n text-align: right;\n width: auto;\n height: 38px;\n z-index: 5;\n}\n.project-task-detail-window .task-detail-main .detail-cancel em[data-v-57fd86f0] {\n display: inline-block;\n width: 38px;\n height: 38px;\n cursor: pointer;\n border-radius: 50%;\n -webkit-transform: scale(0.92);\n transform: scale(0.92);\n}\n.project-task-detail-window .task-detail-main .detail-cancel em[data-v-57fd86f0]:after, .project-task-detail-window .task-detail-main .detail-cancel em[data-v-57fd86f0]:before {\n position: absolute;\n content: \"\";\n top: 50%;\n left: 50%;\n width: 2px;\n height: 20px;\n background-color: #EE2321;\n -webkit-transform: translate(-50%, -50%) rotate(45deg) scale(0.6, 1);\n transform: translate(-50%, -50%) rotate(45deg) scale(0.6, 1);\n -webkit-transition: all .2s;\n transition: all .2s;\n}\n.project-task-detail-window .task-detail-main .detail-cancel em[data-v-57fd86f0]:before {\n position: absolute;\n -webkit-transform: translate(-50%, -50%) rotate(-45deg) scale(0.6, 1);\n transform: translate(-50%, -50%) rotate(-45deg) scale(0.6, 1);\n}\n.project-task-detail-window .task-detail-main .detail-cancel em[data-v-57fd86f0]:hover:after, .project-task-detail-window .task-detail-main .detail-cancel em[data-v-57fd86f0]:hover:before {\n background-color: #ff0000;\n -webkit-transform: translate(-50%, -50%) rotate(135deg) scale(0.6, 1);\n transform: translate(-50%, -50%) rotate(135deg) scale(0.6, 1);\n}\n.project-task-detail-window .task-detail-main .detail-cancel em[data-v-57fd86f0]:hover:before {\n background-color: #ff0000;\n -webkit-transform: translate(-50%, -50%) rotate(45deg) scale(0.6, 1);\n transform: translate(-50%, -50%) rotate(45deg) scale(0.6, 1);\n}\n.project-task-detail-window .task-detail-main .detail-drag-over[data-v-57fd86f0] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 6;\n background-color: rgba(255, 255, 255, 0.78);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n border-radius: 4px;\n}\n.project-task-detail-window .task-detail-main .detail-drag-over[data-v-57fd86f0]:before {\n content: \"\";\n position: absolute;\n top: 16px;\n left: 16px;\n right: 16px;\n bottom: 16px;\n border: 2px dashed #7b7b7b;\n border-radius: 12px;\n}\n.project-task-detail-window .task-detail-main .detail-drag-over .detail-drag-text[data-v-57fd86f0] {\n padding: 12px;\n font-size: 18px;\n color: #666666;\n}\n@media (max-width: 768px) {\n.project-task-detail-window .task-detail-main[data-v-57fd86f0] {\n padding: 10px 12px 2px;\n}\n.project-task-detail-window .task-detail-main .detail-left[data-v-57fd86f0] {\n margin-top: 32px;\n}\n.project-task-detail-window .task-detail-main .detail-left .detail-icon[data-v-57fd86f0] {\n padding-left: 22px;\n}\n.project-task-detail-window .task-detail-main .detail-right[data-v-57fd86f0] {\n -webkit-transform: translate(200%, 0);\n transform: translate(200%, 0);\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n margin: 0;\n padding: 48px 18px;\n background: #ffffff;\n -webkit-box-shadow: 0 1px 6px 0 rgba(32, 33, 36, 0.28);\n box-shadow: 0 1px 6px 0 rgba(32, 33, 36, 0.28);\n z-index: 4;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.project-task-detail-window .task-detail-main .detail-right.open-menu[data-v-57fd86f0] {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.project-task-detail-window .task-detail-main .detail-menu[data-v-57fd86f0] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n}\n", ""]);
  109224. // exports
  109225. /***/ }),
  109226. /* 242 */
  109227. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  109228. "use strict";
  109229. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  109230. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__logs__ = __webpack_require__(58);
  109231. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__logs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__logs__);
  109232. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__files__ = __webpack_require__(57);
  109233. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__files___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__files__);
  109234. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vuedraggable__ = __webpack_require__(51);
  109235. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vuedraggable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_vuedraggable__);
  109236. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep__ = __webpack_require__(243);
  109237. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep__);
  109238. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__iview_WInput__ = __webpack_require__(268);
  109239. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__iview_WInput___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__iview_WInput__);
  109240. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DescEditor__ = __webpack_require__(273);
  109241. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__DescEditor___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__DescEditor__);
  109242. //
  109243. //
  109244. //
  109245. //
  109246. //
  109247. //
  109248. //
  109249. //
  109250. //
  109251. //
  109252. //
  109253. //
  109254. //
  109255. //
  109256. //
  109257. //
  109258. //
  109259. //
  109260. //
  109261. //
  109262. //
  109263. //
  109264. //
  109265. //
  109266. //
  109267. //
  109268. //
  109269. //
  109270. //
  109271. //
  109272. //
  109273. //
  109274. //
  109275. //
  109276. //
  109277. //
  109278. //
  109279. //
  109280. //
  109281. //
  109282. //
  109283. //
  109284. //
  109285. //
  109286. //
  109287. //
  109288. //
  109289. //
  109290. //
  109291. //
  109292. //
  109293. //
  109294. //
  109295. //
  109296. //
  109297. //
  109298. //
  109299. //
  109300. //
  109301. //
  109302. //
  109303. //
  109304. //
  109305. //
  109306. //
  109307. //
  109308. //
  109309. //
  109310. //
  109311. //
  109312. //
  109313. //
  109314. //
  109315. //
  109316. //
  109317. //
  109318. //
  109319. //
  109320. //
  109321. //
  109322. //
  109323. //
  109324. //
  109325. //
  109326. //
  109327. //
  109328. //
  109329. //
  109330. //
  109331. //
  109332. //
  109333. //
  109334. //
  109335. //
  109336. //
  109337. //
  109338. //
  109339. //
  109340. //
  109341. //
  109342. //
  109343. //
  109344. //
  109345. //
  109346. //
  109347. //
  109348. //
  109349. //
  109350. //
  109351. //
  109352. //
  109353. //
  109354. //
  109355. //
  109356. //
  109357. //
  109358. //
  109359. //
  109360. //
  109361. //
  109362. //
  109363. //
  109364. //
  109365. //
  109366. //
  109367. //
  109368. //
  109369. //
  109370. //
  109371. //
  109372. //
  109373. //
  109374. //
  109375. //
  109376. //
  109377. //
  109378. //
  109379. //
  109380. //
  109381. //
  109382. //
  109383. //
  109384. //
  109385. //
  109386. //
  109387. //
  109388. //
  109389. //
  109390. //
  109391. //
  109392. //
  109393. //
  109394. //
  109395. //
  109396. //
  109397. //
  109398. //
  109399. //
  109400. //
  109401. //
  109402. //
  109403. //
  109404. //
  109405. //
  109406. //
  109407. //
  109408. //
  109409. //
  109410. //
  109411. //
  109412. //
  109413. //
  109414. //
  109415. //
  109416. //
  109417. //
  109418. //
  109419. //
  109420. //
  109421. //
  109422. //
  109423. //
  109424. //
  109425. //
  109426. //
  109427. //
  109428. //
  109429. //
  109430. //
  109431. //
  109432. //
  109433. //
  109434. //
  109435. //
  109436. //
  109437. //
  109438. //
  109439. //
  109440. //
  109441. //
  109442. //
  109443. //
  109444. //
  109445. //
  109446. //
  109447. //
  109448. //
  109449. //
  109450. //
  109451. //
  109452. //
  109453. //
  109454. //
  109455. //
  109456. //
  109457. //
  109458. //
  109459. //
  109460. //
  109461. //
  109462. //
  109463. //
  109464. //
  109465. //
  109466. /* harmony default export */ __webpack_exports__["default"] = ({
  109467. components: { DescEditor: __WEBPACK_IMPORTED_MODULE_5__DescEditor___default.a, WInput: __WEBPACK_IMPORTED_MODULE_4__iview_WInput___default.a, ProjectTaskFiles: __WEBPACK_IMPORTED_MODULE_1__files___default.a, ProjectTaskLogs: __WEBPACK_IMPORTED_MODULE_0__logs___default.a, draggable: __WEBPACK_IMPORTED_MODULE_2_vuedraggable___default.a },
  109468. data: function data() {
  109469. return {
  109470. taskid: 0,
  109471. detail: {},
  109472. detailDragOver: false,
  109473. visible: false,
  109474. subwinVisible: 0,
  109475. urlProjectid: 0,
  109476. bakData: {},
  109477. loadData: {},
  109478. loadRand: {},
  109479. commentText: '',
  109480. logType: '评论',
  109481. timeValue: [],
  109482. timeOptions: {},
  109483. openMenu: false
  109484. };
  109485. },
  109486. beforeCreate: function beforeCreate() {
  109487. var doms = document.querySelectorAll('.project-task-detail-window');
  109488. for (var i = 0; i < doms.length; ++i) {
  109489. if (doms[i].parentNode != null) doms[i].parentNode.removeChild(doms[i]);
  109490. }
  109491. },
  109492. mounted: function mounted() {
  109493. var _this = this;
  109494. var match = (window.location.pathname + "").match(/\/project\/panel\/(\d+)$/i);
  109495. this.urlProjectid = match ? match[1] : 0;
  109496. //
  109497. this.$nextTick(function () {
  109498. var dom = _this.$el;
  109499. if (parseInt(_this.taskid) === 0) {
  109500. if (dom.parentNode != null) dom.parentNode.removeChild(dom);
  109501. return;
  109502. }
  109503. //
  109504. dom.addEventListener('transitionend', function () {
  109505. if (dom !== null && dom.parentNode !== null && !_this.visible) {
  109506. dom.parentNode.removeChild(dom);
  109507. }
  109508. }, false);
  109509. //
  109510. setTimeout(function () {
  109511. _this.visible = true;
  109512. }, 0);
  109513. });
  109514. this.bakData = __WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep___default()(this.detail);
  109515. this.getTaskDetail("mounted");
  109516. //
  109517. $A.setOnTaskInfoListener('components/project/task/detail', function (act, detail) {
  109518. if (detail.id != _this.taskid) {
  109519. return;
  109520. }
  109521. if (detail.__modifyUsername == _this.usrName) {
  109522. return;
  109523. }
  109524. _this.getTaskDetail("setOnTaskInfoListener");
  109525. }, true);
  109526. },
  109527. watch: {
  109528. taskid: function taskid() {
  109529. this.bakData = __WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep___default()(this.detail);
  109530. this.getTaskDetail("watch");
  109531. }
  109532. },
  109533. computed: {
  109534. subtaskProgress: function subtaskProgress() {
  109535. var countLists = this.detail.subtask;
  109536. if (countLists.length === 0) {
  109537. return 0;
  109538. }
  109539. var completeLists = countLists.filter(function (item) {
  109540. return item.status == 'complete';
  109541. });
  109542. return parseFloat((completeLists.length / countLists.length * 100).toFixed(2));
  109543. }
  109544. },
  109545. methods: {
  109546. initLanguage: function initLanguage() {
  109547. var lastSecond = function lastSecond(e) {
  109548. return new Date($A.formatDate("Y-m-d 23:59:29", Math.round(e / 1000)));
  109549. };
  109550. this.timeOptions = {
  109551. shortcuts: [{
  109552. text: this.$L('今天'),
  109553. value: function value() {
  109554. return [new Date(), lastSecond(new Date().getTime())];
  109555. }
  109556. }, {
  109557. text: this.$L('明天'),
  109558. value: function value() {
  109559. var e = new Date();
  109560. e.setDate(e.getDate() + 1);
  109561. return [new Date(), lastSecond(e.getTime())];
  109562. }
  109563. }, {
  109564. text: this.$L('本周'),
  109565. value: function value() {
  109566. return [$A.getData('今天', true), lastSecond($A.getData('本周结束2', true))];
  109567. }
  109568. }, {
  109569. text: this.$L('本月'),
  109570. value: function value() {
  109571. return [$A.getData('今天', true), lastSecond($A.getData('本月结束', true))];
  109572. }
  109573. }, {
  109574. text: this.$L('3天'),
  109575. value: function value() {
  109576. var e = new Date();
  109577. e.setDate(e.getDate() + 3);
  109578. return [new Date(), lastSecond(e.getTime())];
  109579. }
  109580. }, {
  109581. text: this.$L('5天'),
  109582. value: function value() {
  109583. var e = new Date();
  109584. e.setDate(e.getDate() + 5);
  109585. return [new Date(), lastSecond(e.getTime())];
  109586. }
  109587. }, {
  109588. text: this.$L('7天'),
  109589. value: function value() {
  109590. var e = new Date();
  109591. e.setDate(e.getDate() + 7);
  109592. return [new Date(), lastSecond(e.getTime())];
  109593. }
  109594. }]
  109595. };
  109596. },
  109597. levelFormt: function levelFormt(p) {
  109598. switch (parseInt(p)) {
  109599. case 1:
  109600. return this.$L("重要且紧急") + " (P1)";
  109601. case 2:
  109602. return this.$L("重要不紧急") + " (P2)";
  109603. case 3:
  109604. return this.$L("紧急不重要") + " (P3)";
  109605. case 4:
  109606. return this.$L("不重要不紧急") + " (P4)";
  109607. }
  109608. },
  109609. titleKeydown: function titleKeydown(e) {
  109610. if (e.keyCode == 13) {
  109611. e.preventDefault();
  109612. e.target.blur();
  109613. }
  109614. },
  109615. descKeydown: function descKeydown(e) {
  109616. if (e.keyCode == 13) {
  109617. if (e.shiftKey) {
  109618. return;
  109619. }
  109620. e.preventDefault();
  109621. e.target.blur();
  109622. }
  109623. },
  109624. commentKeydown: function commentKeydown(e) {
  109625. if (e.keyCode == 13) {
  109626. if (e.shiftKey) {
  109627. return;
  109628. }
  109629. e.preventDefault();
  109630. this.handleTask('comment');
  109631. }
  109632. },
  109633. commentDragOver: function commentDragOver(show) {
  109634. var _this2 = this;
  109635. var random = this.__detailDragOver = $A.randomString(8);
  109636. if (!show) {
  109637. setTimeout(function () {
  109638. if (random === _this2.__detailDragOver) {
  109639. _this2.detailDragOver = show;
  109640. }
  109641. }, 150);
  109642. } else {
  109643. this.detailDragOver = show;
  109644. }
  109645. },
  109646. commentPasteDrag: function commentPasteDrag(e, type) {
  109647. var _this3 = this;
  109648. this.detailDragOver = false;
  109649. var files = type === 'drag' ? e.dataTransfer.files : e.clipboardData.files;
  109650. var postFiles = Array.prototype.slice.call(files);
  109651. if (postFiles.length > 0) {
  109652. e.preventDefault();
  109653. postFiles.forEach(function (file) {
  109654. _this3.$refs.projectUpload.upload(file);
  109655. });
  109656. }
  109657. },
  109658. subtaskKeydown: function subtaskKeydown(subindex, e) {
  109659. if (e.keyCode == 13) {
  109660. if (e.shiftKey) {
  109661. return;
  109662. }
  109663. e.preventDefault();
  109664. this.handleTask('subtaskEnter', subindex);
  109665. }
  109666. },
  109667. followerLength: function followerLength(follower) {
  109668. if (follower instanceof Array) {
  109669. return follower.length;
  109670. } else {
  109671. return 0;
  109672. }
  109673. },
  109674. followerToStr: function followerToStr(follower) {
  109675. if (follower instanceof Array) {
  109676. return follower.join(",");
  109677. } else {
  109678. return '';
  109679. }
  109680. },
  109681. haveAttention: function haveAttention(follower) {
  109682. var _this4 = this;
  109683. if (follower instanceof Array) {
  109684. return follower.filter(function (uname) {
  109685. return uname == _this4.usrName;
  109686. }).length > 0;
  109687. } else {
  109688. return 0;
  109689. }
  109690. },
  109691. getTaskDetail: function getTaskDetail() {
  109692. var _this5 = this;
  109693. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  109694. $A.apiAjax({
  109695. url: 'project/task/detail',
  109696. data: {
  109697. taskid: this.taskid
  109698. },
  109699. error: function error() {
  109700. alert(_this5.$L('网络繁忙,请稍后再试!'));
  109701. _this5.visible = false;
  109702. },
  109703. success: function success(res) {
  109704. if (res.ret === 1) {
  109705. _this5.detail = Object.assign(_this5.detail, res.data);
  109706. _this5.bakData = __WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep___default()(_this5.detail);
  109707. _this5.$nextTick(function () {
  109708. _this5.$refs.titleInput.resizeTextarea();
  109709. _this5.detail.subtask.forEach(function (temp, index) {
  109710. _this5.$refs['subtaskInput_' + index][0].resizeTextarea();
  109711. });
  109712. });
  109713. } else {
  109714. _this5.$Modal.error({
  109715. title: _this5.$L('温馨提示'),
  109716. content: res.msg,
  109717. onOk: function onOk() {
  109718. _this5.visible = false;
  109719. }
  109720. });
  109721. }
  109722. }
  109723. });
  109724. },
  109725. subtaskBatchAdd: function subtaskBatchAdd() {
  109726. var _this6 = this;
  109727. this.inputValue = "";
  109728. this.$Modal.confirm({
  109729. width: 560,
  109730. render: function render(h) {
  109731. return h('div', [h('div', {
  109732. style: {
  109733. fontSize: '16px',
  109734. fontWeight: '500',
  109735. marginBottom: '20px'
  109736. }
  109737. }, _this6.$L('批量添加子任务')), h('Input', {
  109738. props: {
  109739. type: 'textarea',
  109740. rows: 4,
  109741. autosize: { minRows: 4, maxRows: 30 },
  109742. value: _this6.inputValue,
  109743. placeholder: _this6.$L('使用换行添加多个子任务')
  109744. },
  109745. on: {
  109746. input: function input(val) {
  109747. _this6.inputValue = val;
  109748. }
  109749. }
  109750. })]);
  109751. },
  109752. loading: true,
  109753. onOk: function onOk() {
  109754. if (_this6.inputValue) {
  109755. var tempArray = _this6.inputValue.split(/\n/);
  109756. tempArray.forEach(function (detail) {
  109757. detail = detail.trim();
  109758. detail && _this6.detail.subtask.push({
  109759. time: Math.round(new Date().getTime() / 1000),
  109760. status: 'unfinished',
  109761. detail: detail,
  109762. stip: ''
  109763. });
  109764. });
  109765. _this6.handleTask('subtask', function () {
  109766. _this6.$Modal.remove();
  109767. }, 'all');
  109768. } else {
  109769. _this6.$Modal.remove();
  109770. }
  109771. }
  109772. });
  109773. },
  109774. getTaskSort: function getTaskSort() {
  109775. var sortData = "",
  109776. taskData = "";
  109777. this.projectLabel.forEach(function (label) {
  109778. taskData = "";
  109779. label.taskLists.forEach(function (task) {
  109780. if (taskData) taskData += "-";
  109781. taskData += task.id;
  109782. });
  109783. if (sortData) sortData += ";";
  109784. sortData += label.id + ":" + taskData;
  109785. });
  109786. return sortData;
  109787. },
  109788. taskSortUpdate: function taskSortUpdate(isLabel) {
  109789. var oldSort = this.projectSortData;
  109790. var newSort = this.getTaskSort();
  109791. if (oldSort == newSort) {
  109792. return;
  109793. }
  109794. this.projectSortData = newSort;
  109795. this.projectSortDisabled = true;
  109796. this.loadIng++;
  109797. console.log(oldSort, newSort);
  109798. // $A.apiAjax({
  109799. // url: 'project/sort',
  109800. // data: {
  109801. // projectid: this.projectid,
  109802. // oldsort: oldSort,
  109803. // newsort: newSort,
  109804. // label: isLabel === true ? 1 : 0
  109805. // },
  109806. // complete: () => {
  109807. // this.projectSortDisabled = false;
  109808. // this.loadIng--;
  109809. // },
  109810. // error: () => {
  109811. // this.getDetail();
  109812. // alert(this.$L('网络繁忙,请稍后再试!'));
  109813. // },
  109814. // success: (res) => {
  109815. // if (res.ret === 1) {
  109816. // this.projectLabel.forEach((label) => {
  109817. // let length = label.taskLists.length;
  109818. // label.taskLists.forEach((task, index) => {
  109819. // task.inorder = length - index;
  109820. // });
  109821. // });
  109822. // this.taskNewSort();
  109823. // //
  109824. // this.$Message.success(res.msg);
  109825. // $A.triggerTaskInfoListener(isLabel ? 'labelsort' : 'tasksort', { projectid: this.projectid, nickname: $A.getNickName(), time: Math.round(new Date().getTime()/1000) });
  109826. // } else {
  109827. // this.getDetail();
  109828. // this.$Modal.error({title: this.$L('温馨提示'), content: res.msg});
  109829. // }
  109830. // }
  109831. // });
  109832. },
  109833. handleUsernameShow: function handleUsernameShow() {
  109834. this.$set(this.detail, 'newusername', '');
  109835. },
  109836. handleAttentionShow: function handleAttentionShow() {
  109837. this.$set(this.detail, 'attentionLists', this.followerToStr(this.detail.follower));
  109838. },
  109839. handleBgClose: function handleBgClose() {
  109840. if (this.subwinVisible > 0) {
  109841. return;
  109842. }
  109843. this.visible = false;
  109844. },
  109845. handleSubwinToggle: function handleSubwinToggle(visible) {
  109846. if (visible) {
  109847. this.subwinVisible++;
  109848. } else {
  109849. this.subwinVisible--;
  109850. }
  109851. },
  109852. handleTask: function handleTask(act, eve, type) {
  109853. var _this7 = this;
  109854. var ajaxData = {
  109855. act: act,
  109856. taskid: this.taskid,
  109857. type: typeof type === 'undefined' ? '' : type
  109858. };
  109859. var ajaxCallback = function ajaxCallback() {};
  109860. //
  109861. switch (act) {
  109862. case 'title':
  109863. if (this.detail[act] == this.bakData[act]) {
  109864. return;
  109865. }
  109866. if (act == 'title' && !this.detail[act]) {
  109867. this.$set(this.detail, act, this.bakData[act]);
  109868. return;
  109869. }
  109870. ajaxData.content = this.detail[act];
  109871. ajaxCallback = function ajaxCallback(res) {
  109872. if (res !== 1) {
  109873. _this7.$set(_this7.detail, act, _this7.bakData[act]);
  109874. }
  109875. };
  109876. break;
  109877. case 'desc':
  109878. this.logType == '日志' && this.$refs.log.getLists(true, true);
  109879. return;
  109880. case 'subtaskAdd':
  109881. if (!$A.isArray(this.detail.subtask)) {
  109882. this.detail.subtask = [];
  109883. }
  109884. this.detail.subtask.push({
  109885. time: Math.round(new Date().getTime() / 1000),
  109886. status: 'unfinished',
  109887. detail: '',
  109888. stip: ''
  109889. });
  109890. this.$nextTick(function () {
  109891. _this7.$refs['subtaskInput_' + (_this7.detail.subtask.length - 1)][0].focus();
  109892. });
  109893. return;
  109894. case 'subtaskDelete':
  109895. //this.detail.subtask.splice(eve, 1);
  109896. //console.log(type)
  109897. this.handleTask('subtaskBlur', eve, type);
  109898. return;
  109899. case 'subtaskEnter':
  109900. if (!$A.isArray(this.detail.subtask)) {
  109901. this.detail.subtask = [];
  109902. }
  109903. if (eve + 1 >= this.detail.subtask.length) {
  109904. this.handleTask('subtaskAdd');
  109905. return;
  109906. }
  109907. this.$refs['subtaskInput_' + (eve + 1)][0].focus();
  109908. return;
  109909. case 'subtaskBlur':
  109910. this.handleTask('subtask', eve, type);
  109911. return;
  109912. case 'subtask':
  109913. if (type === 'all') {
  109914. //批量
  109915. var tempArray = __WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep___default()(this.detail[act]);
  109916. while (tempArray.length > 0 && tempArray[tempArray.length - 1].detail == '') {
  109917. tempArray.splice(tempArray.length - 1, 1);
  109918. }
  109919. if ($A.jsonStringify(tempArray) === $A.jsonStringify(this.bakData[act])) {
  109920. return;
  109921. }
  109922. ajaxData.content = tempArray;
  109923. } else {
  109924. //单个任务
  109925. if (this.detail.subtask[eve].detail == "" && type == 'detail') {
  109926. return;
  109927. }
  109928. if (this.detail.subtask[eve].uname == "" && type == 'uname') {
  109929. return;
  109930. }
  109931. ajaxData.content = [this.detail.subtask[eve]];
  109932. }
  109933. ajaxCallback = function ajaxCallback(res) {
  109934. if (res !== 1) {
  109935. _this7.$set(_this7.detail, act, __WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep___default()(_this7.bakData[act]));
  109936. }
  109937. typeof eve === "function" && eve(res);
  109938. };
  109939. break;
  109940. case 'fileupload':
  109941. this.$refs.projectUpload.uploadHandleClick();
  109942. return;
  109943. case 'filechange':
  109944. var filenum = $A.runNum(this.detail.filenum);
  109945. switch (eve) {
  109946. case 'up':
  109947. this.$set(this.detail, 'filenum', filenum + 1);
  109948. break;
  109949. case 'error':
  109950. case 'delete':
  109951. this.$set(this.detail, 'filenum', filenum - 1);
  109952. break;
  109953. }
  109954. if (eve == 'add' || eve == 'delete') {
  109955. this.logType == '日志' && this.$refs.log.getLists(true, true);
  109956. $A.triggerTaskInfoChange(ajaxData.taskid);
  109957. }
  109958. return;
  109959. case 'claimb':
  109960. this.$Modal.confirm({
  109961. title: this.$L('认领任务'),
  109962. content: this.$L('你确定认领任务“%”吗?', this.detail.title),
  109963. onOk: function onOk() {
  109964. _this7.handleTask('claim', eve);
  109965. }
  109966. });
  109967. return;
  109968. case 'claim':
  109969. case 'reassign':
  109970. case 'complete':
  109971. case 'unfinished':
  109972. case 'archived':
  109973. case 'unarchived':
  109974. break;
  109975. case 'archived2':
  109976. ajaxData.act = 'complete';
  109977. ajaxCallback = function ajaxCallback(res) {
  109978. if (res === 1 && !_this7.detail.archived) {
  109979. _this7.handleTask('archived');
  109980. return false;
  109981. }
  109982. };
  109983. break;
  109984. case 'level-1':
  109985. case 'level-2':
  109986. case 'level-3':
  109987. case 'level-4':
  109988. ajaxData.act = 'level';
  109989. ajaxData.content = act.substring(6);
  109990. break;
  109991. case 'usernameb':
  109992. if (!eve.username) {
  109993. return;
  109994. }
  109995. this.$Modal.confirm({
  109996. title: this.$L('修改负责人'),
  109997. content: this.$L('你确定修改负责人设置为“%”吗?', eve.nickname || eve.username),
  109998. onOk: function onOk() {
  109999. _this7.handleTask('username', eve);
  110000. }
  110001. });
  110002. return;
  110003. case 'username':
  110004. if (!eve.username) {
  110005. return;
  110006. }
  110007. ajaxData.content = eve.username;
  110008. break;
  110009. case 'inittime':
  110010. if (this.detail.startdate > 0 && this.detail.enddate > 0) {
  110011. this.timeValue = [$A.formatDate("Y-m-d H:i", this.detail.startdate), $A.formatDate("Y-m-d H:i", this.detail.enddate)];
  110012. } else {
  110013. this.timeValue = [];
  110014. }
  110015. return;
  110016. case 'plannedtimeb':
  110017. var temp = $A.date2string(this.timeValue, "Y-m-d H:i");
  110018. if (!temp[0] || !temp[1]) {
  110019. this.$Modal.error({ title: this.$L('温馨提示'), content: this.$L('请选择一个有效时间!') });
  110020. return;
  110021. }
  110022. this.$Modal.confirm({
  110023. title: this.$L('修改计划时间'),
  110024. content: this.$L('你确定将任务计划时间设置为“%”吗?', temp[0] + "~" + temp[1]),
  110025. onOk: function onOk() {
  110026. _this7.handleTask('plannedtime');
  110027. }
  110028. });
  110029. return;
  110030. case 'plannedtime':
  110031. this.timeValue = $A.date2string(this.timeValue, "Y-m-d H:i");
  110032. ajaxData.content = this.timeValue[0] + "," + this.timeValue[1];
  110033. this.$refs.timeRef.handleClose();
  110034. break;
  110035. case 'unplannedtimeb':
  110036. this.$Modal.confirm({
  110037. title: this.$L('取消计划时间'),
  110038. content: this.$L('你确定将任务计划时间取消吗?'),
  110039. onOk: function onOk() {
  110040. _this7.handleTask('unplannedtime');
  110041. }
  110042. });
  110043. return;
  110044. case 'unplannedtime':
  110045. this.$refs.timeRef.handleClose();
  110046. break;
  110047. case 'attentiona':
  110048. ajaxData.act = "attention";
  110049. ajaxData.content = this.usrName;
  110050. break;
  110051. case 'attention':
  110052. if (!this.detail.attentionLists) {
  110053. return;
  110054. }
  110055. ajaxData.mode = eve ? 'clean' : '';
  110056. ajaxData.content = this.detail.attentionLists;
  110057. this.$refs.attentionRef.handleClose();
  110058. break;
  110059. case 'unattention':
  110060. ajaxData.content = eve.username;
  110061. if (eve.uisynch === true) {
  110062. var bakFollower = __WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep___default()(this.detail.follower);
  110063. this.$set(this.detail, 'follower', this.detail.follower.filter(function (uname) {
  110064. return uname != eve;
  110065. }));
  110066. ajaxCallback = function ajaxCallback(res) {
  110067. if (res !== 1) {
  110068. _this7.$set(_this7.detail, 'follower', bakFollower);
  110069. }
  110070. };
  110071. }
  110072. break;
  110073. case 'deleteb':
  110074. this.$Modal.confirm({
  110075. title: this.$L('删除提示'),
  110076. content: this.$L('您确定要删除此任务吗?'),
  110077. onOk: function onOk() {
  110078. _this7.handleTask('delete');
  110079. }
  110080. });
  110081. return;
  110082. case 'delete':
  110083. ajaxCallback = function ajaxCallback(res) {
  110084. if (res === 1) {
  110085. _this7.$Modal.info({
  110086. title: _this7.$L('温馨提示'),
  110087. content: _this7.$L('任务已删除,点击确定关闭窗口。'),
  110088. onOk: function onOk() {
  110089. _this7.visible = false;
  110090. }
  110091. });
  110092. return false;
  110093. }
  110094. };
  110095. break;
  110096. case 'comment':
  110097. if (!this.commentText) {
  110098. return;
  110099. }
  110100. ajaxData.content = this.commentText;
  110101. ajaxCallback = function ajaxCallback(res) {
  110102. if (res === 1) {
  110103. _this7.commentText = "";
  110104. _this7.logType == '评论' && _this7.$refs.log.getLists(true, true);
  110105. }
  110106. };
  110107. break;
  110108. default:
  110109. {
  110110. return;
  110111. }
  110112. }
  110113. //
  110114. var loadRand = $A.randomString(6);
  110115. this.$set(this.loadRand, ajaxData.act, loadRand);
  110116. this.$set(this.loadData, ajaxData.act, true);
  110117. var runTime = Math.round(new Date().getTime());
  110118. $A.apiAjax({
  110119. url: 'project/task/edit',
  110120. method: 'post',
  110121. data: ajaxData,
  110122. complete: function complete() {
  110123. if (_this7.loadRand[ajaxData.act] !== loadRand) {
  110124. return;
  110125. }
  110126. _this7.$set(_this7.loadData, ajaxData.act, false);
  110127. },
  110128. error: function error() {
  110129. if (_this7.loadRand[ajaxData.act] !== loadRand) {
  110130. return;
  110131. }
  110132. ajaxCallback(-1);
  110133. alert(_this7.$L('网络繁忙,请稍后再试!'));
  110134. },
  110135. success: function success(res) {
  110136. if (_this7.loadRand[ajaxData.act] !== loadRand) {
  110137. return;
  110138. }
  110139. runTime = Math.round(new Date().getTime()) - runTime;
  110140. if (res.ret === 1) {
  110141. var _tempArray = __WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep___default()(_this7.detail.subtask);
  110142. _this7.detail = res.data;
  110143. _this7.bakData = __WEBPACK_IMPORTED_MODULE_3_lodash_cloneDeep___default()(_this7.detail);
  110144. while (_tempArray.length > 0 && _tempArray[_tempArray.length - 1].detail == '') {
  110145. _tempArray.splice(_tempArray.length - 1, 1);
  110146. _this7.detail.subtask.push({
  110147. uname: '',
  110148. time: Math.round(new Date().getTime() / 1000),
  110149. status: 'unfinished',
  110150. detail: '',
  110151. stip: ''
  110152. });
  110153. }
  110154. $A.triggerTaskInfoListener(ajaxData.act, res.data);
  110155. $A.triggerTaskInfoChange(ajaxData.taskid);
  110156. setTimeout(function () {
  110157. if (ajaxCallback(1) !== false) {
  110158. _this7.logType == '日志' && _this7.$refs.log.getLists(true, true);
  110159. _this7.$Message.success(res.msg);
  110160. }
  110161. }, Math.max(0, 350 - runTime));
  110162. //$A.triggerTaskDing(ajaxData);
  110163. } else {
  110164. setTimeout(function () {
  110165. ajaxCallback(0);
  110166. _this7.$Modal.error({ title: _this7.$L('温馨提示'), content: res.msg });
  110167. }, Math.max(0, 350 - runTime));
  110168. }
  110169. }
  110170. });
  110171. },
  110172. openProject: function openProject(projectid) {
  110173. try {
  110174. this.visible = false;
  110175. $A.app.$router.push({
  110176. name: 'project-panel',
  110177. params: { projectid: projectid, statistics: '', other: {} }
  110178. });
  110179. } catch (e) {
  110180. this.visible = true;
  110181. }
  110182. }
  110183. }
  110184. });
  110185. /***/ }),
  110186. /* 243 */
  110187. /***/ (function(module, exports, __webpack_require__) {
  110188. var baseClone = __webpack_require__(244);
  110189. /** Used to compose bitmasks for cloning. */
  110190. var CLONE_DEEP_FLAG = 1,
  110191. CLONE_SYMBOLS_FLAG = 4;
  110192. /**
  110193. * This method is like `_.clone` except that it recursively clones `value`.
  110194. *
  110195. * @static
  110196. * @memberOf _
  110197. * @since 1.0.0
  110198. * @category Lang
  110199. * @param {*} value The value to recursively clone.
  110200. * @returns {*} Returns the deep cloned value.
  110201. * @see _.clone
  110202. * @example
  110203. *
  110204. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  110205. *
  110206. * var deep = _.cloneDeep(objects);
  110207. * console.log(deep[0] === objects[0]);
  110208. * // => false
  110209. */
  110210. function cloneDeep(value) {
  110211. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  110212. }
  110213. module.exports = cloneDeep;
  110214. /***/ }),
  110215. /* 244 */
  110216. /***/ (function(module, exports, __webpack_require__) {
  110217. var Stack = __webpack_require__(55),
  110218. arrayEach = __webpack_require__(245),
  110219. assignValue = __webpack_require__(45),
  110220. baseAssign = __webpack_require__(247),
  110221. baseAssignIn = __webpack_require__(248),
  110222. cloneBuffer = __webpack_require__(251),
  110223. copyArray = __webpack_require__(252),
  110224. copySymbols = __webpack_require__(253),
  110225. copySymbolsIn = __webpack_require__(254),
  110226. getAllKeys = __webpack_require__(60),
  110227. getAllKeysIn = __webpack_require__(255),
  110228. getTag = __webpack_require__(21),
  110229. initCloneArray = __webpack_require__(256),
  110230. initCloneByTag = __webpack_require__(257),
  110231. initCloneObject = __webpack_require__(262),
  110232. isArray = __webpack_require__(16),
  110233. isBuffer = __webpack_require__(34),
  110234. isMap = __webpack_require__(264),
  110235. isObject = __webpack_require__(9),
  110236. isSet = __webpack_require__(266),
  110237. keys = __webpack_require__(19),
  110238. keysIn = __webpack_require__(28);
  110239. /** Used to compose bitmasks for cloning. */
  110240. var CLONE_DEEP_FLAG = 1,
  110241. CLONE_FLAT_FLAG = 2,
  110242. CLONE_SYMBOLS_FLAG = 4;
  110243. /** `Object#toString` result references. */
  110244. var argsTag = '[object Arguments]',
  110245. arrayTag = '[object Array]',
  110246. boolTag = '[object Boolean]',
  110247. dateTag = '[object Date]',
  110248. errorTag = '[object Error]',
  110249. funcTag = '[object Function]',
  110250. genTag = '[object GeneratorFunction]',
  110251. mapTag = '[object Map]',
  110252. numberTag = '[object Number]',
  110253. objectTag = '[object Object]',
  110254. regexpTag = '[object RegExp]',
  110255. setTag = '[object Set]',
  110256. stringTag = '[object String]',
  110257. symbolTag = '[object Symbol]',
  110258. weakMapTag = '[object WeakMap]';
  110259. var arrayBufferTag = '[object ArrayBuffer]',
  110260. dataViewTag = '[object DataView]',
  110261. float32Tag = '[object Float32Array]',
  110262. float64Tag = '[object Float64Array]',
  110263. int8Tag = '[object Int8Array]',
  110264. int16Tag = '[object Int16Array]',
  110265. int32Tag = '[object Int32Array]',
  110266. uint8Tag = '[object Uint8Array]',
  110267. uint8ClampedTag = '[object Uint8ClampedArray]',
  110268. uint16Tag = '[object Uint16Array]',
  110269. uint32Tag = '[object Uint32Array]';
  110270. /** Used to identify `toStringTag` values supported by `_.clone`. */
  110271. var cloneableTags = {};
  110272. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  110273. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  110274. cloneableTags[boolTag] = cloneableTags[dateTag] =
  110275. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  110276. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  110277. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  110278. cloneableTags[numberTag] = cloneableTags[objectTag] =
  110279. cloneableTags[regexpTag] = cloneableTags[setTag] =
  110280. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  110281. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  110282. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  110283. cloneableTags[errorTag] = cloneableTags[funcTag] =
  110284. cloneableTags[weakMapTag] = false;
  110285. /**
  110286. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  110287. * traversed objects.
  110288. *
  110289. * @private
  110290. * @param {*} value The value to clone.
  110291. * @param {boolean} bitmask The bitmask flags.
  110292. * 1 - Deep clone
  110293. * 2 - Flatten inherited properties
  110294. * 4 - Clone symbols
  110295. * @param {Function} [customizer] The function to customize cloning.
  110296. * @param {string} [key] The key of `value`.
  110297. * @param {Object} [object] The parent object of `value`.
  110298. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  110299. * @returns {*} Returns the cloned value.
  110300. */
  110301. function baseClone(value, bitmask, customizer, key, object, stack) {
  110302. var result,
  110303. isDeep = bitmask & CLONE_DEEP_FLAG,
  110304. isFlat = bitmask & CLONE_FLAT_FLAG,
  110305. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  110306. if (customizer) {
  110307. result = object ? customizer(value, key, object, stack) : customizer(value);
  110308. }
  110309. if (result !== undefined) {
  110310. return result;
  110311. }
  110312. if (!isObject(value)) {
  110313. return value;
  110314. }
  110315. var isArr = isArray(value);
  110316. if (isArr) {
  110317. result = initCloneArray(value);
  110318. if (!isDeep) {
  110319. return copyArray(value, result);
  110320. }
  110321. } else {
  110322. var tag = getTag(value),
  110323. isFunc = tag == funcTag || tag == genTag;
  110324. if (isBuffer(value)) {
  110325. return cloneBuffer(value, isDeep);
  110326. }
  110327. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  110328. result = (isFlat || isFunc) ? {} : initCloneObject(value);
  110329. if (!isDeep) {
  110330. return isFlat
  110331. ? copySymbolsIn(value, baseAssignIn(result, value))
  110332. : copySymbols(value, baseAssign(result, value));
  110333. }
  110334. } else {
  110335. if (!cloneableTags[tag]) {
  110336. return object ? value : {};
  110337. }
  110338. result = initCloneByTag(value, tag, isDeep);
  110339. }
  110340. }
  110341. // Check for circular references and return its corresponding clone.
  110342. stack || (stack = new Stack);
  110343. var stacked = stack.get(value);
  110344. if (stacked) {
  110345. return stacked;
  110346. }
  110347. stack.set(value, result);
  110348. if (isSet(value)) {
  110349. value.forEach(function(subValue) {
  110350. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  110351. });
  110352. } else if (isMap(value)) {
  110353. value.forEach(function(subValue, key) {
  110354. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  110355. });
  110356. }
  110357. var keysFunc = isFull
  110358. ? (isFlat ? getAllKeysIn : getAllKeys)
  110359. : (isFlat ? keysIn : keys);
  110360. var props = isArr ? undefined : keysFunc(value);
  110361. arrayEach(props || value, function(subValue, key) {
  110362. if (props) {
  110363. key = subValue;
  110364. subValue = value[key];
  110365. }
  110366. // Recursively populate clone (susceptible to call stack limits).
  110367. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  110368. });
  110369. return result;
  110370. }
  110371. module.exports = baseClone;
  110372. /***/ }),
  110373. /* 245 */
  110374. /***/ (function(module, exports) {
  110375. /**
  110376. * A specialized version of `_.forEach` for arrays without support for
  110377. * iteratee shorthands.
  110378. *
  110379. * @private
  110380. * @param {Array} [array] The array to iterate over.
  110381. * @param {Function} iteratee The function invoked per iteration.
  110382. * @returns {Array} Returns `array`.
  110383. */
  110384. function arrayEach(array, iteratee) {
  110385. var index = -1,
  110386. length = array == null ? 0 : array.length;
  110387. while (++index < length) {
  110388. if (iteratee(array[index], index, array) === false) {
  110389. break;
  110390. }
  110391. }
  110392. return array;
  110393. }
  110394. module.exports = arrayEach;
  110395. /***/ }),
  110396. /* 246 */
  110397. /***/ (function(module, exports, __webpack_require__) {
  110398. var getNative = __webpack_require__(5);
  110399. var defineProperty = (function() {
  110400. try {
  110401. var func = getNative(Object, 'defineProperty');
  110402. func({}, '', {});
  110403. return func;
  110404. } catch (e) {}
  110405. }());
  110406. module.exports = defineProperty;
  110407. /***/ }),
  110408. /* 247 */
  110409. /***/ (function(module, exports, __webpack_require__) {
  110410. var copyObject = __webpack_require__(15),
  110411. keys = __webpack_require__(19);
  110412. /**
  110413. * The base implementation of `_.assign` without support for multiple sources
  110414. * or `customizer` functions.
  110415. *
  110416. * @private
  110417. * @param {Object} object The destination object.
  110418. * @param {Object} source The source object.
  110419. * @returns {Object} Returns `object`.
  110420. */
  110421. function baseAssign(object, source) {
  110422. return object && copyObject(source, keys(source), object);
  110423. }
  110424. module.exports = baseAssign;
  110425. /***/ }),
  110426. /* 248 */
  110427. /***/ (function(module, exports, __webpack_require__) {
  110428. var copyObject = __webpack_require__(15),
  110429. keysIn = __webpack_require__(28);
  110430. /**
  110431. * The base implementation of `_.assignIn` without support for multiple sources
  110432. * or `customizer` functions.
  110433. *
  110434. * @private
  110435. * @param {Object} object The destination object.
  110436. * @param {Object} source The source object.
  110437. * @returns {Object} Returns `object`.
  110438. */
  110439. function baseAssignIn(object, source) {
  110440. return object && copyObject(source, keysIn(source), object);
  110441. }
  110442. module.exports = baseAssignIn;
  110443. /***/ }),
  110444. /* 249 */
  110445. /***/ (function(module, exports, __webpack_require__) {
  110446. var isObject = __webpack_require__(9),
  110447. isPrototype = __webpack_require__(27),
  110448. nativeKeysIn = __webpack_require__(250);
  110449. /** Used for built-in method references. */
  110450. var objectProto = Object.prototype;
  110451. /** Used to check objects for own properties. */
  110452. var hasOwnProperty = objectProto.hasOwnProperty;
  110453. /**
  110454. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  110455. *
  110456. * @private
  110457. * @param {Object} object The object to query.
  110458. * @returns {Array} Returns the array of property names.
  110459. */
  110460. function baseKeysIn(object) {
  110461. if (!isObject(object)) {
  110462. return nativeKeysIn(object);
  110463. }
  110464. var isProto = isPrototype(object),
  110465. result = [];
  110466. for (var key in object) {
  110467. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  110468. result.push(key);
  110469. }
  110470. }
  110471. return result;
  110472. }
  110473. module.exports = baseKeysIn;
  110474. /***/ }),
  110475. /* 250 */
  110476. /***/ (function(module, exports) {
  110477. /**
  110478. * This function is like
  110479. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  110480. * except that it includes inherited enumerable properties.
  110481. *
  110482. * @private
  110483. * @param {Object} object The object to query.
  110484. * @returns {Array} Returns the array of property names.
  110485. */
  110486. function nativeKeysIn(object) {
  110487. var result = [];
  110488. if (object != null) {
  110489. for (var key in Object(object)) {
  110490. result.push(key);
  110491. }
  110492. }
  110493. return result;
  110494. }
  110495. module.exports = nativeKeysIn;
  110496. /***/ }),
  110497. /* 251 */
  110498. /***/ (function(module, exports, __webpack_require__) {
  110499. /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(3);
  110500. /** Detect free variable `exports`. */
  110501. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  110502. /** Detect free variable `module`. */
  110503. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  110504. /** Detect the popular CommonJS extension `module.exports`. */
  110505. var moduleExports = freeModule && freeModule.exports === freeExports;
  110506. /** Built-in value references. */
  110507. var Buffer = moduleExports ? root.Buffer : undefined,
  110508. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
  110509. /**
  110510. * Creates a clone of `buffer`.
  110511. *
  110512. * @private
  110513. * @param {Buffer} buffer The buffer to clone.
  110514. * @param {boolean} [isDeep] Specify a deep clone.
  110515. * @returns {Buffer} Returns the cloned buffer.
  110516. */
  110517. function cloneBuffer(buffer, isDeep) {
  110518. if (isDeep) {
  110519. return buffer.slice();
  110520. }
  110521. var length = buffer.length,
  110522. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  110523. buffer.copy(result);
  110524. return result;
  110525. }
  110526. module.exports = cloneBuffer;
  110527. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(25)(module)))
  110528. /***/ }),
  110529. /* 252 */
  110530. /***/ (function(module, exports) {
  110531. /**
  110532. * Copies the values of `source` to `array`.
  110533. *
  110534. * @private
  110535. * @param {Array} source The array to copy values from.
  110536. * @param {Array} [array=[]] The array to copy values to.
  110537. * @returns {Array} Returns `array`.
  110538. */
  110539. function copyArray(source, array) {
  110540. var index = -1,
  110541. length = source.length;
  110542. array || (array = Array(length));
  110543. while (++index < length) {
  110544. array[index] = source[index];
  110545. }
  110546. return array;
  110547. }
  110548. module.exports = copyArray;
  110549. /***/ }),
  110550. /* 253 */
  110551. /***/ (function(module, exports, __webpack_require__) {
  110552. var copyObject = __webpack_require__(15),
  110553. getSymbols = __webpack_require__(24);
  110554. /**
  110555. * Copies own symbols of `source` to `object`.
  110556. *
  110557. * @private
  110558. * @param {Object} source The object to copy symbols from.
  110559. * @param {Object} [object={}] The object to copy symbols to.
  110560. * @returns {Object} Returns `object`.
  110561. */
  110562. function copySymbols(source, object) {
  110563. return copyObject(source, getSymbols(source), object);
  110564. }
  110565. module.exports = copySymbols;
  110566. /***/ }),
  110567. /* 254 */
  110568. /***/ (function(module, exports, __webpack_require__) {
  110569. var copyObject = __webpack_require__(15),
  110570. getSymbolsIn = __webpack_require__(47);
  110571. /**
  110572. * Copies own and inherited symbols of `source` to `object`.
  110573. *
  110574. * @private
  110575. * @param {Object} source The object to copy symbols from.
  110576. * @param {Object} [object={}] The object to copy symbols to.
  110577. * @returns {Object} Returns `object`.
  110578. */
  110579. function copySymbolsIn(source, object) {
  110580. return copyObject(source, getSymbolsIn(source), object);
  110581. }
  110582. module.exports = copySymbolsIn;
  110583. /***/ }),
  110584. /* 255 */
  110585. /***/ (function(module, exports, __webpack_require__) {
  110586. var baseGetAllKeys = __webpack_require__(40),
  110587. getSymbolsIn = __webpack_require__(47),
  110588. keysIn = __webpack_require__(28);
  110589. /**
  110590. * Creates an array of own and inherited enumerable property names and
  110591. * symbols of `object`.
  110592. *
  110593. * @private
  110594. * @param {Object} object The object to query.
  110595. * @returns {Array} Returns the array of property names and symbols.
  110596. */
  110597. function getAllKeysIn(object) {
  110598. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  110599. }
  110600. module.exports = getAllKeysIn;
  110601. /***/ }),
  110602. /* 256 */
  110603. /***/ (function(module, exports) {
  110604. /** Used for built-in method references. */
  110605. var objectProto = Object.prototype;
  110606. /** Used to check objects for own properties. */
  110607. var hasOwnProperty = objectProto.hasOwnProperty;
  110608. /**
  110609. * Initializes an array clone.
  110610. *
  110611. * @private
  110612. * @param {Array} array The array to clone.
  110613. * @returns {Array} Returns the initialized clone.
  110614. */
  110615. function initCloneArray(array) {
  110616. var length = array.length,
  110617. result = new array.constructor(length);
  110618. // Add properties assigned by `RegExp#exec`.
  110619. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  110620. result.index = array.index;
  110621. result.input = array.input;
  110622. }
  110623. return result;
  110624. }
  110625. module.exports = initCloneArray;
  110626. /***/ }),
  110627. /* 257 */
  110628. /***/ (function(module, exports, __webpack_require__) {
  110629. var cloneArrayBuffer = __webpack_require__(29),
  110630. cloneDataView = __webpack_require__(258),
  110631. cloneRegExp = __webpack_require__(259),
  110632. cloneSymbol = __webpack_require__(260),
  110633. cloneTypedArray = __webpack_require__(261);
  110634. /** `Object#toString` result references. */
  110635. var boolTag = '[object Boolean]',
  110636. dateTag = '[object Date]',
  110637. mapTag = '[object Map]',
  110638. numberTag = '[object Number]',
  110639. regexpTag = '[object RegExp]',
  110640. setTag = '[object Set]',
  110641. stringTag = '[object String]',
  110642. symbolTag = '[object Symbol]';
  110643. var arrayBufferTag = '[object ArrayBuffer]',
  110644. dataViewTag = '[object DataView]',
  110645. float32Tag = '[object Float32Array]',
  110646. float64Tag = '[object Float64Array]',
  110647. int8Tag = '[object Int8Array]',
  110648. int16Tag = '[object Int16Array]',
  110649. int32Tag = '[object Int32Array]',
  110650. uint8Tag = '[object Uint8Array]',
  110651. uint8ClampedTag = '[object Uint8ClampedArray]',
  110652. uint16Tag = '[object Uint16Array]',
  110653. uint32Tag = '[object Uint32Array]';
  110654. /**
  110655. * Initializes an object clone based on its `toStringTag`.
  110656. *
  110657. * **Note:** This function only supports cloning values with tags of
  110658. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  110659. *
  110660. * @private
  110661. * @param {Object} object The object to clone.
  110662. * @param {string} tag The `toStringTag` of the object to clone.
  110663. * @param {boolean} [isDeep] Specify a deep clone.
  110664. * @returns {Object} Returns the initialized clone.
  110665. */
  110666. function initCloneByTag(object, tag, isDeep) {
  110667. var Ctor = object.constructor;
  110668. switch (tag) {
  110669. case arrayBufferTag:
  110670. return cloneArrayBuffer(object);
  110671. case boolTag:
  110672. case dateTag:
  110673. return new Ctor(+object);
  110674. case dataViewTag:
  110675. return cloneDataView(object, isDeep);
  110676. case float32Tag: case float64Tag:
  110677. case int8Tag: case int16Tag: case int32Tag:
  110678. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  110679. return cloneTypedArray(object, isDeep);
  110680. case mapTag:
  110681. return new Ctor;
  110682. case numberTag:
  110683. case stringTag:
  110684. return new Ctor(object);
  110685. case regexpTag:
  110686. return cloneRegExp(object);
  110687. case setTag:
  110688. return new Ctor;
  110689. case symbolTag:
  110690. return cloneSymbol(object);
  110691. }
  110692. }
  110693. module.exports = initCloneByTag;
  110694. /***/ }),
  110695. /* 258 */
  110696. /***/ (function(module, exports, __webpack_require__) {
  110697. var cloneArrayBuffer = __webpack_require__(29);
  110698. /**
  110699. * Creates a clone of `dataView`.
  110700. *
  110701. * @private
  110702. * @param {Object} dataView The data view to clone.
  110703. * @param {boolean} [isDeep] Specify a deep clone.
  110704. * @returns {Object} Returns the cloned data view.
  110705. */
  110706. function cloneDataView(dataView, isDeep) {
  110707. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  110708. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  110709. }
  110710. module.exports = cloneDataView;
  110711. /***/ }),
  110712. /* 259 */
  110713. /***/ (function(module, exports) {
  110714. /** Used to match `RegExp` flags from their coerced string values. */
  110715. var reFlags = /\w*$/;
  110716. /**
  110717. * Creates a clone of `regexp`.
  110718. *
  110719. * @private
  110720. * @param {Object} regexp The regexp to clone.
  110721. * @returns {Object} Returns the cloned regexp.
  110722. */
  110723. function cloneRegExp(regexp) {
  110724. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  110725. result.lastIndex = regexp.lastIndex;
  110726. return result;
  110727. }
  110728. module.exports = cloneRegExp;
  110729. /***/ }),
  110730. /* 260 */
  110731. /***/ (function(module, exports, __webpack_require__) {
  110732. var Symbol = __webpack_require__(18);
  110733. /** Used to convert symbols to primitives and strings. */
  110734. var symbolProto = Symbol ? Symbol.prototype : undefined,
  110735. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  110736. /**
  110737. * Creates a clone of the `symbol` object.
  110738. *
  110739. * @private
  110740. * @param {Object} symbol The symbol object to clone.
  110741. * @returns {Object} Returns the cloned symbol object.
  110742. */
  110743. function cloneSymbol(symbol) {
  110744. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  110745. }
  110746. module.exports = cloneSymbol;
  110747. /***/ }),
  110748. /* 261 */
  110749. /***/ (function(module, exports, __webpack_require__) {
  110750. var cloneArrayBuffer = __webpack_require__(29);
  110751. /**
  110752. * Creates a clone of `typedArray`.
  110753. *
  110754. * @private
  110755. * @param {Object} typedArray The typed array to clone.
  110756. * @param {boolean} [isDeep] Specify a deep clone.
  110757. * @returns {Object} Returns the cloned typed array.
  110758. */
  110759. function cloneTypedArray(typedArray, isDeep) {
  110760. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  110761. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  110762. }
  110763. module.exports = cloneTypedArray;
  110764. /***/ }),
  110765. /* 262 */
  110766. /***/ (function(module, exports, __webpack_require__) {
  110767. var baseCreate = __webpack_require__(263),
  110768. getPrototype = __webpack_require__(48),
  110769. isPrototype = __webpack_require__(27);
  110770. /**
  110771. * Initializes an object clone.
  110772. *
  110773. * @private
  110774. * @param {Object} object The object to clone.
  110775. * @returns {Object} Returns the initialized clone.
  110776. */
  110777. function initCloneObject(object) {
  110778. return (typeof object.constructor == 'function' && !isPrototype(object))
  110779. ? baseCreate(getPrototype(object))
  110780. : {};
  110781. }
  110782. module.exports = initCloneObject;
  110783. /***/ }),
  110784. /* 263 */
  110785. /***/ (function(module, exports, __webpack_require__) {
  110786. var isObject = __webpack_require__(9);
  110787. /** Built-in value references. */
  110788. var objectCreate = Object.create;
  110789. /**
  110790. * The base implementation of `_.create` without support for assigning
  110791. * properties to the created object.
  110792. *
  110793. * @private
  110794. * @param {Object} proto The object to inherit from.
  110795. * @returns {Object} Returns the new object.
  110796. */
  110797. var baseCreate = (function() {
  110798. function object() {}
  110799. return function(proto) {
  110800. if (!isObject(proto)) {
  110801. return {};
  110802. }
  110803. if (objectCreate) {
  110804. return objectCreate(proto);
  110805. }
  110806. object.prototype = proto;
  110807. var result = new object;
  110808. object.prototype = undefined;
  110809. return result;
  110810. };
  110811. }());
  110812. module.exports = baseCreate;
  110813. /***/ }),
  110814. /* 264 */
  110815. /***/ (function(module, exports, __webpack_require__) {
  110816. var baseIsMap = __webpack_require__(265),
  110817. baseUnary = __webpack_require__(20),
  110818. nodeUtil = __webpack_require__(26);
  110819. /* Node.js helper references. */
  110820. var nodeIsMap = nodeUtil && nodeUtil.isMap;
  110821. /**
  110822. * Checks if `value` is classified as a `Map` object.
  110823. *
  110824. * @static
  110825. * @memberOf _
  110826. * @since 4.3.0
  110827. * @category Lang
  110828. * @param {*} value The value to check.
  110829. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  110830. * @example
  110831. *
  110832. * _.isMap(new Map);
  110833. * // => true
  110834. *
  110835. * _.isMap(new WeakMap);
  110836. * // => false
  110837. */
  110838. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  110839. module.exports = isMap;
  110840. /***/ }),
  110841. /* 265 */
  110842. /***/ (function(module, exports, __webpack_require__) {
  110843. var getTag = __webpack_require__(21),
  110844. isObjectLike = __webpack_require__(8);
  110845. /** `Object#toString` result references. */
  110846. var mapTag = '[object Map]';
  110847. /**
  110848. * The base implementation of `_.isMap` without Node.js optimizations.
  110849. *
  110850. * @private
  110851. * @param {*} value The value to check.
  110852. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  110853. */
  110854. function baseIsMap(value) {
  110855. return isObjectLike(value) && getTag(value) == mapTag;
  110856. }
  110857. module.exports = baseIsMap;
  110858. /***/ }),
  110859. /* 266 */
  110860. /***/ (function(module, exports, __webpack_require__) {
  110861. var baseIsSet = __webpack_require__(267),
  110862. baseUnary = __webpack_require__(20),
  110863. nodeUtil = __webpack_require__(26);
  110864. /* Node.js helper references. */
  110865. var nodeIsSet = nodeUtil && nodeUtil.isSet;
  110866. /**
  110867. * Checks if `value` is classified as a `Set` object.
  110868. *
  110869. * @static
  110870. * @memberOf _
  110871. * @since 4.3.0
  110872. * @category Lang
  110873. * @param {*} value The value to check.
  110874. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  110875. * @example
  110876. *
  110877. * _.isSet(new Set);
  110878. * // => true
  110879. *
  110880. * _.isSet(new WeakSet);
  110881. * // => false
  110882. */
  110883. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  110884. module.exports = isSet;
  110885. /***/ }),
  110886. /* 267 */
  110887. /***/ (function(module, exports, __webpack_require__) {
  110888. var getTag = __webpack_require__(21),
  110889. isObjectLike = __webpack_require__(8);
  110890. /** `Object#toString` result references. */
  110891. var setTag = '[object Set]';
  110892. /**
  110893. * The base implementation of `_.isSet` without Node.js optimizations.
  110894. *
  110895. * @private
  110896. * @param {*} value The value to check.
  110897. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  110898. */
  110899. function baseIsSet(value) {
  110900. return isObjectLike(value) && getTag(value) == setTag;
  110901. }
  110902. module.exports = baseIsSet;
  110903. /***/ }),
  110904. /* 268 */
  110905. /***/ (function(module, exports, __webpack_require__) {
  110906. var disposed = false
  110907. var normalizeComponent = __webpack_require__(2)
  110908. /* script */
  110909. var __vue_script__ = __webpack_require__(269)
  110910. /* template */
  110911. var __vue_template__ = __webpack_require__(272)
  110912. /* template functional */
  110913. var __vue_template_functional__ = false
  110914. /* styles */
  110915. var __vue_styles__ = null
  110916. /* scopeId */
  110917. var __vue_scopeId__ = null
  110918. /* moduleIdentifier (server only) */
  110919. var __vue_module_identifier__ = null
  110920. var Component = normalizeComponent(
  110921. __vue_script__,
  110922. __vue_template__,
  110923. __vue_template_functional__,
  110924. __vue_styles__,
  110925. __vue_scopeId__,
  110926. __vue_module_identifier__
  110927. )
  110928. Component.options.__file = "resources/assets/js/main/components/iview/WInput.vue"
  110929. /* hot reload */
  110930. if (false) {(function () {
  110931. var hotAPI = require("vue-hot-reload-api")
  110932. hotAPI.install(require("vue"), false)
  110933. if (!hotAPI.compatible) return
  110934. module.hot.accept()
  110935. if (!module.hot.data) {
  110936. hotAPI.createRecord("data-v-2cdade09", Component.options)
  110937. } else {
  110938. hotAPI.reload("data-v-2cdade09", Component.options)
  110939. }
  110940. module.hot.dispose(function (data) {
  110941. disposed = true
  110942. })
  110943. })()}
  110944. module.exports = Component.exports
  110945. /***/ }),
  110946. /* 269 */
  110947. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  110948. "use strict";
  110949. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  110950. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_view_design_src_utils_assist__ = __webpack_require__(22);
  110951. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_view_design_src_utils_calcTextareaHeight__ = __webpack_require__(270);
  110952. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_view_design_src_mixins_emitter__ = __webpack_require__(36);
  110953. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_view_design_src_mixins_form__ = __webpack_require__(271);
  110954. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  110955. //
  110956. //
  110957. //
  110958. //
  110959. //
  110960. //
  110961. //
  110962. //
  110963. //
  110964. //
  110965. //
  110966. //
  110967. //
  110968. //
  110969. //
  110970. //
  110971. //
  110972. //
  110973. //
  110974. //
  110975. //
  110976. //
  110977. //
  110978. //
  110979. //
  110980. //
  110981. //
  110982. //
  110983. //
  110984. //
  110985. //
  110986. //
  110987. //
  110988. //
  110989. //
  110990. //
  110991. //
  110992. //
  110993. //
  110994. //
  110995. //
  110996. //
  110997. //
  110998. //
  110999. //
  111000. //
  111001. //
  111002. //
  111003. //
  111004. //
  111005. //
  111006. //
  111007. //
  111008. //
  111009. //
  111010. //
  111011. //
  111012. //
  111013. //
  111014. //
  111015. //
  111016. //
  111017. //
  111018. //
  111019. //
  111020. //
  111021. //
  111022. //
  111023. //
  111024. //
  111025. //
  111026. //
  111027. //
  111028. //
  111029. //
  111030. //
  111031. //
  111032. //
  111033. //
  111034. //
  111035. //
  111036. //
  111037. //
  111038. var prefixCls = 'ivu-input';
  111039. /* harmony default export */ __webpack_exports__["default"] = ({
  111040. name: 'WInput',
  111041. mixins: [__WEBPACK_IMPORTED_MODULE_2_view_design_src_mixins_emitter__["a" /* default */], __WEBPACK_IMPORTED_MODULE_3_view_design_src_mixins_form__["a" /* default */]],
  111042. props: {
  111043. type: {
  111044. validator: function validator(value) {
  111045. return Object(__WEBPACK_IMPORTED_MODULE_0_view_design_src_utils_assist__["e" /* oneOf */])(value, ['text', 'textarea', 'password', 'url', 'email', 'date', 'number', 'tel']);
  111046. },
  111047. default: 'text'
  111048. },
  111049. value: {
  111050. type: [String, Number],
  111051. default: ''
  111052. },
  111053. size: {
  111054. validator: function validator(value) {
  111055. return Object(__WEBPACK_IMPORTED_MODULE_0_view_design_src_utils_assist__["e" /* oneOf */])(value, ['small', 'large', 'default']);
  111056. },
  111057. default: function _default() {
  111058. return !this.$IVIEW || this.$IVIEW.size === '' ? 'default' : this.$IVIEW.size;
  111059. }
  111060. },
  111061. placeholder: {
  111062. type: String,
  111063. default: ''
  111064. },
  111065. maxlength: {
  111066. type: [String, Number]
  111067. },
  111068. disabled: {
  111069. type: Boolean,
  111070. default: false
  111071. },
  111072. icon: String,
  111073. autosize: {
  111074. type: [Boolean, Object],
  111075. default: false
  111076. },
  111077. rows: {
  111078. type: Number,
  111079. default: 2
  111080. },
  111081. readonly: {
  111082. type: Boolean,
  111083. default: false
  111084. },
  111085. name: {
  111086. type: String
  111087. },
  111088. number: {
  111089. type: Boolean,
  111090. default: false
  111091. },
  111092. autofocus: {
  111093. type: Boolean,
  111094. default: false
  111095. },
  111096. spellcheck: {
  111097. type: Boolean,
  111098. default: false
  111099. },
  111100. autocomplete: {
  111101. type: String,
  111102. default: 'off'
  111103. },
  111104. clearable: {
  111105. type: Boolean,
  111106. default: false
  111107. },
  111108. elementId: {
  111109. type: String
  111110. },
  111111. wrap: {
  111112. validator: function validator(value) {
  111113. return Object(__WEBPACK_IMPORTED_MODULE_0_view_design_src_utils_assist__["e" /* oneOf */])(value, ['hard', 'soft']);
  111114. },
  111115. default: 'soft'
  111116. },
  111117. prefix: {
  111118. type: String,
  111119. default: ''
  111120. },
  111121. suffix: {
  111122. type: String,
  111123. default: ''
  111124. },
  111125. search: {
  111126. type: Boolean,
  111127. default: false
  111128. },
  111129. enterButton: {
  111130. type: [Boolean, String],
  111131. default: false
  111132. },
  111133. // 4.0.0
  111134. showWordLimit: {
  111135. type: Boolean,
  111136. default: false
  111137. },
  111138. // 4.0.0
  111139. password: {
  111140. type: Boolean,
  111141. default: false
  111142. }
  111143. },
  111144. data: function data() {
  111145. return {
  111146. currentValue: this.value,
  111147. prefixCls: prefixCls,
  111148. slotReady: false,
  111149. textareaStyles: {},
  111150. isOnComposition: false,
  111151. showPassword: false
  111152. };
  111153. },
  111154. computed: {
  111155. currentType: function currentType() {
  111156. var type = this.type;
  111157. if (type === 'password' && this.password && this.showPassword) type = 'text';
  111158. return type;
  111159. },
  111160. prepend: function prepend() {
  111161. var state = false;
  111162. if (this.type !== 'textarea') state = this.$slots.prepend !== undefined;
  111163. return state;
  111164. },
  111165. append: function append() {
  111166. var state = false;
  111167. if (this.type !== 'textarea') state = this.$slots.append !== undefined;
  111168. return state;
  111169. },
  111170. showPrefix: function showPrefix() {
  111171. var state = false;
  111172. if (this.type !== 'textarea') state = this.prefix !== '' || this.$slots.prefix !== undefined;
  111173. return state;
  111174. },
  111175. showSuffix: function showSuffix() {
  111176. var state = false;
  111177. if (this.type !== 'textarea') state = this.suffix !== '' || this.$slots.suffix !== undefined;
  111178. return state;
  111179. },
  111180. wrapClasses: function wrapClasses() {
  111181. var _ref;
  111182. return [prefixCls + '-wrapper', (_ref = {}, _defineProperty(_ref, prefixCls + '-wrapper-' + this.size, !!this.size), _defineProperty(_ref, prefixCls + '-type-' + this.type, this.type), _defineProperty(_ref, prefixCls + '-group', this.prepend || this.append || this.search && this.enterButton), _defineProperty(_ref, prefixCls + '-group-' + this.size, (this.prepend || this.append || this.search && this.enterButton) && !!this.size), _defineProperty(_ref, prefixCls + '-group-with-prepend', this.prepend), _defineProperty(_ref, prefixCls + '-group-with-append', this.append || this.search && this.enterButton), _defineProperty(_ref, prefixCls + '-hide-icon', this.append), _defineProperty(_ref, prefixCls + '-with-search', this.search && this.enterButton), _ref)];
  111183. },
  111184. inputClasses: function inputClasses() {
  111185. var _ref2;
  111186. return ['' + prefixCls, (_ref2 = {}, _defineProperty(_ref2, prefixCls + '-' + this.size, !!this.size), _defineProperty(_ref2, prefixCls + '-disabled', this.itemDisabled), _defineProperty(_ref2, prefixCls + '-with-prefix', this.showPrefix), _defineProperty(_ref2, prefixCls + '-with-suffix', this.showSuffix || this.search && this.enterButton === false), _ref2)];
  111187. },
  111188. textareaClasses: function textareaClasses() {
  111189. return ['' + prefixCls, _defineProperty({}, prefixCls + '-disabled', this.itemDisabled)];
  111190. },
  111191. upperLimit: function upperLimit() {
  111192. return this.maxlength;
  111193. },
  111194. textLength: function textLength() {
  111195. if (typeof this.value === 'number') {
  111196. return String(this.value).length;
  111197. }
  111198. return (this.value || '').length;
  111199. }
  111200. },
  111201. methods: {
  111202. handleEnter: function handleEnter(event) {
  111203. this.$emit('on-enter', event);
  111204. if (this.search) this.$emit('on-search', this.currentValue);
  111205. },
  111206. handleKeydown: function handleKeydown(event) {
  111207. this.$emit('on-keydown', event);
  111208. },
  111209. handleKeypress: function handleKeypress(event) {
  111210. this.$emit('on-keypress', event);
  111211. },
  111212. handleKeyup: function handleKeyup(event) {
  111213. this.$emit('on-keyup', event);
  111214. },
  111215. handleIconClick: function handleIconClick(event) {
  111216. this.$emit('on-click', event);
  111217. },
  111218. handleFocus: function handleFocus(event) {
  111219. this.$emit('on-focus', event);
  111220. },
  111221. handleBlur: function handleBlur(event) {
  111222. this.$emit('on-blur', event);
  111223. if (!Object(__WEBPACK_IMPORTED_MODULE_0_view_design_src_utils_assist__["b" /* findComponentUpward */])(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) {
  111224. this.dispatch('FormItem', 'on-form-blur', this.currentValue);
  111225. }
  111226. },
  111227. handleComposition: function handleComposition(event) {
  111228. if (event.type === 'compositionstart') {
  111229. this.isOnComposition = true;
  111230. }
  111231. if (event.type === 'compositionend') {
  111232. this.isOnComposition = false;
  111233. this.handleInput(event);
  111234. }
  111235. },
  111236. handleInput: function handleInput(event) {
  111237. if (this.isOnComposition) return;
  111238. var value = event.target.value;
  111239. if (this.number && value !== '') value = Number.isNaN(Number(value)) ? value : Number(value);
  111240. this.$emit('input', value);
  111241. this.setCurrentValue(value);
  111242. this.$emit('on-change', event);
  111243. },
  111244. handleChange: function handleChange(event) {
  111245. this.$emit('on-input-change', event);
  111246. },
  111247. handlePaste: function handlePaste(event) {
  111248. this.$emit('on-input-paste', event);
  111249. },
  111250. setCurrentValue: function setCurrentValue(value) {
  111251. var _this = this;
  111252. if (value === this.currentValue) return;
  111253. this.$nextTick(function () {
  111254. _this.resizeTextarea();
  111255. });
  111256. this.currentValue = value;
  111257. if (!Object(__WEBPACK_IMPORTED_MODULE_0_view_design_src_utils_assist__["b" /* findComponentUpward */])(this, ['DatePicker', 'TimePicker', 'Cascader', 'Search'])) {
  111258. this.dispatch('FormItem', 'on-form-change', value);
  111259. }
  111260. },
  111261. resizeTextarea: function resizeTextarea() {
  111262. var autosize = this.autosize;
  111263. if (!autosize || this.type !== 'textarea') {
  111264. return false;
  111265. }
  111266. var minRows = autosize.minRows;
  111267. var maxRows = autosize.maxRows;
  111268. this.textareaStyles = Object(__WEBPACK_IMPORTED_MODULE_1_view_design_src_utils_calcTextareaHeight__["a" /* default */])(this.$refs.textarea, minRows, maxRows);
  111269. },
  111270. focus: function focus() {
  111271. if (this.type === 'textarea') {
  111272. this.$refs.textarea.focus();
  111273. } else {
  111274. this.$refs.input.focus();
  111275. }
  111276. },
  111277. blur: function blur() {
  111278. if (this.type === 'textarea') {
  111279. this.$refs.textarea.blur();
  111280. } else {
  111281. this.$refs.input.blur();
  111282. }
  111283. },
  111284. handleClear: function handleClear() {
  111285. var e = { target: { value: '' } };
  111286. this.$emit('input', '');
  111287. this.setCurrentValue('');
  111288. this.$emit('on-change', e);
  111289. this.$emit('on-clear');
  111290. },
  111291. handleSearch: function handleSearch() {
  111292. if (this.itemDisabled) return false;
  111293. this.$refs.input.focus();
  111294. this.$emit('on-search', this.currentValue);
  111295. },
  111296. handleToggleShowPassword: function handleToggleShowPassword() {
  111297. var _this2 = this;
  111298. if (this.itemDisabled) return false;
  111299. this.showPassword = !this.showPassword;
  111300. this.focus();
  111301. var len = this.currentValue.length;
  111302. setTimeout(function () {
  111303. _this2.$refs.input.setSelectionRange(len, len);
  111304. }, 0);
  111305. }
  111306. },
  111307. watch: {
  111308. value: function value(val) {
  111309. this.setCurrentValue(val);
  111310. }
  111311. },
  111312. mounted: function mounted() {
  111313. this.slotReady = true;
  111314. this.resizeTextarea();
  111315. }
  111316. });
  111317. /***/ }),
  111318. /* 270 */
  111319. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  111320. "use strict";
  111321. /* harmony export (immutable) */ __webpack_exports__["a"] = calcTextareaHeight;
  111322. // Thanks to
  111323. // https://github.com/andreypopp/react-textarea-autosize/
  111324. // let hiddenTextarea;
  111325. //
  111326. // const HIDDEN_STYLE = `
  111327. // height:0 !important;
  111328. // min-height:0 !important;
  111329. // max-height:none !important;
  111330. // visibility:hidden !important;
  111331. // overflow:hidden !important;
  111332. // position:absolute !important;
  111333. // z-index:-1000 !important;
  111334. // top:0 !important;
  111335. // right:0 !important
  111336. // `;
  111337. //
  111338. // const CONTEXT_STYLE = [
  111339. // 'letter-spacing',
  111340. // 'line-height',
  111341. // 'padding-top',
  111342. // 'padding-bottom',
  111343. // 'font-family',
  111344. // 'font-weight',
  111345. // 'font-size',
  111346. // 'text-rendering',
  111347. // 'text-transform',
  111348. // 'width',
  111349. // 'text-indent',
  111350. // 'padding-left',
  111351. // 'padding-right',
  111352. // 'border-width',
  111353. // 'box-sizing'
  111354. // ];
  111355. //
  111356. // function calculateNodeStyling(node) {
  111357. // const style = window.getComputedStyle(node);
  111358. //
  111359. // const boxSizing = style.getPropertyValue('box-sizing');
  111360. //
  111361. // const paddingSize = (
  111362. // parseFloat(style.getPropertyValue('padding-bottom')) +
  111363. // parseFloat(style.getPropertyValue('padding-top'))
  111364. // );
  111365. //
  111366. // const borderSize = (
  111367. // parseFloat(style.getPropertyValue('border-bottom-width')) +
  111368. // parseFloat(style.getPropertyValue('border-top-width'))
  111369. // );
  111370. //
  111371. // const contextStyle = CONTEXT_STYLE
  111372. // .map(name => `${name}:${style.getPropertyValue(name)}`)
  111373. // .join(';');
  111374. //
  111375. // return {contextStyle, paddingSize, borderSize, boxSizing};
  111376. // }
  111377. //
  111378. // export default function calcTextareaHeight(targetNode, minRows = null, maxRows = null) {
  111379. // if (!hiddenTextarea) {
  111380. // hiddenTextarea = document.createElement('textarea');
  111381. // document.body.appendChild(hiddenTextarea);
  111382. // }
  111383. //
  111384. // let {
  111385. // paddingSize,
  111386. // borderSize,
  111387. // boxSizing,
  111388. // contextStyle
  111389. // } = calculateNodeStyling(targetNode);
  111390. //
  111391. // hiddenTextarea.setAttribute('style', `${contextStyle};${HIDDEN_STYLE}`);
  111392. // hiddenTextarea.value = targetNode.value || targetNode.placeholder || '';
  111393. //
  111394. // let height = hiddenTextarea.scrollHeight;
  111395. // let minHeight = -Infinity;
  111396. // let maxHeight = Infinity;
  111397. // let overflowY;
  111398. //
  111399. // if (boxSizing === 'border-box') {
  111400. // height = height + borderSize;
  111401. // } else if (boxSizing === 'content-box') {
  111402. // height = height - paddingSize;
  111403. // }
  111404. //
  111405. // hiddenTextarea.value = '';
  111406. // let singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
  111407. //
  111408. // if (minRows !== null) {
  111409. // minHeight = singleRowHeight * minRows;
  111410. // if (boxSizing === 'border-box') {
  111411. // minHeight = minHeight + paddingSize + borderSize;
  111412. // }
  111413. // height = Math.max(minHeight, height);
  111414. // }
  111415. // if (maxRows !== null) {
  111416. // maxHeight = singleRowHeight * maxRows;
  111417. // if (boxSizing === 'border-box') {
  111418. // maxHeight = maxHeight + paddingSize + borderSize;
  111419. // }
  111420. // overflowY = height > maxHeight ? '' : 'hidden';
  111421. // height = Math.min(maxHeight, height);
  111422. // }
  111423. //
  111424. // if (!maxRows) {
  111425. // overflowY = 'hidden';
  111426. // }
  111427. //
  111428. // return {
  111429. // height: `${height}px`,
  111430. // minHeight: `${minHeight}px`,
  111431. // maxHeight: `${maxHeight}px`,
  111432. // overflowY
  111433. // };
  111434. // }
  111435. const HIDDEN_TEXTAREA_STYLE = `
  111436. min-height:0 !important;
  111437. max-height:none !important;
  111438. height:0 !important;
  111439. visibility:hidden !important;
  111440. overflow:hidden !important;
  111441. position:absolute !important;
  111442. z-index:-1000 !important;
  111443. top:0 !important;
  111444. right:0 !important
  111445. `;
  111446. const SIZING_STYLE = [
  111447. 'letter-spacing',
  111448. 'line-height',
  111449. 'padding-top',
  111450. 'padding-bottom',
  111451. 'font-family',
  111452. 'font-weight',
  111453. 'font-size',
  111454. 'text-rendering',
  111455. 'text-transform',
  111456. 'width',
  111457. 'text-indent',
  111458. 'padding-left',
  111459. 'padding-right',
  111460. 'border-width',
  111461. 'box-sizing',
  111462. ];
  111463. let computedStyleCache = {};
  111464. let hiddenTextarea;
  111465. function calculateNodeStyling(node, useCache = false) {
  111466. const nodeRef = (
  111467. node.getAttribute('id') ||
  111468. node.getAttribute('data-reactid') ||
  111469. node.getAttribute('name'));
  111470. if (useCache && computedStyleCache[nodeRef]) {
  111471. return computedStyleCache[nodeRef];
  111472. }
  111473. const style = window.getComputedStyle(node);
  111474. const boxSizing = (
  111475. style.getPropertyValue('box-sizing') ||
  111476. style.getPropertyValue('-moz-box-sizing') ||
  111477. style.getPropertyValue('-webkit-box-sizing')
  111478. );
  111479. const paddingSize = (
  111480. parseFloat(style.getPropertyValue('padding-bottom')) +
  111481. parseFloat(style.getPropertyValue('padding-top'))
  111482. );
  111483. const borderSize = (
  111484. parseFloat(style.getPropertyValue('border-bottom-width')) +
  111485. parseFloat(style.getPropertyValue('border-top-width'))
  111486. );
  111487. const sizingStyle = SIZING_STYLE
  111488. .map(name => `${name}:${style.getPropertyValue(name)}`)
  111489. .join(';');
  111490. const nodeInfo = {
  111491. sizingStyle,
  111492. paddingSize,
  111493. borderSize,
  111494. boxSizing,
  111495. };
  111496. if (useCache && nodeRef) {
  111497. computedStyleCache[nodeRef] = nodeInfo;
  111498. }
  111499. return nodeInfo;
  111500. }
  111501. function calcTextareaHeight(uiTextNode, minRows = null, maxRows = null, useCache = false) {
  111502. if (!hiddenTextarea) {
  111503. hiddenTextarea = document.createElement('textarea');
  111504. document.body.appendChild(hiddenTextarea);
  111505. }
  111506. // Fix wrap="off" issue
  111507. // https://github.com/ant-design/ant-design/issues/6577
  111508. if (uiTextNode.getAttribute('wrap')) {
  111509. hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap'));
  111510. } else {
  111511. hiddenTextarea.removeAttribute('wrap');
  111512. }
  111513. // Copy all CSS properties that have an impact on the height of the content in
  111514. // the textbox
  111515. let {
  111516. paddingSize, borderSize,
  111517. boxSizing, sizingStyle,
  111518. } = calculateNodeStyling(uiTextNode, useCache);
  111519. // Need to have the overflow attribute to hide the scrollbar otherwise
  111520. // text-lines will not calculated properly as the shadow will technically be
  111521. // narrower for content
  111522. hiddenTextarea.setAttribute('style', `${sizingStyle};${HIDDEN_TEXTAREA_STYLE}`);
  111523. hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
  111524. let minHeight = Number.MIN_SAFE_INTEGER;
  111525. let maxHeight = Number.MAX_SAFE_INTEGER;
  111526. let height = hiddenTextarea.scrollHeight;
  111527. let overflowY;
  111528. if (boxSizing === 'border-box') {
  111529. // border-box: add border, since height = content + padding + border
  111530. height = height + borderSize;
  111531. } else if (boxSizing === 'content-box') {
  111532. // remove padding, since height = content
  111533. height = height - paddingSize;
  111534. }
  111535. if (minRows !== null || maxRows !== null) {
  111536. // measure height of a textarea with a single row
  111537. hiddenTextarea.value = ' ';
  111538. let singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
  111539. if (minRows !== null) {
  111540. minHeight = singleRowHeight * minRows;
  111541. if (boxSizing === 'border-box') {
  111542. minHeight = minHeight + paddingSize + borderSize;
  111543. }
  111544. height = Math.max(minHeight, height);
  111545. }
  111546. if (maxRows !== null) {
  111547. maxHeight = singleRowHeight * maxRows;
  111548. if (boxSizing === 'border-box') {
  111549. maxHeight = maxHeight + paddingSize + borderSize;
  111550. }
  111551. overflowY = height > maxHeight ? '' : 'hidden';
  111552. height = Math.min(maxHeight, height);
  111553. }
  111554. }
  111555. // Remove scroll bar flash when autosize without maxRows
  111556. if (!maxRows) {
  111557. overflowY = 'hidden';
  111558. }
  111559. return {
  111560. height: `${height}px`,
  111561. minHeight: `${minHeight}px`,
  111562. maxHeight: `${maxHeight}px`,
  111563. overflowY
  111564. };
  111565. }
  111566. /***/ }),
  111567. /* 271 */
  111568. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  111569. "use strict";
  111570. /* harmony default export */ __webpack_exports__["a"] = ({
  111571. inject: {
  111572. FormInstance: {
  111573. default: ''
  111574. }
  111575. },
  111576. computed: {
  111577. itemDisabled () {
  111578. let state = this.disabled;
  111579. if (!state && this.FormInstance) state = this.FormInstance.disabled;
  111580. return state;
  111581. }
  111582. }
  111583. });
  111584. /***/ }),
  111585. /* 272 */
  111586. /***/ (function(module, exports, __webpack_require__) {
  111587. var render = function() {
  111588. var _vm = this
  111589. var _h = _vm.$createElement
  111590. var _c = _vm._self._c || _h
  111591. return _c(
  111592. "div",
  111593. { class: _vm.wrapClasses },
  111594. [
  111595. _vm.type !== "textarea"
  111596. ? [
  111597. _vm.prepend
  111598. ? _c(
  111599. "div",
  111600. {
  111601. directives: [
  111602. {
  111603. name: "show",
  111604. rawName: "v-show",
  111605. value: _vm.slotReady,
  111606. expression: "slotReady"
  111607. }
  111608. ],
  111609. class: [_vm.prefixCls + "-group-prepend"]
  111610. },
  111611. [_vm._t("prepend")],
  111612. 2
  111613. )
  111614. : _vm._e(),
  111615. _vm._v(" "),
  111616. _vm.clearable && _vm.currentValue && !_vm.itemDisabled
  111617. ? _c("i", {
  111618. staticClass: "ivu-icon",
  111619. class: [
  111620. "ivu-icon-ios-close-circle",
  111621. _vm.prefixCls + "-icon",
  111622. _vm.prefixCls + "-icon-clear",
  111623. _vm.prefixCls + "-icon-normal"
  111624. ],
  111625. on: { click: _vm.handleClear }
  111626. })
  111627. : _vm.icon
  111628. ? _c("i", {
  111629. staticClass: "ivu-icon",
  111630. class: [
  111631. "ivu-icon-" + _vm.icon,
  111632. _vm.prefixCls + "-icon",
  111633. _vm.prefixCls + "-icon-normal"
  111634. ],
  111635. on: { click: _vm.handleIconClick }
  111636. })
  111637. : _vm.search && _vm.enterButton === false
  111638. ? _c("i", {
  111639. staticClass: "ivu-icon ivu-icon-ios-search",
  111640. class: [
  111641. _vm.prefixCls + "-icon",
  111642. _vm.prefixCls + "-icon-normal",
  111643. _vm.prefixCls + "-search-icon"
  111644. ],
  111645. on: { click: _vm.handleSearch }
  111646. })
  111647. : _vm.showSuffix
  111648. ? _c(
  111649. "span",
  111650. { staticClass: "ivu-input-suffix" },
  111651. [
  111652. _vm._t("suffix", function() {
  111653. return [
  111654. _vm.suffix
  111655. ? _c("i", {
  111656. staticClass: "ivu-icon",
  111657. class: ["ivu-icon-" + _vm.suffix]
  111658. })
  111659. : _vm._e()
  111660. ]
  111661. })
  111662. ],
  111663. 2
  111664. )
  111665. : _vm.showWordLimit
  111666. ? _c("span", { staticClass: "ivu-input-word-count" }, [
  111667. _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit))
  111668. ])
  111669. : _vm.password
  111670. ? _c(
  111671. "span",
  111672. {
  111673. staticClass: "ivu-input-suffix",
  111674. on: { click: _vm.handleToggleShowPassword }
  111675. },
  111676. [
  111677. _vm.showPassword
  111678. ? _c("i", {
  111679. staticClass: "ivu-icon ivu-icon-ios-eye-off-outline"
  111680. })
  111681. : _c("i", {
  111682. staticClass: "ivu-icon ivu-icon-ios-eye-outline"
  111683. })
  111684. ]
  111685. )
  111686. : _vm._e(),
  111687. _vm._v(" "),
  111688. _c("transition", { attrs: { name: "fade" } }, [
  111689. !_vm.icon
  111690. ? _c("i", {
  111691. staticClass: "ivu-icon ivu-icon-ios-loading ivu-load-loop",
  111692. class: [
  111693. _vm.prefixCls + "-icon",
  111694. _vm.prefixCls + "-icon-validate"
  111695. ]
  111696. })
  111697. : _vm._e()
  111698. ]),
  111699. _vm._v(" "),
  111700. _c("input", {
  111701. ref: "input",
  111702. class: _vm.inputClasses,
  111703. attrs: {
  111704. id: _vm.elementId,
  111705. autocomplete: _vm.autocomplete,
  111706. spellcheck: _vm.spellcheck,
  111707. type: _vm.currentType,
  111708. placeholder: _vm.placeholder,
  111709. disabled: _vm.itemDisabled,
  111710. maxlength: _vm.maxlength,
  111711. readonly: _vm.readonly,
  111712. name: _vm.name,
  111713. number: _vm.number,
  111714. autofocus: _vm.autofocus
  111715. },
  111716. domProps: { value: _vm.currentValue },
  111717. on: {
  111718. keyup: [
  111719. function($event) {
  111720. if (
  111721. !$event.type.indexOf("key") &&
  111722. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  111723. ) {
  111724. return null
  111725. }
  111726. return _vm.handleEnter.apply(null, arguments)
  111727. },
  111728. _vm.handleKeyup
  111729. ],
  111730. keypress: _vm.handleKeypress,
  111731. keydown: _vm.handleKeydown,
  111732. focus: _vm.handleFocus,
  111733. blur: _vm.handleBlur,
  111734. compositionstart: _vm.handleComposition,
  111735. compositionupdate: _vm.handleComposition,
  111736. compositionend: _vm.handleComposition,
  111737. input: _vm.handleInput,
  111738. change: _vm.handleChange,
  111739. paste: _vm.handlePaste
  111740. }
  111741. }),
  111742. _vm._v(" "),
  111743. _vm.append
  111744. ? _c(
  111745. "div",
  111746. {
  111747. directives: [
  111748. {
  111749. name: "show",
  111750. rawName: "v-show",
  111751. value: _vm.slotReady,
  111752. expression: "slotReady"
  111753. }
  111754. ],
  111755. class: [_vm.prefixCls + "-group-append"]
  111756. },
  111757. [_vm._t("append")],
  111758. 2
  111759. )
  111760. : _vm.search && _vm.enterButton
  111761. ? _c(
  111762. "div",
  111763. {
  111764. class: [
  111765. _vm.prefixCls + "-group-append",
  111766. _vm.prefixCls + "-search"
  111767. ],
  111768. on: { click: _vm.handleSearch }
  111769. },
  111770. [
  111771. _vm.enterButton === true
  111772. ? _c("i", { staticClass: "ivu-icon ivu-icon-ios-search" })
  111773. : [_vm._v(_vm._s(_vm.enterButton))]
  111774. ],
  111775. 2
  111776. )
  111777. : _vm.showPrefix
  111778. ? _c(
  111779. "span",
  111780. { staticClass: "ivu-input-prefix" },
  111781. [
  111782. _vm._t("prefix", function() {
  111783. return [
  111784. _vm.prefix
  111785. ? _c("i", {
  111786. staticClass: "ivu-icon",
  111787. class: ["ivu-icon-" + _vm.prefix]
  111788. })
  111789. : _vm._e()
  111790. ]
  111791. })
  111792. ],
  111793. 2
  111794. )
  111795. : _vm._e()
  111796. ]
  111797. : [
  111798. _c("textarea", {
  111799. ref: "textarea",
  111800. class: _vm.textareaClasses,
  111801. style: _vm.textareaStyles,
  111802. attrs: {
  111803. id: _vm.elementId,
  111804. wrap: _vm.wrap,
  111805. autocomplete: _vm.autocomplete,
  111806. spellcheck: _vm.spellcheck,
  111807. placeholder: _vm.placeholder,
  111808. disabled: _vm.itemDisabled,
  111809. rows: _vm.rows,
  111810. maxlength: _vm.maxlength,
  111811. readonly: _vm.readonly,
  111812. name: _vm.name,
  111813. autofocus: _vm.autofocus
  111814. },
  111815. domProps: { value: _vm.currentValue },
  111816. on: {
  111817. keyup: [
  111818. function($event) {
  111819. if (
  111820. !$event.type.indexOf("key") &&
  111821. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  111822. ) {
  111823. return null
  111824. }
  111825. return _vm.handleEnter.apply(null, arguments)
  111826. },
  111827. _vm.handleKeyup
  111828. ],
  111829. keypress: _vm.handleKeypress,
  111830. keydown: _vm.handleKeydown,
  111831. focus: _vm.handleFocus,
  111832. blur: _vm.handleBlur,
  111833. compositionstart: _vm.handleComposition,
  111834. compositionupdate: _vm.handleComposition,
  111835. compositionend: _vm.handleComposition,
  111836. input: _vm.handleInput,
  111837. paste: _vm.handlePaste
  111838. }
  111839. }),
  111840. _vm._v(" "),
  111841. _vm.showWordLimit
  111842. ? _c("span", { staticClass: "ivu-input-word-count" }, [
  111843. _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit))
  111844. ])
  111845. : _vm._e()
  111846. ]
  111847. ],
  111848. 2
  111849. )
  111850. }
  111851. var staticRenderFns = []
  111852. render._withStripped = true
  111853. module.exports = { render: render, staticRenderFns: staticRenderFns }
  111854. if (false) {
  111855. module.hot.accept()
  111856. if (module.hot.data) {
  111857. require("vue-hot-reload-api") .rerender("data-v-2cdade09", module.exports)
  111858. }
  111859. }
  111860. /***/ }),
  111861. /* 273 */
  111862. /***/ (function(module, exports, __webpack_require__) {
  111863. var disposed = false
  111864. function injectStyle (ssrContext) {
  111865. if (disposed) return
  111866. __webpack_require__(274)
  111867. __webpack_require__(276)
  111868. }
  111869. var normalizeComponent = __webpack_require__(2)
  111870. /* script */
  111871. var __vue_script__ = __webpack_require__(278)
  111872. /* template */
  111873. var __vue_template__ = __webpack_require__(279)
  111874. /* template functional */
  111875. var __vue_template_functional__ = false
  111876. /* styles */
  111877. var __vue_styles__ = injectStyle
  111878. /* scopeId */
  111879. var __vue_scopeId__ = "data-v-32dd27c6"
  111880. /* moduleIdentifier (server only) */
  111881. var __vue_module_identifier__ = null
  111882. var Component = normalizeComponent(
  111883. __vue_script__,
  111884. __vue_template__,
  111885. __vue_template_functional__,
  111886. __vue_styles__,
  111887. __vue_scopeId__,
  111888. __vue_module_identifier__
  111889. )
  111890. Component.options.__file = "resources/assets/js/main/components/project/task/detail/DescEditor.vue"
  111891. /* hot reload */
  111892. if (false) {(function () {
  111893. var hotAPI = require("vue-hot-reload-api")
  111894. hotAPI.install(require("vue"), false)
  111895. if (!hotAPI.compatible) return
  111896. module.hot.accept()
  111897. if (!module.hot.data) {
  111898. hotAPI.createRecord("data-v-32dd27c6", Component.options)
  111899. } else {
  111900. hotAPI.reload("data-v-32dd27c6", Component.options)
  111901. }
  111902. module.hot.dispose(function (data) {
  111903. disposed = true
  111904. })
  111905. })()}
  111906. module.exports = Component.exports
  111907. /***/ }),
  111908. /* 274 */
  111909. /***/ (function(module, exports, __webpack_require__) {
  111910. // style-loader: Adds some css to the DOM by adding a <style> tag
  111911. // load the styles
  111912. var content = __webpack_require__(275);
  111913. if(typeof content === 'string') content = [[module.i, content, '']];
  111914. if(content.locals) module.exports = content.locals;
  111915. // add the styles to the DOM
  111916. var update = __webpack_require__(1)("250b4972", content, false, {});
  111917. // Hot Module Replacement
  111918. if(false) {
  111919. // When the styles change, update the <style> tags
  111920. if(!content.locals) {
  111921. module.hot.accept("!!../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-32dd27c6\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./DescEditor.vue", function() {
  111922. var newContent = require("!!../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-32dd27c6\",\"scoped\":false,\"hasInlineConfig\":true}!../../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./DescEditor.vue");
  111923. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  111924. update(newContent);
  111925. });
  111926. }
  111927. // When the module is disposed, remove the <style> tags
  111928. module.hot.dispose(function() { update(); });
  111929. }
  111930. /***/ }),
  111931. /* 275 */
  111932. /***/ (function(module, exports, __webpack_require__) {
  111933. exports = module.exports = __webpack_require__(0)(false);
  111934. // imports
  111935. // module
  111936. exports.push([module.i, "\n.desc-editor-box .desc-editor-content img {\n max-width: 100%;\n max-height: 100%;\n}\n.desc-editor-box .desc-editor-content:before {\n left: 8px !important;\n color: #cccccc !important;\n}\n.desc-editor-transfer {\n background-color: #ffffff;\n}\n.desc-editor-transfer .tox-toolbar > div:last-child > button:last-child {\n margin-right: 64px;\n}\n.desc-editor-transfer .ivu-modal-header {\n display: none;\n}\n.desc-editor-transfer .ivu-modal-close {\n top: 7px;\n z-index: 2;\n}\n.desc-editor-transfer .desc-editor-transfer-body {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n}\n.desc-editor-transfer .desc-editor-transfer-body textarea {\n opacity: 0;\n}\n.desc-editor-transfer .desc-editor-transfer-body .tox-tinymce {\n border: 0;\n}\n.desc-editor-transfer .desc-editor-transfer-body .tox-tinymce .tox-statusbar span.tox-statusbar__branding a {\n display: none;\n}\n", ""]);
  111937. // exports
  111938. /***/ }),
  111939. /* 276 */
  111940. /***/ (function(module, exports, __webpack_require__) {
  111941. // style-loader: Adds some css to the DOM by adding a <style> tag
  111942. // load the styles
  111943. var content = __webpack_require__(277);
  111944. if(typeof content === 'string') content = [[module.i, content, '']];
  111945. if(content.locals) module.exports = content.locals;
  111946. // add the styles to the DOM
  111947. var update = __webpack_require__(1)("7fc5d739", content, false, {});
  111948. // Hot Module Replacement
  111949. if(false) {
  111950. // When the styles change, update the <style> tags
  111951. if(!content.locals) {
  111952. module.hot.accept("!!../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-32dd27c6\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./DescEditor.vue", function() {
  111953. var newContent = require("!!../../../../../../../../node_modules/css-loader/index.js!../../../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-32dd27c6\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=1!./DescEditor.vue");
  111954. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  111955. update(newContent);
  111956. });
  111957. }
  111958. // When the module is disposed, remove the <style> tags
  111959. module.hot.dispose(function() { update(); });
  111960. }
  111961. /***/ }),
  111962. /* 277 */
  111963. /***/ (function(module, exports, __webpack_require__) {
  111964. exports = module.exports = __webpack_require__(0)(false);
  111965. // imports
  111966. // module
  111967. exports.push([module.i, "\n.desc-editor-box[data-v-32dd27c6] {\n position: relative;\n}\n.desc-editor-box:hover .desc-editor-tool .tool-button[data-v-32dd27c6] {\n opacity: 0.9;\n}\n.desc-editor-box:hover .desc-editor-tool .tool-button[data-v-32dd27c6]:hover {\n opacity: 1;\n}\n.desc-editor-box .desc-editor-tool[data-v-32dd27c6] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: absolute;\n top: 5px;\n right: 5px;\n z-index: 2;\n}\n.desc-editor-box .desc-editor-tool .tool-button[data-v-32dd27c6] {\n font-size: 12px;\n opacity: 0;\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n margin-left: 5px;\n background-color: #ffffff;\n}\n.desc-editor-box .desc-editor-load[data-v-32dd27c6] {\n position: absolute;\n right: 5px;\n bottom: 5px;\n z-index: 2;\n width: 16px;\n height: 16px;\n}\n.desc-editor-content[data-v-32dd27c6] {\n position: relative;\n margin: 10px 0 6px;\n border: 2px solid transparent;\n padding: 5px 8px;\n color: #172b4d;\n line-height: 1.5;\n border-radius: 4px;\n min-height: 56px;\n max-height: 182px;\n background: rgba(9, 30, 66, 0.04);\n overflow: auto;\n}\n.desc-editor-content[data-v-32dd27c6]:focus {\n -webkit-box-shadow: 0 0 0 2px rgba(45, 140, 240, 0.2);\n box-shadow: 0 0 0 2px rgba(45, 140, 240, 0.2);\n}\n.desc-editor-upload[data-v-32dd27c6] {\n display: none;\n width: 0;\n height: 0;\n overflow: hidden;\n}\n", ""]);
  111968. // exports
  111969. /***/ }),
  111970. /* 278 */
  111971. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  111972. "use strict";
  111973. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  111974. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tinymce_tinymce__ = __webpack_require__(53);
  111975. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tinymce_tinymce___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_tinymce_tinymce__);
  111976. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ImgUpload__ = __webpack_require__(17);
  111977. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ImgUpload___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__ImgUpload__);
  111978. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  111979. //
  111980. //
  111981. //
  111982. //
  111983. //
  111984. //
  111985. //
  111986. //
  111987. //
  111988. //
  111989. //
  111990. //
  111991. //
  111992. //
  111993. //
  111994. //
  111995. //
  111996. //
  111997. //
  111998. //
  111999. //
  112000. //
  112001. //
  112002. //
  112003. //
  112004. //
  112005. //
  112006. //
  112007. //
  112008. //
  112009. //
  112010. //
  112011. //
  112012. //
  112013. //
  112014. //
  112015. //
  112016. //
  112017. //
  112018. //
  112019. //
  112020. //
  112021. //
  112022. //
  112023. //
  112024. //
  112025. //
  112026. //
  112027. //
  112028. //
  112029. //
  112030. //
  112031. //
  112032. //
  112033. //
  112034. //
  112035. //
  112036. //
  112037. //
  112038. //
  112039. //
  112040. //
  112041. //
  112042. //
  112043. //
  112044. //
  112045. //
  112046. //
  112047. //
  112048. //
  112049. //
  112050. //
  112051. //
  112052. //
  112053. //
  112054. //
  112055. //
  112056. //
  112057. //
  112058. //
  112059. //
  112060. //
  112061. //
  112062. //
  112063. //
  112064. //
  112065. //
  112066. //
  112067. //
  112068. //
  112069. //
  112070. //
  112071. //
  112072. //
  112073. //
  112074. //
  112075. //
  112076. //
  112077. //
  112078. //
  112079. //
  112080. //
  112081. //
  112082. //
  112083. //
  112084. //
  112085. //
  112086. //
  112087. //
  112088. //
  112089. //
  112090. //
  112091. //
  112092. //
  112093. //
  112094. //
  112095. //
  112096. //
  112097. //
  112098. //
  112099. //
  112100. //
  112101. //
  112102. //
  112103. //
  112104. //
  112105. //
  112106. //
  112107. //
  112108. //
  112109. //
  112110. //
  112111. //
  112112. //
  112113. //
  112114. //
  112115. //
  112116. //
  112117. //
  112118. //
  112119. //
  112120. //
  112121. //
  112122. //
  112123. //
  112124. //
  112125. //
  112126. //
  112127. //
  112128. //
  112129. //
  112130. //
  112131. //
  112132. //
  112133. //
  112134. //
  112135. //
  112136. //
  112137. /* harmony default export */ __webpack_exports__["default"] = ({
  112138. name: 'DescEditor',
  112139. components: { ImgUpload: __WEBPACK_IMPORTED_MODULE_1__ImgUpload___default.a },
  112140. props: {
  112141. taskid: {
  112142. default: ''
  112143. },
  112144. desc: {
  112145. default: ''
  112146. },
  112147. placeholder: {
  112148. type: String,
  112149. default: ''
  112150. }
  112151. },
  112152. data: function data() {
  112153. return {
  112154. loadIng: 0,
  112155. uploadIng: 0,
  112156. id: "tinymce_" + Math.round(Math.random() * 10000),
  112157. content: '',
  112158. submitContent: '',
  112159. editor: null,
  112160. editorT: null,
  112161. cTinyMce: null,
  112162. checkerTimeout: null,
  112163. isTyping: false,
  112164. transfer: false
  112165. };
  112166. },
  112167. mounted: function mounted() {
  112168. var _this = this;
  112169. this.loadData(function (val) {
  112170. _this.submitContent = val;
  112171. _this.content = val;
  112172. _this.init();
  112173. });
  112174. },
  112175. beforeDestroy: function beforeDestroy() {
  112176. if (this.editor !== null) {
  112177. this.editor.destroy();
  112178. }
  112179. if (this.editorT !== null) {
  112180. this.editorT.destroy();
  112181. }
  112182. },
  112183. watch: {
  112184. desc: function desc() {
  112185. var _this2 = this;
  112186. this.loadData(function (val) {
  112187. _this2.submitContent = val;
  112188. _this2.content = val;
  112189. _this2.getEditor().setContent(val);
  112190. });
  112191. }
  112192. },
  112193. methods: {
  112194. loadData: function loadData(callback) {
  112195. var _this3 = this;
  112196. this.loadIng++;
  112197. $A.apiAjax({
  112198. url: 'project/task/desc',
  112199. data: {
  112200. taskid: this.taskid
  112201. },
  112202. complete: function complete() {
  112203. _this3.loadIng--;
  112204. },
  112205. success: function success(res) {
  112206. if (res.ret === 1) {
  112207. callback(res.data.desc);
  112208. } else {
  112209. callback('');
  112210. }
  112211. }
  112212. });
  112213. },
  112214. init: function init() {
  112215. var _this4 = this;
  112216. this.$nextTick(function () {
  112217. __WEBPACK_IMPORTED_MODULE_0_tinymce_tinymce___default.a.init(_this4.options(false));
  112218. });
  112219. },
  112220. initTransfer: function initTransfer() {
  112221. var _this5 = this;
  112222. this.$nextTick(function () {
  112223. __WEBPACK_IMPORTED_MODULE_0_tinymce_tinymce___default.a.init(_this5.options(true));
  112224. });
  112225. },
  112226. options: function options(isFull) {
  112227. var _this6 = this;
  112228. var toolbar = void 0;
  112229. if (isFull) {
  112230. toolbar = 'undo redo | styleselect | uploadImages | bold italic underline forecolor backcolor | alignleft aligncenter alignright | outdent indent | link image emoticons media codesample | preview screenload';
  112231. } else {
  112232. toolbar = false;
  112233. }
  112234. return {
  112235. selector: (isFull ? '#T_' : '#') + this.id,
  112236. base_url: $A.serverUrl('js/build'),
  112237. auto_focus: false,
  112238. language: "zh_CN",
  112239. toolbar: toolbar,
  112240. plugins: ['advlist autolink lists link image charmap print preview hr anchor pagebreak imagetools', 'searchreplace visualblocks code', 'insertdatetime media nonbreaking save table contextmenu directionality', 'emoticons paste textcolor colorpicker imagetools codesample'],
  112241. save_onsavecallback: function save_onsavecallback(e) {
  112242. _this6.handleBlur(e);
  112243. },
  112244. menubar: isFull,
  112245. inline: !isFull,
  112246. inline_boundaries: false,
  112247. paste_data_images: true,
  112248. menu: {
  112249. view: {
  112250. title: 'View',
  112251. items: 'code | visualaid visualchars visualblocks | spellchecker | preview fullscreen screenload | showcomments'
  112252. },
  112253. insert: {
  112254. title: "Insert",
  112255. items: "image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime | uploadImages browseImages"
  112256. }
  112257. },
  112258. codesample_languages: [{ text: "HTML/VUE/XML", value: "markup" }, { text: "JavaScript", value: "javascript" }, { text: "CSS", value: "css" }, { text: "PHP", value: "php" }, { text: "Ruby", value: "ruby" }, { text: "Python", value: "python" }, { text: "Java", value: "java" }, { text: "C", value: "c" }, { text: "C#", value: "csharp" }, { text: "C++", value: "cpp" }],
  112259. height: isFull ? '100%' : $A.rightExists(this.height, '%') ? this.height : $A.runNum(this.height) || 360,
  112260. resize: !isFull,
  112261. convert_urls: false,
  112262. toolbar_mode: 'sliding',
  112263. toolbar_drawer: 'floating',
  112264. setup: function setup(editor) {
  112265. editor.ui.registry.addMenuButton('uploadImages', {
  112266. text: _this6.$L('图片'),
  112267. tooltip: _this6.$L('上传/浏览 图片'),
  112268. fetch: function fetch(callback) {
  112269. var items = [{
  112270. type: 'menuitem',
  112271. text: _this6.$L('上传图片'),
  112272. onAction: function onAction() {
  112273. _this6.$refs.myUpload.handleClick();
  112274. }
  112275. }, {
  112276. type: 'menuitem',
  112277. text: _this6.$L('浏览图片'),
  112278. onAction: function onAction() {
  112279. _this6.$refs.myUpload.browsePicture();
  112280. }
  112281. }];
  112282. callback(items);
  112283. }
  112284. });
  112285. editor.ui.registry.addMenuItem('uploadImages', {
  112286. text: _this6.$L('上传图片'),
  112287. onAction: function onAction() {
  112288. _this6.$refs.myUpload.handleClick();
  112289. }
  112290. });
  112291. editor.ui.registry.addMenuItem('browseImages', {
  112292. text: _this6.$L('浏览图片'),
  112293. onAction: function onAction() {
  112294. _this6.$refs.myUpload.browsePicture();
  112295. }
  112296. });
  112297. if (isFull) {
  112298. editor.ui.registry.addButton('screenload', {
  112299. icon: 'fullscreen',
  112300. tooltip: _this6.$L('退出全屏'),
  112301. onAction: function onAction() {
  112302. _this6.closeFull();
  112303. }
  112304. });
  112305. editor.ui.registry.addMenuItem('screenload', {
  112306. text: _this6.$L('退出全屏'),
  112307. onAction: function onAction() {
  112308. _this6.closeFull();
  112309. }
  112310. });
  112311. editor.on('Init', function (e) {
  112312. _this6.editorT = editor;
  112313. _this6.editorT.setContent(_this6.content);
  112314. });
  112315. } else {
  112316. editor.ui.registry.addButton('screenload', {
  112317. icon: 'fullscreen',
  112318. tooltip: _this6.$L('全屏'),
  112319. onAction: function onAction() {
  112320. _this6.openFull();
  112321. }
  112322. });
  112323. editor.ui.registry.addMenuItem('screenload', {
  112324. text: _this6.$L('全屏'),
  112325. onAction: function onAction() {
  112326. _this6.openFull();
  112327. }
  112328. });
  112329. editor.on('Init', function (e) {
  112330. _this6.editor = editor;
  112331. _this6.editor.setContent(_this6.content);
  112332. _this6.$emit('editorInit', _this6.editor);
  112333. });
  112334. editor.on('KeyUp', function (e) {
  112335. if (_this6.editor !== null) {
  112336. _this6.submitNewContent();
  112337. }
  112338. });
  112339. editor.on('Change', function (e) {
  112340. if (_this6.editor !== null) {
  112341. if (_this6.getContent() !== _this6.value) {
  112342. _this6.submitNewContent();
  112343. }
  112344. _this6.$emit('editorChange', e);
  112345. }
  112346. });
  112347. }
  112348. }
  112349. };
  112350. },
  112351. openFull: function openFull() {
  112352. this.content = this.getContent();
  112353. this.transfer = true;
  112354. this.initTransfer();
  112355. },
  112356. closeFull: function closeFull() {
  112357. this.content = this.getContent();
  112358. this.editor.setContent(this.content);
  112359. this.transfer = false;
  112360. if (this.editorT != null) {
  112361. this.editorT.destroy();
  112362. this.editorT = null;
  112363. }
  112364. },
  112365. transferChange: function transferChange(visible) {
  112366. if (!visible) {
  112367. this.$refs.myTextarea.focus();
  112368. if (this.editorT != null) {
  112369. this.content = this.editorT.getContent();
  112370. this.editor.setContent(this.content);
  112371. this.editorT.destroy();
  112372. this.editorT = null;
  112373. }
  112374. }
  112375. },
  112376. getEditor: function getEditor() {
  112377. return this.transfer ? this.editorT : this.editor;
  112378. },
  112379. getContent: function getContent() {
  112380. if (this.getEditor() === null) {
  112381. return "";
  112382. }
  112383. return this.getEditor().getContent();
  112384. },
  112385. submitNewContent: function submitNewContent() {
  112386. var _this7 = this;
  112387. this.isTyping = true;
  112388. if (this.checkerTimeout !== null) {
  112389. clearTimeout(this.checkerTimeout);
  112390. }
  112391. this.checkerTimeout = setTimeout(function () {
  112392. _this7.isTyping = false;
  112393. }, 300);
  112394. },
  112395. insertContent: function insertContent(content) {
  112396. if (this.getEditor() !== null) {
  112397. this.getEditor().insertContent(content);
  112398. } else {
  112399. this.content += content;
  112400. }
  112401. },
  112402. insertImage: function insertImage(src) {
  112403. this.insertContent('<img src="' + src + '">');
  112404. },
  112405. editorImage: function editorImage(lists) {
  112406. for (var i = 0; i < lists.length; i++) {
  112407. var item = lists[i];
  112408. if ((typeof item === 'undefined' ? 'undefined' : _typeof(item)) === 'object' && typeof item.url === "string") {
  112409. this.insertImage(item.url);
  112410. }
  112411. }
  112412. },
  112413. handleBlur: function handleBlur() {
  112414. var _this8 = this;
  112415. this.loadIng++;
  112416. setTimeout(function () {
  112417. _this8.handleSave();
  112418. _this8.loadIng--;
  112419. }, 300);
  112420. },
  112421. handleSave: function handleSave() {
  112422. var _this9 = this;
  112423. if (this.transfer) {
  112424. return;
  112425. }
  112426. if (this.submitContent != this.getContent()) {
  112427. var bakContent = this.submitContent;
  112428. this.submitContent = this.getContent();
  112429. //
  112430. this.loadIng++;
  112431. $A.apiAjax({
  112432. url: 'project/task/edit',
  112433. method: 'post',
  112434. data: {
  112435. act: 'desc',
  112436. taskid: this.taskid,
  112437. content: this.submitContent
  112438. },
  112439. complete: function complete() {
  112440. _this9.loadIng--;
  112441. },
  112442. error: function error() {
  112443. _this9.getEditor().setContent(bakContent);
  112444. alert(_this9.$L('网络繁忙,请稍后再试!'));
  112445. },
  112446. success: function success(res) {
  112447. if (res.ret === 1) {
  112448. $A.triggerTaskInfoListener('desc', res.data);
  112449. $A.triggerTaskInfoChange(_this9.taskid);
  112450. _this9.$Message.success(res.msg);
  112451. _this9.$emit('save-success');
  112452. } else {
  112453. _this9.$Modal.error({ title: _this9.$L('温馨提示'), content: res.msg });
  112454. _this9.getEditor().setContent(bakContent);
  112455. }
  112456. }
  112457. });
  112458. }
  112459. }
  112460. }
  112461. });
  112462. /***/ }),
  112463. /* 279 */
  112464. /***/ (function(module, exports, __webpack_require__) {
  112465. var render = function() {
  112466. var _vm = this
  112467. var _h = _vm.$createElement
  112468. var _c = _vm._self._c || _h
  112469. return _c(
  112470. "div",
  112471. [
  112472. _c(
  112473. "div",
  112474. { staticClass: "desc-editor-box" },
  112475. [
  112476. _c(
  112477. "div",
  112478. { staticClass: "desc-editor-tool" },
  112479. [
  112480. _c(
  112481. "Button",
  112482. {
  112483. staticClass: "tool-button",
  112484. attrs: { size: "small" },
  112485. on: { click: _vm.openFull }
  112486. },
  112487. [_vm._v(_vm._s(_vm.$L("全屏")))]
  112488. )
  112489. ],
  112490. 1
  112491. ),
  112492. _vm._v(" "),
  112493. _vm.loadIng > 0
  112494. ? _c(
  112495. "div",
  112496. { staticClass: "desc-editor-load" },
  112497. [_c("WLoading")],
  112498. 1
  112499. )
  112500. : _vm._e(),
  112501. _vm._v(" "),
  112502. _c("div", {
  112503. ref: "myTextarea",
  112504. staticClass: "desc-editor-content",
  112505. attrs: { id: _vm.id, placeholder: _vm.placeholder },
  112506. domProps: { innerHTML: _vm._s(_vm.content) },
  112507. on: { blur: _vm.handleBlur }
  112508. }),
  112509. _vm._v(" "),
  112510. _c("ImgUpload", {
  112511. ref: "myUpload",
  112512. staticClass: "desc-editor-upload",
  112513. attrs: { type: "callback", uploadIng: _vm.uploadIng, num: "50" },
  112514. on: {
  112515. "update:uploadIng": function($event) {
  112516. _vm.uploadIng = $event
  112517. },
  112518. "update:upload-ing": function($event) {
  112519. _vm.uploadIng = $event
  112520. },
  112521. "on-callback": _vm.editorImage
  112522. }
  112523. })
  112524. ],
  112525. 1
  112526. ),
  112527. _vm._v(" "),
  112528. _vm.uploadIng > 0
  112529. ? _c(
  112530. "Spin",
  112531. { attrs: { fix: "" } },
  112532. [
  112533. _c("Icon", {
  112534. staticClass: "upload-control-spin-icon-load",
  112535. attrs: { type: "ios-loading" }
  112536. }),
  112537. _vm._v(" "),
  112538. _c("div", [_vm._v(_vm._s(_vm.$L("正在上传文件...")))])
  112539. ],
  112540. 1
  112541. )
  112542. : _vm._e(),
  112543. _vm._v(" "),
  112544. _c(
  112545. "Modal",
  112546. {
  112547. staticClass: "desc-editor-transfer",
  112548. attrs: { "footer-hide": "", fullscreen: "", transfer: "" },
  112549. on: { "on-visible-change": _vm.transferChange },
  112550. model: {
  112551. value: _vm.transfer,
  112552. callback: function($$v) {
  112553. _vm.transfer = $$v
  112554. },
  112555. expression: "transfer"
  112556. }
  112557. },
  112558. [
  112559. _c(
  112560. "div",
  112561. { attrs: { slot: "close" }, slot: "close" },
  112562. [
  112563. _c("Button", { attrs: { type: "primary", size: "small" } }, [
  112564. _vm._v(_vm._s(_vm.$L("完成")))
  112565. ])
  112566. ],
  112567. 1
  112568. ),
  112569. _vm._v(" "),
  112570. _c("div", { staticClass: "desc-editor-transfer-body" }, [
  112571. _c(
  112572. "textarea",
  112573. { attrs: { id: "T_" + _vm.id, placeholder: _vm.placeholder } },
  112574. [_vm._v(_vm._s(_vm.content))]
  112575. )
  112576. ]),
  112577. _vm._v(" "),
  112578. _vm.uploadIng > 0
  112579. ? _c(
  112580. "Spin",
  112581. { attrs: { fix: "" } },
  112582. [
  112583. _c("Icon", {
  112584. staticClass: "upload-control-spin-icon-load",
  112585. attrs: { type: "ios-loading" }
  112586. }),
  112587. _vm._v(" "),
  112588. _c("div", [_vm._v(_vm._s(_vm.$L("正在上传文件...")))])
  112589. ],
  112590. 1
  112591. )
  112592. : _vm._e()
  112593. ],
  112594. 1
  112595. )
  112596. ],
  112597. 1
  112598. )
  112599. }
  112600. var staticRenderFns = []
  112601. render._withStripped = true
  112602. module.exports = { render: render, staticRenderFns: staticRenderFns }
  112603. if (false) {
  112604. module.hot.accept()
  112605. if (module.hot.data) {
  112606. require("vue-hot-reload-api") .rerender("data-v-32dd27c6", module.exports)
  112607. }
  112608. }
  112609. /***/ }),
  112610. /* 280 */
  112611. /***/ (function(module, exports, __webpack_require__) {
  112612. var render = function() {
  112613. var _vm = this
  112614. var _h = _vm.$createElement
  112615. var _c = _vm._self._c || _h
  112616. return _vm.detail.isassign !== true
  112617. ? _c(
  112618. "div",
  112619. {
  112620. staticClass: "project-task-detail-window",
  112621. class: { "task-detail-show": _vm.visible }
  112622. },
  112623. [
  112624. _c("div", {
  112625. staticClass: "task-detail-bg",
  112626. on: { click: _vm.handleBgClose }
  112627. }),
  112628. _vm._v(" "),
  112629. _c(
  112630. "div",
  112631. {
  112632. staticClass: "task-detail-main",
  112633. on: {
  112634. drop: function($event) {
  112635. $event.preventDefault()
  112636. return _vm.commentPasteDrag($event, "drag")
  112637. },
  112638. dragover: function($event) {
  112639. $event.preventDefault()
  112640. return _vm.commentDragOver(true)
  112641. },
  112642. dragleave: function($event) {
  112643. $event.preventDefault()
  112644. return _vm.commentDragOver(false)
  112645. }
  112646. }
  112647. },
  112648. [
  112649. _c("div", { staticClass: "detail-left" }, [
  112650. _c(
  112651. "div",
  112652. { staticClass: "detail-title-box detail-icon" },
  112653. [
  112654. _c("Input", {
  112655. ref: "titleInput",
  112656. staticClass: "detail-title-input",
  112657. attrs: {
  112658. disabled: !!_vm.loadData.title,
  112659. type: "textarea",
  112660. rows: 1,
  112661. autosize: { minRows: 1, maxRows: 5 },
  112662. maxlength: "60"
  112663. },
  112664. on: {
  112665. "on-keydown": _vm.titleKeydown,
  112666. "on-blur": function($event) {
  112667. return _vm.handleTask("title")
  112668. }
  112669. },
  112670. model: {
  112671. value: _vm.detail.title,
  112672. callback: function($$v) {
  112673. _vm.$set(_vm.detail, "title", $$v)
  112674. },
  112675. expression: "detail.title"
  112676. }
  112677. }),
  112678. _vm._v(" "),
  112679. _vm.detail.projectTitle &&
  112680. _vm.urlProjectid != _vm.detail.projectid
  112681. ? _c("div", { staticClass: "subtitle" }, [
  112682. _vm._v(
  112683. "\n " +
  112684. _vm._s(_vm.$L("所属项目:")) +
  112685. "\n "
  112686. ),
  112687. _c(
  112688. "span",
  112689. {
  112690. staticClass: "project-title",
  112691. on: {
  112692. click: function($event) {
  112693. return _vm.openProject(_vm.detail.projectid)
  112694. }
  112695. }
  112696. },
  112697. [_vm._v(_vm._s(_vm.detail.projectTitle))]
  112698. )
  112699. ])
  112700. : _vm._e(),
  112701. _vm._v(" "),
  112702. _c("div", { staticClass: "subtitle" }, [
  112703. _c(
  112704. "span",
  112705. { staticClass: "z-nick" },
  112706. [
  112707. _c("UserView", {
  112708. attrs: { username: _vm.detail.createuser }
  112709. })
  112710. ],
  112711. 1
  112712. ),
  112713. _vm._v(
  112714. "\n " +
  112715. _vm._s(_vm.$L("创建于:")) +
  112716. "\n "
  112717. ),
  112718. _c("span", [
  112719. _vm._v(
  112720. _vm._s(
  112721. _vm.$A.formatDate("Y-m-d H:i:s", _vm.detail.indate)
  112722. )
  112723. )
  112724. ])
  112725. ])
  112726. ],
  112727. 1
  112728. ),
  112729. _vm._v(" "),
  112730. _c(
  112731. "div",
  112732. { staticClass: "detail-desc-box detail-icon" },
  112733. [
  112734. _c("div", { staticClass: "detail-h2" }, [
  112735. _c("strong", { staticClass: "active" }, [
  112736. _vm._v(_vm._s(_vm.$L("描述")))
  112737. ])
  112738. ]),
  112739. _vm._v(" "),
  112740. _c("DescEditor", {
  112741. attrs: {
  112742. taskid: _vm.detail.id,
  112743. desc: _vm.detail.desc,
  112744. placeholder: _vm.$L("添加详细描述...")
  112745. },
  112746. on: {
  112747. "save-success": function($event) {
  112748. return _vm.handleTask("desc")
  112749. }
  112750. }
  112751. })
  112752. ],
  112753. 1
  112754. ),
  112755. _vm._v(" "),
  112756. _c("ul", { staticClass: "detail-text-box" }, [
  112757. _vm.detail.startdate > 0 && _vm.detail.enddate > 0
  112758. ? _c("li", { staticClass: "text-time detail-icon" }, [
  112759. _c("span", [_vm._v(_vm._s(_vm.$L("计划时间:")))]),
  112760. _vm._v(" "),
  112761. _c("em", [
  112762. _vm._v(
  112763. "\n " +
  112764. _vm._s(
  112765. _vm.$A.formatDate(
  112766. "Y-m-d H:i",
  112767. _vm.detail.startdate
  112768. )
  112769. ) +
  112770. " " +
  112771. _vm._s(_vm.$L("至")) +
  112772. " " +
  112773. _vm._s(
  112774. _vm.$A.formatDate(
  112775. "Y-m-d H:i",
  112776. _vm.detail.enddate
  112777. )
  112778. ) +
  112779. "\n "
  112780. ),
  112781. _vm.detail.overdue
  112782. ? _c("em", { staticClass: "overdue" }, [
  112783. _vm._v("[" + _vm._s(_vm.$L("已超期")) + "]")
  112784. ])
  112785. : _vm._e()
  112786. ])
  112787. ])
  112788. : _vm._e(),
  112789. _vm._v(" "),
  112790. _c(
  112791. "li",
  112792. { staticClass: "text-username detail-icon" },
  112793. [
  112794. _c("span", [_vm._v(_vm._s(_vm.$L("负责人:")))]),
  112795. _vm._v(" "),
  112796. typeof _vm.detail.username !== "undefined"
  112797. ? [
  112798. _vm.detail.username
  112799. ? _c(
  112800. "em",
  112801. [
  112802. _c("UserView", {
  112803. attrs: {
  112804. username: _vm.detail.username,
  112805. showimg: ""
  112806. }
  112807. })
  112808. ],
  112809. 1
  112810. )
  112811. : _c(
  112812. "em",
  112813. [
  112814. _c("div", { staticClass: "uname-no" }, [
  112815. _vm._v(_vm._s(_vm.$L("暂无负责人")))
  112816. ]),
  112817. _vm._v(" "),
  112818. _c(
  112819. "Button",
  112820. {
  112821. staticClass: "uname-button",
  112822. attrs: {
  112823. loading: !!_vm.loadData.claim,
  112824. type: "primary",
  112825. size: "small"
  112826. },
  112827. on: {
  112828. click: function($event) {
  112829. return _vm.handleTask("claimb")
  112830. }
  112831. }
  112832. },
  112833. [_vm._v(_vm._s(_vm.$L("认领任务")))]
  112834. )
  112835. ],
  112836. 1
  112837. ),
  112838. _vm._v(" "),
  112839. _vm.detail.type == "assign" && !_vm.detail.reassign
  112840. ? _c(
  112841. "em",
  112842. [
  112843. _vm.detail.username == _vm.usrName
  112844. ? _c(
  112845. "Button",
  112846. {
  112847. staticClass: "uname-button",
  112848. attrs: {
  112849. type: "success",
  112850. size: "small"
  112851. },
  112852. on: {
  112853. click: function($event) {
  112854. return _vm.handleTask(
  112855. "reassign"
  112856. )
  112857. }
  112858. }
  112859. },
  112860. [_vm._v(_vm._s(_vm.$L("确认接收")))]
  112861. )
  112862. : _c(
  112863. "div",
  112864. { staticClass: "uname-text" },
  112865. [
  112866. _vm._v(
  112867. "[" +
  112868. _vm._s(_vm.$L("等待确认")) +
  112869. "]"
  112870. )
  112871. ]
  112872. )
  112873. ],
  112874. 1
  112875. )
  112876. : _vm._e()
  112877. ]
  112878. : _vm._e()
  112879. ],
  112880. 2
  112881. ),
  112882. _vm._v(" "),
  112883. _vm.followerLength(_vm.detail.follower) > 0
  112884. ? _c("li", { staticClass: "text-follower detail-icon" }, [
  112885. _c("span", [_vm._v(_vm._s(_vm.$L("关注者:")))]),
  112886. _vm._v(" "),
  112887. _c(
  112888. "em",
  112889. _vm._l(_vm.detail.follower, function(fname, findex) {
  112890. return _c(
  112891. "Tag",
  112892. {
  112893. key: findex,
  112894. attrs: { closable: "" },
  112895. on: {
  112896. "on-close": function($event) {
  112897. return _vm.handleTask("unattention", {
  112898. username: fname,
  112899. uisynch: true
  112900. })
  112901. }
  112902. }
  112903. },
  112904. [
  112905. _c("UserView", {
  112906. attrs: { username: fname, showimg: "" }
  112907. })
  112908. ],
  112909. 1
  112910. )
  112911. }),
  112912. 1
  112913. )
  112914. ])
  112915. : _vm._e(),
  112916. _vm._v(" "),
  112917. _c("li", { staticClass: "text-level detail-icon" }, [
  112918. _c("span", [_vm._v(_vm._s(_vm.$L("优先级:")))]),
  112919. _vm._v(" "),
  112920. _c("em", { class: "p" + _vm.detail.level }, [
  112921. _vm._v(_vm._s(_vm.levelFormt(_vm.detail.level)))
  112922. ])
  112923. ]),
  112924. _vm._v(" "),
  112925. _c("li", { staticClass: "text-status detail-icon" }, [
  112926. _c("span", [_vm._v(_vm._s(_vm.$L("任务状态:")))]),
  112927. _vm._v(" "),
  112928. _vm.detail.complete
  112929. ? _c("em", { staticClass: "complete" }, [
  112930. _vm._v(_vm._s(_vm.$L("已完成"))),
  112931. _c("span", { staticClass: "completedate" }, [
  112932. _vm._v(
  112933. "(" +
  112934. _vm._s(
  112935. _vm.$A.formatDate(
  112936. "Y-m-d H:i",
  112937. _vm.detail.completedate
  112938. )
  112939. ) +
  112940. ")"
  112941. )
  112942. ])
  112943. ])
  112944. : _c("em", { staticClass: "unfinished" }, [
  112945. _vm._v(_vm._s(_vm.$L("未完成")))
  112946. ])
  112947. ])
  112948. ]),
  112949. _vm._v(" "),
  112950. _c(
  112951. "div",
  112952. { staticClass: "detail-h2 detail-subtask-icon detail-icon" },
  112953. [
  112954. _c("strong", { staticClass: "active" }, [
  112955. _vm._v(_vm._s(_vm.$L("子任务")))
  112956. ]),
  112957. _vm._v(" "),
  112958. _c(
  112959. "div",
  112960. { staticClass: "detail-button" },
  112961. [
  112962. _c(
  112963. "Button",
  112964. {
  112965. staticClass: "detail-button-batch",
  112966. attrs: { size: "small" },
  112967. on: { click: _vm.subtaskBatchAdd }
  112968. },
  112969. [_vm._v(_vm._s(_vm.$L("批量添加子任务")))]
  112970. ),
  112971. _vm._v(" "),
  112972. _c(
  112973. "Button",
  112974. {
  112975. staticClass: "detail-button-btn",
  112976. attrs: { size: "small" },
  112977. on: {
  112978. click: function($event) {
  112979. return _vm.handleTask("subtaskAdd")
  112980. }
  112981. }
  112982. },
  112983. [_vm._v(_vm._s(_vm.$L("添加子任务")))]
  112984. )
  112985. ],
  112986. 1
  112987. )
  112988. ]
  112989. ),
  112990. _vm._v(" "),
  112991. _c("div", { staticClass: "detail-subtask-box" }, [
  112992. _vm.detail.subtask.length == 0
  112993. ? _c("div", { staticClass: "detail-subtask-none" }, [
  112994. _vm._v(_vm._s(_vm.$L("暂无子任务")))
  112995. ])
  112996. : _c(
  112997. "div",
  112998. [
  112999. _c("Progress", {
  113000. staticClass: "detail-subtask-progress",
  113001. attrs: {
  113002. percent: _vm.subtaskProgress,
  113003. "stroke-width": 5,
  113004. status: "active"
  113005. }
  113006. }),
  113007. _vm._v(" "),
  113008. _c(
  113009. "draggable",
  113010. {
  113011. attrs: {
  113012. draggable: ".detail-subtask-item",
  113013. animation: 150
  113014. },
  113015. on: {
  113016. sort: function($event) {
  113017. return _vm.taskSortUpdate(false)
  113018. }
  113019. },
  113020. model: {
  113021. value: _vm.detail.subtask,
  113022. callback: function($$v) {
  113023. _vm.$set(_vm.detail, "subtask", $$v)
  113024. },
  113025. expression: "detail.subtask"
  113026. }
  113027. },
  113028. _vm._l(_vm.detail.subtask, function(
  113029. subitem,
  113030. subindex
  113031. ) {
  113032. return _c(
  113033. "div",
  113034. {
  113035. key: subindex,
  113036. staticClass: "detail-subtask-item"
  113037. },
  113038. [
  113039. _c("Checkbox", {
  113040. attrs: {
  113041. "true-value": "complete",
  113042. "false-value": "unfinished"
  113043. },
  113044. on: {
  113045. "on-change": function($event) {
  113046. return _vm.handleTask(
  113047. "subtaskBlur",
  113048. subindex,
  113049. "status"
  113050. )
  113051. }
  113052. },
  113053. model: {
  113054. value: subitem.status,
  113055. callback: function($$v) {
  113056. _vm.$set(subitem, "status", $$v)
  113057. },
  113058. expression: "subitem.status"
  113059. }
  113060. }),
  113061. _vm._v(" "),
  113062. subitem.uname
  113063. ? _c("UserView", {
  113064. attrs: {
  113065. username: subitem.uname,
  113066. imgsize: "20",
  113067. imgfontsize: "14",
  113068. showname: false,
  113069. showimg: ""
  113070. }
  113071. })
  113072. : _vm._e(),
  113073. _vm._v(" "),
  113074. _c("Input", {
  113075. ref: "subtaskInput_" + subindex,
  113076. refInFor: true,
  113077. staticClass: "detail-subtask-input",
  113078. class: {
  113079. "subtask-complete":
  113080. subitem.status == "complete"
  113081. },
  113082. attrs: {
  113083. type: "textarea",
  113084. readonly: subitem.status == "complete",
  113085. rows: 1,
  113086. autosize: { minRows: 1, maxRows: 5 },
  113087. maxlength: "255",
  113088. placeholder: _vm.$L("子任务描述...")
  113089. },
  113090. on: {
  113091. "on-keydown": function($event) {
  113092. return _vm.subtaskKeydown(
  113093. subindex,
  113094. $event
  113095. )
  113096. },
  113097. "on-blur": function($event) {
  113098. return _vm.handleTask(
  113099. "subtaskBlur",
  113100. subindex,
  113101. "detail"
  113102. )
  113103. }
  113104. },
  113105. model: {
  113106. value: subitem.detail,
  113107. callback: function($$v) {
  113108. _vm.$set(subitem, "detail", $$v)
  113109. },
  113110. expression: "subitem.detail"
  113111. }
  113112. }),
  113113. _vm._v(" "),
  113114. _c(
  113115. "div",
  113116. {
  113117. staticClass: "detail-subtask-right",
  113118. style:
  113119. subitem.stip === "show"
  113120. ? { opacity: 1 }
  113121. : {}
  113122. },
  113123. [
  113124. _c(
  113125. "Poptip",
  113126. {
  113127. staticClass: "detail-subtask-ricon",
  113128. attrs: { transfer: "" },
  113129. on: {
  113130. "on-popper-show": function($event) {
  113131. return _vm.$set(
  113132. subitem,
  113133. "stip",
  113134. "show"
  113135. )
  113136. },
  113137. "on-popper-hide": function($event) {
  113138. ;[
  113139. _vm.$set(subitem, "stip", ""),
  113140. _vm.handleTask(
  113141. "subtaskBlur",
  113142. subindex,
  113143. "uname"
  113144. )
  113145. ]
  113146. }
  113147. }
  113148. },
  113149. [
  113150. _c("Icon", {
  113151. attrs: { type: "md-person" }
  113152. }),
  113153. _vm._v(" "),
  113154. _c(
  113155. "div",
  113156. {
  113157. attrs: { slot: "content" },
  113158. slot: "content"
  113159. },
  113160. [
  113161. _c(
  113162. "div",
  113163. {
  113164. staticStyle: {
  113165. width: "280px"
  113166. }
  113167. },
  113168. [
  113169. _vm._v(
  113170. "\n " +
  113171. _vm._s(
  113172. _vm.$L("子任务负责人")
  113173. ) +
  113174. "\n "
  113175. ),
  113176. _c("UserInput", {
  113177. staticStyle: {
  113178. margin: "5px 0 3px"
  113179. },
  113180. attrs: {
  113181. projectid:
  113182. _vm.detail.projectid,
  113183. transfer: false,
  113184. placeholder: _vm.$L(
  113185. "输入关键词搜索"
  113186. )
  113187. },
  113188. model: {
  113189. value: subitem.uname,
  113190. callback: function($$v) {
  113191. _vm.$set(
  113192. subitem,
  113193. "uname",
  113194. $$v
  113195. )
  113196. },
  113197. expression:
  113198. "subitem.uname"
  113199. }
  113200. })
  113201. ],
  113202. 1
  113203. )
  113204. ]
  113205. )
  113206. ],
  113207. 1
  113208. ),
  113209. _vm._v(" "),
  113210. subitem.detail == ""
  113211. ? _c(
  113212. "div",
  113213. {
  113214. staticClass:
  113215. "detail-subtask-ricon"
  113216. },
  113217. [
  113218. _c("Icon", {
  113219. attrs: { type: "md-trash" },
  113220. on: {
  113221. click: function($event) {
  113222. return _vm.handleTask(
  113223. "subtaskDelete",
  113224. subindex,
  113225. "delete"
  113226. )
  113227. }
  113228. }
  113229. })
  113230. ],
  113231. 1
  113232. )
  113233. : _c(
  113234. "Poptip",
  113235. {
  113236. staticClass:
  113237. "detail-subtask-ricon",
  113238. attrs: {
  113239. transfer: "",
  113240. confirm: "",
  113241. title: _vm.$L(
  113242. "你确定你要删除这个子任务吗?"
  113243. )
  113244. },
  113245. on: {
  113246. "on-ok": function($event) {
  113247. return _vm.handleTask(
  113248. "subtaskDelete",
  113249. subindex,
  113250. "delete"
  113251. )
  113252. },
  113253. "on-popper-show": function(
  113254. $event
  113255. ) {
  113256. return _vm.$set(
  113257. subitem,
  113258. "stip",
  113259. "show"
  113260. )
  113261. },
  113262. "on-popper-hide": function(
  113263. $event
  113264. ) {
  113265. return _vm.$set(
  113266. subitem,
  113267. "stip",
  113268. ""
  113269. )
  113270. }
  113271. }
  113272. },
  113273. [
  113274. _c("Icon", {
  113275. attrs: { type: "md-trash" }
  113276. })
  113277. ],
  113278. 1
  113279. )
  113280. ],
  113281. 1
  113282. )
  113283. ],
  113284. 1
  113285. )
  113286. }),
  113287. 0
  113288. )
  113289. ],
  113290. 1
  113291. )
  113292. ]),
  113293. _vm._v(" "),
  113294. _c(
  113295. "div",
  113296. {
  113297. style: "" + (_vm.detail.filenum > 0 ? "" : "display:none")
  113298. },
  113299. [
  113300. _c(
  113301. "div",
  113302. { staticClass: "detail-h2 detail-file-box detail-icon" },
  113303. [
  113304. _c("strong", { staticClass: "active" }, [
  113305. _vm._v(_vm._s(_vm.$L("附件")))
  113306. ]),
  113307. _vm._v(" "),
  113308. _c(
  113309. "div",
  113310. { staticClass: "detail-button" },
  113311. [
  113312. _c(
  113313. "Button",
  113314. {
  113315. staticClass: "detail-button-btn",
  113316. attrs: { size: "small" },
  113317. on: {
  113318. click: function($event) {
  113319. return _vm.handleTask("fileupload")
  113320. }
  113321. }
  113322. },
  113323. [_vm._v(_vm._s(_vm.$L("添加附件")))]
  113324. )
  113325. ],
  113326. 1
  113327. )
  113328. ]
  113329. ),
  113330. _vm._v(" "),
  113331. _c("project-task-files", {
  113332. ref: "projectUpload",
  113333. attrs: {
  113334. taskid: _vm.taskid,
  113335. projectid: _vm.detail.projectid,
  113336. simple: true
  113337. },
  113338. on: {
  113339. change: function($event) {
  113340. return _vm.handleTask("filechange", $event)
  113341. }
  113342. }
  113343. })
  113344. ],
  113345. 1
  113346. ),
  113347. _vm._v(" "),
  113348. _c(
  113349. "div",
  113350. { staticClass: "detail-h2 detail-comment-box detail-icon" },
  113351. [
  113352. _c(
  113353. "strong",
  113354. {
  113355. staticClass: "link",
  113356. class: { active: _vm.logType == "评论" },
  113357. on: {
  113358. click: function($event) {
  113359. _vm.logType = "评论"
  113360. }
  113361. }
  113362. },
  113363. [_vm._v(_vm._s(_vm.$L("评论")))]
  113364. ),
  113365. _c("em"),
  113366. _c(
  113367. "strong",
  113368. {
  113369. staticClass: "link",
  113370. class: { active: _vm.logType == "日志" },
  113371. on: {
  113372. click: function($event) {
  113373. _vm.logType = "日志"
  113374. }
  113375. }
  113376. },
  113377. [_vm._v(_vm._s(_vm.$L("操作记录")))]
  113378. )
  113379. ]
  113380. ),
  113381. _vm._v(" "),
  113382. _c(
  113383. "div",
  113384. { staticClass: "detail-log-box" },
  113385. [
  113386. _c("project-task-logs", {
  113387. ref: "log",
  113388. attrs: {
  113389. logtype: _vm.logType,
  113390. projectid: _vm.detail.projectid,
  113391. taskid: _vm.taskid,
  113392. pagesize: 5
  113393. }
  113394. })
  113395. ],
  113396. 1
  113397. ),
  113398. _vm._v(" "),
  113399. _c(
  113400. "div",
  113401. { staticClass: "detail-footer-box" },
  113402. [
  113403. _c("WInput", {
  113404. staticClass: "comment-input",
  113405. attrs: {
  113406. type: "textarea",
  113407. rows: 1,
  113408. autosize: { minRows: 1, maxRows: 3 },
  113409. maxlength: 255,
  113410. placeholder: _vm.$L(
  113411. "输入评论,Enter发表评论,Shift+Enter换行"
  113412. )
  113413. },
  113414. on: {
  113415. "on-keydown": _vm.commentKeydown,
  113416. "on-input-paste": _vm.commentPasteDrag
  113417. },
  113418. model: {
  113419. value: _vm.commentText,
  113420. callback: function($$v) {
  113421. _vm.commentText = $$v
  113422. },
  113423. expression: "commentText"
  113424. }
  113425. }),
  113426. _vm._v(" "),
  113427. _c(
  113428. "Button",
  113429. {
  113430. attrs: {
  113431. loading: !!_vm.loadData.comment,
  113432. disabled: !_vm.commentText,
  113433. type: "primary"
  113434. },
  113435. on: {
  113436. click: function($event) {
  113437. return _vm.handleTask("comment")
  113438. }
  113439. }
  113440. },
  113441. [_vm._v("评 论")]
  113442. )
  113443. ],
  113444. 1
  113445. )
  113446. ]),
  113447. _vm._v(" "),
  113448. _vm.detail.username
  113449. ? _c(
  113450. "div",
  113451. {
  113452. staticClass: "detail-right",
  113453. class: { "open-menu": _vm.openMenu }
  113454. },
  113455. [
  113456. _vm.detail.complete
  113457. ? _c(
  113458. "Button",
  113459. {
  113460. staticClass: "btn",
  113461. attrs: {
  113462. loading: !!_vm.loadData.unfinished,
  113463. icon: "md-checkmark-circle-outline"
  113464. },
  113465. on: {
  113466. click: function($event) {
  113467. return _vm.handleTask("unfinished")
  113468. }
  113469. }
  113470. },
  113471. [_vm._v(_vm._s(_vm.$L("标记未完成")))]
  113472. )
  113473. : _c(
  113474. "Button",
  113475. {
  113476. staticClass: "btn",
  113477. attrs: {
  113478. loading: !!_vm.loadData.complete,
  113479. icon: "md-radio-button-off"
  113480. },
  113481. on: {
  113482. click: function($event) {
  113483. return _vm.handleTask("complete")
  113484. }
  113485. }
  113486. },
  113487. [_vm._v(_vm._s(_vm.$L("标记已完成")))]
  113488. ),
  113489. _vm._v(" "),
  113490. _c(
  113491. "Dropdown",
  113492. {
  113493. staticClass: "block",
  113494. attrs: { trigger: "click" },
  113495. on: {
  113496. "on-click": _vm.handleTask,
  113497. "on-visible-change": _vm.handleSubwinToggle
  113498. }
  113499. },
  113500. [
  113501. _c(
  113502. "Button",
  113503. {
  113504. staticClass: "btn",
  113505. attrs: {
  113506. loading: !!_vm.loadData.level,
  113507. icon: "md-funnel"
  113508. }
  113509. },
  113510. [_vm._v(_vm._s(_vm.$L("优先级")))]
  113511. ),
  113512. _vm._v(" "),
  113513. _c(
  113514. "DropdownMenu",
  113515. { attrs: { slot: "list" }, slot: "list" },
  113516. _vm._l([1, 2, 3, 4], function(level) {
  113517. return _c(
  113518. "DropdownItem",
  113519. {
  113520. key: level,
  113521. class: "p" + level,
  113522. attrs: { name: "level-" + level }
  113523. },
  113524. [
  113525. _vm._v(_vm._s(_vm.levelFormt(level))),
  113526. _vm.detail.level == level
  113527. ? _c("Icon", {
  113528. staticClass: "checkmark",
  113529. attrs: { type: "md-checkmark" }
  113530. })
  113531. : _vm._e()
  113532. ],
  113533. 1
  113534. )
  113535. }),
  113536. 1
  113537. )
  113538. ],
  113539. 1
  113540. ),
  113541. _vm._v(" "),
  113542. _c(
  113543. "Poptip",
  113544. {
  113545. staticClass: "block",
  113546. attrs: { placement: "bottom", transfer: "" },
  113547. on: {
  113548. "on-popper-show": function($event) {
  113549. ;[
  113550. _vm.handleUsernameShow(),
  113551. _vm.handleSubwinToggle(true)
  113552. ]
  113553. },
  113554. "on-popper-hide": function($event) {
  113555. return _vm.handleSubwinToggle(false)
  113556. }
  113557. }
  113558. },
  113559. [
  113560. _c(
  113561. "Button",
  113562. {
  113563. staticClass: "btn",
  113564. attrs: {
  113565. loading: !!_vm.loadData.username,
  113566. icon: "md-person"
  113567. }
  113568. },
  113569. [_vm._v(_vm._s(_vm.$L("负责人")))]
  113570. ),
  113571. _vm._v(" "),
  113572. _c(
  113573. "div",
  113574. { attrs: { slot: "content" }, slot: "content" },
  113575. [
  113576. _c(
  113577. "div",
  113578. { staticStyle: { width: "280px" } },
  113579. [
  113580. _vm._v(
  113581. "\n " +
  113582. _vm._s(_vm.$L("选择负责人")) +
  113583. "\n "
  113584. ),
  113585. _c("UserInput", {
  113586. staticStyle: { margin: "5px 0 3px" },
  113587. attrs: {
  113588. projectid: _vm.detail.projectid,
  113589. nousername: _vm.detail.username,
  113590. transfer: false,
  113591. placeholder: _vm.$L("输入关键词搜索")
  113592. },
  113593. on: {
  113594. change: function($event) {
  113595. return _vm.handleTask(
  113596. "usernameb",
  113597. $event
  113598. )
  113599. }
  113600. },
  113601. model: {
  113602. value: _vm.detail.newusername,
  113603. callback: function($$v) {
  113604. _vm.$set(_vm.detail, "newusername", $$v)
  113605. },
  113606. expression: "detail.newusername"
  113607. }
  113608. })
  113609. ],
  113610. 1
  113611. )
  113612. ]
  113613. )
  113614. ],
  113615. 1
  113616. ),
  113617. _vm._v(" "),
  113618. _c(
  113619. "Poptip",
  113620. {
  113621. ref: "timeRef",
  113622. staticClass: "block",
  113623. attrs: { placement: "bottom", transfer: "" },
  113624. on: {
  113625. "on-popper-show": function($event) {
  113626. ;[
  113627. _vm.handleTask("inittime"),
  113628. _vm.handleSubwinToggle(true)
  113629. ]
  113630. },
  113631. "on-popper-hide": function($event) {
  113632. return _vm.handleSubwinToggle(false)
  113633. }
  113634. }
  113635. },
  113636. [
  113637. _c(
  113638. "Button",
  113639. {
  113640. staticClass: "btn",
  113641. attrs: {
  113642. loading:
  113643. !!_vm.loadData.plannedtime ||
  113644. !!_vm.loadData.unplannedtime,
  113645. icon: "md-calendar"
  113646. }
  113647. },
  113648. [_vm._v(_vm._s(_vm.$L("计划时间")))]
  113649. ),
  113650. _vm._v(" "),
  113651. _c(
  113652. "div",
  113653. { attrs: { slot: "content" }, slot: "content" },
  113654. [
  113655. _c(
  113656. "div",
  113657. { staticStyle: { width: "280px" } },
  113658. [
  113659. _vm._v(
  113660. "\n " +
  113661. _vm._s(_vm.$L("选择日期范围")) +
  113662. "\n "
  113663. ),
  113664. _c("Date-picker", {
  113665. staticStyle: {
  113666. display: "block",
  113667. margin: "5px 0 3px"
  113668. },
  113669. attrs: {
  113670. options: _vm.timeOptions,
  113671. placeholder: _vm.$L("日期范围"),
  113672. format: "yyyy-MM-dd HH:mm",
  113673. type: "datetimerange",
  113674. placement: "bottom"
  113675. },
  113676. on: {
  113677. "on-ok": function($event) {
  113678. return _vm.handleTask("plannedtimeb")
  113679. },
  113680. "on-clear": function($event) {
  113681. return _vm.handleTask("unplannedtimeb")
  113682. }
  113683. },
  113684. model: {
  113685. value: _vm.timeValue,
  113686. callback: function($$v) {
  113687. _vm.timeValue = $$v
  113688. },
  113689. expression: "timeValue"
  113690. }
  113691. })
  113692. ],
  113693. 1
  113694. )
  113695. ]
  113696. )
  113697. ],
  113698. 1
  113699. ),
  113700. _vm._v(" "),
  113701. _c(
  113702. "Button",
  113703. {
  113704. staticClass: "btn",
  113705. attrs: { icon: "md-attach" },
  113706. on: {
  113707. click: function($event) {
  113708. return _vm.handleTask("fileupload")
  113709. }
  113710. }
  113711. },
  113712. [_vm._v(_vm._s(_vm.$L("添加附件")))]
  113713. ),
  113714. _vm._v(" "),
  113715. _vm.detail.username == _vm.usrName
  113716. ? _c(
  113717. "Poptip",
  113718. {
  113719. ref: "attentionRef",
  113720. staticClass: "block",
  113721. attrs: { placement: "bottom", transfer: "" },
  113722. on: {
  113723. "on-popper-show": function($event) {
  113724. ;[
  113725. _vm.handleAttentionShow(),
  113726. _vm.handleSubwinToggle(true)
  113727. ]
  113728. },
  113729. "on-popper-hide": function($event) {
  113730. return _vm.handleSubwinToggle(false)
  113731. }
  113732. }
  113733. },
  113734. [
  113735. _c(
  113736. "Button",
  113737. {
  113738. staticClass: "btn",
  113739. attrs: {
  113740. loading: !!_vm.loadData.attention,
  113741. icon: "md-at"
  113742. }
  113743. },
  113744. [_vm._v(_vm._s(_vm.$L("关注人")))]
  113745. ),
  113746. _vm._v(" "),
  113747. _c(
  113748. "div",
  113749. { attrs: { slot: "content" }, slot: "content" },
  113750. [
  113751. _c(
  113752. "div",
  113753. { staticStyle: { width: "280px" } },
  113754. [
  113755. _vm._v(
  113756. "\n " +
  113757. _vm._s(_vm.$L("选择关注人")) +
  113758. "\n "
  113759. ),
  113760. _c("UserInput", {
  113761. staticStyle: { margin: "5px 0 3px" },
  113762. attrs: {
  113763. projectid: _vm.detail.projectid,
  113764. multiple: true,
  113765. transfer: false,
  113766. placeholder: _vm.$L("输入关键词搜索")
  113767. },
  113768. on: {
  113769. "on-confirm": function($event) {
  113770. return _vm.handleTask(
  113771. "attention",
  113772. true
  113773. )
  113774. }
  113775. },
  113776. model: {
  113777. value: _vm.detail.attentionLists,
  113778. callback: function($$v) {
  113779. _vm.$set(
  113780. _vm.detail,
  113781. "attentionLists",
  113782. $$v
  113783. )
  113784. },
  113785. expression: "detail.attentionLists"
  113786. }
  113787. })
  113788. ],
  113789. 1
  113790. )
  113791. ]
  113792. )
  113793. ],
  113794. 1
  113795. )
  113796. : _vm.haveAttention(_vm.detail.follower)
  113797. ? _c(
  113798. "Button",
  113799. {
  113800. staticClass: "btn",
  113801. attrs: {
  113802. loading: !!_vm.loadData.unattention,
  113803. icon: "md-at"
  113804. },
  113805. on: {
  113806. click: function($event) {
  113807. return _vm.handleTask("unattention", {
  113808. username: _vm.usrName
  113809. })
  113810. }
  113811. }
  113812. },
  113813. [_vm._v(_vm._s(_vm.$L("取消关注")))]
  113814. )
  113815. : _c(
  113816. "Button",
  113817. {
  113818. staticClass: "btn",
  113819. attrs: {
  113820. loading: !!_vm.loadData.attention,
  113821. icon: "md-at"
  113822. },
  113823. on: {
  113824. click: function($event) {
  113825. return _vm.handleTask("attentiona")
  113826. }
  113827. }
  113828. },
  113829. [_vm._v(_vm._s(_vm.$L("关注任务")))]
  113830. ),
  113831. _vm._v(" "),
  113832. !_vm.detail.archived
  113833. ? _c(
  113834. "Button",
  113835. {
  113836. staticClass: "btn",
  113837. attrs: {
  113838. loading: !!_vm.loadData.archived,
  113839. icon: "md-filing"
  113840. },
  113841. on: {
  113842. click: function($event) {
  113843. return _vm.handleTask("archived")
  113844. }
  113845. }
  113846. },
  113847. [_vm._v(_vm._s(_vm.$L("归档")))]
  113848. )
  113849. : _c(
  113850. "Button",
  113851. {
  113852. staticClass: "btn",
  113853. attrs: {
  113854. loading: !!_vm.loadData.unarchived,
  113855. icon: "md-filing"
  113856. },
  113857. on: {
  113858. click: function($event) {
  113859. return _vm.handleTask("unarchived")
  113860. }
  113861. }
  113862. },
  113863. [_vm._v(_vm._s(_vm.$L("取消归档")))]
  113864. ),
  113865. _vm._v(" "),
  113866. _c(
  113867. "Button",
  113868. {
  113869. staticClass: "btn",
  113870. attrs: {
  113871. loading: !!_vm.loadData.delete,
  113872. icon: "md-trash",
  113873. type: "error",
  113874. ghost: ""
  113875. },
  113876. on: {
  113877. click: function($event) {
  113878. return _vm.handleTask("deleteb")
  113879. }
  113880. }
  113881. },
  113882. [_vm._v(_vm._s(_vm.$L("删除")))]
  113883. )
  113884. ],
  113885. 1
  113886. )
  113887. : _vm._e(),
  113888. _vm._v(" "),
  113889. _vm.detail.complete
  113890. ? _c(
  113891. "div",
  113892. { staticClass: "detail-complete" },
  113893. [
  113894. _c("Icon", {
  113895. attrs: { type: "md-checkmark-circle-outline" }
  113896. })
  113897. ],
  113898. 1
  113899. )
  113900. : _vm._e(),
  113901. _vm._v(" "),
  113902. _c(
  113903. "div",
  113904. {
  113905. staticClass: "detail-menu",
  113906. on: {
  113907. click: function($event) {
  113908. _vm.openMenu = !_vm.openMenu
  113909. }
  113910. }
  113911. },
  113912. [_c("Icon", { attrs: { type: "md-menu", size: "24" } })],
  113913. 1
  113914. ),
  113915. _vm._v(" "),
  113916. _c("div", { staticClass: "detail-cancel" }, [
  113917. _c("em", {
  113918. on: {
  113919. click: function($event) {
  113920. _vm.visible = false
  113921. }
  113922. }
  113923. })
  113924. ]),
  113925. _vm._v(" "),
  113926. _vm.detailDragOver
  113927. ? _c("div", { staticClass: "detail-drag-over" }, [
  113928. _c("div", { staticClass: "detail-drag-text" }, [
  113929. _vm._v(
  113930. _vm._s(
  113931. _vm.$L("拖动到这里添加附件至 %", _vm.detail.title)
  113932. )
  113933. )
  113934. ])
  113935. ])
  113936. : _vm._e()
  113937. ]
  113938. )
  113939. ]
  113940. )
  113941. : _vm._e()
  113942. }
  113943. var staticRenderFns = []
  113944. render._withStripped = true
  113945. module.exports = { render: render, staticRenderFns: staticRenderFns }
  113946. if (false) {
  113947. module.hot.accept()
  113948. if (module.hot.data) {
  113949. require("vue-hot-reload-api") .rerender("data-v-57fd86f0", module.exports)
  113950. }
  113951. }
  113952. /***/ }),
  113953. /* 281 */
  113954. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  113955. "use strict";
  113956. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(4);
  113957. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__);
  113958. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__detail_vue__ = __webpack_require__(282);
  113959. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__detail_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__detail_vue__);
  113960. var detailElement = function detailElement(reportid, reporttitle) {
  113961. return new Promise(function () {
  113962. var custom = __WEBPACK_IMPORTED_MODULE_0_vue___default.a.extend(__WEBPACK_IMPORTED_MODULE_1__detail_vue___default.a);
  113963. var instance = new custom({
  113964. data: {
  113965. reportid: reportid,
  113966. reporttitle: reporttitle
  113967. }
  113968. });
  113969. instance.$mount();
  113970. document.body.appendChild(instance.$el);
  113971. });
  113972. };
  113973. /* harmony default export */ __webpack_exports__["a"] = (detailElement);
  113974. /***/ }),
  113975. /* 282 */
  113976. /***/ (function(module, exports, __webpack_require__) {
  113977. var disposed = false
  113978. var normalizeComponent = __webpack_require__(2)
  113979. /* script */
  113980. var __vue_script__ = __webpack_require__(283)
  113981. /* template */
  113982. var __vue_template__ = __webpack_require__(284)
  113983. /* template functional */
  113984. var __vue_template_functional__ = false
  113985. /* styles */
  113986. var __vue_styles__ = null
  113987. /* scopeId */
  113988. var __vue_scopeId__ = null
  113989. /* moduleIdentifier (server only) */
  113990. var __vue_module_identifier__ = null
  113991. var Component = normalizeComponent(
  113992. __vue_script__,
  113993. __vue_template__,
  113994. __vue_template_functional__,
  113995. __vue_styles__,
  113996. __vue_scopeId__,
  113997. __vue_module_identifier__
  113998. )
  113999. Component.options.__file = "resources/assets/js/main/components/report/detail/detail.vue"
  114000. /* hot reload */
  114001. if (false) {(function () {
  114002. var hotAPI = require("vue-hot-reload-api")
  114003. hotAPI.install(require("vue"), false)
  114004. if (!hotAPI.compatible) return
  114005. module.hot.accept()
  114006. if (!module.hot.data) {
  114007. hotAPI.createRecord("data-v-5954d22e", Component.options)
  114008. } else {
  114009. hotAPI.reload("data-v-5954d22e", Component.options)
  114010. }
  114011. module.hot.dispose(function (data) {
  114012. disposed = true
  114013. })
  114014. })()}
  114015. module.exports = Component.exports
  114016. /***/ }),
  114017. /* 283 */
  114018. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  114019. "use strict";
  114020. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  114021. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__content__ = __webpack_require__(64);
  114022. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__content___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__content__);
  114023. //
  114024. //
  114025. //
  114026. //
  114027. //
  114028. //
  114029. //
  114030. //
  114031. //
  114032. //
  114033. //
  114034. //
  114035. /* harmony default export */ __webpack_exports__["default"] = ({
  114036. components: { ReportContent: __WEBPACK_IMPORTED_MODULE_0__content___default.a },
  114037. data: function data() {
  114038. return {
  114039. reportid: 0,
  114040. reporttitle: '',
  114041. contentShow: false,
  114042. contentTitle: '',
  114043. contentText: ''
  114044. };
  114045. },
  114046. beforeCreate: function beforeCreate() {
  114047. var doms = document.querySelectorAll('.report-detail-window');
  114048. for (var i = 0; i < doms.length; ++i) {
  114049. if (doms[i].parentNode != null) doms[i].parentNode.removeChild(doms[i]);
  114050. }
  114051. },
  114052. mounted: function mounted() {
  114053. this.getDetail();
  114054. },
  114055. watch: {
  114056. reportid: function reportid() {
  114057. this.getDetail();
  114058. }
  114059. },
  114060. methods: {
  114061. getDetail: function getDetail() {
  114062. var _this = this;
  114063. this.contentShow = true;
  114064. this.contentTitle = this.reporttitle;
  114065. this.contentText = this.$L('详细内容加载中.....');
  114066. $A.apiAjax({
  114067. url: 'report/content?id=' + this.reportid,
  114068. error: function error() {
  114069. alert(_this.$L('网络繁忙,请稍后再试!'));
  114070. _this.contentShow = false;
  114071. },
  114072. success: function success(res) {
  114073. if (res.ret === 1) {
  114074. _this.contentText = res.data.content;
  114075. } else {
  114076. _this.contentShow = false;
  114077. _this.$Modal.error({ title: _this.$L('温馨提示'), content: res.msg });
  114078. }
  114079. }
  114080. });
  114081. }
  114082. }
  114083. });
  114084. /***/ }),
  114085. /* 284 */
  114086. /***/ (function(module, exports, __webpack_require__) {
  114087. var render = function() {
  114088. var _vm = this
  114089. var _h = _vm.$createElement
  114090. var _c = _vm._self._c || _h
  114091. return _c(
  114092. "Modal",
  114093. {
  114094. staticClass: "report-detail-window",
  114095. attrs: {
  114096. title: _vm.contentTitle,
  114097. width: "80%",
  114098. styles: { top: "35px", paddingBottom: "35px" },
  114099. footerHide: ""
  114100. },
  114101. model: {
  114102. value: _vm.contentShow,
  114103. callback: function($$v) {
  114104. _vm.contentShow = $$v
  114105. },
  114106. expression: "contentShow"
  114107. }
  114108. },
  114109. [_c("report-content", { attrs: { content: _vm.contentText } })],
  114110. 1
  114111. )
  114112. }
  114113. var staticRenderFns = []
  114114. render._withStripped = true
  114115. module.exports = { render: render, staticRenderFns: staticRenderFns }
  114116. if (false) {
  114117. module.hot.accept()
  114118. if (module.hot.data) {
  114119. require("vue-hot-reload-api") .rerender("data-v-5954d22e", module.exports)
  114120. }
  114121. }
  114122. /***/ }),
  114123. /* 285 */
  114124. /***/ (function(module, exports) {
  114125. // removed by extract-text-webpack-plugin
  114126. /***/ })
  114127. /******/ ]);