移动储能车V1版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app-service.js 660KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194
  1. if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  2. Promise.prototype.finally = function(callback) {
  3. const promise = this.constructor;
  4. return this.then(
  5. (value) => promise.resolve(callback()).then(() => value),
  6. (reason) => promise.resolve(callback()).then(() => {
  7. throw reason;
  8. })
  9. );
  10. };
  11. }
  12. ;
  13. if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  14. const global2 = uni.requireGlobal();
  15. ArrayBuffer = global2.ArrayBuffer;
  16. Int8Array = global2.Int8Array;
  17. Uint8Array = global2.Uint8Array;
  18. Uint8ClampedArray = global2.Uint8ClampedArray;
  19. Int16Array = global2.Int16Array;
  20. Uint16Array = global2.Uint16Array;
  21. Int32Array = global2.Int32Array;
  22. Uint32Array = global2.Uint32Array;
  23. Float32Array = global2.Float32Array;
  24. Float64Array = global2.Float64Array;
  25. BigInt64Array = global2.BigInt64Array;
  26. BigUint64Array = global2.BigUint64Array;
  27. }
  28. ;
  29. if (uni.restoreGlobal) {
  30. uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
  31. }
  32. (function(vue) {
  33. "use strict";
  34. function formatAppLog(type, filename, ...args) {
  35. if (uni.__log__) {
  36. uni.__log__(type, filename, ...args);
  37. } else {
  38. console[type].apply(console, [...args, filename]);
  39. }
  40. }
  41. function resolveEasycom(component, easycom) {
  42. return typeof component === "string" ? easycom : component;
  43. }
  44. const popup = {
  45. data() {
  46. return {};
  47. },
  48. created() {
  49. this.popup = this.getParent();
  50. },
  51. methods: {
  52. /**
  53. * 获取父元素实例
  54. */
  55. getParent(name = "uniPopup") {
  56. let parent = this.$parent;
  57. let parentName = parent.$options.name;
  58. while (parentName !== name) {
  59. parent = parent.$parent;
  60. if (!parent)
  61. return false;
  62. parentName = parent.$options.name;
  63. }
  64. return parent;
  65. }
  66. }
  67. };
  68. const _export_sfc = (sfc, props) => {
  69. const target = sfc.__vccOpts || sfc;
  70. for (const [key, val] of props) {
  71. target[key] = val;
  72. }
  73. return target;
  74. };
  75. const _sfc_main$h = {
  76. name: "uniPopupMessage",
  77. mixins: [popup],
  78. props: {
  79. /**
  80. * 主题 success/warning/info/error 默认 success
  81. */
  82. type: {
  83. type: String,
  84. default: "success"
  85. },
  86. /**
  87. * 消息文字
  88. */
  89. message: {
  90. type: String,
  91. default: ""
  92. },
  93. /**
  94. * 显示时间,设置为 0 则不会自动关闭
  95. */
  96. duration: {
  97. type: Number,
  98. default: 3e3
  99. },
  100. maskShow: {
  101. type: Boolean,
  102. default: false
  103. }
  104. },
  105. data() {
  106. return {};
  107. },
  108. created() {
  109. this.popup.maskShow = this.maskShow;
  110. this.popup.messageChild = this;
  111. },
  112. methods: {
  113. timerClose() {
  114. if (this.duration === 0)
  115. return;
  116. clearTimeout(this.timer);
  117. this.timer = setTimeout(() => {
  118. this.popup.close();
  119. }, this.duration);
  120. }
  121. }
  122. };
  123. function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  124. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-popup-message" }, [
  125. vue.createElementVNode(
  126. "view",
  127. {
  128. class: vue.normalizeClass(["uni-popup-message__box fixforpc-width", "uni-popup__" + $props.type])
  129. },
  130. [
  131. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  132. vue.createElementVNode(
  133. "text",
  134. {
  135. class: vue.normalizeClass(["uni-popup-message-text", "uni-popup__" + $props.type + "-text"])
  136. },
  137. vue.toDisplayString($props.message),
  138. 3
  139. /* TEXT, CLASS */
  140. )
  141. ], true)
  142. ],
  143. 2
  144. /* CLASS */
  145. )
  146. ]);
  147. }
  148. const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-a4566996"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue"]]);
  149. class MPAnimation {
  150. constructor(options, _this) {
  151. this.options = options;
  152. this.animation = uni.createAnimation({
  153. ...options
  154. });
  155. this.currentStepAnimates = {};
  156. this.next = 0;
  157. this.$ = _this;
  158. }
  159. _nvuePushAnimates(type, args) {
  160. let aniObj = this.currentStepAnimates[this.next];
  161. let styles = {};
  162. if (!aniObj) {
  163. styles = {
  164. styles: {},
  165. config: {}
  166. };
  167. } else {
  168. styles = aniObj;
  169. }
  170. if (animateTypes1.includes(type)) {
  171. if (!styles.styles.transform) {
  172. styles.styles.transform = "";
  173. }
  174. let unit = "";
  175. if (type === "rotate") {
  176. unit = "deg";
  177. }
  178. styles.styles.transform += `${type}(${args + unit}) `;
  179. } else {
  180. styles.styles[type] = `${args}`;
  181. }
  182. this.currentStepAnimates[this.next] = styles;
  183. }
  184. _animateRun(styles = {}, config = {}) {
  185. let ref = this.$.$refs["ani"].ref;
  186. if (!ref)
  187. return;
  188. return new Promise((resolve, reject) => {
  189. nvueAnimation.transition(ref, {
  190. styles,
  191. ...config
  192. }, (res) => {
  193. resolve();
  194. });
  195. });
  196. }
  197. _nvueNextAnimate(animates, step = 0, fn) {
  198. let obj = animates[step];
  199. if (obj) {
  200. let {
  201. styles,
  202. config
  203. } = obj;
  204. this._animateRun(styles, config).then(() => {
  205. step += 1;
  206. this._nvueNextAnimate(animates, step, fn);
  207. });
  208. } else {
  209. this.currentStepAnimates = {};
  210. typeof fn === "function" && fn();
  211. this.isEnd = true;
  212. }
  213. }
  214. step(config = {}) {
  215. this.animation.step(config);
  216. return this;
  217. }
  218. run(fn) {
  219. this.$.animationData = this.animation.export();
  220. this.$.timer = setTimeout(() => {
  221. typeof fn === "function" && fn();
  222. }, this.$.durationTime);
  223. }
  224. }
  225. const animateTypes1 = [
  226. "matrix",
  227. "matrix3d",
  228. "rotate",
  229. "rotate3d",
  230. "rotateX",
  231. "rotateY",
  232. "rotateZ",
  233. "scale",
  234. "scale3d",
  235. "scaleX",
  236. "scaleY",
  237. "scaleZ",
  238. "skew",
  239. "skewX",
  240. "skewY",
  241. "translate",
  242. "translate3d",
  243. "translateX",
  244. "translateY",
  245. "translateZ"
  246. ];
  247. const animateTypes2 = ["opacity", "backgroundColor"];
  248. const animateTypes3 = ["width", "height", "left", "right", "top", "bottom"];
  249. animateTypes1.concat(animateTypes2, animateTypes3).forEach((type) => {
  250. MPAnimation.prototype[type] = function(...args) {
  251. this.animation[type](...args);
  252. return this;
  253. };
  254. });
  255. function createAnimation(option, _this) {
  256. if (!_this)
  257. return;
  258. clearTimeout(_this.timer);
  259. return new MPAnimation(option, _this);
  260. }
  261. const _sfc_main$g = {
  262. name: "uniTransition",
  263. emits: ["click", "change"],
  264. props: {
  265. show: {
  266. type: Boolean,
  267. default: false
  268. },
  269. modeClass: {
  270. type: [Array, String],
  271. default() {
  272. return "fade";
  273. }
  274. },
  275. duration: {
  276. type: Number,
  277. default: 300
  278. },
  279. styles: {
  280. type: Object,
  281. default() {
  282. return {};
  283. }
  284. },
  285. customClass: {
  286. type: String,
  287. default: ""
  288. },
  289. onceRender: {
  290. type: Boolean,
  291. default: false
  292. }
  293. },
  294. data() {
  295. return {
  296. isShow: false,
  297. transform: "",
  298. opacity: 1,
  299. animationData: {},
  300. durationTime: 300,
  301. config: {}
  302. };
  303. },
  304. watch: {
  305. show: {
  306. handler(newVal) {
  307. if (newVal) {
  308. this.open();
  309. } else {
  310. if (this.isShow) {
  311. this.close();
  312. }
  313. }
  314. },
  315. immediate: true
  316. }
  317. },
  318. computed: {
  319. // 生成样式数据
  320. stylesObject() {
  321. let styles = {
  322. ...this.styles,
  323. "transition-duration": this.duration / 1e3 + "s"
  324. };
  325. let transform = "";
  326. for (let i2 in styles) {
  327. let line = this.toLine(i2);
  328. transform += line + ":" + styles[i2] + ";";
  329. }
  330. return transform;
  331. },
  332. // 初始化动画条件
  333. transformStyles() {
  334. return "transform:" + this.transform + ";opacity:" + this.opacity + ";" + this.stylesObject;
  335. }
  336. },
  337. created() {
  338. this.config = {
  339. duration: this.duration,
  340. timingFunction: "ease",
  341. transformOrigin: "50% 50%",
  342. delay: 0
  343. };
  344. this.durationTime = this.duration;
  345. },
  346. methods: {
  347. /**
  348. * ref 触发 初始化动画
  349. */
  350. init(obj = {}) {
  351. if (obj.duration) {
  352. this.durationTime = obj.duration;
  353. }
  354. this.animation = createAnimation(Object.assign(this.config, obj), this);
  355. },
  356. /**
  357. * 点击组件触发回调
  358. */
  359. onClick() {
  360. this.$emit("click", {
  361. detail: this.isShow
  362. });
  363. },
  364. /**
  365. * ref 触发 动画分组
  366. * @param {Object} obj
  367. */
  368. step(obj, config = {}) {
  369. if (!this.animation)
  370. return;
  371. for (let i2 in obj) {
  372. try {
  373. if (typeof obj[i2] === "object") {
  374. this.animation[i2](...obj[i2]);
  375. } else {
  376. this.animation[i2](obj[i2]);
  377. }
  378. } catch (e2) {
  379. formatAppLog("error", "at uni_modules/uni-transition/components/uni-transition/uni-transition.vue:148", `方法 ${i2} 不存在`);
  380. }
  381. }
  382. this.animation.step(config);
  383. return this;
  384. },
  385. /**
  386. * ref 触发 执行动画
  387. */
  388. run(fn) {
  389. if (!this.animation)
  390. return;
  391. this.animation.run(fn);
  392. },
  393. // 开始过度动画
  394. open() {
  395. clearTimeout(this.timer);
  396. this.transform = "";
  397. this.isShow = true;
  398. let { opacity, transform } = this.styleInit(false);
  399. if (typeof opacity !== "undefined") {
  400. this.opacity = opacity;
  401. }
  402. this.transform = transform;
  403. this.$nextTick(() => {
  404. this.timer = setTimeout(() => {
  405. this.animation = createAnimation(this.config, this);
  406. this.tranfromInit(false).step();
  407. this.animation.run();
  408. this.$emit("change", {
  409. detail: this.isShow
  410. });
  411. }, 20);
  412. });
  413. },
  414. // 关闭过度动画
  415. close(type) {
  416. if (!this.animation)
  417. return;
  418. this.tranfromInit(true).step().run(() => {
  419. this.isShow = false;
  420. this.animationData = null;
  421. this.animation = null;
  422. let { opacity, transform } = this.styleInit(false);
  423. this.opacity = opacity || 1;
  424. this.transform = transform;
  425. this.$emit("change", {
  426. detail: this.isShow
  427. });
  428. });
  429. },
  430. // 处理动画开始前的默认样式
  431. styleInit(type) {
  432. let styles = {
  433. transform: ""
  434. };
  435. let buildStyle = (type2, mode) => {
  436. if (mode === "fade") {
  437. styles.opacity = this.animationType(type2)[mode];
  438. } else {
  439. styles.transform += this.animationType(type2)[mode] + " ";
  440. }
  441. };
  442. if (typeof this.modeClass === "string") {
  443. buildStyle(type, this.modeClass);
  444. } else {
  445. this.modeClass.forEach((mode) => {
  446. buildStyle(type, mode);
  447. });
  448. }
  449. return styles;
  450. },
  451. // 处理内置组合动画
  452. tranfromInit(type) {
  453. let buildTranfrom = (type2, mode) => {
  454. let aniNum = null;
  455. if (mode === "fade") {
  456. aniNum = type2 ? 0 : 1;
  457. } else {
  458. aniNum = type2 ? "-100%" : "0";
  459. if (mode === "zoom-in") {
  460. aniNum = type2 ? 0.8 : 1;
  461. }
  462. if (mode === "zoom-out") {
  463. aniNum = type2 ? 1.2 : 1;
  464. }
  465. if (mode === "slide-right") {
  466. aniNum = type2 ? "100%" : "0";
  467. }
  468. if (mode === "slide-bottom") {
  469. aniNum = type2 ? "100%" : "0";
  470. }
  471. }
  472. this.animation[this.animationMode()[mode]](aniNum);
  473. };
  474. if (typeof this.modeClass === "string") {
  475. buildTranfrom(type, this.modeClass);
  476. } else {
  477. this.modeClass.forEach((mode) => {
  478. buildTranfrom(type, mode);
  479. });
  480. }
  481. return this.animation;
  482. },
  483. animationType(type) {
  484. return {
  485. fade: type ? 0 : 1,
  486. "slide-top": `translateY(${type ? "0" : "-100%"})`,
  487. "slide-right": `translateX(${type ? "0" : "100%"})`,
  488. "slide-bottom": `translateY(${type ? "0" : "100%"})`,
  489. "slide-left": `translateX(${type ? "0" : "-100%"})`,
  490. "zoom-in": `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
  491. "zoom-out": `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
  492. };
  493. },
  494. // 内置动画类型与实际动画对应字典
  495. animationMode() {
  496. return {
  497. fade: "opacity",
  498. "slide-top": "translateY",
  499. "slide-right": "translateX",
  500. "slide-bottom": "translateY",
  501. "slide-left": "translateX",
  502. "zoom-in": "scale",
  503. "zoom-out": "scale"
  504. };
  505. },
  506. // 驼峰转中横线
  507. toLine(name) {
  508. return name.replace(/([A-Z])/g, "-$1").toLowerCase();
  509. }
  510. }
  511. };
  512. function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  513. return vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
  514. ref: "ani",
  515. animation: $data.animationData,
  516. class: vue.normalizeClass($props.customClass),
  517. style: vue.normalizeStyle($options.transformStyles),
  518. onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args))
  519. }, [
  520. vue.renderSlot(_ctx.$slots, "default")
  521. ], 14, ["animation"])), [
  522. [vue.vShow, $data.isShow]
  523. ]);
  524. }
  525. const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
  526. const _sfc_main$f = {
  527. name: "uniPopup",
  528. components: {},
  529. emits: ["change", "maskClick"],
  530. props: {
  531. // 开启动画
  532. animation: {
  533. type: Boolean,
  534. default: true
  535. },
  536. // 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
  537. // message: 消息提示 ; dialog : 对话框
  538. type: {
  539. type: String,
  540. default: "center"
  541. },
  542. // maskClick
  543. isMaskClick: {
  544. type: Boolean,
  545. default: null
  546. },
  547. // TODO 2 个版本后废弃属性 ,使用 isMaskClick
  548. maskClick: {
  549. type: Boolean,
  550. default: null
  551. },
  552. backgroundColor: {
  553. type: String,
  554. default: "none"
  555. },
  556. safeArea: {
  557. type: Boolean,
  558. default: true
  559. },
  560. maskBackgroundColor: {
  561. type: String,
  562. default: "rgba(0, 0, 0, 0.4)"
  563. },
  564. borderRadius: {
  565. type: String
  566. }
  567. },
  568. watch: {
  569. /**
  570. * 监听type类型
  571. */
  572. type: {
  573. handler: function(type) {
  574. if (!this.config[type])
  575. return;
  576. this[this.config[type]](true);
  577. },
  578. immediate: true
  579. },
  580. isDesktop: {
  581. handler: function(newVal) {
  582. if (!this.config[newVal])
  583. return;
  584. this[this.config[this.type]](true);
  585. },
  586. immediate: true
  587. },
  588. /**
  589. * 监听遮罩是否可点击
  590. * @param {Object} val
  591. */
  592. maskClick: {
  593. handler: function(val) {
  594. this.mkclick = val;
  595. },
  596. immediate: true
  597. },
  598. isMaskClick: {
  599. handler: function(val) {
  600. this.mkclick = val;
  601. },
  602. immediate: true
  603. },
  604. // H5 下禁止底部滚动
  605. showPopup(show) {
  606. }
  607. },
  608. data() {
  609. return {
  610. duration: 300,
  611. ani: [],
  612. showPopup: false,
  613. showTrans: false,
  614. popupWidth: 0,
  615. popupHeight: 0,
  616. config: {
  617. top: "top",
  618. bottom: "bottom",
  619. center: "center",
  620. left: "left",
  621. right: "right",
  622. message: "top",
  623. dialog: "center",
  624. share: "bottom"
  625. },
  626. maskClass: {
  627. position: "fixed",
  628. bottom: 0,
  629. top: 0,
  630. left: 0,
  631. right: 0,
  632. backgroundColor: "rgba(0, 0, 0, 0.4)"
  633. },
  634. transClass: {
  635. backgroundColor: "transparent",
  636. borderRadius: this.borderRadius || "0",
  637. position: "fixed",
  638. left: 0,
  639. right: 0
  640. },
  641. maskShow: true,
  642. mkclick: true,
  643. popupstyle: "top"
  644. };
  645. },
  646. computed: {
  647. getStyles() {
  648. let res = { backgroundColor: this.bg };
  649. if (this.borderRadius || "0") {
  650. res = Object.assign(res, { borderRadius: this.borderRadius });
  651. }
  652. return res;
  653. },
  654. isDesktop() {
  655. return this.popupWidth >= 500 && this.popupHeight >= 500;
  656. },
  657. bg() {
  658. if (this.backgroundColor === "" || this.backgroundColor === "none") {
  659. return "transparent";
  660. }
  661. return this.backgroundColor;
  662. }
  663. },
  664. mounted() {
  665. const fixSize = () => {
  666. const {
  667. windowWidth,
  668. windowHeight,
  669. windowTop,
  670. safeArea,
  671. screenHeight,
  672. safeAreaInsets
  673. } = uni.getSystemInfoSync();
  674. this.popupWidth = windowWidth;
  675. this.popupHeight = windowHeight + (windowTop || 0);
  676. if (safeArea && this.safeArea) {
  677. this.safeAreaInsets = safeAreaInsets.bottom;
  678. } else {
  679. this.safeAreaInsets = 0;
  680. }
  681. };
  682. fixSize();
  683. },
  684. // TODO vue3
  685. unmounted() {
  686. this.setH5Visible();
  687. },
  688. activated() {
  689. this.setH5Visible(!this.showPopup);
  690. },
  691. deactivated() {
  692. this.setH5Visible(true);
  693. },
  694. created() {
  695. if (this.isMaskClick === null && this.maskClick === null) {
  696. this.mkclick = true;
  697. } else {
  698. this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick;
  699. }
  700. if (this.animation) {
  701. this.duration = 300;
  702. } else {
  703. this.duration = 0;
  704. }
  705. this.messageChild = null;
  706. this.clearPropagation = false;
  707. this.maskClass.backgroundColor = this.maskBackgroundColor;
  708. },
  709. methods: {
  710. setH5Visible(visible = true) {
  711. },
  712. /**
  713. * 公用方法,不显示遮罩层
  714. */
  715. closeMask() {
  716. this.maskShow = false;
  717. },
  718. /**
  719. * 公用方法,遮罩层禁止点击
  720. */
  721. disableMask() {
  722. this.mkclick = false;
  723. },
  724. // TODO nvue 取消冒泡
  725. clear(e2) {
  726. e2.stopPropagation();
  727. this.clearPropagation = true;
  728. },
  729. open(direction) {
  730. if (this.showPopup) {
  731. return;
  732. }
  733. let innerType = ["top", "center", "bottom", "left", "right", "message", "dialog", "share"];
  734. if (!(direction && innerType.indexOf(direction) !== -1)) {
  735. direction = this.type;
  736. }
  737. if (!this.config[direction]) {
  738. formatAppLog("error", "at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:298", "缺少类型:", direction);
  739. return;
  740. }
  741. this[this.config[direction]]();
  742. this.$emit("change", {
  743. show: true,
  744. type: direction
  745. });
  746. },
  747. close(type) {
  748. this.showTrans = false;
  749. this.$emit("change", {
  750. show: false,
  751. type: this.type
  752. });
  753. clearTimeout(this.timer);
  754. this.timer = setTimeout(() => {
  755. this.showPopup = false;
  756. }, 300);
  757. },
  758. // TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
  759. touchstart() {
  760. this.clearPropagation = false;
  761. },
  762. onTap() {
  763. if (this.clearPropagation) {
  764. this.clearPropagation = false;
  765. return;
  766. }
  767. this.$emit("maskClick");
  768. if (!this.mkclick)
  769. return;
  770. this.close();
  771. },
  772. /**
  773. * 顶部弹出样式处理
  774. */
  775. top(type) {
  776. this.popupstyle = this.isDesktop ? "fixforpc-top" : "top";
  777. this.ani = ["slide-top"];
  778. this.transClass = {
  779. position: "fixed",
  780. left: 0,
  781. right: 0,
  782. backgroundColor: this.bg,
  783. borderRadius: this.borderRadius || "0"
  784. };
  785. if (type)
  786. return;
  787. this.showPopup = true;
  788. this.showTrans = true;
  789. this.$nextTick(() => {
  790. if (this.messageChild && this.type === "message") {
  791. this.messageChild.timerClose();
  792. }
  793. });
  794. },
  795. /**
  796. * 底部弹出样式处理
  797. */
  798. bottom(type) {
  799. this.popupstyle = "bottom";
  800. this.ani = ["slide-bottom"];
  801. this.transClass = {
  802. position: "fixed",
  803. left: 0,
  804. right: 0,
  805. bottom: 0,
  806. paddingBottom: this.safeAreaInsets + "px",
  807. backgroundColor: this.bg,
  808. borderRadius: this.borderRadius || "0"
  809. };
  810. if (type)
  811. return;
  812. this.showPopup = true;
  813. this.showTrans = true;
  814. },
  815. /**
  816. * 中间弹出样式处理
  817. */
  818. center(type) {
  819. this.popupstyle = "center";
  820. this.ani = ["zoom-out", "fade"];
  821. this.transClass = {
  822. position: "fixed",
  823. display: "flex",
  824. flexDirection: "column",
  825. bottom: 0,
  826. left: 0,
  827. right: 0,
  828. top: 0,
  829. justifyContent: "center",
  830. alignItems: "center",
  831. borderRadius: this.borderRadius || "0"
  832. };
  833. if (type)
  834. return;
  835. this.showPopup = true;
  836. this.showTrans = true;
  837. },
  838. left(type) {
  839. this.popupstyle = "left";
  840. this.ani = ["slide-left"];
  841. this.transClass = {
  842. position: "fixed",
  843. left: 0,
  844. bottom: 0,
  845. top: 0,
  846. backgroundColor: this.bg,
  847. borderRadius: this.borderRadius || "0",
  848. display: "flex",
  849. flexDirection: "column"
  850. };
  851. if (type)
  852. return;
  853. this.showPopup = true;
  854. this.showTrans = true;
  855. },
  856. right(type) {
  857. this.popupstyle = "right";
  858. this.ani = ["slide-right"];
  859. this.transClass = {
  860. position: "fixed",
  861. bottom: 0,
  862. right: 0,
  863. top: 0,
  864. backgroundColor: this.bg,
  865. borderRadius: this.borderRadius || "0",
  866. display: "flex",
  867. flexDirection: "column"
  868. };
  869. if (type)
  870. return;
  871. this.showPopup = true;
  872. this.showTrans = true;
  873. }
  874. }
  875. };
  876. function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  877. const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$3);
  878. return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
  879. "view",
  880. {
  881. key: 0,
  882. class: vue.normalizeClass(["uni-popup", [$data.popupstyle, $options.isDesktop ? "fixforpc-z-index" : ""]])
  883. },
  884. [
  885. vue.createElementVNode(
  886. "view",
  887. {
  888. onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.touchstart && $options.touchstart(...args))
  889. },
  890. [
  891. $data.maskShow ? (vue.openBlock(), vue.createBlock(_component_uni_transition, {
  892. key: "1",
  893. name: "mask",
  894. "mode-class": "fade",
  895. styles: $data.maskClass,
  896. duration: $data.duration,
  897. show: $data.showTrans,
  898. onClick: $options.onTap
  899. }, null, 8, ["styles", "duration", "show", "onClick"])) : vue.createCommentVNode("v-if", true),
  900. vue.createVNode(_component_uni_transition, {
  901. key: "2",
  902. "mode-class": $data.ani,
  903. name: "content",
  904. styles: $data.transClass,
  905. duration: $data.duration,
  906. show: $data.showTrans,
  907. onClick: $options.onTap
  908. }, {
  909. default: vue.withCtx(() => [
  910. vue.createElementVNode(
  911. "view",
  912. {
  913. class: vue.normalizeClass(["uni-popup__wrapper", [$data.popupstyle]]),
  914. style: vue.normalizeStyle($options.getStyles),
  915. onClick: _cache[0] || (_cache[0] = (...args) => $options.clear && $options.clear(...args))
  916. },
  917. [
  918. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  919. ],
  920. 6
  921. /* CLASS, STYLE */
  922. )
  923. ]),
  924. _: 3
  925. /* FORWARDED */
  926. }, 8, ["mode-class", "styles", "duration", "show", "onClick"])
  927. ],
  928. 32
  929. /* NEED_HYDRATION */
  930. )
  931. ],
  932. 2
  933. /* CLASS */
  934. )) : vue.createCommentVNode("v-if", true);
  935. }
  936. const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-4dd3c44b"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
  937. const pages = [
  938. {
  939. path: "pages/index/index",
  940. style: {
  941. navigationBarTitleText: ""
  942. }
  943. },
  944. {
  945. path: "pages/home/index",
  946. style: {
  947. navigationBarTitleText: ""
  948. }
  949. },
  950. {
  951. path: "pages/details/index",
  952. style: {
  953. navigationBarTitleText: ""
  954. }
  955. },
  956. {
  957. path: "pages/electricity/index",
  958. style: {
  959. navigationBarTitleText: ""
  960. }
  961. },
  962. {
  963. path: "pages/supply/supply",
  964. style: {
  965. navigationBarTitleText: ""
  966. }
  967. },
  968. {
  969. path: "pages/supplyss/supplyss",
  970. style: {
  971. navigationBarTitleText: ""
  972. }
  973. },
  974. {
  975. path: "pages/faultlist/index",
  976. style: {
  977. navigationBarTitleText: ""
  978. }
  979. },
  980. {
  981. path: "pages/SYSifo/index",
  982. style: {
  983. navigationBarTitleText: ""
  984. }
  985. }
  986. ];
  987. const globalStyle = {
  988. navigationBarTextStyle: "black",
  989. navigationBarTitleText: "",
  990. navigationStyle: "custom",
  991. navigationBarBackgroundColor: "#F8F8F8",
  992. backgroundColor: "#F8F8F8"
  993. };
  994. const uniIdRouter = {};
  995. const e = {
  996. pages,
  997. globalStyle,
  998. uniIdRouter
  999. };
  1000. var define_process_env_UNI_SECURE_NETWORK_CONFIG_default = [];
  1001. function t$2(e2) {
  1002. return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
  1003. }
  1004. function n(e2, t2, n2) {
  1005. return e2(n2 = { path: t2, exports: {}, require: function(e3, t3) {
  1006. return function() {
  1007. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  1008. }(null == t3 && n2.path);
  1009. } }, n2.exports), n2.exports;
  1010. }
  1011. var s = n(function(e2, t2) {
  1012. var n2;
  1013. e2.exports = (n2 = n2 || function(e3, t3) {
  1014. var n3 = Object.create || /* @__PURE__ */ function() {
  1015. function e4() {
  1016. }
  1017. return function(t4) {
  1018. var n4;
  1019. return e4.prototype = t4, n4 = new e4(), e4.prototype = null, n4;
  1020. };
  1021. }(), s2 = {}, r2 = s2.lib = {}, i2 = r2.Base = { extend: function(e4) {
  1022. var t4 = n3(this);
  1023. return e4 && t4.mixIn(e4), t4.hasOwnProperty("init") && this.init !== t4.init || (t4.init = function() {
  1024. t4.$super.init.apply(this, arguments);
  1025. }), t4.init.prototype = t4, t4.$super = this, t4;
  1026. }, create: function() {
  1027. var e4 = this.extend();
  1028. return e4.init.apply(e4, arguments), e4;
  1029. }, init: function() {
  1030. }, mixIn: function(e4) {
  1031. for (var t4 in e4)
  1032. e4.hasOwnProperty(t4) && (this[t4] = e4[t4]);
  1033. e4.hasOwnProperty("toString") && (this.toString = e4.toString);
  1034. }, clone: function() {
  1035. return this.init.prototype.extend(this);
  1036. } }, o2 = r2.WordArray = i2.extend({ init: function(e4, n4) {
  1037. e4 = this.words = e4 || [], this.sigBytes = n4 != t3 ? n4 : 4 * e4.length;
  1038. }, toString: function(e4) {
  1039. return (e4 || c2).stringify(this);
  1040. }, concat: function(e4) {
  1041. var t4 = this.words, n4 = e4.words, s3 = this.sigBytes, r3 = e4.sigBytes;
  1042. if (this.clamp(), s3 % 4)
  1043. for (var i3 = 0; i3 < r3; i3++) {
  1044. var o3 = n4[i3 >>> 2] >>> 24 - i3 % 4 * 8 & 255;
  1045. t4[s3 + i3 >>> 2] |= o3 << 24 - (s3 + i3) % 4 * 8;
  1046. }
  1047. else
  1048. for (i3 = 0; i3 < r3; i3 += 4)
  1049. t4[s3 + i3 >>> 2] = n4[i3 >>> 2];
  1050. return this.sigBytes += r3, this;
  1051. }, clamp: function() {
  1052. var t4 = this.words, n4 = this.sigBytes;
  1053. t4[n4 >>> 2] &= 4294967295 << 32 - n4 % 4 * 8, t4.length = e3.ceil(n4 / 4);
  1054. }, clone: function() {
  1055. var e4 = i2.clone.call(this);
  1056. return e4.words = this.words.slice(0), e4;
  1057. }, random: function(t4) {
  1058. for (var n4, s3 = [], r3 = function(t5) {
  1059. t5 = t5;
  1060. var n5 = 987654321, s4 = 4294967295;
  1061. return function() {
  1062. var r4 = ((n5 = 36969 * (65535 & n5) + (n5 >> 16) & s4) << 16) + (t5 = 18e3 * (65535 & t5) + (t5 >> 16) & s4) & s4;
  1063. return r4 /= 4294967296, (r4 += 0.5) * (e3.random() > 0.5 ? 1 : -1);
  1064. };
  1065. }, i3 = 0; i3 < t4; i3 += 4) {
  1066. var a3 = r3(4294967296 * (n4 || e3.random()));
  1067. n4 = 987654071 * a3(), s3.push(4294967296 * a3() | 0);
  1068. }
  1069. return new o2.init(s3, t4);
  1070. } }), a2 = s2.enc = {}, c2 = a2.Hex = { stringify: function(e4) {
  1071. for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) {
  1072. var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255;
  1073. s3.push((i3 >>> 4).toString(16)), s3.push((15 & i3).toString(16));
  1074. }
  1075. return s3.join("");
  1076. }, parse: function(e4) {
  1077. for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3 += 2)
  1078. n4[s3 >>> 3] |= parseInt(e4.substr(s3, 2), 16) << 24 - s3 % 8 * 4;
  1079. return new o2.init(n4, t4 / 2);
  1080. } }, u2 = a2.Latin1 = { stringify: function(e4) {
  1081. for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) {
  1082. var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255;
  1083. s3.push(String.fromCharCode(i3));
  1084. }
  1085. return s3.join("");
  1086. }, parse: function(e4) {
  1087. for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3++)
  1088. n4[s3 >>> 2] |= (255 & e4.charCodeAt(s3)) << 24 - s3 % 4 * 8;
  1089. return new o2.init(n4, t4);
  1090. } }, h2 = a2.Utf8 = { stringify: function(e4) {
  1091. try {
  1092. return decodeURIComponent(escape(u2.stringify(e4)));
  1093. } catch (e5) {
  1094. throw new Error("Malformed UTF-8 data");
  1095. }
  1096. }, parse: function(e4) {
  1097. return u2.parse(unescape(encodeURIComponent(e4)));
  1098. } }, l2 = r2.BufferedBlockAlgorithm = i2.extend({ reset: function() {
  1099. this._data = new o2.init(), this._nDataBytes = 0;
  1100. }, _append: function(e4) {
  1101. "string" == typeof e4 && (e4 = h2.parse(e4)), this._data.concat(e4), this._nDataBytes += e4.sigBytes;
  1102. }, _process: function(t4) {
  1103. var n4 = this._data, s3 = n4.words, r3 = n4.sigBytes, i3 = this.blockSize, a3 = r3 / (4 * i3), c3 = (a3 = t4 ? e3.ceil(a3) : e3.max((0 | a3) - this._minBufferSize, 0)) * i3, u3 = e3.min(4 * c3, r3);
  1104. if (c3) {
  1105. for (var h3 = 0; h3 < c3; h3 += i3)
  1106. this._doProcessBlock(s3, h3);
  1107. var l3 = s3.splice(0, c3);
  1108. n4.sigBytes -= u3;
  1109. }
  1110. return new o2.init(l3, u3);
  1111. }, clone: function() {
  1112. var e4 = i2.clone.call(this);
  1113. return e4._data = this._data.clone(), e4;
  1114. }, _minBufferSize: 0 });
  1115. r2.Hasher = l2.extend({ cfg: i2.extend(), init: function(e4) {
  1116. this.cfg = this.cfg.extend(e4), this.reset();
  1117. }, reset: function() {
  1118. l2.reset.call(this), this._doReset();
  1119. }, update: function(e4) {
  1120. return this._append(e4), this._process(), this;
  1121. }, finalize: function(e4) {
  1122. return e4 && this._append(e4), this._doFinalize();
  1123. }, blockSize: 16, _createHelper: function(e4) {
  1124. return function(t4, n4) {
  1125. return new e4.init(n4).finalize(t4);
  1126. };
  1127. }, _createHmacHelper: function(e4) {
  1128. return function(t4, n4) {
  1129. return new d2.HMAC.init(e4, n4).finalize(t4);
  1130. };
  1131. } });
  1132. var d2 = s2.algo = {};
  1133. return s2;
  1134. }(Math), n2);
  1135. }), r = s, i = (n(function(e2, t2) {
  1136. var n2;
  1137. e2.exports = (n2 = r, function(e3) {
  1138. var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [];
  1139. !function() {
  1140. for (var t4 = 0; t4 < 64; t4++)
  1141. a2[t4] = 4294967296 * e3.abs(e3.sin(t4 + 1)) | 0;
  1142. }();
  1143. var c2 = o2.MD5 = i2.extend({ _doReset: function() {
  1144. this._hash = new r2.init([1732584193, 4023233417, 2562383102, 271733878]);
  1145. }, _doProcessBlock: function(e4, t4) {
  1146. for (var n3 = 0; n3 < 16; n3++) {
  1147. var s3 = t4 + n3, r3 = e4[s3];
  1148. e4[s3] = 16711935 & (r3 << 8 | r3 >>> 24) | 4278255360 & (r3 << 24 | r3 >>> 8);
  1149. }
  1150. var i3 = this._hash.words, o3 = e4[t4 + 0], c3 = e4[t4 + 1], p2 = e4[t4 + 2], f2 = e4[t4 + 3], g2 = e4[t4 + 4], m2 = e4[t4 + 5], y2 = e4[t4 + 6], _2 = e4[t4 + 7], w2 = e4[t4 + 8], v2 = e4[t4 + 9], I2 = e4[t4 + 10], S2 = e4[t4 + 11], b2 = e4[t4 + 12], k2 = e4[t4 + 13], A2 = e4[t4 + 14], C2 = e4[t4 + 15], P2 = i3[0], T2 = i3[1], x2 = i3[2], O2 = i3[3];
  1151. P2 = u2(P2, T2, x2, O2, o3, 7, a2[0]), O2 = u2(O2, P2, T2, x2, c3, 12, a2[1]), x2 = u2(x2, O2, P2, T2, p2, 17, a2[2]), T2 = u2(T2, x2, O2, P2, f2, 22, a2[3]), P2 = u2(P2, T2, x2, O2, g2, 7, a2[4]), O2 = u2(O2, P2, T2, x2, m2, 12, a2[5]), x2 = u2(x2, O2, P2, T2, y2, 17, a2[6]), T2 = u2(T2, x2, O2, P2, _2, 22, a2[7]), P2 = u2(P2, T2, x2, O2, w2, 7, a2[8]), O2 = u2(O2, P2, T2, x2, v2, 12, a2[9]), x2 = u2(x2, O2, P2, T2, I2, 17, a2[10]), T2 = u2(T2, x2, O2, P2, S2, 22, a2[11]), P2 = u2(P2, T2, x2, O2, b2, 7, a2[12]), O2 = u2(O2, P2, T2, x2, k2, 12, a2[13]), x2 = u2(x2, O2, P2, T2, A2, 17, a2[14]), P2 = h2(P2, T2 = u2(T2, x2, O2, P2, C2, 22, a2[15]), x2, O2, c3, 5, a2[16]), O2 = h2(O2, P2, T2, x2, y2, 9, a2[17]), x2 = h2(x2, O2, P2, T2, S2, 14, a2[18]), T2 = h2(T2, x2, O2, P2, o3, 20, a2[19]), P2 = h2(P2, T2, x2, O2, m2, 5, a2[20]), O2 = h2(O2, P2, T2, x2, I2, 9, a2[21]), x2 = h2(x2, O2, P2, T2, C2, 14, a2[22]), T2 = h2(T2, x2, O2, P2, g2, 20, a2[23]), P2 = h2(P2, T2, x2, O2, v2, 5, a2[24]), O2 = h2(O2, P2, T2, x2, A2, 9, a2[25]), x2 = h2(x2, O2, P2, T2, f2, 14, a2[26]), T2 = h2(T2, x2, O2, P2, w2, 20, a2[27]), P2 = h2(P2, T2, x2, O2, k2, 5, a2[28]), O2 = h2(O2, P2, T2, x2, p2, 9, a2[29]), x2 = h2(x2, O2, P2, T2, _2, 14, a2[30]), P2 = l2(P2, T2 = h2(T2, x2, O2, P2, b2, 20, a2[31]), x2, O2, m2, 4, a2[32]), O2 = l2(O2, P2, T2, x2, w2, 11, a2[33]), x2 = l2(x2, O2, P2, T2, S2, 16, a2[34]), T2 = l2(T2, x2, O2, P2, A2, 23, a2[35]), P2 = l2(P2, T2, x2, O2, c3, 4, a2[36]), O2 = l2(O2, P2, T2, x2, g2, 11, a2[37]), x2 = l2(x2, O2, P2, T2, _2, 16, a2[38]), T2 = l2(T2, x2, O2, P2, I2, 23, a2[39]), P2 = l2(P2, T2, x2, O2, k2, 4, a2[40]), O2 = l2(O2, P2, T2, x2, o3, 11, a2[41]), x2 = l2(x2, O2, P2, T2, f2, 16, a2[42]), T2 = l2(T2, x2, O2, P2, y2, 23, a2[43]), P2 = l2(P2, T2, x2, O2, v2, 4, a2[44]), O2 = l2(O2, P2, T2, x2, b2, 11, a2[45]), x2 = l2(x2, O2, P2, T2, C2, 16, a2[46]), P2 = d2(P2, T2 = l2(T2, x2, O2, P2, p2, 23, a2[47]), x2, O2, o3, 6, a2[48]), O2 = d2(O2, P2, T2, x2, _2, 10, a2[49]), x2 = d2(x2, O2, P2, T2, A2, 15, a2[50]), T2 = d2(T2, x2, O2, P2, m2, 21, a2[51]), P2 = d2(P2, T2, x2, O2, b2, 6, a2[52]), O2 = d2(O2, P2, T2, x2, f2, 10, a2[53]), x2 = d2(x2, O2, P2, T2, I2, 15, a2[54]), T2 = d2(T2, x2, O2, P2, c3, 21, a2[55]), P2 = d2(P2, T2, x2, O2, w2, 6, a2[56]), O2 = d2(O2, P2, T2, x2, C2, 10, a2[57]), x2 = d2(x2, O2, P2, T2, y2, 15, a2[58]), T2 = d2(T2, x2, O2, P2, k2, 21, a2[59]), P2 = d2(P2, T2, x2, O2, g2, 6, a2[60]), O2 = d2(O2, P2, T2, x2, S2, 10, a2[61]), x2 = d2(x2, O2, P2, T2, p2, 15, a2[62]), T2 = d2(T2, x2, O2, P2, v2, 21, a2[63]), i3[0] = i3[0] + P2 | 0, i3[1] = i3[1] + T2 | 0, i3[2] = i3[2] + x2 | 0, i3[3] = i3[3] + O2 | 0;
  1152. }, _doFinalize: function() {
  1153. var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes;
  1154. n3[r3 >>> 5] |= 128 << 24 - r3 % 32;
  1155. var i3 = e3.floor(s3 / 4294967296), o3 = s3;
  1156. n3[15 + (r3 + 64 >>> 9 << 4)] = 16711935 & (i3 << 8 | i3 >>> 24) | 4278255360 & (i3 << 24 | i3 >>> 8), n3[14 + (r3 + 64 >>> 9 << 4)] = 16711935 & (o3 << 8 | o3 >>> 24) | 4278255360 & (o3 << 24 | o3 >>> 8), t4.sigBytes = 4 * (n3.length + 1), this._process();
  1157. for (var a3 = this._hash, c3 = a3.words, u3 = 0; u3 < 4; u3++) {
  1158. var h3 = c3[u3];
  1159. c3[u3] = 16711935 & (h3 << 8 | h3 >>> 24) | 4278255360 & (h3 << 24 | h3 >>> 8);
  1160. }
  1161. return a3;
  1162. }, clone: function() {
  1163. var e4 = i2.clone.call(this);
  1164. return e4._hash = this._hash.clone(), e4;
  1165. } });
  1166. function u2(e4, t4, n3, s3, r3, i3, o3) {
  1167. var a3 = e4 + (t4 & n3 | ~t4 & s3) + r3 + o3;
  1168. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  1169. }
  1170. function h2(e4, t4, n3, s3, r3, i3, o3) {
  1171. var a3 = e4 + (t4 & s3 | n3 & ~s3) + r3 + o3;
  1172. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  1173. }
  1174. function l2(e4, t4, n3, s3, r3, i3, o3) {
  1175. var a3 = e4 + (t4 ^ n3 ^ s3) + r3 + o3;
  1176. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  1177. }
  1178. function d2(e4, t4, n3, s3, r3, i3, o3) {
  1179. var a3 = e4 + (n3 ^ (t4 | ~s3)) + r3 + o3;
  1180. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  1181. }
  1182. t3.MD5 = i2._createHelper(c2), t3.HmacMD5 = i2._createHmacHelper(c2);
  1183. }(Math), n2.MD5);
  1184. }), n(function(e2, t2) {
  1185. var n2;
  1186. e2.exports = (n2 = r, void function() {
  1187. var e3 = n2, t3 = e3.lib.Base, s2 = e3.enc.Utf8;
  1188. e3.algo.HMAC = t3.extend({ init: function(e4, t4) {
  1189. e4 = this._hasher = new e4.init(), "string" == typeof t4 && (t4 = s2.parse(t4));
  1190. var n3 = e4.blockSize, r2 = 4 * n3;
  1191. t4.sigBytes > r2 && (t4 = e4.finalize(t4)), t4.clamp();
  1192. for (var i2 = this._oKey = t4.clone(), o2 = this._iKey = t4.clone(), a2 = i2.words, c2 = o2.words, u2 = 0; u2 < n3; u2++)
  1193. a2[u2] ^= 1549556828, c2[u2] ^= 909522486;
  1194. i2.sigBytes = o2.sigBytes = r2, this.reset();
  1195. }, reset: function() {
  1196. var e4 = this._hasher;
  1197. e4.reset(), e4.update(this._iKey);
  1198. }, update: function(e4) {
  1199. return this._hasher.update(e4), this;
  1200. }, finalize: function(e4) {
  1201. var t4 = this._hasher, n3 = t4.finalize(e4);
  1202. return t4.reset(), t4.finalize(this._oKey.clone().concat(n3));
  1203. } });
  1204. }());
  1205. }), n(function(e2, t2) {
  1206. e2.exports = r.HmacMD5;
  1207. })), o = n(function(e2, t2) {
  1208. e2.exports = r.enc.Utf8;
  1209. }), a = n(function(e2, t2) {
  1210. var n2;
  1211. e2.exports = (n2 = r, function() {
  1212. var e3 = n2, t3 = e3.lib.WordArray;
  1213. function s2(e4, n3, s3) {
  1214. for (var r2 = [], i2 = 0, o2 = 0; o2 < n3; o2++)
  1215. if (o2 % 4) {
  1216. var a2 = s3[e4.charCodeAt(o2 - 1)] << o2 % 4 * 2, c2 = s3[e4.charCodeAt(o2)] >>> 6 - o2 % 4 * 2;
  1217. r2[i2 >>> 2] |= (a2 | c2) << 24 - i2 % 4 * 8, i2++;
  1218. }
  1219. return t3.create(r2, i2);
  1220. }
  1221. e3.enc.Base64 = { stringify: function(e4) {
  1222. var t4 = e4.words, n3 = e4.sigBytes, s3 = this._map;
  1223. e4.clamp();
  1224. for (var r2 = [], i2 = 0; i2 < n3; i2 += 3)
  1225. for (var o2 = (t4[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255) << 16 | (t4[i2 + 1 >>> 2] >>> 24 - (i2 + 1) % 4 * 8 & 255) << 8 | t4[i2 + 2 >>> 2] >>> 24 - (i2 + 2) % 4 * 8 & 255, a2 = 0; a2 < 4 && i2 + 0.75 * a2 < n3; a2++)
  1226. r2.push(s3.charAt(o2 >>> 6 * (3 - a2) & 63));
  1227. var c2 = s3.charAt(64);
  1228. if (c2)
  1229. for (; r2.length % 4; )
  1230. r2.push(c2);
  1231. return r2.join("");
  1232. }, parse: function(e4) {
  1233. var t4 = e4.length, n3 = this._map, r2 = this._reverseMap;
  1234. if (!r2) {
  1235. r2 = this._reverseMap = [];
  1236. for (var i2 = 0; i2 < n3.length; i2++)
  1237. r2[n3.charCodeAt(i2)] = i2;
  1238. }
  1239. var o2 = n3.charAt(64);
  1240. if (o2) {
  1241. var a2 = e4.indexOf(o2);
  1242. -1 !== a2 && (t4 = a2);
  1243. }
  1244. return s2(e4, t4, r2);
  1245. }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" };
  1246. }(), n2.enc.Base64);
  1247. });
  1248. const c = "FUNCTION", u = "OBJECT", h = "CLIENT_DB", l = "pending", d = "fulfilled", p = "rejected";
  1249. function f(e2) {
  1250. return Object.prototype.toString.call(e2).slice(8, -1).toLowerCase();
  1251. }
  1252. function g(e2) {
  1253. return "object" === f(e2);
  1254. }
  1255. function m(e2) {
  1256. return "function" == typeof e2;
  1257. }
  1258. function y(e2) {
  1259. return function() {
  1260. try {
  1261. return e2.apply(e2, arguments);
  1262. } catch (e3) {
  1263. console.error(e3);
  1264. }
  1265. };
  1266. }
  1267. const _ = "REJECTED", w = "NOT_PENDING";
  1268. class v {
  1269. constructor({ createPromise: e2, retryRule: t2 = _ } = {}) {
  1270. this.createPromise = e2, this.status = null, this.promise = null, this.retryRule = t2;
  1271. }
  1272. get needRetry() {
  1273. if (!this.status)
  1274. return true;
  1275. switch (this.retryRule) {
  1276. case _:
  1277. return this.status === p;
  1278. case w:
  1279. return this.status !== l;
  1280. }
  1281. }
  1282. exec() {
  1283. return this.needRetry ? (this.status = l, this.promise = this.createPromise().then((e2) => (this.status = d, Promise.resolve(e2)), (e2) => (this.status = p, Promise.reject(e2))), this.promise) : this.promise;
  1284. }
  1285. }
  1286. function I(e2) {
  1287. return e2 && "string" == typeof e2 ? JSON.parse(e2) : e2;
  1288. }
  1289. const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), C = b, P = I(""), T = I("[]") || [];
  1290. let O = "";
  1291. try {
  1292. O = "__UNI__8782431";
  1293. } catch (e2) {
  1294. }
  1295. let E = {};
  1296. function L(e2, t2 = {}) {
  1297. var n2, s2;
  1298. return n2 = E, s2 = e2, Object.prototype.hasOwnProperty.call(n2, s2) || (E[e2] = t2), E[e2];
  1299. }
  1300. E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {};
  1301. const R = ["invoke", "success", "fail", "complete"], U = L("_globalUniCloudInterceptor");
  1302. function N(e2, t2) {
  1303. U[e2] || (U[e2] = {}), g(t2) && Object.keys(t2).forEach((n2) => {
  1304. R.indexOf(n2) > -1 && function(e3, t3, n3) {
  1305. let s2 = U[e3][t3];
  1306. s2 || (s2 = U[e3][t3] = []), -1 === s2.indexOf(n3) && m(n3) && s2.push(n3);
  1307. }(e2, n2, t2[n2]);
  1308. });
  1309. }
  1310. function D(e2, t2) {
  1311. U[e2] || (U[e2] = {}), g(t2) ? Object.keys(t2).forEach((n2) => {
  1312. R.indexOf(n2) > -1 && function(e3, t3, n3) {
  1313. const s2 = U[e3][t3];
  1314. if (!s2)
  1315. return;
  1316. const r2 = s2.indexOf(n3);
  1317. r2 > -1 && s2.splice(r2, 1);
  1318. }(e2, n2, t2[n2]);
  1319. }) : delete U[e2];
  1320. }
  1321. function M(e2, t2) {
  1322. return e2 && 0 !== e2.length ? e2.reduce((e3, n2) => e3.then(() => n2(t2)), Promise.resolve()) : Promise.resolve();
  1323. }
  1324. function q(e2, t2) {
  1325. return U[e2] && U[e2][t2] || [];
  1326. }
  1327. function F(e2) {
  1328. N("callObject", e2);
  1329. }
  1330. const K = L("_globalUniCloudListener"), j = "response", $ = "needLogin", B = "refreshToken", W = "clientdb", H = "cloudfunction", z = "cloudobject";
  1331. function J(e2) {
  1332. return K[e2] || (K[e2] = []), K[e2];
  1333. }
  1334. function V(e2, t2) {
  1335. const n2 = J(e2);
  1336. n2.includes(t2) || n2.push(t2);
  1337. }
  1338. function G(e2, t2) {
  1339. const n2 = J(e2), s2 = n2.indexOf(t2);
  1340. -1 !== s2 && n2.splice(s2, 1);
  1341. }
  1342. function Y(e2, t2) {
  1343. const n2 = J(e2);
  1344. for (let e3 = 0; e3 < n2.length; e3++) {
  1345. (0, n2[e3])(t2);
  1346. }
  1347. }
  1348. let Q, X = false;
  1349. function Z() {
  1350. return Q || (Q = new Promise((e2) => {
  1351. X && e2(), function t2() {
  1352. if ("function" == typeof getCurrentPages) {
  1353. const t3 = getCurrentPages();
  1354. t3 && t3[0] && (X = true, e2());
  1355. }
  1356. X || setTimeout(() => {
  1357. t2();
  1358. }, 30);
  1359. }();
  1360. }), Q);
  1361. }
  1362. function ee(e2) {
  1363. const t2 = {};
  1364. for (const n2 in e2) {
  1365. const s2 = e2[n2];
  1366. m(s2) && (t2[n2] = y(s2));
  1367. }
  1368. return t2;
  1369. }
  1370. class te extends Error {
  1371. constructor(e2) {
  1372. super(e2.message), this.errMsg = e2.message || e2.errMsg || "unknown system error", this.code = this.errCode = e2.code || e2.errCode || "SYSTEM_ERROR", this.errSubject = this.subject = e2.subject || e2.errSubject, this.cause = e2.cause, this.requestId = e2.requestId;
  1373. }
  1374. toJson(e2 = 0) {
  1375. if (!(e2 >= 10))
  1376. return e2++, { errCode: this.errCode, errMsg: this.errMsg, errSubject: this.errSubject, cause: this.cause && this.cause.toJson ? this.cause.toJson(e2) : this.cause };
  1377. }
  1378. }
  1379. var ne = { request: (e2) => uni.request(e2), uploadFile: (e2) => uni.uploadFile(e2), setStorageSync: (e2, t2) => uni.setStorageSync(e2, t2), getStorageSync: (e2) => uni.getStorageSync(e2), removeStorageSync: (e2) => uni.removeStorageSync(e2), clearStorageSync: () => uni.clearStorageSync(), connectSocket: (e2) => uni.connectSocket(e2) };
  1380. function se(e2) {
  1381. return e2 && se(e2.__v_raw) || e2;
  1382. }
  1383. function re() {
  1384. return { token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"), tokenExpired: ne.getStorageSync("uni_id_token_expired") };
  1385. }
  1386. function ie({ token: e2, tokenExpired: t2 } = {}) {
  1387. e2 && ne.setStorageSync("uni_id_token", e2), t2 && ne.setStorageSync("uni_id_token_expired", t2);
  1388. }
  1389. let oe, ae;
  1390. function ce() {
  1391. return oe || (oe = uni.getSystemInfoSync()), oe;
  1392. }
  1393. function ue() {
  1394. let e2, t2;
  1395. try {
  1396. if (uni.getLaunchOptionsSync) {
  1397. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1)
  1398. return;
  1399. const { scene: n2, channel: s2 } = uni.getLaunchOptionsSync();
  1400. e2 = s2, t2 = n2;
  1401. }
  1402. } catch (e3) {
  1403. }
  1404. return { channel: e2, scene: t2 };
  1405. }
  1406. let he = {};
  1407. function le() {
  1408. const e2 = uni.getLocale && uni.getLocale() || "en";
  1409. if (ae)
  1410. return { ...he, ...ae, locale: e2, LOCALE: e2 };
  1411. const t2 = ce(), { deviceId: n2, osName: s2, uniPlatform: r2, appId: i2 } = t2, o2 = ["appId", "appLanguage", "appName", "appVersion", "appVersionCode", "appWgtVersion", "browserName", "browserVersion", "deviceBrand", "deviceId", "deviceModel", "deviceType", "osName", "osVersion", "romName", "romVersion", "ua", "hostName", "hostVersion", "uniPlatform", "uniRuntimeVersion", "uniRuntimeVersionCode", "uniCompilerVersion", "uniCompilerVersionCode"];
  1412. for (const e3 in t2)
  1413. Object.hasOwnProperty.call(t2, e3) && -1 === o2.indexOf(e3) && delete t2[e3];
  1414. return ae = { PLATFORM: r2, OS: s2, APPID: i2, DEVICEID: n2, ...ue(), ...t2 }, { ...he, ...ae, locale: e2, LOCALE: e2 };
  1415. }
  1416. var de = { sign: function(e2, t2) {
  1417. let n2 = "";
  1418. return Object.keys(e2).sort().forEach(function(t3) {
  1419. e2[t3] && (n2 = n2 + "&" + t3 + "=" + e2[t3]);
  1420. }), n2 = n2.slice(1), i(n2, t2).toString();
  1421. }, wrappedRequest: function(e2, t2) {
  1422. return new Promise((n2, s2) => {
  1423. t2(Object.assign(e2, { complete(e3) {
  1424. e3 || (e3 = {});
  1425. const t3 = e3.data && e3.data.header && e3.data.header["x-serverless-request-id"] || e3.header && e3.header["request-id"];
  1426. if (!e3.statusCode || e3.statusCode >= 400) {
  1427. const n3 = e3.data && e3.data.error && e3.data.error.code || "SYS_ERR", r3 = e3.data && e3.data.error && e3.data.error.message || e3.errMsg || "request:fail";
  1428. return s2(new te({ code: n3, message: r3, requestId: t3 }));
  1429. }
  1430. const r2 = e3.data;
  1431. if (r2.error)
  1432. return s2(new te({ code: r2.error.code, message: r2.error.message, requestId: t3 }));
  1433. r2.result = r2.data, r2.requestId = t3, delete r2.data, n2(r2);
  1434. } }));
  1435. });
  1436. }, toBase64: function(e2) {
  1437. return a.stringify(o.parse(e2));
  1438. } };
  1439. var pe = class {
  1440. constructor(e2) {
  1441. ["spaceId", "clientSecret"].forEach((t2) => {
  1442. if (!Object.prototype.hasOwnProperty.call(e2, t2))
  1443. throw new Error(`${t2} required`);
  1444. }), this.config = Object.assign({}, { endpoint: 0 === e2.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com" }, e2), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = ne, this._getAccessTokenPromiseHub = new v({ createPromise: () => this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then((e3) => {
  1445. if (!e3.result || !e3.result.accessToken)
  1446. throw new te({ code: "AUTH_FAILED", message: "获取accessToken失败" });
  1447. this.setAccessToken(e3.result.accessToken);
  1448. }), retryRule: w });
  1449. }
  1450. get hasAccessToken() {
  1451. return !!this.accessToken;
  1452. }
  1453. setAccessToken(e2) {
  1454. this.accessToken = e2;
  1455. }
  1456. requestWrapped(e2) {
  1457. return de.wrappedRequest(e2, this.adapter.request);
  1458. }
  1459. requestAuth(e2) {
  1460. return this.requestWrapped(e2);
  1461. }
  1462. request(e2, t2) {
  1463. return Promise.resolve().then(() => this.hasAccessToken ? t2 ? this.requestWrapped(e2) : this.requestWrapped(e2).catch((t3) => new Promise((e3, n2) => {
  1464. !t3 || "GATEWAY_INVALID_TOKEN" !== t3.code && "InvalidParameter.InvalidToken" !== t3.code ? n2(t3) : e3();
  1465. }).then(() => this.getAccessToken()).then(() => {
  1466. const t4 = this.rebuildRequest(e2);
  1467. return this.request(t4, true);
  1468. })) : this.getAccessToken().then(() => {
  1469. const t3 = this.rebuildRequest(e2);
  1470. return this.request(t3, true);
  1471. }));
  1472. }
  1473. rebuildRequest(e2) {
  1474. const t2 = Object.assign({}, e2);
  1475. return t2.data.token = this.accessToken, t2.header["x-basement-token"] = this.accessToken, t2.header["x-serverless-sign"] = de.sign(t2.data, this.config.clientSecret), t2;
  1476. }
  1477. setupRequest(e2, t2) {
  1478. const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" };
  1479. return "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = de.sign(n2, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: s2 };
  1480. }
  1481. getAccessToken() {
  1482. return this._getAccessTokenPromiseHub.exec();
  1483. }
  1484. async authorize() {
  1485. await this.getAccessToken();
  1486. }
  1487. callFunction(e2) {
  1488. const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) };
  1489. return this.request(this.setupRequest(t2));
  1490. }
  1491. getOSSUploadOptionsFromPath(e2) {
  1492. const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) };
  1493. return this.request(this.setupRequest(t2));
  1494. }
  1495. uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) {
  1496. return new Promise((o2, a2) => {
  1497. const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, header: { "X-OSS-server-side-encrpytion": "AES256" }, success(e3) {
  1498. e3 && e3.statusCode < 400 ? o2(e3) : a2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  1499. }, fail(e3) {
  1500. a2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  1501. } });
  1502. "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => {
  1503. i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  1504. });
  1505. });
  1506. }
  1507. reportOSSUpload(e2) {
  1508. const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) };
  1509. return this.request(this.setupRequest(t2));
  1510. }
  1511. async uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", cloudPathAsRealPath: s2 = false, onUploadProgress: r2, config: i2 }) {
  1512. if ("string" !== f(t2))
  1513. throw new te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
  1514. if (!(t2 = t2.trim()))
  1515. throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" });
  1516. if (/:\/\//.test(t2))
  1517. throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" });
  1518. const o2 = i2 && i2.envType || this.config.envType;
  1519. if (s2 && ("/" !== t2[0] && (t2 = "/" + t2), t2.indexOf("\\") > -1))
  1520. throw new te({ code: "INVALID_PARAM", message: "使用cloudPath作为路径时,cloudPath不可包含“\\”" });
  1521. const a2 = (await this.getOSSUploadOptionsFromPath({ env: o2, filename: s2 ? t2.split("/").pop() : t2, fileId: s2 ? t2 : void 0 })).result, c2 = "https://" + a2.cdnDomain + "/" + a2.ossPath, { securityToken: u2, accessKeyId: h2, signature: l2, host: d2, ossPath: p2, id: g2, policy: m2, ossCallbackUrl: y2 } = a2, _2 = { "Cache-Control": "max-age=2592000", "Content-Disposition": "attachment", OSSAccessKeyId: h2, Signature: l2, host: d2, id: g2, key: p2, policy: m2, success_action_status: 200 };
  1522. if (u2 && (_2["x-oss-security-token"] = u2), y2) {
  1523. const e3 = JSON.stringify({ callbackUrl: y2, callbackBody: JSON.stringify({ fileId: g2, spaceId: this.config.spaceId }), callbackBodyType: "application/json" });
  1524. _2.callback = de.toBase64(e3);
  1525. }
  1526. const w2 = { url: "https://" + a2.host, formData: _2, fileName: "file", name: "file", filePath: e2, fileType: n2 };
  1527. if (await this.uploadFileToOSS(Object.assign({}, w2, { onUploadProgress: r2 })), y2)
  1528. return { success: true, filePath: e2, fileID: c2 };
  1529. if ((await this.reportOSSUpload({ id: g2 })).success)
  1530. return { success: true, filePath: e2, fileID: c2 };
  1531. throw new te({ code: "UPLOAD_FAILED", message: "文件上传失败" });
  1532. }
  1533. getTempFileURL({ fileList: e2 } = {}) {
  1534. return new Promise((t2, n2) => {
  1535. Array.isArray(e2) && 0 !== e2.length || n2(new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" })), t2({ fileList: e2.map((e3) => ({ fileID: e3, tempFileURL: e3 })) });
  1536. });
  1537. }
  1538. async getFileInfo({ fileList: e2 } = {}) {
  1539. if (!Array.isArray(e2) || 0 === e2.length)
  1540. throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
  1541. const t2 = { method: "serverless.file.resource.info", params: JSON.stringify({ id: e2.map((e3) => e3.split("?")[0]).join(",") }) };
  1542. return { fileList: (await this.request(this.setupRequest(t2))).result };
  1543. }
  1544. };
  1545. var fe = { init(e2) {
  1546. const t2 = new pe(e2), n2 = { signInAnonymously: function() {
  1547. return t2.authorize();
  1548. }, getLoginState: function() {
  1549. return Promise.resolve(false);
  1550. } };
  1551. return t2.auth = function() {
  1552. return n2;
  1553. }, t2.customAuth = t2.auth, t2;
  1554. } };
  1555. const ge = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  1556. var me;
  1557. !function(e2) {
  1558. e2.local = "local", e2.none = "none", e2.session = "session";
  1559. }(me || (me = {}));
  1560. var ye = function() {
  1561. }, _e = n(function(e2, t2) {
  1562. var n2;
  1563. e2.exports = (n2 = r, function(e3) {
  1564. var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [], c2 = [];
  1565. !function() {
  1566. function t4(t5) {
  1567. for (var n4 = e3.sqrt(t5), s4 = 2; s4 <= n4; s4++)
  1568. if (!(t5 % s4))
  1569. return false;
  1570. return true;
  1571. }
  1572. function n3(e4) {
  1573. return 4294967296 * (e4 - (0 | e4)) | 0;
  1574. }
  1575. for (var s3 = 2, r3 = 0; r3 < 64; )
  1576. t4(s3) && (r3 < 8 && (a2[r3] = n3(e3.pow(s3, 0.5))), c2[r3] = n3(e3.pow(s3, 1 / 3)), r3++), s3++;
  1577. }();
  1578. var u2 = [], h2 = o2.SHA256 = i2.extend({ _doReset: function() {
  1579. this._hash = new r2.init(a2.slice(0));
  1580. }, _doProcessBlock: function(e4, t4) {
  1581. for (var n3 = this._hash.words, s3 = n3[0], r3 = n3[1], i3 = n3[2], o3 = n3[3], a3 = n3[4], h3 = n3[5], l2 = n3[6], d2 = n3[7], p2 = 0; p2 < 64; p2++) {
  1582. if (p2 < 16)
  1583. u2[p2] = 0 | e4[t4 + p2];
  1584. else {
  1585. var f2 = u2[p2 - 15], g2 = (f2 << 25 | f2 >>> 7) ^ (f2 << 14 | f2 >>> 18) ^ f2 >>> 3, m2 = u2[p2 - 2], y2 = (m2 << 15 | m2 >>> 17) ^ (m2 << 13 | m2 >>> 19) ^ m2 >>> 10;
  1586. u2[p2] = g2 + u2[p2 - 7] + y2 + u2[p2 - 16];
  1587. }
  1588. var _2 = s3 & r3 ^ s3 & i3 ^ r3 & i3, w2 = (s3 << 30 | s3 >>> 2) ^ (s3 << 19 | s3 >>> 13) ^ (s3 << 10 | s3 >>> 22), v2 = d2 + ((a3 << 26 | a3 >>> 6) ^ (a3 << 21 | a3 >>> 11) ^ (a3 << 7 | a3 >>> 25)) + (a3 & h3 ^ ~a3 & l2) + c2[p2] + u2[p2];
  1589. d2 = l2, l2 = h3, h3 = a3, a3 = o3 + v2 | 0, o3 = i3, i3 = r3, r3 = s3, s3 = v2 + (w2 + _2) | 0;
  1590. }
  1591. n3[0] = n3[0] + s3 | 0, n3[1] = n3[1] + r3 | 0, n3[2] = n3[2] + i3 | 0, n3[3] = n3[3] + o3 | 0, n3[4] = n3[4] + a3 | 0, n3[5] = n3[5] + h3 | 0, n3[6] = n3[6] + l2 | 0, n3[7] = n3[7] + d2 | 0;
  1592. }, _doFinalize: function() {
  1593. var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes;
  1594. return n3[r3 >>> 5] |= 128 << 24 - r3 % 32, n3[14 + (r3 + 64 >>> 9 << 4)] = e3.floor(s3 / 4294967296), n3[15 + (r3 + 64 >>> 9 << 4)] = s3, t4.sigBytes = 4 * n3.length, this._process(), this._hash;
  1595. }, clone: function() {
  1596. var e4 = i2.clone.call(this);
  1597. return e4._hash = this._hash.clone(), e4;
  1598. } });
  1599. t3.SHA256 = i2._createHelper(h2), t3.HmacSHA256 = i2._createHmacHelper(h2);
  1600. }(Math), n2.SHA256);
  1601. }), we = _e, ve = n(function(e2, t2) {
  1602. e2.exports = r.HmacSHA256;
  1603. });
  1604. const Ie = () => {
  1605. let e2;
  1606. if (!Promise) {
  1607. e2 = () => {
  1608. }, e2.promise = {};
  1609. const t3 = () => {
  1610. throw new te({ message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.' });
  1611. };
  1612. return Object.defineProperty(e2.promise, "then", { get: t3 }), Object.defineProperty(e2.promise, "catch", { get: t3 }), e2;
  1613. }
  1614. const t2 = new Promise((t3, n2) => {
  1615. e2 = (e3, s2) => e3 ? n2(e3) : t3(s2);
  1616. });
  1617. return e2.promise = t2, e2;
  1618. };
  1619. function Se(e2) {
  1620. return void 0 === e2;
  1621. }
  1622. function be(e2) {
  1623. return "[object Null]" === Object.prototype.toString.call(e2);
  1624. }
  1625. var ke;
  1626. function Ae(e2) {
  1627. const t2 = (n2 = e2, "[object Array]" === Object.prototype.toString.call(n2) ? e2 : [e2]);
  1628. var n2;
  1629. for (const e3 of t2) {
  1630. const { isMatch: t3, genAdapter: n3, runtime: s2 } = e3;
  1631. if (t3())
  1632. return { adapter: n3(), runtime: s2 };
  1633. }
  1634. }
  1635. !function(e2) {
  1636. e2.WEB = "web", e2.WX_MP = "wx_mp";
  1637. }(ke || (ke = {}));
  1638. const Ce = { adapter: null, runtime: void 0 }, Pe = ["anonymousUuidKey"];
  1639. class Te extends ye {
  1640. constructor() {
  1641. super(), Ce.adapter.root.tcbObject || (Ce.adapter.root.tcbObject = {});
  1642. }
  1643. setItem(e2, t2) {
  1644. Ce.adapter.root.tcbObject[e2] = t2;
  1645. }
  1646. getItem(e2) {
  1647. return Ce.adapter.root.tcbObject[e2];
  1648. }
  1649. removeItem(e2) {
  1650. delete Ce.adapter.root.tcbObject[e2];
  1651. }
  1652. clear() {
  1653. delete Ce.adapter.root.tcbObject;
  1654. }
  1655. }
  1656. function xe(e2, t2) {
  1657. switch (e2) {
  1658. case "local":
  1659. return t2.localStorage || new Te();
  1660. case "none":
  1661. return new Te();
  1662. default:
  1663. return t2.sessionStorage || new Te();
  1664. }
  1665. }
  1666. class Oe {
  1667. constructor(e2) {
  1668. if (!this._storage) {
  1669. this._persistence = Ce.adapter.primaryStorage || e2.persistence, this._storage = xe(this._persistence, Ce.adapter);
  1670. const t2 = `access_token_${e2.env}`, n2 = `access_token_expire_${e2.env}`, s2 = `refresh_token_${e2.env}`, r2 = `anonymous_uuid_${e2.env}`, i2 = `login_type_${e2.env}`, o2 = `user_info_${e2.env}`;
  1671. this.keys = { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2, anonymousUuidKey: r2, loginTypeKey: i2, userInfoKey: o2 };
  1672. }
  1673. }
  1674. updatePersistence(e2) {
  1675. if (e2 === this._persistence)
  1676. return;
  1677. const t2 = "local" === this._persistence;
  1678. this._persistence = e2;
  1679. const n2 = xe(e2, Ce.adapter);
  1680. for (const e3 in this.keys) {
  1681. const s2 = this.keys[e3];
  1682. if (t2 && Pe.includes(e3))
  1683. continue;
  1684. const r2 = this._storage.getItem(s2);
  1685. Se(r2) || be(r2) || (n2.setItem(s2, r2), this._storage.removeItem(s2));
  1686. }
  1687. this._storage = n2;
  1688. }
  1689. setStore(e2, t2, n2) {
  1690. if (!this._storage)
  1691. return;
  1692. const s2 = { version: n2 || "localCachev1", content: t2 }, r2 = JSON.stringify(s2);
  1693. try {
  1694. this._storage.setItem(e2, r2);
  1695. } catch (e3) {
  1696. throw e3;
  1697. }
  1698. }
  1699. getStore(e2, t2) {
  1700. try {
  1701. if (!this._storage)
  1702. return;
  1703. } catch (e3) {
  1704. return "";
  1705. }
  1706. t2 = t2 || "localCachev1";
  1707. const n2 = this._storage.getItem(e2);
  1708. if (!n2)
  1709. return "";
  1710. if (n2.indexOf(t2) >= 0) {
  1711. return JSON.parse(n2).content;
  1712. }
  1713. return "";
  1714. }
  1715. removeStore(e2) {
  1716. this._storage.removeItem(e2);
  1717. }
  1718. }
  1719. const Ee = {}, Le = {};
  1720. function Re(e2) {
  1721. return Ee[e2];
  1722. }
  1723. class Ue {
  1724. constructor(e2, t2) {
  1725. this.data = t2 || null, this.name = e2;
  1726. }
  1727. }
  1728. class Ne extends Ue {
  1729. constructor(e2, t2) {
  1730. super("error", { error: e2, data: t2 }), this.error = e2;
  1731. }
  1732. }
  1733. const De = new class {
  1734. constructor() {
  1735. this._listeners = {};
  1736. }
  1737. on(e2, t2) {
  1738. return function(e3, t3, n2) {
  1739. n2[e3] = n2[e3] || [], n2[e3].push(t3);
  1740. }(e2, t2, this._listeners), this;
  1741. }
  1742. off(e2, t2) {
  1743. return function(e3, t3, n2) {
  1744. if (n2 && n2[e3]) {
  1745. const s2 = n2[e3].indexOf(t3);
  1746. -1 !== s2 && n2[e3].splice(s2, 1);
  1747. }
  1748. }(e2, t2, this._listeners), this;
  1749. }
  1750. fire(e2, t2) {
  1751. if (e2 instanceof Ne)
  1752. return console.error(e2.error), this;
  1753. const n2 = "string" == typeof e2 ? new Ue(e2, t2 || {}) : e2;
  1754. const s2 = n2.name;
  1755. if (this._listens(s2)) {
  1756. n2.target = this;
  1757. const e3 = this._listeners[s2] ? [...this._listeners[s2]] : [];
  1758. for (const t3 of e3)
  1759. t3.call(this, n2);
  1760. }
  1761. return this;
  1762. }
  1763. _listens(e2) {
  1764. return this._listeners[e2] && this._listeners[e2].length > 0;
  1765. }
  1766. }();
  1767. function Me(e2, t2) {
  1768. De.on(e2, t2);
  1769. }
  1770. function qe(e2, t2 = {}) {
  1771. De.fire(e2, t2);
  1772. }
  1773. function Fe(e2, t2) {
  1774. De.off(e2, t2);
  1775. }
  1776. const Ke = "loginStateChanged", je = "loginStateExpire", $e = "loginTypeChanged", Be = "anonymousConverted", We = "refreshAccessToken";
  1777. var He;
  1778. !function(e2) {
  1779. e2.ANONYMOUS = "ANONYMOUS", e2.WECHAT = "WECHAT", e2.WECHAT_PUBLIC = "WECHAT-PUBLIC", e2.WECHAT_OPEN = "WECHAT-OPEN", e2.CUSTOM = "CUSTOM", e2.EMAIL = "EMAIL", e2.USERNAME = "USERNAME", e2.NULL = "NULL";
  1780. }(He || (He = {}));
  1781. const ze = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"], Je = { "X-SDK-Version": "1.3.5" };
  1782. function Ve(e2, t2, n2) {
  1783. const s2 = e2[t2];
  1784. e2[t2] = function(t3) {
  1785. const r2 = {}, i2 = {};
  1786. n2.forEach((n3) => {
  1787. const { data: s3, headers: o3 } = n3.call(e2, t3);
  1788. Object.assign(r2, s3), Object.assign(i2, o3);
  1789. });
  1790. const o2 = t3.data;
  1791. return o2 && (() => {
  1792. var e3;
  1793. if (e3 = o2, "[object FormData]" !== Object.prototype.toString.call(e3))
  1794. t3.data = { ...o2, ...r2 };
  1795. else
  1796. for (const e4 in r2)
  1797. o2.append(e4, r2[e4]);
  1798. })(), t3.headers = { ...t3.headers || {}, ...i2 }, s2.call(e2, t3);
  1799. };
  1800. }
  1801. function Ge() {
  1802. const e2 = Math.random().toString(16).slice(2);
  1803. return { data: { seqId: e2 }, headers: { ...Je, "x-seqid": e2 } };
  1804. }
  1805. class Ye {
  1806. constructor(e2 = {}) {
  1807. var t2;
  1808. this.config = e2, this._reqClass = new Ce.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: `请求在${this.config.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] }), this._cache = Re(this.config.env), this._localCache = (t2 = this.config.env, Le[t2]), Ve(this._reqClass, "post", [Ge]), Ve(this._reqClass, "upload", [Ge]), Ve(this._reqClass, "download", [Ge]);
  1809. }
  1810. async post(e2) {
  1811. return await this._reqClass.post(e2);
  1812. }
  1813. async upload(e2) {
  1814. return await this._reqClass.upload(e2);
  1815. }
  1816. async download(e2) {
  1817. return await this._reqClass.download(e2);
  1818. }
  1819. async refreshAccessToken() {
  1820. let e2, t2;
  1821. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  1822. try {
  1823. e2 = await this._refreshAccessTokenPromise;
  1824. } catch (e3) {
  1825. t2 = e3;
  1826. }
  1827. if (this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t2)
  1828. throw t2;
  1829. return e2;
  1830. }
  1831. async _refreshAccessToken() {
  1832. const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2, loginTypeKey: s2, anonymousUuidKey: r2 } = this._cache.keys;
  1833. this._cache.removeStore(e2), this._cache.removeStore(t2);
  1834. let i2 = this._cache.getStore(n2);
  1835. if (!i2)
  1836. throw new te({ message: "未登录CloudBase" });
  1837. const o2 = { refresh_token: i2 }, a2 = await this.request("auth.fetchAccessTokenWithRefreshToken", o2);
  1838. if (a2.data.code) {
  1839. const { code: e3 } = a2.data;
  1840. if ("SIGN_PARAM_INVALID" === e3 || "REFRESH_TOKEN_EXPIRED" === e3 || "INVALID_REFRESH_TOKEN" === e3) {
  1841. if (this._cache.getStore(s2) === He.ANONYMOUS && "INVALID_REFRESH_TOKEN" === e3) {
  1842. const e4 = this._cache.getStore(r2), t3 = this._cache.getStore(n2), s3 = await this.send("auth.signInAnonymously", { anonymous_uuid: e4, refresh_token: t3 });
  1843. return this.setRefreshToken(s3.refresh_token), this._refreshAccessToken();
  1844. }
  1845. qe(je), this._cache.removeStore(n2);
  1846. }
  1847. throw new te({ code: a2.data.code, message: `刷新access token失败:${a2.data.code}` });
  1848. }
  1849. if (a2.data.access_token)
  1850. return qe(We), this._cache.setStore(e2, a2.data.access_token), this._cache.setStore(t2, a2.data.access_token_expire + Date.now()), { accessToken: a2.data.access_token, accessTokenExpire: a2.data.access_token_expire };
  1851. a2.data.refresh_token && (this._cache.removeStore(n2), this._cache.setStore(n2, a2.data.refresh_token), this._refreshAccessToken());
  1852. }
  1853. async getAccessToken() {
  1854. const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2 } = this._cache.keys;
  1855. if (!this._cache.getStore(n2))
  1856. throw new te({ message: "refresh token不存在,登录状态异常" });
  1857. let s2 = this._cache.getStore(e2), r2 = this._cache.getStore(t2), i2 = true;
  1858. return this._shouldRefreshAccessTokenHook && !await this._shouldRefreshAccessTokenHook(s2, r2) && (i2 = false), (!s2 || !r2 || r2 < Date.now()) && i2 ? this.refreshAccessToken() : { accessToken: s2, accessTokenExpire: r2 };
  1859. }
  1860. async request(e2, t2, n2) {
  1861. const s2 = `x-tcb-trace_${this.config.env}`;
  1862. let r2 = "application/x-www-form-urlencoded";
  1863. const i2 = { action: e2, env: this.config.env, dataVersion: "2019-08-16", ...t2 };
  1864. if (-1 === ze.indexOf(e2)) {
  1865. const { refreshTokenKey: e3 } = this._cache.keys;
  1866. this._cache.getStore(e3) && (i2.access_token = (await this.getAccessToken()).accessToken);
  1867. }
  1868. let o2;
  1869. if ("storage.uploadFile" === e2) {
  1870. o2 = new FormData();
  1871. for (let e3 in o2)
  1872. o2.hasOwnProperty(e3) && void 0 !== o2[e3] && o2.append(e3, i2[e3]);
  1873. r2 = "multipart/form-data";
  1874. } else {
  1875. r2 = "application/json", o2 = {};
  1876. for (let e3 in i2)
  1877. void 0 !== i2[e3] && (o2[e3] = i2[e3]);
  1878. }
  1879. let a2 = { headers: { "content-type": r2 } };
  1880. n2 && n2.onUploadProgress && (a2.onUploadProgress = n2.onUploadProgress);
  1881. const c2 = this._localCache.getStore(s2);
  1882. c2 && (a2.headers["X-TCB-Trace"] = c2);
  1883. const { parse: u2, inQuery: h2, search: l2 } = t2;
  1884. let d2 = { env: this.config.env };
  1885. u2 && (d2.parse = true), h2 && (d2 = { ...h2, ...d2 });
  1886. let p2 = function(e3, t3, n3 = {}) {
  1887. const s3 = /\?/.test(t3);
  1888. let r3 = "";
  1889. for (let e4 in n3)
  1890. "" === r3 ? !s3 && (t3 += "?") : r3 += "&", r3 += `${e4}=${encodeURIComponent(n3[e4])}`;
  1891. return /^http(s)?\:\/\//.test(t3 += r3) ? t3 : `${e3}${t3}`;
  1892. }(ge, "//tcb-api.tencentcloudapi.com/web", d2);
  1893. l2 && (p2 += l2);
  1894. const f2 = await this.post({ url: p2, data: o2, ...a2 }), g2 = f2.header && f2.header["x-tcb-trace"];
  1895. if (g2 && this._localCache.setStore(s2, g2), 200 !== Number(f2.status) && 200 !== Number(f2.statusCode) || !f2.data)
  1896. throw new te({ code: "NETWORK_ERROR", message: "network request error" });
  1897. return f2;
  1898. }
  1899. async send(e2, t2 = {}) {
  1900. const n2 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress });
  1901. if ("ACCESS_TOKEN_EXPIRED" === n2.data.code && -1 === ze.indexOf(e2)) {
  1902. await this.refreshAccessToken();
  1903. const n3 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress });
  1904. if (n3.data.code)
  1905. throw new te({ code: n3.data.code, message: n3.data.message });
  1906. return n3.data;
  1907. }
  1908. if (n2.data.code)
  1909. throw new te({ code: n2.data.code, message: n2.data.message });
  1910. return n2.data;
  1911. }
  1912. setRefreshToken(e2) {
  1913. const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys;
  1914. this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2);
  1915. }
  1916. }
  1917. const Qe = {};
  1918. function Xe(e2) {
  1919. return Qe[e2];
  1920. }
  1921. class Ze {
  1922. constructor(e2) {
  1923. this.config = e2, this._cache = Re(e2.env), this._request = Xe(e2.env);
  1924. }
  1925. setRefreshToken(e2) {
  1926. const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys;
  1927. this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2);
  1928. }
  1929. setAccessToken(e2, t2) {
  1930. const { accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys;
  1931. this._cache.setStore(n2, e2), this._cache.setStore(s2, t2);
  1932. }
  1933. async refreshUserInfo() {
  1934. const { data: e2 } = await this._request.send("auth.getUserInfo", {});
  1935. return this.setLocalUserInfo(e2), e2;
  1936. }
  1937. setLocalUserInfo(e2) {
  1938. const { userInfoKey: t2 } = this._cache.keys;
  1939. this._cache.setStore(t2, e2);
  1940. }
  1941. }
  1942. class et {
  1943. constructor(e2) {
  1944. if (!e2)
  1945. throw new te({ code: "PARAM_ERROR", message: "envId is not defined" });
  1946. this._envId = e2, this._cache = Re(this._envId), this._request = Xe(this._envId), this.setUserInfo();
  1947. }
  1948. linkWithTicket(e2) {
  1949. if ("string" != typeof e2)
  1950. throw new te({ code: "PARAM_ERROR", message: "ticket must be string" });
  1951. return this._request.send("auth.linkWithTicket", { ticket: e2 });
  1952. }
  1953. linkWithRedirect(e2) {
  1954. e2.signInWithRedirect();
  1955. }
  1956. updatePassword(e2, t2) {
  1957. return this._request.send("auth.updatePassword", { oldPassword: t2, newPassword: e2 });
  1958. }
  1959. updateEmail(e2) {
  1960. return this._request.send("auth.updateEmail", { newEmail: e2 });
  1961. }
  1962. updateUsername(e2) {
  1963. if ("string" != typeof e2)
  1964. throw new te({ code: "PARAM_ERROR", message: "username must be a string" });
  1965. return this._request.send("auth.updateUsername", { username: e2 });
  1966. }
  1967. async getLinkedUidList() {
  1968. const { data: e2 } = await this._request.send("auth.getLinkedUidList", {});
  1969. let t2 = false;
  1970. const { users: n2 } = e2;
  1971. return n2.forEach((e3) => {
  1972. e3.wxOpenId && e3.wxPublicId && (t2 = true);
  1973. }), { users: n2, hasPrimaryUid: t2 };
  1974. }
  1975. setPrimaryUid(e2) {
  1976. return this._request.send("auth.setPrimaryUid", { uid: e2 });
  1977. }
  1978. unlink(e2) {
  1979. return this._request.send("auth.unlink", { platform: e2 });
  1980. }
  1981. async update(e2) {
  1982. const { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 } = e2, { data: a2 } = await this._request.send("auth.updateUserInfo", { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 });
  1983. this.setLocalUserInfo(a2);
  1984. }
  1985. async refresh() {
  1986. const { data: e2 } = await this._request.send("auth.getUserInfo", {});
  1987. return this.setLocalUserInfo(e2), e2;
  1988. }
  1989. setUserInfo() {
  1990. const { userInfoKey: e2 } = this._cache.keys, t2 = this._cache.getStore(e2);
  1991. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach((e3) => {
  1992. this[e3] = t2[e3];
  1993. }), this.location = { country: t2.country, province: t2.province, city: t2.city };
  1994. }
  1995. setLocalUserInfo(e2) {
  1996. const { userInfoKey: t2 } = this._cache.keys;
  1997. this._cache.setStore(t2, e2), this.setUserInfo();
  1998. }
  1999. }
  2000. class tt {
  2001. constructor(e2) {
  2002. if (!e2)
  2003. throw new te({ code: "PARAM_ERROR", message: "envId is not defined" });
  2004. this._cache = Re(e2);
  2005. const { refreshTokenKey: t2, accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys, r2 = this._cache.getStore(t2), i2 = this._cache.getStore(n2), o2 = this._cache.getStore(s2);
  2006. this.credential = { refreshToken: r2, accessToken: i2, accessTokenExpire: o2 }, this.user = new et(e2);
  2007. }
  2008. get isAnonymousAuth() {
  2009. return this.loginType === He.ANONYMOUS;
  2010. }
  2011. get isCustomAuth() {
  2012. return this.loginType === He.CUSTOM;
  2013. }
  2014. get isWeixinAuth() {
  2015. return this.loginType === He.WECHAT || this.loginType === He.WECHAT_OPEN || this.loginType === He.WECHAT_PUBLIC;
  2016. }
  2017. get loginType() {
  2018. return this._cache.getStore(this._cache.keys.loginTypeKey);
  2019. }
  2020. }
  2021. class nt extends Ze {
  2022. async signIn() {
  2023. this._cache.updatePersistence("local");
  2024. const { anonymousUuidKey: e2, refreshTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2) || void 0, s2 = this._cache.getStore(t2) || void 0, r2 = await this._request.send("auth.signInAnonymously", { anonymous_uuid: n2, refresh_token: s2 });
  2025. if (r2.uuid && r2.refresh_token) {
  2026. this._setAnonymousUUID(r2.uuid), this.setRefreshToken(r2.refresh_token), await this._request.refreshAccessToken(), qe(Ke), qe($e, { env: this.config.env, loginType: He.ANONYMOUS, persistence: "local" });
  2027. const e3 = new tt(this.config.env);
  2028. return await e3.user.refresh(), e3;
  2029. }
  2030. throw new te({ message: "匿名登录失败" });
  2031. }
  2032. async linkAndRetrieveDataWithTicket(e2) {
  2033. const { anonymousUuidKey: t2, refreshTokenKey: n2 } = this._cache.keys, s2 = this._cache.getStore(t2), r2 = this._cache.getStore(n2), i2 = await this._request.send("auth.linkAndRetrieveDataWithTicket", { anonymous_uuid: s2, refresh_token: r2, ticket: e2 });
  2034. if (i2.refresh_token)
  2035. return this._clearAnonymousUUID(), this.setRefreshToken(i2.refresh_token), await this._request.refreshAccessToken(), qe(Be, { env: this.config.env }), qe($e, { loginType: He.CUSTOM, persistence: "local" }), { credential: { refreshToken: i2.refresh_token } };
  2036. throw new te({ message: "匿名转化失败" });
  2037. }
  2038. _setAnonymousUUID(e2) {
  2039. const { anonymousUuidKey: t2, loginTypeKey: n2 } = this._cache.keys;
  2040. this._cache.removeStore(t2), this._cache.setStore(t2, e2), this._cache.setStore(n2, He.ANONYMOUS);
  2041. }
  2042. _clearAnonymousUUID() {
  2043. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  2044. }
  2045. }
  2046. class st extends Ze {
  2047. async signIn(e2) {
  2048. if ("string" != typeof e2)
  2049. throw new te({ code: "PARAM_ERROR", message: "ticket must be a string" });
  2050. const { refreshTokenKey: t2 } = this._cache.keys, n2 = await this._request.send("auth.signInWithTicket", { ticket: e2, refresh_token: this._cache.getStore(t2) || "" });
  2051. if (n2.refresh_token)
  2052. return this.setRefreshToken(n2.refresh_token), await this._request.refreshAccessToken(), qe(Ke), qe($e, { env: this.config.env, loginType: He.CUSTOM, persistence: this.config.persistence }), await this.refreshUserInfo(), new tt(this.config.env);
  2053. throw new te({ message: "自定义登录失败" });
  2054. }
  2055. }
  2056. class rt extends Ze {
  2057. async signIn(e2, t2) {
  2058. if ("string" != typeof e2)
  2059. throw new te({ code: "PARAM_ERROR", message: "email must be a string" });
  2060. const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: "EMAIL", email: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token: i2, access_token_expire: o2 } = s2;
  2061. if (r2)
  2062. return this.setRefreshToken(r2), i2 && o2 ? this.setAccessToken(i2, o2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), qe(Ke), qe($e, { env: this.config.env, loginType: He.EMAIL, persistence: this.config.persistence }), new tt(this.config.env);
  2063. throw s2.code ? new te({ code: s2.code, message: `邮箱登录失败: ${s2.message}` }) : new te({ message: "邮箱登录失败" });
  2064. }
  2065. async activate(e2) {
  2066. return this._request.send("auth.activateEndUserMail", { token: e2 });
  2067. }
  2068. async resetPasswordWithToken(e2, t2) {
  2069. return this._request.send("auth.resetPasswordWithToken", { token: e2, newPassword: t2 });
  2070. }
  2071. }
  2072. class it extends Ze {
  2073. async signIn(e2, t2) {
  2074. if ("string" != typeof e2)
  2075. throw new te({ code: "PARAM_ERROR", message: "username must be a string" });
  2076. "string" != typeof t2 && (t2 = "", console.warn("password is empty"));
  2077. const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: He.USERNAME, username: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token_expire: i2, access_token: o2 } = s2;
  2078. if (r2)
  2079. return this.setRefreshToken(r2), o2 && i2 ? this.setAccessToken(o2, i2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), qe(Ke), qe($e, { env: this.config.env, loginType: He.USERNAME, persistence: this.config.persistence }), new tt(this.config.env);
  2080. throw s2.code ? new te({ code: s2.code, message: `用户名密码登录失败: ${s2.message}` }) : new te({ message: "用户名密码登录失败" });
  2081. }
  2082. }
  2083. class ot {
  2084. constructor(e2) {
  2085. this.config = e2, this._cache = Re(e2.env), this._request = Xe(e2.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Me($e, this._onLoginTypeChanged);
  2086. }
  2087. get currentUser() {
  2088. const e2 = this.hasLoginState();
  2089. return e2 && e2.user || null;
  2090. }
  2091. get loginType() {
  2092. return this._cache.getStore(this._cache.keys.loginTypeKey);
  2093. }
  2094. anonymousAuthProvider() {
  2095. return new nt(this.config);
  2096. }
  2097. customAuthProvider() {
  2098. return new st(this.config);
  2099. }
  2100. emailAuthProvider() {
  2101. return new rt(this.config);
  2102. }
  2103. usernameAuthProvider() {
  2104. return new it(this.config);
  2105. }
  2106. async signInAnonymously() {
  2107. return new nt(this.config).signIn();
  2108. }
  2109. async signInWithEmailAndPassword(e2, t2) {
  2110. return new rt(this.config).signIn(e2, t2);
  2111. }
  2112. signInWithUsernameAndPassword(e2, t2) {
  2113. return new it(this.config).signIn(e2, t2);
  2114. }
  2115. async linkAndRetrieveDataWithTicket(e2) {
  2116. this._anonymousAuthProvider || (this._anonymousAuthProvider = new nt(this.config)), Me(Be, this._onAnonymousConverted);
  2117. return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e2);
  2118. }
  2119. async signOut() {
  2120. if (this.loginType === He.ANONYMOUS)
  2121. throw new te({ message: "匿名用户不支持登出操作" });
  2122. const { refreshTokenKey: e2, accessTokenKey: t2, accessTokenExpireKey: n2 } = this._cache.keys, s2 = this._cache.getStore(e2);
  2123. if (!s2)
  2124. return;
  2125. const r2 = await this._request.send("auth.logout", { refresh_token: s2 });
  2126. return this._cache.removeStore(e2), this._cache.removeStore(t2), this._cache.removeStore(n2), qe(Ke), qe($e, { env: this.config.env, loginType: He.NULL, persistence: this.config.persistence }), r2;
  2127. }
  2128. async signUpWithEmailAndPassword(e2, t2) {
  2129. return this._request.send("auth.signUpWithEmailAndPassword", { email: e2, password: t2 });
  2130. }
  2131. async sendPasswordResetEmail(e2) {
  2132. return this._request.send("auth.sendPasswordResetEmail", { email: e2 });
  2133. }
  2134. onLoginStateChanged(e2) {
  2135. Me(Ke, () => {
  2136. const t3 = this.hasLoginState();
  2137. e2.call(this, t3);
  2138. });
  2139. const t2 = this.hasLoginState();
  2140. e2.call(this, t2);
  2141. }
  2142. onLoginStateExpired(e2) {
  2143. Me(je, e2.bind(this));
  2144. }
  2145. onAccessTokenRefreshed(e2) {
  2146. Me(We, e2.bind(this));
  2147. }
  2148. onAnonymousConverted(e2) {
  2149. Me(Be, e2.bind(this));
  2150. }
  2151. onLoginTypeChanged(e2) {
  2152. Me($e, () => {
  2153. const t2 = this.hasLoginState();
  2154. e2.call(this, t2);
  2155. });
  2156. }
  2157. async getAccessToken() {
  2158. return { accessToken: (await this._request.getAccessToken()).accessToken, env: this.config.env };
  2159. }
  2160. hasLoginState() {
  2161. const { refreshTokenKey: e2 } = this._cache.keys;
  2162. return this._cache.getStore(e2) ? new tt(this.config.env) : null;
  2163. }
  2164. async isUsernameRegistered(e2) {
  2165. if ("string" != typeof e2)
  2166. throw new te({ code: "PARAM_ERROR", message: "username must be a string" });
  2167. const { data: t2 } = await this._request.send("auth.isUsernameRegistered", { username: e2 });
  2168. return t2 && t2.isRegistered;
  2169. }
  2170. getLoginState() {
  2171. return Promise.resolve(this.hasLoginState());
  2172. }
  2173. async signInWithTicket(e2) {
  2174. return new st(this.config).signIn(e2);
  2175. }
  2176. shouldRefreshAccessToken(e2) {
  2177. this._request._shouldRefreshAccessTokenHook = e2.bind(this);
  2178. }
  2179. getUserInfo() {
  2180. return this._request.send("auth.getUserInfo", {}).then((e2) => e2.code ? e2 : { ...e2.data, requestId: e2.seqId });
  2181. }
  2182. getAuthHeader() {
  2183. const { refreshTokenKey: e2, accessTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2);
  2184. return { "x-cloudbase-credentials": this._cache.getStore(t2) + "/@@/" + n2 };
  2185. }
  2186. _onAnonymousConverted(e2) {
  2187. const { env: t2 } = e2.data;
  2188. t2 === this.config.env && this._cache.updatePersistence(this.config.persistence);
  2189. }
  2190. _onLoginTypeChanged(e2) {
  2191. const { loginType: t2, persistence: n2, env: s2 } = e2.data;
  2192. s2 === this.config.env && (this._cache.updatePersistence(n2), this._cache.setStore(this._cache.keys.loginTypeKey, t2));
  2193. }
  2194. }
  2195. const at = function(e2, t2) {
  2196. t2 = t2 || Ie();
  2197. const n2 = Xe(this.config.env), { cloudPath: s2, filePath: r2, onUploadProgress: i2, fileType: o2 = "image" } = e2;
  2198. return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
  2199. const { data: { url: a2, authorization: c2, token: u2, fileId: h2, cosFileId: l2 }, requestId: d2 } = e3, p2 = { key: s2, signature: c2, "x-cos-meta-fileid": l2, success_action_status: "201", "x-cos-security-token": u2 };
  2200. n2.upload({ url: a2, data: p2, file: r2, name: s2, fileType: o2, onUploadProgress: i2 }).then((e4) => {
  2201. 201 === e4.statusCode ? t2(null, { fileID: h2, requestId: d2 }) : t2(new te({ code: "STORAGE_REQUEST_FAIL", message: `STORAGE_REQUEST_FAIL: ${e4.data}` }));
  2202. }).catch((e4) => {
  2203. t2(e4);
  2204. });
  2205. }).catch((e3) => {
  2206. t2(e3);
  2207. }), t2.promise;
  2208. }, ct = function(e2, t2) {
  2209. t2 = t2 || Ie();
  2210. const n2 = Xe(this.config.env), { cloudPath: s2 } = e2;
  2211. return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
  2212. t2(null, e3);
  2213. }).catch((e3) => {
  2214. t2(e3);
  2215. }), t2.promise;
  2216. }, ut = function({ fileList: e2 }, t2) {
  2217. if (t2 = t2 || Ie(), !e2 || !Array.isArray(e2))
  2218. return { code: "INVALID_PARAM", message: "fileList必须是非空的数组" };
  2219. for (let t3 of e2)
  2220. if (!t3 || "string" != typeof t3)
  2221. return { code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" };
  2222. const n2 = { fileid_list: e2 };
  2223. return Xe(this.config.env).send("storage.batchDeleteFile", n2).then((e3) => {
  2224. e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.delete_list, requestId: e3.requestId });
  2225. }).catch((e3) => {
  2226. t2(e3);
  2227. }), t2.promise;
  2228. }, ht = function({ fileList: e2 }, t2) {
  2229. t2 = t2 || Ie(), e2 && Array.isArray(e2) || t2(null, { code: "INVALID_PARAM", message: "fileList必须是非空的数组" });
  2230. let n2 = [];
  2231. for (let s3 of e2)
  2232. "object" == typeof s3 ? (s3.hasOwnProperty("fileID") && s3.hasOwnProperty("maxAge") || t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是包含fileID和maxAge的对象" }), n2.push({ fileid: s3.fileID, max_age: s3.maxAge })) : "string" == typeof s3 ? n2.push({ fileid: s3 }) : t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是字符串" });
  2233. const s2 = { file_list: n2 };
  2234. return Xe(this.config.env).send("storage.batchGetDownloadUrl", s2).then((e3) => {
  2235. e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.download_list, requestId: e3.requestId });
  2236. }).catch((e3) => {
  2237. t2(e3);
  2238. }), t2.promise;
  2239. }, lt = async function({ fileID: e2 }, t2) {
  2240. const n2 = (await ht.call(this, { fileList: [{ fileID: e2, maxAge: 600 }] })).fileList[0];
  2241. if ("SUCCESS" !== n2.code)
  2242. return t2 ? t2(n2) : new Promise((e3) => {
  2243. e3(n2);
  2244. });
  2245. const s2 = Xe(this.config.env);
  2246. let r2 = n2.download_url;
  2247. if (r2 = encodeURI(r2), !t2)
  2248. return s2.download({ url: r2 });
  2249. t2(await s2.download({ url: r2 }));
  2250. }, dt = function({ name: e2, data: t2, query: n2, parse: s2, search: r2 }, i2) {
  2251. const o2 = i2 || Ie();
  2252. let a2;
  2253. try {
  2254. a2 = t2 ? JSON.stringify(t2) : "";
  2255. } catch (e3) {
  2256. return Promise.reject(e3);
  2257. }
  2258. if (!e2)
  2259. return Promise.reject(new te({ code: "PARAM_ERROR", message: "函数名不能为空" }));
  2260. const c2 = { inQuery: n2, parse: s2, search: r2, function_name: e2, request_data: a2 };
  2261. return Xe(this.config.env).send("functions.invokeFunction", c2).then((e3) => {
  2262. if (e3.code)
  2263. o2(null, e3);
  2264. else {
  2265. let t3 = e3.data.response_data;
  2266. if (s2)
  2267. o2(null, { result: t3, requestId: e3.requestId });
  2268. else
  2269. try {
  2270. t3 = JSON.parse(e3.data.response_data), o2(null, { result: t3, requestId: e3.requestId });
  2271. } catch (e4) {
  2272. o2(new te({ message: "response data must be json" }));
  2273. }
  2274. }
  2275. return o2.promise;
  2276. }).catch((e3) => {
  2277. o2(e3);
  2278. }), o2.promise;
  2279. }, pt = { timeout: 15e3, persistence: "session" }, ft = {};
  2280. class gt {
  2281. constructor(e2) {
  2282. this.config = e2 || this.config, this.authObj = void 0;
  2283. }
  2284. init(e2) {
  2285. switch (Ce.adapter || (this.requestClient = new Ce.adapter.reqClass({ timeout: e2.timeout || 5e3, timeoutMsg: `请求在${(e2.timeout || 5e3) / 1e3}s内未完成,已中断` })), this.config = { ...pt, ...e2 }, true) {
  2286. case this.config.timeout > 6e5:
  2287. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  2288. break;
  2289. case this.config.timeout < 100:
  2290. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  2291. }
  2292. return new gt(this.config);
  2293. }
  2294. auth({ persistence: e2 } = {}) {
  2295. if (this.authObj)
  2296. return this.authObj;
  2297. const t2 = e2 || Ce.adapter.primaryStorage || pt.persistence;
  2298. var n2;
  2299. return t2 !== this.config.persistence && (this.config.persistence = t2), function(e3) {
  2300. const { env: t3 } = e3;
  2301. Ee[t3] = new Oe(e3), Le[t3] = new Oe({ ...e3, persistence: "local" });
  2302. }(this.config), n2 = this.config, Qe[n2.env] = new Ye(n2), this.authObj = new ot(this.config), this.authObj;
  2303. }
  2304. on(e2, t2) {
  2305. return Me.apply(this, [e2, t2]);
  2306. }
  2307. off(e2, t2) {
  2308. return Fe.apply(this, [e2, t2]);
  2309. }
  2310. callFunction(e2, t2) {
  2311. return dt.apply(this, [e2, t2]);
  2312. }
  2313. deleteFile(e2, t2) {
  2314. return ut.apply(this, [e2, t2]);
  2315. }
  2316. getTempFileURL(e2, t2) {
  2317. return ht.apply(this, [e2, t2]);
  2318. }
  2319. downloadFile(e2, t2) {
  2320. return lt.apply(this, [e2, t2]);
  2321. }
  2322. uploadFile(e2, t2) {
  2323. return at.apply(this, [e2, t2]);
  2324. }
  2325. getUploadMetadata(e2, t2) {
  2326. return ct.apply(this, [e2, t2]);
  2327. }
  2328. registerExtension(e2) {
  2329. ft[e2.name] = e2;
  2330. }
  2331. async invokeExtension(e2, t2) {
  2332. const n2 = ft[e2];
  2333. if (!n2)
  2334. throw new te({ message: `扩展${e2} 必须先注册` });
  2335. return await n2.invoke(t2, this);
  2336. }
  2337. useAdapters(e2) {
  2338. const { adapter: t2, runtime: n2 } = Ae(e2) || {};
  2339. t2 && (Ce.adapter = t2), n2 && (Ce.runtime = n2);
  2340. }
  2341. }
  2342. var mt = new gt();
  2343. function yt(e2, t2, n2) {
  2344. void 0 === n2 && (n2 = {});
  2345. var s2 = /\?/.test(t2), r2 = "";
  2346. for (var i2 in n2)
  2347. "" === r2 ? !s2 && (t2 += "?") : r2 += "&", r2 += i2 + "=" + encodeURIComponent(n2[i2]);
  2348. return /^http(s)?:\/\//.test(t2 += r2) ? t2 : "" + e2 + t2;
  2349. }
  2350. class _t {
  2351. post(e2) {
  2352. const { url: t2, data: n2, headers: s2 } = e2;
  2353. return new Promise((e3, r2) => {
  2354. ne.request({ url: yt("https:", t2), data: n2, method: "POST", header: s2, success(t3) {
  2355. e3(t3);
  2356. }, fail(e4) {
  2357. r2(e4);
  2358. } });
  2359. });
  2360. }
  2361. upload(e2) {
  2362. return new Promise((t2, n2) => {
  2363. const { url: s2, file: r2, data: i2, headers: o2, fileType: a2 } = e2, c2 = ne.uploadFile({ url: yt("https:", s2), name: "file", formData: Object.assign({}, i2), filePath: r2, fileType: a2, header: o2, success(e3) {
  2364. const n3 = { statusCode: e3.statusCode, data: e3.data || {} };
  2365. 200 === e3.statusCode && i2.success_action_status && (n3.statusCode = parseInt(i2.success_action_status, 10)), t2(n3);
  2366. }, fail(e3) {
  2367. n2(new Error(e3.errMsg || "uploadFile:fail"));
  2368. } });
  2369. "function" == typeof e2.onUploadProgress && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((t3) => {
  2370. e2.onUploadProgress({ loaded: t3.totalBytesSent, total: t3.totalBytesExpectedToSend });
  2371. });
  2372. });
  2373. }
  2374. }
  2375. const wt = { setItem(e2, t2) {
  2376. ne.setStorageSync(e2, t2);
  2377. }, getItem: (e2) => ne.getStorageSync(e2), removeItem(e2) {
  2378. ne.removeStorageSync(e2);
  2379. }, clear() {
  2380. ne.clearStorageSync();
  2381. } };
  2382. var vt = { genAdapter: function() {
  2383. return { root: {}, reqClass: _t, localStorage: wt, primaryStorage: "local" };
  2384. }, isMatch: function() {
  2385. return true;
  2386. }, runtime: "uni_app" };
  2387. mt.useAdapters(vt);
  2388. const It = mt, St = It.init;
  2389. It.init = function(e2) {
  2390. e2.env = e2.spaceId;
  2391. const t2 = St.call(this, e2);
  2392. t2.config.provider = "tencent", t2.config.spaceId = e2.spaceId;
  2393. const n2 = t2.auth;
  2394. return t2.auth = function(e3) {
  2395. const t3 = n2.call(this, e3);
  2396. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach((e4) => {
  2397. var n3;
  2398. t3[e4] = (n3 = t3[e4], function(e5) {
  2399. e5 = e5 || {};
  2400. const { success: t4, fail: s2, complete: r2 } = ee(e5);
  2401. if (!(t4 || s2 || r2))
  2402. return n3.call(this, e5);
  2403. n3.call(this, e5).then((e6) => {
  2404. t4 && t4(e6), r2 && r2(e6);
  2405. }, (e6) => {
  2406. s2 && s2(e6), r2 && r2(e6);
  2407. });
  2408. }).bind(t3);
  2409. }), t3;
  2410. }, t2.customAuth = t2.auth, t2;
  2411. };
  2412. var bt = It;
  2413. var kt = class extends pe {
  2414. getAccessToken() {
  2415. return new Promise((e2, t2) => {
  2416. const n2 = "Anonymous_Access_token";
  2417. this.setAccessToken(n2), e2(n2);
  2418. });
  2419. }
  2420. setupRequest(e2, t2) {
  2421. const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" };
  2422. "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = de.sign(n2, this.config.clientSecret);
  2423. const r2 = le();
  2424. s2["x-client-info"] = encodeURIComponent(JSON.stringify(r2));
  2425. const { token: i2 } = re();
  2426. return s2["x-client-token"] = i2, { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: JSON.parse(JSON.stringify(s2)) };
  2427. }
  2428. uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) {
  2429. return new Promise((o2, a2) => {
  2430. const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, success(e3) {
  2431. e3 && e3.statusCode < 400 ? o2(e3) : a2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  2432. }, fail(e3) {
  2433. a2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  2434. } });
  2435. "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => {
  2436. i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  2437. });
  2438. });
  2439. }
  2440. uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2 }) {
  2441. if (!t2)
  2442. throw new te({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });
  2443. let r2;
  2444. return this.getOSSUploadOptionsFromPath({ cloudPath: t2 }).then((t3) => {
  2445. const { url: i2, formData: o2, name: a2 } = t3.result;
  2446. r2 = t3.result.fileUrl;
  2447. const c2 = { url: i2, formData: o2, name: a2, filePath: e2, fileType: n2 };
  2448. return this.uploadFileToOSS(Object.assign({}, c2, { onUploadProgress: s2 }));
  2449. }).then(() => this.reportOSSUpload({ cloudPath: t2 })).then((t3) => new Promise((n3, s3) => {
  2450. t3.success ? n3({ success: true, filePath: e2, fileID: r2 }) : s3(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  2451. }));
  2452. }
  2453. deleteFile({ fileList: e2 }) {
  2454. const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e2 }) };
  2455. return this.request(this.setupRequest(t2)).then((e3) => {
  2456. if (e3.success)
  2457. return e3.result;
  2458. throw new te({ code: "DELETE_FILE_FAILED", message: "删除文件失败" });
  2459. });
  2460. }
  2461. getTempFileURL({ fileList: e2, maxAge: t2 } = {}) {
  2462. if (!Array.isArray(e2) || 0 === e2.length)
  2463. throw new te({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
  2464. const n2 = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e2, maxAge: t2 }) };
  2465. return this.request(this.setupRequest(n2)).then((e3) => {
  2466. if (e3.success)
  2467. return { fileList: e3.result.fileList.map((e4) => ({ fileID: e4.fileID, tempFileURL: e4.tempFileURL })) };
  2468. throw new te({ code: "GET_TEMP_FILE_URL_FAILED", message: "获取临时文件链接失败" });
  2469. });
  2470. }
  2471. };
  2472. var At = { init(e2) {
  2473. const t2 = new kt(e2), n2 = { signInAnonymously: function() {
  2474. return t2.authorize();
  2475. }, getLoginState: function() {
  2476. return Promise.resolve(false);
  2477. } };
  2478. return t2.auth = function() {
  2479. return n2;
  2480. }, t2.customAuth = t2.auth, t2;
  2481. } }, Ct = n(function(e2, t2) {
  2482. e2.exports = r.enc.Hex;
  2483. });
  2484. function Pt() {
  2485. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e2) {
  2486. var t2 = 16 * Math.random() | 0;
  2487. return ("x" === e2 ? t2 : 3 & t2 | 8).toString(16);
  2488. });
  2489. }
  2490. function Tt(e2 = "", t2 = {}) {
  2491. const { data: n2, functionName: s2, method: r2, headers: i2, signHeaderKeys: o2 = [], config: a2 } = t2, c2 = Date.now(), u2 = Pt(), h2 = Object.assign({}, i2, { "x-from-app-id": a2.spaceAppId, "x-from-env-id": a2.spaceId, "x-to-env-id": a2.spaceId, "x-from-instance-id": c2, "x-from-function-name": s2, "x-client-timestamp": c2, "x-alipay-source": "client", "x-request-id": u2, "x-alipay-callid": u2, "x-trace-id": u2 }), l2 = ["x-from-app-id", "x-from-env-id", "x-to-env-id", "x-from-instance-id", "x-from-function-name", "x-client-timestamp"].concat(o2), [d2 = "", p2 = ""] = e2.split("?") || [], f2 = function(e3) {
  2492. const t3 = e3.signedHeaders.join(";"), n3 = e3.signedHeaders.map((t4) => `${t4.toLowerCase()}:${e3.headers[t4]}
  2493. `).join(""), s3 = we(e3.body).toString(Ct), r3 = `${e3.method.toUpperCase()}
  2494. ${e3.path}
  2495. ${e3.query}
  2496. ${n3}
  2497. ${t3}
  2498. ${s3}
  2499. `, i3 = we(r3).toString(Ct), o3 = `HMAC-SHA256
  2500. ${e3.timestamp}
  2501. ${i3}
  2502. `, a3 = ve(o3, e3.secretKey).toString(Ct);
  2503. return `HMAC-SHA256 Credential=${e3.secretId}, SignedHeaders=${t3}, Signature=${a3}`;
  2504. }({ path: d2, query: p2, method: r2, headers: h2, timestamp: c2, body: JSON.stringify(n2), secretId: a2.accessKey, secretKey: a2.secretKey, signedHeaders: l2.sort() });
  2505. return { url: `${a2.endpoint}${e2}`, headers: Object.assign({}, h2, { Authorization: f2 }) };
  2506. }
  2507. function xt({ url: e2, data: t2, method: n2 = "POST", headers: s2 = {} }) {
  2508. return new Promise((r2, i2) => {
  2509. ne.request({ url: e2, method: n2, data: "object" == typeof t2 ? JSON.stringify(t2) : t2, header: s2, dataType: "json", complete: (e3 = {}) => {
  2510. const t3 = s2["x-trace-id"] || "";
  2511. if (!e3.statusCode || e3.statusCode >= 400) {
  2512. const { message: n3, errMsg: s3, trace_id: r3 } = e3.data || {};
  2513. return i2(new te({ code: "SYS_ERR", message: n3 || s3 || "request:fail", requestId: r3 || t3 }));
  2514. }
  2515. r2({ status: e3.statusCode, data: e3.data, headers: e3.header, requestId: t3 });
  2516. } });
  2517. });
  2518. }
  2519. function Ot(e2, t2) {
  2520. const { path: n2, data: s2, method: r2 = "GET" } = e2, { url: i2, headers: o2 } = Tt(n2, { functionName: "", data: s2, method: r2, headers: { "x-alipay-cloud-mode": "oss", "x-data-api-type": "oss", "x-expire-timestamp": Date.now() + 6e4 }, signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"], config: t2 });
  2521. return xt({ url: i2, data: s2, method: r2, headers: o2 }).then((e3) => {
  2522. const t3 = e3.data || {};
  2523. if (!t3.success)
  2524. throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId });
  2525. return t3.data || {};
  2526. }).catch((e3) => {
  2527. throw new te({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId });
  2528. });
  2529. }
  2530. function Et(e2 = "") {
  2531. const t2 = e2.trim().replace(/^cloud:\/\//, ""), n2 = t2.indexOf("/");
  2532. if (n2 <= 0)
  2533. throw new te({ code: "INVALID_PARAM", message: "fileID不合法" });
  2534. const s2 = t2.substring(0, n2), r2 = t2.substring(n2 + 1);
  2535. return s2 !== this.config.spaceId && console.warn("file ".concat(e2, " does not belong to env ").concat(this.config.spaceId)), r2;
  2536. }
  2537. function Lt(e2 = "") {
  2538. return "cloud://".concat(this.config.spaceId, "/").concat(e2.replace(/^\/+/, ""));
  2539. }
  2540. class Rt {
  2541. constructor(e2) {
  2542. this.config = e2;
  2543. }
  2544. signedURL(e2, t2 = {}) {
  2545. const n2 = `/ws/function/${e2}`, s2 = this.config.wsEndpoint.replace(/^ws(s)?:\/\//, ""), r2 = Object.assign({}, t2, { accessKeyId: this.config.accessKey, signatureNonce: Pt(), timestamp: "" + Date.now() }), i2 = [n2, ["accessKeyId", "authorization", "signatureNonce", "timestamp"].sort().map(function(e3) {
  2546. return r2[e3] ? "".concat(e3, "=").concat(r2[e3]) : null;
  2547. }).filter(Boolean).join("&"), `host:${s2}`].join("\n"), o2 = ["HMAC-SHA256", we(i2).toString(Ct)].join("\n"), a2 = ve(o2, this.config.secretKey).toString(Ct), c2 = Object.keys(r2).map((e3) => `${e3}=${encodeURIComponent(r2[e3])}`).join("&");
  2548. return `${this.config.wsEndpoint}${n2}?${c2}&signature=${a2}`;
  2549. }
  2550. }
  2551. var Ut = class {
  2552. constructor(e2) {
  2553. if (["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach((t2) => {
  2554. if (!Object.prototype.hasOwnProperty.call(e2, t2))
  2555. throw new Error(`${t2} required`);
  2556. }), e2.endpoint) {
  2557. if ("string" != typeof e2.endpoint)
  2558. throw new Error("endpoint must be string");
  2559. if (!/^https:\/\//.test(e2.endpoint))
  2560. throw new Error("endpoint must start with https://");
  2561. e2.endpoint = e2.endpoint.replace(/\/$/, "");
  2562. }
  2563. this.config = Object.assign({}, e2, { endpoint: e2.endpoint || `https://${e2.spaceId}.api-hz.cloudbasefunction.cn`, wsEndpoint: e2.wsEndpoint || `wss://${e2.spaceId}.api-hz.cloudbasefunction.cn` }), this._websocket = new Rt(this.config);
  2564. }
  2565. callFunction(e2) {
  2566. return function(e3, t2) {
  2567. const { name: n2, data: s2, async: r2 = false } = e3, i2 = "POST", o2 = { "x-to-function-name": n2 };
  2568. r2 && (o2["x-function-invoke-type"] = "async");
  2569. const { url: a2, headers: c2 } = Tt("/functions/invokeFunction", { functionName: n2, data: s2, method: i2, headers: o2, signHeaderKeys: ["x-to-function-name"], config: t2 });
  2570. return xt({ url: a2, data: s2, method: i2, headers: c2 }).then((e4) => {
  2571. let t3 = 0;
  2572. if (r2) {
  2573. const n3 = e4.data || {};
  2574. t3 = "200" === n3.errCode ? 0 : n3.errCode, e4.data = n3.data || {}, e4.errMsg = n3.errMsg;
  2575. }
  2576. if (0 !== t3)
  2577. throw new te({ code: t3, message: e4.errMsg, requestId: e4.requestId });
  2578. return { errCode: t3, success: 0 === t3, requestId: e4.requestId, result: e4.data };
  2579. }).catch((e4) => {
  2580. throw new te({ code: e4.errCode, message: e4.errMsg, requestId: e4.requestId });
  2581. });
  2582. }(e2, this.config);
  2583. }
  2584. uploadFileToOSS({ url: e2, filePath: t2, fileType: n2, formData: s2, onUploadProgress: r2 }) {
  2585. return new Promise((i2, o2) => {
  2586. const a2 = ne.uploadFile({ url: e2, filePath: t2, fileType: n2, formData: s2, name: "file", success(e3) {
  2587. e3 && e3.statusCode < 400 ? i2(e3) : o2(new te({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  2588. }, fail(e3) {
  2589. o2(new te({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  2590. } });
  2591. "function" == typeof r2 && a2 && "function" == typeof a2.onProgressUpdate && a2.onProgressUpdate((e3) => {
  2592. r2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  2593. });
  2594. });
  2595. }
  2596. async uploadFile({ filePath: e2, cloudPath: t2 = "", fileType: n2 = "image", onUploadProgress: s2 }) {
  2597. if ("string" !== f(t2))
  2598. throw new te({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
  2599. if (!(t2 = t2.trim()))
  2600. throw new te({ code: "INVALID_PARAM", message: "cloudPath不可为空" });
  2601. if (/:\/\//.test(t2))
  2602. throw new te({ code: "INVALID_PARAM", message: "cloudPath不合法" });
  2603. const r2 = await Ot({ path: "/".concat(t2.replace(/^\//, ""), "?post_url") }, this.config), { file_id: i2, upload_url: o2, form_data: a2 } = r2, c2 = a2 && a2.reduce((e3, t3) => (e3[t3.key] = t3.value, e3), {});
  2604. return this.uploadFileToOSS({ url: o2, filePath: e2, fileType: n2, formData: c2, onUploadProgress: s2 }).then(() => ({ fileID: i2 }));
  2605. }
  2606. async getTempFileURL({ fileList: e2 }) {
  2607. return new Promise((t2, n2) => {
  2608. (!e2 || e2.length < 0) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList不能为空数组" })), e2.length > 50 && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList数组长度不能超过50" }));
  2609. const s2 = [];
  2610. for (const t3 of e2) {
  2611. "string" !== f(t3) && n2(new te({ errCode: "INVALID_PARAM", errMsg: "fileList的元素必须是非空的字符串" }));
  2612. const e3 = Et.call(this, t3);
  2613. s2.push({ file_id: e3, expire: 600 });
  2614. }
  2615. Ot({ path: "/?download_url", data: { file_list: s2 }, method: "POST" }, this.config).then((e3) => {
  2616. const { file_list: n3 = [] } = e3;
  2617. t2({ fileList: n3.map((e4) => ({ fileID: Lt.call(this, e4.file_id), tempFileURL: e4.download_url })) });
  2618. }).catch((e3) => n2(e3));
  2619. });
  2620. }
  2621. async connectWebSocket(e2) {
  2622. const { name: t2, query: n2 } = e2;
  2623. return ne.connectSocket({ url: this._websocket.signedURL(t2, n2), complete: () => {
  2624. } });
  2625. }
  2626. };
  2627. var Nt = { init: (e2) => {
  2628. e2.provider = "alipay";
  2629. const t2 = new Ut(e2);
  2630. return t2.auth = function() {
  2631. return { signInAnonymously: function() {
  2632. return Promise.resolve();
  2633. }, getLoginState: function() {
  2634. return Promise.resolve(true);
  2635. } };
  2636. }, t2;
  2637. } };
  2638. function Dt({ data: e2 }) {
  2639. let t2;
  2640. t2 = le();
  2641. const n2 = JSON.parse(JSON.stringify(e2 || {}));
  2642. if (Object.assign(n2, { clientInfo: t2 }), !n2.uniIdToken) {
  2643. const { token: e3 } = re();
  2644. e3 && (n2.uniIdToken = e3);
  2645. }
  2646. return n2;
  2647. }
  2648. async function Mt({ name: e2, data: t2 } = {}) {
  2649. await this.__dev__.initLocalNetwork();
  2650. const { localAddress: n2, localPort: s2 } = this.__dev__, r2 = { aliyun: "aliyun", tencent: "tcb", alipay: "alipay" }[this.config.provider], i2 = this.config.spaceId, o2 = `http://${n2}:${s2}/system/check-function`, a2 = `http://${n2}:${s2}/cloudfunctions/${e2}`;
  2651. return new Promise((t3, n3) => {
  2652. ne.request({ method: "POST", url: o2, data: { name: e2, platform: C, provider: r2, spaceId: i2 }, timeout: 3e3, success(e3) {
  2653. t3(e3);
  2654. }, fail() {
  2655. t3({ data: { code: "NETWORK_ERROR", message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。" } });
  2656. } });
  2657. }).then(({ data: e3 } = {}) => {
  2658. const { code: t3, message: n3 } = e3 || {};
  2659. return { code: 0 === t3 ? 0 : t3 || "SYS_ERR", message: n3 || "SYS_ERR" };
  2660. }).then(({ code: n3, message: s3 }) => {
  2661. if (0 !== n3) {
  2662. switch (n3) {
  2663. case "MODULE_ENCRYPTED":
  2664. console.error(`此云函数(${e2})依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数`);
  2665. break;
  2666. case "FUNCTION_ENCRYPTED":
  2667. console.error(`此云函数(${e2})已加密不可本地调试,自动切换为云端已部署的云函数`);
  2668. break;
  2669. case "ACTION_ENCRYPTED":
  2670. console.error(s3 || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  2671. break;
  2672. case "NETWORK_ERROR":
  2673. console.error(s3 || "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下");
  2674. break;
  2675. case "SWITCH_TO_CLOUD":
  2676. break;
  2677. default: {
  2678. const e3 = `检测本地调试服务出现错误:${s3},请检查网络环境或重启客户端再试`;
  2679. throw console.error(e3), new Error(e3);
  2680. }
  2681. }
  2682. return this._callCloudFunction({ name: e2, data: t2 });
  2683. }
  2684. return new Promise((e3, n4) => {
  2685. const s4 = Dt.call(this, { data: t2 });
  2686. ne.request({ method: "POST", url: a2, data: { provider: r2, platform: C, param: s4 }, success: ({ statusCode: t3, data: s5 } = {}) => !t3 || t3 >= 400 ? n4(new te({ code: s5.code || "SYS_ERR", message: s5.message || "request:fail" })) : e3({ result: s5 }), fail(e4) {
  2687. n4(new te({ code: e4.code || e4.errCode || "SYS_ERR", message: e4.message || e4.errMsg || "request:fail" }));
  2688. } });
  2689. });
  2690. });
  2691. }
  2692. const qt = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }];
  2693. var Ft = /[\\^$.*+?()[\]{}|]/g, Kt = RegExp(Ft.source);
  2694. function jt(e2, t2, n2) {
  2695. return e2.replace(new RegExp((s2 = t2) && Kt.test(s2) ? s2.replace(Ft, "\\$&") : s2, "g"), n2);
  2696. var s2;
  2697. }
  2698. const Bt = "request", Wt = "response", Ht = "both";
  2699. const Tn = { code: 2e4, message: "System error" }, xn = { code: 20101, message: "Invalid client" };
  2700. function Ln(e2) {
  2701. const { errSubject: t2, subject: n2, errCode: s2, errMsg: r2, code: i2, message: o2, cause: a2 } = e2 || {};
  2702. return new te({ subject: t2 || n2 || "uni-secure-network", code: s2 || i2 || Tn.code, message: r2 || o2, cause: a2 });
  2703. }
  2704. let Un;
  2705. function Fn({ secretType: e2 } = {}) {
  2706. return e2 === Bt || e2 === Wt || e2 === Ht;
  2707. }
  2708. function Kn({ name: e2, data: t2 = {} } = {}) {
  2709. return "DCloud-clientDB" === e2 && "encryption" === t2.redirectTo && "getAppClientKey" === t2.action;
  2710. }
  2711. function jn({ provider: e2, spaceId: t2, functionName: n2 } = {}) {
  2712. const { appId: s2, uniPlatform: r2, osName: i2 } = ce();
  2713. let o2 = r2;
  2714. "app" === r2 && (o2 = i2);
  2715. const a2 = function({ provider: e3, spaceId: t3 } = {}) {
  2716. const n3 = A;
  2717. if (!n3)
  2718. return {};
  2719. e3 = /* @__PURE__ */ function(e4) {
  2720. return "tencent" === e4 ? "tcb" : e4;
  2721. }(e3);
  2722. const s3 = n3.find((n4) => n4.provider === e3 && n4.spaceId === t3);
  2723. return s3 && s3.config;
  2724. }({ provider: e2, spaceId: t2 });
  2725. if (!a2 || !a2.accessControl || !a2.accessControl.enable)
  2726. return false;
  2727. const c2 = a2.accessControl.function || {}, u2 = Object.keys(c2);
  2728. if (0 === u2.length)
  2729. return true;
  2730. const h2 = function(e3, t3) {
  2731. let n3, s3, r3;
  2732. for (let i3 = 0; i3 < e3.length; i3++) {
  2733. const o3 = e3[i3];
  2734. o3 !== t3 ? "*" !== o3 ? o3.split(",").map((e4) => e4.trim()).indexOf(t3) > -1 && (s3 = o3) : r3 = o3 : n3 = o3;
  2735. }
  2736. return n3 || s3 || r3;
  2737. }(u2, n2);
  2738. if (!h2)
  2739. return false;
  2740. if ((c2[h2] || []).find((e3 = {}) => e3.appId === s2 && (e3.platform || "").toLowerCase() === o2.toLowerCase()))
  2741. return true;
  2742. throw console.error(`此应用[appId: ${s2}, platform: ${o2}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`), Ln(xn);
  2743. }
  2744. function $n({ functionName: e2, result: t2, logPvd: n2 }) {
  2745. if (this.__dev__.debugLog && t2 && t2.requestId) {
  2746. const s2 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e2, requestId: t2.requestId });
  2747. console.log(`[${n2}-request]${s2}[/${n2}-request]`);
  2748. }
  2749. }
  2750. function Bn(e2) {
  2751. const t2 = e2.callFunction, n2 = function(n3) {
  2752. const s2 = n3.name;
  2753. n3.data = Dt.call(e2, { data: n3.data });
  2754. const r2 = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb", alipay: "alipay" }[this.config.provider], i2 = Fn(n3), o2 = Kn(n3), a2 = i2 || o2;
  2755. return t2.call(this, n3).then((e3) => (e3.errCode = 0, !a2 && $n.call(this, { functionName: s2, result: e3, logPvd: r2 }), Promise.resolve(e3)), (e3) => (!a2 && $n.call(this, { functionName: s2, result: e3, logPvd: r2 }), e3 && e3.message && (e3.message = function({ message: e4 = "", extraInfo: t3 = {}, formatter: n4 = [] } = {}) {
  2756. for (let s3 = 0; s3 < n4.length; s3++) {
  2757. const { rule: r3, content: i3, mode: o3 } = n4[s3], a3 = e4.match(r3);
  2758. if (!a3)
  2759. continue;
  2760. let c2 = i3;
  2761. for (let e5 = 1; e5 < a3.length; e5++)
  2762. c2 = jt(c2, `{$${e5}}`, a3[e5]);
  2763. for (const e5 in t3)
  2764. c2 = jt(c2, `{${e5}}`, t3[e5]);
  2765. return "replace" === o3 ? c2 : e4 + c2;
  2766. }
  2767. return e4;
  2768. }({ message: `[${n3.name}]: ${e3.message}`, formatter: qt, extraInfo: { functionName: s2 } })), Promise.reject(e3)));
  2769. };
  2770. e2.callFunction = function(t3) {
  2771. const { provider: s2, spaceId: r2 } = e2.config, i2 = t3.name;
  2772. let o2, a2;
  2773. if (t3.data = t3.data || {}, e2.__dev__.debugInfo && !e2.__dev__.debugInfo.forceRemote && T ? (e2._callCloudFunction || (e2._callCloudFunction = n2, e2._callLocalFunction = Mt), o2 = Mt) : o2 = n2, o2 = o2.bind(e2), Kn(t3))
  2774. a2 = n2.call(e2, t3);
  2775. else if (Fn(t3)) {
  2776. a2 = new Un({ secretType: t3.secretType, uniCloudIns: e2 }).wrapEncryptDataCallFunction(n2.bind(e2))(t3);
  2777. } else if (jn({ provider: s2, spaceId: r2, functionName: i2 })) {
  2778. a2 = new Un({ secretType: t3.secretType, uniCloudIns: e2 }).wrapVerifyClientCallFunction(n2.bind(e2))(t3);
  2779. } else
  2780. a2 = o2(t3);
  2781. return Object.defineProperty(a2, "result", { get: () => (console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {}) }), a2.then((e3) => ("undefined" != typeof UTSJSONObject && (e3.result = new UTSJSONObject(e3.result)), e3));
  2782. };
  2783. }
  2784. Un = class {
  2785. constructor() {
  2786. throw Ln({ message: `Platform ${C} is not enabled, please check whether secure network module is enabled in your manifest.json` });
  2787. }
  2788. };
  2789. const Wn = Symbol("CLIENT_DB_INTERNAL");
  2790. function Hn(e2, t2) {
  2791. return e2.then = "DoNotReturnProxyWithAFunctionNamedThen", e2._internalType = Wn, e2.inspect = null, e2.__v_raw = void 0, new Proxy(e2, { get(e3, n2, s2) {
  2792. if ("_uniClient" === n2)
  2793. return null;
  2794. if ("symbol" == typeof n2)
  2795. return e3[n2];
  2796. if (n2 in e3 || "string" != typeof n2) {
  2797. const t3 = e3[n2];
  2798. return "function" == typeof t3 ? t3.bind(e3) : t3;
  2799. }
  2800. return t2.get(e3, n2, s2);
  2801. } });
  2802. }
  2803. function zn(e2) {
  2804. return { on: (t2, n2) => {
  2805. e2[t2] = e2[t2] || [], e2[t2].indexOf(n2) > -1 || e2[t2].push(n2);
  2806. }, off: (t2, n2) => {
  2807. e2[t2] = e2[t2] || [];
  2808. const s2 = e2[t2].indexOf(n2);
  2809. -1 !== s2 && e2[t2].splice(s2, 1);
  2810. } };
  2811. }
  2812. const Jn = ["db.Geo", "db.command", "command.aggregate"];
  2813. function Vn(e2, t2) {
  2814. return Jn.indexOf(`${e2}.${t2}`) > -1;
  2815. }
  2816. function Gn(e2) {
  2817. switch (f(e2 = se(e2))) {
  2818. case "array":
  2819. return e2.map((e3) => Gn(e3));
  2820. case "object":
  2821. return e2._internalType === Wn || Object.keys(e2).forEach((t2) => {
  2822. e2[t2] = Gn(e2[t2]);
  2823. }), e2;
  2824. case "regexp":
  2825. return { $regexp: { source: e2.source, flags: e2.flags } };
  2826. case "date":
  2827. return { $date: e2.toISOString() };
  2828. default:
  2829. return e2;
  2830. }
  2831. }
  2832. function Yn(e2) {
  2833. return e2 && e2.content && e2.content.$method;
  2834. }
  2835. class Qn {
  2836. constructor(e2, t2, n2) {
  2837. this.content = e2, this.prevStage = t2 || null, this.udb = null, this._database = n2;
  2838. }
  2839. toJSON() {
  2840. let e2 = this;
  2841. const t2 = [e2.content];
  2842. for (; e2.prevStage; )
  2843. e2 = e2.prevStage, t2.push(e2.content);
  2844. return { $db: t2.reverse().map((e3) => ({ $method: e3.$method, $param: Gn(e3.$param) })) };
  2845. }
  2846. toString() {
  2847. return JSON.stringify(this.toJSON());
  2848. }
  2849. getAction() {
  2850. const e2 = this.toJSON().$db.find((e3) => "action" === e3.$method);
  2851. return e2 && e2.$param && e2.$param[0];
  2852. }
  2853. getCommand() {
  2854. return { $db: this.toJSON().$db.filter((e2) => "action" !== e2.$method) };
  2855. }
  2856. get isAggregate() {
  2857. let e2 = this;
  2858. for (; e2; ) {
  2859. const t2 = Yn(e2), n2 = Yn(e2.prevStage);
  2860. if ("aggregate" === t2 && "collection" === n2 || "pipeline" === t2)
  2861. return true;
  2862. e2 = e2.prevStage;
  2863. }
  2864. return false;
  2865. }
  2866. get isCommand() {
  2867. let e2 = this;
  2868. for (; e2; ) {
  2869. if ("command" === Yn(e2))
  2870. return true;
  2871. e2 = e2.prevStage;
  2872. }
  2873. return false;
  2874. }
  2875. get isAggregateCommand() {
  2876. let e2 = this;
  2877. for (; e2; ) {
  2878. const t2 = Yn(e2), n2 = Yn(e2.prevStage);
  2879. if ("aggregate" === t2 && "command" === n2)
  2880. return true;
  2881. e2 = e2.prevStage;
  2882. }
  2883. return false;
  2884. }
  2885. getNextStageFn(e2) {
  2886. const t2 = this;
  2887. return function() {
  2888. return Xn({ $method: e2, $param: Gn(Array.from(arguments)) }, t2, t2._database);
  2889. };
  2890. }
  2891. get count() {
  2892. return this.isAggregate ? this.getNextStageFn("count") : function() {
  2893. return this._send("count", Array.from(arguments));
  2894. };
  2895. }
  2896. get remove() {
  2897. return this.isCommand ? this.getNextStageFn("remove") : function() {
  2898. return this._send("remove", Array.from(arguments));
  2899. };
  2900. }
  2901. get() {
  2902. return this._send("get", Array.from(arguments));
  2903. }
  2904. get add() {
  2905. return this.isCommand ? this.getNextStageFn("add") : function() {
  2906. return this._send("add", Array.from(arguments));
  2907. };
  2908. }
  2909. update() {
  2910. return this._send("update", Array.from(arguments));
  2911. }
  2912. end() {
  2913. return this._send("end", Array.from(arguments));
  2914. }
  2915. get set() {
  2916. return this.isCommand ? this.getNextStageFn("set") : function() {
  2917. throw new Error("JQL禁止使用set方法");
  2918. };
  2919. }
  2920. _send(e2, t2) {
  2921. const n2 = this.getAction(), s2 = this.getCommand();
  2922. if (s2.$db.push({ $method: e2, $param: Gn(t2) }), S) {
  2923. const e3 = s2.$db.find((e4) => "collection" === e4.$method), t3 = e3 && e3.$param;
  2924. t3 && 1 === t3.length && "string" == typeof e3.$param[0] && e3.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  2925. }
  2926. return this._database._callCloudFunction({ action: n2, command: s2 });
  2927. }
  2928. }
  2929. function Xn(e2, t2, n2) {
  2930. return Hn(new Qn(e2, t2, n2), { get(e3, t3) {
  2931. let s2 = "db";
  2932. return e3 && e3.content && (s2 = e3.content.$method), Vn(s2, t3) ? Xn({ $method: t3 }, e3, n2) : function() {
  2933. return Xn({ $method: t3, $param: Gn(Array.from(arguments)) }, e3, n2);
  2934. };
  2935. } });
  2936. }
  2937. function Zn({ path: e2, method: t2 }) {
  2938. return class {
  2939. constructor() {
  2940. this.param = Array.from(arguments);
  2941. }
  2942. toJSON() {
  2943. return { $newDb: [...e2.map((e3) => ({ $method: e3 })), { $method: t2, $param: this.param }] };
  2944. }
  2945. toString() {
  2946. return JSON.stringify(this.toJSON());
  2947. }
  2948. };
  2949. }
  2950. function es$1(e2, t2 = {}) {
  2951. return Hn(new e2(t2), { get: (e3, t3) => Vn("db", t3) ? Xn({ $method: t3 }, null, e3) : function() {
  2952. return Xn({ $method: t3, $param: Gn(Array.from(arguments)) }, null, e3);
  2953. } });
  2954. }
  2955. class ts extends class {
  2956. constructor({ uniClient: e2 = {}, isJQL: t2 = false } = {}) {
  2957. this._uniClient = e2, this._authCallBacks = {}, this._dbCallBacks = {}, e2._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t2 || (this.auth = zn(this._authCallBacks)), this._isJQL = t2, Object.assign(this, zn(this._dbCallBacks)), this.env = Hn({}, { get: (e3, t3) => ({ $env: t3 }) }), this.Geo = Hn({}, { get: (e3, t3) => Zn({ path: ["Geo"], method: t3 }) }), this.serverDate = Zn({ path: [], method: "serverDate" }), this.RegExp = Zn({ path: [], method: "RegExp" });
  2958. }
  2959. getCloudEnv(e2) {
  2960. if ("string" != typeof e2 || !e2.trim())
  2961. throw new Error("getCloudEnv参数错误");
  2962. return { $env: e2.replace("$cloudEnv_", "") };
  2963. }
  2964. _callback(e2, t2) {
  2965. const n2 = this._dbCallBacks;
  2966. n2[e2] && n2[e2].forEach((e3) => {
  2967. e3(...t2);
  2968. });
  2969. }
  2970. _callbackAuth(e2, t2) {
  2971. const n2 = this._authCallBacks;
  2972. n2[e2] && n2[e2].forEach((e3) => {
  2973. e3(...t2);
  2974. });
  2975. }
  2976. multiSend() {
  2977. const e2 = Array.from(arguments), t2 = e2.map((e3) => {
  2978. const t3 = e3.getAction(), n2 = e3.getCommand();
  2979. if ("getTemp" !== n2.$db[n2.$db.length - 1].$method)
  2980. throw new Error("multiSend只支持子命令内使用getTemp");
  2981. return { action: t3, command: n2 };
  2982. });
  2983. return this._callCloudFunction({ multiCommand: t2, queryList: e2 });
  2984. }
  2985. } {
  2986. _parseResult(e2) {
  2987. return this._isJQL ? e2.result : e2;
  2988. }
  2989. _callCloudFunction({ action: e2, command: t2, multiCommand: n2, queryList: s2 }) {
  2990. function r2(e3, t3) {
  2991. if (n2 && s2)
  2992. for (let n3 = 0; n3 < s2.length; n3++) {
  2993. const r3 = s2[n3];
  2994. r3.udb && "function" == typeof r3.udb.setResult && (t3 ? r3.udb.setResult(t3) : r3.udb.setResult(e3.result.dataList[n3]));
  2995. }
  2996. }
  2997. const i2 = this, o2 = this._isJQL ? "databaseForJQL" : "database";
  2998. function a2(e3) {
  2999. return i2._callback("error", [e3]), M(q(o2, "fail"), e3).then(() => M(q(o2, "complete"), e3)).then(() => (r2(null, e3), Y(j, { type: W, content: e3 }), Promise.reject(e3)));
  3000. }
  3001. const c2 = M(q(o2, "invoke")), u2 = this._uniClient;
  3002. return c2.then(() => u2.callFunction({ name: "DCloud-clientDB", type: h, data: { action: e2, command: t2, multiCommand: n2 } })).then((e3) => {
  3003. const { code: t3, message: n3, token: s3, tokenExpired: c3, systemInfo: u3 = [] } = e3.result;
  3004. if (u3)
  3005. for (let e4 = 0; e4 < u3.length; e4++) {
  3006. const { level: t4, message: n4, detail: s4 } = u3[e4], r3 = console["warn" === t4 ? "error" : t4] || console.log;
  3007. let i3 = "[System Info]" + n4;
  3008. s4 && (i3 = `${i3}
  3009. 详细信息:${s4}`), r3(i3);
  3010. }
  3011. if (t3) {
  3012. return a2(new te({ code: t3, message: n3, requestId: e3.requestId }));
  3013. }
  3014. e3.result.errCode = e3.result.errCode || e3.result.code, e3.result.errMsg = e3.result.errMsg || e3.result.message, s3 && c3 && (ie({ token: s3, tokenExpired: c3 }), this._callbackAuth("refreshToken", [{ token: s3, tokenExpired: c3 }]), this._callback("refreshToken", [{ token: s3, tokenExpired: c3 }]), Y(B, { token: s3, tokenExpired: c3 }));
  3015. const h2 = [{ prop: "affectedDocs", tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代" }, { prop: "code", tips: "code不再推荐使用,请使用errCode替代" }, { prop: "message", tips: "message不再推荐使用,请使用errMsg替代" }];
  3016. for (let t4 = 0; t4 < h2.length; t4++) {
  3017. const { prop: n4, tips: s4 } = h2[t4];
  3018. if (n4 in e3.result) {
  3019. const t5 = e3.result[n4];
  3020. Object.defineProperty(e3.result, n4, { get: () => (console.warn(s4), t5) });
  3021. }
  3022. }
  3023. return function(e4) {
  3024. return M(q(o2, "success"), e4).then(() => M(q(o2, "complete"), e4)).then(() => {
  3025. r2(e4, null);
  3026. const t4 = i2._parseResult(e4);
  3027. return Y(j, { type: W, content: t4 }), Promise.resolve(t4);
  3028. });
  3029. }(e3);
  3030. }, (e3) => {
  3031. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e3.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  3032. return a2(new te({ code: e3.code || "SYSTEM_ERROR", message: e3.message, requestId: e3.requestId }));
  3033. });
  3034. }
  3035. }
  3036. const ns = "token无效,跳转登录页面", ss = "token过期,跳转登录页面", rs = { TOKEN_INVALID_TOKEN_EXPIRED: ss, TOKEN_INVALID_INVALID_CLIENTID: ns, TOKEN_INVALID: ns, TOKEN_INVALID_WRONG_TOKEN: ns, TOKEN_INVALID_ANONYMOUS_USER: ns }, is = { "uni-id-token-expired": ss, "uni-id-check-token-failed": ns, "uni-id-token-not-exist": ns, "uni-id-check-device-feature-failed": ns };
  3037. function os(e2, t2) {
  3038. let n2 = "";
  3039. return n2 = e2 ? `${e2}/${t2}` : t2, n2.replace(/^\//, "");
  3040. }
  3041. function as(e2 = [], t2 = "") {
  3042. const n2 = [], s2 = [];
  3043. return e2.forEach((e3) => {
  3044. true === e3.needLogin ? n2.push(os(t2, e3.path)) : false === e3.needLogin && s2.push(os(t2, e3.path));
  3045. }), { needLoginPage: n2, notNeedLoginPage: s2 };
  3046. }
  3047. function cs(e2) {
  3048. return e2.split("?")[0].replace(/^\//, "");
  3049. }
  3050. function us() {
  3051. return function(e2) {
  3052. let t2 = e2 && e2.$page && e2.$page.fullPath || "";
  3053. return t2 ? ("/" !== t2.charAt(0) && (t2 = "/" + t2), t2) : t2;
  3054. }(function() {
  3055. const e2 = getCurrentPages();
  3056. return e2[e2.length - 1];
  3057. }());
  3058. }
  3059. function hs() {
  3060. return cs(us());
  3061. }
  3062. function ls(e2 = "", t2 = {}) {
  3063. if (!e2)
  3064. return false;
  3065. if (!(t2 && t2.list && t2.list.length))
  3066. return false;
  3067. const n2 = t2.list, s2 = cs(e2);
  3068. return n2.some((e3) => e3.pagePath === s2);
  3069. }
  3070. const ds = !!e.uniIdRouter;
  3071. const { loginPage: ps, routerNeedLogin: fs, resToLogin: gs, needLoginPage: ms, notNeedLoginPage: ys, loginPageInTabBar: _s } = function({ pages: t2 = [], subPackages: n2 = [], uniIdRouter: s2 = {}, tabBar: r2 = {} } = e) {
  3072. const { loginPage: i2, needLogin: o2 = [], resToLogin: a2 = true } = s2, { needLoginPage: c2, notNeedLoginPage: u2 } = as(t2), { needLoginPage: h2, notNeedLoginPage: l2 } = function(e2 = []) {
  3073. const t3 = [], n3 = [];
  3074. return e2.forEach((e3) => {
  3075. const { root: s3, pages: r3 = [] } = e3, { needLoginPage: i3, notNeedLoginPage: o3 } = as(r3, s3);
  3076. t3.push(...i3), n3.push(...o3);
  3077. }), { needLoginPage: t3, notNeedLoginPage: n3 };
  3078. }(n2);
  3079. return { loginPage: i2, routerNeedLogin: o2, resToLogin: a2, needLoginPage: [...c2, ...h2], notNeedLoginPage: [...u2, ...l2], loginPageInTabBar: ls(i2, r2) };
  3080. }();
  3081. if (ms.indexOf(ps) > -1)
  3082. throw new Error(`Login page [${ps}] should not be "needLogin", please check your pages.json`);
  3083. function ws(e2) {
  3084. const t2 = hs();
  3085. if ("/" === e2.charAt(0))
  3086. return e2;
  3087. const [n2, s2] = e2.split("?"), r2 = n2.replace(/^\//, "").split("/"), i2 = t2.split("/");
  3088. i2.pop();
  3089. for (let e3 = 0; e3 < r2.length; e3++) {
  3090. const t3 = r2[e3];
  3091. ".." === t3 ? i2.pop() : "." !== t3 && i2.push(t3);
  3092. }
  3093. return "" === i2[0] && i2.shift(), "/" + i2.join("/") + (s2 ? "?" + s2 : "");
  3094. }
  3095. function vs(e2) {
  3096. const t2 = cs(ws(e2));
  3097. return !(ys.indexOf(t2) > -1) && (ms.indexOf(t2) > -1 || fs.some((t3) => function(e3, t4) {
  3098. return new RegExp(t4).test(e3);
  3099. }(e2, t3)));
  3100. }
  3101. function Is({ redirect: e2 }) {
  3102. const t2 = cs(e2), n2 = cs(ps);
  3103. return hs() !== n2 && t2 !== n2;
  3104. }
  3105. function Ss({ api: e2, redirect: t2 } = {}) {
  3106. if (!t2 || !Is({ redirect: t2 }))
  3107. return;
  3108. const n2 = function(e3, t3) {
  3109. return "/" !== e3.charAt(0) && (e3 = "/" + e3), t3 ? e3.indexOf("?") > -1 ? e3 + `&uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3 + `?uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3;
  3110. }(ps, t2);
  3111. _s ? "navigateTo" !== e2 && "redirectTo" !== e2 || (e2 = "switchTab") : "switchTab" === e2 && (e2 = "navigateTo");
  3112. const s2 = { navigateTo: uni.navigateTo, redirectTo: uni.redirectTo, switchTab: uni.switchTab, reLaunch: uni.reLaunch };
  3113. setTimeout(() => {
  3114. s2[e2]({ url: n2 });
  3115. }, 0);
  3116. }
  3117. function bs({ url: e2 } = {}) {
  3118. const t2 = { abortLoginPageJump: false, autoToLoginPage: false }, n2 = function() {
  3119. const { token: e3, tokenExpired: t3 } = re();
  3120. let n3;
  3121. if (e3) {
  3122. if (t3 < Date.now()) {
  3123. const e4 = "uni-id-token-expired";
  3124. n3 = { errCode: e4, errMsg: is[e4] };
  3125. }
  3126. } else {
  3127. const e4 = "uni-id-check-token-failed";
  3128. n3 = { errCode: e4, errMsg: is[e4] };
  3129. }
  3130. return n3;
  3131. }();
  3132. if (vs(e2) && n2) {
  3133. n2.uniIdRedirectUrl = e2;
  3134. if (J($).length > 0)
  3135. return setTimeout(() => {
  3136. Y($, n2);
  3137. }, 0), t2.abortLoginPageJump = true, t2;
  3138. t2.autoToLoginPage = true;
  3139. }
  3140. return t2;
  3141. }
  3142. function ks() {
  3143. !function() {
  3144. const e3 = us(), { abortLoginPageJump: t2, autoToLoginPage: n2 } = bs({ url: e3 });
  3145. t2 || n2 && Ss({ api: "redirectTo", redirect: e3 });
  3146. }();
  3147. const e2 = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  3148. for (let t2 = 0; t2 < e2.length; t2++) {
  3149. const n2 = e2[t2];
  3150. uni.addInterceptor(n2, { invoke(e3) {
  3151. const { abortLoginPageJump: t3, autoToLoginPage: s2 } = bs({ url: e3.url });
  3152. return t3 ? e3 : s2 ? (Ss({ api: n2, redirect: ws(e3.url) }), false) : e3;
  3153. } });
  3154. }
  3155. }
  3156. function As() {
  3157. this.onResponse((e2) => {
  3158. const { type: t2, content: n2 } = e2;
  3159. let s2 = false;
  3160. switch (t2) {
  3161. case "cloudobject":
  3162. s2 = function(e3) {
  3163. if ("object" != typeof e3)
  3164. return false;
  3165. const { errCode: t3 } = e3 || {};
  3166. return t3 in is;
  3167. }(n2);
  3168. break;
  3169. case "clientdb":
  3170. s2 = function(e3) {
  3171. if ("object" != typeof e3)
  3172. return false;
  3173. const { errCode: t3 } = e3 || {};
  3174. return t3 in rs;
  3175. }(n2);
  3176. }
  3177. s2 && function(e3 = {}) {
  3178. const t3 = J($);
  3179. Z().then(() => {
  3180. const n3 = us();
  3181. if (n3 && Is({ redirect: n3 }))
  3182. return t3.length > 0 ? Y($, Object.assign({ uniIdRedirectUrl: n3 }, e3)) : void (ps && Ss({ api: "navigateTo", redirect: n3 }));
  3183. });
  3184. }(n2);
  3185. });
  3186. }
  3187. function Cs(e2) {
  3188. !function(e3) {
  3189. e3.onResponse = function(e4) {
  3190. V(j, e4);
  3191. }, e3.offResponse = function(e4) {
  3192. G(j, e4);
  3193. };
  3194. }(e2), function(e3) {
  3195. e3.onNeedLogin = function(e4) {
  3196. V($, e4);
  3197. }, e3.offNeedLogin = function(e4) {
  3198. G($, e4);
  3199. }, ds && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = true, Z().then(() => {
  3200. ks.call(e3);
  3201. }), gs && As.call(e3)));
  3202. }(e2), function(e3) {
  3203. e3.onRefreshToken = function(e4) {
  3204. V(B, e4);
  3205. }, e3.offRefreshToken = function(e4) {
  3206. G(B, e4);
  3207. };
  3208. }(e2);
  3209. }
  3210. let Ps;
  3211. const Ts = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", xs = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  3212. function Os() {
  3213. const e2 = re().token || "", t2 = e2.split(".");
  3214. if (!e2 || 3 !== t2.length)
  3215. return { uid: null, role: [], permission: [], tokenExpired: 0 };
  3216. let n2;
  3217. try {
  3218. n2 = JSON.parse((s2 = t2[1], decodeURIComponent(Ps(s2).split("").map(function(e3) {
  3219. return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2);
  3220. }).join(""))));
  3221. } catch (e3) {
  3222. throw new Error("获取当前用户信息出错,详细错误信息为:" + e3.message);
  3223. }
  3224. var s2;
  3225. return n2.tokenExpired = 1e3 * n2.exp, delete n2.exp, delete n2.iat, n2;
  3226. }
  3227. Ps = "function" != typeof atob ? function(e2) {
  3228. if (e2 = String(e2).replace(/[\t\n\f\r ]+/g, ""), !xs.test(e2))
  3229. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  3230. var t2;
  3231. e2 += "==".slice(2 - (3 & e2.length));
  3232. for (var n2, s2, r2 = "", i2 = 0; i2 < e2.length; )
  3233. t2 = Ts.indexOf(e2.charAt(i2++)) << 18 | Ts.indexOf(e2.charAt(i2++)) << 12 | (n2 = Ts.indexOf(e2.charAt(i2++))) << 6 | (s2 = Ts.indexOf(e2.charAt(i2++))), r2 += 64 === n2 ? String.fromCharCode(t2 >> 16 & 255) : 64 === s2 ? String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255) : String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255, 255 & t2);
  3234. return r2;
  3235. } : atob;
  3236. var Es = n(function(e2, t2) {
  3237. Object.defineProperty(t2, "__esModule", { value: true });
  3238. const n2 = "chooseAndUploadFile:ok", s2 = "chooseAndUploadFile:fail";
  3239. function r2(e3, t3) {
  3240. return e3.tempFiles.forEach((e4, n3) => {
  3241. e4.name || (e4.name = e4.path.substring(e4.path.lastIndexOf("/") + 1)), t3 && (e4.fileType = t3), e4.cloudPath = Date.now() + "_" + n3 + e4.name.substring(e4.name.lastIndexOf("."));
  3242. }), e3.tempFilePaths || (e3.tempFilePaths = e3.tempFiles.map((e4) => e4.path)), e3;
  3243. }
  3244. function i2(e3, t3, { onChooseFile: s3, onUploadProgress: r3 }) {
  3245. return t3.then((e4) => {
  3246. if (s3) {
  3247. const t4 = s3(e4);
  3248. if (void 0 !== t4)
  3249. return Promise.resolve(t4).then((t5) => void 0 === t5 ? e4 : t5);
  3250. }
  3251. return e4;
  3252. }).then((t4) => false === t4 ? { errMsg: n2, tempFilePaths: [], tempFiles: [] } : function(e4, t5, s4 = 5, r4) {
  3253. (t5 = Object.assign({}, t5)).errMsg = n2;
  3254. const i3 = t5.tempFiles, o2 = i3.length;
  3255. let a2 = 0;
  3256. return new Promise((n3) => {
  3257. for (; a2 < s4; )
  3258. c2();
  3259. function c2() {
  3260. const s5 = a2++;
  3261. if (s5 >= o2)
  3262. return void (!i3.find((e5) => !e5.url && !e5.errMsg) && n3(t5));
  3263. const u2 = i3[s5];
  3264. e4.uploadFile({ provider: u2.provider, filePath: u2.path, cloudPath: u2.cloudPath, fileType: u2.fileType, cloudPathAsRealPath: u2.cloudPathAsRealPath, onUploadProgress(e5) {
  3265. e5.index = s5, e5.tempFile = u2, e5.tempFilePath = u2.path, r4 && r4(e5);
  3266. } }).then((e5) => {
  3267. u2.url = e5.fileID, s5 < o2 && c2();
  3268. }).catch((e5) => {
  3269. u2.errMsg = e5.errMsg || e5.message, s5 < o2 && c2();
  3270. });
  3271. }
  3272. });
  3273. }(e3, t4, 5, r3));
  3274. }
  3275. t2.initChooseAndUploadFile = function(e3) {
  3276. return function(t3 = { type: "all" }) {
  3277. return "image" === t3.type ? i2(e3, function(e4) {
  3278. const { count: t4, sizeType: n3, sourceType: i3 = ["album", "camera"], extension: o2 } = e4;
  3279. return new Promise((e5, a2) => {
  3280. uni.chooseImage({ count: t4, sizeType: n3, sourceType: i3, extension: o2, success(t5) {
  3281. e5(r2(t5, "image"));
  3282. }, fail(e6) {
  3283. a2({ errMsg: e6.errMsg.replace("chooseImage:fail", s2) });
  3284. } });
  3285. });
  3286. }(t3), t3) : "video" === t3.type ? i2(e3, function(e4) {
  3287. const { camera: t4, compressed: n3, maxDuration: i3, sourceType: o2 = ["album", "camera"], extension: a2 } = e4;
  3288. return new Promise((e5, c2) => {
  3289. uni.chooseVideo({ camera: t4, compressed: n3, maxDuration: i3, sourceType: o2, extension: a2, success(t5) {
  3290. const { tempFilePath: n4, duration: s3, size: i4, height: o3, width: a3 } = t5;
  3291. e5(r2({ errMsg: "chooseVideo:ok", tempFilePaths: [n4], tempFiles: [{ name: t5.tempFile && t5.tempFile.name || "", path: n4, size: i4, type: t5.tempFile && t5.tempFile.type || "", width: a3, height: o3, duration: s3, fileType: "video", cloudPath: "" }] }, "video"));
  3292. }, fail(e6) {
  3293. c2({ errMsg: e6.errMsg.replace("chooseVideo:fail", s2) });
  3294. } });
  3295. });
  3296. }(t3), t3) : i2(e3, function(e4) {
  3297. const { count: t4, extension: n3 } = e4;
  3298. return new Promise((e5, i3) => {
  3299. let o2 = uni.chooseFile;
  3300. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o2 = wx.chooseMessageFile), "function" != typeof o2)
  3301. return i3({ errMsg: s2 + " 请指定 type 类型,该平台仅支持选择 image 或 video。" });
  3302. o2({ type: "all", count: t4, extension: n3, success(t5) {
  3303. e5(r2(t5));
  3304. }, fail(e6) {
  3305. i3({ errMsg: e6.errMsg.replace("chooseFile:fail", s2) });
  3306. } });
  3307. });
  3308. }(t3), t3);
  3309. };
  3310. };
  3311. }), Ls = t$2(Es);
  3312. const Rs = "manual";
  3313. function Us(e2) {
  3314. return { props: { localdata: { type: Array, default: () => [] }, options: { type: [Object, Array], default: () => ({}) }, spaceInfo: { type: Object, default: () => ({}) }, collection: { type: [String, Array], default: "" }, action: { type: String, default: "" }, field: { type: String, default: "" }, orderby: { type: String, default: "" }, where: { type: [String, Object], default: "" }, pageData: { type: String, default: "add" }, pageCurrent: { type: Number, default: 1 }, pageSize: { type: Number, default: 20 }, getcount: { type: [Boolean, String], default: false }, gettree: { type: [Boolean, String], default: false }, gettreepath: { type: [Boolean, String], default: false }, startwith: { type: String, default: "" }, limitlevel: { type: Number, default: 10 }, groupby: { type: String, default: "" }, groupField: { type: String, default: "" }, distinct: { type: [Boolean, String], default: false }, foreignKey: { type: String, default: "" }, loadtime: { type: String, default: "auto" }, manual: { type: Boolean, default: false } }, data: () => ({ mixinDatacomLoading: false, mixinDatacomHasMore: false, mixinDatacomResData: [], mixinDatacomErrorMessage: "", mixinDatacomPage: {}, mixinDatacomError: null }), created() {
  3315. this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(() => {
  3316. var e3 = [];
  3317. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach((t2) => {
  3318. e3.push(this[t2]);
  3319. }), e3;
  3320. }, (e3, t2) => {
  3321. if (this.loadtime === Rs)
  3322. return;
  3323. let n2 = false;
  3324. const s2 = [];
  3325. for (let r2 = 2; r2 < e3.length; r2++)
  3326. e3[r2] !== t2[r2] && (s2.push(e3[r2]), n2 = true);
  3327. e3[0] !== t2[0] && (this.mixinDatacomPage.current = this.pageCurrent), this.mixinDatacomPage.size = this.pageSize, this.onMixinDatacomPropsChange(n2, s2);
  3328. });
  3329. }, methods: { onMixinDatacomPropsChange(e3, t2) {
  3330. }, mixinDatacomEasyGet({ getone: e3 = false, success: t2, fail: n2 } = {}) {
  3331. this.mixinDatacomLoading || (this.mixinDatacomLoading = true, this.mixinDatacomErrorMessage = "", this.mixinDatacomError = null, this.mixinDatacomGet().then((n3) => {
  3332. this.mixinDatacomLoading = false;
  3333. const { data: s2, count: r2 } = n3.result;
  3334. this.getcount && (this.mixinDatacomPage.count = r2), this.mixinDatacomHasMore = s2.length < this.pageSize;
  3335. const i2 = e3 ? s2.length ? s2[0] : void 0 : s2;
  3336. this.mixinDatacomResData = i2, t2 && t2(i2);
  3337. }).catch((e4) => {
  3338. this.mixinDatacomLoading = false, this.mixinDatacomErrorMessage = e4, this.mixinDatacomError = e4, n2 && n2(e4);
  3339. }));
  3340. }, mixinDatacomGet(t2 = {}) {
  3341. let n2;
  3342. t2 = t2 || {}, n2 = "undefined" != typeof __uniX && __uniX ? e2.databaseForJQL(this.spaceInfo) : e2.database(this.spaceInfo);
  3343. const s2 = t2.action || this.action;
  3344. s2 && (n2 = n2.action(s2));
  3345. const r2 = t2.collection || this.collection;
  3346. n2 = Array.isArray(r2) ? n2.collection(...r2) : n2.collection(r2);
  3347. const i2 = t2.where || this.where;
  3348. i2 && Object.keys(i2).length && (n2 = n2.where(i2));
  3349. const o2 = t2.field || this.field;
  3350. o2 && (n2 = n2.field(o2));
  3351. const a2 = t2.foreignKey || this.foreignKey;
  3352. a2 && (n2 = n2.foreignKey(a2));
  3353. const c2 = t2.groupby || this.groupby;
  3354. c2 && (n2 = n2.groupBy(c2));
  3355. const u2 = t2.groupField || this.groupField;
  3356. u2 && (n2 = n2.groupField(u2));
  3357. true === (void 0 !== t2.distinct ? t2.distinct : this.distinct) && (n2 = n2.distinct());
  3358. const h2 = t2.orderby || this.orderby;
  3359. h2 && (n2 = n2.orderBy(h2));
  3360. const l2 = void 0 !== t2.pageCurrent ? t2.pageCurrent : this.mixinDatacomPage.current, d2 = void 0 !== t2.pageSize ? t2.pageSize : this.mixinDatacomPage.size, p2 = void 0 !== t2.getcount ? t2.getcount : this.getcount, f2 = void 0 !== t2.gettree ? t2.gettree : this.gettree, g2 = void 0 !== t2.gettreepath ? t2.gettreepath : this.gettreepath, m2 = { getCount: p2 }, y2 = { limitLevel: void 0 !== t2.limitlevel ? t2.limitlevel : this.limitlevel, startWith: void 0 !== t2.startwith ? t2.startwith : this.startwith };
  3361. return f2 && (m2.getTree = y2), g2 && (m2.getTreePath = y2), n2 = n2.skip(d2 * (l2 - 1)).limit(d2).get(m2), n2;
  3362. } } };
  3363. }
  3364. function Ns(e2) {
  3365. return function(t2, n2 = {}) {
  3366. n2 = function(e3, t3 = {}) {
  3367. return e3.customUI = t3.customUI || e3.customUI, e3.parseSystemError = t3.parseSystemError || e3.parseSystemError, Object.assign(e3.loadingOptions, t3.loadingOptions), Object.assign(e3.errorOptions, t3.errorOptions), "object" == typeof t3.secretMethods && (e3.secretMethods = t3.secretMethods), e3;
  3368. }({ customUI: false, loadingOptions: { title: "加载中...", mask: true }, errorOptions: { type: "modal", retry: false } }, n2);
  3369. const { customUI: s2, loadingOptions: r2, errorOptions: i2, parseSystemError: o2 } = n2, a2 = !s2;
  3370. return new Proxy({}, { get(s3, c2) {
  3371. switch (c2) {
  3372. case "toString":
  3373. return "[object UniCloudObject]";
  3374. case "toJSON":
  3375. return {};
  3376. }
  3377. return function({ fn: e3, interceptorName: t3, getCallbackArgs: n3 } = {}) {
  3378. return async function(...s4) {
  3379. const r3 = n3 ? n3({ params: s4 }) : {};
  3380. let i3, o3;
  3381. try {
  3382. return await M(q(t3, "invoke"), { ...r3 }), i3 = await e3(...s4), await M(q(t3, "success"), { ...r3, result: i3 }), i3;
  3383. } catch (e4) {
  3384. throw o3 = e4, await M(q(t3, "fail"), { ...r3, error: o3 }), o3;
  3385. } finally {
  3386. await M(q(t3, "complete"), o3 ? { ...r3, error: o3 } : { ...r3, result: i3 });
  3387. }
  3388. };
  3389. }({ fn: async function s4(...h2) {
  3390. let l2;
  3391. a2 && uni.showLoading({ title: r2.title, mask: r2.mask });
  3392. const d2 = { name: t2, type: u, data: { method: c2, params: h2 } };
  3393. "object" == typeof n2.secretMethods && function(e3, t3) {
  3394. const n3 = t3.data.method, s5 = e3.secretMethods || {}, r3 = s5[n3] || s5["*"];
  3395. r3 && (t3.secretType = r3);
  3396. }(n2, d2);
  3397. let p2 = false;
  3398. try {
  3399. l2 = await e2.callFunction(d2);
  3400. } catch (e3) {
  3401. p2 = true, l2 = { result: new te(e3) };
  3402. }
  3403. const { errSubject: f2, errCode: g2, errMsg: m2, newToken: y2 } = l2.result || {};
  3404. if (a2 && uni.hideLoading(), y2 && y2.token && y2.tokenExpired && (ie(y2), Y(B, { ...y2 })), g2) {
  3405. let e3 = m2;
  3406. if (p2 && o2) {
  3407. e3 = (await o2({ objectName: t2, methodName: c2, params: h2, errSubject: f2, errCode: g2, errMsg: m2 })).errMsg || m2;
  3408. }
  3409. if (a2)
  3410. if ("toast" === i2.type)
  3411. uni.showToast({ title: e3, icon: "none" });
  3412. else {
  3413. if ("modal" !== i2.type)
  3414. throw new Error(`Invalid errorOptions.type: ${i2.type}`);
  3415. {
  3416. const { confirm: t3 } = await async function({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3 } = {}) {
  3417. return new Promise((i3, o3) => {
  3418. uni.showModal({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3, success(e5) {
  3419. i3(e5);
  3420. }, fail() {
  3421. i3({ confirm: false, cancel: true });
  3422. } });
  3423. });
  3424. }({ title: "提示", content: e3, showCancel: i2.retry, cancelText: "取消", confirmText: i2.retry ? "重试" : "确定" });
  3425. if (i2.retry && t3)
  3426. return s4(...h2);
  3427. }
  3428. }
  3429. const n3 = new te({ subject: f2, code: g2, message: m2, requestId: l2.requestId });
  3430. throw n3.detail = l2.result, Y(j, { type: z, content: n3 }), n3;
  3431. }
  3432. return Y(j, { type: z, content: l2.result }), l2.result;
  3433. }, interceptorName: "callObject", getCallbackArgs: function({ params: e3 } = {}) {
  3434. return { objectName: t2, methodName: c2, params: e3 };
  3435. } });
  3436. } });
  3437. };
  3438. }
  3439. function Ds(e2) {
  3440. return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e2.config.spaceId));
  3441. }
  3442. async function Ms({ openid: e2, callLoginByWeixin: t2 = false } = {}) {
  3443. Ds(this);
  3444. throw new Error(`[SecureNetwork] API \`initSecureNetworkByWeixin\` is not supported on platform \`${C}\``);
  3445. }
  3446. async function qs(e2) {
  3447. const t2 = Ds(this);
  3448. return t2.initPromise || (t2.initPromise = Ms.call(this, e2).then((e3) => e3).catch((e3) => {
  3449. throw delete t2.initPromise, e3;
  3450. })), t2.initPromise;
  3451. }
  3452. function Fs(e2) {
  3453. return function({ openid: t2, callLoginByWeixin: n2 = false } = {}) {
  3454. return qs.call(e2, { openid: t2, callLoginByWeixin: n2 });
  3455. };
  3456. }
  3457. function Ks(e2) {
  3458. !function(e3) {
  3459. he = e3;
  3460. }(e2);
  3461. }
  3462. function js(e2) {
  3463. const t2 = { getSystemInfo: uni.getSystemInfo, getPushClientId: uni.getPushClientId };
  3464. return function(n2) {
  3465. return new Promise((s2, r2) => {
  3466. t2[e2]({ ...n2, success(e3) {
  3467. s2(e3);
  3468. }, fail(e3) {
  3469. r2(e3);
  3470. } });
  3471. });
  3472. };
  3473. }
  3474. class $s extends class {
  3475. constructor() {
  3476. this._callback = {};
  3477. }
  3478. addListener(e2, t2) {
  3479. this._callback[e2] || (this._callback[e2] = []), this._callback[e2].push(t2);
  3480. }
  3481. on(e2, t2) {
  3482. return this.addListener(e2, t2);
  3483. }
  3484. removeListener(e2, t2) {
  3485. if (!t2)
  3486. throw new Error('The "listener" argument must be of type function. Received undefined');
  3487. const n2 = this._callback[e2];
  3488. if (!n2)
  3489. return;
  3490. const s2 = function(e3, t3) {
  3491. for (let n3 = e3.length - 1; n3 >= 0; n3--)
  3492. if (e3[n3] === t3)
  3493. return n3;
  3494. return -1;
  3495. }(n2, t2);
  3496. n2.splice(s2, 1);
  3497. }
  3498. off(e2, t2) {
  3499. return this.removeListener(e2, t2);
  3500. }
  3501. removeAllListener(e2) {
  3502. delete this._callback[e2];
  3503. }
  3504. emit(e2, ...t2) {
  3505. const n2 = this._callback[e2];
  3506. if (n2)
  3507. for (let e3 = 0; e3 < n2.length; e3++)
  3508. n2[e3](...t2);
  3509. }
  3510. } {
  3511. constructor() {
  3512. super(), this._uniPushMessageCallback = this._receivePushMessage.bind(this), this._currentMessageId = -1, this._payloadQueue = [];
  3513. }
  3514. init() {
  3515. return Promise.all([js("getSystemInfo")(), js("getPushClientId")()]).then(([{ appId: e2 } = {}, { cid: t2 } = {}] = []) => {
  3516. if (!e2)
  3517. throw new Error("Invalid appId, please check the manifest.json file");
  3518. if (!t2)
  3519. throw new Error("Invalid push client id");
  3520. this._appId = e2, this._pushClientId = t2, this._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), this.emit("open"), this._initMessageListener();
  3521. }, (e2) => {
  3522. throw this.emit("error", e2), this.close(), e2;
  3523. });
  3524. }
  3525. async open() {
  3526. return this.init();
  3527. }
  3528. _isUniCloudSSE(e2) {
  3529. if ("receive" !== e2.type)
  3530. return false;
  3531. const t2 = e2 && e2.data && e2.data.payload;
  3532. return !(!t2 || "UNI_CLOUD_SSE" !== t2.channel || t2.seqId !== this._seqId);
  3533. }
  3534. _receivePushMessage(e2) {
  3535. if (!this._isUniCloudSSE(e2))
  3536. return;
  3537. const t2 = e2 && e2.data && e2.data.payload, { action: n2, messageId: s2, message: r2 } = t2;
  3538. this._payloadQueue.push({ action: n2, messageId: s2, message: r2 }), this._consumMessage();
  3539. }
  3540. _consumMessage() {
  3541. for (; ; ) {
  3542. const e2 = this._payloadQueue.find((e3) => e3.messageId === this._currentMessageId + 1);
  3543. if (!e2)
  3544. break;
  3545. this._currentMessageId++, this._parseMessagePayload(e2);
  3546. }
  3547. }
  3548. _parseMessagePayload(e2) {
  3549. const { action: t2, messageId: n2, message: s2 } = e2;
  3550. "end" === t2 ? this._end({ messageId: n2, message: s2 }) : "message" === t2 && this._appendMessage({ messageId: n2, message: s2 });
  3551. }
  3552. _appendMessage({ messageId: e2, message: t2 } = {}) {
  3553. this.emit("message", t2);
  3554. }
  3555. _end({ messageId: e2, message: t2 } = {}) {
  3556. this.emit("end", t2), this.close();
  3557. }
  3558. _initMessageListener() {
  3559. uni.onPushMessage(this._uniPushMessageCallback);
  3560. }
  3561. _destroy() {
  3562. uni.offPushMessage(this._uniPushMessageCallback);
  3563. }
  3564. toJSON() {
  3565. return { appId: this._appId, pushClientId: this._pushClientId, seqId: this._seqId };
  3566. }
  3567. close() {
  3568. this._destroy(), this.emit("close");
  3569. }
  3570. }
  3571. async function Bs(e2, t2) {
  3572. const n2 = `http://${e2}:${t2}/system/ping`;
  3573. try {
  3574. const e3 = await (s2 = { url: n2, timeout: 500 }, new Promise((e4, t3) => {
  3575. ne.request({ ...s2, success(t4) {
  3576. e4(t4);
  3577. }, fail(e5) {
  3578. t3(e5);
  3579. } });
  3580. }));
  3581. return !(!e3.data || 0 !== e3.data.code);
  3582. } catch (e3) {
  3583. return false;
  3584. }
  3585. var s2;
  3586. }
  3587. async function Ws(e2) {
  3588. {
  3589. const { osName: e3, osVersion: t3 } = ce();
  3590. "ios" === e3 && function(e4) {
  3591. if (!e4 || "string" != typeof e4)
  3592. return 0;
  3593. const t4 = e4.match(/^(\d+)./);
  3594. return t4 && t4[1] ? parseInt(t4[1]) : 0;
  3595. }(t3) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发期间需要,发行后不需要)");
  3596. }
  3597. const t2 = e2.__dev__;
  3598. if (!t2.debugInfo)
  3599. return;
  3600. const { address: n2, servePort: s2 } = t2.debugInfo, { address: r2 } = await async function(e3, t3) {
  3601. let n3;
  3602. for (let s3 = 0; s3 < e3.length; s3++) {
  3603. const r3 = e3[s3];
  3604. if (await Bs(r3, t3)) {
  3605. n3 = r3;
  3606. break;
  3607. }
  3608. }
  3609. return { address: n3, port: t3 };
  3610. }(n2, s2);
  3611. if (r2)
  3612. return t2.localAddress = r2, void (t2.localPort = s2);
  3613. const i2 = console["error"];
  3614. let o2 = "";
  3615. if ("remote" === t2.debugInfo.initialLaunchType ? (t2.debugInfo.forceRemote = true, o2 = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o2 = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o2 += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", 0 === C.indexOf("mp-") && (o2 += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t2.debugInfo.forceRemote)
  3616. throw new Error(o2);
  3617. i2(o2);
  3618. }
  3619. function Hs(e2) {
  3620. e2._initPromiseHub || (e2._initPromiseHub = new v({ createPromise: function() {
  3621. let t2 = Promise.resolve();
  3622. var n2;
  3623. n2 = 1, t2 = new Promise((e3) => {
  3624. setTimeout(() => {
  3625. e3();
  3626. }, n2);
  3627. });
  3628. const s2 = e2.auth();
  3629. return t2.then(() => s2.getLoginState()).then((e3) => e3 ? Promise.resolve() : s2.signInAnonymously());
  3630. } }));
  3631. }
  3632. const zs = { tcb: bt, tencent: bt, aliyun: fe, private: At, alipay: Nt };
  3633. let Js = new class {
  3634. init(e2) {
  3635. let t2 = {};
  3636. const n2 = zs[e2.provider];
  3637. if (!n2)
  3638. throw new Error("未提供正确的provider参数");
  3639. t2 = n2.init(e2), function(e3) {
  3640. const t3 = {};
  3641. e3.__dev__ = t3, t3.debugLog = "app" === C;
  3642. const n3 = P;
  3643. n3 && !n3.code && (t3.debugInfo = n3);
  3644. const s2 = new v({ createPromise: function() {
  3645. return Ws(e3);
  3646. } });
  3647. t3.initLocalNetwork = function() {
  3648. return s2.exec();
  3649. };
  3650. }(t2), Hs(t2), Bn(t2), function(e3) {
  3651. const t3 = e3.uploadFile;
  3652. e3.uploadFile = function(e4) {
  3653. return t3.call(this, e4);
  3654. };
  3655. }(t2), function(e3) {
  3656. e3.database = function(t3) {
  3657. if (t3 && Object.keys(t3).length > 0)
  3658. return e3.init(t3).database();
  3659. if (this._database)
  3660. return this._database;
  3661. const n3 = es$1(ts, { uniClient: e3 });
  3662. return this._database = n3, n3;
  3663. }, e3.databaseForJQL = function(t3) {
  3664. if (t3 && Object.keys(t3).length > 0)
  3665. return e3.init(t3).databaseForJQL();
  3666. if (this._databaseForJQL)
  3667. return this._databaseForJQL;
  3668. const n3 = es$1(ts, { uniClient: e3, isJQL: true });
  3669. return this._databaseForJQL = n3, n3;
  3670. };
  3671. }(t2), function(e3) {
  3672. e3.getCurrentUserInfo = Os, e3.chooseAndUploadFile = Ls.initChooseAndUploadFile(e3), Object.assign(e3, { get mixinDatacom() {
  3673. return Us(e3);
  3674. } }), e3.SSEChannel = $s, e3.initSecureNetworkByWeixin = Fs(e3), e3.setCustomClientInfo = Ks, e3.importObject = Ns(e3);
  3675. }(t2);
  3676. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach((e3) => {
  3677. if (!t2[e3])
  3678. return;
  3679. const n3 = t2[e3];
  3680. t2[e3] = function() {
  3681. return n3.apply(t2, Array.from(arguments));
  3682. }, t2[e3] = (/* @__PURE__ */ function(e4, t3) {
  3683. return function(n4) {
  3684. let s2 = false;
  3685. if ("callFunction" === t3) {
  3686. const e5 = n4 && n4.type || c;
  3687. s2 = e5 !== c;
  3688. }
  3689. const r2 = "callFunction" === t3 && !s2, i2 = this._initPromiseHub.exec();
  3690. n4 = n4 || {};
  3691. const { success: o2, fail: a2, complete: u2 } = ee(n4), h2 = i2.then(() => s2 ? Promise.resolve() : M(q(t3, "invoke"), n4)).then(() => e4.call(this, n4)).then((e5) => s2 ? Promise.resolve(e5) : M(q(t3, "success"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (r2 && Y(j, { type: H, content: e5 }), Promise.resolve(e5))), (e5) => s2 ? Promise.reject(e5) : M(q(t3, "fail"), e5).then(() => M(q(t3, "complete"), e5)).then(() => (Y(j, { type: H, content: e5 }), Promise.reject(e5))));
  3692. if (!(o2 || a2 || u2))
  3693. return h2;
  3694. h2.then((e5) => {
  3695. o2 && o2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 });
  3696. }, (e5) => {
  3697. a2 && a2(e5), u2 && u2(e5), r2 && Y(j, { type: H, content: e5 });
  3698. });
  3699. };
  3700. }(t2[e3], e3)).bind(t2);
  3701. }), t2.init = this.init, t2;
  3702. }
  3703. }();
  3704. (() => {
  3705. const e2 = T;
  3706. let t2 = {};
  3707. if (e2 && 1 === e2.length)
  3708. t2 = e2[0], Js = Js.init(t2), Js._isDefault = true;
  3709. else {
  3710. const t3 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  3711. let n2;
  3712. n2 = e2 && e2.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : "应用未关联服务空间,请在uniCloud目录右键关联服务空间", t3.forEach((e3) => {
  3713. Js[e3] = function() {
  3714. return console.error(n2), Promise.reject(new te({ code: "SYS_ERR", message: n2 }));
  3715. };
  3716. });
  3717. }
  3718. Object.assign(Js, { get mixinDatacom() {
  3719. return Us(Js);
  3720. } }), Cs(Js), Js.addInterceptor = N, Js.removeInterceptor = D, Js.interceptObject = F;
  3721. })();
  3722. var Vs = Js;
  3723. const fontData = [
  3724. {
  3725. "font_class": "arrow-down",
  3726. "unicode": ""
  3727. },
  3728. {
  3729. "font_class": "arrow-left",
  3730. "unicode": ""
  3731. },
  3732. {
  3733. "font_class": "arrow-right",
  3734. "unicode": ""
  3735. },
  3736. {
  3737. "font_class": "arrow-up",
  3738. "unicode": ""
  3739. },
  3740. {
  3741. "font_class": "auth",
  3742. "unicode": ""
  3743. },
  3744. {
  3745. "font_class": "auth-filled",
  3746. "unicode": ""
  3747. },
  3748. {
  3749. "font_class": "back",
  3750. "unicode": ""
  3751. },
  3752. {
  3753. "font_class": "bars",
  3754. "unicode": ""
  3755. },
  3756. {
  3757. "font_class": "calendar",
  3758. "unicode": ""
  3759. },
  3760. {
  3761. "font_class": "calendar-filled",
  3762. "unicode": ""
  3763. },
  3764. {
  3765. "font_class": "camera",
  3766. "unicode": ""
  3767. },
  3768. {
  3769. "font_class": "camera-filled",
  3770. "unicode": ""
  3771. },
  3772. {
  3773. "font_class": "cart",
  3774. "unicode": ""
  3775. },
  3776. {
  3777. "font_class": "cart-filled",
  3778. "unicode": ""
  3779. },
  3780. {
  3781. "font_class": "chat",
  3782. "unicode": ""
  3783. },
  3784. {
  3785. "font_class": "chat-filled",
  3786. "unicode": ""
  3787. },
  3788. {
  3789. "font_class": "chatboxes",
  3790. "unicode": ""
  3791. },
  3792. {
  3793. "font_class": "chatboxes-filled",
  3794. "unicode": ""
  3795. },
  3796. {
  3797. "font_class": "chatbubble",
  3798. "unicode": ""
  3799. },
  3800. {
  3801. "font_class": "chatbubble-filled",
  3802. "unicode": ""
  3803. },
  3804. {
  3805. "font_class": "checkbox",
  3806. "unicode": ""
  3807. },
  3808. {
  3809. "font_class": "checkbox-filled",
  3810. "unicode": ""
  3811. },
  3812. {
  3813. "font_class": "checkmarkempty",
  3814. "unicode": ""
  3815. },
  3816. {
  3817. "font_class": "circle",
  3818. "unicode": ""
  3819. },
  3820. {
  3821. "font_class": "circle-filled",
  3822. "unicode": ""
  3823. },
  3824. {
  3825. "font_class": "clear",
  3826. "unicode": ""
  3827. },
  3828. {
  3829. "font_class": "close",
  3830. "unicode": ""
  3831. },
  3832. {
  3833. "font_class": "closeempty",
  3834. "unicode": ""
  3835. },
  3836. {
  3837. "font_class": "cloud-download",
  3838. "unicode": ""
  3839. },
  3840. {
  3841. "font_class": "cloud-download-filled",
  3842. "unicode": ""
  3843. },
  3844. {
  3845. "font_class": "cloud-upload",
  3846. "unicode": ""
  3847. },
  3848. {
  3849. "font_class": "cloud-upload-filled",
  3850. "unicode": ""
  3851. },
  3852. {
  3853. "font_class": "color",
  3854. "unicode": ""
  3855. },
  3856. {
  3857. "font_class": "color-filled",
  3858. "unicode": ""
  3859. },
  3860. {
  3861. "font_class": "compose",
  3862. "unicode": ""
  3863. },
  3864. {
  3865. "font_class": "contact",
  3866. "unicode": ""
  3867. },
  3868. {
  3869. "font_class": "contact-filled",
  3870. "unicode": ""
  3871. },
  3872. {
  3873. "font_class": "down",
  3874. "unicode": ""
  3875. },
  3876. {
  3877. "font_class": "bottom",
  3878. "unicode": ""
  3879. },
  3880. {
  3881. "font_class": "download",
  3882. "unicode": ""
  3883. },
  3884. {
  3885. "font_class": "download-filled",
  3886. "unicode": ""
  3887. },
  3888. {
  3889. "font_class": "email",
  3890. "unicode": ""
  3891. },
  3892. {
  3893. "font_class": "email-filled",
  3894. "unicode": ""
  3895. },
  3896. {
  3897. "font_class": "eye",
  3898. "unicode": ""
  3899. },
  3900. {
  3901. "font_class": "eye-filled",
  3902. "unicode": ""
  3903. },
  3904. {
  3905. "font_class": "eye-slash",
  3906. "unicode": ""
  3907. },
  3908. {
  3909. "font_class": "eye-slash-filled",
  3910. "unicode": ""
  3911. },
  3912. {
  3913. "font_class": "fire",
  3914. "unicode": ""
  3915. },
  3916. {
  3917. "font_class": "fire-filled",
  3918. "unicode": ""
  3919. },
  3920. {
  3921. "font_class": "flag",
  3922. "unicode": ""
  3923. },
  3924. {
  3925. "font_class": "flag-filled",
  3926. "unicode": ""
  3927. },
  3928. {
  3929. "font_class": "folder-add",
  3930. "unicode": ""
  3931. },
  3932. {
  3933. "font_class": "folder-add-filled",
  3934. "unicode": ""
  3935. },
  3936. {
  3937. "font_class": "font",
  3938. "unicode": ""
  3939. },
  3940. {
  3941. "font_class": "forward",
  3942. "unicode": ""
  3943. },
  3944. {
  3945. "font_class": "gear",
  3946. "unicode": ""
  3947. },
  3948. {
  3949. "font_class": "gear-filled",
  3950. "unicode": ""
  3951. },
  3952. {
  3953. "font_class": "gift",
  3954. "unicode": ""
  3955. },
  3956. {
  3957. "font_class": "gift-filled",
  3958. "unicode": ""
  3959. },
  3960. {
  3961. "font_class": "hand-down",
  3962. "unicode": ""
  3963. },
  3964. {
  3965. "font_class": "hand-down-filled",
  3966. "unicode": ""
  3967. },
  3968. {
  3969. "font_class": "hand-up",
  3970. "unicode": ""
  3971. },
  3972. {
  3973. "font_class": "hand-up-filled",
  3974. "unicode": ""
  3975. },
  3976. {
  3977. "font_class": "headphones",
  3978. "unicode": ""
  3979. },
  3980. {
  3981. "font_class": "heart",
  3982. "unicode": ""
  3983. },
  3984. {
  3985. "font_class": "heart-filled",
  3986. "unicode": ""
  3987. },
  3988. {
  3989. "font_class": "help",
  3990. "unicode": ""
  3991. },
  3992. {
  3993. "font_class": "help-filled",
  3994. "unicode": ""
  3995. },
  3996. {
  3997. "font_class": "home",
  3998. "unicode": ""
  3999. },
  4000. {
  4001. "font_class": "home-filled",
  4002. "unicode": ""
  4003. },
  4004. {
  4005. "font_class": "image",
  4006. "unicode": ""
  4007. },
  4008. {
  4009. "font_class": "image-filled",
  4010. "unicode": ""
  4011. },
  4012. {
  4013. "font_class": "images",
  4014. "unicode": ""
  4015. },
  4016. {
  4017. "font_class": "images-filled",
  4018. "unicode": ""
  4019. },
  4020. {
  4021. "font_class": "info",
  4022. "unicode": ""
  4023. },
  4024. {
  4025. "font_class": "info-filled",
  4026. "unicode": ""
  4027. },
  4028. {
  4029. "font_class": "left",
  4030. "unicode": ""
  4031. },
  4032. {
  4033. "font_class": "link",
  4034. "unicode": ""
  4035. },
  4036. {
  4037. "font_class": "list",
  4038. "unicode": ""
  4039. },
  4040. {
  4041. "font_class": "location",
  4042. "unicode": ""
  4043. },
  4044. {
  4045. "font_class": "location-filled",
  4046. "unicode": ""
  4047. },
  4048. {
  4049. "font_class": "locked",
  4050. "unicode": ""
  4051. },
  4052. {
  4053. "font_class": "locked-filled",
  4054. "unicode": ""
  4055. },
  4056. {
  4057. "font_class": "loop",
  4058. "unicode": ""
  4059. },
  4060. {
  4061. "font_class": "mail-open",
  4062. "unicode": ""
  4063. },
  4064. {
  4065. "font_class": "mail-open-filled",
  4066. "unicode": ""
  4067. },
  4068. {
  4069. "font_class": "map",
  4070. "unicode": ""
  4071. },
  4072. {
  4073. "font_class": "map-filled",
  4074. "unicode": ""
  4075. },
  4076. {
  4077. "font_class": "map-pin",
  4078. "unicode": ""
  4079. },
  4080. {
  4081. "font_class": "map-pin-ellipse",
  4082. "unicode": ""
  4083. },
  4084. {
  4085. "font_class": "medal",
  4086. "unicode": ""
  4087. },
  4088. {
  4089. "font_class": "medal-filled",
  4090. "unicode": ""
  4091. },
  4092. {
  4093. "font_class": "mic",
  4094. "unicode": ""
  4095. },
  4096. {
  4097. "font_class": "mic-filled",
  4098. "unicode": ""
  4099. },
  4100. {
  4101. "font_class": "micoff",
  4102. "unicode": ""
  4103. },
  4104. {
  4105. "font_class": "micoff-filled",
  4106. "unicode": ""
  4107. },
  4108. {
  4109. "font_class": "minus",
  4110. "unicode": ""
  4111. },
  4112. {
  4113. "font_class": "minus-filled",
  4114. "unicode": ""
  4115. },
  4116. {
  4117. "font_class": "more",
  4118. "unicode": ""
  4119. },
  4120. {
  4121. "font_class": "more-filled",
  4122. "unicode": ""
  4123. },
  4124. {
  4125. "font_class": "navigate",
  4126. "unicode": ""
  4127. },
  4128. {
  4129. "font_class": "navigate-filled",
  4130. "unicode": ""
  4131. },
  4132. {
  4133. "font_class": "notification",
  4134. "unicode": ""
  4135. },
  4136. {
  4137. "font_class": "notification-filled",
  4138. "unicode": ""
  4139. },
  4140. {
  4141. "font_class": "paperclip",
  4142. "unicode": ""
  4143. },
  4144. {
  4145. "font_class": "paperplane",
  4146. "unicode": ""
  4147. },
  4148. {
  4149. "font_class": "paperplane-filled",
  4150. "unicode": ""
  4151. },
  4152. {
  4153. "font_class": "person",
  4154. "unicode": ""
  4155. },
  4156. {
  4157. "font_class": "person-filled",
  4158. "unicode": ""
  4159. },
  4160. {
  4161. "font_class": "personadd",
  4162. "unicode": ""
  4163. },
  4164. {
  4165. "font_class": "personadd-filled",
  4166. "unicode": ""
  4167. },
  4168. {
  4169. "font_class": "personadd-filled-copy",
  4170. "unicode": ""
  4171. },
  4172. {
  4173. "font_class": "phone",
  4174. "unicode": ""
  4175. },
  4176. {
  4177. "font_class": "phone-filled",
  4178. "unicode": ""
  4179. },
  4180. {
  4181. "font_class": "plus",
  4182. "unicode": ""
  4183. },
  4184. {
  4185. "font_class": "plus-filled",
  4186. "unicode": ""
  4187. },
  4188. {
  4189. "font_class": "plusempty",
  4190. "unicode": ""
  4191. },
  4192. {
  4193. "font_class": "pulldown",
  4194. "unicode": ""
  4195. },
  4196. {
  4197. "font_class": "pyq",
  4198. "unicode": ""
  4199. },
  4200. {
  4201. "font_class": "qq",
  4202. "unicode": ""
  4203. },
  4204. {
  4205. "font_class": "redo",
  4206. "unicode": ""
  4207. },
  4208. {
  4209. "font_class": "redo-filled",
  4210. "unicode": ""
  4211. },
  4212. {
  4213. "font_class": "refresh",
  4214. "unicode": ""
  4215. },
  4216. {
  4217. "font_class": "refresh-filled",
  4218. "unicode": ""
  4219. },
  4220. {
  4221. "font_class": "refreshempty",
  4222. "unicode": ""
  4223. },
  4224. {
  4225. "font_class": "reload",
  4226. "unicode": ""
  4227. },
  4228. {
  4229. "font_class": "right",
  4230. "unicode": ""
  4231. },
  4232. {
  4233. "font_class": "scan",
  4234. "unicode": ""
  4235. },
  4236. {
  4237. "font_class": "search",
  4238. "unicode": ""
  4239. },
  4240. {
  4241. "font_class": "settings",
  4242. "unicode": ""
  4243. },
  4244. {
  4245. "font_class": "settings-filled",
  4246. "unicode": ""
  4247. },
  4248. {
  4249. "font_class": "shop",
  4250. "unicode": ""
  4251. },
  4252. {
  4253. "font_class": "shop-filled",
  4254. "unicode": ""
  4255. },
  4256. {
  4257. "font_class": "smallcircle",
  4258. "unicode": ""
  4259. },
  4260. {
  4261. "font_class": "smallcircle-filled",
  4262. "unicode": ""
  4263. },
  4264. {
  4265. "font_class": "sound",
  4266. "unicode": ""
  4267. },
  4268. {
  4269. "font_class": "sound-filled",
  4270. "unicode": ""
  4271. },
  4272. {
  4273. "font_class": "spinner-cycle",
  4274. "unicode": ""
  4275. },
  4276. {
  4277. "font_class": "staff",
  4278. "unicode": ""
  4279. },
  4280. {
  4281. "font_class": "staff-filled",
  4282. "unicode": ""
  4283. },
  4284. {
  4285. "font_class": "star",
  4286. "unicode": ""
  4287. },
  4288. {
  4289. "font_class": "star-filled",
  4290. "unicode": ""
  4291. },
  4292. {
  4293. "font_class": "starhalf",
  4294. "unicode": ""
  4295. },
  4296. {
  4297. "font_class": "trash",
  4298. "unicode": ""
  4299. },
  4300. {
  4301. "font_class": "trash-filled",
  4302. "unicode": ""
  4303. },
  4304. {
  4305. "font_class": "tune",
  4306. "unicode": ""
  4307. },
  4308. {
  4309. "font_class": "tune-filled",
  4310. "unicode": ""
  4311. },
  4312. {
  4313. "font_class": "undo",
  4314. "unicode": ""
  4315. },
  4316. {
  4317. "font_class": "undo-filled",
  4318. "unicode": ""
  4319. },
  4320. {
  4321. "font_class": "up",
  4322. "unicode": ""
  4323. },
  4324. {
  4325. "font_class": "top",
  4326. "unicode": ""
  4327. },
  4328. {
  4329. "font_class": "upload",
  4330. "unicode": ""
  4331. },
  4332. {
  4333. "font_class": "upload-filled",
  4334. "unicode": ""
  4335. },
  4336. {
  4337. "font_class": "videocam",
  4338. "unicode": ""
  4339. },
  4340. {
  4341. "font_class": "videocam-filled",
  4342. "unicode": ""
  4343. },
  4344. {
  4345. "font_class": "vip",
  4346. "unicode": ""
  4347. },
  4348. {
  4349. "font_class": "vip-filled",
  4350. "unicode": ""
  4351. },
  4352. {
  4353. "font_class": "wallet",
  4354. "unicode": ""
  4355. },
  4356. {
  4357. "font_class": "wallet-filled",
  4358. "unicode": ""
  4359. },
  4360. {
  4361. "font_class": "weibo",
  4362. "unicode": ""
  4363. },
  4364. {
  4365. "font_class": "weixin",
  4366. "unicode": ""
  4367. }
  4368. ];
  4369. const getVal = (val) => {
  4370. const reg = /^[0-9]*$/g;
  4371. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  4372. };
  4373. const _sfc_main$e = {
  4374. name: "UniIcons",
  4375. emits: ["click"],
  4376. props: {
  4377. type: {
  4378. type: String,
  4379. default: ""
  4380. },
  4381. color: {
  4382. type: String,
  4383. default: "#333333"
  4384. },
  4385. size: {
  4386. type: [Number, String],
  4387. default: 16
  4388. },
  4389. customPrefix: {
  4390. type: String,
  4391. default: ""
  4392. },
  4393. fontFamily: {
  4394. type: String,
  4395. default: ""
  4396. }
  4397. },
  4398. data() {
  4399. return {
  4400. icons: fontData
  4401. };
  4402. },
  4403. computed: {
  4404. unicode() {
  4405. let code = this.icons.find((v2) => v2.font_class === this.type);
  4406. if (code) {
  4407. return code.unicode;
  4408. }
  4409. return "";
  4410. },
  4411. iconSize() {
  4412. return getVal(this.size);
  4413. },
  4414. styleObj() {
  4415. if (this.fontFamily !== "") {
  4416. return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`;
  4417. }
  4418. return `color: ${this.color}; font-size: ${this.iconSize};`;
  4419. }
  4420. },
  4421. methods: {
  4422. _onClick() {
  4423. this.$emit("click");
  4424. }
  4425. }
  4426. };
  4427. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  4428. return vue.openBlock(), vue.createElementBlock(
  4429. "text",
  4430. {
  4431. style: vue.normalizeStyle($options.styleObj),
  4432. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  4433. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  4434. },
  4435. [
  4436. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  4437. ],
  4438. 6
  4439. /* CLASS, STYLE */
  4440. );
  4441. }
  4442. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-d31e1c47"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
  4443. const _sfc_main$d = {
  4444. name: "uni-data-select",
  4445. mixins: [Vs.mixinDatacom || {}],
  4446. props: {
  4447. localdata: {
  4448. type: Array,
  4449. default() {
  4450. return [];
  4451. }
  4452. },
  4453. value: {
  4454. type: [String, Number],
  4455. default: ""
  4456. },
  4457. modelValue: {
  4458. type: [String, Number],
  4459. default: ""
  4460. },
  4461. label: {
  4462. type: String,
  4463. default: ""
  4464. },
  4465. placeholder: {
  4466. type: String,
  4467. default: "请选择"
  4468. },
  4469. emptyTips: {
  4470. type: String,
  4471. default: "无选项"
  4472. },
  4473. clear: {
  4474. type: Boolean,
  4475. default: true
  4476. },
  4477. defItem: {
  4478. type: Number,
  4479. default: 0
  4480. },
  4481. disabled: {
  4482. type: Boolean,
  4483. default: false
  4484. },
  4485. // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
  4486. format: {
  4487. type: String,
  4488. default: ""
  4489. },
  4490. placement: {
  4491. type: String,
  4492. default: "bottom"
  4493. }
  4494. },
  4495. data() {
  4496. return {
  4497. showSelector: false,
  4498. current: "",
  4499. mixinDatacomResData: [],
  4500. apps: [],
  4501. channels: [],
  4502. cacheKey: "uni-data-select-lastSelectedValue"
  4503. };
  4504. },
  4505. created() {
  4506. this.debounceGet = this.debounce(() => {
  4507. this.query();
  4508. }, 300);
  4509. if (this.collection && !this.localdata.length) {
  4510. this.debounceGet();
  4511. }
  4512. },
  4513. computed: {
  4514. typePlaceholder() {
  4515. const text = {
  4516. "opendb-stat-app-versions": "版本",
  4517. "opendb-app-channels": "渠道",
  4518. "opendb-app-list": "应用"
  4519. };
  4520. const common = this.placeholder;
  4521. const placeholder = text[this.collection];
  4522. return placeholder ? common + placeholder : common;
  4523. },
  4524. valueCom() {
  4525. return this.modelValue;
  4526. },
  4527. textShow() {
  4528. let text = this.current;
  4529. if (text.length > 10) {
  4530. return text.slice(0, 25) + "...";
  4531. }
  4532. return text;
  4533. },
  4534. getOffsetByPlacement() {
  4535. switch (this.placement) {
  4536. case "top":
  4537. return "bottom:calc(100% + 12px);";
  4538. case "bottom":
  4539. return "top:calc(100% + 12px);";
  4540. }
  4541. }
  4542. },
  4543. watch: {
  4544. localdata: {
  4545. immediate: true,
  4546. handler(val, old) {
  4547. if (Array.isArray(val) && old !== val) {
  4548. this.mixinDatacomResData = val;
  4549. }
  4550. }
  4551. },
  4552. valueCom(val, old) {
  4553. this.initDefVal();
  4554. },
  4555. mixinDatacomResData: {
  4556. immediate: true,
  4557. handler(val) {
  4558. if (val.length) {
  4559. this.initDefVal();
  4560. }
  4561. }
  4562. }
  4563. },
  4564. methods: {
  4565. debounce(fn, time = 100) {
  4566. let timer = null;
  4567. return function(...args) {
  4568. if (timer)
  4569. clearTimeout(timer);
  4570. timer = setTimeout(() => {
  4571. fn.apply(this, args);
  4572. }, time);
  4573. };
  4574. },
  4575. // 执行数据库查询
  4576. query() {
  4577. this.mixinDatacomEasyGet();
  4578. },
  4579. // 监听查询条件变更事件
  4580. onMixinDatacomPropsChange() {
  4581. if (this.collection) {
  4582. this.debounceGet();
  4583. }
  4584. },
  4585. initDefVal() {
  4586. let defValue = "";
  4587. if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
  4588. defValue = this.valueCom;
  4589. } else {
  4590. let strogeValue;
  4591. if (this.collection) {
  4592. strogeValue = this.getCache();
  4593. }
  4594. if (strogeValue || strogeValue === 0) {
  4595. defValue = strogeValue;
  4596. } else {
  4597. let defItem = "";
  4598. if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
  4599. defItem = this.mixinDatacomResData[this.defItem - 1].value;
  4600. }
  4601. defValue = defItem;
  4602. }
  4603. if (defValue || defValue === 0) {
  4604. this.emit(defValue);
  4605. }
  4606. }
  4607. const def = this.mixinDatacomResData.find((item) => item.value === defValue);
  4608. this.current = def ? this.formatItemName(def) : "";
  4609. },
  4610. /**
  4611. * @param {[String, Number]} value
  4612. * 判断用户给的 value 是否同时为禁用状态
  4613. */
  4614. isDisabled(value) {
  4615. let isDisabled = false;
  4616. this.mixinDatacomResData.forEach((item) => {
  4617. if (item.value === value) {
  4618. isDisabled = item.disable;
  4619. }
  4620. });
  4621. return isDisabled;
  4622. },
  4623. clearVal() {
  4624. this.emit("");
  4625. if (this.collection) {
  4626. this.removeCache();
  4627. }
  4628. },
  4629. change(item) {
  4630. if (!item.disable) {
  4631. this.showSelector = false;
  4632. this.current = this.formatItemName(item);
  4633. this.emit(item.value);
  4634. }
  4635. },
  4636. emit(val) {
  4637. this.$emit("input", val);
  4638. this.$emit("update:modelValue", val);
  4639. this.$emit("change", val);
  4640. if (this.collection) {
  4641. this.setCache(val);
  4642. }
  4643. },
  4644. toggleSelector() {
  4645. if (this.disabled) {
  4646. return;
  4647. }
  4648. this.showSelector = !this.showSelector;
  4649. },
  4650. formatItemName(item) {
  4651. let {
  4652. text,
  4653. value,
  4654. channel_code
  4655. } = item;
  4656. channel_code = channel_code ? `(${channel_code})` : "";
  4657. if (this.format) {
  4658. let str = "";
  4659. str = this.format;
  4660. for (let key in item) {
  4661. str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
  4662. }
  4663. return str;
  4664. } else {
  4665. return this.collection.indexOf("app-list") > 0 ? `${text}(${value})` : text ? text : `未命名${channel_code}`;
  4666. }
  4667. },
  4668. // 获取当前加载的数据
  4669. getLoadData() {
  4670. return this.mixinDatacomResData;
  4671. },
  4672. // 获取当前缓存key
  4673. getCurrentCacheKey() {
  4674. return this.collection;
  4675. },
  4676. // 获取缓存
  4677. getCache(name = this.getCurrentCacheKey()) {
  4678. let cacheData = uni.getStorageSync(this.cacheKey) || {};
  4679. return cacheData[name];
  4680. },
  4681. // 设置缓存
  4682. setCache(value, name = this.getCurrentCacheKey()) {
  4683. let cacheData = uni.getStorageSync(this.cacheKey) || {};
  4684. cacheData[name] = value;
  4685. uni.setStorageSync(this.cacheKey, cacheData);
  4686. },
  4687. // 删除缓存
  4688. removeCache(name = this.getCurrentCacheKey()) {
  4689. let cacheData = uni.getStorageSync(this.cacheKey) || {};
  4690. delete cacheData[name];
  4691. uni.setStorageSync(this.cacheKey, cacheData);
  4692. }
  4693. }
  4694. };
  4695. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  4696. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$2);
  4697. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-stat__select" }, [
  4698. $props.label ? (vue.openBlock(), vue.createElementBlock(
  4699. "span",
  4700. {
  4701. key: 0,
  4702. class: "uni-label-text hide-on-phone"
  4703. },
  4704. vue.toDisplayString($props.label + ":"),
  4705. 1
  4706. /* TEXT */
  4707. )) : vue.createCommentVNode("v-if", true),
  4708. vue.createElementVNode(
  4709. "view",
  4710. {
  4711. class: vue.normalizeClass(["uni-stat-box", { "uni-stat__actived": $data.current }])
  4712. },
  4713. [
  4714. vue.createElementVNode(
  4715. "view",
  4716. {
  4717. class: vue.normalizeClass(["uni-select", { "uni-select--disabled": $props.disabled }])
  4718. },
  4719. [
  4720. vue.createElementVNode("view", {
  4721. class: "uni-select__input-box",
  4722. onClick: _cache[1] || (_cache[1] = (...args) => $options.toggleSelector && $options.toggleSelector(...args))
  4723. }, [
  4724. $data.current ? (vue.openBlock(), vue.createElementBlock(
  4725. "view",
  4726. {
  4727. key: 0,
  4728. class: "uni-select__input-text"
  4729. },
  4730. vue.toDisplayString($options.textShow),
  4731. 1
  4732. /* TEXT */
  4733. )) : (vue.openBlock(), vue.createElementBlock(
  4734. "view",
  4735. {
  4736. key: 1,
  4737. class: "uni-select__input-text uni-select__input-placeholder"
  4738. },
  4739. vue.toDisplayString($options.typePlaceholder),
  4740. 1
  4741. /* TEXT */
  4742. )),
  4743. $data.current && $props.clear && !$props.disabled ? (vue.openBlock(), vue.createElementBlock("view", {
  4744. key: 2,
  4745. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clearVal && $options.clearVal(...args), ["stop"]))
  4746. }, [
  4747. vue.createVNode(_component_uni_icons, {
  4748. type: "clear",
  4749. color: "#c0c4cc",
  4750. size: "24"
  4751. })
  4752. ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 3 }, [
  4753. vue.createVNode(_component_uni_icons, {
  4754. type: $data.showSelector ? "top" : "bottom",
  4755. size: "20",
  4756. color: "#999"
  4757. }, null, 8, ["type"])
  4758. ]))
  4759. ]),
  4760. $data.showSelector ? (vue.openBlock(), vue.createElementBlock("view", {
  4761. key: 0,
  4762. class: "uni-select--mask",
  4763. onClick: _cache[2] || (_cache[2] = (...args) => $options.toggleSelector && $options.toggleSelector(...args))
  4764. })) : vue.createCommentVNode("v-if", true),
  4765. $data.showSelector ? (vue.openBlock(), vue.createElementBlock(
  4766. "view",
  4767. {
  4768. key: 1,
  4769. class: "uni-select__selector",
  4770. style: vue.normalizeStyle($options.getOffsetByPlacement)
  4771. },
  4772. [
  4773. vue.createElementVNode(
  4774. "view",
  4775. {
  4776. class: vue.normalizeClass($props.placement == "bottom" ? "uni-popper__arrow_bottom" : "uni-popper__arrow_top")
  4777. },
  4778. null,
  4779. 2
  4780. /* CLASS */
  4781. ),
  4782. vue.createElementVNode("scroll-view", {
  4783. "scroll-y": "true",
  4784. class: "uni-select__selector-scroll"
  4785. }, [
  4786. $data.mixinDatacomResData.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4787. key: 0,
  4788. class: "uni-select__selector-empty"
  4789. }, [
  4790. vue.createElementVNode(
  4791. "text",
  4792. null,
  4793. vue.toDisplayString($props.emptyTips),
  4794. 1
  4795. /* TEXT */
  4796. )
  4797. ])) : (vue.openBlock(true), vue.createElementBlock(
  4798. vue.Fragment,
  4799. { key: 1 },
  4800. vue.renderList($data.mixinDatacomResData, (item, index) => {
  4801. return vue.openBlock(), vue.createElementBlock("view", {
  4802. class: "uni-select__selector-item",
  4803. key: index,
  4804. onClick: ($event) => $options.change(item)
  4805. }, [
  4806. vue.createElementVNode(
  4807. "text",
  4808. {
  4809. class: vue.normalizeClass($options.textShow == item.text ? "uni-select__selector__disabled" : "uni-select__selector__disabled1")
  4810. },
  4811. vue.toDisplayString($options.formatItemName(item)),
  4812. 3
  4813. /* TEXT, CLASS */
  4814. )
  4815. ], 8, ["onClick"]);
  4816. }),
  4817. 128
  4818. /* KEYED_FRAGMENT */
  4819. ))
  4820. ])
  4821. ],
  4822. 4
  4823. /* STYLE */
  4824. )) : vue.createCommentVNode("v-if", true)
  4825. ],
  4826. 2
  4827. /* CLASS */
  4828. )
  4829. ],
  4830. 2
  4831. /* CLASS */
  4832. )
  4833. ]);
  4834. }
  4835. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-ddf9e0a2"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue"]]);
  4836. const control = async (data) => {
  4837. try {
  4838. const response2 = await uni.$http.post(`/api/v1/items/rt/${data.id}`, data, { "Content-Type": "application/json;charset=utf-8", "Authorization": `JWT ${uni.getStorageSync("token")}` });
  4839. formatAppLog("log", "at api/api.js:5", response2);
  4840. if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
  4841. uni.removeStorageSync("token");
  4842. login();
  4843. return response2.data;
  4844. }
  4845. return response2.data;
  4846. } catch (error) {
  4847. formatAppLog("log", "at api/api.js:18", error);
  4848. login();
  4849. return response.data;
  4850. }
  4851. };
  4852. const getuidatas = async (data) => {
  4853. try {
  4854. const response2 = await uni.$http.get("/api/v1/uidatas/rt/uis/3224a3eb-2375-4dfc-99ce-b182edd30996", data, { "Content-Type": "application/json;charset=utf-8", "Authorization": `JWT ${uni.getStorageSync("token")}` });
  4855. formatAppLog("log", "at api/api.js:32", response2);
  4856. if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
  4857. uni.removeStorageSync("token");
  4858. login();
  4859. return response2.data;
  4860. }
  4861. return response2.data;
  4862. } catch (error) {
  4863. formatAppLog("log", "at api/api.js:48", error);
  4864. login();
  4865. return response.data;
  4866. }
  4867. };
  4868. const getfaultsList = async (data) => {
  4869. try {
  4870. const response2 = await uni.$http.get("/api/v1/faults", data, { "Content-Type": "application/json;charset=utf-8", "Authorization": `JWT ${uni.getStorageSync("token")}` });
  4871. formatAppLog("log", "at api/api.js:63", response2.data);
  4872. if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
  4873. uni.removeStorageSync("token");
  4874. login();
  4875. return response2.data;
  4876. }
  4877. return response2.data;
  4878. } catch (error) {
  4879. formatAppLog("error", "at api/api.js:76", "Network request failed:", error);
  4880. formatAppLog("log", "at api/api.js:77", error);
  4881. uni.removeStorageSync("token");
  4882. login();
  4883. return response.data;
  4884. }
  4885. };
  4886. const login = async (start, count) => {
  4887. try {
  4888. formatAppLog("log", "at api/api.js:91", "login request");
  4889. const response2 = await uni.$http.post(
  4890. "/api/v1/login",
  4891. { name: "dexnui", pwd: "dexn1001" },
  4892. { "Content-Type": "application/json;charset=utf-8" }
  4893. );
  4894. formatAppLog("log", "at api/api.js:94", response2);
  4895. if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
  4896. return response2.data;
  4897. }
  4898. formatAppLog("log", "at api/api.js:103", response2.data);
  4899. uni.setStorageSync("token", response2.data.data.token);
  4900. return response2.data;
  4901. } catch (error) {
  4902. return response.data;
  4903. }
  4904. };
  4905. const getTime = (format2 = "yyyy/MM/dd hh:mm:ss") => {
  4906. const date = /* @__PURE__ */ new Date();
  4907. const year = date.getFullYear();
  4908. const month = ("0" + (date.getMonth() + 1)).slice(-2);
  4909. const day = ("0" + date.getDate()).slice(-2);
  4910. const hours = ("0" + date.getHours()).slice(-2);
  4911. const minutes = ("0" + date.getMinutes()).slice(-2);
  4912. const seconds = ("0" + date.getSeconds()).slice(-2);
  4913. return format2.replace("yyyy", year).replace("MM", month).replace("dd", day).replace("hh", hours).replace("mm", minutes).replace("ss", seconds);
  4914. };
  4915. function getDevtoolsGlobalHook() {
  4916. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4917. }
  4918. function getTarget() {
  4919. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  4920. }
  4921. const isProxyAvailable = typeof Proxy === "function";
  4922. const HOOK_SETUP = "devtools-plugin:setup";
  4923. const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
  4924. class ApiProxy {
  4925. constructor(plugin, hook) {
  4926. this.target = null;
  4927. this.targetQueue = [];
  4928. this.onQueue = [];
  4929. this.plugin = plugin;
  4930. this.hook = hook;
  4931. const defaultSettings = {};
  4932. if (plugin.settings) {
  4933. for (const id in plugin.settings) {
  4934. const item = plugin.settings[id];
  4935. defaultSettings[id] = item.defaultValue;
  4936. }
  4937. }
  4938. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  4939. let currentSettings = { ...defaultSettings };
  4940. try {
  4941. const raw = localStorage.getItem(localSettingsSaveId);
  4942. const data = JSON.parse(raw);
  4943. Object.assign(currentSettings, data);
  4944. } catch (e2) {
  4945. }
  4946. this.fallbacks = {
  4947. getSettings() {
  4948. return currentSettings;
  4949. },
  4950. setSettings(value) {
  4951. try {
  4952. localStorage.setItem(localSettingsSaveId, JSON.stringify(value));
  4953. } catch (e2) {
  4954. }
  4955. currentSettings = value;
  4956. }
  4957. };
  4958. hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {
  4959. if (pluginId === this.plugin.id) {
  4960. this.fallbacks.setSettings(value);
  4961. }
  4962. });
  4963. this.proxiedOn = new Proxy({}, {
  4964. get: (_target, prop) => {
  4965. if (this.target) {
  4966. return this.target.on[prop];
  4967. } else {
  4968. return (...args) => {
  4969. this.onQueue.push({
  4970. method: prop,
  4971. args
  4972. });
  4973. };
  4974. }
  4975. }
  4976. });
  4977. this.proxiedTarget = new Proxy({}, {
  4978. get: (_target, prop) => {
  4979. if (this.target) {
  4980. return this.target[prop];
  4981. } else if (prop === "on") {
  4982. return this.proxiedOn;
  4983. } else if (Object.keys(this.fallbacks).includes(prop)) {
  4984. return (...args) => {
  4985. this.targetQueue.push({
  4986. method: prop,
  4987. args,
  4988. resolve: () => {
  4989. }
  4990. });
  4991. return this.fallbacks[prop](...args);
  4992. };
  4993. } else {
  4994. return (...args) => {
  4995. return new Promise((resolve) => {
  4996. this.targetQueue.push({
  4997. method: prop,
  4998. args,
  4999. resolve
  5000. });
  5001. });
  5002. };
  5003. }
  5004. }
  5005. });
  5006. }
  5007. async setRealTarget(target) {
  5008. this.target = target;
  5009. for (const item of this.onQueue) {
  5010. this.target.on[item.method](...item.args);
  5011. }
  5012. for (const item of this.targetQueue) {
  5013. item.resolve(await this.target[item.method](...item.args));
  5014. }
  5015. }
  5016. }
  5017. function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
  5018. const target = getTarget();
  5019. const hook = getDevtoolsGlobalHook();
  5020. const enableProxy = isProxyAvailable && pluginDescriptor.enableEarlyProxy;
  5021. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  5022. hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
  5023. } else {
  5024. const proxy = enableProxy ? new ApiProxy(pluginDescriptor, hook) : null;
  5025. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  5026. list.push({
  5027. pluginDescriptor,
  5028. setupFn,
  5029. proxy
  5030. });
  5031. if (proxy)
  5032. setupFn(proxy.proxiedTarget);
  5033. }
  5034. }
  5035. /*!
  5036. * vuex v4.1.0
  5037. * (c) 2022 Evan You
  5038. * @license MIT
  5039. */
  5040. var storeKey = "store";
  5041. function forEachValue(obj, fn) {
  5042. Object.keys(obj).forEach(function(key) {
  5043. return fn(obj[key], key);
  5044. });
  5045. }
  5046. function isObject$3(obj) {
  5047. return obj !== null && typeof obj === "object";
  5048. }
  5049. function isPromise(val) {
  5050. return val && typeof val.then === "function";
  5051. }
  5052. function assert(condition, msg) {
  5053. if (!condition) {
  5054. throw new Error("[vuex] " + msg);
  5055. }
  5056. }
  5057. function partial(fn, arg) {
  5058. return function() {
  5059. return fn(arg);
  5060. };
  5061. }
  5062. function genericSubscribe(fn, subs, options) {
  5063. if (subs.indexOf(fn) < 0) {
  5064. options && options.prepend ? subs.unshift(fn) : subs.push(fn);
  5065. }
  5066. return function() {
  5067. var i2 = subs.indexOf(fn);
  5068. if (i2 > -1) {
  5069. subs.splice(i2, 1);
  5070. }
  5071. };
  5072. }
  5073. function resetStore(store, hot) {
  5074. store._actions = /* @__PURE__ */ Object.create(null);
  5075. store._mutations = /* @__PURE__ */ Object.create(null);
  5076. store._wrappedGetters = /* @__PURE__ */ Object.create(null);
  5077. store._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
  5078. var state2 = store.state;
  5079. installModule(store, state2, [], store._modules.root, true);
  5080. resetStoreState(store, state2, hot);
  5081. }
  5082. function resetStoreState(store, state2, hot) {
  5083. var oldState = store._state;
  5084. var oldScope = store._scope;
  5085. store.getters = {};
  5086. store._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
  5087. var wrappedGetters = store._wrappedGetters;
  5088. var computedObj = {};
  5089. var computedCache = {};
  5090. var scope = vue.effectScope(true);
  5091. scope.run(function() {
  5092. forEachValue(wrappedGetters, function(fn, key) {
  5093. computedObj[key] = partial(fn, store);
  5094. computedCache[key] = vue.computed(function() {
  5095. return computedObj[key]();
  5096. });
  5097. Object.defineProperty(store.getters, key, {
  5098. get: function() {
  5099. return computedCache[key].value;
  5100. },
  5101. enumerable: true
  5102. // for local getters
  5103. });
  5104. });
  5105. });
  5106. store._state = vue.reactive({
  5107. data: state2
  5108. });
  5109. store._scope = scope;
  5110. if (store.strict) {
  5111. enableStrictMode(store);
  5112. }
  5113. if (oldState) {
  5114. if (hot) {
  5115. store._withCommit(function() {
  5116. oldState.data = null;
  5117. });
  5118. }
  5119. }
  5120. if (oldScope) {
  5121. oldScope.stop();
  5122. }
  5123. }
  5124. function installModule(store, rootState, path, module, hot) {
  5125. var isRoot = !path.length;
  5126. var namespace = store._modules.getNamespace(path);
  5127. if (module.namespaced) {
  5128. if (store._modulesNamespaceMap[namespace] && true) {
  5129. console.error("[vuex] duplicate namespace " + namespace + " for the namespaced module " + path.join("/"));
  5130. }
  5131. store._modulesNamespaceMap[namespace] = module;
  5132. }
  5133. if (!isRoot && !hot) {
  5134. var parentState = getNestedState(rootState, path.slice(0, -1));
  5135. var moduleName = path[path.length - 1];
  5136. store._withCommit(function() {
  5137. {
  5138. if (moduleName in parentState) {
  5139. console.warn(
  5140. '[vuex] state field "' + moduleName + '" was overridden by a module with the same name at "' + path.join(".") + '"'
  5141. );
  5142. }
  5143. }
  5144. parentState[moduleName] = module.state;
  5145. });
  5146. }
  5147. var local = module.context = makeLocalContext(store, namespace, path);
  5148. module.forEachMutation(function(mutation, key) {
  5149. var namespacedType = namespace + key;
  5150. registerMutation(store, namespacedType, mutation, local);
  5151. });
  5152. module.forEachAction(function(action, key) {
  5153. var type = action.root ? key : namespace + key;
  5154. var handler = action.handler || action;
  5155. registerAction(store, type, handler, local);
  5156. });
  5157. module.forEachGetter(function(getter, key) {
  5158. var namespacedType = namespace + key;
  5159. registerGetter(store, namespacedType, getter, local);
  5160. });
  5161. module.forEachChild(function(child, key) {
  5162. installModule(store, rootState, path.concat(key), child, hot);
  5163. });
  5164. }
  5165. function makeLocalContext(store, namespace, path) {
  5166. var noNamespace = namespace === "";
  5167. var local = {
  5168. dispatch: noNamespace ? store.dispatch : function(_type, _payload, _options) {
  5169. var args = unifyObjectStyle(_type, _payload, _options);
  5170. var payload = args.payload;
  5171. var options = args.options;
  5172. var type = args.type;
  5173. if (!options || !options.root) {
  5174. type = namespace + type;
  5175. if (!store._actions[type]) {
  5176. console.error("[vuex] unknown local action type: " + args.type + ", global type: " + type);
  5177. return;
  5178. }
  5179. }
  5180. return store.dispatch(type, payload);
  5181. },
  5182. commit: noNamespace ? store.commit : function(_type, _payload, _options) {
  5183. var args = unifyObjectStyle(_type, _payload, _options);
  5184. var payload = args.payload;
  5185. var options = args.options;
  5186. var type = args.type;
  5187. if (!options || !options.root) {
  5188. type = namespace + type;
  5189. if (!store._mutations[type]) {
  5190. console.error("[vuex] unknown local mutation type: " + args.type + ", global type: " + type);
  5191. return;
  5192. }
  5193. }
  5194. store.commit(type, payload, options);
  5195. }
  5196. };
  5197. Object.defineProperties(local, {
  5198. getters: {
  5199. get: noNamespace ? function() {
  5200. return store.getters;
  5201. } : function() {
  5202. return makeLocalGetters(store, namespace);
  5203. }
  5204. },
  5205. state: {
  5206. get: function() {
  5207. return getNestedState(store.state, path);
  5208. }
  5209. }
  5210. });
  5211. return local;
  5212. }
  5213. function makeLocalGetters(store, namespace) {
  5214. if (!store._makeLocalGettersCache[namespace]) {
  5215. var gettersProxy = {};
  5216. var splitPos = namespace.length;
  5217. Object.keys(store.getters).forEach(function(type) {
  5218. if (type.slice(0, splitPos) !== namespace) {
  5219. return;
  5220. }
  5221. var localType = type.slice(splitPos);
  5222. Object.defineProperty(gettersProxy, localType, {
  5223. get: function() {
  5224. return store.getters[type];
  5225. },
  5226. enumerable: true
  5227. });
  5228. });
  5229. store._makeLocalGettersCache[namespace] = gettersProxy;
  5230. }
  5231. return store._makeLocalGettersCache[namespace];
  5232. }
  5233. function registerMutation(store, type, handler, local) {
  5234. var entry = store._mutations[type] || (store._mutations[type] = []);
  5235. entry.push(function wrappedMutationHandler(payload) {
  5236. handler.call(store, local.state, payload);
  5237. });
  5238. }
  5239. function registerAction(store, type, handler, local) {
  5240. var entry = store._actions[type] || (store._actions[type] = []);
  5241. entry.push(function wrappedActionHandler(payload) {
  5242. var res = handler.call(store, {
  5243. dispatch: local.dispatch,
  5244. commit: local.commit,
  5245. getters: local.getters,
  5246. state: local.state,
  5247. rootGetters: store.getters,
  5248. rootState: store.state
  5249. }, payload);
  5250. if (!isPromise(res)) {
  5251. res = Promise.resolve(res);
  5252. }
  5253. if (store._devtoolHook) {
  5254. return res.catch(function(err) {
  5255. store._devtoolHook.emit("vuex:error", err);
  5256. throw err;
  5257. });
  5258. } else {
  5259. return res;
  5260. }
  5261. });
  5262. }
  5263. function registerGetter(store, type, rawGetter, local) {
  5264. if (store._wrappedGetters[type]) {
  5265. {
  5266. console.error("[vuex] duplicate getter key: " + type);
  5267. }
  5268. return;
  5269. }
  5270. store._wrappedGetters[type] = function wrappedGetter(store2) {
  5271. return rawGetter(
  5272. local.state,
  5273. // local state
  5274. local.getters,
  5275. // local getters
  5276. store2.state,
  5277. // root state
  5278. store2.getters
  5279. // root getters
  5280. );
  5281. };
  5282. }
  5283. function enableStrictMode(store) {
  5284. vue.watch(function() {
  5285. return store._state.data;
  5286. }, function() {
  5287. {
  5288. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  5289. }
  5290. }, { deep: true, flush: "sync" });
  5291. }
  5292. function getNestedState(state2, path) {
  5293. return path.reduce(function(state22, key) {
  5294. return state22[key];
  5295. }, state2);
  5296. }
  5297. function unifyObjectStyle(type, payload, options) {
  5298. if (isObject$3(type) && type.type) {
  5299. options = payload;
  5300. payload = type;
  5301. type = type.type;
  5302. }
  5303. {
  5304. assert(typeof type === "string", "expects string as the type, but found " + typeof type + ".");
  5305. }
  5306. return { type, payload, options };
  5307. }
  5308. var LABEL_VUEX_BINDINGS = "vuex bindings";
  5309. var MUTATIONS_LAYER_ID = "vuex:mutations";
  5310. var ACTIONS_LAYER_ID = "vuex:actions";
  5311. var INSPECTOR_ID = "vuex";
  5312. var actionId = 0;
  5313. function addDevtools(app, store) {
  5314. setupDevtoolsPlugin(
  5315. {
  5316. id: "org.vuejs.vuex",
  5317. app,
  5318. label: "Vuex",
  5319. homepage: "https://next.vuex.vuejs.org/",
  5320. logo: "https://vuejs.org/images/icons/favicon-96x96.png",
  5321. packageName: "vuex",
  5322. componentStateTypes: [LABEL_VUEX_BINDINGS]
  5323. },
  5324. function(api) {
  5325. api.addTimelineLayer({
  5326. id: MUTATIONS_LAYER_ID,
  5327. label: "Vuex Mutations",
  5328. color: COLOR_LIME_500
  5329. });
  5330. api.addTimelineLayer({
  5331. id: ACTIONS_LAYER_ID,
  5332. label: "Vuex Actions",
  5333. color: COLOR_LIME_500
  5334. });
  5335. api.addInspector({
  5336. id: INSPECTOR_ID,
  5337. label: "Vuex",
  5338. icon: "storage",
  5339. treeFilterPlaceholder: "Filter stores..."
  5340. });
  5341. api.on.getInspectorTree(function(payload) {
  5342. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  5343. if (payload.filter) {
  5344. var nodes = [];
  5345. flattenStoreForInspectorTree(nodes, store._modules.root, payload.filter, "");
  5346. payload.rootNodes = nodes;
  5347. } else {
  5348. payload.rootNodes = [
  5349. formatStoreForInspectorTree(store._modules.root, "")
  5350. ];
  5351. }
  5352. }
  5353. });
  5354. api.on.getInspectorState(function(payload) {
  5355. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  5356. var modulePath = payload.nodeId;
  5357. makeLocalGetters(store, modulePath);
  5358. payload.state = formatStoreForInspectorState(
  5359. getStoreModule(store._modules, modulePath),
  5360. modulePath === "root" ? store.getters : store._makeLocalGettersCache,
  5361. modulePath
  5362. );
  5363. }
  5364. });
  5365. api.on.editInspectorState(function(payload) {
  5366. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  5367. var modulePath = payload.nodeId;
  5368. var path = payload.path;
  5369. if (modulePath !== "root") {
  5370. path = modulePath.split("/").filter(Boolean).concat(path);
  5371. }
  5372. store._withCommit(function() {
  5373. payload.set(store._state.data, path, payload.state.value);
  5374. });
  5375. }
  5376. });
  5377. store.subscribe(function(mutation, state2) {
  5378. var data = {};
  5379. if (mutation.payload) {
  5380. data.payload = mutation.payload;
  5381. }
  5382. data.state = state2;
  5383. api.notifyComponentUpdate();
  5384. api.sendInspectorTree(INSPECTOR_ID);
  5385. api.sendInspectorState(INSPECTOR_ID);
  5386. api.addTimelineEvent({
  5387. layerId: MUTATIONS_LAYER_ID,
  5388. event: {
  5389. time: Date.now(),
  5390. title: mutation.type,
  5391. data
  5392. }
  5393. });
  5394. });
  5395. store.subscribeAction({
  5396. before: function(action, state2) {
  5397. var data = {};
  5398. if (action.payload) {
  5399. data.payload = action.payload;
  5400. }
  5401. action._id = actionId++;
  5402. action._time = Date.now();
  5403. data.state = state2;
  5404. api.addTimelineEvent({
  5405. layerId: ACTIONS_LAYER_ID,
  5406. event: {
  5407. time: action._time,
  5408. title: action.type,
  5409. groupId: action._id,
  5410. subtitle: "start",
  5411. data
  5412. }
  5413. });
  5414. },
  5415. after: function(action, state2) {
  5416. var data = {};
  5417. var duration = Date.now() - action._time;
  5418. data.duration = {
  5419. _custom: {
  5420. type: "duration",
  5421. display: duration + "ms",
  5422. tooltip: "Action duration",
  5423. value: duration
  5424. }
  5425. };
  5426. if (action.payload) {
  5427. data.payload = action.payload;
  5428. }
  5429. data.state = state2;
  5430. api.addTimelineEvent({
  5431. layerId: ACTIONS_LAYER_ID,
  5432. event: {
  5433. time: Date.now(),
  5434. title: action.type,
  5435. groupId: action._id,
  5436. subtitle: "end",
  5437. data
  5438. }
  5439. });
  5440. }
  5441. });
  5442. }
  5443. );
  5444. }
  5445. var COLOR_LIME_500 = 8702998;
  5446. var COLOR_DARK = 6710886;
  5447. var COLOR_WHITE = 16777215;
  5448. var TAG_NAMESPACED = {
  5449. label: "namespaced",
  5450. textColor: COLOR_WHITE,
  5451. backgroundColor: COLOR_DARK
  5452. };
  5453. function extractNameFromPath(path) {
  5454. return path && path !== "root" ? path.split("/").slice(-2, -1)[0] : "Root";
  5455. }
  5456. function formatStoreForInspectorTree(module, path) {
  5457. return {
  5458. id: path || "root",
  5459. // all modules end with a `/`, we want the last segment only
  5460. // cart/ -> cart
  5461. // nested/cart/ -> cart
  5462. label: extractNameFromPath(path),
  5463. tags: module.namespaced ? [TAG_NAMESPACED] : [],
  5464. children: Object.keys(module._children).map(
  5465. function(moduleName) {
  5466. return formatStoreForInspectorTree(
  5467. module._children[moduleName],
  5468. path + moduleName + "/"
  5469. );
  5470. }
  5471. )
  5472. };
  5473. }
  5474. function flattenStoreForInspectorTree(result, module, filter, path) {
  5475. if (path.includes(filter)) {
  5476. result.push({
  5477. id: path || "root",
  5478. label: path.endsWith("/") ? path.slice(0, path.length - 1) : path || "Root",
  5479. tags: module.namespaced ? [TAG_NAMESPACED] : []
  5480. });
  5481. }
  5482. Object.keys(module._children).forEach(function(moduleName) {
  5483. flattenStoreForInspectorTree(result, module._children[moduleName], filter, path + moduleName + "/");
  5484. });
  5485. }
  5486. function formatStoreForInspectorState(module, getters, path) {
  5487. getters = path === "root" ? getters : getters[path];
  5488. var gettersKeys = Object.keys(getters);
  5489. var storeState = {
  5490. state: Object.keys(module.state).map(function(key) {
  5491. return {
  5492. key,
  5493. editable: true,
  5494. value: module.state[key]
  5495. };
  5496. })
  5497. };
  5498. if (gettersKeys.length) {
  5499. var tree = transformPathsToObjectTree(getters);
  5500. storeState.getters = Object.keys(tree).map(function(key) {
  5501. return {
  5502. key: key.endsWith("/") ? extractNameFromPath(key) : key,
  5503. editable: false,
  5504. value: canThrow(function() {
  5505. return tree[key];
  5506. })
  5507. };
  5508. });
  5509. }
  5510. return storeState;
  5511. }
  5512. function transformPathsToObjectTree(getters) {
  5513. var result = {};
  5514. Object.keys(getters).forEach(function(key) {
  5515. var path = key.split("/");
  5516. if (path.length > 1) {
  5517. var target = result;
  5518. var leafKey = path.pop();
  5519. path.forEach(function(p2) {
  5520. if (!target[p2]) {
  5521. target[p2] = {
  5522. _custom: {
  5523. value: {},
  5524. display: p2,
  5525. tooltip: "Module",
  5526. abstract: true
  5527. }
  5528. };
  5529. }
  5530. target = target[p2]._custom.value;
  5531. });
  5532. target[leafKey] = canThrow(function() {
  5533. return getters[key];
  5534. });
  5535. } else {
  5536. result[key] = canThrow(function() {
  5537. return getters[key];
  5538. });
  5539. }
  5540. });
  5541. return result;
  5542. }
  5543. function getStoreModule(moduleMap, path) {
  5544. var names = path.split("/").filter(function(n2) {
  5545. return n2;
  5546. });
  5547. return names.reduce(
  5548. function(module, moduleName, i2) {
  5549. var child = module[moduleName];
  5550. if (!child) {
  5551. throw new Error('Missing module "' + moduleName + '" for path "' + path + '".');
  5552. }
  5553. return i2 === names.length - 1 ? child : child._children;
  5554. },
  5555. path === "root" ? moduleMap : moduleMap.root._children
  5556. );
  5557. }
  5558. function canThrow(cb) {
  5559. try {
  5560. return cb();
  5561. } catch (e2) {
  5562. return e2;
  5563. }
  5564. }
  5565. var Module = function Module2(rawModule, runtime) {
  5566. this.runtime = runtime;
  5567. this._children = /* @__PURE__ */ Object.create(null);
  5568. this._rawModule = rawModule;
  5569. var rawState = rawModule.state;
  5570. this.state = (typeof rawState === "function" ? rawState() : rawState) || {};
  5571. };
  5572. var prototypeAccessors$1 = { namespaced: { configurable: true } };
  5573. prototypeAccessors$1.namespaced.get = function() {
  5574. return !!this._rawModule.namespaced;
  5575. };
  5576. Module.prototype.addChild = function addChild(key, module) {
  5577. this._children[key] = module;
  5578. };
  5579. Module.prototype.removeChild = function removeChild(key) {
  5580. delete this._children[key];
  5581. };
  5582. Module.prototype.getChild = function getChild(key) {
  5583. return this._children[key];
  5584. };
  5585. Module.prototype.hasChild = function hasChild(key) {
  5586. return key in this._children;
  5587. };
  5588. Module.prototype.update = function update(rawModule) {
  5589. this._rawModule.namespaced = rawModule.namespaced;
  5590. if (rawModule.actions) {
  5591. this._rawModule.actions = rawModule.actions;
  5592. }
  5593. if (rawModule.mutations) {
  5594. this._rawModule.mutations = rawModule.mutations;
  5595. }
  5596. if (rawModule.getters) {
  5597. this._rawModule.getters = rawModule.getters;
  5598. }
  5599. };
  5600. Module.prototype.forEachChild = function forEachChild(fn) {
  5601. forEachValue(this._children, fn);
  5602. };
  5603. Module.prototype.forEachGetter = function forEachGetter(fn) {
  5604. if (this._rawModule.getters) {
  5605. forEachValue(this._rawModule.getters, fn);
  5606. }
  5607. };
  5608. Module.prototype.forEachAction = function forEachAction(fn) {
  5609. if (this._rawModule.actions) {
  5610. forEachValue(this._rawModule.actions, fn);
  5611. }
  5612. };
  5613. Module.prototype.forEachMutation = function forEachMutation(fn) {
  5614. if (this._rawModule.mutations) {
  5615. forEachValue(this._rawModule.mutations, fn);
  5616. }
  5617. };
  5618. Object.defineProperties(Module.prototype, prototypeAccessors$1);
  5619. var ModuleCollection = function ModuleCollection2(rawRootModule) {
  5620. this.register([], rawRootModule, false);
  5621. };
  5622. ModuleCollection.prototype.get = function get(path) {
  5623. return path.reduce(function(module, key) {
  5624. return module.getChild(key);
  5625. }, this.root);
  5626. };
  5627. ModuleCollection.prototype.getNamespace = function getNamespace(path) {
  5628. var module = this.root;
  5629. return path.reduce(function(namespace, key) {
  5630. module = module.getChild(key);
  5631. return namespace + (module.namespaced ? key + "/" : "");
  5632. }, "");
  5633. };
  5634. ModuleCollection.prototype.update = function update$1(rawRootModule) {
  5635. update2([], this.root, rawRootModule);
  5636. };
  5637. ModuleCollection.prototype.register = function register(path, rawModule, runtime) {
  5638. var this$1$1 = this;
  5639. if (runtime === void 0)
  5640. runtime = true;
  5641. {
  5642. assertRawModule(path, rawModule);
  5643. }
  5644. var newModule = new Module(rawModule, runtime);
  5645. if (path.length === 0) {
  5646. this.root = newModule;
  5647. } else {
  5648. var parent = this.get(path.slice(0, -1));
  5649. parent.addChild(path[path.length - 1], newModule);
  5650. }
  5651. if (rawModule.modules) {
  5652. forEachValue(rawModule.modules, function(rawChildModule, key) {
  5653. this$1$1.register(path.concat(key), rawChildModule, runtime);
  5654. });
  5655. }
  5656. };
  5657. ModuleCollection.prototype.unregister = function unregister(path) {
  5658. var parent = this.get(path.slice(0, -1));
  5659. var key = path[path.length - 1];
  5660. var child = parent.getChild(key);
  5661. if (!child) {
  5662. {
  5663. console.warn(
  5664. "[vuex] trying to unregister module '" + key + "', which is not registered"
  5665. );
  5666. }
  5667. return;
  5668. }
  5669. if (!child.runtime) {
  5670. return;
  5671. }
  5672. parent.removeChild(key);
  5673. };
  5674. ModuleCollection.prototype.isRegistered = function isRegistered(path) {
  5675. var parent = this.get(path.slice(0, -1));
  5676. var key = path[path.length - 1];
  5677. if (parent) {
  5678. return parent.hasChild(key);
  5679. }
  5680. return false;
  5681. };
  5682. function update2(path, targetModule, newModule) {
  5683. {
  5684. assertRawModule(path, newModule);
  5685. }
  5686. targetModule.update(newModule);
  5687. if (newModule.modules) {
  5688. for (var key in newModule.modules) {
  5689. if (!targetModule.getChild(key)) {
  5690. {
  5691. console.warn(
  5692. "[vuex] trying to add a new module '" + key + "' on hot reloading, manual reload is needed"
  5693. );
  5694. }
  5695. return;
  5696. }
  5697. update2(
  5698. path.concat(key),
  5699. targetModule.getChild(key),
  5700. newModule.modules[key]
  5701. );
  5702. }
  5703. }
  5704. }
  5705. var functionAssert = {
  5706. assert: function(value) {
  5707. return typeof value === "function";
  5708. },
  5709. expected: "function"
  5710. };
  5711. var objectAssert = {
  5712. assert: function(value) {
  5713. return typeof value === "function" || typeof value === "object" && typeof value.handler === "function";
  5714. },
  5715. expected: 'function or object with "handler" function'
  5716. };
  5717. var assertTypes = {
  5718. getters: functionAssert,
  5719. mutations: functionAssert,
  5720. actions: objectAssert
  5721. };
  5722. function assertRawModule(path, rawModule) {
  5723. Object.keys(assertTypes).forEach(function(key) {
  5724. if (!rawModule[key]) {
  5725. return;
  5726. }
  5727. var assertOptions = assertTypes[key];
  5728. forEachValue(rawModule[key], function(value, type) {
  5729. assert(
  5730. assertOptions.assert(value),
  5731. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  5732. );
  5733. });
  5734. });
  5735. }
  5736. function makeAssertionMessage(path, key, type, value, expected) {
  5737. var buf = key + " should be " + expected + ' but "' + key + "." + type + '"';
  5738. if (path.length > 0) {
  5739. buf += ' in module "' + path.join(".") + '"';
  5740. }
  5741. buf += " is " + JSON.stringify(value) + ".";
  5742. return buf;
  5743. }
  5744. function createStore(options) {
  5745. return new Store$1(options);
  5746. }
  5747. var Store$1 = function Store2(options) {
  5748. var this$1$1 = this;
  5749. if (options === void 0)
  5750. options = {};
  5751. {
  5752. assert(typeof Promise !== "undefined", "vuex requires a Promise polyfill in this browser.");
  5753. assert(this instanceof Store2, "store must be called with the new operator.");
  5754. }
  5755. var plugins = options.plugins;
  5756. if (plugins === void 0)
  5757. plugins = [];
  5758. var strict = options.strict;
  5759. if (strict === void 0)
  5760. strict = false;
  5761. var devtools2 = options.devtools;
  5762. this._committing = false;
  5763. this._actions = /* @__PURE__ */ Object.create(null);
  5764. this._actionSubscribers = [];
  5765. this._mutations = /* @__PURE__ */ Object.create(null);
  5766. this._wrappedGetters = /* @__PURE__ */ Object.create(null);
  5767. this._modules = new ModuleCollection(options);
  5768. this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
  5769. this._subscribers = [];
  5770. this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
  5771. this._scope = null;
  5772. this._devtools = devtools2;
  5773. var store = this;
  5774. var ref = this;
  5775. var dispatch2 = ref.dispatch;
  5776. var commit2 = ref.commit;
  5777. this.dispatch = function boundDispatch(type, payload) {
  5778. return dispatch2.call(store, type, payload);
  5779. };
  5780. this.commit = function boundCommit(type, payload, options2) {
  5781. return commit2.call(store, type, payload, options2);
  5782. };
  5783. this.strict = strict;
  5784. var state2 = this._modules.root.state;
  5785. installModule(this, state2, [], this._modules.root);
  5786. resetStoreState(this, state2);
  5787. plugins.forEach(function(plugin) {
  5788. return plugin(this$1$1);
  5789. });
  5790. };
  5791. var prototypeAccessors = { state: { configurable: true } };
  5792. Store$1.prototype.install = function install(app, injectKey) {
  5793. app.provide(injectKey || storeKey, this);
  5794. app.config.globalProperties.$store = this;
  5795. var useDevtools = this._devtools !== void 0 ? this._devtools : true;
  5796. if (useDevtools) {
  5797. addDevtools(app, this);
  5798. }
  5799. };
  5800. prototypeAccessors.state.get = function() {
  5801. return this._state.data;
  5802. };
  5803. prototypeAccessors.state.set = function(v2) {
  5804. {
  5805. assert(false, "use store.replaceState() to explicit replace store state.");
  5806. }
  5807. };
  5808. Store$1.prototype.commit = function commit(_type, _payload, _options) {
  5809. var this$1$1 = this;
  5810. var ref = unifyObjectStyle(_type, _payload, _options);
  5811. var type = ref.type;
  5812. var payload = ref.payload;
  5813. var options = ref.options;
  5814. var mutation = { type, payload };
  5815. var entry = this._mutations[type];
  5816. if (!entry) {
  5817. {
  5818. console.error("[vuex] unknown mutation type: " + type);
  5819. }
  5820. return;
  5821. }
  5822. this._withCommit(function() {
  5823. entry.forEach(function commitIterator(handler) {
  5824. handler(payload);
  5825. });
  5826. });
  5827. this._subscribers.slice().forEach(function(sub) {
  5828. return sub(mutation, this$1$1.state);
  5829. });
  5830. if (options && options.silent) {
  5831. console.warn(
  5832. "[vuex] mutation type: " + type + ". Silent option has been removed. Use the filter functionality in the vue-devtools"
  5833. );
  5834. }
  5835. };
  5836. Store$1.prototype.dispatch = function dispatch(_type, _payload) {
  5837. var this$1$1 = this;
  5838. var ref = unifyObjectStyle(_type, _payload);
  5839. var type = ref.type;
  5840. var payload = ref.payload;
  5841. var action = { type, payload };
  5842. var entry = this._actions[type];
  5843. if (!entry) {
  5844. {
  5845. console.error("[vuex] unknown action type: " + type);
  5846. }
  5847. return;
  5848. }
  5849. try {
  5850. this._actionSubscribers.slice().filter(function(sub) {
  5851. return sub.before;
  5852. }).forEach(function(sub) {
  5853. return sub.before(action, this$1$1.state);
  5854. });
  5855. } catch (e2) {
  5856. {
  5857. console.warn("[vuex] error in before action subscribers: ");
  5858. console.error(e2);
  5859. }
  5860. }
  5861. var result = entry.length > 1 ? Promise.all(entry.map(function(handler) {
  5862. return handler(payload);
  5863. })) : entry[0](payload);
  5864. return new Promise(function(resolve, reject) {
  5865. result.then(function(res) {
  5866. try {
  5867. this$1$1._actionSubscribers.filter(function(sub) {
  5868. return sub.after;
  5869. }).forEach(function(sub) {
  5870. return sub.after(action, this$1$1.state);
  5871. });
  5872. } catch (e2) {
  5873. {
  5874. console.warn("[vuex] error in after action subscribers: ");
  5875. console.error(e2);
  5876. }
  5877. }
  5878. resolve(res);
  5879. }, function(error) {
  5880. try {
  5881. this$1$1._actionSubscribers.filter(function(sub) {
  5882. return sub.error;
  5883. }).forEach(function(sub) {
  5884. return sub.error(action, this$1$1.state, error);
  5885. });
  5886. } catch (e2) {
  5887. {
  5888. console.warn("[vuex] error in error action subscribers: ");
  5889. console.error(e2);
  5890. }
  5891. }
  5892. reject(error);
  5893. });
  5894. });
  5895. };
  5896. Store$1.prototype.subscribe = function subscribe(fn, options) {
  5897. return genericSubscribe(fn, this._subscribers, options);
  5898. };
  5899. Store$1.prototype.subscribeAction = function subscribeAction(fn, options) {
  5900. var subs = typeof fn === "function" ? { before: fn } : fn;
  5901. return genericSubscribe(subs, this._actionSubscribers, options);
  5902. };
  5903. Store$1.prototype.watch = function watch$1(getter, cb, options) {
  5904. var this$1$1 = this;
  5905. {
  5906. assert(typeof getter === "function", "store.watch only accepts a function.");
  5907. }
  5908. return vue.watch(function() {
  5909. return getter(this$1$1.state, this$1$1.getters);
  5910. }, cb, Object.assign({}, options));
  5911. };
  5912. Store$1.prototype.replaceState = function replaceState(state2) {
  5913. var this$1$1 = this;
  5914. this._withCommit(function() {
  5915. this$1$1._state.data = state2;
  5916. });
  5917. };
  5918. Store$1.prototype.registerModule = function registerModule(path, rawModule, options) {
  5919. if (options === void 0)
  5920. options = {};
  5921. if (typeof path === "string") {
  5922. path = [path];
  5923. }
  5924. {
  5925. assert(Array.isArray(path), "module path must be a string or an Array.");
  5926. assert(path.length > 0, "cannot register the root module by using registerModule.");
  5927. }
  5928. this._modules.register(path, rawModule);
  5929. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  5930. resetStoreState(this, this.state);
  5931. };
  5932. Store$1.prototype.unregisterModule = function unregisterModule(path) {
  5933. var this$1$1 = this;
  5934. if (typeof path === "string") {
  5935. path = [path];
  5936. }
  5937. {
  5938. assert(Array.isArray(path), "module path must be a string or an Array.");
  5939. }
  5940. this._modules.unregister(path);
  5941. this._withCommit(function() {
  5942. var parentState = getNestedState(this$1$1.state, path.slice(0, -1));
  5943. delete parentState[path[path.length - 1]];
  5944. });
  5945. resetStore(this);
  5946. };
  5947. Store$1.prototype.hasModule = function hasModule(path) {
  5948. if (typeof path === "string") {
  5949. path = [path];
  5950. }
  5951. {
  5952. assert(Array.isArray(path), "module path must be a string or an Array.");
  5953. }
  5954. return this._modules.isRegistered(path);
  5955. };
  5956. Store$1.prototype.hotUpdate = function hotUpdate(newOptions) {
  5957. this._modules.update(newOptions);
  5958. resetStore(this, true);
  5959. };
  5960. Store$1.prototype._withCommit = function _withCommit(fn) {
  5961. var committing = this._committing;
  5962. this._committing = true;
  5963. fn();
  5964. this._committing = committing;
  5965. };
  5966. Object.defineProperties(Store$1.prototype, prototypeAccessors);
  5967. var mapState = normalizeNamespace(function(namespace, states) {
  5968. var res = {};
  5969. if (!isValidMap(states)) {
  5970. console.error("[vuex] mapState: mapper parameter must be either an Array or an Object");
  5971. }
  5972. normalizeMap(states).forEach(function(ref) {
  5973. var key = ref.key;
  5974. var val = ref.val;
  5975. res[key] = function mappedState() {
  5976. var state2 = this.$store.state;
  5977. var getters = this.$store.getters;
  5978. if (namespace) {
  5979. var module = getModuleByNamespace(this.$store, "mapState", namespace);
  5980. if (!module) {
  5981. return;
  5982. }
  5983. state2 = module.context.state;
  5984. getters = module.context.getters;
  5985. }
  5986. return typeof val === "function" ? val.call(this, state2, getters) : state2[val];
  5987. };
  5988. res[key].vuex = true;
  5989. });
  5990. return res;
  5991. });
  5992. function normalizeMap(map) {
  5993. if (!isValidMap(map)) {
  5994. return [];
  5995. }
  5996. return Array.isArray(map) ? map.map(function(key) {
  5997. return { key, val: key };
  5998. }) : Object.keys(map).map(function(key) {
  5999. return { key, val: map[key] };
  6000. });
  6001. }
  6002. function isValidMap(map) {
  6003. return Array.isArray(map) || isObject$3(map);
  6004. }
  6005. function normalizeNamespace(fn) {
  6006. return function(namespace, map) {
  6007. if (typeof namespace !== "string") {
  6008. map = namespace;
  6009. namespace = "";
  6010. } else if (namespace.charAt(namespace.length - 1) !== "/") {
  6011. namespace += "/";
  6012. }
  6013. return fn(namespace, map);
  6014. };
  6015. }
  6016. function getModuleByNamespace(store, helper, namespace) {
  6017. var module = store._modulesNamespaceMap[namespace];
  6018. if (!module) {
  6019. console.error("[vuex] module namespace not found in " + helper + "(): " + namespace);
  6020. }
  6021. return module;
  6022. }
  6023. const _imports_0 = "/static/logo.png";
  6024. const _imports_1$3 = "/static/img/energy1.png";
  6025. const _imports_2$3 = "/static/img/Energybrightness1.png";
  6026. const _imports_3$4 = "/static/img/energy2.png";
  6027. const _imports_4$3 = "/static/img/Energybrightness2.png";
  6028. const _imports_5$1 = "/static/img/energy3.png";
  6029. const _imports_6$1 = "/static/img/Energybrightness3.png";
  6030. const _imports_7$1 = "/static/img/energy4.png";
  6031. const _imports_8$1 = "/static/img/Energybrightness4.png";
  6032. const _imports_9 = "/static/img/setup.png";
  6033. const _imports_10$1 = "/static/!.png";
  6034. const _sfc_main$c = {
  6035. data() {
  6036. return {
  6037. title: "",
  6038. uidatas: "",
  6039. formatTimeid: "",
  6040. messageText: "",
  6041. appVersion: "",
  6042. // 用于存储应用版本号
  6043. appLanguage: "zh-Hans",
  6044. range: [
  6045. { value: "zh-Hans", text: "中文" },
  6046. { value: "en", text: "English" }
  6047. ]
  6048. };
  6049. },
  6050. created() {
  6051. },
  6052. mounted() {
  6053. this.appLanguage = uni.getStorageSync("userLanguage") || "zh-Hans";
  6054. },
  6055. computed: {
  6056. // 使用 mapState 映射多个状态到组件的计算属性
  6057. ...mapState(["formattedTime", "status", "selectorid", "selectorindex"]),
  6058. ...mapState({
  6059. uidatasdata: (state2) => state2.uidatasdata
  6060. })
  6061. },
  6062. onLoad() {
  6063. uni.getSystemInfo({
  6064. success: (res) => {
  6065. formatAppLog("log", "at pages/index/index.vue:235", res);
  6066. this.appVersion = res.appWgtVersion;
  6067. },
  6068. fail: (err) => {
  6069. formatAppLog("error", "at pages/index/index.vue:239", "获取系统信息失败:", err);
  6070. }
  6071. });
  6072. },
  6073. beforeUnmount() {
  6074. clearInterval(this.uidatas);
  6075. },
  6076. methods: {
  6077. changeLanguage(locale) {
  6078. formatAppLog("log", "at pages/index/index.vue:249", locale);
  6079. this.$i18n.locale = locale;
  6080. uni.setStorageSync("userLanguage", locale);
  6081. },
  6082. onclick(e2) {
  6083. this.pattern(e2);
  6084. },
  6085. pattern(unm) {
  6086. let data = {
  6087. id: "c32e6a80-9159-4f6e-9acc-8525cf177808",
  6088. issaveinitvalue: true,
  6089. value: unm + ""
  6090. // 直流供电=1,直流补电=4,交流供电=2,交流补电=3
  6091. };
  6092. control(data).then((data2) => {
  6093. formatAppLog("log", "at pages/index/index.vue:263", data2);
  6094. if (data2.status == "ok") {
  6095. if (unm == 3) {
  6096. uni.redirectTo({
  6097. url: "/pages/home/index"
  6098. });
  6099. } else if (unm == 2) {
  6100. uni.redirectTo({
  6101. url: "/pages/electricity/index"
  6102. });
  6103. } else if (unm == 4) {
  6104. uni.redirectTo({
  6105. url: "/pages/supply/supply"
  6106. });
  6107. } else if (unm == 1) {
  6108. uni.redirectTo({
  6109. url: "/pages/supplyss/supplyss"
  6110. });
  6111. }
  6112. } else {
  6113. this.messageText = "选择模式失败请重新选择";
  6114. this.$refs.message.open();
  6115. return;
  6116. }
  6117. });
  6118. },
  6119. onget(unm) {
  6120. if (unm == 3) {
  6121. uni.redirectTo({
  6122. url: "/pages/home/index"
  6123. });
  6124. } else if (unm == 2) {
  6125. uni.redirectTo({
  6126. url: "/pages/electricity/index"
  6127. });
  6128. } else if (unm == 4) {
  6129. uni.redirectTo({
  6130. url: "/pages/supply/supply"
  6131. });
  6132. } else if (unm == 1) {
  6133. uni.redirectTo({
  6134. url: "/pages/supplyss/supplyss"
  6135. });
  6136. }
  6137. },
  6138. system() {
  6139. uni.redirectTo({
  6140. url: "/pages/faultlist/index"
  6141. });
  6142. }
  6143. }
  6144. };
  6145. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  6146. const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3);
  6147. const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
  6148. const _component_uni_data_select = resolveEasycom(vue.resolveDynamicComponent("uni-data-select"), __easycom_2);
  6149. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  6150. vue.createElementVNode("view", { class: "top" }, [
  6151. vue.createElementVNode("image", {
  6152. class: "top_logo",
  6153. src: _imports_0,
  6154. mode: ""
  6155. }),
  6156. vue.createCommentVNode(' <image class="tite" src="../../static/tite.png" mode=""></image> '),
  6157. vue.createElementVNode(
  6158. "view",
  6159. { class: "tite" },
  6160. vue.toDisplayString(_ctx.$t("MainTitle")),
  6161. 1
  6162. /* TEXT */
  6163. ),
  6164. vue.createElementVNode("view", { class: "time" }, [
  6165. vue.createElementVNode(
  6166. "view",
  6167. { class: "time_top" },
  6168. vue.toDisplayString(_ctx.formattedTime),
  6169. 1
  6170. /* TEXT */
  6171. ),
  6172. vue.createElementVNode("view", { class: "time_bottom" }, [
  6173. vue.createElementVNode("view"),
  6174. vue.createElementVNode("view", { class: "time_bottom1" }, [
  6175. vue.createTextVNode(
  6176. vue.toDisplayString(_ctx.$t("status")) + " ",
  6177. 1
  6178. /* TEXT */
  6179. ),
  6180. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  6181. "view",
  6182. {
  6183. key: 0,
  6184. class: "time_state"
  6185. },
  6186. vue.toDisplayString(_ctx.$t("online")),
  6187. 1
  6188. /* TEXT */
  6189. )) : (vue.openBlock(), vue.createElementBlock(
  6190. "view",
  6191. {
  6192. key: 1,
  6193. class: "time_state1"
  6194. },
  6195. vue.toDisplayString(_ctx.$t("offline")),
  6196. 1
  6197. /* TEXT */
  6198. ))
  6199. ])
  6200. ])
  6201. ])
  6202. ]),
  6203. vue.createElementVNode("view", { class: "tap" }, [
  6204. vue.createElementVNode("view", { class: "tap_1" }, " AC "),
  6205. vue.createElementVNode("view", { class: "tap_2" }, " DC "),
  6206. vue.createElementVNode("view", { class: "tap_3" }, " SYS ")
  6207. ]),
  6208. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock("view", {
  6209. key: 0,
  6210. class: "power"
  6211. }, [
  6212. vue.createCommentVNode(' <view class="power_1">\r\n <image v-if="selectorid!=3&&selectorindex==1" src="../../static/choice1.png" mode=""></image>\r\n <image v-else src="../../static/electricity.png" mode="" @click="onclick(3)"></image>\r\n </view>\r\n <view class="power_1">\r\n <image v-if="selectorid!=2&&selectorindex==1" src="../../static/choice2.png" mode=""></image>\r\n <image v-else src="../../static/power1.png" mode="" @click="onclick(2)"></image>\r\n </view>\r\n <view class="power_1">\r\n <image v-if="selectorid!=4&&selectorindex==1" src="../../static/choice3.png" mode=""></image>\r\n <image v-else src="../../static/direct1.png" mode="" @click="onclick(4)"></image>\r\n </view>\r\n <view class="power_1">\r\n <image v-if="selectorid!=1&&selectorindex==1" src="../../static/choice4.png" mode=""></image>\r\n <image v-else src="../../static/DCpower1.png" mode="" @click="onclick(1)"></image>\r\n </view> '),
  6213. _ctx.selectorid != 3 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  6214. vue.createElementVNode("view", { class: "power_1" }, [
  6215. vue.createElementVNode("view", { class: "power_bj" }, [
  6216. vue.createElementVNode("image", {
  6217. src: _imports_1$3,
  6218. mode: ""
  6219. })
  6220. ]),
  6221. vue.createElementVNode(
  6222. "view",
  6223. { class: "power_title" },
  6224. vue.toDisplayString(_ctx.$t("CommunicationRecharge")),
  6225. 1
  6226. /* TEXT */
  6227. )
  6228. ])
  6229. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  6230. key: 1,
  6231. onClick: _cache[0] || (_cache[0] = ($event) => $options.onclick(3))
  6232. }, [
  6233. vue.createElementVNode("view", { class: "power_1" }, [
  6234. vue.createElementVNode("view", { class: "power_bright" }, [
  6235. vue.createElementVNode("image", {
  6236. src: _imports_2$3,
  6237. mode: ""
  6238. })
  6239. ]),
  6240. vue.createElementVNode(
  6241. "view",
  6242. { class: "power_title_bright" },
  6243. vue.toDisplayString(_ctx.$t("CommunicationRecharge")),
  6244. 1
  6245. /* TEXT */
  6246. )
  6247. ])
  6248. ])),
  6249. _ctx.selectorid != 2 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, [
  6250. vue.createElementVNode("view", { class: "power_1" }, [
  6251. vue.createElementVNode("view", { class: "power_bj" }, [
  6252. vue.createElementVNode("image", {
  6253. src: _imports_3$4,
  6254. mode: ""
  6255. })
  6256. ]),
  6257. vue.createElementVNode(
  6258. "view",
  6259. { class: "power_title" },
  6260. vue.toDisplayString(_ctx.$t("CommunicationSupply")),
  6261. 1
  6262. /* TEXT */
  6263. )
  6264. ])
  6265. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  6266. key: 3,
  6267. onClick: _cache[1] || (_cache[1] = ($event) => $options.onclick(2))
  6268. }, [
  6269. vue.createElementVNode("view", { class: "power_1" }, [
  6270. vue.createElementVNode("view", { class: "power_bright" }, [
  6271. vue.createElementVNode("image", {
  6272. src: _imports_4$3,
  6273. mode: ""
  6274. })
  6275. ]),
  6276. vue.createElementVNode(
  6277. "view",
  6278. { class: "power_title_bright" },
  6279. vue.toDisplayString(_ctx.$t("CommunicationSupply")),
  6280. 1
  6281. /* TEXT */
  6282. )
  6283. ])
  6284. ])),
  6285. _ctx.selectorid != 4 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, [
  6286. vue.createElementVNode("view", { class: "power_1" }, [
  6287. vue.createElementVNode("view", { class: "power_bj" }, [
  6288. vue.createElementVNode("image", {
  6289. src: _imports_5$1,
  6290. mode: ""
  6291. })
  6292. ]),
  6293. vue.createElementVNode(
  6294. "view",
  6295. { class: "power_title" },
  6296. vue.toDisplayString(_ctx.$t("DirectRecharge")),
  6297. 1
  6298. /* TEXT */
  6299. )
  6300. ])
  6301. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  6302. key: 5,
  6303. onClick: _cache[2] || (_cache[2] = ($event) => $options.onclick(4))
  6304. }, [
  6305. vue.createElementVNode("view", { class: "power_1" }, [
  6306. vue.createElementVNode("view", { class: "power_bright" }, [
  6307. vue.createElementVNode("image", {
  6308. src: _imports_6$1,
  6309. mode: ""
  6310. })
  6311. ]),
  6312. vue.createElementVNode(
  6313. "view",
  6314. { class: "power_title_bright" },
  6315. vue.toDisplayString(_ctx.$t("DirectRecharge")),
  6316. 1
  6317. /* TEXT */
  6318. )
  6319. ])
  6320. ])),
  6321. _ctx.selectorid != 1 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, [
  6322. vue.createElementVNode("view", { class: "power_1" }, [
  6323. vue.createElementVNode("view", { class: "power_bj" }, [
  6324. vue.createElementVNode("image", {
  6325. src: _imports_7$1,
  6326. mode: ""
  6327. })
  6328. ]),
  6329. vue.createElementVNode(
  6330. "view",
  6331. { class: "power_title" },
  6332. vue.toDisplayString(_ctx.$t("DirectSupply")),
  6333. 1
  6334. /* TEXT */
  6335. )
  6336. ])
  6337. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  6338. key: 7,
  6339. onClick: _cache[3] || (_cache[3] = ($event) => $options.onclick(1))
  6340. }, [
  6341. vue.createElementVNode("view", { class: "power_1" }, [
  6342. vue.createElementVNode("view", { class: "power_bright" }, [
  6343. vue.createElementVNode("image", {
  6344. src: _imports_8$1,
  6345. mode: ""
  6346. })
  6347. ]),
  6348. vue.createElementVNode(
  6349. "view",
  6350. { class: "power_title_bright" },
  6351. vue.toDisplayString(_ctx.$t("SystemInformation")),
  6352. 1
  6353. /* TEXT */
  6354. )
  6355. ])
  6356. ])),
  6357. vue.createElementVNode("view", {
  6358. class: "power_5",
  6359. onClick: _cache[4] || (_cache[4] = (...args) => $options.system && $options.system(...args))
  6360. }, [
  6361. vue.createElementVNode("view", { class: "power_bj" }, [
  6362. vue.createElementVNode("image", {
  6363. src: _imports_9,
  6364. mode: ""
  6365. })
  6366. ]),
  6367. vue.createElementVNode(
  6368. "view",
  6369. { class: "power_title" },
  6370. vue.toDisplayString(_ctx.$t("SystemInformation")),
  6371. 1
  6372. /* TEXT */
  6373. )
  6374. ])
  6375. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  6376. key: 1,
  6377. class: "power"
  6378. }, [
  6379. vue.createElementVNode("view", null, [
  6380. vue.createElementVNode("view", { class: "power_1" }, [
  6381. vue.createElementVNode("view", { class: "power_bj" }, [
  6382. vue.createElementVNode("image", {
  6383. src: _imports_1$3,
  6384. mode: ""
  6385. })
  6386. ]),
  6387. vue.createElementVNode(
  6388. "view",
  6389. { class: "power_title" },
  6390. vue.toDisplayString(_ctx.$t("CommunicationRecharge")),
  6391. 1
  6392. /* TEXT */
  6393. )
  6394. ])
  6395. ]),
  6396. vue.createElementVNode("view", null, [
  6397. vue.createElementVNode("view", { class: "power_1" }, [
  6398. vue.createElementVNode("view", { class: "power_bj" }, [
  6399. vue.createElementVNode("image", {
  6400. src: _imports_3$4,
  6401. mode: ""
  6402. })
  6403. ]),
  6404. vue.createElementVNode(
  6405. "view",
  6406. { class: "power_title" },
  6407. vue.toDisplayString(_ctx.$t("CommunicationSupply")),
  6408. 1
  6409. /* TEXT */
  6410. )
  6411. ])
  6412. ]),
  6413. vue.createElementVNode("view", null, [
  6414. vue.createElementVNode("view", { class: "power_1" }, [
  6415. vue.createElementVNode("view", { class: "power_bj" }, [
  6416. vue.createElementVNode("image", {
  6417. src: _imports_5$1,
  6418. mode: ""
  6419. })
  6420. ]),
  6421. vue.createElementVNode(
  6422. "view",
  6423. { class: "power_title" },
  6424. vue.toDisplayString(_ctx.$t("DirectRecharge")),
  6425. 1
  6426. /* TEXT */
  6427. )
  6428. ])
  6429. ]),
  6430. vue.createElementVNode("view", null, [
  6431. vue.createElementVNode("view", { class: "power_1" }, [
  6432. vue.createElementVNode("view", { class: "power_bj" }, [
  6433. vue.createElementVNode("image", {
  6434. src: _imports_7$1,
  6435. mode: ""
  6436. })
  6437. ]),
  6438. vue.createElementVNode(
  6439. "view",
  6440. { class: "power_title" },
  6441. vue.toDisplayString(_ctx.$t("DirectSupply")),
  6442. 1
  6443. /* TEXT */
  6444. )
  6445. ])
  6446. ]),
  6447. vue.createElementVNode("view", {
  6448. class: "power_5",
  6449. onClick: _cache[5] || (_cache[5] = (...args) => $options.system && $options.system(...args))
  6450. }, [
  6451. vue.createElementVNode("view", { class: "power_bj" }, [
  6452. vue.createElementVNode("image", {
  6453. src: _imports_9,
  6454. mode: ""
  6455. })
  6456. ]),
  6457. vue.createElementVNode(
  6458. "view",
  6459. { class: "power_title" },
  6460. vue.toDisplayString(_ctx.$t("SystemInformation")),
  6461. 1
  6462. /* TEXT */
  6463. )
  6464. ])
  6465. ])),
  6466. _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  6467. key: 2,
  6468. class: "power_6"
  6469. }, [
  6470. vue.createElementVNode("image", {
  6471. src: _imports_10$1,
  6472. mode: ""
  6473. }),
  6474. vue.createTextVNode(
  6475. vue.toDisplayString(_ctx.$t("Tipswarning")),
  6476. 1
  6477. /* TEXT */
  6478. )
  6479. ])) : vue.createCommentVNode("v-if", true),
  6480. vue.createVNode(
  6481. _component_uni_popup,
  6482. {
  6483. ref: "message",
  6484. type: "message"
  6485. },
  6486. {
  6487. default: vue.withCtx(() => [
  6488. vue.createVNode(_component_uni_popup_message, {
  6489. type: "error",
  6490. message: $data.messageText,
  6491. duration: 2500
  6492. }, null, 8, ["message"])
  6493. ]),
  6494. _: 1
  6495. /* STABLE */
  6496. },
  6497. 512
  6498. /* NEED_PATCH */
  6499. ),
  6500. vue.createElementVNode("view", { class: "switch-container" }, [
  6501. vue.createVNode(_component_uni_data_select, {
  6502. modelValue: $data.appLanguage,
  6503. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.appLanguage = $event),
  6504. localdata: $data.range,
  6505. clear: false,
  6506. onChange: $options.changeLanguage
  6507. }, null, 8, ["modelValue", "localdata", "onChange"])
  6508. ]),
  6509. vue.createElementVNode(
  6510. "view",
  6511. { class: "appVersioncss" },
  6512. vue.toDisplayString(_ctx.$t("version")) + vue.toDisplayString($data.appVersion),
  6513. 1
  6514. /* TEXT */
  6515. )
  6516. ]);
  6517. }
  6518. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-1cf27b2a"], ["__file", "D:/project/esswisdom_ipad/pages/index/index.vue"]]);
  6519. const _sfc_main$b = {
  6520. name: "cmd-progress",
  6521. props: {
  6522. /**
  6523. * 类型默认:line,可选 line circle dashboard
  6524. */
  6525. type: {
  6526. validator: (val) => {
  6527. return ["line", "circle", "dashboard"].includes(val);
  6528. },
  6529. default: "line"
  6530. },
  6531. /**
  6532. * 百分比
  6533. */
  6534. percent: {
  6535. type: Number,
  6536. default: 0
  6537. },
  6538. /**
  6539. * 已完成的分段百分,仅支持类型line
  6540. */
  6541. successPercent: {
  6542. type: Number,
  6543. default: 0
  6544. },
  6545. /**
  6546. * 是否显示进度数值或状态图标
  6547. */
  6548. showInfo: {
  6549. type: Boolean,
  6550. default: true
  6551. },
  6552. /**
  6553. * 进度状态,可选:normal success exception (active仅支持类型line
  6554. */
  6555. status: {
  6556. validator: (val) => {
  6557. return ["normal", "success", "exception", "active"].includes(val);
  6558. },
  6559. default: "normal"
  6560. },
  6561. /**
  6562. * 条线的宽度1-50,与width有关
  6563. */
  6564. strokeWidth: {
  6565. type: Number,
  6566. default: 6
  6567. },
  6568. /**
  6569. * 条线的颜色,渐变色仅支持类型line
  6570. */
  6571. strokeColor: {
  6572. type: String,
  6573. default: ""
  6574. },
  6575. /**
  6576. * 条线两端的形状 可选:'round', 'square'
  6577. */
  6578. strokeShape: {
  6579. validator: (val) => {
  6580. return ["round", "square"].includes(val);
  6581. },
  6582. default: "round"
  6583. },
  6584. /**
  6585. * 圆形进度条画布宽度,支持类型circle dashboard
  6586. */
  6587. width: {
  6588. type: Number,
  6589. default: 80
  6590. },
  6591. /**
  6592. * 圆形进度条缺口角度,可取值 0 ~ 360,支持类型circle dashboard
  6593. */
  6594. gapDegree: {
  6595. type: Number,
  6596. default: 120
  6597. },
  6598. /**
  6599. * 圆形进度条缺口位置,可取值'top', 'bottom', 'left', 'right' ,支持类型circle dashboard
  6600. */
  6601. gapPosition: {
  6602. validator: (val) => {
  6603. return ["top", "bottom", "left", "right"].includes(val);
  6604. },
  6605. default: "top"
  6606. }
  6607. },
  6608. computed: {
  6609. /**
  6610. * 如果需要自定义格式就在这改
  6611. */
  6612. setFormat() {
  6613. return `${this.setProgress}%`;
  6614. },
  6615. /**
  6616. * 设置显示进度值,禁止小于0和超过100
  6617. */
  6618. setProgress() {
  6619. let percent = this.percent;
  6620. if (!this.percent || this.percent < 0) {
  6621. percent = 0;
  6622. } else if (this.percent >= 100) {
  6623. percent = 100;
  6624. }
  6625. return percent;
  6626. },
  6627. /**
  6628. * 进度圈svg大小
  6629. */
  6630. setCircleStyle() {
  6631. return `width: ${this.width}px;
  6632. height: ${this.width}px;
  6633. fontSize: ${this.width * 0.15 + 6}px;`;
  6634. },
  6635. /**
  6636. * 圈底色
  6637. */
  6638. setCircleTrailStyle() {
  6639. const radius = 50 - this.strokeWidth / 2;
  6640. const len = Math.PI * 2 * radius;
  6641. const gapDeg = this.gapDegree || this.type === "dashboard" && 75;
  6642. return `stroke-dasharray: ${len - (gapDeg || 0)}px, ${len}px;
  6643. stroke-dashoffset: -${(gapDeg || 0) / 2}px;
  6644. transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s;`;
  6645. },
  6646. /**
  6647. * 圈进度
  6648. */
  6649. setCirclePathStyle() {
  6650. const radius = 50 - this.strokeWidth / 2;
  6651. const len = Math.PI * 2 * radius;
  6652. const gapDeg = this.gapDegree || this.type === "dashboard" && 75;
  6653. return `stroke: ${this.strokeColor};
  6654. stroke-dasharray: ${this.setProgress / 100 * (len - (gapDeg || 0))}px, ${len}px;
  6655. stroke-dashoffset: -${(gapDeg || 0) / 2}px;
  6656. transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s, stroke-width 0.06s ease 0.3s;`;
  6657. },
  6658. /**
  6659. * 绘制圈
  6660. */
  6661. setCirclePath() {
  6662. const radius = 50 - this.strokeWidth / 2;
  6663. let beginPositionX = 0;
  6664. let beginPositionY = -radius;
  6665. let endPositionX = 0;
  6666. let endPositionY = -2 * radius;
  6667. const gapPos = this.type === "dashboard" && "bottom" || this.gapPosition || "top";
  6668. switch (gapPos) {
  6669. case "left":
  6670. beginPositionX = -radius;
  6671. beginPositionY = 0;
  6672. endPositionX = 2 * radius;
  6673. endPositionY = 0;
  6674. break;
  6675. case "right":
  6676. beginPositionX = radius;
  6677. beginPositionY = 0;
  6678. endPositionX = -2 * radius;
  6679. endPositionY = 0;
  6680. break;
  6681. case "bottom":
  6682. beginPositionY = radius;
  6683. endPositionY = 2 * radius;
  6684. break;
  6685. }
  6686. return `M 50,50 m ${beginPositionX},${beginPositionY} a ${radius},${radius} 0 1 1 ${endPositionX},${-endPositionY} a ${radius},${radius} 0 1 1 ${-endPositionX},${endPositionY}`;
  6687. },
  6688. /**
  6689. * 非H5端,绘制进度圈svg转base URL
  6690. */
  6691. setCircle() {
  6692. const radius = 50 - this.strokeWidth / 2;
  6693. const len = Math.PI * 2 * radius;
  6694. const gapDeg = this.gapDegree || this.type === "dashboard" && 75;
  6695. let currentColor = "#108ee9";
  6696. if (this.status == "exception") {
  6697. currentColor = "#f5222d";
  6698. }
  6699. if (this.status == "success" || this.setProgress >= 100 || this.strokeColor) {
  6700. currentColor = this.strokeColor || "#52c41a";
  6701. }
  6702. let svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' class='cmd-progress-circle'%3E%3Cpath d='${this.setCirclePath}' stroke='%23f3f3f3' stroke-linecap='${this.strokeShape}' stroke-width='${this.strokeWidth}' fill-opacity='0' class='cmd-progress-circle-trail' style='stroke-dasharray: ${len - (gapDeg || 0)}px, ${len}px;stroke-dashoffset: -${(gapDeg || 0) / 2}px;transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s;'%3E%3C/path%3E%3Cpath d='${this.setCirclePath}' stroke-linecap='${this.strokeShape}' stroke-width='${this.strokeWidth}' fill-opacity='0' class='cmd-progress-circle-path' style='stroke: ${escape(currentColor)};stroke-dasharray: ${this.setProgress / 100 * (len - (gapDeg || 0))}px, ${len}px;stroke-dashoffset: -${(gapDeg || 0) / 2}px;transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s, stroke-width 0.06s ease 0.3s;'%3E%3C/path%3E%3C/svg%3E`;
  6703. return `background-image: url("${svgToBase}");
  6704. background-size: cover;
  6705. display: inline-block;
  6706. ${this.setCircleStyle}`;
  6707. },
  6708. /**
  6709. * 设置进度圈状态图标
  6710. */
  6711. setCircleIcon() {
  6712. let currentColor = "#108ee9";
  6713. let svgToBase = "";
  6714. if (this.status == "exception") {
  6715. currentColor = "#f5222d";
  6716. svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='close' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z'%3E%3C/path%3E %3C/svg%3E`;
  6717. }
  6718. if (this.status == "success" || this.setProgress >= 100) {
  6719. currentColor = this.strokeColor || "#52c41a";
  6720. svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='check' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z'%3E%3C/path%3E %3C/svg%3E`;
  6721. }
  6722. return `background-image: url("${svgToBase}");
  6723. background-size: cover;
  6724. display: inline-block;
  6725. width: 1em;
  6726. height: 1em;`;
  6727. },
  6728. /**
  6729. * 设置进度条样式
  6730. */
  6731. setLineStyle() {
  6732. return `width: ${this.setProgress}%;
  6733. height: ${this.strokeWidth}px;
  6734. background: ${this.strokeColor};
  6735. border-radius: ${this.strokeShape === "square" ? 0 : "100px"};`;
  6736. },
  6737. /**
  6738. * 设置已完成分段进度
  6739. */
  6740. setLineSuccessStyle() {
  6741. let successPercent = this.successPercent;
  6742. if (!this.successPercent || this.successPercent < 0 || this.setProgress < this.successPercent) {
  6743. successPercent = 0;
  6744. } else if (this.successPercent >= 100) {
  6745. successPercent = 100;
  6746. }
  6747. return `width: ${successPercent}%;
  6748. height: ${this.strokeWidth}px;
  6749. border-radius: ${this.strokeShape === "square" ? 0 : "100px"};`;
  6750. },
  6751. /**
  6752. * 设置进度条状态图标
  6753. */
  6754. setLineStatusIcon() {
  6755. let currentColor = "#108ee9";
  6756. let svgToBase = "";
  6757. if (this.status == "exception") {
  6758. currentColor = "#f5222d";
  6759. svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='close-circle' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z'%3E%3C/path%3E %3C/svg%3E`;
  6760. }
  6761. if (this.status == "success" || this.setProgress >= 100) {
  6762. currentColor = this.strokeColor || "#52c41a";
  6763. svgToBase = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='64 64 896 896' data-icon='check-circle' width='1em' height='1em' fill='${escape(currentColor)}' aria-hidden='true'%3E %3Cpath d='M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z'%3E%3C/path%3E %3C/svg%3E`;
  6764. }
  6765. return `background-image: url("${svgToBase}");
  6766. background-size: cover;
  6767. display: inline-block;
  6768. width: 1em;
  6769. height: 1em;`;
  6770. },
  6771. /**
  6772. * 状态样式
  6773. */
  6774. setStatusClass() {
  6775. let statusClass = [];
  6776. if (this.status == "exception") {
  6777. statusClass.push("cmd-progress-status-exception");
  6778. }
  6779. if (this.status == "success" || this.setProgress >= 100) {
  6780. statusClass.push("cmd-progress-status-success");
  6781. }
  6782. if (this.status == "active") {
  6783. statusClass.push("cmd-progress-status-active");
  6784. }
  6785. if (this.showInfo) {
  6786. statusClass.push("cmd-progress-show-info");
  6787. }
  6788. if (this.type === "line") {
  6789. statusClass.push("cmd-progress-line");
  6790. }
  6791. if (this.type === "circle" || this.type === "dashboard") {
  6792. statusClass.push("cmd-progress-circle");
  6793. }
  6794. statusClass.push("cmd-progress-status-normal");
  6795. return statusClass;
  6796. }
  6797. }
  6798. };
  6799. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  6800. return vue.openBlock(), vue.createElementBlock(
  6801. "view",
  6802. {
  6803. class: vue.normalizeClass(["cmd-progress cmd-progress-default", $options.setStatusClass])
  6804. },
  6805. [
  6806. $props.type == "circle" || $props.type == "dashboard" ? (vue.openBlock(), vue.createElementBlock(
  6807. "view",
  6808. {
  6809. key: 0,
  6810. class: vue.normalizeClass(["cmd-progress cmd-progress-default", $options.setStatusClass])
  6811. },
  6812. [
  6813. vue.createElementVNode(
  6814. "view",
  6815. {
  6816. class: "cmd-progress-inner",
  6817. style: vue.normalizeStyle($options.setCircleStyle)
  6818. },
  6819. [
  6820. vue.createCommentVNode(" 绘制圈 start "),
  6821. vue.createElementVNode(
  6822. "text",
  6823. {
  6824. style: vue.normalizeStyle($options.setCircle)
  6825. },
  6826. null,
  6827. 4
  6828. /* STYLE */
  6829. ),
  6830. vue.createCommentVNode(" 绘制圈 end "),
  6831. vue.createCommentVNode(" 状态文本 start "),
  6832. $props.showInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  6833. key: 0,
  6834. class: "cmd-progress-text",
  6835. title: $options.setFormat
  6836. }, [
  6837. $props.status != "success" && $props.status != "exception" && $options.setProgress < 100 ? (vue.openBlock(), vue.createElementBlock(
  6838. vue.Fragment,
  6839. { key: 0 },
  6840. [
  6841. vue.createTextVNode(
  6842. vue.toDisplayString($options.setFormat),
  6843. 1
  6844. /* TEXT */
  6845. )
  6846. ],
  6847. 64
  6848. /* STABLE_FRAGMENT */
  6849. )) : vue.createCommentVNode("v-if", true),
  6850. $props.status == "exception" || $props.status == "success" || $options.setProgress == 100 ? (vue.openBlock(), vue.createElementBlock(
  6851. "text",
  6852. {
  6853. key: 1,
  6854. style: vue.normalizeStyle($options.setCircleIcon)
  6855. },
  6856. null,
  6857. 4
  6858. /* STYLE */
  6859. )) : vue.createCommentVNode("v-if", true)
  6860. ], 8, ["title"])) : vue.createCommentVNode("v-if", true),
  6861. vue.createCommentVNode(" 状态文本 end ")
  6862. ],
  6863. 4
  6864. /* STYLE */
  6865. )
  6866. ],
  6867. 2
  6868. /* CLASS */
  6869. )) : vue.createCommentVNode("v-if", true),
  6870. $props.type == "line" ? (vue.openBlock(), vue.createElementBlock(
  6871. vue.Fragment,
  6872. { key: 1 },
  6873. [
  6874. vue.createCommentVNode(" 进度条 start "),
  6875. vue.createElementVNode("view", { class: "cmd-progress-outer" }, [
  6876. vue.createElementVNode(
  6877. "view",
  6878. {
  6879. class: "cmd-progress-inner",
  6880. style: vue.normalizeStyle({ "border-radius": $props.strokeShape == "square" ? 0 : "100px" })
  6881. },
  6882. [
  6883. vue.createElementVNode(
  6884. "view",
  6885. {
  6886. class: "cmd-progress-bg",
  6887. style: vue.normalizeStyle($options.setLineStyle)
  6888. },
  6889. null,
  6890. 4
  6891. /* STYLE */
  6892. ),
  6893. $props.successPercent ? (vue.openBlock(), vue.createElementBlock(
  6894. "view",
  6895. {
  6896. key: 0,
  6897. class: "cmd-progress-success-bg",
  6898. style: vue.normalizeStyle($options.setLineSuccessStyle)
  6899. },
  6900. null,
  6901. 4
  6902. /* STYLE */
  6903. )) : vue.createCommentVNode("v-if", true)
  6904. ],
  6905. 4
  6906. /* STYLE */
  6907. )
  6908. ]),
  6909. vue.createCommentVNode(" 进度条 end "),
  6910. vue.createCommentVNode(" 进度条是否显示信息 start "),
  6911. $props.showInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  6912. key: 0,
  6913. class: "cmd-progress-text",
  6914. title: $options.setFormat
  6915. }, [
  6916. $props.status != "success" && $props.status != "exception" && $options.setProgress < 100 ? (vue.openBlock(), vue.createElementBlock(
  6917. vue.Fragment,
  6918. { key: 0 },
  6919. [
  6920. vue.createTextVNode(
  6921. vue.toDisplayString($options.setFormat),
  6922. 1
  6923. /* TEXT */
  6924. )
  6925. ],
  6926. 64
  6927. /* STABLE_FRAGMENT */
  6928. )) : vue.createCommentVNode("v-if", true),
  6929. $props.status == "exception" || $props.status == "success" || $options.setProgress == 100 ? (vue.openBlock(), vue.createElementBlock(
  6930. "text",
  6931. {
  6932. key: 1,
  6933. style: vue.normalizeStyle($options.setLineStatusIcon)
  6934. },
  6935. null,
  6936. 4
  6937. /* STYLE */
  6938. )) : vue.createCommentVNode("v-if", true)
  6939. ], 8, ["title"])) : vue.createCommentVNode("v-if", true),
  6940. vue.createCommentVNode(" 进度条是否显示信息 end ")
  6941. ],
  6942. 64
  6943. /* STABLE_FRAGMENT */
  6944. )) : vue.createCommentVNode("v-if", true)
  6945. ],
  6946. 2
  6947. /* CLASS */
  6948. );
  6949. }
  6950. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-06762d5e"], ["__file", "D:/project/esswisdom_ipad/components/cmd-progress/cmd-progress.vue"]]);
  6951. const isObject$2 = (val) => val !== null && typeof val === "object";
  6952. const defaultDelimiters = ["{", "}"];
  6953. class BaseFormatter {
  6954. constructor() {
  6955. this._caches = /* @__PURE__ */ Object.create(null);
  6956. }
  6957. interpolate(message, values, delimiters = defaultDelimiters) {
  6958. if (!values) {
  6959. return [message];
  6960. }
  6961. let tokens = this._caches[message];
  6962. if (!tokens) {
  6963. tokens = parse$1(message, delimiters);
  6964. this._caches[message] = tokens;
  6965. }
  6966. return compile(tokens, values);
  6967. }
  6968. }
  6969. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  6970. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  6971. function parse$1(format2, [startDelimiter, endDelimiter]) {
  6972. const tokens = [];
  6973. let position = 0;
  6974. let text = "";
  6975. while (position < format2.length) {
  6976. let char = format2[position++];
  6977. if (char === startDelimiter) {
  6978. if (text) {
  6979. tokens.push({ type: "text", value: text });
  6980. }
  6981. text = "";
  6982. let sub = "";
  6983. char = format2[position++];
  6984. while (char !== void 0 && char !== endDelimiter) {
  6985. sub += char;
  6986. char = format2[position++];
  6987. }
  6988. const isClosed = char === endDelimiter;
  6989. const type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  6990. tokens.push({ value: sub, type });
  6991. } else {
  6992. text += char;
  6993. }
  6994. }
  6995. text && tokens.push({ type: "text", value: text });
  6996. return tokens;
  6997. }
  6998. function compile(tokens, values) {
  6999. const compiled = [];
  7000. let index = 0;
  7001. const mode = Array.isArray(values) ? "list" : isObject$2(values) ? "named" : "unknown";
  7002. if (mode === "unknown") {
  7003. return compiled;
  7004. }
  7005. while (index < tokens.length) {
  7006. const token = tokens[index];
  7007. switch (token.type) {
  7008. case "text":
  7009. compiled.push(token.value);
  7010. break;
  7011. case "list":
  7012. compiled.push(values[parseInt(token.value, 10)]);
  7013. break;
  7014. case "named":
  7015. if (mode === "named") {
  7016. compiled.push(values[token.value]);
  7017. } else {
  7018. {
  7019. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  7020. }
  7021. }
  7022. break;
  7023. case "unknown":
  7024. {
  7025. console.warn(`Detect 'unknown' type of token!`);
  7026. }
  7027. break;
  7028. }
  7029. index++;
  7030. }
  7031. return compiled;
  7032. }
  7033. const LOCALE_ZH_HANS = "zh-Hans";
  7034. const LOCALE_ZH_HANT = "zh-Hant";
  7035. const LOCALE_EN = "en";
  7036. const LOCALE_FR = "fr";
  7037. const LOCALE_ES = "es";
  7038. const hasOwnProperty$2 = Object.prototype.hasOwnProperty;
  7039. const hasOwn$2 = (val, key) => hasOwnProperty$2.call(val, key);
  7040. const defaultFormatter = new BaseFormatter();
  7041. function include(str, parts) {
  7042. return !!parts.find((part) => str.indexOf(part) !== -1);
  7043. }
  7044. function startsWith(str, parts) {
  7045. return parts.find((part) => str.indexOf(part) === 0);
  7046. }
  7047. function normalizeLocale(locale, messages2) {
  7048. if (!locale) {
  7049. return;
  7050. }
  7051. locale = locale.trim().replace(/_/g, "-");
  7052. if (messages2 && messages2[locale]) {
  7053. return locale;
  7054. }
  7055. locale = locale.toLowerCase();
  7056. if (locale === "chinese") {
  7057. return LOCALE_ZH_HANS;
  7058. }
  7059. if (locale.indexOf("zh") === 0) {
  7060. if (locale.indexOf("-hans") > -1) {
  7061. return LOCALE_ZH_HANS;
  7062. }
  7063. if (locale.indexOf("-hant") > -1) {
  7064. return LOCALE_ZH_HANT;
  7065. }
  7066. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  7067. return LOCALE_ZH_HANT;
  7068. }
  7069. return LOCALE_ZH_HANS;
  7070. }
  7071. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  7072. if (messages2 && Object.keys(messages2).length > 0) {
  7073. locales = Object.keys(messages2);
  7074. }
  7075. const lang = startsWith(locale, locales);
  7076. if (lang) {
  7077. return lang;
  7078. }
  7079. }
  7080. class I18n {
  7081. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  7082. this.locale = LOCALE_EN;
  7083. this.fallbackLocale = LOCALE_EN;
  7084. this.message = {};
  7085. this.messages = {};
  7086. this.watchers = [];
  7087. if (fallbackLocale) {
  7088. this.fallbackLocale = fallbackLocale;
  7089. }
  7090. this.formater = formater2 || defaultFormatter;
  7091. this.messages = messages2 || {};
  7092. this.setLocale(locale || LOCALE_EN);
  7093. if (watcher) {
  7094. this.watchLocale(watcher);
  7095. }
  7096. }
  7097. setLocale(locale) {
  7098. const oldLocale = this.locale;
  7099. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  7100. if (!this.messages[this.locale]) {
  7101. this.messages[this.locale] = {};
  7102. }
  7103. this.message = this.messages[this.locale];
  7104. if (oldLocale !== this.locale) {
  7105. this.watchers.forEach((watcher) => {
  7106. watcher(this.locale, oldLocale);
  7107. });
  7108. }
  7109. }
  7110. getLocale() {
  7111. return this.locale;
  7112. }
  7113. watchLocale(fn) {
  7114. const index = this.watchers.push(fn) - 1;
  7115. return () => {
  7116. this.watchers.splice(index, 1);
  7117. };
  7118. }
  7119. add(locale, message, override = true) {
  7120. const curMessages = this.messages[locale];
  7121. if (curMessages) {
  7122. if (override) {
  7123. Object.assign(curMessages, message);
  7124. } else {
  7125. Object.keys(message).forEach((key) => {
  7126. if (!hasOwn$2(curMessages, key)) {
  7127. curMessages[key] = message[key];
  7128. }
  7129. });
  7130. }
  7131. } else {
  7132. this.messages[locale] = message;
  7133. }
  7134. }
  7135. f(message, values, delimiters) {
  7136. return this.formater.interpolate(message, values, delimiters).join("");
  7137. }
  7138. t(key, locale, values) {
  7139. let message = this.message;
  7140. if (typeof locale === "string") {
  7141. locale = normalizeLocale(locale, this.messages);
  7142. locale && (message = this.messages[locale]);
  7143. } else {
  7144. values = locale;
  7145. }
  7146. if (!hasOwn$2(message, key)) {
  7147. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  7148. return key;
  7149. }
  7150. return this.formater.interpolate(message[key], values).join("");
  7151. }
  7152. }
  7153. function watchAppLocale(appVm, i18n2) {
  7154. if (appVm.$watchLocale) {
  7155. appVm.$watchLocale((newLocale) => {
  7156. i18n2.setLocale(newLocale);
  7157. });
  7158. } else {
  7159. appVm.$watch(() => appVm.$locale, (newLocale) => {
  7160. i18n2.setLocale(newLocale);
  7161. });
  7162. }
  7163. }
  7164. function getDefaultLocale() {
  7165. if (typeof uni !== "undefined" && uni.getLocale) {
  7166. return uni.getLocale();
  7167. }
  7168. if (typeof global !== "undefined" && global.getLocale) {
  7169. return global.getLocale();
  7170. }
  7171. return LOCALE_EN;
  7172. }
  7173. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  7174. if (typeof locale !== "string") {
  7175. const options = [
  7176. messages2,
  7177. locale
  7178. ];
  7179. locale = options[0];
  7180. messages2 = options[1];
  7181. }
  7182. if (typeof locale !== "string") {
  7183. locale = getDefaultLocale();
  7184. }
  7185. if (typeof fallbackLocale !== "string") {
  7186. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  7187. }
  7188. const i18n2 = new I18n({
  7189. locale,
  7190. fallbackLocale,
  7191. messages: messages2,
  7192. watcher
  7193. });
  7194. let t2 = (key, values) => {
  7195. if (typeof getApp !== "function") {
  7196. t2 = function(key2, values2) {
  7197. return i18n2.t(key2, values2);
  7198. };
  7199. } else {
  7200. let isWatchedAppLocale = false;
  7201. t2 = function(key2, values2) {
  7202. const appVm = getApp().$vm;
  7203. if (appVm) {
  7204. appVm.$locale;
  7205. if (!isWatchedAppLocale) {
  7206. isWatchedAppLocale = true;
  7207. watchAppLocale(appVm, i18n2);
  7208. }
  7209. }
  7210. return i18n2.t(key2, values2);
  7211. };
  7212. }
  7213. return t2(key, values);
  7214. };
  7215. return {
  7216. i18n: i18n2,
  7217. f(message, values, delimiters) {
  7218. return i18n2.f(message, values, delimiters);
  7219. },
  7220. t(key, values) {
  7221. return t2(key, values);
  7222. },
  7223. add(locale2, message, override = true) {
  7224. return i18n2.add(locale2, message, override);
  7225. },
  7226. watch(fn) {
  7227. return i18n2.watchLocale(fn);
  7228. },
  7229. getLocale() {
  7230. return i18n2.getLocale();
  7231. },
  7232. setLocale(newLocale) {
  7233. return i18n2.setLocale(newLocale);
  7234. }
  7235. };
  7236. }
  7237. const en$2 = {
  7238. "uni-popup.cancel": "cancel",
  7239. "uni-popup.ok": "ok",
  7240. "uni-popup.placeholder": "pleace enter",
  7241. "uni-popup.title": "Hint",
  7242. "uni-popup.shareTitle": "Share to"
  7243. };
  7244. const zhHans$2 = {
  7245. "uni-popup.cancel": "取消",
  7246. "uni-popup.ok": "确定",
  7247. "uni-popup.placeholder": "请输入",
  7248. "uni-popup.title": "提示",
  7249. "uni-popup.shareTitle": "分享到"
  7250. };
  7251. const zhHant$2 = {
  7252. "uni-popup.cancel": "取消",
  7253. "uni-popup.ok": "確定",
  7254. "uni-popup.placeholder": "請輸入",
  7255. "uni-popup.title": "提示",
  7256. "uni-popup.shareTitle": "分享到"
  7257. };
  7258. const messages$2 = {
  7259. en: en$2,
  7260. "zh-Hans": zhHans$2,
  7261. "zh-Hant": zhHant$2
  7262. };
  7263. const {
  7264. t: t$1
  7265. } = initVueI18n(messages$2);
  7266. const _sfc_main$a = {
  7267. name: "uniPopupDialog",
  7268. mixins: [popup],
  7269. emits: ["confirm", "close", "update:modelValue", "input"],
  7270. props: {
  7271. inputType: {
  7272. type: String,
  7273. default: "text"
  7274. },
  7275. showClose: {
  7276. type: Boolean,
  7277. default: true
  7278. },
  7279. modelValue: {
  7280. type: [Number, String],
  7281. default: ""
  7282. },
  7283. placeholder: {
  7284. type: [String, Number],
  7285. default: ""
  7286. },
  7287. type: {
  7288. type: String,
  7289. default: "error"
  7290. },
  7291. mode: {
  7292. type: String,
  7293. default: "base"
  7294. },
  7295. title: {
  7296. type: String,
  7297. default: ""
  7298. },
  7299. content: {
  7300. type: String,
  7301. default: ""
  7302. },
  7303. beforeClose: {
  7304. type: Boolean,
  7305. default: false
  7306. },
  7307. cancelText: {
  7308. type: String,
  7309. default: ""
  7310. },
  7311. confirmText: {
  7312. type: String,
  7313. default: ""
  7314. },
  7315. maxlength: {
  7316. type: Number,
  7317. default: -1
  7318. },
  7319. focus: {
  7320. type: Boolean,
  7321. default: true
  7322. }
  7323. },
  7324. data() {
  7325. return {
  7326. dialogType: "error",
  7327. val: ""
  7328. };
  7329. },
  7330. computed: {
  7331. okText() {
  7332. return this.confirmText || t$1("uni-popup.ok");
  7333. },
  7334. closeText() {
  7335. return this.cancelText || t$1("uni-popup.cancel");
  7336. },
  7337. placeholderText() {
  7338. return this.placeholder || t$1("uni-popup.placeholder");
  7339. },
  7340. titleText() {
  7341. return this.title || t$1("uni-popup.title");
  7342. }
  7343. },
  7344. watch: {
  7345. type(val) {
  7346. this.dialogType = val;
  7347. },
  7348. mode(val) {
  7349. if (val === "input") {
  7350. this.dialogType = "info";
  7351. }
  7352. },
  7353. value(val) {
  7354. if (this.maxlength != -1 && this.mode === "input") {
  7355. this.val = val.slice(0, this.maxlength);
  7356. } else {
  7357. this.val = val;
  7358. }
  7359. },
  7360. val(val) {
  7361. this.$emit("update:modelValue", val);
  7362. }
  7363. },
  7364. created() {
  7365. this.popup.disableMask();
  7366. if (this.mode === "input") {
  7367. this.dialogType = "info";
  7368. this.val = this.value;
  7369. this.val = this.modelValue;
  7370. } else {
  7371. this.dialogType = this.type;
  7372. }
  7373. },
  7374. methods: {
  7375. /**
  7376. * 点击确认按钮
  7377. */
  7378. onOk() {
  7379. if (this.mode === "input") {
  7380. this.$emit("confirm", this.val);
  7381. } else {
  7382. this.$emit("confirm");
  7383. }
  7384. if (this.beforeClose)
  7385. return;
  7386. this.popup.close();
  7387. },
  7388. /**
  7389. * 点击取消按钮
  7390. */
  7391. closeDialog() {
  7392. this.$emit("close");
  7393. if (this.beforeClose)
  7394. return;
  7395. this.popup.close();
  7396. },
  7397. close() {
  7398. this.popup.close();
  7399. }
  7400. }
  7401. };
  7402. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  7403. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-popup-dialog" }, [
  7404. vue.createElementVNode("view", { class: "uni-dialog-title" }, [
  7405. vue.createElementVNode(
  7406. "text",
  7407. {
  7408. class: vue.normalizeClass(["uni-dialog-title-text", ["uni-popup__" + $data.dialogType]])
  7409. },
  7410. vue.toDisplayString($options.titleText),
  7411. 3
  7412. /* TEXT, CLASS */
  7413. )
  7414. ]),
  7415. $props.mode === "base" ? (vue.openBlock(), vue.createElementBlock("view", {
  7416. key: 0,
  7417. class: "uni-dialog-content"
  7418. }, [
  7419. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  7420. vue.createElementVNode(
  7421. "text",
  7422. { class: "uni-dialog-content-text" },
  7423. vue.toDisplayString($props.content),
  7424. 1
  7425. /* TEXT */
  7426. )
  7427. ], true)
  7428. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  7429. key: 1,
  7430. class: "uni-dialog-content"
  7431. }, [
  7432. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  7433. vue.withDirectives(vue.createElementVNode("input", {
  7434. class: "uni-dialog-input",
  7435. maxlength: $props.maxlength,
  7436. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.val = $event),
  7437. type: $props.inputType,
  7438. placeholder: $options.placeholderText,
  7439. focus: $props.focus
  7440. }, null, 8, ["maxlength", "type", "placeholder", "focus"]), [
  7441. [vue.vModelDynamic, $data.val]
  7442. ])
  7443. ], true)
  7444. ])),
  7445. vue.createElementVNode("view", { class: "uni-dialog-button-group" }, [
  7446. $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
  7447. key: 0,
  7448. class: "uni-dialog-button",
  7449. onClick: _cache[1] || (_cache[1] = (...args) => $options.closeDialog && $options.closeDialog(...args))
  7450. }, [
  7451. vue.createElementVNode(
  7452. "text",
  7453. { class: "uni-dialog-button-text" },
  7454. vue.toDisplayString($options.closeText),
  7455. 1
  7456. /* TEXT */
  7457. )
  7458. ])) : vue.createCommentVNode("v-if", true),
  7459. vue.createElementVNode(
  7460. "view",
  7461. {
  7462. class: vue.normalizeClass(["uni-dialog-button", $props.showClose ? "uni-border-left" : ""]),
  7463. onClick: _cache[2] || (_cache[2] = (...args) => $options.onOk && $options.onOk(...args))
  7464. },
  7465. [
  7466. vue.createElementVNode(
  7467. "text",
  7468. { class: "uni-dialog-button-text uni-button-color" },
  7469. vue.toDisplayString($options.okText),
  7470. 1
  7471. /* TEXT */
  7472. )
  7473. ],
  7474. 2
  7475. /* CLASS */
  7476. )
  7477. ])
  7478. ]);
  7479. }
  7480. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-d78c88b7"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue"]]);
  7481. const _imports_1$2 = "/static/dian1.png";
  7482. const _imports_2$2 = "/static/dian2.png";
  7483. const _imports_3$3 = "/static/che.png";
  7484. const _imports_4$2 = "/static/y8.png";
  7485. const _imports_5 = "/static/y6.png";
  7486. const _imports_6 = "/static/SOC.png";
  7487. const _imports_7 = "/static/Battery.png";
  7488. const _imports_8 = "/static/setup.png";
  7489. const _imports_1$1 = "/static/home.png";
  7490. const _imports_10 = "/static/home1.png";
  7491. const _sfc_main$9 = {
  7492. components: {
  7493. cmdProgress: __easycom_0$1
  7494. },
  7495. data() {
  7496. return {
  7497. successtype: "success",
  7498. confirmText: "确认启动",
  7499. title: "你确定要开启该设备吗?",
  7500. content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
  7501. value: "",
  7502. modeinput: "",
  7503. segmented: 1,
  7504. uidatas: "",
  7505. formatTimeid: "",
  7506. faultsdata: []
  7507. };
  7508. },
  7509. onLoad() {
  7510. this.confirmText = this.$t("ConfirmStart");
  7511. this.title = this.$t("popUpTitle");
  7512. this.content = this.$t("popUpContent");
  7513. },
  7514. computed: {
  7515. // 使用 mapState 映射多个状态到组件的计算属性
  7516. ...mapState(["formattedTime", "status"]),
  7517. ...mapState({
  7518. uidatasdata: (state2) => state2.uidatasdata
  7519. })
  7520. },
  7521. mounted() {
  7522. this.onfaultsdata();
  7523. },
  7524. beforeUnmount() {
  7525. if (this.scrollInterval) {
  7526. clearInterval(this.scrollInterval);
  7527. }
  7528. },
  7529. watch: {
  7530. uidatasdata: {
  7531. handler(newVal, oldVal) {
  7532. formatAppLog("log", "at pages/home/index.vue:669", "uidatasdata 发生变化:", newVal);
  7533. this.handleDataChange(newVal);
  7534. },
  7535. deep: true
  7536. // 监听深层次的变化
  7537. }
  7538. },
  7539. methods: {
  7540. handleDataChange(newData) {
  7541. formatAppLog("log", "at pages/home/index.vue:680", "数据变化处理:", newData);
  7542. },
  7543. onfaultsdata() {
  7544. let data = {
  7545. page: 1,
  7546. rows: 10,
  7547. device: "",
  7548. starttime: "",
  7549. endtime: "",
  7550. rt: 0,
  7551. type: "故障"
  7552. };
  7553. getfaultsList(data).then((res) => {
  7554. formatAppLog("log", "at pages/home/index.vue:694", res);
  7555. if (res.status == "ok") {
  7556. this.faultsdata = res.data.list;
  7557. }
  7558. });
  7559. },
  7560. // 返回首页
  7561. onreturn() {
  7562. uni.redirectTo({
  7563. url: "/pages/index/index"
  7564. });
  7565. },
  7566. // 启动设备弹窗
  7567. dialogToggle() {
  7568. this.modeinput = "base";
  7569. this.successtype = "success";
  7570. this.confirmText = this.$t("ConfirmStart");
  7571. this.title = this.$t("popUpTitle");
  7572. this.content = this.$t("popUpContent");
  7573. this.$refs.alertDialog.open();
  7574. },
  7575. onstopit() {
  7576. this.modeinput = "base";
  7577. this.successtype = "error";
  7578. this.confirmText = this.$t("ConfirmStop");
  7579. this.title = this.$t("popUpTitleStop");
  7580. this.content = this.$t("popUpContentStop");
  7581. this.$refs.alertDialog.open();
  7582. },
  7583. onpower() {
  7584. this.modeinput = "input";
  7585. this.title = this.$t("ACinputpowergiven");
  7586. this.confirmText = this.$t("confirm");
  7587. this.$refs.alertDialog.open();
  7588. },
  7589. // this.uidatasdata.AC_In_380V_63A1_Status==0
  7590. // this.messageText = '需将AC输出端63A1的开关手动断开'
  7591. // this.$refs.message.open()
  7592. // this.uidatasdata.AC_In_380V_63A2_Status==0
  7593. // this.messageText = '需将AC输出端63A2的开关手动断开'
  7594. // this.$refs.message.open()
  7595. // 确定
  7596. dialogConfirm() {
  7597. let data = {};
  7598. if (this.title == this.$t("ACinputpowergiven")) {
  7599. data = {
  7600. id: "e612195b-cf9e-418b-9e2d-0fbae9b03ffa",
  7601. issaveinitvalue: false,
  7602. value: this.value
  7603. };
  7604. } else {
  7605. data = {
  7606. id: "c35c4db0-113f-442a-9e26-728489265fdb",
  7607. issaveinitvalue: false,
  7608. value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0"
  7609. };
  7610. }
  7611. let uidatasdata = this.$store.state.uidatasdata;
  7612. if (this.confirmText == this.$t("ConfirmStart")) {
  7613. if (uidatasdata.AC_Out_380V_125A_Status == 0 || uidatasdata.AC_Out_380V_63A_Status == 0 || uidatasdata.AC_Out_220V_16A_Status == 0) {
  7614. this.messageText = this.$t("ACRechargeelectricitytext");
  7615. this.$refs.message.open();
  7616. return;
  7617. }
  7618. }
  7619. control(data).then((data2) => {
  7620. formatAppLog("log", "at pages/home/index.vue:766", data2);
  7621. if (data2.status == "ok") {
  7622. if (this.title == this.$t("ACinputpowergiven")) {
  7623. plus.navigator.hideSystemNavigation();
  7624. }
  7625. this.$refs.alertDialog.close();
  7626. uni.showToast({
  7627. title: this.$t("OperationSuccessful"),
  7628. icon: "none",
  7629. duration: 2e3
  7630. // 显示时长,单位为毫秒
  7631. });
  7632. } else {
  7633. this.$refs.alertDialog.close();
  7634. uni.showToast({
  7635. title: this.$t("operationFailed"),
  7636. icon: "none",
  7637. // 使用 'none' 图标来表示失败
  7638. duration: 2e3
  7639. // 显示时长,单位为毫秒
  7640. });
  7641. }
  7642. });
  7643. },
  7644. dialogClose() {
  7645. if (this.title == this.$t("ACinputpowergiven")) {
  7646. plus.navigator.hideSystemNavigation();
  7647. }
  7648. this.$refs.alertDialog.close();
  7649. },
  7650. ontap(e2) {
  7651. formatAppLog("log", "at pages/home/index.vue:796", e2);
  7652. this.segmented = e2;
  7653. }
  7654. }
  7655. };
  7656. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  7657. const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
  7658. const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
  7659. const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
  7660. const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3);
  7661. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  7662. vue.createElementVNode("view", { class: "top" }, [
  7663. vue.createElementVNode("image", {
  7664. class: "top_logo",
  7665. src: _imports_0,
  7666. mode: ""
  7667. }),
  7668. vue.createElementVNode(
  7669. "view",
  7670. { class: "tite" },
  7671. vue.toDisplayString(_ctx.$t("MainTitle")),
  7672. 1
  7673. /* TEXT */
  7674. ),
  7675. vue.createElementVNode("view", { class: "time" }, [
  7676. vue.createElementVNode(
  7677. "view",
  7678. { class: "time_top" },
  7679. vue.toDisplayString(_ctx.formattedTime),
  7680. 1
  7681. /* TEXT */
  7682. ),
  7683. vue.createElementVNode("view", { class: "time_bottom" }, [
  7684. vue.createElementVNode("view"),
  7685. vue.createElementVNode("view", { class: "time_bottom1" }, [
  7686. vue.createTextVNode(
  7687. vue.toDisplayString(_ctx.$t("status")) + " ",
  7688. 1
  7689. /* TEXT */
  7690. ),
  7691. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  7692. "view",
  7693. {
  7694. key: 0,
  7695. class: "time_state"
  7696. },
  7697. vue.toDisplayString(_ctx.$t("online")),
  7698. 1
  7699. /* TEXT */
  7700. )) : (vue.openBlock(), vue.createElementBlock(
  7701. "view",
  7702. {
  7703. key: 1,
  7704. class: "time_state1"
  7705. },
  7706. vue.toDisplayString(_ctx.$t("offline")),
  7707. 1
  7708. /* TEXT */
  7709. ))
  7710. ])
  7711. ])
  7712. ])
  7713. ]),
  7714. vue.createElementVNode("view", { class: "parameter" }, [
  7715. vue.createElementVNode("view", { class: "parameter_left" }, [
  7716. vue.createElementVNode("view", { class: "parameter_left1" }, [
  7717. vue.createCommentVNode(" <jerry-gauge></jerry-gauge> "),
  7718. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
  7719. vue.createVNode(_component_cmd_progress, {
  7720. type: "dashboard",
  7721. percent: _ctx.uidatasdata.SOC ?? 0,
  7722. "stroke-color": "#B0D0FF",
  7723. "stroke-width": 6,
  7724. width: 180,
  7725. "stroke-shape": "square",
  7726. showInfo: false
  7727. }, null, 8, ["percent"]),
  7728. vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
  7729. vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
  7730. vue.createTextVNode(
  7731. vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
  7732. 1
  7733. /* TEXT */
  7734. ),
  7735. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
  7736. ]),
  7737. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
  7738. ]),
  7739. vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
  7740. vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
  7741. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
  7742. vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
  7743. ])
  7744. ])
  7745. ]),
  7746. vue.createCommentVNode(' <view class="parameter_canvas">\r\n <view class="parameter_canvas1">\r\n 0\r\n </view>\r\n <view class="parameter_canvas2">\r\n 100%\r\n </view>\r\n </view> ')
  7747. ]),
  7748. vue.createElementVNode("image", {
  7749. class: "parameter_leftdian1",
  7750. src: _imports_1$2,
  7751. alt: ""
  7752. }),
  7753. vue.createElementVNode("view", { class: "parameter_lef2" }, [
  7754. vue.createElementVNode("image", {
  7755. src: _imports_2$2,
  7756. mode: ""
  7757. })
  7758. ]),
  7759. vue.createElementVNode("image", {
  7760. class: "parameter_leftche",
  7761. src: _imports_3$3,
  7762. mode: ""
  7763. }),
  7764. vue.createCommentVNode(' <image class="parameter_leftche1" src="../../static/fang.png" mode=""></image> '),
  7765. vue.createCommentVNode(' <image class="parameter_leftche" src="../../static/che.png" mode=""></image> '),
  7766. vue.createCommentVNode(' <image class="parameter_leftche2" src="../../static/che1.png" mode=""></image> '),
  7767. vue.createElementVNode(
  7768. "view",
  7769. { class: "parameter_leftview" },
  7770. vue.toDisplayString(_ctx.$t("CommunicationRechargeInput")),
  7771. 1
  7772. /* TEXT */
  7773. ),
  7774. vue.createCommentVNode(' <view class="parameter_leftview">交流供电</view> '),
  7775. vue.createCommentVNode(' <view class="parameter_leftview">直流补电</view> '),
  7776. vue.createCommentVNode(' <view class="parameter_leftview">直流供电</view> ')
  7777. ]),
  7778. vue.createElementVNode("view", { class: "parameter_right" }, [
  7779. vue.createElementVNode("view", { class: "parameter_righttop" }, [
  7780. vue.createElementVNode("view", { class: "parameter_1" }, [
  7781. vue.createElementVNode("view", { class: "parameter_2" }, [
  7782. vue.createElementVNode("view", { class: "parameter_3" }, [
  7783. vue.createElementVNode("view", { class: "parameter_4" }, [
  7784. _ctx.uidatasdata.AC_In_380V_63A1_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  7785. key: 0,
  7786. src: _imports_4$2,
  7787. mode: ""
  7788. })) : (vue.openBlock(), vue.createElementBlock("image", {
  7789. key: 1,
  7790. src: _imports_5,
  7791. mode: ""
  7792. })),
  7793. vue.createTextVNode(
  7794. " " + vue.toDisplayString(_ctx.$t("state163A")),
  7795. 1
  7796. /* TEXT */
  7797. )
  7798. ]),
  7799. _ctx.uidatasdata.AC_In_380V_63A1_Status == 0 ? (vue.openBlock(), vue.createElementBlock(
  7800. "view",
  7801. {
  7802. key: 0,
  7803. class: "parameter_51"
  7804. },
  7805. vue.toDisplayString(_ctx.$t("connect")),
  7806. 1
  7807. /* TEXT */
  7808. )) : (vue.openBlock(), vue.createElementBlock(
  7809. "view",
  7810. {
  7811. key: 1,
  7812. class: "parameter_5"
  7813. },
  7814. vue.toDisplayString(_ctx.$t("breakoff")),
  7815. 1
  7816. /* TEXT */
  7817. ))
  7818. ]),
  7819. vue.createElementVNode("view", { class: "parameter_3" }, [
  7820. vue.createElementVNode("view", { class: "parameter_4" }, [
  7821. _ctx.uidatasdata.AC_In_380V_63A2_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  7822. key: 0,
  7823. src: _imports_4$2,
  7824. mode: ""
  7825. })) : (vue.openBlock(), vue.createElementBlock("image", {
  7826. key: 1,
  7827. src: _imports_5,
  7828. mode: ""
  7829. })),
  7830. vue.createTextVNode(
  7831. " " + vue.toDisplayString(_ctx.$t("state63A2")),
  7832. 1
  7833. /* TEXT */
  7834. )
  7835. ]),
  7836. _ctx.uidatasdata.AC_In_380V_63A2_Status == 0 ? (vue.openBlock(), vue.createElementBlock(
  7837. "view",
  7838. {
  7839. key: 0,
  7840. class: "parameter_51"
  7841. },
  7842. vue.toDisplayString(_ctx.$t("connect")),
  7843. 1
  7844. /* TEXT */
  7845. )) : (vue.openBlock(), vue.createElementBlock(
  7846. "view",
  7847. {
  7848. key: 1,
  7849. class: "parameter_5"
  7850. },
  7851. vue.toDisplayString(_ctx.$t("breakoff")),
  7852. 1
  7853. /* TEXT */
  7854. ))
  7855. ])
  7856. ]),
  7857. vue.createElementVNode("view", { class: "parameter_SOC" }, [
  7858. vue.createElementVNode("image", {
  7859. src: _imports_6,
  7860. mode: ""
  7861. }),
  7862. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  7863. vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
  7864. vue.createElementVNode("view", null, [
  7865. vue.createElementVNode(
  7866. "text",
  7867. { class: "parameter_SOCright2" },
  7868. vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
  7869. 1
  7870. /* TEXT */
  7871. ),
  7872. vue.createTextVNode(),
  7873. vue.createElementVNode("text", null, "%")
  7874. ])
  7875. ])
  7876. ]),
  7877. vue.createElementVNode("view", { class: "parameter_Battery" }, [
  7878. vue.createElementVNode("image", {
  7879. src: _imports_7,
  7880. mode: ""
  7881. }),
  7882. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  7883. vue.createElementVNode(
  7884. "view",
  7885. { class: "parameter_SOCright1" },
  7886. vue.toDisplayString(_ctx.$t("BatteryStatus")),
  7887. 1
  7888. /* TEXT */
  7889. ),
  7890. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  7891. _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
  7892. "view",
  7893. { key: 0 },
  7894. vue.toDisplayString(_ctx.$t("fault")),
  7895. 1
  7896. /* TEXT */
  7897. )) : _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock(
  7898. "view",
  7899. { key: 1 },
  7900. vue.toDisplayString(_ctx.$t("ChuShiHua")),
  7901. 1
  7902. /* TEXT */
  7903. )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
  7904. "view",
  7905. { key: 2 },
  7906. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  7907. 1
  7908. /* TEXT */
  7909. )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock(
  7910. "view",
  7911. { key: 3 },
  7912. vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
  7913. 1
  7914. /* TEXT */
  7915. )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
  7916. "view",
  7917. { key: 4 },
  7918. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  7919. 1
  7920. /* TEXT */
  7921. )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock(
  7922. "view",
  7923. { key: 5 },
  7924. vue.toDisplayString(_ctx.$t("Underhighpressure")),
  7925. 1
  7926. /* TEXT */
  7927. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")),
  7928. vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} ")
  7929. ])
  7930. ])
  7931. ]),
  7932. vue.createElementVNode("view", { class: "parameter_state" }, [
  7933. vue.createElementVNode("image", {
  7934. src: _imports_8,
  7935. mode: ""
  7936. }),
  7937. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  7938. vue.createElementVNode(
  7939. "view",
  7940. { class: "parameter_SOCright1" },
  7941. vue.toDisplayString(_ctx.$t("SystemStatus")),
  7942. 1
  7943. /* TEXT */
  7944. ),
  7945. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  7946. vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
  7947. _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock(
  7948. "view",
  7949. { key: 0 },
  7950. vue.toDisplayString(_ctx.$t("uncharged")),
  7951. 1
  7952. /* TEXT */
  7953. )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock(
  7954. "view",
  7955. { key: 1 },
  7956. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  7957. 1
  7958. /* TEXT */
  7959. )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock(
  7960. "view",
  7961. { key: 2 },
  7962. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  7963. 1
  7964. /* TEXT */
  7965. )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock(
  7966. "view",
  7967. { key: 3 },
  7968. vue.toDisplayString(_ctx.$t("full")),
  7969. 1
  7970. /* TEXT */
  7971. )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock(
  7972. vue.Fragment,
  7973. { key: 4 },
  7974. [
  7975. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_ChargeStatus==4">\r
  7976. {{$t('Chargingstopped')}}\r
  7977. </view> `),
  7978. vue.createElementVNode(
  7979. "view",
  7980. null,
  7981. vue.toDisplayString(_ctx.$t("retain")),
  7982. 1
  7983. /* TEXT */
  7984. )
  7985. ],
  7986. 2112
  7987. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  7988. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — "))
  7989. ])
  7990. ])
  7991. ])
  7992. ])
  7993. ]),
  7994. vue.createElementVNode("view", { class: "parameter_tap" }, [
  7995. vue.createElementVNode(
  7996. "view",
  7997. {
  7998. class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
  7999. onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
  8000. },
  8001. vue.toDisplayString(_ctx.$t("exchangeinformation")),
  8002. 3
  8003. /* TEXT, CLASS */
  8004. ),
  8005. vue.createElementVNode(
  8006. "view",
  8007. {
  8008. class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"),
  8009. onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2))
  8010. },
  8011. vue.toDisplayString(_ctx.$t("Batteryinformation")),
  8012. 3
  8013. /* TEXT, CLASS */
  8014. ),
  8015. vue.createElementVNode(
  8016. "view",
  8017. {
  8018. class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
  8019. onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3))
  8020. },
  8021. vue.toDisplayString(_ctx.$t("statisticalinformation")),
  8022. 3
  8023. /* TEXT, CLASS */
  8024. ),
  8025. vue.createElementVNode(
  8026. "view",
  8027. {
  8028. class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"),
  8029. onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(4))
  8030. },
  8031. vue.toDisplayString(_ctx.$t("coolinginformation")),
  8032. 3
  8033. /* TEXT, CLASS */
  8034. )
  8035. ]),
  8036. vue.createElementVNode("view", {
  8037. class: "parameter_zheng",
  8038. key: "index"
  8039. }, [
  8040. $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  8041. key: 0,
  8042. class: "parameter_box"
  8043. }, [
  8044. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  8045. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8046. vue.createElementVNode(
  8047. "view",
  8048. { class: "parameter_zheng12" },
  8049. vue.toDisplayString(_ctx.$t("PhaseVoltageAV")),
  8050. 1
  8051. /* TEXT */
  8052. ),
  8053. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8054. vue.createTextVNode(
  8055. vue.toDisplayString(_ctx.uidatasdata.PCSPortAPhaseVoltage ?? "—") + " ",
  8056. 1
  8057. /* TEXT */
  8058. ),
  8059. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8060. ])
  8061. ]),
  8062. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8063. vue.createElementVNode(
  8064. "view",
  8065. { class: "parameter_zheng12" },
  8066. vue.toDisplayString(_ctx.$t("PhaseVoltageBV")),
  8067. 1
  8068. /* TEXT */
  8069. ),
  8070. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8071. vue.createTextVNode(
  8072. vue.toDisplayString(_ctx.uidatasdata.PCSPortBPhaseVoltage ?? "—") + " ",
  8073. 1
  8074. /* TEXT */
  8075. ),
  8076. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8077. ])
  8078. ]),
  8079. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8080. vue.createElementVNode(
  8081. "view",
  8082. { class: "parameter_zheng12" },
  8083. vue.toDisplayString(_ctx.$t("PhaseVoltageCV")),
  8084. 1
  8085. /* TEXT */
  8086. ),
  8087. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8088. vue.createTextVNode(
  8089. vue.toDisplayString(_ctx.uidatasdata.PCSPortCPhaseVoltage ?? "—") + " ",
  8090. 1
  8091. /* TEXT */
  8092. ),
  8093. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8094. ])
  8095. ]),
  8096. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8097. vue.createElementVNode(
  8098. "view",
  8099. { class: "parameter_zheng12" },
  8100. vue.toDisplayString(_ctx.$t("Supplementarypower")),
  8101. 1
  8102. /* TEXT */
  8103. ),
  8104. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8105. vue.createTextVNode(
  8106. vue.toDisplayString(_ctx.uidatasdata.PCSTotalOutputPower ?? "—") + " ",
  8107. 1
  8108. /* TEXT */
  8109. ),
  8110. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  8111. ])
  8112. ])
  8113. ]),
  8114. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  8115. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8116. vue.createElementVNode("view", { class: "parameter_zheng12" }, [
  8117. vue.createCommentVNode(" A{{$t('PhaseCurrent')}} "),
  8118. vue.createTextVNode(
  8119. " " + vue.toDisplayString(_ctx.$t("PhaseVoltageAA")),
  8120. 1
  8121. /* TEXT */
  8122. )
  8123. ]),
  8124. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8125. vue.createTextVNode(
  8126. vue.toDisplayString(_ctx.uidatasdata["PCSOutputA-phaseCurrent"] ?? "—") + " ",
  8127. 1
  8128. /* TEXT */
  8129. ),
  8130. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  8131. ])
  8132. ]),
  8133. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8134. vue.createElementVNode(
  8135. "view",
  8136. { class: "parameter_zheng12" },
  8137. vue.toDisplayString(_ctx.$t("PhaseVoltageBA")),
  8138. 1
  8139. /* TEXT */
  8140. ),
  8141. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8142. vue.createTextVNode(
  8143. vue.toDisplayString(_ctx.uidatasdata["PCSOutputB-phaseCurrent"] ?? "—") + " ",
  8144. 1
  8145. /* TEXT */
  8146. ),
  8147. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  8148. ])
  8149. ]),
  8150. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8151. vue.createElementVNode(
  8152. "view",
  8153. { class: "parameter_zheng12" },
  8154. vue.toDisplayString(_ctx.$t("PhaseVoltageCA")),
  8155. 1
  8156. /* TEXT */
  8157. ),
  8158. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8159. vue.createTextVNode(
  8160. vue.toDisplayString(_ctx.uidatasdata["PCSOutputC-phaseCurrent"] ?? "—") + " ",
  8161. 1
  8162. /* TEXT */
  8163. ),
  8164. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  8165. ])
  8166. ]),
  8167. vue.createElementVNode("view", {
  8168. class: "parameter_zheng11",
  8169. style: { "height": "30px" }
  8170. }, [
  8171. vue.createElementVNode("view", { class: "parameter_zheng12" }, [
  8172. vue.createCommentVNode(" {{$t('powerSupply')}} ")
  8173. ]),
  8174. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  8175. {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text>\r
  8176. </view> `)
  8177. ])
  8178. ])
  8179. ])) : vue.createCommentVNode("v-if", true),
  8180. $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  8181. key: 1,
  8182. class: "parameter_box"
  8183. }, [
  8184. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  8185. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  8186. <view class="parameter_zheng12">\r
  8187. {{$t('Batterypower')}}\r
  8188. </view>\r
  8189. <view class="parameter_zheng13">\r
  8190. {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">kW</text>\r
  8191. </view>\r
  8192. </view> `),
  8193. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8194. vue.createElementVNode(
  8195. "view",
  8196. { class: "parameter_zheng12" },
  8197. vue.toDisplayString(_ctx.$t("TotalPressure")),
  8198. 1
  8199. /* TEXT */
  8200. ),
  8201. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8202. vue.createTextVNode(
  8203. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
  8204. 1
  8205. /* TEXT */
  8206. ),
  8207. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8208. ])
  8209. ]),
  8210. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8211. vue.createElementVNode(
  8212. "view",
  8213. { class: "parameter_zheng12" },
  8214. vue.toDisplayString(_ctx.$t("AllowChargingPower")),
  8215. 1
  8216. /* TEXT */
  8217. ),
  8218. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8219. vue.createTextVNode(
  8220. vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxChargePowerLimit ?? "—") + " ",
  8221. 1
  8222. /* TEXT */
  8223. ),
  8224. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  8225. ])
  8226. ]),
  8227. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8228. vue.createElementVNode(
  8229. "view",
  8230. { class: "parameter_zheng12" },
  8231. vue.toDisplayString(_ctx.$t("MaximumVoltage")),
  8232. 1
  8233. /* TEXT */
  8234. ),
  8235. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8236. vue.createTextVNode(
  8237. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
  8238. 1
  8239. /* TEXT */
  8240. ),
  8241. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8242. ])
  8243. ]),
  8244. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8245. vue.createElementVNode(
  8246. "view",
  8247. { class: "parameter_zheng12" },
  8248. vue.toDisplayString(_ctx.$t("MaximumTemperature")),
  8249. 1
  8250. /* TEXT */
  8251. ),
  8252. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8253. vue.createTextVNode(
  8254. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
  8255. 1
  8256. /* TEXT */
  8257. ),
  8258. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  8259. ])
  8260. ])
  8261. ]),
  8262. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  8263. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8264. vue.createElementVNode(
  8265. "view",
  8266. { class: "parameter_zheng12" },
  8267. vue.toDisplayString(_ctx.$t("BatteryCurrent")),
  8268. 1
  8269. /* TEXT */
  8270. ),
  8271. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8272. vue.createTextVNode(
  8273. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
  8274. 1
  8275. /* TEXT */
  8276. ),
  8277. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  8278. ])
  8279. ]),
  8280. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  8281. <view class="parameter_zheng12">\r
  8282. {{$t('TotalExternalPressure')}}\r
  8283. </view>\r
  8284. <view class="parameter_zheng13">\r
  8285. {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
  8286. </view>\r
  8287. </view> `),
  8288. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8289. vue.createElementVNode(
  8290. "view",
  8291. { class: "parameter_zheng12" },
  8292. vue.toDisplayString(_ctx.$t("AllowChargingCurrent")),
  8293. 1
  8294. /* TEXT */
  8295. ),
  8296. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8297. vue.createTextVNode(
  8298. vue.toDisplayString(_ctx.uidatasdata.ChargingInformation_Chg_Max_Cur ?? "—") + " ",
  8299. 1
  8300. /* TEXT */
  8301. ),
  8302. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  8303. ])
  8304. ]),
  8305. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8306. vue.createElementVNode(
  8307. "view",
  8308. { class: "parameter_zheng12" },
  8309. vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
  8310. 1
  8311. /* TEXT */
  8312. ),
  8313. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8314. vue.createTextVNode(
  8315. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ",
  8316. 1
  8317. /* TEXT */
  8318. ),
  8319. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8320. ])
  8321. ]),
  8322. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8323. vue.createElementVNode(
  8324. "view",
  8325. { class: "parameter_zheng12" },
  8326. vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
  8327. 1
  8328. /* TEXT */
  8329. ),
  8330. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8331. vue.createTextVNode(
  8332. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
  8333. 1
  8334. /* TEXT */
  8335. ),
  8336. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  8337. ])
  8338. ])
  8339. ])
  8340. ])) : vue.createCommentVNode("v-if", true),
  8341. $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  8342. key: 2,
  8343. class: "parameter_box"
  8344. }, [
  8345. vue.createElementVNode("view", { class: "parameter_zheng10" }, [
  8346. vue.createCommentVNode(` <view class="parameter_zhengbox">\r
  8347. <view class="parameter_zheng12">\r
  8348. {{$t('AccumulatedChargingCapacityCommunication')}}\r
  8349. </view>\r
  8350. <view class="parameter_zhengbox13">\r
  8351. {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
  8352. </view>\r
  8353. </view>\r
  8354. <view class="parameter_zhengbox parameter_zheng101">\r
  8355. <view class="parameter_zheng12">\r
  8356. {{$t('AccumulatedDCChargingCapacity')}}\r
  8357. </view>\r
  8358. <view class="parameter_zhengbox13">\r
  8359. {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
  8360. </view>\r
  8361. </view> `),
  8362. vue.createElementVNode("view", { class: "parameter_zhengbox" }, [
  8363. vue.createElementVNode(
  8364. "view",
  8365. { class: "parameter_zheng12" },
  8366. vue.toDisplayString(_ctx.$t("RunningTimes")),
  8367. 1
  8368. /* TEXT */
  8369. ),
  8370. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  8371. vue.createTextVNode(" 0.0 "),
  8372. vue.createElementVNode(
  8373. "text",
  8374. { class: "parameter_zheng14" },
  8375. vue.toDisplayString(_ctx.$t("RunningTimesmin")),
  8376. 1
  8377. /* TEXT */
  8378. ),
  8379. vue.createTextVNode(),
  8380. vue.createElementVNode("text")
  8381. ])
  8382. ]),
  8383. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  8384. vue.createElementVNode(
  8385. "view",
  8386. { class: "parameter_zheng12" },
  8387. vue.toDisplayString(_ctx.$t("InputCapacity")),
  8388. 1
  8389. /* TEXT */
  8390. ),
  8391. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  8392. vue.createTextVNode(" 0.0 "),
  8393. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  8394. vue.createTextVNode(),
  8395. vue.createElementVNode("text")
  8396. ])
  8397. ]),
  8398. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  8399. vue.createElementVNode(
  8400. "view",
  8401. { class: "parameter_zheng12" },
  8402. vue.toDisplayString(_ctx.$t("AccumulateInput")),
  8403. 1
  8404. /* TEXT */
  8405. ),
  8406. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  8407. vue.createCommentVNode(` {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text> `),
  8408. vue.createTextVNode(" 0.0 "),
  8409. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  8410. vue.createTextVNode(),
  8411. vue.createElementVNode("text")
  8412. ])
  8413. ])
  8414. ])
  8415. ])) : vue.createCommentVNode("v-if", true),
  8416. $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  8417. key: 3,
  8418. class: "parameter_box"
  8419. }, [
  8420. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  8421. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8422. vue.createElementVNode(
  8423. "view",
  8424. { class: "parameter_zheng12" },
  8425. vue.toDisplayString(_ctx.$t("WorkingMode")),
  8426. 1
  8427. /* TEXT */
  8428. ),
  8429. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  8430. vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
  8431. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
  8432. _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
  8433. "view",
  8434. { key: 0 },
  8435. vue.toDisplayString(_ctx.$t("OffMode")),
  8436. 1
  8437. /* TEXT */
  8438. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
  8439. "view",
  8440. { key: 1 },
  8441. vue.toDisplayString(_ctx.$t("CoolingMode")),
  8442. 1
  8443. /* TEXT */
  8444. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
  8445. "view",
  8446. { key: 2 },
  8447. vue.toDisplayString(_ctx.$t("HeatingMode")),
  8448. 1
  8449. /* TEXT */
  8450. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
  8451. "view",
  8452. { key: 3 },
  8453. vue.toDisplayString(_ctx.$t("CirculatingMode")),
  8454. 1
  8455. /* TEXT */
  8456. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  8457. ])
  8458. ]),
  8459. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8460. vue.createElementVNode(
  8461. "view",
  8462. { class: "parameter_zheng12" },
  8463. vue.toDisplayString(_ctx.$t("OutletTemperature")),
  8464. 1
  8465. /* TEXT */
  8466. ),
  8467. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8468. vue.createTextVNode(
  8469. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
  8470. 1
  8471. /* TEXT */
  8472. ),
  8473. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  8474. ])
  8475. ]),
  8476. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8477. vue.createElementVNode("view", {
  8478. class: "parameter_zheng12",
  8479. style: { "height": "30px" }
  8480. }, [
  8481. vue.createCommentVNode(" {{$t('PowerDemand')}} ")
  8482. ]),
  8483. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  8484. {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text class="parameter_zheng14">kW</text>\r
  8485. </view> `)
  8486. ])
  8487. ]),
  8488. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  8489. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8490. vue.createElementVNode(
  8491. "view",
  8492. { class: "parameter_zheng12" },
  8493. vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
  8494. 1
  8495. /* TEXT */
  8496. ),
  8497. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  8498. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
  8499. _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
  8500. "view",
  8501. { key: 0 },
  8502. vue.toDisplayString(_ctx.$t("DisconnectedState")),
  8503. 1
  8504. /* TEXT */
  8505. )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
  8506. "view",
  8507. { key: 1 },
  8508. vue.toDisplayString(_ctx.$t("ClosedState")),
  8509. 1
  8510. /* TEXT */
  8511. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
  8512. ])
  8513. ]),
  8514. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8515. vue.createElementVNode(
  8516. "view",
  8517. { class: "parameter_zheng12" },
  8518. vue.toDisplayString(_ctx.$t("waterTemperature")),
  8519. 1
  8520. /* TEXT */
  8521. ),
  8522. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8523. vue.createTextVNode(
  8524. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
  8525. 1
  8526. /* TEXT */
  8527. ),
  8528. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  8529. ])
  8530. ]),
  8531. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8532. vue.createElementVNode("view", {
  8533. class: "parameter_zheng12",
  8534. style: { "height": "30px" }
  8535. }, [
  8536. vue.createCommentVNode(" {{$t('FaultLevel')}} ")
  8537. ]),
  8538. vue.createCommentVNode(` <view class="parameter_Batterystate">\r
  8539. \r
  8540. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
  8541. {{$t('NoMalfunction')}}\r
  8542. </view>\r
  8543. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
  8544. 1{{$t('LevelLault')}}\r
  8545. </view>\r
  8546. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
  8547. 2{{$t('LevelLault')}}\r
  8548. </view>\r
  8549. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
  8550. 3{{$t('LevelLault')}}\r
  8551. </view>\r
  8552. <view v-else>\r
  8553. —\r
  8554. </view>\r
  8555. </view> `)
  8556. ])
  8557. ])
  8558. ])) : vue.createCommentVNode("v-if", true),
  8559. vue.createElementVNode("view", { class: "parameter_zheng3" }, [
  8560. _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  8561. key: 0,
  8562. class: "parameter_zheng31111",
  8563. onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
  8564. }, [
  8565. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  8566. vue.createElementVNode(
  8567. "view",
  8568. { class: "parameter_zheng32" },
  8569. vue.toDisplayString(_ctx.$t("open")),
  8570. 1
  8571. /* TEXT */
  8572. )
  8573. ])
  8574. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8575. key: 1,
  8576. class: "parameter_zheng31111"
  8577. }, [
  8578. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  8579. vue.createElementVNode(
  8580. "view",
  8581. { class: "parameter_zheng32ccc" },
  8582. vue.toDisplayString(_ctx.$t("open")),
  8583. 1
  8584. /* TEXT */
  8585. )
  8586. ])
  8587. ])),
  8588. _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  8589. key: 2,
  8590. class: "parameter_zheng31111",
  8591. onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args))
  8592. }, [
  8593. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  8594. vue.createElementVNode(
  8595. "view",
  8596. { class: "parameter_zheng33" },
  8597. vue.toDisplayString(_ctx.$t("stopIt")),
  8598. 1
  8599. /* TEXT */
  8600. )
  8601. ])
  8602. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8603. key: 3,
  8604. class: "parameter_zheng31111"
  8605. }, [
  8606. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  8607. vue.createElementVNode(
  8608. "view",
  8609. { class: "parameter_zheng32ccc" },
  8610. vue.toDisplayString(_ctx.$t("stopIt")),
  8611. 1
  8612. /* TEXT */
  8613. )
  8614. ])
  8615. ])),
  8616. vue.createElementVNode("view", {
  8617. class: "parameter_zheng31111",
  8618. onClick: _cache[6] || (_cache[6] = (...args) => $options.onpower && $options.onpower(...args))
  8619. }, [
  8620. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  8621. _ctx.$t("power") == "功率" ? (vue.openBlock(), vue.createElementBlock("view", {
  8622. key: 0,
  8623. class: "parameter_zheng34"
  8624. }, [
  8625. vue.createElementVNode(
  8626. "view",
  8627. null,
  8628. vue.toDisplayString(_ctx.$t("power")),
  8629. 1
  8630. /* TEXT */
  8631. ),
  8632. vue.createElementVNode(
  8633. "view",
  8634. null,
  8635. vue.toDisplayString(_ctx.$t("given")),
  8636. 1
  8637. /* TEXT */
  8638. )
  8639. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8640. key: 1,
  8641. class: "parameter_zheng34"
  8642. }, [
  8643. vue.createElementVNode(
  8644. "view",
  8645. null,
  8646. vue.toDisplayString(_ctx.$t("power")) + " " + vue.toDisplayString(_ctx.$t("given")),
  8647. 1
  8648. /* TEXT */
  8649. )
  8650. ]))
  8651. ])
  8652. ])
  8653. ])
  8654. ]),
  8655. vue.createElementVNode("view", { class: "parameter_home" }, [
  8656. vue.createElementVNode("view", {
  8657. class: "parameter_home1",
  8658. onClick: _cache[7] || (_cache[7] = (...args) => $options.onreturn && $options.onreturn(...args))
  8659. }, [
  8660. vue.createElementVNode("image", {
  8661. src: _imports_1$1,
  8662. mode: ""
  8663. }),
  8664. vue.createElementVNode(
  8665. "text",
  8666. { class: "parameter_hometext" },
  8667. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  8668. 1
  8669. /* TEXT */
  8670. )
  8671. ]),
  8672. vue.createElementVNode("view", { class: "parameter_home2" }, [
  8673. vue.createElementVNode("image", {
  8674. src: _imports_10,
  8675. mode: ""
  8676. }),
  8677. vue.createElementVNode("swiper", {
  8678. class: "swiper",
  8679. circular: "",
  8680. autoplay: true,
  8681. interval: 2e3,
  8682. duration: 500,
  8683. vertical: true
  8684. }, [
  8685. (vue.openBlock(true), vue.createElementBlock(
  8686. vue.Fragment,
  8687. null,
  8688. vue.renderList($data.faultsdata, (item, index) => {
  8689. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
  8690. vue.createElementVNode(
  8691. "view",
  8692. { class: "parameter_home3" },
  8693. vue.toDisplayString(item["CONTENT"]),
  8694. 1
  8695. /* TEXT */
  8696. )
  8697. ]);
  8698. }),
  8699. 128
  8700. /* KEYED_FRAGMENT */
  8701. ))
  8702. ])
  8703. ])
  8704. ])
  8705. ])
  8706. ]),
  8707. vue.createVNode(
  8708. _component_uni_popup,
  8709. { ref: "alertDialog" },
  8710. {
  8711. default: vue.withCtx(() => [
  8712. vue.createVNode(_component_uni_popup_dialog, {
  8713. mode: $data.modeinput,
  8714. placeholder: _ctx.$t("powergiven") + "(0~80kW)",
  8715. modelValue: $data.value,
  8716. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.value = $event),
  8717. focus: false,
  8718. type: $data.successtype,
  8719. cancelText: _ctx.$t("CancelReturn"),
  8720. confirmText: $data.confirmText,
  8721. beforeClose: true,
  8722. title: $data.title,
  8723. content: $data.content,
  8724. onConfirm: $options.dialogConfirm,
  8725. onClose: $options.dialogClose
  8726. }, null, 8, ["mode", "placeholder", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
  8727. ]),
  8728. _: 1
  8729. /* STABLE */
  8730. },
  8731. 512
  8732. /* NEED_PATCH */
  8733. ),
  8734. vue.createVNode(
  8735. _component_uni_popup,
  8736. {
  8737. ref: "message",
  8738. type: "message"
  8739. },
  8740. {
  8741. default: vue.withCtx(() => [
  8742. vue.createVNode(_component_uni_popup_message, {
  8743. type: "error",
  8744. message: _ctx.messageText,
  8745. duration: 3e3
  8746. }, null, 8, ["message"])
  8747. ]),
  8748. _: 1
  8749. /* STABLE */
  8750. },
  8751. 512
  8752. /* NEED_PATCH */
  8753. )
  8754. ]);
  8755. }
  8756. const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-4978fed5"], ["__file", "D:/project/esswisdom_ipad/pages/home/index.vue"]]);
  8757. const _sfc_main$8 = {
  8758. props: {
  8759. visible: Boolean,
  8760. color: {
  8761. type: String,
  8762. default: "#303133"
  8763. },
  8764. placement: {
  8765. type: String,
  8766. default: "top"
  8767. },
  8768. content: {
  8769. type: String,
  8770. default: ""
  8771. },
  8772. show: {
  8773. type: Boolean,
  8774. default: false
  8775. }
  8776. },
  8777. data() {
  8778. return {
  8779. isShow: this.visible,
  8780. title: "Hello",
  8781. arrowLeft: 0,
  8782. query: null,
  8783. style: {},
  8784. arrowStyle: {}
  8785. };
  8786. },
  8787. onLoad() {
  8788. },
  8789. watch: {
  8790. isShow: {
  8791. handler(val) {
  8792. this.$emit("update:visible", val);
  8793. },
  8794. immediate: true
  8795. },
  8796. visible: {
  8797. handler(val) {
  8798. if (val) {
  8799. this.$nextTick(() => {
  8800. this.getPosition();
  8801. });
  8802. }
  8803. this.isShow = val;
  8804. },
  8805. immediate: true
  8806. }
  8807. },
  8808. mounted() {
  8809. this.getPosition();
  8810. },
  8811. methods: {
  8812. close() {
  8813. this.isShow = false;
  8814. },
  8815. fixedWrap() {
  8816. this.isShow = false;
  8817. },
  8818. async handleClick() {
  8819. if (this.isShow) {
  8820. return this.isShow = false;
  8821. }
  8822. await this.getPosition();
  8823. this.isShow = true;
  8824. },
  8825. getPosition() {
  8826. return new Promise((resolve) => {
  8827. uni.createSelectorQuery().in(this).selectAll(".zb_tooltip_content,.zb_tooltip__popper").boundingClientRect(async (data) => {
  8828. let { left, bottom, right, top, width, height } = data[0];
  8829. let obj1 = data[1];
  8830. let objStyle = {};
  8831. let objStyle1 = {};
  8832. switch (this.placement) {
  8833. case "top":
  8834. if (obj1.width > width) {
  8835. objStyle.left = `-${(obj1.width - width) / 2}px`;
  8836. } else {
  8837. objStyle.left = `${Math.abs(obj1.width - width) / 2}px`;
  8838. }
  8839. objStyle.bottom = `${height + 8}px`;
  8840. objStyle1.left = obj1.width / 2 - 6 + "px";
  8841. break;
  8842. case "top-start":
  8843. objStyle.left = `0px`;
  8844. objStyle.bottom = `${height + 8}px`;
  8845. break;
  8846. case "top-end":
  8847. objStyle.right = `0px`;
  8848. objStyle.bottom = `${height + 8}px`;
  8849. objStyle1.right = `8px`;
  8850. break;
  8851. case "bottom":
  8852. if (obj1.width > width) {
  8853. objStyle.left = `-${(obj1.width - width) / 2}px`;
  8854. } else {
  8855. objStyle.left = `${Math.abs(obj1.width - width) / 2}px`;
  8856. }
  8857. objStyle.top = `${height + 8}px`;
  8858. objStyle1.left = obj1.width / 2 - 6 + "px";
  8859. break;
  8860. case "bottom-start":
  8861. objStyle.left = `0px`;
  8862. objStyle.top = `${height + 8}px`;
  8863. objStyle1.left = `8px`;
  8864. break;
  8865. case "bottom-end":
  8866. objStyle.right = `0px`;
  8867. objStyle.top = `${height + 8}px`;
  8868. objStyle1.right = `8px`;
  8869. break;
  8870. case "right":
  8871. objStyle.left = `${width + 8}px`;
  8872. if (obj1.height > height) {
  8873. objStyle.top = `-${(obj1.height - height) / 2}px`;
  8874. } else {
  8875. objStyle.top = `${Math.abs((obj1.height - height) / 2)}px`;
  8876. }
  8877. objStyle1.top = `${obj1.height / 2 - 6}px`;
  8878. break;
  8879. case "right-start":
  8880. objStyle.left = `${width + 8}px`;
  8881. objStyle.top = `0px`;
  8882. objStyle1.top = `8px`;
  8883. break;
  8884. case "right-end":
  8885. objStyle.left = `${width + 8}px`;
  8886. objStyle.bottom = `0px`;
  8887. objStyle1.bottom = `8px`;
  8888. break;
  8889. case "left":
  8890. objStyle.right = `${width + 8}px`;
  8891. if (obj1.height > height) {
  8892. objStyle.top = `-${(obj1.height - height) / 2}px`;
  8893. } else {
  8894. objStyle.top = `${Math.abs((obj1.height - height) / 2)}px`;
  8895. }
  8896. objStyle1.top = `${obj1.height / 2 - 6}px`;
  8897. break;
  8898. case "left-start":
  8899. objStyle.right = `${width + 8}px`;
  8900. objStyle.top = `0px`;
  8901. objStyle1.top = `8px`;
  8902. break;
  8903. case "left-end":
  8904. objStyle.right = `${width + 8}px`;
  8905. objStyle.bottom = `0px`;
  8906. objStyle1.bottom = `8px`;
  8907. break;
  8908. }
  8909. this.style = objStyle;
  8910. this.arrowStyle = objStyle1;
  8911. resolve();
  8912. }).exec();
  8913. });
  8914. }
  8915. }
  8916. };
  8917. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  8918. return vue.openBlock(), vue.createElementBlock(
  8919. "view",
  8920. {
  8921. class: "zb-tooltip",
  8922. style: vue.normalizeStyle({
  8923. "--theme-bg-color": $props.color
  8924. })
  8925. },
  8926. [
  8927. vue.createElementVNode("view", {
  8928. class: "zb_tooltip_content",
  8929. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.handleClick && $options.handleClick(...args), ["stop"]))
  8930. }, [
  8931. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  8932. vue.createElementVNode(
  8933. "view",
  8934. {
  8935. class: "zb_tooltip__popper",
  8936. onClick: vue.withModifiers(() => {
  8937. }, ["stop"]),
  8938. style: vue.normalizeStyle([$data.style, {
  8939. visibility: $data.isShow ? "visible" : "hidden",
  8940. color: $props.color === "white" ? "" : "#fff",
  8941. boxShadow: $props.color === "white" ? "0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d" : ""
  8942. }])
  8943. },
  8944. [
  8945. vue.renderSlot(_ctx.$slots, "content", {}, () => [
  8946. vue.createTextVNode(
  8947. vue.toDisplayString($props.content),
  8948. 1
  8949. /* TEXT */
  8950. )
  8951. ], true),
  8952. vue.createElementVNode(
  8953. "view",
  8954. {
  8955. class: vue.normalizeClass(["zb_popper__icon", [{
  8956. "zb_popper__up": $props.placement.indexOf("bottom") === 0,
  8957. "zb_popper__arrow": $props.placement.indexOf("top") === 0,
  8958. "zb_popper__right": $props.placement.indexOf("right") === 0,
  8959. "zb_popper__left": $props.placement.indexOf("left") === 0
  8960. }]]),
  8961. style: vue.normalizeStyle([$data.arrowStyle])
  8962. },
  8963. null,
  8964. 6
  8965. /* CLASS, STYLE */
  8966. )
  8967. ],
  8968. 4
  8969. /* STYLE */
  8970. )
  8971. ])
  8972. ],
  8973. 4
  8974. /* STYLE */
  8975. );
  8976. }
  8977. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-13dad3a2"], ["__file", "D:/project/esswisdom_ipad/uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue"]]);
  8978. const en$1 = {
  8979. "uni-pagination.prevText": "prev",
  8980. "uni-pagination.nextText": "next",
  8981. "uni-pagination.piecePerPage": "piece/page"
  8982. };
  8983. const es = {
  8984. "uni-pagination.prevText": "anterior",
  8985. "uni-pagination.nextText": "prxima",
  8986. "uni-pagination.piecePerPage": "Art��culo/P��gina"
  8987. };
  8988. const fr = {
  8989. "uni-pagination.prevText": "précédente",
  8990. "uni-pagination.nextText": "suivante",
  8991. "uni-pagination.piecePerPage": "Articles/Pages"
  8992. };
  8993. const zhHans$1 = {
  8994. "uni-pagination.prevText": "上一页",
  8995. "uni-pagination.nextText": "下一页",
  8996. "uni-pagination.piecePerPage": "条/页"
  8997. };
  8998. const zhHant$1 = {
  8999. "uni-pagination.prevText": "上一頁",
  9000. "uni-pagination.nextText": "下一頁",
  9001. "uni-pagination.piecePerPage": "條/頁"
  9002. };
  9003. const messages$1 = {
  9004. en: en$1,
  9005. es,
  9006. fr,
  9007. "zh-Hans": zhHans$1,
  9008. "zh-Hant": zhHant$1
  9009. };
  9010. const {
  9011. t
  9012. } = initVueI18n(messages$1);
  9013. const _sfc_main$7 = {
  9014. name: "UniPagination",
  9015. emits: ["update:modelValue", "input", "change", "pageSizeChange"],
  9016. props: {
  9017. value: {
  9018. type: [Number, String],
  9019. default: 1
  9020. },
  9021. modelValue: {
  9022. type: [Number, String],
  9023. default: 1
  9024. },
  9025. prevText: {
  9026. type: String
  9027. },
  9028. nextText: {
  9029. type: String
  9030. },
  9031. piecePerPageText: {
  9032. type: String
  9033. },
  9034. current: {
  9035. type: [Number, String],
  9036. default: 1
  9037. },
  9038. total: {
  9039. // 数据总量
  9040. type: [Number, String],
  9041. default: 0
  9042. },
  9043. pageSize: {
  9044. // 每页数据量
  9045. type: [Number, String],
  9046. default: 10
  9047. },
  9048. showIcon: {
  9049. // 是否以 icon 形式展示按钮
  9050. type: [Boolean, String],
  9051. default: false
  9052. },
  9053. showPageSize: {
  9054. // 是否以 icon 形式展示按钮
  9055. type: [Boolean, String],
  9056. default: false
  9057. },
  9058. pagerCount: {
  9059. type: Number,
  9060. default: 5
  9061. },
  9062. pageSizeRange: {
  9063. type: Array,
  9064. default: () => [20, 50, 100, 500]
  9065. }
  9066. },
  9067. data() {
  9068. return {
  9069. pageSizeIndex: 0,
  9070. currentIndex: 1,
  9071. paperData: [],
  9072. pickerShow: false
  9073. };
  9074. },
  9075. computed: {
  9076. piecePerPage() {
  9077. return this.piecePerPageText || t("uni-pagination.piecePerPage");
  9078. },
  9079. prevPageText() {
  9080. return this.prevText || t("uni-pagination.prevText");
  9081. },
  9082. nextPageText() {
  9083. return this.nextText || t("uni-pagination.nextText");
  9084. },
  9085. maxPage() {
  9086. let maxPage = 1;
  9087. let total = Number(this.total);
  9088. let pageSize = Number(this.pageSize);
  9089. if (total && pageSize) {
  9090. maxPage = Math.ceil(total / pageSize);
  9091. }
  9092. return maxPage;
  9093. },
  9094. paper() {
  9095. const num = this.currentIndex;
  9096. const pagerCount = this.pagerCount;
  9097. const total = this.total;
  9098. const pageSize = this.pageSize;
  9099. let totalArr = [];
  9100. let showPagerArr = [];
  9101. let pagerNum = Math.ceil(total / pageSize);
  9102. for (let i2 = 0; i2 < pagerNum; i2++) {
  9103. totalArr.push(i2 + 1);
  9104. }
  9105. showPagerArr.push(1);
  9106. const totalNum = totalArr[totalArr.length - (pagerCount + 1) / 2];
  9107. totalArr.forEach((item, index) => {
  9108. if ((pagerCount + 1) / 2 >= num) {
  9109. if (item < pagerCount + 1 && item > 1) {
  9110. showPagerArr.push(item);
  9111. }
  9112. } else if (num + 2 <= totalNum) {
  9113. if (item > num - (pagerCount + 1) / 2 && item < num + (pagerCount + 1) / 2) {
  9114. showPagerArr.push(item);
  9115. }
  9116. } else {
  9117. if ((item > num - (pagerCount + 1) / 2 || pagerNum - pagerCount < item) && item < totalArr[totalArr.length - 1]) {
  9118. showPagerArr.push(item);
  9119. }
  9120. }
  9121. });
  9122. if (pagerNum > pagerCount) {
  9123. if ((pagerCount + 1) / 2 >= num) {
  9124. showPagerArr[showPagerArr.length - 1] = "...";
  9125. } else if (num + 2 <= totalNum) {
  9126. showPagerArr[1] = "...";
  9127. showPagerArr[showPagerArr.length - 1] = "...";
  9128. } else {
  9129. showPagerArr[1] = "...";
  9130. }
  9131. showPagerArr.push(totalArr[totalArr.length - 1]);
  9132. } else {
  9133. if ((pagerCount + 1) / 2 >= num)
  9134. ;
  9135. else if (num + 2 <= totalNum)
  9136. ;
  9137. else {
  9138. showPagerArr.shift();
  9139. showPagerArr.push(totalArr[totalArr.length - 1]);
  9140. }
  9141. }
  9142. return showPagerArr;
  9143. }
  9144. },
  9145. watch: {
  9146. current: {
  9147. immediate: true,
  9148. handler(val, old) {
  9149. if (val < 1) {
  9150. this.currentIndex = 1;
  9151. } else {
  9152. this.currentIndex = val;
  9153. }
  9154. }
  9155. },
  9156. value: {
  9157. immediate: true,
  9158. handler(val) {
  9159. if (Number(this.current) !== 1)
  9160. return;
  9161. if (val < 1) {
  9162. this.currentIndex = 1;
  9163. } else {
  9164. this.currentIndex = val;
  9165. }
  9166. }
  9167. },
  9168. pageSizeIndex(val) {
  9169. this.$emit("pageSizeChange", this.pageSizeRange[val]);
  9170. }
  9171. },
  9172. methods: {
  9173. pickerChange(e2) {
  9174. this.pageSizeIndex = e2.detail.value;
  9175. this.pickerClick();
  9176. },
  9177. pickerClick() {
  9178. },
  9179. // 选择标签
  9180. selectPage(e2, index) {
  9181. if (parseInt(e2)) {
  9182. this.currentIndex = e2;
  9183. this.change("current");
  9184. } else {
  9185. let pagerNum = Math.ceil(this.total / this.pageSize);
  9186. if (index <= 1) {
  9187. if (this.currentIndex - 5 > 1) {
  9188. this.currentIndex -= 5;
  9189. } else {
  9190. this.currentIndex = 1;
  9191. }
  9192. return;
  9193. }
  9194. if (index >= 6) {
  9195. if (this.currentIndex + 5 > pagerNum) {
  9196. this.currentIndex = pagerNum;
  9197. } else {
  9198. this.currentIndex += 5;
  9199. }
  9200. return;
  9201. }
  9202. }
  9203. },
  9204. clickLeft() {
  9205. if (Number(this.currentIndex) === 1) {
  9206. return;
  9207. }
  9208. this.currentIndex -= 1;
  9209. this.change("prev");
  9210. },
  9211. clickRight() {
  9212. if (Number(this.currentIndex) >= this.maxPage) {
  9213. return;
  9214. }
  9215. this.currentIndex += 1;
  9216. this.change("next");
  9217. },
  9218. change(e2) {
  9219. this.$emit("input", this.currentIndex);
  9220. this.$emit("update:modelValue", this.currentIndex);
  9221. this.$emit("change", {
  9222. type: e2,
  9223. current: this.currentIndex
  9224. });
  9225. }
  9226. }
  9227. };
  9228. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  9229. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$2);
  9230. return vue.openBlock(), vue.createElementBlock("view", { class: "box" }, [
  9231. vue.createElementVNode("view"),
  9232. vue.createElementVNode("view", { class: "uni-pagination" }, [
  9233. $props.showPageSize === true || $props.showPageSize === "true" ? (vue.openBlock(), vue.createElementBlock("picker", {
  9234. key: 0,
  9235. class: "select-picker",
  9236. mode: "selector",
  9237. value: $data.pageSizeIndex,
  9238. range: $props.pageSizeRange,
  9239. onChange: _cache[0] || (_cache[0] = (...args) => $options.pickerChange && $options.pickerChange(...args)),
  9240. onCancel: _cache[1] || (_cache[1] = (...args) => $options.pickerClick && $options.pickerClick(...args)),
  9241. onClick: _cache[2] || (_cache[2] = (...args) => $options.pickerClick && $options.pickerClick(...args))
  9242. }, [
  9243. vue.createElementVNode("button", {
  9244. type: "default",
  9245. size: "mini",
  9246. plain: true
  9247. }, [
  9248. vue.createElementVNode(
  9249. "text",
  9250. null,
  9251. vue.toDisplayString($props.pageSizeRange[$data.pageSizeIndex]) + " " + vue.toDisplayString($options.piecePerPage),
  9252. 1
  9253. /* TEXT */
  9254. ),
  9255. vue.createVNode(_component_uni_icons, {
  9256. class: "select-picker-icon",
  9257. type: "arrowdown",
  9258. size: "12",
  9259. color: "#999"
  9260. })
  9261. ])
  9262. ], 40, ["value", "range"])) : vue.createCommentVNode("v-if", true),
  9263. vue.createCommentVNode(' <view class="uni-pagination__total is-phone-hide">共 {{ total }} 条</view> '),
  9264. vue.createElementVNode("view", {
  9265. class: vue.normalizeClass(["uni-pagination__btn", $data.currentIndex === 1 ? "uni-pagination--disabled" : "uni-pagination--enabled"]),
  9266. "hover-class": $data.currentIndex === 1 ? "" : "uni-pagination--hover",
  9267. "hover-start-time": 20,
  9268. "hover-stay-time": 70,
  9269. onClick: _cache[3] || (_cache[3] = (...args) => $options.clickLeft && $options.clickLeft(...args))
  9270. }, [
  9271. $props.showIcon === true || $props.showIcon === "true" ? (vue.openBlock(), vue.createElementBlock(
  9272. vue.Fragment,
  9273. { key: 0 },
  9274. [
  9275. vue.createVNode(_component_uni_icons, {
  9276. color: "#666",
  9277. size: "24",
  9278. type: "left"
  9279. }),
  9280. vue.createTextVNode(
  9281. " " + vue.toDisplayString(_ctx.$t("LastPage")),
  9282. 1
  9283. /* TEXT */
  9284. )
  9285. ],
  9286. 64
  9287. /* STABLE_FRAGMENT */
  9288. )) : (vue.openBlock(), vue.createElementBlock(
  9289. "text",
  9290. {
  9291. key: 1,
  9292. class: "uni-pagination__child-btn"
  9293. },
  9294. vue.toDisplayString($options.prevPageText),
  9295. 1
  9296. /* TEXT */
  9297. ))
  9298. ], 10, ["hover-class"]),
  9299. vue.createElementVNode("view", { class: "uni-pagination__num uni-pagination__num-flex-none" }, [
  9300. vue.createElementVNode("view", { class: "uni-pagination__num-current" }, [
  9301. vue.createElementVNode(
  9302. "text",
  9303. { class: "uni-pagination__num-current-text is-pc-hide current-index-text" },
  9304. vue.toDisplayString($data.currentIndex),
  9305. 1
  9306. /* TEXT */
  9307. ),
  9308. vue.createElementVNode(
  9309. "text",
  9310. { class: "uni-pagination__num-current-text is-pc-hide" },
  9311. "/" + vue.toDisplayString($options.maxPage || 0),
  9312. 1
  9313. /* TEXT */
  9314. ),
  9315. (vue.openBlock(true), vue.createElementBlock(
  9316. vue.Fragment,
  9317. null,
  9318. vue.renderList($options.paper, (item, index) => {
  9319. return vue.openBlock(), vue.createElementBlock("view", {
  9320. key: index,
  9321. class: vue.normalizeClass([{ "page--active": item === $data.currentIndex }, "uni-pagination__num-tag tag--active is-phone-hide"]),
  9322. onClick: ($event) => $options.selectPage(item, index)
  9323. }, [
  9324. vue.createElementVNode(
  9325. "view",
  9326. { class: "uni-pagination__num-tagwight" },
  9327. vue.toDisplayString(item),
  9328. 1
  9329. /* TEXT */
  9330. )
  9331. ], 10, ["onClick"]);
  9332. }),
  9333. 128
  9334. /* KEYED_FRAGMENT */
  9335. ))
  9336. ])
  9337. ]),
  9338. vue.createElementVNode("view", {
  9339. class: vue.normalizeClass(["uni-pagination__btn", $data.currentIndex >= $options.maxPage ? "uni-pagination--disabled" : "uni-pagination--enabled"]),
  9340. "hover-class": $data.currentIndex === $options.maxPage ? "" : "uni-pagination--hover",
  9341. "hover-start-time": 20,
  9342. "hover-stay-time": 70,
  9343. onClick: _cache[4] || (_cache[4] = (...args) => $options.clickRight && $options.clickRight(...args))
  9344. }, [
  9345. $props.showIcon === true || $props.showIcon === "true" ? (vue.openBlock(), vue.createElementBlock(
  9346. vue.Fragment,
  9347. { key: 0 },
  9348. [
  9349. vue.createTextVNode(
  9350. vue.toDisplayString(_ctx.$t("NextPage")) + " ",
  9351. 1
  9352. /* TEXT */
  9353. ),
  9354. vue.createVNode(_component_uni_icons, {
  9355. color: "#666",
  9356. size: "24",
  9357. type: "right"
  9358. })
  9359. ],
  9360. 64
  9361. /* STABLE_FRAGMENT */
  9362. )) : (vue.openBlock(), vue.createElementBlock(
  9363. "text",
  9364. {
  9365. key: 1,
  9366. class: "uni-pagination__child-btn"
  9367. },
  9368. vue.toDisplayString($options.nextPageText),
  9369. 1
  9370. /* TEXT */
  9371. ))
  9372. ], 10, ["hover-class"])
  9373. ])
  9374. ]);
  9375. }
  9376. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-88b7506d"], ["__file", "D:/project/esswisdom_ipad/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue"]]);
  9377. const _imports_2$1 = "/static/Return.png";
  9378. const _sfc_main$6 = {
  9379. data() {
  9380. return {
  9381. current: 1,
  9382. total: 0,
  9383. pageSize: 10,
  9384. faulttaps: "实时",
  9385. faultsList: []
  9386. };
  9387. },
  9388. onLoad() {
  9389. this.faulttaps = this.$store.state.event;
  9390. this.onfaultsList();
  9391. },
  9392. computed: {
  9393. // 使用 mapState 映射多个状态到组件的计算属性
  9394. ...mapState(["formattedTime", "status", "event"])
  9395. },
  9396. beforeUnmount() {
  9397. },
  9398. methods: {
  9399. onfaultsList() {
  9400. let data = {
  9401. page: this.current,
  9402. rows: this.pageSize,
  9403. device: "",
  9404. starttime: "",
  9405. endtime: "",
  9406. rt: 0,
  9407. type: this.faulttaps
  9408. };
  9409. getfaultsList(data).then((res) => {
  9410. formatAppLog("log", "at pages/details/index.vue:165", res);
  9411. if (res.status == "ok") {
  9412. this.faultsList = res.data.list;
  9413. this.total = res.data.pagination.total;
  9414. }
  9415. });
  9416. },
  9417. onclick() {
  9418. uni.redirectTo({
  9419. url: "/pages/index/index"
  9420. });
  9421. },
  9422. onReturn() {
  9423. uni.redirectTo({
  9424. url: "/pages/faultlist/index"
  9425. });
  9426. },
  9427. change(e2) {
  9428. formatAppLog("log", "at pages/details/index.vue:188", e2);
  9429. this.current = e2.current;
  9430. this.onfaultsList();
  9431. },
  9432. // taps(e) {
  9433. // this.faulttaps = e
  9434. // this.current = 1
  9435. // __f__('log','at pages/details/index.vue:195',e);
  9436. // this.onfaultsList()
  9437. // },
  9438. // 文字提示
  9439. closedevice() {
  9440. for (let i2 = 1; i2 < this.total; i2++) {
  9441. this.$refs["device" + i2].close();
  9442. }
  9443. },
  9444. close() {
  9445. for (let i2 = 1; i2 < this.total; i2++) {
  9446. this.$refs["tooltip" + i2].close();
  9447. }
  9448. }
  9449. }
  9450. };
  9451. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  9452. const _component_zb_tooltip = resolveEasycom(vue.resolveDynamicComponent("zb-tooltip"), __easycom_0);
  9453. const _component_uni_pagination = resolveEasycom(vue.resolveDynamicComponent("uni-pagination"), __easycom_1);
  9454. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  9455. vue.createElementVNode("view", { class: "top" }, [
  9456. vue.createElementVNode("image", {
  9457. class: "top_logo",
  9458. src: _imports_0,
  9459. mode: ""
  9460. }),
  9461. vue.createCommentVNode(' <image class="tite" src="../../static/tite.png" mode=""></image> '),
  9462. vue.createElementVNode(
  9463. "view",
  9464. { class: "tite" },
  9465. vue.toDisplayString(_ctx.$t("MainTitle")),
  9466. 1
  9467. /* TEXT */
  9468. ),
  9469. vue.createElementVNode("view", { class: "time" }, [
  9470. vue.createElementVNode(
  9471. "view",
  9472. { class: "time_top" },
  9473. vue.toDisplayString(_ctx.formattedTime),
  9474. 1
  9475. /* TEXT */
  9476. ),
  9477. vue.createElementVNode("view", { class: "time_bottom" }, [
  9478. vue.createElementVNode("view"),
  9479. vue.createElementVNode("view", { class: "time_bottom1" }, [
  9480. vue.createTextVNode(
  9481. vue.toDisplayString(_ctx.$t("status")) + " ",
  9482. 1
  9483. /* TEXT */
  9484. ),
  9485. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  9486. "view",
  9487. {
  9488. key: 0,
  9489. class: "time_state"
  9490. },
  9491. vue.toDisplayString(_ctx.$t("online")),
  9492. 1
  9493. /* TEXT */
  9494. )) : (vue.openBlock(), vue.createElementBlock(
  9495. "view",
  9496. {
  9497. key: 1,
  9498. class: "time_state1"
  9499. },
  9500. vue.toDisplayString(_ctx.$t("offline")),
  9501. 1
  9502. /* TEXT */
  9503. ))
  9504. ])
  9505. ])
  9506. ])
  9507. ]),
  9508. vue.createElementVNode("view", { class: "parameter" }, [
  9509. vue.createElementVNode("view", { class: "parameter_xian" }, [
  9510. vue.createElementVNode(
  9511. "view",
  9512. { class: "parameter_xian1" },
  9513. vue.toDisplayString(_ctx.$t("formNO")),
  9514. 1
  9515. /* TEXT */
  9516. ),
  9517. vue.createElementVNode(
  9518. "view",
  9519. { class: "parameter_xian2" },
  9520. vue.toDisplayString(_ctx.$t("formUnit")),
  9521. 1
  9522. /* TEXT */
  9523. ),
  9524. vue.createElementVNode(
  9525. "view",
  9526. { class: "parameter_xian3" },
  9527. vue.toDisplayString(_ctx.$t("formDescription")),
  9528. 1
  9529. /* TEXT */
  9530. ),
  9531. vue.createElementVNode(
  9532. "view",
  9533. { class: "parameter_xian4" },
  9534. vue.toDisplayString(_ctx.$t("formFailure")),
  9535. 1
  9536. /* TEXT */
  9537. ),
  9538. vue.createCommentVNode(' <view class="parameter_xian5">\r\n 发生时间\r\n </view> '),
  9539. _ctx.event != "事件" ? (vue.openBlock(), vue.createElementBlock(
  9540. "view",
  9541. {
  9542. key: 0,
  9543. class: "parameter_xian6"
  9544. },
  9545. vue.toDisplayString(_ctx.$t("formRecover")),
  9546. 1
  9547. /* TEXT */
  9548. )) : vue.createCommentVNode("v-if", true)
  9549. ]),
  9550. vue.createElementVNode("view", { class: "parameter_box" }, [
  9551. (vue.openBlock(true), vue.createElementBlock(
  9552. vue.Fragment,
  9553. null,
  9554. vue.renderList($data.faultsList, (item, index) => {
  9555. return vue.openBlock(), vue.createElementBlock(
  9556. "view",
  9557. {
  9558. class: vue.normalizeClass(item.RESETTIME == "" && _ctx.event != "事件" ? "parameter_divred" : "parameter_div"),
  9559. key: index
  9560. },
  9561. [
  9562. vue.createElementVNode(
  9563. "view",
  9564. { class: "parameter_xian1" },
  9565. vue.toDisplayString(item.ID),
  9566. 1
  9567. /* TEXT */
  9568. ),
  9569. vue.createCommentVNode(' <view class="parameter_xian2">\r\n {{item.TYPE}}\r\n </view> '),
  9570. vue.createVNode(_component_zb_tooltip, {
  9571. onClick: $options.close,
  9572. content: item.DEVICE,
  9573. placement: "top",
  9574. ref_for: true,
  9575. ref: "tooltip" + index
  9576. }, {
  9577. default: vue.withCtx(() => [
  9578. vue.createElementVNode(
  9579. "view",
  9580. { class: "parameter_xian4" },
  9581. vue.toDisplayString(item.DEVICE),
  9582. 1
  9583. /* TEXT */
  9584. )
  9585. ]),
  9586. _: 2
  9587. /* DYNAMIC */
  9588. }, 1032, ["onClick", "content"]),
  9589. vue.createVNode(_component_zb_tooltip, {
  9590. onClick: $options.closedevice,
  9591. content: item.CONTENT,
  9592. placement: "top",
  9593. ref_for: true,
  9594. ref: "device" + index
  9595. }, {
  9596. default: vue.withCtx(() => [
  9597. vue.createElementVNode(
  9598. "view",
  9599. { class: "parameter_xian3" },
  9600. vue.toDisplayString(item.CONTENT),
  9601. 1
  9602. /* TEXT */
  9603. )
  9604. ]),
  9605. _: 2
  9606. /* DYNAMIC */
  9607. }, 1032, ["onClick", "content"]),
  9608. vue.createElementVNode(
  9609. "view",
  9610. { class: "parameter_xian5" },
  9611. vue.toDisplayString(item.FAULTTIME.substring(0, 19)),
  9612. 1
  9613. /* TEXT */
  9614. ),
  9615. _ctx.event != "事件" ? (vue.openBlock(), vue.createElementBlock(
  9616. "view",
  9617. {
  9618. key: 0,
  9619. class: "parameter_xian6"
  9620. },
  9621. vue.toDisplayString(item.RESETTIME.substring(0, 19)),
  9622. 1
  9623. /* TEXT */
  9624. )) : vue.createCommentVNode("v-if", true)
  9625. ],
  9626. 2
  9627. /* CLASS */
  9628. );
  9629. }),
  9630. 128
  9631. /* KEYED_FRAGMENT */
  9632. ))
  9633. ]),
  9634. vue.createElementVNode("view", { class: "parameter_bottom" }, [
  9635. vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [
  9636. vue.createElementVNode("view", {
  9637. class: "parameter_bottom1",
  9638. onClick: _cache[0] || (_cache[0] = (...args) => $options.onclick && $options.onclick(...args))
  9639. }, [
  9640. vue.createElementVNode("image", {
  9641. src: _imports_1$1,
  9642. mode: ""
  9643. }),
  9644. vue.createElementVNode(
  9645. "text",
  9646. { class: "parameter_bottom2" },
  9647. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  9648. 1
  9649. /* TEXT */
  9650. )
  9651. ]),
  9652. vue.createElementVNode("view", {
  9653. class: "parameter_bottom11",
  9654. onClick: _cache[1] || (_cache[1] = (...args) => $options.onReturn && $options.onReturn(...args))
  9655. }, [
  9656. vue.createElementVNode("image", {
  9657. src: _imports_2$1,
  9658. mode: ""
  9659. }),
  9660. vue.createElementVNode(
  9661. "text",
  9662. { class: "parameter_bottom2" },
  9663. vue.toDisplayString(_ctx.$t("Return")),
  9664. 1
  9665. /* TEXT */
  9666. )
  9667. ])
  9668. ]),
  9669. vue.createCommentVNode(` <view class="parameter_bottom3">\r
  9670. <view :class="faulttaps=='实时'?'parameter_bottom31':'parameter_bottom32'" @click="taps('实时')">\r
  9671. 实时\r
  9672. </view>\r
  9673. \r
  9674. <view v-if="event=='故障'" :class="faulttaps=='故障'?'parameter_bottom31':'parameter_bottom32'" @click="taps('故障')">\r
  9675. 故障\r
  9676. </view>\r
  9677. <view v-if="event=='告警'" :class="faulttaps=='告警'?'parameter_bottom31':'parameter_bottom32'" @click="taps('告警')">\r
  9678. 告警\r
  9679. </view>\r
  9680. <view v-if="event=='事件'" :class="faulttaps=='事件'?'parameter_bottom31':'parameter_bottom32'" @click="taps('事件')">\r
  9681. 事件\r
  9682. </view>\r
  9683. </view> `),
  9684. vue.createElementVNode("view", { class: "parameter_bottom4" }, [
  9685. vue.createElementVNode(
  9686. "view",
  9687. { class: "eliminate" },
  9688. vue.toDisplayString(_ctx.$t("FaultClearing")),
  9689. 1
  9690. /* TEXT */
  9691. ),
  9692. vue.createVNode(_component_uni_pagination, {
  9693. total: $data.total,
  9694. current: $data.current,
  9695. title: "标题文字",
  9696. "show-icon": true,
  9697. onChange: $options.change
  9698. }, null, 8, ["total", "current", "onChange"])
  9699. ])
  9700. ])
  9701. ])
  9702. ]);
  9703. }
  9704. const PagesDetailsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-a45dfdea"], ["__file", "D:/project/esswisdom_ipad/pages/details/index.vue"]]);
  9705. const _imports_3$2 = "/static/fang.png";
  9706. const _sfc_main$5 = {
  9707. components: {
  9708. cmdProgress: __easycom_0$1
  9709. },
  9710. data() {
  9711. return {
  9712. successtype: "success",
  9713. confirmText: "确认启动",
  9714. title: "你确定要开启该设备吗?",
  9715. content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
  9716. value: "",
  9717. modeinput: "",
  9718. segmented: 1,
  9719. uidatas: "",
  9720. formatTimeid: "",
  9721. faultsdata: [],
  9722. messageText: ""
  9723. };
  9724. },
  9725. onLoad() {
  9726. this.confirmText = this.$t("ConfirmStart");
  9727. this.title = this.$t("popUpTitle");
  9728. this.content = this.$t("popUpContent");
  9729. },
  9730. computed: {
  9731. // 使用 mapState 映射多个状态到组件的计算属性
  9732. ...mapState(["formattedTime", "status"]),
  9733. ...mapState({
  9734. uidatasdata: (state2) => state2.uidatasdata
  9735. })
  9736. },
  9737. mounted() {
  9738. this.onfaultsdata();
  9739. },
  9740. beforeUnmount() {
  9741. },
  9742. methods: {
  9743. onfaultsdata() {
  9744. let data = {
  9745. page: 1,
  9746. rows: 10,
  9747. device: "",
  9748. starttime: "",
  9749. endtime: "",
  9750. rt: 0,
  9751. type: "故障"
  9752. };
  9753. getfaultsList(data).then((res) => {
  9754. formatAppLog("log", "at pages/electricity/index.vue:634", res);
  9755. if (res.status == "ok") {
  9756. this.faultsdata = res.data.list;
  9757. }
  9758. });
  9759. },
  9760. // 返回首页
  9761. onreturn() {
  9762. uni.redirectTo({
  9763. url: "/pages/index/index"
  9764. });
  9765. },
  9766. // 启动设备弹窗
  9767. dialogToggle() {
  9768. this.modeinput = "base";
  9769. this.successtype = "success";
  9770. this.confirmText = this.$t("ConfirmStart");
  9771. this.title = this.$t("popUpTitle");
  9772. this.content = this.$t("popUpContent");
  9773. this.$refs.alertDialog.open();
  9774. },
  9775. onstopit() {
  9776. this.modeinput = "base";
  9777. this.successtype = "error";
  9778. this.confirmText = this.$t("ConfirmStop");
  9779. this.title = this.$t("popUpTitleStop");
  9780. this.content = this.$t("popUpContentStop");
  9781. this.$refs.alertDialog.open();
  9782. },
  9783. // 确认弹窗
  9784. dialogConfirm() {
  9785. let uidatasdata = this.$store.state.uidatasdata;
  9786. let data = {
  9787. id: "c35c4db0-113f-442a-9e26-728489265fdb",
  9788. issaveinitvalue: false,
  9789. value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0"
  9790. };
  9791. if (this.confirmText == this.$t("ConfirmStart")) {
  9792. if (uidatasdata.AC_In_380V_63A1_Status == 0 || uidatasdata.AC_In_380V_63A2_Status == 0) {
  9793. this.messageText = this.$t("ACpowerSupplytext");
  9794. this.$refs.message.open();
  9795. return;
  9796. }
  9797. }
  9798. control(data).then((data2) => {
  9799. if (data2.status == "ok") {
  9800. this.$refs.alertDialog.close();
  9801. uni.showToast({
  9802. title: this.$t("OperationSuccessful"),
  9803. icon: "none",
  9804. duration: 2e3
  9805. // 显示时长,单位为毫秒
  9806. });
  9807. } else {
  9808. this.$refs.alertDialog.close();
  9809. uni.showToast({
  9810. title: this.$t("operationFailed"),
  9811. icon: "none",
  9812. // 使用 'none' 图标来表示失败
  9813. duration: 2e3
  9814. // 显示时长,单位为毫秒
  9815. });
  9816. }
  9817. });
  9818. },
  9819. dialogClose() {
  9820. formatAppLog("log", "at pages/electricity/index.vue:706", this.value);
  9821. this.$refs.alertDialog.close();
  9822. },
  9823. ontap(e2) {
  9824. formatAppLog("log", "at pages/electricity/index.vue:710", e2);
  9825. this.segmented = e2;
  9826. }
  9827. }
  9828. };
  9829. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  9830. const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
  9831. const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
  9832. const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
  9833. const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3);
  9834. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  9835. vue.createElementVNode("view", { class: "top" }, [
  9836. vue.createElementVNode("image", {
  9837. class: "top_logo",
  9838. src: _imports_0,
  9839. mode: ""
  9840. }),
  9841. vue.createElementVNode(
  9842. "view",
  9843. { class: "tite" },
  9844. vue.toDisplayString(_ctx.$t("MainTitle")),
  9845. 1
  9846. /* TEXT */
  9847. ),
  9848. vue.createElementVNode("view", { class: "time" }, [
  9849. vue.createElementVNode(
  9850. "view",
  9851. { class: "time_top" },
  9852. vue.toDisplayString(_ctx.formattedTime),
  9853. 1
  9854. /* TEXT */
  9855. ),
  9856. vue.createElementVNode("view", { class: "time_bottom" }, [
  9857. vue.createElementVNode("view"),
  9858. vue.createElementVNode("view", { class: "time_bottom1" }, [
  9859. vue.createTextVNode(
  9860. vue.toDisplayString(_ctx.$t("status")) + " ",
  9861. 1
  9862. /* TEXT */
  9863. ),
  9864. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  9865. "view",
  9866. {
  9867. key: 0,
  9868. class: "time_state"
  9869. },
  9870. vue.toDisplayString(_ctx.$t("online")),
  9871. 1
  9872. /* TEXT */
  9873. )) : (vue.openBlock(), vue.createElementBlock(
  9874. "view",
  9875. {
  9876. key: 1,
  9877. class: "time_state1"
  9878. },
  9879. vue.toDisplayString(_ctx.$t("offline")),
  9880. 1
  9881. /* TEXT */
  9882. ))
  9883. ])
  9884. ])
  9885. ])
  9886. ]),
  9887. vue.createElementVNode("view", { class: "parameter" }, [
  9888. vue.createElementVNode("view", { class: "parameter_left" }, [
  9889. vue.createElementVNode("view", { class: "parameter_left1" }, [
  9890. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
  9891. vue.createVNode(_component_cmd_progress, {
  9892. type: "dashboard",
  9893. percent: _ctx.uidatasdata.SOC ?? 0,
  9894. "stroke-color": "#B0D0FF",
  9895. "stroke-width": 6,
  9896. width: 180,
  9897. "stroke-shape": "square",
  9898. showInfo: false
  9899. }, null, 8, ["percent"]),
  9900. vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
  9901. vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
  9902. vue.createTextVNode(
  9903. vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
  9904. 1
  9905. /* TEXT */
  9906. ),
  9907. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
  9908. ]),
  9909. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
  9910. ]),
  9911. vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
  9912. vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
  9913. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
  9914. vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
  9915. ])
  9916. ])
  9917. ]),
  9918. vue.createCommentVNode(' <jerry-gauge></jerry-gauge>\r\n <view class="parameter_canvas">\r\n <view class="parameter_canvas1">\r\n 0\r\n </view>\r\n <view class="parameter_canvas2">\r\n 100%\r\n </view>\r\n </view> ')
  9919. ]),
  9920. vue.createElementVNode("image", {
  9921. class: "parameter_leftdian1",
  9922. src: _imports_1$2,
  9923. alt: ""
  9924. }),
  9925. vue.createElementVNode("view", { class: "parameter_lef2" }, [
  9926. vue.createElementVNode("image", {
  9927. src: _imports_2$2,
  9928. mode: ""
  9929. })
  9930. ]),
  9931. vue.createElementVNode("image", {
  9932. class: "parameter_leftche1",
  9933. src: _imports_3$2,
  9934. mode: ""
  9935. }),
  9936. vue.createElementVNode(
  9937. "view",
  9938. { class: "parameter_leftview" },
  9939. vue.toDisplayString(_ctx.$t("CommunicationSupplyOutput")),
  9940. 1
  9941. /* TEXT */
  9942. )
  9943. ]),
  9944. vue.createElementVNode("view", { class: "parameter_right" }, [
  9945. vue.createElementVNode("view", { class: "parameter_righttop" }, [
  9946. vue.createElementVNode("view", { class: "parameter_1" }, [
  9947. vue.createElementVNode("view", { class: "parameter_2" }, [
  9948. vue.createElementVNode("view", { class: "parameter_31" }, [
  9949. vue.createElementVNode("view", { class: "parameter_4" }, [
  9950. _ctx.uidatasdata.AC_Out_380V_125A_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  9951. key: 0,
  9952. src: _imports_4$2,
  9953. mode: ""
  9954. })) : (vue.openBlock(), vue.createElementBlock("image", {
  9955. key: 1,
  9956. src: _imports_5,
  9957. mode: ""
  9958. })),
  9959. vue.createTextVNode(
  9960. " " + vue.toDisplayString(_ctx.$t("state125A")),
  9961. 1
  9962. /* TEXT */
  9963. )
  9964. ]),
  9965. _ctx.uidatasdata.AC_Out_380V_125A_Status == 0 ? (vue.openBlock(), vue.createElementBlock(
  9966. "view",
  9967. {
  9968. key: 0,
  9969. class: "parameter_51"
  9970. },
  9971. vue.toDisplayString(_ctx.$t("connect")),
  9972. 1
  9973. /* TEXT */
  9974. )) : (vue.openBlock(), vue.createElementBlock(
  9975. "view",
  9976. {
  9977. key: 1,
  9978. class: "parameter_5"
  9979. },
  9980. vue.toDisplayString(_ctx.$t("breakoff")),
  9981. 1
  9982. /* TEXT */
  9983. ))
  9984. ]),
  9985. vue.createElementVNode("view", { class: "parameter_31" }, [
  9986. vue.createElementVNode("view", { class: "parameter_4" }, [
  9987. _ctx.uidatasdata.AC_Out_380V_63A_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  9988. key: 0,
  9989. src: _imports_4$2,
  9990. mode: ""
  9991. })) : (vue.openBlock(), vue.createElementBlock("image", {
  9992. key: 1,
  9993. src: _imports_5,
  9994. mode: ""
  9995. })),
  9996. vue.createTextVNode(
  9997. " " + vue.toDisplayString(_ctx.$t("state63A")),
  9998. 1
  9999. /* TEXT */
  10000. )
  10001. ]),
  10002. _ctx.uidatasdata.AC_Out_380V_63A_Status == 0 ? (vue.openBlock(), vue.createElementBlock(
  10003. "view",
  10004. {
  10005. key: 0,
  10006. class: "parameter_51"
  10007. },
  10008. vue.toDisplayString(_ctx.$t("connect")),
  10009. 1
  10010. /* TEXT */
  10011. )) : (vue.openBlock(), vue.createElementBlock(
  10012. "view",
  10013. {
  10014. key: 1,
  10015. class: "parameter_5"
  10016. },
  10017. vue.toDisplayString(_ctx.$t("breakoff")),
  10018. 1
  10019. /* TEXT */
  10020. ))
  10021. ]),
  10022. vue.createElementVNode("view", { class: "parameter_31" }, [
  10023. vue.createElementVNode("view", { class: "parameter_4" }, [
  10024. _ctx.uidatasdata.AC_Out_220V_16A_Status == 0 ? (vue.openBlock(), vue.createElementBlock("image", {
  10025. key: 0,
  10026. src: _imports_4$2,
  10027. mode: ""
  10028. })) : (vue.openBlock(), vue.createElementBlock("image", {
  10029. key: 1,
  10030. src: _imports_5,
  10031. mode: ""
  10032. })),
  10033. vue.createTextVNode(
  10034. " " + vue.toDisplayString(_ctx.$t("state16A")),
  10035. 1
  10036. /* TEXT */
  10037. )
  10038. ]),
  10039. _ctx.uidatasdata.AC_Out_220V_16A_Status == 0 ? (vue.openBlock(), vue.createElementBlock(
  10040. "view",
  10041. {
  10042. key: 0,
  10043. class: "parameter_51"
  10044. },
  10045. vue.toDisplayString(_ctx.$t("connect")),
  10046. 1
  10047. /* TEXT */
  10048. )) : (vue.openBlock(), vue.createElementBlock(
  10049. "view",
  10050. {
  10051. key: 1,
  10052. class: "parameter_5"
  10053. },
  10054. vue.toDisplayString(_ctx.$t("breakoff")),
  10055. 1
  10056. /* TEXT */
  10057. ))
  10058. ])
  10059. ]),
  10060. vue.createElementVNode("view", { class: "parameter_SOC" }, [
  10061. vue.createElementVNode("image", {
  10062. src: _imports_6,
  10063. mode: ""
  10064. }),
  10065. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  10066. vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
  10067. vue.createElementVNode("view", null, [
  10068. vue.createElementVNode(
  10069. "text",
  10070. { class: "parameter_SOCright2" },
  10071. vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
  10072. 1
  10073. /* TEXT */
  10074. ),
  10075. vue.createElementVNode("text", null, " %")
  10076. ])
  10077. ])
  10078. ]),
  10079. vue.createElementVNode("view", { class: "parameter_Battery" }, [
  10080. vue.createElementVNode("image", {
  10081. src: _imports_7,
  10082. mode: ""
  10083. }),
  10084. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  10085. vue.createElementVNode(
  10086. "view",
  10087. { class: "parameter_SOCright1" },
  10088. vue.toDisplayString(_ctx.$t("BatteryStatus")),
  10089. 1
  10090. /* TEXT */
  10091. ),
  10092. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  10093. _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
  10094. "view",
  10095. { key: 0 },
  10096. vue.toDisplayString(_ctx.$t("fault")),
  10097. 1
  10098. /* TEXT */
  10099. )) : _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock(
  10100. "view",
  10101. { key: 1 },
  10102. vue.toDisplayString(_ctx.$t("ChuShiHua")),
  10103. 1
  10104. /* TEXT */
  10105. )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
  10106. "view",
  10107. { key: 2 },
  10108. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  10109. 1
  10110. /* TEXT */
  10111. )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock(
  10112. "view",
  10113. { key: 3 },
  10114. vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
  10115. 1
  10116. /* TEXT */
  10117. )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
  10118. "view",
  10119. { key: 4 },
  10120. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  10121. 1
  10122. /* TEXT */
  10123. )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock(
  10124. "view",
  10125. { key: 5 },
  10126. vue.toDisplayString(_ctx.$t("Underhighpressure")),
  10127. 1
  10128. /* TEXT */
  10129. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")),
  10130. vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} ")
  10131. ])
  10132. ])
  10133. ]),
  10134. vue.createElementVNode("view", { class: "parameter_state" }, [
  10135. vue.createElementVNode("image", {
  10136. src: _imports_8,
  10137. mode: ""
  10138. }),
  10139. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  10140. vue.createElementVNode(
  10141. "view",
  10142. { class: "parameter_SOCright1" },
  10143. vue.toDisplayString(_ctx.$t("SystemStatus")),
  10144. 1
  10145. /* TEXT */
  10146. ),
  10147. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  10148. vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
  10149. _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock(
  10150. "view",
  10151. { key: 0 },
  10152. vue.toDisplayString(_ctx.$t("uncharged")),
  10153. 1
  10154. /* TEXT */
  10155. )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock(
  10156. "view",
  10157. { key: 1 },
  10158. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  10159. 1
  10160. /* TEXT */
  10161. )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock(
  10162. "view",
  10163. { key: 2 },
  10164. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  10165. 1
  10166. /* TEXT */
  10167. )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock(
  10168. "view",
  10169. { key: 3 },
  10170. vue.toDisplayString(_ctx.$t("full")),
  10171. 1
  10172. /* TEXT */
  10173. )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock(
  10174. "view",
  10175. { key: 4 },
  10176. vue.toDisplayString(_ctx.$t("retain")),
  10177. 1
  10178. /* TEXT */
  10179. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — "))
  10180. ])
  10181. ])
  10182. ])
  10183. ])
  10184. ]),
  10185. vue.createElementVNode("view", { class: "parameter_tap" }, [
  10186. vue.createElementVNode(
  10187. "view",
  10188. {
  10189. class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
  10190. onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
  10191. },
  10192. vue.toDisplayString(_ctx.$t("exchangeinformation")),
  10193. 3
  10194. /* TEXT, CLASS */
  10195. ),
  10196. vue.createElementVNode(
  10197. "view",
  10198. {
  10199. class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"),
  10200. onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2))
  10201. },
  10202. vue.toDisplayString(_ctx.$t("Batteryinformation")),
  10203. 3
  10204. /* TEXT, CLASS */
  10205. ),
  10206. vue.createElementVNode(
  10207. "view",
  10208. {
  10209. class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
  10210. onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3))
  10211. },
  10212. vue.toDisplayString(_ctx.$t("statisticalinformation")),
  10213. 3
  10214. /* TEXT, CLASS */
  10215. ),
  10216. vue.createElementVNode(
  10217. "view",
  10218. {
  10219. class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"),
  10220. onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(4))
  10221. },
  10222. vue.toDisplayString(_ctx.$t("coolinginformation")),
  10223. 3
  10224. /* TEXT, CLASS */
  10225. )
  10226. ]),
  10227. vue.createElementVNode("view", { class: "parameter_zheng" }, [
  10228. $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10229. key: 0,
  10230. class: "parameter_box"
  10231. }, [
  10232. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  10233. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10234. vue.createElementVNode(
  10235. "view",
  10236. { class: "parameter_zheng12" },
  10237. vue.toDisplayString(_ctx.$t("PhaseVoltageAV")),
  10238. 1
  10239. /* TEXT */
  10240. ),
  10241. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10242. vue.createTextVNode(
  10243. vue.toDisplayString(_ctx.uidatasdata.PCSPortAPhaseVoltage ?? "—") + " ",
  10244. 1
  10245. /* TEXT */
  10246. ),
  10247. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10248. ])
  10249. ]),
  10250. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10251. vue.createElementVNode(
  10252. "view",
  10253. { class: "parameter_zheng12" },
  10254. vue.toDisplayString(_ctx.$t("PhaseVoltageBV")),
  10255. 1
  10256. /* TEXT */
  10257. ),
  10258. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10259. vue.createTextVNode(
  10260. vue.toDisplayString(_ctx.uidatasdata.PCSPortBPhaseVoltage ?? "—") + " ",
  10261. 1
  10262. /* TEXT */
  10263. ),
  10264. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10265. ])
  10266. ]),
  10267. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10268. vue.createElementVNode(
  10269. "view",
  10270. { class: "parameter_zheng12" },
  10271. vue.toDisplayString(_ctx.$t("PhaseVoltageCV")),
  10272. 1
  10273. /* TEXT */
  10274. ),
  10275. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10276. vue.createTextVNode(
  10277. vue.toDisplayString(_ctx.uidatasdata.PCSPortCPhaseVoltage ?? "—") + " ",
  10278. 1
  10279. /* TEXT */
  10280. ),
  10281. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10282. ])
  10283. ]),
  10284. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10285. vue.createElementVNode(
  10286. "view",
  10287. { class: "parameter_zheng12" },
  10288. vue.toDisplayString(_ctx.$t("DischargePower")),
  10289. 1
  10290. /* TEXT */
  10291. ),
  10292. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10293. vue.createTextVNode(
  10294. vue.toDisplayString(_ctx.uidatasdata.PCSTotalOutputPower ?? "—") + " ",
  10295. 1
  10296. /* TEXT */
  10297. ),
  10298. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  10299. ])
  10300. ])
  10301. ]),
  10302. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  10303. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10304. vue.createElementVNode(
  10305. "view",
  10306. { class: "parameter_zheng12" },
  10307. vue.toDisplayString(_ctx.$t("PhaseVoltageAA")),
  10308. 1
  10309. /* TEXT */
  10310. ),
  10311. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10312. vue.createTextVNode(
  10313. vue.toDisplayString(_ctx.uidatasdata["PCSOutputA-phaseCurrent"] ?? "—") + " ",
  10314. 1
  10315. /* TEXT */
  10316. ),
  10317. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  10318. ])
  10319. ]),
  10320. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10321. vue.createElementVNode(
  10322. "view",
  10323. { class: "parameter_zheng12" },
  10324. vue.toDisplayString(_ctx.$t("PhaseVoltageBA")),
  10325. 1
  10326. /* TEXT */
  10327. ),
  10328. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10329. vue.createTextVNode(
  10330. vue.toDisplayString(_ctx.uidatasdata["PCSOutputB-phaseCurrent"] ?? "—") + " ",
  10331. 1
  10332. /* TEXT */
  10333. ),
  10334. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  10335. ])
  10336. ]),
  10337. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10338. vue.createElementVNode(
  10339. "view",
  10340. { class: "parameter_zheng12" },
  10341. vue.toDisplayString(_ctx.$t("PhaseVoltageCA")),
  10342. 1
  10343. /* TEXT */
  10344. ),
  10345. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10346. vue.createTextVNode(
  10347. vue.toDisplayString(_ctx.uidatasdata["PCSOutputC-phaseCurrent"] ?? "—"),
  10348. 1
  10349. /* TEXT */
  10350. ),
  10351. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  10352. ])
  10353. ]),
  10354. vue.createElementVNode("view", {
  10355. class: "parameter_zheng11",
  10356. style: { "height": "30px" }
  10357. }, [
  10358. vue.createElementVNode("view", { class: "parameter_zheng12" }, [
  10359. vue.createCommentVNode(" {{$t('DischargeCapacity')}} ")
  10360. ]),
  10361. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  10362. {{uidatasdata.PCSACDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text>\r
  10363. </view> `)
  10364. ])
  10365. ])
  10366. ])) : vue.createCommentVNode("v-if", true),
  10367. $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  10368. key: 1,
  10369. class: "parameter_box"
  10370. }, [
  10371. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  10372. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  10373. <view class="parameter_zheng12">\r
  10374. {{$t('Batterypower')}}\r
  10375. </view>\r
  10376. <view class="parameter_zheng13">\r
  10377. {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">kW</text>\r
  10378. </view>\r
  10379. </view> `),
  10380. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10381. vue.createElementVNode(
  10382. "view",
  10383. { class: "parameter_zheng12" },
  10384. vue.toDisplayString(_ctx.$t("TotalPressure")),
  10385. 1
  10386. /* TEXT */
  10387. ),
  10388. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10389. vue.createTextVNode(
  10390. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
  10391. 1
  10392. /* TEXT */
  10393. ),
  10394. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10395. ])
  10396. ]),
  10397. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10398. vue.createElementVNode(
  10399. "view",
  10400. { class: "parameter_zheng12" },
  10401. vue.toDisplayString(_ctx.$t("AllowableDischargepower")),
  10402. 1
  10403. /* TEXT */
  10404. ),
  10405. vue.createCommentVNode(" DchChgCurPowLimit_MaxDischargeCurrentLimit "),
  10406. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10407. vue.createTextVNode(
  10408. vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—") + " ",
  10409. 1
  10410. /* TEXT */
  10411. ),
  10412. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  10413. ])
  10414. ]),
  10415. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10416. vue.createElementVNode(
  10417. "view",
  10418. { class: "parameter_zheng12" },
  10419. vue.toDisplayString(_ctx.$t("MaximumVoltage")),
  10420. 1
  10421. /* TEXT */
  10422. ),
  10423. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10424. vue.createTextVNode(
  10425. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
  10426. 1
  10427. /* TEXT */
  10428. ),
  10429. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10430. ])
  10431. ]),
  10432. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10433. vue.createElementVNode(
  10434. "view",
  10435. { class: "parameter_zheng12" },
  10436. vue.toDisplayString(_ctx.$t("MaximumTemperature")),
  10437. 1
  10438. /* TEXT */
  10439. ),
  10440. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10441. vue.createTextVNode(
  10442. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
  10443. 1
  10444. /* TEXT */
  10445. ),
  10446. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  10447. ])
  10448. ])
  10449. ]),
  10450. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  10451. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10452. vue.createElementVNode(
  10453. "view",
  10454. { class: "parameter_zheng12" },
  10455. vue.toDisplayString(_ctx.$t("BatteryCurrent")),
  10456. 1
  10457. /* TEXT */
  10458. ),
  10459. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10460. vue.createTextVNode(
  10461. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
  10462. 1
  10463. /* TEXT */
  10464. ),
  10465. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  10466. ])
  10467. ]),
  10468. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  10469. <view class="parameter_zheng12">\r
  10470. {{$t('TotalExternalPressure')}}\r
  10471. </view>\r
  10472. <view class="parameter_zheng13">\r
  10473. {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
  10474. </view>\r
  10475. </view> `),
  10476. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10477. vue.createElementVNode(
  10478. "view",
  10479. { class: "parameter_zheng12" },
  10480. vue.toDisplayString(_ctx.$t("AllowDischargeCurrent")),
  10481. 1
  10482. /* TEXT */
  10483. ),
  10484. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10485. vue.createCommentVNode(" {{uidatasdata.ChargingInformation_Chg_Max_Cur??'—'}} <text "),
  10486. vue.createTextVNode(
  10487. " " + vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—") + " ",
  10488. 1
  10489. /* TEXT */
  10490. ),
  10491. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  10492. ])
  10493. ]),
  10494. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10495. vue.createElementVNode(
  10496. "view",
  10497. { class: "parameter_zheng12" },
  10498. vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
  10499. 1
  10500. /* TEXT */
  10501. ),
  10502. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10503. vue.createTextVNode(
  10504. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ",
  10505. 1
  10506. /* TEXT */
  10507. ),
  10508. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10509. ])
  10510. ]),
  10511. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10512. vue.createElementVNode(
  10513. "view",
  10514. { class: "parameter_zheng12" },
  10515. vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
  10516. 1
  10517. /* TEXT */
  10518. ),
  10519. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10520. vue.createTextVNode(
  10521. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
  10522. 1
  10523. /* TEXT */
  10524. ),
  10525. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  10526. ])
  10527. ])
  10528. ])
  10529. ])) : vue.createCommentVNode("v-if", true),
  10530. $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  10531. key: 2,
  10532. class: "parameter_box"
  10533. }, [
  10534. vue.createElementVNode("view", { class: "parameter_zheng10" }, [
  10535. vue.createCommentVNode(` <view class="parameter_zhengbox">\r
  10536. <view class="parameter_zheng12">\r
  10537. {{$t('AccumulatedChargingCapacityCommunication')}}\r
  10538. </view>\r
  10539. <view class="parameter_zhengbox13">\r
  10540. {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kW</text> <text></text>\r
  10541. </view>\r
  10542. </view>\r
  10543. <view class="parameter_zhengbox parameter_zheng101">\r
  10544. <view class="parameter_zheng12">\r
  10545. {{$t('AccumulatedDCChargingCapacity')}}\r
  10546. </view>\r
  10547. <view class="parameter_zhengbox13">\r
  10548. {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">V</text> <text></text>\r
  10549. </view>\r
  10550. </view> `),
  10551. vue.createElementVNode("view", { class: "parameter_zhengbox" }, [
  10552. vue.createElementVNode(
  10553. "view",
  10554. { class: "parameter_zheng12" },
  10555. vue.toDisplayString(_ctx.$t("RunningTimesdischarge")),
  10556. 1
  10557. /* TEXT */
  10558. ),
  10559. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  10560. vue.createTextVNode(" 0.0 "),
  10561. vue.createElementVNode(
  10562. "text",
  10563. { class: "parameter_zheng14" },
  10564. vue.toDisplayString(_ctx.$t("RunningTimesmin")),
  10565. 1
  10566. /* TEXT */
  10567. ),
  10568. vue.createTextVNode(),
  10569. vue.createElementVNode("text")
  10570. ])
  10571. ]),
  10572. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  10573. vue.createElementVNode(
  10574. "view",
  10575. { class: "parameter_zheng12" },
  10576. vue.toDisplayString(_ctx.$t("InputCapacitydischarge")),
  10577. 1
  10578. /* TEXT */
  10579. ),
  10580. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  10581. vue.createTextVNode(" 0.0 "),
  10582. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  10583. vue.createTextVNode(),
  10584. vue.createElementVNode("text")
  10585. ])
  10586. ]),
  10587. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  10588. vue.createElementVNode(
  10589. "view",
  10590. { class: "parameter_zheng12" },
  10591. vue.toDisplayString(_ctx.$t("AccumulateInputdischarge")),
  10592. 1
  10593. /* TEXT */
  10594. ),
  10595. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  10596. vue.createCommentVNode(` {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text> `),
  10597. vue.createTextVNode(" 0.0 "),
  10598. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  10599. vue.createTextVNode(),
  10600. vue.createElementVNode("text")
  10601. ])
  10602. ])
  10603. ])
  10604. ])) : vue.createCommentVNode("v-if", true),
  10605. $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  10606. key: 3,
  10607. class: "parameter_box"
  10608. }, [
  10609. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  10610. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10611. vue.createElementVNode(
  10612. "view",
  10613. { class: "parameter_zheng12" },
  10614. vue.toDisplayString(_ctx.$t("WorkingMode")),
  10615. 1
  10616. /* TEXT */
  10617. ),
  10618. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  10619. vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
  10620. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
  10621. _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
  10622. "view",
  10623. { key: 0 },
  10624. vue.toDisplayString(_ctx.$t("OffMode")),
  10625. 1
  10626. /* TEXT */
  10627. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
  10628. "view",
  10629. { key: 1 },
  10630. vue.toDisplayString(_ctx.$t("CoolingMode")),
  10631. 1
  10632. /* TEXT */
  10633. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
  10634. "view",
  10635. { key: 2 },
  10636. vue.toDisplayString(_ctx.$t("HeatingMode")),
  10637. 1
  10638. /* TEXT */
  10639. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
  10640. "view",
  10641. { key: 3 },
  10642. vue.toDisplayString(_ctx.$t("CirculatingMode")),
  10643. 1
  10644. /* TEXT */
  10645. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  10646. ])
  10647. ]),
  10648. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10649. vue.createElementVNode(
  10650. "view",
  10651. { class: "parameter_zheng12" },
  10652. vue.toDisplayString(_ctx.$t("OutletTemperature")),
  10653. 1
  10654. /* TEXT */
  10655. ),
  10656. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10657. vue.createTextVNode(
  10658. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
  10659. 1
  10660. /* TEXT */
  10661. ),
  10662. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  10663. ])
  10664. ]),
  10665. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10666. vue.createElementVNode("view", {
  10667. class: "parameter_zheng12",
  10668. style: { "height": "30px" }
  10669. }, [
  10670. vue.createCommentVNode(" {{$t('PowerDemand')}} ")
  10671. ]),
  10672. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  10673. {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text class="parameter_zheng14">kW</text>\r
  10674. </view> `)
  10675. ])
  10676. ]),
  10677. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  10678. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10679. vue.createElementVNode(
  10680. "view",
  10681. { class: "parameter_zheng12" },
  10682. vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
  10683. 1
  10684. /* TEXT */
  10685. ),
  10686. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  10687. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
  10688. _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
  10689. "view",
  10690. { key: 0 },
  10691. vue.toDisplayString(_ctx.$t("DisconnectedState")),
  10692. 1
  10693. /* TEXT */
  10694. )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
  10695. "view",
  10696. { key: 1 },
  10697. vue.toDisplayString(_ctx.$t("ClosedState")),
  10698. 1
  10699. /* TEXT */
  10700. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
  10701. ])
  10702. ]),
  10703. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10704. vue.createElementVNode(
  10705. "view",
  10706. { class: "parameter_zheng12" },
  10707. vue.toDisplayString(_ctx.$t("waterTemperature")),
  10708. 1
  10709. /* TEXT */
  10710. ),
  10711. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10712. vue.createTextVNode(
  10713. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
  10714. 1
  10715. /* TEXT */
  10716. ),
  10717. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  10718. ])
  10719. ]),
  10720. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10721. vue.createElementVNode("view", {
  10722. class: "parameter_zheng12",
  10723. style: { "height": "30px" }
  10724. }, [
  10725. vue.createCommentVNode(" {{$t('FaultLevel')}} ")
  10726. ]),
  10727. vue.createCommentVNode(` <view class="parameter_Batterystate">\r
  10728. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
  10729. \r
  10730. {{$t('NoMalfunction')}}\r
  10731. </view>\r
  10732. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
  10733. 1{{$t('LevelLault')}}\r
  10734. </view>\r
  10735. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
  10736. 2{{$t('LevelLault')}}\r
  10737. </view>\r
  10738. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
  10739. 3{{$t('LevelLault')}}\r
  10740. </view>\r
  10741. <view v-else>\r
  10742. —\r
  10743. </view>\r
  10744. </view> `)
  10745. ])
  10746. ])
  10747. ])) : vue.createCommentVNode("v-if", true),
  10748. vue.createElementVNode("view", { class: "parameter_zheng3" }, [
  10749. _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  10750. key: 0,
  10751. class: "parameter_zheng31111",
  10752. onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
  10753. }, [
  10754. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  10755. vue.createElementVNode(
  10756. "view",
  10757. { class: "parameter_zheng32" },
  10758. vue.toDisplayString(_ctx.$t("open")),
  10759. 1
  10760. /* TEXT */
  10761. )
  10762. ])
  10763. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  10764. key: 1,
  10765. class: "parameter_zheng31111"
  10766. }, [
  10767. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  10768. vue.createElementVNode(
  10769. "view",
  10770. { class: "parameter_zheng32ccc" },
  10771. vue.toDisplayString(_ctx.$t("open")),
  10772. 1
  10773. /* TEXT */
  10774. )
  10775. ])
  10776. ])),
  10777. _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10778. key: 2,
  10779. class: "parameter_zheng31111",
  10780. onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args))
  10781. }, [
  10782. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  10783. vue.createElementVNode(
  10784. "view",
  10785. { class: "parameter_zheng33" },
  10786. vue.toDisplayString(_ctx.$t("stopIt")),
  10787. 1
  10788. /* TEXT */
  10789. )
  10790. ])
  10791. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  10792. key: 3,
  10793. class: "parameter_zheng31111"
  10794. }, [
  10795. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  10796. vue.createElementVNode(
  10797. "view",
  10798. { class: "parameter_zheng32ccc" },
  10799. vue.toDisplayString(_ctx.$t("stopIt")),
  10800. 1
  10801. /* TEXT */
  10802. )
  10803. ])
  10804. ]))
  10805. ])
  10806. ]),
  10807. vue.createElementVNode("view", { class: "parameter_home" }, [
  10808. vue.createElementVNode("view", {
  10809. class: "parameter_home1",
  10810. onClick: _cache[6] || (_cache[6] = (...args) => $options.onreturn && $options.onreturn(...args))
  10811. }, [
  10812. vue.createElementVNode("image", {
  10813. src: _imports_1$1,
  10814. mode: ""
  10815. }),
  10816. vue.createElementVNode(
  10817. "text",
  10818. { class: "parameter_hometext" },
  10819. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  10820. 1
  10821. /* TEXT */
  10822. )
  10823. ]),
  10824. vue.createElementVNode("view", { class: "parameter_home2" }, [
  10825. vue.createElementVNode("image", {
  10826. src: _imports_10,
  10827. mode: ""
  10828. }),
  10829. vue.createElementVNode("swiper", {
  10830. class: "swiper",
  10831. circular: "",
  10832. autoplay: true,
  10833. interval: 2e3,
  10834. duration: 500,
  10835. vertical: true
  10836. }, [
  10837. (vue.openBlock(true), vue.createElementBlock(
  10838. vue.Fragment,
  10839. null,
  10840. vue.renderList($data.faultsdata, (item, index) => {
  10841. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
  10842. vue.createElementVNode(
  10843. "view",
  10844. { class: "parameter_home3" },
  10845. vue.toDisplayString(item["CONTENT"]),
  10846. 1
  10847. /* TEXT */
  10848. )
  10849. ]);
  10850. }),
  10851. 128
  10852. /* KEYED_FRAGMENT */
  10853. ))
  10854. ])
  10855. ])
  10856. ])
  10857. ])
  10858. ]),
  10859. vue.createVNode(
  10860. _component_uni_popup,
  10861. { ref: "alertDialog" },
  10862. {
  10863. default: vue.withCtx(() => [
  10864. vue.createVNode(_component_uni_popup_dialog, {
  10865. mode: $data.modeinput,
  10866. placeholder: "请输入内容",
  10867. modelValue: $data.value,
  10868. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.value = $event),
  10869. type: $data.successtype,
  10870. cancelText: _ctx.$t("CancelReturn"),
  10871. confirmText: $data.confirmText,
  10872. title: $data.title,
  10873. content: $data.content,
  10874. beforeClose: true,
  10875. onConfirm: $options.dialogConfirm,
  10876. onClose: $options.dialogClose
  10877. }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
  10878. ]),
  10879. _: 1
  10880. /* STABLE */
  10881. },
  10882. 512
  10883. /* NEED_PATCH */
  10884. ),
  10885. vue.createVNode(
  10886. _component_uni_popup,
  10887. {
  10888. ref: "message",
  10889. type: "message"
  10890. },
  10891. {
  10892. default: vue.withCtx(() => [
  10893. vue.createVNode(_component_uni_popup_message, {
  10894. type: "error",
  10895. message: $data.messageText,
  10896. duration: 3e3
  10897. }, null, 8, ["message"])
  10898. ]),
  10899. _: 1
  10900. /* STABLE */
  10901. },
  10902. 512
  10903. /* NEED_PATCH */
  10904. )
  10905. ]);
  10906. }
  10907. const PagesElectricityIndex = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-a9482145"], ["__file", "D:/project/esswisdom_ipad/pages/electricity/index.vue"]]);
  10908. const _imports_4$1 = "/static/shan.png";
  10909. const _sfc_main$4 = {
  10910. components: {
  10911. cmdProgress: __easycom_0$1
  10912. },
  10913. data() {
  10914. return {
  10915. successtype: "success",
  10916. confirmText: "确认启动",
  10917. title: "你确定要开启该设备吗?",
  10918. content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
  10919. value: "",
  10920. modeinput: "",
  10921. segmented: 1,
  10922. uidatas: "",
  10923. formatTimeid: "",
  10924. faultsdata: []
  10925. };
  10926. },
  10927. onLoad() {
  10928. this.confirmText = this.$t("ConfirmStart");
  10929. this.title = this.$t("popUpTitle");
  10930. this.content = this.$t("popUpContent");
  10931. },
  10932. computed: {
  10933. // 使用 mapState 映射多个状态到组件的计算属性
  10934. ...mapState(["formattedTime", "status"]),
  10935. ...mapState({
  10936. uidatasdata: (state2) => state2.uidatasdata
  10937. })
  10938. },
  10939. mounted() {
  10940. this.onfaultsdata();
  10941. },
  10942. beforeUnmount() {
  10943. },
  10944. methods: {
  10945. onfaultsdata() {
  10946. let data = {
  10947. page: 1,
  10948. rows: 10,
  10949. device: "",
  10950. starttime: "",
  10951. endtime: "",
  10952. rt: 0,
  10953. type: "故障"
  10954. };
  10955. getfaultsList(data).then((res) => {
  10956. formatAppLog("log", "at pages/supply/supply.vue:649", res);
  10957. if (res.status == "ok") {
  10958. this.faultsdata = res.data.list;
  10959. }
  10960. });
  10961. },
  10962. // 返回首页
  10963. onreturn() {
  10964. uni.redirectTo({
  10965. url: "/pages/index/index"
  10966. });
  10967. },
  10968. // 启动设备弹窗
  10969. dialogToggle() {
  10970. this.modeinput = "base";
  10971. this.successtype = "success";
  10972. this.confirmText = this.$t("ConfirmStart");
  10973. this.title = this.$t("popUpTitle");
  10974. this.content = this.$t("popUpContent");
  10975. this.$refs.alertDialog.open();
  10976. },
  10977. onstopit() {
  10978. this.modeinput = "base";
  10979. this.successtype = "error";
  10980. this.confirmText = this.$t("ConfirmStop");
  10981. this.title = this.$t("popUpTitleStop");
  10982. this.content = this.$t("popUpContentStop");
  10983. this.$refs.alertDialog.open();
  10984. },
  10985. // 确认弹窗
  10986. dialogConfirm() {
  10987. let data = {
  10988. id: "c35c4db0-113f-442a-9e26-728489265fdb",
  10989. issaveinitvalue: false,
  10990. value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0"
  10991. };
  10992. control(data).then((data2) => {
  10993. if (data2.status == "ok") {
  10994. uni.showToast({
  10995. title: this.$t("OperationSuccessful"),
  10996. icon: "none",
  10997. duration: 2e3
  10998. // 显示时长,单位为毫秒
  10999. });
  11000. } else {
  11001. uni.showToast({
  11002. title: this.$t("operationFailed"),
  11003. icon: "none",
  11004. // 使用 'none' 图标来表示失败
  11005. duration: 2e3
  11006. // 显示时长,单位为毫秒
  11007. });
  11008. }
  11009. });
  11010. },
  11011. dialogClose() {
  11012. formatAppLog("log", "at pages/supply/supply.vue:709", this.value);
  11013. this.$refs.alertDialog.close();
  11014. },
  11015. ontap(e2) {
  11016. formatAppLog("log", "at pages/supply/supply.vue:713", e2);
  11017. this.segmented = e2;
  11018. }
  11019. }
  11020. };
  11021. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  11022. const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
  11023. const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
  11024. const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
  11025. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  11026. vue.createElementVNode("view", { class: "top" }, [
  11027. vue.createElementVNode("image", {
  11028. class: "top_logo",
  11029. src: _imports_0,
  11030. mode: ""
  11031. }),
  11032. vue.createElementVNode(
  11033. "view",
  11034. { class: "tite" },
  11035. vue.toDisplayString(_ctx.$t("MainTitle")),
  11036. 1
  11037. /* TEXT */
  11038. ),
  11039. vue.createElementVNode("view", { class: "time" }, [
  11040. vue.createElementVNode(
  11041. "view",
  11042. { class: "time_top" },
  11043. vue.toDisplayString(_ctx.formattedTime),
  11044. 1
  11045. /* TEXT */
  11046. ),
  11047. vue.createElementVNode("view", { class: "time_bottom" }, [
  11048. vue.createElementVNode("view"),
  11049. vue.createElementVNode("view", { class: "time_bottom1" }, [
  11050. vue.createTextVNode(
  11051. vue.toDisplayString(_ctx.$t("status")) + " ",
  11052. 1
  11053. /* TEXT */
  11054. ),
  11055. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  11056. "view",
  11057. {
  11058. key: 0,
  11059. class: "time_state"
  11060. },
  11061. vue.toDisplayString(_ctx.$t("online")),
  11062. 1
  11063. /* TEXT */
  11064. )) : (vue.openBlock(), vue.createElementBlock(
  11065. "view",
  11066. {
  11067. key: 1,
  11068. class: "time_state1"
  11069. },
  11070. vue.toDisplayString(_ctx.$t("offline")),
  11071. 1
  11072. /* TEXT */
  11073. ))
  11074. ])
  11075. ])
  11076. ])
  11077. ]),
  11078. vue.createElementVNode("view", { class: "parameter" }, [
  11079. vue.createElementVNode("view", { class: "parameter_left" }, [
  11080. vue.createElementVNode("view", { class: "parameter_left1" }, [
  11081. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
  11082. vue.createVNode(_component_cmd_progress, {
  11083. type: "dashboard",
  11084. percent: _ctx.uidatasdata.SOC ?? 0,
  11085. "stroke-color": "#B0D0FF",
  11086. "stroke-width": 6,
  11087. width: 180,
  11088. "stroke-shape": "square",
  11089. showInfo: false
  11090. }, null, 8, ["percent"]),
  11091. vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
  11092. vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
  11093. vue.createTextVNode(
  11094. vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
  11095. 1
  11096. /* TEXT */
  11097. ),
  11098. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
  11099. ]),
  11100. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
  11101. ]),
  11102. vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
  11103. vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
  11104. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
  11105. vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
  11106. ])
  11107. ])
  11108. ]),
  11109. vue.createCommentVNode(' <jerry-gauge></jerry-gauge>\r\n <view class="parameter_canvas">\r\n <view class="parameter_canvas1">\r\n 0\r\n </view>\r\n <view class="parameter_canvas2">\r\n 100%\r\n </view>\r\n </view> ')
  11110. ]),
  11111. vue.createElementVNode("image", {
  11112. class: "parameter_leftdian1",
  11113. src: _imports_1$2,
  11114. alt: ""
  11115. }),
  11116. vue.createElementVNode("view", { class: "parameter_lef2" }, [
  11117. vue.createElementVNode("image", {
  11118. src: _imports_2$2,
  11119. mode: ""
  11120. })
  11121. ]),
  11122. vue.createElementVNode("image", {
  11123. class: "parameter_leftche",
  11124. src: _imports_3$3,
  11125. mode: ""
  11126. }),
  11127. vue.createElementVNode(
  11128. "view",
  11129. { class: "parameter_leftview" },
  11130. vue.toDisplayString(_ctx.$t("DirectRechargeInput")),
  11131. 1
  11132. /* TEXT */
  11133. )
  11134. ]),
  11135. vue.createElementVNode("view", { class: "parameter_right" }, [
  11136. vue.createElementVNode("view", { class: "parameter_righttop" }, [
  11137. vue.createElementVNode("view", { class: "parameter_1" }, [
  11138. vue.createElementVNode("view", { class: "parameter_shan" }, [
  11139. vue.createElementVNode("image", {
  11140. src: _imports_4$1,
  11141. mode: ""
  11142. }),
  11143. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  11144. vue.createElementVNode(
  11145. "view",
  11146. { class: "parameter_SOCright1" },
  11147. vue.toDisplayString(_ctx.$t("ChargingPower")),
  11148. 1
  11149. /* TEXT */
  11150. ),
  11151. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11152. vue.createElementVNode(
  11153. "text",
  11154. { class: "parameter_SOCright2" },
  11155. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatPower ?? "—"),
  11156. 1
  11157. /* TEXT */
  11158. ),
  11159. vue.createElementVNode("text", null, " kW")
  11160. ])
  11161. ])
  11162. ]),
  11163. vue.createElementVNode("view", { class: "parameter_SOC" }, [
  11164. vue.createElementVNode("image", {
  11165. src: _imports_6,
  11166. mode: ""
  11167. }),
  11168. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  11169. vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
  11170. vue.createElementVNode("view", null, [
  11171. vue.createElementVNode(
  11172. "text",
  11173. { class: "parameter_SOCright2" },
  11174. vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
  11175. 1
  11176. /* TEXT */
  11177. ),
  11178. vue.createElementVNode("text", null, " %")
  11179. ])
  11180. ])
  11181. ]),
  11182. vue.createElementVNode("view", { class: "parameter_Battery" }, [
  11183. vue.createElementVNode("image", {
  11184. src: _imports_7,
  11185. mode: ""
  11186. }),
  11187. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  11188. vue.createElementVNode(
  11189. "view",
  11190. { class: "parameter_SOCright1" },
  11191. vue.toDisplayString(_ctx.$t("BatteryStatus")),
  11192. 1
  11193. /* TEXT */
  11194. ),
  11195. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11196. _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
  11197. "view",
  11198. { key: 0 },
  11199. vue.toDisplayString(_ctx.$t("fault")),
  11200. 1
  11201. /* TEXT */
  11202. )) : _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock(
  11203. "view",
  11204. { key: 1 },
  11205. vue.toDisplayString(_ctx.$t("ChuShiHua")),
  11206. 1
  11207. /* TEXT */
  11208. )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
  11209. "view",
  11210. { key: 2 },
  11211. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  11212. 1
  11213. /* TEXT */
  11214. )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock(
  11215. "view",
  11216. { key: 3 },
  11217. vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
  11218. 1
  11219. /* TEXT */
  11220. )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
  11221. "view",
  11222. { key: 4 },
  11223. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  11224. 1
  11225. /* TEXT */
  11226. )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock(
  11227. "view",
  11228. { key: 5 },
  11229. vue.toDisplayString(_ctx.$t("Underhighpressure")),
  11230. 1
  11231. /* TEXT */
  11232. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")),
  11233. vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} ")
  11234. ])
  11235. ])
  11236. ]),
  11237. vue.createElementVNode("view", { class: "parameter_state" }, [
  11238. vue.createElementVNode("image", {
  11239. src: _imports_8,
  11240. mode: ""
  11241. }),
  11242. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  11243. vue.createElementVNode(
  11244. "view",
  11245. { class: "parameter_SOCright1" },
  11246. vue.toDisplayString(_ctx.$t("SystemStatus")),
  11247. 1
  11248. /* TEXT */
  11249. ),
  11250. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11251. vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
  11252. vue.createCommentVNode(' <view v-if="uidatasdata.bms_ChgLinkSt==0">\r\n 无连接\r\n </view>\r\n <view v-if="uidatasdata.bms_ChgLinkSt==1">\r\n 快充连接\r\n </view> '),
  11253. _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock(
  11254. "view",
  11255. { key: 0 },
  11256. vue.toDisplayString(_ctx.$t("uncharged")),
  11257. 1
  11258. /* TEXT */
  11259. )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock(
  11260. "view",
  11261. { key: 1 },
  11262. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  11263. 1
  11264. /* TEXT */
  11265. )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock(
  11266. "view",
  11267. { key: 2 },
  11268. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  11269. 1
  11270. /* TEXT */
  11271. )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock(
  11272. "view",
  11273. { key: 3 },
  11274. vue.toDisplayString(_ctx.$t("full")),
  11275. 1
  11276. /* TEXT */
  11277. )) : _ctx.uidatasdata.bms_ChargeStatus == 4 ? (vue.openBlock(), vue.createElementBlock(
  11278. "view",
  11279. { key: 4 },
  11280. vue.toDisplayString(_ctx.$t("Chargingstopped")),
  11281. 1
  11282. /* TEXT */
  11283. )) : _ctx.uidatasdata.bms_ChargeStatus == 5 ? (vue.openBlock(), vue.createElementBlock(
  11284. "view",
  11285. { key: 5 },
  11286. vue.toDisplayString(_ctx.$t("retain")),
  11287. 1
  11288. /* TEXT */
  11289. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — "))
  11290. ])
  11291. ])
  11292. ])
  11293. ])
  11294. ]),
  11295. vue.createElementVNode("view", { class: "parameter_tap" }, [
  11296. vue.createElementVNode(
  11297. "view",
  11298. {
  11299. class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
  11300. onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
  11301. },
  11302. vue.toDisplayString(_ctx.$t("Batteryinformation")),
  11303. 3
  11304. /* TEXT, CLASS */
  11305. ),
  11306. vue.createCommentVNode(` <view :class="segmented==2?'parameter_tap1':'parameter_tap2'" @click="ontap(2)">\r
  11307. {{$t('ConnectionInformation')}}\r
  11308. </view> `),
  11309. vue.createElementVNode(
  11310. "view",
  11311. {
  11312. class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
  11313. onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(3))
  11314. },
  11315. vue.toDisplayString(_ctx.$t("statisticalinformation")),
  11316. 3
  11317. /* TEXT, CLASS */
  11318. ),
  11319. vue.createElementVNode(
  11320. "view",
  11321. {
  11322. class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"),
  11323. onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(4))
  11324. },
  11325. vue.toDisplayString(_ctx.$t("coolinginformation")),
  11326. 3
  11327. /* TEXT, CLASS */
  11328. )
  11329. ]),
  11330. vue.createElementVNode("view", { class: "parameter_zheng" }, [
  11331. $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11332. key: 0,
  11333. class: "parameter_box"
  11334. }, [
  11335. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  11336. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  11337. <view class="parameter_zheng12">\r
  11338. {{$t('Batterypower')}}\r
  11339. </view>\r
  11340. <view class="parameter_zheng13">\r
  11341. {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">KW</text>\r
  11342. </view>\r
  11343. </view> `),
  11344. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11345. vue.createElementVNode(
  11346. "view",
  11347. { class: "parameter_zheng12" },
  11348. vue.toDisplayString(_ctx.$t("TotalPressure")),
  11349. 1
  11350. /* TEXT */
  11351. ),
  11352. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11353. vue.createTextVNode(
  11354. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
  11355. 1
  11356. /* TEXT */
  11357. ),
  11358. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  11359. ])
  11360. ]),
  11361. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11362. vue.createElementVNode(
  11363. "view",
  11364. { class: "parameter_zheng12" },
  11365. vue.toDisplayString(_ctx.$t("AllowChargingPower")),
  11366. 1
  11367. /* TEXT */
  11368. ),
  11369. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11370. vue.createTextVNode(
  11371. vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxChargePowerLimit ?? "—") + " ",
  11372. 1
  11373. /* TEXT */
  11374. ),
  11375. vue.createElementVNode("text", { class: "parameter_zheng14" }, "KW")
  11376. ])
  11377. ]),
  11378. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11379. vue.createElementVNode(
  11380. "view",
  11381. { class: "parameter_zheng12" },
  11382. vue.toDisplayString(_ctx.$t("MaximumVoltage")),
  11383. 1
  11384. /* TEXT */
  11385. ),
  11386. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11387. vue.createTextVNode(
  11388. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
  11389. 1
  11390. /* TEXT */
  11391. ),
  11392. vue.createElementVNode("text", { class: "parameter_zheng14" }, "v")
  11393. ])
  11394. ]),
  11395. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11396. vue.createElementVNode(
  11397. "view",
  11398. { class: "parameter_zheng12" },
  11399. vue.toDisplayString(_ctx.$t("MaximumTemperature")),
  11400. 1
  11401. /* TEXT */
  11402. ),
  11403. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11404. vue.createTextVNode(
  11405. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
  11406. 1
  11407. /* TEXT */
  11408. ),
  11409. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  11410. ])
  11411. ])
  11412. ]),
  11413. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  11414. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11415. vue.createElementVNode(
  11416. "view",
  11417. { class: "parameter_zheng12" },
  11418. vue.toDisplayString(_ctx.$t("BatteryCurrent")),
  11419. 1
  11420. /* TEXT */
  11421. ),
  11422. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11423. vue.createTextVNode(
  11424. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
  11425. 1
  11426. /* TEXT */
  11427. ),
  11428. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  11429. ])
  11430. ]),
  11431. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  11432. <view class="parameter_zheng12">\r
  11433. {{$t('TotalExternalPressure')}}\r
  11434. </view>\r
  11435. <view class="parameter_zheng13">\r
  11436. {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
  11437. </view>\r
  11438. </view> `),
  11439. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11440. vue.createElementVNode(
  11441. "view",
  11442. { class: "parameter_zheng12" },
  11443. vue.toDisplayString(_ctx.$t("AllowChargingCurrent")),
  11444. 1
  11445. /* TEXT */
  11446. ),
  11447. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11448. vue.createTextVNode(
  11449. vue.toDisplayString(_ctx.uidatasdata.ChargingInformation_Chg_Max_Cur ?? "—"),
  11450. 1
  11451. /* TEXT */
  11452. ),
  11453. vue.createElementVNode("text", { class: "parameter_zheng14" }, " A")
  11454. ])
  11455. ]),
  11456. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11457. vue.createElementVNode(
  11458. "view",
  11459. { class: "parameter_zheng12" },
  11460. vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
  11461. 1
  11462. /* TEXT */
  11463. ),
  11464. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11465. vue.createTextVNode(
  11466. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—"),
  11467. 1
  11468. /* TEXT */
  11469. ),
  11470. vue.createElementVNode("text", { class: "parameter_zheng14" }, " v")
  11471. ])
  11472. ]),
  11473. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11474. vue.createElementVNode(
  11475. "view",
  11476. { class: "parameter_zheng12" },
  11477. vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
  11478. 1
  11479. /* TEXT */
  11480. ),
  11481. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11482. vue.createTextVNode(
  11483. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
  11484. 1
  11485. /* TEXT */
  11486. ),
  11487. vue.createElementVNode("text", { class: "parameter_zheng14" }, " ℃")
  11488. ])
  11489. ])
  11490. ])
  11491. ])) : vue.createCommentVNode("v-if", true),
  11492. $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11493. key: 1,
  11494. class: "parameter_box"
  11495. }, [
  11496. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  11497. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11498. vue.createElementVNode(
  11499. "view",
  11500. { class: "parameter_zheng12" },
  11501. vue.toDisplayString(_ctx.$t("WorkingModeBatterySystem")),
  11502. 1
  11503. /* TEXT */
  11504. ),
  11505. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11506. vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "),
  11507. _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
  11508. "view",
  11509. { key: 0 },
  11510. vue.toDisplayString(_ctx.$t("invalid")),
  11511. 1
  11512. /* TEXT */
  11513. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
  11514. "view",
  11515. { key: 1 },
  11516. vue.toDisplayString(_ctx.$t("DischargeMode")),
  11517. 1
  11518. /* TEXT */
  11519. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
  11520. "view",
  11521. { key: 2 },
  11522. vue.toDisplayString(_ctx.$t("pcsChargingMode")),
  11523. 1
  11524. /* TEXT */
  11525. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
  11526. "view",
  11527. { key: 3 },
  11528. vue.toDisplayString(_ctx.$t("EuropeanStandardChargingMode")),
  11529. 1
  11530. /* TEXT */
  11531. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  11532. ])
  11533. ]),
  11534. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11535. vue.createElementVNode(
  11536. "view",
  11537. { class: "parameter_zheng12" },
  11538. vue.toDisplayString(_ctx.$t("BatterySystemStatus")),
  11539. 1
  11540. /* TEXT */
  11541. ),
  11542. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11543. vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} "),
  11544. _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock(
  11545. "view",
  11546. { key: 0 },
  11547. vue.toDisplayString(_ctx.$t("initialization")),
  11548. 1
  11549. /* TEXT */
  11550. )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
  11551. "view",
  11552. { key: 1 },
  11553. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  11554. 1
  11555. /* TEXT */
  11556. )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock(
  11557. "view",
  11558. { key: 2 },
  11559. vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
  11560. 1
  11561. /* TEXT */
  11562. )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
  11563. "view",
  11564. { key: 3 },
  11565. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  11566. 1
  11567. /* TEXT */
  11568. )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock(
  11569. "view",
  11570. { key: 4 },
  11571. vue.toDisplayString(_ctx.$t("Underhighpressure")),
  11572. 1
  11573. /* TEXT */
  11574. )) : _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
  11575. "view",
  11576. { key: 5 },
  11577. vue.toDisplayString(_ctx.$t("fault")),
  11578. 1
  11579. /* TEXT */
  11580. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — "))
  11581. ])
  11582. ]),
  11583. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11584. vue.createElementVNode(
  11585. "view",
  11586. { class: "parameter_zheng12" },
  11587. vue.toDisplayString(_ctx.$t("ChargingStatus")),
  11588. 1
  11589. /* TEXT */
  11590. ),
  11591. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11592. vue.createCommentVNode(" {{uidatasdata.bms_ChargeStatus==0.00?'无效':'有效'}} "),
  11593. _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock(
  11594. "view",
  11595. { key: 0 },
  11596. vue.toDisplayString(_ctx.$t("uncharged")),
  11597. 1
  11598. /* TEXT */
  11599. )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock(
  11600. "view",
  11601. { key: 1 },
  11602. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  11603. 1
  11604. /* TEXT */
  11605. )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock(
  11606. "view",
  11607. { key: 2 },
  11608. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  11609. 1
  11610. /* TEXT */
  11611. )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock(
  11612. "view",
  11613. { key: 3 },
  11614. vue.toDisplayString(_ctx.$t("full")),
  11615. 1
  11616. /* TEXT */
  11617. )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock(
  11618. "view",
  11619. { key: 4 },
  11620. vue.toDisplayString(_ctx.$t("retain")),
  11621. 1
  11622. /* TEXT */
  11623. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — "))
  11624. ])
  11625. ])
  11626. ]),
  11627. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  11628. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11629. vue.createElementVNode(
  11630. "view",
  11631. { class: "parameter_zheng12" },
  11632. vue.toDisplayString(_ctx.$t("ChargingConnectionStatus")),
  11633. 1
  11634. /* TEXT */
  11635. ),
  11636. _ctx.uidatasdata.bms_ChgLinkSt == 1 ? (vue.openBlock(), vue.createElementBlock(
  11637. "view",
  11638. {
  11639. key: 0,
  11640. class: "parameter_Batterystate1"
  11641. },
  11642. vue.toDisplayString(_ctx.$t("FastChargingConnection")),
  11643. 1
  11644. /* TEXT */
  11645. )) : (vue.openBlock(), vue.createElementBlock(
  11646. "view",
  11647. {
  11648. key: 1,
  11649. class: "parameter_Batterystate1"
  11650. },
  11651. vue.toDisplayString(_ctx.$t("NoConnection")),
  11652. 1
  11653. /* TEXT */
  11654. ))
  11655. ]),
  11656. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11657. vue.createElementVNode(
  11658. "view",
  11659. {
  11660. class: "parameter_zheng12",
  11661. style: { "height": "30px" }
  11662. },
  11663. vue.toDisplayString(_ctx.$t("BatteryFaultLevel")),
  11664. 1
  11665. /* TEXT */
  11666. ),
  11667. vue.createElementVNode("view", { class: "parameter_Batterystate1" }, [
  11668. _ctx.uidatasdata.bms_BatteryFaultLevl == 0 ? (vue.openBlock(), vue.createElementBlock(
  11669. "view",
  11670. { key: 0 },
  11671. vue.toDisplayString(_ctx.$t("NoMalfunction")),
  11672. 1
  11673. /* TEXT */
  11674. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 1 ? (vue.openBlock(), vue.createElementBlock(
  11675. "view",
  11676. { key: 1 },
  11677. " 1" + vue.toDisplayString(_ctx.$t("LevelLault")),
  11678. 1
  11679. /* TEXT */
  11680. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 2 ? (vue.openBlock(), vue.createElementBlock(
  11681. "view",
  11682. { key: 2 },
  11683. " 2" + vue.toDisplayString(_ctx.$t("LevelLault")),
  11684. 1
  11685. /* TEXT */
  11686. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 3 ? (vue.openBlock(), vue.createElementBlock(
  11687. "view",
  11688. { key: 3 },
  11689. " 3" + vue.toDisplayString(_ctx.$t("LevelLault")),
  11690. 1
  11691. /* TEXT */
  11692. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  11693. ])
  11694. ]),
  11695. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" })
  11696. ])
  11697. ])) : vue.createCommentVNode("v-if", true),
  11698. $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  11699. key: 2,
  11700. class: "parameter_box"
  11701. }, [
  11702. vue.createElementVNode("view", { class: "parameter_zheng10" }, [
  11703. vue.createCommentVNode(` <view class="parameter_zhengbox">\r
  11704. <view class="parameter_zheng12">\r
  11705. {{$t('AccumulatedChargingCapacityCommunication')}}\r
  11706. </view>\r
  11707. <view class="parameter_zhengbox13">\r
  11708. {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
  11709. </view>\r
  11710. </view>\r
  11711. <view class="parameter_zhengbox parameter_zheng101">\r
  11712. <view class="parameter_zheng12">\r
  11713. {{$t('AccumulatedDCChargingCapacity')}}\r
  11714. </view>\r
  11715. <view class="parameter_zhengbox13">\r
  11716. {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
  11717. </view>\r
  11718. </view> `),
  11719. vue.createElementVNode("view", { class: "parameter_zhengbox" }, [
  11720. vue.createElementVNode(
  11721. "view",
  11722. { class: "parameter_zheng12" },
  11723. vue.toDisplayString(_ctx.$t("RunningTimes")),
  11724. 1
  11725. /* TEXT */
  11726. ),
  11727. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  11728. vue.createTextVNode(" 0.0 "),
  11729. vue.createElementVNode(
  11730. "text",
  11731. { class: "parameter_zheng14" },
  11732. vue.toDisplayString(_ctx.$t("RunningTimesmin")),
  11733. 1
  11734. /* TEXT */
  11735. ),
  11736. vue.createTextVNode(),
  11737. vue.createElementVNode("text")
  11738. ])
  11739. ]),
  11740. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  11741. vue.createElementVNode(
  11742. "view",
  11743. { class: "parameter_zheng12" },
  11744. vue.toDisplayString(_ctx.$t("InputCapacity")),
  11745. 1
  11746. /* TEXT */
  11747. ),
  11748. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  11749. vue.createTextVNode(" 0.0 "),
  11750. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  11751. vue.createTextVNode(),
  11752. vue.createElementVNode("text")
  11753. ])
  11754. ]),
  11755. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  11756. vue.createElementVNode(
  11757. "view",
  11758. { class: "parameter_zheng12" },
  11759. vue.toDisplayString(_ctx.$t("AccumulateInput")),
  11760. 1
  11761. /* TEXT */
  11762. ),
  11763. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  11764. vue.createCommentVNode(` {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text> `),
  11765. vue.createTextVNode(" 0.0 "),
  11766. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  11767. vue.createTextVNode(),
  11768. vue.createElementVNode("text")
  11769. ])
  11770. ])
  11771. ])
  11772. ])) : vue.createCommentVNode("v-if", true),
  11773. $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  11774. key: 3,
  11775. class: "parameter_box"
  11776. }, [
  11777. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  11778. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11779. vue.createElementVNode(
  11780. "view",
  11781. { class: "parameter_zheng12" },
  11782. vue.toDisplayString(_ctx.$t("WorkingMode")),
  11783. 1
  11784. /* TEXT */
  11785. ),
  11786. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11787. vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
  11788. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
  11789. _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
  11790. "view",
  11791. { key: 0 },
  11792. vue.toDisplayString(_ctx.$t("OffMode")),
  11793. 1
  11794. /* TEXT */
  11795. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
  11796. "view",
  11797. { key: 1 },
  11798. vue.toDisplayString(_ctx.$t("CoolingMode")),
  11799. 1
  11800. /* TEXT */
  11801. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
  11802. "view",
  11803. { key: 2 },
  11804. vue.toDisplayString(_ctx.$t("HeatingMode")),
  11805. 1
  11806. /* TEXT */
  11807. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
  11808. "view",
  11809. { key: 3 },
  11810. vue.toDisplayString(_ctx.$t("CirculatingMode")),
  11811. 1
  11812. /* TEXT */
  11813. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  11814. ])
  11815. ]),
  11816. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11817. vue.createElementVNode(
  11818. "view",
  11819. { class: "parameter_zheng12" },
  11820. vue.toDisplayString(_ctx.$t("OutletTemperature")),
  11821. 1
  11822. /* TEXT */
  11823. ),
  11824. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11825. vue.createTextVNode(
  11826. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
  11827. 1
  11828. /* TEXT */
  11829. ),
  11830. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  11831. ])
  11832. ]),
  11833. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11834. vue.createElementVNode("view", {
  11835. class: "parameter_zheng12",
  11836. style: { "height": "30px" }
  11837. }, [
  11838. vue.createCommentVNode(" {{$t('PowerDemand')}} ")
  11839. ]),
  11840. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  11841. {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text class="parameter_zheng14">kW</text>\r
  11842. </view> `)
  11843. ])
  11844. ]),
  11845. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  11846. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11847. vue.createElementVNode(
  11848. "view",
  11849. { class: "parameter_zheng12" },
  11850. vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
  11851. 1
  11852. /* TEXT */
  11853. ),
  11854. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11855. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
  11856. _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
  11857. "view",
  11858. { key: 0 },
  11859. vue.toDisplayString(_ctx.$t("DisconnectedState")),
  11860. 1
  11861. /* TEXT */
  11862. )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
  11863. "view",
  11864. { key: 1 },
  11865. vue.toDisplayString(_ctx.$t("ClosedState")),
  11866. 1
  11867. /* TEXT */
  11868. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
  11869. ])
  11870. ]),
  11871. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11872. vue.createElementVNode(
  11873. "view",
  11874. { class: "parameter_zheng12" },
  11875. vue.toDisplayString(_ctx.$t("waterTemperature")),
  11876. 1
  11877. /* TEXT */
  11878. ),
  11879. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11880. vue.createTextVNode(
  11881. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
  11882. 1
  11883. /* TEXT */
  11884. ),
  11885. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  11886. ])
  11887. ]),
  11888. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11889. vue.createElementVNode("view", {
  11890. class: "parameter_zheng12",
  11891. style: { "height": "30px" }
  11892. }, [
  11893. vue.createCommentVNode(" {{$t('FaultLevel')}} ")
  11894. ]),
  11895. vue.createCommentVNode(` <view class="parameter_Batterystate">\r
  11896. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
  11897. {{$t('NoMalfunction')}}\r
  11898. </view>\r
  11899. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
  11900. 1{{$t('LevelLault')}}\r
  11901. </view>\r
  11902. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
  11903. 2{{$t('LevelLault')}}\r
  11904. </view>\r
  11905. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
  11906. 3{{$t('LevelLault')}}\r
  11907. </view>\r
  11908. <view v-else>\r
  11909. —\r
  11910. </view>\r
  11911. </view> `)
  11912. ])
  11913. ])
  11914. ])) : vue.createCommentVNode("v-if", true),
  11915. vue.createElementVNode("view", { class: "parameter_zheng3" }, [
  11916. _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11917. key: 0,
  11918. class: "parameter_zheng31111",
  11919. onClick: _cache[3] || (_cache[3] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
  11920. }, [
  11921. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  11922. vue.createElementVNode(
  11923. "view",
  11924. { class: "parameter_zheng32" },
  11925. vue.toDisplayString(_ctx.$t("open")),
  11926. 1
  11927. /* TEXT */
  11928. )
  11929. ])
  11930. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  11931. key: 1,
  11932. class: "parameter_zheng31111"
  11933. }, [
  11934. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  11935. vue.createElementVNode(
  11936. "view",
  11937. { class: "parameter_zheng32ccc" },
  11938. vue.toDisplayString(_ctx.$t("open")),
  11939. 1
  11940. /* TEXT */
  11941. )
  11942. ])
  11943. ])),
  11944. _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11945. key: 2,
  11946. class: "parameter_zheng31111",
  11947. onClick: _cache[4] || (_cache[4] = (...args) => $options.onstopit && $options.onstopit(...args))
  11948. }, [
  11949. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  11950. vue.createElementVNode(
  11951. "view",
  11952. { class: "parameter_zheng33" },
  11953. vue.toDisplayString(_ctx.$t("stopIt")),
  11954. 1
  11955. /* TEXT */
  11956. )
  11957. ])
  11958. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  11959. key: 3,
  11960. class: "parameter_zheng31111"
  11961. }, [
  11962. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  11963. vue.createElementVNode(
  11964. "view",
  11965. { class: "parameter_zheng32ccc" },
  11966. vue.toDisplayString(_ctx.$t("stopIt")),
  11967. 1
  11968. /* TEXT */
  11969. )
  11970. ])
  11971. ]))
  11972. ])
  11973. ]),
  11974. vue.createElementVNode("view", { class: "parameter_home" }, [
  11975. vue.createElementVNode("view", {
  11976. class: "parameter_home1",
  11977. onClick: _cache[5] || (_cache[5] = (...args) => $options.onreturn && $options.onreturn(...args))
  11978. }, [
  11979. vue.createElementVNode("image", {
  11980. src: _imports_1$1,
  11981. mode: ""
  11982. }),
  11983. vue.createElementVNode(
  11984. "text",
  11985. { class: "parameter_hometext" },
  11986. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  11987. 1
  11988. /* TEXT */
  11989. )
  11990. ]),
  11991. vue.createElementVNode("view", { class: "parameter_home2" }, [
  11992. vue.createElementVNode("image", {
  11993. src: _imports_10,
  11994. mode: ""
  11995. }),
  11996. vue.createElementVNode("swiper", {
  11997. class: "swiper",
  11998. circular: "",
  11999. autoplay: true,
  12000. interval: 2e3,
  12001. duration: 500,
  12002. vertical: true
  12003. }, [
  12004. (vue.openBlock(true), vue.createElementBlock(
  12005. vue.Fragment,
  12006. null,
  12007. vue.renderList($data.faultsdata, (item, index) => {
  12008. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
  12009. vue.createElementVNode(
  12010. "view",
  12011. { class: "parameter_home3" },
  12012. vue.toDisplayString(item["CONTENT"]),
  12013. 1
  12014. /* TEXT */
  12015. )
  12016. ]);
  12017. }),
  12018. 128
  12019. /* KEYED_FRAGMENT */
  12020. ))
  12021. ])
  12022. ])
  12023. ])
  12024. ])
  12025. ]),
  12026. vue.createVNode(
  12027. _component_uni_popup,
  12028. { ref: "alertDialog" },
  12029. {
  12030. default: vue.withCtx(() => [
  12031. vue.createVNode(_component_uni_popup_dialog, {
  12032. mode: $data.modeinput,
  12033. placeholder: "请输入内容",
  12034. modelValue: $data.value,
  12035. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.value = $event),
  12036. type: $data.successtype,
  12037. cancelText: _ctx.$t("CancelReturn"),
  12038. confirmText: $data.confirmText,
  12039. title: $data.title,
  12040. content: $data.content,
  12041. onConfirm: $options.dialogConfirm,
  12042. onClose: $options.dialogClose
  12043. }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
  12044. ]),
  12045. _: 1
  12046. /* STABLE */
  12047. },
  12048. 512
  12049. /* NEED_PATCH */
  12050. )
  12051. ]);
  12052. }
  12053. const PagesSupplySupply = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-80112fae"], ["__file", "D:/project/esswisdom_ipad/pages/supply/supply.vue"]]);
  12054. const _imports_3$1 = "/static/che1.png";
  12055. const _sfc_main$3 = {
  12056. components: {
  12057. cmdProgress: __easycom_0$1
  12058. },
  12059. data() {
  12060. return {
  12061. successtype: "success",
  12062. confirmText: "确认启动",
  12063. title: "你确定要开启该设备吗?",
  12064. content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
  12065. value: "",
  12066. modeinput: "",
  12067. segmented: 1,
  12068. ChargingStation: 1,
  12069. faultsdata: []
  12070. };
  12071. },
  12072. onLoad() {
  12073. this.confirmText = this.$t("ConfirmStart");
  12074. this.title = this.$t("popUpTitle");
  12075. this.content = this.$t("popUpContent");
  12076. },
  12077. computed: {
  12078. // 使用 mapState 映射多个状态到组件的计算属性
  12079. ...mapState(["formattedTime", "status"]),
  12080. ...mapState({
  12081. uidatasdata: (state2) => state2.uidatasdata
  12082. })
  12083. },
  12084. mounted() {
  12085. this.onfaultsdata();
  12086. },
  12087. beforeUnmount() {
  12088. },
  12089. methods: {
  12090. onfaultsdata() {
  12091. let data = {
  12092. page: 1,
  12093. rows: 10,
  12094. device: "",
  12095. starttime: "",
  12096. endtime: "",
  12097. rt: 0,
  12098. type: "故障"
  12099. };
  12100. getfaultsList(data).then((res) => {
  12101. formatAppLog("log", "at pages/supplyss/supplyss.vue:903", res);
  12102. if (res.status == "ok") {
  12103. this.faultsdata = res.data.list;
  12104. }
  12105. });
  12106. },
  12107. // 返回首页
  12108. onreturn() {
  12109. uni.redirectTo({
  12110. url: "/pages/index/index"
  12111. });
  12112. },
  12113. // 启动设备弹窗
  12114. dialogToggle() {
  12115. this.modeinput = "base";
  12116. this.successtype = "success";
  12117. this.confirmText = this.$t("ConfirmStart");
  12118. this.title = this.$t("popUpTitle");
  12119. this.content = this.$t("popUpContent");
  12120. this.$refs.alertDialog.open();
  12121. },
  12122. // 关闭设备弹窗
  12123. onstopit() {
  12124. this.modeinput = "base";
  12125. this.successtype = "error";
  12126. this.confirmText = this.$t("ConfirmStop");
  12127. this.title = this.$t("popUpTitleStop");
  12128. this.content = this.$t("popUpContentStop");
  12129. this.$refs.alertDialog.open();
  12130. },
  12131. // 确定
  12132. dialogConfirm() {
  12133. let data = {};
  12134. if (this.segmented == 1) {
  12135. data = {
  12136. id: "3b26469f-ad5b-43bf-b715-4213921321d0",
  12137. issaveinitvalue: false,
  12138. value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0"
  12139. };
  12140. } else if (this.segmented == 2) {
  12141. data = {
  12142. id: "78f59493-65f3-4860-8296-7f07bb0ca55b",
  12143. issaveinitvalue: false,
  12144. value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0"
  12145. };
  12146. } else {
  12147. data = {
  12148. id: "c35c4db0-113f-442a-9e26-728489265fdb",
  12149. issaveinitvalue: false,
  12150. value: this.confirmText == this.$t("ConfirmStart") ? "1" : "0"
  12151. };
  12152. }
  12153. control(data).then((data2) => {
  12154. formatAppLog("log", "at pages/supplyss/supplyss.vue:960", data2);
  12155. if (data2.status == "ok") {
  12156. uni.showToast({
  12157. title: this.$t("OperationSuccessful"),
  12158. icon: "none",
  12159. duration: 2e3
  12160. // 显示时长,单位为毫秒
  12161. });
  12162. } else {
  12163. uni.showToast({
  12164. title: this.$t("operationFailed"),
  12165. icon: "none",
  12166. // 使用 'none' 图标来表示失败
  12167. duration: 2e3
  12168. // 显示时长,单位为毫秒
  12169. });
  12170. }
  12171. });
  12172. },
  12173. // 取消
  12174. dialogClose() {
  12175. formatAppLog("log", "at pages/supplyss/supplyss.vue:979", this.value);
  12176. this.$refs.alertDialog.close();
  12177. },
  12178. // 切换标签
  12179. ontap(e2) {
  12180. formatAppLog("log", "at pages/supplyss/supplyss.vue:984", e2);
  12181. this.segmented = e2;
  12182. if (this.segmented == 1) {
  12183. this.ChargingStation = 1;
  12184. } else if (this.segmented == 2) {
  12185. this.ChargingStation = 2;
  12186. }
  12187. }
  12188. }
  12189. };
  12190. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  12191. const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
  12192. const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
  12193. const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
  12194. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  12195. vue.createElementVNode("view", { class: "top" }, [
  12196. vue.createElementVNode("image", {
  12197. class: "top_logo",
  12198. src: _imports_0,
  12199. mode: ""
  12200. }),
  12201. vue.createCommentVNode(' <image class="tite" src="../../static/tite.png" mode=""></image> '),
  12202. vue.createElementVNode(
  12203. "view",
  12204. { class: "tite" },
  12205. vue.toDisplayString(_ctx.$t("MainTitle")),
  12206. 1
  12207. /* TEXT */
  12208. ),
  12209. vue.createElementVNode("view", { class: "time" }, [
  12210. vue.createElementVNode(
  12211. "view",
  12212. { class: "time_top" },
  12213. vue.toDisplayString(_ctx.formattedTime),
  12214. 1
  12215. /* TEXT */
  12216. ),
  12217. vue.createElementVNode("view", { class: "time_bottom" }, [
  12218. vue.createElementVNode("view"),
  12219. vue.createElementVNode("view", { class: "time_bottom1" }, [
  12220. vue.createTextVNode(
  12221. vue.toDisplayString(_ctx.$t("status")) + " ",
  12222. 1
  12223. /* TEXT */
  12224. ),
  12225. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  12226. "view",
  12227. {
  12228. key: 0,
  12229. class: "time_state"
  12230. },
  12231. vue.toDisplayString(_ctx.$t("online")),
  12232. 1
  12233. /* TEXT */
  12234. )) : (vue.openBlock(), vue.createElementBlock(
  12235. "view",
  12236. {
  12237. key: 1,
  12238. class: "time_state1"
  12239. },
  12240. vue.toDisplayString(_ctx.$t("offline")),
  12241. 1
  12242. /* TEXT */
  12243. ))
  12244. ])
  12245. ])
  12246. ])
  12247. ]),
  12248. vue.createElementVNode("view", { class: "parameter" }, [
  12249. vue.createElementVNode("view", { class: "parameter_left" }, [
  12250. vue.createElementVNode("view", { class: "parameter_left1" }, [
  12251. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
  12252. vue.createVNode(_component_cmd_progress, {
  12253. type: "dashboard",
  12254. percent: _ctx.uidatasdata.SOC ?? 0,
  12255. "stroke-color": "#B0D0FF",
  12256. "stroke-width": 6,
  12257. width: 180,
  12258. "stroke-shape": "square",
  12259. showInfo: false
  12260. }, null, 8, ["percent"]),
  12261. vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
  12262. vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
  12263. vue.createTextVNode(
  12264. vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
  12265. 1
  12266. /* TEXT */
  12267. ),
  12268. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
  12269. ]),
  12270. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
  12271. ]),
  12272. vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
  12273. vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
  12274. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
  12275. vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
  12276. ])
  12277. ])
  12278. ]),
  12279. vue.createCommentVNode(' <jerry-gauge></jerry-gauge>\r\n <view class="parameter_canvas">\r\n <view class="parameter_canvas1">\r\n 0\r\n </view>\r\n <view class="parameter_canvas2">\r\n 100% \r\n </view>\r\n </view> ')
  12280. ]),
  12281. vue.createElementVNode("image", {
  12282. class: "parameter_leftdian1",
  12283. src: _imports_1$2,
  12284. alt: ""
  12285. }),
  12286. vue.createElementVNode("view", { class: "parameter_lef2" }, [
  12287. vue.createElementVNode("image", {
  12288. src: _imports_2$2,
  12289. mode: ""
  12290. })
  12291. ]),
  12292. vue.createElementVNode("image", {
  12293. class: "parameter_leftche2",
  12294. src: _imports_3$1,
  12295. mode: ""
  12296. }),
  12297. vue.createElementVNode(
  12298. "view",
  12299. { class: "parameter_leftview" },
  12300. vue.toDisplayString(_ctx.$t("DirectSupplyOutput")),
  12301. 1
  12302. /* TEXT */
  12303. )
  12304. ]),
  12305. vue.createElementVNode("view", { class: "parameter_right" }, [
  12306. vue.createElementVNode("view", { class: "parameter_righttop" }, [
  12307. vue.createElementVNode("view", { class: "parameter_1" }, [
  12308. vue.createElementVNode("view", { class: "parameter_2" }, [
  12309. $data.ChargingStation == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12310. key: 0,
  12311. class: "parameter_3"
  12312. }, [
  12313. vue.createElementVNode("view", { class: "parameter_4" }, [
  12314. _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  12315. key: 0,
  12316. src: _imports_4$2,
  12317. mode: ""
  12318. })) : (vue.openBlock(), vue.createElementBlock("image", {
  12319. key: 1,
  12320. src: _imports_5,
  12321. mode: ""
  12322. })),
  12323. vue.createTextVNode(
  12324. " " + vue.toDisplayString(_ctx.$t("ConnectionStatus")),
  12325. 1
  12326. /* TEXT */
  12327. )
  12328. ]),
  12329. _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
  12330. "view",
  12331. {
  12332. key: 0,
  12333. class: "parameter_51"
  12334. },
  12335. vue.toDisplayString(_ctx.$t("connect")),
  12336. 1
  12337. /* TEXT */
  12338. )) : (vue.openBlock(), vue.createElementBlock(
  12339. "view",
  12340. {
  12341. key: 1,
  12342. class: "parameter_5"
  12343. },
  12344. vue.toDisplayString(_ctx.$t("breakoff")),
  12345. 1
  12346. /* TEXT */
  12347. ))
  12348. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  12349. key: 1,
  12350. class: "parameter_3"
  12351. }, [
  12352. vue.createElementVNode("view", { class: "parameter_4" }, [
  12353. _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  12354. key: 0,
  12355. src: _imports_4$2,
  12356. mode: ""
  12357. })) : (vue.openBlock(), vue.createElementBlock("image", {
  12358. key: 1,
  12359. src: _imports_5,
  12360. mode: ""
  12361. })),
  12362. vue.createTextVNode(
  12363. " " + vue.toDisplayString(_ctx.$t("ConnectionStatus")),
  12364. 1
  12365. /* TEXT */
  12366. )
  12367. ]),
  12368. _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
  12369. "view",
  12370. {
  12371. key: 0,
  12372. class: "parameter_51"
  12373. },
  12374. vue.toDisplayString(_ctx.$t("connect")),
  12375. 1
  12376. /* TEXT */
  12377. )) : (vue.openBlock(), vue.createElementBlock(
  12378. "view",
  12379. {
  12380. key: 1,
  12381. class: "parameter_5"
  12382. },
  12383. vue.toDisplayString(_ctx.$t("breakoff")),
  12384. 1
  12385. /* TEXT */
  12386. ))
  12387. ])),
  12388. $data.ChargingStation == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12389. key: 2,
  12390. class: "parameter_3"
  12391. }, [
  12392. vue.createElementVNode("view", { class: "parameter_4" }, [
  12393. _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  12394. key: 0,
  12395. src: _imports_4$2,
  12396. mode: ""
  12397. })) : (vue.openBlock(), vue.createElementBlock("image", {
  12398. key: 1,
  12399. src: _imports_5,
  12400. mode: ""
  12401. })),
  12402. vue.createTextVNode(
  12403. " " + vue.toDisplayString(_ctx.$t("workingCondition")),
  12404. 1
  12405. /* TEXT */
  12406. )
  12407. ]),
  12408. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  12409. _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 0 ? (vue.openBlock(), vue.createElementBlock(
  12410. "view",
  12411. { key: 0 },
  12412. vue.toDisplayString(_ctx.$t("StandbyMode")),
  12413. 1
  12414. /* TEXT */
  12415. )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
  12416. "view",
  12417. { key: 1 },
  12418. vue.toDisplayString(_ctx.$t("work")),
  12419. 1
  12420. /* TEXT */
  12421. )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 2 ? (vue.openBlock(), vue.createElementBlock(
  12422. "view",
  12423. { key: 2 },
  12424. vue.toDisplayString(_ctx.$t("ChargingCompleted")),
  12425. 1
  12426. /* TEXT */
  12427. )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 3 ? (vue.openBlock(), vue.createElementBlock(
  12428. "view",
  12429. { key: 3 },
  12430. vue.toDisplayString(_ctx.$t("ChargingPause")),
  12431. 1
  12432. /* TEXT */
  12433. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  12434. ])
  12435. ])) : vue.createCommentVNode("v-if", true),
  12436. $data.ChargingStation == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12437. key: 3,
  12438. class: "parameter_3"
  12439. }, [
  12440. vue.createElementVNode("view", { class: "parameter_4" }, [
  12441. _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  12442. key: 0,
  12443. src: _imports_4$2,
  12444. mode: ""
  12445. })) : (vue.openBlock(), vue.createElementBlock("image", {
  12446. key: 1,
  12447. src: _imports_5,
  12448. mode: ""
  12449. })),
  12450. vue.createTextVNode(
  12451. " " + vue.toDisplayString(_ctx.$t("workingCondition")),
  12452. 1
  12453. /* TEXT */
  12454. )
  12455. ]),
  12456. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  12457. _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 0 ? (vue.openBlock(), vue.createElementBlock(
  12458. "view",
  12459. { key: 0 },
  12460. vue.toDisplayString(_ctx.$t("StandbyMode")),
  12461. 1
  12462. /* TEXT */
  12463. )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
  12464. "view",
  12465. { key: 1 },
  12466. vue.toDisplayString(_ctx.$t("work")),
  12467. 1
  12468. /* TEXT */
  12469. )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 2 ? (vue.openBlock(), vue.createElementBlock(
  12470. "view",
  12471. { key: 2 },
  12472. vue.toDisplayString(_ctx.$t("ChargingCompleted")),
  12473. 1
  12474. /* TEXT */
  12475. )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 3 ? (vue.openBlock(), vue.createElementBlock(
  12476. "view",
  12477. { key: 3 },
  12478. vue.toDisplayString(_ctx.$t("ChargingPause")),
  12479. 1
  12480. /* TEXT */
  12481. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  12482. ]),
  12483. vue.createCommentVNode(' <view class="parameter_5" v-else>\r\n 断开\r\n </view> ')
  12484. ])) : vue.createCommentVNode("v-if", true)
  12485. ]),
  12486. vue.createElementVNode("view", { class: "parameter_SOC" }, [
  12487. vue.createElementVNode("image", {
  12488. src: _imports_6,
  12489. mode: ""
  12490. }),
  12491. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  12492. vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
  12493. vue.createElementVNode("view", null, [
  12494. vue.createElementVNode(
  12495. "text",
  12496. { class: "parameter_SOCright2" },
  12497. vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
  12498. 1
  12499. /* TEXT */
  12500. ),
  12501. vue.createElementVNode("text", null, "%")
  12502. ])
  12503. ])
  12504. ]),
  12505. vue.createElementVNode("view", { class: "parameter_Battery" }, [
  12506. vue.createElementVNode("image", {
  12507. src: _imports_7,
  12508. mode: ""
  12509. }),
  12510. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  12511. vue.createElementVNode(
  12512. "view",
  12513. { class: "parameter_SOCright1" },
  12514. vue.toDisplayString(_ctx.$t("BatteryStatus")),
  12515. 1
  12516. /* TEXT */
  12517. ),
  12518. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  12519. _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
  12520. "view",
  12521. { key: 0 },
  12522. vue.toDisplayString(_ctx.$t("fault")),
  12523. 1
  12524. /* TEXT */
  12525. )) : _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock(
  12526. "view",
  12527. { key: 1 },
  12528. vue.toDisplayString(_ctx.$t("ChuShiHua")),
  12529. 1
  12530. /* TEXT */
  12531. )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
  12532. "view",
  12533. { key: 2 },
  12534. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  12535. 1
  12536. /* TEXT */
  12537. )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock(
  12538. "view",
  12539. { key: 3 },
  12540. vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
  12541. 1
  12542. /* TEXT */
  12543. )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
  12544. "view",
  12545. { key: 4 },
  12546. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  12547. 1
  12548. /* TEXT */
  12549. )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock(
  12550. "view",
  12551. { key: 5 },
  12552. vue.toDisplayString(_ctx.$t("Underhighpressure")),
  12553. 1
  12554. /* TEXT */
  12555. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")),
  12556. vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} ")
  12557. ])
  12558. ])
  12559. ]),
  12560. vue.createElementVNode("view", { class: "parameter_state" }, [
  12561. vue.createElementVNode("image", {
  12562. src: _imports_8,
  12563. mode: ""
  12564. }),
  12565. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  12566. vue.createElementVNode(
  12567. "view",
  12568. { class: "parameter_SOCright1" },
  12569. vue.toDisplayString(_ctx.$t("SystemStatus")),
  12570. 1
  12571. /* TEXT */
  12572. ),
  12573. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  12574. vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
  12575. _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock(
  12576. "view",
  12577. { key: 0 },
  12578. vue.toDisplayString(_ctx.$t("uncharged")),
  12579. 1
  12580. /* TEXT */
  12581. )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock(
  12582. "view",
  12583. { key: 1 },
  12584. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  12585. 1
  12586. /* TEXT */
  12587. )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock(
  12588. "view",
  12589. { key: 2 },
  12590. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  12591. 1
  12592. /* TEXT */
  12593. )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock(
  12594. "view",
  12595. { key: 3 },
  12596. vue.toDisplayString(_ctx.$t("full")),
  12597. 1
  12598. /* TEXT */
  12599. )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock(
  12600. vue.Fragment,
  12601. { key: 4 },
  12602. [
  12603. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_ChargeStatus==4">\r
  12604. {{$t('Chargingstopped')}}\r
  12605. </view> `),
  12606. vue.createElementVNode(
  12607. "view",
  12608. null,
  12609. vue.toDisplayString(_ctx.$t("retain")),
  12610. 1
  12611. /* TEXT */
  12612. )
  12613. ],
  12614. 2112
  12615. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  12616. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — "))
  12617. ])
  12618. ])
  12619. ])
  12620. ])
  12621. ]),
  12622. vue.createElementVNode("view", { class: "parameter_tap" }, [
  12623. vue.createElementVNode(
  12624. "view",
  12625. {
  12626. class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
  12627. onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
  12628. },
  12629. vue.toDisplayString(_ctx.$t("GunAinformation")),
  12630. 3
  12631. /* TEXT, CLASS */
  12632. ),
  12633. vue.createElementVNode(
  12634. "view",
  12635. {
  12636. class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"),
  12637. onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2))
  12638. },
  12639. vue.toDisplayString(_ctx.$t("GunBinformation")),
  12640. 3
  12641. /* TEXT, CLASS */
  12642. ),
  12643. vue.createElementVNode(
  12644. "view",
  12645. {
  12646. class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
  12647. onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3))
  12648. },
  12649. vue.toDisplayString(_ctx.$t("Batteryinformation")),
  12650. 3
  12651. /* TEXT, CLASS */
  12652. ),
  12653. vue.createCommentVNode(` <view :class="segmented==4?'parameter_tap1':'parameter_tap2'" @click="ontap(4)">\r
  12654. {{$t('ConnectionInformation')}}\r
  12655. </view> `),
  12656. vue.createElementVNode(
  12657. "view",
  12658. {
  12659. class: vue.normalizeClass($data.segmented == 5 ? "parameter_tap1" : "parameter_tap2"),
  12660. onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(5))
  12661. },
  12662. vue.toDisplayString(_ctx.$t("coolinginformation")),
  12663. 3
  12664. /* TEXT, CLASS */
  12665. )
  12666. ]),
  12667. vue.createElementVNode("view", { class: "parameter_zheng" }, [
  12668. $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12669. key: 0,
  12670. class: "parameter_box"
  12671. }, [
  12672. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  12673. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12674. vue.createElementVNode(
  12675. "view",
  12676. { class: "parameter_zheng12" },
  12677. vue.toDisplayString(_ctx.$t("ChargingVoltage")),
  12678. 1
  12679. /* TEXT */
  12680. ),
  12681. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12682. vue.createTextVNode(
  12683. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage ?? "—") + " ",
  12684. 1
  12685. /* TEXT */
  12686. ),
  12687. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  12688. ])
  12689. ]),
  12690. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12691. vue.createElementVNode(
  12692. "view",
  12693. { class: "parameter_zheng12" },
  12694. vue.toDisplayString(_ctx.$t("ChargingCurrent")),
  12695. 1
  12696. /* TEXT */
  12697. ),
  12698. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12699. vue.createTextVNode(
  12700. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_chargeOutputCurrent ?? "—") + " ",
  12701. 1
  12702. /* TEXT */
  12703. ),
  12704. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  12705. ])
  12706. ]),
  12707. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12708. vue.createElementVNode(
  12709. "view",
  12710. { class: "parameter_zheng12" },
  12711. vue.toDisplayString(_ctx.$t("VehicleSOC")),
  12712. 1
  12713. /* TEXT */
  12714. ),
  12715. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12716. vue.createTextVNode(
  12717. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_soc ?? "—") + " ",
  12718. 1
  12719. /* TEXT */
  12720. ),
  12721. vue.createElementVNode("text", { class: "parameter_zheng14" }, "%")
  12722. ])
  12723. ]),
  12724. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12725. vue.createElementVNode(
  12726. "view",
  12727. { class: "parameter_zheng12" },
  12728. vue.toDisplayString(_ctx.$t("CharingPower")),
  12729. 1
  12730. /* TEXT */
  12731. ),
  12732. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12733. vue.createTextVNode(
  12734. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage ? (_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage * _ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_chargeOutputCurrent / 1e3).toFixed(2) : "—") + " ",
  12735. 1
  12736. /* TEXT */
  12737. ),
  12738. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  12739. ])
  12740. ])
  12741. ]),
  12742. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  12743. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12744. vue.createElementVNode(
  12745. "view",
  12746. { class: "parameter_zheng12" },
  12747. vue.toDisplayString(_ctx.$t("ChargingCapacity")),
  12748. 1
  12749. /* TEXT */
  12750. ),
  12751. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12752. vue.createTextVNode(
  12753. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_ThisChargePower ?? "—") + " ",
  12754. 1
  12755. /* TEXT */
  12756. ),
  12757. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh")
  12758. ])
  12759. ]),
  12760. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  12761. <view class="parameter_zheng12">\r
  12762. {{$t('ChargingFee')}}\r
  12763. </view>\r
  12764. <view class="parameter_zheng13">\r
  12765. {{uidatasdata.ChargingStation_1_telemetryFrameccu_AccumulatedChargingElectricityCost??'—'}}\r
  12766. <text class="parameter_zheng14">{{$t('USD')}}</text>\r
  12767. </view>\r
  12768. </view> `),
  12769. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12770. vue.createElementVNode(
  12771. "view",
  12772. { class: "parameter_zheng12" },
  12773. vue.toDisplayString(_ctx.$t("ChargingTime")),
  12774. 1
  12775. /* TEXT */
  12776. ),
  12777. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12778. vue.createTextVNode(
  12779. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_EstimateTheRemainingChargingTime ?? "—") + " ",
  12780. 1
  12781. /* TEXT */
  12782. ),
  12783. vue.createElementVNode("text", { class: "parameter_zheng14" }, "min")
  12784. ])
  12785. ]),
  12786. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
  12787. vue.createElementVNode("view", { class: "parameter_zheng12" }),
  12788. vue.createElementVNode("view", { class: "parameter_zheng13" })
  12789. ]),
  12790. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
  12791. vue.createElementVNode("view", { class: "parameter_zheng12" }),
  12792. vue.createElementVNode("view", { class: "parameter_zheng13" })
  12793. ])
  12794. ])
  12795. ])) : vue.createCommentVNode("v-if", true),
  12796. $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12797. key: 1,
  12798. class: "parameter_box"
  12799. }, [
  12800. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  12801. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12802. vue.createElementVNode(
  12803. "view",
  12804. { class: "parameter_zheng12" },
  12805. vue.toDisplayString(_ctx.$t("ChargingVoltage")),
  12806. 1
  12807. /* TEXT */
  12808. ),
  12809. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12810. vue.createTextVNode(
  12811. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage ?? "—") + " ",
  12812. 1
  12813. /* TEXT */
  12814. ),
  12815. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  12816. ])
  12817. ]),
  12818. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12819. vue.createElementVNode(
  12820. "view",
  12821. { class: "parameter_zheng12" },
  12822. vue.toDisplayString(_ctx.$t("ChargingCurrent")),
  12823. 1
  12824. /* TEXT */
  12825. ),
  12826. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12827. vue.createTextVNode(
  12828. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_chargeOutputCurrent ?? "—") + " ",
  12829. 1
  12830. /* TEXT */
  12831. ),
  12832. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  12833. ])
  12834. ]),
  12835. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12836. vue.createElementVNode(
  12837. "view",
  12838. { class: "parameter_zheng12" },
  12839. vue.toDisplayString(_ctx.$t("VehicleSOC")),
  12840. 1
  12841. /* TEXT */
  12842. ),
  12843. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12844. vue.createTextVNode(
  12845. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_soc ?? "—"),
  12846. 1
  12847. /* TEXT */
  12848. ),
  12849. vue.createElementVNode("text", { class: "parameter_zheng14" }, " %")
  12850. ])
  12851. ]),
  12852. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12853. vue.createElementVNode(
  12854. "view",
  12855. { class: "parameter_zheng12" },
  12856. vue.toDisplayString(_ctx.$t("CharingPower")),
  12857. 1
  12858. /* TEXT */
  12859. ),
  12860. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12861. vue.createTextVNode(
  12862. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage ? (_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage * _ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_chargeOutputCurrent / 1e3).toFixed(2) : "—") + " ",
  12863. 1
  12864. /* TEXT */
  12865. ),
  12866. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  12867. ])
  12868. ])
  12869. ]),
  12870. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  12871. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12872. vue.createElementVNode(
  12873. "view",
  12874. { class: "parameter_zheng12" },
  12875. vue.toDisplayString(_ctx.$t("ChargingCapacity")),
  12876. 1
  12877. /* TEXT */
  12878. ),
  12879. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12880. vue.createTextVNode(
  12881. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_ThisChargePower ?? "—") + " ",
  12882. 1
  12883. /* TEXT */
  12884. ),
  12885. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh")
  12886. ])
  12887. ]),
  12888. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  12889. <view class="parameter_zheng12">\r
  12890. {{$t('ChargingFee')}}\r
  12891. </view>\r
  12892. <view class="parameter_zheng13">\r
  12893. \r
  12894. {{uidatasdata.ChargingStation_2_telemetryFrameccu_AccumulatedChargingElectricityCost??'—'}}\r
  12895. <text class="parameter_zheng14">{{$t('USD')}}</text>\r
  12896. </view>\r
  12897. </view> `),
  12898. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12899. vue.createElementVNode(
  12900. "view",
  12901. { class: "parameter_zheng12" },
  12902. vue.toDisplayString(_ctx.$t("ChargingTime")),
  12903. 1
  12904. /* TEXT */
  12905. ),
  12906. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12907. vue.createTextVNode(
  12908. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_EstimateTheRemainingChargingTime ?? "—") + " ",
  12909. 1
  12910. /* TEXT */
  12911. ),
  12912. vue.createElementVNode("text", { class: "parameter_zheng14" }, "min")
  12913. ])
  12914. ]),
  12915. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
  12916. vue.createElementVNode("view", { class: "parameter_zheng12" }),
  12917. vue.createElementVNode("view", { class: "parameter_zheng13" })
  12918. ]),
  12919. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
  12920. vue.createElementVNode("view", { class: "parameter_zheng12" }),
  12921. vue.createElementVNode("view", { class: "parameter_zheng13" })
  12922. ])
  12923. ])
  12924. ])) : vue.createCommentVNode("v-if", true),
  12925. $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  12926. key: 2,
  12927. class: "parameter_box"
  12928. }, [
  12929. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  12930. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  12931. <view class="parameter_zheng12">\r
  12932. {{$t('Batterypower')}}\r
  12933. </view>\r
  12934. <view class="parameter_zheng13">\r
  12935. {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">kW</text>\r
  12936. </view>\r
  12937. </view> `),
  12938. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12939. vue.createElementVNode(
  12940. "view",
  12941. { class: "parameter_zheng12" },
  12942. vue.toDisplayString(_ctx.$t("TotalPressure")),
  12943. 1
  12944. /* TEXT */
  12945. ),
  12946. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12947. vue.createTextVNode(
  12948. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
  12949. 1
  12950. /* TEXT */
  12951. ),
  12952. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  12953. ])
  12954. ]),
  12955. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12956. vue.createElementVNode(
  12957. "view",
  12958. { class: "parameter_zheng12" },
  12959. vue.toDisplayString(_ctx.$t("AllowableDischargepower")),
  12960. 1
  12961. /* TEXT */
  12962. ),
  12963. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12964. vue.createTextVNode(
  12965. vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—") + " ",
  12966. 1
  12967. /* TEXT */
  12968. ),
  12969. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  12970. ])
  12971. ]),
  12972. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12973. vue.createElementVNode(
  12974. "view",
  12975. { class: "parameter_zheng12" },
  12976. vue.toDisplayString(_ctx.$t("MaximumVoltage")),
  12977. 1
  12978. /* TEXT */
  12979. ),
  12980. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12981. vue.createTextVNode(
  12982. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
  12983. 1
  12984. /* TEXT */
  12985. ),
  12986. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  12987. ])
  12988. ]),
  12989. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12990. vue.createElementVNode(
  12991. "view",
  12992. { class: "parameter_zheng12" },
  12993. vue.toDisplayString(_ctx.$t("MaximumTemperature")),
  12994. 1
  12995. /* TEXT */
  12996. ),
  12997. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12998. vue.createTextVNode(
  12999. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
  13000. 1
  13001. /* TEXT */
  13002. ),
  13003. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  13004. ])
  13005. ])
  13006. ]),
  13007. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  13008. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13009. vue.createElementVNode(
  13010. "view",
  13011. { class: "parameter_zheng12" },
  13012. vue.toDisplayString(_ctx.$t("BatteryCurrent")),
  13013. 1
  13014. /* TEXT */
  13015. ),
  13016. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13017. vue.createTextVNode(
  13018. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
  13019. 1
  13020. /* TEXT */
  13021. ),
  13022. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  13023. ])
  13024. ]),
  13025. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  13026. <view class="parameter_zheng12">\r
  13027. {{$t('TotalExternalPressure')}}\r
  13028. \r
  13029. </view>\r
  13030. <view class="parameter_zheng13">\r
  13031. {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
  13032. </view>\r
  13033. </view> `),
  13034. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13035. vue.createElementVNode(
  13036. "view",
  13037. { class: "parameter_zheng12" },
  13038. vue.toDisplayString(_ctx.$t("AllowDischargeCurrent")),
  13039. 1
  13040. /* TEXT */
  13041. ),
  13042. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13043. vue.createTextVNode(
  13044. vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—"),
  13045. 1
  13046. /* TEXT */
  13047. ),
  13048. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  13049. ])
  13050. ]),
  13051. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13052. vue.createElementVNode(
  13053. "view",
  13054. { class: "parameter_zheng12" },
  13055. vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
  13056. 1
  13057. /* TEXT */
  13058. ),
  13059. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13060. vue.createTextVNode(
  13061. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ",
  13062. 1
  13063. /* TEXT */
  13064. ),
  13065. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  13066. ])
  13067. ]),
  13068. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13069. vue.createElementVNode(
  13070. "view",
  13071. { class: "parameter_zheng12" },
  13072. vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
  13073. 1
  13074. /* TEXT */
  13075. ),
  13076. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13077. vue.createTextVNode(
  13078. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
  13079. 1
  13080. /* TEXT */
  13081. ),
  13082. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  13083. ])
  13084. ])
  13085. ])
  13086. ])) : vue.createCommentVNode("v-if", true),
  13087. $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  13088. key: 3,
  13089. class: "parameter_box"
  13090. }, [
  13091. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  13092. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13093. vue.createElementVNode(
  13094. "view",
  13095. { class: "parameter_zheng12" },
  13096. vue.toDisplayString(_ctx.$t("WorkingModeBatterySystem")),
  13097. 1
  13098. /* TEXT */
  13099. ),
  13100. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13101. vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "),
  13102. _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
  13103. "view",
  13104. { key: 0 },
  13105. vue.toDisplayString(_ctx.$t("invalid")),
  13106. 1
  13107. /* TEXT */
  13108. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
  13109. "view",
  13110. { key: 1 },
  13111. vue.toDisplayString(_ctx.$t("DischargeMode")),
  13112. 1
  13113. /* TEXT */
  13114. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
  13115. "view",
  13116. { key: 2 },
  13117. vue.toDisplayString(_ctx.$t("pcsChargingMode")),
  13118. 1
  13119. /* TEXT */
  13120. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
  13121. "view",
  13122. { key: 3 },
  13123. vue.toDisplayString(_ctx.$t("EuropeanStandardChargingMode")),
  13124. 1
  13125. /* TEXT */
  13126. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  13127. ])
  13128. ]),
  13129. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13130. vue.createElementVNode(
  13131. "view",
  13132. { class: "parameter_zheng12" },
  13133. vue.toDisplayString(_ctx.$t("BatterySystemStatus")),
  13134. 1
  13135. /* TEXT */
  13136. ),
  13137. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13138. vue.createCommentVNode(" {{uidatasdata.bms_BatSysState==0.00?'无效':'有效'}} "),
  13139. _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock(
  13140. "view",
  13141. { key: 0 },
  13142. vue.toDisplayString(_ctx.$t("initialization")),
  13143. 1
  13144. /* TEXT */
  13145. )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
  13146. "view",
  13147. { key: 1 },
  13148. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  13149. 1
  13150. /* TEXT */
  13151. )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock(
  13152. "view",
  13153. { key: 2 },
  13154. vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
  13155. 1
  13156. /* TEXT */
  13157. )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
  13158. "view",
  13159. { key: 3 },
  13160. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  13161. 1
  13162. /* TEXT */
  13163. )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock(
  13164. "view",
  13165. { key: 4 },
  13166. vue.toDisplayString(_ctx.$t("Underhighpressure")),
  13167. 1
  13168. /* TEXT */
  13169. )) : _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
  13170. "view",
  13171. { key: 5 },
  13172. vue.toDisplayString(_ctx.$t("fault")),
  13173. 1
  13174. /* TEXT */
  13175. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — "))
  13176. ])
  13177. ]),
  13178. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13179. vue.createElementVNode(
  13180. "view",
  13181. { class: "parameter_zheng12" },
  13182. vue.toDisplayString(_ctx.$t("ChargingStatus")),
  13183. 1
  13184. /* TEXT */
  13185. ),
  13186. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13187. _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock(
  13188. "view",
  13189. { key: 0 },
  13190. vue.toDisplayString(_ctx.$t("uncharged")),
  13191. 1
  13192. /* TEXT */
  13193. )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock(
  13194. "view",
  13195. { key: 1 },
  13196. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  13197. 1
  13198. /* TEXT */
  13199. )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock(
  13200. "view",
  13201. { key: 2 },
  13202. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  13203. 1
  13204. /* TEXT */
  13205. )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock(
  13206. "view",
  13207. { key: 3 },
  13208. vue.toDisplayString(_ctx.$t("full")),
  13209. 1
  13210. /* TEXT */
  13211. )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock(
  13212. vue.Fragment,
  13213. { key: 4 },
  13214. [
  13215. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_ChargeStatus==4">\r
  13216. {{$t('Chargingstopped')}}\r
  13217. </view> `),
  13218. vue.createElementVNode(
  13219. "view",
  13220. null,
  13221. vue.toDisplayString(_ctx.$t("retain")),
  13222. 1
  13223. /* TEXT */
  13224. )
  13225. ],
  13226. 2112
  13227. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  13228. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — "))
  13229. ])
  13230. ])
  13231. ]),
  13232. vue.createElementVNode("view", { class: "parameter_zheng22" }, [
  13233. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13234. vue.createElementVNode(
  13235. "view",
  13236. { class: "parameter_zheng12" },
  13237. vue.toDisplayString(_ctx.$t("ChargingConnectionStatus")),
  13238. 1
  13239. /* TEXT */
  13240. ),
  13241. _ctx.uidatasdata.bms_ChgLinkSt == 1 ? (vue.openBlock(), vue.createElementBlock(
  13242. "view",
  13243. {
  13244. key: 0,
  13245. class: "parameter_Batterystate1"
  13246. },
  13247. vue.toDisplayString(_ctx.$t("FastChargingConnection")),
  13248. 1
  13249. /* TEXT */
  13250. )) : (vue.openBlock(), vue.createElementBlock(
  13251. "view",
  13252. {
  13253. key: 1,
  13254. class: "parameter_Batterystate1"
  13255. },
  13256. vue.toDisplayString(_ctx.$t("NoConnection")),
  13257. 1
  13258. /* TEXT */
  13259. ))
  13260. ]),
  13261. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13262. vue.createElementVNode(
  13263. "view",
  13264. { class: "parameter_zheng12" },
  13265. vue.toDisplayString(_ctx.$t("BatteryFaultLevel")),
  13266. 1
  13267. /* TEXT */
  13268. ),
  13269. vue.createElementVNode("view", { class: "parameter_Batterystate1" }, [
  13270. vue.createCommentVNode(" {{uidatasdata.bms_BatteryFaultLevl==0.00?'无故障':'有效'}} "),
  13271. _ctx.uidatasdata.bms_BatteryFaultLevl == 0 ? (vue.openBlock(), vue.createElementBlock(
  13272. "view",
  13273. { key: 0 },
  13274. vue.toDisplayString(_ctx.$t("NoMalfunction")),
  13275. 1
  13276. /* TEXT */
  13277. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 1 ? (vue.openBlock(), vue.createElementBlock(
  13278. "view",
  13279. { key: 1 },
  13280. " 1" + vue.toDisplayString(_ctx.$t("LevelLault")),
  13281. 1
  13282. /* TEXT */
  13283. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 2 ? (vue.openBlock(), vue.createElementBlock(
  13284. "view",
  13285. { key: 2 },
  13286. " 2" + vue.toDisplayString(_ctx.$t("LevelLault")),
  13287. 1
  13288. /* TEXT */
  13289. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 3 ? (vue.openBlock(), vue.createElementBlock(
  13290. "view",
  13291. { key: 3 },
  13292. " 3" + vue.toDisplayString(_ctx.$t("LevelLault")),
  13293. 1
  13294. /* TEXT */
  13295. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  13296. ])
  13297. ]),
  13298. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" })
  13299. ])
  13300. ])) : vue.createCommentVNode("v-if", true),
  13301. $data.segmented == 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  13302. key: 4,
  13303. class: "parameter_box"
  13304. }, [
  13305. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  13306. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13307. vue.createElementVNode(
  13308. "view",
  13309. { class: "parameter_zheng12" },
  13310. vue.toDisplayString(_ctx.$t("WorkingMode")),
  13311. 1
  13312. /* TEXT */
  13313. ),
  13314. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13315. vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
  13316. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
  13317. _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
  13318. "view",
  13319. { key: 0 },
  13320. vue.toDisplayString(_ctx.$t("OffMode")),
  13321. 1
  13322. /* TEXT */
  13323. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
  13324. "view",
  13325. { key: 1 },
  13326. vue.toDisplayString(_ctx.$t("CoolingMode")),
  13327. 1
  13328. /* TEXT */
  13329. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
  13330. "view",
  13331. { key: 2 },
  13332. vue.toDisplayString(_ctx.$t("HeatingMode")),
  13333. 1
  13334. /* TEXT */
  13335. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
  13336. "view",
  13337. { key: 3 },
  13338. vue.toDisplayString(_ctx.$t("CirculatingMode")),
  13339. 1
  13340. /* TEXT */
  13341. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  13342. ])
  13343. ]),
  13344. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13345. vue.createElementVNode(
  13346. "view",
  13347. { class: "parameter_zheng12" },
  13348. vue.toDisplayString(_ctx.$t("OutletTemperature")),
  13349. 1
  13350. /* TEXT */
  13351. ),
  13352. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13353. vue.createTextVNode(
  13354. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
  13355. 1
  13356. /* TEXT */
  13357. ),
  13358. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  13359. ])
  13360. ]),
  13361. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13362. vue.createElementVNode("view", {
  13363. class: "parameter_zheng12",
  13364. style: { "height": "30px" }
  13365. }, [
  13366. vue.createCommentVNode(" {{$t('PowerDemand')}} ")
  13367. ]),
  13368. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  13369. {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text\r
  13370. class="parameter_zheng14">kW</text>\r
  13371. </view> `)
  13372. ])
  13373. ]),
  13374. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  13375. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13376. vue.createElementVNode(
  13377. "view",
  13378. { class: "parameter_zheng12" },
  13379. vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
  13380. 1
  13381. /* TEXT */
  13382. ),
  13383. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13384. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
  13385. _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
  13386. "view",
  13387. { key: 0 },
  13388. vue.toDisplayString(_ctx.$t("DisconnectedState")),
  13389. 1
  13390. /* TEXT */
  13391. )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
  13392. "view",
  13393. { key: 1 },
  13394. vue.toDisplayString(_ctx.$t("ClosedState")),
  13395. 1
  13396. /* TEXT */
  13397. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
  13398. ])
  13399. ]),
  13400. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13401. vue.createElementVNode(
  13402. "view",
  13403. { class: "parameter_zheng12" },
  13404. vue.toDisplayString(_ctx.$t("waterTemperature")),
  13405. 1
  13406. /* TEXT */
  13407. ),
  13408. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13409. vue.createTextVNode(
  13410. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
  13411. 1
  13412. /* TEXT */
  13413. ),
  13414. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  13415. ])
  13416. ]),
  13417. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13418. vue.createElementVNode("view", {
  13419. class: "parameter_zheng12",
  13420. style: { "height": "30px" }
  13421. }, [
  13422. vue.createCommentVNode(" {{$t('FaultLevel')}} ")
  13423. ]),
  13424. vue.createCommentVNode(` \r
  13425. <view class="parameter_Batterystate">\r
  13426. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
  13427. {{$t('NoMalfunction')}}\r
  13428. </view>\r
  13429. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
  13430. 1{{$t('LevelLault')}}\r
  13431. </view>\r
  13432. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
  13433. 2{{$t('LevelLault')}}\r
  13434. </view>\r
  13435. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
  13436. 3{{$t('LevelLault')}}\r
  13437. </view>\r
  13438. <view v-else>\r
  13439. —\r
  13440. </view>\r
  13441. </view> `)
  13442. ])
  13443. ])
  13444. ])) : vue.createCommentVNode("v-if", true),
  13445. this.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  13446. key: 5,
  13447. class: "parameter_zheng3"
  13448. }, [
  13449. _ctx.uidatasdata.SysControl_Gun1RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  13450. key: 0,
  13451. class: "parameter_zheng31111",
  13452. onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
  13453. }, [
  13454. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13455. vue.createElementVNode(
  13456. "view",
  13457. { class: "parameter_zheng32" },
  13458. vue.toDisplayString(_ctx.$t("open")),
  13459. 1
  13460. /* TEXT */
  13461. )
  13462. ])
  13463. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  13464. key: 1,
  13465. class: "parameter_zheng31111"
  13466. }, [
  13467. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13468. vue.createElementVNode(
  13469. "view",
  13470. { class: "parameter_zheng32ccc" },
  13471. vue.toDisplayString(_ctx.$t("open")),
  13472. 1
  13473. /* TEXT */
  13474. )
  13475. ])
  13476. ])),
  13477. _ctx.uidatasdata.SysControl_Gun1RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  13478. key: 2,
  13479. class: "parameter_zheng31111",
  13480. onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args))
  13481. }, [
  13482. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13483. vue.createElementVNode(
  13484. "view",
  13485. { class: "parameter_zheng33" },
  13486. vue.toDisplayString(_ctx.$t("stopIt")),
  13487. 1
  13488. /* TEXT */
  13489. )
  13490. ])
  13491. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  13492. key: 3,
  13493. class: "parameter_zheng31111"
  13494. }, [
  13495. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13496. vue.createElementVNode(
  13497. "view",
  13498. { class: "parameter_zheng32ccc" },
  13499. vue.toDisplayString(_ctx.$t("stopIt")),
  13500. 1
  13501. /* TEXT */
  13502. )
  13503. ])
  13504. ]))
  13505. ])) : vue.createCommentVNode("v-if", true),
  13506. this.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  13507. key: 6,
  13508. class: "parameter_zheng3"
  13509. }, [
  13510. _ctx.uidatasdata.SysControl_Gun2RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  13511. key: 0,
  13512. class: "parameter_zheng31111",
  13513. onClick: _cache[6] || (_cache[6] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
  13514. }, [
  13515. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13516. vue.createElementVNode(
  13517. "view",
  13518. { class: "parameter_zheng32" },
  13519. vue.toDisplayString(_ctx.$t("open")),
  13520. 1
  13521. /* TEXT */
  13522. )
  13523. ])
  13524. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  13525. key: 1,
  13526. class: "parameter_zheng31111"
  13527. }, [
  13528. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13529. vue.createElementVNode(
  13530. "view",
  13531. { class: "parameter_zheng32ccc" },
  13532. vue.toDisplayString(_ctx.$t("open")),
  13533. 1
  13534. /* TEXT */
  13535. )
  13536. ])
  13537. ])),
  13538. _ctx.uidatasdata.SysControl_Gun2RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  13539. key: 2,
  13540. class: "parameter_zheng31111",
  13541. onClick: _cache[7] || (_cache[7] = (...args) => $options.onstopit && $options.onstopit(...args))
  13542. }, [
  13543. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13544. vue.createElementVNode(
  13545. "view",
  13546. { class: "parameter_zheng33" },
  13547. vue.toDisplayString(_ctx.$t("stopIt")),
  13548. 1
  13549. /* TEXT */
  13550. )
  13551. ])
  13552. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  13553. key: 3,
  13554. class: "parameter_zheng31111"
  13555. }, [
  13556. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13557. vue.createElementVNode(
  13558. "view",
  13559. { class: "parameter_zheng32ccc" },
  13560. vue.toDisplayString(_ctx.$t("stopIt")),
  13561. 1
  13562. /* TEXT */
  13563. )
  13564. ])
  13565. ]))
  13566. ])) : vue.createCommentVNode("v-if", true)
  13567. ]),
  13568. vue.createElementVNode("view", { class: "parameter_home" }, [
  13569. vue.createElementVNode("view", {
  13570. class: "parameter_home1",
  13571. onClick: _cache[8] || (_cache[8] = (...args) => $options.onreturn && $options.onreturn(...args))
  13572. }, [
  13573. vue.createElementVNode("image", {
  13574. src: _imports_1$1,
  13575. mode: ""
  13576. }),
  13577. vue.createElementVNode(
  13578. "text",
  13579. { class: "parameter_hometext" },
  13580. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  13581. 1
  13582. /* TEXT */
  13583. )
  13584. ]),
  13585. vue.createElementVNode("view", { class: "parameter_home2" }, [
  13586. vue.createElementVNode("image", {
  13587. src: _imports_10,
  13588. mode: ""
  13589. }),
  13590. vue.createElementVNode("swiper", {
  13591. class: "swiper",
  13592. circular: "",
  13593. autoplay: true,
  13594. interval: 2e3,
  13595. duration: 500,
  13596. vertical: true
  13597. }, [
  13598. (vue.openBlock(true), vue.createElementBlock(
  13599. vue.Fragment,
  13600. null,
  13601. vue.renderList($data.faultsdata, (item, index) => {
  13602. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
  13603. vue.createElementVNode(
  13604. "view",
  13605. { class: "parameter_home3" },
  13606. vue.toDisplayString(item["CONTENT"]),
  13607. 1
  13608. /* TEXT */
  13609. )
  13610. ]);
  13611. }),
  13612. 128
  13613. /* KEYED_FRAGMENT */
  13614. ))
  13615. ])
  13616. ])
  13617. ])
  13618. ])
  13619. ]),
  13620. vue.createVNode(
  13621. _component_uni_popup,
  13622. { ref: "alertDialog" },
  13623. {
  13624. default: vue.withCtx(() => [
  13625. vue.createVNode(_component_uni_popup_dialog, {
  13626. mode: $data.modeinput,
  13627. placeholder: "请输入内容",
  13628. modelValue: $data.value,
  13629. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.value = $event),
  13630. type: $data.successtype,
  13631. cancelText: _ctx.$t("CancelReturn"),
  13632. confirmText: $data.confirmText,
  13633. title: $data.title,
  13634. content: $data.content,
  13635. onConfirm: $options.dialogConfirm,
  13636. onClose: $options.dialogClose
  13637. }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
  13638. ]),
  13639. _: 1
  13640. /* STABLE */
  13641. },
  13642. 512
  13643. /* NEED_PATCH */
  13644. )
  13645. ]);
  13646. }
  13647. const PagesSupplyssSupplyss = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-0d60935b"], ["__file", "D:/project/esswisdom_ipad/pages/supplyss/supplyss.vue"]]);
  13648. const _imports_1 = "/static/faultlist.png";
  13649. const _imports_2 = "/static/fault.png";
  13650. const _imports_3 = "/static/event.png";
  13651. const _imports_4 = "/static/Basics.png";
  13652. const _sfc_main$2 = {
  13653. data() {
  13654. return {};
  13655. },
  13656. onLoad() {
  13657. },
  13658. computed: {
  13659. // 使用 mapState 映射多个状态到组件的计算属性
  13660. ...mapState(["formattedTime", "status"])
  13661. },
  13662. beforeUnmount() {
  13663. },
  13664. methods: {
  13665. // 返回首页
  13666. onreturn(e2) {
  13667. formatAppLog("log", "at pages/faultlist/index.vue:109", e2);
  13668. this.$store.commit("getevent", e2);
  13669. if (e2 == "基础") {
  13670. uni.redirectTo({
  13671. url: "/pages/SYSifo/index"
  13672. });
  13673. } else {
  13674. uni.redirectTo({
  13675. url: "/pages/details/index"
  13676. });
  13677. }
  13678. },
  13679. onclick() {
  13680. uni.redirectTo({
  13681. url: "/pages/index/index"
  13682. });
  13683. }
  13684. }
  13685. };
  13686. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  13687. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  13688. vue.createElementVNode("view", { class: "top" }, [
  13689. vue.createElementVNode("image", {
  13690. class: "top_logo",
  13691. src: _imports_0,
  13692. mode: ""
  13693. }),
  13694. vue.createCommentVNode(' <image class="tite" src="../../static/tite.png" mode=""></image> '),
  13695. vue.createElementVNode(
  13696. "view",
  13697. { class: "tite" },
  13698. vue.toDisplayString(_ctx.$t("MainTitle")),
  13699. 1
  13700. /* TEXT */
  13701. ),
  13702. vue.createElementVNode("view", { class: "time" }, [
  13703. vue.createElementVNode(
  13704. "view",
  13705. { class: "time_top" },
  13706. vue.toDisplayString(_ctx.formattedTime),
  13707. 1
  13708. /* TEXT */
  13709. ),
  13710. vue.createElementVNode("view", { class: "time_bottom" }, [
  13711. vue.createElementVNode("view"),
  13712. vue.createElementVNode("view", { class: "time_bottom1" }, [
  13713. vue.createTextVNode(
  13714. vue.toDisplayString(_ctx.$t("status")) + " ",
  13715. 1
  13716. /* TEXT */
  13717. ),
  13718. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  13719. "view",
  13720. {
  13721. key: 0,
  13722. class: "time_state"
  13723. },
  13724. vue.toDisplayString(_ctx.$t("online")),
  13725. 1
  13726. /* TEXT */
  13727. )) : (vue.openBlock(), vue.createElementBlock(
  13728. "view",
  13729. {
  13730. key: 1,
  13731. class: "time_state1"
  13732. },
  13733. vue.toDisplayString(_ctx.$t("offline")),
  13734. 1
  13735. /* TEXT */
  13736. ))
  13737. ])
  13738. ])
  13739. ])
  13740. ]),
  13741. vue.createElementVNode("view", { class: "parameter" }, [
  13742. vue.createElementVNode("view", { class: "parameter_list" }, [
  13743. vue.createElementVNode("view", {
  13744. class: "parameter_box",
  13745. onClick: _cache[0] || (_cache[0] = ($event) => $options.onreturn("故障"))
  13746. }, [
  13747. vue.createElementVNode("view", { class: "parameter_list1" }, [
  13748. vue.createElementVNode("image", {
  13749. src: _imports_1,
  13750. mode: ""
  13751. })
  13752. ]),
  13753. vue.createElementVNode(
  13754. "view",
  13755. { class: "fault_txt" },
  13756. vue.toDisplayString(_ctx.$t("FaultRec")),
  13757. 1
  13758. /* TEXT */
  13759. )
  13760. ]),
  13761. vue.createElementVNode("view", {
  13762. class: "parameter_box",
  13763. onClick: _cache[1] || (_cache[1] = ($event) => $options.onreturn("告警"))
  13764. }, [
  13765. vue.createElementVNode("view", { class: "parameter_list1" }, [
  13766. vue.createElementVNode("image", {
  13767. src: _imports_2,
  13768. mode: ""
  13769. })
  13770. ]),
  13771. vue.createElementVNode(
  13772. "view",
  13773. { class: "fault_txt" },
  13774. vue.toDisplayString(_ctx.$t("WarningRec")),
  13775. 1
  13776. /* TEXT */
  13777. )
  13778. ]),
  13779. vue.createElementVNode("view", {
  13780. class: "parameter_box",
  13781. onClick: _cache[2] || (_cache[2] = ($event) => $options.onreturn("事件"))
  13782. }, [
  13783. vue.createElementVNode("view", { class: "parameter_list1" }, [
  13784. vue.createElementVNode("image", {
  13785. src: _imports_3,
  13786. mode: ""
  13787. })
  13788. ]),
  13789. vue.createElementVNode(
  13790. "view",
  13791. { class: "fault_txt" },
  13792. vue.toDisplayString(_ctx.$t("RunningRec")),
  13793. 1
  13794. /* TEXT */
  13795. )
  13796. ]),
  13797. vue.createElementVNode("view", {
  13798. class: "parameter_box",
  13799. onClick: _cache[3] || (_cache[3] = ($event) => $options.onreturn("基础"))
  13800. }, [
  13801. vue.createElementVNode("view", { class: "parameter_list1" }, [
  13802. vue.createElementVNode("image", {
  13803. src: _imports_4,
  13804. mode: ""
  13805. })
  13806. ]),
  13807. vue.createElementVNode(
  13808. "view",
  13809. { class: "fault_txt" },
  13810. vue.toDisplayString(_ctx.$t("SYSIfo")),
  13811. 1
  13812. /* TEXT */
  13813. )
  13814. ])
  13815. ])
  13816. ]),
  13817. vue.createElementVNode("view", { class: "parameter_bottom" }, [
  13818. vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [
  13819. vue.createElementVNode("view", {
  13820. class: "parameter_bottom1",
  13821. onClick: _cache[4] || (_cache[4] = (...args) => $options.onclick && $options.onclick(...args))
  13822. }, [
  13823. vue.createElementVNode("image", {
  13824. src: _imports_1$1,
  13825. mode: ""
  13826. }),
  13827. vue.createElementVNode(
  13828. "text",
  13829. { class: "parameter_bottom2" },
  13830. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  13831. 1
  13832. /* TEXT */
  13833. )
  13834. ])
  13835. ])
  13836. ])
  13837. ]);
  13838. }
  13839. const PagesFaultlistIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-108f6e37"], ["__file", "D:/project/esswisdom_ipad/pages/faultlist/index.vue"]]);
  13840. const _sfc_main$1 = {
  13841. data() {
  13842. return {};
  13843. },
  13844. onLoad() {
  13845. },
  13846. computed: {
  13847. // 使用 mapState 映射多个状态到组件的计算属性
  13848. ...mapState(["formattedTime", "status"]),
  13849. backgroundStyle() {
  13850. return {
  13851. backgroundImage: `url(${this.$t("offline")})`,
  13852. backgroundSize: "100% 100%"
  13853. };
  13854. }
  13855. },
  13856. beforeUnmount() {
  13857. },
  13858. methods: {
  13859. onclick() {
  13860. uni.redirectTo({
  13861. url: "/pages/index/index"
  13862. });
  13863. },
  13864. onReturn() {
  13865. uni.redirectTo({
  13866. url: "/pages/faultlist/index"
  13867. });
  13868. }
  13869. }
  13870. };
  13871. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  13872. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  13873. vue.createElementVNode("view", { class: "top" }, [
  13874. vue.createElementVNode("image", {
  13875. class: "top_logo",
  13876. src: _imports_0,
  13877. mode: ""
  13878. }),
  13879. vue.createCommentVNode(' <image class="tite" src="../../static/tite.png" mode=""></image> '),
  13880. vue.createElementVNode(
  13881. "view",
  13882. { class: "tite" },
  13883. vue.toDisplayString(_ctx.$t("MainTitle")),
  13884. 1
  13885. /* TEXT */
  13886. ),
  13887. vue.createElementVNode("view", { class: "time" }, [
  13888. vue.createElementVNode(
  13889. "view",
  13890. { class: "time_top" },
  13891. vue.toDisplayString(_ctx.formattedTime),
  13892. 1
  13893. /* TEXT */
  13894. ),
  13895. vue.createElementVNode("view", { class: "time_bottom" }, [
  13896. vue.createElementVNode("view"),
  13897. vue.createElementVNode("view", { class: "time_bottom1" }, [
  13898. vue.createTextVNode(
  13899. vue.toDisplayString(_ctx.$t("status")) + " ",
  13900. 1
  13901. /* TEXT */
  13902. ),
  13903. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  13904. "view",
  13905. {
  13906. key: 0,
  13907. class: "time_state"
  13908. },
  13909. vue.toDisplayString(_ctx.$t("online")),
  13910. 1
  13911. /* TEXT */
  13912. )) : (vue.openBlock(), vue.createElementBlock(
  13913. "view",
  13914. {
  13915. key: 1,
  13916. class: "time_state1"
  13917. },
  13918. vue.toDisplayString(_ctx.$t("offline")),
  13919. 1
  13920. /* TEXT */
  13921. ))
  13922. ])
  13923. ])
  13924. ])
  13925. ]),
  13926. vue.createElementVNode("view", { class: "parameter" }, [
  13927. vue.createElementVNode("image", {
  13928. class: "parameter_list",
  13929. src: _ctx.$t("sysifoURL"),
  13930. mode: ""
  13931. }, null, 8, ["src"])
  13932. ]),
  13933. vue.createElementVNode("view", { class: "parameter_bottom" }, [
  13934. vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [
  13935. vue.createElementVNode("view", {
  13936. class: "parameter_bottom1",
  13937. onClick: _cache[0] || (_cache[0] = (...args) => $options.onclick && $options.onclick(...args))
  13938. }, [
  13939. vue.createElementVNode("image", {
  13940. src: _imports_1$1,
  13941. mode: ""
  13942. }),
  13943. vue.createElementVNode(
  13944. "text",
  13945. { class: "parameter_bottom2" },
  13946. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  13947. 1
  13948. /* TEXT */
  13949. )
  13950. ]),
  13951. vue.createElementVNode("view", {
  13952. class: "parameter_bottom11",
  13953. onClick: _cache[1] || (_cache[1] = (...args) => $options.onReturn && $options.onReturn(...args))
  13954. }, [
  13955. vue.createElementVNode("image", {
  13956. src: _imports_2$1,
  13957. mode: ""
  13958. }),
  13959. vue.createElementVNode(
  13960. "text",
  13961. { class: "parameter_bottom2" },
  13962. vue.toDisplayString(_ctx.$t("Return")),
  13963. 1
  13964. /* TEXT */
  13965. )
  13966. ])
  13967. ])
  13968. ])
  13969. ]);
  13970. }
  13971. const PagesSYSifoIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-b487f3c0"], ["__file", "D:/project/esswisdom_ipad/pages/SYSifo/index.vue"]]);
  13972. __definePage("pages/index/index", PagesIndexIndex);
  13973. __definePage("pages/home/index", PagesHomeIndex);
  13974. __definePage("pages/details/index", PagesDetailsIndex);
  13975. __definePage("pages/electricity/index", PagesElectricityIndex);
  13976. __definePage("pages/supply/supply", PagesSupplySupply);
  13977. __definePage("pages/supplyss/supplyss", PagesSupplyssSupplyss);
  13978. __definePage("pages/faultlist/index", PagesFaultlistIndex);
  13979. __definePage("pages/SYSifo/index", PagesSYSifoIndex);
  13980. const _sfc_main = {
  13981. data() {
  13982. return {
  13983. // uidatas:''
  13984. };
  13985. },
  13986. computed: {},
  13987. onLaunch: function() {
  13988. plus.navigator.setFullscreen(true);
  13989. plus.navigator.hideSystemNavigation();
  13990. },
  13991. mounted() {
  13992. this.$store.dispatch("startClock");
  13993. this.$store.dispatch("fetchFaultsList");
  13994. },
  13995. beforeUnmount() {
  13996. },
  13997. methods: {},
  13998. onShow: function() {
  13999. formatAppLog("log", "at App.vue:37", "App Show");
  14000. },
  14001. onHide: function() {
  14002. formatAppLog("log", "at App.vue:40", "App Hide");
  14003. }
  14004. };
  14005. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/project/esswisdom_ipad/App.vue"]]);
  14006. const Store = createStore({
  14007. state: {
  14008. formattedTime: getTime("yyyy-MM-dd hh:mm:ss"),
  14009. uidatasdata: {},
  14010. selectorid: null,
  14011. selectorindex: null,
  14012. status: null,
  14013. num: 0,
  14014. event: "故障"
  14015. },
  14016. mutations: {
  14017. increment(state2, n2) {
  14018. if (n2 == 1) {
  14019. state2.num++;
  14020. } else {
  14021. state2.num = 0;
  14022. }
  14023. },
  14024. getevent(state2, event) {
  14025. state2.event = event;
  14026. },
  14027. setFormattedTime(state2, time) {
  14028. state2.formattedTime = time;
  14029. },
  14030. setUidatasData(state2, data) {
  14031. state2.uidatasdata = data;
  14032. },
  14033. setstatus(state2, status2) {
  14034. state2.status = status2;
  14035. },
  14036. setSelectorId(state2, id) {
  14037. state2.selectorid = id;
  14038. },
  14039. setSelectorIndex(state2, index) {
  14040. state2.selectorindex = index;
  14041. }
  14042. },
  14043. actions: {
  14044. startClock({
  14045. commit
  14046. }) {
  14047. setInterval(() => {
  14048. const customFormat = "yyyy-MM-dd hh:mm:ss";
  14049. const formattedTime = getTime(customFormat);
  14050. commit("setFormattedTime", formattedTime);
  14051. }, 1e3);
  14052. },
  14053. async fetchFaultsList({
  14054. commit,
  14055. state: state2
  14056. }) {
  14057. try {
  14058. let data = {
  14059. id: "3224a3eb-2375-4dfc-99ce-b182edd30996",
  14060. page: 1,
  14061. rows: 1e4
  14062. };
  14063. const response2 = await getuidatas(data);
  14064. if (response2.status == "ok") {
  14065. if (response2.data != null && response2.data != []) {
  14066. const uidatasdata = response2.data.reduce((obj, item) => {
  14067. let a2 = item.module;
  14068. let b2 = item[a2];
  14069. let numericValue = parseFloat(b2);
  14070. let roundedValue = "";
  14071. if (item.id == "BatCellVPeak_ValMaxCellVoltage" || item.id == "BatCellVPeak_ValMinCellVoltage" || item.id == "PCSTotalOutputPower") {
  14072. roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(3);
  14073. } else {
  14074. if (item.id == "CellTemperatureLimitsStatus_MaxTemp" || item.id == "CellTemperatureLimitsStatus_MinTemp" || item.id == "TMS_Status_TMS_WATEROUT_TEMP" || item.id == "TMS_Status_TMS_WATERIN_TEMP") {
  14075. roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(1);
  14076. } else {
  14077. if (item.id == "SOC" || item.id == "ChargingStation_1_telemetryFrameccu_EstimateTheRemainingChargingTime" || item.id == "ChargingStation_2_telemetryFrameccu_EstimateTheRemainingChargingTime") {
  14078. roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(0);
  14079. } else {
  14080. if (item.id == "PCSPortAPhaseVoltage" || item.id == "PCSPortBPhaseVoltage" || item.id == "PCSPortCPhaseVoltage" || item.id == "PCSOutputA-phaseCurrent" || item.id == "PCSOutputB-phaseCurrent" || item.id == "PCSOutputC-phaseCurrent") {
  14081. roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(2);
  14082. } else {
  14083. roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(1);
  14084. }
  14085. }
  14086. }
  14087. }
  14088. if (!isNaN(numericValue) && numericValue < 0) {
  14089. roundedValue = Math.abs(numericValue);
  14090. }
  14091. return {
  14092. ...obj,
  14093. [item.id]: roundedValue
  14094. };
  14095. }, {});
  14096. commit("setUidatasData", uidatasdata);
  14097. if (uidatasdata.SysControl_RunCmd == 1 || uidatasdata.SysControl_Gun1RunCmd == 1 || uidatasdata.SysControl_Gun2RunCmd == 1) {
  14098. commit("setSelectorId", uidatasdata.SysInstall_EssRunModeManual);
  14099. commit("setSelectorIndex", 1);
  14100. } else {
  14101. commit("setSelectorId", null);
  14102. commit("setSelectorIndex", null);
  14103. }
  14104. if (state2.num >= 3) {
  14105. commit("increment", 0);
  14106. commit("setstatus", response2.status);
  14107. }
  14108. commit("increment", 1);
  14109. } else {
  14110. if (state2.num >= 3) {
  14111. commit("increment", 0);
  14112. commit("setstatus", "NO");
  14113. }
  14114. commit("increment", 1);
  14115. }
  14116. } else {
  14117. }
  14118. } catch (error) {
  14119. formatAppLog("log", "at store/index.js:151", error);
  14120. commit("setstatus", "NO");
  14121. } finally {
  14122. setTimeout(() => {
  14123. this.dispatch("fetchFaultsList");
  14124. }, 2e3);
  14125. }
  14126. }
  14127. }
  14128. });
  14129. const MainTitle$1 = "Mobile Ev Charger";
  14130. const status$1 = "SYS Staus:";
  14131. const version$1 = "version";
  14132. const CommunicationRecharge$2 = "AC IN";
  14133. const CommunicationRechargeInput$1 = "AC Input";
  14134. const CommunicationSupply$2 = "AC OUT";
  14135. const CommunicationSupplyOutput$1 = "AC Output";
  14136. const DirectRecharge$2 = "DC IN";
  14137. const DirectRechargeInput$1 = "DC Input";
  14138. const DirectSupply$2 = "DC OUT";
  14139. const DirectSupplyOutput$1 = "DC Output";
  14140. const SystemInformation$1 = "SYS Info";
  14141. const state$1 = "Breaker";
  14142. const state163A$1 = "Breaker1 63A";
  14143. const state63A2$1 = "Breaker2 63A";
  14144. const state125A$1 = "Breaker1 125A";
  14145. const state63A$1 = "Breaker2 63A";
  14146. const state16A$1 = "Breaker3 16A";
  14147. const online$1 = "ON Line";
  14148. const offline$1 = "Off Line";
  14149. const connect$1 = "ON";
  14150. const breakoff$1 = "OFF";
  14151. const workingCondition$1 = "Running Status";
  14152. const StandbyMode$1 = "Standby";
  14153. const work$1 = "Running";
  14154. const ChargingCompleted$1 = "Finished";
  14155. const ChargingPause$1 = "Pause";
  14156. const BatteryStatus$1 = "BAT Status";
  14157. const fault$1 = "Fault";
  14158. const ChuShiHua$1 = "Available";
  14159. const SystemStatus$1 = "SYS Status";
  14160. const NotupyetVoltage$1 = "Ready";
  14161. const HighVoltageMedium$1 = "Unknown";
  14162. const voltagehasbeen$1 = "Connected";
  14163. const Underhighpressure$1 = "Unknown";
  14164. const uncharged$1 = "Unavailable";
  14165. const Chargingprogress$1 = "Discharge";
  14166. const Chargingmalfunction$1 = "AC charge";
  14167. const full$1 = "DC Charge";
  14168. const retain$1 = "Retain";
  14169. const GunAinformation$1 = "A Gun";
  14170. const GunBinformation$1 = "B Gun";
  14171. const exchangeinformation$1 = "AC Info";
  14172. const Batteryinformation$1 = "BAT Info";
  14173. const statisticalinformation$1 = "Running Info";
  14174. const coolinginformation$1 = "TMS Info";
  14175. const PhaseVoltage = "Phase";
  14176. const PhaseVoltageAV$1 = "Phase A";
  14177. const PhaseVoltageBV$1 = "Phase B";
  14178. const PhaseVoltageCV$1 = "Phase C";
  14179. const PhaseVoltageAA$1 = "Phase A";
  14180. const PhaseVoltageBA$1 = "Phase B";
  14181. const PhaseVoltageCA$1 = "Phase C";
  14182. const powerSupply$1 = "Power Input";
  14183. const DischargeCapacity$1 = "Power Output";
  14184. const PhaseCurrent$1 = "Phase";
  14185. const DischargePower$1 = "Power Output";
  14186. const Supplementarypower$1 = "Power Input";
  14187. const TotalPressure$1 = "BAT Voltage";
  14188. const AllowChargingPower$1 = "Max Power";
  14189. const MaximumVoltage$1 = "Max Cell";
  14190. const MaximumTemperature$1 = "Max Temp";
  14191. const BatteryCurrent$1 = "BAT Current";
  14192. const AllowChargingCurrent$1 = "Max Current";
  14193. const MinimumIndividualVoltage$1 = "Mini Cell";
  14194. const MinimumMonomerTemperature$1 = "Mini Temp";
  14195. const invalid$1 = "Unavailable";
  14196. const DischargeMode$1 = "Discharge";
  14197. const pcsChargingMode$1 = "AC charge";
  14198. const EuropeanStandardChargingMode$1 = "DC Charge";
  14199. const WorkingMode$1 = "Running Mode";
  14200. const OffMode$1 = "Standby";
  14201. const CoolingMode$1 = "Cooling";
  14202. const HeatingMode$1 = "Heating";
  14203. const CirculatingMode$1 = "Self Loop";
  14204. const NO$1 = "NO";
  14205. const OutletTemperature$1 = "Outlets";
  14206. const HighVoltageRelayStatus$1 = "TMS Relay";
  14207. const DisconnectedState$1 = "Disconnected state";
  14208. const ClosedState$1 = "Closed state";
  14209. const waterTemperature$1 = "Inlets";
  14210. const open$1 = "Start";
  14211. const stopIt$1 = "Stop";
  14212. const power$1 = "AC";
  14213. const given$1 = "IN";
  14214. const powergiven$1 = "Power";
  14215. const ACinputpowergiven$1 = "AC input Power";
  14216. const confirm$1 = "ok";
  14217. const ReturnModeSelection$1 = "Back to Home";
  14218. const Return$1 = "Return";
  14219. const CancelReturn$1 = "Back";
  14220. const ConfirmStart$1 = "ok";
  14221. const ConfirmStop$1 = "ok";
  14222. const popUpTitle$1 = "Tips";
  14223. const popUpTitleStop$1 = "Tips";
  14224. const popUpContent$1 = "Are you sure to START the iTrailer?";
  14225. const popUpContentStop$1 = "Are you sure to STOp the iTrailer?";
  14226. const ACRechargeelectricitytext$1 = "When AC power is replenished, all AC output terminals should be disconnected";
  14227. const ACpowerSupplytext$1 = "When AC power is supplied, all AC input terminals should be disconnected";
  14228. const OperationSuccessful$1 = "Operation successful";
  14229. const operationFailed$1 = "operation failed";
  14230. const ChargingPower$1 = "Input Power";
  14231. const ChargingVoltage$1 = "Charing Voltage";
  14232. const ChargingCurrent$1 = "Charing Current";
  14233. const VehicleSOC$1 = "EV SOC";
  14234. const ChargingCapacity$1 = "Charging capacity";
  14235. const CharingPower$1 = "Charing Power";
  14236. const ChargingFee$1 = "Charing Fee";
  14237. const USD$1 = "USD";
  14238. const ChargingTime$1 = "Unknown";
  14239. const AllowableDischargepower$1 = "Max Power";
  14240. const AllowDischargeCurrent$1 = "Max Current";
  14241. const ConnectionStatus$1 = "Link Status";
  14242. const formNO$1 = "NO";
  14243. const formFailure$1 = "Failure";
  14244. const formUnit$1 = "Unit";
  14245. const formDescription$1 = "Description";
  14246. const formRecover$1 = "Recover";
  14247. const FaultRec$1 = "Fault Rec";
  14248. const WarningRec$1 = "Warning Rec";
  14249. const RunningRec$1 = "Running Rec";
  14250. const SYSIfo$1 = "SYS Ifo";
  14251. const FaultClearing$1 = "Recover";
  14252. const LastPage$1 = "Last page";
  14253. const NextPage$1 = "Next page";
  14254. const RunningTimes$1 = "Running Times";
  14255. const InputCapacity$1 = "Input capacity";
  14256. const AccumulateInput$1 = "Accumulate Input";
  14257. const RunningTimesdischarge$1 = "Running Times";
  14258. const InputCapacitydischarge$1 = "Output capacity";
  14259. const AccumulateInputdischarge$1 = "Accumulate Output";
  14260. const RunningTimesmin$1 = "min";
  14261. const sysifoURL$1 = "../../static/enBasicdata3.png";
  14262. const Tipswarning$1 = "Only a mode can be used at the same time";
  14263. const en = {
  14264. MainTitle: MainTitle$1,
  14265. status: status$1,
  14266. version: version$1,
  14267. CommunicationRecharge: CommunicationRecharge$2,
  14268. CommunicationRechargeInput: CommunicationRechargeInput$1,
  14269. CommunicationSupply: CommunicationSupply$2,
  14270. CommunicationSupplyOutput: CommunicationSupplyOutput$1,
  14271. DirectRecharge: DirectRecharge$2,
  14272. DirectRechargeInput: DirectRechargeInput$1,
  14273. DirectSupply: DirectSupply$2,
  14274. DirectSupplyOutput: DirectSupplyOutput$1,
  14275. SystemInformation: SystemInformation$1,
  14276. state: state$1,
  14277. state163A: state163A$1,
  14278. state63A2: state63A2$1,
  14279. state125A: state125A$1,
  14280. state63A: state63A$1,
  14281. state16A: state16A$1,
  14282. online: online$1,
  14283. offline: offline$1,
  14284. connect: connect$1,
  14285. breakoff: breakoff$1,
  14286. workingCondition: workingCondition$1,
  14287. StandbyMode: StandbyMode$1,
  14288. work: work$1,
  14289. ChargingCompleted: ChargingCompleted$1,
  14290. ChargingPause: ChargingPause$1,
  14291. BatteryStatus: BatteryStatus$1,
  14292. fault: fault$1,
  14293. ChuShiHua: ChuShiHua$1,
  14294. SystemStatus: SystemStatus$1,
  14295. NotupyetVoltage: NotupyetVoltage$1,
  14296. HighVoltageMedium: HighVoltageMedium$1,
  14297. voltagehasbeen: voltagehasbeen$1,
  14298. Underhighpressure: Underhighpressure$1,
  14299. uncharged: uncharged$1,
  14300. Chargingprogress: Chargingprogress$1,
  14301. Chargingmalfunction: Chargingmalfunction$1,
  14302. full: full$1,
  14303. retain: retain$1,
  14304. GunAinformation: GunAinformation$1,
  14305. GunBinformation: GunBinformation$1,
  14306. exchangeinformation: exchangeinformation$1,
  14307. Batteryinformation: Batteryinformation$1,
  14308. statisticalinformation: statisticalinformation$1,
  14309. coolinginformation: coolinginformation$1,
  14310. PhaseVoltage,
  14311. PhaseVoltageAV: PhaseVoltageAV$1,
  14312. PhaseVoltageBV: PhaseVoltageBV$1,
  14313. PhaseVoltageCV: PhaseVoltageCV$1,
  14314. PhaseVoltageAA: PhaseVoltageAA$1,
  14315. PhaseVoltageBA: PhaseVoltageBA$1,
  14316. PhaseVoltageCA: PhaseVoltageCA$1,
  14317. powerSupply: powerSupply$1,
  14318. DischargeCapacity: DischargeCapacity$1,
  14319. PhaseCurrent: PhaseCurrent$1,
  14320. DischargePower: DischargePower$1,
  14321. Supplementarypower: Supplementarypower$1,
  14322. TotalPressure: TotalPressure$1,
  14323. AllowChargingPower: AllowChargingPower$1,
  14324. MaximumVoltage: MaximumVoltage$1,
  14325. MaximumTemperature: MaximumTemperature$1,
  14326. BatteryCurrent: BatteryCurrent$1,
  14327. AllowChargingCurrent: AllowChargingCurrent$1,
  14328. MinimumIndividualVoltage: MinimumIndividualVoltage$1,
  14329. MinimumMonomerTemperature: MinimumMonomerTemperature$1,
  14330. invalid: invalid$1,
  14331. DischargeMode: DischargeMode$1,
  14332. pcsChargingMode: pcsChargingMode$1,
  14333. EuropeanStandardChargingMode: EuropeanStandardChargingMode$1,
  14334. WorkingMode: WorkingMode$1,
  14335. OffMode: OffMode$1,
  14336. CoolingMode: CoolingMode$1,
  14337. HeatingMode: HeatingMode$1,
  14338. CirculatingMode: CirculatingMode$1,
  14339. NO: NO$1,
  14340. OutletTemperature: OutletTemperature$1,
  14341. HighVoltageRelayStatus: HighVoltageRelayStatus$1,
  14342. DisconnectedState: DisconnectedState$1,
  14343. ClosedState: ClosedState$1,
  14344. waterTemperature: waterTemperature$1,
  14345. open: open$1,
  14346. stopIt: stopIt$1,
  14347. power: power$1,
  14348. given: given$1,
  14349. powergiven: powergiven$1,
  14350. ACinputpowergiven: ACinputpowergiven$1,
  14351. confirm: confirm$1,
  14352. ReturnModeSelection: ReturnModeSelection$1,
  14353. Return: Return$1,
  14354. CancelReturn: CancelReturn$1,
  14355. ConfirmStart: ConfirmStart$1,
  14356. ConfirmStop: ConfirmStop$1,
  14357. popUpTitle: popUpTitle$1,
  14358. popUpTitleStop: popUpTitleStop$1,
  14359. popUpContent: popUpContent$1,
  14360. popUpContentStop: popUpContentStop$1,
  14361. ACRechargeelectricitytext: ACRechargeelectricitytext$1,
  14362. ACpowerSupplytext: ACpowerSupplytext$1,
  14363. OperationSuccessful: OperationSuccessful$1,
  14364. operationFailed: operationFailed$1,
  14365. ChargingPower: ChargingPower$1,
  14366. ChargingVoltage: ChargingVoltage$1,
  14367. ChargingCurrent: ChargingCurrent$1,
  14368. VehicleSOC: VehicleSOC$1,
  14369. ChargingCapacity: ChargingCapacity$1,
  14370. CharingPower: CharingPower$1,
  14371. ChargingFee: ChargingFee$1,
  14372. USD: USD$1,
  14373. ChargingTime: ChargingTime$1,
  14374. AllowableDischargepower: AllowableDischargepower$1,
  14375. AllowDischargeCurrent: AllowDischargeCurrent$1,
  14376. ConnectionStatus: ConnectionStatus$1,
  14377. formNO: formNO$1,
  14378. formFailure: formFailure$1,
  14379. formUnit: formUnit$1,
  14380. formDescription: formDescription$1,
  14381. formRecover: formRecover$1,
  14382. FaultRec: FaultRec$1,
  14383. WarningRec: WarningRec$1,
  14384. RunningRec: RunningRec$1,
  14385. SYSIfo: SYSIfo$1,
  14386. FaultClearing: FaultClearing$1,
  14387. LastPage: LastPage$1,
  14388. NextPage: NextPage$1,
  14389. RunningTimes: RunningTimes$1,
  14390. InputCapacity: InputCapacity$1,
  14391. AccumulateInput: AccumulateInput$1,
  14392. RunningTimesdischarge: RunningTimesdischarge$1,
  14393. InputCapacitydischarge: InputCapacitydischarge$1,
  14394. AccumulateInputdischarge: AccumulateInputdischarge$1,
  14395. RunningTimesmin: RunningTimesmin$1,
  14396. sysifoURL: sysifoURL$1,
  14397. Tipswarning: Tipswarning$1
  14398. };
  14399. const MainTitle = "移动储能充电系统";
  14400. const status = "连接状态:";
  14401. const version = "应用版本";
  14402. const CommunicationRecharge$1 = "交流补电";
  14403. const CommunicationRechargeInput = "交流补电";
  14404. const CommunicationSupply$1 = "交流供电";
  14405. const CommunicationSupplyOutput = "交流供电";
  14406. const DirectRecharge$1 = "直流补电";
  14407. const DirectRechargeInput = "直流补电";
  14408. const DirectSupply$1 = "直流供电";
  14409. const DirectSupplyOutput = "直流供电";
  14410. const SystemInformation = "系统信息";
  14411. const state = "状态";
  14412. const state163A = "63A1状态";
  14413. const state63A2 = "63A2状态";
  14414. const state125A = "125A状态";
  14415. const state63A = "63A状态";
  14416. const state16A = "16A状态";
  14417. const online = "在线";
  14418. const offline = "离线";
  14419. const connect = "连接";
  14420. const breakoff = "断开";
  14421. const workingCondition = "工作状态";
  14422. const StandbyMode = "待机";
  14423. const work = "工作";
  14424. const ChargingCompleted = "充电完成";
  14425. const ChargingPause = "充电暂停";
  14426. const BatteryStatus = "电池状态";
  14427. const fault = "故障";
  14428. const ChuShiHua = "出始化";
  14429. const SystemStatus = "系统状态";
  14430. const NotupyetVoltage = "未上高压";
  14431. const HighVoltageMedium = "上高压中";
  14432. const voltagehasbeen = "已上高压";
  14433. const Underhighpressure = "下高压中";
  14434. const ChargingStatus = "充电状态";
  14435. const uncharged = "无效";
  14436. const Chargingprogress = "未充电";
  14437. const Chargingmalfunction = "PCS充电";
  14438. const full = "欧标充电";
  14439. const retain = "保留";
  14440. const ChargingConnectionStatus = "充电连接状态";
  14441. const FastChargingConnection = "快充连接";
  14442. const NoConnection = "无连接";
  14443. const GunAinformation = "枪A信息";
  14444. const GunBinformation = "枪B信息";
  14445. const exchangeinformation = "交流信息";
  14446. const Batteryinformation = "电池信息";
  14447. const statisticalinformation = "统计信息";
  14448. const coolinginformation = "液冷信息";
  14449. const PhaseVoltageAV = "A相电压";
  14450. const PhaseVoltageBV = "B相电压";
  14451. const PhaseVoltageCV = "C相电压";
  14452. const PhaseVoltageAA = "A相电流";
  14453. const PhaseVoltageBA = "B相电流";
  14454. const PhaseVoltageCA = "C相电流";
  14455. const powerSupply = "补电电量";
  14456. const DischargeCapacity = "放电电量";
  14457. const PhaseCurrent = "相电流";
  14458. const DischargePower = "放电功率";
  14459. const Supplementarypower = "补电功率";
  14460. const TotalPressure = "电池内总压";
  14461. const AllowChargingPower = "最大允许充电功率";
  14462. const MaximumVoltage = "最大单体电压";
  14463. const MaximumTemperature = "最大单体温度";
  14464. const BatteryCurrent = "电池总电流";
  14465. const AllowChargingCurrent = "最大允许充电电流";
  14466. const MinimumIndividualVoltage = "最小单体电压";
  14467. const MinimumMonomerTemperature = "最小单体温度";
  14468. const WorkingModeBatterySystem = "电池系统工作模式";
  14469. const invalid = "无效";
  14470. const DischargeMode = "放电模式";
  14471. const pcsChargingMode = "pcs充电模式";
  14472. const EuropeanStandardChargingMode = "欧标充电模式";
  14473. const BatterySystemStatus = "电池系统状态";
  14474. const initialization = "初始化";
  14475. const AccumulatedChargingCapacityCommunication = "交流累计充电电量";
  14476. const WorkingMode = "工作模式";
  14477. const OffMode = "待机模式";
  14478. const CoolingMode = "制冷模式";
  14479. const HeatingMode = "自热模式";
  14480. const CirculatingMode = "自循环模式";
  14481. const NO = "NO";
  14482. const OutletTemperature = "出水温度";
  14483. const PowerDemand = "需求功率";
  14484. const HighVoltageRelayStatus = "高压继电器状态";
  14485. const DisconnectedState = "OFF";
  14486. const ClosedState = "ON";
  14487. const waterTemperature = "入水温度";
  14488. const BatteryFaultLevel = "电池故障等级";
  14489. const NoMalfunction = "无故障";
  14490. const LevelLault = "级故障";
  14491. const open = "开启";
  14492. const stopIt = "停止";
  14493. const power = "功率";
  14494. const given = "给定";
  14495. const powergiven = "功率给定";
  14496. const ACinputpowergiven = "功率给定";
  14497. const confirm = "确认";
  14498. const ReturnModeSelection = "返回模式选择";
  14499. const Return = "返回上页";
  14500. const CancelReturn = "取消返回";
  14501. const ConfirmStart = "确认启动";
  14502. const ConfirmStop = "确认停止";
  14503. const popUpTitle = "你确定要开启该设备吗?";
  14504. const popUpTitleStop = "你确定要停止该设备吗?";
  14505. const popUpContent = "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!";
  14506. const popUpContentStop = "设备完全停止后,方能进行后续操作,否则可能危及生命安全!";
  14507. const ACRechargeelectricitytext = "AC补电时AC输出端应全部断开";
  14508. const ACpowerSupplytext = "AC供电时AC输入端应全部断开'";
  14509. const OperationSuccessful = "操作成功";
  14510. const operationFailed = "操作失败";
  14511. const ChargingPower = "充电功率";
  14512. const ChargingVoltage = "充电电压";
  14513. const ChargingCurrent = "充电电流";
  14514. const VehicleSOC = "车辆SOC";
  14515. const ChargingCapacity = "充电电量";
  14516. const CharingPower = "充电功率";
  14517. const ChargingFee = "充电费用";
  14518. const USD = "元";
  14519. const ChargingTime = "充电时间";
  14520. const AllowableDischargepower = "最大允许放电功率";
  14521. const AllowDischargeCurrent = "最大允许放电电流";
  14522. const ConnectionStatus = "连接状态";
  14523. const formNO = "序号";
  14524. const formUnit = "设备";
  14525. const formDescription = "内容";
  14526. const formFailure = "发生时间";
  14527. const formRecover = "恢复时间";
  14528. const FaultRec = "故障记录";
  14529. const WarningRec = "告警记录";
  14530. const RunningRec = "运行记录";
  14531. const SYSIfo = "系统信息";
  14532. const FaultClearing = "故障清除";
  14533. const LastPage = "上一页";
  14534. const NextPage = "下一页";
  14535. const RunningTimes = "本次补电时长";
  14536. const InputCapacity = "本次补电电量";
  14537. const AccumulateInput = "累计补电电量";
  14538. const RunningTimesdischarge = "本次放电时长";
  14539. const InputCapacitydischarge = "本次放电电量";
  14540. const AccumulateInputdischarge = "累计放电电量";
  14541. const RunningTimesmin = "分钟";
  14542. const sysifoURL = "../../static/zhBasicdata3.png";
  14543. const Tipswarning = "若想重新选择模式,请返回之前模式停止以后再重新选择!";
  14544. const zhHans = {
  14545. MainTitle,
  14546. status,
  14547. version,
  14548. CommunicationRecharge: CommunicationRecharge$1,
  14549. CommunicationRechargeInput,
  14550. CommunicationSupply: CommunicationSupply$1,
  14551. CommunicationSupplyOutput,
  14552. DirectRecharge: DirectRecharge$1,
  14553. DirectRechargeInput,
  14554. DirectSupply: DirectSupply$1,
  14555. DirectSupplyOutput,
  14556. SystemInformation,
  14557. state,
  14558. state163A,
  14559. state63A2,
  14560. state125A,
  14561. state63A,
  14562. state16A,
  14563. online,
  14564. offline,
  14565. connect,
  14566. breakoff,
  14567. workingCondition,
  14568. StandbyMode,
  14569. work,
  14570. ChargingCompleted,
  14571. ChargingPause,
  14572. BatteryStatus,
  14573. fault,
  14574. ChuShiHua,
  14575. SystemStatus,
  14576. NotupyetVoltage,
  14577. HighVoltageMedium,
  14578. voltagehasbeen,
  14579. Underhighpressure,
  14580. ChargingStatus,
  14581. uncharged,
  14582. Chargingprogress,
  14583. Chargingmalfunction,
  14584. full,
  14585. retain,
  14586. ChargingConnectionStatus,
  14587. FastChargingConnection,
  14588. NoConnection,
  14589. GunAinformation,
  14590. GunBinformation,
  14591. exchangeinformation,
  14592. Batteryinformation,
  14593. statisticalinformation,
  14594. coolinginformation,
  14595. PhaseVoltageAV,
  14596. PhaseVoltageBV,
  14597. PhaseVoltageCV,
  14598. PhaseVoltageAA,
  14599. PhaseVoltageBA,
  14600. PhaseVoltageCA,
  14601. powerSupply,
  14602. DischargeCapacity,
  14603. PhaseCurrent,
  14604. DischargePower,
  14605. Supplementarypower,
  14606. TotalPressure,
  14607. AllowChargingPower,
  14608. MaximumVoltage,
  14609. MaximumTemperature,
  14610. BatteryCurrent,
  14611. AllowChargingCurrent,
  14612. MinimumIndividualVoltage,
  14613. MinimumMonomerTemperature,
  14614. WorkingModeBatterySystem,
  14615. invalid,
  14616. DischargeMode,
  14617. pcsChargingMode,
  14618. EuropeanStandardChargingMode,
  14619. BatterySystemStatus,
  14620. initialization,
  14621. AccumulatedChargingCapacityCommunication,
  14622. WorkingMode,
  14623. OffMode,
  14624. CoolingMode,
  14625. HeatingMode,
  14626. CirculatingMode,
  14627. NO,
  14628. OutletTemperature,
  14629. PowerDemand,
  14630. HighVoltageRelayStatus,
  14631. DisconnectedState,
  14632. ClosedState,
  14633. waterTemperature,
  14634. BatteryFaultLevel,
  14635. NoMalfunction,
  14636. LevelLault,
  14637. open,
  14638. stopIt,
  14639. power,
  14640. given,
  14641. powergiven,
  14642. ACinputpowergiven,
  14643. confirm,
  14644. ReturnModeSelection,
  14645. Return,
  14646. CancelReturn,
  14647. ConfirmStart,
  14648. ConfirmStop,
  14649. popUpTitle,
  14650. popUpTitleStop,
  14651. popUpContent,
  14652. popUpContentStop,
  14653. ACRechargeelectricitytext,
  14654. ACpowerSupplytext,
  14655. OperationSuccessful,
  14656. operationFailed,
  14657. ChargingPower,
  14658. ChargingVoltage,
  14659. ChargingCurrent,
  14660. VehicleSOC,
  14661. ChargingCapacity,
  14662. CharingPower,
  14663. ChargingFee,
  14664. USD,
  14665. ChargingTime,
  14666. AllowableDischargepower,
  14667. AllowDischargeCurrent,
  14668. ConnectionStatus,
  14669. formNO,
  14670. formUnit,
  14671. formDescription,
  14672. formFailure,
  14673. formRecover,
  14674. FaultRec,
  14675. WarningRec,
  14676. RunningRec,
  14677. SYSIfo,
  14678. FaultClearing,
  14679. LastPage,
  14680. NextPage,
  14681. RunningTimes,
  14682. InputCapacity,
  14683. AccumulateInput,
  14684. RunningTimesdischarge,
  14685. InputCapacitydischarge,
  14686. AccumulateInputdischarge,
  14687. RunningTimesmin,
  14688. sysifoURL,
  14689. Tipswarning
  14690. };
  14691. const CommunicationRecharge = "交流补电";
  14692. const CommunicationSupply = "交流供电";
  14693. const DirectRecharge = "交流补电";
  14694. const DirectSupply = "交流补电";
  14695. const zhHant = {
  14696. CommunicationRecharge,
  14697. CommunicationSupply,
  14698. DirectRecharge,
  14699. DirectSupply
  14700. };
  14701. /*!
  14702. * @intlify/shared v9.1.9
  14703. * (c) 2021 kazuya kawaguchi
  14704. * Released under the MIT License.
  14705. */
  14706. const inBrowser = typeof window !== "undefined";
  14707. let mark;
  14708. let measure;
  14709. {
  14710. const perf = inBrowser && window.performance;
  14711. if (perf && perf.mark && perf.measure && perf.clearMarks && perf.clearMeasures) {
  14712. mark = (tag) => perf.mark(tag);
  14713. measure = (name, startTag, endTag) => {
  14714. perf.measure(name, startTag, endTag);
  14715. perf.clearMarks(startTag);
  14716. perf.clearMarks(endTag);
  14717. };
  14718. }
  14719. }
  14720. const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
  14721. function format(message, ...args) {
  14722. if (args.length === 1 && isObject$1(args[0])) {
  14723. args = args[0];
  14724. }
  14725. if (!args || !args.hasOwnProperty) {
  14726. args = {};
  14727. }
  14728. return message.replace(RE_ARGS, (match, identifier) => {
  14729. return args.hasOwnProperty(identifier) ? args[identifier] : "";
  14730. });
  14731. }
  14732. const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
  14733. const makeSymbol = (name) => hasSymbol ? Symbol(name) : name;
  14734. const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
  14735. const friendlyJSONstringify = (json) => JSON.stringify(json).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027");
  14736. const isNumber = (val) => typeof val === "number" && isFinite(val);
  14737. const isDate = (val) => toTypeString(val) === "[object Date]";
  14738. const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
  14739. const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
  14740. function warn(msg, err) {
  14741. if (typeof console !== "undefined") {
  14742. console.warn(`[intlify] ` + msg);
  14743. if (err) {
  14744. console.warn(err.stack);
  14745. }
  14746. }
  14747. }
  14748. const assign = Object.assign;
  14749. let _globalThis;
  14750. const getGlobalThis = () => {
  14751. return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
  14752. };
  14753. function escapeHtml(rawText) {
  14754. return rawText.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
  14755. }
  14756. const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  14757. function hasOwn$1(obj, key) {
  14758. return hasOwnProperty$1.call(obj, key);
  14759. }
  14760. const isArray = Array.isArray;
  14761. const isFunction = (val) => typeof val === "function";
  14762. const isString = (val) => typeof val === "string";
  14763. const isBoolean = (val) => typeof val === "boolean";
  14764. const isObject$1 = (val) => (
  14765. // eslint-disable-line
  14766. val !== null && typeof val === "object"
  14767. );
  14768. const objectToString = Object.prototype.toString;
  14769. const toTypeString = (value) => objectToString.call(value);
  14770. const isPlainObject = (val) => toTypeString(val) === "[object Object]";
  14771. const toDisplayString = (val) => {
  14772. return val == null ? "" : isArray(val) || isPlainObject(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val);
  14773. };
  14774. const RANGE = 2;
  14775. function generateCodeFrame(source, start = 0, end = source.length) {
  14776. const lines = source.split(/\r?\n/);
  14777. let count = 0;
  14778. const res = [];
  14779. for (let i2 = 0; i2 < lines.length; i2++) {
  14780. count += lines[i2].length + 1;
  14781. if (count >= start) {
  14782. for (let j2 = i2 - RANGE; j2 <= i2 + RANGE || end > count; j2++) {
  14783. if (j2 < 0 || j2 >= lines.length)
  14784. continue;
  14785. const line = j2 + 1;
  14786. res.push(`${line}${" ".repeat(3 - String(line).length)}| ${lines[j2]}`);
  14787. const lineLength = lines[j2].length;
  14788. if (j2 === i2) {
  14789. const pad = start - (count - lineLength) + 1;
  14790. const length = Math.max(1, end > count ? lineLength - pad : end - start);
  14791. res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
  14792. } else if (j2 > i2) {
  14793. if (end > count) {
  14794. const length = Math.max(Math.min(end - count, lineLength), 1);
  14795. res.push(` | ` + "^".repeat(length));
  14796. }
  14797. count += lineLength + 1;
  14798. }
  14799. }
  14800. break;
  14801. }
  14802. }
  14803. return res.join("\n");
  14804. }
  14805. function createEmitter() {
  14806. const events = /* @__PURE__ */ new Map();
  14807. const emitter = {
  14808. events,
  14809. on(event, handler) {
  14810. const handlers = events.get(event);
  14811. const added = handlers && handlers.push(handler);
  14812. if (!added) {
  14813. events.set(event, [handler]);
  14814. }
  14815. },
  14816. off(event, handler) {
  14817. const handlers = events.get(event);
  14818. if (handlers) {
  14819. handlers.splice(handlers.indexOf(handler) >>> 0, 1);
  14820. }
  14821. },
  14822. emit(event, payload) {
  14823. (events.get(event) || []).slice().map((handler) => handler(payload));
  14824. (events.get("*") || []).slice().map((handler) => handler(event, payload));
  14825. }
  14826. };
  14827. return emitter;
  14828. }
  14829. /*!
  14830. * @intlify/message-resolver v9.1.9
  14831. * (c) 2021 kazuya kawaguchi
  14832. * Released under the MIT License.
  14833. */
  14834. const hasOwnProperty = Object.prototype.hasOwnProperty;
  14835. function hasOwn(obj, key) {
  14836. return hasOwnProperty.call(obj, key);
  14837. }
  14838. const isObject = (val) => (
  14839. // eslint-disable-line
  14840. val !== null && typeof val === "object"
  14841. );
  14842. const pathStateMachine = [];
  14843. pathStateMachine[
  14844. 0
  14845. /* BEFORE_PATH */
  14846. ] = {
  14847. [
  14848. "w"
  14849. /* WORKSPACE */
  14850. ]: [
  14851. 0
  14852. /* BEFORE_PATH */
  14853. ],
  14854. [
  14855. "i"
  14856. /* IDENT */
  14857. ]: [
  14858. 3,
  14859. 0
  14860. /* APPEND */
  14861. ],
  14862. [
  14863. "["
  14864. /* LEFT_BRACKET */
  14865. ]: [
  14866. 4
  14867. /* IN_SUB_PATH */
  14868. ],
  14869. [
  14870. "o"
  14871. /* END_OF_FAIL */
  14872. ]: [
  14873. 7
  14874. /* AFTER_PATH */
  14875. ]
  14876. };
  14877. pathStateMachine[
  14878. 1
  14879. /* IN_PATH */
  14880. ] = {
  14881. [
  14882. "w"
  14883. /* WORKSPACE */
  14884. ]: [
  14885. 1
  14886. /* IN_PATH */
  14887. ],
  14888. [
  14889. "."
  14890. /* DOT */
  14891. ]: [
  14892. 2
  14893. /* BEFORE_IDENT */
  14894. ],
  14895. [
  14896. "["
  14897. /* LEFT_BRACKET */
  14898. ]: [
  14899. 4
  14900. /* IN_SUB_PATH */
  14901. ],
  14902. [
  14903. "o"
  14904. /* END_OF_FAIL */
  14905. ]: [
  14906. 7
  14907. /* AFTER_PATH */
  14908. ]
  14909. };
  14910. pathStateMachine[
  14911. 2
  14912. /* BEFORE_IDENT */
  14913. ] = {
  14914. [
  14915. "w"
  14916. /* WORKSPACE */
  14917. ]: [
  14918. 2
  14919. /* BEFORE_IDENT */
  14920. ],
  14921. [
  14922. "i"
  14923. /* IDENT */
  14924. ]: [
  14925. 3,
  14926. 0
  14927. /* APPEND */
  14928. ],
  14929. [
  14930. "0"
  14931. /* ZERO */
  14932. ]: [
  14933. 3,
  14934. 0
  14935. /* APPEND */
  14936. ]
  14937. };
  14938. pathStateMachine[
  14939. 3
  14940. /* IN_IDENT */
  14941. ] = {
  14942. [
  14943. "i"
  14944. /* IDENT */
  14945. ]: [
  14946. 3,
  14947. 0
  14948. /* APPEND */
  14949. ],
  14950. [
  14951. "0"
  14952. /* ZERO */
  14953. ]: [
  14954. 3,
  14955. 0
  14956. /* APPEND */
  14957. ],
  14958. [
  14959. "w"
  14960. /* WORKSPACE */
  14961. ]: [
  14962. 1,
  14963. 1
  14964. /* PUSH */
  14965. ],
  14966. [
  14967. "."
  14968. /* DOT */
  14969. ]: [
  14970. 2,
  14971. 1
  14972. /* PUSH */
  14973. ],
  14974. [
  14975. "["
  14976. /* LEFT_BRACKET */
  14977. ]: [
  14978. 4,
  14979. 1
  14980. /* PUSH */
  14981. ],
  14982. [
  14983. "o"
  14984. /* END_OF_FAIL */
  14985. ]: [
  14986. 7,
  14987. 1
  14988. /* PUSH */
  14989. ]
  14990. };
  14991. pathStateMachine[
  14992. 4
  14993. /* IN_SUB_PATH */
  14994. ] = {
  14995. [
  14996. "'"
  14997. /* SINGLE_QUOTE */
  14998. ]: [
  14999. 5,
  15000. 0
  15001. /* APPEND */
  15002. ],
  15003. [
  15004. '"'
  15005. /* DOUBLE_QUOTE */
  15006. ]: [
  15007. 6,
  15008. 0
  15009. /* APPEND */
  15010. ],
  15011. [
  15012. "["
  15013. /* LEFT_BRACKET */
  15014. ]: [
  15015. 4,
  15016. 2
  15017. /* INC_SUB_PATH_DEPTH */
  15018. ],
  15019. [
  15020. "]"
  15021. /* RIGHT_BRACKET */
  15022. ]: [
  15023. 1,
  15024. 3
  15025. /* PUSH_SUB_PATH */
  15026. ],
  15027. [
  15028. "o"
  15029. /* END_OF_FAIL */
  15030. ]: 8,
  15031. [
  15032. "l"
  15033. /* ELSE */
  15034. ]: [
  15035. 4,
  15036. 0
  15037. /* APPEND */
  15038. ]
  15039. };
  15040. pathStateMachine[
  15041. 5
  15042. /* IN_SINGLE_QUOTE */
  15043. ] = {
  15044. [
  15045. "'"
  15046. /* SINGLE_QUOTE */
  15047. ]: [
  15048. 4,
  15049. 0
  15050. /* APPEND */
  15051. ],
  15052. [
  15053. "o"
  15054. /* END_OF_FAIL */
  15055. ]: 8,
  15056. [
  15057. "l"
  15058. /* ELSE */
  15059. ]: [
  15060. 5,
  15061. 0
  15062. /* APPEND */
  15063. ]
  15064. };
  15065. pathStateMachine[
  15066. 6
  15067. /* IN_DOUBLE_QUOTE */
  15068. ] = {
  15069. [
  15070. '"'
  15071. /* DOUBLE_QUOTE */
  15072. ]: [
  15073. 4,
  15074. 0
  15075. /* APPEND */
  15076. ],
  15077. [
  15078. "o"
  15079. /* END_OF_FAIL */
  15080. ]: 8,
  15081. [
  15082. "l"
  15083. /* ELSE */
  15084. ]: [
  15085. 6,
  15086. 0
  15087. /* APPEND */
  15088. ]
  15089. };
  15090. const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
  15091. function isLiteral(exp) {
  15092. return literalValueRE.test(exp);
  15093. }
  15094. function stripQuotes(str) {
  15095. const a2 = str.charCodeAt(0);
  15096. const b2 = str.charCodeAt(str.length - 1);
  15097. return a2 === b2 && (a2 === 34 || a2 === 39) ? str.slice(1, -1) : str;
  15098. }
  15099. function getPathCharType(ch) {
  15100. if (ch === void 0 || ch === null) {
  15101. return "o";
  15102. }
  15103. const code = ch.charCodeAt(0);
  15104. switch (code) {
  15105. case 91:
  15106. case 93:
  15107. case 46:
  15108. case 34:
  15109. case 39:
  15110. return ch;
  15111. case 95:
  15112. case 36:
  15113. case 45:
  15114. return "i";
  15115. case 9:
  15116. case 10:
  15117. case 13:
  15118. case 160:
  15119. case 65279:
  15120. case 8232:
  15121. case 8233:
  15122. return "w";
  15123. }
  15124. return "i";
  15125. }
  15126. function formatSubPath(path) {
  15127. const trimmed = path.trim();
  15128. if (path.charAt(0) === "0" && isNaN(parseInt(path))) {
  15129. return false;
  15130. }
  15131. return isLiteral(trimmed) ? stripQuotes(trimmed) : "*" + trimmed;
  15132. }
  15133. function parse(path) {
  15134. const keys = [];
  15135. let index = -1;
  15136. let mode = 0;
  15137. let subPathDepth = 0;
  15138. let c2;
  15139. let key;
  15140. let newChar;
  15141. let type;
  15142. let transition;
  15143. let action;
  15144. let typeMap;
  15145. const actions = [];
  15146. actions[
  15147. 0
  15148. /* APPEND */
  15149. ] = () => {
  15150. if (key === void 0) {
  15151. key = newChar;
  15152. } else {
  15153. key += newChar;
  15154. }
  15155. };
  15156. actions[
  15157. 1
  15158. /* PUSH */
  15159. ] = () => {
  15160. if (key !== void 0) {
  15161. keys.push(key);
  15162. key = void 0;
  15163. }
  15164. };
  15165. actions[
  15166. 2
  15167. /* INC_SUB_PATH_DEPTH */
  15168. ] = () => {
  15169. actions[
  15170. 0
  15171. /* APPEND */
  15172. ]();
  15173. subPathDepth++;
  15174. };
  15175. actions[
  15176. 3
  15177. /* PUSH_SUB_PATH */
  15178. ] = () => {
  15179. if (subPathDepth > 0) {
  15180. subPathDepth--;
  15181. mode = 4;
  15182. actions[
  15183. 0
  15184. /* APPEND */
  15185. ]();
  15186. } else {
  15187. subPathDepth = 0;
  15188. if (key === void 0) {
  15189. return false;
  15190. }
  15191. key = formatSubPath(key);
  15192. if (key === false) {
  15193. return false;
  15194. } else {
  15195. actions[
  15196. 1
  15197. /* PUSH */
  15198. ]();
  15199. }
  15200. }
  15201. };
  15202. function maybeUnescapeQuote() {
  15203. const nextChar = path[index + 1];
  15204. if (mode === 5 && nextChar === "'" || mode === 6 && nextChar === '"') {
  15205. index++;
  15206. newChar = "\\" + nextChar;
  15207. actions[
  15208. 0
  15209. /* APPEND */
  15210. ]();
  15211. return true;
  15212. }
  15213. }
  15214. while (mode !== null) {
  15215. index++;
  15216. c2 = path[index];
  15217. if (c2 === "\\" && maybeUnescapeQuote()) {
  15218. continue;
  15219. }
  15220. type = getPathCharType(c2);
  15221. typeMap = pathStateMachine[mode];
  15222. transition = typeMap[type] || typeMap[
  15223. "l"
  15224. /* ELSE */
  15225. ] || 8;
  15226. if (transition === 8) {
  15227. return;
  15228. }
  15229. mode = transition[0];
  15230. if (transition[1] !== void 0) {
  15231. action = actions[transition[1]];
  15232. if (action) {
  15233. newChar = c2;
  15234. if (action() === false) {
  15235. return;
  15236. }
  15237. }
  15238. }
  15239. if (mode === 7) {
  15240. return keys;
  15241. }
  15242. }
  15243. }
  15244. const cache = /* @__PURE__ */ new Map();
  15245. function resolveValue(obj, path) {
  15246. if (!isObject(obj)) {
  15247. return null;
  15248. }
  15249. let hit = cache.get(path);
  15250. if (!hit) {
  15251. hit = parse(path);
  15252. if (hit) {
  15253. cache.set(path, hit);
  15254. }
  15255. }
  15256. if (!hit) {
  15257. return null;
  15258. }
  15259. const len = hit.length;
  15260. let last = obj;
  15261. let i2 = 0;
  15262. while (i2 < len) {
  15263. const val = last[hit[i2]];
  15264. if (val === void 0) {
  15265. return null;
  15266. }
  15267. last = val;
  15268. i2++;
  15269. }
  15270. return last;
  15271. }
  15272. function handleFlatJson(obj) {
  15273. if (!isObject(obj)) {
  15274. return obj;
  15275. }
  15276. for (const key in obj) {
  15277. if (!hasOwn(obj, key)) {
  15278. continue;
  15279. }
  15280. if (!key.includes(
  15281. "."
  15282. /* DOT */
  15283. )) {
  15284. if (isObject(obj[key])) {
  15285. handleFlatJson(obj[key]);
  15286. }
  15287. } else {
  15288. const subKeys = key.split(
  15289. "."
  15290. /* DOT */
  15291. );
  15292. const lastIndex = subKeys.length - 1;
  15293. let currentObj = obj;
  15294. for (let i2 = 0; i2 < lastIndex; i2++) {
  15295. if (!(subKeys[i2] in currentObj)) {
  15296. currentObj[subKeys[i2]] = {};
  15297. }
  15298. currentObj = currentObj[subKeys[i2]];
  15299. }
  15300. currentObj[subKeys[lastIndex]] = obj[key];
  15301. delete obj[key];
  15302. if (isObject(currentObj[subKeys[lastIndex]])) {
  15303. handleFlatJson(currentObj[subKeys[lastIndex]]);
  15304. }
  15305. }
  15306. }
  15307. return obj;
  15308. }
  15309. /*!
  15310. * @intlify/runtime v9.1.9
  15311. * (c) 2021 kazuya kawaguchi
  15312. * Released under the MIT License.
  15313. */
  15314. const DEFAULT_MODIFIER = (str) => str;
  15315. const DEFAULT_MESSAGE = (ctx) => "";
  15316. const DEFAULT_MESSAGE_DATA_TYPE = "text";
  15317. const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : values.join("");
  15318. const DEFAULT_INTERPOLATE = toDisplayString;
  15319. function pluralDefault(choice, choicesLength) {
  15320. choice = Math.abs(choice);
  15321. if (choicesLength === 2) {
  15322. return choice ? choice > 1 ? 1 : 0 : 1;
  15323. }
  15324. return choice ? Math.min(choice, 2) : 0;
  15325. }
  15326. function getPluralIndex(options) {
  15327. const index = isNumber(options.pluralIndex) ? options.pluralIndex : -1;
  15328. return options.named && (isNumber(options.named.count) || isNumber(options.named.n)) ? isNumber(options.named.count) ? options.named.count : isNumber(options.named.n) ? options.named.n : index : index;
  15329. }
  15330. function normalizeNamed(pluralIndex, props) {
  15331. if (!props.count) {
  15332. props.count = pluralIndex;
  15333. }
  15334. if (!props.n) {
  15335. props.n = pluralIndex;
  15336. }
  15337. }
  15338. function createMessageContext(options = {}) {
  15339. const locale = options.locale;
  15340. const pluralIndex = getPluralIndex(options);
  15341. const pluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? options.pluralRules[locale] : pluralDefault;
  15342. const orgPluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? pluralDefault : void 0;
  15343. const plural = (messages2) => messages2[pluralRule(pluralIndex, messages2.length, orgPluralRule)];
  15344. const _list = options.list || [];
  15345. const list = (index) => _list[index];
  15346. const _named = options.named || {};
  15347. isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
  15348. const named = (key) => _named[key];
  15349. function message(key) {
  15350. const msg = isFunction(options.messages) ? options.messages(key) : isObject$1(options.messages) ? options.messages[key] : false;
  15351. return !msg ? options.parent ? options.parent.message(key) : DEFAULT_MESSAGE : msg;
  15352. }
  15353. const _modifier = (name) => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER;
  15354. const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE;
  15355. const interpolate = isPlainObject(options.processor) && isFunction(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE;
  15356. const type = isPlainObject(options.processor) && isString(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE;
  15357. const ctx = {
  15358. [
  15359. "list"
  15360. /* LIST */
  15361. ]: list,
  15362. [
  15363. "named"
  15364. /* NAMED */
  15365. ]: named,
  15366. [
  15367. "plural"
  15368. /* PLURAL */
  15369. ]: plural,
  15370. [
  15371. "linked"
  15372. /* LINKED */
  15373. ]: (key, modifier) => {
  15374. const msg = message(key)(ctx);
  15375. return isString(modifier) ? _modifier(modifier)(msg) : msg;
  15376. },
  15377. [
  15378. "message"
  15379. /* MESSAGE */
  15380. ]: message,
  15381. [
  15382. "type"
  15383. /* TYPE */
  15384. ]: type,
  15385. [
  15386. "interpolate"
  15387. /* INTERPOLATE */
  15388. ]: interpolate,
  15389. [
  15390. "normalize"
  15391. /* NORMALIZE */
  15392. ]: normalize
  15393. };
  15394. return ctx;
  15395. }
  15396. /*!
  15397. * @intlify/message-compiler v9.1.9
  15398. * (c) 2021 kazuya kawaguchi
  15399. * Released under the MIT License.
  15400. */
  15401. const errorMessages$2 = {
  15402. // tokenizer error messages
  15403. [
  15404. 0
  15405. /* EXPECTED_TOKEN */
  15406. ]: `Expected token: '{0}'`,
  15407. [
  15408. 1
  15409. /* INVALID_TOKEN_IN_PLACEHOLDER */
  15410. ]: `Invalid token in placeholder: '{0}'`,
  15411. [
  15412. 2
  15413. /* UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER */
  15414. ]: `Unterminated single quote in placeholder`,
  15415. [
  15416. 3
  15417. /* UNKNOWN_ESCAPE_SEQUENCE */
  15418. ]: `Unknown escape sequence: \\{0}`,
  15419. [
  15420. 4
  15421. /* INVALID_UNICODE_ESCAPE_SEQUENCE */
  15422. ]: `Invalid unicode escape sequence: {0}`,
  15423. [
  15424. 5
  15425. /* UNBALANCED_CLOSING_BRACE */
  15426. ]: `Unbalanced closing brace`,
  15427. [
  15428. 6
  15429. /* UNTERMINATED_CLOSING_BRACE */
  15430. ]: `Unterminated closing brace`,
  15431. [
  15432. 7
  15433. /* EMPTY_PLACEHOLDER */
  15434. ]: `Empty placeholder`,
  15435. [
  15436. 8
  15437. /* NOT_ALLOW_NEST_PLACEHOLDER */
  15438. ]: `Not allowed nest placeholder`,
  15439. [
  15440. 9
  15441. /* INVALID_LINKED_FORMAT */
  15442. ]: `Invalid linked format`,
  15443. // parser error messages
  15444. [
  15445. 10
  15446. /* MUST_HAVE_MESSAGES_IN_PLURAL */
  15447. ]: `Plural must have messages`,
  15448. [
  15449. 11
  15450. /* UNEXPECTED_EMPTY_LINKED_MODIFIER */
  15451. ]: `Unexpected empty linked modifier`,
  15452. [
  15453. 12
  15454. /* UNEXPECTED_EMPTY_LINKED_KEY */
  15455. ]: `Unexpected empty linked key`,
  15456. [
  15457. 13
  15458. /* UNEXPECTED_LEXICAL_ANALYSIS */
  15459. ]: `Unexpected lexical analysis in token: '{0}'`
  15460. };
  15461. function createCompileError(code, loc, options = {}) {
  15462. const { domain, messages: messages2, args } = options;
  15463. const msg = format((messages2 || errorMessages$2)[code] || "", ...args || []);
  15464. const error = new SyntaxError(String(msg));
  15465. error.code = code;
  15466. if (loc) {
  15467. error.location = loc;
  15468. }
  15469. error.domain = domain;
  15470. return error;
  15471. }
  15472. /*!
  15473. * @intlify/devtools-if v9.1.9
  15474. * (c) 2021 kazuya kawaguchi
  15475. * Released under the MIT License.
  15476. */
  15477. const IntlifyDevToolsHooks = {
  15478. I18nInit: "i18n:init",
  15479. FunctionTranslate: "function:translate"
  15480. };
  15481. /*!
  15482. * @intlify/core-base v9.1.9
  15483. * (c) 2021 kazuya kawaguchi
  15484. * Released under the MIT License.
  15485. */
  15486. let devtools = null;
  15487. function setDevToolsHook(hook) {
  15488. devtools = hook;
  15489. }
  15490. function initI18nDevTools(i18n2, version2, meta) {
  15491. devtools && devtools.emit(IntlifyDevToolsHooks.I18nInit, {
  15492. timestamp: Date.now(),
  15493. i18n: i18n2,
  15494. version: version2,
  15495. meta
  15496. });
  15497. }
  15498. const translateDevTools = /* @__PURE__ */ createDevToolsHook(IntlifyDevToolsHooks.FunctionTranslate);
  15499. function createDevToolsHook(hook) {
  15500. return (payloads) => devtools && devtools.emit(hook, payloads);
  15501. }
  15502. const warnMessages$1 = {
  15503. [
  15504. 0
  15505. /* NOT_FOUND_KEY */
  15506. ]: `Not found '{key}' key in '{locale}' locale messages.`,
  15507. [
  15508. 1
  15509. /* FALLBACK_TO_TRANSLATE */
  15510. ]: `Fall back to translate '{key}' key with '{target}' locale.`,
  15511. [
  15512. 2
  15513. /* CANNOT_FORMAT_NUMBER */
  15514. ]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
  15515. [
  15516. 3
  15517. /* FALLBACK_TO_NUMBER_FORMAT */
  15518. ]: `Fall back to number format '{key}' key with '{target}' locale.`,
  15519. [
  15520. 4
  15521. /* CANNOT_FORMAT_DATE */
  15522. ]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
  15523. [
  15524. 5
  15525. /* FALLBACK_TO_DATE_FORMAT */
  15526. ]: `Fall back to datetime format '{key}' key with '{target}' locale.`
  15527. };
  15528. function getWarnMessage$1(code, ...args) {
  15529. return format(warnMessages$1[code], ...args);
  15530. }
  15531. const VERSION$1 = "9.1.9";
  15532. const NOT_REOSLVED = -1;
  15533. const MISSING_RESOLVE_VALUE = "";
  15534. function getDefaultLinkedModifiers() {
  15535. return {
  15536. upper: (val) => isString(val) ? val.toUpperCase() : val,
  15537. lower: (val) => isString(val) ? val.toLowerCase() : val,
  15538. // prettier-ignore
  15539. capitalize: (val) => isString(val) ? `${val.charAt(0).toLocaleUpperCase()}${val.substr(1)}` : val
  15540. };
  15541. }
  15542. let _compiler;
  15543. let _additionalMeta = null;
  15544. const setAdditionalMeta = (meta) => {
  15545. _additionalMeta = meta;
  15546. };
  15547. const getAdditionalMeta = () => _additionalMeta;
  15548. let _cid = 0;
  15549. function createCoreContext(options = {}) {
  15550. const version2 = isString(options.version) ? options.version : VERSION$1;
  15551. const locale = isString(options.locale) ? options.locale : "en-US";
  15552. const fallbackLocale = isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || isString(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale;
  15553. const messages2 = isPlainObject(options.messages) ? options.messages : { [locale]: {} };
  15554. const datetimeFormats = isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [locale]: {} };
  15555. const numberFormats = isPlainObject(options.numberFormats) ? options.numberFormats : { [locale]: {} };
  15556. const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
  15557. const pluralRules = options.pluralRules || {};
  15558. const missing = isFunction(options.missing) ? options.missing : null;
  15559. const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true;
  15560. const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
  15561. const fallbackFormat = !!options.fallbackFormat;
  15562. const unresolving = !!options.unresolving;
  15563. const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null;
  15564. const processor = isPlainObject(options.processor) ? options.processor : null;
  15565. const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
  15566. const escapeParameter = !!options.escapeParameter;
  15567. const messageCompiler = isFunction(options.messageCompiler) ? options.messageCompiler : _compiler;
  15568. const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;
  15569. const internalOptions = options;
  15570. const __datetimeFormatters = isObject$1(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map();
  15571. const __numberFormatters = isObject$1(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map();
  15572. const __meta = isObject$1(internalOptions.__meta) ? internalOptions.__meta : {};
  15573. _cid++;
  15574. const context = {
  15575. version: version2,
  15576. cid: _cid,
  15577. locale,
  15578. fallbackLocale,
  15579. messages: messages2,
  15580. datetimeFormats,
  15581. numberFormats,
  15582. modifiers,
  15583. pluralRules,
  15584. missing,
  15585. missingWarn,
  15586. fallbackWarn,
  15587. fallbackFormat,
  15588. unresolving,
  15589. postTranslation,
  15590. processor,
  15591. warnHtmlMessage,
  15592. escapeParameter,
  15593. messageCompiler,
  15594. onWarn,
  15595. __datetimeFormatters,
  15596. __numberFormatters,
  15597. __meta
  15598. };
  15599. {
  15600. context.__v_emitter = internalOptions.__v_emitter != null ? internalOptions.__v_emitter : void 0;
  15601. }
  15602. {
  15603. initI18nDevTools(context, version2, __meta);
  15604. }
  15605. return context;
  15606. }
  15607. function isTranslateFallbackWarn(fallback, key) {
  15608. return fallback instanceof RegExp ? fallback.test(key) : fallback;
  15609. }
  15610. function isTranslateMissingWarn(missing, key) {
  15611. return missing instanceof RegExp ? missing.test(key) : missing;
  15612. }
  15613. function handleMissing(context, key, locale, missingWarn, type) {
  15614. const { missing, onWarn } = context;
  15615. {
  15616. const emitter = context.__v_emitter;
  15617. if (emitter) {
  15618. emitter.emit("missing", {
  15619. locale,
  15620. key,
  15621. type,
  15622. groupId: `${type}:${key}`
  15623. });
  15624. }
  15625. }
  15626. if (missing !== null) {
  15627. const ret = missing(context, locale, key, type);
  15628. return isString(ret) ? ret : key;
  15629. } else {
  15630. if (isTranslateMissingWarn(missingWarn, key)) {
  15631. onWarn(getWarnMessage$1(0, { key, locale }));
  15632. }
  15633. return key;
  15634. }
  15635. }
  15636. function getLocaleChain(ctx, fallback, start) {
  15637. const context = ctx;
  15638. if (!context.__localeChainCache) {
  15639. context.__localeChainCache = /* @__PURE__ */ new Map();
  15640. }
  15641. let chain = context.__localeChainCache.get(start);
  15642. if (!chain) {
  15643. chain = [];
  15644. let block = [start];
  15645. while (isArray(block)) {
  15646. block = appendBlockToChain(chain, block, fallback);
  15647. }
  15648. const defaults = isArray(fallback) ? fallback : isPlainObject(fallback) ? fallback["default"] ? fallback["default"] : null : fallback;
  15649. block = isString(defaults) ? [defaults] : defaults;
  15650. if (isArray(block)) {
  15651. appendBlockToChain(chain, block, false);
  15652. }
  15653. context.__localeChainCache.set(start, chain);
  15654. }
  15655. return chain;
  15656. }
  15657. function appendBlockToChain(chain, block, blocks) {
  15658. let follow = true;
  15659. for (let i2 = 0; i2 < block.length && isBoolean(follow); i2++) {
  15660. const locale = block[i2];
  15661. if (isString(locale)) {
  15662. follow = appendLocaleToChain(chain, block[i2], blocks);
  15663. }
  15664. }
  15665. return follow;
  15666. }
  15667. function appendLocaleToChain(chain, locale, blocks) {
  15668. let follow;
  15669. const tokens = locale.split("-");
  15670. do {
  15671. const target = tokens.join("-");
  15672. follow = appendItemToChain(chain, target, blocks);
  15673. tokens.splice(-1, 1);
  15674. } while (tokens.length && follow === true);
  15675. return follow;
  15676. }
  15677. function appendItemToChain(chain, target, blocks) {
  15678. let follow = false;
  15679. if (!chain.includes(target)) {
  15680. follow = true;
  15681. if (target) {
  15682. follow = target[target.length - 1] !== "!";
  15683. const locale = target.replace(/!/g, "");
  15684. chain.push(locale);
  15685. if ((isArray(blocks) || isPlainObject(blocks)) && blocks[locale]) {
  15686. follow = blocks[locale];
  15687. }
  15688. }
  15689. }
  15690. return follow;
  15691. }
  15692. function updateFallbackLocale(ctx, locale, fallback) {
  15693. const context = ctx;
  15694. context.__localeChainCache = /* @__PURE__ */ new Map();
  15695. getLocaleChain(ctx, fallback, locale);
  15696. }
  15697. function createCoreError(code) {
  15698. return createCompileError(code, null, { messages: errorMessages$1 });
  15699. }
  15700. const errorMessages$1 = {
  15701. [
  15702. 14
  15703. /* INVALID_ARGUMENT */
  15704. ]: "Invalid arguments",
  15705. [
  15706. 15
  15707. /* INVALID_DATE_ARGUMENT */
  15708. ]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
  15709. [
  15710. 16
  15711. /* INVALID_ISO_DATE_ARGUMENT */
  15712. ]: "The argument provided is not a valid ISO date string"
  15713. };
  15714. const NOOP_MESSAGE_FUNCTION = () => "";
  15715. const isMessageFunction = (val) => isFunction(val);
  15716. function translate(context, ...args) {
  15717. const { fallbackFormat, postTranslation, unresolving, fallbackLocale, messages: messages2 } = context;
  15718. const [key, options] = parseTranslateArgs(...args);
  15719. const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
  15720. const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
  15721. const escapeParameter = isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter;
  15722. const resolvedMessage = !!options.resolvedMessage;
  15723. const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) ? !isBoolean(options.default) ? options.default : key : fallbackFormat ? key : "";
  15724. const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== "";
  15725. const locale = isString(options.locale) ? options.locale : context.locale;
  15726. escapeParameter && escapeParams(options);
  15727. let [format2, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) : [
  15728. key,
  15729. locale,
  15730. messages2[locale] || {}
  15731. ];
  15732. let cacheBaseKey = key;
  15733. if (!resolvedMessage && !(isString(format2) || isMessageFunction(format2))) {
  15734. if (enableDefaultMsg) {
  15735. format2 = defaultMsgOrKey;
  15736. cacheBaseKey = format2;
  15737. }
  15738. }
  15739. if (!resolvedMessage && (!(isString(format2) || isMessageFunction(format2)) || !isString(targetLocale))) {
  15740. return unresolving ? NOT_REOSLVED : key;
  15741. }
  15742. if (isString(format2) && context.messageCompiler == null) {
  15743. warn(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${key}'.`);
  15744. return key;
  15745. }
  15746. let occurred = false;
  15747. const errorDetector = () => {
  15748. occurred = true;
  15749. };
  15750. const msg = !isMessageFunction(format2) ? compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) : format2;
  15751. if (occurred) {
  15752. return format2;
  15753. }
  15754. const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);
  15755. const msgContext = createMessageContext(ctxOptions);
  15756. const messaged = evaluateMessage(context, msg, msgContext);
  15757. const ret = postTranslation ? postTranslation(messaged) : messaged;
  15758. {
  15759. const payloads = {
  15760. timestamp: Date.now(),
  15761. key: isString(key) ? key : isMessageFunction(format2) ? format2.key : "",
  15762. locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""),
  15763. format: isString(format2) ? format2 : isMessageFunction(format2) ? format2.source : "",
  15764. message: ret
  15765. };
  15766. payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});
  15767. translateDevTools(payloads);
  15768. }
  15769. return ret;
  15770. }
  15771. function escapeParams(options) {
  15772. if (isArray(options.list)) {
  15773. options.list = options.list.map((item) => isString(item) ? escapeHtml(item) : item);
  15774. } else if (isObject$1(options.named)) {
  15775. Object.keys(options.named).forEach((key) => {
  15776. if (isString(options.named[key])) {
  15777. options.named[key] = escapeHtml(options.named[key]);
  15778. }
  15779. });
  15780. }
  15781. }
  15782. function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {
  15783. const { messages: messages2, onWarn } = context;
  15784. const locales = getLocaleChain(context, fallbackLocale, locale);
  15785. let message = {};
  15786. let targetLocale;
  15787. let format2 = null;
  15788. let from = locale;
  15789. let to = null;
  15790. const type = "translate";
  15791. for (let i2 = 0; i2 < locales.length; i2++) {
  15792. targetLocale = to = locales[i2];
  15793. if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
  15794. onWarn(getWarnMessage$1(1, {
  15795. key,
  15796. target: targetLocale
  15797. }));
  15798. }
  15799. if (locale !== targetLocale) {
  15800. const emitter = context.__v_emitter;
  15801. if (emitter) {
  15802. emitter.emit("fallback", {
  15803. type,
  15804. key,
  15805. from,
  15806. to,
  15807. groupId: `${type}:${key}`
  15808. });
  15809. }
  15810. }
  15811. message = messages2[targetLocale] || {};
  15812. let start = null;
  15813. let startTag;
  15814. let endTag;
  15815. if (inBrowser) {
  15816. start = window.performance.now();
  15817. startTag = "intlify-message-resolve-start";
  15818. endTag = "intlify-message-resolve-end";
  15819. mark && mark(startTag);
  15820. }
  15821. if ((format2 = resolveValue(message, key)) === null) {
  15822. format2 = message[key];
  15823. }
  15824. if (inBrowser) {
  15825. const end = window.performance.now();
  15826. const emitter = context.__v_emitter;
  15827. if (emitter && start && format2) {
  15828. emitter.emit("message-resolve", {
  15829. type: "message-resolve",
  15830. key,
  15831. message: format2,
  15832. time: end - start,
  15833. groupId: `${type}:${key}`
  15834. });
  15835. }
  15836. if (startTag && endTag && mark && measure) {
  15837. mark(endTag);
  15838. measure("intlify message resolve", startTag, endTag);
  15839. }
  15840. }
  15841. if (isString(format2) || isFunction(format2))
  15842. break;
  15843. const missingRet = handleMissing(context, key, targetLocale, missingWarn, type);
  15844. if (missingRet !== key) {
  15845. format2 = missingRet;
  15846. }
  15847. from = to;
  15848. }
  15849. return [format2, targetLocale, message];
  15850. }
  15851. function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) {
  15852. const { messageCompiler, warnHtmlMessage } = context;
  15853. if (isMessageFunction(format2)) {
  15854. const msg2 = format2;
  15855. msg2.locale = msg2.locale || targetLocale;
  15856. msg2.key = msg2.key || key;
  15857. return msg2;
  15858. }
  15859. let start = null;
  15860. let startTag;
  15861. let endTag;
  15862. if (inBrowser) {
  15863. start = window.performance.now();
  15864. startTag = "intlify-message-compilation-start";
  15865. endTag = "intlify-message-compilation-end";
  15866. mark && mark(startTag);
  15867. }
  15868. const msg = messageCompiler(format2, getCompileOptions(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, errorDetector));
  15869. if (inBrowser) {
  15870. const end = window.performance.now();
  15871. const emitter = context.__v_emitter;
  15872. if (emitter && start) {
  15873. emitter.emit("message-compilation", {
  15874. type: "message-compilation",
  15875. message: format2,
  15876. time: end - start,
  15877. groupId: `${"translate"}:${key}`
  15878. });
  15879. }
  15880. if (startTag && endTag && mark && measure) {
  15881. mark(endTag);
  15882. measure("intlify message compilation", startTag, endTag);
  15883. }
  15884. }
  15885. msg.locale = targetLocale;
  15886. msg.key = key;
  15887. msg.source = format2;
  15888. return msg;
  15889. }
  15890. function evaluateMessage(context, msg, msgCtx) {
  15891. let start = null;
  15892. let startTag;
  15893. let endTag;
  15894. if (inBrowser) {
  15895. start = window.performance.now();
  15896. startTag = "intlify-message-evaluation-start";
  15897. endTag = "intlify-message-evaluation-end";
  15898. mark && mark(startTag);
  15899. }
  15900. const messaged = msg(msgCtx);
  15901. if (inBrowser) {
  15902. const end = window.performance.now();
  15903. const emitter = context.__v_emitter;
  15904. if (emitter && start) {
  15905. emitter.emit("message-evaluation", {
  15906. type: "message-evaluation",
  15907. value: messaged,
  15908. time: end - start,
  15909. groupId: `${"translate"}:${msg.key}`
  15910. });
  15911. }
  15912. if (startTag && endTag && mark && measure) {
  15913. mark(endTag);
  15914. measure("intlify message evaluation", startTag, endTag);
  15915. }
  15916. }
  15917. return messaged;
  15918. }
  15919. function parseTranslateArgs(...args) {
  15920. const [arg1, arg2, arg3] = args;
  15921. const options = {};
  15922. if (!isString(arg1) && !isNumber(arg1) && !isMessageFunction(arg1)) {
  15923. throw createCoreError(
  15924. 14
  15925. /* INVALID_ARGUMENT */
  15926. );
  15927. }
  15928. const key = isNumber(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1;
  15929. if (isNumber(arg2)) {
  15930. options.plural = arg2;
  15931. } else if (isString(arg2)) {
  15932. options.default = arg2;
  15933. } else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {
  15934. options.named = arg2;
  15935. } else if (isArray(arg2)) {
  15936. options.list = arg2;
  15937. }
  15938. if (isNumber(arg3)) {
  15939. options.plural = arg3;
  15940. } else if (isString(arg3)) {
  15941. options.default = arg3;
  15942. } else if (isPlainObject(arg3)) {
  15943. assign(options, arg3);
  15944. }
  15945. return [key, options];
  15946. }
  15947. function getCompileOptions(context, locale, key, source, warnHtmlMessage, errorDetector) {
  15948. return {
  15949. warnHtmlMessage,
  15950. onError: (err) => {
  15951. errorDetector && errorDetector(err);
  15952. {
  15953. const message = `Message compilation error: ${err.message}`;
  15954. const codeFrame = err.location && generateCodeFrame(source, err.location.start.offset, err.location.end.offset);
  15955. const emitter = context.__v_emitter;
  15956. if (emitter) {
  15957. emitter.emit("compile-error", {
  15958. message: source,
  15959. error: err.message,
  15960. start: err.location && err.location.start.offset,
  15961. end: err.location && err.location.end.offset,
  15962. groupId: `${"translate"}:${key}`
  15963. });
  15964. }
  15965. console.error(codeFrame ? `${message}
  15966. ${codeFrame}` : message);
  15967. }
  15968. },
  15969. onCacheKey: (source2) => generateFormatCacheKey(locale, key, source2)
  15970. };
  15971. }
  15972. function getMessageContextOptions(context, locale, message, options) {
  15973. const { modifiers, pluralRules } = context;
  15974. const resolveMessage = (key) => {
  15975. const val = resolveValue(message, key);
  15976. if (isString(val)) {
  15977. let occurred = false;
  15978. const errorDetector = () => {
  15979. occurred = true;
  15980. };
  15981. const msg = compileMessageFormat(context, key, locale, val, key, errorDetector);
  15982. return !occurred ? msg : NOOP_MESSAGE_FUNCTION;
  15983. } else if (isMessageFunction(val)) {
  15984. return val;
  15985. } else {
  15986. return NOOP_MESSAGE_FUNCTION;
  15987. }
  15988. };
  15989. const ctxOptions = {
  15990. locale,
  15991. modifiers,
  15992. pluralRules,
  15993. messages: resolveMessage
  15994. };
  15995. if (context.processor) {
  15996. ctxOptions.processor = context.processor;
  15997. }
  15998. if (options.list) {
  15999. ctxOptions.list = options.list;
  16000. }
  16001. if (options.named) {
  16002. ctxOptions.named = options.named;
  16003. }
  16004. if (isNumber(options.plural)) {
  16005. ctxOptions.pluralIndex = options.plural;
  16006. }
  16007. return ctxOptions;
  16008. }
  16009. const intlDefined = typeof Intl !== "undefined";
  16010. const Availabilities = {
  16011. dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== "undefined",
  16012. numberFormat: intlDefined && typeof Intl.NumberFormat !== "undefined"
  16013. };
  16014. function datetime(context, ...args) {
  16015. const { datetimeFormats, unresolving, fallbackLocale, onWarn } = context;
  16016. const { __datetimeFormatters } = context;
  16017. if (!Availabilities.dateTimeFormat) {
  16018. onWarn(getWarnMessage$1(
  16019. 4
  16020. /* CANNOT_FORMAT_DATE */
  16021. ));
  16022. return MISSING_RESOLVE_VALUE;
  16023. }
  16024. const [key, value, options, overrides] = parseDateTimeArgs(...args);
  16025. const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
  16026. const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
  16027. const part = !!options.part;
  16028. const locale = isString(options.locale) ? options.locale : context.locale;
  16029. const locales = getLocaleChain(context, fallbackLocale, locale);
  16030. if (!isString(key) || key === "") {
  16031. return new Intl.DateTimeFormat(locale).format(value);
  16032. }
  16033. let datetimeFormat = {};
  16034. let targetLocale;
  16035. let format2 = null;
  16036. let from = locale;
  16037. let to = null;
  16038. const type = "datetime format";
  16039. for (let i2 = 0; i2 < locales.length; i2++) {
  16040. targetLocale = to = locales[i2];
  16041. if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
  16042. onWarn(getWarnMessage$1(5, {
  16043. key,
  16044. target: targetLocale
  16045. }));
  16046. }
  16047. if (locale !== targetLocale) {
  16048. const emitter = context.__v_emitter;
  16049. if (emitter) {
  16050. emitter.emit("fallback", {
  16051. type,
  16052. key,
  16053. from,
  16054. to,
  16055. groupId: `${type}:${key}`
  16056. });
  16057. }
  16058. }
  16059. datetimeFormat = datetimeFormats[targetLocale] || {};
  16060. format2 = datetimeFormat[key];
  16061. if (isPlainObject(format2))
  16062. break;
  16063. handleMissing(context, key, targetLocale, missingWarn, type);
  16064. from = to;
  16065. }
  16066. if (!isPlainObject(format2) || !isString(targetLocale)) {
  16067. return unresolving ? NOT_REOSLVED : key;
  16068. }
  16069. let id = `${targetLocale}__${key}`;
  16070. if (!isEmptyObject(overrides)) {
  16071. id = `${id}__${JSON.stringify(overrides)}`;
  16072. }
  16073. let formatter = __datetimeFormatters.get(id);
  16074. if (!formatter) {
  16075. formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format2, overrides));
  16076. __datetimeFormatters.set(id, formatter);
  16077. }
  16078. return !part ? formatter.format(value) : formatter.formatToParts(value);
  16079. }
  16080. function parseDateTimeArgs(...args) {
  16081. const [arg1, arg2, arg3, arg4] = args;
  16082. let options = {};
  16083. let overrides = {};
  16084. let value;
  16085. if (isString(arg1)) {
  16086. if (!/\d{4}-\d{2}-\d{2}(T.*)?/.test(arg1)) {
  16087. throw createCoreError(
  16088. 16
  16089. /* INVALID_ISO_DATE_ARGUMENT */
  16090. );
  16091. }
  16092. value = new Date(arg1);
  16093. try {
  16094. value.toISOString();
  16095. } catch (e2) {
  16096. throw createCoreError(
  16097. 16
  16098. /* INVALID_ISO_DATE_ARGUMENT */
  16099. );
  16100. }
  16101. } else if (isDate(arg1)) {
  16102. if (isNaN(arg1.getTime())) {
  16103. throw createCoreError(
  16104. 15
  16105. /* INVALID_DATE_ARGUMENT */
  16106. );
  16107. }
  16108. value = arg1;
  16109. } else if (isNumber(arg1)) {
  16110. value = arg1;
  16111. } else {
  16112. throw createCoreError(
  16113. 14
  16114. /* INVALID_ARGUMENT */
  16115. );
  16116. }
  16117. if (isString(arg2)) {
  16118. options.key = arg2;
  16119. } else if (isPlainObject(arg2)) {
  16120. options = arg2;
  16121. }
  16122. if (isString(arg3)) {
  16123. options.locale = arg3;
  16124. } else if (isPlainObject(arg3)) {
  16125. overrides = arg3;
  16126. }
  16127. if (isPlainObject(arg4)) {
  16128. overrides = arg4;
  16129. }
  16130. return [options.key || "", value, options, overrides];
  16131. }
  16132. function clearDateTimeFormat(ctx, locale, format2) {
  16133. const context = ctx;
  16134. for (const key in format2) {
  16135. const id = `${locale}__${key}`;
  16136. if (!context.__datetimeFormatters.has(id)) {
  16137. continue;
  16138. }
  16139. context.__datetimeFormatters.delete(id);
  16140. }
  16141. }
  16142. function number(context, ...args) {
  16143. const { numberFormats, unresolving, fallbackLocale, onWarn } = context;
  16144. const { __numberFormatters } = context;
  16145. if (!Availabilities.numberFormat) {
  16146. onWarn(getWarnMessage$1(
  16147. 2
  16148. /* CANNOT_FORMAT_NUMBER */
  16149. ));
  16150. return MISSING_RESOLVE_VALUE;
  16151. }
  16152. const [key, value, options, overrides] = parseNumberArgs(...args);
  16153. const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
  16154. const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
  16155. const part = !!options.part;
  16156. const locale = isString(options.locale) ? options.locale : context.locale;
  16157. const locales = getLocaleChain(context, fallbackLocale, locale);
  16158. if (!isString(key) || key === "") {
  16159. return new Intl.NumberFormat(locale).format(value);
  16160. }
  16161. let numberFormat = {};
  16162. let targetLocale;
  16163. let format2 = null;
  16164. let from = locale;
  16165. let to = null;
  16166. const type = "number format";
  16167. for (let i2 = 0; i2 < locales.length; i2++) {
  16168. targetLocale = to = locales[i2];
  16169. if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
  16170. onWarn(getWarnMessage$1(3, {
  16171. key,
  16172. target: targetLocale
  16173. }));
  16174. }
  16175. if (locale !== targetLocale) {
  16176. const emitter = context.__v_emitter;
  16177. if (emitter) {
  16178. emitter.emit("fallback", {
  16179. type,
  16180. key,
  16181. from,
  16182. to,
  16183. groupId: `${type}:${key}`
  16184. });
  16185. }
  16186. }
  16187. numberFormat = numberFormats[targetLocale] || {};
  16188. format2 = numberFormat[key];
  16189. if (isPlainObject(format2))
  16190. break;
  16191. handleMissing(context, key, targetLocale, missingWarn, type);
  16192. from = to;
  16193. }
  16194. if (!isPlainObject(format2) || !isString(targetLocale)) {
  16195. return unresolving ? NOT_REOSLVED : key;
  16196. }
  16197. let id = `${targetLocale}__${key}`;
  16198. if (!isEmptyObject(overrides)) {
  16199. id = `${id}__${JSON.stringify(overrides)}`;
  16200. }
  16201. let formatter = __numberFormatters.get(id);
  16202. if (!formatter) {
  16203. formatter = new Intl.NumberFormat(targetLocale, assign({}, format2, overrides));
  16204. __numberFormatters.set(id, formatter);
  16205. }
  16206. return !part ? formatter.format(value) : formatter.formatToParts(value);
  16207. }
  16208. function parseNumberArgs(...args) {
  16209. const [arg1, arg2, arg3, arg4] = args;
  16210. let options = {};
  16211. let overrides = {};
  16212. if (!isNumber(arg1)) {
  16213. throw createCoreError(
  16214. 14
  16215. /* INVALID_ARGUMENT */
  16216. );
  16217. }
  16218. const value = arg1;
  16219. if (isString(arg2)) {
  16220. options.key = arg2;
  16221. } else if (isPlainObject(arg2)) {
  16222. options = arg2;
  16223. }
  16224. if (isString(arg3)) {
  16225. options.locale = arg3;
  16226. } else if (isPlainObject(arg3)) {
  16227. overrides = arg3;
  16228. }
  16229. if (isPlainObject(arg4)) {
  16230. overrides = arg4;
  16231. }
  16232. return [options.key || "", value, options, overrides];
  16233. }
  16234. function clearNumberFormat(ctx, locale, format2) {
  16235. const context = ctx;
  16236. for (const key in format2) {
  16237. const id = `${locale}__${key}`;
  16238. if (!context.__numberFormatters.has(id)) {
  16239. continue;
  16240. }
  16241. context.__numberFormatters.delete(id);
  16242. }
  16243. }
  16244. /*!
  16245. * @intlify/vue-devtools v9.1.9
  16246. * (c) 2021 kazuya kawaguchi
  16247. * Released under the MIT License.
  16248. */
  16249. const VueDevToolsLabels = {
  16250. [
  16251. "vue-devtools-plugin-vue-i18n"
  16252. /* PLUGIN */
  16253. ]: "Vue I18n devtools",
  16254. [
  16255. "vue-i18n-resource-inspector"
  16256. /* CUSTOM_INSPECTOR */
  16257. ]: "I18n Resources",
  16258. [
  16259. "vue-i18n-timeline"
  16260. /* TIMELINE */
  16261. ]: "Vue I18n"
  16262. };
  16263. const VueDevToolsPlaceholders = {
  16264. [
  16265. "vue-i18n-resource-inspector"
  16266. /* CUSTOM_INSPECTOR */
  16267. ]: "Search for scopes ..."
  16268. };
  16269. const VueDevToolsTimelineColors = {
  16270. [
  16271. "vue-i18n-timeline"
  16272. /* TIMELINE */
  16273. ]: 16764185
  16274. };
  16275. /*!
  16276. * vue-i18n v9.1.9
  16277. * (c) 2022 kazuya kawaguchi
  16278. * Released under the MIT License.
  16279. */
  16280. const VERSION = "9.1.9";
  16281. function initFeatureFlags() {
  16282. let needWarn = false;
  16283. {
  16284. needWarn = true;
  16285. }
  16286. if (needWarn) {
  16287. console.warn(`You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.`);
  16288. }
  16289. }
  16290. const warnMessages = {
  16291. [
  16292. 6
  16293. /* FALLBACK_TO_ROOT */
  16294. ]: `Fall back to {type} '{key}' with root locale.`,
  16295. [
  16296. 7
  16297. /* NOT_SUPPORTED_PRESERVE */
  16298. ]: `Not supported 'preserve'.`,
  16299. [
  16300. 8
  16301. /* NOT_SUPPORTED_FORMATTER */
  16302. ]: `Not supported 'formatter'.`,
  16303. [
  16304. 9
  16305. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  16306. ]: `Not supported 'preserveDirectiveContent'.`,
  16307. [
  16308. 10
  16309. /* NOT_SUPPORTED_GET_CHOICE_INDEX */
  16310. ]: `Not supported 'getChoiceIndex'.`,
  16311. [
  16312. 11
  16313. /* COMPONENT_NAME_LEGACY_COMPATIBLE */
  16314. ]: `Component name legacy compatible: '{name}' -> 'i18n'`,
  16315. [
  16316. 12
  16317. /* NOT_FOUND_PARENT_SCOPE */
  16318. ]: `Not found parent scope. use the global scope.`
  16319. };
  16320. function getWarnMessage(code, ...args) {
  16321. return format(warnMessages[code], ...args);
  16322. }
  16323. function createI18nError(code, ...args) {
  16324. return createCompileError(code, null, { messages: errorMessages, args });
  16325. }
  16326. const errorMessages = {
  16327. [
  16328. 14
  16329. /* UNEXPECTED_RETURN_TYPE */
  16330. ]: "Unexpected return type in composer",
  16331. [
  16332. 15
  16333. /* INVALID_ARGUMENT */
  16334. ]: "Invalid argument",
  16335. [
  16336. 16
  16337. /* MUST_BE_CALL_SETUP_TOP */
  16338. ]: "Must be called at the top of a `setup` function",
  16339. [
  16340. 17
  16341. /* NOT_INSLALLED */
  16342. ]: "Need to install with `app.use` function",
  16343. [
  16344. 22
  16345. /* UNEXPECTED_ERROR */
  16346. ]: "Unexpected error",
  16347. [
  16348. 18
  16349. /* NOT_AVAILABLE_IN_LEGACY_MODE */
  16350. ]: "Not available in legacy mode",
  16351. [
  16352. 19
  16353. /* REQUIRED_VALUE */
  16354. ]: `Required in value: {0}`,
  16355. [
  16356. 20
  16357. /* INVALID_VALUE */
  16358. ]: `Invalid value`,
  16359. [
  16360. 21
  16361. /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */
  16362. ]: `Cannot setup vue-devtools plugin`
  16363. };
  16364. const DEVTOOLS_META = "__INTLIFY_META__";
  16365. const TransrateVNodeSymbol = makeSymbol("__transrateVNode");
  16366. const DatetimePartsSymbol = makeSymbol("__datetimeParts");
  16367. const NumberPartsSymbol = makeSymbol("__numberParts");
  16368. const EnableEmitter = makeSymbol("__enableEmitter");
  16369. const DisableEmitter = makeSymbol("__disableEmitter");
  16370. const SetPluralRulesSymbol = makeSymbol("__setPluralRules");
  16371. const InejctWithOption = makeSymbol("__injectWithOption");
  16372. let composerID = 0;
  16373. function defineCoreMissingHandler(missing) {
  16374. return (ctx, locale, key, type) => {
  16375. return missing(locale, key, vue.getCurrentInstance() || void 0, type);
  16376. };
  16377. }
  16378. function getLocaleMessages(locale, options) {
  16379. const { messages: messages2, __i18n } = options;
  16380. const ret = isPlainObject(messages2) ? messages2 : isArray(__i18n) ? {} : { [locale]: {} };
  16381. if (isArray(__i18n)) {
  16382. __i18n.forEach(({ locale: locale2, resource }) => {
  16383. if (locale2) {
  16384. ret[locale2] = ret[locale2] || {};
  16385. deepCopy(resource, ret[locale2]);
  16386. } else {
  16387. deepCopy(resource, ret);
  16388. }
  16389. });
  16390. }
  16391. if (options.flatJson) {
  16392. for (const key in ret) {
  16393. if (hasOwn$1(ret, key)) {
  16394. handleFlatJson(ret[key]);
  16395. }
  16396. }
  16397. }
  16398. return ret;
  16399. }
  16400. const isNotObjectOrIsArray = (val) => !isObject$1(val) || isArray(val);
  16401. function deepCopy(src, des) {
  16402. if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
  16403. throw createI18nError(
  16404. 20
  16405. /* INVALID_VALUE */
  16406. );
  16407. }
  16408. for (const key in src) {
  16409. if (hasOwn$1(src, key)) {
  16410. if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {
  16411. des[key] = src[key];
  16412. } else {
  16413. deepCopy(src[key], des[key]);
  16414. }
  16415. }
  16416. }
  16417. }
  16418. const getMetaInfo = () => {
  16419. const instance = vue.getCurrentInstance();
  16420. return instance && instance.type[DEVTOOLS_META] ? { [DEVTOOLS_META]: instance.type[DEVTOOLS_META] } : null;
  16421. };
  16422. function createComposer(options = {}) {
  16423. const { __root } = options;
  16424. const _isGlobal = __root === void 0;
  16425. let _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true;
  16426. const _locale = vue.ref(
  16427. // prettier-ignore
  16428. __root && _inheritLocale ? __root.locale.value : isString(options.locale) ? options.locale : "en-US"
  16429. );
  16430. const _fallbackLocale = vue.ref(
  16431. // prettier-ignore
  16432. __root && _inheritLocale ? __root.fallbackLocale.value : isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value
  16433. );
  16434. const _messages = vue.ref(getLocaleMessages(_locale.value, options));
  16435. const _datetimeFormats = vue.ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
  16436. const _numberFormats = vue.ref(isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
  16437. let _missingWarn = __root ? __root.missingWarn : isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true;
  16438. let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
  16439. let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
  16440. let _fallbackFormat = !!options.fallbackFormat;
  16441. let _missing = isFunction(options.missing) ? options.missing : null;
  16442. let _runtimeMissing = isFunction(options.missing) ? defineCoreMissingHandler(options.missing) : null;
  16443. let _postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null;
  16444. let _warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
  16445. let _escapeParameter = !!options.escapeParameter;
  16446. const _modifiers = __root ? __root.modifiers : isPlainObject(options.modifiers) ? options.modifiers : {};
  16447. let _pluralRules = options.pluralRules || __root && __root.pluralRules;
  16448. let _context;
  16449. function getCoreContext() {
  16450. return createCoreContext({
  16451. version: VERSION,
  16452. locale: _locale.value,
  16453. fallbackLocale: _fallbackLocale.value,
  16454. messages: _messages.value,
  16455. messageCompiler: function compileToFunction(source) {
  16456. return (ctx) => {
  16457. return ctx.normalize([source]);
  16458. };
  16459. },
  16460. datetimeFormats: _datetimeFormats.value,
  16461. numberFormats: _numberFormats.value,
  16462. modifiers: _modifiers,
  16463. pluralRules: _pluralRules,
  16464. missing: _runtimeMissing === null ? void 0 : _runtimeMissing,
  16465. missingWarn: _missingWarn,
  16466. fallbackWarn: _fallbackWarn,
  16467. fallbackFormat: _fallbackFormat,
  16468. unresolving: true,
  16469. postTranslation: _postTranslation === null ? void 0 : _postTranslation,
  16470. warnHtmlMessage: _warnHtmlMessage,
  16471. escapeParameter: _escapeParameter,
  16472. __datetimeFormatters: isPlainObject(_context) ? _context.__datetimeFormatters : void 0,
  16473. __numberFormatters: isPlainObject(_context) ? _context.__numberFormatters : void 0,
  16474. __v_emitter: isPlainObject(_context) ? _context.__v_emitter : void 0,
  16475. __meta: { framework: "vue" }
  16476. });
  16477. }
  16478. _context = getCoreContext();
  16479. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  16480. function trackReactivityValues() {
  16481. return [
  16482. _locale.value,
  16483. _fallbackLocale.value,
  16484. _messages.value,
  16485. _datetimeFormats.value,
  16486. _numberFormats.value
  16487. ];
  16488. }
  16489. const locale = vue.computed({
  16490. get: () => _locale.value,
  16491. set: (val) => {
  16492. _locale.value = val;
  16493. _context.locale = _locale.value;
  16494. }
  16495. });
  16496. const fallbackLocale = vue.computed({
  16497. get: () => _fallbackLocale.value,
  16498. set: (val) => {
  16499. _fallbackLocale.value = val;
  16500. _context.fallbackLocale = _fallbackLocale.value;
  16501. updateFallbackLocale(_context, _locale.value, val);
  16502. }
  16503. });
  16504. const messages2 = vue.computed(() => _messages.value);
  16505. const datetimeFormats = vue.computed(() => _datetimeFormats.value);
  16506. const numberFormats = vue.computed(() => _numberFormats.value);
  16507. function getPostTranslationHandler() {
  16508. return isFunction(_postTranslation) ? _postTranslation : null;
  16509. }
  16510. function setPostTranslationHandler(handler) {
  16511. _postTranslation = handler;
  16512. _context.postTranslation = handler;
  16513. }
  16514. function getMissingHandler() {
  16515. return _missing;
  16516. }
  16517. function setMissingHandler(handler) {
  16518. if (handler !== null) {
  16519. _runtimeMissing = defineCoreMissingHandler(handler);
  16520. }
  16521. _missing = handler;
  16522. _context.missing = _runtimeMissing;
  16523. }
  16524. function isResolvedTranslateMessage(type, arg) {
  16525. return type !== "translate" || !!arg.resolvedMessage === false;
  16526. }
  16527. function wrapWithDeps(fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) {
  16528. trackReactivityValues();
  16529. let ret;
  16530. {
  16531. try {
  16532. setAdditionalMeta(getMetaInfo());
  16533. ret = fn(_context);
  16534. } finally {
  16535. setAdditionalMeta(null);
  16536. }
  16537. }
  16538. if (isNumber(ret) && ret === NOT_REOSLVED) {
  16539. const [key, arg2] = argumentParser();
  16540. if (__root && isString(key) && isResolvedTranslateMessage(warnType, arg2)) {
  16541. if (_fallbackRoot && (isTranslateFallbackWarn(_fallbackWarn, key) || isTranslateMissingWarn(_missingWarn, key))) {
  16542. warn(getWarnMessage(6, {
  16543. key,
  16544. type: warnType
  16545. }));
  16546. }
  16547. {
  16548. const { __v_emitter: emitter } = _context;
  16549. if (emitter && _fallbackRoot) {
  16550. emitter.emit("fallback", {
  16551. type: warnType,
  16552. key,
  16553. to: "global",
  16554. groupId: `${warnType}:${key}`
  16555. });
  16556. }
  16557. }
  16558. }
  16559. return __root && _fallbackRoot ? fallbackSuccess(__root) : fallbackFail(key);
  16560. } else if (successCondition(ret)) {
  16561. return ret;
  16562. } else {
  16563. throw createI18nError(
  16564. 14
  16565. /* UNEXPECTED_RETURN_TYPE */
  16566. );
  16567. }
  16568. }
  16569. function t2(...args) {
  16570. return wrapWithDeps((context) => translate(context, ...args), () => parseTranslateArgs(...args), "translate", (root) => root.t(...args), (key) => key, (val) => isString(val));
  16571. }
  16572. function rt2(...args) {
  16573. const [arg1, arg2, arg3] = args;
  16574. if (arg3 && !isObject$1(arg3)) {
  16575. throw createI18nError(
  16576. 15
  16577. /* INVALID_ARGUMENT */
  16578. );
  16579. }
  16580. return t2(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);
  16581. }
  16582. function d2(...args) {
  16583. return wrapWithDeps((context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", (root) => root.d(...args), () => MISSING_RESOLVE_VALUE, (val) => isString(val));
  16584. }
  16585. function n2(...args) {
  16586. return wrapWithDeps((context) => number(context, ...args), () => parseNumberArgs(...args), "number format", (root) => root.n(...args), () => MISSING_RESOLVE_VALUE, (val) => isString(val));
  16587. }
  16588. function normalize(values) {
  16589. return values.map((val) => isString(val) ? vue.createVNode(vue.Text, null, val, 0) : val);
  16590. }
  16591. const interpolate = (val) => val;
  16592. const processor = {
  16593. normalize,
  16594. interpolate,
  16595. type: "vnode"
  16596. };
  16597. function transrateVNode(...args) {
  16598. return wrapWithDeps(
  16599. (context) => {
  16600. let ret;
  16601. const _context2 = context;
  16602. try {
  16603. _context2.processor = processor;
  16604. ret = translate(_context2, ...args);
  16605. } finally {
  16606. _context2.processor = null;
  16607. }
  16608. return ret;
  16609. },
  16610. () => parseTranslateArgs(...args),
  16611. "translate",
  16612. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  16613. (root) => root[TransrateVNodeSymbol](...args),
  16614. (key) => [vue.createVNode(vue.Text, null, key, 0)],
  16615. (val) => isArray(val)
  16616. );
  16617. }
  16618. function numberParts(...args) {
  16619. return wrapWithDeps(
  16620. (context) => number(context, ...args),
  16621. () => parseNumberArgs(...args),
  16622. "number format",
  16623. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  16624. (root) => root[NumberPartsSymbol](...args),
  16625. () => [],
  16626. (val) => isString(val) || isArray(val)
  16627. );
  16628. }
  16629. function datetimeParts(...args) {
  16630. return wrapWithDeps(
  16631. (context) => datetime(context, ...args),
  16632. () => parseDateTimeArgs(...args),
  16633. "datetime format",
  16634. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  16635. (root) => root[DatetimePartsSymbol](...args),
  16636. () => [],
  16637. (val) => isString(val) || isArray(val)
  16638. );
  16639. }
  16640. function setPluralRules(rules) {
  16641. _pluralRules = rules;
  16642. _context.pluralRules = _pluralRules;
  16643. }
  16644. function te2(key, locale2) {
  16645. const targetLocale = isString(locale2) ? locale2 : _locale.value;
  16646. const message = getLocaleMessage(targetLocale);
  16647. return resolveValue(message, key) !== null;
  16648. }
  16649. function resolveMessages(key) {
  16650. let messages22 = null;
  16651. const locales = getLocaleChain(_context, _fallbackLocale.value, _locale.value);
  16652. for (let i2 = 0; i2 < locales.length; i2++) {
  16653. const targetLocaleMessages = _messages.value[locales[i2]] || {};
  16654. const messageValue = resolveValue(targetLocaleMessages, key);
  16655. if (messageValue != null) {
  16656. messages22 = messageValue;
  16657. break;
  16658. }
  16659. }
  16660. return messages22;
  16661. }
  16662. function tm(key) {
  16663. const messages22 = resolveMessages(key);
  16664. return messages22 != null ? messages22 : __root ? __root.tm(key) || {} : {};
  16665. }
  16666. function getLocaleMessage(locale2) {
  16667. return _messages.value[locale2] || {};
  16668. }
  16669. function setLocaleMessage(locale2, message) {
  16670. _messages.value[locale2] = message;
  16671. _context.messages = _messages.value;
  16672. }
  16673. function mergeLocaleMessage(locale2, message) {
  16674. _messages.value[locale2] = _messages.value[locale2] || {};
  16675. deepCopy(message, _messages.value[locale2]);
  16676. _context.messages = _messages.value;
  16677. }
  16678. function getDateTimeFormat(locale2) {
  16679. return _datetimeFormats.value[locale2] || {};
  16680. }
  16681. function setDateTimeFormat(locale2, format2) {
  16682. _datetimeFormats.value[locale2] = format2;
  16683. _context.datetimeFormats = _datetimeFormats.value;
  16684. clearDateTimeFormat(_context, locale2, format2);
  16685. }
  16686. function mergeDateTimeFormat(locale2, format2) {
  16687. _datetimeFormats.value[locale2] = assign(_datetimeFormats.value[locale2] || {}, format2);
  16688. _context.datetimeFormats = _datetimeFormats.value;
  16689. clearDateTimeFormat(_context, locale2, format2);
  16690. }
  16691. function getNumberFormat(locale2) {
  16692. return _numberFormats.value[locale2] || {};
  16693. }
  16694. function setNumberFormat(locale2, format2) {
  16695. _numberFormats.value[locale2] = format2;
  16696. _context.numberFormats = _numberFormats.value;
  16697. clearNumberFormat(_context, locale2, format2);
  16698. }
  16699. function mergeNumberFormat(locale2, format2) {
  16700. _numberFormats.value[locale2] = assign(_numberFormats.value[locale2] || {}, format2);
  16701. _context.numberFormats = _numberFormats.value;
  16702. clearNumberFormat(_context, locale2, format2);
  16703. }
  16704. composerID++;
  16705. if (__root) {
  16706. vue.watch(__root.locale, (val) => {
  16707. if (_inheritLocale) {
  16708. _locale.value = val;
  16709. _context.locale = val;
  16710. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  16711. }
  16712. });
  16713. vue.watch(__root.fallbackLocale, (val) => {
  16714. if (_inheritLocale) {
  16715. _fallbackLocale.value = val;
  16716. _context.fallbackLocale = val;
  16717. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  16718. }
  16719. });
  16720. }
  16721. const composer = {
  16722. id: composerID,
  16723. locale,
  16724. fallbackLocale,
  16725. get inheritLocale() {
  16726. return _inheritLocale;
  16727. },
  16728. set inheritLocale(val) {
  16729. _inheritLocale = val;
  16730. if (val && __root) {
  16731. _locale.value = __root.locale.value;
  16732. _fallbackLocale.value = __root.fallbackLocale.value;
  16733. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  16734. }
  16735. },
  16736. get availableLocales() {
  16737. return Object.keys(_messages.value).sort();
  16738. },
  16739. messages: messages2,
  16740. datetimeFormats,
  16741. numberFormats,
  16742. get modifiers() {
  16743. return _modifiers;
  16744. },
  16745. get pluralRules() {
  16746. return _pluralRules || {};
  16747. },
  16748. get isGlobal() {
  16749. return _isGlobal;
  16750. },
  16751. get missingWarn() {
  16752. return _missingWarn;
  16753. },
  16754. set missingWarn(val) {
  16755. _missingWarn = val;
  16756. _context.missingWarn = _missingWarn;
  16757. },
  16758. get fallbackWarn() {
  16759. return _fallbackWarn;
  16760. },
  16761. set fallbackWarn(val) {
  16762. _fallbackWarn = val;
  16763. _context.fallbackWarn = _fallbackWarn;
  16764. },
  16765. get fallbackRoot() {
  16766. return _fallbackRoot;
  16767. },
  16768. set fallbackRoot(val) {
  16769. _fallbackRoot = val;
  16770. },
  16771. get fallbackFormat() {
  16772. return _fallbackFormat;
  16773. },
  16774. set fallbackFormat(val) {
  16775. _fallbackFormat = val;
  16776. _context.fallbackFormat = _fallbackFormat;
  16777. },
  16778. get warnHtmlMessage() {
  16779. return _warnHtmlMessage;
  16780. },
  16781. set warnHtmlMessage(val) {
  16782. _warnHtmlMessage = val;
  16783. _context.warnHtmlMessage = val;
  16784. },
  16785. get escapeParameter() {
  16786. return _escapeParameter;
  16787. },
  16788. set escapeParameter(val) {
  16789. _escapeParameter = val;
  16790. _context.escapeParameter = val;
  16791. },
  16792. t: t2,
  16793. rt: rt2,
  16794. d: d2,
  16795. n: n2,
  16796. te: te2,
  16797. tm,
  16798. getLocaleMessage,
  16799. setLocaleMessage,
  16800. mergeLocaleMessage,
  16801. getDateTimeFormat,
  16802. setDateTimeFormat,
  16803. mergeDateTimeFormat,
  16804. getNumberFormat,
  16805. setNumberFormat,
  16806. mergeNumberFormat,
  16807. getPostTranslationHandler,
  16808. setPostTranslationHandler,
  16809. getMissingHandler,
  16810. setMissingHandler,
  16811. [TransrateVNodeSymbol]: transrateVNode,
  16812. [NumberPartsSymbol]: numberParts,
  16813. [DatetimePartsSymbol]: datetimeParts,
  16814. [SetPluralRulesSymbol]: setPluralRules,
  16815. [InejctWithOption]: options.__injectWithOption
  16816. // eslint-disable-line @typescript-eslint/no-explicit-any
  16817. };
  16818. {
  16819. composer[EnableEmitter] = (emitter) => {
  16820. _context.__v_emitter = emitter;
  16821. };
  16822. composer[DisableEmitter] = () => {
  16823. _context.__v_emitter = void 0;
  16824. };
  16825. }
  16826. return composer;
  16827. }
  16828. function convertComposerOptions(options) {
  16829. const locale = isString(options.locale) ? options.locale : "en-US";
  16830. const fallbackLocale = isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale;
  16831. const missing = isFunction(options.missing) ? options.missing : void 0;
  16832. const missingWarn = isBoolean(options.silentTranslationWarn) || isRegExp(options.silentTranslationWarn) ? !options.silentTranslationWarn : true;
  16833. const fallbackWarn = isBoolean(options.silentFallbackWarn) || isRegExp(options.silentFallbackWarn) ? !options.silentFallbackWarn : true;
  16834. const fallbackRoot = isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
  16835. const fallbackFormat = !!options.formatFallbackMessages;
  16836. const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {};
  16837. const pluralizationRules = options.pluralizationRules;
  16838. const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : void 0;
  16839. const warnHtmlMessage = isString(options.warnHtmlInMessage) ? options.warnHtmlInMessage !== "off" : true;
  16840. const escapeParameter = !!options.escapeParameterHtml;
  16841. const inheritLocale = isBoolean(options.sync) ? options.sync : true;
  16842. if (options.formatter) {
  16843. warn(getWarnMessage(
  16844. 8
  16845. /* NOT_SUPPORTED_FORMATTER */
  16846. ));
  16847. }
  16848. if (options.preserveDirectiveContent) {
  16849. warn(getWarnMessage(
  16850. 9
  16851. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  16852. ));
  16853. }
  16854. let messages2 = options.messages;
  16855. if (isPlainObject(options.sharedMessages)) {
  16856. const sharedMessages = options.sharedMessages;
  16857. const locales = Object.keys(sharedMessages);
  16858. messages2 = locales.reduce((messages22, locale2) => {
  16859. const message = messages22[locale2] || (messages22[locale2] = {});
  16860. assign(message, sharedMessages[locale2]);
  16861. return messages22;
  16862. }, messages2 || {});
  16863. }
  16864. const { __i18n, __root, __injectWithOption } = options;
  16865. const datetimeFormats = options.datetimeFormats;
  16866. const numberFormats = options.numberFormats;
  16867. const flatJson = options.flatJson;
  16868. return {
  16869. locale,
  16870. fallbackLocale,
  16871. messages: messages2,
  16872. flatJson,
  16873. datetimeFormats,
  16874. numberFormats,
  16875. missing,
  16876. missingWarn,
  16877. fallbackWarn,
  16878. fallbackRoot,
  16879. fallbackFormat,
  16880. modifiers,
  16881. pluralRules: pluralizationRules,
  16882. postTranslation,
  16883. warnHtmlMessage,
  16884. escapeParameter,
  16885. inheritLocale,
  16886. __i18n,
  16887. __root,
  16888. __injectWithOption
  16889. };
  16890. }
  16891. function createVueI18n(options = {}) {
  16892. const composer = createComposer(convertComposerOptions(options));
  16893. const vueI18n = {
  16894. // id
  16895. id: composer.id,
  16896. // locale
  16897. get locale() {
  16898. return composer.locale.value;
  16899. },
  16900. set locale(val) {
  16901. composer.locale.value = val;
  16902. },
  16903. // fallbackLocale
  16904. get fallbackLocale() {
  16905. return composer.fallbackLocale.value;
  16906. },
  16907. set fallbackLocale(val) {
  16908. composer.fallbackLocale.value = val;
  16909. },
  16910. // messages
  16911. get messages() {
  16912. return composer.messages.value;
  16913. },
  16914. // datetimeFormats
  16915. get datetimeFormats() {
  16916. return composer.datetimeFormats.value;
  16917. },
  16918. // numberFormats
  16919. get numberFormats() {
  16920. return composer.numberFormats.value;
  16921. },
  16922. // availableLocales
  16923. get availableLocales() {
  16924. return composer.availableLocales;
  16925. },
  16926. // formatter
  16927. get formatter() {
  16928. warn(getWarnMessage(
  16929. 8
  16930. /* NOT_SUPPORTED_FORMATTER */
  16931. ));
  16932. return {
  16933. interpolate() {
  16934. return [];
  16935. }
  16936. };
  16937. },
  16938. set formatter(val) {
  16939. warn(getWarnMessage(
  16940. 8
  16941. /* NOT_SUPPORTED_FORMATTER */
  16942. ));
  16943. },
  16944. // missing
  16945. get missing() {
  16946. return composer.getMissingHandler();
  16947. },
  16948. set missing(handler) {
  16949. composer.setMissingHandler(handler);
  16950. },
  16951. // silentTranslationWarn
  16952. get silentTranslationWarn() {
  16953. return isBoolean(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn;
  16954. },
  16955. set silentTranslationWarn(val) {
  16956. composer.missingWarn = isBoolean(val) ? !val : val;
  16957. },
  16958. // silentFallbackWarn
  16959. get silentFallbackWarn() {
  16960. return isBoolean(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn;
  16961. },
  16962. set silentFallbackWarn(val) {
  16963. composer.fallbackWarn = isBoolean(val) ? !val : val;
  16964. },
  16965. // modifiers
  16966. get modifiers() {
  16967. return composer.modifiers;
  16968. },
  16969. // formatFallbackMessages
  16970. get formatFallbackMessages() {
  16971. return composer.fallbackFormat;
  16972. },
  16973. set formatFallbackMessages(val) {
  16974. composer.fallbackFormat = val;
  16975. },
  16976. // postTranslation
  16977. get postTranslation() {
  16978. return composer.getPostTranslationHandler();
  16979. },
  16980. set postTranslation(handler) {
  16981. composer.setPostTranslationHandler(handler);
  16982. },
  16983. // sync
  16984. get sync() {
  16985. return composer.inheritLocale;
  16986. },
  16987. set sync(val) {
  16988. composer.inheritLocale = val;
  16989. },
  16990. // warnInHtmlMessage
  16991. get warnHtmlInMessage() {
  16992. return composer.warnHtmlMessage ? "warn" : "off";
  16993. },
  16994. set warnHtmlInMessage(val) {
  16995. composer.warnHtmlMessage = val !== "off";
  16996. },
  16997. // escapeParameterHtml
  16998. get escapeParameterHtml() {
  16999. return composer.escapeParameter;
  17000. },
  17001. set escapeParameterHtml(val) {
  17002. composer.escapeParameter = val;
  17003. },
  17004. // preserveDirectiveContent
  17005. get preserveDirectiveContent() {
  17006. warn(getWarnMessage(
  17007. 9
  17008. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  17009. ));
  17010. return true;
  17011. },
  17012. set preserveDirectiveContent(val) {
  17013. warn(getWarnMessage(
  17014. 9
  17015. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  17016. ));
  17017. },
  17018. // pluralizationRules
  17019. get pluralizationRules() {
  17020. return composer.pluralRules || {};
  17021. },
  17022. // for internal
  17023. __composer: composer,
  17024. // t
  17025. t(...args) {
  17026. const [arg1, arg2, arg3] = args;
  17027. const options2 = {};
  17028. let list = null;
  17029. let named = null;
  17030. if (!isString(arg1)) {
  17031. throw createI18nError(
  17032. 15
  17033. /* INVALID_ARGUMENT */
  17034. );
  17035. }
  17036. const key = arg1;
  17037. if (isString(arg2)) {
  17038. options2.locale = arg2;
  17039. } else if (isArray(arg2)) {
  17040. list = arg2;
  17041. } else if (isPlainObject(arg2)) {
  17042. named = arg2;
  17043. }
  17044. if (isArray(arg3)) {
  17045. list = arg3;
  17046. } else if (isPlainObject(arg3)) {
  17047. named = arg3;
  17048. }
  17049. return composer.t(key, list || named || {}, options2);
  17050. },
  17051. rt(...args) {
  17052. return composer.rt(...args);
  17053. },
  17054. // tc
  17055. tc(...args) {
  17056. const [arg1, arg2, arg3] = args;
  17057. const options2 = { plural: 1 };
  17058. let list = null;
  17059. let named = null;
  17060. if (!isString(arg1)) {
  17061. throw createI18nError(
  17062. 15
  17063. /* INVALID_ARGUMENT */
  17064. );
  17065. }
  17066. const key = arg1;
  17067. if (isString(arg2)) {
  17068. options2.locale = arg2;
  17069. } else if (isNumber(arg2)) {
  17070. options2.plural = arg2;
  17071. } else if (isArray(arg2)) {
  17072. list = arg2;
  17073. } else if (isPlainObject(arg2)) {
  17074. named = arg2;
  17075. }
  17076. if (isString(arg3)) {
  17077. options2.locale = arg3;
  17078. } else if (isArray(arg3)) {
  17079. list = arg3;
  17080. } else if (isPlainObject(arg3)) {
  17081. named = arg3;
  17082. }
  17083. return composer.t(key, list || named || {}, options2);
  17084. },
  17085. // te
  17086. te(key, locale) {
  17087. return composer.te(key, locale);
  17088. },
  17089. // tm
  17090. tm(key) {
  17091. return composer.tm(key);
  17092. },
  17093. // getLocaleMessage
  17094. getLocaleMessage(locale) {
  17095. return composer.getLocaleMessage(locale);
  17096. },
  17097. // setLocaleMessage
  17098. setLocaleMessage(locale, message) {
  17099. composer.setLocaleMessage(locale, message);
  17100. },
  17101. // mergeLocaleMessage
  17102. mergeLocaleMessage(locale, message) {
  17103. composer.mergeLocaleMessage(locale, message);
  17104. },
  17105. // d
  17106. d(...args) {
  17107. return composer.d(...args);
  17108. },
  17109. // getDateTimeFormat
  17110. getDateTimeFormat(locale) {
  17111. return composer.getDateTimeFormat(locale);
  17112. },
  17113. // setDateTimeFormat
  17114. setDateTimeFormat(locale, format2) {
  17115. composer.setDateTimeFormat(locale, format2);
  17116. },
  17117. // mergeDateTimeFormat
  17118. mergeDateTimeFormat(locale, format2) {
  17119. composer.mergeDateTimeFormat(locale, format2);
  17120. },
  17121. // n
  17122. n(...args) {
  17123. return composer.n(...args);
  17124. },
  17125. // getNumberFormat
  17126. getNumberFormat(locale) {
  17127. return composer.getNumberFormat(locale);
  17128. },
  17129. // setNumberFormat
  17130. setNumberFormat(locale, format2) {
  17131. composer.setNumberFormat(locale, format2);
  17132. },
  17133. // mergeNumberFormat
  17134. mergeNumberFormat(locale, format2) {
  17135. composer.mergeNumberFormat(locale, format2);
  17136. },
  17137. // getChoiceIndex
  17138. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  17139. getChoiceIndex(choice, choicesLength) {
  17140. warn(getWarnMessage(
  17141. 10
  17142. /* NOT_SUPPORTED_GET_CHOICE_INDEX */
  17143. ));
  17144. return -1;
  17145. },
  17146. // for internal
  17147. __onComponentInstanceCreated(target) {
  17148. const { componentInstanceCreatedListener } = options;
  17149. if (componentInstanceCreatedListener) {
  17150. componentInstanceCreatedListener(target, vueI18n);
  17151. }
  17152. }
  17153. };
  17154. {
  17155. vueI18n.__enableEmitter = (emitter) => {
  17156. const __composer = composer;
  17157. __composer[EnableEmitter] && __composer[EnableEmitter](emitter);
  17158. };
  17159. vueI18n.__disableEmitter = () => {
  17160. const __composer = composer;
  17161. __composer[DisableEmitter] && __composer[DisableEmitter]();
  17162. };
  17163. }
  17164. return vueI18n;
  17165. }
  17166. const baseFormatProps = {
  17167. tag: {
  17168. type: [String, Object]
  17169. },
  17170. locale: {
  17171. type: String
  17172. },
  17173. scope: {
  17174. type: String,
  17175. validator: (val) => val === "parent" || val === "global",
  17176. default: "parent"
  17177. },
  17178. i18n: {
  17179. type: Object
  17180. }
  17181. };
  17182. const Translation = {
  17183. /* eslint-disable */
  17184. name: "i18n-t",
  17185. props: assign({
  17186. keypath: {
  17187. type: String,
  17188. required: true
  17189. },
  17190. plural: {
  17191. type: [Number, String],
  17192. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  17193. validator: (val) => isNumber(val) || !isNaN(val)
  17194. }
  17195. }, baseFormatProps),
  17196. /* eslint-enable */
  17197. setup(props, context) {
  17198. const { slots, attrs } = context;
  17199. const i18n2 = props.i18n || useI18n({
  17200. useScope: props.scope,
  17201. __useComponent: true
  17202. });
  17203. const keys = Object.keys(slots).filter((key) => key !== "_");
  17204. return () => {
  17205. const options = {};
  17206. if (props.locale) {
  17207. options.locale = props.locale;
  17208. }
  17209. if (props.plural !== void 0) {
  17210. options.plural = isString(props.plural) ? +props.plural : props.plural;
  17211. }
  17212. const arg = getInterpolateArg(context, keys);
  17213. const children = i18n2[TransrateVNodeSymbol](props.keypath, arg, options);
  17214. const assignedAttrs = assign({}, attrs);
  17215. return isString(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$1(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children);
  17216. };
  17217. }
  17218. };
  17219. function getInterpolateArg({ slots }, keys) {
  17220. if (keys.length === 1 && keys[0] === "default") {
  17221. return slots.default ? slots.default() : [];
  17222. } else {
  17223. return keys.reduce((arg, key) => {
  17224. const slot = slots[key];
  17225. if (slot) {
  17226. arg[key] = slot();
  17227. }
  17228. return arg;
  17229. }, {});
  17230. }
  17231. }
  17232. function renderFormatter(props, context, slotKeys, partFormatter) {
  17233. const { slots, attrs } = context;
  17234. return () => {
  17235. const options = { part: true };
  17236. let overrides = {};
  17237. if (props.locale) {
  17238. options.locale = props.locale;
  17239. }
  17240. if (isString(props.format)) {
  17241. options.key = props.format;
  17242. } else if (isObject$1(props.format)) {
  17243. if (isString(props.format.key)) {
  17244. options.key = props.format.key;
  17245. }
  17246. overrides = Object.keys(props.format).reduce((options2, prop) => {
  17247. return slotKeys.includes(prop) ? assign({}, options2, { [prop]: props.format[prop] }) : options2;
  17248. }, {});
  17249. }
  17250. const parts = partFormatter(...[props.value, options, overrides]);
  17251. let children = [options.key];
  17252. if (isArray(parts)) {
  17253. children = parts.map((part, index) => {
  17254. const slot = slots[part.type];
  17255. return slot ? slot({ [part.type]: part.value, index, parts }) : [part.value];
  17256. });
  17257. } else if (isString(parts)) {
  17258. children = [parts];
  17259. }
  17260. const assignedAttrs = assign({}, attrs);
  17261. return isString(props.tag) ? vue.h(props.tag, assignedAttrs, children) : isObject$1(props.tag) ? vue.h(props.tag, assignedAttrs, children) : vue.h(vue.Fragment, assignedAttrs, children);
  17262. };
  17263. }
  17264. const NUMBER_FORMAT_KEYS = [
  17265. "localeMatcher",
  17266. "style",
  17267. "unit",
  17268. "unitDisplay",
  17269. "currency",
  17270. "currencyDisplay",
  17271. "useGrouping",
  17272. "numberingSystem",
  17273. "minimumIntegerDigits",
  17274. "minimumFractionDigits",
  17275. "maximumFractionDigits",
  17276. "minimumSignificantDigits",
  17277. "maximumSignificantDigits",
  17278. "notation",
  17279. "formatMatcher"
  17280. ];
  17281. const NumberFormat = {
  17282. /* eslint-disable */
  17283. name: "i18n-n",
  17284. props: assign({
  17285. value: {
  17286. type: Number,
  17287. required: true
  17288. },
  17289. format: {
  17290. type: [String, Object]
  17291. }
  17292. }, baseFormatProps),
  17293. /* eslint-enable */
  17294. setup(props, context) {
  17295. const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
  17296. return renderFormatter(props, context, NUMBER_FORMAT_KEYS, (...args) => (
  17297. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  17298. i18n2[NumberPartsSymbol](...args)
  17299. ));
  17300. }
  17301. };
  17302. const DATETIME_FORMAT_KEYS = [
  17303. "dateStyle",
  17304. "timeStyle",
  17305. "fractionalSecondDigits",
  17306. "calendar",
  17307. "dayPeriod",
  17308. "numberingSystem",
  17309. "localeMatcher",
  17310. "timeZone",
  17311. "hour12",
  17312. "hourCycle",
  17313. "formatMatcher",
  17314. "weekday",
  17315. "era",
  17316. "year",
  17317. "month",
  17318. "day",
  17319. "hour",
  17320. "minute",
  17321. "second",
  17322. "timeZoneName"
  17323. ];
  17324. const DatetimeFormat = {
  17325. /* eslint-disable */
  17326. name: "i18n-d",
  17327. props: assign({
  17328. value: {
  17329. type: [Number, Date],
  17330. required: true
  17331. },
  17332. format: {
  17333. type: [String, Object]
  17334. }
  17335. }, baseFormatProps),
  17336. /* eslint-enable */
  17337. setup(props, context) {
  17338. const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
  17339. return renderFormatter(props, context, DATETIME_FORMAT_KEYS, (...args) => (
  17340. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  17341. i18n2[DatetimePartsSymbol](...args)
  17342. ));
  17343. }
  17344. };
  17345. function getComposer$2(i18n2, instance) {
  17346. const i18nInternal = i18n2;
  17347. if (i18n2.mode === "composition") {
  17348. return i18nInternal.__getInstance(instance) || i18n2.global;
  17349. } else {
  17350. const vueI18n = i18nInternal.__getInstance(instance);
  17351. return vueI18n != null ? vueI18n.__composer : i18n2.global.__composer;
  17352. }
  17353. }
  17354. function vTDirective(i18n2) {
  17355. const bind = (el, { instance, value, modifiers }) => {
  17356. if (!instance || !instance.$) {
  17357. throw createI18nError(
  17358. 22
  17359. /* UNEXPECTED_ERROR */
  17360. );
  17361. }
  17362. const composer = getComposer$2(i18n2, instance.$);
  17363. if (modifiers.preserve) {
  17364. warn(getWarnMessage(
  17365. 7
  17366. /* NOT_SUPPORTED_PRESERVE */
  17367. ));
  17368. }
  17369. const parsedValue = parseValue(value);
  17370. el.textContent = composer.t(...makeParams(parsedValue));
  17371. };
  17372. return {
  17373. beforeMount: bind,
  17374. beforeUpdate: bind
  17375. };
  17376. }
  17377. function parseValue(value) {
  17378. if (isString(value)) {
  17379. return { path: value };
  17380. } else if (isPlainObject(value)) {
  17381. if (!("path" in value)) {
  17382. throw createI18nError(19, "path");
  17383. }
  17384. return value;
  17385. } else {
  17386. throw createI18nError(
  17387. 20
  17388. /* INVALID_VALUE */
  17389. );
  17390. }
  17391. }
  17392. function makeParams(value) {
  17393. const { path, locale, args, choice, plural } = value;
  17394. const options = {};
  17395. const named = args || {};
  17396. if (isString(locale)) {
  17397. options.locale = locale;
  17398. }
  17399. if (isNumber(choice)) {
  17400. options.plural = choice;
  17401. }
  17402. if (isNumber(plural)) {
  17403. options.plural = plural;
  17404. }
  17405. return [path, named, options];
  17406. }
  17407. function apply(app, i18n2, ...options) {
  17408. const pluginOptions = isPlainObject(options[0]) ? options[0] : {};
  17409. const useI18nComponentName = !!pluginOptions.useI18nComponentName;
  17410. const globalInstall = isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true;
  17411. if (globalInstall && useI18nComponentName) {
  17412. warn(getWarnMessage(11, {
  17413. name: Translation.name
  17414. }));
  17415. }
  17416. if (globalInstall) {
  17417. app.component(!useI18nComponentName ? Translation.name : "i18n", Translation);
  17418. app.component(NumberFormat.name, NumberFormat);
  17419. app.component(DatetimeFormat.name, DatetimeFormat);
  17420. }
  17421. app.directive("t", vTDirective(i18n2));
  17422. }
  17423. const VUE_I18N_COMPONENT_TYPES = "vue-i18n: composer properties";
  17424. let devtoolsApi;
  17425. async function enableDevTools(app, i18n2) {
  17426. return new Promise((resolve, reject) => {
  17427. try {
  17428. setupDevtoolsPlugin({
  17429. id: "vue-devtools-plugin-vue-i18n",
  17430. label: VueDevToolsLabels[
  17431. "vue-devtools-plugin-vue-i18n"
  17432. /* PLUGIN */
  17433. ],
  17434. packageName: "vue-i18n",
  17435. homepage: "https://vue-i18n.intlify.dev",
  17436. logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
  17437. componentStateTypes: [VUE_I18N_COMPONENT_TYPES],
  17438. app
  17439. }, (api) => {
  17440. devtoolsApi = api;
  17441. api.on.visitComponentTree(({ componentInstance, treeNode }) => {
  17442. updateComponentTreeTags(componentInstance, treeNode, i18n2);
  17443. });
  17444. api.on.inspectComponent(({ componentInstance, instanceData }) => {
  17445. if (componentInstance.vnode.el.__VUE_I18N__ && instanceData) {
  17446. if (i18n2.mode === "legacy") {
  17447. if (componentInstance.vnode.el.__VUE_I18N__ !== i18n2.global.__composer) {
  17448. inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
  17449. }
  17450. } else {
  17451. inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
  17452. }
  17453. }
  17454. });
  17455. api.addInspector({
  17456. id: "vue-i18n-resource-inspector",
  17457. label: VueDevToolsLabels[
  17458. "vue-i18n-resource-inspector"
  17459. /* CUSTOM_INSPECTOR */
  17460. ],
  17461. icon: "language",
  17462. treeFilterPlaceholder: VueDevToolsPlaceholders[
  17463. "vue-i18n-resource-inspector"
  17464. /* CUSTOM_INSPECTOR */
  17465. ]
  17466. });
  17467. api.on.getInspectorTree((payload) => {
  17468. if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
  17469. registerScope(payload, i18n2);
  17470. }
  17471. });
  17472. api.on.getInspectorState((payload) => {
  17473. if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
  17474. inspectScope(payload, i18n2);
  17475. }
  17476. });
  17477. api.on.editInspectorState((payload) => {
  17478. if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
  17479. editScope(payload, i18n2);
  17480. }
  17481. });
  17482. api.addTimelineLayer({
  17483. id: "vue-i18n-timeline",
  17484. label: VueDevToolsLabels[
  17485. "vue-i18n-timeline"
  17486. /* TIMELINE */
  17487. ],
  17488. color: VueDevToolsTimelineColors[
  17489. "vue-i18n-timeline"
  17490. /* TIMELINE */
  17491. ]
  17492. });
  17493. resolve(true);
  17494. });
  17495. } catch (e2) {
  17496. console.error(e2);
  17497. reject(false);
  17498. }
  17499. });
  17500. }
  17501. function updateComponentTreeTags(instance, treeNode, i18n2) {
  17502. const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  17503. if (instance && instance.vnode.el.__VUE_I18N__) {
  17504. if (instance.vnode.el.__VUE_I18N__ !== global2) {
  17505. const label = instance.type.name || instance.type.displayName || instance.type.__file;
  17506. const tag = {
  17507. label: `i18n (${label} Scope)`,
  17508. textColor: 0,
  17509. backgroundColor: 16764185
  17510. };
  17511. treeNode.tags.push(tag);
  17512. }
  17513. }
  17514. }
  17515. function inspectComposer(instanceData, composer) {
  17516. const type = VUE_I18N_COMPONENT_TYPES;
  17517. instanceData.state.push({
  17518. type,
  17519. key: "locale",
  17520. editable: true,
  17521. value: composer.locale.value
  17522. });
  17523. instanceData.state.push({
  17524. type,
  17525. key: "availableLocales",
  17526. editable: false,
  17527. value: composer.availableLocales
  17528. });
  17529. instanceData.state.push({
  17530. type,
  17531. key: "fallbackLocale",
  17532. editable: true,
  17533. value: composer.fallbackLocale.value
  17534. });
  17535. instanceData.state.push({
  17536. type,
  17537. key: "inheritLocale",
  17538. editable: true,
  17539. value: composer.inheritLocale
  17540. });
  17541. instanceData.state.push({
  17542. type,
  17543. key: "messages",
  17544. editable: false,
  17545. value: getLocaleMessageValue(composer.messages.value)
  17546. });
  17547. instanceData.state.push({
  17548. type,
  17549. key: "datetimeFormats",
  17550. editable: false,
  17551. value: composer.datetimeFormats.value
  17552. });
  17553. instanceData.state.push({
  17554. type,
  17555. key: "numberFormats",
  17556. editable: false,
  17557. value: composer.numberFormats.value
  17558. });
  17559. }
  17560. function getLocaleMessageValue(messages2) {
  17561. const value = {};
  17562. Object.keys(messages2).forEach((key) => {
  17563. const v2 = messages2[key];
  17564. if (isFunction(v2) && "source" in v2) {
  17565. value[key] = getMessageFunctionDetails(v2);
  17566. } else if (isObject$1(v2)) {
  17567. value[key] = getLocaleMessageValue(v2);
  17568. } else {
  17569. value[key] = v2;
  17570. }
  17571. });
  17572. return value;
  17573. }
  17574. const ESC = {
  17575. "<": "&lt;",
  17576. ">": "&gt;",
  17577. '"': "&quot;",
  17578. "&": "&amp;"
  17579. };
  17580. function escape$1(s2) {
  17581. return s2.replace(/[<>"&]/g, escapeChar);
  17582. }
  17583. function escapeChar(a2) {
  17584. return ESC[a2] || a2;
  17585. }
  17586. function getMessageFunctionDetails(func) {
  17587. const argString = func.source ? `("${escape$1(func.source)}")` : `(?)`;
  17588. return {
  17589. _custom: {
  17590. type: "function",
  17591. display: `<span>ƒ</span> ${argString}`
  17592. }
  17593. };
  17594. }
  17595. function registerScope(payload, i18n2) {
  17596. payload.rootNodes.push({
  17597. id: "global",
  17598. label: "Global Scope"
  17599. });
  17600. const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  17601. for (const [keyInstance, instance] of i18n2.__instances) {
  17602. const composer = i18n2.mode === "composition" ? instance : instance.__composer;
  17603. if (global2 === composer) {
  17604. continue;
  17605. }
  17606. const label = keyInstance.type.name || keyInstance.type.displayName || keyInstance.type.__file;
  17607. payload.rootNodes.push({
  17608. id: composer.id.toString(),
  17609. label: `${label} Scope`
  17610. });
  17611. }
  17612. }
  17613. function getComposer$1(nodeId, i18n2) {
  17614. if (nodeId === "global") {
  17615. return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  17616. } else {
  17617. const instance = Array.from(i18n2.__instances.values()).find((item) => item.id.toString() === nodeId);
  17618. if (instance) {
  17619. return i18n2.mode === "composition" ? instance : instance.__composer;
  17620. } else {
  17621. return null;
  17622. }
  17623. }
  17624. }
  17625. function inspectScope(payload, i18n2) {
  17626. const composer = getComposer$1(payload.nodeId, i18n2);
  17627. if (composer) {
  17628. payload.state = makeScopeInspectState(composer);
  17629. }
  17630. }
  17631. function makeScopeInspectState(composer) {
  17632. const state2 = {};
  17633. const localeType = "Locale related info";
  17634. const localeStates = [
  17635. {
  17636. type: localeType,
  17637. key: "locale",
  17638. editable: true,
  17639. value: composer.locale.value
  17640. },
  17641. {
  17642. type: localeType,
  17643. key: "fallbackLocale",
  17644. editable: true,
  17645. value: composer.fallbackLocale.value
  17646. },
  17647. {
  17648. type: localeType,
  17649. key: "availableLocales",
  17650. editable: false,
  17651. value: composer.availableLocales
  17652. },
  17653. {
  17654. type: localeType,
  17655. key: "inheritLocale",
  17656. editable: true,
  17657. value: composer.inheritLocale
  17658. }
  17659. ];
  17660. state2[localeType] = localeStates;
  17661. const localeMessagesType = "Locale messages info";
  17662. const localeMessagesStates = [
  17663. {
  17664. type: localeMessagesType,
  17665. key: "messages",
  17666. editable: false,
  17667. value: getLocaleMessageValue(composer.messages.value)
  17668. }
  17669. ];
  17670. state2[localeMessagesType] = localeMessagesStates;
  17671. const datetimeFormatsType = "Datetime formats info";
  17672. const datetimeFormatsStates = [
  17673. {
  17674. type: datetimeFormatsType,
  17675. key: "datetimeFormats",
  17676. editable: false,
  17677. value: composer.datetimeFormats.value
  17678. }
  17679. ];
  17680. state2[datetimeFormatsType] = datetimeFormatsStates;
  17681. const numberFormatsType = "Datetime formats info";
  17682. const numberFormatsStates = [
  17683. {
  17684. type: numberFormatsType,
  17685. key: "numberFormats",
  17686. editable: false,
  17687. value: composer.numberFormats.value
  17688. }
  17689. ];
  17690. state2[numberFormatsType] = numberFormatsStates;
  17691. return state2;
  17692. }
  17693. function addTimelineEvent(event, payload) {
  17694. if (devtoolsApi) {
  17695. let groupId;
  17696. if (payload && "groupId" in payload) {
  17697. groupId = payload.groupId;
  17698. delete payload.groupId;
  17699. }
  17700. devtoolsApi.addTimelineEvent({
  17701. layerId: "vue-i18n-timeline",
  17702. event: {
  17703. title: event,
  17704. groupId,
  17705. time: Date.now(),
  17706. meta: {},
  17707. data: payload || {},
  17708. logType: event === "compile-error" ? "error" : event === "fallback" || event === "missing" ? "warning" : "default"
  17709. }
  17710. });
  17711. }
  17712. }
  17713. function editScope(payload, i18n2) {
  17714. const composer = getComposer$1(payload.nodeId, i18n2);
  17715. if (composer) {
  17716. const [field] = payload.path;
  17717. if (field === "locale" && isString(payload.state.value)) {
  17718. composer.locale.value = payload.state.value;
  17719. } else if (field === "fallbackLocale" && (isString(payload.state.value) || isArray(payload.state.value) || isObject$1(payload.state.value))) {
  17720. composer.fallbackLocale.value = payload.state.value;
  17721. } else if (field === "inheritLocale" && isBoolean(payload.state.value)) {
  17722. composer.inheritLocale = payload.state.value;
  17723. }
  17724. }
  17725. }
  17726. function defineMixin(vuei18n, composer, i18n2) {
  17727. return {
  17728. beforeCreate() {
  17729. const instance = vue.getCurrentInstance();
  17730. if (!instance) {
  17731. throw createI18nError(
  17732. 22
  17733. /* UNEXPECTED_ERROR */
  17734. );
  17735. }
  17736. const options = this.$options;
  17737. if (options.i18n) {
  17738. const optionsI18n = options.i18n;
  17739. if (options.__i18n) {
  17740. optionsI18n.__i18n = options.__i18n;
  17741. }
  17742. optionsI18n.__root = composer;
  17743. if (this === this.$root) {
  17744. this.$i18n = mergeToRoot(vuei18n, optionsI18n);
  17745. } else {
  17746. optionsI18n.__injectWithOption = true;
  17747. this.$i18n = createVueI18n(optionsI18n);
  17748. }
  17749. } else if (options.__i18n) {
  17750. if (this === this.$root) {
  17751. this.$i18n = mergeToRoot(vuei18n, options);
  17752. } else {
  17753. this.$i18n = createVueI18n({
  17754. __i18n: options.__i18n,
  17755. __injectWithOption: true,
  17756. __root: composer
  17757. });
  17758. }
  17759. } else {
  17760. this.$i18n = vuei18n;
  17761. }
  17762. vuei18n.__onComponentInstanceCreated(this.$i18n);
  17763. i18n2.__setInstance(instance, this.$i18n);
  17764. this.$t = (...args) => this.$i18n.t(...args);
  17765. this.$rt = (...args) => this.$i18n.rt(...args);
  17766. this.$tc = (...args) => this.$i18n.tc(...args);
  17767. this.$te = (key, locale) => this.$i18n.te(key, locale);
  17768. this.$d = (...args) => this.$i18n.d(...args);
  17769. this.$n = (...args) => this.$i18n.n(...args);
  17770. this.$tm = (key) => this.$i18n.tm(key);
  17771. },
  17772. mounted() {
  17773. {
  17774. this.$el.__VUE_I18N__ = this.$i18n.__composer;
  17775. const emitter = this.__v_emitter = createEmitter();
  17776. const _vueI18n = this.$i18n;
  17777. _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
  17778. emitter.on("*", addTimelineEvent);
  17779. }
  17780. },
  17781. beforeUnmount() {
  17782. const instance = vue.getCurrentInstance();
  17783. if (!instance) {
  17784. throw createI18nError(
  17785. 22
  17786. /* UNEXPECTED_ERROR */
  17787. );
  17788. }
  17789. {
  17790. if (this.__v_emitter) {
  17791. this.__v_emitter.off("*", addTimelineEvent);
  17792. delete this.__v_emitter;
  17793. }
  17794. const _vueI18n = this.$i18n;
  17795. _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();
  17796. delete this.$el.__VUE_I18N__;
  17797. }
  17798. delete this.$t;
  17799. delete this.$rt;
  17800. delete this.$tc;
  17801. delete this.$te;
  17802. delete this.$d;
  17803. delete this.$n;
  17804. delete this.$tm;
  17805. i18n2.__deleteInstance(instance);
  17806. delete this.$i18n;
  17807. }
  17808. };
  17809. }
  17810. function mergeToRoot(root, options) {
  17811. root.locale = options.locale || root.locale;
  17812. root.fallbackLocale = options.fallbackLocale || root.fallbackLocale;
  17813. root.missing = options.missing || root.missing;
  17814. root.silentTranslationWarn = options.silentTranslationWarn || root.silentFallbackWarn;
  17815. root.silentFallbackWarn = options.silentFallbackWarn || root.silentFallbackWarn;
  17816. root.formatFallbackMessages = options.formatFallbackMessages || root.formatFallbackMessages;
  17817. root.postTranslation = options.postTranslation || root.postTranslation;
  17818. root.warnHtmlInMessage = options.warnHtmlInMessage || root.warnHtmlInMessage;
  17819. root.escapeParameterHtml = options.escapeParameterHtml || root.escapeParameterHtml;
  17820. root.sync = options.sync || root.sync;
  17821. root.__composer[SetPluralRulesSymbol](options.pluralizationRules || root.pluralizationRules);
  17822. const messages2 = getLocaleMessages(root.locale, {
  17823. messages: options.messages,
  17824. __i18n: options.__i18n
  17825. });
  17826. Object.keys(messages2).forEach((locale) => root.mergeLocaleMessage(locale, messages2[locale]));
  17827. if (options.datetimeFormats) {
  17828. Object.keys(options.datetimeFormats).forEach((locale) => root.mergeDateTimeFormat(locale, options.datetimeFormats[locale]));
  17829. }
  17830. if (options.numberFormats) {
  17831. Object.keys(options.numberFormats).forEach((locale) => root.mergeNumberFormat(locale, options.numberFormats[locale]));
  17832. }
  17833. return root;
  17834. }
  17835. function createI18n(options = {}) {
  17836. const __legacyMode = isBoolean(options.legacy) ? options.legacy : true;
  17837. const __globalInjection = !!options.globalInjection;
  17838. const __instances = /* @__PURE__ */ new Map();
  17839. const __global = __legacyMode ? createVueI18n(options) : createComposer(options);
  17840. const symbol = makeSymbol("vue-i18n");
  17841. const i18n2 = {
  17842. // mode
  17843. get mode() {
  17844. return __legacyMode ? "legacy" : "composition";
  17845. },
  17846. // install plugin
  17847. async install(app, ...options2) {
  17848. {
  17849. app.__VUE_I18N__ = i18n2;
  17850. }
  17851. app.__VUE_I18N_SYMBOL__ = symbol;
  17852. app.provide(app.__VUE_I18N_SYMBOL__, i18n2);
  17853. if (!__legacyMode && __globalInjection) {
  17854. injectGlobalFields(app, i18n2.global);
  17855. }
  17856. {
  17857. apply(app, i18n2, ...options2);
  17858. }
  17859. if (__legacyMode) {
  17860. app.mixin(defineMixin(__global, __global.__composer, i18n2));
  17861. }
  17862. {
  17863. const ret = await enableDevTools(app, i18n2);
  17864. if (!ret) {
  17865. throw createI18nError(
  17866. 21
  17867. /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */
  17868. );
  17869. }
  17870. const emitter = createEmitter();
  17871. if (__legacyMode) {
  17872. const _vueI18n = __global;
  17873. _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
  17874. } else {
  17875. const _composer = __global;
  17876. _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
  17877. }
  17878. emitter.on("*", addTimelineEvent);
  17879. }
  17880. },
  17881. // global accessor
  17882. get global() {
  17883. return __global;
  17884. },
  17885. // @internal
  17886. __instances,
  17887. // @internal
  17888. __getInstance(component) {
  17889. return __instances.get(component) || null;
  17890. },
  17891. // @internal
  17892. __setInstance(component, instance) {
  17893. __instances.set(component, instance);
  17894. },
  17895. // @internal
  17896. __deleteInstance(component) {
  17897. __instances.delete(component);
  17898. }
  17899. };
  17900. return i18n2;
  17901. }
  17902. function useI18n(options = {}) {
  17903. const instance = vue.getCurrentInstance();
  17904. if (instance == null) {
  17905. throw createI18nError(
  17906. 16
  17907. /* MUST_BE_CALL_SETUP_TOP */
  17908. );
  17909. }
  17910. if (!instance.appContext.app.__VUE_I18N_SYMBOL__) {
  17911. throw createI18nError(
  17912. 17
  17913. /* NOT_INSLALLED */
  17914. );
  17915. }
  17916. const i18n2 = vue.inject(instance.appContext.app.__VUE_I18N_SYMBOL__);
  17917. if (!i18n2) {
  17918. throw createI18nError(
  17919. 22
  17920. /* UNEXPECTED_ERROR */
  17921. );
  17922. }
  17923. const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  17924. const scope = isEmptyObject(options) ? "__i18n" in instance.type ? "local" : "global" : !options.useScope ? "local" : options.useScope;
  17925. if (scope === "global") {
  17926. let messages2 = isObject$1(options.messages) ? options.messages : {};
  17927. if ("__i18nGlobal" in instance.type) {
  17928. messages2 = getLocaleMessages(global2.locale.value, {
  17929. messages: messages2,
  17930. __i18n: instance.type.__i18nGlobal
  17931. });
  17932. }
  17933. const locales = Object.keys(messages2);
  17934. if (locales.length) {
  17935. locales.forEach((locale) => {
  17936. global2.mergeLocaleMessage(locale, messages2[locale]);
  17937. });
  17938. }
  17939. if (isObject$1(options.datetimeFormats)) {
  17940. const locales2 = Object.keys(options.datetimeFormats);
  17941. if (locales2.length) {
  17942. locales2.forEach((locale) => {
  17943. global2.mergeDateTimeFormat(locale, options.datetimeFormats[locale]);
  17944. });
  17945. }
  17946. }
  17947. if (isObject$1(options.numberFormats)) {
  17948. const locales2 = Object.keys(options.numberFormats);
  17949. if (locales2.length) {
  17950. locales2.forEach((locale) => {
  17951. global2.mergeNumberFormat(locale, options.numberFormats[locale]);
  17952. });
  17953. }
  17954. }
  17955. return global2;
  17956. }
  17957. if (scope === "parent") {
  17958. let composer2 = getComposer(i18n2, instance, options.__useComponent);
  17959. if (composer2 == null) {
  17960. {
  17961. warn(getWarnMessage(
  17962. 12
  17963. /* NOT_FOUND_PARENT_SCOPE */
  17964. ));
  17965. }
  17966. composer2 = global2;
  17967. }
  17968. return composer2;
  17969. }
  17970. if (i18n2.mode === "legacy") {
  17971. throw createI18nError(
  17972. 18
  17973. /* NOT_AVAILABLE_IN_LEGACY_MODE */
  17974. );
  17975. }
  17976. const i18nInternal = i18n2;
  17977. let composer = i18nInternal.__getInstance(instance);
  17978. if (composer == null) {
  17979. const type = instance.type;
  17980. const composerOptions = assign({}, options);
  17981. if (type.__i18n) {
  17982. composerOptions.__i18n = type.__i18n;
  17983. }
  17984. if (global2) {
  17985. composerOptions.__root = global2;
  17986. }
  17987. composer = createComposer(composerOptions);
  17988. setupLifeCycle(i18nInternal, instance, composer);
  17989. i18nInternal.__setInstance(instance, composer);
  17990. }
  17991. return composer;
  17992. }
  17993. function getComposer(i18n2, target, useComponent = false) {
  17994. let composer = null;
  17995. const root = target.root;
  17996. let current = target.parent;
  17997. while (current != null) {
  17998. const i18nInternal = i18n2;
  17999. if (i18n2.mode === "composition") {
  18000. composer = i18nInternal.__getInstance(current);
  18001. } else {
  18002. const vueI18n = i18nInternal.__getInstance(current);
  18003. if (vueI18n != null) {
  18004. composer = vueI18n.__composer;
  18005. }
  18006. if (useComponent && composer && !composer[InejctWithOption]) {
  18007. composer = null;
  18008. }
  18009. }
  18010. if (composer != null) {
  18011. break;
  18012. }
  18013. if (root === current) {
  18014. break;
  18015. }
  18016. current = current.parent;
  18017. }
  18018. return composer;
  18019. }
  18020. function setupLifeCycle(i18n2, target, composer) {
  18021. let emitter = null;
  18022. vue.onMounted(() => {
  18023. if (target.vnode.el) {
  18024. target.vnode.el.__VUE_I18N__ = composer;
  18025. emitter = createEmitter();
  18026. const _composer = composer;
  18027. _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
  18028. emitter.on("*", addTimelineEvent);
  18029. }
  18030. }, target);
  18031. vue.onUnmounted(() => {
  18032. if (target.vnode.el && target.vnode.el.__VUE_I18N__) {
  18033. emitter && emitter.off("*", addTimelineEvent);
  18034. const _composer = composer;
  18035. _composer[DisableEmitter] && _composer[DisableEmitter]();
  18036. delete target.vnode.el.__VUE_I18N__;
  18037. }
  18038. i18n2.__deleteInstance(target);
  18039. }, target);
  18040. }
  18041. const globalExportProps = [
  18042. "locale",
  18043. "fallbackLocale",
  18044. "availableLocales"
  18045. ];
  18046. const globalExportMethods = ["t", "rt", "d", "n", "tm"];
  18047. function injectGlobalFields(app, composer) {
  18048. const i18n2 = /* @__PURE__ */ Object.create(null);
  18049. globalExportProps.forEach((prop) => {
  18050. const desc = Object.getOwnPropertyDescriptor(composer, prop);
  18051. if (!desc) {
  18052. throw createI18nError(
  18053. 22
  18054. /* UNEXPECTED_ERROR */
  18055. );
  18056. }
  18057. const wrap = vue.isRef(desc.value) ? {
  18058. get() {
  18059. return desc.value.value;
  18060. },
  18061. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  18062. set(val) {
  18063. desc.value.value = val;
  18064. }
  18065. } : {
  18066. get() {
  18067. return desc.get && desc.get();
  18068. }
  18069. };
  18070. Object.defineProperty(i18n2, prop, wrap);
  18071. });
  18072. app.config.globalProperties.$i18n = i18n2;
  18073. globalExportMethods.forEach((method) => {
  18074. const desc = Object.getOwnPropertyDescriptor(composer, method);
  18075. if (!desc || !desc.value) {
  18076. throw createI18nError(
  18077. 22
  18078. /* UNEXPECTED_ERROR */
  18079. );
  18080. }
  18081. Object.defineProperty(app.config.globalProperties, `$${method}`, desc);
  18082. });
  18083. }
  18084. {
  18085. initFeatureFlags();
  18086. }
  18087. {
  18088. const target = getGlobalThis();
  18089. target.__INTLIFY__ = true;
  18090. setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
  18091. }
  18092. class Request {
  18093. constructor(options = {}) {
  18094. this.baseUrl = options.baseUrl || "http://10.168.1.100";
  18095. this.url = options.url || "";
  18096. this.method = "GET";
  18097. this.data = null;
  18098. this.header = options.header || {};
  18099. this.beforeRequest = null;
  18100. this.afterRequest = null;
  18101. }
  18102. // 添加对header的支持
  18103. _mergeHeaders(customHeader = {}) {
  18104. return Object.assign({}, this.header, customHeader);
  18105. }
  18106. get(url, data = {}, header = {}) {
  18107. this.method = "GET";
  18108. this.url = this.baseUrl + url;
  18109. this.data = data;
  18110. this.header = this._mergeHeaders(header);
  18111. return this._();
  18112. }
  18113. post(url, data = {}, header = {}) {
  18114. this.method = "POST";
  18115. this.url = this.baseUrl + url;
  18116. this.data = data;
  18117. this.header = this._mergeHeaders(header);
  18118. return this._();
  18119. }
  18120. put(url, data = {}) {
  18121. this.method = "PUT";
  18122. this.url = this.baseUrl + url;
  18123. this.data = data;
  18124. return this._();
  18125. }
  18126. delete(url, data = {}) {
  18127. this.method = "DELETE";
  18128. this.url = this.baseUrl + url;
  18129. this.data = data;
  18130. return this._();
  18131. }
  18132. _() {
  18133. if (this.baseUrl == "") {
  18134. this.url = "http://10.168.1.100" + this.url;
  18135. }
  18136. this.beforeRequest && typeof this.beforeRequest === "function" && this.beforeRequest(this);
  18137. return new Promise((resolve, reject) => {
  18138. let weixin = wx;
  18139. if ("undefined" !== typeof uni) {
  18140. weixin = uni;
  18141. }
  18142. weixin.request({
  18143. url: this.url,
  18144. method: this.method,
  18145. data: this.data,
  18146. header: this.header,
  18147. success: (res) => {
  18148. resolve(res);
  18149. },
  18150. fail: (err) => {
  18151. reject(err);
  18152. },
  18153. complete: (res) => {
  18154. this.afterRequest && typeof this.afterRequest === "function" && this.afterRequest(res);
  18155. }
  18156. });
  18157. });
  18158. }
  18159. }
  18160. const $http = new Request();
  18161. const messages = {
  18162. en,
  18163. "zh-Hans": zhHans,
  18164. "zh-Hant": zhHant
  18165. };
  18166. let i18nConfig = {
  18167. locale: uni.getStorageSync("userLanguage") || "zh-Hans",
  18168. // 获取已设置的语言
  18169. messages
  18170. };
  18171. const i18n = createI18n(i18nConfig);
  18172. function createApp() {
  18173. const app = vue.createVueApp(App);
  18174. app.use(i18n);
  18175. app.use(Store);
  18176. return {
  18177. app
  18178. };
  18179. }
  18180. uni.$http = $http;
  18181. $http.baseUrl = "";
  18182. $http.beforeRequest = function(options) {
  18183. };
  18184. $http.afterRequest = function() {
  18185. };
  18186. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  18187. uni.Vuex = __Vuex__;
  18188. uni.Pinia = __Pinia__;
  18189. __app__.provide("__globalStyles", __uniConfig.styles);
  18190. __app__._component.mpType = "app";
  18191. __app__._component.render = () => {
  18192. };
  18193. __app__.mount("#app");
  18194. })(Vue);