Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

app-service.js 719KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052
  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_V2/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_V2/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_V2/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], T2 = e4[t4 + 14], A2 = e4[t4 + 15], P2 = i3[0], C2 = i3[1], x2 = i3[2], O2 = i3[3];
  1151. P2 = u2(P2, C2, x2, O2, o3, 7, a2[0]), O2 = u2(O2, P2, C2, x2, c3, 12, a2[1]), x2 = u2(x2, O2, P2, C2, p2, 17, a2[2]), C2 = u2(C2, x2, O2, P2, f2, 22, a2[3]), P2 = u2(P2, C2, x2, O2, g2, 7, a2[4]), O2 = u2(O2, P2, C2, x2, m2, 12, a2[5]), x2 = u2(x2, O2, P2, C2, y2, 17, a2[6]), C2 = u2(C2, x2, O2, P2, _2, 22, a2[7]), P2 = u2(P2, C2, x2, O2, w2, 7, a2[8]), O2 = u2(O2, P2, C2, x2, v2, 12, a2[9]), x2 = u2(x2, O2, P2, C2, I2, 17, a2[10]), C2 = u2(C2, x2, O2, P2, S2, 22, a2[11]), P2 = u2(P2, C2, x2, O2, b2, 7, a2[12]), O2 = u2(O2, P2, C2, x2, k2, 12, a2[13]), x2 = u2(x2, O2, P2, C2, T2, 17, a2[14]), P2 = h2(P2, C2 = u2(C2, x2, O2, P2, A2, 22, a2[15]), x2, O2, c3, 5, a2[16]), O2 = h2(O2, P2, C2, x2, y2, 9, a2[17]), x2 = h2(x2, O2, P2, C2, S2, 14, a2[18]), C2 = h2(C2, x2, O2, P2, o3, 20, a2[19]), P2 = h2(P2, C2, x2, O2, m2, 5, a2[20]), O2 = h2(O2, P2, C2, x2, I2, 9, a2[21]), x2 = h2(x2, O2, P2, C2, A2, 14, a2[22]), C2 = h2(C2, x2, O2, P2, g2, 20, a2[23]), P2 = h2(P2, C2, x2, O2, v2, 5, a2[24]), O2 = h2(O2, P2, C2, x2, T2, 9, a2[25]), x2 = h2(x2, O2, P2, C2, f2, 14, a2[26]), C2 = h2(C2, x2, O2, P2, w2, 20, a2[27]), P2 = h2(P2, C2, x2, O2, k2, 5, a2[28]), O2 = h2(O2, P2, C2, x2, p2, 9, a2[29]), x2 = h2(x2, O2, P2, C2, _2, 14, a2[30]), P2 = l2(P2, C2 = h2(C2, x2, O2, P2, b2, 20, a2[31]), x2, O2, m2, 4, a2[32]), O2 = l2(O2, P2, C2, x2, w2, 11, a2[33]), x2 = l2(x2, O2, P2, C2, S2, 16, a2[34]), C2 = l2(C2, x2, O2, P2, T2, 23, a2[35]), P2 = l2(P2, C2, x2, O2, c3, 4, a2[36]), O2 = l2(O2, P2, C2, x2, g2, 11, a2[37]), x2 = l2(x2, O2, P2, C2, _2, 16, a2[38]), C2 = l2(C2, x2, O2, P2, I2, 23, a2[39]), P2 = l2(P2, C2, x2, O2, k2, 4, a2[40]), O2 = l2(O2, P2, C2, x2, o3, 11, a2[41]), x2 = l2(x2, O2, P2, C2, f2, 16, a2[42]), C2 = l2(C2, x2, O2, P2, y2, 23, a2[43]), P2 = l2(P2, C2, x2, O2, v2, 4, a2[44]), O2 = l2(O2, P2, C2, x2, b2, 11, a2[45]), x2 = l2(x2, O2, P2, C2, A2, 16, a2[46]), P2 = d2(P2, C2 = l2(C2, x2, O2, P2, p2, 23, a2[47]), x2, O2, o3, 6, a2[48]), O2 = d2(O2, P2, C2, x2, _2, 10, a2[49]), x2 = d2(x2, O2, P2, C2, T2, 15, a2[50]), C2 = d2(C2, x2, O2, P2, m2, 21, a2[51]), P2 = d2(P2, C2, x2, O2, b2, 6, a2[52]), O2 = d2(O2, P2, C2, x2, f2, 10, a2[53]), x2 = d2(x2, O2, P2, C2, I2, 15, a2[54]), C2 = d2(C2, x2, O2, P2, c3, 21, a2[55]), P2 = d2(P2, C2, x2, O2, w2, 6, a2[56]), O2 = d2(O2, P2, C2, x2, A2, 10, a2[57]), x2 = d2(x2, O2, P2, C2, y2, 15, a2[58]), C2 = d2(C2, x2, O2, P2, k2, 21, a2[59]), P2 = d2(P2, C2, x2, O2, g2, 6, a2[60]), O2 = d2(O2, P2, C2, x2, S2, 10, a2[61]), x2 = d2(x2, O2, P2, C2, p2, 15, a2[62]), C2 = d2(C2, x2, O2, P2, v2, 21, a2[63]), i3[0] = i3[0] + P2 | 0, i3[1] = i3[1] + C2 | 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", T = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), A = b, P = I(""), C = I("[]") || [];
  1290. let O = "";
  1291. try {
  1292. O = "__UNI__8782431";
  1293. } catch (e2) {
  1294. }
  1295. let E, L = {};
  1296. function R(e2, t2 = {}) {
  1297. var n2, s2;
  1298. return n2 = L, s2 = e2, Object.prototype.hasOwnProperty.call(n2, s2) || (L[e2] = t2), L[e2];
  1299. }
  1300. function U() {
  1301. return E || (E = function() {
  1302. if ("undefined" != typeof globalThis)
  1303. return globalThis;
  1304. if ("undefined" != typeof self)
  1305. return self;
  1306. if ("undefined" != typeof window)
  1307. return window;
  1308. function e2() {
  1309. return this;
  1310. }
  1311. return void 0 !== e2() ? e2() : new Function("return this")();
  1312. }(), E);
  1313. }
  1314. L = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {};
  1315. const N = ["invoke", "success", "fail", "complete"], D = R("_globalUniCloudInterceptor");
  1316. function M(e2, t2) {
  1317. D[e2] || (D[e2] = {}), g(t2) && Object.keys(t2).forEach((n2) => {
  1318. N.indexOf(n2) > -1 && function(e3, t3, n3) {
  1319. let s2 = D[e3][t3];
  1320. s2 || (s2 = D[e3][t3] = []), -1 === s2.indexOf(n3) && m(n3) && s2.push(n3);
  1321. }(e2, n2, t2[n2]);
  1322. });
  1323. }
  1324. function q(e2, t2) {
  1325. D[e2] || (D[e2] = {}), g(t2) ? Object.keys(t2).forEach((n2) => {
  1326. N.indexOf(n2) > -1 && function(e3, t3, n3) {
  1327. const s2 = D[e3][t3];
  1328. if (!s2)
  1329. return;
  1330. const r2 = s2.indexOf(n3);
  1331. r2 > -1 && s2.splice(r2, 1);
  1332. }(e2, n2, t2[n2]);
  1333. }) : delete D[e2];
  1334. }
  1335. function K(e2, t2) {
  1336. return e2 && 0 !== e2.length ? e2.reduce((e3, n2) => e3.then(() => n2(t2)), Promise.resolve()) : Promise.resolve();
  1337. }
  1338. function F(e2, t2) {
  1339. return D[e2] && D[e2][t2] || [];
  1340. }
  1341. function j(e2) {
  1342. M("callObject", e2);
  1343. }
  1344. const $ = R("_globalUniCloudListener"), B = "response", W = "needLogin", H = "refreshToken", J = "clientdb", z = "cloudfunction", V = "cloudobject";
  1345. function G(e2) {
  1346. return $[e2] || ($[e2] = []), $[e2];
  1347. }
  1348. function Y(e2, t2) {
  1349. const n2 = G(e2);
  1350. n2.includes(t2) || n2.push(t2);
  1351. }
  1352. function Q(e2, t2) {
  1353. const n2 = G(e2), s2 = n2.indexOf(t2);
  1354. -1 !== s2 && n2.splice(s2, 1);
  1355. }
  1356. function X(e2, t2) {
  1357. const n2 = G(e2);
  1358. for (let e3 = 0; e3 < n2.length; e3++) {
  1359. (0, n2[e3])(t2);
  1360. }
  1361. }
  1362. let Z, ee = false;
  1363. function te() {
  1364. return Z || (Z = new Promise((e2) => {
  1365. ee && e2(), function t2() {
  1366. if ("function" == typeof getCurrentPages) {
  1367. const t3 = getCurrentPages();
  1368. t3 && t3[0] && (ee = true, e2());
  1369. }
  1370. ee || setTimeout(() => {
  1371. t2();
  1372. }, 30);
  1373. }();
  1374. }), Z);
  1375. }
  1376. function ne(e2) {
  1377. const t2 = {};
  1378. for (const n2 in e2) {
  1379. const s2 = e2[n2];
  1380. m(s2) && (t2[n2] = y(s2));
  1381. }
  1382. return t2;
  1383. }
  1384. class se extends Error {
  1385. constructor(e2) {
  1386. 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;
  1387. }
  1388. toJson(e2 = 0) {
  1389. if (!(e2 >= 10))
  1390. return e2++, { errCode: this.errCode, errMsg: this.errMsg, errSubject: this.errSubject, cause: this.cause && this.cause.toJson ? this.cause.toJson(e2) : this.cause };
  1391. }
  1392. }
  1393. var re = { 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) };
  1394. function ie(e2) {
  1395. return e2 && ie(e2.__v_raw) || e2;
  1396. }
  1397. function oe() {
  1398. return { token: re.getStorageSync("uni_id_token") || re.getStorageSync("uniIdToken"), tokenExpired: re.getStorageSync("uni_id_token_expired") };
  1399. }
  1400. function ae({ token: e2, tokenExpired: t2 } = {}) {
  1401. e2 && re.setStorageSync("uni_id_token", e2), t2 && re.setStorageSync("uni_id_token_expired", t2);
  1402. }
  1403. let ce, ue;
  1404. function he() {
  1405. return ce || (ce = uni.getSystemInfoSync()), ce;
  1406. }
  1407. function le() {
  1408. let e2, t2;
  1409. try {
  1410. if (uni.getLaunchOptionsSync) {
  1411. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1)
  1412. return;
  1413. const { scene: n2, channel: s2 } = uni.getLaunchOptionsSync();
  1414. e2 = s2, t2 = n2;
  1415. }
  1416. } catch (e3) {
  1417. }
  1418. return { channel: e2, scene: t2 };
  1419. }
  1420. let de = {};
  1421. function pe() {
  1422. const e2 = uni.getLocale && uni.getLocale() || "en";
  1423. if (ue)
  1424. return { ...de, ...ue, locale: e2, LOCALE: e2 };
  1425. const t2 = he(), { 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"];
  1426. for (const e3 in t2)
  1427. Object.hasOwnProperty.call(t2, e3) && -1 === o2.indexOf(e3) && delete t2[e3];
  1428. return ue = { PLATFORM: r2, OS: s2, APPID: i2, DEVICEID: n2, ...le(), ...t2 }, { ...de, ...ue, locale: e2, LOCALE: e2 };
  1429. }
  1430. var fe = { sign: function(e2, t2) {
  1431. let n2 = "";
  1432. return Object.keys(e2).sort().forEach(function(t3) {
  1433. e2[t3] && (n2 = n2 + "&" + t3 + "=" + e2[t3]);
  1434. }), n2 = n2.slice(1), i(n2, t2).toString();
  1435. }, wrappedRequest: function(e2, t2) {
  1436. return new Promise((n2, s2) => {
  1437. t2(Object.assign(e2, { complete(e3) {
  1438. e3 || (e3 = {});
  1439. const t3 = e3.data && e3.data.header && e3.data.header["x-serverless-request-id"] || e3.header && e3.header["request-id"];
  1440. if (!e3.statusCode || e3.statusCode >= 400) {
  1441. 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";
  1442. return s2(new se({ code: n3, message: r3, requestId: t3 }));
  1443. }
  1444. const r2 = e3.data;
  1445. if (r2.error)
  1446. return s2(new se({ code: r2.error.code, message: r2.error.message, requestId: t3 }));
  1447. r2.result = r2.data, r2.requestId = t3, delete r2.data, n2(r2);
  1448. } }));
  1449. });
  1450. }, toBase64: function(e2) {
  1451. return a.stringify(o.parse(e2));
  1452. } };
  1453. var ge = class {
  1454. constructor(e2) {
  1455. ["spaceId", "clientSecret"].forEach((t2) => {
  1456. if (!Object.prototype.hasOwnProperty.call(e2, t2))
  1457. throw new Error(`${t2} required`);
  1458. }), 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 = re, this._getAccessTokenPromiseHub = new v({ createPromise: () => this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then((e3) => {
  1459. if (!e3.result || !e3.result.accessToken)
  1460. throw new se({ code: "AUTH_FAILED", message: "获取accessToken失败" });
  1461. this.setAccessToken(e3.result.accessToken);
  1462. }), retryRule: w });
  1463. }
  1464. get hasAccessToken() {
  1465. return !!this.accessToken;
  1466. }
  1467. setAccessToken(e2) {
  1468. this.accessToken = e2;
  1469. }
  1470. requestWrapped(e2) {
  1471. return fe.wrappedRequest(e2, this.adapter.request);
  1472. }
  1473. requestAuth(e2) {
  1474. return this.requestWrapped(e2);
  1475. }
  1476. request(e2, t2) {
  1477. return Promise.resolve().then(() => this.hasAccessToken ? t2 ? this.requestWrapped(e2) : this.requestWrapped(e2).catch((t3) => new Promise((e3, n2) => {
  1478. !t3 || "GATEWAY_INVALID_TOKEN" !== t3.code && "InvalidParameter.InvalidToken" !== t3.code ? n2(t3) : e3();
  1479. }).then(() => this.getAccessToken()).then(() => {
  1480. const t4 = this.rebuildRequest(e2);
  1481. return this.request(t4, true);
  1482. })) : this.getAccessToken().then(() => {
  1483. const t3 = this.rebuildRequest(e2);
  1484. return this.request(t3, true);
  1485. }));
  1486. }
  1487. rebuildRequest(e2) {
  1488. const t2 = Object.assign({}, e2);
  1489. return t2.data.token = this.accessToken, t2.header["x-basement-token"] = this.accessToken, t2.header["x-serverless-sign"] = fe.sign(t2.data, this.config.clientSecret), t2;
  1490. }
  1491. setupRequest(e2, t2) {
  1492. const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" };
  1493. return "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = fe.sign(n2, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: s2 };
  1494. }
  1495. getAccessToken() {
  1496. return this._getAccessTokenPromiseHub.exec();
  1497. }
  1498. async authorize() {
  1499. await this.getAccessToken();
  1500. }
  1501. callFunction(e2) {
  1502. const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) };
  1503. return this.request({ ...this.setupRequest(t2), timeout: e2.timeout });
  1504. }
  1505. getOSSUploadOptionsFromPath(e2) {
  1506. const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) };
  1507. return this.request(this.setupRequest(t2));
  1508. }
  1509. uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) {
  1510. return new Promise((o2, a2) => {
  1511. const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, header: { "X-OSS-server-side-encrpytion": "AES256" }, success(e3) {
  1512. e3 && e3.statusCode < 400 ? o2(e3) : a2(new se({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  1513. }, fail(e3) {
  1514. a2(new se({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  1515. } });
  1516. "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => {
  1517. i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  1518. });
  1519. });
  1520. }
  1521. reportOSSUpload(e2) {
  1522. const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) };
  1523. return this.request(this.setupRequest(t2));
  1524. }
  1525. async uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", cloudPathAsRealPath: s2 = false, onUploadProgress: r2, config: i2 }) {
  1526. if ("string" !== f(t2))
  1527. throw new se({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
  1528. if (!(t2 = t2.trim()))
  1529. throw new se({ code: "INVALID_PARAM", message: "cloudPath不可为空" });
  1530. if (/:\/\//.test(t2))
  1531. throw new se({ code: "INVALID_PARAM", message: "cloudPath不合法" });
  1532. const o2 = i2 && i2.envType || this.config.envType;
  1533. if (s2 && ("/" !== t2[0] && (t2 = "/" + t2), t2.indexOf("\\") > -1))
  1534. throw new se({ code: "INVALID_PARAM", message: "使用cloudPath作为路径时,cloudPath不可包含“\\”" });
  1535. 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 };
  1536. if (u2 && (_2["x-oss-security-token"] = u2), y2) {
  1537. const e3 = JSON.stringify({ callbackUrl: y2, callbackBody: JSON.stringify({ fileId: g2, spaceId: this.config.spaceId }), callbackBodyType: "application/json" });
  1538. _2.callback = fe.toBase64(e3);
  1539. }
  1540. const w2 = { url: "https://" + a2.host, formData: _2, fileName: "file", name: "file", filePath: e2, fileType: n2 };
  1541. if (await this.uploadFileToOSS(Object.assign({}, w2, { onUploadProgress: r2 })), y2)
  1542. return { success: true, filePath: e2, fileID: c2 };
  1543. if ((await this.reportOSSUpload({ id: g2 })).success)
  1544. return { success: true, filePath: e2, fileID: c2 };
  1545. throw new se({ code: "UPLOAD_FAILED", message: "文件上传失败" });
  1546. }
  1547. getTempFileURL({ fileList: e2 } = {}) {
  1548. return new Promise((t2, n2) => {
  1549. Array.isArray(e2) && 0 !== e2.length || n2(new se({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" })), t2({ fileList: e2.map((e3) => ({ fileID: e3, tempFileURL: e3 })) });
  1550. });
  1551. }
  1552. async getFileInfo({ fileList: e2 } = {}) {
  1553. if (!Array.isArray(e2) || 0 === e2.length)
  1554. throw new se({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
  1555. const t2 = { method: "serverless.file.resource.info", params: JSON.stringify({ id: e2.map((e3) => e3.split("?")[0]).join(",") }) };
  1556. return { fileList: (await this.request(this.setupRequest(t2))).result };
  1557. }
  1558. };
  1559. var me = { init(e2) {
  1560. const t2 = new ge(e2), n2 = { signInAnonymously: function() {
  1561. return t2.authorize();
  1562. }, getLoginState: function() {
  1563. return Promise.resolve(false);
  1564. } };
  1565. return t2.auth = function() {
  1566. return n2;
  1567. }, t2.customAuth = t2.auth, t2;
  1568. } };
  1569. const ye = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  1570. var _e;
  1571. !function(e2) {
  1572. e2.local = "local", e2.none = "none", e2.session = "session";
  1573. }(_e || (_e = {}));
  1574. var we = function() {
  1575. }, ve = n(function(e2, t2) {
  1576. var n2;
  1577. e2.exports = (n2 = r, function(e3) {
  1578. var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [], c2 = [];
  1579. !function() {
  1580. function t4(t5) {
  1581. for (var n4 = e3.sqrt(t5), s4 = 2; s4 <= n4; s4++)
  1582. if (!(t5 % s4))
  1583. return false;
  1584. return true;
  1585. }
  1586. function n3(e4) {
  1587. return 4294967296 * (e4 - (0 | e4)) | 0;
  1588. }
  1589. for (var s3 = 2, r3 = 0; r3 < 64; )
  1590. t4(s3) && (r3 < 8 && (a2[r3] = n3(e3.pow(s3, 0.5))), c2[r3] = n3(e3.pow(s3, 1 / 3)), r3++), s3++;
  1591. }();
  1592. var u2 = [], h2 = o2.SHA256 = i2.extend({ _doReset: function() {
  1593. this._hash = new r2.init(a2.slice(0));
  1594. }, _doProcessBlock: function(e4, t4) {
  1595. 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++) {
  1596. if (p2 < 16)
  1597. u2[p2] = 0 | e4[t4 + p2];
  1598. else {
  1599. 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;
  1600. u2[p2] = g2 + u2[p2 - 7] + y2 + u2[p2 - 16];
  1601. }
  1602. 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];
  1603. d2 = l2, l2 = h3, h3 = a3, a3 = o3 + v2 | 0, o3 = i3, i3 = r3, r3 = s3, s3 = v2 + (w2 + _2) | 0;
  1604. }
  1605. 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;
  1606. }, _doFinalize: function() {
  1607. var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes;
  1608. 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;
  1609. }, clone: function() {
  1610. var e4 = i2.clone.call(this);
  1611. return e4._hash = this._hash.clone(), e4;
  1612. } });
  1613. t3.SHA256 = i2._createHelper(h2), t3.HmacSHA256 = i2._createHmacHelper(h2);
  1614. }(Math), n2.SHA256);
  1615. }), Ie = ve, Se = n(function(e2, t2) {
  1616. e2.exports = r.HmacSHA256;
  1617. });
  1618. const be = () => {
  1619. let e2;
  1620. if (!Promise) {
  1621. e2 = () => {
  1622. }, e2.promise = {};
  1623. const t3 = () => {
  1624. throw new se({ message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.' });
  1625. };
  1626. return Object.defineProperty(e2.promise, "then", { get: t3 }), Object.defineProperty(e2.promise, "catch", { get: t3 }), e2;
  1627. }
  1628. const t2 = new Promise((t3, n2) => {
  1629. e2 = (e3, s2) => e3 ? n2(e3) : t3(s2);
  1630. });
  1631. return e2.promise = t2, e2;
  1632. };
  1633. function ke(e2) {
  1634. return void 0 === e2;
  1635. }
  1636. function Te(e2) {
  1637. return "[object Null]" === Object.prototype.toString.call(e2);
  1638. }
  1639. function Ae(e2 = "") {
  1640. return e2.replace(/([\s\S]+)\s+(请前往云开发AI小助手查看问题:.*)/, "$1");
  1641. }
  1642. function Pe(e2 = 32) {
  1643. const t2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", n2 = t2.length;
  1644. let s2 = "";
  1645. for (let r2 = 0; r2 < e2; r2++)
  1646. s2 += t2.charAt(Math.floor(Math.random() * n2));
  1647. return s2;
  1648. }
  1649. var Ce;
  1650. function xe(e2) {
  1651. const t2 = (n2 = e2, "[object Array]" === Object.prototype.toString.call(n2) ? e2 : [e2]);
  1652. var n2;
  1653. for (const e3 of t2) {
  1654. const { isMatch: t3, genAdapter: n3, runtime: s2 } = e3;
  1655. if (t3())
  1656. return { adapter: n3(), runtime: s2 };
  1657. }
  1658. }
  1659. !function(e2) {
  1660. e2.WEB = "web", e2.WX_MP = "wx_mp";
  1661. }(Ce || (Ce = {}));
  1662. const Oe = { adapter: null, runtime: void 0 }, Ee = ["anonymousUuidKey"];
  1663. class Le extends we {
  1664. constructor() {
  1665. super(), Oe.adapter.root.tcbObject || (Oe.adapter.root.tcbObject = {});
  1666. }
  1667. setItem(e2, t2) {
  1668. Oe.adapter.root.tcbObject[e2] = t2;
  1669. }
  1670. getItem(e2) {
  1671. return Oe.adapter.root.tcbObject[e2];
  1672. }
  1673. removeItem(e2) {
  1674. delete Oe.adapter.root.tcbObject[e2];
  1675. }
  1676. clear() {
  1677. delete Oe.adapter.root.tcbObject;
  1678. }
  1679. }
  1680. function Re(e2, t2) {
  1681. switch (e2) {
  1682. case "local":
  1683. return t2.localStorage || new Le();
  1684. case "none":
  1685. return new Le();
  1686. default:
  1687. return t2.sessionStorage || new Le();
  1688. }
  1689. }
  1690. class Ue {
  1691. constructor(e2) {
  1692. if (!this._storage) {
  1693. this._persistence = Oe.adapter.primaryStorage || e2.persistence, this._storage = Re(this._persistence, Oe.adapter);
  1694. 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 = "device_id", a2 = `token_type_${e2.env}`, c2 = `user_info_${e2.env}`;
  1695. this.keys = { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2, anonymousUuidKey: r2, loginTypeKey: i2, userInfoKey: c2, deviceIdKey: o2, tokenTypeKey: a2 };
  1696. }
  1697. }
  1698. updatePersistence(e2) {
  1699. if (e2 === this._persistence)
  1700. return;
  1701. const t2 = "local" === this._persistence;
  1702. this._persistence = e2;
  1703. const n2 = Re(e2, Oe.adapter);
  1704. for (const e3 in this.keys) {
  1705. const s2 = this.keys[e3];
  1706. if (t2 && Ee.includes(e3))
  1707. continue;
  1708. const r2 = this._storage.getItem(s2);
  1709. ke(r2) || Te(r2) || (n2.setItem(s2, r2), this._storage.removeItem(s2));
  1710. }
  1711. this._storage = n2;
  1712. }
  1713. setStore(e2, t2, n2) {
  1714. if (!this._storage)
  1715. return;
  1716. const s2 = { version: n2 || "localCachev1", content: t2 }, r2 = JSON.stringify(s2);
  1717. try {
  1718. this._storage.setItem(e2, r2);
  1719. } catch (e3) {
  1720. throw e3;
  1721. }
  1722. }
  1723. getStore(e2, t2) {
  1724. try {
  1725. if (!this._storage)
  1726. return;
  1727. } catch (e3) {
  1728. return "";
  1729. }
  1730. t2 = t2 || "localCachev1";
  1731. const n2 = this._storage.getItem(e2);
  1732. if (!n2)
  1733. return "";
  1734. if (n2.indexOf(t2) >= 0) {
  1735. return JSON.parse(n2).content;
  1736. }
  1737. return "";
  1738. }
  1739. removeStore(e2) {
  1740. this._storage.removeItem(e2);
  1741. }
  1742. }
  1743. const Ne = {}, De = {};
  1744. function Me(e2) {
  1745. return Ne[e2];
  1746. }
  1747. class qe {
  1748. constructor(e2, t2) {
  1749. this.data = t2 || null, this.name = e2;
  1750. }
  1751. }
  1752. class Ke extends qe {
  1753. constructor(e2, t2) {
  1754. super("error", { error: e2, data: t2 }), this.error = e2;
  1755. }
  1756. }
  1757. const Fe = new class {
  1758. constructor() {
  1759. this._listeners = {};
  1760. }
  1761. on(e2, t2) {
  1762. return function(e3, t3, n2) {
  1763. n2[e3] = n2[e3] || [], n2[e3].push(t3);
  1764. }(e2, t2, this._listeners), this;
  1765. }
  1766. off(e2, t2) {
  1767. return function(e3, t3, n2) {
  1768. if (n2 && n2[e3]) {
  1769. const s2 = n2[e3].indexOf(t3);
  1770. -1 !== s2 && n2[e3].splice(s2, 1);
  1771. }
  1772. }(e2, t2, this._listeners), this;
  1773. }
  1774. fire(e2, t2) {
  1775. if (e2 instanceof Ke)
  1776. return console.error(e2.error), this;
  1777. const n2 = "string" == typeof e2 ? new qe(e2, t2 || {}) : e2;
  1778. const s2 = n2.name;
  1779. if (this._listens(s2)) {
  1780. n2.target = this;
  1781. const e3 = this._listeners[s2] ? [...this._listeners[s2]] : [];
  1782. for (const t3 of e3)
  1783. t3.call(this, n2);
  1784. }
  1785. return this;
  1786. }
  1787. _listens(e2) {
  1788. return this._listeners[e2] && this._listeners[e2].length > 0;
  1789. }
  1790. }();
  1791. function je(e2, t2) {
  1792. Fe.on(e2, t2);
  1793. }
  1794. function $e(e2, t2 = {}) {
  1795. Fe.fire(e2, t2);
  1796. }
  1797. function Be(e2, t2) {
  1798. Fe.off(e2, t2);
  1799. }
  1800. const We = "loginStateChanged", He = "loginStateExpire", Je = "loginTypeChanged", ze = "anonymousConverted", Ve = "refreshAccessToken";
  1801. var Ge;
  1802. !function(e2) {
  1803. 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";
  1804. }(Ge || (Ge = {}));
  1805. class Ye {
  1806. constructor() {
  1807. this._fnPromiseMap = /* @__PURE__ */ new Map();
  1808. }
  1809. async run(e2, t2) {
  1810. let n2 = this._fnPromiseMap.get(e2);
  1811. return n2 || (n2 = new Promise(async (n3, s2) => {
  1812. try {
  1813. await this._runIdlePromise();
  1814. const s3 = t2();
  1815. n3(await s3);
  1816. } catch (e3) {
  1817. s2(e3);
  1818. } finally {
  1819. this._fnPromiseMap.delete(e2);
  1820. }
  1821. }), this._fnPromiseMap.set(e2, n2)), n2;
  1822. }
  1823. _runIdlePromise() {
  1824. return Promise.resolve();
  1825. }
  1826. }
  1827. class Qe {
  1828. constructor(e2) {
  1829. this._singlePromise = new Ye(), this._cache = Me(e2.env), this._baseURL = `https://${e2.env}.ap-shanghai.tcb-api.tencentcloudapi.com`, this._reqClass = new Oe.adapter.reqClass({ timeout: e2.timeout, timeoutMsg: `请求在${e2.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] });
  1830. }
  1831. _getDeviceId() {
  1832. if (this._deviceID)
  1833. return this._deviceID;
  1834. const { deviceIdKey: e2 } = this._cache.keys;
  1835. let t2 = this._cache.getStore(e2);
  1836. return "string" == typeof t2 && t2.length >= 16 && t2.length <= 48 || (t2 = Pe(), this._cache.setStore(e2, t2)), this._deviceID = t2, t2;
  1837. }
  1838. async _request(e2, t2, n2 = {}) {
  1839. const s2 = { "x-request-id": Pe(), "x-device-id": this._getDeviceId() };
  1840. if (n2.withAccessToken) {
  1841. const { tokenTypeKey: e3 } = this._cache.keys, t3 = await this.getAccessToken(), n3 = this._cache.getStore(e3);
  1842. s2.authorization = `${n3} ${t3}`;
  1843. }
  1844. return this._reqClass["get" === n2.method ? "get" : "post"]({ url: `${this._baseURL}${e2}`, data: t2, headers: s2 });
  1845. }
  1846. async _fetchAccessToken() {
  1847. const { loginTypeKey: e2, accessTokenKey: t2, accessTokenExpireKey: n2, tokenTypeKey: s2 } = this._cache.keys, r2 = this._cache.getStore(e2);
  1848. if (r2 && r2 !== Ge.ANONYMOUS)
  1849. throw new se({ code: "INVALID_OPERATION", message: "非匿名登录不支持刷新 access token" });
  1850. const i2 = await this._singlePromise.run("fetchAccessToken", async () => (await this._request("/auth/v1/signin/anonymously", {}, { method: "post" })).data), { access_token: o2, expires_in: a2, token_type: c2 } = i2;
  1851. return this._cache.setStore(s2, c2), this._cache.setStore(t2, o2), this._cache.setStore(n2, Date.now() + 1e3 * a2), o2;
  1852. }
  1853. isAccessTokenExpired(e2, t2) {
  1854. let n2 = true;
  1855. return e2 && t2 && (n2 = t2 < Date.now()), n2;
  1856. }
  1857. async getAccessToken() {
  1858. const { accessTokenKey: e2, accessTokenExpireKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2), s2 = this._cache.getStore(t2);
  1859. return this.isAccessTokenExpired(n2, s2) ? this._fetchAccessToken() : n2;
  1860. }
  1861. async refreshAccessToken() {
  1862. const { accessTokenKey: e2, accessTokenExpireKey: t2, loginTypeKey: n2 } = this._cache.keys;
  1863. return this._cache.removeStore(e2), this._cache.removeStore(t2), this._cache.setStore(n2, Ge.ANONYMOUS), this.getAccessToken();
  1864. }
  1865. async getUserInfo() {
  1866. return this._singlePromise.run("getUserInfo", async () => (await this._request("/auth/v1/user/me", {}, { withAccessToken: true, method: "get" })).data);
  1867. }
  1868. }
  1869. const Xe = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"], Ze = { "X-SDK-Version": "1.3.5" };
  1870. function et(e2, t2, n2) {
  1871. const s2 = e2[t2];
  1872. e2[t2] = function(t3) {
  1873. const r2 = {}, i2 = {};
  1874. n2.forEach((n3) => {
  1875. const { data: s3, headers: o3 } = n3.call(e2, t3);
  1876. Object.assign(r2, s3), Object.assign(i2, o3);
  1877. });
  1878. const o2 = t3.data;
  1879. return o2 && (() => {
  1880. var e3;
  1881. if (e3 = o2, "[object FormData]" !== Object.prototype.toString.call(e3))
  1882. t3.data = { ...o2, ...r2 };
  1883. else
  1884. for (const e4 in r2)
  1885. o2.append(e4, r2[e4]);
  1886. })(), t3.headers = { ...t3.headers || {}, ...i2 }, s2.call(e2, t3);
  1887. };
  1888. }
  1889. function tt() {
  1890. const e2 = Math.random().toString(16).slice(2);
  1891. return { data: { seqId: e2 }, headers: { ...Ze, "x-seqid": e2 } };
  1892. }
  1893. class nt {
  1894. constructor(e2 = {}) {
  1895. var t2;
  1896. this.config = e2, this._reqClass = new Oe.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: `请求在${this.config.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] }), this._cache = Me(this.config.env), this._localCache = (t2 = this.config.env, De[t2]), this.oauth = new Qe(this.config), et(this._reqClass, "post", [tt]), et(this._reqClass, "upload", [tt]), et(this._reqClass, "download", [tt]);
  1897. }
  1898. async post(e2) {
  1899. return await this._reqClass.post(e2);
  1900. }
  1901. async upload(e2) {
  1902. return await this._reqClass.upload(e2);
  1903. }
  1904. async download(e2) {
  1905. return await this._reqClass.download(e2);
  1906. }
  1907. async refreshAccessToken() {
  1908. let e2, t2;
  1909. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  1910. try {
  1911. e2 = await this._refreshAccessTokenPromise;
  1912. } catch (e3) {
  1913. t2 = e3;
  1914. }
  1915. if (this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t2)
  1916. throw t2;
  1917. return e2;
  1918. }
  1919. async _refreshAccessToken() {
  1920. const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2, loginTypeKey: s2, anonymousUuidKey: r2 } = this._cache.keys;
  1921. this._cache.removeStore(e2), this._cache.removeStore(t2);
  1922. let i2 = this._cache.getStore(n2);
  1923. if (!i2)
  1924. throw new se({ message: "未登录CloudBase" });
  1925. const o2 = { refresh_token: i2 }, a2 = await this.request("auth.fetchAccessTokenWithRefreshToken", o2);
  1926. if (a2.data.code) {
  1927. const { code: e3 } = a2.data;
  1928. if ("SIGN_PARAM_INVALID" === e3 || "REFRESH_TOKEN_EXPIRED" === e3 || "INVALID_REFRESH_TOKEN" === e3) {
  1929. if (this._cache.getStore(s2) === Ge.ANONYMOUS && "INVALID_REFRESH_TOKEN" === e3) {
  1930. const e4 = this._cache.getStore(r2), t3 = this._cache.getStore(n2), s3 = await this.send("auth.signInAnonymously", { anonymous_uuid: e4, refresh_token: t3 });
  1931. return this.setRefreshToken(s3.refresh_token), this._refreshAccessToken();
  1932. }
  1933. $e(He), this._cache.removeStore(n2);
  1934. }
  1935. throw new se({ code: a2.data.code, message: `刷新access token失败:${a2.data.code}` });
  1936. }
  1937. if (a2.data.access_token)
  1938. return $e(Ve), 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 };
  1939. a2.data.refresh_token && (this._cache.removeStore(n2), this._cache.setStore(n2, a2.data.refresh_token), this._refreshAccessToken());
  1940. }
  1941. async getAccessToken() {
  1942. const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2 } = this._cache.keys;
  1943. if (!this._cache.getStore(n2))
  1944. throw new se({ message: "refresh token不存在,登录状态异常" });
  1945. let s2 = this._cache.getStore(e2), r2 = this._cache.getStore(t2), i2 = true;
  1946. return this._shouldRefreshAccessTokenHook && !await this._shouldRefreshAccessTokenHook(s2, r2) && (i2 = false), (!s2 || !r2 || r2 < Date.now()) && i2 ? this.refreshAccessToken() : { accessToken: s2, accessTokenExpire: r2 };
  1947. }
  1948. async request(e2, t2, n2) {
  1949. const s2 = `x-tcb-trace_${this.config.env}`;
  1950. let r2 = "application/x-www-form-urlencoded";
  1951. const i2 = { action: e2, env: this.config.env, dataVersion: "2019-08-16", ...t2 };
  1952. let o2;
  1953. if (-1 === Xe.indexOf(e2) && (this._cache.keys, i2.access_token = await this.oauth.getAccessToken()), "storage.uploadFile" === e2) {
  1954. o2 = new FormData();
  1955. for (let e3 in o2)
  1956. o2.hasOwnProperty(e3) && void 0 !== o2[e3] && o2.append(e3, i2[e3]);
  1957. r2 = "multipart/form-data";
  1958. } else {
  1959. r2 = "application/json", o2 = {};
  1960. for (let e3 in i2)
  1961. void 0 !== i2[e3] && (o2[e3] = i2[e3]);
  1962. }
  1963. let a2 = { headers: { "content-type": r2 } };
  1964. n2 && n2.timeout && (a2.timeout = n2.timeout), n2 && n2.onUploadProgress && (a2.onUploadProgress = n2.onUploadProgress);
  1965. const c2 = this._localCache.getStore(s2);
  1966. c2 && (a2.headers["X-TCB-Trace"] = c2);
  1967. const { parse: u2, inQuery: h2, search: l2 } = t2;
  1968. let d2 = { env: this.config.env };
  1969. u2 && (d2.parse = true), h2 && (d2 = { ...h2, ...d2 });
  1970. let p2 = function(e3, t3, n3 = {}) {
  1971. const s3 = /\?/.test(t3);
  1972. let r3 = "";
  1973. for (let e4 in n3)
  1974. "" === r3 ? !s3 && (t3 += "?") : r3 += "&", r3 += `${e4}=${encodeURIComponent(n3[e4])}`;
  1975. return /^http(s)?\:\/\//.test(t3 += r3) ? t3 : `${e3}${t3}`;
  1976. }(ye, "//tcb-api.tencentcloudapi.com/web", d2);
  1977. l2 && (p2 += l2);
  1978. const f2 = await this.post({ url: p2, data: o2, ...a2 }), g2 = f2.header && f2.header["x-tcb-trace"];
  1979. if (g2 && this._localCache.setStore(s2, g2), 200 !== Number(f2.status) && 200 !== Number(f2.statusCode) || !f2.data)
  1980. throw new se({ code: "NETWORK_ERROR", message: "network request error" });
  1981. return f2;
  1982. }
  1983. async send(e2, t2 = {}, n2 = {}) {
  1984. const s2 = await this.request(e2, t2, { ...n2, onUploadProgress: t2.onUploadProgress });
  1985. if (("ACCESS_TOKEN_DISABLED" === s2.data.code || "ACCESS_TOKEN_EXPIRED" === s2.data.code) && -1 === Xe.indexOf(e2)) {
  1986. await this.oauth.refreshAccessToken();
  1987. const s3 = await this.request(e2, t2, { ...n2, onUploadProgress: t2.onUploadProgress });
  1988. if (s3.data.code)
  1989. throw new se({ code: s3.data.code, message: Ae(s3.data.message) });
  1990. return s3.data;
  1991. }
  1992. if (s2.data.code)
  1993. throw new se({ code: s2.data.code, message: Ae(s2.data.message) });
  1994. return s2.data;
  1995. }
  1996. setRefreshToken(e2) {
  1997. const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys;
  1998. this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2);
  1999. }
  2000. }
  2001. const st = {};
  2002. function rt(e2) {
  2003. return st[e2];
  2004. }
  2005. class it {
  2006. constructor(e2) {
  2007. this.config = e2, this._cache = Me(e2.env), this._request = rt(e2.env);
  2008. }
  2009. setRefreshToken(e2) {
  2010. const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys;
  2011. this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2);
  2012. }
  2013. setAccessToken(e2, t2) {
  2014. const { accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys;
  2015. this._cache.setStore(n2, e2), this._cache.setStore(s2, t2);
  2016. }
  2017. async refreshUserInfo() {
  2018. const { data: e2 } = await this._request.send("auth.getUserInfo", {});
  2019. return this.setLocalUserInfo(e2), e2;
  2020. }
  2021. setLocalUserInfo(e2) {
  2022. const { userInfoKey: t2 } = this._cache.keys;
  2023. this._cache.setStore(t2, e2);
  2024. }
  2025. }
  2026. class ot {
  2027. constructor(e2) {
  2028. if (!e2)
  2029. throw new se({ code: "PARAM_ERROR", message: "envId is not defined" });
  2030. this._envId = e2, this._cache = Me(this._envId), this._request = rt(this._envId), this.setUserInfo();
  2031. }
  2032. linkWithTicket(e2) {
  2033. if ("string" != typeof e2)
  2034. throw new se({ code: "PARAM_ERROR", message: "ticket must be string" });
  2035. return this._request.send("auth.linkWithTicket", { ticket: e2 });
  2036. }
  2037. linkWithRedirect(e2) {
  2038. e2.signInWithRedirect();
  2039. }
  2040. updatePassword(e2, t2) {
  2041. return this._request.send("auth.updatePassword", { oldPassword: t2, newPassword: e2 });
  2042. }
  2043. updateEmail(e2) {
  2044. return this._request.send("auth.updateEmail", { newEmail: e2 });
  2045. }
  2046. updateUsername(e2) {
  2047. if ("string" != typeof e2)
  2048. throw new se({ code: "PARAM_ERROR", message: "username must be a string" });
  2049. return this._request.send("auth.updateUsername", { username: e2 });
  2050. }
  2051. async getLinkedUidList() {
  2052. const { data: e2 } = await this._request.send("auth.getLinkedUidList", {});
  2053. let t2 = false;
  2054. const { users: n2 } = e2;
  2055. return n2.forEach((e3) => {
  2056. e3.wxOpenId && e3.wxPublicId && (t2 = true);
  2057. }), { users: n2, hasPrimaryUid: t2 };
  2058. }
  2059. setPrimaryUid(e2) {
  2060. return this._request.send("auth.setPrimaryUid", { uid: e2 });
  2061. }
  2062. unlink(e2) {
  2063. return this._request.send("auth.unlink", { platform: e2 });
  2064. }
  2065. async update(e2) {
  2066. 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 });
  2067. this.setLocalUserInfo(a2);
  2068. }
  2069. async refresh() {
  2070. const e2 = await this._request.oauth.getUserInfo();
  2071. return this.setLocalUserInfo(e2), e2;
  2072. }
  2073. setUserInfo() {
  2074. const { userInfoKey: e2 } = this._cache.keys, t2 = this._cache.getStore(e2);
  2075. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach((e3) => {
  2076. this[e3] = t2[e3];
  2077. }), this.location = { country: t2.country, province: t2.province, city: t2.city };
  2078. }
  2079. setLocalUserInfo(e2) {
  2080. const { userInfoKey: t2 } = this._cache.keys;
  2081. this._cache.setStore(t2, e2), this.setUserInfo();
  2082. }
  2083. }
  2084. class at {
  2085. constructor(e2) {
  2086. if (!e2)
  2087. throw new se({ code: "PARAM_ERROR", message: "envId is not defined" });
  2088. this._cache = Me(e2);
  2089. 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);
  2090. this.credential = { refreshToken: r2, accessToken: i2, accessTokenExpire: o2 }, this.user = new ot(e2);
  2091. }
  2092. get isAnonymousAuth() {
  2093. return this.loginType === Ge.ANONYMOUS;
  2094. }
  2095. get isCustomAuth() {
  2096. return this.loginType === Ge.CUSTOM;
  2097. }
  2098. get isWeixinAuth() {
  2099. return this.loginType === Ge.WECHAT || this.loginType === Ge.WECHAT_OPEN || this.loginType === Ge.WECHAT_PUBLIC;
  2100. }
  2101. get loginType() {
  2102. return this._cache.getStore(this._cache.keys.loginTypeKey);
  2103. }
  2104. }
  2105. class ct extends it {
  2106. async signIn() {
  2107. this._cache.updatePersistence("local"), await this._request.oauth.getAccessToken(), $e(We), $e(Je, { env: this.config.env, loginType: Ge.ANONYMOUS, persistence: "local" });
  2108. const e2 = new at(this.config.env);
  2109. return await e2.user.refresh(), e2;
  2110. }
  2111. async linkAndRetrieveDataWithTicket(e2) {
  2112. 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 });
  2113. if (i2.refresh_token)
  2114. return this._clearAnonymousUUID(), this.setRefreshToken(i2.refresh_token), await this._request.refreshAccessToken(), $e(ze, { env: this.config.env }), $e(Je, { loginType: Ge.CUSTOM, persistence: "local" }), { credential: { refreshToken: i2.refresh_token } };
  2115. throw new se({ message: "匿名转化失败" });
  2116. }
  2117. _setAnonymousUUID(e2) {
  2118. const { anonymousUuidKey: t2, loginTypeKey: n2 } = this._cache.keys;
  2119. this._cache.removeStore(t2), this._cache.setStore(t2, e2), this._cache.setStore(n2, Ge.ANONYMOUS);
  2120. }
  2121. _clearAnonymousUUID() {
  2122. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  2123. }
  2124. }
  2125. class ut extends it {
  2126. async signIn(e2) {
  2127. if ("string" != typeof e2)
  2128. throw new se({ code: "PARAM_ERROR", message: "ticket must be a string" });
  2129. const { refreshTokenKey: t2 } = this._cache.keys, n2 = await this._request.send("auth.signInWithTicket", { ticket: e2, refresh_token: this._cache.getStore(t2) || "" });
  2130. if (n2.refresh_token)
  2131. return this.setRefreshToken(n2.refresh_token), await this._request.refreshAccessToken(), $e(We), $e(Je, { env: this.config.env, loginType: Ge.CUSTOM, persistence: this.config.persistence }), await this.refreshUserInfo(), new at(this.config.env);
  2132. throw new se({ message: "自定义登录失败" });
  2133. }
  2134. }
  2135. class ht extends it {
  2136. async signIn(e2, t2) {
  2137. if ("string" != typeof e2)
  2138. throw new se({ code: "PARAM_ERROR", message: "email must be a string" });
  2139. 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;
  2140. if (r2)
  2141. return this.setRefreshToken(r2), i2 && o2 ? this.setAccessToken(i2, o2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), $e(We), $e(Je, { env: this.config.env, loginType: Ge.EMAIL, persistence: this.config.persistence }), new at(this.config.env);
  2142. throw s2.code ? new se({ code: s2.code, message: `邮箱登录失败: ${s2.message}` }) : new se({ message: "邮箱登录失败" });
  2143. }
  2144. async activate(e2) {
  2145. return this._request.send("auth.activateEndUserMail", { token: e2 });
  2146. }
  2147. async resetPasswordWithToken(e2, t2) {
  2148. return this._request.send("auth.resetPasswordWithToken", { token: e2, newPassword: t2 });
  2149. }
  2150. }
  2151. class lt extends it {
  2152. async signIn(e2, t2) {
  2153. if ("string" != typeof e2)
  2154. throw new se({ code: "PARAM_ERROR", message: "username must be a string" });
  2155. "string" != typeof t2 && (t2 = "", console.warn("password is empty"));
  2156. const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: Ge.USERNAME, username: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token_expire: i2, access_token: o2 } = s2;
  2157. if (r2)
  2158. return this.setRefreshToken(r2), o2 && i2 ? this.setAccessToken(o2, i2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), $e(We), $e(Je, { env: this.config.env, loginType: Ge.USERNAME, persistence: this.config.persistence }), new at(this.config.env);
  2159. throw s2.code ? new se({ code: s2.code, message: `用户名密码登录失败: ${s2.message}` }) : new se({ message: "用户名密码登录失败" });
  2160. }
  2161. }
  2162. class dt {
  2163. constructor(e2) {
  2164. this.config = e2, this._cache = Me(e2.env), this._request = rt(e2.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), je(Je, this._onLoginTypeChanged);
  2165. }
  2166. get currentUser() {
  2167. const e2 = this.hasLoginState();
  2168. return e2 && e2.user || null;
  2169. }
  2170. get loginType() {
  2171. return this._cache.getStore(this._cache.keys.loginTypeKey);
  2172. }
  2173. anonymousAuthProvider() {
  2174. return new ct(this.config);
  2175. }
  2176. customAuthProvider() {
  2177. return new ut(this.config);
  2178. }
  2179. emailAuthProvider() {
  2180. return new ht(this.config);
  2181. }
  2182. usernameAuthProvider() {
  2183. return new lt(this.config);
  2184. }
  2185. async signInAnonymously() {
  2186. return new ct(this.config).signIn();
  2187. }
  2188. async signInWithEmailAndPassword(e2, t2) {
  2189. return new ht(this.config).signIn(e2, t2);
  2190. }
  2191. signInWithUsernameAndPassword(e2, t2) {
  2192. return new lt(this.config).signIn(e2, t2);
  2193. }
  2194. async linkAndRetrieveDataWithTicket(e2) {
  2195. this._anonymousAuthProvider || (this._anonymousAuthProvider = new ct(this.config)), je(ze, this._onAnonymousConverted);
  2196. return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e2);
  2197. }
  2198. async signOut() {
  2199. if (this.loginType === Ge.ANONYMOUS)
  2200. throw new se({ message: "匿名用户不支持登出操作" });
  2201. const { refreshTokenKey: e2, accessTokenKey: t2, accessTokenExpireKey: n2 } = this._cache.keys, s2 = this._cache.getStore(e2);
  2202. if (!s2)
  2203. return;
  2204. const r2 = await this._request.send("auth.logout", { refresh_token: s2 });
  2205. return this._cache.removeStore(e2), this._cache.removeStore(t2), this._cache.removeStore(n2), $e(We), $e(Je, { env: this.config.env, loginType: Ge.NULL, persistence: this.config.persistence }), r2;
  2206. }
  2207. async signUpWithEmailAndPassword(e2, t2) {
  2208. return this._request.send("auth.signUpWithEmailAndPassword", { email: e2, password: t2 });
  2209. }
  2210. async sendPasswordResetEmail(e2) {
  2211. return this._request.send("auth.sendPasswordResetEmail", { email: e2 });
  2212. }
  2213. onLoginStateChanged(e2) {
  2214. je(We, () => {
  2215. const t3 = this.hasLoginState();
  2216. e2.call(this, t3);
  2217. });
  2218. const t2 = this.hasLoginState();
  2219. e2.call(this, t2);
  2220. }
  2221. onLoginStateExpired(e2) {
  2222. je(He, e2.bind(this));
  2223. }
  2224. onAccessTokenRefreshed(e2) {
  2225. je(Ve, e2.bind(this));
  2226. }
  2227. onAnonymousConverted(e2) {
  2228. je(ze, e2.bind(this));
  2229. }
  2230. onLoginTypeChanged(e2) {
  2231. je(Je, () => {
  2232. const t2 = this.hasLoginState();
  2233. e2.call(this, t2);
  2234. });
  2235. }
  2236. async getAccessToken() {
  2237. return { accessToken: (await this._request.getAccessToken()).accessToken, env: this.config.env };
  2238. }
  2239. hasLoginState() {
  2240. const { accessTokenKey: e2, accessTokenExpireKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2), s2 = this._cache.getStore(t2);
  2241. return this._request.oauth.isAccessTokenExpired(n2, s2) ? null : new at(this.config.env);
  2242. }
  2243. async isUsernameRegistered(e2) {
  2244. if ("string" != typeof e2)
  2245. throw new se({ code: "PARAM_ERROR", message: "username must be a string" });
  2246. const { data: t2 } = await this._request.send("auth.isUsernameRegistered", { username: e2 });
  2247. return t2 && t2.isRegistered;
  2248. }
  2249. getLoginState() {
  2250. return Promise.resolve(this.hasLoginState());
  2251. }
  2252. async signInWithTicket(e2) {
  2253. return new ut(this.config).signIn(e2);
  2254. }
  2255. shouldRefreshAccessToken(e2) {
  2256. this._request._shouldRefreshAccessTokenHook = e2.bind(this);
  2257. }
  2258. getUserInfo() {
  2259. return this._request.send("auth.getUserInfo", {}).then((e2) => e2.code ? e2 : { ...e2.data, requestId: e2.seqId });
  2260. }
  2261. getAuthHeader() {
  2262. const { refreshTokenKey: e2, accessTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2);
  2263. return { "x-cloudbase-credentials": this._cache.getStore(t2) + "/@@/" + n2 };
  2264. }
  2265. _onAnonymousConverted(e2) {
  2266. const { env: t2 } = e2.data;
  2267. t2 === this.config.env && this._cache.updatePersistence(this.config.persistence);
  2268. }
  2269. _onLoginTypeChanged(e2) {
  2270. const { loginType: t2, persistence: n2, env: s2 } = e2.data;
  2271. s2 === this.config.env && (this._cache.updatePersistence(n2), this._cache.setStore(this._cache.keys.loginTypeKey, t2));
  2272. }
  2273. }
  2274. const pt = function(e2, t2) {
  2275. t2 = t2 || be();
  2276. const n2 = rt(this.config.env), { cloudPath: s2, filePath: r2, onUploadProgress: i2, fileType: o2 = "image" } = e2;
  2277. return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
  2278. 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 };
  2279. n2.upload({ url: a2, data: p2, file: r2, name: s2, fileType: o2, onUploadProgress: i2 }).then((e4) => {
  2280. 201 === e4.statusCode ? t2(null, { fileID: h2, requestId: d2 }) : t2(new se({ code: "STORAGE_REQUEST_FAIL", message: `STORAGE_REQUEST_FAIL: ${e4.data}` }));
  2281. }).catch((e4) => {
  2282. t2(e4);
  2283. });
  2284. }).catch((e3) => {
  2285. t2(e3);
  2286. }), t2.promise;
  2287. }, ft = function(e2, t2) {
  2288. t2 = t2 || be();
  2289. const n2 = rt(this.config.env), { cloudPath: s2 } = e2;
  2290. return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
  2291. t2(null, e3);
  2292. }).catch((e3) => {
  2293. t2(e3);
  2294. }), t2.promise;
  2295. }, gt = function({ fileList: e2 }, t2) {
  2296. if (t2 = t2 || be(), !e2 || !Array.isArray(e2))
  2297. return { code: "INVALID_PARAM", message: "fileList必须是非空的数组" };
  2298. for (let t3 of e2)
  2299. if (!t3 || "string" != typeof t3)
  2300. return { code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" };
  2301. const n2 = { fileid_list: e2 };
  2302. return rt(this.config.env).send("storage.batchDeleteFile", n2).then((e3) => {
  2303. e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.delete_list, requestId: e3.requestId });
  2304. }).catch((e3) => {
  2305. t2(e3);
  2306. }), t2.promise;
  2307. }, mt = function({ fileList: e2 }, t2) {
  2308. t2 = t2 || be(), e2 && Array.isArray(e2) || t2(null, { code: "INVALID_PARAM", message: "fileList必须是非空的数组" });
  2309. let n2 = [];
  2310. for (let s3 of e2)
  2311. "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的元素必须是字符串" });
  2312. const s2 = { file_list: n2 };
  2313. return rt(this.config.env).send("storage.batchGetDownloadUrl", s2).then((e3) => {
  2314. e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.download_list, requestId: e3.requestId });
  2315. }).catch((e3) => {
  2316. t2(e3);
  2317. }), t2.promise;
  2318. }, yt = async function({ fileID: e2 }, t2) {
  2319. const n2 = (await mt.call(this, { fileList: [{ fileID: e2, maxAge: 600 }] })).fileList[0];
  2320. if ("SUCCESS" !== n2.code)
  2321. return t2 ? t2(n2) : new Promise((e3) => {
  2322. e3(n2);
  2323. });
  2324. const s2 = rt(this.config.env);
  2325. let r2 = n2.download_url;
  2326. if (r2 = encodeURI(r2), !t2)
  2327. return s2.download({ url: r2 });
  2328. t2(await s2.download({ url: r2 }));
  2329. }, _t = function({ name: e2, data: t2, query: n2, parse: s2, search: r2, timeout: i2 }, o2) {
  2330. const a2 = o2 || be();
  2331. let c2;
  2332. try {
  2333. c2 = t2 ? JSON.stringify(t2) : "";
  2334. } catch (e3) {
  2335. return Promise.reject(e3);
  2336. }
  2337. if (!e2)
  2338. return Promise.reject(new se({ code: "PARAM_ERROR", message: "函数名不能为空" }));
  2339. const u2 = { inQuery: n2, parse: s2, search: r2, function_name: e2, request_data: c2 };
  2340. return rt(this.config.env).send("functions.invokeFunction", u2, { timeout: i2 }).then((e3) => {
  2341. if (e3.code)
  2342. a2(null, e3);
  2343. else {
  2344. let t3 = e3.data.response_data;
  2345. if (s2)
  2346. a2(null, { result: t3, requestId: e3.requestId });
  2347. else
  2348. try {
  2349. t3 = JSON.parse(e3.data.response_data), a2(null, { result: t3, requestId: e3.requestId });
  2350. } catch (e4) {
  2351. a2(new se({ message: "response data must be json" }));
  2352. }
  2353. }
  2354. return a2.promise;
  2355. }).catch((e3) => {
  2356. a2(e3);
  2357. }), a2.promise;
  2358. }, wt = { timeout: 15e3, persistence: "session" }, vt = {};
  2359. class It {
  2360. constructor(e2) {
  2361. this.config = e2 || this.config, this.authObj = void 0;
  2362. }
  2363. init(e2) {
  2364. switch (Oe.adapter || (this.requestClient = new Oe.adapter.reqClass({ timeout: e2.timeout || 5e3, timeoutMsg: `请求在${(e2.timeout || 5e3) / 1e3}s内未完成,已中断` })), this.config = { ...wt, ...e2 }, true) {
  2365. case this.config.timeout > 6e5:
  2366. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  2367. break;
  2368. case this.config.timeout < 100:
  2369. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  2370. }
  2371. return new It(this.config);
  2372. }
  2373. auth({ persistence: e2 } = {}) {
  2374. if (this.authObj)
  2375. return this.authObj;
  2376. const t2 = e2 || Oe.adapter.primaryStorage || wt.persistence;
  2377. var n2;
  2378. return t2 !== this.config.persistence && (this.config.persistence = t2), function(e3) {
  2379. const { env: t3 } = e3;
  2380. Ne[t3] = new Ue(e3), De[t3] = new Ue({ ...e3, persistence: "local" });
  2381. }(this.config), n2 = this.config, st[n2.env] = new nt(n2), this.authObj = new dt(this.config), this.authObj;
  2382. }
  2383. on(e2, t2) {
  2384. return je.apply(this, [e2, t2]);
  2385. }
  2386. off(e2, t2) {
  2387. return Be.apply(this, [e2, t2]);
  2388. }
  2389. callFunction(e2, t2) {
  2390. return _t.apply(this, [e2, t2]);
  2391. }
  2392. deleteFile(e2, t2) {
  2393. return gt.apply(this, [e2, t2]);
  2394. }
  2395. getTempFileURL(e2, t2) {
  2396. return mt.apply(this, [e2, t2]);
  2397. }
  2398. downloadFile(e2, t2) {
  2399. return yt.apply(this, [e2, t2]);
  2400. }
  2401. uploadFile(e2, t2) {
  2402. return pt.apply(this, [e2, t2]);
  2403. }
  2404. getUploadMetadata(e2, t2) {
  2405. return ft.apply(this, [e2, t2]);
  2406. }
  2407. registerExtension(e2) {
  2408. vt[e2.name] = e2;
  2409. }
  2410. async invokeExtension(e2, t2) {
  2411. const n2 = vt[e2];
  2412. if (!n2)
  2413. throw new se({ message: `扩展${e2} 必须先注册` });
  2414. return await n2.invoke(t2, this);
  2415. }
  2416. useAdapters(e2) {
  2417. const { adapter: t2, runtime: n2 } = xe(e2) || {};
  2418. t2 && (Oe.adapter = t2), n2 && (Oe.runtime = n2);
  2419. }
  2420. }
  2421. var St = new It();
  2422. function bt(e2, t2, n2) {
  2423. void 0 === n2 && (n2 = {});
  2424. var s2 = /\?/.test(t2), r2 = "";
  2425. for (var i2 in n2)
  2426. "" === r2 ? !s2 && (t2 += "?") : r2 += "&", r2 += i2 + "=" + encodeURIComponent(n2[i2]);
  2427. return /^http(s)?:\/\//.test(t2 += r2) ? t2 : "" + e2 + t2;
  2428. }
  2429. class kt {
  2430. get(e2) {
  2431. const { url: t2, data: n2, headers: s2, timeout: r2 } = e2;
  2432. return new Promise((e3, i2) => {
  2433. re.request({ url: bt("https:", t2), data: n2, method: "GET", header: s2, timeout: r2, success(t3) {
  2434. e3(t3);
  2435. }, fail(e4) {
  2436. i2(e4);
  2437. } });
  2438. });
  2439. }
  2440. post(e2) {
  2441. const { url: t2, data: n2, headers: s2, timeout: r2 } = e2;
  2442. return new Promise((e3, i2) => {
  2443. re.request({ url: bt("https:", t2), data: n2, method: "POST", header: s2, timeout: r2, success(t3) {
  2444. e3(t3);
  2445. }, fail(e4) {
  2446. i2(e4);
  2447. } });
  2448. });
  2449. }
  2450. upload(e2) {
  2451. return new Promise((t2, n2) => {
  2452. const { url: s2, file: r2, data: i2, headers: o2, fileType: a2 } = e2, c2 = re.uploadFile({ url: bt("https:", s2), name: "file", formData: Object.assign({}, i2), filePath: r2, fileType: a2, header: o2, success(e3) {
  2453. const n3 = { statusCode: e3.statusCode, data: e3.data || {} };
  2454. 200 === e3.statusCode && i2.success_action_status && (n3.statusCode = parseInt(i2.success_action_status, 10)), t2(n3);
  2455. }, fail(e3) {
  2456. n2(new Error(e3.errMsg || "uploadFile:fail"));
  2457. } });
  2458. "function" == typeof e2.onUploadProgress && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((t3) => {
  2459. e2.onUploadProgress({ loaded: t3.totalBytesSent, total: t3.totalBytesExpectedToSend });
  2460. });
  2461. });
  2462. }
  2463. }
  2464. const Tt = { setItem(e2, t2) {
  2465. re.setStorageSync(e2, t2);
  2466. }, getItem: (e2) => re.getStorageSync(e2), removeItem(e2) {
  2467. re.removeStorageSync(e2);
  2468. }, clear() {
  2469. re.clearStorageSync();
  2470. } };
  2471. var At = { genAdapter: function() {
  2472. return { root: {}, reqClass: kt, localStorage: Tt, primaryStorage: "local" };
  2473. }, isMatch: function() {
  2474. return true;
  2475. }, runtime: "uni_app" };
  2476. St.useAdapters(At);
  2477. const Pt = St, Ct = Pt.init;
  2478. Pt.init = function(e2) {
  2479. e2.env = e2.spaceId;
  2480. const t2 = Ct.call(this, e2);
  2481. t2.config.provider = "tencent", t2.config.spaceId = e2.spaceId;
  2482. const n2 = t2.auth;
  2483. return t2.auth = function(e3) {
  2484. const t3 = n2.call(this, e3);
  2485. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach((e4) => {
  2486. var n3;
  2487. t3[e4] = (n3 = t3[e4], function(e5) {
  2488. e5 = e5 || {};
  2489. const { success: t4, fail: s2, complete: r2 } = ne(e5);
  2490. if (!(t4 || s2 || r2))
  2491. return n3.call(this, e5);
  2492. n3.call(this, e5).then((e6) => {
  2493. t4 && t4(e6), r2 && r2(e6);
  2494. }, (e6) => {
  2495. s2 && s2(e6), r2 && r2(e6);
  2496. });
  2497. }).bind(t3);
  2498. }), t3;
  2499. }, t2.customAuth = t2.auth, t2;
  2500. };
  2501. var xt = Pt;
  2502. async function Ot(e2, t2) {
  2503. const n2 = `http://${e2}:${t2}/system/ping`;
  2504. try {
  2505. const e3 = await (s2 = { url: n2, timeout: 500 }, new Promise((e4, t3) => {
  2506. re.request({ ...s2, success(t4) {
  2507. e4(t4);
  2508. }, fail(e5) {
  2509. t3(e5);
  2510. } });
  2511. }));
  2512. return !(!e3.data || 0 !== e3.data.code);
  2513. } catch (e3) {
  2514. return false;
  2515. }
  2516. var s2;
  2517. }
  2518. async function Et(e2, t2) {
  2519. let n2;
  2520. for (let s2 = 0; s2 < e2.length; s2++) {
  2521. const r2 = e2[s2];
  2522. if (await Ot(r2, t2)) {
  2523. n2 = r2;
  2524. break;
  2525. }
  2526. }
  2527. return { address: n2, port: t2 };
  2528. }
  2529. const Lt = { "serverless.file.resource.generateProximalSign": "storage/generate-proximal-sign", "serverless.file.resource.report": "storage/report", "serverless.file.resource.delete": "storage/delete", "serverless.file.resource.getTempFileURL": "storage/get-temp-file-url" };
  2530. var Rt = class {
  2531. constructor(e2) {
  2532. if (["spaceId", "clientSecret"].forEach((t2) => {
  2533. if (!Object.prototype.hasOwnProperty.call(e2, t2))
  2534. throw new Error(`${t2} required`);
  2535. }), !e2.endpoint)
  2536. throw new Error("集群空间未配置ApiEndpoint,配置后需要重新关联服务空间后生效");
  2537. this.config = Object.assign({}, e2), this.config.provider = "dcloud", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.adapter = re;
  2538. }
  2539. async request(e2, t2 = true) {
  2540. const n2 = t2;
  2541. return e2 = n2 ? await this.setupLocalRequest(e2) : this.setupRequest(e2), Promise.resolve().then(() => n2 ? this.requestLocal(e2) : fe.wrappedRequest(e2, this.adapter.request));
  2542. }
  2543. requestLocal(e2) {
  2544. return new Promise((t2, n2) => {
  2545. this.adapter.request(Object.assign(e2, { complete(e3) {
  2546. if (e3 || (e3 = {}), !e3.statusCode || e3.statusCode >= 400) {
  2547. const t3 = e3.data && e3.data.code || "SYS_ERR", s2 = e3.data && e3.data.message || "request:fail";
  2548. return n2(new se({ code: t3, message: s2 }));
  2549. }
  2550. t2({ success: true, result: e3.data });
  2551. } }));
  2552. });
  2553. }
  2554. setupRequest(e2) {
  2555. const t2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), n2 = { "Content-Type": "application/json" };
  2556. n2["x-serverless-sign"] = fe.sign(t2, this.config.clientSecret);
  2557. const s2 = pe();
  2558. n2["x-client-info"] = encodeURIComponent(JSON.stringify(s2));
  2559. const { token: r2 } = oe();
  2560. return n2["x-client-token"] = r2, { url: this.config.requestUrl, method: "POST", data: t2, dataType: "json", header: JSON.parse(JSON.stringify(n2)) };
  2561. }
  2562. async setupLocalRequest(e2) {
  2563. const t2 = pe(), { token: n2 } = oe(), s2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now(), clientInfo: t2, token: n2 }), { address: r2, servePort: i2 } = this.__dev__ && this.__dev__.debugInfo || {}, { address: o2 } = await Et(r2, i2);
  2564. return { url: `http://${o2}:${i2}/${Lt[e2.method]}`, method: "POST", data: s2, dataType: "json", header: JSON.parse(JSON.stringify({ "Content-Type": "application/json" })) };
  2565. }
  2566. callFunction(e2) {
  2567. const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) };
  2568. return this.request(t2, false);
  2569. }
  2570. getUploadFileOptions(e2) {
  2571. const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) };
  2572. return this.request(t2);
  2573. }
  2574. reportUploadFile(e2) {
  2575. const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) };
  2576. return this.request(t2);
  2577. }
  2578. uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2 }) {
  2579. if (!t2)
  2580. throw new se({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });
  2581. let r2;
  2582. return this.getUploadFileOptions({ cloudPath: t2 }).then((t3) => {
  2583. const { url: i2, formData: o2, name: a2 } = t3.result;
  2584. return r2 = t3.result.fileUrl, new Promise((t4, r3) => {
  2585. const c2 = this.adapter.uploadFile({ url: i2, formData: o2, name: a2, filePath: e2, fileType: n2, success(e3) {
  2586. e3 && e3.statusCode < 400 ? t4(e3) : r3(new se({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  2587. }, fail(e3) {
  2588. r3(new se({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  2589. } });
  2590. "function" == typeof s2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => {
  2591. s2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  2592. });
  2593. });
  2594. }).then(() => this.reportUploadFile({ cloudPath: t2 })).then((t3) => new Promise((n3, s3) => {
  2595. t3.success ? n3({ success: true, filePath: e2, fileID: r2 }) : s3(new se({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  2596. }));
  2597. }
  2598. deleteFile({ fileList: e2 }) {
  2599. const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e2 }) };
  2600. return this.request(t2).then((e3) => {
  2601. if (e3.success)
  2602. return e3.result;
  2603. throw new se({ code: "DELETE_FILE_FAILED", message: "删除文件失败" });
  2604. });
  2605. }
  2606. getTempFileURL({ fileList: e2, maxAge: t2 } = {}) {
  2607. if (!Array.isArray(e2) || 0 === e2.length)
  2608. throw new se({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
  2609. const n2 = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e2, maxAge: t2 }) };
  2610. return this.request(n2).then((e3) => {
  2611. if (e3.success)
  2612. return { fileList: e3.result.fileList.map((e4) => ({ fileID: e4.fileID, tempFileURL: e4.tempFileURL })) };
  2613. throw new se({ code: "GET_TEMP_FILE_URL_FAILED", message: "获取临时文件链接失败" });
  2614. });
  2615. }
  2616. };
  2617. var Ut = { init(e2) {
  2618. const t2 = new Rt(e2), n2 = { signInAnonymously: function() {
  2619. return Promise.resolve();
  2620. }, getLoginState: function() {
  2621. return Promise.resolve(false);
  2622. } };
  2623. return t2.auth = function() {
  2624. return n2;
  2625. }, t2.customAuth = t2.auth, t2;
  2626. } }, Nt = n(function(e2, t2) {
  2627. e2.exports = r.enc.Hex;
  2628. });
  2629. function Dt() {
  2630. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e2) {
  2631. var t2 = 16 * Math.random() | 0;
  2632. return ("x" === e2 ? t2 : 3 & t2 | 8).toString(16);
  2633. });
  2634. }
  2635. function Mt(e2 = "", t2 = {}) {
  2636. const { data: n2, functionName: s2, method: r2, headers: i2, signHeaderKeys: o2 = [], config: a2 } = t2, c2 = String(Date.now()), u2 = Dt(), 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) {
  2637. const t3 = e3.signedHeaders.join(";"), n3 = e3.signedHeaders.map((t4) => `${t4.toLowerCase()}:${e3.headers[t4]}
  2638. `).join(""), s3 = Ie(e3.body).toString(Nt), r3 = `${e3.method.toUpperCase()}
  2639. ${e3.path}
  2640. ${e3.query}
  2641. ${n3}
  2642. ${t3}
  2643. ${s3}
  2644. `, i3 = Ie(r3).toString(Nt), o3 = `HMAC-SHA256
  2645. ${e3.timestamp}
  2646. ${i3}
  2647. `, a3 = Se(o3, e3.secretKey).toString(Nt);
  2648. return `HMAC-SHA256 Credential=${e3.secretId}, SignedHeaders=${t3}, Signature=${a3}`;
  2649. }({ path: d2, query: p2, method: r2, headers: h2, timestamp: c2, body: JSON.stringify(n2), secretId: a2.accessKey, secretKey: a2.secretKey, signedHeaders: l2.sort() });
  2650. return { url: `${a2.endpoint}${e2}`, headers: Object.assign({}, h2, { Authorization: f2 }) };
  2651. }
  2652. function qt({ url: e2, data: t2, method: n2 = "POST", headers: s2 = {}, timeout: r2 }) {
  2653. return new Promise((i2, o2) => {
  2654. re.request({ url: e2, method: n2, data: "object" == typeof t2 ? JSON.stringify(t2) : t2, header: s2, dataType: "json", timeout: r2, complete: (e3 = {}) => {
  2655. const t3 = s2["x-trace-id"] || "";
  2656. if (!e3.statusCode || e3.statusCode >= 400) {
  2657. const { message: n3, errMsg: s3, trace_id: r3 } = e3.data || {};
  2658. return o2(new se({ code: "SYS_ERR", message: n3 || s3 || "request:fail", requestId: r3 || t3 }));
  2659. }
  2660. i2({ status: e3.statusCode, data: e3.data, headers: e3.header, requestId: t3 });
  2661. } });
  2662. });
  2663. }
  2664. function Kt(e2, t2) {
  2665. const { path: n2, data: s2, method: r2 = "GET" } = e2, { url: i2, headers: o2 } = Mt(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 });
  2666. return qt({ url: i2, data: s2, method: r2, headers: o2 }).then((e3) => {
  2667. const t3 = e3.data || {};
  2668. if (!t3.success)
  2669. throw new se({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId });
  2670. return t3.data || {};
  2671. }).catch((e3) => {
  2672. throw new se({ code: e3.errCode, message: e3.errMsg, requestId: e3.requestId });
  2673. });
  2674. }
  2675. function Ft(e2 = "") {
  2676. const t2 = e2.trim().replace(/^cloud:\/\//, ""), n2 = t2.indexOf("/");
  2677. if (n2 <= 0)
  2678. throw new se({ code: "INVALID_PARAM", message: "fileID不合法" });
  2679. const s2 = t2.substring(0, n2), r2 = t2.substring(n2 + 1);
  2680. return s2 !== this.config.spaceId && console.warn("file ".concat(e2, " does not belong to env ").concat(this.config.spaceId)), r2;
  2681. }
  2682. function jt(e2 = "") {
  2683. return "cloud://".concat(this.config.spaceId, "/").concat(e2.replace(/^\/+/, ""));
  2684. }
  2685. class $t {
  2686. constructor(e2) {
  2687. this.config = e2;
  2688. }
  2689. signedURL(e2, t2 = {}) {
  2690. const n2 = `/ws/function/${e2}`, s2 = this.config.wsEndpoint.replace(/^ws(s)?:\/\//, ""), r2 = Object.assign({}, t2, { accessKeyId: this.config.accessKey, signatureNonce: Dt(), timestamp: "" + Date.now() }), i2 = [n2, ["accessKeyId", "authorization", "signatureNonce", "timestamp"].sort().map(function(e3) {
  2691. return r2[e3] ? "".concat(e3, "=").concat(r2[e3]) : null;
  2692. }).filter(Boolean).join("&"), `host:${s2}`].join("\n"), o2 = ["HMAC-SHA256", Ie(i2).toString(Nt)].join("\n"), a2 = Se(o2, this.config.secretKey).toString(Nt), c2 = Object.keys(r2).map((e3) => `${e3}=${encodeURIComponent(r2[e3])}`).join("&");
  2693. return `${this.config.wsEndpoint}${n2}?${c2}&signature=${a2}`;
  2694. }
  2695. }
  2696. var Bt = class {
  2697. constructor(e2) {
  2698. if (["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach((t2) => {
  2699. if (!Object.prototype.hasOwnProperty.call(e2, t2))
  2700. throw new Error(`${t2} required`);
  2701. }), e2.endpoint) {
  2702. if ("string" != typeof e2.endpoint)
  2703. throw new Error("endpoint must be string");
  2704. if (!/^https:\/\//.test(e2.endpoint))
  2705. throw new Error("endpoint must start with https://");
  2706. e2.endpoint = e2.endpoint.replace(/\/$/, "");
  2707. }
  2708. 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 $t(this.config);
  2709. }
  2710. callFunction(e2) {
  2711. return function(e3, t2) {
  2712. const { name: n2, data: s2, async: r2 = false, timeout: i2 } = e3, o2 = "POST", a2 = { "x-to-function-name": n2 };
  2713. r2 && (a2["x-function-invoke-type"] = "async");
  2714. const { url: c2, headers: u2 } = Mt("/functions/invokeFunction", { functionName: n2, data: s2, method: o2, headers: a2, signHeaderKeys: ["x-to-function-name"], config: t2 });
  2715. return qt({ url: c2, data: s2, method: o2, headers: u2, timeout: i2 }).then((e4) => {
  2716. let t3 = 0;
  2717. if (r2) {
  2718. const n3 = e4.data || {};
  2719. t3 = "200" === n3.errCode ? 0 : n3.errCode, e4.data = n3.data || {}, e4.errMsg = n3.errMsg;
  2720. }
  2721. if (0 !== t3)
  2722. throw new se({ code: t3, message: e4.errMsg, requestId: e4.requestId });
  2723. return { errCode: t3, success: 0 === t3, requestId: e4.requestId, result: e4.data };
  2724. }).catch((e4) => {
  2725. throw new se({ code: e4.errCode, message: e4.errMsg, requestId: e4.requestId });
  2726. });
  2727. }(e2, this.config);
  2728. }
  2729. uploadFileToOSS({ url: e2, filePath: t2, fileType: n2, formData: s2, onUploadProgress: r2 }) {
  2730. return new Promise((i2, o2) => {
  2731. const a2 = re.uploadFile({ url: e2, filePath: t2, fileType: n2, formData: s2, name: "file", success(e3) {
  2732. e3 && e3.statusCode < 400 ? i2(e3) : o2(new se({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  2733. }, fail(e3) {
  2734. o2(new se({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  2735. } });
  2736. "function" == typeof r2 && a2 && "function" == typeof a2.onProgressUpdate && a2.onProgressUpdate((e3) => {
  2737. r2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  2738. });
  2739. });
  2740. }
  2741. async uploadFile({ filePath: e2, cloudPath: t2 = "", fileType: n2 = "image", onUploadProgress: s2 }) {
  2742. if ("string" !== f(t2))
  2743. throw new se({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
  2744. if (!(t2 = t2.trim()))
  2745. throw new se({ code: "INVALID_PARAM", message: "cloudPath不可为空" });
  2746. if (/:\/\//.test(t2))
  2747. throw new se({ code: "INVALID_PARAM", message: "cloudPath不合法" });
  2748. const r2 = await Kt({ 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), {});
  2749. return this.uploadFileToOSS({ url: o2, filePath: e2, fileType: n2, formData: c2, onUploadProgress: s2 }).then(() => ({ fileID: i2 }));
  2750. }
  2751. async getTempFileURL({ fileList: e2 }) {
  2752. return new Promise((t2, n2) => {
  2753. (!e2 || e2.length < 0) && t2({ code: "INVALID_PARAM", message: "fileList不能为空数组" }), e2.length > 50 && t2({ code: "INVALID_PARAM", message: "fileList数组长度不能超过50" });
  2754. const s2 = [];
  2755. for (const n3 of e2) {
  2756. let e3;
  2757. "string" !== f(n3) && t2({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
  2758. try {
  2759. e3 = Ft.call(this, n3);
  2760. } catch (t3) {
  2761. console.warn(t3.errCode, t3.errMsg), e3 = n3;
  2762. }
  2763. s2.push({ file_id: e3, expire: 600 });
  2764. }
  2765. Kt({ path: "/?download_url", data: { file_list: s2 }, method: "POST" }, this.config).then((e3) => {
  2766. const { file_list: n3 = [] } = e3;
  2767. t2({ fileList: n3.map((e4) => ({ fileID: jt.call(this, e4.file_id), tempFileURL: e4.download_url })) });
  2768. }).catch((e3) => n2(e3));
  2769. });
  2770. }
  2771. async connectWebSocket(e2) {
  2772. const { name: t2, query: n2 } = e2;
  2773. return re.connectSocket({ url: this._websocket.signedURL(t2, n2), complete: () => {
  2774. } });
  2775. }
  2776. };
  2777. var Wt = { init: (e2) => {
  2778. e2.provider = "alipay";
  2779. const t2 = new Bt(e2);
  2780. return t2.auth = function() {
  2781. return { signInAnonymously: function() {
  2782. return Promise.resolve();
  2783. }, getLoginState: function() {
  2784. return Promise.resolve(true);
  2785. } };
  2786. }, t2;
  2787. } };
  2788. function Ht({ data: e2 }) {
  2789. let t2;
  2790. t2 = pe();
  2791. const n2 = JSON.parse(JSON.stringify(e2 || {}));
  2792. if (Object.assign(n2, { clientInfo: t2 }), !n2.uniIdToken) {
  2793. const { token: e3 } = oe();
  2794. e3 && (n2.uniIdToken = e3);
  2795. }
  2796. return n2;
  2797. }
  2798. async function Jt(e2 = {}) {
  2799. await this.__dev__.initLocalNetwork();
  2800. const { localAddress: t2, localPort: n2 } = this.__dev__, s2 = { aliyun: "aliyun", tencent: "tcb", alipay: "alipay", dcloud: "dcloud" }[this.config.provider], r2 = this.config.spaceId, i2 = `http://${t2}:${n2}/system/check-function`, o2 = `http://${t2}:${n2}/cloudfunctions/${e2.name}`;
  2801. return new Promise((t3, n3) => {
  2802. re.request({ method: "POST", url: i2, data: { name: e2.name, platform: A, provider: s2, spaceId: r2 }, timeout: 3e3, success(e3) {
  2803. t3(e3);
  2804. }, fail() {
  2805. t3({ data: { code: "NETWORK_ERROR", message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。" } });
  2806. } });
  2807. }).then(({ data: e3 } = {}) => {
  2808. const { code: t3, message: n3 } = e3 || {};
  2809. return { code: 0 === t3 ? 0 : t3 || "SYS_ERR", message: n3 || "SYS_ERR" };
  2810. }).then(({ code: t3, message: n3 }) => {
  2811. if (0 !== t3) {
  2812. switch (t3) {
  2813. case "MODULE_ENCRYPTED":
  2814. console.error(`此云函数(${e2.name})依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数`);
  2815. break;
  2816. case "FUNCTION_ENCRYPTED":
  2817. console.error(`此云函数(${e2.name})已加密不可本地调试,自动切换为云端已部署的云函数`);
  2818. break;
  2819. case "ACTION_ENCRYPTED":
  2820. console.error(n3 || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  2821. break;
  2822. case "NETWORK_ERROR":
  2823. console.error(n3 || "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下");
  2824. break;
  2825. case "SWITCH_TO_CLOUD":
  2826. break;
  2827. default: {
  2828. const e3 = `检测本地调试服务出现错误:${n3},请检查网络环境或重启客户端再试`;
  2829. throw console.error(e3), new Error(e3);
  2830. }
  2831. }
  2832. return this._callCloudFunction(e2);
  2833. }
  2834. return new Promise((t4, n4) => {
  2835. const r3 = Ht.call(this, { data: e2.data });
  2836. re.request({ method: "POST", url: o2, data: { provider: s2, platform: A, param: r3 }, timeout: e2.timeout, success: ({ statusCode: e3, data: s3 } = {}) => !e3 || e3 >= 400 ? n4(new se({ code: s3.code || "SYS_ERR", message: s3.message || "request:fail" })) : t4({ result: s3 }), fail(e3) {
  2837. n4(new se({ code: e3.code || e3.errCode || "SYS_ERR", message: e3.message || e3.errMsg || "request:fail" }));
  2838. } });
  2839. });
  2840. });
  2841. }
  2842. const zt = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }];
  2843. var Vt = /[\\^$.*+?()[\]{}|]/g, Gt = RegExp(Vt.source);
  2844. function Yt(e2, t2, n2) {
  2845. return e2.replace(new RegExp((s2 = t2) && Gt.test(s2) ? s2.replace(Vt, "\\$&") : s2, "g"), n2);
  2846. var s2;
  2847. }
  2848. const Xt = "request", Zt = "response", en$3 = "both";
  2849. const Mn = { code: 2e4, message: "System error" }, qn = { code: 20101, message: "Invalid client" };
  2850. function jn(e2) {
  2851. const { errSubject: t2, subject: n2, errCode: s2, errMsg: r2, code: i2, message: o2, cause: a2 } = e2 || {};
  2852. return new se({ subject: t2 || n2 || "uni-secure-network", code: s2 || i2 || Mn.code, message: r2 || o2, cause: a2 });
  2853. }
  2854. let Bn;
  2855. function Vn({ secretType: e2 } = {}) {
  2856. return e2 === Xt || e2 === Zt || e2 === en$3;
  2857. }
  2858. function Gn({ name: e2, data: t2 = {} } = {}) {
  2859. return "DCloud-clientDB" === e2 && "encryption" === t2.redirectTo && "getAppClientKey" === t2.action;
  2860. }
  2861. function Yn({ provider: e2, spaceId: t2, functionName: n2 } = {}) {
  2862. const { appId: s2, uniPlatform: r2, osName: i2 } = he();
  2863. let o2 = r2;
  2864. "app" === r2 && (o2 = i2);
  2865. const a2 = function({ provider: e3, spaceId: t3 } = {}) {
  2866. const n3 = T;
  2867. if (!n3)
  2868. return {};
  2869. e3 = /* @__PURE__ */ function(e4) {
  2870. return "tencent" === e4 ? "tcb" : e4;
  2871. }(e3);
  2872. const s3 = n3.find((n4) => n4.provider === e3 && n4.spaceId === t3);
  2873. return s3 && s3.config;
  2874. }({ provider: e2, spaceId: t2 });
  2875. if (!a2 || !a2.accessControl || !a2.accessControl.enable)
  2876. return false;
  2877. const c2 = a2.accessControl.function || {}, u2 = Object.keys(c2);
  2878. if (0 === u2.length)
  2879. return true;
  2880. const h2 = function(e3, t3) {
  2881. let n3, s3, r3;
  2882. for (let i3 = 0; i3 < e3.length; i3++) {
  2883. const o3 = e3[i3];
  2884. o3 !== t3 ? "*" !== o3 ? o3.split(",").map((e4) => e4.trim()).indexOf(t3) > -1 && (s3 = o3) : r3 = o3 : n3 = o3;
  2885. }
  2886. return n3 || s3 || r3;
  2887. }(u2, n2);
  2888. if (!h2)
  2889. return false;
  2890. if ((c2[h2] || []).find((e3 = {}) => e3.appId === s2 && (e3.platform || "").toLowerCase() === o2.toLowerCase()))
  2891. return true;
  2892. throw console.error(`此应用[appId: ${s2}, platform: ${o2}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`), jn(qn);
  2893. }
  2894. function Qn({ functionName: e2, result: t2, logPvd: n2 }) {
  2895. if (this.__dev__.debugLog && t2 && t2.requestId) {
  2896. const s2 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e2, requestId: t2.requestId });
  2897. console.log(`[${n2}-request]${s2}[/${n2}-request]`);
  2898. }
  2899. }
  2900. function Xn(e2) {
  2901. const t2 = e2.callFunction, n2 = function(n3) {
  2902. const s2 = n3.name;
  2903. n3.data = Ht.call(e2, { data: n3.data });
  2904. const r2 = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb", alipay: "alipay", dcloud: "dcloud" }[this.config.provider], i2 = Vn(n3), o2 = Gn(n3), a2 = i2 || o2;
  2905. return t2.call(this, n3).then((e3) => (e3.errCode = 0, !a2 && Qn.call(this, { functionName: s2, result: e3, logPvd: r2 }), Promise.resolve(e3)), (e3) => (!a2 && Qn.call(this, { functionName: s2, result: e3, logPvd: r2 }), e3 && e3.message && (e3.message = function({ message: e4 = "", extraInfo: t3 = {}, formatter: n4 = [] } = {}) {
  2906. for (let s3 = 0; s3 < n4.length; s3++) {
  2907. const { rule: r3, content: i3, mode: o3 } = n4[s3], a3 = e4.match(r3);
  2908. if (!a3)
  2909. continue;
  2910. let c2 = i3;
  2911. for (let e5 = 1; e5 < a3.length; e5++)
  2912. c2 = Yt(c2, `{$${e5}}`, a3[e5]);
  2913. for (const e5 in t3)
  2914. c2 = Yt(c2, `{${e5}}`, t3[e5]);
  2915. return "replace" === o3 ? c2 : e4 + c2;
  2916. }
  2917. return e4;
  2918. }({ message: `[${n3.name}]: ${e3.message}`, formatter: zt, extraInfo: { functionName: s2 } })), Promise.reject(e3)));
  2919. };
  2920. e2.callFunction = function(t3) {
  2921. const { provider: s2, spaceId: r2 } = e2.config, i2 = t3.name;
  2922. let o2, a2;
  2923. if (t3.data = t3.data || {}, e2.__dev__.debugInfo && !e2.__dev__.debugInfo.forceRemote && C ? (e2._callCloudFunction || (e2._callCloudFunction = n2, e2._callLocalFunction = Jt), o2 = Jt) : o2 = n2, o2 = o2.bind(e2), Gn(t3))
  2924. a2 = n2.call(e2, t3);
  2925. else if (Vn(t3)) {
  2926. a2 = new Bn({ secretType: t3.secretType, uniCloudIns: e2 }).wrapEncryptDataCallFunction(n2.bind(e2))(t3);
  2927. } else if (Yn({ provider: s2, spaceId: r2, functionName: i2 })) {
  2928. a2 = new Bn({ secretType: t3.secretType, uniCloudIns: e2 }).wrapVerifyClientCallFunction(n2.bind(e2))(t3);
  2929. } else
  2930. a2 = o2(t3);
  2931. 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 && "undefined" != typeof UTS && (e3.result = UTS.JSON.parse(JSON.stringify(e3.result))), e3));
  2932. };
  2933. }
  2934. Bn = class {
  2935. constructor() {
  2936. throw jn({ message: `Platform ${A} is not enabled, please check whether secure network module is enabled in your manifest.json` });
  2937. }
  2938. };
  2939. const Zn = Symbol("CLIENT_DB_INTERNAL");
  2940. function es$1(e2, t2) {
  2941. return e2.then = "DoNotReturnProxyWithAFunctionNamedThen", e2._internalType = Zn, e2.inspect = null, e2.__v_raw = void 0, new Proxy(e2, { get(e3, n2, s2) {
  2942. if ("_uniClient" === n2)
  2943. return null;
  2944. if ("symbol" == typeof n2)
  2945. return e3[n2];
  2946. if (n2 in e3 || "string" != typeof n2) {
  2947. const t3 = e3[n2];
  2948. return "function" == typeof t3 ? t3.bind(e3) : t3;
  2949. }
  2950. return t2.get(e3, n2, s2);
  2951. } });
  2952. }
  2953. function ts(e2) {
  2954. return { on: (t2, n2) => {
  2955. e2[t2] = e2[t2] || [], e2[t2].indexOf(n2) > -1 || e2[t2].push(n2);
  2956. }, off: (t2, n2) => {
  2957. e2[t2] = e2[t2] || [];
  2958. const s2 = e2[t2].indexOf(n2);
  2959. -1 !== s2 && e2[t2].splice(s2, 1);
  2960. } };
  2961. }
  2962. const ns = ["db.Geo", "db.command", "command.aggregate"];
  2963. function ss(e2, t2) {
  2964. return ns.indexOf(`${e2}.${t2}`) > -1;
  2965. }
  2966. function rs(e2) {
  2967. switch (f(e2 = ie(e2))) {
  2968. case "array":
  2969. return e2.map((e3) => rs(e3));
  2970. case "object":
  2971. return e2._internalType === Zn || Object.keys(e2).forEach((t2) => {
  2972. e2[t2] = rs(e2[t2]);
  2973. }), e2;
  2974. case "regexp":
  2975. return { $regexp: { source: e2.source, flags: e2.flags } };
  2976. case "date":
  2977. return { $date: e2.toISOString() };
  2978. default:
  2979. return e2;
  2980. }
  2981. }
  2982. function is(e2) {
  2983. return e2 && e2.content && e2.content.$method;
  2984. }
  2985. class os {
  2986. constructor(e2, t2, n2) {
  2987. this.content = e2, this.prevStage = t2 || null, this.udb = null, this._database = n2;
  2988. }
  2989. toJSON() {
  2990. let e2 = this;
  2991. const t2 = [e2.content];
  2992. for (; e2.prevStage; )
  2993. e2 = e2.prevStage, t2.push(e2.content);
  2994. return { $db: t2.reverse().map((e3) => ({ $method: e3.$method, $param: rs(e3.$param) })) };
  2995. }
  2996. toString() {
  2997. return JSON.stringify(this.toJSON());
  2998. }
  2999. getAction() {
  3000. const e2 = this.toJSON().$db.find((e3) => "action" === e3.$method);
  3001. return e2 && e2.$param && e2.$param[0];
  3002. }
  3003. getCommand() {
  3004. return { $db: this.toJSON().$db.filter((e2) => "action" !== e2.$method) };
  3005. }
  3006. get isAggregate() {
  3007. let e2 = this;
  3008. for (; e2; ) {
  3009. const t2 = is(e2), n2 = is(e2.prevStage);
  3010. if ("aggregate" === t2 && "collection" === n2 || "pipeline" === t2)
  3011. return true;
  3012. e2 = e2.prevStage;
  3013. }
  3014. return false;
  3015. }
  3016. get isCommand() {
  3017. let e2 = this;
  3018. for (; e2; ) {
  3019. if ("command" === is(e2))
  3020. return true;
  3021. e2 = e2.prevStage;
  3022. }
  3023. return false;
  3024. }
  3025. get isAggregateCommand() {
  3026. let e2 = this;
  3027. for (; e2; ) {
  3028. const t2 = is(e2), n2 = is(e2.prevStage);
  3029. if ("aggregate" === t2 && "command" === n2)
  3030. return true;
  3031. e2 = e2.prevStage;
  3032. }
  3033. return false;
  3034. }
  3035. getNextStageFn(e2) {
  3036. const t2 = this;
  3037. return function() {
  3038. return as({ $method: e2, $param: rs(Array.from(arguments)) }, t2, t2._database);
  3039. };
  3040. }
  3041. get count() {
  3042. return this.isAggregate ? this.getNextStageFn("count") : function() {
  3043. return this._send("count", Array.from(arguments));
  3044. };
  3045. }
  3046. get remove() {
  3047. return this.isCommand ? this.getNextStageFn("remove") : function() {
  3048. return this._send("remove", Array.from(arguments));
  3049. };
  3050. }
  3051. get() {
  3052. return this._send("get", Array.from(arguments));
  3053. }
  3054. get add() {
  3055. return this.isCommand ? this.getNextStageFn("add") : function() {
  3056. return this._send("add", Array.from(arguments));
  3057. };
  3058. }
  3059. update() {
  3060. return this._send("update", Array.from(arguments));
  3061. }
  3062. end() {
  3063. return this._send("end", Array.from(arguments));
  3064. }
  3065. get set() {
  3066. return this.isCommand ? this.getNextStageFn("set") : function() {
  3067. throw new Error("JQL禁止使用set方法");
  3068. };
  3069. }
  3070. _send(e2, t2) {
  3071. const n2 = this.getAction(), s2 = this.getCommand();
  3072. if (s2.$db.push({ $method: e2, $param: rs(t2) }), S) {
  3073. const e3 = s2.$db.find((e4) => "collection" === e4.$method), t3 = e3 && e3.$param;
  3074. 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- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  3075. }
  3076. return this._database._callCloudFunction({ action: n2, command: s2 });
  3077. }
  3078. }
  3079. function as(e2, t2, n2) {
  3080. return es$1(new os(e2, t2, n2), { get(e3, t3) {
  3081. let s2 = "db";
  3082. return e3 && e3.content && (s2 = e3.content.$method), ss(s2, t3) ? as({ $method: t3 }, e3, n2) : function() {
  3083. return as({ $method: t3, $param: rs(Array.from(arguments)) }, e3, n2);
  3084. };
  3085. } });
  3086. }
  3087. function cs({ path: e2, method: t2 }) {
  3088. return class {
  3089. constructor() {
  3090. this.param = Array.from(arguments);
  3091. }
  3092. toJSON() {
  3093. return { $newDb: [...e2.map((e3) => ({ $method: e3 })), { $method: t2, $param: this.param }] };
  3094. }
  3095. toString() {
  3096. return JSON.stringify(this.toJSON());
  3097. }
  3098. };
  3099. }
  3100. function us(e2, t2 = {}) {
  3101. return es$1(new e2(t2), { get: (e3, t3) => ss("db", t3) ? as({ $method: t3 }, null, e3) : function() {
  3102. return as({ $method: t3, $param: rs(Array.from(arguments)) }, null, e3);
  3103. } });
  3104. }
  3105. class hs extends class {
  3106. constructor({ uniClient: e2 = {}, isJQL: t2 = false } = {}) {
  3107. this._uniClient = e2, this._authCallBacks = {}, this._dbCallBacks = {}, e2._isDefault && (this._dbCallBacks = R("_globalUniCloudDatabaseCallback")), t2 || (this.auth = ts(this._authCallBacks)), this._isJQL = t2, Object.assign(this, ts(this._dbCallBacks)), this.env = es$1({}, { get: (e3, t3) => ({ $env: t3 }) }), this.Geo = es$1({}, { get: (e3, t3) => cs({ path: ["Geo"], method: t3 }) }), this.serverDate = cs({ path: [], method: "serverDate" }), this.RegExp = cs({ path: [], method: "RegExp" });
  3108. }
  3109. getCloudEnv(e2) {
  3110. if ("string" != typeof e2 || !e2.trim())
  3111. throw new Error("getCloudEnv参数错误");
  3112. return { $env: e2.replace("$cloudEnv_", "") };
  3113. }
  3114. _callback(e2, t2) {
  3115. const n2 = this._dbCallBacks;
  3116. n2[e2] && n2[e2].forEach((e3) => {
  3117. e3(...t2);
  3118. });
  3119. }
  3120. _callbackAuth(e2, t2) {
  3121. const n2 = this._authCallBacks;
  3122. n2[e2] && n2[e2].forEach((e3) => {
  3123. e3(...t2);
  3124. });
  3125. }
  3126. multiSend() {
  3127. const e2 = Array.from(arguments), t2 = e2.map((e3) => {
  3128. const t3 = e3.getAction(), n2 = e3.getCommand();
  3129. if ("getTemp" !== n2.$db[n2.$db.length - 1].$method)
  3130. throw new Error("multiSend只支持子命令内使用getTemp");
  3131. return { action: t3, command: n2 };
  3132. });
  3133. return this._callCloudFunction({ multiCommand: t2, queryList: e2 });
  3134. }
  3135. } {
  3136. _parseResult(e2) {
  3137. return this._isJQL ? e2.result : e2;
  3138. }
  3139. _callCloudFunction({ action: e2, command: t2, multiCommand: n2, queryList: s2 }) {
  3140. function r2(e3, t3) {
  3141. if (n2 && s2)
  3142. for (let n3 = 0; n3 < s2.length; n3++) {
  3143. const r3 = s2[n3];
  3144. r3.udb && "function" == typeof r3.udb.setResult && (t3 ? r3.udb.setResult(t3) : r3.udb.setResult(e3.result.dataList[n3]));
  3145. }
  3146. }
  3147. const i2 = this, o2 = this._isJQL ? "databaseForJQL" : "database";
  3148. function a2(e3) {
  3149. return i2._callback("error", [e3]), K(F(o2, "fail"), e3).then(() => K(F(o2, "complete"), e3)).then(() => (r2(null, e3), X(B, { type: J, content: e3 }), Promise.reject(e3)));
  3150. }
  3151. const c2 = K(F(o2, "invoke")), u2 = this._uniClient;
  3152. return c2.then(() => u2.callFunction({ name: "DCloud-clientDB", type: h, data: { action: e2, command: t2, multiCommand: n2 } })).then((e3) => {
  3153. const { code: t3, message: n3, token: s3, tokenExpired: c3, systemInfo: u3 = [] } = e3.result;
  3154. if (u3)
  3155. for (let e4 = 0; e4 < u3.length; e4++) {
  3156. const { level: t4, message: n4, detail: s4 } = u3[e4], r3 = console["warn" === t4 ? "error" : t4] || console.log;
  3157. let i3 = "[System Info]" + n4;
  3158. s4 && (i3 = `${i3}
  3159. 详细信息:${s4}`), r3(i3);
  3160. }
  3161. if (t3) {
  3162. return a2(new se({ code: t3, message: n3, requestId: e3.requestId }));
  3163. }
  3164. e3.result.errCode = e3.result.errCode || e3.result.code, e3.result.errMsg = e3.result.errMsg || e3.result.message, s3 && c3 && (ae({ token: s3, tokenExpired: c3 }), this._callbackAuth("refreshToken", [{ token: s3, tokenExpired: c3 }]), this._callback("refreshToken", [{ token: s3, tokenExpired: c3 }]), X(H, { token: s3, tokenExpired: c3 }));
  3165. const h2 = [{ prop: "affectedDocs", tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代" }, { prop: "code", tips: "code不再推荐使用,请使用errCode替代" }, { prop: "message", tips: "message不再推荐使用,请使用errMsg替代" }];
  3166. for (let t4 = 0; t4 < h2.length; t4++) {
  3167. const { prop: n4, tips: s4 } = h2[t4];
  3168. if (n4 in e3.result) {
  3169. const t5 = e3.result[n4];
  3170. Object.defineProperty(e3.result, n4, { get: () => (console.warn(s4), t5) });
  3171. }
  3172. }
  3173. return function(e4) {
  3174. return K(F(o2, "success"), e4).then(() => K(F(o2, "complete"), e4)).then(() => {
  3175. r2(e4, null);
  3176. const t4 = i2._parseResult(e4);
  3177. return X(B, { type: J, content: t4 }), Promise.resolve(t4);
  3178. });
  3179. }(e3);
  3180. }, (e3) => {
  3181. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e3.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  3182. return a2(new se({ code: e3.code || "SYSTEM_ERROR", message: e3.message, requestId: e3.requestId }));
  3183. });
  3184. }
  3185. }
  3186. const ls = "token无效,跳转登录页面", ds = "token过期,跳转登录页面", ps = { TOKEN_INVALID_TOKEN_EXPIRED: ds, TOKEN_INVALID_INVALID_CLIENTID: ls, TOKEN_INVALID: ls, TOKEN_INVALID_WRONG_TOKEN: ls, TOKEN_INVALID_ANONYMOUS_USER: ls }, fs = { "uni-id-token-expired": ds, "uni-id-check-token-failed": ls, "uni-id-token-not-exist": ls, "uni-id-check-device-feature-failed": ls };
  3187. function gs(e2, t2) {
  3188. let n2 = "";
  3189. return n2 = e2 ? `${e2}/${t2}` : t2, n2.replace(/^\//, "");
  3190. }
  3191. function ms(e2 = [], t2 = "") {
  3192. const n2 = [], s2 = [];
  3193. return e2.forEach((e3) => {
  3194. true === e3.needLogin ? n2.push(gs(t2, e3.path)) : false === e3.needLogin && s2.push(gs(t2, e3.path));
  3195. }), { needLoginPage: n2, notNeedLoginPage: s2 };
  3196. }
  3197. function ys(e2) {
  3198. return e2.split("?")[0].replace(/^\//, "");
  3199. }
  3200. function _s() {
  3201. return function(e2) {
  3202. let t2 = e2 && e2.$page && e2.$page.fullPath || "";
  3203. return t2 ? ("/" !== t2.charAt(0) && (t2 = "/" + t2), t2) : t2;
  3204. }(function() {
  3205. const e2 = getCurrentPages();
  3206. return e2[e2.length - 1];
  3207. }());
  3208. }
  3209. function ws() {
  3210. return ys(_s());
  3211. }
  3212. function vs(e2 = "", t2 = {}) {
  3213. if (!e2)
  3214. return false;
  3215. if (!(t2 && t2.list && t2.list.length))
  3216. return false;
  3217. const n2 = t2.list, s2 = ys(e2);
  3218. return n2.some((e3) => e3.pagePath === s2);
  3219. }
  3220. const Is = !!e.uniIdRouter;
  3221. const { loginPage: Ss, routerNeedLogin: bs, resToLogin: ks, needLoginPage: Ts, notNeedLoginPage: As, loginPageInTabBar: Ps } = function({ pages: t2 = [], subPackages: n2 = [], uniIdRouter: s2 = {}, tabBar: r2 = {} } = e) {
  3222. const { loginPage: i2, needLogin: o2 = [], resToLogin: a2 = true } = s2, { needLoginPage: c2, notNeedLoginPage: u2 } = ms(t2), { needLoginPage: h2, notNeedLoginPage: l2 } = function(e2 = []) {
  3223. const t3 = [], n3 = [];
  3224. return e2.forEach((e3) => {
  3225. const { root: s3, pages: r3 = [] } = e3, { needLoginPage: i3, notNeedLoginPage: o3 } = ms(r3, s3);
  3226. t3.push(...i3), n3.push(...o3);
  3227. }), { needLoginPage: t3, notNeedLoginPage: n3 };
  3228. }(n2);
  3229. return { loginPage: i2, routerNeedLogin: o2, resToLogin: a2, needLoginPage: [...c2, ...h2], notNeedLoginPage: [...u2, ...l2], loginPageInTabBar: vs(i2, r2) };
  3230. }();
  3231. if (Ts.indexOf(Ss) > -1)
  3232. throw new Error(`Login page [${Ss}] should not be "needLogin", please check your pages.json`);
  3233. function Cs(e2) {
  3234. const t2 = ws();
  3235. if ("/" === e2.charAt(0))
  3236. return e2;
  3237. const [n2, s2] = e2.split("?"), r2 = n2.replace(/^\//, "").split("/"), i2 = t2.split("/");
  3238. i2.pop();
  3239. for (let e3 = 0; e3 < r2.length; e3++) {
  3240. const t3 = r2[e3];
  3241. ".." === t3 ? i2.pop() : "." !== t3 && i2.push(t3);
  3242. }
  3243. return "" === i2[0] && i2.shift(), "/" + i2.join("/") + (s2 ? "?" + s2 : "");
  3244. }
  3245. function xs(e2) {
  3246. const t2 = ys(Cs(e2));
  3247. return !(As.indexOf(t2) > -1) && (Ts.indexOf(t2) > -1 || bs.some((t3) => function(e3, t4) {
  3248. return new RegExp(t4).test(e3);
  3249. }(e2, t3)));
  3250. }
  3251. function Os({ redirect: e2 }) {
  3252. const t2 = ys(e2), n2 = ys(Ss);
  3253. return ws() !== n2 && t2 !== n2;
  3254. }
  3255. function Es({ api: e2, redirect: t2 } = {}) {
  3256. if (!t2 || !Os({ redirect: t2 }))
  3257. return;
  3258. const n2 = function(e3, t3) {
  3259. return "/" !== e3.charAt(0) && (e3 = "/" + e3), t3 ? e3.indexOf("?") > -1 ? e3 + `&uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3 + `?uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3;
  3260. }(Ss, t2);
  3261. Ps ? "navigateTo" !== e2 && "redirectTo" !== e2 || (e2 = "switchTab") : "switchTab" === e2 && (e2 = "navigateTo");
  3262. const s2 = { navigateTo: uni.navigateTo, redirectTo: uni.redirectTo, switchTab: uni.switchTab, reLaunch: uni.reLaunch };
  3263. setTimeout(() => {
  3264. s2[e2]({ url: n2 });
  3265. }, 0);
  3266. }
  3267. function Ls({ url: e2 } = {}) {
  3268. const t2 = { abortLoginPageJump: false, autoToLoginPage: false }, n2 = function() {
  3269. const { token: e3, tokenExpired: t3 } = oe();
  3270. let n3;
  3271. if (e3) {
  3272. if (t3 < Date.now()) {
  3273. const e4 = "uni-id-token-expired";
  3274. n3 = { errCode: e4, errMsg: fs[e4] };
  3275. }
  3276. } else {
  3277. const e4 = "uni-id-check-token-failed";
  3278. n3 = { errCode: e4, errMsg: fs[e4] };
  3279. }
  3280. return n3;
  3281. }();
  3282. if (xs(e2) && n2) {
  3283. n2.uniIdRedirectUrl = e2;
  3284. if (G(W).length > 0)
  3285. return setTimeout(() => {
  3286. X(W, n2);
  3287. }, 0), t2.abortLoginPageJump = true, t2;
  3288. t2.autoToLoginPage = true;
  3289. }
  3290. return t2;
  3291. }
  3292. function Rs() {
  3293. !function() {
  3294. const e3 = _s(), { abortLoginPageJump: t2, autoToLoginPage: n2 } = Ls({ url: e3 });
  3295. t2 || n2 && Es({ api: "redirectTo", redirect: e3 });
  3296. }();
  3297. const e2 = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  3298. for (let t2 = 0; t2 < e2.length; t2++) {
  3299. const n2 = e2[t2];
  3300. uni.addInterceptor(n2, { invoke(e3) {
  3301. const { abortLoginPageJump: t3, autoToLoginPage: s2 } = Ls({ url: e3.url });
  3302. return t3 ? e3 : s2 ? (Es({ api: n2, redirect: Cs(e3.url) }), false) : e3;
  3303. } });
  3304. }
  3305. }
  3306. function Us() {
  3307. this.onResponse((e2) => {
  3308. const { type: t2, content: n2 } = e2;
  3309. let s2 = false;
  3310. switch (t2) {
  3311. case "cloudobject":
  3312. s2 = function(e3) {
  3313. if ("object" != typeof e3)
  3314. return false;
  3315. const { errCode: t3 } = e3 || {};
  3316. return t3 in fs;
  3317. }(n2);
  3318. break;
  3319. case "clientdb":
  3320. s2 = function(e3) {
  3321. if ("object" != typeof e3)
  3322. return false;
  3323. const { errCode: t3 } = e3 || {};
  3324. return t3 in ps;
  3325. }(n2);
  3326. }
  3327. s2 && function(e3 = {}) {
  3328. const t3 = G(W);
  3329. te().then(() => {
  3330. const n3 = _s();
  3331. if (n3 && Os({ redirect: n3 }))
  3332. return t3.length > 0 ? X(W, Object.assign({ uniIdRedirectUrl: n3 }, e3)) : void (Ss && Es({ api: "navigateTo", redirect: n3 }));
  3333. });
  3334. }(n2);
  3335. });
  3336. }
  3337. function Ns(e2) {
  3338. !function(e3) {
  3339. e3.onResponse = function(e4) {
  3340. Y(B, e4);
  3341. }, e3.offResponse = function(e4) {
  3342. Q(B, e4);
  3343. };
  3344. }(e2), function(e3) {
  3345. e3.onNeedLogin = function(e4) {
  3346. Y(W, e4);
  3347. }, e3.offNeedLogin = function(e4) {
  3348. Q(W, e4);
  3349. }, Is && (R("_globalUniCloudStatus").needLoginInit || (R("_globalUniCloudStatus").needLoginInit = true, te().then(() => {
  3350. Rs.call(e3);
  3351. }), ks && Us.call(e3)));
  3352. }(e2), function(e3) {
  3353. e3.onRefreshToken = function(e4) {
  3354. Y(H, e4);
  3355. }, e3.offRefreshToken = function(e4) {
  3356. Q(H, e4);
  3357. };
  3358. }(e2);
  3359. }
  3360. let Ds;
  3361. const Ms = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", qs = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  3362. function Ks() {
  3363. const e2 = oe().token || "", t2 = e2.split(".");
  3364. if (!e2 || 3 !== t2.length)
  3365. return { uid: null, role: [], permission: [], tokenExpired: 0 };
  3366. let n2;
  3367. try {
  3368. n2 = JSON.parse((s2 = t2[1], decodeURIComponent(Ds(s2).split("").map(function(e3) {
  3369. return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2);
  3370. }).join(""))));
  3371. } catch (e3) {
  3372. throw new Error("获取当前用户信息出错,详细错误信息为:" + e3.message);
  3373. }
  3374. var s2;
  3375. return n2.tokenExpired = 1e3 * n2.exp, delete n2.exp, delete n2.iat, n2;
  3376. }
  3377. Ds = "function" != typeof atob ? function(e2) {
  3378. if (e2 = String(e2).replace(/[\t\n\f\r ]+/g, ""), !qs.test(e2))
  3379. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  3380. var t2;
  3381. e2 += "==".slice(2 - (3 & e2.length));
  3382. for (var n2, s2, r2 = "", i2 = 0; i2 < e2.length; )
  3383. t2 = Ms.indexOf(e2.charAt(i2++)) << 18 | Ms.indexOf(e2.charAt(i2++)) << 12 | (n2 = Ms.indexOf(e2.charAt(i2++))) << 6 | (s2 = Ms.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);
  3384. return r2;
  3385. } : atob;
  3386. var Fs = n(function(e2, t2) {
  3387. Object.defineProperty(t2, "__esModule", { value: true });
  3388. const n2 = "chooseAndUploadFile:ok", s2 = "chooseAndUploadFile:fail";
  3389. function r2(e3, t3) {
  3390. return e3.tempFiles.forEach((e4, n3) => {
  3391. 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("."));
  3392. }), e3.tempFilePaths || (e3.tempFilePaths = e3.tempFiles.map((e4) => e4.path)), e3;
  3393. }
  3394. function i2(e3, t3, { onChooseFile: s3, onUploadProgress: r3 }) {
  3395. return t3.then((e4) => {
  3396. if (s3) {
  3397. const t4 = s3(e4);
  3398. if (void 0 !== t4)
  3399. return Promise.resolve(t4).then((t5) => void 0 === t5 ? e4 : t5);
  3400. }
  3401. return e4;
  3402. }).then((t4) => false === t4 ? { errMsg: n2, tempFilePaths: [], tempFiles: [] } : function(e4, t5, s4 = 5, r4) {
  3403. (t5 = Object.assign({}, t5)).errMsg = n2;
  3404. const i3 = t5.tempFiles, o2 = i3.length;
  3405. let a2 = 0;
  3406. return new Promise((n3) => {
  3407. for (; a2 < s4; )
  3408. c2();
  3409. function c2() {
  3410. const s5 = a2++;
  3411. if (s5 >= o2)
  3412. return void (!i3.find((e5) => !e5.url && !e5.errMsg) && n3(t5));
  3413. const u2 = i3[s5];
  3414. e4.uploadFile({ provider: u2.provider, filePath: u2.path, cloudPath: u2.cloudPath, fileType: u2.fileType, cloudPathAsRealPath: u2.cloudPathAsRealPath, onUploadProgress(e5) {
  3415. e5.index = s5, e5.tempFile = u2, e5.tempFilePath = u2.path, r4 && r4(e5);
  3416. } }).then((e5) => {
  3417. u2.url = e5.fileID, s5 < o2 && c2();
  3418. }).catch((e5) => {
  3419. u2.errMsg = e5.errMsg || e5.message, s5 < o2 && c2();
  3420. });
  3421. }
  3422. });
  3423. }(e3, t4, 5, r3));
  3424. }
  3425. t2.initChooseAndUploadFile = function(e3) {
  3426. return function(t3 = { type: "all" }) {
  3427. return "image" === t3.type ? i2(e3, function(e4) {
  3428. const { count: t4, sizeType: n3, sourceType: i3 = ["album", "camera"], extension: o2 } = e4;
  3429. return new Promise((e5, a2) => {
  3430. uni.chooseImage({ count: t4, sizeType: n3, sourceType: i3, extension: o2, success(t5) {
  3431. e5(r2(t5, "image"));
  3432. }, fail(e6) {
  3433. a2({ errMsg: e6.errMsg.replace("chooseImage:fail", s2) });
  3434. } });
  3435. });
  3436. }(t3), t3) : "video" === t3.type ? i2(e3, function(e4) {
  3437. const { camera: t4, compressed: n3, maxDuration: i3, sourceType: o2 = ["album", "camera"], extension: a2 } = e4;
  3438. return new Promise((e5, c2) => {
  3439. uni.chooseVideo({ camera: t4, compressed: n3, maxDuration: i3, sourceType: o2, extension: a2, success(t5) {
  3440. const { tempFilePath: n4, duration: s3, size: i4, height: o3, width: a3 } = t5;
  3441. 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"));
  3442. }, fail(e6) {
  3443. c2({ errMsg: e6.errMsg.replace("chooseVideo:fail", s2) });
  3444. } });
  3445. });
  3446. }(t3), t3) : i2(e3, function(e4) {
  3447. const { count: t4, extension: n3 } = e4;
  3448. return new Promise((e5, i3) => {
  3449. let o2 = uni.chooseFile;
  3450. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o2 = wx.chooseMessageFile), "function" != typeof o2)
  3451. return i3({ errMsg: s2 + " 请指定 type 类型,该平台仅支持选择 image 或 video。" });
  3452. o2({ type: "all", count: t4, extension: n3, success(t5) {
  3453. e5(r2(t5));
  3454. }, fail(e6) {
  3455. i3({ errMsg: e6.errMsg.replace("chooseFile:fail", s2) });
  3456. } });
  3457. });
  3458. }(t3), t3);
  3459. };
  3460. };
  3461. }), js = t$2(Fs);
  3462. const $s = "manual";
  3463. function Bs(e2) {
  3464. 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() {
  3465. this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(() => {
  3466. var e3 = [];
  3467. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach((t2) => {
  3468. e3.push(this[t2]);
  3469. }), e3;
  3470. }, (e3, t2) => {
  3471. if (this.loadtime === $s)
  3472. return;
  3473. let n2 = false;
  3474. const s2 = [];
  3475. for (let r2 = 2; r2 < e3.length; r2++)
  3476. e3[r2] !== t2[r2] && (s2.push(e3[r2]), n2 = true);
  3477. e3[0] !== t2[0] && (this.mixinDatacomPage.current = this.pageCurrent), this.mixinDatacomPage.size = this.pageSize, this.onMixinDatacomPropsChange(n2, s2);
  3478. });
  3479. }, methods: { onMixinDatacomPropsChange(e3, t2) {
  3480. }, mixinDatacomEasyGet({ getone: e3 = false, success: t2, fail: n2 } = {}) {
  3481. this.mixinDatacomLoading || (this.mixinDatacomLoading = true, this.mixinDatacomErrorMessage = "", this.mixinDatacomError = null, this.mixinDatacomGet().then((n3) => {
  3482. this.mixinDatacomLoading = false;
  3483. const { data: s2, count: r2 } = n3.result;
  3484. this.getcount && (this.mixinDatacomPage.count = r2), this.mixinDatacomHasMore = s2.length < this.pageSize;
  3485. const i2 = e3 ? s2.length ? s2[0] : void 0 : s2;
  3486. this.mixinDatacomResData = i2, t2 && t2(i2);
  3487. }).catch((e4) => {
  3488. this.mixinDatacomLoading = false, this.mixinDatacomErrorMessage = e4, this.mixinDatacomError = e4, n2 && n2(e4);
  3489. }));
  3490. }, mixinDatacomGet(t2 = {}) {
  3491. let n2;
  3492. t2 = t2 || {}, n2 = "undefined" != typeof __uniX && __uniX ? e2.databaseForJQL(this.spaceInfo) : e2.database(this.spaceInfo);
  3493. const s2 = t2.action || this.action;
  3494. s2 && (n2 = n2.action(s2));
  3495. const r2 = t2.collection || this.collection;
  3496. n2 = Array.isArray(r2) ? n2.collection(...r2) : n2.collection(r2);
  3497. const i2 = t2.where || this.where;
  3498. i2 && Object.keys(i2).length && (n2 = n2.where(i2));
  3499. const o2 = t2.field || this.field;
  3500. o2 && (n2 = n2.field(o2));
  3501. const a2 = t2.foreignKey || this.foreignKey;
  3502. a2 && (n2 = n2.foreignKey(a2));
  3503. const c2 = t2.groupby || this.groupby;
  3504. c2 && (n2 = n2.groupBy(c2));
  3505. const u2 = t2.groupField || this.groupField;
  3506. u2 && (n2 = n2.groupField(u2));
  3507. true === (void 0 !== t2.distinct ? t2.distinct : this.distinct) && (n2 = n2.distinct());
  3508. const h2 = t2.orderby || this.orderby;
  3509. h2 && (n2 = n2.orderBy(h2));
  3510. 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 };
  3511. return f2 && (m2.getTree = y2), g2 && (m2.getTreePath = y2), n2 = n2.skip(d2 * (l2 - 1)).limit(d2).get(m2), n2;
  3512. } } };
  3513. }
  3514. function Ws(e2) {
  3515. return function(t2, n2 = {}) {
  3516. n2 = function(e3, t3 = {}) {
  3517. 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;
  3518. }({ customUI: false, loadingOptions: { title: "加载中...", mask: true }, errorOptions: { type: "modal", retry: false } }, n2);
  3519. const { customUI: s2, loadingOptions: r2, errorOptions: i2, parseSystemError: o2 } = n2, a2 = !s2;
  3520. return new Proxy({}, { get(s3, c2) {
  3521. switch (c2) {
  3522. case "toString":
  3523. return "[object UniCloudObject]";
  3524. case "toJSON":
  3525. return {};
  3526. }
  3527. return function({ fn: e3, interceptorName: t3, getCallbackArgs: n3 } = {}) {
  3528. return async function(...s4) {
  3529. const r3 = n3 ? n3({ params: s4 }) : {};
  3530. let i3, o3;
  3531. try {
  3532. return await K(F(t3, "invoke"), { ...r3 }), i3 = await e3(...s4), await K(F(t3, "success"), { ...r3, result: i3 }), i3;
  3533. } catch (e4) {
  3534. throw o3 = e4, await K(F(t3, "fail"), { ...r3, error: o3 }), o3;
  3535. } finally {
  3536. await K(F(t3, "complete"), o3 ? { ...r3, error: o3 } : { ...r3, result: i3 });
  3537. }
  3538. };
  3539. }({ fn: async function s4(...h2) {
  3540. let l2;
  3541. a2 && uni.showLoading({ title: r2.title, mask: r2.mask });
  3542. const d2 = { name: t2, type: u, data: { method: c2, params: h2 } };
  3543. "object" == typeof n2.secretMethods && function(e3, t3) {
  3544. const n3 = t3.data.method, s5 = e3.secretMethods || {}, r3 = s5[n3] || s5["*"];
  3545. r3 && (t3.secretType = r3);
  3546. }(n2, d2);
  3547. let p2 = false;
  3548. try {
  3549. l2 = await e2.callFunction(d2);
  3550. } catch (e3) {
  3551. p2 = true, l2 = { result: new se(e3) };
  3552. }
  3553. const { errSubject: f2, errCode: g2, errMsg: m2, newToken: y2 } = l2.result || {};
  3554. if (a2 && uni.hideLoading(), y2 && y2.token && y2.tokenExpired && (ae(y2), X(H, { ...y2 })), g2) {
  3555. let e3 = m2;
  3556. if (p2 && o2) {
  3557. e3 = (await o2({ objectName: t2, methodName: c2, params: h2, errSubject: f2, errCode: g2, errMsg: m2 })).errMsg || m2;
  3558. }
  3559. if (a2)
  3560. if ("toast" === i2.type)
  3561. uni.showToast({ title: e3, icon: "none" });
  3562. else {
  3563. if ("modal" !== i2.type)
  3564. throw new Error(`Invalid errorOptions.type: ${i2.type}`);
  3565. {
  3566. const { confirm: t3 } = await async function({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3 } = {}) {
  3567. return new Promise((i3, o3) => {
  3568. uni.showModal({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3, success(e5) {
  3569. i3(e5);
  3570. }, fail() {
  3571. i3({ confirm: false, cancel: true });
  3572. } });
  3573. });
  3574. }({ title: "提示", content: e3, showCancel: i2.retry, cancelText: "取消", confirmText: i2.retry ? "重试" : "确定" });
  3575. if (i2.retry && t3)
  3576. return s4(...h2);
  3577. }
  3578. }
  3579. const n3 = new se({ subject: f2, code: g2, message: m2, requestId: l2.requestId });
  3580. throw n3.detail = l2.result, X(B, { type: V, content: n3 }), n3;
  3581. }
  3582. return X(B, { type: V, content: l2.result }), l2.result;
  3583. }, interceptorName: "callObject", getCallbackArgs: function({ params: e3 } = {}) {
  3584. return { objectName: t2, methodName: c2, params: e3 };
  3585. } });
  3586. } });
  3587. };
  3588. }
  3589. function Hs(e2) {
  3590. return R("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e2.config.spaceId));
  3591. }
  3592. async function Js({ openid: e2, callLoginByWeixin: t2 = false } = {}) {
  3593. Hs(this);
  3594. throw new Error(`[SecureNetwork] API \`initSecureNetworkByWeixin\` is not supported on platform \`${A}\``);
  3595. }
  3596. async function zs(e2) {
  3597. const t2 = Hs(this);
  3598. return t2.initPromise || (t2.initPromise = Js.call(this, e2).then((e3) => e3).catch((e3) => {
  3599. throw delete t2.initPromise, e3;
  3600. })), t2.initPromise;
  3601. }
  3602. function Vs(e2) {
  3603. return function({ openid: t2, callLoginByWeixin: n2 = false } = {}) {
  3604. return zs.call(e2, { openid: t2, callLoginByWeixin: n2 });
  3605. };
  3606. }
  3607. function Gs(e2) {
  3608. !function(e3) {
  3609. de = e3;
  3610. }(e2);
  3611. }
  3612. function Ys(e2) {
  3613. const t2 = { getSystemInfo: uni.getSystemInfo, getPushClientId: uni.getPushClientId };
  3614. return function(n2) {
  3615. return new Promise((s2, r2) => {
  3616. t2[e2]({ ...n2, success(e3) {
  3617. s2(e3);
  3618. }, fail(e3) {
  3619. r2(e3);
  3620. } });
  3621. });
  3622. };
  3623. }
  3624. class Qs extends class {
  3625. constructor() {
  3626. this._callback = {};
  3627. }
  3628. addListener(e2, t2) {
  3629. this._callback[e2] || (this._callback[e2] = []), this._callback[e2].push(t2);
  3630. }
  3631. on(e2, t2) {
  3632. return this.addListener(e2, t2);
  3633. }
  3634. removeListener(e2, t2) {
  3635. if (!t2)
  3636. throw new Error('The "listener" argument must be of type function. Received undefined');
  3637. const n2 = this._callback[e2];
  3638. if (!n2)
  3639. return;
  3640. const s2 = function(e3, t3) {
  3641. for (let n3 = e3.length - 1; n3 >= 0; n3--)
  3642. if (e3[n3] === t3)
  3643. return n3;
  3644. return -1;
  3645. }(n2, t2);
  3646. n2.splice(s2, 1);
  3647. }
  3648. off(e2, t2) {
  3649. return this.removeListener(e2, t2);
  3650. }
  3651. removeAllListener(e2) {
  3652. delete this._callback[e2];
  3653. }
  3654. emit(e2, ...t2) {
  3655. const n2 = this._callback[e2];
  3656. if (n2)
  3657. for (let e3 = 0; e3 < n2.length; e3++)
  3658. n2[e3](...t2);
  3659. }
  3660. } {
  3661. constructor() {
  3662. super(), this._uniPushMessageCallback = this._receivePushMessage.bind(this), this._currentMessageId = -1, this._payloadQueue = [];
  3663. }
  3664. init() {
  3665. return Promise.all([Ys("getSystemInfo")(), Ys("getPushClientId")()]).then(([{ appId: e2 } = {}, { cid: t2 } = {}] = []) => {
  3666. if (!e2)
  3667. throw new Error("Invalid appId, please check the manifest.json file");
  3668. if (!t2)
  3669. throw new Error("Invalid push client id");
  3670. this._appId = e2, this._pushClientId = t2, this._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), this.emit("open"), this._initMessageListener();
  3671. }, (e2) => {
  3672. throw this.emit("error", e2), this.close(), e2;
  3673. });
  3674. }
  3675. async open() {
  3676. return this.init();
  3677. }
  3678. _isUniCloudSSE(e2) {
  3679. if ("receive" !== e2.type)
  3680. return false;
  3681. const t2 = e2 && e2.data && e2.data.payload;
  3682. return !(!t2 || "UNI_CLOUD_SSE" !== t2.channel || t2.seqId !== this._seqId);
  3683. }
  3684. _receivePushMessage(e2) {
  3685. if (!this._isUniCloudSSE(e2))
  3686. return;
  3687. const t2 = e2 && e2.data && e2.data.payload, { action: n2, messageId: s2, message: r2 } = t2;
  3688. this._payloadQueue.push({ action: n2, messageId: s2, message: r2 }), this._consumMessage();
  3689. }
  3690. _consumMessage() {
  3691. for (; ; ) {
  3692. const e2 = this._payloadQueue.find((e3) => e3.messageId === this._currentMessageId + 1);
  3693. if (!e2)
  3694. break;
  3695. this._currentMessageId++, this._parseMessagePayload(e2);
  3696. }
  3697. }
  3698. _parseMessagePayload(e2) {
  3699. const { action: t2, messageId: n2, message: s2 } = e2;
  3700. "end" === t2 ? this._end({ messageId: n2, message: s2 }) : "message" === t2 && this._appendMessage({ messageId: n2, message: s2 });
  3701. }
  3702. _appendMessage({ messageId: e2, message: t2 } = {}) {
  3703. this.emit("message", t2);
  3704. }
  3705. _end({ messageId: e2, message: t2 } = {}) {
  3706. this.emit("end", t2), this.close();
  3707. }
  3708. _initMessageListener() {
  3709. uni.onPushMessage(this._uniPushMessageCallback);
  3710. }
  3711. _destroy() {
  3712. uni.offPushMessage(this._uniPushMessageCallback);
  3713. }
  3714. toJSON() {
  3715. return { appId: this._appId, pushClientId: this._pushClientId, seqId: this._seqId };
  3716. }
  3717. close() {
  3718. this._destroy(), this.emit("close");
  3719. }
  3720. }
  3721. async function Xs(e2) {
  3722. {
  3723. const { osName: e3, osVersion: t3 } = he();
  3724. "ios" === e3 && function(e4) {
  3725. if (!e4 || "string" != typeof e4)
  3726. return 0;
  3727. const t4 = e4.match(/^(\d+)./);
  3728. return t4 && t4[1] ? parseInt(t4[1]) : 0;
  3729. }(t3) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发期间需要,发行后不需要)");
  3730. }
  3731. const t2 = e2.__dev__;
  3732. if (!t2.debugInfo)
  3733. return;
  3734. const { address: n2, servePort: s2 } = t2.debugInfo, { address: r2 } = await Et(n2, s2);
  3735. if (r2)
  3736. return t2.localAddress = r2, void (t2.localPort = s2);
  3737. const i2 = console["error"];
  3738. let o2 = "";
  3739. 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 === A.indexOf("mp-") && (o2 += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t2.debugInfo.forceRemote)
  3740. throw new Error(o2);
  3741. i2(o2);
  3742. }
  3743. function Zs(e2) {
  3744. e2._initPromiseHub || (e2._initPromiseHub = new v({ createPromise: function() {
  3745. let t2 = Promise.resolve();
  3746. var n2;
  3747. n2 = 1, t2 = new Promise((e3) => {
  3748. setTimeout(() => {
  3749. e3();
  3750. }, n2);
  3751. });
  3752. const s2 = e2.auth();
  3753. return t2.then(() => s2.getLoginState()).then((e3) => e3 ? Promise.resolve() : s2.signInAnonymously());
  3754. } }));
  3755. }
  3756. const er = { tcb: xt, tencent: xt, aliyun: me, private: Ut, dcloud: Ut, alipay: Wt };
  3757. let tr = new class {
  3758. init(e2) {
  3759. let t2 = {};
  3760. const n2 = er[e2.provider];
  3761. if (!n2)
  3762. throw new Error("未提供正确的provider参数");
  3763. t2 = n2.init(e2), function(e3) {
  3764. const t3 = {};
  3765. e3.__dev__ = t3, t3.debugLog = "app" === A;
  3766. const n3 = P;
  3767. n3 && !n3.code && (t3.debugInfo = n3);
  3768. const s2 = new v({ createPromise: function() {
  3769. return Xs(e3);
  3770. } });
  3771. t3.initLocalNetwork = function() {
  3772. return s2.exec();
  3773. };
  3774. }(t2), Zs(t2), Xn(t2), function(e3) {
  3775. const t3 = e3.uploadFile;
  3776. e3.uploadFile = function(e4) {
  3777. return t3.call(this, e4);
  3778. };
  3779. }(t2), function(e3) {
  3780. e3.database = function(t3) {
  3781. if (t3 && Object.keys(t3).length > 0)
  3782. return e3.init(t3).database();
  3783. if (this._database)
  3784. return this._database;
  3785. const n3 = us(hs, { uniClient: e3 });
  3786. return this._database = n3, n3;
  3787. }, e3.databaseForJQL = function(t3) {
  3788. if (t3 && Object.keys(t3).length > 0)
  3789. return e3.init(t3).databaseForJQL();
  3790. if (this._databaseForJQL)
  3791. return this._databaseForJQL;
  3792. const n3 = us(hs, { uniClient: e3, isJQL: true });
  3793. return this._databaseForJQL = n3, n3;
  3794. };
  3795. }(t2), function(e3) {
  3796. e3.getCurrentUserInfo = Ks, e3.chooseAndUploadFile = js.initChooseAndUploadFile(e3), Object.assign(e3, { get mixinDatacom() {
  3797. return Bs(e3);
  3798. } }), e3.SSEChannel = Qs, e3.initSecureNetworkByWeixin = Vs(e3), e3.setCustomClientInfo = Gs, e3.importObject = Ws(e3);
  3799. }(t2);
  3800. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach((e3) => {
  3801. if (!t2[e3])
  3802. return;
  3803. const n3 = t2[e3];
  3804. t2[e3] = function() {
  3805. return n3.apply(t2, Array.from(arguments));
  3806. }, t2[e3] = (/* @__PURE__ */ function(e4, t3) {
  3807. return function(n4) {
  3808. let s2 = false;
  3809. if ("callFunction" === t3) {
  3810. const e5 = n4 && n4.type || c;
  3811. s2 = e5 !== c;
  3812. }
  3813. const r2 = "callFunction" === t3 && !s2, i2 = this._initPromiseHub.exec();
  3814. n4 = n4 || {};
  3815. const { success: o2, fail: a2, complete: u2 } = ne(n4), h2 = i2.then(() => s2 ? Promise.resolve() : K(F(t3, "invoke"), n4)).then(() => e4.call(this, n4)).then((e5) => s2 ? Promise.resolve(e5) : K(F(t3, "success"), e5).then(() => K(F(t3, "complete"), e5)).then(() => (r2 && X(B, { type: z, content: e5 }), Promise.resolve(e5))), (e5) => s2 ? Promise.reject(e5) : K(F(t3, "fail"), e5).then(() => K(F(t3, "complete"), e5)).then(() => (X(B, { type: z, content: e5 }), Promise.reject(e5))));
  3816. if (!(o2 || a2 || u2))
  3817. return h2;
  3818. h2.then((e5) => {
  3819. o2 && o2(e5), u2 && u2(e5), r2 && X(B, { type: z, content: e5 });
  3820. }, (e5) => {
  3821. a2 && a2(e5), u2 && u2(e5), r2 && X(B, { type: z, content: e5 });
  3822. });
  3823. };
  3824. }(t2[e3], e3)).bind(t2);
  3825. }), t2.init = this.init, t2;
  3826. }
  3827. }();
  3828. (() => {
  3829. const e2 = C;
  3830. let t2 = {};
  3831. if (e2 && 1 === e2.length)
  3832. t2 = e2[0], tr = tr.init(t2), tr._isDefault = true;
  3833. else {
  3834. const t3 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  3835. let n2;
  3836. n2 = e2 && e2.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : "应用未关联服务空间,请在uniCloud目录右键关联服务空间", t3.forEach((e3) => {
  3837. tr[e3] = function() {
  3838. return console.error(n2), Promise.reject(new se({ code: "SYS_ERR", message: n2 }));
  3839. };
  3840. });
  3841. }
  3842. if (Object.assign(tr, { get mixinDatacom() {
  3843. return Bs(tr);
  3844. } }), Ns(tr), tr.addInterceptor = M, tr.removeInterceptor = q, tr.interceptObject = j, uni.__uniCloud = tr, "app" === A) {
  3845. const e3 = U();
  3846. e3.uniCloud = tr, e3.UniCloudError = se;
  3847. }
  3848. })();
  3849. var nr = tr;
  3850. const fontData = [
  3851. {
  3852. "font_class": "arrow-down",
  3853. "unicode": ""
  3854. },
  3855. {
  3856. "font_class": "arrow-left",
  3857. "unicode": ""
  3858. },
  3859. {
  3860. "font_class": "arrow-right",
  3861. "unicode": ""
  3862. },
  3863. {
  3864. "font_class": "arrow-up",
  3865. "unicode": ""
  3866. },
  3867. {
  3868. "font_class": "auth",
  3869. "unicode": ""
  3870. },
  3871. {
  3872. "font_class": "auth-filled",
  3873. "unicode": ""
  3874. },
  3875. {
  3876. "font_class": "back",
  3877. "unicode": ""
  3878. },
  3879. {
  3880. "font_class": "bars",
  3881. "unicode": ""
  3882. },
  3883. {
  3884. "font_class": "calendar",
  3885. "unicode": ""
  3886. },
  3887. {
  3888. "font_class": "calendar-filled",
  3889. "unicode": ""
  3890. },
  3891. {
  3892. "font_class": "camera",
  3893. "unicode": ""
  3894. },
  3895. {
  3896. "font_class": "camera-filled",
  3897. "unicode": ""
  3898. },
  3899. {
  3900. "font_class": "cart",
  3901. "unicode": ""
  3902. },
  3903. {
  3904. "font_class": "cart-filled",
  3905. "unicode": ""
  3906. },
  3907. {
  3908. "font_class": "chat",
  3909. "unicode": ""
  3910. },
  3911. {
  3912. "font_class": "chat-filled",
  3913. "unicode": ""
  3914. },
  3915. {
  3916. "font_class": "chatboxes",
  3917. "unicode": ""
  3918. },
  3919. {
  3920. "font_class": "chatboxes-filled",
  3921. "unicode": ""
  3922. },
  3923. {
  3924. "font_class": "chatbubble",
  3925. "unicode": ""
  3926. },
  3927. {
  3928. "font_class": "chatbubble-filled",
  3929. "unicode": ""
  3930. },
  3931. {
  3932. "font_class": "checkbox",
  3933. "unicode": ""
  3934. },
  3935. {
  3936. "font_class": "checkbox-filled",
  3937. "unicode": ""
  3938. },
  3939. {
  3940. "font_class": "checkmarkempty",
  3941. "unicode": ""
  3942. },
  3943. {
  3944. "font_class": "circle",
  3945. "unicode": ""
  3946. },
  3947. {
  3948. "font_class": "circle-filled",
  3949. "unicode": ""
  3950. },
  3951. {
  3952. "font_class": "clear",
  3953. "unicode": ""
  3954. },
  3955. {
  3956. "font_class": "close",
  3957. "unicode": ""
  3958. },
  3959. {
  3960. "font_class": "closeempty",
  3961. "unicode": ""
  3962. },
  3963. {
  3964. "font_class": "cloud-download",
  3965. "unicode": ""
  3966. },
  3967. {
  3968. "font_class": "cloud-download-filled",
  3969. "unicode": ""
  3970. },
  3971. {
  3972. "font_class": "cloud-upload",
  3973. "unicode": ""
  3974. },
  3975. {
  3976. "font_class": "cloud-upload-filled",
  3977. "unicode": ""
  3978. },
  3979. {
  3980. "font_class": "color",
  3981. "unicode": ""
  3982. },
  3983. {
  3984. "font_class": "color-filled",
  3985. "unicode": ""
  3986. },
  3987. {
  3988. "font_class": "compose",
  3989. "unicode": ""
  3990. },
  3991. {
  3992. "font_class": "contact",
  3993. "unicode": ""
  3994. },
  3995. {
  3996. "font_class": "contact-filled",
  3997. "unicode": ""
  3998. },
  3999. {
  4000. "font_class": "down",
  4001. "unicode": ""
  4002. },
  4003. {
  4004. "font_class": "bottom",
  4005. "unicode": ""
  4006. },
  4007. {
  4008. "font_class": "download",
  4009. "unicode": ""
  4010. },
  4011. {
  4012. "font_class": "download-filled",
  4013. "unicode": ""
  4014. },
  4015. {
  4016. "font_class": "email",
  4017. "unicode": ""
  4018. },
  4019. {
  4020. "font_class": "email-filled",
  4021. "unicode": ""
  4022. },
  4023. {
  4024. "font_class": "eye",
  4025. "unicode": ""
  4026. },
  4027. {
  4028. "font_class": "eye-filled",
  4029. "unicode": ""
  4030. },
  4031. {
  4032. "font_class": "eye-slash",
  4033. "unicode": ""
  4034. },
  4035. {
  4036. "font_class": "eye-slash-filled",
  4037. "unicode": ""
  4038. },
  4039. {
  4040. "font_class": "fire",
  4041. "unicode": ""
  4042. },
  4043. {
  4044. "font_class": "fire-filled",
  4045. "unicode": ""
  4046. },
  4047. {
  4048. "font_class": "flag",
  4049. "unicode": ""
  4050. },
  4051. {
  4052. "font_class": "flag-filled",
  4053. "unicode": ""
  4054. },
  4055. {
  4056. "font_class": "folder-add",
  4057. "unicode": ""
  4058. },
  4059. {
  4060. "font_class": "folder-add-filled",
  4061. "unicode": ""
  4062. },
  4063. {
  4064. "font_class": "font",
  4065. "unicode": ""
  4066. },
  4067. {
  4068. "font_class": "forward",
  4069. "unicode": ""
  4070. },
  4071. {
  4072. "font_class": "gear",
  4073. "unicode": ""
  4074. },
  4075. {
  4076. "font_class": "gear-filled",
  4077. "unicode": ""
  4078. },
  4079. {
  4080. "font_class": "gift",
  4081. "unicode": ""
  4082. },
  4083. {
  4084. "font_class": "gift-filled",
  4085. "unicode": ""
  4086. },
  4087. {
  4088. "font_class": "hand-down",
  4089. "unicode": ""
  4090. },
  4091. {
  4092. "font_class": "hand-down-filled",
  4093. "unicode": ""
  4094. },
  4095. {
  4096. "font_class": "hand-up",
  4097. "unicode": ""
  4098. },
  4099. {
  4100. "font_class": "hand-up-filled",
  4101. "unicode": ""
  4102. },
  4103. {
  4104. "font_class": "headphones",
  4105. "unicode": ""
  4106. },
  4107. {
  4108. "font_class": "heart",
  4109. "unicode": ""
  4110. },
  4111. {
  4112. "font_class": "heart-filled",
  4113. "unicode": ""
  4114. },
  4115. {
  4116. "font_class": "help",
  4117. "unicode": ""
  4118. },
  4119. {
  4120. "font_class": "help-filled",
  4121. "unicode": ""
  4122. },
  4123. {
  4124. "font_class": "home",
  4125. "unicode": ""
  4126. },
  4127. {
  4128. "font_class": "home-filled",
  4129. "unicode": ""
  4130. },
  4131. {
  4132. "font_class": "image",
  4133. "unicode": ""
  4134. },
  4135. {
  4136. "font_class": "image-filled",
  4137. "unicode": ""
  4138. },
  4139. {
  4140. "font_class": "images",
  4141. "unicode": ""
  4142. },
  4143. {
  4144. "font_class": "images-filled",
  4145. "unicode": ""
  4146. },
  4147. {
  4148. "font_class": "info",
  4149. "unicode": ""
  4150. },
  4151. {
  4152. "font_class": "info-filled",
  4153. "unicode": ""
  4154. },
  4155. {
  4156. "font_class": "left",
  4157. "unicode": ""
  4158. },
  4159. {
  4160. "font_class": "link",
  4161. "unicode": ""
  4162. },
  4163. {
  4164. "font_class": "list",
  4165. "unicode": ""
  4166. },
  4167. {
  4168. "font_class": "location",
  4169. "unicode": ""
  4170. },
  4171. {
  4172. "font_class": "location-filled",
  4173. "unicode": ""
  4174. },
  4175. {
  4176. "font_class": "locked",
  4177. "unicode": ""
  4178. },
  4179. {
  4180. "font_class": "locked-filled",
  4181. "unicode": ""
  4182. },
  4183. {
  4184. "font_class": "loop",
  4185. "unicode": ""
  4186. },
  4187. {
  4188. "font_class": "mail-open",
  4189. "unicode": ""
  4190. },
  4191. {
  4192. "font_class": "mail-open-filled",
  4193. "unicode": ""
  4194. },
  4195. {
  4196. "font_class": "map",
  4197. "unicode": ""
  4198. },
  4199. {
  4200. "font_class": "map-filled",
  4201. "unicode": ""
  4202. },
  4203. {
  4204. "font_class": "map-pin",
  4205. "unicode": ""
  4206. },
  4207. {
  4208. "font_class": "map-pin-ellipse",
  4209. "unicode": ""
  4210. },
  4211. {
  4212. "font_class": "medal",
  4213. "unicode": ""
  4214. },
  4215. {
  4216. "font_class": "medal-filled",
  4217. "unicode": ""
  4218. },
  4219. {
  4220. "font_class": "mic",
  4221. "unicode": ""
  4222. },
  4223. {
  4224. "font_class": "mic-filled",
  4225. "unicode": ""
  4226. },
  4227. {
  4228. "font_class": "micoff",
  4229. "unicode": ""
  4230. },
  4231. {
  4232. "font_class": "micoff-filled",
  4233. "unicode": ""
  4234. },
  4235. {
  4236. "font_class": "minus",
  4237. "unicode": ""
  4238. },
  4239. {
  4240. "font_class": "minus-filled",
  4241. "unicode": ""
  4242. },
  4243. {
  4244. "font_class": "more",
  4245. "unicode": ""
  4246. },
  4247. {
  4248. "font_class": "more-filled",
  4249. "unicode": ""
  4250. },
  4251. {
  4252. "font_class": "navigate",
  4253. "unicode": ""
  4254. },
  4255. {
  4256. "font_class": "navigate-filled",
  4257. "unicode": ""
  4258. },
  4259. {
  4260. "font_class": "notification",
  4261. "unicode": ""
  4262. },
  4263. {
  4264. "font_class": "notification-filled",
  4265. "unicode": ""
  4266. },
  4267. {
  4268. "font_class": "paperclip",
  4269. "unicode": ""
  4270. },
  4271. {
  4272. "font_class": "paperplane",
  4273. "unicode": ""
  4274. },
  4275. {
  4276. "font_class": "paperplane-filled",
  4277. "unicode": ""
  4278. },
  4279. {
  4280. "font_class": "person",
  4281. "unicode": ""
  4282. },
  4283. {
  4284. "font_class": "person-filled",
  4285. "unicode": ""
  4286. },
  4287. {
  4288. "font_class": "personadd",
  4289. "unicode": ""
  4290. },
  4291. {
  4292. "font_class": "personadd-filled",
  4293. "unicode": ""
  4294. },
  4295. {
  4296. "font_class": "personadd-filled-copy",
  4297. "unicode": ""
  4298. },
  4299. {
  4300. "font_class": "phone",
  4301. "unicode": ""
  4302. },
  4303. {
  4304. "font_class": "phone-filled",
  4305. "unicode": ""
  4306. },
  4307. {
  4308. "font_class": "plus",
  4309. "unicode": ""
  4310. },
  4311. {
  4312. "font_class": "plus-filled",
  4313. "unicode": ""
  4314. },
  4315. {
  4316. "font_class": "plusempty",
  4317. "unicode": ""
  4318. },
  4319. {
  4320. "font_class": "pulldown",
  4321. "unicode": ""
  4322. },
  4323. {
  4324. "font_class": "pyq",
  4325. "unicode": ""
  4326. },
  4327. {
  4328. "font_class": "qq",
  4329. "unicode": ""
  4330. },
  4331. {
  4332. "font_class": "redo",
  4333. "unicode": ""
  4334. },
  4335. {
  4336. "font_class": "redo-filled",
  4337. "unicode": ""
  4338. },
  4339. {
  4340. "font_class": "refresh",
  4341. "unicode": ""
  4342. },
  4343. {
  4344. "font_class": "refresh-filled",
  4345. "unicode": ""
  4346. },
  4347. {
  4348. "font_class": "refreshempty",
  4349. "unicode": ""
  4350. },
  4351. {
  4352. "font_class": "reload",
  4353. "unicode": ""
  4354. },
  4355. {
  4356. "font_class": "right",
  4357. "unicode": ""
  4358. },
  4359. {
  4360. "font_class": "scan",
  4361. "unicode": ""
  4362. },
  4363. {
  4364. "font_class": "search",
  4365. "unicode": ""
  4366. },
  4367. {
  4368. "font_class": "settings",
  4369. "unicode": ""
  4370. },
  4371. {
  4372. "font_class": "settings-filled",
  4373. "unicode": ""
  4374. },
  4375. {
  4376. "font_class": "shop",
  4377. "unicode": ""
  4378. },
  4379. {
  4380. "font_class": "shop-filled",
  4381. "unicode": ""
  4382. },
  4383. {
  4384. "font_class": "smallcircle",
  4385. "unicode": ""
  4386. },
  4387. {
  4388. "font_class": "smallcircle-filled",
  4389. "unicode": ""
  4390. },
  4391. {
  4392. "font_class": "sound",
  4393. "unicode": ""
  4394. },
  4395. {
  4396. "font_class": "sound-filled",
  4397. "unicode": ""
  4398. },
  4399. {
  4400. "font_class": "spinner-cycle",
  4401. "unicode": ""
  4402. },
  4403. {
  4404. "font_class": "staff",
  4405. "unicode": ""
  4406. },
  4407. {
  4408. "font_class": "staff-filled",
  4409. "unicode": ""
  4410. },
  4411. {
  4412. "font_class": "star",
  4413. "unicode": ""
  4414. },
  4415. {
  4416. "font_class": "star-filled",
  4417. "unicode": ""
  4418. },
  4419. {
  4420. "font_class": "starhalf",
  4421. "unicode": ""
  4422. },
  4423. {
  4424. "font_class": "trash",
  4425. "unicode": ""
  4426. },
  4427. {
  4428. "font_class": "trash-filled",
  4429. "unicode": ""
  4430. },
  4431. {
  4432. "font_class": "tune",
  4433. "unicode": ""
  4434. },
  4435. {
  4436. "font_class": "tune-filled",
  4437. "unicode": ""
  4438. },
  4439. {
  4440. "font_class": "undo",
  4441. "unicode": ""
  4442. },
  4443. {
  4444. "font_class": "undo-filled",
  4445. "unicode": ""
  4446. },
  4447. {
  4448. "font_class": "up",
  4449. "unicode": ""
  4450. },
  4451. {
  4452. "font_class": "top",
  4453. "unicode": ""
  4454. },
  4455. {
  4456. "font_class": "upload",
  4457. "unicode": ""
  4458. },
  4459. {
  4460. "font_class": "upload-filled",
  4461. "unicode": ""
  4462. },
  4463. {
  4464. "font_class": "videocam",
  4465. "unicode": ""
  4466. },
  4467. {
  4468. "font_class": "videocam-filled",
  4469. "unicode": ""
  4470. },
  4471. {
  4472. "font_class": "vip",
  4473. "unicode": ""
  4474. },
  4475. {
  4476. "font_class": "vip-filled",
  4477. "unicode": ""
  4478. },
  4479. {
  4480. "font_class": "wallet",
  4481. "unicode": ""
  4482. },
  4483. {
  4484. "font_class": "wallet-filled",
  4485. "unicode": ""
  4486. },
  4487. {
  4488. "font_class": "weibo",
  4489. "unicode": ""
  4490. },
  4491. {
  4492. "font_class": "weixin",
  4493. "unicode": ""
  4494. }
  4495. ];
  4496. const getVal = (val) => {
  4497. const reg = /^[0-9]*$/g;
  4498. return typeof val === "number" || reg.test(val) ? val + "px" : val;
  4499. };
  4500. const _sfc_main$e = {
  4501. name: "UniIcons",
  4502. emits: ["click"],
  4503. props: {
  4504. type: {
  4505. type: String,
  4506. default: ""
  4507. },
  4508. color: {
  4509. type: String,
  4510. default: "#333333"
  4511. },
  4512. size: {
  4513. type: [Number, String],
  4514. default: 16
  4515. },
  4516. customPrefix: {
  4517. type: String,
  4518. default: ""
  4519. },
  4520. fontFamily: {
  4521. type: String,
  4522. default: ""
  4523. }
  4524. },
  4525. data() {
  4526. return {
  4527. icons: fontData
  4528. };
  4529. },
  4530. computed: {
  4531. unicode() {
  4532. let code = this.icons.find((v2) => v2.font_class === this.type);
  4533. if (code) {
  4534. return code.unicode;
  4535. }
  4536. return "";
  4537. },
  4538. iconSize() {
  4539. return getVal(this.size);
  4540. },
  4541. styleObj() {
  4542. if (this.fontFamily !== "") {
  4543. return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`;
  4544. }
  4545. return `color: ${this.color}; font-size: ${this.iconSize};`;
  4546. }
  4547. },
  4548. methods: {
  4549. _onClick() {
  4550. this.$emit("click");
  4551. }
  4552. }
  4553. };
  4554. function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  4555. return vue.openBlock(), vue.createElementBlock(
  4556. "text",
  4557. {
  4558. style: vue.normalizeStyle($options.styleObj),
  4559. class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]),
  4560. onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
  4561. },
  4562. [
  4563. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
  4564. ],
  4565. 6
  4566. /* CLASS, STYLE */
  4567. );
  4568. }
  4569. const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-d31e1c47"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
  4570. const _sfc_main$d = {
  4571. name: "uni-data-select",
  4572. mixins: [nr.mixinDatacom || {}],
  4573. props: {
  4574. localdata: {
  4575. type: Array,
  4576. default() {
  4577. return [];
  4578. }
  4579. },
  4580. value: {
  4581. type: [String, Number],
  4582. default: ""
  4583. },
  4584. modelValue: {
  4585. type: [String, Number],
  4586. default: ""
  4587. },
  4588. label: {
  4589. type: String,
  4590. default: ""
  4591. },
  4592. placeholder: {
  4593. type: String,
  4594. default: "请选择"
  4595. },
  4596. emptyTips: {
  4597. type: String,
  4598. default: "无选项"
  4599. },
  4600. clear: {
  4601. type: Boolean,
  4602. default: true
  4603. },
  4604. defItem: {
  4605. type: Number,
  4606. default: 0
  4607. },
  4608. disabled: {
  4609. type: Boolean,
  4610. default: false
  4611. },
  4612. // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
  4613. format: {
  4614. type: String,
  4615. default: ""
  4616. },
  4617. placement: {
  4618. type: String,
  4619. default: "bottom"
  4620. }
  4621. },
  4622. data() {
  4623. return {
  4624. showSelector: false,
  4625. current: "",
  4626. mixinDatacomResData: [],
  4627. apps: [],
  4628. channels: [],
  4629. cacheKey: "uni-data-select-lastSelectedValue"
  4630. };
  4631. },
  4632. created() {
  4633. this.debounceGet = this.debounce(() => {
  4634. this.query();
  4635. }, 300);
  4636. if (this.collection && !this.localdata.length) {
  4637. this.debounceGet();
  4638. }
  4639. },
  4640. computed: {
  4641. typePlaceholder() {
  4642. const text = {
  4643. "opendb-stat-app-versions": "版本",
  4644. "opendb-app-channels": "渠道",
  4645. "opendb-app-list": "应用"
  4646. };
  4647. const common = this.placeholder;
  4648. const placeholder = text[this.collection];
  4649. return placeholder ? common + placeholder : common;
  4650. },
  4651. valueCom() {
  4652. return this.modelValue;
  4653. },
  4654. textShow() {
  4655. let text = this.current;
  4656. if (text.length > 10) {
  4657. return text.slice(0, 25) + "...";
  4658. }
  4659. return text;
  4660. },
  4661. getOffsetByPlacement() {
  4662. switch (this.placement) {
  4663. case "top":
  4664. return "bottom:calc(100% + 12px);";
  4665. case "bottom":
  4666. return "top:calc(100% + 12px);";
  4667. }
  4668. }
  4669. },
  4670. watch: {
  4671. localdata: {
  4672. immediate: true,
  4673. handler(val, old) {
  4674. if (Array.isArray(val) && old !== val) {
  4675. this.mixinDatacomResData = val;
  4676. }
  4677. }
  4678. },
  4679. valueCom(val, old) {
  4680. this.initDefVal();
  4681. },
  4682. mixinDatacomResData: {
  4683. immediate: true,
  4684. handler(val) {
  4685. if (val.length) {
  4686. this.initDefVal();
  4687. }
  4688. }
  4689. }
  4690. },
  4691. methods: {
  4692. debounce(fn, time = 100) {
  4693. let timer = null;
  4694. return function(...args) {
  4695. if (timer)
  4696. clearTimeout(timer);
  4697. timer = setTimeout(() => {
  4698. fn.apply(this, args);
  4699. }, time);
  4700. };
  4701. },
  4702. // 执行数据库查询
  4703. query() {
  4704. this.mixinDatacomEasyGet();
  4705. },
  4706. // 监听查询条件变更事件
  4707. onMixinDatacomPropsChange() {
  4708. if (this.collection) {
  4709. this.debounceGet();
  4710. }
  4711. },
  4712. initDefVal() {
  4713. let defValue = "";
  4714. if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
  4715. defValue = this.valueCom;
  4716. } else {
  4717. let strogeValue;
  4718. if (this.collection) {
  4719. strogeValue = this.getCache();
  4720. }
  4721. if (strogeValue || strogeValue === 0) {
  4722. defValue = strogeValue;
  4723. } else {
  4724. let defItem = "";
  4725. if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
  4726. defItem = this.mixinDatacomResData[this.defItem - 1].value;
  4727. }
  4728. defValue = defItem;
  4729. }
  4730. if (defValue || defValue === 0) {
  4731. this.emit(defValue);
  4732. }
  4733. }
  4734. const def = this.mixinDatacomResData.find((item) => item.value === defValue);
  4735. this.current = def ? this.formatItemName(def) : "";
  4736. },
  4737. /**
  4738. * @param {[String, Number]} value
  4739. * 判断用户给的 value 是否同时为禁用状态
  4740. */
  4741. isDisabled(value) {
  4742. let isDisabled = false;
  4743. this.mixinDatacomResData.forEach((item) => {
  4744. if (item.value === value) {
  4745. isDisabled = item.disable;
  4746. }
  4747. });
  4748. return isDisabled;
  4749. },
  4750. clearVal() {
  4751. this.emit("");
  4752. if (this.collection) {
  4753. this.removeCache();
  4754. }
  4755. },
  4756. change(item) {
  4757. if (!item.disable) {
  4758. this.showSelector = false;
  4759. this.current = this.formatItemName(item);
  4760. this.emit(item.value);
  4761. }
  4762. },
  4763. emit(val) {
  4764. this.$emit("input", val);
  4765. this.$emit("update:modelValue", val);
  4766. this.$emit("change", val);
  4767. if (this.collection) {
  4768. this.setCache(val);
  4769. }
  4770. },
  4771. toggleSelector() {
  4772. if (this.disabled) {
  4773. return;
  4774. }
  4775. this.showSelector = !this.showSelector;
  4776. },
  4777. formatItemName(item) {
  4778. let {
  4779. text,
  4780. value,
  4781. channel_code
  4782. } = item;
  4783. channel_code = channel_code ? `(${channel_code})` : "";
  4784. if (this.format) {
  4785. let str = "";
  4786. str = this.format;
  4787. for (let key in item) {
  4788. str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
  4789. }
  4790. return str;
  4791. } else {
  4792. return this.collection.indexOf("app-list") > 0 ? `${text}(${value})` : text ? text : `未命名${channel_code}`;
  4793. }
  4794. },
  4795. // 获取当前加载的数据
  4796. getLoadData() {
  4797. return this.mixinDatacomResData;
  4798. },
  4799. // 获取当前缓存key
  4800. getCurrentCacheKey() {
  4801. return this.collection;
  4802. },
  4803. // 获取缓存
  4804. getCache(name = this.getCurrentCacheKey()) {
  4805. let cacheData = uni.getStorageSync(this.cacheKey) || {};
  4806. return cacheData[name];
  4807. },
  4808. // 设置缓存
  4809. setCache(value, name = this.getCurrentCacheKey()) {
  4810. let cacheData = uni.getStorageSync(this.cacheKey) || {};
  4811. cacheData[name] = value;
  4812. uni.setStorageSync(this.cacheKey, cacheData);
  4813. },
  4814. // 删除缓存
  4815. removeCache(name = this.getCurrentCacheKey()) {
  4816. let cacheData = uni.getStorageSync(this.cacheKey) || {};
  4817. delete cacheData[name];
  4818. uni.setStorageSync(this.cacheKey, cacheData);
  4819. }
  4820. }
  4821. };
  4822. function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  4823. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$2);
  4824. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-stat__select" }, [
  4825. $props.label ? (vue.openBlock(), vue.createElementBlock(
  4826. "span",
  4827. {
  4828. key: 0,
  4829. class: "uni-label-text hide-on-phone"
  4830. },
  4831. vue.toDisplayString($props.label + ":"),
  4832. 1
  4833. /* TEXT */
  4834. )) : vue.createCommentVNode("v-if", true),
  4835. vue.createElementVNode(
  4836. "view",
  4837. {
  4838. class: vue.normalizeClass(["uni-stat-box", { "uni-stat__actived": $data.current }])
  4839. },
  4840. [
  4841. vue.createElementVNode(
  4842. "view",
  4843. {
  4844. class: vue.normalizeClass(["uni-select", { "uni-select--disabled": $props.disabled }])
  4845. },
  4846. [
  4847. vue.createElementVNode("view", {
  4848. class: "uni-select__input-box",
  4849. onClick: _cache[1] || (_cache[1] = (...args) => $options.toggleSelector && $options.toggleSelector(...args))
  4850. }, [
  4851. $data.current ? (vue.openBlock(), vue.createElementBlock(
  4852. "view",
  4853. {
  4854. key: 0,
  4855. class: "uni-select__input-text"
  4856. },
  4857. vue.toDisplayString($options.textShow),
  4858. 1
  4859. /* TEXT */
  4860. )) : (vue.openBlock(), vue.createElementBlock(
  4861. "view",
  4862. {
  4863. key: 1,
  4864. class: "uni-select__input-text uni-select__input-placeholder"
  4865. },
  4866. vue.toDisplayString($options.typePlaceholder),
  4867. 1
  4868. /* TEXT */
  4869. )),
  4870. $data.current && $props.clear && !$props.disabled ? (vue.openBlock(), vue.createElementBlock("view", {
  4871. key: 2,
  4872. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clearVal && $options.clearVal(...args), ["stop"]))
  4873. }, [
  4874. vue.createVNode(_component_uni_icons, {
  4875. type: "clear",
  4876. color: "#c0c4cc",
  4877. size: "24"
  4878. })
  4879. ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 3 }, [
  4880. vue.createVNode(_component_uni_icons, {
  4881. type: $data.showSelector ? "top" : "bottom",
  4882. size: "20",
  4883. color: "#999"
  4884. }, null, 8, ["type"])
  4885. ]))
  4886. ]),
  4887. $data.showSelector ? (vue.openBlock(), vue.createElementBlock("view", {
  4888. key: 0,
  4889. class: "uni-select--mask",
  4890. onClick: _cache[2] || (_cache[2] = (...args) => $options.toggleSelector && $options.toggleSelector(...args))
  4891. })) : vue.createCommentVNode("v-if", true),
  4892. $data.showSelector ? (vue.openBlock(), vue.createElementBlock(
  4893. "view",
  4894. {
  4895. key: 1,
  4896. class: "uni-select__selector",
  4897. style: vue.normalizeStyle($options.getOffsetByPlacement)
  4898. },
  4899. [
  4900. vue.createElementVNode(
  4901. "view",
  4902. {
  4903. class: vue.normalizeClass($props.placement == "bottom" ? "uni-popper__arrow_bottom" : "uni-popper__arrow_top")
  4904. },
  4905. null,
  4906. 2
  4907. /* CLASS */
  4908. ),
  4909. vue.createElementVNode("scroll-view", {
  4910. "scroll-y": "true",
  4911. class: "uni-select__selector-scroll"
  4912. }, [
  4913. $data.mixinDatacomResData.length === 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  4914. key: 0,
  4915. class: "uni-select__selector-empty"
  4916. }, [
  4917. vue.createElementVNode(
  4918. "text",
  4919. null,
  4920. vue.toDisplayString($props.emptyTips),
  4921. 1
  4922. /* TEXT */
  4923. )
  4924. ])) : (vue.openBlock(true), vue.createElementBlock(
  4925. vue.Fragment,
  4926. { key: 1 },
  4927. vue.renderList($data.mixinDatacomResData, (item, index) => {
  4928. return vue.openBlock(), vue.createElementBlock("view", {
  4929. class: "uni-select__selector-item",
  4930. key: index,
  4931. onClick: ($event) => $options.change(item)
  4932. }, [
  4933. vue.createElementVNode(
  4934. "text",
  4935. {
  4936. class: vue.normalizeClass($options.textShow == item.text ? "uni-select__selector__disabled" : "uni-select__selector__disabled1")
  4937. },
  4938. vue.toDisplayString($options.formatItemName(item)),
  4939. 3
  4940. /* TEXT, CLASS */
  4941. )
  4942. ], 8, ["onClick"]);
  4943. }),
  4944. 128
  4945. /* KEYED_FRAGMENT */
  4946. ))
  4947. ])
  4948. ],
  4949. 4
  4950. /* STYLE */
  4951. )) : vue.createCommentVNode("v-if", true)
  4952. ],
  4953. 2
  4954. /* CLASS */
  4955. )
  4956. ],
  4957. 2
  4958. /* CLASS */
  4959. )
  4960. ]);
  4961. }
  4962. const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-ddf9e0a2"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue"]]);
  4963. const control = async (data) => {
  4964. try {
  4965. 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")}` });
  4966. formatAppLog("log", "at api/api.js:5", response2);
  4967. if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
  4968. uni.removeStorageSync("token");
  4969. login();
  4970. return response2.data;
  4971. }
  4972. return response2.data;
  4973. } catch (error) {
  4974. formatAppLog("log", "at api/api.js:18", error);
  4975. login();
  4976. return response.data;
  4977. }
  4978. };
  4979. const getuidatas = async (data) => {
  4980. try {
  4981. 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")}` });
  4982. formatAppLog("log", "at api/api.js:32", response2);
  4983. if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
  4984. uni.removeStorageSync("token");
  4985. login();
  4986. return response2.data;
  4987. }
  4988. return response2.data;
  4989. } catch (error) {
  4990. formatAppLog("log", "at api/api.js:48", error);
  4991. login();
  4992. return response.data;
  4993. }
  4994. };
  4995. const getfaultsList = async (data) => {
  4996. try {
  4997. const response2 = await uni.$http.get("/api/v1/faults", data, { "Content-Type": "application/json;charset=utf-8", "Authorization": `JWT ${uni.getStorageSync("token")}` });
  4998. formatAppLog("log", "at api/api.js:63", response2.data);
  4999. if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
  5000. uni.removeStorageSync("token");
  5001. login();
  5002. return response2.data;
  5003. }
  5004. return response2.data;
  5005. } catch (error) {
  5006. formatAppLog("error", "at api/api.js:76", "Network request failed:", error);
  5007. formatAppLog("log", "at api/api.js:77", error);
  5008. uni.removeStorageSync("token");
  5009. login();
  5010. return response.data;
  5011. }
  5012. };
  5013. const login = async (start, count) => {
  5014. try {
  5015. formatAppLog("log", "at api/api.js:91", "login request");
  5016. const response2 = await uni.$http.post(
  5017. "/api/v1/login",
  5018. { name: "dexnui", pwd: "dexn1001" },
  5019. { "Content-Type": "application/json;charset=utf-8" }
  5020. );
  5021. formatAppLog("log", "at api/api.js:94", response2);
  5022. if (response2.statusCode != 200 || response2.data.error == "token过期且未提供刷新令牌") {
  5023. return response2.data;
  5024. }
  5025. formatAppLog("log", "at api/api.js:103", response2.data);
  5026. uni.setStorageSync("token", response2.data.data.token);
  5027. return response2.data;
  5028. } catch (error) {
  5029. return response.data;
  5030. }
  5031. };
  5032. const getTime = (format2 = "yyyy/MM/dd hh:mm:ss") => {
  5033. const date = /* @__PURE__ */ new Date();
  5034. const year = date.getFullYear();
  5035. const month = ("0" + (date.getMonth() + 1)).slice(-2);
  5036. const day = ("0" + date.getDate()).slice(-2);
  5037. const hours = ("0" + date.getHours()).slice(-2);
  5038. const minutes = ("0" + date.getMinutes()).slice(-2);
  5039. const seconds = ("0" + date.getSeconds()).slice(-2);
  5040. return format2.replace("yyyy", year).replace("MM", month).replace("dd", day).replace("hh", hours).replace("mm", minutes).replace("ss", seconds);
  5041. };
  5042. function getDevtoolsGlobalHook() {
  5043. return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5044. }
  5045. function getTarget() {
  5046. return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
  5047. }
  5048. const isProxyAvailable = typeof Proxy === "function";
  5049. const HOOK_SETUP = "devtools-plugin:setup";
  5050. const HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
  5051. class ApiProxy {
  5052. constructor(plugin, hook) {
  5053. this.target = null;
  5054. this.targetQueue = [];
  5055. this.onQueue = [];
  5056. this.plugin = plugin;
  5057. this.hook = hook;
  5058. const defaultSettings = {};
  5059. if (plugin.settings) {
  5060. for (const id in plugin.settings) {
  5061. const item = plugin.settings[id];
  5062. defaultSettings[id] = item.defaultValue;
  5063. }
  5064. }
  5065. const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
  5066. let currentSettings = { ...defaultSettings };
  5067. try {
  5068. const raw = localStorage.getItem(localSettingsSaveId);
  5069. const data = JSON.parse(raw);
  5070. Object.assign(currentSettings, data);
  5071. } catch (e2) {
  5072. }
  5073. this.fallbacks = {
  5074. getSettings() {
  5075. return currentSettings;
  5076. },
  5077. setSettings(value) {
  5078. try {
  5079. localStorage.setItem(localSettingsSaveId, JSON.stringify(value));
  5080. } catch (e2) {
  5081. }
  5082. currentSettings = value;
  5083. }
  5084. };
  5085. hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {
  5086. if (pluginId === this.plugin.id) {
  5087. this.fallbacks.setSettings(value);
  5088. }
  5089. });
  5090. this.proxiedOn = new Proxy({}, {
  5091. get: (_target, prop) => {
  5092. if (this.target) {
  5093. return this.target.on[prop];
  5094. } else {
  5095. return (...args) => {
  5096. this.onQueue.push({
  5097. method: prop,
  5098. args
  5099. });
  5100. };
  5101. }
  5102. }
  5103. });
  5104. this.proxiedTarget = new Proxy({}, {
  5105. get: (_target, prop) => {
  5106. if (this.target) {
  5107. return this.target[prop];
  5108. } else if (prop === "on") {
  5109. return this.proxiedOn;
  5110. } else if (Object.keys(this.fallbacks).includes(prop)) {
  5111. return (...args) => {
  5112. this.targetQueue.push({
  5113. method: prop,
  5114. args,
  5115. resolve: () => {
  5116. }
  5117. });
  5118. return this.fallbacks[prop](...args);
  5119. };
  5120. } else {
  5121. return (...args) => {
  5122. return new Promise((resolve) => {
  5123. this.targetQueue.push({
  5124. method: prop,
  5125. args,
  5126. resolve
  5127. });
  5128. });
  5129. };
  5130. }
  5131. }
  5132. });
  5133. }
  5134. async setRealTarget(target) {
  5135. this.target = target;
  5136. for (const item of this.onQueue) {
  5137. this.target.on[item.method](...item.args);
  5138. }
  5139. for (const item of this.targetQueue) {
  5140. item.resolve(await this.target[item.method](...item.args));
  5141. }
  5142. }
  5143. }
  5144. function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
  5145. const target = getTarget();
  5146. const hook = getDevtoolsGlobalHook();
  5147. const enableProxy = isProxyAvailable && pluginDescriptor.enableEarlyProxy;
  5148. if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
  5149. hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
  5150. } else {
  5151. const proxy = enableProxy ? new ApiProxy(pluginDescriptor, hook) : null;
  5152. const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
  5153. list.push({
  5154. pluginDescriptor,
  5155. setupFn,
  5156. proxy
  5157. });
  5158. if (proxy)
  5159. setupFn(proxy.proxiedTarget);
  5160. }
  5161. }
  5162. /*!
  5163. * vuex v4.1.0
  5164. * (c) 2022 Evan You
  5165. * @license MIT
  5166. */
  5167. var storeKey = "store";
  5168. function forEachValue(obj, fn) {
  5169. Object.keys(obj).forEach(function(key) {
  5170. return fn(obj[key], key);
  5171. });
  5172. }
  5173. function isObject$3(obj) {
  5174. return obj !== null && typeof obj === "object";
  5175. }
  5176. function isPromise(val) {
  5177. return val && typeof val.then === "function";
  5178. }
  5179. function assert(condition, msg) {
  5180. if (!condition) {
  5181. throw new Error("[vuex] " + msg);
  5182. }
  5183. }
  5184. function partial(fn, arg) {
  5185. return function() {
  5186. return fn(arg);
  5187. };
  5188. }
  5189. function genericSubscribe(fn, subs, options) {
  5190. if (subs.indexOf(fn) < 0) {
  5191. options && options.prepend ? subs.unshift(fn) : subs.push(fn);
  5192. }
  5193. return function() {
  5194. var i2 = subs.indexOf(fn);
  5195. if (i2 > -1) {
  5196. subs.splice(i2, 1);
  5197. }
  5198. };
  5199. }
  5200. function resetStore(store, hot) {
  5201. store._actions = /* @__PURE__ */ Object.create(null);
  5202. store._mutations = /* @__PURE__ */ Object.create(null);
  5203. store._wrappedGetters = /* @__PURE__ */ Object.create(null);
  5204. store._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
  5205. var state2 = store.state;
  5206. installModule(store, state2, [], store._modules.root, true);
  5207. resetStoreState(store, state2, hot);
  5208. }
  5209. function resetStoreState(store, state2, hot) {
  5210. var oldState = store._state;
  5211. var oldScope = store._scope;
  5212. store.getters = {};
  5213. store._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
  5214. var wrappedGetters = store._wrappedGetters;
  5215. var computedObj = {};
  5216. var computedCache = {};
  5217. var scope = vue.effectScope(true);
  5218. scope.run(function() {
  5219. forEachValue(wrappedGetters, function(fn, key) {
  5220. computedObj[key] = partial(fn, store);
  5221. computedCache[key] = vue.computed(function() {
  5222. return computedObj[key]();
  5223. });
  5224. Object.defineProperty(store.getters, key, {
  5225. get: function() {
  5226. return computedCache[key].value;
  5227. },
  5228. enumerable: true
  5229. // for local getters
  5230. });
  5231. });
  5232. });
  5233. store._state = vue.reactive({
  5234. data: state2
  5235. });
  5236. store._scope = scope;
  5237. if (store.strict) {
  5238. enableStrictMode(store);
  5239. }
  5240. if (oldState) {
  5241. if (hot) {
  5242. store._withCommit(function() {
  5243. oldState.data = null;
  5244. });
  5245. }
  5246. }
  5247. if (oldScope) {
  5248. oldScope.stop();
  5249. }
  5250. }
  5251. function installModule(store, rootState, path, module, hot) {
  5252. var isRoot = !path.length;
  5253. var namespace = store._modules.getNamespace(path);
  5254. if (module.namespaced) {
  5255. if (store._modulesNamespaceMap[namespace] && true) {
  5256. console.error("[vuex] duplicate namespace " + namespace + " for the namespaced module " + path.join("/"));
  5257. }
  5258. store._modulesNamespaceMap[namespace] = module;
  5259. }
  5260. if (!isRoot && !hot) {
  5261. var parentState = getNestedState(rootState, path.slice(0, -1));
  5262. var moduleName = path[path.length - 1];
  5263. store._withCommit(function() {
  5264. {
  5265. if (moduleName in parentState) {
  5266. console.warn(
  5267. '[vuex] state field "' + moduleName + '" was overridden by a module with the same name at "' + path.join(".") + '"'
  5268. );
  5269. }
  5270. }
  5271. parentState[moduleName] = module.state;
  5272. });
  5273. }
  5274. var local = module.context = makeLocalContext(store, namespace, path);
  5275. module.forEachMutation(function(mutation, key) {
  5276. var namespacedType = namespace + key;
  5277. registerMutation(store, namespacedType, mutation, local);
  5278. });
  5279. module.forEachAction(function(action, key) {
  5280. var type = action.root ? key : namespace + key;
  5281. var handler = action.handler || action;
  5282. registerAction(store, type, handler, local);
  5283. });
  5284. module.forEachGetter(function(getter, key) {
  5285. var namespacedType = namespace + key;
  5286. registerGetter(store, namespacedType, getter, local);
  5287. });
  5288. module.forEachChild(function(child, key) {
  5289. installModule(store, rootState, path.concat(key), child, hot);
  5290. });
  5291. }
  5292. function makeLocalContext(store, namespace, path) {
  5293. var noNamespace = namespace === "";
  5294. var local = {
  5295. dispatch: noNamespace ? store.dispatch : function(_type, _payload, _options) {
  5296. var args = unifyObjectStyle(_type, _payload, _options);
  5297. var payload = args.payload;
  5298. var options = args.options;
  5299. var type = args.type;
  5300. if (!options || !options.root) {
  5301. type = namespace + type;
  5302. if (!store._actions[type]) {
  5303. console.error("[vuex] unknown local action type: " + args.type + ", global type: " + type);
  5304. return;
  5305. }
  5306. }
  5307. return store.dispatch(type, payload);
  5308. },
  5309. commit: noNamespace ? store.commit : function(_type, _payload, _options) {
  5310. var args = unifyObjectStyle(_type, _payload, _options);
  5311. var payload = args.payload;
  5312. var options = args.options;
  5313. var type = args.type;
  5314. if (!options || !options.root) {
  5315. type = namespace + type;
  5316. if (!store._mutations[type]) {
  5317. console.error("[vuex] unknown local mutation type: " + args.type + ", global type: " + type);
  5318. return;
  5319. }
  5320. }
  5321. store.commit(type, payload, options);
  5322. }
  5323. };
  5324. Object.defineProperties(local, {
  5325. getters: {
  5326. get: noNamespace ? function() {
  5327. return store.getters;
  5328. } : function() {
  5329. return makeLocalGetters(store, namespace);
  5330. }
  5331. },
  5332. state: {
  5333. get: function() {
  5334. return getNestedState(store.state, path);
  5335. }
  5336. }
  5337. });
  5338. return local;
  5339. }
  5340. function makeLocalGetters(store, namespace) {
  5341. if (!store._makeLocalGettersCache[namespace]) {
  5342. var gettersProxy = {};
  5343. var splitPos = namespace.length;
  5344. Object.keys(store.getters).forEach(function(type) {
  5345. if (type.slice(0, splitPos) !== namespace) {
  5346. return;
  5347. }
  5348. var localType = type.slice(splitPos);
  5349. Object.defineProperty(gettersProxy, localType, {
  5350. get: function() {
  5351. return store.getters[type];
  5352. },
  5353. enumerable: true
  5354. });
  5355. });
  5356. store._makeLocalGettersCache[namespace] = gettersProxy;
  5357. }
  5358. return store._makeLocalGettersCache[namespace];
  5359. }
  5360. function registerMutation(store, type, handler, local) {
  5361. var entry = store._mutations[type] || (store._mutations[type] = []);
  5362. entry.push(function wrappedMutationHandler(payload) {
  5363. handler.call(store, local.state, payload);
  5364. });
  5365. }
  5366. function registerAction(store, type, handler, local) {
  5367. var entry = store._actions[type] || (store._actions[type] = []);
  5368. entry.push(function wrappedActionHandler(payload) {
  5369. var res = handler.call(store, {
  5370. dispatch: local.dispatch,
  5371. commit: local.commit,
  5372. getters: local.getters,
  5373. state: local.state,
  5374. rootGetters: store.getters,
  5375. rootState: store.state
  5376. }, payload);
  5377. if (!isPromise(res)) {
  5378. res = Promise.resolve(res);
  5379. }
  5380. if (store._devtoolHook) {
  5381. return res.catch(function(err) {
  5382. store._devtoolHook.emit("vuex:error", err);
  5383. throw err;
  5384. });
  5385. } else {
  5386. return res;
  5387. }
  5388. });
  5389. }
  5390. function registerGetter(store, type, rawGetter, local) {
  5391. if (store._wrappedGetters[type]) {
  5392. {
  5393. console.error("[vuex] duplicate getter key: " + type);
  5394. }
  5395. return;
  5396. }
  5397. store._wrappedGetters[type] = function wrappedGetter(store2) {
  5398. return rawGetter(
  5399. local.state,
  5400. // local state
  5401. local.getters,
  5402. // local getters
  5403. store2.state,
  5404. // root state
  5405. store2.getters
  5406. // root getters
  5407. );
  5408. };
  5409. }
  5410. function enableStrictMode(store) {
  5411. vue.watch(function() {
  5412. return store._state.data;
  5413. }, function() {
  5414. {
  5415. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  5416. }
  5417. }, { deep: true, flush: "sync" });
  5418. }
  5419. function getNestedState(state2, path) {
  5420. return path.reduce(function(state22, key) {
  5421. return state22[key];
  5422. }, state2);
  5423. }
  5424. function unifyObjectStyle(type, payload, options) {
  5425. if (isObject$3(type) && type.type) {
  5426. options = payload;
  5427. payload = type;
  5428. type = type.type;
  5429. }
  5430. {
  5431. assert(typeof type === "string", "expects string as the type, but found " + typeof type + ".");
  5432. }
  5433. return { type, payload, options };
  5434. }
  5435. var LABEL_VUEX_BINDINGS = "vuex bindings";
  5436. var MUTATIONS_LAYER_ID = "vuex:mutations";
  5437. var ACTIONS_LAYER_ID = "vuex:actions";
  5438. var INSPECTOR_ID = "vuex";
  5439. var actionId = 0;
  5440. function addDevtools(app, store) {
  5441. setupDevtoolsPlugin(
  5442. {
  5443. id: "org.vuejs.vuex",
  5444. app,
  5445. label: "Vuex",
  5446. homepage: "https://next.vuex.vuejs.org/",
  5447. logo: "https://vuejs.org/images/icons/favicon-96x96.png",
  5448. packageName: "vuex",
  5449. componentStateTypes: [LABEL_VUEX_BINDINGS]
  5450. },
  5451. function(api) {
  5452. api.addTimelineLayer({
  5453. id: MUTATIONS_LAYER_ID,
  5454. label: "Vuex Mutations",
  5455. color: COLOR_LIME_500
  5456. });
  5457. api.addTimelineLayer({
  5458. id: ACTIONS_LAYER_ID,
  5459. label: "Vuex Actions",
  5460. color: COLOR_LIME_500
  5461. });
  5462. api.addInspector({
  5463. id: INSPECTOR_ID,
  5464. label: "Vuex",
  5465. icon: "storage",
  5466. treeFilterPlaceholder: "Filter stores..."
  5467. });
  5468. api.on.getInspectorTree(function(payload) {
  5469. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  5470. if (payload.filter) {
  5471. var nodes = [];
  5472. flattenStoreForInspectorTree(nodes, store._modules.root, payload.filter, "");
  5473. payload.rootNodes = nodes;
  5474. } else {
  5475. payload.rootNodes = [
  5476. formatStoreForInspectorTree(store._modules.root, "")
  5477. ];
  5478. }
  5479. }
  5480. });
  5481. api.on.getInspectorState(function(payload) {
  5482. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  5483. var modulePath = payload.nodeId;
  5484. makeLocalGetters(store, modulePath);
  5485. payload.state = formatStoreForInspectorState(
  5486. getStoreModule(store._modules, modulePath),
  5487. modulePath === "root" ? store.getters : store._makeLocalGettersCache,
  5488. modulePath
  5489. );
  5490. }
  5491. });
  5492. api.on.editInspectorState(function(payload) {
  5493. if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
  5494. var modulePath = payload.nodeId;
  5495. var path = payload.path;
  5496. if (modulePath !== "root") {
  5497. path = modulePath.split("/").filter(Boolean).concat(path);
  5498. }
  5499. store._withCommit(function() {
  5500. payload.set(store._state.data, path, payload.state.value);
  5501. });
  5502. }
  5503. });
  5504. store.subscribe(function(mutation, state2) {
  5505. var data = {};
  5506. if (mutation.payload) {
  5507. data.payload = mutation.payload;
  5508. }
  5509. data.state = state2;
  5510. api.notifyComponentUpdate();
  5511. api.sendInspectorTree(INSPECTOR_ID);
  5512. api.sendInspectorState(INSPECTOR_ID);
  5513. api.addTimelineEvent({
  5514. layerId: MUTATIONS_LAYER_ID,
  5515. event: {
  5516. time: Date.now(),
  5517. title: mutation.type,
  5518. data
  5519. }
  5520. });
  5521. });
  5522. store.subscribeAction({
  5523. before: function(action, state2) {
  5524. var data = {};
  5525. if (action.payload) {
  5526. data.payload = action.payload;
  5527. }
  5528. action._id = actionId++;
  5529. action._time = Date.now();
  5530. data.state = state2;
  5531. api.addTimelineEvent({
  5532. layerId: ACTIONS_LAYER_ID,
  5533. event: {
  5534. time: action._time,
  5535. title: action.type,
  5536. groupId: action._id,
  5537. subtitle: "start",
  5538. data
  5539. }
  5540. });
  5541. },
  5542. after: function(action, state2) {
  5543. var data = {};
  5544. var duration = Date.now() - action._time;
  5545. data.duration = {
  5546. _custom: {
  5547. type: "duration",
  5548. display: duration + "ms",
  5549. tooltip: "Action duration",
  5550. value: duration
  5551. }
  5552. };
  5553. if (action.payload) {
  5554. data.payload = action.payload;
  5555. }
  5556. data.state = state2;
  5557. api.addTimelineEvent({
  5558. layerId: ACTIONS_LAYER_ID,
  5559. event: {
  5560. time: Date.now(),
  5561. title: action.type,
  5562. groupId: action._id,
  5563. subtitle: "end",
  5564. data
  5565. }
  5566. });
  5567. }
  5568. });
  5569. }
  5570. );
  5571. }
  5572. var COLOR_LIME_500 = 8702998;
  5573. var COLOR_DARK = 6710886;
  5574. var COLOR_WHITE = 16777215;
  5575. var TAG_NAMESPACED = {
  5576. label: "namespaced",
  5577. textColor: COLOR_WHITE,
  5578. backgroundColor: COLOR_DARK
  5579. };
  5580. function extractNameFromPath(path) {
  5581. return path && path !== "root" ? path.split("/").slice(-2, -1)[0] : "Root";
  5582. }
  5583. function formatStoreForInspectorTree(module, path) {
  5584. return {
  5585. id: path || "root",
  5586. // all modules end with a `/`, we want the last segment only
  5587. // cart/ -> cart
  5588. // nested/cart/ -> cart
  5589. label: extractNameFromPath(path),
  5590. tags: module.namespaced ? [TAG_NAMESPACED] : [],
  5591. children: Object.keys(module._children).map(
  5592. function(moduleName) {
  5593. return formatStoreForInspectorTree(
  5594. module._children[moduleName],
  5595. path + moduleName + "/"
  5596. );
  5597. }
  5598. )
  5599. };
  5600. }
  5601. function flattenStoreForInspectorTree(result, module, filter, path) {
  5602. if (path.includes(filter)) {
  5603. result.push({
  5604. id: path || "root",
  5605. label: path.endsWith("/") ? path.slice(0, path.length - 1) : path || "Root",
  5606. tags: module.namespaced ? [TAG_NAMESPACED] : []
  5607. });
  5608. }
  5609. Object.keys(module._children).forEach(function(moduleName) {
  5610. flattenStoreForInspectorTree(result, module._children[moduleName], filter, path + moduleName + "/");
  5611. });
  5612. }
  5613. function formatStoreForInspectorState(module, getters, path) {
  5614. getters = path === "root" ? getters : getters[path];
  5615. var gettersKeys = Object.keys(getters);
  5616. var storeState = {
  5617. state: Object.keys(module.state).map(function(key) {
  5618. return {
  5619. key,
  5620. editable: true,
  5621. value: module.state[key]
  5622. };
  5623. })
  5624. };
  5625. if (gettersKeys.length) {
  5626. var tree = transformPathsToObjectTree(getters);
  5627. storeState.getters = Object.keys(tree).map(function(key) {
  5628. return {
  5629. key: key.endsWith("/") ? extractNameFromPath(key) : key,
  5630. editable: false,
  5631. value: canThrow(function() {
  5632. return tree[key];
  5633. })
  5634. };
  5635. });
  5636. }
  5637. return storeState;
  5638. }
  5639. function transformPathsToObjectTree(getters) {
  5640. var result = {};
  5641. Object.keys(getters).forEach(function(key) {
  5642. var path = key.split("/");
  5643. if (path.length > 1) {
  5644. var target = result;
  5645. var leafKey = path.pop();
  5646. path.forEach(function(p2) {
  5647. if (!target[p2]) {
  5648. target[p2] = {
  5649. _custom: {
  5650. value: {},
  5651. display: p2,
  5652. tooltip: "Module",
  5653. abstract: true
  5654. }
  5655. };
  5656. }
  5657. target = target[p2]._custom.value;
  5658. });
  5659. target[leafKey] = canThrow(function() {
  5660. return getters[key];
  5661. });
  5662. } else {
  5663. result[key] = canThrow(function() {
  5664. return getters[key];
  5665. });
  5666. }
  5667. });
  5668. return result;
  5669. }
  5670. function getStoreModule(moduleMap, path) {
  5671. var names = path.split("/").filter(function(n2) {
  5672. return n2;
  5673. });
  5674. return names.reduce(
  5675. function(module, moduleName, i2) {
  5676. var child = module[moduleName];
  5677. if (!child) {
  5678. throw new Error('Missing module "' + moduleName + '" for path "' + path + '".');
  5679. }
  5680. return i2 === names.length - 1 ? child : child._children;
  5681. },
  5682. path === "root" ? moduleMap : moduleMap.root._children
  5683. );
  5684. }
  5685. function canThrow(cb) {
  5686. try {
  5687. return cb();
  5688. } catch (e2) {
  5689. return e2;
  5690. }
  5691. }
  5692. var Module = function Module2(rawModule, runtime) {
  5693. this.runtime = runtime;
  5694. this._children = /* @__PURE__ */ Object.create(null);
  5695. this._rawModule = rawModule;
  5696. var rawState = rawModule.state;
  5697. this.state = (typeof rawState === "function" ? rawState() : rawState) || {};
  5698. };
  5699. var prototypeAccessors$1 = { namespaced: { configurable: true } };
  5700. prototypeAccessors$1.namespaced.get = function() {
  5701. return !!this._rawModule.namespaced;
  5702. };
  5703. Module.prototype.addChild = function addChild(key, module) {
  5704. this._children[key] = module;
  5705. };
  5706. Module.prototype.removeChild = function removeChild(key) {
  5707. delete this._children[key];
  5708. };
  5709. Module.prototype.getChild = function getChild(key) {
  5710. return this._children[key];
  5711. };
  5712. Module.prototype.hasChild = function hasChild(key) {
  5713. return key in this._children;
  5714. };
  5715. Module.prototype.update = function update(rawModule) {
  5716. this._rawModule.namespaced = rawModule.namespaced;
  5717. if (rawModule.actions) {
  5718. this._rawModule.actions = rawModule.actions;
  5719. }
  5720. if (rawModule.mutations) {
  5721. this._rawModule.mutations = rawModule.mutations;
  5722. }
  5723. if (rawModule.getters) {
  5724. this._rawModule.getters = rawModule.getters;
  5725. }
  5726. };
  5727. Module.prototype.forEachChild = function forEachChild(fn) {
  5728. forEachValue(this._children, fn);
  5729. };
  5730. Module.prototype.forEachGetter = function forEachGetter(fn) {
  5731. if (this._rawModule.getters) {
  5732. forEachValue(this._rawModule.getters, fn);
  5733. }
  5734. };
  5735. Module.prototype.forEachAction = function forEachAction(fn) {
  5736. if (this._rawModule.actions) {
  5737. forEachValue(this._rawModule.actions, fn);
  5738. }
  5739. };
  5740. Module.prototype.forEachMutation = function forEachMutation(fn) {
  5741. if (this._rawModule.mutations) {
  5742. forEachValue(this._rawModule.mutations, fn);
  5743. }
  5744. };
  5745. Object.defineProperties(Module.prototype, prototypeAccessors$1);
  5746. var ModuleCollection = function ModuleCollection2(rawRootModule) {
  5747. this.register([], rawRootModule, false);
  5748. };
  5749. ModuleCollection.prototype.get = function get(path) {
  5750. return path.reduce(function(module, key) {
  5751. return module.getChild(key);
  5752. }, this.root);
  5753. };
  5754. ModuleCollection.prototype.getNamespace = function getNamespace(path) {
  5755. var module = this.root;
  5756. return path.reduce(function(namespace, key) {
  5757. module = module.getChild(key);
  5758. return namespace + (module.namespaced ? key + "/" : "");
  5759. }, "");
  5760. };
  5761. ModuleCollection.prototype.update = function update$1(rawRootModule) {
  5762. update2([], this.root, rawRootModule);
  5763. };
  5764. ModuleCollection.prototype.register = function register(path, rawModule, runtime) {
  5765. var this$1$1 = this;
  5766. if (runtime === void 0)
  5767. runtime = true;
  5768. {
  5769. assertRawModule(path, rawModule);
  5770. }
  5771. var newModule = new Module(rawModule, runtime);
  5772. if (path.length === 0) {
  5773. this.root = newModule;
  5774. } else {
  5775. var parent = this.get(path.slice(0, -1));
  5776. parent.addChild(path[path.length - 1], newModule);
  5777. }
  5778. if (rawModule.modules) {
  5779. forEachValue(rawModule.modules, function(rawChildModule, key) {
  5780. this$1$1.register(path.concat(key), rawChildModule, runtime);
  5781. });
  5782. }
  5783. };
  5784. ModuleCollection.prototype.unregister = function unregister(path) {
  5785. var parent = this.get(path.slice(0, -1));
  5786. var key = path[path.length - 1];
  5787. var child = parent.getChild(key);
  5788. if (!child) {
  5789. {
  5790. console.warn(
  5791. "[vuex] trying to unregister module '" + key + "', which is not registered"
  5792. );
  5793. }
  5794. return;
  5795. }
  5796. if (!child.runtime) {
  5797. return;
  5798. }
  5799. parent.removeChild(key);
  5800. };
  5801. ModuleCollection.prototype.isRegistered = function isRegistered(path) {
  5802. var parent = this.get(path.slice(0, -1));
  5803. var key = path[path.length - 1];
  5804. if (parent) {
  5805. return parent.hasChild(key);
  5806. }
  5807. return false;
  5808. };
  5809. function update2(path, targetModule, newModule) {
  5810. {
  5811. assertRawModule(path, newModule);
  5812. }
  5813. targetModule.update(newModule);
  5814. if (newModule.modules) {
  5815. for (var key in newModule.modules) {
  5816. if (!targetModule.getChild(key)) {
  5817. {
  5818. console.warn(
  5819. "[vuex] trying to add a new module '" + key + "' on hot reloading, manual reload is needed"
  5820. );
  5821. }
  5822. return;
  5823. }
  5824. update2(
  5825. path.concat(key),
  5826. targetModule.getChild(key),
  5827. newModule.modules[key]
  5828. );
  5829. }
  5830. }
  5831. }
  5832. var functionAssert = {
  5833. assert: function(value) {
  5834. return typeof value === "function";
  5835. },
  5836. expected: "function"
  5837. };
  5838. var objectAssert = {
  5839. assert: function(value) {
  5840. return typeof value === "function" || typeof value === "object" && typeof value.handler === "function";
  5841. },
  5842. expected: 'function or object with "handler" function'
  5843. };
  5844. var assertTypes = {
  5845. getters: functionAssert,
  5846. mutations: functionAssert,
  5847. actions: objectAssert
  5848. };
  5849. function assertRawModule(path, rawModule) {
  5850. Object.keys(assertTypes).forEach(function(key) {
  5851. if (!rawModule[key]) {
  5852. return;
  5853. }
  5854. var assertOptions = assertTypes[key];
  5855. forEachValue(rawModule[key], function(value, type) {
  5856. assert(
  5857. assertOptions.assert(value),
  5858. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  5859. );
  5860. });
  5861. });
  5862. }
  5863. function makeAssertionMessage(path, key, type, value, expected) {
  5864. var buf = key + " should be " + expected + ' but "' + key + "." + type + '"';
  5865. if (path.length > 0) {
  5866. buf += ' in module "' + path.join(".") + '"';
  5867. }
  5868. buf += " is " + JSON.stringify(value) + ".";
  5869. return buf;
  5870. }
  5871. function createStore(options) {
  5872. return new Store$1(options);
  5873. }
  5874. var Store$1 = function Store2(options) {
  5875. var this$1$1 = this;
  5876. if (options === void 0)
  5877. options = {};
  5878. {
  5879. assert(typeof Promise !== "undefined", "vuex requires a Promise polyfill in this browser.");
  5880. assert(this instanceof Store2, "store must be called with the new operator.");
  5881. }
  5882. var plugins = options.plugins;
  5883. if (plugins === void 0)
  5884. plugins = [];
  5885. var strict = options.strict;
  5886. if (strict === void 0)
  5887. strict = false;
  5888. var devtools2 = options.devtools;
  5889. this._committing = false;
  5890. this._actions = /* @__PURE__ */ Object.create(null);
  5891. this._actionSubscribers = [];
  5892. this._mutations = /* @__PURE__ */ Object.create(null);
  5893. this._wrappedGetters = /* @__PURE__ */ Object.create(null);
  5894. this._modules = new ModuleCollection(options);
  5895. this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
  5896. this._subscribers = [];
  5897. this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
  5898. this._scope = null;
  5899. this._devtools = devtools2;
  5900. var store = this;
  5901. var ref = this;
  5902. var dispatch2 = ref.dispatch;
  5903. var commit2 = ref.commit;
  5904. this.dispatch = function boundDispatch(type, payload) {
  5905. return dispatch2.call(store, type, payload);
  5906. };
  5907. this.commit = function boundCommit(type, payload, options2) {
  5908. return commit2.call(store, type, payload, options2);
  5909. };
  5910. this.strict = strict;
  5911. var state2 = this._modules.root.state;
  5912. installModule(this, state2, [], this._modules.root);
  5913. resetStoreState(this, state2);
  5914. plugins.forEach(function(plugin) {
  5915. return plugin(this$1$1);
  5916. });
  5917. };
  5918. var prototypeAccessors = { state: { configurable: true } };
  5919. Store$1.prototype.install = function install(app, injectKey) {
  5920. app.provide(injectKey || storeKey, this);
  5921. app.config.globalProperties.$store = this;
  5922. var useDevtools = this._devtools !== void 0 ? this._devtools : true;
  5923. if (useDevtools) {
  5924. addDevtools(app, this);
  5925. }
  5926. };
  5927. prototypeAccessors.state.get = function() {
  5928. return this._state.data;
  5929. };
  5930. prototypeAccessors.state.set = function(v2) {
  5931. {
  5932. assert(false, "use store.replaceState() to explicit replace store state.");
  5933. }
  5934. };
  5935. Store$1.prototype.commit = function commit(_type, _payload, _options) {
  5936. var this$1$1 = this;
  5937. var ref = unifyObjectStyle(_type, _payload, _options);
  5938. var type = ref.type;
  5939. var payload = ref.payload;
  5940. var options = ref.options;
  5941. var mutation = { type, payload };
  5942. var entry = this._mutations[type];
  5943. if (!entry) {
  5944. {
  5945. console.error("[vuex] unknown mutation type: " + type);
  5946. }
  5947. return;
  5948. }
  5949. this._withCommit(function() {
  5950. entry.forEach(function commitIterator(handler) {
  5951. handler(payload);
  5952. });
  5953. });
  5954. this._subscribers.slice().forEach(function(sub) {
  5955. return sub(mutation, this$1$1.state);
  5956. });
  5957. if (options && options.silent) {
  5958. console.warn(
  5959. "[vuex] mutation type: " + type + ". Silent option has been removed. Use the filter functionality in the vue-devtools"
  5960. );
  5961. }
  5962. };
  5963. Store$1.prototype.dispatch = function dispatch(_type, _payload) {
  5964. var this$1$1 = this;
  5965. var ref = unifyObjectStyle(_type, _payload);
  5966. var type = ref.type;
  5967. var payload = ref.payload;
  5968. var action = { type, payload };
  5969. var entry = this._actions[type];
  5970. if (!entry) {
  5971. {
  5972. console.error("[vuex] unknown action type: " + type);
  5973. }
  5974. return;
  5975. }
  5976. try {
  5977. this._actionSubscribers.slice().filter(function(sub) {
  5978. return sub.before;
  5979. }).forEach(function(sub) {
  5980. return sub.before(action, this$1$1.state);
  5981. });
  5982. } catch (e2) {
  5983. {
  5984. console.warn("[vuex] error in before action subscribers: ");
  5985. console.error(e2);
  5986. }
  5987. }
  5988. var result = entry.length > 1 ? Promise.all(entry.map(function(handler) {
  5989. return handler(payload);
  5990. })) : entry[0](payload);
  5991. return new Promise(function(resolve, reject) {
  5992. result.then(function(res) {
  5993. try {
  5994. this$1$1._actionSubscribers.filter(function(sub) {
  5995. return sub.after;
  5996. }).forEach(function(sub) {
  5997. return sub.after(action, this$1$1.state);
  5998. });
  5999. } catch (e2) {
  6000. {
  6001. console.warn("[vuex] error in after action subscribers: ");
  6002. console.error(e2);
  6003. }
  6004. }
  6005. resolve(res);
  6006. }, function(error) {
  6007. try {
  6008. this$1$1._actionSubscribers.filter(function(sub) {
  6009. return sub.error;
  6010. }).forEach(function(sub) {
  6011. return sub.error(action, this$1$1.state, error);
  6012. });
  6013. } catch (e2) {
  6014. {
  6015. console.warn("[vuex] error in error action subscribers: ");
  6016. console.error(e2);
  6017. }
  6018. }
  6019. reject(error);
  6020. });
  6021. });
  6022. };
  6023. Store$1.prototype.subscribe = function subscribe(fn, options) {
  6024. return genericSubscribe(fn, this._subscribers, options);
  6025. };
  6026. Store$1.prototype.subscribeAction = function subscribeAction(fn, options) {
  6027. var subs = typeof fn === "function" ? { before: fn } : fn;
  6028. return genericSubscribe(subs, this._actionSubscribers, options);
  6029. };
  6030. Store$1.prototype.watch = function watch$1(getter, cb, options) {
  6031. var this$1$1 = this;
  6032. {
  6033. assert(typeof getter === "function", "store.watch only accepts a function.");
  6034. }
  6035. return vue.watch(function() {
  6036. return getter(this$1$1.state, this$1$1.getters);
  6037. }, cb, Object.assign({}, options));
  6038. };
  6039. Store$1.prototype.replaceState = function replaceState(state2) {
  6040. var this$1$1 = this;
  6041. this._withCommit(function() {
  6042. this$1$1._state.data = state2;
  6043. });
  6044. };
  6045. Store$1.prototype.registerModule = function registerModule(path, rawModule, options) {
  6046. if (options === void 0)
  6047. options = {};
  6048. if (typeof path === "string") {
  6049. path = [path];
  6050. }
  6051. {
  6052. assert(Array.isArray(path), "module path must be a string or an Array.");
  6053. assert(path.length > 0, "cannot register the root module by using registerModule.");
  6054. }
  6055. this._modules.register(path, rawModule);
  6056. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  6057. resetStoreState(this, this.state);
  6058. };
  6059. Store$1.prototype.unregisterModule = function unregisterModule(path) {
  6060. var this$1$1 = this;
  6061. if (typeof path === "string") {
  6062. path = [path];
  6063. }
  6064. {
  6065. assert(Array.isArray(path), "module path must be a string or an Array.");
  6066. }
  6067. this._modules.unregister(path);
  6068. this._withCommit(function() {
  6069. var parentState = getNestedState(this$1$1.state, path.slice(0, -1));
  6070. delete parentState[path[path.length - 1]];
  6071. });
  6072. resetStore(this);
  6073. };
  6074. Store$1.prototype.hasModule = function hasModule(path) {
  6075. if (typeof path === "string") {
  6076. path = [path];
  6077. }
  6078. {
  6079. assert(Array.isArray(path), "module path must be a string or an Array.");
  6080. }
  6081. return this._modules.isRegistered(path);
  6082. };
  6083. Store$1.prototype.hotUpdate = function hotUpdate(newOptions) {
  6084. this._modules.update(newOptions);
  6085. resetStore(this, true);
  6086. };
  6087. Store$1.prototype._withCommit = function _withCommit(fn) {
  6088. var committing = this._committing;
  6089. this._committing = true;
  6090. fn();
  6091. this._committing = committing;
  6092. };
  6093. Object.defineProperties(Store$1.prototype, prototypeAccessors);
  6094. var mapState = normalizeNamespace(function(namespace, states) {
  6095. var res = {};
  6096. if (!isValidMap(states)) {
  6097. console.error("[vuex] mapState: mapper parameter must be either an Array or an Object");
  6098. }
  6099. normalizeMap(states).forEach(function(ref) {
  6100. var key = ref.key;
  6101. var val = ref.val;
  6102. res[key] = function mappedState() {
  6103. var state2 = this.$store.state;
  6104. var getters = this.$store.getters;
  6105. if (namespace) {
  6106. var module = getModuleByNamespace(this.$store, "mapState", namespace);
  6107. if (!module) {
  6108. return;
  6109. }
  6110. state2 = module.context.state;
  6111. getters = module.context.getters;
  6112. }
  6113. return typeof val === "function" ? val.call(this, state2, getters) : state2[val];
  6114. };
  6115. res[key].vuex = true;
  6116. });
  6117. return res;
  6118. });
  6119. function normalizeMap(map) {
  6120. if (!isValidMap(map)) {
  6121. return [];
  6122. }
  6123. return Array.isArray(map) ? map.map(function(key) {
  6124. return { key, val: key };
  6125. }) : Object.keys(map).map(function(key) {
  6126. return { key, val: map[key] };
  6127. });
  6128. }
  6129. function isValidMap(map) {
  6130. return Array.isArray(map) || isObject$3(map);
  6131. }
  6132. function normalizeNamespace(fn) {
  6133. return function(namespace, map) {
  6134. if (typeof namespace !== "string") {
  6135. map = namespace;
  6136. namespace = "";
  6137. } else if (namespace.charAt(namespace.length - 1) !== "/") {
  6138. namespace += "/";
  6139. }
  6140. return fn(namespace, map);
  6141. };
  6142. }
  6143. function getModuleByNamespace(store, helper, namespace) {
  6144. var module = store._modulesNamespaceMap[namespace];
  6145. if (!module) {
  6146. console.error("[vuex] module namespace not found in " + helper + "(): " + namespace);
  6147. }
  6148. return module;
  6149. }
  6150. const _imports_0 = "/static/logo/logo31.png";
  6151. const _imports_1$5 = "/static/img/energy1.png";
  6152. const _imports_2$3 = "/static/img/Energybrightness1.png";
  6153. const _imports_3$4 = "/static/img/energy2.png";
  6154. const _imports_4$2 = "/static/img/Energybrightness2.png";
  6155. const _imports_5$1 = "/static/img/energy3.png";
  6156. const _imports_6$1 = "/static/img/Energybrightness3.png";
  6157. const _imports_7$1 = "/static/img/energy4.png";
  6158. const _imports_8$1 = "/static/img/Energybrightness4.png";
  6159. const _imports_9$1 = "/static/img/setup.png";
  6160. const _imports_10$2 = "/static/!.png";
  6161. const _sfc_main$c = {
  6162. data() {
  6163. return {
  6164. title: "",
  6165. uidatas: "",
  6166. formatTimeid: "",
  6167. messageText: "",
  6168. appVersion: "",
  6169. // 用于存储应用版本号
  6170. appLanguage: "zh-Hans",
  6171. range: [
  6172. { value: "zh-Hans", text: "中文" },
  6173. { value: "en", text: "English" }
  6174. ]
  6175. };
  6176. },
  6177. created() {
  6178. },
  6179. mounted() {
  6180. this.appLanguage = uni.getStorageSync("userLanguage") || "zh-Hans";
  6181. },
  6182. computed: {
  6183. // 使用 mapState 映射多个状态到组件的计算属性
  6184. ...mapState(["formattedTime", "status", "selectorid", "selectorindex"]),
  6185. ...mapState({
  6186. uidatasdata: (state2) => state2.uidatasdata
  6187. })
  6188. },
  6189. onLoad() {
  6190. uni.getSystemInfo({
  6191. success: (res) => {
  6192. formatAppLog("log", "at pages/index/index.vue:239", res);
  6193. this.appVersion = res.appWgtVersion;
  6194. },
  6195. fail: (err) => {
  6196. formatAppLog("error", "at pages/index/index.vue:243", "获取系统信息失败:", err);
  6197. }
  6198. });
  6199. },
  6200. beforeUnmount() {
  6201. clearInterval(this.uidatas);
  6202. },
  6203. methods: {
  6204. changeLanguage(locale) {
  6205. formatAppLog("log", "at pages/index/index.vue:253", locale);
  6206. this.$i18n.locale = locale;
  6207. uni.setStorageSync("userLanguage", locale);
  6208. },
  6209. onclick(e2) {
  6210. this.pattern(e2);
  6211. },
  6212. pattern(unm) {
  6213. let data = {
  6214. id: "c32e6a80-9159-4f6e-9acc-8525cf177808",
  6215. issaveinitvalue: true,
  6216. value: unm + ""
  6217. // 直流供电=1,直流补电=4,交流供电=2,交流补电=3
  6218. };
  6219. control(data).then((data2) => {
  6220. formatAppLog("log", "at pages/index/index.vue:267", data2);
  6221. if (data2.status == "ok") {
  6222. if (unm == 3) {
  6223. uni.redirectTo({
  6224. url: "/pages/home/index"
  6225. });
  6226. } else if (unm == 2) {
  6227. uni.redirectTo({
  6228. url: "/pages/electricity/index"
  6229. });
  6230. } else if (unm == 4) {
  6231. uni.redirectTo({
  6232. url: "/pages/supply/supply"
  6233. });
  6234. } else if (unm == 1) {
  6235. uni.redirectTo({
  6236. url: "/pages/supplyss/supplyss"
  6237. });
  6238. }
  6239. } else {
  6240. this.messageText = "选择模式失败请重新选择";
  6241. this.$refs.message.open();
  6242. return;
  6243. }
  6244. });
  6245. },
  6246. onget(unm) {
  6247. if (unm == 3) {
  6248. uni.redirectTo({
  6249. url: "/pages/home/index"
  6250. });
  6251. } else if (unm == 2) {
  6252. uni.redirectTo({
  6253. url: "/pages/electricity/index"
  6254. });
  6255. } else if (unm == 4) {
  6256. uni.redirectTo({
  6257. url: "/pages/supply/supply"
  6258. });
  6259. } else if (unm == 1) {
  6260. uni.redirectTo({
  6261. url: "/pages/supplyss/supplyss"
  6262. });
  6263. }
  6264. },
  6265. system() {
  6266. uni.redirectTo({
  6267. url: "/pages/faultlist/index"
  6268. });
  6269. }
  6270. }
  6271. };
  6272. function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  6273. const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3);
  6274. const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
  6275. const _component_uni_data_select = resolveEasycom(vue.resolveDynamicComponent("uni-data-select"), __easycom_2);
  6276. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  6277. vue.createElementVNode("view", { class: "top" }, [
  6278. vue.createElementVNode("image", {
  6279. class: "top_logo",
  6280. src: _imports_0,
  6281. mode: ""
  6282. }),
  6283. vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
  6284. vue.createElementVNode(
  6285. "view",
  6286. { class: "tite" },
  6287. vue.toDisplayString(_ctx.$t("MainTitle")),
  6288. 1
  6289. /* TEXT */
  6290. ),
  6291. vue.createElementVNode("view", { class: "time" }, [
  6292. vue.createElementVNode(
  6293. "view",
  6294. { class: "time_top" },
  6295. vue.toDisplayString(_ctx.formattedTime),
  6296. 1
  6297. /* TEXT */
  6298. ),
  6299. vue.createElementVNode("view", { class: "time_bottom" }, [
  6300. vue.createElementVNode("view"),
  6301. vue.createElementVNode("view", { class: "time_bottom1" }, [
  6302. vue.createTextVNode(
  6303. vue.toDisplayString(_ctx.$t("status")) + " ",
  6304. 1
  6305. /* TEXT */
  6306. ),
  6307. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  6308. "view",
  6309. {
  6310. key: 0,
  6311. class: "time_state"
  6312. },
  6313. vue.toDisplayString(_ctx.$t("online")),
  6314. 1
  6315. /* TEXT */
  6316. )) : (vue.openBlock(), vue.createElementBlock(
  6317. "view",
  6318. {
  6319. key: 1,
  6320. class: "time_state1"
  6321. },
  6322. vue.toDisplayString(_ctx.$t("offline")),
  6323. 1
  6324. /* TEXT */
  6325. ))
  6326. ])
  6327. ])
  6328. ])
  6329. ]),
  6330. vue.createElementVNode("view", { class: "tap" }, [
  6331. vue.createElementVNode("view", { class: "tap_1" }, " AC "),
  6332. vue.createElementVNode("view", { class: "tap_2" }, " DC "),
  6333. vue.createElementVNode("view", { class: "tap_3" }, " SYS ")
  6334. ]),
  6335. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock("view", {
  6336. key: 0,
  6337. class: "power"
  6338. }, [
  6339. 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> '),
  6340. _ctx.selectorid != 3 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
  6341. vue.createElementVNode("view", { class: "power_1" }, [
  6342. vue.createElementVNode("view", { class: "power_bj" }, [
  6343. vue.createElementVNode("image", {
  6344. src: _imports_1$5,
  6345. mode: ""
  6346. })
  6347. ]),
  6348. vue.createElementVNode(
  6349. "view",
  6350. { class: "power_title" },
  6351. vue.toDisplayString(_ctx.$t("CommunicationRecharge")),
  6352. 1
  6353. /* TEXT */
  6354. )
  6355. ])
  6356. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  6357. key: 1,
  6358. onClick: _cache[0] || (_cache[0] = ($event) => $options.onclick(3))
  6359. }, [
  6360. vue.createElementVNode("view", { class: "power_1" }, [
  6361. vue.createElementVNode("view", { class: "power_bright" }, [
  6362. vue.createElementVNode("image", {
  6363. src: _imports_2$3,
  6364. mode: ""
  6365. })
  6366. ]),
  6367. vue.createElementVNode(
  6368. "view",
  6369. { class: "power_title_bright" },
  6370. vue.toDisplayString(_ctx.$t("CommunicationRecharge")),
  6371. 1
  6372. /* TEXT */
  6373. )
  6374. ])
  6375. ])),
  6376. _ctx.selectorid != 2 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, [
  6377. vue.createElementVNode("view", { class: "power_1" }, [
  6378. vue.createElementVNode("view", { class: "power_bj" }, [
  6379. vue.createElementVNode("image", {
  6380. src: _imports_3$4,
  6381. mode: ""
  6382. })
  6383. ]),
  6384. vue.createElementVNode(
  6385. "view",
  6386. { class: "power_title" },
  6387. vue.toDisplayString(_ctx.$t("CommunicationSupply")),
  6388. 1
  6389. /* TEXT */
  6390. )
  6391. ])
  6392. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  6393. key: 3,
  6394. onClick: _cache[1] || (_cache[1] = ($event) => $options.onclick(2))
  6395. }, [
  6396. vue.createElementVNode("view", { class: "power_1" }, [
  6397. vue.createElementVNode("view", { class: "power_bright" }, [
  6398. vue.createElementVNode("image", {
  6399. src: _imports_4$2,
  6400. mode: ""
  6401. })
  6402. ]),
  6403. vue.createElementVNode(
  6404. "view",
  6405. { class: "power_title_bright" },
  6406. vue.toDisplayString(_ctx.$t("CommunicationSupply")),
  6407. 1
  6408. /* TEXT */
  6409. )
  6410. ])
  6411. ])),
  6412. _ctx.selectorid != 4 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, [
  6413. vue.createElementVNode("view", { class: "power_1" }, [
  6414. vue.createElementVNode("view", { class: "power_bj" }, [
  6415. vue.createElementVNode("image", {
  6416. src: _imports_5$1,
  6417. mode: ""
  6418. })
  6419. ]),
  6420. vue.createElementVNode(
  6421. "view",
  6422. { class: "power_title" },
  6423. vue.toDisplayString(_ctx.$t("DirectRecharge")),
  6424. 1
  6425. /* TEXT */
  6426. )
  6427. ])
  6428. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  6429. key: 5,
  6430. onClick: _cache[2] || (_cache[2] = ($event) => $options.onclick(4))
  6431. }, [
  6432. vue.createElementVNode("view", { class: "power_1" }, [
  6433. vue.createElementVNode("view", { class: "power_bright" }, [
  6434. vue.createElementVNode("image", {
  6435. src: _imports_6$1,
  6436. mode: ""
  6437. })
  6438. ]),
  6439. vue.createElementVNode(
  6440. "view",
  6441. { class: "power_title_bright" },
  6442. vue.toDisplayString(_ctx.$t("DirectRecharge")),
  6443. 1
  6444. /* TEXT */
  6445. )
  6446. ])
  6447. ])),
  6448. _ctx.selectorid != 1 && _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, [
  6449. vue.createElementVNode("view", { class: "power_1" }, [
  6450. vue.createElementVNode("view", { class: "power_bj" }, [
  6451. vue.createElementVNode("image", {
  6452. src: _imports_7$1,
  6453. mode: ""
  6454. })
  6455. ]),
  6456. vue.createElementVNode(
  6457. "view",
  6458. { class: "power_title" },
  6459. vue.toDisplayString(_ctx.$t("DirectSupply")),
  6460. 1
  6461. /* TEXT */
  6462. )
  6463. ])
  6464. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  6465. key: 7,
  6466. onClick: _cache[3] || (_cache[3] = ($event) => $options.onclick(1))
  6467. }, [
  6468. vue.createElementVNode("view", { class: "power_1" }, [
  6469. vue.createElementVNode("view", { class: "power_bright" }, [
  6470. vue.createElementVNode("image", {
  6471. src: _imports_8$1,
  6472. mode: ""
  6473. })
  6474. ]),
  6475. vue.createElementVNode(
  6476. "view",
  6477. { class: "power_title_bright" },
  6478. vue.toDisplayString(_ctx.$t("DirectSupply")),
  6479. 1
  6480. /* TEXT */
  6481. )
  6482. ])
  6483. ])),
  6484. vue.createElementVNode("view", {
  6485. class: "power_5",
  6486. onClick: _cache[4] || (_cache[4] = (...args) => $options.system && $options.system(...args))
  6487. }, [
  6488. vue.createElementVNode("view", { class: "power_bj" }, [
  6489. vue.createElementVNode("image", {
  6490. src: _imports_9$1,
  6491. mode: ""
  6492. })
  6493. ]),
  6494. vue.createElementVNode(
  6495. "view",
  6496. { class: "power_title" },
  6497. vue.toDisplayString(_ctx.$t("SystemInformation")),
  6498. 1
  6499. /* TEXT */
  6500. )
  6501. ])
  6502. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  6503. key: 1,
  6504. class: "power"
  6505. }, [
  6506. vue.createElementVNode("view", null, [
  6507. vue.createElementVNode("view", { class: "power_1" }, [
  6508. vue.createCommentVNode(' <view class="power_bj" @click="onget(3)"> '),
  6509. vue.createElementVNode("view", { class: "power_bj" }, [
  6510. vue.createElementVNode("image", {
  6511. src: _imports_1$5,
  6512. mode: ""
  6513. })
  6514. ]),
  6515. vue.createElementVNode(
  6516. "view",
  6517. { class: "power_title" },
  6518. vue.toDisplayString(_ctx.$t("CommunicationRecharge")),
  6519. 1
  6520. /* TEXT */
  6521. )
  6522. ])
  6523. ]),
  6524. vue.createElementVNode("view", null, [
  6525. vue.createElementVNode("view", { class: "power_1" }, [
  6526. vue.createCommentVNode(' <view class="power_bj" @click="onget(2)"> '),
  6527. vue.createElementVNode("view", { class: "power_bj" }, [
  6528. vue.createElementVNode("image", {
  6529. src: _imports_3$4,
  6530. mode: ""
  6531. })
  6532. ]),
  6533. vue.createElementVNode(
  6534. "view",
  6535. { class: "power_title" },
  6536. vue.toDisplayString(_ctx.$t("CommunicationSupply")),
  6537. 1
  6538. /* TEXT */
  6539. )
  6540. ])
  6541. ]),
  6542. vue.createElementVNode("view", null, [
  6543. vue.createElementVNode("view", { class: "power_1" }, [
  6544. vue.createCommentVNode(' <view class="power_bj" @click="onget(4)"> '),
  6545. vue.createElementVNode("view", { class: "power_bj" }, [
  6546. vue.createElementVNode("image", {
  6547. src: _imports_5$1,
  6548. mode: ""
  6549. })
  6550. ]),
  6551. vue.createElementVNode(
  6552. "view",
  6553. { class: "power_title" },
  6554. vue.toDisplayString(_ctx.$t("DirectRecharge")),
  6555. 1
  6556. /* TEXT */
  6557. )
  6558. ])
  6559. ]),
  6560. vue.createElementVNode("view", null, [
  6561. vue.createCommentVNode(' <view class="power_1" @click="onget(1)"> '),
  6562. vue.createElementVNode("view", { class: "power_1" }, [
  6563. vue.createElementVNode("view", { class: "power_bj" }, [
  6564. vue.createElementVNode("image", {
  6565. src: _imports_7$1,
  6566. mode: ""
  6567. })
  6568. ]),
  6569. vue.createElementVNode(
  6570. "view",
  6571. { class: "power_title" },
  6572. vue.toDisplayString(_ctx.$t("DirectSupply")),
  6573. 1
  6574. /* TEXT */
  6575. )
  6576. ])
  6577. ]),
  6578. vue.createElementVNode("view", {
  6579. class: "power_5",
  6580. onClick: _cache[5] || (_cache[5] = (...args) => $options.system && $options.system(...args))
  6581. }, [
  6582. vue.createElementVNode("view", { class: "power_bj" }, [
  6583. vue.createElementVNode("image", {
  6584. src: _imports_9$1,
  6585. mode: ""
  6586. })
  6587. ]),
  6588. vue.createElementVNode(
  6589. "view",
  6590. { class: "power_title" },
  6591. vue.toDisplayString(_ctx.$t("SystemInformation")),
  6592. 1
  6593. /* TEXT */
  6594. )
  6595. ])
  6596. ])),
  6597. _ctx.selectorindex == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  6598. key: 2,
  6599. class: "power_6"
  6600. }, [
  6601. vue.createElementVNode("image", {
  6602. src: _imports_10$2,
  6603. mode: ""
  6604. }),
  6605. vue.createTextVNode(
  6606. vue.toDisplayString(_ctx.$t("Tipswarning")),
  6607. 1
  6608. /* TEXT */
  6609. )
  6610. ])) : vue.createCommentVNode("v-if", true),
  6611. vue.createVNode(
  6612. _component_uni_popup,
  6613. {
  6614. ref: "message",
  6615. type: "message"
  6616. },
  6617. {
  6618. default: vue.withCtx(() => [
  6619. vue.createVNode(_component_uni_popup_message, {
  6620. type: "error",
  6621. message: $data.messageText,
  6622. duration: 2500
  6623. }, null, 8, ["message"])
  6624. ]),
  6625. _: 1
  6626. /* STABLE */
  6627. },
  6628. 512
  6629. /* NEED_PATCH */
  6630. ),
  6631. vue.createElementVNode("view", { class: "switch-container" }, [
  6632. vue.createVNode(_component_uni_data_select, {
  6633. modelValue: $data.appLanguage,
  6634. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.appLanguage = $event),
  6635. localdata: $data.range,
  6636. clear: false,
  6637. onChange: $options.changeLanguage
  6638. }, null, 8, ["modelValue", "localdata", "onChange"])
  6639. ]),
  6640. vue.createElementVNode(
  6641. "view",
  6642. { class: "appVersioncss" },
  6643. vue.toDisplayString(_ctx.$t("version")) + vue.toDisplayString($data.appVersion),
  6644. 1
  6645. /* TEXT */
  6646. )
  6647. ]);
  6648. }
  6649. const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-1cf27b2a"], ["__file", "D:/project/esswisdom_ipad_V2/pages/index/index.vue"]]);
  6650. const _sfc_main$b = {
  6651. name: "cmd-progress",
  6652. props: {
  6653. /**
  6654. * 类型默认:line,可选 line circle dashboard
  6655. */
  6656. type: {
  6657. validator: (val) => {
  6658. return ["line", "circle", "dashboard"].includes(val);
  6659. },
  6660. default: "line"
  6661. },
  6662. /**
  6663. * 百分比
  6664. */
  6665. percent: {
  6666. type: Number,
  6667. default: 0
  6668. },
  6669. /**
  6670. * 已完成的分段百分,仅支持类型line
  6671. */
  6672. successPercent: {
  6673. type: Number,
  6674. default: 0
  6675. },
  6676. /**
  6677. * 是否显示进度数值或状态图标
  6678. */
  6679. showInfo: {
  6680. type: Boolean,
  6681. default: true
  6682. },
  6683. /**
  6684. * 进度状态,可选:normal success exception (active仅支持类型line
  6685. */
  6686. status: {
  6687. validator: (val) => {
  6688. return ["normal", "success", "exception", "active"].includes(val);
  6689. },
  6690. default: "normal"
  6691. },
  6692. /**
  6693. * 条线的宽度1-50,与width有关
  6694. */
  6695. strokeWidth: {
  6696. type: Number,
  6697. default: 6
  6698. },
  6699. /**
  6700. * 条线的颜色,渐变色仅支持类型line
  6701. */
  6702. strokeColor: {
  6703. type: String,
  6704. default: ""
  6705. },
  6706. /**
  6707. * 条线两端的形状 可选:'round', 'square'
  6708. */
  6709. strokeShape: {
  6710. validator: (val) => {
  6711. return ["round", "square"].includes(val);
  6712. },
  6713. default: "round"
  6714. },
  6715. /**
  6716. * 圆形进度条画布宽度,支持类型circle dashboard
  6717. */
  6718. width: {
  6719. type: Number,
  6720. default: 80
  6721. },
  6722. /**
  6723. * 圆形进度条缺口角度,可取值 0 ~ 360,支持类型circle dashboard
  6724. */
  6725. gapDegree: {
  6726. type: Number,
  6727. default: 120
  6728. },
  6729. /**
  6730. * 圆形进度条缺口位置,可取值'top', 'bottom', 'left', 'right' ,支持类型circle dashboard
  6731. */
  6732. gapPosition: {
  6733. validator: (val) => {
  6734. return ["top", "bottom", "left", "right"].includes(val);
  6735. },
  6736. default: "top"
  6737. }
  6738. },
  6739. computed: {
  6740. /**
  6741. * 如果需要自定义格式就在这改
  6742. */
  6743. setFormat() {
  6744. return `${this.setProgress}%`;
  6745. },
  6746. /**
  6747. * 设置显示进度值,禁止小于0和超过100
  6748. */
  6749. setProgress() {
  6750. let percent = this.percent;
  6751. if (!this.percent || this.percent < 0) {
  6752. percent = 0;
  6753. } else if (this.percent >= 100) {
  6754. percent = 100;
  6755. }
  6756. return percent;
  6757. },
  6758. /**
  6759. * 进度圈svg大小
  6760. */
  6761. setCircleStyle() {
  6762. return `width: ${this.width}px;
  6763. height: ${this.width}px;
  6764. fontSize: ${this.width * 0.15 + 6}px;`;
  6765. },
  6766. /**
  6767. * 圈底色
  6768. */
  6769. setCircleTrailStyle() {
  6770. const radius = 50 - this.strokeWidth / 2;
  6771. const len = Math.PI * 2 * radius;
  6772. const gapDeg = this.gapDegree || this.type === "dashboard" && 75;
  6773. return `stroke-dasharray: ${len - (gapDeg || 0)}px, ${len}px;
  6774. stroke-dashoffset: -${(gapDeg || 0) / 2}px;
  6775. transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s;`;
  6776. },
  6777. /**
  6778. * 圈进度
  6779. */
  6780. setCirclePathStyle() {
  6781. const radius = 50 - this.strokeWidth / 2;
  6782. const len = Math.PI * 2 * radius;
  6783. const gapDeg = this.gapDegree || this.type === "dashboard" && 75;
  6784. return `stroke: ${this.strokeColor};
  6785. stroke-dasharray: ${this.setProgress / 100 * (len - (gapDeg || 0))}px, ${len}px;
  6786. stroke-dashoffset: -${(gapDeg || 0) / 2}px;
  6787. transition: stroke-dashoffset 0.3s ease 0s, stroke-dasharray 0.3s ease 0s, stroke 0.3s, stroke-width 0.06s ease 0.3s;`;
  6788. },
  6789. /**
  6790. * 绘制圈
  6791. */
  6792. setCirclePath() {
  6793. const radius = 50 - this.strokeWidth / 2;
  6794. let beginPositionX = 0;
  6795. let beginPositionY = -radius;
  6796. let endPositionX = 0;
  6797. let endPositionY = -2 * radius;
  6798. const gapPos = this.type === "dashboard" && "bottom" || this.gapPosition || "top";
  6799. switch (gapPos) {
  6800. case "left":
  6801. beginPositionX = -radius;
  6802. beginPositionY = 0;
  6803. endPositionX = 2 * radius;
  6804. endPositionY = 0;
  6805. break;
  6806. case "right":
  6807. beginPositionX = radius;
  6808. beginPositionY = 0;
  6809. endPositionX = -2 * radius;
  6810. endPositionY = 0;
  6811. break;
  6812. case "bottom":
  6813. beginPositionY = radius;
  6814. endPositionY = 2 * radius;
  6815. break;
  6816. }
  6817. return `M 50,50 m ${beginPositionX},${beginPositionY} a ${radius},${radius} 0 1 1 ${endPositionX},${-endPositionY} a ${radius},${radius} 0 1 1 ${-endPositionX},${endPositionY}`;
  6818. },
  6819. /**
  6820. * 非H5端,绘制进度圈svg转base URL
  6821. */
  6822. setCircle() {
  6823. const radius = 50 - this.strokeWidth / 2;
  6824. const len = Math.PI * 2 * radius;
  6825. const gapDeg = this.gapDegree || this.type === "dashboard" && 75;
  6826. let currentColor = "#108ee9";
  6827. if (this.status == "exception") {
  6828. currentColor = "#f5222d";
  6829. }
  6830. if (this.status == "success" || this.setProgress >= 100 || this.strokeColor) {
  6831. currentColor = this.strokeColor || "#52c41a";
  6832. }
  6833. 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`;
  6834. return `background-image: url("${svgToBase}");
  6835. background-size: cover;
  6836. display: inline-block;
  6837. ${this.setCircleStyle}`;
  6838. },
  6839. /**
  6840. * 设置进度圈状态图标
  6841. */
  6842. setCircleIcon() {
  6843. let currentColor = "#108ee9";
  6844. let svgToBase = "";
  6845. if (this.status == "exception") {
  6846. currentColor = "#f5222d";
  6847. 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`;
  6848. }
  6849. if (this.status == "success" || this.setProgress >= 100) {
  6850. currentColor = this.strokeColor || "#52c41a";
  6851. 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`;
  6852. }
  6853. return `background-image: url("${svgToBase}");
  6854. background-size: cover;
  6855. display: inline-block;
  6856. width: 1em;
  6857. height: 1em;`;
  6858. },
  6859. /**
  6860. * 设置进度条样式
  6861. */
  6862. setLineStyle() {
  6863. return `width: ${this.setProgress}%;
  6864. height: ${this.strokeWidth}px;
  6865. background: ${this.strokeColor};
  6866. border-radius: ${this.strokeShape === "square" ? 0 : "100px"};`;
  6867. },
  6868. /**
  6869. * 设置已完成分段进度
  6870. */
  6871. setLineSuccessStyle() {
  6872. let successPercent = this.successPercent;
  6873. if (!this.successPercent || this.successPercent < 0 || this.setProgress < this.successPercent) {
  6874. successPercent = 0;
  6875. } else if (this.successPercent >= 100) {
  6876. successPercent = 100;
  6877. }
  6878. return `width: ${successPercent}%;
  6879. height: ${this.strokeWidth}px;
  6880. border-radius: ${this.strokeShape === "square" ? 0 : "100px"};`;
  6881. },
  6882. /**
  6883. * 设置进度条状态图标
  6884. */
  6885. setLineStatusIcon() {
  6886. let currentColor = "#108ee9";
  6887. let svgToBase = "";
  6888. if (this.status == "exception") {
  6889. currentColor = "#f5222d";
  6890. 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`;
  6891. }
  6892. if (this.status == "success" || this.setProgress >= 100) {
  6893. currentColor = this.strokeColor || "#52c41a";
  6894. 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`;
  6895. }
  6896. return `background-image: url("${svgToBase}");
  6897. background-size: cover;
  6898. display: inline-block;
  6899. width: 1em;
  6900. height: 1em;`;
  6901. },
  6902. /**
  6903. * 状态样式
  6904. */
  6905. setStatusClass() {
  6906. let statusClass = [];
  6907. if (this.status == "exception") {
  6908. statusClass.push("cmd-progress-status-exception");
  6909. }
  6910. if (this.status == "success" || this.setProgress >= 100) {
  6911. statusClass.push("cmd-progress-status-success");
  6912. }
  6913. if (this.status == "active") {
  6914. statusClass.push("cmd-progress-status-active");
  6915. }
  6916. if (this.showInfo) {
  6917. statusClass.push("cmd-progress-show-info");
  6918. }
  6919. if (this.type === "line") {
  6920. statusClass.push("cmd-progress-line");
  6921. }
  6922. if (this.type === "circle" || this.type === "dashboard") {
  6923. statusClass.push("cmd-progress-circle");
  6924. }
  6925. statusClass.push("cmd-progress-status-normal");
  6926. return statusClass;
  6927. }
  6928. }
  6929. };
  6930. function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  6931. return vue.openBlock(), vue.createElementBlock(
  6932. "view",
  6933. {
  6934. class: vue.normalizeClass(["cmd-progress cmd-progress-default", $options.setStatusClass])
  6935. },
  6936. [
  6937. $props.type == "circle" || $props.type == "dashboard" ? (vue.openBlock(), vue.createElementBlock(
  6938. "view",
  6939. {
  6940. key: 0,
  6941. class: vue.normalizeClass(["cmd-progress cmd-progress-default", $options.setStatusClass])
  6942. },
  6943. [
  6944. vue.createElementVNode(
  6945. "view",
  6946. {
  6947. class: "cmd-progress-inner",
  6948. style: vue.normalizeStyle($options.setCircleStyle)
  6949. },
  6950. [
  6951. vue.createCommentVNode(" 绘制圈 start "),
  6952. vue.createElementVNode(
  6953. "text",
  6954. {
  6955. style: vue.normalizeStyle($options.setCircle)
  6956. },
  6957. null,
  6958. 4
  6959. /* STYLE */
  6960. ),
  6961. vue.createCommentVNode(" 绘制圈 end "),
  6962. vue.createCommentVNode(" 状态文本 start "),
  6963. $props.showInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  6964. key: 0,
  6965. class: "cmd-progress-text",
  6966. title: $options.setFormat
  6967. }, [
  6968. $props.status != "success" && $props.status != "exception" && $options.setProgress < 100 ? (vue.openBlock(), vue.createElementBlock(
  6969. vue.Fragment,
  6970. { key: 0 },
  6971. [
  6972. vue.createTextVNode(
  6973. vue.toDisplayString($options.setFormat),
  6974. 1
  6975. /* TEXT */
  6976. )
  6977. ],
  6978. 64
  6979. /* STABLE_FRAGMENT */
  6980. )) : vue.createCommentVNode("v-if", true),
  6981. $props.status == "exception" || $props.status == "success" || $options.setProgress == 100 ? (vue.openBlock(), vue.createElementBlock(
  6982. "text",
  6983. {
  6984. key: 1,
  6985. style: vue.normalizeStyle($options.setCircleIcon)
  6986. },
  6987. null,
  6988. 4
  6989. /* STYLE */
  6990. )) : vue.createCommentVNode("v-if", true)
  6991. ], 8, ["title"])) : vue.createCommentVNode("v-if", true),
  6992. vue.createCommentVNode(" 状态文本 end ")
  6993. ],
  6994. 4
  6995. /* STYLE */
  6996. )
  6997. ],
  6998. 2
  6999. /* CLASS */
  7000. )) : vue.createCommentVNode("v-if", true),
  7001. $props.type == "line" ? (vue.openBlock(), vue.createElementBlock(
  7002. vue.Fragment,
  7003. { key: 1 },
  7004. [
  7005. vue.createCommentVNode(" 进度条 start "),
  7006. vue.createElementVNode("view", { class: "cmd-progress-outer" }, [
  7007. vue.createElementVNode(
  7008. "view",
  7009. {
  7010. class: "cmd-progress-inner",
  7011. style: vue.normalizeStyle({ "border-radius": $props.strokeShape == "square" ? 0 : "100px" })
  7012. },
  7013. [
  7014. vue.createElementVNode(
  7015. "view",
  7016. {
  7017. class: "cmd-progress-bg",
  7018. style: vue.normalizeStyle($options.setLineStyle)
  7019. },
  7020. null,
  7021. 4
  7022. /* STYLE */
  7023. ),
  7024. $props.successPercent ? (vue.openBlock(), vue.createElementBlock(
  7025. "view",
  7026. {
  7027. key: 0,
  7028. class: "cmd-progress-success-bg",
  7029. style: vue.normalizeStyle($options.setLineSuccessStyle)
  7030. },
  7031. null,
  7032. 4
  7033. /* STYLE */
  7034. )) : vue.createCommentVNode("v-if", true)
  7035. ],
  7036. 4
  7037. /* STYLE */
  7038. )
  7039. ]),
  7040. vue.createCommentVNode(" 进度条 end "),
  7041. vue.createCommentVNode(" 进度条是否显示信息 start "),
  7042. $props.showInfo ? (vue.openBlock(), vue.createElementBlock("text", {
  7043. key: 0,
  7044. class: "cmd-progress-text",
  7045. title: $options.setFormat
  7046. }, [
  7047. $props.status != "success" && $props.status != "exception" && $options.setProgress < 100 ? (vue.openBlock(), vue.createElementBlock(
  7048. vue.Fragment,
  7049. { key: 0 },
  7050. [
  7051. vue.createTextVNode(
  7052. vue.toDisplayString($options.setFormat),
  7053. 1
  7054. /* TEXT */
  7055. )
  7056. ],
  7057. 64
  7058. /* STABLE_FRAGMENT */
  7059. )) : vue.createCommentVNode("v-if", true),
  7060. $props.status == "exception" || $props.status == "success" || $options.setProgress == 100 ? (vue.openBlock(), vue.createElementBlock(
  7061. "text",
  7062. {
  7063. key: 1,
  7064. style: vue.normalizeStyle($options.setLineStatusIcon)
  7065. },
  7066. null,
  7067. 4
  7068. /* STYLE */
  7069. )) : vue.createCommentVNode("v-if", true)
  7070. ], 8, ["title"])) : vue.createCommentVNode("v-if", true),
  7071. vue.createCommentVNode(" 进度条是否显示信息 end ")
  7072. ],
  7073. 64
  7074. /* STABLE_FRAGMENT */
  7075. )) : vue.createCommentVNode("v-if", true)
  7076. ],
  7077. 2
  7078. /* CLASS */
  7079. );
  7080. }
  7081. const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-06762d5e"], ["__file", "D:/project/esswisdom_ipad_V2/components/cmd-progress/cmd-progress.vue"]]);
  7082. const isObject$2 = (val) => val !== null && typeof val === "object";
  7083. const defaultDelimiters = ["{", "}"];
  7084. class BaseFormatter {
  7085. constructor() {
  7086. this._caches = /* @__PURE__ */ Object.create(null);
  7087. }
  7088. interpolate(message, values, delimiters = defaultDelimiters) {
  7089. if (!values) {
  7090. return [message];
  7091. }
  7092. let tokens = this._caches[message];
  7093. if (!tokens) {
  7094. tokens = parse$1(message, delimiters);
  7095. this._caches[message] = tokens;
  7096. }
  7097. return compile(tokens, values);
  7098. }
  7099. }
  7100. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  7101. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  7102. function parse$1(format2, [startDelimiter, endDelimiter]) {
  7103. const tokens = [];
  7104. let position = 0;
  7105. let text = "";
  7106. while (position < format2.length) {
  7107. let char = format2[position++];
  7108. if (char === startDelimiter) {
  7109. if (text) {
  7110. tokens.push({ type: "text", value: text });
  7111. }
  7112. text = "";
  7113. let sub = "";
  7114. char = format2[position++];
  7115. while (char !== void 0 && char !== endDelimiter) {
  7116. sub += char;
  7117. char = format2[position++];
  7118. }
  7119. const isClosed = char === endDelimiter;
  7120. const type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  7121. tokens.push({ value: sub, type });
  7122. } else {
  7123. text += char;
  7124. }
  7125. }
  7126. text && tokens.push({ type: "text", value: text });
  7127. return tokens;
  7128. }
  7129. function compile(tokens, values) {
  7130. const compiled = [];
  7131. let index = 0;
  7132. const mode = Array.isArray(values) ? "list" : isObject$2(values) ? "named" : "unknown";
  7133. if (mode === "unknown") {
  7134. return compiled;
  7135. }
  7136. while (index < tokens.length) {
  7137. const token = tokens[index];
  7138. switch (token.type) {
  7139. case "text":
  7140. compiled.push(token.value);
  7141. break;
  7142. case "list":
  7143. compiled.push(values[parseInt(token.value, 10)]);
  7144. break;
  7145. case "named":
  7146. if (mode === "named") {
  7147. compiled.push(values[token.value]);
  7148. } else {
  7149. {
  7150. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  7151. }
  7152. }
  7153. break;
  7154. case "unknown":
  7155. {
  7156. console.warn(`Detect 'unknown' type of token!`);
  7157. }
  7158. break;
  7159. }
  7160. index++;
  7161. }
  7162. return compiled;
  7163. }
  7164. const LOCALE_ZH_HANS = "zh-Hans";
  7165. const LOCALE_ZH_HANT = "zh-Hant";
  7166. const LOCALE_EN = "en";
  7167. const LOCALE_FR = "fr";
  7168. const LOCALE_ES = "es";
  7169. const hasOwnProperty$2 = Object.prototype.hasOwnProperty;
  7170. const hasOwn$2 = (val, key) => hasOwnProperty$2.call(val, key);
  7171. const defaultFormatter = new BaseFormatter();
  7172. function include(str, parts) {
  7173. return !!parts.find((part) => str.indexOf(part) !== -1);
  7174. }
  7175. function startsWith(str, parts) {
  7176. return parts.find((part) => str.indexOf(part) === 0);
  7177. }
  7178. function normalizeLocale(locale, messages2) {
  7179. if (!locale) {
  7180. return;
  7181. }
  7182. locale = locale.trim().replace(/_/g, "-");
  7183. if (messages2 && messages2[locale]) {
  7184. return locale;
  7185. }
  7186. locale = locale.toLowerCase();
  7187. if (locale === "chinese") {
  7188. return LOCALE_ZH_HANS;
  7189. }
  7190. if (locale.indexOf("zh") === 0) {
  7191. if (locale.indexOf("-hans") > -1) {
  7192. return LOCALE_ZH_HANS;
  7193. }
  7194. if (locale.indexOf("-hant") > -1) {
  7195. return LOCALE_ZH_HANT;
  7196. }
  7197. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  7198. return LOCALE_ZH_HANT;
  7199. }
  7200. return LOCALE_ZH_HANS;
  7201. }
  7202. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  7203. if (messages2 && Object.keys(messages2).length > 0) {
  7204. locales = Object.keys(messages2);
  7205. }
  7206. const lang = startsWith(locale, locales);
  7207. if (lang) {
  7208. return lang;
  7209. }
  7210. }
  7211. class I18n {
  7212. constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) {
  7213. this.locale = LOCALE_EN;
  7214. this.fallbackLocale = LOCALE_EN;
  7215. this.message = {};
  7216. this.messages = {};
  7217. this.watchers = [];
  7218. if (fallbackLocale) {
  7219. this.fallbackLocale = fallbackLocale;
  7220. }
  7221. this.formater = formater2 || defaultFormatter;
  7222. this.messages = messages2 || {};
  7223. this.setLocale(locale || LOCALE_EN);
  7224. if (watcher) {
  7225. this.watchLocale(watcher);
  7226. }
  7227. }
  7228. setLocale(locale) {
  7229. const oldLocale = this.locale;
  7230. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  7231. if (!this.messages[this.locale]) {
  7232. this.messages[this.locale] = {};
  7233. }
  7234. this.message = this.messages[this.locale];
  7235. if (oldLocale !== this.locale) {
  7236. this.watchers.forEach((watcher) => {
  7237. watcher(this.locale, oldLocale);
  7238. });
  7239. }
  7240. }
  7241. getLocale() {
  7242. return this.locale;
  7243. }
  7244. watchLocale(fn) {
  7245. const index = this.watchers.push(fn) - 1;
  7246. return () => {
  7247. this.watchers.splice(index, 1);
  7248. };
  7249. }
  7250. add(locale, message, override = true) {
  7251. const curMessages = this.messages[locale];
  7252. if (curMessages) {
  7253. if (override) {
  7254. Object.assign(curMessages, message);
  7255. } else {
  7256. Object.keys(message).forEach((key) => {
  7257. if (!hasOwn$2(curMessages, key)) {
  7258. curMessages[key] = message[key];
  7259. }
  7260. });
  7261. }
  7262. } else {
  7263. this.messages[locale] = message;
  7264. }
  7265. }
  7266. f(message, values, delimiters) {
  7267. return this.formater.interpolate(message, values, delimiters).join("");
  7268. }
  7269. t(key, locale, values) {
  7270. let message = this.message;
  7271. if (typeof locale === "string") {
  7272. locale = normalizeLocale(locale, this.messages);
  7273. locale && (message = this.messages[locale]);
  7274. } else {
  7275. values = locale;
  7276. }
  7277. if (!hasOwn$2(message, key)) {
  7278. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  7279. return key;
  7280. }
  7281. return this.formater.interpolate(message[key], values).join("");
  7282. }
  7283. }
  7284. function watchAppLocale(appVm, i18n2) {
  7285. if (appVm.$watchLocale) {
  7286. appVm.$watchLocale((newLocale) => {
  7287. i18n2.setLocale(newLocale);
  7288. });
  7289. } else {
  7290. appVm.$watch(() => appVm.$locale, (newLocale) => {
  7291. i18n2.setLocale(newLocale);
  7292. });
  7293. }
  7294. }
  7295. function getDefaultLocale() {
  7296. if (typeof uni !== "undefined" && uni.getLocale) {
  7297. return uni.getLocale();
  7298. }
  7299. if (typeof global !== "undefined" && global.getLocale) {
  7300. return global.getLocale();
  7301. }
  7302. return LOCALE_EN;
  7303. }
  7304. function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) {
  7305. if (typeof locale !== "string") {
  7306. const options = [
  7307. messages2,
  7308. locale
  7309. ];
  7310. locale = options[0];
  7311. messages2 = options[1];
  7312. }
  7313. if (typeof locale !== "string") {
  7314. locale = getDefaultLocale();
  7315. }
  7316. if (typeof fallbackLocale !== "string") {
  7317. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  7318. }
  7319. const i18n2 = new I18n({
  7320. locale,
  7321. fallbackLocale,
  7322. messages: messages2,
  7323. watcher
  7324. });
  7325. let t2 = (key, values) => {
  7326. if (typeof getApp !== "function") {
  7327. t2 = function(key2, values2) {
  7328. return i18n2.t(key2, values2);
  7329. };
  7330. } else {
  7331. let isWatchedAppLocale = false;
  7332. t2 = function(key2, values2) {
  7333. const appVm = getApp().$vm;
  7334. if (appVm) {
  7335. appVm.$locale;
  7336. if (!isWatchedAppLocale) {
  7337. isWatchedAppLocale = true;
  7338. watchAppLocale(appVm, i18n2);
  7339. }
  7340. }
  7341. return i18n2.t(key2, values2);
  7342. };
  7343. }
  7344. return t2(key, values);
  7345. };
  7346. return {
  7347. i18n: i18n2,
  7348. f(message, values, delimiters) {
  7349. return i18n2.f(message, values, delimiters);
  7350. },
  7351. t(key, values) {
  7352. return t2(key, values);
  7353. },
  7354. add(locale2, message, override = true) {
  7355. return i18n2.add(locale2, message, override);
  7356. },
  7357. watch(fn) {
  7358. return i18n2.watchLocale(fn);
  7359. },
  7360. getLocale() {
  7361. return i18n2.getLocale();
  7362. },
  7363. setLocale(newLocale) {
  7364. return i18n2.setLocale(newLocale);
  7365. }
  7366. };
  7367. }
  7368. const en$2 = {
  7369. "uni-popup.cancel": "cancel",
  7370. "uni-popup.ok": "ok",
  7371. "uni-popup.placeholder": "pleace enter",
  7372. "uni-popup.title": "Hint",
  7373. "uni-popup.shareTitle": "Share to"
  7374. };
  7375. const zhHans$2 = {
  7376. "uni-popup.cancel": "取消",
  7377. "uni-popup.ok": "确定",
  7378. "uni-popup.placeholder": "请输入",
  7379. "uni-popup.title": "提示",
  7380. "uni-popup.shareTitle": "分享到"
  7381. };
  7382. const zhHant$2 = {
  7383. "uni-popup.cancel": "取消",
  7384. "uni-popup.ok": "確定",
  7385. "uni-popup.placeholder": "請輸入",
  7386. "uni-popup.title": "提示",
  7387. "uni-popup.shareTitle": "分享到"
  7388. };
  7389. const messages$2 = {
  7390. en: en$2,
  7391. "zh-Hans": zhHans$2,
  7392. "zh-Hant": zhHant$2
  7393. };
  7394. const {
  7395. t: t$1
  7396. } = initVueI18n(messages$2);
  7397. const _sfc_main$a = {
  7398. name: "uniPopupDialog",
  7399. mixins: [popup],
  7400. emits: ["confirm", "close", "update:modelValue", "input"],
  7401. props: {
  7402. inputType: {
  7403. type: String,
  7404. default: "text"
  7405. },
  7406. showClose: {
  7407. type: Boolean,
  7408. default: true
  7409. },
  7410. modelValue: {
  7411. type: [Number, String],
  7412. default: ""
  7413. },
  7414. placeholder: {
  7415. type: [String, Number],
  7416. default: ""
  7417. },
  7418. type: {
  7419. type: String,
  7420. default: "error"
  7421. },
  7422. mode: {
  7423. type: String,
  7424. default: "base"
  7425. },
  7426. title: {
  7427. type: String,
  7428. default: ""
  7429. },
  7430. content: {
  7431. type: String,
  7432. default: ""
  7433. },
  7434. beforeClose: {
  7435. type: Boolean,
  7436. default: false
  7437. },
  7438. cancelText: {
  7439. type: String,
  7440. default: ""
  7441. },
  7442. confirmText: {
  7443. type: String,
  7444. default: ""
  7445. },
  7446. maxlength: {
  7447. type: Number,
  7448. default: -1
  7449. },
  7450. focus: {
  7451. type: Boolean,
  7452. default: true
  7453. }
  7454. },
  7455. data() {
  7456. return {
  7457. dialogType: "error",
  7458. val: ""
  7459. };
  7460. },
  7461. computed: {
  7462. okText() {
  7463. return this.confirmText || t$1("uni-popup.ok");
  7464. },
  7465. closeText() {
  7466. return this.cancelText || t$1("uni-popup.cancel");
  7467. },
  7468. placeholderText() {
  7469. return this.placeholder || t$1("uni-popup.placeholder");
  7470. },
  7471. titleText() {
  7472. return this.title || t$1("uni-popup.title");
  7473. }
  7474. },
  7475. watch: {
  7476. type(val) {
  7477. this.dialogType = val;
  7478. },
  7479. mode(val) {
  7480. if (val === "input") {
  7481. this.dialogType = "info";
  7482. }
  7483. },
  7484. value(val) {
  7485. if (this.maxlength != -1 && this.mode === "input") {
  7486. this.val = val.slice(0, this.maxlength);
  7487. } else {
  7488. this.val = val;
  7489. }
  7490. },
  7491. val(val) {
  7492. this.$emit("update:modelValue", val);
  7493. }
  7494. },
  7495. created() {
  7496. this.popup.disableMask();
  7497. if (this.mode === "input") {
  7498. this.dialogType = "info";
  7499. this.val = this.value;
  7500. this.val = this.modelValue;
  7501. } else {
  7502. this.dialogType = this.type;
  7503. }
  7504. },
  7505. methods: {
  7506. /**
  7507. * 点击确认按钮
  7508. */
  7509. onOk() {
  7510. if (this.mode === "input") {
  7511. this.$emit("confirm", this.val);
  7512. } else {
  7513. this.$emit("confirm");
  7514. }
  7515. if (this.beforeClose)
  7516. return;
  7517. this.popup.close();
  7518. },
  7519. /**
  7520. * 点击取消按钮
  7521. */
  7522. closeDialog() {
  7523. this.$emit("close");
  7524. if (this.beforeClose)
  7525. return;
  7526. this.popup.close();
  7527. },
  7528. close() {
  7529. this.popup.close();
  7530. }
  7531. }
  7532. };
  7533. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  7534. return vue.openBlock(), vue.createElementBlock("view", { class: "uni-popup-dialog" }, [
  7535. vue.createElementVNode("view", { class: "uni-dialog-title" }, [
  7536. vue.createElementVNode(
  7537. "text",
  7538. {
  7539. class: vue.normalizeClass(["uni-dialog-title-text", ["uni-popup__" + $data.dialogType]])
  7540. },
  7541. vue.toDisplayString($options.titleText),
  7542. 3
  7543. /* TEXT, CLASS */
  7544. )
  7545. ]),
  7546. $props.mode === "base" ? (vue.openBlock(), vue.createElementBlock("view", {
  7547. key: 0,
  7548. class: "uni-dialog-content"
  7549. }, [
  7550. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  7551. vue.createElementVNode(
  7552. "text",
  7553. { class: "uni-dialog-content-text" },
  7554. vue.toDisplayString($props.content),
  7555. 1
  7556. /* TEXT */
  7557. )
  7558. ], true)
  7559. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  7560. key: 1,
  7561. class: "uni-dialog-content"
  7562. }, [
  7563. vue.renderSlot(_ctx.$slots, "default", {}, () => [
  7564. vue.withDirectives(vue.createElementVNode("input", {
  7565. class: "uni-dialog-input",
  7566. maxlength: $props.maxlength,
  7567. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.val = $event),
  7568. type: $props.inputType,
  7569. placeholder: $options.placeholderText,
  7570. focus: $props.focus
  7571. }, null, 8, ["maxlength", "type", "placeholder", "focus"]), [
  7572. [vue.vModelDynamic, $data.val]
  7573. ])
  7574. ], true)
  7575. ])),
  7576. vue.createElementVNode("view", { class: "uni-dialog-button-group" }, [
  7577. $props.showClose ? (vue.openBlock(), vue.createElementBlock("view", {
  7578. key: 0,
  7579. class: "uni-dialog-button",
  7580. onClick: _cache[1] || (_cache[1] = (...args) => $options.closeDialog && $options.closeDialog(...args))
  7581. }, [
  7582. vue.createElementVNode(
  7583. "text",
  7584. { class: "uni-dialog-button-text" },
  7585. vue.toDisplayString($options.closeText),
  7586. 1
  7587. /* TEXT */
  7588. )
  7589. ])) : vue.createCommentVNode("v-if", true),
  7590. vue.createElementVNode(
  7591. "view",
  7592. {
  7593. class: vue.normalizeClass(["uni-dialog-button", $props.showClose ? "uni-border-left" : ""]),
  7594. onClick: _cache[2] || (_cache[2] = (...args) => $options.onOk && $options.onOk(...args))
  7595. },
  7596. [
  7597. vue.createElementVNode(
  7598. "text",
  7599. { class: "uni-dialog-button-text uni-button-color" },
  7600. vue.toDisplayString($options.okText),
  7601. 1
  7602. /* TEXT */
  7603. )
  7604. ],
  7605. 2
  7606. /* CLASS */
  7607. )
  7608. ])
  7609. ]);
  7610. }
  7611. const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-d78c88b7"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue"]]);
  7612. const _imports_1$4 = "/static/dian1.png";
  7613. const _imports_2$2 = "/static/dian2.png";
  7614. const _imports_3$3 = "/static/che.png";
  7615. const _imports_6 = "/static/SOC.png";
  7616. const _imports_7 = "/static/Battery.png";
  7617. const _imports_8 = "/static/setup.png";
  7618. const _imports_1$3 = "/static/home.png";
  7619. const _imports_10$1 = "/static/home1.png";
  7620. const _imports_9 = "/static/Icons2X.png";
  7621. const _imports_10 = "/static/ACin.png";
  7622. const _imports_11 = "/static/20kw1l.png";
  7623. const _imports_12 = "/static/20kw1.png";
  7624. const _imports_13 = "/static/40kw1l.png";
  7625. const _imports_14 = "/static/40kw1.png";
  7626. const _imports_15 = "/static/60kwl.png";
  7627. const _imports_16 = "/static/60kw.png";
  7628. const _imports_17 = "/static/80kwl.png";
  7629. const _imports_18 = "/static/80kw.png";
  7630. const _sfc_main$9 = {
  7631. components: {
  7632. cmdProgress: __easycom_0$1
  7633. },
  7634. data() {
  7635. return {
  7636. successtype: "success",
  7637. confirmText: "确认启动",
  7638. title: "你确定要开启该设备吗?",
  7639. content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
  7640. value: "",
  7641. modeinput: "",
  7642. segmented: 1,
  7643. uidatas: "",
  7644. formatTimeid: "",
  7645. faultsdata: [],
  7646. SysFaultState: true,
  7647. currentDate: "",
  7648. ACcurrentoutputchoice: 0
  7649. };
  7650. },
  7651. onLoad() {
  7652. this.confirmText = this.$t("ConfirmStart");
  7653. this.title = this.$t("popUpTitle");
  7654. this.content = this.$t("popUpContent");
  7655. },
  7656. computed: {
  7657. // 使用 mapState 映射多个状态到组件的计算属性
  7658. ...mapState(["formattedTime", "status"]),
  7659. ...mapState({
  7660. uidatasdata: (state2) => state2.uidatasdata
  7661. })
  7662. },
  7663. mounted() {
  7664. },
  7665. beforeUnmount() {
  7666. if (this.scrollInterval) {
  7667. clearInterval(this.scrollInterval);
  7668. }
  7669. },
  7670. watch: {
  7671. uidatasdata: {
  7672. handler(newVal, oldVal) {
  7673. formatAppLog("log", "at pages/home/index.vue:739", "uidatasdata 发生变化:", newVal);
  7674. if (newVal.SysState_SysFaultState == 1 && this.SysFaultState) {
  7675. this.SysFaultState = false;
  7676. setTimeout(() => {
  7677. this.onfaultsdata();
  7678. }, 1e3);
  7679. } else if (newVal.SysState_SysFaultState == 0) {
  7680. this.SysFaultState = true;
  7681. }
  7682. },
  7683. deep: true
  7684. // 监听深层次的变化
  7685. }
  7686. },
  7687. methods: {
  7688. handleDataChange(newData) {
  7689. formatAppLog("log", "at pages/home/index.vue:759", "数据变化处理:", newData);
  7690. },
  7691. onfaultsdata() {
  7692. let data = {
  7693. page: 1,
  7694. rows: 10,
  7695. device: "",
  7696. starttime: "",
  7697. endtime: "",
  7698. rt: 1,
  7699. type: "故障"
  7700. };
  7701. getfaultsList(data).then((res) => {
  7702. formatAppLog("log", "at pages/home/index.vue:773", res);
  7703. if (res.status == "ok") {
  7704. this.faultsdata = [];
  7705. for (var i2 = 0; i2 < res.data.list.length; i2++) {
  7706. if (this.$store.state.formattedTime.substring(0, 10) == res.data.list[i2].FAULTTIME.substring(0, 10)) {
  7707. this.faultsdata.push(res.data.list[i2]);
  7708. }
  7709. }
  7710. }
  7711. });
  7712. },
  7713. // 返回首页
  7714. onreturn() {
  7715. uni.redirectTo({
  7716. url: "/pages/index/index"
  7717. });
  7718. },
  7719. // 启动设备弹窗
  7720. dialogToggle() {
  7721. this.modeinput = "base";
  7722. this.successtype = "success";
  7723. this.confirmText = this.$t("ConfirmStart");
  7724. this.title = this.$t("popUpTitle");
  7725. this.content = this.$t("popUpContent");
  7726. this.$refs.alertDialog.open();
  7727. },
  7728. // 关闭设备弹窗
  7729. onstopit() {
  7730. this.modeinput = "base";
  7731. this.successtype = "error";
  7732. this.confirmText = this.$t("ConfirmStop");
  7733. this.title = this.$t("popUpTitleStop");
  7734. this.content = this.$t("popUpContentStop");
  7735. this.$refs.alertDialog.open();
  7736. },
  7737. // AC补电功率取消按钮
  7738. unipopupclose() {
  7739. this.ACcurrentoutputchoice = 0;
  7740. this.$refs.alertDialog1.close();
  7741. },
  7742. onunipopup() {
  7743. let data = {
  7744. id: "e612195b-cf9e-418b-9e2d-0fbae9b03ffa",
  7745. issaveinitvalue: false,
  7746. value: this.ACcurrentoutputchoice + ""
  7747. };
  7748. formatAppLog("log", "at pages/home/index.vue:824", data);
  7749. control(data).then((res) => {
  7750. formatAppLog("log", "at pages/home/index.vue:826", res);
  7751. if (res.status == "ok") {
  7752. this.ACcurrentoutputchoice = 0;
  7753. this.$refs.alertDialog1.close();
  7754. uni.showToast({
  7755. title: this.$t("OperationSuccessful"),
  7756. icon: "none",
  7757. duration: 2e3
  7758. // 显示时长,单位为毫秒
  7759. });
  7760. } else {
  7761. this.ACcurrentoutputchoice = 0;
  7762. this.$refs.alertDialog1.close();
  7763. uni.showToast({
  7764. title: this.$t("operationFailed"),
  7765. icon: "none",
  7766. // 使用 'none' 图标来表示失败
  7767. duration: 2e3
  7768. // 显示时长,单位为毫秒
  7769. });
  7770. }
  7771. });
  7772. },
  7773. onpower() {
  7774. this.$refs.alertDialog1.open();
  7775. },
  7776. // 确定
  7777. // dialogConfirm() {
  7778. // let data = {
  7779. // id: "c35c4db0-113f-442a-9e26-728489265fdb",
  7780. // issaveinitvalue: false,
  7781. // value: this.content == this.$t('popUpContent') ? '1' : '0'
  7782. // }
  7783. // control(data).then(data => {
  7784. // __f__('log','at pages/home/index.vue:866',data);
  7785. // if (data.status == 'ok') {
  7786. // this.$refs.alertDialog.close()
  7787. // uni.showToast({
  7788. // title: this.$t('OperationSuccessful'),
  7789. // icon: 'none',
  7790. // duration: 2000, // 显示时长,单位为毫秒
  7791. // });
  7792. // if (this.content == this.$t('popUpContent')) {
  7793. // this.ACcurrentoutputchoice = 0,
  7794. // onunipopup()
  7795. // }
  7796. // } else {
  7797. // this.$refs.alertDialog.close()
  7798. // uni.showToast({
  7799. // title: this.$t('operationFailed'),
  7800. // icon: 'none', // 使用 'none' 图标来表示失败
  7801. // duration: 2000, // 显示时长,单位为毫秒
  7802. // });
  7803. // }
  7804. // });
  7805. // },
  7806. // 确定
  7807. dialogConfirm() {
  7808. formatAppLog("log", "at pages/home/index.vue:893", this.content);
  7809. formatAppLog("log", "at pages/home/index.vue:894", this.$t("popUpContent"));
  7810. if (this.content == this.$t("popUpContent") && this.title != this.$t("ACinputpowergiven")) {
  7811. let data = {
  7812. id: "c35c4db0-113f-442a-9e26-728489265fdb",
  7813. issaveinitvalue: false,
  7814. value: "1"
  7815. };
  7816. control(data).then((data2) => {
  7817. formatAppLog("log", "at pages/home/index.vue:904", data2);
  7818. if (data2.status == "ok") {
  7819. this.$refs.alertDialog.close();
  7820. uni.showToast({
  7821. title: this.$t("OperationSuccessful"),
  7822. icon: "none",
  7823. duration: 2e3
  7824. // 显示时长,单位为毫秒
  7825. });
  7826. this.ACcurrentoutputchoice = "0", onunipopup();
  7827. } else {
  7828. this.$refs.alertDialog.close();
  7829. uni.showToast({
  7830. title: this.$t("operationFailed"),
  7831. icon: "none",
  7832. // 使用 'none' 图标来表示失败
  7833. duration: 2e3
  7834. // 显示时长,单位为毫秒
  7835. });
  7836. }
  7837. });
  7838. } else {
  7839. let data = {
  7840. id: "e612195b-cf9e-418b-9e2d-0fbae9b03ffa",
  7841. issaveinitvalue: false,
  7842. value: "0"
  7843. };
  7844. formatAppLog("log", "at pages/home/index.vue:933", data);
  7845. control(data).then((res) => {
  7846. formatAppLog("log", "at pages/home/index.vue:935", res);
  7847. if (res.status == "ok") {
  7848. let info = {
  7849. id: "c35c4db0-113f-442a-9e26-728489265fdb",
  7850. issaveinitvalue: false,
  7851. value: "0"
  7852. };
  7853. control(info).then((ress) => {
  7854. formatAppLog("log", "at pages/home/index.vue:943", ress);
  7855. if (ress.status == "ok") {
  7856. this.$refs.alertDialog.close();
  7857. uni.showToast({
  7858. title: this.$t("OperationSuccessful"),
  7859. icon: "none",
  7860. duration: 2e3
  7861. // 显示时长,单位为毫秒
  7862. });
  7863. } else {
  7864. this.$refs.alertDialog.close();
  7865. uni.showToast({
  7866. title: this.$t("operationFailed"),
  7867. icon: "none",
  7868. // 使用 'none' 图标来表示失败
  7869. duration: 2e3
  7870. // 显示时长,单位为毫秒
  7871. });
  7872. }
  7873. });
  7874. } else {
  7875. this.$refs.alertDialog.close();
  7876. uni.showToast({
  7877. title: this.$t("operationFailed"),
  7878. icon: "none",
  7879. // 使用 'none' 图标来表示失败
  7880. duration: 2e3
  7881. // 显示时长,单位为毫秒
  7882. });
  7883. }
  7884. });
  7885. }
  7886. },
  7887. dialogClose() {
  7888. this.$refs.alertDialog.close();
  7889. if (this.title == this.$t("ACinputpowergiven")) {
  7890. plus.navigator.hideSystemNavigation();
  7891. }
  7892. },
  7893. ontap(e2) {
  7894. formatAppLog("log", "at pages/home/index.vue:997", e2);
  7895. this.segmented = e2;
  7896. },
  7897. // AC补点弹窗
  7898. clickACcurrentoutput(value) {
  7899. this.ACcurrentoutputchoice = value;
  7900. }
  7901. }
  7902. };
  7903. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  7904. const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
  7905. const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
  7906. const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
  7907. const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3);
  7908. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  7909. vue.createElementVNode("view", { class: "top" }, [
  7910. vue.createElementVNode("image", {
  7911. class: "top_logo",
  7912. src: _imports_0,
  7913. mode: ""
  7914. }),
  7915. vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
  7916. vue.createElementVNode(
  7917. "view",
  7918. { class: "tite" },
  7919. vue.toDisplayString(_ctx.$t("MainTitle")),
  7920. 1
  7921. /* TEXT */
  7922. ),
  7923. vue.createElementVNode("view", { class: "time" }, [
  7924. vue.createElementVNode(
  7925. "view",
  7926. { class: "time_top" },
  7927. vue.toDisplayString(_ctx.formattedTime),
  7928. 1
  7929. /* TEXT */
  7930. ),
  7931. vue.createElementVNode("view", { class: "time_bottom" }, [
  7932. vue.createElementVNode("view"),
  7933. vue.createElementVNode("view", { class: "time_bottom1" }, [
  7934. vue.createTextVNode(
  7935. vue.toDisplayString(_ctx.$t("status")) + " ",
  7936. 1
  7937. /* TEXT */
  7938. ),
  7939. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  7940. "view",
  7941. {
  7942. key: 0,
  7943. class: "time_state"
  7944. },
  7945. vue.toDisplayString(_ctx.$t("online")),
  7946. 1
  7947. /* TEXT */
  7948. )) : (vue.openBlock(), vue.createElementBlock(
  7949. "view",
  7950. {
  7951. key: 1,
  7952. class: "time_state1"
  7953. },
  7954. vue.toDisplayString(_ctx.$t("offline")),
  7955. 1
  7956. /* TEXT */
  7957. ))
  7958. ])
  7959. ])
  7960. ])
  7961. ]),
  7962. vue.createElementVNode("view", { class: "parameter" }, [
  7963. vue.createElementVNode("view", { class: "parameter_left" }, [
  7964. vue.createElementVNode("view", { class: "parameter_left1" }, [
  7965. vue.createCommentVNode(" <jerry-gauge></jerry-gauge> "),
  7966. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
  7967. vue.createVNode(_component_cmd_progress, {
  7968. type: "dashboard",
  7969. percent: _ctx.uidatasdata.SOC ?? 0,
  7970. "stroke-color": "#B0D0FF",
  7971. "stroke-width": 6,
  7972. width: 180,
  7973. "stroke-shape": "square",
  7974. showInfo: false
  7975. }, null, 8, ["percent"]),
  7976. vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
  7977. vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
  7978. vue.createTextVNode(
  7979. vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
  7980. 1
  7981. /* TEXT */
  7982. ),
  7983. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
  7984. ]),
  7985. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
  7986. ]),
  7987. vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
  7988. vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
  7989. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
  7990. vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
  7991. ])
  7992. ])
  7993. ]),
  7994. 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> ')
  7995. ]),
  7996. vue.createElementVNode("image", {
  7997. class: "parameter_leftdian1",
  7998. src: _imports_1$4,
  7999. alt: ""
  8000. }),
  8001. vue.createElementVNode("view", { class: "parameter_lef2" }, [
  8002. vue.createElementVNode("image", {
  8003. src: _imports_2$2,
  8004. mode: ""
  8005. })
  8006. ]),
  8007. vue.createElementVNode("image", {
  8008. class: "parameter_leftche",
  8009. src: _imports_3$3,
  8010. mode: ""
  8011. }),
  8012. vue.createCommentVNode(' <image class="parameter_leftche1" src="../../static/fang.png" mode=""></image> '),
  8013. vue.createCommentVNode(' <image class="parameter_leftche" src="../../static/che.png" mode=""></image> '),
  8014. vue.createCommentVNode(' <image class="parameter_leftche2" src="../../static/che1.png" mode=""></image> '),
  8015. vue.createElementVNode(
  8016. "view",
  8017. { class: "parameter_leftview" },
  8018. vue.toDisplayString(_ctx.$t("CommunicationRechargeInput")),
  8019. 1
  8020. /* TEXT */
  8021. ),
  8022. vue.createCommentVNode(' <view class="parameter_leftview">交流供电</view> '),
  8023. vue.createCommentVNode(' <view class="parameter_leftview">直流补电</view> '),
  8024. vue.createCommentVNode(' <view class="parameter_leftview">直流供电</view> ')
  8025. ]),
  8026. vue.createElementVNode("view", { class: "parameter_right" }, [
  8027. vue.createElementVNode("view", { class: "parameter_righttop" }, [
  8028. vue.createElementVNode("view", { class: "parameter_1" }, [
  8029. vue.createCommentVNode(` <view class="parameter_2">\r
  8030. <view class="parameter_3">\r
  8031. <view class="parameter_4">\r
  8032. <image src="../../static/y8.png" mode=""\r
  8033. v-if="uidatasdata.AC_In_380V_63A1_Status==0.00"></image>\r
  8034. <image src="../../static/y6.png" mode="" v-else></image>\r
  8035. {{$t('state163A')}} \r
  8036. </view>\r
  8037. <view class="parameter_51" v-if="uidatasdata.AC_In_380V_63A1_Status==0.00">\r
  8038. {{$t('connect')}}\r
  8039. </view>\r
  8040. <view class="parameter_5" v-else>\r
  8041. {{$t('breakoff')}}\r
  8042. </view>\r
  8043. \r
  8044. </view>\r
  8045. \r
  8046. <view class="parameter_3">\r
  8047. <view class="parameter_4">\r
  8048. <image src="../../static/y8.png" mode=""\r
  8049. v-if="uidatasdata.AC_In_380V_63A2_Status==0.00"></image>\r
  8050. <image src="../../static/y6.png" mode="" v-else></image>\r
  8051. {{$t('state63A2')}}\r
  8052. </view>\r
  8053. <view class="parameter_51" v-if="uidatasdata.AC_In_380V_63A2_Status==0.00">\r
  8054. {{$t('connect')}}\r
  8055. </view>\r
  8056. <view class="parameter_5" v-else>\r
  8057. {{$t('breakoff')}}\r
  8058. </view>\r
  8059. \r
  8060. </view>\r
  8061. \r
  8062. </view> `),
  8063. vue.createElementVNode("view", { class: "parameter_SOC" }, [
  8064. vue.createElementVNode("image", {
  8065. src: _imports_6,
  8066. mode: ""
  8067. }),
  8068. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  8069. vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
  8070. vue.createElementVNode("view", null, [
  8071. vue.createElementVNode(
  8072. "text",
  8073. { class: "parameter_SOCright2" },
  8074. vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
  8075. 1
  8076. /* TEXT */
  8077. ),
  8078. vue.createTextVNode(),
  8079. vue.createElementVNode("text", null, "%")
  8080. ])
  8081. ])
  8082. ]),
  8083. vue.createElementVNode("view", { class: "parameter_Battery" }, [
  8084. vue.createElementVNode("image", {
  8085. src: _imports_7,
  8086. mode: ""
  8087. }),
  8088. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  8089. vue.createElementVNode(
  8090. "view",
  8091. { class: "parameter_SOCright1" },
  8092. vue.toDisplayString(_ctx.$t("BatteryStatus")),
  8093. 1
  8094. /* TEXT */
  8095. ),
  8096. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  8097. _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
  8098. "view",
  8099. { key: 0 },
  8100. vue.toDisplayString(_ctx.$t("fault")),
  8101. 1
  8102. /* TEXT */
  8103. )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
  8104. vue.Fragment,
  8105. { key: 1 },
  8106. [
  8107. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==0">\r
  8108. {{$t('ChuShiHua')}}\r
  8109. </view> `),
  8110. vue.createElementVNode(
  8111. "view",
  8112. null,
  8113. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  8114. 1
  8115. /* TEXT */
  8116. )
  8117. ],
  8118. 2112
  8119. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  8120. )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
  8121. vue.Fragment,
  8122. { key: 2 },
  8123. [
  8124. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==2">\r
  8125. {{$t('HighVoltageMedium')}}\r
  8126. </view> `),
  8127. vue.createElementVNode(
  8128. "view",
  8129. null,
  8130. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  8131. 1
  8132. /* TEXT */
  8133. )
  8134. ],
  8135. 2112
  8136. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  8137. )) : (vue.openBlock(), vue.createElementBlock(
  8138. vue.Fragment,
  8139. { key: 3 },
  8140. [
  8141. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==4">\r
  8142. {{$t('Underhighpressure')}}\r
  8143. </view> `),
  8144. vue.createElementVNode("view", null, " — ")
  8145. ],
  8146. 2112
  8147. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  8148. )),
  8149. vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} ")
  8150. ])
  8151. ])
  8152. ]),
  8153. vue.createElementVNode("view", { class: "parameter_state" }, [
  8154. vue.createElementVNode("image", {
  8155. src: _imports_8,
  8156. mode: ""
  8157. }),
  8158. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  8159. vue.createElementVNode(
  8160. "view",
  8161. { class: "parameter_SOCright1" },
  8162. vue.toDisplayString(_ctx.$t("SystemStatus")),
  8163. 1
  8164. /* TEXT */
  8165. ),
  8166. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  8167. vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
  8168. _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
  8169. "view",
  8170. { key: 0 },
  8171. vue.toDisplayString(_ctx.$t("uncharged")),
  8172. 1
  8173. /* TEXT */
  8174. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
  8175. "view",
  8176. { key: 1 },
  8177. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  8178. 1
  8179. /* TEXT */
  8180. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
  8181. "view",
  8182. { key: 2 },
  8183. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  8184. 1
  8185. /* TEXT */
  8186. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
  8187. "view",
  8188. { key: 3 },
  8189. vue.toDisplayString(_ctx.$t("full")),
  8190. 1
  8191. /* TEXT */
  8192. )) : (vue.openBlock(), vue.createElementBlock(
  8193. vue.Fragment,
  8194. { key: 4 },
  8195. [
  8196. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_==4">\r
  8197. {{$t('Chargingstopped')}}\r
  8198. </view> `),
  8199. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_>3&&uidatasdata.bms_BatSysWorkMode_<8">\r
  8200. {{$t('retain')}}\r
  8201. </view> `),
  8202. vue.createElementVNode("view", null, " — ")
  8203. ],
  8204. 2112
  8205. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  8206. ))
  8207. ])
  8208. ])
  8209. ])
  8210. ])
  8211. ]),
  8212. vue.createElementVNode("view", { class: "parameter_tap" }, [
  8213. vue.createElementVNode(
  8214. "view",
  8215. {
  8216. class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
  8217. onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
  8218. },
  8219. vue.toDisplayString(_ctx.$t("exchangeinformation")),
  8220. 3
  8221. /* TEXT, CLASS */
  8222. ),
  8223. vue.createElementVNode(
  8224. "view",
  8225. {
  8226. class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"),
  8227. onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2))
  8228. },
  8229. vue.toDisplayString(_ctx.$t("Batteryinformation")),
  8230. 3
  8231. /* TEXT, CLASS */
  8232. ),
  8233. vue.createElementVNode(
  8234. "view",
  8235. {
  8236. class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
  8237. onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3))
  8238. },
  8239. vue.toDisplayString(_ctx.$t("statisticalinformation")),
  8240. 3
  8241. /* TEXT, CLASS */
  8242. ),
  8243. vue.createElementVNode(
  8244. "view",
  8245. {
  8246. class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"),
  8247. onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(4))
  8248. },
  8249. vue.toDisplayString(_ctx.$t("coolinginformation")),
  8250. 3
  8251. /* TEXT, CLASS */
  8252. )
  8253. ]),
  8254. vue.createElementVNode("view", {
  8255. class: "parameter_zheng",
  8256. key: "index"
  8257. }, [
  8258. $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  8259. key: 0,
  8260. class: "parameter_box"
  8261. }, [
  8262. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  8263. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8264. vue.createElementVNode(
  8265. "view",
  8266. { class: "parameter_zheng12" },
  8267. vue.toDisplayString(_ctx.$t("PhaseVoltageAV")),
  8268. 1
  8269. /* TEXT */
  8270. ),
  8271. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8272. vue.createTextVNode(
  8273. vue.toDisplayString(_ctx.uidatasdata.PCSPortAPhaseVoltage ?? "—") + " ",
  8274. 1
  8275. /* TEXT */
  8276. ),
  8277. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8278. ])
  8279. ]),
  8280. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8281. vue.createElementVNode(
  8282. "view",
  8283. { class: "parameter_zheng12" },
  8284. vue.toDisplayString(_ctx.$t("PhaseVoltageBV")),
  8285. 1
  8286. /* TEXT */
  8287. ),
  8288. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8289. vue.createTextVNode(
  8290. vue.toDisplayString(_ctx.uidatasdata.PCSPortBPhaseVoltage ?? "—") + " ",
  8291. 1
  8292. /* TEXT */
  8293. ),
  8294. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8295. ])
  8296. ]),
  8297. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8298. vue.createElementVNode(
  8299. "view",
  8300. { class: "parameter_zheng12" },
  8301. vue.toDisplayString(_ctx.$t("PhaseVoltageCV")),
  8302. 1
  8303. /* TEXT */
  8304. ),
  8305. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8306. vue.createTextVNode(
  8307. vue.toDisplayString(_ctx.uidatasdata.PCSPortCPhaseVoltage ?? "—") + " ",
  8308. 1
  8309. /* TEXT */
  8310. ),
  8311. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8312. ])
  8313. ]),
  8314. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8315. vue.createElementVNode(
  8316. "view",
  8317. { class: "parameter_zheng12" },
  8318. vue.toDisplayString(_ctx.$t("Supplementarypower")),
  8319. 1
  8320. /* TEXT */
  8321. ),
  8322. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8323. vue.createTextVNode(
  8324. vue.toDisplayString(_ctx.uidatasdata.PCSTotalOutputPower ?? "—") + " ",
  8325. 1
  8326. /* TEXT */
  8327. ),
  8328. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  8329. ])
  8330. ])
  8331. ]),
  8332. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  8333. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8334. vue.createElementVNode("view", { class: "parameter_zheng12" }, [
  8335. vue.createCommentVNode(" A{{$t('PhaseCurrent')}} "),
  8336. vue.createTextVNode(
  8337. " " + vue.toDisplayString(_ctx.$t("PhaseVoltageAA")),
  8338. 1
  8339. /* TEXT */
  8340. )
  8341. ]),
  8342. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8343. vue.createTextVNode(
  8344. vue.toDisplayString(_ctx.uidatasdata["PCSOutputA-phaseCurrent"] ?? "—") + " ",
  8345. 1
  8346. /* TEXT */
  8347. ),
  8348. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  8349. ])
  8350. ]),
  8351. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8352. vue.createElementVNode(
  8353. "view",
  8354. { class: "parameter_zheng12" },
  8355. vue.toDisplayString(_ctx.$t("PhaseVoltageBA")),
  8356. 1
  8357. /* TEXT */
  8358. ),
  8359. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8360. vue.createTextVNode(
  8361. vue.toDisplayString(_ctx.uidatasdata["PCSOutputB-phaseCurrent"] ?? "—") + " ",
  8362. 1
  8363. /* TEXT */
  8364. ),
  8365. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  8366. ])
  8367. ]),
  8368. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8369. vue.createElementVNode(
  8370. "view",
  8371. { class: "parameter_zheng12" },
  8372. vue.toDisplayString(_ctx.$t("PhaseVoltageCA")),
  8373. 1
  8374. /* TEXT */
  8375. ),
  8376. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8377. vue.createTextVNode(
  8378. vue.toDisplayString(_ctx.uidatasdata["PCSOutputC-phaseCurrent"] ?? "—") + " ",
  8379. 1
  8380. /* TEXT */
  8381. ),
  8382. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  8383. ])
  8384. ]),
  8385. vue.createElementVNode("view", {
  8386. class: "parameter_zheng11",
  8387. style: { "height": "30px" }
  8388. }, [
  8389. vue.createElementVNode("view", { class: "parameter_zheng12" }, [
  8390. vue.createCommentVNode(" {{$t('powerSupply')}} ")
  8391. ]),
  8392. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  8393. {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text>\r
  8394. </view> `)
  8395. ])
  8396. ])
  8397. ])) : vue.createCommentVNode("v-if", true),
  8398. $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  8399. key: 1,
  8400. class: "parameter_box"
  8401. }, [
  8402. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  8403. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  8404. <view class="parameter_zheng12">\r
  8405. {{$t('Batterypower')}}\r
  8406. </view>\r
  8407. <view class="parameter_zheng13">\r
  8408. {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">kW</text>\r
  8409. </view>\r
  8410. </view> `),
  8411. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8412. vue.createElementVNode(
  8413. "view",
  8414. { class: "parameter_zheng12" },
  8415. vue.toDisplayString(_ctx.$t("TotalPressure")),
  8416. 1
  8417. /* TEXT */
  8418. ),
  8419. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8420. vue.createTextVNode(
  8421. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
  8422. 1
  8423. /* TEXT */
  8424. ),
  8425. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8426. ])
  8427. ]),
  8428. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8429. vue.createElementVNode(
  8430. "view",
  8431. { class: "parameter_zheng12" },
  8432. vue.toDisplayString(_ctx.$t("AllowChargingPower")),
  8433. 1
  8434. /* TEXT */
  8435. ),
  8436. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8437. vue.createTextVNode(
  8438. vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxChargePowerLimit ?? "—") + " ",
  8439. 1
  8440. /* TEXT */
  8441. ),
  8442. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  8443. ])
  8444. ]),
  8445. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8446. vue.createElementVNode(
  8447. "view",
  8448. { class: "parameter_zheng12" },
  8449. vue.toDisplayString(_ctx.$t("MaximumVoltage")),
  8450. 1
  8451. /* TEXT */
  8452. ),
  8453. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8454. vue.createTextVNode(
  8455. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
  8456. 1
  8457. /* TEXT */
  8458. ),
  8459. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8460. ])
  8461. ]),
  8462. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8463. vue.createElementVNode(
  8464. "view",
  8465. { class: "parameter_zheng12" },
  8466. vue.toDisplayString(_ctx.$t("MaximumTemperature")),
  8467. 1
  8468. /* TEXT */
  8469. ),
  8470. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8471. vue.createTextVNode(
  8472. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
  8473. 1
  8474. /* TEXT */
  8475. ),
  8476. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  8477. ])
  8478. ])
  8479. ]),
  8480. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  8481. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8482. vue.createElementVNode(
  8483. "view",
  8484. { class: "parameter_zheng12" },
  8485. vue.toDisplayString(_ctx.$t("BatteryCurrent")),
  8486. 1
  8487. /* TEXT */
  8488. ),
  8489. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8490. vue.createTextVNode(
  8491. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
  8492. 1
  8493. /* TEXT */
  8494. ),
  8495. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  8496. ])
  8497. ]),
  8498. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  8499. <view class="parameter_zheng12">\r
  8500. {{$t('TotalExternalPressure')}}\r
  8501. </view>\r
  8502. <view class="parameter_zheng13">\r
  8503. {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
  8504. </view>\r
  8505. </view> `),
  8506. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8507. vue.createElementVNode(
  8508. "view",
  8509. { class: "parameter_zheng12" },
  8510. vue.toDisplayString(_ctx.$t("AllowChargingCurrent")),
  8511. 1
  8512. /* TEXT */
  8513. ),
  8514. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8515. vue.createTextVNode(
  8516. vue.toDisplayString(_ctx.uidatasdata.ChargingInformation_Chg_Max_Cur ?? "—") + " ",
  8517. 1
  8518. /* TEXT */
  8519. ),
  8520. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  8521. ])
  8522. ]),
  8523. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8524. vue.createElementVNode(
  8525. "view",
  8526. { class: "parameter_zheng12" },
  8527. vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
  8528. 1
  8529. /* TEXT */
  8530. ),
  8531. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8532. vue.createTextVNode(
  8533. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ",
  8534. 1
  8535. /* TEXT */
  8536. ),
  8537. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  8538. ])
  8539. ]),
  8540. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8541. vue.createElementVNode(
  8542. "view",
  8543. { class: "parameter_zheng12" },
  8544. vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
  8545. 1
  8546. /* TEXT */
  8547. ),
  8548. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8549. vue.createTextVNode(
  8550. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
  8551. 1
  8552. /* TEXT */
  8553. ),
  8554. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  8555. ])
  8556. ])
  8557. ])
  8558. ])) : vue.createCommentVNode("v-if", true),
  8559. $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  8560. key: 2,
  8561. class: "parameter_box"
  8562. }, [
  8563. vue.createElementVNode("view", { class: "parameter_zheng10" }, [
  8564. vue.createCommentVNode(` <view class="parameter_zhengbox">\r
  8565. <view class="parameter_zheng12">\r
  8566. {{$t('AccumulatedChargingCapacityCommunication')}}\r
  8567. </view>\r
  8568. <view class="parameter_zhengbox13">\r
  8569. {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
  8570. </view>\r
  8571. </view>\r
  8572. <view class="parameter_zhengbox parameter_zheng101">\r
  8573. <view class="parameter_zheng12">\r
  8574. {{$t('AccumulatedDCChargingCapacity')}}\r
  8575. </view>\r
  8576. <view class="parameter_zhengbox13">\r
  8577. {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
  8578. </view>\r
  8579. </view> `),
  8580. vue.createElementVNode("view", { class: "parameter_zhengbox" }, [
  8581. vue.createElementVNode(
  8582. "view",
  8583. { class: "parameter_zheng12" },
  8584. vue.toDisplayString(_ctx.$t("RunningTimes")),
  8585. 1
  8586. /* TEXT */
  8587. ),
  8588. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  8589. vue.createTextVNode(
  8590. vue.toDisplayString(_ctx.uidatasdata.CommunicationRecharge),
  8591. 1
  8592. /* TEXT */
  8593. ),
  8594. vue.createElementVNode(
  8595. "text",
  8596. { class: "parameter_zheng14" },
  8597. vue.toDisplayString(_ctx.$t("RunningTimesmin")),
  8598. 1
  8599. /* TEXT */
  8600. ),
  8601. vue.createTextVNode(),
  8602. vue.createElementVNode("text")
  8603. ])
  8604. ]),
  8605. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  8606. vue.createElementVNode(
  8607. "view",
  8608. { class: "parameter_zheng12" },
  8609. vue.toDisplayString(_ctx.$t("InputCapacity")),
  8610. 1
  8611. /* TEXT */
  8612. ),
  8613. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  8614. vue.createTextVNode(
  8615. vue.toDisplayString(_ctx.uidatasdata.CommunicationElectricity) + " ",
  8616. 1
  8617. /* TEXT */
  8618. ),
  8619. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  8620. vue.createTextVNode(),
  8621. vue.createElementVNode("text")
  8622. ])
  8623. ]),
  8624. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  8625. vue.createElementVNode(
  8626. "view",
  8627. { class: "parameter_zheng12" },
  8628. vue.toDisplayString(_ctx.$t("AccumulateInput")),
  8629. 1
  8630. /* TEXT */
  8631. ),
  8632. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  8633. vue.createCommentVNode(` {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text> `),
  8634. vue.createTextVNode(
  8635. " " + vue.toDisplayString(_ctx.uidatasdata.PCSACChargeEnergy ?? "—") + " ",
  8636. 1
  8637. /* TEXT */
  8638. ),
  8639. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  8640. vue.createTextVNode(),
  8641. vue.createElementVNode("text")
  8642. ])
  8643. ])
  8644. ])
  8645. ])) : vue.createCommentVNode("v-if", true),
  8646. $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  8647. key: 3,
  8648. class: "parameter_box"
  8649. }, [
  8650. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  8651. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8652. vue.createElementVNode(
  8653. "view",
  8654. { class: "parameter_zheng12" },
  8655. vue.toDisplayString(_ctx.$t("WorkingMode")),
  8656. 1
  8657. /* TEXT */
  8658. ),
  8659. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  8660. vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
  8661. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
  8662. _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
  8663. "view",
  8664. { key: 0 },
  8665. vue.toDisplayString(_ctx.$t("OffMode")),
  8666. 1
  8667. /* TEXT */
  8668. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
  8669. "view",
  8670. { key: 1 },
  8671. vue.toDisplayString(_ctx.$t("CoolingMode")),
  8672. 1
  8673. /* TEXT */
  8674. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
  8675. "view",
  8676. { key: 2 },
  8677. vue.toDisplayString(_ctx.$t("HeatingMode")),
  8678. 1
  8679. /* TEXT */
  8680. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
  8681. "view",
  8682. { key: 3 },
  8683. vue.toDisplayString(_ctx.$t("CirculatingMode")),
  8684. 1
  8685. /* TEXT */
  8686. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  8687. ])
  8688. ]),
  8689. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8690. vue.createElementVNode(
  8691. "view",
  8692. { class: "parameter_zheng12" },
  8693. vue.toDisplayString(_ctx.$t("OutletTemperature")),
  8694. 1
  8695. /* TEXT */
  8696. ),
  8697. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8698. vue.createTextVNode(
  8699. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
  8700. 1
  8701. /* TEXT */
  8702. ),
  8703. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  8704. ])
  8705. ]),
  8706. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8707. vue.createElementVNode("view", {
  8708. class: "parameter_zheng12",
  8709. style: { "height": "30px" }
  8710. }, [
  8711. vue.createCommentVNode(" {{$t('PowerDemand')}} ")
  8712. ]),
  8713. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  8714. {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text class="parameter_zheng14">kW</text>\r
  8715. </view> `)
  8716. ])
  8717. ]),
  8718. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  8719. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8720. vue.createElementVNode(
  8721. "view",
  8722. { class: "parameter_zheng12" },
  8723. vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
  8724. 1
  8725. /* TEXT */
  8726. ),
  8727. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  8728. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
  8729. _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
  8730. "view",
  8731. { key: 0 },
  8732. vue.toDisplayString(_ctx.$t("DisconnectedState")),
  8733. 1
  8734. /* TEXT */
  8735. )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
  8736. "view",
  8737. { key: 1 },
  8738. vue.toDisplayString(_ctx.$t("ClosedState")),
  8739. 1
  8740. /* TEXT */
  8741. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
  8742. ])
  8743. ]),
  8744. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8745. vue.createElementVNode(
  8746. "view",
  8747. { class: "parameter_zheng12" },
  8748. vue.toDisplayString(_ctx.$t("waterTemperature")),
  8749. 1
  8750. /* TEXT */
  8751. ),
  8752. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  8753. vue.createTextVNode(
  8754. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
  8755. 1
  8756. /* TEXT */
  8757. ),
  8758. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  8759. ])
  8760. ]),
  8761. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  8762. vue.createElementVNode("view", {
  8763. class: "parameter_zheng12",
  8764. style: { "height": "30px" }
  8765. }, [
  8766. vue.createCommentVNode(" {{$t('FaultLevel')}} ")
  8767. ]),
  8768. vue.createCommentVNode(` <view class="parameter_Batterystate">\r
  8769. \r
  8770. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
  8771. {{$t('NoMalfunction')}}\r
  8772. </view>\r
  8773. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
  8774. 1{{$t('LevelLault')}}\r
  8775. </view>\r
  8776. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
  8777. 2{{$t('LevelLault')}}\r
  8778. </view>\r
  8779. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
  8780. 3{{$t('LevelLault')}}\r
  8781. </view>\r
  8782. <view v-else>\r
  8783. —\r
  8784. </view>\r
  8785. </view> `)
  8786. ])
  8787. ])
  8788. ])) : vue.createCommentVNode("v-if", true),
  8789. vue.createElementVNode("view", { class: "parameter_zheng3" }, [
  8790. _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  8791. key: 0,
  8792. class: "parameter_zheng31111",
  8793. onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
  8794. }, [
  8795. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  8796. vue.createElementVNode(
  8797. "view",
  8798. { class: "parameter_zheng32" },
  8799. vue.toDisplayString(_ctx.$t("open")),
  8800. 1
  8801. /* TEXT */
  8802. )
  8803. ])
  8804. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8805. key: 1,
  8806. class: "parameter_zheng31111"
  8807. }, [
  8808. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  8809. vue.createElementVNode(
  8810. "view",
  8811. { class: "parameter_zheng32ccc" },
  8812. vue.toDisplayString(_ctx.$t("open")),
  8813. 1
  8814. /* TEXT */
  8815. )
  8816. ])
  8817. ])),
  8818. _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  8819. key: 2,
  8820. class: "parameter_zheng31111",
  8821. onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args))
  8822. }, [
  8823. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  8824. vue.createElementVNode(
  8825. "view",
  8826. { class: "parameter_zheng33" },
  8827. vue.toDisplayString(_ctx.$t("stopIt")),
  8828. 1
  8829. /* TEXT */
  8830. )
  8831. ])
  8832. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8833. key: 3,
  8834. class: "parameter_zheng31111"
  8835. }, [
  8836. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  8837. vue.createElementVNode(
  8838. "view",
  8839. { class: "parameter_zheng32ccc" },
  8840. vue.toDisplayString(_ctx.$t("stopIt")),
  8841. 1
  8842. /* TEXT */
  8843. )
  8844. ])
  8845. ])),
  8846. vue.createCommentVNode(' <view class="parameter_zheng31111" @click="onpower"> '),
  8847. vue.createElementVNode("view", { class: "parameter_zheng31111" }, [
  8848. _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  8849. key: 0,
  8850. class: "parameter_zheng31",
  8851. onClick: _cache[6] || (_cache[6] = (...args) => $options.onpower && $options.onpower(...args))
  8852. }, [
  8853. _ctx.$t("power") == "功率" ? (vue.openBlock(), vue.createElementBlock("view", {
  8854. key: 0,
  8855. class: "parameter_zheng34"
  8856. }, [
  8857. vue.createElementVNode(
  8858. "view",
  8859. null,
  8860. vue.toDisplayString(_ctx.$t("power")),
  8861. 1
  8862. /* TEXT */
  8863. ),
  8864. vue.createElementVNode(
  8865. "view",
  8866. null,
  8867. vue.toDisplayString(_ctx.$t("given")),
  8868. 1
  8869. /* TEXT */
  8870. )
  8871. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8872. key: 1,
  8873. class: "parameter_zheng34"
  8874. }, [
  8875. vue.createElementVNode(
  8876. "view",
  8877. null,
  8878. vue.toDisplayString(_ctx.$t("power")) + " " + vue.toDisplayString(_ctx.$t("given")),
  8879. 1
  8880. /* TEXT */
  8881. )
  8882. ]))
  8883. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8884. key: 1,
  8885. class: "parameter_zheng31"
  8886. }, [
  8887. _ctx.$t("power") == "功率" ? (vue.openBlock(), vue.createElementBlock("view", {
  8888. key: 0,
  8889. class: "parameter_zheng34ccc"
  8890. }, [
  8891. vue.createElementVNode(
  8892. "view",
  8893. null,
  8894. vue.toDisplayString(_ctx.$t("power")),
  8895. 1
  8896. /* TEXT */
  8897. ),
  8898. vue.createElementVNode(
  8899. "view",
  8900. null,
  8901. vue.toDisplayString(_ctx.$t("given")),
  8902. 1
  8903. /* TEXT */
  8904. )
  8905. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  8906. key: 1,
  8907. class: "parameter_zheng34ccc"
  8908. }, [
  8909. vue.createElementVNode(
  8910. "view",
  8911. null,
  8912. vue.toDisplayString(_ctx.$t("power")) + " " + vue.toDisplayString(_ctx.$t("given")),
  8913. 1
  8914. /* TEXT */
  8915. )
  8916. ]))
  8917. ]))
  8918. ])
  8919. ])
  8920. ]),
  8921. vue.createElementVNode("view", { class: "parameter_home" }, [
  8922. vue.createElementVNode("view", {
  8923. class: "parameter_home1",
  8924. onClick: _cache[7] || (_cache[7] = (...args) => $options.onreturn && $options.onreturn(...args))
  8925. }, [
  8926. vue.createElementVNode("image", {
  8927. src: _imports_1$3,
  8928. mode: ""
  8929. }),
  8930. vue.createElementVNode(
  8931. "text",
  8932. { class: "parameter_hometext" },
  8933. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  8934. 1
  8935. /* TEXT */
  8936. )
  8937. ]),
  8938. $data.faultsdata.length > 0 && !$data.SysFaultState ? (vue.openBlock(), vue.createElementBlock("view", {
  8939. key: 0,
  8940. class: "parameter_home2"
  8941. }, [
  8942. vue.createElementVNode("image", {
  8943. src: _imports_10$1,
  8944. mode: ""
  8945. }),
  8946. vue.createElementVNode("swiper", {
  8947. class: "swiper",
  8948. circular: "",
  8949. autoplay: true,
  8950. interval: 2e3,
  8951. duration: 500,
  8952. vertical: true
  8953. }, [
  8954. (vue.openBlock(true), vue.createElementBlock(
  8955. vue.Fragment,
  8956. null,
  8957. vue.renderList($data.faultsdata, (item, index) => {
  8958. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
  8959. vue.createElementVNode(
  8960. "view",
  8961. { class: "parameter_home3" },
  8962. vue.toDisplayString(item["CONTENT"]),
  8963. 1
  8964. /* TEXT */
  8965. )
  8966. ]);
  8967. }),
  8968. 128
  8969. /* KEYED_FRAGMENT */
  8970. ))
  8971. ])
  8972. ])) : vue.createCommentVNode("v-if", true)
  8973. ])
  8974. ])
  8975. ]),
  8976. vue.createVNode(
  8977. _component_uni_popup,
  8978. { ref: "alertDialog" },
  8979. {
  8980. default: vue.withCtx(() => [
  8981. vue.createVNode(_component_uni_popup_dialog, {
  8982. mode: $data.modeinput,
  8983. placeholder: _ctx.$t("powergiven") + "(0~80kW)",
  8984. modelValue: $data.value,
  8985. "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.value = $event),
  8986. focus: false,
  8987. type: $data.successtype,
  8988. cancelText: _ctx.$t("CancelReturn"),
  8989. confirmText: $data.confirmText,
  8990. beforeClose: true,
  8991. title: $data.title,
  8992. content: $data.content,
  8993. onConfirm: $options.dialogConfirm,
  8994. onClose: $options.dialogClose
  8995. }, null, 8, ["mode", "placeholder", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
  8996. ]),
  8997. _: 1
  8998. /* STABLE */
  8999. },
  9000. 512
  9001. /* NEED_PATCH */
  9002. ),
  9003. vue.createVNode(
  9004. _component_uni_popup,
  9005. { ref: "alertDialog1" },
  9006. {
  9007. default: vue.withCtx(() => [
  9008. vue.createElementVNode("view", { class: "unipopup" }, [
  9009. vue.createElementVNode("view", { class: "unipopup1" }, [
  9010. vue.createElementVNode("view"),
  9011. vue.createElementVNode("image", {
  9012. onClick: _cache[9] || (_cache[9] = (...args) => $options.unipopupclose && $options.unipopupclose(...args)),
  9013. class: "unipopup1image",
  9014. src: _imports_9,
  9015. mode: ""
  9016. })
  9017. ]),
  9018. vue.createElementVNode("view", { class: "unipopup2" }, [
  9019. vue.createElementVNode("image", {
  9020. class: "unipopup2image1",
  9021. src: _imports_10,
  9022. mode: ""
  9023. }),
  9024. vue.createElementVNode("view", { class: "unipopup21" }, [
  9025. vue.createElementVNode("view", { class: "unipopup21image" }, [
  9026. $data.ACcurrentoutputchoice == 20 ? (vue.openBlock(), vue.createElementBlock("image", {
  9027. key: 0,
  9028. class: "unipopup2image41",
  9029. src: _imports_11,
  9030. mode: ""
  9031. })) : (vue.openBlock(), vue.createElementBlock("image", {
  9032. key: 1,
  9033. class: "unipopup2image41",
  9034. src: _imports_12,
  9035. mode: "",
  9036. onClick: _cache[10] || (_cache[10] = ($event) => $options.clickACcurrentoutput(20))
  9037. })),
  9038. $data.ACcurrentoutputchoice == 40 ? (vue.openBlock(), vue.createElementBlock("image", {
  9039. key: 2,
  9040. class: "unipopup2image4",
  9041. src: _imports_13,
  9042. mode: ""
  9043. })) : (vue.openBlock(), vue.createElementBlock("image", {
  9044. key: 3,
  9045. class: "unipopup2image4",
  9046. src: _imports_14,
  9047. mode: "",
  9048. onClick: _cache[11] || (_cache[11] = ($event) => $options.clickACcurrentoutput(40))
  9049. }))
  9050. ]),
  9051. vue.createElementVNode("view", { class: "unipopup22image" }, [
  9052. $data.ACcurrentoutputchoice == 60 ? (vue.openBlock(), vue.createElementBlock("image", {
  9053. key: 0,
  9054. class: "unipopup2image41",
  9055. src: _imports_15,
  9056. mode: ""
  9057. })) : (vue.openBlock(), vue.createElementBlock("image", {
  9058. key: 1,
  9059. class: "unipopup2image41",
  9060. src: _imports_16,
  9061. mode: "",
  9062. onClick: _cache[12] || (_cache[12] = ($event) => $options.clickACcurrentoutput(60))
  9063. })),
  9064. $data.ACcurrentoutputchoice == 80 ? (vue.openBlock(), vue.createElementBlock("image", {
  9065. key: 2,
  9066. class: "unipopup2image4",
  9067. src: _imports_17,
  9068. mode: ""
  9069. })) : (vue.openBlock(), vue.createElementBlock("image", {
  9070. key: 3,
  9071. class: "unipopup2image4",
  9072. src: _imports_18,
  9073. mode: "",
  9074. onClick: _cache[13] || (_cache[13] = ($event) => $options.clickACcurrentoutput(80))
  9075. }))
  9076. ])
  9077. ])
  9078. ]),
  9079. vue.createElementVNode("view", { class: "unipopup3" }, [
  9080. vue.createElementVNode("view", {
  9081. class: "unipopup311",
  9082. onClick: _cache[14] || (_cache[14] = (...args) => $options.unipopupclose && $options.unipopupclose(...args))
  9083. }, [
  9084. _ctx.$t("qx") == "../../static/qx.png" ? (vue.openBlock(), vue.createElementBlock("image", {
  9085. key: 0,
  9086. class: "unipopup31",
  9087. src: _ctx.$t("qx"),
  9088. mode: ""
  9089. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", {
  9090. key: 1,
  9091. class: "unipopup312",
  9092. src: _ctx.$t("qx"),
  9093. mode: ""
  9094. }, null, 8, ["src"]))
  9095. ]),
  9096. vue.createElementVNode("view", {
  9097. class: "unipopup311",
  9098. onClick: _cache[15] || (_cache[15] = (...args) => $options.onunipopup && $options.onunipopup(...args))
  9099. }, [
  9100. _ctx.$t("qd") == "../../static/qd.png" ? (vue.openBlock(), vue.createElementBlock("image", {
  9101. key: 0,
  9102. class: "unipopup32",
  9103. src: _ctx.$t("qd"),
  9104. mode: ""
  9105. }, null, 8, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", {
  9106. key: 1,
  9107. class: "unipopup312",
  9108. src: _ctx.$t("qd"),
  9109. mode: ""
  9110. }, null, 8, ["src"]))
  9111. ])
  9112. ])
  9113. ])
  9114. ]),
  9115. _: 1
  9116. /* STABLE */
  9117. },
  9118. 512
  9119. /* NEED_PATCH */
  9120. ),
  9121. vue.createVNode(
  9122. _component_uni_popup,
  9123. {
  9124. ref: "message",
  9125. type: "message"
  9126. },
  9127. {
  9128. default: vue.withCtx(() => [
  9129. vue.createVNode(_component_uni_popup_message, {
  9130. type: "error",
  9131. message: _ctx.messageText,
  9132. duration: 3e3
  9133. }, null, 8, ["message"])
  9134. ]),
  9135. _: 1
  9136. /* STABLE */
  9137. },
  9138. 512
  9139. /* NEED_PATCH */
  9140. )
  9141. ]);
  9142. }
  9143. const PagesHomeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-4978fed5"], ["__file", "D:/project/esswisdom_ipad_V2/pages/home/index.vue"]]);
  9144. const _sfc_main$8 = {
  9145. props: {
  9146. visible: Boolean,
  9147. color: {
  9148. type: String,
  9149. default: "#303133"
  9150. },
  9151. placement: {
  9152. type: String,
  9153. default: "top"
  9154. },
  9155. content: {
  9156. type: String,
  9157. default: ""
  9158. },
  9159. show: {
  9160. type: Boolean,
  9161. default: false
  9162. }
  9163. },
  9164. data() {
  9165. return {
  9166. isShow: this.visible,
  9167. title: "Hello",
  9168. arrowLeft: 0,
  9169. query: null,
  9170. style: {},
  9171. arrowStyle: {}
  9172. };
  9173. },
  9174. onLoad() {
  9175. },
  9176. watch: {
  9177. isShow: {
  9178. handler(val) {
  9179. this.$emit("update:visible", val);
  9180. },
  9181. immediate: true
  9182. },
  9183. visible: {
  9184. handler(val) {
  9185. if (val) {
  9186. this.$nextTick(() => {
  9187. this.getPosition();
  9188. });
  9189. }
  9190. this.isShow = val;
  9191. },
  9192. immediate: true
  9193. }
  9194. },
  9195. mounted() {
  9196. this.getPosition();
  9197. },
  9198. methods: {
  9199. close() {
  9200. this.isShow = false;
  9201. },
  9202. fixedWrap() {
  9203. this.isShow = false;
  9204. },
  9205. async handleClick() {
  9206. if (this.isShow) {
  9207. return this.isShow = false;
  9208. }
  9209. await this.getPosition();
  9210. this.isShow = true;
  9211. },
  9212. getPosition() {
  9213. return new Promise((resolve) => {
  9214. uni.createSelectorQuery().in(this).selectAll(".zb_tooltip_content,.zb_tooltip__popper").boundingClientRect(async (data) => {
  9215. let { left, bottom, right, top, width, height } = data[0];
  9216. let obj1 = data[1];
  9217. let objStyle = {};
  9218. let objStyle1 = {};
  9219. switch (this.placement) {
  9220. case "top":
  9221. if (obj1.width > width) {
  9222. objStyle.left = `-${(obj1.width - width) / 2}px`;
  9223. } else {
  9224. objStyle.left = `${Math.abs(obj1.width - width) / 2}px`;
  9225. }
  9226. objStyle.bottom = `${height + 8}px`;
  9227. objStyle1.left = obj1.width / 2 - 6 + "px";
  9228. break;
  9229. case "top-start":
  9230. objStyle.left = `0px`;
  9231. objStyle.bottom = `${height + 8}px`;
  9232. break;
  9233. case "top-end":
  9234. objStyle.right = `0px`;
  9235. objStyle.bottom = `${height + 8}px`;
  9236. objStyle1.right = `8px`;
  9237. break;
  9238. case "bottom":
  9239. if (obj1.width > width) {
  9240. objStyle.left = `-${(obj1.width - width) / 2}px`;
  9241. } else {
  9242. objStyle.left = `${Math.abs(obj1.width - width) / 2}px`;
  9243. }
  9244. objStyle.top = `${height + 8}px`;
  9245. objStyle1.left = obj1.width / 2 - 6 + "px";
  9246. break;
  9247. case "bottom-start":
  9248. objStyle.left = `0px`;
  9249. objStyle.top = `${height + 8}px`;
  9250. objStyle1.left = `8px`;
  9251. break;
  9252. case "bottom-end":
  9253. objStyle.right = `0px`;
  9254. objStyle.top = `${height + 8}px`;
  9255. objStyle1.right = `8px`;
  9256. break;
  9257. case "right":
  9258. objStyle.left = `${width + 8}px`;
  9259. if (obj1.height > height) {
  9260. objStyle.top = `-${(obj1.height - height) / 2}px`;
  9261. } else {
  9262. objStyle.top = `${Math.abs((obj1.height - height) / 2)}px`;
  9263. }
  9264. objStyle1.top = `${obj1.height / 2 - 6}px`;
  9265. break;
  9266. case "right-start":
  9267. objStyle.left = `${width + 8}px`;
  9268. objStyle.top = `0px`;
  9269. objStyle1.top = `8px`;
  9270. break;
  9271. case "right-end":
  9272. objStyle.left = `${width + 8}px`;
  9273. objStyle.bottom = `0px`;
  9274. objStyle1.bottom = `8px`;
  9275. break;
  9276. case "left":
  9277. objStyle.right = `${width + 8}px`;
  9278. if (obj1.height > height) {
  9279. objStyle.top = `-${(obj1.height - height) / 2}px`;
  9280. } else {
  9281. objStyle.top = `${Math.abs((obj1.height - height) / 2)}px`;
  9282. }
  9283. objStyle1.top = `${obj1.height / 2 - 6}px`;
  9284. break;
  9285. case "left-start":
  9286. objStyle.right = `${width + 8}px`;
  9287. objStyle.top = `0px`;
  9288. objStyle1.top = `8px`;
  9289. break;
  9290. case "left-end":
  9291. objStyle.right = `${width + 8}px`;
  9292. objStyle.bottom = `0px`;
  9293. objStyle1.bottom = `8px`;
  9294. break;
  9295. }
  9296. this.style = objStyle;
  9297. this.arrowStyle = objStyle1;
  9298. resolve();
  9299. }).exec();
  9300. });
  9301. }
  9302. }
  9303. };
  9304. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  9305. return vue.openBlock(), vue.createElementBlock(
  9306. "view",
  9307. {
  9308. class: "zb-tooltip",
  9309. style: vue.normalizeStyle({
  9310. "--theme-bg-color": $props.color
  9311. })
  9312. },
  9313. [
  9314. vue.createElementVNode("view", {
  9315. class: "zb_tooltip_content",
  9316. onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.handleClick && $options.handleClick(...args), ["stop"]))
  9317. }, [
  9318. vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
  9319. vue.createElementVNode(
  9320. "view",
  9321. {
  9322. class: "zb_tooltip__popper",
  9323. onClick: vue.withModifiers(() => {
  9324. }, ["stop"]),
  9325. style: vue.normalizeStyle([$data.style, {
  9326. visibility: $data.isShow ? "visible" : "hidden",
  9327. color: $props.color === "white" ? "" : "#fff",
  9328. boxShadow: $props.color === "white" ? "0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d" : ""
  9329. }])
  9330. },
  9331. [
  9332. vue.renderSlot(_ctx.$slots, "content", {}, () => [
  9333. vue.createTextVNode(
  9334. vue.toDisplayString($props.content),
  9335. 1
  9336. /* TEXT */
  9337. )
  9338. ], true),
  9339. vue.createElementVNode(
  9340. "view",
  9341. {
  9342. class: vue.normalizeClass(["zb_popper__icon", [{
  9343. "zb_popper__up": $props.placement.indexOf("bottom") === 0,
  9344. "zb_popper__arrow": $props.placement.indexOf("top") === 0,
  9345. "zb_popper__right": $props.placement.indexOf("right") === 0,
  9346. "zb_popper__left": $props.placement.indexOf("left") === 0
  9347. }]]),
  9348. style: vue.normalizeStyle([$data.arrowStyle])
  9349. },
  9350. null,
  9351. 6
  9352. /* CLASS, STYLE */
  9353. )
  9354. ],
  9355. 4
  9356. /* STYLE */
  9357. )
  9358. ])
  9359. ],
  9360. 4
  9361. /* STYLE */
  9362. );
  9363. }
  9364. const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-13dad3a2"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue"]]);
  9365. const en$1 = {
  9366. "uni-pagination.prevText": "prev",
  9367. "uni-pagination.nextText": "next",
  9368. "uni-pagination.piecePerPage": "piece/page"
  9369. };
  9370. const es = {
  9371. "uni-pagination.prevText": "anterior",
  9372. "uni-pagination.nextText": "prxima",
  9373. "uni-pagination.piecePerPage": "Art��culo/P��gina"
  9374. };
  9375. const fr = {
  9376. "uni-pagination.prevText": "précédente",
  9377. "uni-pagination.nextText": "suivante",
  9378. "uni-pagination.piecePerPage": "Articles/Pages"
  9379. };
  9380. const zhHans$1 = {
  9381. "uni-pagination.prevText": "上一页",
  9382. "uni-pagination.nextText": "下一页",
  9383. "uni-pagination.piecePerPage": "条/页"
  9384. };
  9385. const zhHant$1 = {
  9386. "uni-pagination.prevText": "上一頁",
  9387. "uni-pagination.nextText": "下一頁",
  9388. "uni-pagination.piecePerPage": "條/頁"
  9389. };
  9390. const messages$1 = {
  9391. en: en$1,
  9392. es,
  9393. fr,
  9394. "zh-Hans": zhHans$1,
  9395. "zh-Hant": zhHant$1
  9396. };
  9397. const {
  9398. t
  9399. } = initVueI18n(messages$1);
  9400. const _sfc_main$7 = {
  9401. name: "UniPagination",
  9402. emits: ["update:modelValue", "input", "change", "pageSizeChange"],
  9403. props: {
  9404. value: {
  9405. type: [Number, String],
  9406. default: 1
  9407. },
  9408. modelValue: {
  9409. type: [Number, String],
  9410. default: 1
  9411. },
  9412. prevText: {
  9413. type: String
  9414. },
  9415. nextText: {
  9416. type: String
  9417. },
  9418. piecePerPageText: {
  9419. type: String
  9420. },
  9421. current: {
  9422. type: [Number, String],
  9423. default: 1
  9424. },
  9425. total: {
  9426. // 数据总量
  9427. type: [Number, String],
  9428. default: 0
  9429. },
  9430. pageSize: {
  9431. // 每页数据量
  9432. type: [Number, String],
  9433. default: 10
  9434. },
  9435. showIcon: {
  9436. // 是否以 icon 形式展示按钮
  9437. type: [Boolean, String],
  9438. default: false
  9439. },
  9440. showPageSize: {
  9441. // 是否以 icon 形式展示按钮
  9442. type: [Boolean, String],
  9443. default: false
  9444. },
  9445. pagerCount: {
  9446. type: Number,
  9447. default: 5
  9448. },
  9449. pageSizeRange: {
  9450. type: Array,
  9451. default: () => [20, 50, 100, 500]
  9452. }
  9453. },
  9454. data() {
  9455. return {
  9456. pageSizeIndex: 0,
  9457. currentIndex: 1,
  9458. paperData: [],
  9459. pickerShow: false
  9460. };
  9461. },
  9462. computed: {
  9463. piecePerPage() {
  9464. return this.piecePerPageText || t("uni-pagination.piecePerPage");
  9465. },
  9466. prevPageText() {
  9467. return this.prevText || t("uni-pagination.prevText");
  9468. },
  9469. nextPageText() {
  9470. return this.nextText || t("uni-pagination.nextText");
  9471. },
  9472. maxPage() {
  9473. let maxPage = 1;
  9474. let total = Number(this.total);
  9475. let pageSize = Number(this.pageSize);
  9476. if (total && pageSize) {
  9477. maxPage = Math.ceil(total / pageSize);
  9478. }
  9479. return maxPage;
  9480. },
  9481. paper() {
  9482. const num = this.currentIndex;
  9483. const pagerCount = this.pagerCount;
  9484. const total = this.total;
  9485. const pageSize = this.pageSize;
  9486. let totalArr = [];
  9487. let showPagerArr = [];
  9488. let pagerNum = Math.ceil(total / pageSize);
  9489. for (let i2 = 0; i2 < pagerNum; i2++) {
  9490. totalArr.push(i2 + 1);
  9491. }
  9492. showPagerArr.push(1);
  9493. const totalNum = totalArr[totalArr.length - (pagerCount + 1) / 2];
  9494. totalArr.forEach((item, index) => {
  9495. if ((pagerCount + 1) / 2 >= num) {
  9496. if (item < pagerCount + 1 && item > 1) {
  9497. showPagerArr.push(item);
  9498. }
  9499. } else if (num + 2 <= totalNum) {
  9500. if (item > num - (pagerCount + 1) / 2 && item < num + (pagerCount + 1) / 2) {
  9501. showPagerArr.push(item);
  9502. }
  9503. } else {
  9504. if ((item > num - (pagerCount + 1) / 2 || pagerNum - pagerCount < item) && item < totalArr[totalArr.length - 1]) {
  9505. showPagerArr.push(item);
  9506. }
  9507. }
  9508. });
  9509. if (pagerNum > pagerCount) {
  9510. if ((pagerCount + 1) / 2 >= num) {
  9511. showPagerArr[showPagerArr.length - 1] = "...";
  9512. } else if (num + 2 <= totalNum) {
  9513. showPagerArr[1] = "...";
  9514. showPagerArr[showPagerArr.length - 1] = "...";
  9515. } else {
  9516. showPagerArr[1] = "...";
  9517. }
  9518. showPagerArr.push(totalArr[totalArr.length - 1]);
  9519. } else {
  9520. if ((pagerCount + 1) / 2 >= num)
  9521. ;
  9522. else if (num + 2 <= totalNum)
  9523. ;
  9524. else {
  9525. showPagerArr.shift();
  9526. showPagerArr.push(totalArr[totalArr.length - 1]);
  9527. }
  9528. }
  9529. return showPagerArr;
  9530. }
  9531. },
  9532. watch: {
  9533. current: {
  9534. immediate: true,
  9535. handler(val, old) {
  9536. if (val < 1) {
  9537. this.currentIndex = 1;
  9538. } else {
  9539. this.currentIndex = val;
  9540. }
  9541. }
  9542. },
  9543. value: {
  9544. immediate: true,
  9545. handler(val) {
  9546. if (Number(this.current) !== 1)
  9547. return;
  9548. if (val < 1) {
  9549. this.currentIndex = 1;
  9550. } else {
  9551. this.currentIndex = val;
  9552. }
  9553. }
  9554. },
  9555. pageSizeIndex(val) {
  9556. this.$emit("pageSizeChange", this.pageSizeRange[val]);
  9557. }
  9558. },
  9559. methods: {
  9560. pickerChange(e2) {
  9561. this.pageSizeIndex = e2.detail.value;
  9562. this.pickerClick();
  9563. },
  9564. pickerClick() {
  9565. },
  9566. // 选择标签
  9567. selectPage(e2, index) {
  9568. if (parseInt(e2)) {
  9569. this.currentIndex = e2;
  9570. this.change("current");
  9571. } else {
  9572. let pagerNum = Math.ceil(this.total / this.pageSize);
  9573. if (index <= 1) {
  9574. if (this.currentIndex - 5 > 1) {
  9575. this.currentIndex -= 5;
  9576. } else {
  9577. this.currentIndex = 1;
  9578. }
  9579. return;
  9580. }
  9581. if (index >= 6) {
  9582. if (this.currentIndex + 5 > pagerNum) {
  9583. this.currentIndex = pagerNum;
  9584. } else {
  9585. this.currentIndex += 5;
  9586. }
  9587. return;
  9588. }
  9589. }
  9590. },
  9591. clickLeft() {
  9592. if (Number(this.currentIndex) === 1) {
  9593. return;
  9594. }
  9595. this.currentIndex -= 1;
  9596. this.change("prev");
  9597. },
  9598. clickRight() {
  9599. if (Number(this.currentIndex) >= this.maxPage) {
  9600. return;
  9601. }
  9602. this.currentIndex += 1;
  9603. this.change("next");
  9604. },
  9605. change(e2) {
  9606. this.$emit("input", this.currentIndex);
  9607. this.$emit("update:modelValue", this.currentIndex);
  9608. this.$emit("change", {
  9609. type: e2,
  9610. current: this.currentIndex
  9611. });
  9612. }
  9613. }
  9614. };
  9615. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  9616. const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$2);
  9617. return vue.openBlock(), vue.createElementBlock("view", { class: "box" }, [
  9618. vue.createElementVNode("view"),
  9619. vue.createElementVNode("view", { class: "uni-pagination" }, [
  9620. $props.showPageSize === true || $props.showPageSize === "true" ? (vue.openBlock(), vue.createElementBlock("picker", {
  9621. key: 0,
  9622. class: "select-picker",
  9623. mode: "selector",
  9624. value: $data.pageSizeIndex,
  9625. range: $props.pageSizeRange,
  9626. onChange: _cache[0] || (_cache[0] = (...args) => $options.pickerChange && $options.pickerChange(...args)),
  9627. onCancel: _cache[1] || (_cache[1] = (...args) => $options.pickerClick && $options.pickerClick(...args)),
  9628. onClick: _cache[2] || (_cache[2] = (...args) => $options.pickerClick && $options.pickerClick(...args))
  9629. }, [
  9630. vue.createElementVNode("button", {
  9631. type: "default",
  9632. size: "mini",
  9633. plain: true
  9634. }, [
  9635. vue.createElementVNode(
  9636. "text",
  9637. null,
  9638. vue.toDisplayString($props.pageSizeRange[$data.pageSizeIndex]) + " " + vue.toDisplayString($options.piecePerPage),
  9639. 1
  9640. /* TEXT */
  9641. ),
  9642. vue.createVNode(_component_uni_icons, {
  9643. class: "select-picker-icon",
  9644. type: "arrowdown",
  9645. size: "12",
  9646. color: "#999"
  9647. })
  9648. ])
  9649. ], 40, ["value", "range"])) : vue.createCommentVNode("v-if", true),
  9650. vue.createCommentVNode(' <view class="uni-pagination__total is-phone-hide">共 {{ total }} 条</view> '),
  9651. vue.createElementVNode("view", {
  9652. class: vue.normalizeClass(["uni-pagination__btn", $data.currentIndex === 1 ? "uni-pagination--disabled" : "uni-pagination--enabled"]),
  9653. "hover-class": $data.currentIndex === 1 ? "" : "uni-pagination--hover",
  9654. "hover-start-time": 20,
  9655. "hover-stay-time": 70,
  9656. onClick: _cache[3] || (_cache[3] = (...args) => $options.clickLeft && $options.clickLeft(...args))
  9657. }, [
  9658. $props.showIcon === true || $props.showIcon === "true" ? (vue.openBlock(), vue.createElementBlock(
  9659. vue.Fragment,
  9660. { key: 0 },
  9661. [
  9662. vue.createVNode(_component_uni_icons, {
  9663. color: "#666",
  9664. size: "24",
  9665. type: "left"
  9666. }),
  9667. vue.createTextVNode(
  9668. " " + vue.toDisplayString(_ctx.$t("LastPage")),
  9669. 1
  9670. /* TEXT */
  9671. )
  9672. ],
  9673. 64
  9674. /* STABLE_FRAGMENT */
  9675. )) : (vue.openBlock(), vue.createElementBlock(
  9676. "text",
  9677. {
  9678. key: 1,
  9679. class: "uni-pagination__child-btn"
  9680. },
  9681. vue.toDisplayString($options.prevPageText),
  9682. 1
  9683. /* TEXT */
  9684. ))
  9685. ], 10, ["hover-class"]),
  9686. vue.createElementVNode("view", { class: "uni-pagination__num uni-pagination__num-flex-none" }, [
  9687. vue.createElementVNode("view", { class: "uni-pagination__num-current" }, [
  9688. vue.createElementVNode(
  9689. "text",
  9690. { class: "uni-pagination__num-current-text is-pc-hide current-index-text" },
  9691. vue.toDisplayString($data.currentIndex),
  9692. 1
  9693. /* TEXT */
  9694. ),
  9695. vue.createElementVNode(
  9696. "text",
  9697. { class: "uni-pagination__num-current-text is-pc-hide" },
  9698. "/" + vue.toDisplayString($options.maxPage || 0),
  9699. 1
  9700. /* TEXT */
  9701. ),
  9702. (vue.openBlock(true), vue.createElementBlock(
  9703. vue.Fragment,
  9704. null,
  9705. vue.renderList($options.paper, (item, index) => {
  9706. return vue.openBlock(), vue.createElementBlock("view", {
  9707. key: index,
  9708. class: vue.normalizeClass([{ "page--active": item === $data.currentIndex }, "uni-pagination__num-tag tag--active is-phone-hide"]),
  9709. onClick: ($event) => $options.selectPage(item, index)
  9710. }, [
  9711. vue.createElementVNode(
  9712. "view",
  9713. { class: "uni-pagination__num-tagwight" },
  9714. vue.toDisplayString(item),
  9715. 1
  9716. /* TEXT */
  9717. )
  9718. ], 10, ["onClick"]);
  9719. }),
  9720. 128
  9721. /* KEYED_FRAGMENT */
  9722. ))
  9723. ])
  9724. ]),
  9725. vue.createElementVNode("view", {
  9726. class: vue.normalizeClass(["uni-pagination__btn", $data.currentIndex >= $options.maxPage ? "uni-pagination--disabled" : "uni-pagination--enabled"]),
  9727. "hover-class": $data.currentIndex === $options.maxPage ? "" : "uni-pagination--hover",
  9728. "hover-start-time": 20,
  9729. "hover-stay-time": 70,
  9730. onClick: _cache[4] || (_cache[4] = (...args) => $options.clickRight && $options.clickRight(...args))
  9731. }, [
  9732. $props.showIcon === true || $props.showIcon === "true" ? (vue.openBlock(), vue.createElementBlock(
  9733. vue.Fragment,
  9734. { key: 0 },
  9735. [
  9736. vue.createTextVNode(
  9737. vue.toDisplayString(_ctx.$t("NextPage")) + " ",
  9738. 1
  9739. /* TEXT */
  9740. ),
  9741. vue.createVNode(_component_uni_icons, {
  9742. color: "#666",
  9743. size: "24",
  9744. type: "right"
  9745. })
  9746. ],
  9747. 64
  9748. /* STABLE_FRAGMENT */
  9749. )) : (vue.openBlock(), vue.createElementBlock(
  9750. "text",
  9751. {
  9752. key: 1,
  9753. class: "uni-pagination__child-btn"
  9754. },
  9755. vue.toDisplayString($options.nextPageText),
  9756. 1
  9757. /* TEXT */
  9758. ))
  9759. ], 10, ["hover-class"])
  9760. ])
  9761. ]);
  9762. }
  9763. const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-88b7506d"], ["__file", "D:/project/esswisdom_ipad_V2/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue"]]);
  9764. const _imports_2$1 = "/static/Return.png";
  9765. const _sfc_main$6 = {
  9766. data() {
  9767. return {
  9768. current: 1,
  9769. total: 0,
  9770. pageSize: 10,
  9771. faulttaps: "故障",
  9772. faultsList: []
  9773. };
  9774. },
  9775. onLoad() {
  9776. this.faulttaps = this.$store.state.event;
  9777. this.onfaultsList();
  9778. },
  9779. computed: {
  9780. // 使用 mapState 映射多个状态到组件的计算属性
  9781. ...mapState(["formattedTime", "status", "event"])
  9782. },
  9783. beforeUnmount() {
  9784. },
  9785. methods: {
  9786. onfaultsList() {
  9787. let data = {
  9788. page: this.current,
  9789. rows: this.pageSize,
  9790. device: "",
  9791. starttime: "",
  9792. endtime: "",
  9793. rt: 0,
  9794. type: this.faulttaps
  9795. };
  9796. getfaultsList(data).then((res) => {
  9797. formatAppLog("log", "at pages/details/index.vue:197", res);
  9798. if (res.status == "ok") {
  9799. this.faultsList = res.data.list;
  9800. this.total = res.data.pagination.total;
  9801. }
  9802. });
  9803. },
  9804. onclick() {
  9805. uni.redirectTo({
  9806. url: "/pages/index/index"
  9807. });
  9808. },
  9809. onReturn() {
  9810. uni.redirectTo({
  9811. url: "/pages/faultlist/index"
  9812. });
  9813. },
  9814. change(e2) {
  9815. formatAppLog("log", "at pages/details/index.vue:221", e2);
  9816. this.current = e2.current;
  9817. this.onfaultsList();
  9818. },
  9819. // taps(e) {
  9820. // this.faulttaps = e
  9821. // this.current = 1
  9822. // __f__('log','at pages/details/index.vue:228',e);
  9823. // this.onfaultsList()
  9824. // },
  9825. // 文字提示
  9826. closedevice() {
  9827. for (let i2 = 1; i2 < this.total; i2++) {
  9828. this.$refs["device" + i2].close();
  9829. }
  9830. },
  9831. onFaultclearing() {
  9832. let data = {
  9833. id: "201c23d5-f460-44d5-8dde-8adb46cd00f7",
  9834. issaveinitvalue: false,
  9835. value: "1"
  9836. };
  9837. formatAppLog("log", "at pages/details/index.vue:244", data);
  9838. control(data).then((res) => {
  9839. formatAppLog("log", "at pages/details/index.vue:246", res);
  9840. if (res.status == "ok") {
  9841. setTimeout(() => {
  9842. let info = {
  9843. id: "201c23d5-f460-44d5-8dde-8adb46cd00f7",
  9844. issaveinitvalue: false,
  9845. value: "0"
  9846. };
  9847. control(info).then((ress) => {
  9848. formatAppLog("log", "at pages/details/index.vue:255", ress);
  9849. if (ress.status == "ok") {
  9850. uni.showToast({
  9851. title: this.$t("OperationSuccessful"),
  9852. icon: "none",
  9853. duration: 2e3
  9854. // 显示时长,单位为毫秒
  9855. });
  9856. } else {
  9857. uni.showToast({
  9858. title: this.$t("operationFailed"),
  9859. icon: "none",
  9860. // 使用 'none' 图标来表示失败
  9861. duration: 2e3
  9862. // 显示时长,单位为毫秒
  9863. });
  9864. }
  9865. });
  9866. }, 1e3);
  9867. } else {
  9868. uni.showToast({
  9869. title: this.$t("operationFailed"),
  9870. icon: "none",
  9871. // 使用 'none' 图标来表示失败
  9872. duration: 2e3
  9873. // 显示时长,单位为毫秒
  9874. });
  9875. }
  9876. });
  9877. }
  9878. // close() {
  9879. // for (let i = 1; i < this.total; i++) {
  9880. // this.$refs[('tooltip' + i)].close()
  9881. // }
  9882. // }
  9883. }
  9884. };
  9885. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  9886. const _component_zb_tooltip = resolveEasycom(vue.resolveDynamicComponent("zb-tooltip"), __easycom_0);
  9887. const _component_uni_pagination = resolveEasycom(vue.resolveDynamicComponent("uni-pagination"), __easycom_1);
  9888. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  9889. vue.createElementVNode("view", { class: "top" }, [
  9890. vue.createElementVNode("image", {
  9891. class: "top_logo",
  9892. src: _imports_0,
  9893. mode: ""
  9894. }),
  9895. vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
  9896. vue.createElementVNode(
  9897. "view",
  9898. { class: "tite" },
  9899. vue.toDisplayString(_ctx.$t("MainTitle")),
  9900. 1
  9901. /* TEXT */
  9902. ),
  9903. vue.createElementVNode("view", { class: "time" }, [
  9904. vue.createElementVNode(
  9905. "view",
  9906. { class: "time_top" },
  9907. vue.toDisplayString(_ctx.formattedTime),
  9908. 1
  9909. /* TEXT */
  9910. ),
  9911. vue.createElementVNode("view", { class: "time_bottom" }, [
  9912. vue.createElementVNode("view"),
  9913. vue.createElementVNode("view", { class: "time_bottom1" }, [
  9914. vue.createTextVNode(
  9915. vue.toDisplayString(_ctx.$t("status")) + " ",
  9916. 1
  9917. /* TEXT */
  9918. ),
  9919. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  9920. "view",
  9921. {
  9922. key: 0,
  9923. class: "time_state"
  9924. },
  9925. vue.toDisplayString(_ctx.$t("online")),
  9926. 1
  9927. /* TEXT */
  9928. )) : (vue.openBlock(), vue.createElementBlock(
  9929. "view",
  9930. {
  9931. key: 1,
  9932. class: "time_state1"
  9933. },
  9934. vue.toDisplayString(_ctx.$t("offline")),
  9935. 1
  9936. /* TEXT */
  9937. ))
  9938. ])
  9939. ])
  9940. ])
  9941. ]),
  9942. vue.createElementVNode("view", { class: "parameter" }, [
  9943. vue.createElementVNode("view", { class: "parameter_xian" }, [
  9944. vue.createElementVNode(
  9945. "view",
  9946. { class: "parameter_xian1" },
  9947. vue.toDisplayString(_ctx.$t("formNO")),
  9948. 1
  9949. /* TEXT */
  9950. ),
  9951. vue.createElementVNode(
  9952. "view",
  9953. { class: "parameter_xian2" },
  9954. vue.toDisplayString(_ctx.$t("formUnit")),
  9955. 1
  9956. /* TEXT */
  9957. ),
  9958. vue.createElementVNode(
  9959. "view",
  9960. { class: "parameter_xian3" },
  9961. vue.toDisplayString(_ctx.$t("formDescription")),
  9962. 1
  9963. /* TEXT */
  9964. ),
  9965. vue.createElementVNode(
  9966. "view",
  9967. { class: "parameter_xian4" },
  9968. vue.toDisplayString(_ctx.$t("formFailure")),
  9969. 1
  9970. /* TEXT */
  9971. ),
  9972. vue.createCommentVNode(' <view class="parameter_xian5">\r\n 发生时间\r\n </view> '),
  9973. _ctx.event != "事件" ? (vue.openBlock(), vue.createElementBlock(
  9974. "view",
  9975. {
  9976. key: 0,
  9977. class: "parameter_xian6"
  9978. },
  9979. vue.toDisplayString(_ctx.$t("formRecover")),
  9980. 1
  9981. /* TEXT */
  9982. )) : vue.createCommentVNode("v-if", true)
  9983. ]),
  9984. vue.createElementVNode("view", { class: "parameter_box" }, [
  9985. (vue.openBlock(true), vue.createElementBlock(
  9986. vue.Fragment,
  9987. null,
  9988. vue.renderList($data.faultsList, (item, index) => {
  9989. return vue.openBlock(), vue.createElementBlock(
  9990. "view",
  9991. {
  9992. class: vue.normalizeClass(item.RESETTIME == "" && _ctx.event != "事件" ? "parameter_divred" : "parameter_div"),
  9993. key: index
  9994. },
  9995. [
  9996. vue.createElementVNode(
  9997. "view",
  9998. { class: "parameter_xian1" },
  9999. vue.toDisplayString(item.ID),
  10000. 1
  10001. /* TEXT */
  10002. ),
  10003. vue.createCommentVNode(' <view class="parameter_xian2">\r\n {{item.TYPE}}\r\n </view> '),
  10004. vue.createCommentVNode(` <zb-tooltip @click.top="close" :content="item.DEVICE" placement="top" :ref="'tooltip'+index"> `),
  10005. item.DEVICE == "亿能BMS-1" ? (vue.openBlock(), vue.createElementBlock("view", {
  10006. key: 0,
  10007. class: "parameter_xian2"
  10008. }, " BMS ")) : vue.createCommentVNode("v-if", true),
  10009. item.DEVICE == "英博电气pcs-1" ? (vue.openBlock(), vue.createElementBlock("view", {
  10010. key: 1,
  10011. class: "parameter_xian2"
  10012. }, " PCS ")) : vue.createCommentVNode("v-if", true),
  10013. item.DEVICE == "virtual" ? (vue.openBlock(), vue.createElementBlock("view", {
  10014. key: 2,
  10015. class: "parameter_xian2"
  10016. }, " MCS ")) : vue.createCommentVNode("v-if", true),
  10017. item.DEVICE == "充电桩ccu-1-1" ? (vue.openBlock(), vue.createElementBlock("view", {
  10018. key: 3,
  10019. class: "parameter_xian2"
  10020. }, " CCU ")) : vue.createCommentVNode("v-if", true),
  10021. item.DEVICE == "innerIO-1" ? (vue.openBlock(), vue.createElementBlock("view", {
  10022. key: 4,
  10023. class: "parameter_xian2"
  10024. }, " IO ")) : vue.createCommentVNode("v-if", true),
  10025. vue.createCommentVNode(" </zb-tooltip> "),
  10026. vue.createVNode(_component_zb_tooltip, {
  10027. onClick: $options.closedevice,
  10028. content: item.CONTENT,
  10029. placement: "top",
  10030. ref_for: true,
  10031. ref: "device" + index
  10032. }, {
  10033. default: vue.withCtx(() => [
  10034. vue.createElementVNode(
  10035. "view",
  10036. { class: "parameter_xian3" },
  10037. vue.toDisplayString(item.CONTENT),
  10038. 1
  10039. /* TEXT */
  10040. )
  10041. ]),
  10042. _: 2
  10043. /* DYNAMIC */
  10044. }, 1032, ["onClick", "content"]),
  10045. vue.createElementVNode(
  10046. "view",
  10047. { class: "parameter_xian4" },
  10048. vue.toDisplayString(item.FAULTTIME.substring(0, 19)),
  10049. 1
  10050. /* TEXT */
  10051. ),
  10052. _ctx.event != "事件" ? (vue.openBlock(), vue.createElementBlock(
  10053. "view",
  10054. {
  10055. key: 5,
  10056. class: "parameter_xian6"
  10057. },
  10058. vue.toDisplayString(item.RESETTIME.substring(0, 19)),
  10059. 1
  10060. /* TEXT */
  10061. )) : vue.createCommentVNode("v-if", true)
  10062. ],
  10063. 2
  10064. /* CLASS */
  10065. );
  10066. }),
  10067. 128
  10068. /* KEYED_FRAGMENT */
  10069. ))
  10070. ]),
  10071. vue.createElementVNode("view", { class: "parameter_bottom" }, [
  10072. vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [
  10073. vue.createElementVNode("view", {
  10074. class: "parameter_bottom1",
  10075. onClick: _cache[0] || (_cache[0] = (...args) => $options.onclick && $options.onclick(...args))
  10076. }, [
  10077. vue.createElementVNode("image", {
  10078. src: _imports_1$3,
  10079. mode: ""
  10080. }),
  10081. vue.createElementVNode(
  10082. "text",
  10083. { class: "parameter_bottom2" },
  10084. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  10085. 1
  10086. /* TEXT */
  10087. )
  10088. ]),
  10089. vue.createElementVNode("view", {
  10090. class: "parameter_bottom11",
  10091. onClick: _cache[1] || (_cache[1] = (...args) => $options.onReturn && $options.onReturn(...args))
  10092. }, [
  10093. vue.createElementVNode("image", {
  10094. src: _imports_2$1,
  10095. mode: ""
  10096. }),
  10097. vue.createElementVNode(
  10098. "text",
  10099. { class: "parameter_bottom2" },
  10100. vue.toDisplayString(_ctx.$t("Return")),
  10101. 1
  10102. /* TEXT */
  10103. )
  10104. ])
  10105. ]),
  10106. vue.createCommentVNode(` <view class="parameter_bottom3">\r
  10107. <view :class="faulttaps=='实时'?'parameter_bottom31':'parameter_bottom32'" @click="taps('实时')">\r
  10108. 实时\r
  10109. </view>\r
  10110. \r
  10111. <view v-if="event=='故障'" :class="faulttaps=='故障'?'parameter_bottom31':'parameter_bottom32'" @click="taps('故障')">\r
  10112. 故障\r
  10113. </view>\r
  10114. <view v-if="event=='告警'" :class="faulttaps=='告警'?'parameter_bottom31':'parameter_bottom32'" @click="taps('告警')">\r
  10115. 告警\r
  10116. </view>\r
  10117. <view v-if="event=='事件'" :class="faulttaps=='事件'?'parameter_bottom31':'parameter_bottom32'" @click="taps('事件')">\r
  10118. 事件\r
  10119. </view>\r
  10120. </view> `),
  10121. vue.createElementVNode("view", { class: "parameter_bottom4" }, [
  10122. vue.createElementVNode(
  10123. "view",
  10124. {
  10125. class: "eliminate",
  10126. onClick: _cache[2] || (_cache[2] = (...args) => $options.onFaultclearing && $options.onFaultclearing(...args))
  10127. },
  10128. vue.toDisplayString(_ctx.$t("FaultClearing")),
  10129. 1
  10130. /* TEXT */
  10131. ),
  10132. vue.createVNode(_component_uni_pagination, {
  10133. total: $data.total,
  10134. current: $data.current,
  10135. title: "标题文字",
  10136. "show-icon": true,
  10137. onChange: $options.change
  10138. }, null, 8, ["total", "current", "onChange"])
  10139. ])
  10140. ])
  10141. ])
  10142. ]);
  10143. }
  10144. const PagesDetailsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-a45dfdea"], ["__file", "D:/project/esswisdom_ipad_V2/pages/details/index.vue"]]);
  10145. const _imports_1$2 = "/static/img/AC2.png";
  10146. const _imports_3$2 = "/static/fang.png";
  10147. const _sfc_main$5 = {
  10148. components: {
  10149. cmdProgress: __easycom_0$1
  10150. },
  10151. data() {
  10152. return {
  10153. successtype: "success",
  10154. confirmText: "确认启动",
  10155. title: "你确定要开启该设备吗?",
  10156. content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
  10157. value: "",
  10158. modeinput: "",
  10159. segmented: 1,
  10160. uidatas: "",
  10161. formatTimeid: "",
  10162. faultsdata: [],
  10163. messageText: "",
  10164. SysFaultState: true,
  10165. currentDate: ""
  10166. };
  10167. },
  10168. onLoad() {
  10169. this.confirmText = this.$t("ConfirmStart");
  10170. this.title = this.$t("popUpTitle");
  10171. this.content = this.$t("popUpContent");
  10172. },
  10173. computed: {
  10174. // 使用 mapState 映射多个状态到组件的计算属性
  10175. ...mapState(["formattedTime", "status"]),
  10176. ...mapState({
  10177. uidatasdata: (state2) => state2.uidatasdata
  10178. })
  10179. },
  10180. mounted() {
  10181. },
  10182. beforeUnmount() {
  10183. },
  10184. watch: {
  10185. uidatasdata: {
  10186. handler(newVal, oldVal) {
  10187. formatAppLog("log", "at pages/electricity/index.vue:631", "uidatasdata 发生变化:", newVal);
  10188. if (newVal.SysState_SysFaultState == 1 && this.SysFaultState) {
  10189. this.SysFaultState = false;
  10190. setTimeout(() => {
  10191. this.onfaultsdata();
  10192. }, 1e3);
  10193. } else if (newVal.SysState_SysFaultState == 0) {
  10194. this.SysFaultState = true;
  10195. }
  10196. },
  10197. deep: true
  10198. // 监听深层次的变化
  10199. }
  10200. },
  10201. methods: {
  10202. onfaultsdata() {
  10203. let data = {
  10204. page: 1,
  10205. rows: 10,
  10206. device: "",
  10207. starttime: "",
  10208. endtime: "",
  10209. rt: 1,
  10210. type: "故障"
  10211. };
  10212. getfaultsList(data).then((res) => {
  10213. formatAppLog("log", "at pages/electricity/index.vue:658", res);
  10214. if (res.status == "ok") {
  10215. this.faultsdata = [];
  10216. for (var i2 = 0; i2 < res.data.list.length; i2++) {
  10217. if (this.$store.state.formattedTime.substring(0, 10) == res.data.list[i2].FAULTTIME.substring(0, 10)) {
  10218. this.faultsdata.push(res.data.list[i2]);
  10219. }
  10220. }
  10221. }
  10222. });
  10223. },
  10224. // 返回首页
  10225. onreturn() {
  10226. uni.redirectTo({
  10227. url: "/pages/index/index"
  10228. });
  10229. },
  10230. // 启动设备弹窗
  10231. dialogToggle() {
  10232. this.modeinput = "base";
  10233. this.successtype = "success";
  10234. this.confirmText = this.$t("ConfirmStart");
  10235. this.title = this.$t("popUpTitle");
  10236. this.content = this.$t("popUpContent");
  10237. this.$refs.alertDialog.open();
  10238. },
  10239. onstopit() {
  10240. this.modeinput = "base";
  10241. this.successtype = "error";
  10242. this.confirmText = this.$t("ConfirmStop");
  10243. this.title = this.$t("popUpTitleStop");
  10244. this.content = this.$t("popUpContentStop");
  10245. this.$refs.alertDialog.open();
  10246. },
  10247. // 确认弹窗
  10248. dialogConfirm() {
  10249. this.$store.state.uidatasdata;
  10250. let data = {
  10251. id: "c35c4db0-113f-442a-9e26-728489265fdb",
  10252. issaveinitvalue: false,
  10253. value: this.content == this.$t("popUpContent") ? "1" : "0"
  10254. };
  10255. control(data).then((data2) => {
  10256. if (data2.status == "ok") {
  10257. this.$refs.alertDialog.close();
  10258. uni.showToast({
  10259. title: this.$t("OperationSuccessful"),
  10260. icon: "none",
  10261. duration: 2e3
  10262. // 显示时长,单位为毫秒
  10263. });
  10264. } else {
  10265. this.$refs.alertDialog.close();
  10266. uni.showToast({
  10267. title: this.$t("operationFailed"),
  10268. icon: "none",
  10269. // 使用 'none' 图标来表示失败
  10270. duration: 2e3
  10271. // 显示时长,单位为毫秒
  10272. });
  10273. }
  10274. });
  10275. },
  10276. dialogClose() {
  10277. formatAppLog("log", "at pages/electricity/index.vue:735", this.value);
  10278. this.$refs.alertDialog.close();
  10279. },
  10280. ontap(e2) {
  10281. formatAppLog("log", "at pages/electricity/index.vue:739", e2);
  10282. this.segmented = e2;
  10283. }
  10284. }
  10285. };
  10286. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  10287. const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
  10288. const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
  10289. const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
  10290. const _component_uni_popup_message = resolveEasycom(vue.resolveDynamicComponent("uni-popup-message"), __easycom_3);
  10291. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  10292. vue.createElementVNode("view", { class: "top" }, [
  10293. vue.createElementVNode("image", {
  10294. class: "top_logo",
  10295. src: _imports_0,
  10296. mode: ""
  10297. }),
  10298. vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
  10299. vue.createElementVNode(
  10300. "view",
  10301. { class: "tite" },
  10302. vue.toDisplayString(_ctx.$t("MainTitle")),
  10303. 1
  10304. /* TEXT */
  10305. ),
  10306. vue.createElementVNode("view", { class: "time" }, [
  10307. vue.createElementVNode(
  10308. "view",
  10309. { class: "time_top" },
  10310. vue.toDisplayString(_ctx.formattedTime),
  10311. 1
  10312. /* TEXT */
  10313. ),
  10314. vue.createElementVNode("view", { class: "time_bottom" }, [
  10315. vue.createElementVNode("view"),
  10316. vue.createElementVNode("view", { class: "time_bottom1" }, [
  10317. vue.createTextVNode(
  10318. vue.toDisplayString(_ctx.$t("status")) + " ",
  10319. 1
  10320. /* TEXT */
  10321. ),
  10322. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  10323. "view",
  10324. {
  10325. key: 0,
  10326. class: "time_state"
  10327. },
  10328. vue.toDisplayString(_ctx.$t("online")),
  10329. 1
  10330. /* TEXT */
  10331. )) : (vue.openBlock(), vue.createElementBlock(
  10332. "view",
  10333. {
  10334. key: 1,
  10335. class: "time_state1"
  10336. },
  10337. vue.toDisplayString(_ctx.$t("offline")),
  10338. 1
  10339. /* TEXT */
  10340. ))
  10341. ])
  10342. ])
  10343. ])
  10344. ]),
  10345. vue.createElementVNode("view", { class: "parameter" }, [
  10346. vue.createElementVNode("view", { class: "parameter_left" }, [
  10347. vue.createElementVNode("view", { class: "parameter_left1" }, [
  10348. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
  10349. vue.createVNode(_component_cmd_progress, {
  10350. type: "dashboard",
  10351. percent: _ctx.uidatasdata.SOC ?? 0,
  10352. "stroke-color": "#B0D0FF",
  10353. "stroke-width": 6,
  10354. width: 180,
  10355. "stroke-shape": "square",
  10356. showInfo: false
  10357. }, null, 8, ["percent"]),
  10358. vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
  10359. vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
  10360. vue.createTextVNode(
  10361. vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
  10362. 1
  10363. /* TEXT */
  10364. ),
  10365. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
  10366. ]),
  10367. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
  10368. ]),
  10369. vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
  10370. vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
  10371. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
  10372. vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
  10373. ])
  10374. ])
  10375. ]),
  10376. 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> ')
  10377. ]),
  10378. vue.createElementVNode("image", {
  10379. class: "parameter_leftdian1",
  10380. src: _imports_1$2,
  10381. alt: ""
  10382. }),
  10383. vue.createElementVNode("view", { class: "parameter_lef2" }, [
  10384. vue.createElementVNode("image", {
  10385. src: _imports_2$2,
  10386. mode: ""
  10387. })
  10388. ]),
  10389. vue.createElementVNode("image", {
  10390. class: "parameter_leftche1",
  10391. src: _imports_3$2,
  10392. mode: ""
  10393. }),
  10394. vue.createElementVNode(
  10395. "view",
  10396. { class: "parameter_leftview" },
  10397. vue.toDisplayString(_ctx.$t("CommunicationSupplyOutput")),
  10398. 1
  10399. /* TEXT */
  10400. )
  10401. ]),
  10402. vue.createElementVNode("view", { class: "parameter_right" }, [
  10403. vue.createElementVNode("view", { class: "parameter_righttop" }, [
  10404. vue.createElementVNode("view", { class: "parameter_1" }, [
  10405. vue.createCommentVNode(` <view class="parameter_2">\r
  10406. <view class="parameter_31">\r
  10407. <view class="parameter_4">\r
  10408. <image src="../../static/y8.png" mode="" v-if="uidatasdata.AC_Out_380V_125A_Status==0.00"></image>\r
  10409. <image src="../../static/y6.png" mode="" v-else></image>\r
  10410. {{$t('state125A')}}\r
  10411. </view>\r
  10412. <view class="parameter_51" v-if="uidatasdata.AC_Out_380V_125A_Status==0.00">\r
  10413. {{$t('connect')}}\r
  10414. </view>\r
  10415. <view class="parameter_5" v-else>\r
  10416. {{$t('breakoff')}}\r
  10417. </view>\r
  10418. </view>\r
  10419. <view class="parameter_31">\r
  10420. <view class="parameter_4">\r
  10421. <image src="../../static/y8.png" mode="" v-if="uidatasdata.AC_Out_380V_63A_Status==0.00"></image>\r
  10422. <image src="../../static/y6.png" mode="" v-else></image>\r
  10423. {{$t('state63A')}}\r
  10424. </view>\r
  10425. <view class="parameter_51" v-if="uidatasdata.AC_Out_380V_63A_Status==0.00">\r
  10426. {{$t('connect')}}\r
  10427. </view>\r
  10428. <view class="parameter_5" v-else>\r
  10429. {{$t('breakoff')}}\r
  10430. </view>\r
  10431. </view>\r
  10432. <view class="parameter_31">\r
  10433. <view class="parameter_4">\r
  10434. <image src="../../static/y8.png" mode="" v-if="uidatasdata.AC_Out_220V_16A_Status==0.00"></image>\r
  10435. <image src="../../static/y6.png" mode="" v-else></image>\r
  10436. {{$t('state16A')}}\r
  10437. </view>\r
  10438. <view class="parameter_51" v-if="uidatasdata.AC_Out_220V_16A_Status==0.00">\r
  10439. {{$t('connect')}}\r
  10440. </view>\r
  10441. <view class="parameter_5" v-else>\r
  10442. {{$t('breakoff')}}\r
  10443. </view>\r
  10444. </view>\r
  10445. \r
  10446. </view> `),
  10447. vue.createElementVNode("view", { class: "parameter_SOC" }, [
  10448. vue.createElementVNode("image", {
  10449. src: _imports_6,
  10450. mode: ""
  10451. }),
  10452. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  10453. vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
  10454. vue.createElementVNode("view", null, [
  10455. vue.createElementVNode(
  10456. "text",
  10457. { class: "parameter_SOCright2" },
  10458. vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
  10459. 1
  10460. /* TEXT */
  10461. ),
  10462. vue.createElementVNode("text", null, " %")
  10463. ])
  10464. ])
  10465. ]),
  10466. vue.createElementVNode("view", { class: "parameter_Battery" }, [
  10467. vue.createElementVNode("image", {
  10468. src: _imports_7,
  10469. mode: ""
  10470. }),
  10471. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  10472. vue.createElementVNode(
  10473. "view",
  10474. { class: "parameter_SOCright1" },
  10475. vue.toDisplayString(_ctx.$t("BatteryStatus")),
  10476. 1
  10477. /* TEXT */
  10478. ),
  10479. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  10480. _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
  10481. "view",
  10482. { key: 0 },
  10483. vue.toDisplayString(_ctx.$t("fault")),
  10484. 1
  10485. /* TEXT */
  10486. )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
  10487. vue.Fragment,
  10488. { key: 1 },
  10489. [
  10490. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==0">\r
  10491. {{$t('ChuShiHua')}}\r
  10492. </view> `),
  10493. vue.createElementVNode(
  10494. "view",
  10495. null,
  10496. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  10497. 1
  10498. /* TEXT */
  10499. )
  10500. ],
  10501. 2112
  10502. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  10503. )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
  10504. vue.Fragment,
  10505. { key: 2 },
  10506. [
  10507. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==2">\r
  10508. {{$t('HighVoltageMedium')}}\r
  10509. </view> `),
  10510. vue.createElementVNode(
  10511. "view",
  10512. null,
  10513. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  10514. 1
  10515. /* TEXT */
  10516. )
  10517. ],
  10518. 2112
  10519. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  10520. )) : (vue.openBlock(), vue.createElementBlock(
  10521. vue.Fragment,
  10522. { key: 3 },
  10523. [
  10524. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==4">\r
  10525. {{$t('Underhighpressure')}}\r
  10526. </view> `),
  10527. vue.createElementVNode("view", null, " — ")
  10528. ],
  10529. 2112
  10530. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  10531. )),
  10532. vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} ")
  10533. ])
  10534. ])
  10535. ]),
  10536. vue.createElementVNode("view", { class: "parameter_state" }, [
  10537. vue.createElementVNode("image", {
  10538. src: _imports_8,
  10539. mode: ""
  10540. }),
  10541. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  10542. vue.createElementVNode(
  10543. "view",
  10544. { class: "parameter_SOCright1" },
  10545. vue.toDisplayString(_ctx.$t("SystemStatus")),
  10546. 1
  10547. /* TEXT */
  10548. ),
  10549. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  10550. vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
  10551. _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
  10552. "view",
  10553. { key: 0 },
  10554. vue.toDisplayString(_ctx.$t("uncharged")),
  10555. 1
  10556. /* TEXT */
  10557. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
  10558. "view",
  10559. { key: 1 },
  10560. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  10561. 1
  10562. /* TEXT */
  10563. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
  10564. "view",
  10565. { key: 2 },
  10566. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  10567. 1
  10568. /* TEXT */
  10569. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
  10570. "view",
  10571. { key: 3 },
  10572. vue.toDisplayString(_ctx.$t("full")),
  10573. 1
  10574. /* TEXT */
  10575. )) : (vue.openBlock(), vue.createElementBlock(
  10576. vue.Fragment,
  10577. { key: 4 },
  10578. [
  10579. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_==4">\r
  10580. {{$t('Chargingstopped')}}\r
  10581. </view> `),
  10582. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_>3&&uidatasdata.bms_BatSysWorkMode_<8">\r
  10583. {{$t('retain')}}\r
  10584. </view> `),
  10585. vue.createElementVNode("view", null, " — ")
  10586. ],
  10587. 2112
  10588. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  10589. ))
  10590. ])
  10591. ])
  10592. ])
  10593. ])
  10594. ]),
  10595. vue.createElementVNode("view", { class: "parameter_tap" }, [
  10596. vue.createElementVNode(
  10597. "view",
  10598. {
  10599. class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
  10600. onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
  10601. },
  10602. vue.toDisplayString(_ctx.$t("exchangeinformation")),
  10603. 3
  10604. /* TEXT, CLASS */
  10605. ),
  10606. vue.createElementVNode(
  10607. "view",
  10608. {
  10609. class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"),
  10610. onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2))
  10611. },
  10612. vue.toDisplayString(_ctx.$t("Batteryinformation")),
  10613. 3
  10614. /* TEXT, CLASS */
  10615. ),
  10616. vue.createElementVNode(
  10617. "view",
  10618. {
  10619. class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
  10620. onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3))
  10621. },
  10622. vue.toDisplayString(_ctx.$t("statisticalinformation")),
  10623. 3
  10624. /* TEXT, CLASS */
  10625. ),
  10626. vue.createElementVNode(
  10627. "view",
  10628. {
  10629. class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"),
  10630. onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(4))
  10631. },
  10632. vue.toDisplayString(_ctx.$t("coolinginformation")),
  10633. 3
  10634. /* TEXT, CLASS */
  10635. )
  10636. ]),
  10637. vue.createElementVNode("view", { class: "parameter_zheng" }, [
  10638. $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  10639. key: 0,
  10640. class: "parameter_box"
  10641. }, [
  10642. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  10643. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10644. vue.createElementVNode(
  10645. "view",
  10646. { class: "parameter_zheng12" },
  10647. vue.toDisplayString(_ctx.$t("PhaseVoltageAV")),
  10648. 1
  10649. /* TEXT */
  10650. ),
  10651. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10652. vue.createTextVNode(
  10653. vue.toDisplayString(_ctx.uidatasdata.PCSPortAPhaseVoltage ?? "—") + " ",
  10654. 1
  10655. /* TEXT */
  10656. ),
  10657. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10658. ])
  10659. ]),
  10660. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10661. vue.createElementVNode(
  10662. "view",
  10663. { class: "parameter_zheng12" },
  10664. vue.toDisplayString(_ctx.$t("PhaseVoltageBV")),
  10665. 1
  10666. /* TEXT */
  10667. ),
  10668. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10669. vue.createTextVNode(
  10670. vue.toDisplayString(_ctx.uidatasdata.PCSPortBPhaseVoltage ?? "—") + " ",
  10671. 1
  10672. /* TEXT */
  10673. ),
  10674. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10675. ])
  10676. ]),
  10677. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10678. vue.createElementVNode(
  10679. "view",
  10680. { class: "parameter_zheng12" },
  10681. vue.toDisplayString(_ctx.$t("PhaseVoltageCV")),
  10682. 1
  10683. /* TEXT */
  10684. ),
  10685. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10686. vue.createTextVNode(
  10687. vue.toDisplayString(_ctx.uidatasdata.PCSPortCPhaseVoltage ?? "—") + " ",
  10688. 1
  10689. /* TEXT */
  10690. ),
  10691. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10692. ])
  10693. ]),
  10694. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10695. vue.createElementVNode(
  10696. "view",
  10697. { class: "parameter_zheng12" },
  10698. vue.toDisplayString(_ctx.$t("DischargePower")),
  10699. 1
  10700. /* TEXT */
  10701. ),
  10702. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10703. vue.createTextVNode(
  10704. vue.toDisplayString(_ctx.uidatasdata.PCSTotalOutputPower ?? "—") + " ",
  10705. 1
  10706. /* TEXT */
  10707. ),
  10708. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  10709. ])
  10710. ])
  10711. ]),
  10712. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  10713. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10714. vue.createElementVNode(
  10715. "view",
  10716. { class: "parameter_zheng12" },
  10717. vue.toDisplayString(_ctx.$t("PhaseVoltageAA")),
  10718. 1
  10719. /* TEXT */
  10720. ),
  10721. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10722. vue.createTextVNode(
  10723. vue.toDisplayString(_ctx.uidatasdata["PCSOutputA-phaseCurrent"] ?? "—") + " ",
  10724. 1
  10725. /* TEXT */
  10726. ),
  10727. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  10728. ])
  10729. ]),
  10730. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10731. vue.createElementVNode(
  10732. "view",
  10733. { class: "parameter_zheng12" },
  10734. vue.toDisplayString(_ctx.$t("PhaseVoltageBA")),
  10735. 1
  10736. /* TEXT */
  10737. ),
  10738. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10739. vue.createTextVNode(
  10740. vue.toDisplayString(_ctx.uidatasdata["PCSOutputB-phaseCurrent"] ?? "—") + " ",
  10741. 1
  10742. /* TEXT */
  10743. ),
  10744. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  10745. ])
  10746. ]),
  10747. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10748. vue.createElementVNode(
  10749. "view",
  10750. { class: "parameter_zheng12" },
  10751. vue.toDisplayString(_ctx.$t("PhaseVoltageCA")),
  10752. 1
  10753. /* TEXT */
  10754. ),
  10755. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10756. vue.createTextVNode(
  10757. vue.toDisplayString(_ctx.uidatasdata["PCSOutputC-phaseCurrent"] ?? "—"),
  10758. 1
  10759. /* TEXT */
  10760. ),
  10761. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  10762. ])
  10763. ]),
  10764. vue.createElementVNode("view", {
  10765. class: "parameter_zheng11",
  10766. style: { "height": "30px" }
  10767. }, [
  10768. vue.createElementVNode("view", { class: "parameter_zheng12" }, [
  10769. vue.createCommentVNode(" {{$t('DischargeCapacity')}} ")
  10770. ]),
  10771. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  10772. {{uidatasdata.PCSACDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text>\r
  10773. </view> `)
  10774. ])
  10775. ])
  10776. ])) : vue.createCommentVNode("v-if", true),
  10777. $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  10778. key: 1,
  10779. class: "parameter_box"
  10780. }, [
  10781. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  10782. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  10783. <view class="parameter_zheng12">\r
  10784. {{$t('Batterypower')}}\r
  10785. </view>\r
  10786. <view class="parameter_zheng13">\r
  10787. {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">kW</text>\r
  10788. </view>\r
  10789. </view> `),
  10790. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10791. vue.createElementVNode(
  10792. "view",
  10793. { class: "parameter_zheng12" },
  10794. vue.toDisplayString(_ctx.$t("TotalPressure")),
  10795. 1
  10796. /* TEXT */
  10797. ),
  10798. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10799. vue.createTextVNode(
  10800. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
  10801. 1
  10802. /* TEXT */
  10803. ),
  10804. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10805. ])
  10806. ]),
  10807. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10808. vue.createElementVNode(
  10809. "view",
  10810. { class: "parameter_zheng12" },
  10811. vue.toDisplayString(_ctx.$t("AllowableDischargepower")),
  10812. 1
  10813. /* TEXT */
  10814. ),
  10815. vue.createCommentVNode(" DchChgCurPowLimit_MaxDischargeCurrentLimit "),
  10816. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10817. vue.createTextVNode(
  10818. vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargePowerLimit ?? "—") + " ",
  10819. 1
  10820. /* TEXT */
  10821. ),
  10822. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  10823. ])
  10824. ]),
  10825. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10826. vue.createElementVNode(
  10827. "view",
  10828. { class: "parameter_zheng12" },
  10829. vue.toDisplayString(_ctx.$t("MaximumVoltage")),
  10830. 1
  10831. /* TEXT */
  10832. ),
  10833. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10834. vue.createTextVNode(
  10835. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
  10836. 1
  10837. /* TEXT */
  10838. ),
  10839. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10840. ])
  10841. ]),
  10842. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10843. vue.createElementVNode(
  10844. "view",
  10845. { class: "parameter_zheng12" },
  10846. vue.toDisplayString(_ctx.$t("MaximumTemperature")),
  10847. 1
  10848. /* TEXT */
  10849. ),
  10850. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10851. vue.createTextVNode(
  10852. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
  10853. 1
  10854. /* TEXT */
  10855. ),
  10856. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  10857. ])
  10858. ])
  10859. ]),
  10860. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  10861. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10862. vue.createElementVNode(
  10863. "view",
  10864. { class: "parameter_zheng12" },
  10865. vue.toDisplayString(_ctx.$t("BatteryCurrent")),
  10866. 1
  10867. /* TEXT */
  10868. ),
  10869. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10870. vue.createTextVNode(
  10871. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
  10872. 1
  10873. /* TEXT */
  10874. ),
  10875. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  10876. ])
  10877. ]),
  10878. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  10879. <view class="parameter_zheng12">\r
  10880. {{$t('TotalExternalPressure')}}\r
  10881. </view>\r
  10882. <view class="parameter_zheng13">\r
  10883. {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
  10884. </view>\r
  10885. </view> `),
  10886. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10887. vue.createElementVNode(
  10888. "view",
  10889. { class: "parameter_zheng12" },
  10890. vue.toDisplayString(_ctx.$t("AllowDischargeCurrent")),
  10891. 1
  10892. /* TEXT */
  10893. ),
  10894. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10895. vue.createCommentVNode(" {{uidatasdata.ChargingInformation_Chg_Max_Cur??'—'}} <text "),
  10896. vue.createTextVNode(
  10897. " " + vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—") + " ",
  10898. 1
  10899. /* TEXT */
  10900. ),
  10901. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  10902. ])
  10903. ]),
  10904. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10905. vue.createElementVNode(
  10906. "view",
  10907. { class: "parameter_zheng12" },
  10908. vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
  10909. 1
  10910. /* TEXT */
  10911. ),
  10912. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10913. vue.createTextVNode(
  10914. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ",
  10915. 1
  10916. /* TEXT */
  10917. ),
  10918. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  10919. ])
  10920. ]),
  10921. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  10922. vue.createElementVNode(
  10923. "view",
  10924. { class: "parameter_zheng12" },
  10925. vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
  10926. 1
  10927. /* TEXT */
  10928. ),
  10929. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  10930. vue.createTextVNode(
  10931. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
  10932. 1
  10933. /* TEXT */
  10934. ),
  10935. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  10936. ])
  10937. ])
  10938. ])
  10939. ])) : vue.createCommentVNode("v-if", true),
  10940. $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  10941. key: 2,
  10942. class: "parameter_box"
  10943. }, [
  10944. vue.createElementVNode("view", { class: "parameter_zheng10" }, [
  10945. vue.createCommentVNode(` <view class="parameter_zhengbox">\r
  10946. <view class="parameter_zheng12">\r
  10947. {{$t('AccumulatedChargingCapacityCommunication')}}\r
  10948. </view>\r
  10949. <view class="parameter_zhengbox13">\r
  10950. {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kW</text> <text></text>\r
  10951. </view>\r
  10952. </view>\r
  10953. <view class="parameter_zhengbox parameter_zheng101">\r
  10954. <view class="parameter_zheng12">\r
  10955. {{$t('AccumulatedDCChargingCapacity')}}\r
  10956. </view>\r
  10957. <view class="parameter_zhengbox13">\r
  10958. {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">V</text> <text></text>\r
  10959. </view>\r
  10960. </view> `),
  10961. vue.createElementVNode("view", { class: "parameter_zhengbox" }, [
  10962. vue.createElementVNode(
  10963. "view",
  10964. { class: "parameter_zheng12" },
  10965. vue.toDisplayString(_ctx.$t("RunningTimesdischarge")),
  10966. 1
  10967. /* TEXT */
  10968. ),
  10969. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  10970. vue.createTextVNode(
  10971. vue.toDisplayString(_ctx.uidatasdata.CommunicationDuration) + " ",
  10972. 1
  10973. /* TEXT */
  10974. ),
  10975. vue.createElementVNode(
  10976. "text",
  10977. { class: "parameter_zheng14" },
  10978. vue.toDisplayString(_ctx.$t("RunningTimesmin")),
  10979. 1
  10980. /* TEXT */
  10981. ),
  10982. vue.createTextVNode(),
  10983. vue.createElementVNode("text")
  10984. ])
  10985. ]),
  10986. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  10987. vue.createElementVNode(
  10988. "view",
  10989. { class: "parameter_zheng12" },
  10990. vue.toDisplayString(_ctx.$t("InputCapacitydischarge")),
  10991. 1
  10992. /* TEXT */
  10993. ),
  10994. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  10995. vue.createTextVNode(
  10996. vue.toDisplayString(_ctx.uidatasdata.CommunicationDischarge) + " ",
  10997. 1
  10998. /* TEXT */
  10999. ),
  11000. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  11001. vue.createTextVNode(),
  11002. vue.createElementVNode("text")
  11003. ])
  11004. ]),
  11005. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  11006. vue.createElementVNode(
  11007. "view",
  11008. { class: "parameter_zheng12" },
  11009. vue.toDisplayString(_ctx.$t("AccumulateInputdischarge")),
  11010. 1
  11011. /* TEXT */
  11012. ),
  11013. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  11014. vue.createCommentVNode(` {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text> `),
  11015. vue.createTextVNode(
  11016. " " + vue.toDisplayString(_ctx.uidatasdata.PCSACDisChargeEnergy ?? "—"),
  11017. 1
  11018. /* TEXT */
  11019. ),
  11020. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  11021. vue.createTextVNode(),
  11022. vue.createElementVNode("text")
  11023. ])
  11024. ])
  11025. ])
  11026. ])) : vue.createCommentVNode("v-if", true),
  11027. $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  11028. key: 3,
  11029. class: "parameter_box"
  11030. }, [
  11031. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  11032. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11033. vue.createElementVNode(
  11034. "view",
  11035. { class: "parameter_zheng12" },
  11036. vue.toDisplayString(_ctx.$t("WorkingMode")),
  11037. 1
  11038. /* TEXT */
  11039. ),
  11040. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11041. vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
  11042. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
  11043. _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
  11044. "view",
  11045. { key: 0 },
  11046. vue.toDisplayString(_ctx.$t("OffMode")),
  11047. 1
  11048. /* TEXT */
  11049. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
  11050. "view",
  11051. { key: 1 },
  11052. vue.toDisplayString(_ctx.$t("CoolingMode")),
  11053. 1
  11054. /* TEXT */
  11055. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
  11056. "view",
  11057. { key: 2 },
  11058. vue.toDisplayString(_ctx.$t("HeatingMode")),
  11059. 1
  11060. /* TEXT */
  11061. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
  11062. "view",
  11063. { key: 3 },
  11064. vue.toDisplayString(_ctx.$t("CirculatingMode")),
  11065. 1
  11066. /* TEXT */
  11067. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  11068. ])
  11069. ]),
  11070. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11071. vue.createElementVNode(
  11072. "view",
  11073. { class: "parameter_zheng12" },
  11074. vue.toDisplayString(_ctx.$t("OutletTemperature")),
  11075. 1
  11076. /* TEXT */
  11077. ),
  11078. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11079. vue.createTextVNode(
  11080. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
  11081. 1
  11082. /* TEXT */
  11083. ),
  11084. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  11085. ])
  11086. ]),
  11087. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11088. vue.createElementVNode("view", {
  11089. class: "parameter_zheng12",
  11090. style: { "height": "30px" }
  11091. }, [
  11092. vue.createCommentVNode(" {{$t('PowerDemand')}} ")
  11093. ]),
  11094. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  11095. {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text class="parameter_zheng14">kW</text>\r
  11096. </view> `)
  11097. ])
  11098. ]),
  11099. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  11100. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11101. vue.createElementVNode(
  11102. "view",
  11103. { class: "parameter_zheng12" },
  11104. vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
  11105. 1
  11106. /* TEXT */
  11107. ),
  11108. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11109. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
  11110. _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
  11111. "view",
  11112. { key: 0 },
  11113. vue.toDisplayString(_ctx.$t("DisconnectedState")),
  11114. 1
  11115. /* TEXT */
  11116. )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
  11117. "view",
  11118. { key: 1 },
  11119. vue.toDisplayString(_ctx.$t("ClosedState")),
  11120. 1
  11121. /* TEXT */
  11122. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
  11123. ])
  11124. ]),
  11125. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11126. vue.createElementVNode(
  11127. "view",
  11128. { class: "parameter_zheng12" },
  11129. vue.toDisplayString(_ctx.$t("waterTemperature")),
  11130. 1
  11131. /* TEXT */
  11132. ),
  11133. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11134. vue.createTextVNode(
  11135. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
  11136. 1
  11137. /* TEXT */
  11138. ),
  11139. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  11140. ])
  11141. ]),
  11142. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11143. vue.createElementVNode("view", {
  11144. class: "parameter_zheng12",
  11145. style: { "height": "30px" }
  11146. }, [
  11147. vue.createCommentVNode(" {{$t('FaultLevel')}} ")
  11148. ]),
  11149. vue.createCommentVNode(` <view class="parameter_Batterystate">\r
  11150. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
  11151. \r
  11152. {{$t('NoMalfunction')}}\r
  11153. </view>\r
  11154. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
  11155. 1{{$t('LevelLault')}}\r
  11156. </view>\r
  11157. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
  11158. 2{{$t('LevelLault')}}\r
  11159. </view>\r
  11160. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
  11161. 3{{$t('LevelLault')}}\r
  11162. </view>\r
  11163. <view v-else>\r
  11164. —\r
  11165. </view>\r
  11166. </view> `)
  11167. ])
  11168. ])
  11169. ])) : vue.createCommentVNode("v-if", true),
  11170. vue.createElementVNode("view", { class: "parameter_zheng3" }, [
  11171. _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  11172. key: 0,
  11173. class: "parameter_zheng31111",
  11174. onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
  11175. }, [
  11176. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  11177. vue.createElementVNode(
  11178. "view",
  11179. { class: "parameter_zheng32" },
  11180. vue.toDisplayString(_ctx.$t("open")),
  11181. 1
  11182. /* TEXT */
  11183. )
  11184. ])
  11185. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  11186. key: 1,
  11187. class: "parameter_zheng31111"
  11188. }, [
  11189. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  11190. vue.createElementVNode(
  11191. "view",
  11192. { class: "parameter_zheng32ccc" },
  11193. vue.toDisplayString(_ctx.$t("open")),
  11194. 1
  11195. /* TEXT */
  11196. )
  11197. ])
  11198. ])),
  11199. _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11200. key: 2,
  11201. class: "parameter_zheng31111",
  11202. onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args))
  11203. }, [
  11204. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  11205. vue.createElementVNode(
  11206. "view",
  11207. { class: "parameter_zheng33" },
  11208. vue.toDisplayString(_ctx.$t("stopIt")),
  11209. 1
  11210. /* TEXT */
  11211. )
  11212. ])
  11213. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  11214. key: 3,
  11215. class: "parameter_zheng31111"
  11216. }, [
  11217. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  11218. vue.createElementVNode(
  11219. "view",
  11220. { class: "parameter_zheng32ccc" },
  11221. vue.toDisplayString(_ctx.$t("stopIt")),
  11222. 1
  11223. /* TEXT */
  11224. )
  11225. ])
  11226. ]))
  11227. ])
  11228. ]),
  11229. vue.createElementVNode("view", { class: "parameter_home" }, [
  11230. vue.createElementVNode("view", {
  11231. class: "parameter_home1",
  11232. onClick: _cache[6] || (_cache[6] = (...args) => $options.onreturn && $options.onreturn(...args))
  11233. }, [
  11234. vue.createElementVNode("image", {
  11235. src: _imports_1$3,
  11236. mode: ""
  11237. }),
  11238. vue.createElementVNode(
  11239. "text",
  11240. { class: "parameter_hometext" },
  11241. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  11242. 1
  11243. /* TEXT */
  11244. )
  11245. ]),
  11246. $data.faultsdata.length > 0 && !$data.SysFaultState ? (vue.openBlock(), vue.createElementBlock("view", {
  11247. key: 0,
  11248. class: "parameter_home2"
  11249. }, [
  11250. vue.createElementVNode("image", {
  11251. src: _imports_10$1,
  11252. mode: ""
  11253. }),
  11254. vue.createElementVNode("swiper", {
  11255. class: "swiper",
  11256. circular: "",
  11257. autoplay: true,
  11258. interval: 2e3,
  11259. duration: 500,
  11260. vertical: true
  11261. }, [
  11262. (vue.openBlock(true), vue.createElementBlock(
  11263. vue.Fragment,
  11264. null,
  11265. vue.renderList($data.faultsdata, (item, index) => {
  11266. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
  11267. vue.createElementVNode(
  11268. "view",
  11269. { class: "parameter_home3" },
  11270. vue.toDisplayString(item["CONTENT"]),
  11271. 1
  11272. /* TEXT */
  11273. )
  11274. ]);
  11275. }),
  11276. 128
  11277. /* KEYED_FRAGMENT */
  11278. ))
  11279. ])
  11280. ])) : vue.createCommentVNode("v-if", true)
  11281. ])
  11282. ])
  11283. ]),
  11284. vue.createVNode(
  11285. _component_uni_popup,
  11286. { ref: "alertDialog" },
  11287. {
  11288. default: vue.withCtx(() => [
  11289. vue.createVNode(_component_uni_popup_dialog, {
  11290. mode: $data.modeinput,
  11291. placeholder: "请输入内容",
  11292. modelValue: $data.value,
  11293. "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.value = $event),
  11294. type: $data.successtype,
  11295. cancelText: _ctx.$t("CancelReturn"),
  11296. confirmText: $data.confirmText,
  11297. title: $data.title,
  11298. content: $data.content,
  11299. beforeClose: true,
  11300. onConfirm: $options.dialogConfirm,
  11301. onClose: $options.dialogClose
  11302. }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
  11303. ]),
  11304. _: 1
  11305. /* STABLE */
  11306. },
  11307. 512
  11308. /* NEED_PATCH */
  11309. ),
  11310. vue.createVNode(
  11311. _component_uni_popup,
  11312. {
  11313. ref: "message",
  11314. type: "message"
  11315. },
  11316. {
  11317. default: vue.withCtx(() => [
  11318. vue.createVNode(_component_uni_popup_message, {
  11319. type: "error",
  11320. message: $data.messageText,
  11321. duration: 3e3
  11322. }, null, 8, ["message"])
  11323. ]),
  11324. _: 1
  11325. /* STABLE */
  11326. },
  11327. 512
  11328. /* NEED_PATCH */
  11329. )
  11330. ]);
  11331. }
  11332. const PagesElectricityIndex = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-a9482145"], ["__file", "D:/project/esswisdom_ipad_V2/pages/electricity/index.vue"]]);
  11333. const _imports_1$1 = "/static/img/DC3.png";
  11334. const _imports_4$1 = "/static/shan.png";
  11335. const _sfc_main$4 = {
  11336. components: {
  11337. cmdProgress: __easycom_0$1
  11338. },
  11339. data() {
  11340. return {
  11341. successtype: "success",
  11342. confirmText: "确认启动",
  11343. title: "你确定要开启该设备吗?",
  11344. content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
  11345. value: "",
  11346. modeinput: "",
  11347. segmented: 1,
  11348. uidatas: "",
  11349. formatTimeid: "",
  11350. faultsdata: [],
  11351. SysFaultState: true,
  11352. currentDate: ""
  11353. };
  11354. },
  11355. onLoad() {
  11356. this.confirmText = this.$t("ConfirmStart");
  11357. this.title = this.$t("popUpTitle");
  11358. this.content = this.$t("popUpContent");
  11359. },
  11360. computed: {
  11361. // 使用 mapState 映射多个状态到组件的计算属性
  11362. ...mapState(["formattedTime", "status"]),
  11363. ...mapState({
  11364. uidatasdata: (state2) => state2.uidatasdata
  11365. })
  11366. },
  11367. mounted() {
  11368. },
  11369. beforeUnmount() {
  11370. },
  11371. watch: {
  11372. uidatasdata: {
  11373. handler(newVal, oldVal) {
  11374. formatAppLog("log", "at pages/supply/supply.vue:636", "uidatasdata 发生变化:", newVal);
  11375. if (newVal.SysState_SysFaultState == 1 && this.SysFaultState) {
  11376. this.SysFaultState = false;
  11377. setTimeout(() => {
  11378. this.onfaultsdata();
  11379. }, 1e3);
  11380. } else if (newVal.SysState_SysFaultState == 0) {
  11381. this.SysFaultState = true;
  11382. }
  11383. },
  11384. deep: true
  11385. // 监听深层次的变化
  11386. }
  11387. },
  11388. methods: {
  11389. onfaultsdata() {
  11390. let data = {
  11391. page: 1,
  11392. rows: 10,
  11393. device: "",
  11394. starttime: "",
  11395. endtime: "",
  11396. rt: 1,
  11397. type: "故障"
  11398. };
  11399. getfaultsList(data).then((res) => {
  11400. formatAppLog("log", "at pages/supply/supply.vue:663", res);
  11401. if (res.status == "ok") {
  11402. this.faultsdata = [];
  11403. for (var i2 = 0; i2 < res.data.list.length; i2++) {
  11404. if (this.$store.state.formattedTime.substring(0, 10) == res.data.list[i2].FAULTTIME.substring(0, 10)) {
  11405. this.faultsdata.push(res.data.list[i2]);
  11406. }
  11407. }
  11408. }
  11409. });
  11410. },
  11411. // 返回首页
  11412. onreturn() {
  11413. uni.redirectTo({
  11414. url: "/pages/index/index"
  11415. });
  11416. },
  11417. // 启动设备弹窗
  11418. dialogToggle() {
  11419. this.modeinput = "base";
  11420. this.successtype = "success";
  11421. this.confirmText = this.$t("ConfirmStart");
  11422. this.title = this.$t("popUpTitle");
  11423. this.content = this.$t("popUpContent");
  11424. this.$refs.alertDialog.open();
  11425. },
  11426. onstopit() {
  11427. this.modeinput = "base";
  11428. this.successtype = "error";
  11429. this.confirmText = this.$t("ConfirmStop");
  11430. this.title = this.$t("popUpTitleStop");
  11431. this.content = this.$t("popUpContentStop");
  11432. this.$refs.alertDialog.open();
  11433. },
  11434. // 确认弹窗
  11435. dialogConfirm() {
  11436. let data = {
  11437. id: "c35c4db0-113f-442a-9e26-728489265fdb",
  11438. issaveinitvalue: false,
  11439. value: this.content == this.$t("popUpContent") ? "1" : "0"
  11440. };
  11441. control(data).then((data2) => {
  11442. if (data2.status == "ok") {
  11443. uni.showToast({
  11444. title: this.$t("OperationSuccessful"),
  11445. icon: "none",
  11446. duration: 2e3
  11447. // 显示时长,单位为毫秒
  11448. });
  11449. } else {
  11450. uni.showToast({
  11451. title: this.$t("operationFailed"),
  11452. icon: "none",
  11453. // 使用 'none' 图标来表示失败
  11454. duration: 2e3
  11455. // 显示时长,单位为毫秒
  11456. });
  11457. }
  11458. });
  11459. },
  11460. dialogClose() {
  11461. formatAppLog("log", "at pages/supply/supply.vue:729", this.value);
  11462. this.$refs.alertDialog.close();
  11463. },
  11464. ontap(e2) {
  11465. formatAppLog("log", "at pages/supply/supply.vue:733", e2);
  11466. this.segmented = e2;
  11467. }
  11468. }
  11469. };
  11470. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  11471. const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
  11472. const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
  11473. const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
  11474. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  11475. vue.createElementVNode("view", { class: "top" }, [
  11476. vue.createElementVNode("image", {
  11477. class: "top_logo",
  11478. src: _imports_0,
  11479. mode: ""
  11480. }),
  11481. vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
  11482. vue.createElementVNode(
  11483. "view",
  11484. { class: "tite" },
  11485. vue.toDisplayString(_ctx.$t("MainTitle")),
  11486. 1
  11487. /* TEXT */
  11488. ),
  11489. vue.createElementVNode("view", { class: "time" }, [
  11490. vue.createElementVNode(
  11491. "view",
  11492. { class: "time_top" },
  11493. vue.toDisplayString(_ctx.formattedTime),
  11494. 1
  11495. /* TEXT */
  11496. ),
  11497. vue.createElementVNode("view", { class: "time_bottom" }, [
  11498. vue.createElementVNode("view"),
  11499. vue.createElementVNode("view", { class: "time_bottom1" }, [
  11500. vue.createTextVNode(
  11501. vue.toDisplayString(_ctx.$t("status")) + " ",
  11502. 1
  11503. /* TEXT */
  11504. ),
  11505. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  11506. "view",
  11507. {
  11508. key: 0,
  11509. class: "time_state"
  11510. },
  11511. vue.toDisplayString(_ctx.$t("online")),
  11512. 1
  11513. /* TEXT */
  11514. )) : (vue.openBlock(), vue.createElementBlock(
  11515. "view",
  11516. {
  11517. key: 1,
  11518. class: "time_state1"
  11519. },
  11520. vue.toDisplayString(_ctx.$t("offline")),
  11521. 1
  11522. /* TEXT */
  11523. ))
  11524. ])
  11525. ])
  11526. ])
  11527. ]),
  11528. vue.createElementVNode("view", { class: "parameter" }, [
  11529. vue.createElementVNode("view", { class: "parameter_left" }, [
  11530. vue.createElementVNode("view", { class: "parameter_left1" }, [
  11531. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
  11532. vue.createVNode(_component_cmd_progress, {
  11533. type: "dashboard",
  11534. percent: _ctx.uidatasdata.SOC ?? 0,
  11535. "stroke-color": "#B0D0FF",
  11536. "stroke-width": 6,
  11537. width: 180,
  11538. "stroke-shape": "square",
  11539. showInfo: false
  11540. }, null, 8, ["percent"]),
  11541. vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
  11542. vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
  11543. vue.createTextVNode(
  11544. vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
  11545. 1
  11546. /* TEXT */
  11547. ),
  11548. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
  11549. ]),
  11550. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
  11551. ]),
  11552. vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
  11553. vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
  11554. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
  11555. vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
  11556. ])
  11557. ])
  11558. ]),
  11559. 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> ')
  11560. ]),
  11561. vue.createElementVNode("image", {
  11562. class: "parameter_leftdian1",
  11563. src: _imports_1$1,
  11564. alt: ""
  11565. }),
  11566. vue.createElementVNode("view", { class: "parameter_lef2" }, [
  11567. vue.createElementVNode("image", {
  11568. src: _imports_2$2,
  11569. mode: ""
  11570. })
  11571. ]),
  11572. vue.createElementVNode("image", {
  11573. class: "parameter_leftche",
  11574. src: _imports_3$3,
  11575. mode: ""
  11576. }),
  11577. vue.createElementVNode(
  11578. "view",
  11579. { class: "parameter_leftview" },
  11580. vue.toDisplayString(_ctx.$t("DirectRechargeInput")),
  11581. 1
  11582. /* TEXT */
  11583. )
  11584. ]),
  11585. vue.createElementVNode("view", { class: "parameter_right" }, [
  11586. vue.createElementVNode("view", { class: "parameter_righttop" }, [
  11587. vue.createElementVNode("view", { class: "parameter_1" }, [
  11588. vue.createElementVNode("view", { class: "parameter_shan" }, [
  11589. vue.createElementVNode("image", {
  11590. src: _imports_4$1,
  11591. mode: ""
  11592. }),
  11593. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  11594. vue.createElementVNode(
  11595. "view",
  11596. { class: "parameter_SOCright1" },
  11597. vue.toDisplayString(_ctx.$t("ChargingPower")),
  11598. 1
  11599. /* TEXT */
  11600. ),
  11601. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11602. vue.createElementVNode(
  11603. "text",
  11604. { class: "parameter_SOCright2" },
  11605. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatPower ?? "—"),
  11606. 1
  11607. /* TEXT */
  11608. ),
  11609. vue.createElementVNode("text", null, " kW")
  11610. ])
  11611. ])
  11612. ]),
  11613. vue.createElementVNode("view", { class: "parameter_SOC" }, [
  11614. vue.createElementVNode("image", {
  11615. src: _imports_6,
  11616. mode: ""
  11617. }),
  11618. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  11619. vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
  11620. vue.createElementVNode("view", null, [
  11621. vue.createElementVNode(
  11622. "text",
  11623. { class: "parameter_SOCright2" },
  11624. vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
  11625. 1
  11626. /* TEXT */
  11627. ),
  11628. vue.createElementVNode("text", null, " %")
  11629. ])
  11630. ])
  11631. ]),
  11632. vue.createElementVNode("view", { class: "parameter_Battery" }, [
  11633. vue.createElementVNode("image", {
  11634. src: _imports_7,
  11635. mode: ""
  11636. }),
  11637. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  11638. vue.createElementVNode(
  11639. "view",
  11640. { class: "parameter_SOCright1" },
  11641. vue.toDisplayString(_ctx.$t("BatteryStatus")),
  11642. 1
  11643. /* TEXT */
  11644. ),
  11645. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11646. _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
  11647. "view",
  11648. { key: 0 },
  11649. vue.toDisplayString(_ctx.$t("fault")),
  11650. 1
  11651. /* TEXT */
  11652. )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
  11653. vue.Fragment,
  11654. { key: 1 },
  11655. [
  11656. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==0">\r
  11657. {{$t('ChuShiHua')}}\r
  11658. </view> `),
  11659. vue.createElementVNode(
  11660. "view",
  11661. null,
  11662. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  11663. 1
  11664. /* TEXT */
  11665. )
  11666. ],
  11667. 2112
  11668. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  11669. )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
  11670. vue.Fragment,
  11671. { key: 2 },
  11672. [
  11673. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==2">\r
  11674. {{$t('HighVoltageMedium')}}\r
  11675. </view> `),
  11676. vue.createElementVNode(
  11677. "view",
  11678. null,
  11679. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  11680. 1
  11681. /* TEXT */
  11682. )
  11683. ],
  11684. 2112
  11685. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  11686. )) : (vue.openBlock(), vue.createElementBlock(
  11687. vue.Fragment,
  11688. { key: 3 },
  11689. [
  11690. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysState==4">\r
  11691. {{$t('Underhighpressure')}}\r
  11692. </view> `),
  11693. vue.createElementVNode("view", null, " — ")
  11694. ],
  11695. 2112
  11696. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  11697. )),
  11698. vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} ")
  11699. ])
  11700. ])
  11701. ]),
  11702. vue.createElementVNode("view", { class: "parameter_state" }, [
  11703. vue.createElementVNode("image", {
  11704. src: _imports_8,
  11705. mode: ""
  11706. }),
  11707. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  11708. vue.createElementVNode(
  11709. "view",
  11710. { class: "parameter_SOCright1" },
  11711. vue.toDisplayString(_ctx.$t("SystemStatus")),
  11712. 1
  11713. /* TEXT */
  11714. ),
  11715. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11716. vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
  11717. _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
  11718. "view",
  11719. { key: 0 },
  11720. vue.toDisplayString(_ctx.$t("uncharged")),
  11721. 1
  11722. /* TEXT */
  11723. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
  11724. "view",
  11725. { key: 1 },
  11726. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  11727. 1
  11728. /* TEXT */
  11729. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
  11730. "view",
  11731. { key: 2 },
  11732. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  11733. 1
  11734. /* TEXT */
  11735. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
  11736. "view",
  11737. { key: 3 },
  11738. vue.toDisplayString(_ctx.$t("full")),
  11739. 1
  11740. /* TEXT */
  11741. )) : (vue.openBlock(), vue.createElementBlock(
  11742. vue.Fragment,
  11743. { key: 4 },
  11744. [
  11745. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_==4">\r
  11746. {{$t('Chargingstopped')}}\r
  11747. </view> `),
  11748. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_>3&&uidatasdata.bms_BatSysWorkMode_<8">\r
  11749. {{$t('retain')}}\r
  11750. </view> `),
  11751. vue.createElementVNode("view", null, " — ")
  11752. ],
  11753. 2112
  11754. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  11755. ))
  11756. ])
  11757. ])
  11758. ])
  11759. ])
  11760. ]),
  11761. vue.createElementVNode("view", { class: "parameter_tap" }, [
  11762. vue.createElementVNode(
  11763. "view",
  11764. {
  11765. class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
  11766. onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
  11767. },
  11768. vue.toDisplayString(_ctx.$t("Batteryinformation")),
  11769. 3
  11770. /* TEXT, CLASS */
  11771. ),
  11772. vue.createCommentVNode(` <view :class="segmented==2?'parameter_tap1':'parameter_tap2'" @click="ontap(2)">\r
  11773. {{$t('ConnectionInformation')}}\r
  11774. </view> `),
  11775. vue.createElementVNode(
  11776. "view",
  11777. {
  11778. class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
  11779. onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(3))
  11780. },
  11781. vue.toDisplayString(_ctx.$t("statisticalinformation")),
  11782. 3
  11783. /* TEXT, CLASS */
  11784. ),
  11785. vue.createElementVNode(
  11786. "view",
  11787. {
  11788. class: vue.normalizeClass($data.segmented == 4 ? "parameter_tap1" : "parameter_tap2"),
  11789. onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(4))
  11790. },
  11791. vue.toDisplayString(_ctx.$t("coolinginformation")),
  11792. 3
  11793. /* TEXT, CLASS */
  11794. )
  11795. ]),
  11796. vue.createElementVNode("view", { class: "parameter_zheng" }, [
  11797. $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  11798. key: 0,
  11799. class: "parameter_box"
  11800. }, [
  11801. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  11802. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  11803. <view class="parameter_zheng12">\r
  11804. {{$t('Batterypower')}}\r
  11805. </view>\r
  11806. <view class="parameter_zheng13">\r
  11807. {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">KW</text>\r
  11808. </view>\r
  11809. </view> `),
  11810. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11811. vue.createElementVNode(
  11812. "view",
  11813. { class: "parameter_zheng12" },
  11814. vue.toDisplayString(_ctx.$t("TotalPressure")),
  11815. 1
  11816. /* TEXT */
  11817. ),
  11818. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11819. vue.createTextVNode(
  11820. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
  11821. 1
  11822. /* TEXT */
  11823. ),
  11824. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  11825. ])
  11826. ]),
  11827. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11828. vue.createElementVNode(
  11829. "view",
  11830. { class: "parameter_zheng12" },
  11831. vue.toDisplayString(_ctx.$t("AllowChargingPower")),
  11832. 1
  11833. /* TEXT */
  11834. ),
  11835. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11836. vue.createTextVNode(
  11837. vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxChargePowerLimit ?? "—") + " ",
  11838. 1
  11839. /* TEXT */
  11840. ),
  11841. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  11842. ])
  11843. ]),
  11844. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11845. vue.createElementVNode(
  11846. "view",
  11847. { class: "parameter_zheng12" },
  11848. vue.toDisplayString(_ctx.$t("MaximumVoltage")),
  11849. 1
  11850. /* TEXT */
  11851. ),
  11852. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11853. vue.createTextVNode(
  11854. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
  11855. 1
  11856. /* TEXT */
  11857. ),
  11858. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  11859. ])
  11860. ]),
  11861. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11862. vue.createElementVNode(
  11863. "view",
  11864. { class: "parameter_zheng12" },
  11865. vue.toDisplayString(_ctx.$t("MaximumTemperature")),
  11866. 1
  11867. /* TEXT */
  11868. ),
  11869. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11870. vue.createTextVNode(
  11871. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
  11872. 1
  11873. /* TEXT */
  11874. ),
  11875. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  11876. ])
  11877. ])
  11878. ]),
  11879. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  11880. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11881. vue.createElementVNode(
  11882. "view",
  11883. { class: "parameter_zheng12" },
  11884. vue.toDisplayString(_ctx.$t("BatteryCurrent")),
  11885. 1
  11886. /* TEXT */
  11887. ),
  11888. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11889. vue.createTextVNode(
  11890. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
  11891. 1
  11892. /* TEXT */
  11893. ),
  11894. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  11895. ])
  11896. ]),
  11897. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  11898. <view class="parameter_zheng12">\r
  11899. {{$t('TotalExternalPressure')}}\r
  11900. </view>\r
  11901. <view class="parameter_zheng13">\r
  11902. {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
  11903. </view>\r
  11904. </view> `),
  11905. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11906. vue.createElementVNode(
  11907. "view",
  11908. { class: "parameter_zheng12" },
  11909. vue.toDisplayString(_ctx.$t("AllowChargingCurrent")),
  11910. 1
  11911. /* TEXT */
  11912. ),
  11913. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11914. vue.createTextVNode(
  11915. vue.toDisplayString(_ctx.uidatasdata.ChargingInformation_Chg_Max_Cur ?? "—"),
  11916. 1
  11917. /* TEXT */
  11918. ),
  11919. vue.createElementVNode("text", { class: "parameter_zheng14" }, " A")
  11920. ])
  11921. ]),
  11922. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11923. vue.createElementVNode(
  11924. "view",
  11925. { class: "parameter_zheng12" },
  11926. vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
  11927. 1
  11928. /* TEXT */
  11929. ),
  11930. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11931. vue.createTextVNode(
  11932. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—"),
  11933. 1
  11934. /* TEXT */
  11935. ),
  11936. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  11937. ])
  11938. ]),
  11939. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11940. vue.createElementVNode(
  11941. "view",
  11942. { class: "parameter_zheng12" },
  11943. vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
  11944. 1
  11945. /* TEXT */
  11946. ),
  11947. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  11948. vue.createTextVNode(
  11949. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
  11950. 1
  11951. /* TEXT */
  11952. ),
  11953. vue.createElementVNode("text", { class: "parameter_zheng14" }, " ℃")
  11954. ])
  11955. ])
  11956. ])
  11957. ])) : vue.createCommentVNode("v-if", true),
  11958. $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  11959. key: 1,
  11960. class: "parameter_box"
  11961. }, [
  11962. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  11963. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  11964. vue.createElementVNode(
  11965. "view",
  11966. { class: "parameter_zheng12" },
  11967. vue.toDisplayString(_ctx.$t("WorkingModeBatterySystem")),
  11968. 1
  11969. /* TEXT */
  11970. ),
  11971. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  11972. vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "),
  11973. _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
  11974. "view",
  11975. { key: 0 },
  11976. vue.toDisplayString(_ctx.$t("invalid")),
  11977. 1
  11978. /* TEXT */
  11979. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
  11980. "view",
  11981. { key: 1 },
  11982. vue.toDisplayString(_ctx.$t("DischargeMode")),
  11983. 1
  11984. /* TEXT */
  11985. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
  11986. "view",
  11987. { key: 2 },
  11988. vue.toDisplayString(_ctx.$t("pcsChargingMode")),
  11989. 1
  11990. /* TEXT */
  11991. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
  11992. "view",
  11993. { key: 3 },
  11994. vue.toDisplayString(_ctx.$t("EuropeanStandardChargingMode")),
  11995. 1
  11996. /* TEXT */
  11997. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  11998. ])
  11999. ]),
  12000. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12001. vue.createElementVNode(
  12002. "view",
  12003. { class: "parameter_zheng12" },
  12004. vue.toDisplayString(_ctx.$t("BatterySystemStatus")),
  12005. 1
  12006. /* TEXT */
  12007. ),
  12008. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  12009. vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "),
  12010. _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
  12011. "view",
  12012. { key: 0 },
  12013. vue.toDisplayString(_ctx.$t("initialization")),
  12014. 1
  12015. /* TEXT */
  12016. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
  12017. "view",
  12018. { key: 1 },
  12019. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  12020. 1
  12021. /* TEXT */
  12022. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
  12023. "view",
  12024. { key: 2 },
  12025. vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
  12026. 1
  12027. /* TEXT */
  12028. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
  12029. "view",
  12030. { key: 3 },
  12031. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  12032. 1
  12033. /* TEXT */
  12034. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 4 ? (vue.openBlock(), vue.createElementBlock(
  12035. "view",
  12036. { key: 4 },
  12037. vue.toDisplayString(_ctx.$t("Underhighpressure")),
  12038. 1
  12039. /* TEXT */
  12040. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 5 ? (vue.openBlock(), vue.createElementBlock(
  12041. "view",
  12042. { key: 5 },
  12043. vue.toDisplayString(_ctx.$t("fault")),
  12044. 1
  12045. /* TEXT */
  12046. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — "))
  12047. ])
  12048. ]),
  12049. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12050. vue.createElementVNode(
  12051. "view",
  12052. { class: "parameter_zheng12" },
  12053. vue.toDisplayString(_ctx.$t("ChargingStatus")),
  12054. 1
  12055. /* TEXT */
  12056. ),
  12057. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  12058. vue.createCommentVNode(" {{uidatasdata.bms_ChargeStatus==0.00?'无效':'有效'}} "),
  12059. _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock(
  12060. "view",
  12061. { key: 0 },
  12062. vue.toDisplayString(_ctx.$t("uncharged")),
  12063. 1
  12064. /* TEXT */
  12065. )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock(
  12066. "view",
  12067. { key: 1 },
  12068. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  12069. 1
  12070. /* TEXT */
  12071. )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock(
  12072. "view",
  12073. { key: 2 },
  12074. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  12075. 1
  12076. /* TEXT */
  12077. )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock(
  12078. "view",
  12079. { key: 3 },
  12080. vue.toDisplayString(_ctx.$t("full")),
  12081. 1
  12082. /* TEXT */
  12083. )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock(
  12084. "view",
  12085. { key: 4 },
  12086. vue.toDisplayString(_ctx.$t("retain")),
  12087. 1
  12088. /* TEXT */
  12089. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — "))
  12090. ])
  12091. ])
  12092. ]),
  12093. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  12094. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12095. vue.createElementVNode(
  12096. "view",
  12097. { class: "parameter_zheng12" },
  12098. vue.toDisplayString(_ctx.$t("ChargingConnectionStatus")),
  12099. 1
  12100. /* TEXT */
  12101. ),
  12102. _ctx.uidatasdata.bms_ChgLinkSt == 1 ? (vue.openBlock(), vue.createElementBlock(
  12103. "view",
  12104. {
  12105. key: 0,
  12106. class: "parameter_Batterystate1"
  12107. },
  12108. vue.toDisplayString(_ctx.$t("FastChargingConnection")),
  12109. 1
  12110. /* TEXT */
  12111. )) : (vue.openBlock(), vue.createElementBlock(
  12112. "view",
  12113. {
  12114. key: 1,
  12115. class: "parameter_Batterystate1"
  12116. },
  12117. vue.toDisplayString(_ctx.$t("NoConnection")),
  12118. 1
  12119. /* TEXT */
  12120. ))
  12121. ]),
  12122. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12123. vue.createElementVNode(
  12124. "view",
  12125. {
  12126. class: "parameter_zheng12",
  12127. style: { "height": "30px" }
  12128. },
  12129. vue.toDisplayString(_ctx.$t("BatteryFaultLevel")),
  12130. 1
  12131. /* TEXT */
  12132. ),
  12133. vue.createElementVNode("view", { class: "parameter_Batterystate1" }, [
  12134. _ctx.uidatasdata.bms_BatteryFaultLevl == 0 ? (vue.openBlock(), vue.createElementBlock(
  12135. "view",
  12136. { key: 0 },
  12137. vue.toDisplayString(_ctx.$t("NoMalfunction")),
  12138. 1
  12139. /* TEXT */
  12140. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 1 ? (vue.openBlock(), vue.createElementBlock(
  12141. "view",
  12142. { key: 1 },
  12143. " 1" + vue.toDisplayString(_ctx.$t("LevelLault")),
  12144. 1
  12145. /* TEXT */
  12146. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 2 ? (vue.openBlock(), vue.createElementBlock(
  12147. "view",
  12148. { key: 2 },
  12149. " 2" + vue.toDisplayString(_ctx.$t("LevelLault")),
  12150. 1
  12151. /* TEXT */
  12152. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 3 ? (vue.openBlock(), vue.createElementBlock(
  12153. "view",
  12154. { key: 3 },
  12155. " 3" + vue.toDisplayString(_ctx.$t("LevelLault")),
  12156. 1
  12157. /* TEXT */
  12158. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  12159. ])
  12160. ]),
  12161. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" })
  12162. ])
  12163. ])) : vue.createCommentVNode("v-if", true),
  12164. $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  12165. key: 2,
  12166. class: "parameter_box"
  12167. }, [
  12168. vue.createElementVNode("view", { class: "parameter_zheng10" }, [
  12169. vue.createCommentVNode(` <view class="parameter_zhengbox">\r
  12170. <view class="parameter_zheng12">\r
  12171. {{$t('AccumulatedChargingCapacityCommunication')}}\r
  12172. </view>\r
  12173. <view class="parameter_zhengbox13">\r
  12174. {{uidatasdata.PCSACChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
  12175. </view>\r
  12176. </view>\r
  12177. <view class="parameter_zhengbox parameter_zheng101">\r
  12178. <view class="parameter_zheng12">\r
  12179. {{$t('AccumulatedDCChargingCapacity')}}\r
  12180. </view>\r
  12181. <view class="parameter_zhengbox13">\r
  12182. {{uidatasdata.PCSDCDisChargeEnergy??'—'}} <text class="parameter_zheng14">kWh</text> <text></text>\r
  12183. </view>\r
  12184. </view> `),
  12185. vue.createElementVNode("view", { class: "parameter_zhengbox" }, [
  12186. vue.createElementVNode(
  12187. "view",
  12188. { class: "parameter_zheng12" },
  12189. vue.toDisplayString(_ctx.$t("RunningTimes")),
  12190. 1
  12191. /* TEXT */
  12192. ),
  12193. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  12194. vue.createTextVNode(
  12195. vue.toDisplayString(_ctx.uidatasdata.DirectRecharge ?? "—") + " ",
  12196. 1
  12197. /* TEXT */
  12198. ),
  12199. vue.createElementVNode(
  12200. "text",
  12201. { class: "parameter_zheng14" },
  12202. vue.toDisplayString(_ctx.$t("RunningTimesmin")),
  12203. 1
  12204. /* TEXT */
  12205. ),
  12206. vue.createTextVNode(),
  12207. vue.createElementVNode("text")
  12208. ])
  12209. ]),
  12210. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  12211. vue.createElementVNode(
  12212. "view",
  12213. { class: "parameter_zheng12" },
  12214. vue.toDisplayString(_ctx.$t("InputCapacity")),
  12215. 1
  12216. /* TEXT */
  12217. ),
  12218. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  12219. vue.createTextVNode(
  12220. vue.toDisplayString(_ctx.uidatasdata.DirectElectricity ?? "—") + " ",
  12221. 1
  12222. /* TEXT */
  12223. ),
  12224. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  12225. vue.createTextVNode(),
  12226. vue.createElementVNode("text")
  12227. ])
  12228. ]),
  12229. vue.createElementVNode("view", { class: "parameter_zhengbox parameter_zheng101" }, [
  12230. vue.createElementVNode(
  12231. "view",
  12232. { class: "parameter_zheng12" },
  12233. vue.toDisplayString(_ctx.$t("AccumulateInput")),
  12234. 1
  12235. /* TEXT */
  12236. ),
  12237. vue.createElementVNode("view", { class: "parameter_zhengbox13" }, [
  12238. vue.createTextVNode(
  12239. vue.toDisplayString((_ctx.uidatasdata.BatteryInformation4_Acc_Chg_Ah - _ctx.uidatasdata.PCSDCChargeEnergy).toFixed(1) != "NaN" ? (_ctx.uidatasdata.BatteryInformation4_Acc_Chg_Ah - _ctx.uidatasdata.PCSDCChargeEnergy).toFixed(1) : "—") + " ",
  12240. 1
  12241. /* TEXT */
  12242. ),
  12243. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh"),
  12244. vue.createTextVNode(),
  12245. vue.createElementVNode("text")
  12246. ])
  12247. ])
  12248. ])
  12249. ])) : vue.createCommentVNode("v-if", true),
  12250. $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  12251. key: 3,
  12252. class: "parameter_box"
  12253. }, [
  12254. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  12255. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12256. vue.createElementVNode(
  12257. "view",
  12258. { class: "parameter_zheng12" },
  12259. vue.toDisplayString(_ctx.$t("WorkingMode")),
  12260. 1
  12261. /* TEXT */
  12262. ),
  12263. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  12264. vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
  12265. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
  12266. _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
  12267. "view",
  12268. { key: 0 },
  12269. vue.toDisplayString(_ctx.$t("OffMode")),
  12270. 1
  12271. /* TEXT */
  12272. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
  12273. "view",
  12274. { key: 1 },
  12275. vue.toDisplayString(_ctx.$t("CoolingMode")),
  12276. 1
  12277. /* TEXT */
  12278. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
  12279. "view",
  12280. { key: 2 },
  12281. vue.toDisplayString(_ctx.$t("HeatingMode")),
  12282. 1
  12283. /* TEXT */
  12284. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
  12285. "view",
  12286. { key: 3 },
  12287. vue.toDisplayString(_ctx.$t("CirculatingMode")),
  12288. 1
  12289. /* TEXT */
  12290. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  12291. ])
  12292. ]),
  12293. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12294. vue.createElementVNode(
  12295. "view",
  12296. { class: "parameter_zheng12" },
  12297. vue.toDisplayString(_ctx.$t("OutletTemperature")),
  12298. 1
  12299. /* TEXT */
  12300. ),
  12301. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12302. vue.createTextVNode(
  12303. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
  12304. 1
  12305. /* TEXT */
  12306. ),
  12307. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  12308. ])
  12309. ]),
  12310. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12311. vue.createElementVNode("view", {
  12312. class: "parameter_zheng12",
  12313. style: { "height": "30px" }
  12314. }, [
  12315. vue.createCommentVNode(" {{$t('PowerDemand')}} ")
  12316. ]),
  12317. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  12318. {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text class="parameter_zheng14">kW</text>\r
  12319. </view> `)
  12320. ])
  12321. ]),
  12322. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  12323. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12324. vue.createElementVNode(
  12325. "view",
  12326. { class: "parameter_zheng12" },
  12327. vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
  12328. 1
  12329. /* TEXT */
  12330. ),
  12331. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  12332. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
  12333. _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
  12334. "view",
  12335. { key: 0 },
  12336. vue.toDisplayString(_ctx.$t("DisconnectedState")),
  12337. 1
  12338. /* TEXT */
  12339. )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
  12340. "view",
  12341. { key: 1 },
  12342. vue.toDisplayString(_ctx.$t("ClosedState")),
  12343. 1
  12344. /* TEXT */
  12345. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
  12346. ])
  12347. ]),
  12348. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12349. vue.createElementVNode(
  12350. "view",
  12351. { class: "parameter_zheng12" },
  12352. vue.toDisplayString(_ctx.$t("waterTemperature")),
  12353. 1
  12354. /* TEXT */
  12355. ),
  12356. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  12357. vue.createTextVNode(
  12358. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
  12359. 1
  12360. /* TEXT */
  12361. ),
  12362. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  12363. ])
  12364. ]),
  12365. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  12366. vue.createElementVNode("view", {
  12367. class: "parameter_zheng12",
  12368. style: { "height": "30px" }
  12369. }, [
  12370. vue.createCommentVNode(" {{$t('FaultLevel')}} ")
  12371. ]),
  12372. vue.createCommentVNode(` <view class="parameter_Batterystate">\r
  12373. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
  12374. {{$t('NoMalfunction')}}\r
  12375. </view>\r
  12376. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
  12377. 1{{$t('LevelLault')}}\r
  12378. </view>\r
  12379. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
  12380. 2{{$t('LevelLault')}}\r
  12381. </view>\r
  12382. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
  12383. 3{{$t('LevelLault')}}\r
  12384. </view>\r
  12385. <view v-else>\r
  12386. —\r
  12387. </view>\r
  12388. </view> `)
  12389. ])
  12390. ])
  12391. ])) : vue.createCommentVNode("v-if", true),
  12392. vue.createElementVNode("view", { class: "parameter_zheng3" }, [
  12393. _ctx.uidatasdata.SysControl_RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  12394. key: 0,
  12395. class: "parameter_zheng31111",
  12396. onClick: _cache[3] || (_cache[3] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
  12397. }, [
  12398. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  12399. vue.createElementVNode(
  12400. "view",
  12401. { class: "parameter_zheng32" },
  12402. vue.toDisplayString(_ctx.$t("open")),
  12403. 1
  12404. /* TEXT */
  12405. )
  12406. ])
  12407. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  12408. key: 1,
  12409. class: "parameter_zheng31111"
  12410. }, [
  12411. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  12412. vue.createElementVNode(
  12413. "view",
  12414. { class: "parameter_zheng32ccc" },
  12415. vue.toDisplayString(_ctx.$t("open")),
  12416. 1
  12417. /* TEXT */
  12418. )
  12419. ])
  12420. ])),
  12421. _ctx.uidatasdata.SysControl_RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12422. key: 2,
  12423. class: "parameter_zheng31111",
  12424. onClick: _cache[4] || (_cache[4] = (...args) => $options.onstopit && $options.onstopit(...args))
  12425. }, [
  12426. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  12427. vue.createElementVNode(
  12428. "view",
  12429. { class: "parameter_zheng33" },
  12430. vue.toDisplayString(_ctx.$t("stopIt")),
  12431. 1
  12432. /* TEXT */
  12433. )
  12434. ])
  12435. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  12436. key: 3,
  12437. class: "parameter_zheng31111"
  12438. }, [
  12439. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  12440. vue.createElementVNode(
  12441. "view",
  12442. { class: "parameter_zheng32ccc" },
  12443. vue.toDisplayString(_ctx.$t("stopIt")),
  12444. 1
  12445. /* TEXT */
  12446. )
  12447. ])
  12448. ]))
  12449. ])
  12450. ]),
  12451. vue.createElementVNode("view", { class: "parameter_home" }, [
  12452. vue.createElementVNode("view", {
  12453. class: "parameter_home1",
  12454. onClick: _cache[5] || (_cache[5] = (...args) => $options.onreturn && $options.onreturn(...args))
  12455. }, [
  12456. vue.createElementVNode("image", {
  12457. src: _imports_1$3,
  12458. mode: ""
  12459. }),
  12460. vue.createElementVNode(
  12461. "text",
  12462. { class: "parameter_hometext" },
  12463. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  12464. 1
  12465. /* TEXT */
  12466. )
  12467. ]),
  12468. $data.faultsdata.length > 0 && !$data.SysFaultState ? (vue.openBlock(), vue.createElementBlock("view", {
  12469. key: 0,
  12470. class: "parameter_home2"
  12471. }, [
  12472. vue.createElementVNode("image", {
  12473. src: _imports_10$1,
  12474. mode: ""
  12475. }),
  12476. vue.createElementVNode("swiper", {
  12477. class: "swiper",
  12478. circular: "",
  12479. autoplay: true,
  12480. interval: 2e3,
  12481. duration: 500,
  12482. vertical: true
  12483. }, [
  12484. (vue.openBlock(true), vue.createElementBlock(
  12485. vue.Fragment,
  12486. null,
  12487. vue.renderList($data.faultsdata, (item, index) => {
  12488. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
  12489. vue.createElementVNode(
  12490. "view",
  12491. { class: "parameter_home3" },
  12492. vue.toDisplayString(item["CONTENT"]),
  12493. 1
  12494. /* TEXT */
  12495. )
  12496. ]);
  12497. }),
  12498. 128
  12499. /* KEYED_FRAGMENT */
  12500. ))
  12501. ])
  12502. ])) : vue.createCommentVNode("v-if", true)
  12503. ])
  12504. ])
  12505. ]),
  12506. vue.createVNode(
  12507. _component_uni_popup,
  12508. { ref: "alertDialog" },
  12509. {
  12510. default: vue.withCtx(() => [
  12511. vue.createVNode(_component_uni_popup_dialog, {
  12512. mode: $data.modeinput,
  12513. placeholder: "请输入内容",
  12514. modelValue: $data.value,
  12515. "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.value = $event),
  12516. type: $data.successtype,
  12517. cancelText: _ctx.$t("CancelReturn"),
  12518. confirmText: $data.confirmText,
  12519. title: $data.title,
  12520. content: $data.content,
  12521. onConfirm: $options.dialogConfirm,
  12522. onClose: $options.dialogClose
  12523. }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
  12524. ]),
  12525. _: 1
  12526. /* STABLE */
  12527. },
  12528. 512
  12529. /* NEED_PATCH */
  12530. )
  12531. ]);
  12532. }
  12533. const PagesSupplySupply = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-80112fae"], ["__file", "D:/project/esswisdom_ipad_V2/pages/supply/supply.vue"]]);
  12534. const _imports_3$1 = "/static/che1.png";
  12535. const _imports_4 = "/static/y8.png";
  12536. const _imports_5 = "/static/y6.png";
  12537. const _sfc_main$3 = {
  12538. components: {
  12539. cmdProgress: __easycom_0$1
  12540. },
  12541. data() {
  12542. return {
  12543. successtype: "success",
  12544. confirmText: "确认启动",
  12545. title: "你确定要开启该设备吗?",
  12546. content: "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!",
  12547. value: "",
  12548. modeinput: "",
  12549. segmented: 1,
  12550. ChargingStation: 1,
  12551. faultsdata: [],
  12552. SysFaultState: true,
  12553. currentDate: ""
  12554. };
  12555. },
  12556. onLoad() {
  12557. this.confirmText = this.$t("ConfirmStart");
  12558. this.title = this.$t("popUpTitle");
  12559. this.content = this.$t("popUpContent");
  12560. },
  12561. computed: {
  12562. // 使用 mapState 映射多个状态到组件的计算属性
  12563. ...mapState(["formattedTime", "status"]),
  12564. ...mapState({
  12565. uidatasdata: (state2) => state2.uidatasdata
  12566. })
  12567. },
  12568. mounted() {
  12569. },
  12570. beforeUnmount() {
  12571. },
  12572. watch: {
  12573. uidatasdata: {
  12574. handler(newVal, oldVal) {
  12575. formatAppLog("log", "at pages/supplyss/supplyss.vue:895", "uidatasdata 发生变化:", newVal);
  12576. if (newVal.SysState_SysFaultState == 1 && this.SysFaultState) {
  12577. this.SysFaultState = false;
  12578. setTimeout(() => {
  12579. this.onfaultsdata();
  12580. }, 1e3);
  12581. } else if (newVal.SysState_SysFaultState == 0) {
  12582. this.SysFaultState = true;
  12583. }
  12584. },
  12585. deep: true
  12586. // 监听深层次的变化
  12587. }
  12588. },
  12589. methods: {
  12590. onfaultsdata() {
  12591. let data = {
  12592. page: 1,
  12593. rows: 10,
  12594. device: "",
  12595. starttime: "",
  12596. endtime: "",
  12597. rt: 1,
  12598. type: "故障"
  12599. };
  12600. getfaultsList(data).then((res) => {
  12601. formatAppLog("log", "at pages/supplyss/supplyss.vue:922", res);
  12602. if (res.status == "ok") {
  12603. this.faultsdata = [];
  12604. for (var i2 = 0; i2 < res.data.list.length; i2++) {
  12605. if (this.$store.state.formattedTime.substring(0, 10) == res.data.list[i2].FAULTTIME.substring(0, 10)) {
  12606. this.faultsdata.push(res.data.list[i2]);
  12607. }
  12608. }
  12609. }
  12610. });
  12611. },
  12612. // 返回首页
  12613. onreturn() {
  12614. uni.redirectTo({
  12615. url: "/pages/index/index"
  12616. });
  12617. },
  12618. // 启动设备弹窗
  12619. dialogToggle() {
  12620. this.modeinput = "base";
  12621. this.successtype = "success";
  12622. this.confirmText = this.$t("ConfirmStart");
  12623. this.title = this.$t("popUpTitle");
  12624. this.content = this.$t("popUpContent");
  12625. this.$refs.alertDialog.open();
  12626. },
  12627. // 关闭设备弹窗
  12628. onstopit() {
  12629. this.modeinput = "base";
  12630. this.successtype = "error";
  12631. this.confirmText = this.$t("ConfirmStop");
  12632. this.title = this.$t("popUpTitleStop");
  12633. this.content = this.$t("popUpContentStop");
  12634. this.$refs.alertDialog.open();
  12635. },
  12636. // 确定
  12637. dialogConfirm() {
  12638. let data = {};
  12639. if (this.segmented == 1) {
  12640. data = {
  12641. id: "3b26469f-ad5b-43bf-b715-4213921321d0",
  12642. issaveinitvalue: false,
  12643. value: this.content == this.$t("popUpContent") ? "1" : "0"
  12644. };
  12645. } else if (this.segmented == 2) {
  12646. data = {
  12647. id: "78f59493-65f3-4860-8296-7f07bb0ca55b",
  12648. issaveinitvalue: false,
  12649. value: this.content == this.$t("popUpContent") ? "1" : "0"
  12650. };
  12651. } else {
  12652. data = {
  12653. id: "c35c4db0-113f-442a-9e26-728489265fdb",
  12654. issaveinitvalue: false,
  12655. value: this.content == this.$t("popUpContent") ? "1" : "0"
  12656. };
  12657. }
  12658. control(data).then((data2) => {
  12659. formatAppLog("log", "at pages/supplyss/supplyss.vue:985", data2);
  12660. if (data2.status == "ok") {
  12661. uni.showToast({
  12662. title: this.$t("OperationSuccessful"),
  12663. icon: "none",
  12664. duration: 2e3
  12665. // 显示时长,单位为毫秒
  12666. });
  12667. } else {
  12668. uni.showToast({
  12669. title: this.$t("operationFailed"),
  12670. icon: "none",
  12671. // 使用 'none' 图标来表示失败
  12672. duration: 2e3
  12673. // 显示时长,单位为毫秒
  12674. });
  12675. }
  12676. });
  12677. },
  12678. // 取消
  12679. dialogClose() {
  12680. formatAppLog("log", "at pages/supplyss/supplyss.vue:1004", this.value);
  12681. this.$refs.alertDialog.close();
  12682. },
  12683. // 切换标签
  12684. ontap(e2) {
  12685. formatAppLog("log", "at pages/supplyss/supplyss.vue:1009", e2);
  12686. this.segmented = e2;
  12687. if (this.segmented == 1) {
  12688. this.ChargingStation = 1;
  12689. } else if (this.segmented == 2) {
  12690. this.ChargingStation = 2;
  12691. }
  12692. }
  12693. }
  12694. };
  12695. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  12696. const _component_cmd_progress = resolveEasycom(vue.resolveDynamicComponent("cmd-progress"), __easycom_0$1);
  12697. const _component_uni_popup_dialog = resolveEasycom(vue.resolveDynamicComponent("uni-popup-dialog"), __easycom_1$1);
  12698. const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_2$1);
  12699. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  12700. vue.createElementVNode("view", { class: "top" }, [
  12701. vue.createElementVNode("image", {
  12702. class: "top_logo",
  12703. src: _imports_0,
  12704. mode: ""
  12705. }),
  12706. vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
  12707. vue.createElementVNode(
  12708. "view",
  12709. { class: "tite" },
  12710. vue.toDisplayString(_ctx.$t("MainTitle")),
  12711. 1
  12712. /* TEXT */
  12713. ),
  12714. vue.createElementVNode("view", { class: "time" }, [
  12715. vue.createElementVNode(
  12716. "view",
  12717. { class: "time_top" },
  12718. vue.toDisplayString(_ctx.formattedTime),
  12719. 1
  12720. /* TEXT */
  12721. ),
  12722. vue.createElementVNode("view", { class: "time_bottom" }, [
  12723. vue.createElementVNode("view"),
  12724. vue.createElementVNode("view", { class: "time_bottom1" }, [
  12725. vue.createTextVNode(
  12726. vue.toDisplayString(_ctx.$t("status")) + " ",
  12727. 1
  12728. /* TEXT */
  12729. ),
  12730. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  12731. "view",
  12732. {
  12733. key: 0,
  12734. class: "time_state"
  12735. },
  12736. vue.toDisplayString(_ctx.$t("online")),
  12737. 1
  12738. /* TEXT */
  12739. )) : (vue.openBlock(), vue.createElementBlock(
  12740. "view",
  12741. {
  12742. key: 1,
  12743. class: "time_state1"
  12744. },
  12745. vue.toDisplayString(_ctx.$t("offline")),
  12746. 1
  12747. /* TEXT */
  12748. ))
  12749. ])
  12750. ])
  12751. ])
  12752. ]),
  12753. vue.createElementVNode("view", { class: "parameter" }, [
  12754. vue.createElementVNode("view", { class: "parameter_left" }, [
  12755. vue.createElementVNode("view", { class: "parameter_left1" }, [
  12756. vue.createElementVNode("view", { style: { "display": "flex", "justify-content": "center", "position": "relative" } }, [
  12757. vue.createVNode(_component_cmd_progress, {
  12758. type: "dashboard",
  12759. percent: _ctx.uidatasdata.SOC ?? 0,
  12760. "stroke-color": "#B0D0FF",
  12761. "stroke-width": 6,
  12762. width: 180,
  12763. "stroke-shape": "square",
  12764. showInfo: false
  12765. }, null, 8, ["percent"]),
  12766. vue.createElementVNode("view", { style: { "position": "absolute", "text-align": "center", "top": "20%" } }, [
  12767. vue.createElementVNode("view", { style: { "font-size": "72rpx", "font-weight": "bold" } }, [
  12768. vue.createTextVNode(
  12769. vue.toDisplayString(_ctx.uidatasdata.SOC ?? 0) + " ",
  12770. 1
  12771. /* TEXT */
  12772. ),
  12773. vue.createElementVNode("text", { style: { "font-size": "32rpx" } }, "%")
  12774. ]),
  12775. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-top": "6px" } }, "SOC")
  12776. ]),
  12777. vue.createElementVNode("view", { style: { "position": "absolute", "top": "70%" } }, [
  12778. vue.createElementVNode("view", { style: { "width": "190px", "display": "flex", "justify-content": "space-between" } }, [
  12779. vue.createElementVNode("view", { style: { "font-size": "32rpx", "margin-left": "10px" } }, "0"),
  12780. vue.createElementVNode("view", { style: { "font-size": "32rpx" } }, "100%")
  12781. ])
  12782. ])
  12783. ]),
  12784. 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> ')
  12785. ]),
  12786. vue.createElementVNode("image", {
  12787. class: "parameter_leftdian1",
  12788. src: _imports_1$2,
  12789. alt: ""
  12790. }),
  12791. vue.createElementVNode("view", { class: "parameter_lef2" }, [
  12792. vue.createElementVNode("image", {
  12793. src: _imports_2$2,
  12794. mode: ""
  12795. })
  12796. ]),
  12797. vue.createElementVNode("image", {
  12798. class: "parameter_leftche2",
  12799. src: _imports_3$1,
  12800. mode: ""
  12801. }),
  12802. vue.createElementVNode(
  12803. "view",
  12804. { class: "parameter_leftview" },
  12805. vue.toDisplayString(_ctx.$t("DirectSupplyOutput")),
  12806. 1
  12807. /* TEXT */
  12808. )
  12809. ]),
  12810. vue.createElementVNode("view", { class: "parameter_right" }, [
  12811. vue.createElementVNode("view", { class: "parameter_righttop" }, [
  12812. vue.createElementVNode("view", { class: "parameter_1" }, [
  12813. vue.createElementVNode("view", { class: "parameter_2" }, [
  12814. $data.ChargingStation == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12815. key: 0,
  12816. class: "parameter_3"
  12817. }, [
  12818. vue.createElementVNode("view", { class: "parameter_4" }, [
  12819. _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  12820. key: 0,
  12821. src: _imports_4,
  12822. mode: ""
  12823. })) : (vue.openBlock(), vue.createElementBlock("image", {
  12824. key: 1,
  12825. src: _imports_5,
  12826. mode: ""
  12827. })),
  12828. vue.createTextVNode(
  12829. " " + vue.toDisplayString(_ctx.$t("ConnectionStatus")),
  12830. 1
  12831. /* TEXT */
  12832. )
  12833. ]),
  12834. _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
  12835. "view",
  12836. {
  12837. key: 0,
  12838. class: "parameter_51"
  12839. },
  12840. vue.toDisplayString(_ctx.$t("connect")),
  12841. 1
  12842. /* TEXT */
  12843. )) : (vue.openBlock(), vue.createElementBlock(
  12844. "view",
  12845. {
  12846. key: 1,
  12847. class: "parameter_5"
  12848. },
  12849. vue.toDisplayString(_ctx.$t("breakoff")),
  12850. 1
  12851. /* TEXT */
  12852. ))
  12853. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  12854. key: 1,
  12855. class: "parameter_3"
  12856. }, [
  12857. vue.createElementVNode("view", { class: "parameter_4" }, [
  12858. _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  12859. key: 0,
  12860. src: _imports_4,
  12861. mode: ""
  12862. })) : (vue.openBlock(), vue.createElementBlock("image", {
  12863. key: 1,
  12864. src: _imports_5,
  12865. mode: ""
  12866. })),
  12867. vue.createTextVNode(
  12868. " " + vue.toDisplayString(_ctx.$t("ConnectionStatus")),
  12869. 1
  12870. /* TEXT */
  12871. )
  12872. ]),
  12873. _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarConnectStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
  12874. "view",
  12875. {
  12876. key: 0,
  12877. class: "parameter_51"
  12878. },
  12879. vue.toDisplayString(_ctx.$t("connect")),
  12880. 1
  12881. /* TEXT */
  12882. )) : (vue.openBlock(), vue.createElementBlock(
  12883. "view",
  12884. {
  12885. key: 1,
  12886. class: "parameter_5"
  12887. },
  12888. vue.toDisplayString(_ctx.$t("breakoff")),
  12889. 1
  12890. /* TEXT */
  12891. ))
  12892. ])),
  12893. $data.ChargingStation == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  12894. key: 2,
  12895. class: "parameter_3"
  12896. }, [
  12897. vue.createElementVNode("view", { class: "parameter_4" }, [
  12898. _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  12899. key: 0,
  12900. src: _imports_4,
  12901. mode: ""
  12902. })) : (vue.openBlock(), vue.createElementBlock("image", {
  12903. key: 1,
  12904. src: _imports_5,
  12905. mode: ""
  12906. })),
  12907. vue.createTextVNode(
  12908. " " + vue.toDisplayString(_ctx.$t("workingCondition")),
  12909. 1
  12910. /* TEXT */
  12911. )
  12912. ]),
  12913. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  12914. _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 0 ? (vue.openBlock(), vue.createElementBlock(
  12915. "view",
  12916. { key: 0 },
  12917. vue.toDisplayString(_ctx.$t("StandbyMode")),
  12918. 1
  12919. /* TEXT */
  12920. )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
  12921. "view",
  12922. { key: 1 },
  12923. vue.toDisplayString(_ctx.$t("work")),
  12924. 1
  12925. /* TEXT */
  12926. )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 2 ? (vue.openBlock(), vue.createElementBlock(
  12927. "view",
  12928. { key: 2 },
  12929. vue.toDisplayString(_ctx.$t("ChargingCompleted")),
  12930. 1
  12931. /* TEXT */
  12932. )) : _ctx.uidatasdata.ChargingStation_1_remoteSignaFrameCarJobStatus_ccu == 3 ? (vue.openBlock(), vue.createElementBlock(
  12933. "view",
  12934. { key: 3 },
  12935. vue.toDisplayString(_ctx.$t("ChargingPause")),
  12936. 1
  12937. /* TEXT */
  12938. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  12939. ])
  12940. ])) : vue.createCommentVNode("v-if", true),
  12941. $data.ChargingStation == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  12942. key: 3,
  12943. class: "parameter_3"
  12944. }, [
  12945. vue.createElementVNode("view", { class: "parameter_4" }, [
  12946. _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock("image", {
  12947. key: 0,
  12948. src: _imports_4,
  12949. mode: ""
  12950. })) : (vue.openBlock(), vue.createElementBlock("image", {
  12951. key: 1,
  12952. src: _imports_5,
  12953. mode: ""
  12954. })),
  12955. vue.createTextVNode(
  12956. " " + vue.toDisplayString(_ctx.$t("workingCondition")),
  12957. 1
  12958. /* TEXT */
  12959. )
  12960. ]),
  12961. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  12962. _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 0 ? (vue.openBlock(), vue.createElementBlock(
  12963. "view",
  12964. { key: 0 },
  12965. vue.toDisplayString(_ctx.$t("StandbyMode")),
  12966. 1
  12967. /* TEXT */
  12968. )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 1 ? (vue.openBlock(), vue.createElementBlock(
  12969. "view",
  12970. { key: 1 },
  12971. vue.toDisplayString(_ctx.$t("work")),
  12972. 1
  12973. /* TEXT */
  12974. )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 2 ? (vue.openBlock(), vue.createElementBlock(
  12975. "view",
  12976. { key: 2 },
  12977. vue.toDisplayString(_ctx.$t("ChargingCompleted")),
  12978. 1
  12979. /* TEXT */
  12980. )) : _ctx.uidatasdata.ChargingStation_2_remoteSignaFrameCarJobStatus_ccu == 3 ? (vue.openBlock(), vue.createElementBlock(
  12981. "view",
  12982. { key: 3 },
  12983. vue.toDisplayString(_ctx.$t("ChargingPause")),
  12984. 1
  12985. /* TEXT */
  12986. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  12987. ]),
  12988. vue.createCommentVNode(' <view class="parameter_5" v-else>\r\n 断开\r\n </view> ')
  12989. ])) : vue.createCommentVNode("v-if", true)
  12990. ]),
  12991. vue.createElementVNode("view", { class: "parameter_SOC" }, [
  12992. vue.createElementVNode("image", {
  12993. src: _imports_6,
  12994. mode: ""
  12995. }),
  12996. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  12997. vue.createElementVNode("view", { class: "parameter_SOCright1" }, " SOC "),
  12998. vue.createElementVNode("view", null, [
  12999. vue.createElementVNode(
  13000. "text",
  13001. { class: "parameter_SOCright2" },
  13002. vue.toDisplayString(_ctx.uidatasdata.SOC ?? "—"),
  13003. 1
  13004. /* TEXT */
  13005. ),
  13006. vue.createElementVNode("text", null, "%")
  13007. ])
  13008. ])
  13009. ]),
  13010. vue.createElementVNode("view", { class: "parameter_Battery" }, [
  13011. vue.createElementVNode("image", {
  13012. src: _imports_7,
  13013. mode: ""
  13014. }),
  13015. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  13016. vue.createElementVNode(
  13017. "view",
  13018. { class: "parameter_SOCright1" },
  13019. vue.toDisplayString(_ctx.$t("BatteryStatus")),
  13020. 1
  13021. /* TEXT */
  13022. ),
  13023. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13024. _ctx.uidatasdata.bms_BatSysState == 5 ? (vue.openBlock(), vue.createElementBlock(
  13025. "view",
  13026. { key: 0 },
  13027. vue.toDisplayString(_ctx.$t("fault")),
  13028. 1
  13029. /* TEXT */
  13030. )) : _ctx.uidatasdata.bms_BatSysState == 0 ? (vue.openBlock(), vue.createElementBlock(
  13031. "view",
  13032. { key: 1 },
  13033. vue.toDisplayString(_ctx.$t("ChuShiHua")),
  13034. 1
  13035. /* TEXT */
  13036. )) : _ctx.uidatasdata.bms_BatSysState == 1 ? (vue.openBlock(), vue.createElementBlock(
  13037. "view",
  13038. { key: 2 },
  13039. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  13040. 1
  13041. /* TEXT */
  13042. )) : _ctx.uidatasdata.bms_BatSysState == 2 ? (vue.openBlock(), vue.createElementBlock(
  13043. "view",
  13044. { key: 3 },
  13045. vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
  13046. 1
  13047. /* TEXT */
  13048. )) : _ctx.uidatasdata.bms_BatSysState == 3 ? (vue.openBlock(), vue.createElementBlock(
  13049. "view",
  13050. { key: 4 },
  13051. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  13052. 1
  13053. /* TEXT */
  13054. )) : _ctx.uidatasdata.bms_BatSysState == 4 ? (vue.openBlock(), vue.createElementBlock(
  13055. "view",
  13056. { key: 5 },
  13057. vue.toDisplayString(_ctx.$t("Underhighpressure")),
  13058. 1
  13059. /* TEXT */
  13060. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — ")),
  13061. vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} ")
  13062. ])
  13063. ])
  13064. ]),
  13065. vue.createElementVNode("view", { class: "parameter_state" }, [
  13066. vue.createElementVNode("image", {
  13067. src: _imports_8,
  13068. mode: ""
  13069. }),
  13070. vue.createElementVNode("view", { class: "parameter_SOCright" }, [
  13071. vue.createElementVNode(
  13072. "view",
  13073. { class: "parameter_SOCright1" },
  13074. vue.toDisplayString(_ctx.$t("SystemStatus")),
  13075. 1
  13076. /* TEXT */
  13077. ),
  13078. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13079. vue.createCommentVNode(" {{uidatasdata.bms_ChgLinkSt==0.00?'无效':'有效'}} "),
  13080. _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
  13081. "view",
  13082. { key: 0 },
  13083. vue.toDisplayString(_ctx.$t("uncharged")),
  13084. 1
  13085. /* TEXT */
  13086. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
  13087. "view",
  13088. { key: 1 },
  13089. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  13090. 1
  13091. /* TEXT */
  13092. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
  13093. "view",
  13094. { key: 2 },
  13095. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  13096. 1
  13097. /* TEXT */
  13098. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
  13099. "view",
  13100. { key: 3 },
  13101. vue.toDisplayString(_ctx.$t("full")),
  13102. 1
  13103. /* TEXT */
  13104. )) : (vue.openBlock(), vue.createElementBlock(
  13105. vue.Fragment,
  13106. { key: 4 },
  13107. [
  13108. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_==4">\r
  13109. {{$t('Chargingstopped')}}\r
  13110. </view> `),
  13111. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_BatSysWorkMode_>3&&uidatasdata.bms_BatSysWorkMode_<8">\r
  13112. {{$t('retain')}}\r
  13113. </view> `),
  13114. vue.createElementVNode("view", null, " — ")
  13115. ],
  13116. 2112
  13117. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  13118. ))
  13119. ])
  13120. ])
  13121. ])
  13122. ])
  13123. ]),
  13124. vue.createElementVNode("view", { class: "parameter_tap" }, [
  13125. vue.createElementVNode(
  13126. "view",
  13127. {
  13128. class: vue.normalizeClass($data.segmented == 1 ? "parameter_tap1" : "parameter_tap2"),
  13129. onClick: _cache[0] || (_cache[0] = ($event) => $options.ontap(1))
  13130. },
  13131. vue.toDisplayString(_ctx.$t("GunAinformation")),
  13132. 3
  13133. /* TEXT, CLASS */
  13134. ),
  13135. vue.createElementVNode(
  13136. "view",
  13137. {
  13138. class: vue.normalizeClass($data.segmented == 2 ? "parameter_tap1" : "parameter_tap2"),
  13139. onClick: _cache[1] || (_cache[1] = ($event) => $options.ontap(2))
  13140. },
  13141. vue.toDisplayString(_ctx.$t("GunBinformation")),
  13142. 3
  13143. /* TEXT, CLASS */
  13144. ),
  13145. vue.createElementVNode(
  13146. "view",
  13147. {
  13148. class: vue.normalizeClass($data.segmented == 3 ? "parameter_tap1" : "parameter_tap2"),
  13149. onClick: _cache[2] || (_cache[2] = ($event) => $options.ontap(3))
  13150. },
  13151. vue.toDisplayString(_ctx.$t("Batteryinformation")),
  13152. 3
  13153. /* TEXT, CLASS */
  13154. ),
  13155. vue.createCommentVNode(` <view :class="segmented==4?'parameter_tap1':'parameter_tap2'" @click="ontap(4)">\r
  13156. {{$t('ConnectionInformation')}}\r
  13157. </view> `),
  13158. vue.createElementVNode(
  13159. "view",
  13160. {
  13161. class: vue.normalizeClass($data.segmented == 5 ? "parameter_tap1" : "parameter_tap2"),
  13162. onClick: _cache[3] || (_cache[3] = ($event) => $options.ontap(5))
  13163. },
  13164. vue.toDisplayString(_ctx.$t("coolinginformation")),
  13165. 3
  13166. /* TEXT, CLASS */
  13167. )
  13168. ]),
  13169. vue.createElementVNode("view", { class: "parameter_zheng" }, [
  13170. $data.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  13171. key: 0,
  13172. class: "parameter_box"
  13173. }, [
  13174. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  13175. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13176. vue.createElementVNode(
  13177. "view",
  13178. { class: "parameter_zheng12" },
  13179. vue.toDisplayString(_ctx.$t("ChargingVoltage")),
  13180. 1
  13181. /* TEXT */
  13182. ),
  13183. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13184. vue.createTextVNode(
  13185. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage ?? "—") + " ",
  13186. 1
  13187. /* TEXT */
  13188. ),
  13189. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  13190. ])
  13191. ]),
  13192. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13193. vue.createElementVNode(
  13194. "view",
  13195. { class: "parameter_zheng12" },
  13196. vue.toDisplayString(_ctx.$t("ChargingCurrent")),
  13197. 1
  13198. /* TEXT */
  13199. ),
  13200. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13201. vue.createTextVNode(
  13202. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_chargeOutputCurrent ?? "—") + " ",
  13203. 1
  13204. /* TEXT */
  13205. ),
  13206. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  13207. ])
  13208. ]),
  13209. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13210. vue.createElementVNode(
  13211. "view",
  13212. { class: "parameter_zheng12" },
  13213. vue.toDisplayString(_ctx.$t("VehicleSOC")),
  13214. 1
  13215. /* TEXT */
  13216. ),
  13217. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13218. vue.createTextVNode(
  13219. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_soc ?? "—") + " ",
  13220. 1
  13221. /* TEXT */
  13222. ),
  13223. vue.createElementVNode("text", { class: "parameter_zheng14" }, "%")
  13224. ])
  13225. ]),
  13226. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13227. vue.createElementVNode(
  13228. "view",
  13229. { class: "parameter_zheng12" },
  13230. vue.toDisplayString(_ctx.$t("CharingPower")),
  13231. 1
  13232. /* TEXT */
  13233. ),
  13234. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13235. vue.createTextVNode(
  13236. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage ? (_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_outputVoltage * _ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_chargeOutputCurrent / 1e3).toFixed(2) : "—") + " ",
  13237. 1
  13238. /* TEXT */
  13239. ),
  13240. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  13241. ])
  13242. ])
  13243. ]),
  13244. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  13245. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13246. vue.createElementVNode(
  13247. "view",
  13248. { class: "parameter_zheng12" },
  13249. vue.toDisplayString(_ctx.$t("ChargingCapacity")),
  13250. 1
  13251. /* TEXT */
  13252. ),
  13253. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13254. vue.createTextVNode(
  13255. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_ThisChargePower ?? "—") + " ",
  13256. 1
  13257. /* TEXT */
  13258. ),
  13259. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh")
  13260. ])
  13261. ]),
  13262. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  13263. <view class="parameter_zheng12">\r
  13264. {{$t('ChargingFee')}}\r
  13265. </view>\r
  13266. <view class="parameter_zheng13">\r
  13267. {{uidatasdata.ChargingStation_1_telemetryFrameccu_AccumulatedChargingElectricityCost??'—'}}\r
  13268. <text class="parameter_zheng14">{{$t('USD')}}</text>\r
  13269. </view>\r
  13270. </view> `),
  13271. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13272. vue.createElementVNode(
  13273. "view",
  13274. { class: "parameter_zheng12" },
  13275. vue.toDisplayString(_ctx.$t("ChargingTime")),
  13276. 1
  13277. /* TEXT */
  13278. ),
  13279. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13280. vue.createTextVNode(
  13281. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_1_telemetryFrameccu_EstimateTheRemainingChargingTime ?? "—") + " ",
  13282. 1
  13283. /* TEXT */
  13284. ),
  13285. vue.createElementVNode("text", { class: "parameter_zheng14" }, "min")
  13286. ])
  13287. ]),
  13288. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
  13289. vue.createElementVNode("view", { class: "parameter_zheng12" }),
  13290. vue.createElementVNode("view", { class: "parameter_zheng13" })
  13291. ]),
  13292. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
  13293. vue.createElementVNode("view", { class: "parameter_zheng12" }),
  13294. vue.createElementVNode("view", { class: "parameter_zheng13" })
  13295. ])
  13296. ])
  13297. ])) : vue.createCommentVNode("v-if", true),
  13298. $data.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  13299. key: 1,
  13300. class: "parameter_box"
  13301. }, [
  13302. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  13303. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13304. vue.createElementVNode(
  13305. "view",
  13306. { class: "parameter_zheng12" },
  13307. vue.toDisplayString(_ctx.$t("ChargingVoltage")),
  13308. 1
  13309. /* TEXT */
  13310. ),
  13311. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13312. vue.createTextVNode(
  13313. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage ?? "—") + " ",
  13314. 1
  13315. /* TEXT */
  13316. ),
  13317. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  13318. ])
  13319. ]),
  13320. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13321. vue.createElementVNode(
  13322. "view",
  13323. { class: "parameter_zheng12" },
  13324. vue.toDisplayString(_ctx.$t("ChargingCurrent")),
  13325. 1
  13326. /* TEXT */
  13327. ),
  13328. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13329. vue.createTextVNode(
  13330. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_chargeOutputCurrent ?? "—") + " ",
  13331. 1
  13332. /* TEXT */
  13333. ),
  13334. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  13335. ])
  13336. ]),
  13337. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13338. vue.createElementVNode(
  13339. "view",
  13340. { class: "parameter_zheng12" },
  13341. vue.toDisplayString(_ctx.$t("VehicleSOC")),
  13342. 1
  13343. /* TEXT */
  13344. ),
  13345. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13346. vue.createTextVNode(
  13347. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_soc ?? "—"),
  13348. 1
  13349. /* TEXT */
  13350. ),
  13351. vue.createElementVNode("text", { class: "parameter_zheng14" }, " %")
  13352. ])
  13353. ]),
  13354. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13355. vue.createElementVNode(
  13356. "view",
  13357. { class: "parameter_zheng12" },
  13358. vue.toDisplayString(_ctx.$t("CharingPower")),
  13359. 1
  13360. /* TEXT */
  13361. ),
  13362. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13363. vue.createTextVNode(
  13364. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage ? (_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_outputVoltage * _ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_chargeOutputCurrent / 1e3).toFixed(2) : "—") + " ",
  13365. 1
  13366. /* TEXT */
  13367. ),
  13368. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  13369. ])
  13370. ])
  13371. ]),
  13372. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  13373. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13374. vue.createElementVNode(
  13375. "view",
  13376. { class: "parameter_zheng12" },
  13377. vue.toDisplayString(_ctx.$t("ChargingCapacity")),
  13378. 1
  13379. /* TEXT */
  13380. ),
  13381. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13382. vue.createTextVNode(
  13383. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_ThisChargePower ?? "—") + " ",
  13384. 1
  13385. /* TEXT */
  13386. ),
  13387. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kWh")
  13388. ])
  13389. ]),
  13390. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  13391. <view class="parameter_zheng12">\r
  13392. {{$t('ChargingFee')}}\r
  13393. </view>\r
  13394. <view class="parameter_zheng13">\r
  13395. \r
  13396. {{uidatasdata.ChargingStation_2_telemetryFrameccu_AccumulatedChargingElectricityCost??'—'}}\r
  13397. <text class="parameter_zheng14">{{$t('USD')}}</text>\r
  13398. </view>\r
  13399. </view> `),
  13400. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13401. vue.createElementVNode(
  13402. "view",
  13403. { class: "parameter_zheng12" },
  13404. vue.toDisplayString(_ctx.$t("ChargingTime")),
  13405. 1
  13406. /* TEXT */
  13407. ),
  13408. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13409. vue.createTextVNode(
  13410. vue.toDisplayString(_ctx.uidatasdata.ChargingStation_2_telemetryFrameccu_EstimateTheRemainingChargingTime ?? "—") + " ",
  13411. 1
  13412. /* TEXT */
  13413. ),
  13414. vue.createElementVNode("text", { class: "parameter_zheng14" }, "min")
  13415. ])
  13416. ]),
  13417. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
  13418. vue.createElementVNode("view", { class: "parameter_zheng12" }),
  13419. vue.createElementVNode("view", { class: "parameter_zheng13" })
  13420. ]),
  13421. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" }, [
  13422. vue.createElementVNode("view", { class: "parameter_zheng12" }),
  13423. vue.createElementVNode("view", { class: "parameter_zheng13" })
  13424. ])
  13425. ])
  13426. ])) : vue.createCommentVNode("v-if", true),
  13427. $data.segmented == 3 ? (vue.openBlock(), vue.createElementBlock("view", {
  13428. key: 2,
  13429. class: "parameter_box"
  13430. }, [
  13431. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  13432. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  13433. <view class="parameter_zheng12">\r
  13434. {{$t('Batterypower')}}\r
  13435. </view>\r
  13436. <view class="parameter_zheng13">\r
  13437. {{uidatasdata.BatSysSt2_BatPower??'—'}} <text class="parameter_zheng14">kW</text>\r
  13438. </view>\r
  13439. </view> `),
  13440. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13441. vue.createElementVNode(
  13442. "view",
  13443. { class: "parameter_zheng12" },
  13444. vue.toDisplayString(_ctx.$t("TotalPressure")),
  13445. 1
  13446. /* TEXT */
  13447. ),
  13448. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13449. vue.createTextVNode(
  13450. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatSumVInt ?? "—") + " ",
  13451. 1
  13452. /* TEXT */
  13453. ),
  13454. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  13455. ])
  13456. ]),
  13457. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13458. vue.createElementVNode(
  13459. "view",
  13460. { class: "parameter_zheng12" },
  13461. vue.toDisplayString(_ctx.$t("AllowableDischargepower")),
  13462. 1
  13463. /* TEXT */
  13464. ),
  13465. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13466. vue.createTextVNode(
  13467. vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargePowerLimit ?? "—") + " ",
  13468. 1
  13469. /* TEXT */
  13470. ),
  13471. vue.createElementVNode("text", { class: "parameter_zheng14" }, "kW")
  13472. ])
  13473. ]),
  13474. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13475. vue.createElementVNode(
  13476. "view",
  13477. { class: "parameter_zheng12" },
  13478. vue.toDisplayString(_ctx.$t("MaximumVoltage")),
  13479. 1
  13480. /* TEXT */
  13481. ),
  13482. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13483. vue.createTextVNode(
  13484. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMaxCellVoltage ?? "—") + " ",
  13485. 1
  13486. /* TEXT */
  13487. ),
  13488. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  13489. ])
  13490. ]),
  13491. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13492. vue.createElementVNode(
  13493. "view",
  13494. { class: "parameter_zheng12" },
  13495. vue.toDisplayString(_ctx.$t("MaximumTemperature")),
  13496. 1
  13497. /* TEXT */
  13498. ),
  13499. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13500. vue.createTextVNode(
  13501. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MaxTemp ?? "—") + " ",
  13502. 1
  13503. /* TEXT */
  13504. ),
  13505. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  13506. ])
  13507. ])
  13508. ]),
  13509. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  13510. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13511. vue.createElementVNode(
  13512. "view",
  13513. { class: "parameter_zheng12" },
  13514. vue.toDisplayString(_ctx.$t("BatteryCurrent")),
  13515. 1
  13516. /* TEXT */
  13517. ),
  13518. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13519. vue.createTextVNode(
  13520. vue.toDisplayString(_ctx.uidatasdata.BatSysSt2_BatCur ?? "—") + " ",
  13521. 1
  13522. /* TEXT */
  13523. ),
  13524. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  13525. ])
  13526. ]),
  13527. vue.createCommentVNode(` <view class="parameter_zheng11">\r
  13528. <view class="parameter_zheng12">\r
  13529. {{$t('TotalExternalPressure')}}\r
  13530. \r
  13531. </view>\r
  13532. <view class="parameter_zheng13">\r
  13533. {{uidatasdata.BatSysSt2_BatSumVOut??'—'}} <text class="parameter_zheng14">V</text>\r
  13534. </view>\r
  13535. </view> `),
  13536. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13537. vue.createElementVNode(
  13538. "view",
  13539. { class: "parameter_zheng12" },
  13540. vue.toDisplayString(_ctx.$t("AllowDischargeCurrent")),
  13541. 1
  13542. /* TEXT */
  13543. ),
  13544. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13545. vue.createTextVNode(
  13546. vue.toDisplayString(_ctx.uidatasdata.DchChgCurPowLimit_MaxDischargeCurrentLimit ?? "—"),
  13547. 1
  13548. /* TEXT */
  13549. ),
  13550. vue.createElementVNode("text", { class: "parameter_zheng14" }, "A")
  13551. ])
  13552. ]),
  13553. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13554. vue.createElementVNode(
  13555. "view",
  13556. { class: "parameter_zheng12" },
  13557. vue.toDisplayString(_ctx.$t("MinimumIndividualVoltage")),
  13558. 1
  13559. /* TEXT */
  13560. ),
  13561. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13562. vue.createTextVNode(
  13563. vue.toDisplayString(_ctx.uidatasdata.BatCellVPeak_ValMinCellVoltage ?? "—") + " ",
  13564. 1
  13565. /* TEXT */
  13566. ),
  13567. vue.createElementVNode("text", { class: "parameter_zheng14" }, "V")
  13568. ])
  13569. ]),
  13570. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13571. vue.createElementVNode(
  13572. "view",
  13573. { class: "parameter_zheng12" },
  13574. vue.toDisplayString(_ctx.$t("MinimumMonomerTemperature")),
  13575. 1
  13576. /* TEXT */
  13577. ),
  13578. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13579. vue.createTextVNode(
  13580. vue.toDisplayString(_ctx.uidatasdata.CellTemperatureLimitsStatus_MinTemp ?? "—") + " ",
  13581. 1
  13582. /* TEXT */
  13583. ),
  13584. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  13585. ])
  13586. ])
  13587. ])
  13588. ])) : vue.createCommentVNode("v-if", true),
  13589. $data.segmented == 4 ? (vue.openBlock(), vue.createElementBlock("view", {
  13590. key: 3,
  13591. class: "parameter_box"
  13592. }, [
  13593. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  13594. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13595. vue.createElementVNode(
  13596. "view",
  13597. { class: "parameter_zheng12" },
  13598. vue.toDisplayString(_ctx.$t("WorkingModeBatterySystem")),
  13599. 1
  13600. /* TEXT */
  13601. ),
  13602. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13603. vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "),
  13604. _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
  13605. "view",
  13606. { key: 0 },
  13607. vue.toDisplayString(_ctx.$t("invalid")),
  13608. 1
  13609. /* TEXT */
  13610. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
  13611. "view",
  13612. { key: 1 },
  13613. vue.toDisplayString(_ctx.$t("DischargeMode")),
  13614. 1
  13615. /* TEXT */
  13616. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
  13617. "view",
  13618. { key: 2 },
  13619. vue.toDisplayString(_ctx.$t("pcsChargingMode")),
  13620. 1
  13621. /* TEXT */
  13622. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
  13623. "view",
  13624. { key: 3 },
  13625. vue.toDisplayString(_ctx.$t("EuropeanStandardChargingMode")),
  13626. 1
  13627. /* TEXT */
  13628. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  13629. ])
  13630. ]),
  13631. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13632. vue.createElementVNode(
  13633. "view",
  13634. { class: "parameter_zheng12" },
  13635. vue.toDisplayString(_ctx.$t("BatterySystemStatus")),
  13636. 1
  13637. /* TEXT */
  13638. ),
  13639. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13640. vue.createCommentVNode(" {{uidatasdata.bms_BatSysWorkMode_==0.00?'无效':'有效'}} "),
  13641. _ctx.uidatasdata.bms_BatSysWorkMode_ == 0 ? (vue.openBlock(), vue.createElementBlock(
  13642. "view",
  13643. { key: 0 },
  13644. vue.toDisplayString(_ctx.$t("initialization")),
  13645. 1
  13646. /* TEXT */
  13647. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 1 ? (vue.openBlock(), vue.createElementBlock(
  13648. "view",
  13649. { key: 1 },
  13650. vue.toDisplayString(_ctx.$t("NotupyetVoltage")),
  13651. 1
  13652. /* TEXT */
  13653. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 2 ? (vue.openBlock(), vue.createElementBlock(
  13654. "view",
  13655. { key: 2 },
  13656. vue.toDisplayString(_ctx.$t("HighVoltageMedium")),
  13657. 1
  13658. /* TEXT */
  13659. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 3 ? (vue.openBlock(), vue.createElementBlock(
  13660. "view",
  13661. { key: 3 },
  13662. vue.toDisplayString(_ctx.$t("voltagehasbeen")),
  13663. 1
  13664. /* TEXT */
  13665. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 4 ? (vue.openBlock(), vue.createElementBlock(
  13666. "view",
  13667. { key: 4 },
  13668. vue.toDisplayString(_ctx.$t("Underhighpressure")),
  13669. 1
  13670. /* TEXT */
  13671. )) : _ctx.uidatasdata.bms_BatSysWorkMode_ == 5 ? (vue.openBlock(), vue.createElementBlock(
  13672. "view",
  13673. { key: 5 },
  13674. vue.toDisplayString(_ctx.$t("fault")),
  13675. 1
  13676. /* TEXT */
  13677. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 6 }, " — "))
  13678. ])
  13679. ]),
  13680. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13681. vue.createElementVNode(
  13682. "view",
  13683. { class: "parameter_zheng12" },
  13684. vue.toDisplayString(_ctx.$t("ChargingStatus")),
  13685. 1
  13686. /* TEXT */
  13687. ),
  13688. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13689. _ctx.uidatasdata.bms_ChargeStatus == 0 ? (vue.openBlock(), vue.createElementBlock(
  13690. "view",
  13691. { key: 0 },
  13692. vue.toDisplayString(_ctx.$t("uncharged")),
  13693. 1
  13694. /* TEXT */
  13695. )) : _ctx.uidatasdata.bms_ChargeStatus == 1 ? (vue.openBlock(), vue.createElementBlock(
  13696. "view",
  13697. { key: 1 },
  13698. vue.toDisplayString(_ctx.$t("Chargingprogress")),
  13699. 1
  13700. /* TEXT */
  13701. )) : _ctx.uidatasdata.bms_ChargeStatus == 2 ? (vue.openBlock(), vue.createElementBlock(
  13702. "view",
  13703. { key: 2 },
  13704. vue.toDisplayString(_ctx.$t("Chargingmalfunction")),
  13705. 1
  13706. /* TEXT */
  13707. )) : _ctx.uidatasdata.bms_ChargeStatus == 3 ? (vue.openBlock(), vue.createElementBlock(
  13708. "view",
  13709. { key: 3 },
  13710. vue.toDisplayString(_ctx.$t("full")),
  13711. 1
  13712. /* TEXT */
  13713. )) : _ctx.uidatasdata.bms_ChargeStatus > 3 && _ctx.uidatasdata.bms_ChargeStatus < 8 ? (vue.openBlock(), vue.createElementBlock(
  13714. vue.Fragment,
  13715. { key: 4 },
  13716. [
  13717. vue.createCommentVNode(` <view v-else-if="uidatasdata.bms_ChargeStatus==4">\r
  13718. {{$t('Chargingstopped')}}\r
  13719. </view> `),
  13720. vue.createElementVNode(
  13721. "view",
  13722. null,
  13723. vue.toDisplayString(_ctx.$t("retain")),
  13724. 1
  13725. /* TEXT */
  13726. )
  13727. ],
  13728. 2112
  13729. /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
  13730. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 5 }, " — "))
  13731. ])
  13732. ])
  13733. ]),
  13734. vue.createElementVNode("view", { class: "parameter_zheng22" }, [
  13735. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13736. vue.createElementVNode(
  13737. "view",
  13738. { class: "parameter_zheng12" },
  13739. vue.toDisplayString(_ctx.$t("ChargingConnectionStatus")),
  13740. 1
  13741. /* TEXT */
  13742. ),
  13743. _ctx.uidatasdata.bms_ChgLinkSt == 1 ? (vue.openBlock(), vue.createElementBlock(
  13744. "view",
  13745. {
  13746. key: 0,
  13747. class: "parameter_Batterystate1"
  13748. },
  13749. vue.toDisplayString(_ctx.$t("FastChargingConnection")),
  13750. 1
  13751. /* TEXT */
  13752. )) : (vue.openBlock(), vue.createElementBlock(
  13753. "view",
  13754. {
  13755. key: 1,
  13756. class: "parameter_Batterystate1"
  13757. },
  13758. vue.toDisplayString(_ctx.$t("NoConnection")),
  13759. 1
  13760. /* TEXT */
  13761. ))
  13762. ]),
  13763. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13764. vue.createElementVNode(
  13765. "view",
  13766. { class: "parameter_zheng12" },
  13767. vue.toDisplayString(_ctx.$t("BatteryFaultLevel")),
  13768. 1
  13769. /* TEXT */
  13770. ),
  13771. vue.createElementVNode("view", { class: "parameter_Batterystate1" }, [
  13772. vue.createCommentVNode(" {{uidatasdata.bms_BatteryFaultLevl==0.00?'无故障':'有效'}} "),
  13773. _ctx.uidatasdata.bms_BatteryFaultLevl == 0 ? (vue.openBlock(), vue.createElementBlock(
  13774. "view",
  13775. { key: 0 },
  13776. vue.toDisplayString(_ctx.$t("NoMalfunction")),
  13777. 1
  13778. /* TEXT */
  13779. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 1 ? (vue.openBlock(), vue.createElementBlock(
  13780. "view",
  13781. { key: 1 },
  13782. " 1" + vue.toDisplayString(_ctx.$t("LevelLault")),
  13783. 1
  13784. /* TEXT */
  13785. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 2 ? (vue.openBlock(), vue.createElementBlock(
  13786. "view",
  13787. { key: 2 },
  13788. " 2" + vue.toDisplayString(_ctx.$t("LevelLault")),
  13789. 1
  13790. /* TEXT */
  13791. )) : _ctx.uidatasdata.bms_BatteryFaultLevl == 3 ? (vue.openBlock(), vue.createElementBlock(
  13792. "view",
  13793. { key: 3 },
  13794. " 3" + vue.toDisplayString(_ctx.$t("LevelLault")),
  13795. 1
  13796. /* TEXT */
  13797. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  13798. ])
  13799. ]),
  13800. vue.createElementVNode("view", { class: "parameter_zheng11 parameter_zheng102" })
  13801. ])
  13802. ])) : vue.createCommentVNode("v-if", true),
  13803. $data.segmented == 5 ? (vue.openBlock(), vue.createElementBlock("view", {
  13804. key: 4,
  13805. class: "parameter_box"
  13806. }, [
  13807. vue.createElementVNode("view", { class: "parameter_zheng1" }, [
  13808. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13809. vue.createElementVNode(
  13810. "view",
  13811. { class: "parameter_zheng12" },
  13812. vue.toDisplayString(_ctx.$t("WorkingMode")),
  13813. 1
  13814. /* TEXT */
  13815. ),
  13816. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13817. vue.createCommentVNode(' {{uidatasdata.TMS_Status_TMS_WORK_MODE}} <text class="parameter_zheng14">kW</text> '),
  13818. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_WORK_MODE==1.00?'有效':'无效'}} "),
  13819. _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 0 ? (vue.openBlock(), vue.createElementBlock(
  13820. "view",
  13821. { key: 0 },
  13822. vue.toDisplayString(_ctx.$t("OffMode")),
  13823. 1
  13824. /* TEXT */
  13825. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 1 ? (vue.openBlock(), vue.createElementBlock(
  13826. "view",
  13827. { key: 1 },
  13828. vue.toDisplayString(_ctx.$t("CoolingMode")),
  13829. 1
  13830. /* TEXT */
  13831. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 2 ? (vue.openBlock(), vue.createElementBlock(
  13832. "view",
  13833. { key: 2 },
  13834. vue.toDisplayString(_ctx.$t("HeatingMode")),
  13835. 1
  13836. /* TEXT */
  13837. )) : _ctx.uidatasdata.TMS_Status_TMS_WORK_MODE == 3 ? (vue.openBlock(), vue.createElementBlock(
  13838. "view",
  13839. { key: 3 },
  13840. vue.toDisplayString(_ctx.$t("CirculatingMode")),
  13841. 1
  13842. /* TEXT */
  13843. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 4 }, " — "))
  13844. ])
  13845. ]),
  13846. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13847. vue.createElementVNode(
  13848. "view",
  13849. { class: "parameter_zheng12" },
  13850. vue.toDisplayString(_ctx.$t("OutletTemperature")),
  13851. 1
  13852. /* TEXT */
  13853. ),
  13854. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13855. vue.createTextVNode(
  13856. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATEROUT_TEMP ?? "—") + " ",
  13857. 1
  13858. /* TEXT */
  13859. ),
  13860. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  13861. ])
  13862. ]),
  13863. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13864. vue.createElementVNode("view", {
  13865. class: "parameter_zheng12",
  13866. style: { "height": "30px" }
  13867. }, [
  13868. vue.createCommentVNode(" {{$t('PowerDemand')}} ")
  13869. ]),
  13870. vue.createCommentVNode(` <view class="parameter_zheng13">\r
  13871. {{uidatasdata.TMS_Status_TMS_POWER_REQ??'—'}} <text\r
  13872. class="parameter_zheng14">kW</text>\r
  13873. </view> `)
  13874. ])
  13875. ]),
  13876. vue.createElementVNode("view", { class: "parameter_zheng2" }, [
  13877. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13878. vue.createElementVNode(
  13879. "view",
  13880. { class: "parameter_zheng12" },
  13881. vue.toDisplayString(_ctx.$t("HighVoltageRelayStatus")),
  13882. 1
  13883. /* TEXT */
  13884. ),
  13885. vue.createElementVNode("view", { class: "parameter_Batterystate" }, [
  13886. vue.createCommentVNode(" {{uidatasdata.TMS_Status_TMS_HV_CONTACT_ST==0.00?'无效':'有效'}} "),
  13887. _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 0 ? (vue.openBlock(), vue.createElementBlock(
  13888. "view",
  13889. { key: 0 },
  13890. vue.toDisplayString(_ctx.$t("DisconnectedState")),
  13891. 1
  13892. /* TEXT */
  13893. )) : _ctx.uidatasdata.TMS_Status_TMS_HV_CONTACT_ST == 1 ? (vue.openBlock(), vue.createElementBlock(
  13894. "view",
  13895. { key: 1 },
  13896. vue.toDisplayString(_ctx.$t("ClosedState")),
  13897. 1
  13898. /* TEXT */
  13899. )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2 }, " — "))
  13900. ])
  13901. ]),
  13902. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13903. vue.createElementVNode(
  13904. "view",
  13905. { class: "parameter_zheng12" },
  13906. vue.toDisplayString(_ctx.$t("waterTemperature")),
  13907. 1
  13908. /* TEXT */
  13909. ),
  13910. vue.createElementVNode("view", { class: "parameter_zheng13" }, [
  13911. vue.createTextVNode(
  13912. vue.toDisplayString(_ctx.uidatasdata.TMS_Status_TMS_WATERIN_TEMP ?? "—") + " ",
  13913. 1
  13914. /* TEXT */
  13915. ),
  13916. vue.createElementVNode("text", { class: "parameter_zheng14" }, "℃")
  13917. ])
  13918. ]),
  13919. vue.createElementVNode("view", { class: "parameter_zheng11" }, [
  13920. vue.createElementVNode("view", {
  13921. class: "parameter_zheng12",
  13922. style: { "height": "30px" }
  13923. }, [
  13924. vue.createCommentVNode(" {{$t('FaultLevel')}} ")
  13925. ]),
  13926. vue.createCommentVNode(` \r
  13927. <view class="parameter_Batterystate">\r
  13928. <view v-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==0">\r
  13929. {{$t('NoMalfunction')}}\r
  13930. </view>\r
  13931. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==1">\r
  13932. 1{{$t('LevelLault')}}\r
  13933. </view>\r
  13934. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==2">\r
  13935. 2{{$t('LevelLault')}}\r
  13936. </view>\r
  13937. <view v-else-if="uidatasdata.TMS_Status_TMS_ERR_LEVEL==3">\r
  13938. 3{{$t('LevelLault')}}\r
  13939. </view>\r
  13940. <view v-else>\r
  13941. —\r
  13942. </view>\r
  13943. </view> `)
  13944. ])
  13945. ])
  13946. ])) : vue.createCommentVNode("v-if", true),
  13947. this.segmented == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  13948. key: 5,
  13949. class: "parameter_zheng3"
  13950. }, [
  13951. _ctx.uidatasdata.SysControl_Gun1RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  13952. key: 0,
  13953. class: "parameter_zheng31111",
  13954. onClick: _cache[4] || (_cache[4] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
  13955. }, [
  13956. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13957. vue.createElementVNode(
  13958. "view",
  13959. { class: "parameter_zheng32" },
  13960. vue.toDisplayString(_ctx.$t("open")),
  13961. 1
  13962. /* TEXT */
  13963. )
  13964. ])
  13965. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  13966. key: 1,
  13967. class: "parameter_zheng31111"
  13968. }, [
  13969. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13970. vue.createElementVNode(
  13971. "view",
  13972. { class: "parameter_zheng32ccc" },
  13973. vue.toDisplayString(_ctx.$t("open")),
  13974. 1
  13975. /* TEXT */
  13976. )
  13977. ])
  13978. ])),
  13979. _ctx.uidatasdata.SysControl_Gun1RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  13980. key: 2,
  13981. class: "parameter_zheng31111",
  13982. onClick: _cache[5] || (_cache[5] = (...args) => $options.onstopit && $options.onstopit(...args))
  13983. }, [
  13984. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13985. vue.createElementVNode(
  13986. "view",
  13987. { class: "parameter_zheng33" },
  13988. vue.toDisplayString(_ctx.$t("stopIt")),
  13989. 1
  13990. /* TEXT */
  13991. )
  13992. ])
  13993. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  13994. key: 3,
  13995. class: "parameter_zheng31111"
  13996. }, [
  13997. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  13998. vue.createElementVNode(
  13999. "view",
  14000. { class: "parameter_zheng32ccc" },
  14001. vue.toDisplayString(_ctx.$t("stopIt")),
  14002. 1
  14003. /* TEXT */
  14004. )
  14005. ])
  14006. ]))
  14007. ])) : vue.createCommentVNode("v-if", true),
  14008. this.segmented == 2 ? (vue.openBlock(), vue.createElementBlock("view", {
  14009. key: 6,
  14010. class: "parameter_zheng3"
  14011. }, [
  14012. _ctx.uidatasdata.SysControl_Gun2RunCmd == 0 ? (vue.openBlock(), vue.createElementBlock("view", {
  14013. key: 0,
  14014. class: "parameter_zheng31111",
  14015. onClick: _cache[6] || (_cache[6] = (...args) => $options.dialogToggle && $options.dialogToggle(...args))
  14016. }, [
  14017. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  14018. vue.createElementVNode(
  14019. "view",
  14020. { class: "parameter_zheng32" },
  14021. vue.toDisplayString(_ctx.$t("open")),
  14022. 1
  14023. /* TEXT */
  14024. )
  14025. ])
  14026. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  14027. key: 1,
  14028. class: "parameter_zheng31111"
  14029. }, [
  14030. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  14031. vue.createElementVNode(
  14032. "view",
  14033. { class: "parameter_zheng32ccc" },
  14034. vue.toDisplayString(_ctx.$t("open")),
  14035. 1
  14036. /* TEXT */
  14037. )
  14038. ])
  14039. ])),
  14040. _ctx.uidatasdata.SysControl_Gun2RunCmd == 1 ? (vue.openBlock(), vue.createElementBlock("view", {
  14041. key: 2,
  14042. class: "parameter_zheng31111",
  14043. onClick: _cache[7] || (_cache[7] = (...args) => $options.onstopit && $options.onstopit(...args))
  14044. }, [
  14045. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  14046. vue.createElementVNode(
  14047. "view",
  14048. { class: "parameter_zheng33" },
  14049. vue.toDisplayString(_ctx.$t("stopIt")),
  14050. 1
  14051. /* TEXT */
  14052. )
  14053. ])
  14054. ])) : (vue.openBlock(), vue.createElementBlock("view", {
  14055. key: 3,
  14056. class: "parameter_zheng31111"
  14057. }, [
  14058. vue.createElementVNode("view", { class: "parameter_zheng31" }, [
  14059. vue.createElementVNode(
  14060. "view",
  14061. { class: "parameter_zheng32ccc" },
  14062. vue.toDisplayString(_ctx.$t("stopIt")),
  14063. 1
  14064. /* TEXT */
  14065. )
  14066. ])
  14067. ]))
  14068. ])) : vue.createCommentVNode("v-if", true)
  14069. ]),
  14070. vue.createElementVNode("view", { class: "parameter_home" }, [
  14071. vue.createElementVNode("view", {
  14072. class: "parameter_home1",
  14073. onClick: _cache[8] || (_cache[8] = (...args) => $options.onreturn && $options.onreturn(...args))
  14074. }, [
  14075. vue.createElementVNode("image", {
  14076. src: _imports_1$3,
  14077. mode: ""
  14078. }),
  14079. vue.createElementVNode(
  14080. "text",
  14081. { class: "parameter_hometext" },
  14082. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  14083. 1
  14084. /* TEXT */
  14085. )
  14086. ]),
  14087. $data.faultsdata.length > 0 && !$data.SysFaultState ? (vue.openBlock(), vue.createElementBlock("view", {
  14088. key: 0,
  14089. class: "parameter_home2"
  14090. }, [
  14091. vue.createElementVNode("image", {
  14092. src: _imports_10$1,
  14093. mode: ""
  14094. }),
  14095. vue.createElementVNode("swiper", {
  14096. class: "swiper",
  14097. circular: "",
  14098. autoplay: true,
  14099. interval: 2e3,
  14100. duration: 500,
  14101. vertical: true
  14102. }, [
  14103. (vue.openBlock(true), vue.createElementBlock(
  14104. vue.Fragment,
  14105. null,
  14106. vue.renderList($data.faultsdata, (item, index) => {
  14107. return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index }, [
  14108. vue.createElementVNode(
  14109. "view",
  14110. { class: "parameter_home3" },
  14111. vue.toDisplayString(item["CONTENT"]),
  14112. 1
  14113. /* TEXT */
  14114. )
  14115. ]);
  14116. }),
  14117. 128
  14118. /* KEYED_FRAGMENT */
  14119. ))
  14120. ])
  14121. ])) : vue.createCommentVNode("v-if", true)
  14122. ])
  14123. ])
  14124. ]),
  14125. vue.createVNode(
  14126. _component_uni_popup,
  14127. { ref: "alertDialog" },
  14128. {
  14129. default: vue.withCtx(() => [
  14130. vue.createVNode(_component_uni_popup_dialog, {
  14131. mode: $data.modeinput,
  14132. placeholder: "请输入内容",
  14133. modelValue: $data.value,
  14134. "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => $data.value = $event),
  14135. type: $data.successtype,
  14136. cancelText: _ctx.$t("CancelReturn"),
  14137. confirmText: $data.confirmText,
  14138. title: $data.title,
  14139. content: $data.content,
  14140. onConfirm: $options.dialogConfirm,
  14141. onClose: $options.dialogClose
  14142. }, null, 8, ["mode", "modelValue", "type", "cancelText", "confirmText", "title", "content", "onConfirm", "onClose"])
  14143. ]),
  14144. _: 1
  14145. /* STABLE */
  14146. },
  14147. 512
  14148. /* NEED_PATCH */
  14149. )
  14150. ]);
  14151. }
  14152. const PagesSupplyssSupplyss = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-0d60935b"], ["__file", "D:/project/esswisdom_ipad_V2/pages/supplyss/supplyss.vue"]]);
  14153. const _imports_1 = "/static/faultlist.png";
  14154. const _imports_2 = "/static/event.png";
  14155. const _imports_3 = "/static/Basics.png";
  14156. const _sfc_main$2 = {
  14157. data() {
  14158. return {};
  14159. },
  14160. onLoad() {
  14161. },
  14162. computed: {
  14163. // 使用 mapState 映射多个状态到组件的计算属性
  14164. ...mapState(["formattedTime", "status"])
  14165. },
  14166. beforeUnmount() {
  14167. },
  14168. methods: {
  14169. // 返回首页
  14170. onreturn(e2) {
  14171. formatAppLog("log", "at pages/faultlist/index.vue:109", e2);
  14172. this.$store.commit("getevent", e2);
  14173. if (e2 == "基础") {
  14174. uni.redirectTo({
  14175. url: "/pages/SYSifo/index"
  14176. });
  14177. } else {
  14178. uni.redirectTo({
  14179. url: "/pages/details/index"
  14180. });
  14181. }
  14182. },
  14183. onclick() {
  14184. uni.redirectTo({
  14185. url: "/pages/index/index"
  14186. });
  14187. }
  14188. }
  14189. };
  14190. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  14191. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  14192. vue.createElementVNode("view", { class: "top" }, [
  14193. vue.createElementVNode("image", {
  14194. class: "top_logo",
  14195. src: _imports_0,
  14196. mode: ""
  14197. }),
  14198. vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
  14199. vue.createElementVNode(
  14200. "view",
  14201. { class: "tite" },
  14202. vue.toDisplayString(_ctx.$t("MainTitle")),
  14203. 1
  14204. /* TEXT */
  14205. ),
  14206. vue.createElementVNode("view", { class: "time" }, [
  14207. vue.createElementVNode(
  14208. "view",
  14209. { class: "time_top" },
  14210. vue.toDisplayString(_ctx.formattedTime),
  14211. 1
  14212. /* TEXT */
  14213. ),
  14214. vue.createElementVNode("view", { class: "time_bottom" }, [
  14215. vue.createElementVNode("view"),
  14216. vue.createElementVNode("view", { class: "time_bottom1" }, [
  14217. vue.createTextVNode(
  14218. vue.toDisplayString(_ctx.$t("status")) + " ",
  14219. 1
  14220. /* TEXT */
  14221. ),
  14222. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  14223. "view",
  14224. {
  14225. key: 0,
  14226. class: "time_state"
  14227. },
  14228. vue.toDisplayString(_ctx.$t("online")),
  14229. 1
  14230. /* TEXT */
  14231. )) : (vue.openBlock(), vue.createElementBlock(
  14232. "view",
  14233. {
  14234. key: 1,
  14235. class: "time_state1"
  14236. },
  14237. vue.toDisplayString(_ctx.$t("offline")),
  14238. 1
  14239. /* TEXT */
  14240. ))
  14241. ])
  14242. ])
  14243. ])
  14244. ]),
  14245. vue.createElementVNode("view", { class: "parameter" }, [
  14246. vue.createElementVNode("view", { class: "parameter_list" }, [
  14247. vue.createElementVNode("view", {
  14248. class: "parameter_box",
  14249. onClick: _cache[0] || (_cache[0] = ($event) => $options.onreturn("故障"))
  14250. }, [
  14251. vue.createElementVNode("view", { class: "parameter_list1" }, [
  14252. vue.createElementVNode("image", {
  14253. src: _imports_1,
  14254. mode: ""
  14255. })
  14256. ]),
  14257. vue.createElementVNode(
  14258. "view",
  14259. { class: "fault_txt" },
  14260. vue.toDisplayString(_ctx.$t("FaultRec")),
  14261. 1
  14262. /* TEXT */
  14263. )
  14264. ]),
  14265. vue.createCommentVNode(` <view class="parameter_box" @click="onreturn('告警')">\r
  14266. <view class="parameter_list1">\r
  14267. <image src="../../static/fault.png" mode=""></image>\r
  14268. </view>\r
  14269. <view class="fault_txt">\r
  14270. {{$t('WarningRec')}}\r
  14271. </view>\r
  14272. </view> `),
  14273. vue.createElementVNode("view", {
  14274. class: "parameter_box",
  14275. onClick: _cache[1] || (_cache[1] = ($event) => $options.onreturn("事件"))
  14276. }, [
  14277. vue.createElementVNode("view", { class: "parameter_list1" }, [
  14278. vue.createElementVNode("image", {
  14279. src: _imports_2,
  14280. mode: ""
  14281. })
  14282. ]),
  14283. vue.createElementVNode(
  14284. "view",
  14285. { class: "fault_txt" },
  14286. vue.toDisplayString(_ctx.$t("RunningRec")),
  14287. 1
  14288. /* TEXT */
  14289. )
  14290. ]),
  14291. vue.createElementVNode("view", {
  14292. class: "parameter_box",
  14293. onClick: _cache[2] || (_cache[2] = ($event) => $options.onreturn("基础"))
  14294. }, [
  14295. vue.createElementVNode("view", { class: "parameter_list1" }, [
  14296. vue.createElementVNode("image", {
  14297. src: _imports_3,
  14298. mode: ""
  14299. })
  14300. ]),
  14301. vue.createElementVNode(
  14302. "view",
  14303. { class: "fault_txt" },
  14304. vue.toDisplayString(_ctx.$t("SYSIfo")),
  14305. 1
  14306. /* TEXT */
  14307. )
  14308. ])
  14309. ])
  14310. ]),
  14311. vue.createElementVNode("view", { class: "parameter_bottom" }, [
  14312. vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [
  14313. vue.createElementVNode("view", {
  14314. class: "parameter_bottom1",
  14315. onClick: _cache[3] || (_cache[3] = (...args) => $options.onclick && $options.onclick(...args))
  14316. }, [
  14317. vue.createElementVNode("image", {
  14318. src: _imports_1$3,
  14319. mode: ""
  14320. }),
  14321. vue.createElementVNode(
  14322. "text",
  14323. { class: "parameter_bottom2" },
  14324. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  14325. 1
  14326. /* TEXT */
  14327. )
  14328. ])
  14329. ])
  14330. ])
  14331. ]);
  14332. }
  14333. const PagesFaultlistIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-108f6e37"], ["__file", "D:/project/esswisdom_ipad_V2/pages/faultlist/index.vue"]]);
  14334. const _sfc_main$1 = {
  14335. data() {
  14336. return {};
  14337. },
  14338. onLoad() {
  14339. },
  14340. computed: {
  14341. // 使用 mapState 映射多个状态到组件的计算属性
  14342. ...mapState(["formattedTime", "status"]),
  14343. ...mapState({
  14344. uidatasdata: (state2) => state2.uidatasdata
  14345. }),
  14346. backgroundStyle() {
  14347. return {
  14348. backgroundImage: `url(${this.$t("offline")})`,
  14349. backgroundSize: "100% 100%"
  14350. };
  14351. }
  14352. },
  14353. beforeUnmount() {
  14354. },
  14355. methods: {
  14356. onclick() {
  14357. uni.redirectTo({
  14358. url: "/pages/index/index"
  14359. });
  14360. },
  14361. onReturn() {
  14362. uni.redirectTo({
  14363. url: "/pages/faultlist/index"
  14364. });
  14365. }
  14366. }
  14367. };
  14368. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  14369. return vue.openBlock(), vue.createElementBlock("view", { class: "content" }, [
  14370. vue.createElementVNode("view", { class: "top" }, [
  14371. vue.createElementVNode("image", {
  14372. class: "top_logo",
  14373. src: _imports_0,
  14374. mode: ""
  14375. }),
  14376. vue.createCommentVNode(' <image class="tite" src="../../static/tite1.png" mode=""></image> '),
  14377. vue.createElementVNode(
  14378. "view",
  14379. { class: "tite" },
  14380. vue.toDisplayString(_ctx.$t("MainTitle")),
  14381. 1
  14382. /* TEXT */
  14383. ),
  14384. vue.createElementVNode("view", { class: "time" }, [
  14385. vue.createElementVNode(
  14386. "view",
  14387. { class: "time_top" },
  14388. vue.toDisplayString(_ctx.formattedTime),
  14389. 1
  14390. /* TEXT */
  14391. ),
  14392. vue.createElementVNode("view", { class: "time_bottom" }, [
  14393. vue.createElementVNode("view"),
  14394. vue.createElementVNode("view", { class: "time_bottom1" }, [
  14395. vue.createTextVNode(
  14396. vue.toDisplayString(_ctx.$t("status")) + " ",
  14397. 1
  14398. /* TEXT */
  14399. ),
  14400. _ctx.status == "ok" ? (vue.openBlock(), vue.createElementBlock(
  14401. "view",
  14402. {
  14403. key: 0,
  14404. class: "time_state"
  14405. },
  14406. vue.toDisplayString(_ctx.$t("online")),
  14407. 1
  14408. /* TEXT */
  14409. )) : (vue.openBlock(), vue.createElementBlock(
  14410. "view",
  14411. {
  14412. key: 1,
  14413. class: "time_state1"
  14414. },
  14415. vue.toDisplayString(_ctx.$t("offline")),
  14416. 1
  14417. /* TEXT */
  14418. ))
  14419. ])
  14420. ])
  14421. ])
  14422. ]),
  14423. vue.createElementVNode("view", { class: "parameter" }, [
  14424. vue.createCommentVNode(` <image class="parameter_list" :src="$t('sysifoURL')" mode=""></image> `),
  14425. vue.createCommentVNode(' <image class="parameter_list" src="../../static/z16.png" mode=""></image> '),
  14426. vue.createElementVNode("view", { class: "parameter_list" }, [
  14427. vue.createElementVNode("view", { class: "parameter_list1" }, [
  14428. vue.createElementVNode("view", { class: "parameter_list1a" }, [
  14429. vue.createElementVNode(
  14430. "view",
  14431. { class: "parameter_list1a1" },
  14432. vue.toDisplayString(_ctx.$t("configuration")),
  14433. 1
  14434. /* TEXT */
  14435. ),
  14436. vue.createElementVNode(
  14437. "view",
  14438. { class: "parameter_list1a1" },
  14439. vue.toDisplayString(_ctx.$t("Batterycapacity")),
  14440. 1
  14441. /* TEXT */
  14442. ),
  14443. vue.createElementVNode(
  14444. "view",
  14445. { class: "parameter_list1a1" },
  14446. vue.toDisplayString(_ctx.$t("Batterytype")),
  14447. 1
  14448. /* TEXT */
  14449. ),
  14450. vue.createElementVNode(
  14451. "view",
  14452. { class: "parameter_list1a1" },
  14453. vue.toDisplayString(_ctx.$t("Communicationpower")),
  14454. 1
  14455. /* TEXT */
  14456. ),
  14457. vue.createElementVNode(
  14458. "view",
  14459. { class: "parameter_list1a1" },
  14460. vue.toDisplayString(_ctx.$t("DCpower")),
  14461. 1
  14462. /* TEXT */
  14463. )
  14464. ]),
  14465. vue.createElementVNode("view", { class: "parameter_list1b" }, [
  14466. vue.createElementVNode(
  14467. "view",
  14468. { class: "parameter_list1a2" },
  14469. vue.toDisplayString(_ctx.$t("configurationz")),
  14470. 1
  14471. /* TEXT */
  14472. ),
  14473. vue.createElementVNode(
  14474. "view",
  14475. { class: "parameter_list1a2" },
  14476. vue.toDisplayString(_ctx.$t("Batterycapacityz")),
  14477. 1
  14478. /* TEXT */
  14479. ),
  14480. vue.createElementVNode(
  14481. "view",
  14482. { class: "parameter_list1a2" },
  14483. vue.toDisplayString(_ctx.$t("Batterytypez")),
  14484. 1
  14485. /* TEXT */
  14486. ),
  14487. vue.createElementVNode(
  14488. "view",
  14489. { class: "parameter_list1a2" },
  14490. vue.toDisplayString(_ctx.$t("Communicationpowerz")),
  14491. 1
  14492. /* TEXT */
  14493. ),
  14494. vue.createElementVNode(
  14495. "view",
  14496. { class: "parameter_list1a2" },
  14497. vue.toDisplayString(_ctx.$t("DCpowerz")),
  14498. 1
  14499. /* TEXT */
  14500. )
  14501. ])
  14502. ]),
  14503. vue.createElementVNode("view", { class: "parameter_list11" }),
  14504. vue.createElementVNode("view", { class: "parameter_list1" }, [
  14505. vue.createElementVNode("view", { class: "parameter_list1ab" }, [
  14506. vue.createElementVNode(
  14507. "view",
  14508. { class: "parameter_list1a1" },
  14509. vue.toDisplayString(_ctx.$t("Systemversion")),
  14510. 1
  14511. /* TEXT */
  14512. ),
  14513. vue.createElementVNode(
  14514. "view",
  14515. { class: "parameter_list1a1" },
  14516. vue.toDisplayString(_ctx.$t("MCSVer")),
  14517. 1
  14518. /* TEXT */
  14519. ),
  14520. vue.createElementVNode(
  14521. "view",
  14522. { class: "parameter_list1a1" },
  14523. vue.toDisplayString(_ctx.$t("CCUVer")),
  14524. 1
  14525. /* TEXT */
  14526. ),
  14527. vue.createCommentVNode(` <view class="parameter_list1a1">\r
  14528. {{$t('SN')}}\r
  14529. </view> `)
  14530. ]),
  14531. vue.createElementVNode("view", { class: "parameter_list1b" }, [
  14532. vue.createElementVNode(
  14533. "view",
  14534. { class: "parameter_list1a2" },
  14535. vue.toDisplayString(_ctx.$t("Systemversionz")),
  14536. 1
  14537. /* TEXT */
  14538. ),
  14539. vue.createElementVNode(
  14540. "view",
  14541. { class: "parameter_list1a2" },
  14542. vue.toDisplayString(_ctx.$t("MCSVerz")),
  14543. 1
  14544. /* TEXT */
  14545. ),
  14546. vue.createElementVNode(
  14547. "view",
  14548. { class: "parameter_list1a2" },
  14549. vue.toDisplayString(_ctx.$t("CCUVerz")),
  14550. 1
  14551. /* TEXT */
  14552. ),
  14553. vue.createCommentVNode(` <view class="parameter_list1a2">\r
  14554. {{uidatasdata.DeviceID??'LYBETr1980601'}}\r
  14555. </view> `)
  14556. ])
  14557. ])
  14558. ])
  14559. ]),
  14560. vue.createElementVNode("view", { class: "parameter_bottom" }, [
  14561. vue.createElementVNode("view", { style: { "display": "flex", "align-items": "center" } }, [
  14562. vue.createElementVNode("view", {
  14563. class: "parameter_bottom1",
  14564. onClick: _cache[0] || (_cache[0] = (...args) => $options.onclick && $options.onclick(...args))
  14565. }, [
  14566. vue.createElementVNode("image", {
  14567. src: _imports_1$3,
  14568. mode: ""
  14569. }),
  14570. vue.createElementVNode(
  14571. "text",
  14572. { class: "parameter_bottom2" },
  14573. vue.toDisplayString(_ctx.$t("ReturnModeSelection")),
  14574. 1
  14575. /* TEXT */
  14576. )
  14577. ]),
  14578. vue.createElementVNode("view", {
  14579. class: "parameter_bottom11",
  14580. onClick: _cache[1] || (_cache[1] = (...args) => $options.onReturn && $options.onReturn(...args))
  14581. }, [
  14582. vue.createElementVNode("image", {
  14583. src: _imports_2$1,
  14584. mode: ""
  14585. }),
  14586. vue.createElementVNode(
  14587. "text",
  14588. { class: "parameter_bottom2" },
  14589. vue.toDisplayString(_ctx.$t("Return")),
  14590. 1
  14591. /* TEXT */
  14592. )
  14593. ])
  14594. ])
  14595. ])
  14596. ]);
  14597. }
  14598. const PagesSYSifoIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-b487f3c0"], ["__file", "D:/project/esswisdom_ipad_V2/pages/SYSifo/index.vue"]]);
  14599. __definePage("pages/index/index", PagesIndexIndex);
  14600. __definePage("pages/home/index", PagesHomeIndex);
  14601. __definePage("pages/details/index", PagesDetailsIndex);
  14602. __definePage("pages/electricity/index", PagesElectricityIndex);
  14603. __definePage("pages/supply/supply", PagesSupplySupply);
  14604. __definePage("pages/supplyss/supplyss", PagesSupplyssSupplyss);
  14605. __definePage("pages/faultlist/index", PagesFaultlistIndex);
  14606. __definePage("pages/SYSifo/index", PagesSYSifoIndex);
  14607. const _sfc_main = {
  14608. data() {
  14609. return {
  14610. // uidatas:''
  14611. };
  14612. },
  14613. computed: {},
  14614. onLaunch: function() {
  14615. plus.navigator.setFullscreen(true);
  14616. plus.navigator.hideSystemNavigation();
  14617. },
  14618. mounted() {
  14619. this.$store.dispatch("startClock");
  14620. this.$store.dispatch("fetchFaultsList");
  14621. },
  14622. beforeUnmount() {
  14623. },
  14624. methods: {},
  14625. onShow: function() {
  14626. formatAppLog("log", "at App.vue:37", "App Show");
  14627. },
  14628. onHide: function() {
  14629. formatAppLog("log", "at App.vue:40", "App Hide");
  14630. }
  14631. };
  14632. const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/project/esswisdom_ipad_V2/App.vue"]]);
  14633. const Store = createStore({
  14634. state: {
  14635. formattedTime: getTime("yyyy-MM-dd hh:mm:ss"),
  14636. uidatasdata: {},
  14637. selectorid: null,
  14638. selectorindex: null,
  14639. status: null,
  14640. num: 0,
  14641. event: "故障"
  14642. },
  14643. mutations: {
  14644. increment(state2, n2) {
  14645. if (n2 == 1) {
  14646. state2.num++;
  14647. } else {
  14648. state2.num = 0;
  14649. }
  14650. },
  14651. getevent(state2, event) {
  14652. state2.event = event;
  14653. },
  14654. setFormattedTime(state2, time) {
  14655. state2.formattedTime = time;
  14656. },
  14657. setUidatasData(state2, data) {
  14658. state2.uidatasdata = data;
  14659. },
  14660. setstatus(state2, status2) {
  14661. state2.status = status2;
  14662. },
  14663. setSelectorId(state2, id) {
  14664. state2.selectorid = id;
  14665. },
  14666. setSelectorIndex(state2, index) {
  14667. state2.selectorindex = index;
  14668. }
  14669. },
  14670. actions: {
  14671. startClock({
  14672. commit
  14673. }) {
  14674. setInterval(() => {
  14675. const customFormat = "yyyy-MM-dd hh:mm:ss";
  14676. const formattedTime = getTime(customFormat);
  14677. commit("setFormattedTime", formattedTime);
  14678. }, 1e3);
  14679. },
  14680. async fetchFaultsList({
  14681. commit,
  14682. state: state2
  14683. }) {
  14684. try {
  14685. let data = {
  14686. id: "3224a3eb-2375-4dfc-99ce-b182edd30996",
  14687. page: 1,
  14688. rows: 1e4
  14689. };
  14690. const response2 = await getuidatas(data);
  14691. if (response2.status == "ok") {
  14692. if (response2.data != null && response2.data != []) {
  14693. const uidatasdata = response2.data.reduce((obj, item) => {
  14694. let a2 = item.module;
  14695. let b2 = item[a2];
  14696. let numericValue = parseFloat(b2);
  14697. let roundedValue = "";
  14698. if (item.id == "BatCellVPeak_ValMaxCellVoltage" || item.id == "BatCellVPeak_ValMinCellVoltage" || item.id == "PCSTotalOutputPower") {
  14699. roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(3);
  14700. } else {
  14701. if (item.id == "CellTemperatureLimitsStatus_MaxTemp" || item.id == "CellTemperatureLimitsStatus_MinTemp" || item.id == "TMS_Status_TMS_WATEROUT_TEMP" || item.id == "TMS_Status_TMS_WATERIN_TEMP") {
  14702. roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(1);
  14703. } else {
  14704. if (item.id == "SOC" || item.id == "ChargingStation_1_telemetryFrameccu_EstimateTheRemainingChargingTime" || item.id == "ChargingStation_2_telemetryFrameccu_EstimateTheRemainingChargingTime") {
  14705. roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(0);
  14706. } else {
  14707. if (item.id == "PCSPortAPhaseVoltage" || item.id == "PCSPortBPhaseVoltage" || item.id == "PCSPortCPhaseVoltage" || item.id == "PCSOutputA-phaseCurrent" || item.id == "PCSOutputB-phaseCurrent" || item.id == "PCSOutputC-phaseCurrent") {
  14708. roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(2);
  14709. } else {
  14710. roundedValue = isNaN(numericValue) ? b2 : numericValue.toFixed(1);
  14711. }
  14712. }
  14713. }
  14714. }
  14715. if (!isNaN(numericValue) && numericValue < 0) {
  14716. roundedValue = Math.abs(numericValue);
  14717. }
  14718. return {
  14719. ...obj,
  14720. [item.id]: roundedValue
  14721. };
  14722. }, {});
  14723. commit("setUidatasData", uidatasdata);
  14724. if (uidatasdata.SysControl_RunCmd == 1 || uidatasdata.SysControl_Gun1RunCmd == 1 || uidatasdata.SysControl_Gun2RunCmd == 1) {
  14725. commit("setSelectorId", uidatasdata.SysInstall_EssRunModeManual);
  14726. commit("setSelectorIndex", 1);
  14727. } else {
  14728. commit("setSelectorId", null);
  14729. commit("setSelectorIndex", null);
  14730. }
  14731. if (state2.num >= 3) {
  14732. commit("increment", 0);
  14733. commit("setstatus", response2.status);
  14734. }
  14735. commit("increment", 1);
  14736. } else {
  14737. if (state2.num >= 3) {
  14738. commit("increment", 0);
  14739. commit("setstatus", "NO");
  14740. }
  14741. commit("increment", 1);
  14742. }
  14743. } else {
  14744. }
  14745. } catch (error) {
  14746. formatAppLog("log", "at store/index.js:151", error);
  14747. commit("setstatus", "NO");
  14748. } finally {
  14749. setTimeout(() => {
  14750. this.dispatch("fetchFaultsList");
  14751. }, 2e3);
  14752. }
  14753. }
  14754. }
  14755. });
  14756. const MainTitle$1 = "Nano Pod T";
  14757. const status$1 = "SYS Status:";
  14758. const version$1 = "version";
  14759. const CommunicationRecharge$2 = "AC IN";
  14760. const CommunicationRechargeInput$1 = "AC Input";
  14761. const CommunicationSupply$2 = "AC OUT";
  14762. const CommunicationSupplyOutput$1 = "AC Output";
  14763. const DirectRecharge$2 = "DC IN";
  14764. const DirectRechargeInput$1 = "DC Input";
  14765. const DirectSupply$2 = "DC OUT";
  14766. const DirectSupplyOutput$1 = "DC Output";
  14767. const SystemInformation$1 = "SYS Info";
  14768. const state$1 = "Breaker";
  14769. const state163A$1 = "Breaker1 63A";
  14770. const state63A2$1 = "Breaker2 63A";
  14771. const state125A$1 = "Breaker1 125A";
  14772. const state63A$1 = "Breaker2 63A";
  14773. const state16A$1 = "Breaker3 16A";
  14774. const online$1 = "ON Line";
  14775. const offline$1 = "Off Line";
  14776. const connect$1 = "ON";
  14777. const breakoff$1 = "OFF";
  14778. const workingCondition$1 = "Running Status";
  14779. const StandbyMode$1 = "Standby";
  14780. const work$1 = "Running";
  14781. const ChargingCompleted$1 = "Finished";
  14782. const ChargingPause$1 = "Pause";
  14783. const BatteryStatus$1 = "BAT Status";
  14784. const fault$1 = "Fault";
  14785. const ChuShiHua$1 = "Available";
  14786. const SystemStatus$1 = "SYS Status";
  14787. const NotupyetVoltage$1 = "Ready";
  14788. const HighVoltageMedium$1 = "Unknown";
  14789. const voltagehasbeen$1 = "Connected";
  14790. const Underhighpressure$1 = "Unknown";
  14791. const uncharged$1 = "Unavailable";
  14792. const Chargingprogress$1 = "Discharge";
  14793. const Chargingmalfunction$1 = "AC Charge";
  14794. const full$1 = "DC Charge";
  14795. const retain$1 = "Retain";
  14796. const GunAinformation$1 = "A Gun";
  14797. const GunBinformation$1 = "B Gun";
  14798. const exchangeinformation$1 = "AC Info";
  14799. const Batteryinformation$1 = "BAT Info";
  14800. const statisticalinformation$1 = "Running Info";
  14801. const coolinginformation$1 = "TMS Info";
  14802. const PhaseVoltage = "Phase";
  14803. const PhaseVoltageAV$1 = "Phase A";
  14804. const PhaseVoltageBV$1 = "Phase B";
  14805. const PhaseVoltageCV$1 = "Phase C";
  14806. const PhaseVoltageAA$1 = "Phase A";
  14807. const PhaseVoltageBA$1 = "Phase B";
  14808. const PhaseVoltageCA$1 = "Phase C";
  14809. const powerSupply$1 = "Power Input";
  14810. const DischargeCapacity$1 = "Power Output";
  14811. const PhaseCurrent$1 = "Phase";
  14812. const DischargePower$1 = "Power Output";
  14813. const Supplementarypower$1 = "Power Input";
  14814. const TotalPressure$1 = "BAT Voltage";
  14815. const AllowChargingPower$1 = "Max Power";
  14816. const MaximumVoltage$1 = "Max Cell";
  14817. const MaximumTemperature$1 = "Max Temp";
  14818. const BatteryCurrent$1 = "BAT Current";
  14819. const AllowChargingCurrent$1 = "Max Current";
  14820. const MinimumIndividualVoltage$1 = "Mini Cell";
  14821. const MinimumMonomerTemperature$1 = "Mini Temp";
  14822. const invalid$1 = "Unavailable";
  14823. const DischargeMode$1 = "Discharge";
  14824. const pcsChargingMode$1 = "AC Charge";
  14825. const EuropeanStandardChargingMode$1 = "DC Charge";
  14826. const WorkingMode$1 = "Running Mode";
  14827. const OffMode$1 = "Standby";
  14828. const CoolingMode$1 = "Cooling";
  14829. const HeatingMode$1 = "Heating";
  14830. const CirculatingMode$1 = "Self Loop";
  14831. const NO$1 = "NO";
  14832. const OutletTemperature$1 = "Outlets";
  14833. const HighVoltageRelayStatus$1 = "TMS Relay";
  14834. const DisconnectedState$1 = "OFF";
  14835. const ClosedState$1 = "ON";
  14836. const waterTemperature$1 = "Inlets";
  14837. const open$1 = "Start";
  14838. const stopIt$1 = "Stop";
  14839. const power$1 = "AC";
  14840. const given$1 = "IN";
  14841. const powergiven$1 = "Power";
  14842. const ACinputpowergiven$1 = "AC input Power";
  14843. const confirm$1 = "ok";
  14844. const ReturnModeSelection$1 = "Back to Home";
  14845. const Return$1 = "Return";
  14846. const CancelReturn$1 = "Back";
  14847. const ConfirmStart$1 = "ok";
  14848. const ConfirmStop$1 = "ok";
  14849. const popUpTitle$1 = "Tips";
  14850. const popUpTitleStop$1 = "Tips";
  14851. const popUpContent$1 = "Are you sure to START the iTrailer?";
  14852. const popUpContentStop$1 = "Are you sure to STOP the iTrailer?";
  14853. const ACRechargeelectricitytext$1 = "When AC power is replenished, all AC output terminals should be disconnected";
  14854. const ACpowerSupplytext$1 = "When AC power is supplied, all AC input terminals should be disconnected";
  14855. const OperationSuccessful$1 = "Operation successful";
  14856. const operationFailed$1 = "operation failed";
  14857. const ChargingPower$1 = "Input Power";
  14858. const ChargingVoltage$1 = "Charging Voltage";
  14859. const ChargingCurrent$1 = "Charging Current";
  14860. const VehicleSOC$1 = "EV SOC";
  14861. const ChargingCapacity$1 = "Charging Capacity";
  14862. const CharingPower$1 = "Charging Power";
  14863. const ChargingFee$1 = "Charging Fee";
  14864. const USD$1 = "USD";
  14865. const ChargingTime$1 = "Charging Time";
  14866. const AllowableDischargepower$1 = "Max Power";
  14867. const AllowDischargeCurrent$1 = "Max Current";
  14868. const ConnectionStatus$1 = "Link Status";
  14869. const formNO$1 = "NO";
  14870. const formFailure$1 = "Failure";
  14871. const formUnit$1 = "Unit";
  14872. const formDescription$1 = "Description";
  14873. const formRecover$1 = "Recover";
  14874. const FaultRec$1 = "Fault Rec";
  14875. const WarningRec$1 = "Warning Rec";
  14876. const RunningRec$1 = "Running Rec";
  14877. const SYSIfo$1 = "SYS Ifo";
  14878. const FaultClearing$1 = "Recover";
  14879. const LastPage$1 = "Last page";
  14880. const NextPage$1 = "Next page";
  14881. const RunningTimes$1 = "Running Times";
  14882. const InputCapacity$1 = "Input Capacity";
  14883. const AccumulateInput$1 = "Accumulate Input";
  14884. const RunningTimesdischarge$1 = "Running Times";
  14885. const InputCapacitydischarge$1 = "Output Capacity";
  14886. const AccumulateInputdischarge$1 = "Accumulate Output";
  14887. const RunningTimesmin$1 = "min";
  14888. const Tipswarning$1 = "Only one mode can be used at the same time";
  14889. const configuration$1 = "BAT Configuration";
  14890. const Batterycapacity$1 = "BAT Energy";
  14891. const Batterytype$1 = "BAT Type";
  14892. const Communicationpower$1 = "AC Power";
  14893. const DCpower$1 = "DC Power";
  14894. const configurationz$1 = "1P216S";
  14895. const Batterycapacityz$1 = "200kWh";
  14896. const Batterytypez$1 = "lithium ion LFP";
  14897. const Communicationpowerz$1 = "100kW";
  14898. const DCpowerz$1 = "180kW";
  14899. const Systemversion$1 = "SYS Ver.";
  14900. const MCSVer$1 = "MCS Ver.";
  14901. const CCUVer$1 = "CCU Ver.";
  14902. const SN$1 = "S/N";
  14903. const Systemversionz$1 = "V2.0";
  14904. const MCSVerz$1 = "V2.0";
  14905. const CCUVerz$1 = "V2.0";
  14906. const SN1$1 = "S/N";
  14907. const qx$1 = "../../static/qxen.png";
  14908. const qd$1 = "../../static/qden.png";
  14909. const en = {
  14910. MainTitle: MainTitle$1,
  14911. status: status$1,
  14912. version: version$1,
  14913. CommunicationRecharge: CommunicationRecharge$2,
  14914. CommunicationRechargeInput: CommunicationRechargeInput$1,
  14915. CommunicationSupply: CommunicationSupply$2,
  14916. CommunicationSupplyOutput: CommunicationSupplyOutput$1,
  14917. DirectRecharge: DirectRecharge$2,
  14918. DirectRechargeInput: DirectRechargeInput$1,
  14919. DirectSupply: DirectSupply$2,
  14920. DirectSupplyOutput: DirectSupplyOutput$1,
  14921. SystemInformation: SystemInformation$1,
  14922. state: state$1,
  14923. state163A: state163A$1,
  14924. state63A2: state63A2$1,
  14925. state125A: state125A$1,
  14926. state63A: state63A$1,
  14927. state16A: state16A$1,
  14928. online: online$1,
  14929. offline: offline$1,
  14930. connect: connect$1,
  14931. breakoff: breakoff$1,
  14932. workingCondition: workingCondition$1,
  14933. StandbyMode: StandbyMode$1,
  14934. work: work$1,
  14935. ChargingCompleted: ChargingCompleted$1,
  14936. ChargingPause: ChargingPause$1,
  14937. BatteryStatus: BatteryStatus$1,
  14938. fault: fault$1,
  14939. ChuShiHua: ChuShiHua$1,
  14940. SystemStatus: SystemStatus$1,
  14941. NotupyetVoltage: NotupyetVoltage$1,
  14942. HighVoltageMedium: HighVoltageMedium$1,
  14943. voltagehasbeen: voltagehasbeen$1,
  14944. Underhighpressure: Underhighpressure$1,
  14945. uncharged: uncharged$1,
  14946. Chargingprogress: Chargingprogress$1,
  14947. Chargingmalfunction: Chargingmalfunction$1,
  14948. full: full$1,
  14949. retain: retain$1,
  14950. GunAinformation: GunAinformation$1,
  14951. GunBinformation: GunBinformation$1,
  14952. exchangeinformation: exchangeinformation$1,
  14953. Batteryinformation: Batteryinformation$1,
  14954. statisticalinformation: statisticalinformation$1,
  14955. coolinginformation: coolinginformation$1,
  14956. PhaseVoltage,
  14957. PhaseVoltageAV: PhaseVoltageAV$1,
  14958. PhaseVoltageBV: PhaseVoltageBV$1,
  14959. PhaseVoltageCV: PhaseVoltageCV$1,
  14960. PhaseVoltageAA: PhaseVoltageAA$1,
  14961. PhaseVoltageBA: PhaseVoltageBA$1,
  14962. PhaseVoltageCA: PhaseVoltageCA$1,
  14963. powerSupply: powerSupply$1,
  14964. DischargeCapacity: DischargeCapacity$1,
  14965. PhaseCurrent: PhaseCurrent$1,
  14966. DischargePower: DischargePower$1,
  14967. Supplementarypower: Supplementarypower$1,
  14968. TotalPressure: TotalPressure$1,
  14969. AllowChargingPower: AllowChargingPower$1,
  14970. MaximumVoltage: MaximumVoltage$1,
  14971. MaximumTemperature: MaximumTemperature$1,
  14972. BatteryCurrent: BatteryCurrent$1,
  14973. AllowChargingCurrent: AllowChargingCurrent$1,
  14974. MinimumIndividualVoltage: MinimumIndividualVoltage$1,
  14975. MinimumMonomerTemperature: MinimumMonomerTemperature$1,
  14976. invalid: invalid$1,
  14977. DischargeMode: DischargeMode$1,
  14978. pcsChargingMode: pcsChargingMode$1,
  14979. EuropeanStandardChargingMode: EuropeanStandardChargingMode$1,
  14980. WorkingMode: WorkingMode$1,
  14981. OffMode: OffMode$1,
  14982. CoolingMode: CoolingMode$1,
  14983. HeatingMode: HeatingMode$1,
  14984. CirculatingMode: CirculatingMode$1,
  14985. NO: NO$1,
  14986. OutletTemperature: OutletTemperature$1,
  14987. HighVoltageRelayStatus: HighVoltageRelayStatus$1,
  14988. DisconnectedState: DisconnectedState$1,
  14989. ClosedState: ClosedState$1,
  14990. waterTemperature: waterTemperature$1,
  14991. open: open$1,
  14992. stopIt: stopIt$1,
  14993. power: power$1,
  14994. given: given$1,
  14995. powergiven: powergiven$1,
  14996. ACinputpowergiven: ACinputpowergiven$1,
  14997. confirm: confirm$1,
  14998. ReturnModeSelection: ReturnModeSelection$1,
  14999. Return: Return$1,
  15000. CancelReturn: CancelReturn$1,
  15001. ConfirmStart: ConfirmStart$1,
  15002. ConfirmStop: ConfirmStop$1,
  15003. popUpTitle: popUpTitle$1,
  15004. popUpTitleStop: popUpTitleStop$1,
  15005. popUpContent: popUpContent$1,
  15006. popUpContentStop: popUpContentStop$1,
  15007. ACRechargeelectricitytext: ACRechargeelectricitytext$1,
  15008. ACpowerSupplytext: ACpowerSupplytext$1,
  15009. OperationSuccessful: OperationSuccessful$1,
  15010. operationFailed: operationFailed$1,
  15011. ChargingPower: ChargingPower$1,
  15012. ChargingVoltage: ChargingVoltage$1,
  15013. ChargingCurrent: ChargingCurrent$1,
  15014. VehicleSOC: VehicleSOC$1,
  15015. ChargingCapacity: ChargingCapacity$1,
  15016. CharingPower: CharingPower$1,
  15017. ChargingFee: ChargingFee$1,
  15018. USD: USD$1,
  15019. ChargingTime: ChargingTime$1,
  15020. AllowableDischargepower: AllowableDischargepower$1,
  15021. AllowDischargeCurrent: AllowDischargeCurrent$1,
  15022. ConnectionStatus: ConnectionStatus$1,
  15023. formNO: formNO$1,
  15024. formFailure: formFailure$1,
  15025. formUnit: formUnit$1,
  15026. formDescription: formDescription$1,
  15027. formRecover: formRecover$1,
  15028. FaultRec: FaultRec$1,
  15029. WarningRec: WarningRec$1,
  15030. RunningRec: RunningRec$1,
  15031. SYSIfo: SYSIfo$1,
  15032. FaultClearing: FaultClearing$1,
  15033. LastPage: LastPage$1,
  15034. NextPage: NextPage$1,
  15035. RunningTimes: RunningTimes$1,
  15036. InputCapacity: InputCapacity$1,
  15037. AccumulateInput: AccumulateInput$1,
  15038. RunningTimesdischarge: RunningTimesdischarge$1,
  15039. InputCapacitydischarge: InputCapacitydischarge$1,
  15040. AccumulateInputdischarge: AccumulateInputdischarge$1,
  15041. RunningTimesmin: RunningTimesmin$1,
  15042. Tipswarning: Tipswarning$1,
  15043. configuration: configuration$1,
  15044. Batterycapacity: Batterycapacity$1,
  15045. Batterytype: Batterytype$1,
  15046. Communicationpower: Communicationpower$1,
  15047. DCpower: DCpower$1,
  15048. configurationz: configurationz$1,
  15049. Batterycapacityz: Batterycapacityz$1,
  15050. Batterytypez: Batterytypez$1,
  15051. Communicationpowerz: Communicationpowerz$1,
  15052. DCpowerz: DCpowerz$1,
  15053. Systemversion: Systemversion$1,
  15054. MCSVer: MCSVer$1,
  15055. CCUVer: CCUVer$1,
  15056. SN: SN$1,
  15057. Systemversionz: Systemversionz$1,
  15058. MCSVerz: MCSVerz$1,
  15059. CCUVerz: CCUVerz$1,
  15060. SN1: SN1$1,
  15061. qx: qx$1,
  15062. qd: qd$1
  15063. };
  15064. const MainTitle = "Nano Pod T";
  15065. const status = "连接状态:";
  15066. const version = "应用版本";
  15067. const CommunicationRecharge$1 = "交流补电";
  15068. const CommunicationRechargeInput = "交流补电";
  15069. const CommunicationSupply$1 = "交流供电";
  15070. const CommunicationSupplyOutput = "交流供电";
  15071. const DirectRecharge$1 = "直流补电";
  15072. const DirectRechargeInput = "直流补电";
  15073. const DirectSupply$1 = "直流供电";
  15074. const DirectSupplyOutput = "直流供电";
  15075. const SystemInformation = "系统信息";
  15076. const state = "状态";
  15077. const state163A = "63A1状态";
  15078. const state63A2 = "63A2状态";
  15079. const state125A = "125A状态";
  15080. const state63A = "63A状态";
  15081. const state16A = "16A状态";
  15082. const online = "在线";
  15083. const offline = "离线";
  15084. const connect = "连接";
  15085. const breakoff = "断开";
  15086. const workingCondition = "工作状态";
  15087. const StandbyMode = "待机";
  15088. const work = "工作";
  15089. const ChargingCompleted = "充电完成";
  15090. const ChargingPause = "充电暂停";
  15091. const BatteryStatus = "电池状态";
  15092. const fault = "故障";
  15093. const ChuShiHua = "出始化";
  15094. const SystemStatus = "系统状态";
  15095. const NotupyetVoltage = "未上高压";
  15096. const HighVoltageMedium = "上高压中";
  15097. const voltagehasbeen = "已上高压";
  15098. const Underhighpressure = "下高压中";
  15099. const ChargingStatus = "充电状态";
  15100. const uncharged = "无效";
  15101. const Chargingprogress = "未充电";
  15102. const Chargingmalfunction = "PCS充电";
  15103. const full = "欧标充电";
  15104. const retain = "保留";
  15105. const ChargingConnectionStatus = "充电连接状态";
  15106. const FastChargingConnection = "快充连接";
  15107. const NoConnection = "无连接";
  15108. const GunAinformation = "枪A信息";
  15109. const GunBinformation = "枪B信息";
  15110. const exchangeinformation = "交流信息";
  15111. const Batteryinformation = "电池信息";
  15112. const statisticalinformation = "统计信息";
  15113. const coolinginformation = "液冷信息";
  15114. const PhaseVoltageAV = "A相电压";
  15115. const PhaseVoltageBV = "B相电压";
  15116. const PhaseVoltageCV = "C相电压";
  15117. const PhaseVoltageAA = "A相电流";
  15118. const PhaseVoltageBA = "B相电流";
  15119. const PhaseVoltageCA = "C相电流";
  15120. const powerSupply = "补电电量";
  15121. const DischargeCapacity = "放电电量";
  15122. const PhaseCurrent = "相电流";
  15123. const DischargePower = "放电功率";
  15124. const Supplementarypower = "补电功率";
  15125. const TotalPressure = "电池内总压";
  15126. const AllowChargingPower = "最大允许充电功率";
  15127. const MaximumVoltage = "最大单体电压";
  15128. const MaximumTemperature = "最大单体温度";
  15129. const BatteryCurrent = "电池总电流";
  15130. const AllowChargingCurrent = "最大允许充电电流";
  15131. const MinimumIndividualVoltage = "最小单体电压";
  15132. const MinimumMonomerTemperature = "最小单体温度";
  15133. const WorkingModeBatterySystem = "电池系统工作模式";
  15134. const invalid = "无效";
  15135. const DischargeMode = "放电模式";
  15136. const pcsChargingMode = "pcs充电模式";
  15137. const EuropeanStandardChargingMode = "欧标充电模式";
  15138. const BatterySystemStatus = "电池系统状态";
  15139. const initialization = "初始化";
  15140. const AccumulatedChargingCapacityCommunication = "交流累计充电电量";
  15141. const WorkingMode = "工作模式";
  15142. const OffMode = "待机模式";
  15143. const CoolingMode = "制冷模式";
  15144. const HeatingMode = "自热模式";
  15145. const CirculatingMode = "自循环模式";
  15146. const NO = "NO";
  15147. const OutletTemperature = "出水温度";
  15148. const PowerDemand = "需求功率";
  15149. const HighVoltageRelayStatus = "高压继电器状态";
  15150. const DisconnectedState = "断开";
  15151. const ClosedState = "闭合";
  15152. const waterTemperature = "入水温度";
  15153. const BatteryFaultLevel = "电池故障等级";
  15154. const NoMalfunction = "无故障";
  15155. const LevelLault = "级故障";
  15156. const open = "开启";
  15157. const stopIt = "停止";
  15158. const power = "功率";
  15159. const given = "给定";
  15160. const powergiven = "功率给定";
  15161. const ACinputpowergiven = "功率给定";
  15162. const confirm = "确认";
  15163. const ReturnModeSelection = "返回模式选择";
  15164. const Return = "返回上页";
  15165. const CancelReturn = "取消返回";
  15166. const ConfirmStart = "确认启动";
  15167. const ConfirmStop = "确认停止";
  15168. const popUpTitle = "你确定要开启该设备吗?";
  15169. const popUpTitleStop = "你确定要停止该设备吗?";
  15170. const popUpContent = "启动设备前,请确认参照用户手册确定设备与各部件处于正确状态!";
  15171. const popUpContentStop = "设备完全停止后,方能进行后续操作,否则可能危及生命安全!";
  15172. const ACRechargeelectricitytext = "AC补电时AC输出端应全部断开";
  15173. const ACpowerSupplytext = "AC供电时AC输入端应全部断开";
  15174. const OperationSuccessful = "操作成功";
  15175. const operationFailed = "操作失败";
  15176. const ChargingPower = "充电功率";
  15177. const ChargingVoltage = "充电电压";
  15178. const ChargingCurrent = "充电电流";
  15179. const VehicleSOC = "车辆SOC";
  15180. const ChargingCapacity = "充电电量";
  15181. const CharingPower = "充电功率";
  15182. const ChargingFee = "充电费用";
  15183. const USD = "元";
  15184. const ChargingTime = "充电时间";
  15185. const AllowableDischargepower = "最大允许放电功率";
  15186. const AllowDischargeCurrent = "最大允许放电电流";
  15187. const ConnectionStatus = "连接状态";
  15188. const formNO = "序号";
  15189. const formUnit = "设备";
  15190. const formDescription = "内容";
  15191. const formFailure = "发生时间";
  15192. const formRecover = "恢复时间";
  15193. const FaultRec = "故障记录";
  15194. const WarningRec = "告警记录";
  15195. const RunningRec = "运行记录";
  15196. const SYSIfo = "系统信息";
  15197. const FaultClearing = "故障清除";
  15198. const LastPage = "上一页";
  15199. const NextPage = "下一页";
  15200. const RunningTimes = "本次补电时长";
  15201. const InputCapacity = "本次补电电量";
  15202. const AccumulateInput = "累计补电电量";
  15203. const RunningTimesdischarge = "本次放电时长";
  15204. const InputCapacitydischarge = "本次放电电量";
  15205. const AccumulateInputdischarge = "累计放电电量";
  15206. const RunningTimesmin = "分钟";
  15207. const Tipswarning = "若想重新选择模式,请返回之前模式停止以后再重新选择!";
  15208. const configuration = "电池配置";
  15209. const Batterycapacity = "电池容量";
  15210. const Batterytype = "电池类型";
  15211. const Communicationpower = "交流功率";
  15212. const DCpower = "直流功率";
  15213. const configurationz = "1P204S";
  15214. const Batterycapacityz = "200kWh";
  15215. const Batterytypez = "lithium ion LFP";
  15216. const Communicationpowerz = "100kW";
  15217. const DCpowerz = "180kW";
  15218. const Systemversion = "系统版本";
  15219. const MCSVer = "MCS Ver.";
  15220. const CCUVer = "CCU Ver.";
  15221. const SN = "S/N";
  15222. const Systemversionz = "V2.0";
  15223. const MCSVerz = "V2.0";
  15224. const CCUVerz = "V2.0";
  15225. const SN1 = "S/N";
  15226. const DeviceID = "20240310002";
  15227. const qx = "../../static/qx.png";
  15228. const qd = "../../static/qd.png";
  15229. const zhHans = {
  15230. MainTitle,
  15231. status,
  15232. version,
  15233. CommunicationRecharge: CommunicationRecharge$1,
  15234. CommunicationRechargeInput,
  15235. CommunicationSupply: CommunicationSupply$1,
  15236. CommunicationSupplyOutput,
  15237. DirectRecharge: DirectRecharge$1,
  15238. DirectRechargeInput,
  15239. DirectSupply: DirectSupply$1,
  15240. DirectSupplyOutput,
  15241. SystemInformation,
  15242. state,
  15243. state163A,
  15244. state63A2,
  15245. state125A,
  15246. state63A,
  15247. state16A,
  15248. online,
  15249. offline,
  15250. connect,
  15251. breakoff,
  15252. workingCondition,
  15253. StandbyMode,
  15254. work,
  15255. ChargingCompleted,
  15256. ChargingPause,
  15257. BatteryStatus,
  15258. fault,
  15259. ChuShiHua,
  15260. SystemStatus,
  15261. NotupyetVoltage,
  15262. HighVoltageMedium,
  15263. voltagehasbeen,
  15264. Underhighpressure,
  15265. ChargingStatus,
  15266. uncharged,
  15267. Chargingprogress,
  15268. Chargingmalfunction,
  15269. full,
  15270. retain,
  15271. ChargingConnectionStatus,
  15272. FastChargingConnection,
  15273. NoConnection,
  15274. GunAinformation,
  15275. GunBinformation,
  15276. exchangeinformation,
  15277. Batteryinformation,
  15278. statisticalinformation,
  15279. coolinginformation,
  15280. PhaseVoltageAV,
  15281. PhaseVoltageBV,
  15282. PhaseVoltageCV,
  15283. PhaseVoltageAA,
  15284. PhaseVoltageBA,
  15285. PhaseVoltageCA,
  15286. powerSupply,
  15287. DischargeCapacity,
  15288. PhaseCurrent,
  15289. DischargePower,
  15290. Supplementarypower,
  15291. TotalPressure,
  15292. AllowChargingPower,
  15293. MaximumVoltage,
  15294. MaximumTemperature,
  15295. BatteryCurrent,
  15296. AllowChargingCurrent,
  15297. MinimumIndividualVoltage,
  15298. MinimumMonomerTemperature,
  15299. WorkingModeBatterySystem,
  15300. invalid,
  15301. DischargeMode,
  15302. pcsChargingMode,
  15303. EuropeanStandardChargingMode,
  15304. BatterySystemStatus,
  15305. initialization,
  15306. AccumulatedChargingCapacityCommunication,
  15307. WorkingMode,
  15308. OffMode,
  15309. CoolingMode,
  15310. HeatingMode,
  15311. CirculatingMode,
  15312. NO,
  15313. OutletTemperature,
  15314. PowerDemand,
  15315. HighVoltageRelayStatus,
  15316. DisconnectedState,
  15317. ClosedState,
  15318. waterTemperature,
  15319. BatteryFaultLevel,
  15320. NoMalfunction,
  15321. LevelLault,
  15322. open,
  15323. stopIt,
  15324. power,
  15325. given,
  15326. powergiven,
  15327. ACinputpowergiven,
  15328. confirm,
  15329. ReturnModeSelection,
  15330. Return,
  15331. CancelReturn,
  15332. ConfirmStart,
  15333. ConfirmStop,
  15334. popUpTitle,
  15335. popUpTitleStop,
  15336. popUpContent,
  15337. popUpContentStop,
  15338. ACRechargeelectricitytext,
  15339. ACpowerSupplytext,
  15340. OperationSuccessful,
  15341. operationFailed,
  15342. ChargingPower,
  15343. ChargingVoltage,
  15344. ChargingCurrent,
  15345. VehicleSOC,
  15346. ChargingCapacity,
  15347. CharingPower,
  15348. ChargingFee,
  15349. USD,
  15350. ChargingTime,
  15351. AllowableDischargepower,
  15352. AllowDischargeCurrent,
  15353. ConnectionStatus,
  15354. formNO,
  15355. formUnit,
  15356. formDescription,
  15357. formFailure,
  15358. formRecover,
  15359. FaultRec,
  15360. WarningRec,
  15361. RunningRec,
  15362. SYSIfo,
  15363. FaultClearing,
  15364. LastPage,
  15365. NextPage,
  15366. RunningTimes,
  15367. InputCapacity,
  15368. AccumulateInput,
  15369. RunningTimesdischarge,
  15370. InputCapacitydischarge,
  15371. AccumulateInputdischarge,
  15372. RunningTimesmin,
  15373. Tipswarning,
  15374. configuration,
  15375. Batterycapacity,
  15376. Batterytype,
  15377. Communicationpower,
  15378. DCpower,
  15379. configurationz,
  15380. Batterycapacityz,
  15381. Batterytypez,
  15382. Communicationpowerz,
  15383. DCpowerz,
  15384. Systemversion,
  15385. MCSVer,
  15386. CCUVer,
  15387. SN,
  15388. Systemversionz,
  15389. MCSVerz,
  15390. CCUVerz,
  15391. SN1,
  15392. DeviceID,
  15393. qx,
  15394. qd
  15395. };
  15396. const CommunicationRecharge = "交流补电";
  15397. const CommunicationSupply = "交流供电";
  15398. const DirectRecharge = "交流补电";
  15399. const DirectSupply = "交流补电";
  15400. const zhHant = {
  15401. CommunicationRecharge,
  15402. CommunicationSupply,
  15403. DirectRecharge,
  15404. DirectSupply
  15405. };
  15406. /*!
  15407. * @intlify/shared v9.1.9
  15408. * (c) 2021 kazuya kawaguchi
  15409. * Released under the MIT License.
  15410. */
  15411. const inBrowser = typeof window !== "undefined";
  15412. let mark;
  15413. let measure;
  15414. {
  15415. const perf = inBrowser && window.performance;
  15416. if (perf && perf.mark && perf.measure && perf.clearMarks && perf.clearMeasures) {
  15417. mark = (tag) => perf.mark(tag);
  15418. measure = (name, startTag, endTag) => {
  15419. perf.measure(name, startTag, endTag);
  15420. perf.clearMarks(startTag);
  15421. perf.clearMarks(endTag);
  15422. };
  15423. }
  15424. }
  15425. const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
  15426. function format(message, ...args) {
  15427. if (args.length === 1 && isObject$1(args[0])) {
  15428. args = args[0];
  15429. }
  15430. if (!args || !args.hasOwnProperty) {
  15431. args = {};
  15432. }
  15433. return message.replace(RE_ARGS, (match, identifier) => {
  15434. return args.hasOwnProperty(identifier) ? args[identifier] : "";
  15435. });
  15436. }
  15437. const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
  15438. const makeSymbol = (name) => hasSymbol ? Symbol(name) : name;
  15439. const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
  15440. const friendlyJSONstringify = (json) => JSON.stringify(json).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027");
  15441. const isNumber = (val) => typeof val === "number" && isFinite(val);
  15442. const isDate = (val) => toTypeString(val) === "[object Date]";
  15443. const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
  15444. const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
  15445. function warn(msg, err) {
  15446. if (typeof console !== "undefined") {
  15447. console.warn(`[intlify] ` + msg);
  15448. if (err) {
  15449. console.warn(err.stack);
  15450. }
  15451. }
  15452. }
  15453. const assign = Object.assign;
  15454. let _globalThis;
  15455. const getGlobalThis = () => {
  15456. return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
  15457. };
  15458. function escapeHtml(rawText) {
  15459. return rawText.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
  15460. }
  15461. const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  15462. function hasOwn$1(obj, key) {
  15463. return hasOwnProperty$1.call(obj, key);
  15464. }
  15465. const isArray = Array.isArray;
  15466. const isFunction = (val) => typeof val === "function";
  15467. const isString = (val) => typeof val === "string";
  15468. const isBoolean = (val) => typeof val === "boolean";
  15469. const isObject$1 = (val) => (
  15470. // eslint-disable-line
  15471. val !== null && typeof val === "object"
  15472. );
  15473. const objectToString = Object.prototype.toString;
  15474. const toTypeString = (value) => objectToString.call(value);
  15475. const isPlainObject = (val) => toTypeString(val) === "[object Object]";
  15476. const toDisplayString = (val) => {
  15477. return val == null ? "" : isArray(val) || isPlainObject(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val);
  15478. };
  15479. const RANGE = 2;
  15480. function generateCodeFrame(source, start = 0, end = source.length) {
  15481. const lines = source.split(/\r?\n/);
  15482. let count = 0;
  15483. const res = [];
  15484. for (let i2 = 0; i2 < lines.length; i2++) {
  15485. count += lines[i2].length + 1;
  15486. if (count >= start) {
  15487. for (let j2 = i2 - RANGE; j2 <= i2 + RANGE || end > count; j2++) {
  15488. if (j2 < 0 || j2 >= lines.length)
  15489. continue;
  15490. const line = j2 + 1;
  15491. res.push(`${line}${" ".repeat(3 - String(line).length)}| ${lines[j2]}`);
  15492. const lineLength = lines[j2].length;
  15493. if (j2 === i2) {
  15494. const pad = start - (count - lineLength) + 1;
  15495. const length = Math.max(1, end > count ? lineLength - pad : end - start);
  15496. res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
  15497. } else if (j2 > i2) {
  15498. if (end > count) {
  15499. const length = Math.max(Math.min(end - count, lineLength), 1);
  15500. res.push(` | ` + "^".repeat(length));
  15501. }
  15502. count += lineLength + 1;
  15503. }
  15504. }
  15505. break;
  15506. }
  15507. }
  15508. return res.join("\n");
  15509. }
  15510. function createEmitter() {
  15511. const events = /* @__PURE__ */ new Map();
  15512. const emitter = {
  15513. events,
  15514. on(event, handler) {
  15515. const handlers = events.get(event);
  15516. const added = handlers && handlers.push(handler);
  15517. if (!added) {
  15518. events.set(event, [handler]);
  15519. }
  15520. },
  15521. off(event, handler) {
  15522. const handlers = events.get(event);
  15523. if (handlers) {
  15524. handlers.splice(handlers.indexOf(handler) >>> 0, 1);
  15525. }
  15526. },
  15527. emit(event, payload) {
  15528. (events.get(event) || []).slice().map((handler) => handler(payload));
  15529. (events.get("*") || []).slice().map((handler) => handler(event, payload));
  15530. }
  15531. };
  15532. return emitter;
  15533. }
  15534. /*!
  15535. * @intlify/message-resolver v9.1.9
  15536. * (c) 2021 kazuya kawaguchi
  15537. * Released under the MIT License.
  15538. */
  15539. const hasOwnProperty = Object.prototype.hasOwnProperty;
  15540. function hasOwn(obj, key) {
  15541. return hasOwnProperty.call(obj, key);
  15542. }
  15543. const isObject = (val) => (
  15544. // eslint-disable-line
  15545. val !== null && typeof val === "object"
  15546. );
  15547. const pathStateMachine = [];
  15548. pathStateMachine[
  15549. 0
  15550. /* BEFORE_PATH */
  15551. ] = {
  15552. [
  15553. "w"
  15554. /* WORKSPACE */
  15555. ]: [
  15556. 0
  15557. /* BEFORE_PATH */
  15558. ],
  15559. [
  15560. "i"
  15561. /* IDENT */
  15562. ]: [
  15563. 3,
  15564. 0
  15565. /* APPEND */
  15566. ],
  15567. [
  15568. "["
  15569. /* LEFT_BRACKET */
  15570. ]: [
  15571. 4
  15572. /* IN_SUB_PATH */
  15573. ],
  15574. [
  15575. "o"
  15576. /* END_OF_FAIL */
  15577. ]: [
  15578. 7
  15579. /* AFTER_PATH */
  15580. ]
  15581. };
  15582. pathStateMachine[
  15583. 1
  15584. /* IN_PATH */
  15585. ] = {
  15586. [
  15587. "w"
  15588. /* WORKSPACE */
  15589. ]: [
  15590. 1
  15591. /* IN_PATH */
  15592. ],
  15593. [
  15594. "."
  15595. /* DOT */
  15596. ]: [
  15597. 2
  15598. /* BEFORE_IDENT */
  15599. ],
  15600. [
  15601. "["
  15602. /* LEFT_BRACKET */
  15603. ]: [
  15604. 4
  15605. /* IN_SUB_PATH */
  15606. ],
  15607. [
  15608. "o"
  15609. /* END_OF_FAIL */
  15610. ]: [
  15611. 7
  15612. /* AFTER_PATH */
  15613. ]
  15614. };
  15615. pathStateMachine[
  15616. 2
  15617. /* BEFORE_IDENT */
  15618. ] = {
  15619. [
  15620. "w"
  15621. /* WORKSPACE */
  15622. ]: [
  15623. 2
  15624. /* BEFORE_IDENT */
  15625. ],
  15626. [
  15627. "i"
  15628. /* IDENT */
  15629. ]: [
  15630. 3,
  15631. 0
  15632. /* APPEND */
  15633. ],
  15634. [
  15635. "0"
  15636. /* ZERO */
  15637. ]: [
  15638. 3,
  15639. 0
  15640. /* APPEND */
  15641. ]
  15642. };
  15643. pathStateMachine[
  15644. 3
  15645. /* IN_IDENT */
  15646. ] = {
  15647. [
  15648. "i"
  15649. /* IDENT */
  15650. ]: [
  15651. 3,
  15652. 0
  15653. /* APPEND */
  15654. ],
  15655. [
  15656. "0"
  15657. /* ZERO */
  15658. ]: [
  15659. 3,
  15660. 0
  15661. /* APPEND */
  15662. ],
  15663. [
  15664. "w"
  15665. /* WORKSPACE */
  15666. ]: [
  15667. 1,
  15668. 1
  15669. /* PUSH */
  15670. ],
  15671. [
  15672. "."
  15673. /* DOT */
  15674. ]: [
  15675. 2,
  15676. 1
  15677. /* PUSH */
  15678. ],
  15679. [
  15680. "["
  15681. /* LEFT_BRACKET */
  15682. ]: [
  15683. 4,
  15684. 1
  15685. /* PUSH */
  15686. ],
  15687. [
  15688. "o"
  15689. /* END_OF_FAIL */
  15690. ]: [
  15691. 7,
  15692. 1
  15693. /* PUSH */
  15694. ]
  15695. };
  15696. pathStateMachine[
  15697. 4
  15698. /* IN_SUB_PATH */
  15699. ] = {
  15700. [
  15701. "'"
  15702. /* SINGLE_QUOTE */
  15703. ]: [
  15704. 5,
  15705. 0
  15706. /* APPEND */
  15707. ],
  15708. [
  15709. '"'
  15710. /* DOUBLE_QUOTE */
  15711. ]: [
  15712. 6,
  15713. 0
  15714. /* APPEND */
  15715. ],
  15716. [
  15717. "["
  15718. /* LEFT_BRACKET */
  15719. ]: [
  15720. 4,
  15721. 2
  15722. /* INC_SUB_PATH_DEPTH */
  15723. ],
  15724. [
  15725. "]"
  15726. /* RIGHT_BRACKET */
  15727. ]: [
  15728. 1,
  15729. 3
  15730. /* PUSH_SUB_PATH */
  15731. ],
  15732. [
  15733. "o"
  15734. /* END_OF_FAIL */
  15735. ]: 8,
  15736. [
  15737. "l"
  15738. /* ELSE */
  15739. ]: [
  15740. 4,
  15741. 0
  15742. /* APPEND */
  15743. ]
  15744. };
  15745. pathStateMachine[
  15746. 5
  15747. /* IN_SINGLE_QUOTE */
  15748. ] = {
  15749. [
  15750. "'"
  15751. /* SINGLE_QUOTE */
  15752. ]: [
  15753. 4,
  15754. 0
  15755. /* APPEND */
  15756. ],
  15757. [
  15758. "o"
  15759. /* END_OF_FAIL */
  15760. ]: 8,
  15761. [
  15762. "l"
  15763. /* ELSE */
  15764. ]: [
  15765. 5,
  15766. 0
  15767. /* APPEND */
  15768. ]
  15769. };
  15770. pathStateMachine[
  15771. 6
  15772. /* IN_DOUBLE_QUOTE */
  15773. ] = {
  15774. [
  15775. '"'
  15776. /* DOUBLE_QUOTE */
  15777. ]: [
  15778. 4,
  15779. 0
  15780. /* APPEND */
  15781. ],
  15782. [
  15783. "o"
  15784. /* END_OF_FAIL */
  15785. ]: 8,
  15786. [
  15787. "l"
  15788. /* ELSE */
  15789. ]: [
  15790. 6,
  15791. 0
  15792. /* APPEND */
  15793. ]
  15794. };
  15795. const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
  15796. function isLiteral(exp) {
  15797. return literalValueRE.test(exp);
  15798. }
  15799. function stripQuotes(str) {
  15800. const a2 = str.charCodeAt(0);
  15801. const b2 = str.charCodeAt(str.length - 1);
  15802. return a2 === b2 && (a2 === 34 || a2 === 39) ? str.slice(1, -1) : str;
  15803. }
  15804. function getPathCharType(ch) {
  15805. if (ch === void 0 || ch === null) {
  15806. return "o";
  15807. }
  15808. const code = ch.charCodeAt(0);
  15809. switch (code) {
  15810. case 91:
  15811. case 93:
  15812. case 46:
  15813. case 34:
  15814. case 39:
  15815. return ch;
  15816. case 95:
  15817. case 36:
  15818. case 45:
  15819. return "i";
  15820. case 9:
  15821. case 10:
  15822. case 13:
  15823. case 160:
  15824. case 65279:
  15825. case 8232:
  15826. case 8233:
  15827. return "w";
  15828. }
  15829. return "i";
  15830. }
  15831. function formatSubPath(path) {
  15832. const trimmed = path.trim();
  15833. if (path.charAt(0) === "0" && isNaN(parseInt(path))) {
  15834. return false;
  15835. }
  15836. return isLiteral(trimmed) ? stripQuotes(trimmed) : "*" + trimmed;
  15837. }
  15838. function parse(path) {
  15839. const keys = [];
  15840. let index = -1;
  15841. let mode = 0;
  15842. let subPathDepth = 0;
  15843. let c2;
  15844. let key;
  15845. let newChar;
  15846. let type;
  15847. let transition;
  15848. let action;
  15849. let typeMap;
  15850. const actions = [];
  15851. actions[
  15852. 0
  15853. /* APPEND */
  15854. ] = () => {
  15855. if (key === void 0) {
  15856. key = newChar;
  15857. } else {
  15858. key += newChar;
  15859. }
  15860. };
  15861. actions[
  15862. 1
  15863. /* PUSH */
  15864. ] = () => {
  15865. if (key !== void 0) {
  15866. keys.push(key);
  15867. key = void 0;
  15868. }
  15869. };
  15870. actions[
  15871. 2
  15872. /* INC_SUB_PATH_DEPTH */
  15873. ] = () => {
  15874. actions[
  15875. 0
  15876. /* APPEND */
  15877. ]();
  15878. subPathDepth++;
  15879. };
  15880. actions[
  15881. 3
  15882. /* PUSH_SUB_PATH */
  15883. ] = () => {
  15884. if (subPathDepth > 0) {
  15885. subPathDepth--;
  15886. mode = 4;
  15887. actions[
  15888. 0
  15889. /* APPEND */
  15890. ]();
  15891. } else {
  15892. subPathDepth = 0;
  15893. if (key === void 0) {
  15894. return false;
  15895. }
  15896. key = formatSubPath(key);
  15897. if (key === false) {
  15898. return false;
  15899. } else {
  15900. actions[
  15901. 1
  15902. /* PUSH */
  15903. ]();
  15904. }
  15905. }
  15906. };
  15907. function maybeUnescapeQuote() {
  15908. const nextChar = path[index + 1];
  15909. if (mode === 5 && nextChar === "'" || mode === 6 && nextChar === '"') {
  15910. index++;
  15911. newChar = "\\" + nextChar;
  15912. actions[
  15913. 0
  15914. /* APPEND */
  15915. ]();
  15916. return true;
  15917. }
  15918. }
  15919. while (mode !== null) {
  15920. index++;
  15921. c2 = path[index];
  15922. if (c2 === "\\" && maybeUnescapeQuote()) {
  15923. continue;
  15924. }
  15925. type = getPathCharType(c2);
  15926. typeMap = pathStateMachine[mode];
  15927. transition = typeMap[type] || typeMap[
  15928. "l"
  15929. /* ELSE */
  15930. ] || 8;
  15931. if (transition === 8) {
  15932. return;
  15933. }
  15934. mode = transition[0];
  15935. if (transition[1] !== void 0) {
  15936. action = actions[transition[1]];
  15937. if (action) {
  15938. newChar = c2;
  15939. if (action() === false) {
  15940. return;
  15941. }
  15942. }
  15943. }
  15944. if (mode === 7) {
  15945. return keys;
  15946. }
  15947. }
  15948. }
  15949. const cache = /* @__PURE__ */ new Map();
  15950. function resolveValue(obj, path) {
  15951. if (!isObject(obj)) {
  15952. return null;
  15953. }
  15954. let hit = cache.get(path);
  15955. if (!hit) {
  15956. hit = parse(path);
  15957. if (hit) {
  15958. cache.set(path, hit);
  15959. }
  15960. }
  15961. if (!hit) {
  15962. return null;
  15963. }
  15964. const len = hit.length;
  15965. let last = obj;
  15966. let i2 = 0;
  15967. while (i2 < len) {
  15968. const val = last[hit[i2]];
  15969. if (val === void 0) {
  15970. return null;
  15971. }
  15972. last = val;
  15973. i2++;
  15974. }
  15975. return last;
  15976. }
  15977. function handleFlatJson(obj) {
  15978. if (!isObject(obj)) {
  15979. return obj;
  15980. }
  15981. for (const key in obj) {
  15982. if (!hasOwn(obj, key)) {
  15983. continue;
  15984. }
  15985. if (!key.includes(
  15986. "."
  15987. /* DOT */
  15988. )) {
  15989. if (isObject(obj[key])) {
  15990. handleFlatJson(obj[key]);
  15991. }
  15992. } else {
  15993. const subKeys = key.split(
  15994. "."
  15995. /* DOT */
  15996. );
  15997. const lastIndex = subKeys.length - 1;
  15998. let currentObj = obj;
  15999. for (let i2 = 0; i2 < lastIndex; i2++) {
  16000. if (!(subKeys[i2] in currentObj)) {
  16001. currentObj[subKeys[i2]] = {};
  16002. }
  16003. currentObj = currentObj[subKeys[i2]];
  16004. }
  16005. currentObj[subKeys[lastIndex]] = obj[key];
  16006. delete obj[key];
  16007. if (isObject(currentObj[subKeys[lastIndex]])) {
  16008. handleFlatJson(currentObj[subKeys[lastIndex]]);
  16009. }
  16010. }
  16011. }
  16012. return obj;
  16013. }
  16014. /*!
  16015. * @intlify/runtime v9.1.9
  16016. * (c) 2021 kazuya kawaguchi
  16017. * Released under the MIT License.
  16018. */
  16019. const DEFAULT_MODIFIER = (str) => str;
  16020. const DEFAULT_MESSAGE = (ctx) => "";
  16021. const DEFAULT_MESSAGE_DATA_TYPE = "text";
  16022. const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : values.join("");
  16023. const DEFAULT_INTERPOLATE = toDisplayString;
  16024. function pluralDefault(choice, choicesLength) {
  16025. choice = Math.abs(choice);
  16026. if (choicesLength === 2) {
  16027. return choice ? choice > 1 ? 1 : 0 : 1;
  16028. }
  16029. return choice ? Math.min(choice, 2) : 0;
  16030. }
  16031. function getPluralIndex(options) {
  16032. const index = isNumber(options.pluralIndex) ? options.pluralIndex : -1;
  16033. 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;
  16034. }
  16035. function normalizeNamed(pluralIndex, props) {
  16036. if (!props.count) {
  16037. props.count = pluralIndex;
  16038. }
  16039. if (!props.n) {
  16040. props.n = pluralIndex;
  16041. }
  16042. }
  16043. function createMessageContext(options = {}) {
  16044. const locale = options.locale;
  16045. const pluralIndex = getPluralIndex(options);
  16046. const pluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? options.pluralRules[locale] : pluralDefault;
  16047. const orgPluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? pluralDefault : void 0;
  16048. const plural = (messages2) => messages2[pluralRule(pluralIndex, messages2.length, orgPluralRule)];
  16049. const _list = options.list || [];
  16050. const list = (index) => _list[index];
  16051. const _named = options.named || {};
  16052. isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
  16053. const named = (key) => _named[key];
  16054. function message(key) {
  16055. const msg = isFunction(options.messages) ? options.messages(key) : isObject$1(options.messages) ? options.messages[key] : false;
  16056. return !msg ? options.parent ? options.parent.message(key) : DEFAULT_MESSAGE : msg;
  16057. }
  16058. const _modifier = (name) => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER;
  16059. const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE;
  16060. const interpolate = isPlainObject(options.processor) && isFunction(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE;
  16061. const type = isPlainObject(options.processor) && isString(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE;
  16062. const ctx = {
  16063. [
  16064. "list"
  16065. /* LIST */
  16066. ]: list,
  16067. [
  16068. "named"
  16069. /* NAMED */
  16070. ]: named,
  16071. [
  16072. "plural"
  16073. /* PLURAL */
  16074. ]: plural,
  16075. [
  16076. "linked"
  16077. /* LINKED */
  16078. ]: (key, modifier) => {
  16079. const msg = message(key)(ctx);
  16080. return isString(modifier) ? _modifier(modifier)(msg) : msg;
  16081. },
  16082. [
  16083. "message"
  16084. /* MESSAGE */
  16085. ]: message,
  16086. [
  16087. "type"
  16088. /* TYPE */
  16089. ]: type,
  16090. [
  16091. "interpolate"
  16092. /* INTERPOLATE */
  16093. ]: interpolate,
  16094. [
  16095. "normalize"
  16096. /* NORMALIZE */
  16097. ]: normalize
  16098. };
  16099. return ctx;
  16100. }
  16101. /*!
  16102. * @intlify/message-compiler v9.1.9
  16103. * (c) 2021 kazuya kawaguchi
  16104. * Released under the MIT License.
  16105. */
  16106. const errorMessages$2 = {
  16107. // tokenizer error messages
  16108. [
  16109. 0
  16110. /* EXPECTED_TOKEN */
  16111. ]: `Expected token: '{0}'`,
  16112. [
  16113. 1
  16114. /* INVALID_TOKEN_IN_PLACEHOLDER */
  16115. ]: `Invalid token in placeholder: '{0}'`,
  16116. [
  16117. 2
  16118. /* UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER */
  16119. ]: `Unterminated single quote in placeholder`,
  16120. [
  16121. 3
  16122. /* UNKNOWN_ESCAPE_SEQUENCE */
  16123. ]: `Unknown escape sequence: \\{0}`,
  16124. [
  16125. 4
  16126. /* INVALID_UNICODE_ESCAPE_SEQUENCE */
  16127. ]: `Invalid unicode escape sequence: {0}`,
  16128. [
  16129. 5
  16130. /* UNBALANCED_CLOSING_BRACE */
  16131. ]: `Unbalanced closing brace`,
  16132. [
  16133. 6
  16134. /* UNTERMINATED_CLOSING_BRACE */
  16135. ]: `Unterminated closing brace`,
  16136. [
  16137. 7
  16138. /* EMPTY_PLACEHOLDER */
  16139. ]: `Empty placeholder`,
  16140. [
  16141. 8
  16142. /* NOT_ALLOW_NEST_PLACEHOLDER */
  16143. ]: `Not allowed nest placeholder`,
  16144. [
  16145. 9
  16146. /* INVALID_LINKED_FORMAT */
  16147. ]: `Invalid linked format`,
  16148. // parser error messages
  16149. [
  16150. 10
  16151. /* MUST_HAVE_MESSAGES_IN_PLURAL */
  16152. ]: `Plural must have messages`,
  16153. [
  16154. 11
  16155. /* UNEXPECTED_EMPTY_LINKED_MODIFIER */
  16156. ]: `Unexpected empty linked modifier`,
  16157. [
  16158. 12
  16159. /* UNEXPECTED_EMPTY_LINKED_KEY */
  16160. ]: `Unexpected empty linked key`,
  16161. [
  16162. 13
  16163. /* UNEXPECTED_LEXICAL_ANALYSIS */
  16164. ]: `Unexpected lexical analysis in token: '{0}'`
  16165. };
  16166. function createCompileError(code, loc, options = {}) {
  16167. const { domain, messages: messages2, args } = options;
  16168. const msg = format((messages2 || errorMessages$2)[code] || "", ...args || []);
  16169. const error = new SyntaxError(String(msg));
  16170. error.code = code;
  16171. if (loc) {
  16172. error.location = loc;
  16173. }
  16174. error.domain = domain;
  16175. return error;
  16176. }
  16177. /*!
  16178. * @intlify/devtools-if v9.1.9
  16179. * (c) 2021 kazuya kawaguchi
  16180. * Released under the MIT License.
  16181. */
  16182. const IntlifyDevToolsHooks = {
  16183. I18nInit: "i18n:init",
  16184. FunctionTranslate: "function:translate"
  16185. };
  16186. /*!
  16187. * @intlify/core-base v9.1.9
  16188. * (c) 2021 kazuya kawaguchi
  16189. * Released under the MIT License.
  16190. */
  16191. let devtools = null;
  16192. function setDevToolsHook(hook) {
  16193. devtools = hook;
  16194. }
  16195. function initI18nDevTools(i18n2, version2, meta) {
  16196. devtools && devtools.emit(IntlifyDevToolsHooks.I18nInit, {
  16197. timestamp: Date.now(),
  16198. i18n: i18n2,
  16199. version: version2,
  16200. meta
  16201. });
  16202. }
  16203. const translateDevTools = /* @__PURE__ */ createDevToolsHook(IntlifyDevToolsHooks.FunctionTranslate);
  16204. function createDevToolsHook(hook) {
  16205. return (payloads) => devtools && devtools.emit(hook, payloads);
  16206. }
  16207. const warnMessages$1 = {
  16208. [
  16209. 0
  16210. /* NOT_FOUND_KEY */
  16211. ]: `Not found '{key}' key in '{locale}' locale messages.`,
  16212. [
  16213. 1
  16214. /* FALLBACK_TO_TRANSLATE */
  16215. ]: `Fall back to translate '{key}' key with '{target}' locale.`,
  16216. [
  16217. 2
  16218. /* CANNOT_FORMAT_NUMBER */
  16219. ]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
  16220. [
  16221. 3
  16222. /* FALLBACK_TO_NUMBER_FORMAT */
  16223. ]: `Fall back to number format '{key}' key with '{target}' locale.`,
  16224. [
  16225. 4
  16226. /* CANNOT_FORMAT_DATE */
  16227. ]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
  16228. [
  16229. 5
  16230. /* FALLBACK_TO_DATE_FORMAT */
  16231. ]: `Fall back to datetime format '{key}' key with '{target}' locale.`
  16232. };
  16233. function getWarnMessage$1(code, ...args) {
  16234. return format(warnMessages$1[code], ...args);
  16235. }
  16236. const VERSION$1 = "9.1.9";
  16237. const NOT_REOSLVED = -1;
  16238. const MISSING_RESOLVE_VALUE = "";
  16239. function getDefaultLinkedModifiers() {
  16240. return {
  16241. upper: (val) => isString(val) ? val.toUpperCase() : val,
  16242. lower: (val) => isString(val) ? val.toLowerCase() : val,
  16243. // prettier-ignore
  16244. capitalize: (val) => isString(val) ? `${val.charAt(0).toLocaleUpperCase()}${val.substr(1)}` : val
  16245. };
  16246. }
  16247. let _compiler;
  16248. let _additionalMeta = null;
  16249. const setAdditionalMeta = (meta) => {
  16250. _additionalMeta = meta;
  16251. };
  16252. const getAdditionalMeta = () => _additionalMeta;
  16253. let _cid = 0;
  16254. function createCoreContext(options = {}) {
  16255. const version2 = isString(options.version) ? options.version : VERSION$1;
  16256. const locale = isString(options.locale) ? options.locale : "en-US";
  16257. const fallbackLocale = isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || isString(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale;
  16258. const messages2 = isPlainObject(options.messages) ? options.messages : { [locale]: {} };
  16259. const datetimeFormats = isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [locale]: {} };
  16260. const numberFormats = isPlainObject(options.numberFormats) ? options.numberFormats : { [locale]: {} };
  16261. const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
  16262. const pluralRules = options.pluralRules || {};
  16263. const missing = isFunction(options.missing) ? options.missing : null;
  16264. const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true;
  16265. const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
  16266. const fallbackFormat = !!options.fallbackFormat;
  16267. const unresolving = !!options.unresolving;
  16268. const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null;
  16269. const processor = isPlainObject(options.processor) ? options.processor : null;
  16270. const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
  16271. const escapeParameter = !!options.escapeParameter;
  16272. const messageCompiler = isFunction(options.messageCompiler) ? options.messageCompiler : _compiler;
  16273. const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;
  16274. const internalOptions = options;
  16275. const __datetimeFormatters = isObject$1(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map();
  16276. const __numberFormatters = isObject$1(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map();
  16277. const __meta = isObject$1(internalOptions.__meta) ? internalOptions.__meta : {};
  16278. _cid++;
  16279. const context = {
  16280. version: version2,
  16281. cid: _cid,
  16282. locale,
  16283. fallbackLocale,
  16284. messages: messages2,
  16285. datetimeFormats,
  16286. numberFormats,
  16287. modifiers,
  16288. pluralRules,
  16289. missing,
  16290. missingWarn,
  16291. fallbackWarn,
  16292. fallbackFormat,
  16293. unresolving,
  16294. postTranslation,
  16295. processor,
  16296. warnHtmlMessage,
  16297. escapeParameter,
  16298. messageCompiler,
  16299. onWarn,
  16300. __datetimeFormatters,
  16301. __numberFormatters,
  16302. __meta
  16303. };
  16304. {
  16305. context.__v_emitter = internalOptions.__v_emitter != null ? internalOptions.__v_emitter : void 0;
  16306. }
  16307. {
  16308. initI18nDevTools(context, version2, __meta);
  16309. }
  16310. return context;
  16311. }
  16312. function isTranslateFallbackWarn(fallback, key) {
  16313. return fallback instanceof RegExp ? fallback.test(key) : fallback;
  16314. }
  16315. function isTranslateMissingWarn(missing, key) {
  16316. return missing instanceof RegExp ? missing.test(key) : missing;
  16317. }
  16318. function handleMissing(context, key, locale, missingWarn, type) {
  16319. const { missing, onWarn } = context;
  16320. {
  16321. const emitter = context.__v_emitter;
  16322. if (emitter) {
  16323. emitter.emit("missing", {
  16324. locale,
  16325. key,
  16326. type,
  16327. groupId: `${type}:${key}`
  16328. });
  16329. }
  16330. }
  16331. if (missing !== null) {
  16332. const ret = missing(context, locale, key, type);
  16333. return isString(ret) ? ret : key;
  16334. } else {
  16335. if (isTranslateMissingWarn(missingWarn, key)) {
  16336. onWarn(getWarnMessage$1(0, { key, locale }));
  16337. }
  16338. return key;
  16339. }
  16340. }
  16341. function getLocaleChain(ctx, fallback, start) {
  16342. const context = ctx;
  16343. if (!context.__localeChainCache) {
  16344. context.__localeChainCache = /* @__PURE__ */ new Map();
  16345. }
  16346. let chain = context.__localeChainCache.get(start);
  16347. if (!chain) {
  16348. chain = [];
  16349. let block = [start];
  16350. while (isArray(block)) {
  16351. block = appendBlockToChain(chain, block, fallback);
  16352. }
  16353. const defaults = isArray(fallback) ? fallback : isPlainObject(fallback) ? fallback["default"] ? fallback["default"] : null : fallback;
  16354. block = isString(defaults) ? [defaults] : defaults;
  16355. if (isArray(block)) {
  16356. appendBlockToChain(chain, block, false);
  16357. }
  16358. context.__localeChainCache.set(start, chain);
  16359. }
  16360. return chain;
  16361. }
  16362. function appendBlockToChain(chain, block, blocks) {
  16363. let follow = true;
  16364. for (let i2 = 0; i2 < block.length && isBoolean(follow); i2++) {
  16365. const locale = block[i2];
  16366. if (isString(locale)) {
  16367. follow = appendLocaleToChain(chain, block[i2], blocks);
  16368. }
  16369. }
  16370. return follow;
  16371. }
  16372. function appendLocaleToChain(chain, locale, blocks) {
  16373. let follow;
  16374. const tokens = locale.split("-");
  16375. do {
  16376. const target = tokens.join("-");
  16377. follow = appendItemToChain(chain, target, blocks);
  16378. tokens.splice(-1, 1);
  16379. } while (tokens.length && follow === true);
  16380. return follow;
  16381. }
  16382. function appendItemToChain(chain, target, blocks) {
  16383. let follow = false;
  16384. if (!chain.includes(target)) {
  16385. follow = true;
  16386. if (target) {
  16387. follow = target[target.length - 1] !== "!";
  16388. const locale = target.replace(/!/g, "");
  16389. chain.push(locale);
  16390. if ((isArray(blocks) || isPlainObject(blocks)) && blocks[locale]) {
  16391. follow = blocks[locale];
  16392. }
  16393. }
  16394. }
  16395. return follow;
  16396. }
  16397. function updateFallbackLocale(ctx, locale, fallback) {
  16398. const context = ctx;
  16399. context.__localeChainCache = /* @__PURE__ */ new Map();
  16400. getLocaleChain(ctx, fallback, locale);
  16401. }
  16402. function createCoreError(code) {
  16403. return createCompileError(code, null, { messages: errorMessages$1 });
  16404. }
  16405. const errorMessages$1 = {
  16406. [
  16407. 14
  16408. /* INVALID_ARGUMENT */
  16409. ]: "Invalid arguments",
  16410. [
  16411. 15
  16412. /* INVALID_DATE_ARGUMENT */
  16413. ]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
  16414. [
  16415. 16
  16416. /* INVALID_ISO_DATE_ARGUMENT */
  16417. ]: "The argument provided is not a valid ISO date string"
  16418. };
  16419. const NOOP_MESSAGE_FUNCTION = () => "";
  16420. const isMessageFunction = (val) => isFunction(val);
  16421. function translate(context, ...args) {
  16422. const { fallbackFormat, postTranslation, unresolving, fallbackLocale, messages: messages2 } = context;
  16423. const [key, options] = parseTranslateArgs(...args);
  16424. const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
  16425. const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
  16426. const escapeParameter = isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter;
  16427. const resolvedMessage = !!options.resolvedMessage;
  16428. const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) ? !isBoolean(options.default) ? options.default : key : fallbackFormat ? key : "";
  16429. const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== "";
  16430. const locale = isString(options.locale) ? options.locale : context.locale;
  16431. escapeParameter && escapeParams(options);
  16432. let [format2, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) : [
  16433. key,
  16434. locale,
  16435. messages2[locale] || {}
  16436. ];
  16437. let cacheBaseKey = key;
  16438. if (!resolvedMessage && !(isString(format2) || isMessageFunction(format2))) {
  16439. if (enableDefaultMsg) {
  16440. format2 = defaultMsgOrKey;
  16441. cacheBaseKey = format2;
  16442. }
  16443. }
  16444. if (!resolvedMessage && (!(isString(format2) || isMessageFunction(format2)) || !isString(targetLocale))) {
  16445. return unresolving ? NOT_REOSLVED : key;
  16446. }
  16447. if (isString(format2) && context.messageCompiler == null) {
  16448. 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}'.`);
  16449. return key;
  16450. }
  16451. let occurred = false;
  16452. const errorDetector = () => {
  16453. occurred = true;
  16454. };
  16455. const msg = !isMessageFunction(format2) ? compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) : format2;
  16456. if (occurred) {
  16457. return format2;
  16458. }
  16459. const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);
  16460. const msgContext = createMessageContext(ctxOptions);
  16461. const messaged = evaluateMessage(context, msg, msgContext);
  16462. const ret = postTranslation ? postTranslation(messaged) : messaged;
  16463. {
  16464. const payloads = {
  16465. timestamp: Date.now(),
  16466. key: isString(key) ? key : isMessageFunction(format2) ? format2.key : "",
  16467. locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""),
  16468. format: isString(format2) ? format2 : isMessageFunction(format2) ? format2.source : "",
  16469. message: ret
  16470. };
  16471. payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});
  16472. translateDevTools(payloads);
  16473. }
  16474. return ret;
  16475. }
  16476. function escapeParams(options) {
  16477. if (isArray(options.list)) {
  16478. options.list = options.list.map((item) => isString(item) ? escapeHtml(item) : item);
  16479. } else if (isObject$1(options.named)) {
  16480. Object.keys(options.named).forEach((key) => {
  16481. if (isString(options.named[key])) {
  16482. options.named[key] = escapeHtml(options.named[key]);
  16483. }
  16484. });
  16485. }
  16486. }
  16487. function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {
  16488. const { messages: messages2, onWarn } = context;
  16489. const locales = getLocaleChain(context, fallbackLocale, locale);
  16490. let message = {};
  16491. let targetLocale;
  16492. let format2 = null;
  16493. let from = locale;
  16494. let to = null;
  16495. const type = "translate";
  16496. for (let i2 = 0; i2 < locales.length; i2++) {
  16497. targetLocale = to = locales[i2];
  16498. if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
  16499. onWarn(getWarnMessage$1(1, {
  16500. key,
  16501. target: targetLocale
  16502. }));
  16503. }
  16504. if (locale !== targetLocale) {
  16505. const emitter = context.__v_emitter;
  16506. if (emitter) {
  16507. emitter.emit("fallback", {
  16508. type,
  16509. key,
  16510. from,
  16511. to,
  16512. groupId: `${type}:${key}`
  16513. });
  16514. }
  16515. }
  16516. message = messages2[targetLocale] || {};
  16517. let start = null;
  16518. let startTag;
  16519. let endTag;
  16520. if (inBrowser) {
  16521. start = window.performance.now();
  16522. startTag = "intlify-message-resolve-start";
  16523. endTag = "intlify-message-resolve-end";
  16524. mark && mark(startTag);
  16525. }
  16526. if ((format2 = resolveValue(message, key)) === null) {
  16527. format2 = message[key];
  16528. }
  16529. if (inBrowser) {
  16530. const end = window.performance.now();
  16531. const emitter = context.__v_emitter;
  16532. if (emitter && start && format2) {
  16533. emitter.emit("message-resolve", {
  16534. type: "message-resolve",
  16535. key,
  16536. message: format2,
  16537. time: end - start,
  16538. groupId: `${type}:${key}`
  16539. });
  16540. }
  16541. if (startTag && endTag && mark && measure) {
  16542. mark(endTag);
  16543. measure("intlify message resolve", startTag, endTag);
  16544. }
  16545. }
  16546. if (isString(format2) || isFunction(format2))
  16547. break;
  16548. const missingRet = handleMissing(context, key, targetLocale, missingWarn, type);
  16549. if (missingRet !== key) {
  16550. format2 = missingRet;
  16551. }
  16552. from = to;
  16553. }
  16554. return [format2, targetLocale, message];
  16555. }
  16556. function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, errorDetector) {
  16557. const { messageCompiler, warnHtmlMessage } = context;
  16558. if (isMessageFunction(format2)) {
  16559. const msg2 = format2;
  16560. msg2.locale = msg2.locale || targetLocale;
  16561. msg2.key = msg2.key || key;
  16562. return msg2;
  16563. }
  16564. let start = null;
  16565. let startTag;
  16566. let endTag;
  16567. if (inBrowser) {
  16568. start = window.performance.now();
  16569. startTag = "intlify-message-compilation-start";
  16570. endTag = "intlify-message-compilation-end";
  16571. mark && mark(startTag);
  16572. }
  16573. const msg = messageCompiler(format2, getCompileOptions(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, errorDetector));
  16574. if (inBrowser) {
  16575. const end = window.performance.now();
  16576. const emitter = context.__v_emitter;
  16577. if (emitter && start) {
  16578. emitter.emit("message-compilation", {
  16579. type: "message-compilation",
  16580. message: format2,
  16581. time: end - start,
  16582. groupId: `${"translate"}:${key}`
  16583. });
  16584. }
  16585. if (startTag && endTag && mark && measure) {
  16586. mark(endTag);
  16587. measure("intlify message compilation", startTag, endTag);
  16588. }
  16589. }
  16590. msg.locale = targetLocale;
  16591. msg.key = key;
  16592. msg.source = format2;
  16593. return msg;
  16594. }
  16595. function evaluateMessage(context, msg, msgCtx) {
  16596. let start = null;
  16597. let startTag;
  16598. let endTag;
  16599. if (inBrowser) {
  16600. start = window.performance.now();
  16601. startTag = "intlify-message-evaluation-start";
  16602. endTag = "intlify-message-evaluation-end";
  16603. mark && mark(startTag);
  16604. }
  16605. const messaged = msg(msgCtx);
  16606. if (inBrowser) {
  16607. const end = window.performance.now();
  16608. const emitter = context.__v_emitter;
  16609. if (emitter && start) {
  16610. emitter.emit("message-evaluation", {
  16611. type: "message-evaluation",
  16612. value: messaged,
  16613. time: end - start,
  16614. groupId: `${"translate"}:${msg.key}`
  16615. });
  16616. }
  16617. if (startTag && endTag && mark && measure) {
  16618. mark(endTag);
  16619. measure("intlify message evaluation", startTag, endTag);
  16620. }
  16621. }
  16622. return messaged;
  16623. }
  16624. function parseTranslateArgs(...args) {
  16625. const [arg1, arg2, arg3] = args;
  16626. const options = {};
  16627. if (!isString(arg1) && !isNumber(arg1) && !isMessageFunction(arg1)) {
  16628. throw createCoreError(
  16629. 14
  16630. /* INVALID_ARGUMENT */
  16631. );
  16632. }
  16633. const key = isNumber(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1;
  16634. if (isNumber(arg2)) {
  16635. options.plural = arg2;
  16636. } else if (isString(arg2)) {
  16637. options.default = arg2;
  16638. } else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {
  16639. options.named = arg2;
  16640. } else if (isArray(arg2)) {
  16641. options.list = arg2;
  16642. }
  16643. if (isNumber(arg3)) {
  16644. options.plural = arg3;
  16645. } else if (isString(arg3)) {
  16646. options.default = arg3;
  16647. } else if (isPlainObject(arg3)) {
  16648. assign(options, arg3);
  16649. }
  16650. return [key, options];
  16651. }
  16652. function getCompileOptions(context, locale, key, source, warnHtmlMessage, errorDetector) {
  16653. return {
  16654. warnHtmlMessage,
  16655. onError: (err) => {
  16656. errorDetector && errorDetector(err);
  16657. {
  16658. const message = `Message compilation error: ${err.message}`;
  16659. const codeFrame = err.location && generateCodeFrame(source, err.location.start.offset, err.location.end.offset);
  16660. const emitter = context.__v_emitter;
  16661. if (emitter) {
  16662. emitter.emit("compile-error", {
  16663. message: source,
  16664. error: err.message,
  16665. start: err.location && err.location.start.offset,
  16666. end: err.location && err.location.end.offset,
  16667. groupId: `${"translate"}:${key}`
  16668. });
  16669. }
  16670. console.error(codeFrame ? `${message}
  16671. ${codeFrame}` : message);
  16672. }
  16673. },
  16674. onCacheKey: (source2) => generateFormatCacheKey(locale, key, source2)
  16675. };
  16676. }
  16677. function getMessageContextOptions(context, locale, message, options) {
  16678. const { modifiers, pluralRules } = context;
  16679. const resolveMessage = (key) => {
  16680. const val = resolveValue(message, key);
  16681. if (isString(val)) {
  16682. let occurred = false;
  16683. const errorDetector = () => {
  16684. occurred = true;
  16685. };
  16686. const msg = compileMessageFormat(context, key, locale, val, key, errorDetector);
  16687. return !occurred ? msg : NOOP_MESSAGE_FUNCTION;
  16688. } else if (isMessageFunction(val)) {
  16689. return val;
  16690. } else {
  16691. return NOOP_MESSAGE_FUNCTION;
  16692. }
  16693. };
  16694. const ctxOptions = {
  16695. locale,
  16696. modifiers,
  16697. pluralRules,
  16698. messages: resolveMessage
  16699. };
  16700. if (context.processor) {
  16701. ctxOptions.processor = context.processor;
  16702. }
  16703. if (options.list) {
  16704. ctxOptions.list = options.list;
  16705. }
  16706. if (options.named) {
  16707. ctxOptions.named = options.named;
  16708. }
  16709. if (isNumber(options.plural)) {
  16710. ctxOptions.pluralIndex = options.plural;
  16711. }
  16712. return ctxOptions;
  16713. }
  16714. const intlDefined = typeof Intl !== "undefined";
  16715. const Availabilities = {
  16716. dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== "undefined",
  16717. numberFormat: intlDefined && typeof Intl.NumberFormat !== "undefined"
  16718. };
  16719. function datetime(context, ...args) {
  16720. const { datetimeFormats, unresolving, fallbackLocale, onWarn } = context;
  16721. const { __datetimeFormatters } = context;
  16722. if (!Availabilities.dateTimeFormat) {
  16723. onWarn(getWarnMessage$1(
  16724. 4
  16725. /* CANNOT_FORMAT_DATE */
  16726. ));
  16727. return MISSING_RESOLVE_VALUE;
  16728. }
  16729. const [key, value, options, overrides] = parseDateTimeArgs(...args);
  16730. const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
  16731. const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
  16732. const part = !!options.part;
  16733. const locale = isString(options.locale) ? options.locale : context.locale;
  16734. const locales = getLocaleChain(context, fallbackLocale, locale);
  16735. if (!isString(key) || key === "") {
  16736. return new Intl.DateTimeFormat(locale).format(value);
  16737. }
  16738. let datetimeFormat = {};
  16739. let targetLocale;
  16740. let format2 = null;
  16741. let from = locale;
  16742. let to = null;
  16743. const type = "datetime format";
  16744. for (let i2 = 0; i2 < locales.length; i2++) {
  16745. targetLocale = to = locales[i2];
  16746. if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
  16747. onWarn(getWarnMessage$1(5, {
  16748. key,
  16749. target: targetLocale
  16750. }));
  16751. }
  16752. if (locale !== targetLocale) {
  16753. const emitter = context.__v_emitter;
  16754. if (emitter) {
  16755. emitter.emit("fallback", {
  16756. type,
  16757. key,
  16758. from,
  16759. to,
  16760. groupId: `${type}:${key}`
  16761. });
  16762. }
  16763. }
  16764. datetimeFormat = datetimeFormats[targetLocale] || {};
  16765. format2 = datetimeFormat[key];
  16766. if (isPlainObject(format2))
  16767. break;
  16768. handleMissing(context, key, targetLocale, missingWarn, type);
  16769. from = to;
  16770. }
  16771. if (!isPlainObject(format2) || !isString(targetLocale)) {
  16772. return unresolving ? NOT_REOSLVED : key;
  16773. }
  16774. let id = `${targetLocale}__${key}`;
  16775. if (!isEmptyObject(overrides)) {
  16776. id = `${id}__${JSON.stringify(overrides)}`;
  16777. }
  16778. let formatter = __datetimeFormatters.get(id);
  16779. if (!formatter) {
  16780. formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format2, overrides));
  16781. __datetimeFormatters.set(id, formatter);
  16782. }
  16783. return !part ? formatter.format(value) : formatter.formatToParts(value);
  16784. }
  16785. function parseDateTimeArgs(...args) {
  16786. const [arg1, arg2, arg3, arg4] = args;
  16787. let options = {};
  16788. let overrides = {};
  16789. let value;
  16790. if (isString(arg1)) {
  16791. if (!/\d{4}-\d{2}-\d{2}(T.*)?/.test(arg1)) {
  16792. throw createCoreError(
  16793. 16
  16794. /* INVALID_ISO_DATE_ARGUMENT */
  16795. );
  16796. }
  16797. value = new Date(arg1);
  16798. try {
  16799. value.toISOString();
  16800. } catch (e2) {
  16801. throw createCoreError(
  16802. 16
  16803. /* INVALID_ISO_DATE_ARGUMENT */
  16804. );
  16805. }
  16806. } else if (isDate(arg1)) {
  16807. if (isNaN(arg1.getTime())) {
  16808. throw createCoreError(
  16809. 15
  16810. /* INVALID_DATE_ARGUMENT */
  16811. );
  16812. }
  16813. value = arg1;
  16814. } else if (isNumber(arg1)) {
  16815. value = arg1;
  16816. } else {
  16817. throw createCoreError(
  16818. 14
  16819. /* INVALID_ARGUMENT */
  16820. );
  16821. }
  16822. if (isString(arg2)) {
  16823. options.key = arg2;
  16824. } else if (isPlainObject(arg2)) {
  16825. options = arg2;
  16826. }
  16827. if (isString(arg3)) {
  16828. options.locale = arg3;
  16829. } else if (isPlainObject(arg3)) {
  16830. overrides = arg3;
  16831. }
  16832. if (isPlainObject(arg4)) {
  16833. overrides = arg4;
  16834. }
  16835. return [options.key || "", value, options, overrides];
  16836. }
  16837. function clearDateTimeFormat(ctx, locale, format2) {
  16838. const context = ctx;
  16839. for (const key in format2) {
  16840. const id = `${locale}__${key}`;
  16841. if (!context.__datetimeFormatters.has(id)) {
  16842. continue;
  16843. }
  16844. context.__datetimeFormatters.delete(id);
  16845. }
  16846. }
  16847. function number(context, ...args) {
  16848. const { numberFormats, unresolving, fallbackLocale, onWarn } = context;
  16849. const { __numberFormatters } = context;
  16850. if (!Availabilities.numberFormat) {
  16851. onWarn(getWarnMessage$1(
  16852. 2
  16853. /* CANNOT_FORMAT_NUMBER */
  16854. ));
  16855. return MISSING_RESOLVE_VALUE;
  16856. }
  16857. const [key, value, options, overrides] = parseNumberArgs(...args);
  16858. const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn;
  16859. const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn;
  16860. const part = !!options.part;
  16861. const locale = isString(options.locale) ? options.locale : context.locale;
  16862. const locales = getLocaleChain(context, fallbackLocale, locale);
  16863. if (!isString(key) || key === "") {
  16864. return new Intl.NumberFormat(locale).format(value);
  16865. }
  16866. let numberFormat = {};
  16867. let targetLocale;
  16868. let format2 = null;
  16869. let from = locale;
  16870. let to = null;
  16871. const type = "number format";
  16872. for (let i2 = 0; i2 < locales.length; i2++) {
  16873. targetLocale = to = locales[i2];
  16874. if (locale !== targetLocale && isTranslateFallbackWarn(fallbackWarn, key)) {
  16875. onWarn(getWarnMessage$1(3, {
  16876. key,
  16877. target: targetLocale
  16878. }));
  16879. }
  16880. if (locale !== targetLocale) {
  16881. const emitter = context.__v_emitter;
  16882. if (emitter) {
  16883. emitter.emit("fallback", {
  16884. type,
  16885. key,
  16886. from,
  16887. to,
  16888. groupId: `${type}:${key}`
  16889. });
  16890. }
  16891. }
  16892. numberFormat = numberFormats[targetLocale] || {};
  16893. format2 = numberFormat[key];
  16894. if (isPlainObject(format2))
  16895. break;
  16896. handleMissing(context, key, targetLocale, missingWarn, type);
  16897. from = to;
  16898. }
  16899. if (!isPlainObject(format2) || !isString(targetLocale)) {
  16900. return unresolving ? NOT_REOSLVED : key;
  16901. }
  16902. let id = `${targetLocale}__${key}`;
  16903. if (!isEmptyObject(overrides)) {
  16904. id = `${id}__${JSON.stringify(overrides)}`;
  16905. }
  16906. let formatter = __numberFormatters.get(id);
  16907. if (!formatter) {
  16908. formatter = new Intl.NumberFormat(targetLocale, assign({}, format2, overrides));
  16909. __numberFormatters.set(id, formatter);
  16910. }
  16911. return !part ? formatter.format(value) : formatter.formatToParts(value);
  16912. }
  16913. function parseNumberArgs(...args) {
  16914. const [arg1, arg2, arg3, arg4] = args;
  16915. let options = {};
  16916. let overrides = {};
  16917. if (!isNumber(arg1)) {
  16918. throw createCoreError(
  16919. 14
  16920. /* INVALID_ARGUMENT */
  16921. );
  16922. }
  16923. const value = arg1;
  16924. if (isString(arg2)) {
  16925. options.key = arg2;
  16926. } else if (isPlainObject(arg2)) {
  16927. options = arg2;
  16928. }
  16929. if (isString(arg3)) {
  16930. options.locale = arg3;
  16931. } else if (isPlainObject(arg3)) {
  16932. overrides = arg3;
  16933. }
  16934. if (isPlainObject(arg4)) {
  16935. overrides = arg4;
  16936. }
  16937. return [options.key || "", value, options, overrides];
  16938. }
  16939. function clearNumberFormat(ctx, locale, format2) {
  16940. const context = ctx;
  16941. for (const key in format2) {
  16942. const id = `${locale}__${key}`;
  16943. if (!context.__numberFormatters.has(id)) {
  16944. continue;
  16945. }
  16946. context.__numberFormatters.delete(id);
  16947. }
  16948. }
  16949. /*!
  16950. * @intlify/vue-devtools v9.1.9
  16951. * (c) 2021 kazuya kawaguchi
  16952. * Released under the MIT License.
  16953. */
  16954. const VueDevToolsLabels = {
  16955. [
  16956. "vue-devtools-plugin-vue-i18n"
  16957. /* PLUGIN */
  16958. ]: "Vue I18n devtools",
  16959. [
  16960. "vue-i18n-resource-inspector"
  16961. /* CUSTOM_INSPECTOR */
  16962. ]: "I18n Resources",
  16963. [
  16964. "vue-i18n-timeline"
  16965. /* TIMELINE */
  16966. ]: "Vue I18n"
  16967. };
  16968. const VueDevToolsPlaceholders = {
  16969. [
  16970. "vue-i18n-resource-inspector"
  16971. /* CUSTOM_INSPECTOR */
  16972. ]: "Search for scopes ..."
  16973. };
  16974. const VueDevToolsTimelineColors = {
  16975. [
  16976. "vue-i18n-timeline"
  16977. /* TIMELINE */
  16978. ]: 16764185
  16979. };
  16980. /*!
  16981. * vue-i18n v9.1.9
  16982. * (c) 2022 kazuya kawaguchi
  16983. * Released under the MIT License.
  16984. */
  16985. const VERSION = "9.1.9";
  16986. function initFeatureFlags() {
  16987. let needWarn = false;
  16988. {
  16989. needWarn = true;
  16990. }
  16991. if (needWarn) {
  16992. 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.`);
  16993. }
  16994. }
  16995. const warnMessages = {
  16996. [
  16997. 6
  16998. /* FALLBACK_TO_ROOT */
  16999. ]: `Fall back to {type} '{key}' with root locale.`,
  17000. [
  17001. 7
  17002. /* NOT_SUPPORTED_PRESERVE */
  17003. ]: `Not supported 'preserve'.`,
  17004. [
  17005. 8
  17006. /* NOT_SUPPORTED_FORMATTER */
  17007. ]: `Not supported 'formatter'.`,
  17008. [
  17009. 9
  17010. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  17011. ]: `Not supported 'preserveDirectiveContent'.`,
  17012. [
  17013. 10
  17014. /* NOT_SUPPORTED_GET_CHOICE_INDEX */
  17015. ]: `Not supported 'getChoiceIndex'.`,
  17016. [
  17017. 11
  17018. /* COMPONENT_NAME_LEGACY_COMPATIBLE */
  17019. ]: `Component name legacy compatible: '{name}' -> 'i18n'`,
  17020. [
  17021. 12
  17022. /* NOT_FOUND_PARENT_SCOPE */
  17023. ]: `Not found parent scope. use the global scope.`
  17024. };
  17025. function getWarnMessage(code, ...args) {
  17026. return format(warnMessages[code], ...args);
  17027. }
  17028. function createI18nError(code, ...args) {
  17029. return createCompileError(code, null, { messages: errorMessages, args });
  17030. }
  17031. const errorMessages = {
  17032. [
  17033. 14
  17034. /* UNEXPECTED_RETURN_TYPE */
  17035. ]: "Unexpected return type in composer",
  17036. [
  17037. 15
  17038. /* INVALID_ARGUMENT */
  17039. ]: "Invalid argument",
  17040. [
  17041. 16
  17042. /* MUST_BE_CALL_SETUP_TOP */
  17043. ]: "Must be called at the top of a `setup` function",
  17044. [
  17045. 17
  17046. /* NOT_INSLALLED */
  17047. ]: "Need to install with `app.use` function",
  17048. [
  17049. 22
  17050. /* UNEXPECTED_ERROR */
  17051. ]: "Unexpected error",
  17052. [
  17053. 18
  17054. /* NOT_AVAILABLE_IN_LEGACY_MODE */
  17055. ]: "Not available in legacy mode",
  17056. [
  17057. 19
  17058. /* REQUIRED_VALUE */
  17059. ]: `Required in value: {0}`,
  17060. [
  17061. 20
  17062. /* INVALID_VALUE */
  17063. ]: `Invalid value`,
  17064. [
  17065. 21
  17066. /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */
  17067. ]: `Cannot setup vue-devtools plugin`
  17068. };
  17069. const DEVTOOLS_META = "__INTLIFY_META__";
  17070. const TransrateVNodeSymbol = makeSymbol("__transrateVNode");
  17071. const DatetimePartsSymbol = makeSymbol("__datetimeParts");
  17072. const NumberPartsSymbol = makeSymbol("__numberParts");
  17073. const EnableEmitter = makeSymbol("__enableEmitter");
  17074. const DisableEmitter = makeSymbol("__disableEmitter");
  17075. const SetPluralRulesSymbol = makeSymbol("__setPluralRules");
  17076. const InejctWithOption = makeSymbol("__injectWithOption");
  17077. let composerID = 0;
  17078. function defineCoreMissingHandler(missing) {
  17079. return (ctx, locale, key, type) => {
  17080. return missing(locale, key, vue.getCurrentInstance() || void 0, type);
  17081. };
  17082. }
  17083. function getLocaleMessages(locale, options) {
  17084. const { messages: messages2, __i18n } = options;
  17085. const ret = isPlainObject(messages2) ? messages2 : isArray(__i18n) ? {} : { [locale]: {} };
  17086. if (isArray(__i18n)) {
  17087. __i18n.forEach(({ locale: locale2, resource }) => {
  17088. if (locale2) {
  17089. ret[locale2] = ret[locale2] || {};
  17090. deepCopy(resource, ret[locale2]);
  17091. } else {
  17092. deepCopy(resource, ret);
  17093. }
  17094. });
  17095. }
  17096. if (options.flatJson) {
  17097. for (const key in ret) {
  17098. if (hasOwn$1(ret, key)) {
  17099. handleFlatJson(ret[key]);
  17100. }
  17101. }
  17102. }
  17103. return ret;
  17104. }
  17105. const isNotObjectOrIsArray = (val) => !isObject$1(val) || isArray(val);
  17106. function deepCopy(src, des) {
  17107. if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
  17108. throw createI18nError(
  17109. 20
  17110. /* INVALID_VALUE */
  17111. );
  17112. }
  17113. for (const key in src) {
  17114. if (hasOwn$1(src, key)) {
  17115. if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {
  17116. des[key] = src[key];
  17117. } else {
  17118. deepCopy(src[key], des[key]);
  17119. }
  17120. }
  17121. }
  17122. }
  17123. const getMetaInfo = () => {
  17124. const instance = vue.getCurrentInstance();
  17125. return instance && instance.type[DEVTOOLS_META] ? { [DEVTOOLS_META]: instance.type[DEVTOOLS_META] } : null;
  17126. };
  17127. function createComposer(options = {}) {
  17128. const { __root } = options;
  17129. const _isGlobal = __root === void 0;
  17130. let _inheritLocale = isBoolean(options.inheritLocale) ? options.inheritLocale : true;
  17131. const _locale = vue.ref(
  17132. // prettier-ignore
  17133. __root && _inheritLocale ? __root.locale.value : isString(options.locale) ? options.locale : "en-US"
  17134. );
  17135. const _fallbackLocale = vue.ref(
  17136. // prettier-ignore
  17137. __root && _inheritLocale ? __root.fallbackLocale.value : isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale.value
  17138. );
  17139. const _messages = vue.ref(getLocaleMessages(_locale.value, options));
  17140. const _datetimeFormats = vue.ref(isPlainObject(options.datetimeFormats) ? options.datetimeFormats : { [_locale.value]: {} });
  17141. const _numberFormats = vue.ref(isPlainObject(options.numberFormats) ? options.numberFormats : { [_locale.value]: {} });
  17142. let _missingWarn = __root ? __root.missingWarn : isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true;
  17143. let _fallbackWarn = __root ? __root.fallbackWarn : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true;
  17144. let _fallbackRoot = __root ? __root.fallbackRoot : isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
  17145. let _fallbackFormat = !!options.fallbackFormat;
  17146. let _missing = isFunction(options.missing) ? options.missing : null;
  17147. let _runtimeMissing = isFunction(options.missing) ? defineCoreMissingHandler(options.missing) : null;
  17148. let _postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null;
  17149. let _warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true;
  17150. let _escapeParameter = !!options.escapeParameter;
  17151. const _modifiers = __root ? __root.modifiers : isPlainObject(options.modifiers) ? options.modifiers : {};
  17152. let _pluralRules = options.pluralRules || __root && __root.pluralRules;
  17153. let _context;
  17154. function getCoreContext() {
  17155. return createCoreContext({
  17156. version: VERSION,
  17157. locale: _locale.value,
  17158. fallbackLocale: _fallbackLocale.value,
  17159. messages: _messages.value,
  17160. messageCompiler: function compileToFunction(source) {
  17161. return (ctx) => {
  17162. return ctx.normalize([source]);
  17163. };
  17164. },
  17165. datetimeFormats: _datetimeFormats.value,
  17166. numberFormats: _numberFormats.value,
  17167. modifiers: _modifiers,
  17168. pluralRules: _pluralRules,
  17169. missing: _runtimeMissing === null ? void 0 : _runtimeMissing,
  17170. missingWarn: _missingWarn,
  17171. fallbackWarn: _fallbackWarn,
  17172. fallbackFormat: _fallbackFormat,
  17173. unresolving: true,
  17174. postTranslation: _postTranslation === null ? void 0 : _postTranslation,
  17175. warnHtmlMessage: _warnHtmlMessage,
  17176. escapeParameter: _escapeParameter,
  17177. __datetimeFormatters: isPlainObject(_context) ? _context.__datetimeFormatters : void 0,
  17178. __numberFormatters: isPlainObject(_context) ? _context.__numberFormatters : void 0,
  17179. __v_emitter: isPlainObject(_context) ? _context.__v_emitter : void 0,
  17180. __meta: { framework: "vue" }
  17181. });
  17182. }
  17183. _context = getCoreContext();
  17184. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  17185. function trackReactivityValues() {
  17186. return [
  17187. _locale.value,
  17188. _fallbackLocale.value,
  17189. _messages.value,
  17190. _datetimeFormats.value,
  17191. _numberFormats.value
  17192. ];
  17193. }
  17194. const locale = vue.computed({
  17195. get: () => _locale.value,
  17196. set: (val) => {
  17197. _locale.value = val;
  17198. _context.locale = _locale.value;
  17199. }
  17200. });
  17201. const fallbackLocale = vue.computed({
  17202. get: () => _fallbackLocale.value,
  17203. set: (val) => {
  17204. _fallbackLocale.value = val;
  17205. _context.fallbackLocale = _fallbackLocale.value;
  17206. updateFallbackLocale(_context, _locale.value, val);
  17207. }
  17208. });
  17209. const messages2 = vue.computed(() => _messages.value);
  17210. const datetimeFormats = vue.computed(() => _datetimeFormats.value);
  17211. const numberFormats = vue.computed(() => _numberFormats.value);
  17212. function getPostTranslationHandler() {
  17213. return isFunction(_postTranslation) ? _postTranslation : null;
  17214. }
  17215. function setPostTranslationHandler(handler) {
  17216. _postTranslation = handler;
  17217. _context.postTranslation = handler;
  17218. }
  17219. function getMissingHandler() {
  17220. return _missing;
  17221. }
  17222. function setMissingHandler(handler) {
  17223. if (handler !== null) {
  17224. _runtimeMissing = defineCoreMissingHandler(handler);
  17225. }
  17226. _missing = handler;
  17227. _context.missing = _runtimeMissing;
  17228. }
  17229. function isResolvedTranslateMessage(type, arg) {
  17230. return type !== "translate" || !!arg.resolvedMessage === false;
  17231. }
  17232. function wrapWithDeps(fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) {
  17233. trackReactivityValues();
  17234. let ret;
  17235. {
  17236. try {
  17237. setAdditionalMeta(getMetaInfo());
  17238. ret = fn(_context);
  17239. } finally {
  17240. setAdditionalMeta(null);
  17241. }
  17242. }
  17243. if (isNumber(ret) && ret === NOT_REOSLVED) {
  17244. const [key, arg2] = argumentParser();
  17245. if (__root && isString(key) && isResolvedTranslateMessage(warnType, arg2)) {
  17246. if (_fallbackRoot && (isTranslateFallbackWarn(_fallbackWarn, key) || isTranslateMissingWarn(_missingWarn, key))) {
  17247. warn(getWarnMessage(6, {
  17248. key,
  17249. type: warnType
  17250. }));
  17251. }
  17252. {
  17253. const { __v_emitter: emitter } = _context;
  17254. if (emitter && _fallbackRoot) {
  17255. emitter.emit("fallback", {
  17256. type: warnType,
  17257. key,
  17258. to: "global",
  17259. groupId: `${warnType}:${key}`
  17260. });
  17261. }
  17262. }
  17263. }
  17264. return __root && _fallbackRoot ? fallbackSuccess(__root) : fallbackFail(key);
  17265. } else if (successCondition(ret)) {
  17266. return ret;
  17267. } else {
  17268. throw createI18nError(
  17269. 14
  17270. /* UNEXPECTED_RETURN_TYPE */
  17271. );
  17272. }
  17273. }
  17274. function t2(...args) {
  17275. return wrapWithDeps((context) => translate(context, ...args), () => parseTranslateArgs(...args), "translate", (root) => root.t(...args), (key) => key, (val) => isString(val));
  17276. }
  17277. function rt2(...args) {
  17278. const [arg1, arg2, arg3] = args;
  17279. if (arg3 && !isObject$1(arg3)) {
  17280. throw createI18nError(
  17281. 15
  17282. /* INVALID_ARGUMENT */
  17283. );
  17284. }
  17285. return t2(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);
  17286. }
  17287. function d2(...args) {
  17288. return wrapWithDeps((context) => datetime(context, ...args), () => parseDateTimeArgs(...args), "datetime format", (root) => root.d(...args), () => MISSING_RESOLVE_VALUE, (val) => isString(val));
  17289. }
  17290. function n2(...args) {
  17291. return wrapWithDeps((context) => number(context, ...args), () => parseNumberArgs(...args), "number format", (root) => root.n(...args), () => MISSING_RESOLVE_VALUE, (val) => isString(val));
  17292. }
  17293. function normalize(values) {
  17294. return values.map((val) => isString(val) ? vue.createVNode(vue.Text, null, val, 0) : val);
  17295. }
  17296. const interpolate = (val) => val;
  17297. const processor = {
  17298. normalize,
  17299. interpolate,
  17300. type: "vnode"
  17301. };
  17302. function transrateVNode(...args) {
  17303. return wrapWithDeps(
  17304. (context) => {
  17305. let ret;
  17306. const _context2 = context;
  17307. try {
  17308. _context2.processor = processor;
  17309. ret = translate(_context2, ...args);
  17310. } finally {
  17311. _context2.processor = null;
  17312. }
  17313. return ret;
  17314. },
  17315. () => parseTranslateArgs(...args),
  17316. "translate",
  17317. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  17318. (root) => root[TransrateVNodeSymbol](...args),
  17319. (key) => [vue.createVNode(vue.Text, null, key, 0)],
  17320. (val) => isArray(val)
  17321. );
  17322. }
  17323. function numberParts(...args) {
  17324. return wrapWithDeps(
  17325. (context) => number(context, ...args),
  17326. () => parseNumberArgs(...args),
  17327. "number format",
  17328. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  17329. (root) => root[NumberPartsSymbol](...args),
  17330. () => [],
  17331. (val) => isString(val) || isArray(val)
  17332. );
  17333. }
  17334. function datetimeParts(...args) {
  17335. return wrapWithDeps(
  17336. (context) => datetime(context, ...args),
  17337. () => parseDateTimeArgs(...args),
  17338. "datetime format",
  17339. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  17340. (root) => root[DatetimePartsSymbol](...args),
  17341. () => [],
  17342. (val) => isString(val) || isArray(val)
  17343. );
  17344. }
  17345. function setPluralRules(rules) {
  17346. _pluralRules = rules;
  17347. _context.pluralRules = _pluralRules;
  17348. }
  17349. function te2(key, locale2) {
  17350. const targetLocale = isString(locale2) ? locale2 : _locale.value;
  17351. const message = getLocaleMessage(targetLocale);
  17352. return resolveValue(message, key) !== null;
  17353. }
  17354. function resolveMessages(key) {
  17355. let messages22 = null;
  17356. const locales = getLocaleChain(_context, _fallbackLocale.value, _locale.value);
  17357. for (let i2 = 0; i2 < locales.length; i2++) {
  17358. const targetLocaleMessages = _messages.value[locales[i2]] || {};
  17359. const messageValue = resolveValue(targetLocaleMessages, key);
  17360. if (messageValue != null) {
  17361. messages22 = messageValue;
  17362. break;
  17363. }
  17364. }
  17365. return messages22;
  17366. }
  17367. function tm(key) {
  17368. const messages22 = resolveMessages(key);
  17369. return messages22 != null ? messages22 : __root ? __root.tm(key) || {} : {};
  17370. }
  17371. function getLocaleMessage(locale2) {
  17372. return _messages.value[locale2] || {};
  17373. }
  17374. function setLocaleMessage(locale2, message) {
  17375. _messages.value[locale2] = message;
  17376. _context.messages = _messages.value;
  17377. }
  17378. function mergeLocaleMessage(locale2, message) {
  17379. _messages.value[locale2] = _messages.value[locale2] || {};
  17380. deepCopy(message, _messages.value[locale2]);
  17381. _context.messages = _messages.value;
  17382. }
  17383. function getDateTimeFormat(locale2) {
  17384. return _datetimeFormats.value[locale2] || {};
  17385. }
  17386. function setDateTimeFormat(locale2, format2) {
  17387. _datetimeFormats.value[locale2] = format2;
  17388. _context.datetimeFormats = _datetimeFormats.value;
  17389. clearDateTimeFormat(_context, locale2, format2);
  17390. }
  17391. function mergeDateTimeFormat(locale2, format2) {
  17392. _datetimeFormats.value[locale2] = assign(_datetimeFormats.value[locale2] || {}, format2);
  17393. _context.datetimeFormats = _datetimeFormats.value;
  17394. clearDateTimeFormat(_context, locale2, format2);
  17395. }
  17396. function getNumberFormat(locale2) {
  17397. return _numberFormats.value[locale2] || {};
  17398. }
  17399. function setNumberFormat(locale2, format2) {
  17400. _numberFormats.value[locale2] = format2;
  17401. _context.numberFormats = _numberFormats.value;
  17402. clearNumberFormat(_context, locale2, format2);
  17403. }
  17404. function mergeNumberFormat(locale2, format2) {
  17405. _numberFormats.value[locale2] = assign(_numberFormats.value[locale2] || {}, format2);
  17406. _context.numberFormats = _numberFormats.value;
  17407. clearNumberFormat(_context, locale2, format2);
  17408. }
  17409. composerID++;
  17410. if (__root) {
  17411. vue.watch(__root.locale, (val) => {
  17412. if (_inheritLocale) {
  17413. _locale.value = val;
  17414. _context.locale = val;
  17415. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  17416. }
  17417. });
  17418. vue.watch(__root.fallbackLocale, (val) => {
  17419. if (_inheritLocale) {
  17420. _fallbackLocale.value = val;
  17421. _context.fallbackLocale = val;
  17422. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  17423. }
  17424. });
  17425. }
  17426. const composer = {
  17427. id: composerID,
  17428. locale,
  17429. fallbackLocale,
  17430. get inheritLocale() {
  17431. return _inheritLocale;
  17432. },
  17433. set inheritLocale(val) {
  17434. _inheritLocale = val;
  17435. if (val && __root) {
  17436. _locale.value = __root.locale.value;
  17437. _fallbackLocale.value = __root.fallbackLocale.value;
  17438. updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);
  17439. }
  17440. },
  17441. get availableLocales() {
  17442. return Object.keys(_messages.value).sort();
  17443. },
  17444. messages: messages2,
  17445. datetimeFormats,
  17446. numberFormats,
  17447. get modifiers() {
  17448. return _modifiers;
  17449. },
  17450. get pluralRules() {
  17451. return _pluralRules || {};
  17452. },
  17453. get isGlobal() {
  17454. return _isGlobal;
  17455. },
  17456. get missingWarn() {
  17457. return _missingWarn;
  17458. },
  17459. set missingWarn(val) {
  17460. _missingWarn = val;
  17461. _context.missingWarn = _missingWarn;
  17462. },
  17463. get fallbackWarn() {
  17464. return _fallbackWarn;
  17465. },
  17466. set fallbackWarn(val) {
  17467. _fallbackWarn = val;
  17468. _context.fallbackWarn = _fallbackWarn;
  17469. },
  17470. get fallbackRoot() {
  17471. return _fallbackRoot;
  17472. },
  17473. set fallbackRoot(val) {
  17474. _fallbackRoot = val;
  17475. },
  17476. get fallbackFormat() {
  17477. return _fallbackFormat;
  17478. },
  17479. set fallbackFormat(val) {
  17480. _fallbackFormat = val;
  17481. _context.fallbackFormat = _fallbackFormat;
  17482. },
  17483. get warnHtmlMessage() {
  17484. return _warnHtmlMessage;
  17485. },
  17486. set warnHtmlMessage(val) {
  17487. _warnHtmlMessage = val;
  17488. _context.warnHtmlMessage = val;
  17489. },
  17490. get escapeParameter() {
  17491. return _escapeParameter;
  17492. },
  17493. set escapeParameter(val) {
  17494. _escapeParameter = val;
  17495. _context.escapeParameter = val;
  17496. },
  17497. t: t2,
  17498. rt: rt2,
  17499. d: d2,
  17500. n: n2,
  17501. te: te2,
  17502. tm,
  17503. getLocaleMessage,
  17504. setLocaleMessage,
  17505. mergeLocaleMessage,
  17506. getDateTimeFormat,
  17507. setDateTimeFormat,
  17508. mergeDateTimeFormat,
  17509. getNumberFormat,
  17510. setNumberFormat,
  17511. mergeNumberFormat,
  17512. getPostTranslationHandler,
  17513. setPostTranslationHandler,
  17514. getMissingHandler,
  17515. setMissingHandler,
  17516. [TransrateVNodeSymbol]: transrateVNode,
  17517. [NumberPartsSymbol]: numberParts,
  17518. [DatetimePartsSymbol]: datetimeParts,
  17519. [SetPluralRulesSymbol]: setPluralRules,
  17520. [InejctWithOption]: options.__injectWithOption
  17521. // eslint-disable-line @typescript-eslint/no-explicit-any
  17522. };
  17523. {
  17524. composer[EnableEmitter] = (emitter) => {
  17525. _context.__v_emitter = emitter;
  17526. };
  17527. composer[DisableEmitter] = () => {
  17528. _context.__v_emitter = void 0;
  17529. };
  17530. }
  17531. return composer;
  17532. }
  17533. function convertComposerOptions(options) {
  17534. const locale = isString(options.locale) ? options.locale : "en-US";
  17535. const fallbackLocale = isString(options.fallbackLocale) || isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : locale;
  17536. const missing = isFunction(options.missing) ? options.missing : void 0;
  17537. const missingWarn = isBoolean(options.silentTranslationWarn) || isRegExp(options.silentTranslationWarn) ? !options.silentTranslationWarn : true;
  17538. const fallbackWarn = isBoolean(options.silentFallbackWarn) || isRegExp(options.silentFallbackWarn) ? !options.silentFallbackWarn : true;
  17539. const fallbackRoot = isBoolean(options.fallbackRoot) ? options.fallbackRoot : true;
  17540. const fallbackFormat = !!options.formatFallbackMessages;
  17541. const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {};
  17542. const pluralizationRules = options.pluralizationRules;
  17543. const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : void 0;
  17544. const warnHtmlMessage = isString(options.warnHtmlInMessage) ? options.warnHtmlInMessage !== "off" : true;
  17545. const escapeParameter = !!options.escapeParameterHtml;
  17546. const inheritLocale = isBoolean(options.sync) ? options.sync : true;
  17547. if (options.formatter) {
  17548. warn(getWarnMessage(
  17549. 8
  17550. /* NOT_SUPPORTED_FORMATTER */
  17551. ));
  17552. }
  17553. if (options.preserveDirectiveContent) {
  17554. warn(getWarnMessage(
  17555. 9
  17556. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  17557. ));
  17558. }
  17559. let messages2 = options.messages;
  17560. if (isPlainObject(options.sharedMessages)) {
  17561. const sharedMessages = options.sharedMessages;
  17562. const locales = Object.keys(sharedMessages);
  17563. messages2 = locales.reduce((messages22, locale2) => {
  17564. const message = messages22[locale2] || (messages22[locale2] = {});
  17565. assign(message, sharedMessages[locale2]);
  17566. return messages22;
  17567. }, messages2 || {});
  17568. }
  17569. const { __i18n, __root, __injectWithOption } = options;
  17570. const datetimeFormats = options.datetimeFormats;
  17571. const numberFormats = options.numberFormats;
  17572. const flatJson = options.flatJson;
  17573. return {
  17574. locale,
  17575. fallbackLocale,
  17576. messages: messages2,
  17577. flatJson,
  17578. datetimeFormats,
  17579. numberFormats,
  17580. missing,
  17581. missingWarn,
  17582. fallbackWarn,
  17583. fallbackRoot,
  17584. fallbackFormat,
  17585. modifiers,
  17586. pluralRules: pluralizationRules,
  17587. postTranslation,
  17588. warnHtmlMessage,
  17589. escapeParameter,
  17590. inheritLocale,
  17591. __i18n,
  17592. __root,
  17593. __injectWithOption
  17594. };
  17595. }
  17596. function createVueI18n(options = {}) {
  17597. const composer = createComposer(convertComposerOptions(options));
  17598. const vueI18n = {
  17599. // id
  17600. id: composer.id,
  17601. // locale
  17602. get locale() {
  17603. return composer.locale.value;
  17604. },
  17605. set locale(val) {
  17606. composer.locale.value = val;
  17607. },
  17608. // fallbackLocale
  17609. get fallbackLocale() {
  17610. return composer.fallbackLocale.value;
  17611. },
  17612. set fallbackLocale(val) {
  17613. composer.fallbackLocale.value = val;
  17614. },
  17615. // messages
  17616. get messages() {
  17617. return composer.messages.value;
  17618. },
  17619. // datetimeFormats
  17620. get datetimeFormats() {
  17621. return composer.datetimeFormats.value;
  17622. },
  17623. // numberFormats
  17624. get numberFormats() {
  17625. return composer.numberFormats.value;
  17626. },
  17627. // availableLocales
  17628. get availableLocales() {
  17629. return composer.availableLocales;
  17630. },
  17631. // formatter
  17632. get formatter() {
  17633. warn(getWarnMessage(
  17634. 8
  17635. /* NOT_SUPPORTED_FORMATTER */
  17636. ));
  17637. return {
  17638. interpolate() {
  17639. return [];
  17640. }
  17641. };
  17642. },
  17643. set formatter(val) {
  17644. warn(getWarnMessage(
  17645. 8
  17646. /* NOT_SUPPORTED_FORMATTER */
  17647. ));
  17648. },
  17649. // missing
  17650. get missing() {
  17651. return composer.getMissingHandler();
  17652. },
  17653. set missing(handler) {
  17654. composer.setMissingHandler(handler);
  17655. },
  17656. // silentTranslationWarn
  17657. get silentTranslationWarn() {
  17658. return isBoolean(composer.missingWarn) ? !composer.missingWarn : composer.missingWarn;
  17659. },
  17660. set silentTranslationWarn(val) {
  17661. composer.missingWarn = isBoolean(val) ? !val : val;
  17662. },
  17663. // silentFallbackWarn
  17664. get silentFallbackWarn() {
  17665. return isBoolean(composer.fallbackWarn) ? !composer.fallbackWarn : composer.fallbackWarn;
  17666. },
  17667. set silentFallbackWarn(val) {
  17668. composer.fallbackWarn = isBoolean(val) ? !val : val;
  17669. },
  17670. // modifiers
  17671. get modifiers() {
  17672. return composer.modifiers;
  17673. },
  17674. // formatFallbackMessages
  17675. get formatFallbackMessages() {
  17676. return composer.fallbackFormat;
  17677. },
  17678. set formatFallbackMessages(val) {
  17679. composer.fallbackFormat = val;
  17680. },
  17681. // postTranslation
  17682. get postTranslation() {
  17683. return composer.getPostTranslationHandler();
  17684. },
  17685. set postTranslation(handler) {
  17686. composer.setPostTranslationHandler(handler);
  17687. },
  17688. // sync
  17689. get sync() {
  17690. return composer.inheritLocale;
  17691. },
  17692. set sync(val) {
  17693. composer.inheritLocale = val;
  17694. },
  17695. // warnInHtmlMessage
  17696. get warnHtmlInMessage() {
  17697. return composer.warnHtmlMessage ? "warn" : "off";
  17698. },
  17699. set warnHtmlInMessage(val) {
  17700. composer.warnHtmlMessage = val !== "off";
  17701. },
  17702. // escapeParameterHtml
  17703. get escapeParameterHtml() {
  17704. return composer.escapeParameter;
  17705. },
  17706. set escapeParameterHtml(val) {
  17707. composer.escapeParameter = val;
  17708. },
  17709. // preserveDirectiveContent
  17710. get preserveDirectiveContent() {
  17711. warn(getWarnMessage(
  17712. 9
  17713. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  17714. ));
  17715. return true;
  17716. },
  17717. set preserveDirectiveContent(val) {
  17718. warn(getWarnMessage(
  17719. 9
  17720. /* NOT_SUPPORTED_PRESERVE_DIRECTIVE */
  17721. ));
  17722. },
  17723. // pluralizationRules
  17724. get pluralizationRules() {
  17725. return composer.pluralRules || {};
  17726. },
  17727. // for internal
  17728. __composer: composer,
  17729. // t
  17730. t(...args) {
  17731. const [arg1, arg2, arg3] = args;
  17732. const options2 = {};
  17733. let list = null;
  17734. let named = null;
  17735. if (!isString(arg1)) {
  17736. throw createI18nError(
  17737. 15
  17738. /* INVALID_ARGUMENT */
  17739. );
  17740. }
  17741. const key = arg1;
  17742. if (isString(arg2)) {
  17743. options2.locale = arg2;
  17744. } else if (isArray(arg2)) {
  17745. list = arg2;
  17746. } else if (isPlainObject(arg2)) {
  17747. named = arg2;
  17748. }
  17749. if (isArray(arg3)) {
  17750. list = arg3;
  17751. } else if (isPlainObject(arg3)) {
  17752. named = arg3;
  17753. }
  17754. return composer.t(key, list || named || {}, options2);
  17755. },
  17756. rt(...args) {
  17757. return composer.rt(...args);
  17758. },
  17759. // tc
  17760. tc(...args) {
  17761. const [arg1, arg2, arg3] = args;
  17762. const options2 = { plural: 1 };
  17763. let list = null;
  17764. let named = null;
  17765. if (!isString(arg1)) {
  17766. throw createI18nError(
  17767. 15
  17768. /* INVALID_ARGUMENT */
  17769. );
  17770. }
  17771. const key = arg1;
  17772. if (isString(arg2)) {
  17773. options2.locale = arg2;
  17774. } else if (isNumber(arg2)) {
  17775. options2.plural = arg2;
  17776. } else if (isArray(arg2)) {
  17777. list = arg2;
  17778. } else if (isPlainObject(arg2)) {
  17779. named = arg2;
  17780. }
  17781. if (isString(arg3)) {
  17782. options2.locale = arg3;
  17783. } else if (isArray(arg3)) {
  17784. list = arg3;
  17785. } else if (isPlainObject(arg3)) {
  17786. named = arg3;
  17787. }
  17788. return composer.t(key, list || named || {}, options2);
  17789. },
  17790. // te
  17791. te(key, locale) {
  17792. return composer.te(key, locale);
  17793. },
  17794. // tm
  17795. tm(key) {
  17796. return composer.tm(key);
  17797. },
  17798. // getLocaleMessage
  17799. getLocaleMessage(locale) {
  17800. return composer.getLocaleMessage(locale);
  17801. },
  17802. // setLocaleMessage
  17803. setLocaleMessage(locale, message) {
  17804. composer.setLocaleMessage(locale, message);
  17805. },
  17806. // mergeLocaleMessage
  17807. mergeLocaleMessage(locale, message) {
  17808. composer.mergeLocaleMessage(locale, message);
  17809. },
  17810. // d
  17811. d(...args) {
  17812. return composer.d(...args);
  17813. },
  17814. // getDateTimeFormat
  17815. getDateTimeFormat(locale) {
  17816. return composer.getDateTimeFormat(locale);
  17817. },
  17818. // setDateTimeFormat
  17819. setDateTimeFormat(locale, format2) {
  17820. composer.setDateTimeFormat(locale, format2);
  17821. },
  17822. // mergeDateTimeFormat
  17823. mergeDateTimeFormat(locale, format2) {
  17824. composer.mergeDateTimeFormat(locale, format2);
  17825. },
  17826. // n
  17827. n(...args) {
  17828. return composer.n(...args);
  17829. },
  17830. // getNumberFormat
  17831. getNumberFormat(locale) {
  17832. return composer.getNumberFormat(locale);
  17833. },
  17834. // setNumberFormat
  17835. setNumberFormat(locale, format2) {
  17836. composer.setNumberFormat(locale, format2);
  17837. },
  17838. // mergeNumberFormat
  17839. mergeNumberFormat(locale, format2) {
  17840. composer.mergeNumberFormat(locale, format2);
  17841. },
  17842. // getChoiceIndex
  17843. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  17844. getChoiceIndex(choice, choicesLength) {
  17845. warn(getWarnMessage(
  17846. 10
  17847. /* NOT_SUPPORTED_GET_CHOICE_INDEX */
  17848. ));
  17849. return -1;
  17850. },
  17851. // for internal
  17852. __onComponentInstanceCreated(target) {
  17853. const { componentInstanceCreatedListener } = options;
  17854. if (componentInstanceCreatedListener) {
  17855. componentInstanceCreatedListener(target, vueI18n);
  17856. }
  17857. }
  17858. };
  17859. {
  17860. vueI18n.__enableEmitter = (emitter) => {
  17861. const __composer = composer;
  17862. __composer[EnableEmitter] && __composer[EnableEmitter](emitter);
  17863. };
  17864. vueI18n.__disableEmitter = () => {
  17865. const __composer = composer;
  17866. __composer[DisableEmitter] && __composer[DisableEmitter]();
  17867. };
  17868. }
  17869. return vueI18n;
  17870. }
  17871. const baseFormatProps = {
  17872. tag: {
  17873. type: [String, Object]
  17874. },
  17875. locale: {
  17876. type: String
  17877. },
  17878. scope: {
  17879. type: String,
  17880. validator: (val) => val === "parent" || val === "global",
  17881. default: "parent"
  17882. },
  17883. i18n: {
  17884. type: Object
  17885. }
  17886. };
  17887. const Translation = {
  17888. /* eslint-disable */
  17889. name: "i18n-t",
  17890. props: assign({
  17891. keypath: {
  17892. type: String,
  17893. required: true
  17894. },
  17895. plural: {
  17896. type: [Number, String],
  17897. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  17898. validator: (val) => isNumber(val) || !isNaN(val)
  17899. }
  17900. }, baseFormatProps),
  17901. /* eslint-enable */
  17902. setup(props, context) {
  17903. const { slots, attrs } = context;
  17904. const i18n2 = props.i18n || useI18n({
  17905. useScope: props.scope,
  17906. __useComponent: true
  17907. });
  17908. const keys = Object.keys(slots).filter((key) => key !== "_");
  17909. return () => {
  17910. const options = {};
  17911. if (props.locale) {
  17912. options.locale = props.locale;
  17913. }
  17914. if (props.plural !== void 0) {
  17915. options.plural = isString(props.plural) ? +props.plural : props.plural;
  17916. }
  17917. const arg = getInterpolateArg(context, keys);
  17918. const children = i18n2[TransrateVNodeSymbol](props.keypath, arg, options);
  17919. const assignedAttrs = assign({}, attrs);
  17920. 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);
  17921. };
  17922. }
  17923. };
  17924. function getInterpolateArg({ slots }, keys) {
  17925. if (keys.length === 1 && keys[0] === "default") {
  17926. return slots.default ? slots.default() : [];
  17927. } else {
  17928. return keys.reduce((arg, key) => {
  17929. const slot = slots[key];
  17930. if (slot) {
  17931. arg[key] = slot();
  17932. }
  17933. return arg;
  17934. }, {});
  17935. }
  17936. }
  17937. function renderFormatter(props, context, slotKeys, partFormatter) {
  17938. const { slots, attrs } = context;
  17939. return () => {
  17940. const options = { part: true };
  17941. let overrides = {};
  17942. if (props.locale) {
  17943. options.locale = props.locale;
  17944. }
  17945. if (isString(props.format)) {
  17946. options.key = props.format;
  17947. } else if (isObject$1(props.format)) {
  17948. if (isString(props.format.key)) {
  17949. options.key = props.format.key;
  17950. }
  17951. overrides = Object.keys(props.format).reduce((options2, prop) => {
  17952. return slotKeys.includes(prop) ? assign({}, options2, { [prop]: props.format[prop] }) : options2;
  17953. }, {});
  17954. }
  17955. const parts = partFormatter(...[props.value, options, overrides]);
  17956. let children = [options.key];
  17957. if (isArray(parts)) {
  17958. children = parts.map((part, index) => {
  17959. const slot = slots[part.type];
  17960. return slot ? slot({ [part.type]: part.value, index, parts }) : [part.value];
  17961. });
  17962. } else if (isString(parts)) {
  17963. children = [parts];
  17964. }
  17965. const assignedAttrs = assign({}, attrs);
  17966. 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);
  17967. };
  17968. }
  17969. const NUMBER_FORMAT_KEYS = [
  17970. "localeMatcher",
  17971. "style",
  17972. "unit",
  17973. "unitDisplay",
  17974. "currency",
  17975. "currencyDisplay",
  17976. "useGrouping",
  17977. "numberingSystem",
  17978. "minimumIntegerDigits",
  17979. "minimumFractionDigits",
  17980. "maximumFractionDigits",
  17981. "minimumSignificantDigits",
  17982. "maximumSignificantDigits",
  17983. "notation",
  17984. "formatMatcher"
  17985. ];
  17986. const NumberFormat = {
  17987. /* eslint-disable */
  17988. name: "i18n-n",
  17989. props: assign({
  17990. value: {
  17991. type: Number,
  17992. required: true
  17993. },
  17994. format: {
  17995. type: [String, Object]
  17996. }
  17997. }, baseFormatProps),
  17998. /* eslint-enable */
  17999. setup(props, context) {
  18000. const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
  18001. return renderFormatter(props, context, NUMBER_FORMAT_KEYS, (...args) => (
  18002. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  18003. i18n2[NumberPartsSymbol](...args)
  18004. ));
  18005. }
  18006. };
  18007. const DATETIME_FORMAT_KEYS = [
  18008. "dateStyle",
  18009. "timeStyle",
  18010. "fractionalSecondDigits",
  18011. "calendar",
  18012. "dayPeriod",
  18013. "numberingSystem",
  18014. "localeMatcher",
  18015. "timeZone",
  18016. "hour12",
  18017. "hourCycle",
  18018. "formatMatcher",
  18019. "weekday",
  18020. "era",
  18021. "year",
  18022. "month",
  18023. "day",
  18024. "hour",
  18025. "minute",
  18026. "second",
  18027. "timeZoneName"
  18028. ];
  18029. const DatetimeFormat = {
  18030. /* eslint-disable */
  18031. name: "i18n-d",
  18032. props: assign({
  18033. value: {
  18034. type: [Number, Date],
  18035. required: true
  18036. },
  18037. format: {
  18038. type: [String, Object]
  18039. }
  18040. }, baseFormatProps),
  18041. /* eslint-enable */
  18042. setup(props, context) {
  18043. const i18n2 = props.i18n || useI18n({ useScope: "parent", __useComponent: true });
  18044. return renderFormatter(props, context, DATETIME_FORMAT_KEYS, (...args) => (
  18045. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  18046. i18n2[DatetimePartsSymbol](...args)
  18047. ));
  18048. }
  18049. };
  18050. function getComposer$2(i18n2, instance) {
  18051. const i18nInternal = i18n2;
  18052. if (i18n2.mode === "composition") {
  18053. return i18nInternal.__getInstance(instance) || i18n2.global;
  18054. } else {
  18055. const vueI18n = i18nInternal.__getInstance(instance);
  18056. return vueI18n != null ? vueI18n.__composer : i18n2.global.__composer;
  18057. }
  18058. }
  18059. function vTDirective(i18n2) {
  18060. const bind = (el, { instance, value, modifiers }) => {
  18061. if (!instance || !instance.$) {
  18062. throw createI18nError(
  18063. 22
  18064. /* UNEXPECTED_ERROR */
  18065. );
  18066. }
  18067. const composer = getComposer$2(i18n2, instance.$);
  18068. if (modifiers.preserve) {
  18069. warn(getWarnMessage(
  18070. 7
  18071. /* NOT_SUPPORTED_PRESERVE */
  18072. ));
  18073. }
  18074. const parsedValue = parseValue(value);
  18075. el.textContent = composer.t(...makeParams(parsedValue));
  18076. };
  18077. return {
  18078. beforeMount: bind,
  18079. beforeUpdate: bind
  18080. };
  18081. }
  18082. function parseValue(value) {
  18083. if (isString(value)) {
  18084. return { path: value };
  18085. } else if (isPlainObject(value)) {
  18086. if (!("path" in value)) {
  18087. throw createI18nError(19, "path");
  18088. }
  18089. return value;
  18090. } else {
  18091. throw createI18nError(
  18092. 20
  18093. /* INVALID_VALUE */
  18094. );
  18095. }
  18096. }
  18097. function makeParams(value) {
  18098. const { path, locale, args, choice, plural } = value;
  18099. const options = {};
  18100. const named = args || {};
  18101. if (isString(locale)) {
  18102. options.locale = locale;
  18103. }
  18104. if (isNumber(choice)) {
  18105. options.plural = choice;
  18106. }
  18107. if (isNumber(plural)) {
  18108. options.plural = plural;
  18109. }
  18110. return [path, named, options];
  18111. }
  18112. function apply(app, i18n2, ...options) {
  18113. const pluginOptions = isPlainObject(options[0]) ? options[0] : {};
  18114. const useI18nComponentName = !!pluginOptions.useI18nComponentName;
  18115. const globalInstall = isBoolean(pluginOptions.globalInstall) ? pluginOptions.globalInstall : true;
  18116. if (globalInstall && useI18nComponentName) {
  18117. warn(getWarnMessage(11, {
  18118. name: Translation.name
  18119. }));
  18120. }
  18121. if (globalInstall) {
  18122. app.component(!useI18nComponentName ? Translation.name : "i18n", Translation);
  18123. app.component(NumberFormat.name, NumberFormat);
  18124. app.component(DatetimeFormat.name, DatetimeFormat);
  18125. }
  18126. app.directive("t", vTDirective(i18n2));
  18127. }
  18128. const VUE_I18N_COMPONENT_TYPES = "vue-i18n: composer properties";
  18129. let devtoolsApi;
  18130. async function enableDevTools(app, i18n2) {
  18131. return new Promise((resolve, reject) => {
  18132. try {
  18133. setupDevtoolsPlugin({
  18134. id: "vue-devtools-plugin-vue-i18n",
  18135. label: VueDevToolsLabels[
  18136. "vue-devtools-plugin-vue-i18n"
  18137. /* PLUGIN */
  18138. ],
  18139. packageName: "vue-i18n",
  18140. homepage: "https://vue-i18n.intlify.dev",
  18141. logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
  18142. componentStateTypes: [VUE_I18N_COMPONENT_TYPES],
  18143. app
  18144. }, (api) => {
  18145. devtoolsApi = api;
  18146. api.on.visitComponentTree(({ componentInstance, treeNode }) => {
  18147. updateComponentTreeTags(componentInstance, treeNode, i18n2);
  18148. });
  18149. api.on.inspectComponent(({ componentInstance, instanceData }) => {
  18150. if (componentInstance.vnode.el.__VUE_I18N__ && instanceData) {
  18151. if (i18n2.mode === "legacy") {
  18152. if (componentInstance.vnode.el.__VUE_I18N__ !== i18n2.global.__composer) {
  18153. inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
  18154. }
  18155. } else {
  18156. inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);
  18157. }
  18158. }
  18159. });
  18160. api.addInspector({
  18161. id: "vue-i18n-resource-inspector",
  18162. label: VueDevToolsLabels[
  18163. "vue-i18n-resource-inspector"
  18164. /* CUSTOM_INSPECTOR */
  18165. ],
  18166. icon: "language",
  18167. treeFilterPlaceholder: VueDevToolsPlaceholders[
  18168. "vue-i18n-resource-inspector"
  18169. /* CUSTOM_INSPECTOR */
  18170. ]
  18171. });
  18172. api.on.getInspectorTree((payload) => {
  18173. if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
  18174. registerScope(payload, i18n2);
  18175. }
  18176. });
  18177. api.on.getInspectorState((payload) => {
  18178. if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
  18179. inspectScope(payload, i18n2);
  18180. }
  18181. });
  18182. api.on.editInspectorState((payload) => {
  18183. if (payload.app === app && payload.inspectorId === "vue-i18n-resource-inspector") {
  18184. editScope(payload, i18n2);
  18185. }
  18186. });
  18187. api.addTimelineLayer({
  18188. id: "vue-i18n-timeline",
  18189. label: VueDevToolsLabels[
  18190. "vue-i18n-timeline"
  18191. /* TIMELINE */
  18192. ],
  18193. color: VueDevToolsTimelineColors[
  18194. "vue-i18n-timeline"
  18195. /* TIMELINE */
  18196. ]
  18197. });
  18198. resolve(true);
  18199. });
  18200. } catch (e2) {
  18201. console.error(e2);
  18202. reject(false);
  18203. }
  18204. });
  18205. }
  18206. function updateComponentTreeTags(instance, treeNode, i18n2) {
  18207. const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  18208. if (instance && instance.vnode.el.__VUE_I18N__) {
  18209. if (instance.vnode.el.__VUE_I18N__ !== global2) {
  18210. const label = instance.type.name || instance.type.displayName || instance.type.__file;
  18211. const tag = {
  18212. label: `i18n (${label} Scope)`,
  18213. textColor: 0,
  18214. backgroundColor: 16764185
  18215. };
  18216. treeNode.tags.push(tag);
  18217. }
  18218. }
  18219. }
  18220. function inspectComposer(instanceData, composer) {
  18221. const type = VUE_I18N_COMPONENT_TYPES;
  18222. instanceData.state.push({
  18223. type,
  18224. key: "locale",
  18225. editable: true,
  18226. value: composer.locale.value
  18227. });
  18228. instanceData.state.push({
  18229. type,
  18230. key: "availableLocales",
  18231. editable: false,
  18232. value: composer.availableLocales
  18233. });
  18234. instanceData.state.push({
  18235. type,
  18236. key: "fallbackLocale",
  18237. editable: true,
  18238. value: composer.fallbackLocale.value
  18239. });
  18240. instanceData.state.push({
  18241. type,
  18242. key: "inheritLocale",
  18243. editable: true,
  18244. value: composer.inheritLocale
  18245. });
  18246. instanceData.state.push({
  18247. type,
  18248. key: "messages",
  18249. editable: false,
  18250. value: getLocaleMessageValue(composer.messages.value)
  18251. });
  18252. instanceData.state.push({
  18253. type,
  18254. key: "datetimeFormats",
  18255. editable: false,
  18256. value: composer.datetimeFormats.value
  18257. });
  18258. instanceData.state.push({
  18259. type,
  18260. key: "numberFormats",
  18261. editable: false,
  18262. value: composer.numberFormats.value
  18263. });
  18264. }
  18265. function getLocaleMessageValue(messages2) {
  18266. const value = {};
  18267. Object.keys(messages2).forEach((key) => {
  18268. const v2 = messages2[key];
  18269. if (isFunction(v2) && "source" in v2) {
  18270. value[key] = getMessageFunctionDetails(v2);
  18271. } else if (isObject$1(v2)) {
  18272. value[key] = getLocaleMessageValue(v2);
  18273. } else {
  18274. value[key] = v2;
  18275. }
  18276. });
  18277. return value;
  18278. }
  18279. const ESC = {
  18280. "<": "&lt;",
  18281. ">": "&gt;",
  18282. '"': "&quot;",
  18283. "&": "&amp;"
  18284. };
  18285. function escape$1(s2) {
  18286. return s2.replace(/[<>"&]/g, escapeChar);
  18287. }
  18288. function escapeChar(a2) {
  18289. return ESC[a2] || a2;
  18290. }
  18291. function getMessageFunctionDetails(func) {
  18292. const argString = func.source ? `("${escape$1(func.source)}")` : `(?)`;
  18293. return {
  18294. _custom: {
  18295. type: "function",
  18296. display: `<span>ƒ</span> ${argString}`
  18297. }
  18298. };
  18299. }
  18300. function registerScope(payload, i18n2) {
  18301. payload.rootNodes.push({
  18302. id: "global",
  18303. label: "Global Scope"
  18304. });
  18305. const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  18306. for (const [keyInstance, instance] of i18n2.__instances) {
  18307. const composer = i18n2.mode === "composition" ? instance : instance.__composer;
  18308. if (global2 === composer) {
  18309. continue;
  18310. }
  18311. const label = keyInstance.type.name || keyInstance.type.displayName || keyInstance.type.__file;
  18312. payload.rootNodes.push({
  18313. id: composer.id.toString(),
  18314. label: `${label} Scope`
  18315. });
  18316. }
  18317. }
  18318. function getComposer$1(nodeId, i18n2) {
  18319. if (nodeId === "global") {
  18320. return i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  18321. } else {
  18322. const instance = Array.from(i18n2.__instances.values()).find((item) => item.id.toString() === nodeId);
  18323. if (instance) {
  18324. return i18n2.mode === "composition" ? instance : instance.__composer;
  18325. } else {
  18326. return null;
  18327. }
  18328. }
  18329. }
  18330. function inspectScope(payload, i18n2) {
  18331. const composer = getComposer$1(payload.nodeId, i18n2);
  18332. if (composer) {
  18333. payload.state = makeScopeInspectState(composer);
  18334. }
  18335. }
  18336. function makeScopeInspectState(composer) {
  18337. const state2 = {};
  18338. const localeType = "Locale related info";
  18339. const localeStates = [
  18340. {
  18341. type: localeType,
  18342. key: "locale",
  18343. editable: true,
  18344. value: composer.locale.value
  18345. },
  18346. {
  18347. type: localeType,
  18348. key: "fallbackLocale",
  18349. editable: true,
  18350. value: composer.fallbackLocale.value
  18351. },
  18352. {
  18353. type: localeType,
  18354. key: "availableLocales",
  18355. editable: false,
  18356. value: composer.availableLocales
  18357. },
  18358. {
  18359. type: localeType,
  18360. key: "inheritLocale",
  18361. editable: true,
  18362. value: composer.inheritLocale
  18363. }
  18364. ];
  18365. state2[localeType] = localeStates;
  18366. const localeMessagesType = "Locale messages info";
  18367. const localeMessagesStates = [
  18368. {
  18369. type: localeMessagesType,
  18370. key: "messages",
  18371. editable: false,
  18372. value: getLocaleMessageValue(composer.messages.value)
  18373. }
  18374. ];
  18375. state2[localeMessagesType] = localeMessagesStates;
  18376. const datetimeFormatsType = "Datetime formats info";
  18377. const datetimeFormatsStates = [
  18378. {
  18379. type: datetimeFormatsType,
  18380. key: "datetimeFormats",
  18381. editable: false,
  18382. value: composer.datetimeFormats.value
  18383. }
  18384. ];
  18385. state2[datetimeFormatsType] = datetimeFormatsStates;
  18386. const numberFormatsType = "Datetime formats info";
  18387. const numberFormatsStates = [
  18388. {
  18389. type: numberFormatsType,
  18390. key: "numberFormats",
  18391. editable: false,
  18392. value: composer.numberFormats.value
  18393. }
  18394. ];
  18395. state2[numberFormatsType] = numberFormatsStates;
  18396. return state2;
  18397. }
  18398. function addTimelineEvent(event, payload) {
  18399. if (devtoolsApi) {
  18400. let groupId;
  18401. if (payload && "groupId" in payload) {
  18402. groupId = payload.groupId;
  18403. delete payload.groupId;
  18404. }
  18405. devtoolsApi.addTimelineEvent({
  18406. layerId: "vue-i18n-timeline",
  18407. event: {
  18408. title: event,
  18409. groupId,
  18410. time: Date.now(),
  18411. meta: {},
  18412. data: payload || {},
  18413. logType: event === "compile-error" ? "error" : event === "fallback" || event === "missing" ? "warning" : "default"
  18414. }
  18415. });
  18416. }
  18417. }
  18418. function editScope(payload, i18n2) {
  18419. const composer = getComposer$1(payload.nodeId, i18n2);
  18420. if (composer) {
  18421. const [field] = payload.path;
  18422. if (field === "locale" && isString(payload.state.value)) {
  18423. composer.locale.value = payload.state.value;
  18424. } else if (field === "fallbackLocale" && (isString(payload.state.value) || isArray(payload.state.value) || isObject$1(payload.state.value))) {
  18425. composer.fallbackLocale.value = payload.state.value;
  18426. } else if (field === "inheritLocale" && isBoolean(payload.state.value)) {
  18427. composer.inheritLocale = payload.state.value;
  18428. }
  18429. }
  18430. }
  18431. function defineMixin(vuei18n, composer, i18n2) {
  18432. return {
  18433. beforeCreate() {
  18434. const instance = vue.getCurrentInstance();
  18435. if (!instance) {
  18436. throw createI18nError(
  18437. 22
  18438. /* UNEXPECTED_ERROR */
  18439. );
  18440. }
  18441. const options = this.$options;
  18442. if (options.i18n) {
  18443. const optionsI18n = options.i18n;
  18444. if (options.__i18n) {
  18445. optionsI18n.__i18n = options.__i18n;
  18446. }
  18447. optionsI18n.__root = composer;
  18448. if (this === this.$root) {
  18449. this.$i18n = mergeToRoot(vuei18n, optionsI18n);
  18450. } else {
  18451. optionsI18n.__injectWithOption = true;
  18452. this.$i18n = createVueI18n(optionsI18n);
  18453. }
  18454. } else if (options.__i18n) {
  18455. if (this === this.$root) {
  18456. this.$i18n = mergeToRoot(vuei18n, options);
  18457. } else {
  18458. this.$i18n = createVueI18n({
  18459. __i18n: options.__i18n,
  18460. __injectWithOption: true,
  18461. __root: composer
  18462. });
  18463. }
  18464. } else {
  18465. this.$i18n = vuei18n;
  18466. }
  18467. vuei18n.__onComponentInstanceCreated(this.$i18n);
  18468. i18n2.__setInstance(instance, this.$i18n);
  18469. this.$t = (...args) => this.$i18n.t(...args);
  18470. this.$rt = (...args) => this.$i18n.rt(...args);
  18471. this.$tc = (...args) => this.$i18n.tc(...args);
  18472. this.$te = (key, locale) => this.$i18n.te(key, locale);
  18473. this.$d = (...args) => this.$i18n.d(...args);
  18474. this.$n = (...args) => this.$i18n.n(...args);
  18475. this.$tm = (key) => this.$i18n.tm(key);
  18476. },
  18477. mounted() {
  18478. {
  18479. this.$el.__VUE_I18N__ = this.$i18n.__composer;
  18480. const emitter = this.__v_emitter = createEmitter();
  18481. const _vueI18n = this.$i18n;
  18482. _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
  18483. emitter.on("*", addTimelineEvent);
  18484. }
  18485. },
  18486. beforeUnmount() {
  18487. const instance = vue.getCurrentInstance();
  18488. if (!instance) {
  18489. throw createI18nError(
  18490. 22
  18491. /* UNEXPECTED_ERROR */
  18492. );
  18493. }
  18494. {
  18495. if (this.__v_emitter) {
  18496. this.__v_emitter.off("*", addTimelineEvent);
  18497. delete this.__v_emitter;
  18498. }
  18499. const _vueI18n = this.$i18n;
  18500. _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();
  18501. delete this.$el.__VUE_I18N__;
  18502. }
  18503. delete this.$t;
  18504. delete this.$rt;
  18505. delete this.$tc;
  18506. delete this.$te;
  18507. delete this.$d;
  18508. delete this.$n;
  18509. delete this.$tm;
  18510. i18n2.__deleteInstance(instance);
  18511. delete this.$i18n;
  18512. }
  18513. };
  18514. }
  18515. function mergeToRoot(root, options) {
  18516. root.locale = options.locale || root.locale;
  18517. root.fallbackLocale = options.fallbackLocale || root.fallbackLocale;
  18518. root.missing = options.missing || root.missing;
  18519. root.silentTranslationWarn = options.silentTranslationWarn || root.silentFallbackWarn;
  18520. root.silentFallbackWarn = options.silentFallbackWarn || root.silentFallbackWarn;
  18521. root.formatFallbackMessages = options.formatFallbackMessages || root.formatFallbackMessages;
  18522. root.postTranslation = options.postTranslation || root.postTranslation;
  18523. root.warnHtmlInMessage = options.warnHtmlInMessage || root.warnHtmlInMessage;
  18524. root.escapeParameterHtml = options.escapeParameterHtml || root.escapeParameterHtml;
  18525. root.sync = options.sync || root.sync;
  18526. root.__composer[SetPluralRulesSymbol](options.pluralizationRules || root.pluralizationRules);
  18527. const messages2 = getLocaleMessages(root.locale, {
  18528. messages: options.messages,
  18529. __i18n: options.__i18n
  18530. });
  18531. Object.keys(messages2).forEach((locale) => root.mergeLocaleMessage(locale, messages2[locale]));
  18532. if (options.datetimeFormats) {
  18533. Object.keys(options.datetimeFormats).forEach((locale) => root.mergeDateTimeFormat(locale, options.datetimeFormats[locale]));
  18534. }
  18535. if (options.numberFormats) {
  18536. Object.keys(options.numberFormats).forEach((locale) => root.mergeNumberFormat(locale, options.numberFormats[locale]));
  18537. }
  18538. return root;
  18539. }
  18540. function createI18n(options = {}) {
  18541. const __legacyMode = isBoolean(options.legacy) ? options.legacy : true;
  18542. const __globalInjection = !!options.globalInjection;
  18543. const __instances = /* @__PURE__ */ new Map();
  18544. const __global = __legacyMode ? createVueI18n(options) : createComposer(options);
  18545. const symbol = makeSymbol("vue-i18n");
  18546. const i18n2 = {
  18547. // mode
  18548. get mode() {
  18549. return __legacyMode ? "legacy" : "composition";
  18550. },
  18551. // install plugin
  18552. async install(app, ...options2) {
  18553. {
  18554. app.__VUE_I18N__ = i18n2;
  18555. }
  18556. app.__VUE_I18N_SYMBOL__ = symbol;
  18557. app.provide(app.__VUE_I18N_SYMBOL__, i18n2);
  18558. if (!__legacyMode && __globalInjection) {
  18559. injectGlobalFields(app, i18n2.global);
  18560. }
  18561. {
  18562. apply(app, i18n2, ...options2);
  18563. }
  18564. if (__legacyMode) {
  18565. app.mixin(defineMixin(__global, __global.__composer, i18n2));
  18566. }
  18567. {
  18568. const ret = await enableDevTools(app, i18n2);
  18569. if (!ret) {
  18570. throw createI18nError(
  18571. 21
  18572. /* CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN */
  18573. );
  18574. }
  18575. const emitter = createEmitter();
  18576. if (__legacyMode) {
  18577. const _vueI18n = __global;
  18578. _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);
  18579. } else {
  18580. const _composer = __global;
  18581. _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
  18582. }
  18583. emitter.on("*", addTimelineEvent);
  18584. }
  18585. },
  18586. // global accessor
  18587. get global() {
  18588. return __global;
  18589. },
  18590. // @internal
  18591. __instances,
  18592. // @internal
  18593. __getInstance(component) {
  18594. return __instances.get(component) || null;
  18595. },
  18596. // @internal
  18597. __setInstance(component, instance) {
  18598. __instances.set(component, instance);
  18599. },
  18600. // @internal
  18601. __deleteInstance(component) {
  18602. __instances.delete(component);
  18603. }
  18604. };
  18605. return i18n2;
  18606. }
  18607. function useI18n(options = {}) {
  18608. const instance = vue.getCurrentInstance();
  18609. if (instance == null) {
  18610. throw createI18nError(
  18611. 16
  18612. /* MUST_BE_CALL_SETUP_TOP */
  18613. );
  18614. }
  18615. if (!instance.appContext.app.__VUE_I18N_SYMBOL__) {
  18616. throw createI18nError(
  18617. 17
  18618. /* NOT_INSLALLED */
  18619. );
  18620. }
  18621. const i18n2 = vue.inject(instance.appContext.app.__VUE_I18N_SYMBOL__);
  18622. if (!i18n2) {
  18623. throw createI18nError(
  18624. 22
  18625. /* UNEXPECTED_ERROR */
  18626. );
  18627. }
  18628. const global2 = i18n2.mode === "composition" ? i18n2.global : i18n2.global.__composer;
  18629. const scope = isEmptyObject(options) ? "__i18n" in instance.type ? "local" : "global" : !options.useScope ? "local" : options.useScope;
  18630. if (scope === "global") {
  18631. let messages2 = isObject$1(options.messages) ? options.messages : {};
  18632. if ("__i18nGlobal" in instance.type) {
  18633. messages2 = getLocaleMessages(global2.locale.value, {
  18634. messages: messages2,
  18635. __i18n: instance.type.__i18nGlobal
  18636. });
  18637. }
  18638. const locales = Object.keys(messages2);
  18639. if (locales.length) {
  18640. locales.forEach((locale) => {
  18641. global2.mergeLocaleMessage(locale, messages2[locale]);
  18642. });
  18643. }
  18644. if (isObject$1(options.datetimeFormats)) {
  18645. const locales2 = Object.keys(options.datetimeFormats);
  18646. if (locales2.length) {
  18647. locales2.forEach((locale) => {
  18648. global2.mergeDateTimeFormat(locale, options.datetimeFormats[locale]);
  18649. });
  18650. }
  18651. }
  18652. if (isObject$1(options.numberFormats)) {
  18653. const locales2 = Object.keys(options.numberFormats);
  18654. if (locales2.length) {
  18655. locales2.forEach((locale) => {
  18656. global2.mergeNumberFormat(locale, options.numberFormats[locale]);
  18657. });
  18658. }
  18659. }
  18660. return global2;
  18661. }
  18662. if (scope === "parent") {
  18663. let composer2 = getComposer(i18n2, instance, options.__useComponent);
  18664. if (composer2 == null) {
  18665. {
  18666. warn(getWarnMessage(
  18667. 12
  18668. /* NOT_FOUND_PARENT_SCOPE */
  18669. ));
  18670. }
  18671. composer2 = global2;
  18672. }
  18673. return composer2;
  18674. }
  18675. if (i18n2.mode === "legacy") {
  18676. throw createI18nError(
  18677. 18
  18678. /* NOT_AVAILABLE_IN_LEGACY_MODE */
  18679. );
  18680. }
  18681. const i18nInternal = i18n2;
  18682. let composer = i18nInternal.__getInstance(instance);
  18683. if (composer == null) {
  18684. const type = instance.type;
  18685. const composerOptions = assign({}, options);
  18686. if (type.__i18n) {
  18687. composerOptions.__i18n = type.__i18n;
  18688. }
  18689. if (global2) {
  18690. composerOptions.__root = global2;
  18691. }
  18692. composer = createComposer(composerOptions);
  18693. setupLifeCycle(i18nInternal, instance, composer);
  18694. i18nInternal.__setInstance(instance, composer);
  18695. }
  18696. return composer;
  18697. }
  18698. function getComposer(i18n2, target, useComponent = false) {
  18699. let composer = null;
  18700. const root = target.root;
  18701. let current = target.parent;
  18702. while (current != null) {
  18703. const i18nInternal = i18n2;
  18704. if (i18n2.mode === "composition") {
  18705. composer = i18nInternal.__getInstance(current);
  18706. } else {
  18707. const vueI18n = i18nInternal.__getInstance(current);
  18708. if (vueI18n != null) {
  18709. composer = vueI18n.__composer;
  18710. }
  18711. if (useComponent && composer && !composer[InejctWithOption]) {
  18712. composer = null;
  18713. }
  18714. }
  18715. if (composer != null) {
  18716. break;
  18717. }
  18718. if (root === current) {
  18719. break;
  18720. }
  18721. current = current.parent;
  18722. }
  18723. return composer;
  18724. }
  18725. function setupLifeCycle(i18n2, target, composer) {
  18726. let emitter = null;
  18727. vue.onMounted(() => {
  18728. if (target.vnode.el) {
  18729. target.vnode.el.__VUE_I18N__ = composer;
  18730. emitter = createEmitter();
  18731. const _composer = composer;
  18732. _composer[EnableEmitter] && _composer[EnableEmitter](emitter);
  18733. emitter.on("*", addTimelineEvent);
  18734. }
  18735. }, target);
  18736. vue.onUnmounted(() => {
  18737. if (target.vnode.el && target.vnode.el.__VUE_I18N__) {
  18738. emitter && emitter.off("*", addTimelineEvent);
  18739. const _composer = composer;
  18740. _composer[DisableEmitter] && _composer[DisableEmitter]();
  18741. delete target.vnode.el.__VUE_I18N__;
  18742. }
  18743. i18n2.__deleteInstance(target);
  18744. }, target);
  18745. }
  18746. const globalExportProps = [
  18747. "locale",
  18748. "fallbackLocale",
  18749. "availableLocales"
  18750. ];
  18751. const globalExportMethods = ["t", "rt", "d", "n", "tm"];
  18752. function injectGlobalFields(app, composer) {
  18753. const i18n2 = /* @__PURE__ */ Object.create(null);
  18754. globalExportProps.forEach((prop) => {
  18755. const desc = Object.getOwnPropertyDescriptor(composer, prop);
  18756. if (!desc) {
  18757. throw createI18nError(
  18758. 22
  18759. /* UNEXPECTED_ERROR */
  18760. );
  18761. }
  18762. const wrap = vue.isRef(desc.value) ? {
  18763. get() {
  18764. return desc.value.value;
  18765. },
  18766. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  18767. set(val) {
  18768. desc.value.value = val;
  18769. }
  18770. } : {
  18771. get() {
  18772. return desc.get && desc.get();
  18773. }
  18774. };
  18775. Object.defineProperty(i18n2, prop, wrap);
  18776. });
  18777. app.config.globalProperties.$i18n = i18n2;
  18778. globalExportMethods.forEach((method) => {
  18779. const desc = Object.getOwnPropertyDescriptor(composer, method);
  18780. if (!desc || !desc.value) {
  18781. throw createI18nError(
  18782. 22
  18783. /* UNEXPECTED_ERROR */
  18784. );
  18785. }
  18786. Object.defineProperty(app.config.globalProperties, `$${method}`, desc);
  18787. });
  18788. }
  18789. {
  18790. initFeatureFlags();
  18791. }
  18792. {
  18793. const target = getGlobalThis();
  18794. target.__INTLIFY__ = true;
  18795. setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
  18796. }
  18797. class Request {
  18798. constructor(options = {}) {
  18799. this.baseUrl = options.baseUrl || "http://10.168.1.100";
  18800. this.url = options.url || "";
  18801. this.method = "GET";
  18802. this.data = null;
  18803. this.header = options.header || {};
  18804. this.beforeRequest = null;
  18805. this.afterRequest = null;
  18806. }
  18807. // 添加对header的支持
  18808. _mergeHeaders(customHeader = {}) {
  18809. return Object.assign({}, this.header, customHeader);
  18810. }
  18811. get(url, data = {}, header = {}) {
  18812. this.method = "GET";
  18813. this.url = this.baseUrl + url;
  18814. this.data = data;
  18815. this.header = this._mergeHeaders(header);
  18816. return this._();
  18817. }
  18818. post(url, data = {}, header = {}) {
  18819. this.method = "POST";
  18820. this.url = this.baseUrl + url;
  18821. this.data = data;
  18822. this.header = this._mergeHeaders(header);
  18823. return this._();
  18824. }
  18825. put(url, data = {}) {
  18826. this.method = "PUT";
  18827. this.url = this.baseUrl + url;
  18828. this.data = data;
  18829. return this._();
  18830. }
  18831. delete(url, data = {}) {
  18832. this.method = "DELETE";
  18833. this.url = this.baseUrl + url;
  18834. this.data = data;
  18835. return this._();
  18836. }
  18837. _() {
  18838. if (this.baseUrl == "") {
  18839. this.url = "http://10.168.1.100" + this.url;
  18840. }
  18841. this.beforeRequest && typeof this.beforeRequest === "function" && this.beforeRequest(this);
  18842. return new Promise((resolve, reject) => {
  18843. let weixin = wx;
  18844. if ("undefined" !== typeof uni) {
  18845. weixin = uni;
  18846. }
  18847. weixin.request({
  18848. url: this.url,
  18849. method: this.method,
  18850. data: this.data,
  18851. header: this.header,
  18852. success: (res) => {
  18853. resolve(res);
  18854. },
  18855. fail: (err) => {
  18856. reject(err);
  18857. },
  18858. complete: (res) => {
  18859. this.afterRequest && typeof this.afterRequest === "function" && this.afterRequest(res);
  18860. }
  18861. });
  18862. });
  18863. }
  18864. }
  18865. const $http = new Request();
  18866. var define_process_env_UNI_STATISTICS_CONFIG_default = { enable: true, version: "2" };
  18867. var define_process_env_UNI_STAT_TITLE_JSON_default = {};
  18868. var define_process_env_UNI_STAT_UNI_CLOUD_default = {};
  18869. const sys = uni.getSystemInfoSync();
  18870. const STAT_VERSION = "4.56";
  18871. const STAT_URL = "https://tongji.dcloud.io/uni/stat";
  18872. const STAT_H5_URL = "https://tongji.dcloud.io/uni/stat.gif";
  18873. const PAGE_PVER_TIME = 1800;
  18874. const APP_PVER_TIME = 300;
  18875. const OPERATING_TIME = 10;
  18876. const DIFF_TIME = 60 * 1e3 * 60 * 24;
  18877. const appid = "__UNI__8782431";
  18878. const dbSet = (name, value) => {
  18879. let data = uni.getStorageSync("$$STAT__DBDATA:" + appid) || {};
  18880. if (!data) {
  18881. data = {};
  18882. }
  18883. data[name] = value;
  18884. uni.setStorageSync("$$STAT__DBDATA:" + appid, data);
  18885. };
  18886. const dbGet = (name) => {
  18887. let data = uni.getStorageSync("$$STAT__DBDATA:" + appid) || {};
  18888. if (!data[name]) {
  18889. let dbdata = uni.getStorageSync("$$STAT__DBDATA:" + appid);
  18890. if (!dbdata) {
  18891. dbdata = {};
  18892. }
  18893. if (!dbdata[name]) {
  18894. return void 0;
  18895. }
  18896. data[name] = dbdata[name];
  18897. }
  18898. return data[name];
  18899. };
  18900. const dbRemove = (name) => {
  18901. let data = uni.getStorageSync("$$STAT__DBDATA:" + appid) || {};
  18902. if (data[name]) {
  18903. delete data[name];
  18904. uni.setStorageSync("$$STAT__DBDATA:" + appid, data);
  18905. } else {
  18906. data = uni.getStorageSync("$$STAT__DBDATA:" + appid);
  18907. if (data[name]) {
  18908. delete data[name];
  18909. uni.setStorageSync("$$STAT__DBDATA:" + appid, data);
  18910. }
  18911. }
  18912. };
  18913. const uniStatisticsConfig = define_process_env_UNI_STATISTICS_CONFIG_default;
  18914. let statConfig = {
  18915. appid: "__UNI__8782431"
  18916. };
  18917. let titleJsons = {};
  18918. titleJsons = define_process_env_UNI_STAT_TITLE_JSON_default;
  18919. const UUID_KEY = "__DC_STAT_UUID";
  18920. const UUID_VALUE = "__DC_UUID_VALUE";
  18921. function getUuid() {
  18922. let uuid = "";
  18923. if (get_platform_name() === "n") {
  18924. try {
  18925. uuid = plus.runtime.getDCloudId();
  18926. } catch (e2) {
  18927. uuid = "";
  18928. }
  18929. return uuid;
  18930. }
  18931. try {
  18932. uuid = uni.getStorageSync(UUID_KEY);
  18933. } catch (e2) {
  18934. uuid = UUID_VALUE;
  18935. }
  18936. if (!uuid) {
  18937. uuid = Date.now() + "" + Math.floor(Math.random() * 1e7);
  18938. try {
  18939. uni.setStorageSync(UUID_KEY, uuid);
  18940. } catch (e2) {
  18941. uni.setStorageSync(UUID_KEY, UUID_VALUE);
  18942. }
  18943. }
  18944. return uuid;
  18945. }
  18946. const get_uuid = (statData2) => {
  18947. return sys.deviceId || getUuid();
  18948. };
  18949. const get_odid = (statData2) => {
  18950. let odid = "";
  18951. if (get_platform_name() === "n") {
  18952. try {
  18953. odid = plus.device.uuid;
  18954. } catch (e2) {
  18955. odid = "";
  18956. }
  18957. return odid;
  18958. }
  18959. return sys.deviceId || getUuid();
  18960. };
  18961. const stat_config = statConfig;
  18962. const get_sgin = (statData2) => {
  18963. let arr = Object.keys(statData2);
  18964. let sortArr = arr.sort();
  18965. let sgin = {};
  18966. let sginStr = "";
  18967. for (var i2 in sortArr) {
  18968. sgin[sortArr[i2]] = statData2[sortArr[i2]];
  18969. sginStr += sortArr[i2] + "=" + statData2[sortArr[i2]] + "&";
  18970. }
  18971. return {
  18972. sign: "",
  18973. options: sginStr.substr(0, sginStr.length - 1)
  18974. };
  18975. };
  18976. const get_encodeURIComponent_options = (statData2) => {
  18977. let data = {};
  18978. for (let prop in statData2) {
  18979. data[prop] = encodeURIComponent(statData2[prop]);
  18980. }
  18981. return data;
  18982. };
  18983. const get_platform_name = () => {
  18984. const aliArr = ["y", "a", "p", "mp-ali"];
  18985. const platformList = {
  18986. app: "n",
  18987. "app-plus": "n",
  18988. "app-harmony": "n",
  18989. "mp-harmony": "mhm",
  18990. h5: "h5",
  18991. "mp-weixin": "wx",
  18992. [aliArr.reverse().join("")]: "ali",
  18993. "mp-baidu": "bd",
  18994. "mp-toutiao": "tt",
  18995. "mp-qq": "qq",
  18996. "quickapp-native": "qn",
  18997. "mp-kuaishou": "ks",
  18998. "mp-lark": "lark",
  18999. "quickapp-webview": "qw",
  19000. "mp-xhs": "xhs"
  19001. };
  19002. if (platformList["app"] === "ali") {
  19003. if (my && my.env) {
  19004. const clientName = my.env.clientName;
  19005. if (clientName === "ap")
  19006. return "ali";
  19007. if (clientName === "dingtalk")
  19008. return "dt";
  19009. }
  19010. }
  19011. return platformList["app"] || "app";
  19012. };
  19013. const get_pack_name = () => {
  19014. let packName = "";
  19015. if (get_platform_name() === "wx" || get_platform_name() === "qq") {
  19016. if (uni.canIUse("getAccountInfoSync")) {
  19017. packName = uni.getAccountInfoSync().miniProgram.appId || "";
  19018. }
  19019. }
  19020. if (get_platform_name() === "n")
  19021. ;
  19022. return packName;
  19023. };
  19024. const get_version = () => {
  19025. return get_platform_name() === "n" ? plus.runtime.version : "";
  19026. };
  19027. const get_channel = () => {
  19028. const platformName = get_platform_name();
  19029. let channel = "";
  19030. if (platformName === "n") {
  19031. channel = plus.runtime.channel;
  19032. }
  19033. return channel;
  19034. };
  19035. const get_scene = (options) => {
  19036. const platformName = get_platform_name();
  19037. let scene = "";
  19038. if (options) {
  19039. return options;
  19040. }
  19041. if (platformName === "wx") {
  19042. scene = uni.getLaunchOptionsSync().scene;
  19043. }
  19044. return scene;
  19045. };
  19046. const get_route = (pageVm) => {
  19047. let _self = pageVm || get_page_vm();
  19048. if (get_platform_name() === "bd") {
  19049. let mp_route = _self.$mp && _self.$mp.page && _self.$mp.page.is;
  19050. let scope_route = _self.$scope && _self.$scope.is;
  19051. return mp_route || scope_route || "";
  19052. } else {
  19053. return _self.route || _self.$scope && _self.$scope.route || _self.$mp && _self.$mp.page.route;
  19054. }
  19055. };
  19056. const get_page_route = (pageVm) => {
  19057. let page = pageVm && (pageVm.$page || pageVm.$scope && pageVm.$scope.$page);
  19058. let lastPageRoute = uni.getStorageSync("_STAT_LAST_PAGE_ROUTE");
  19059. if (!page)
  19060. return lastPageRoute || "";
  19061. return page.fullPath === "/" ? page.route : page.fullPath || page.route;
  19062. };
  19063. const get_page_vm = () => {
  19064. let pages2 = getCurrentPages();
  19065. let $page = pages2[pages2.length - 1];
  19066. if (!$page)
  19067. return null;
  19068. return $page.$vm;
  19069. };
  19070. const get_page_types = (self2) => {
  19071. if (self2.mpType === "page" || self2.$mpType === "page" || self2.$mp && self2.$mp.mpType === "page" || self2.$options.mpType === "page") {
  19072. return "page";
  19073. }
  19074. if (self2.mpType === "app" || self2.$mpType === "app" || self2.$mp && self2.$mp.mpType === "app" || self2.$options.mpType === "app") {
  19075. return "app";
  19076. }
  19077. return null;
  19078. };
  19079. const handle_data = (statData2) => {
  19080. let firstArr = [];
  19081. let contentArr = [];
  19082. let lastArr = [];
  19083. for (let i2 in statData2) {
  19084. const rd = statData2[i2];
  19085. rd.forEach((elm) => {
  19086. let newData = "";
  19087. {
  19088. newData = elm;
  19089. }
  19090. if (i2 === 0) {
  19091. firstArr.push(newData);
  19092. } else if (i2 === 3) {
  19093. lastArr.push(newData);
  19094. } else {
  19095. contentArr.push(newData);
  19096. }
  19097. });
  19098. }
  19099. firstArr.push(...contentArr, ...lastArr);
  19100. return JSON.stringify(firstArr);
  19101. };
  19102. const calibration = (eventName, options) => {
  19103. if (!eventName) {
  19104. console.error(`uni.report Missing [eventName] parameter`);
  19105. return true;
  19106. }
  19107. if (typeof eventName !== "string") {
  19108. console.error(
  19109. `uni.report [eventName] Parameter type error, it can only be of type String`
  19110. );
  19111. return true;
  19112. }
  19113. if (eventName.length > 255) {
  19114. console.error(
  19115. `uni.report [eventName] Parameter length cannot be greater than 255`
  19116. );
  19117. return true;
  19118. }
  19119. if (typeof options !== "string" && typeof options !== "object") {
  19120. console.error(
  19121. "uni.report [options] Parameter type error, Only supports String or Object type"
  19122. );
  19123. return true;
  19124. }
  19125. if (typeof options === "string" && options.length > 255) {
  19126. console.error(
  19127. `uni.report [options] Parameter length cannot be greater than 255`
  19128. );
  19129. return true;
  19130. }
  19131. if (eventName === "title" && typeof options !== "string") {
  19132. console.error(
  19133. `uni.report [eventName] When the parameter is title, the [options] parameter can only be of type String`
  19134. );
  19135. return true;
  19136. }
  19137. };
  19138. const get_page_name = (routepath) => {
  19139. return titleJsons && titleJsons[routepath] || "";
  19140. };
  19141. const Report_Data_Time = "Report_Data_Time";
  19142. const Report_Status = "Report_Status";
  19143. const is_report_data = () => {
  19144. return new Promise((resolve, reject) => {
  19145. let start_time = "";
  19146. let end_time = (/* @__PURE__ */ new Date()).getTime();
  19147. let diff_time = DIFF_TIME;
  19148. let report_status = 1;
  19149. try {
  19150. start_time = uni.getStorageSync(Report_Data_Time);
  19151. report_status = uni.getStorageSync(Report_Status);
  19152. } catch (e2) {
  19153. start_time = "";
  19154. report_status = 1;
  19155. }
  19156. if (report_status === "") {
  19157. requestData(({ enable }) => {
  19158. uni.setStorageSync(Report_Data_Time, end_time);
  19159. uni.setStorageSync(Report_Status, enable);
  19160. if (enable === 1) {
  19161. resolve();
  19162. }
  19163. });
  19164. return;
  19165. }
  19166. if (report_status === 1) {
  19167. resolve();
  19168. }
  19169. if (!start_time) {
  19170. uni.setStorageSync(Report_Data_Time, end_time);
  19171. start_time = end_time;
  19172. }
  19173. if (end_time - start_time > diff_time) {
  19174. requestData(({ enable }) => {
  19175. uni.setStorageSync(Report_Data_Time, end_time);
  19176. uni.setStorageSync(Report_Status, enable);
  19177. });
  19178. }
  19179. });
  19180. };
  19181. const requestData = (done) => {
  19182. const appid2 = "__UNI__8782431";
  19183. let formData = {
  19184. usv: STAT_VERSION,
  19185. conf: JSON.stringify({
  19186. ak: appid2
  19187. })
  19188. };
  19189. uni.request({
  19190. url: STAT_URL,
  19191. method: "GET",
  19192. data: formData,
  19193. success: (res) => {
  19194. const { data } = res;
  19195. if (data.ret === 0) {
  19196. typeof done === "function" && done({
  19197. enable: data.enable
  19198. });
  19199. }
  19200. },
  19201. fail: (e2) => {
  19202. let report_status_code = 1;
  19203. try {
  19204. report_status_code = uni.getStorageSync(Report_Status);
  19205. } catch (e22) {
  19206. report_status_code = 1;
  19207. }
  19208. if (report_status_code === "") {
  19209. report_status_code = 1;
  19210. }
  19211. typeof done === "function" && done({
  19212. enable: report_status_code
  19213. });
  19214. }
  19215. });
  19216. };
  19217. const uni_cloud_config = () => {
  19218. return define_process_env_UNI_STAT_UNI_CLOUD_default || {};
  19219. };
  19220. const get_space = (config) => {
  19221. const uniCloudConfig = uni_cloud_config();
  19222. const { spaceId, provider, clientSecret, secretKey, secretId } = uniCloudConfig;
  19223. const space_type = ["tcb", "tencent", "aliyun", "alipay", "private", "dcloud"];
  19224. const is_provider = space_type.indexOf(provider) !== -1;
  19225. const is_aliyun = provider === "aliyun" && spaceId && clientSecret;
  19226. const is_tcb = (provider === "tcb" || provider === "tencent") && spaceId;
  19227. const is_alipay = provider === "alipay" && spaceId && secretKey && secretId;
  19228. const is_private = provider === "private" && spaceId && clientSecret;
  19229. const is_dcloud = provider === "dcloud" && spaceId && clientSecret;
  19230. if (is_provider && (is_aliyun || is_tcb || is_alipay || is_private || is_dcloud)) {
  19231. return uniCloudConfig;
  19232. } else {
  19233. if (config && config.spaceId) {
  19234. return config;
  19235. }
  19236. }
  19237. return null;
  19238. };
  19239. const get_report_Interval = (defaultTime) => {
  19240. let time = uniStatisticsConfig.reportInterval;
  19241. if (Number(time) === 0)
  19242. return 0;
  19243. time = time || defaultTime;
  19244. let reg = /(^[1-9]\d*$)/;
  19245. if (!reg.test(time))
  19246. return defaultTime;
  19247. return Number(time);
  19248. };
  19249. const is_push_clientid = () => {
  19250. if (uniStatisticsConfig.collectItems) {
  19251. const ClientID = uniStatisticsConfig.collectItems.uniPushClientID;
  19252. return typeof ClientID === "boolean" ? ClientID : false;
  19253. }
  19254. return false;
  19255. };
  19256. const is_page_report = () => {
  19257. if (uniStatisticsConfig.collectItems) {
  19258. const statPageLog = uniStatisticsConfig.collectItems.uniStatPageLog;
  19259. if (statPageLog === void 0)
  19260. return true;
  19261. return typeof statPageLog === "boolean" ? statPageLog : true;
  19262. }
  19263. return true;
  19264. };
  19265. const IS_HANDLE_DEVECE_ID = "is_handle_device_id";
  19266. const is_handle_device = () => {
  19267. let isHandleDevice = dbGet(IS_HANDLE_DEVECE_ID) || "";
  19268. dbSet(IS_HANDLE_DEVECE_ID, "1");
  19269. return isHandleDevice === "1";
  19270. };
  19271. const FIRST_VISIT_TIME_KEY = "__first__visit__time";
  19272. const LAST_VISIT_TIME_KEY = "__last__visit__time";
  19273. const get_time = () => {
  19274. return parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3);
  19275. };
  19276. const get_first_visit_time = () => {
  19277. const timeStorge = dbGet(FIRST_VISIT_TIME_KEY);
  19278. let time = 0;
  19279. if (timeStorge) {
  19280. time = timeStorge;
  19281. } else {
  19282. time = get_time();
  19283. dbSet(FIRST_VISIT_TIME_KEY, time);
  19284. dbRemove(LAST_VISIT_TIME_KEY);
  19285. }
  19286. return time;
  19287. };
  19288. const get_last_visit_time = () => {
  19289. const timeStorge = dbGet(LAST_VISIT_TIME_KEY);
  19290. let time = 0;
  19291. if (timeStorge) {
  19292. time = timeStorge;
  19293. }
  19294. dbSet(LAST_VISIT_TIME_KEY, get_time());
  19295. return time;
  19296. };
  19297. const PAGE_RESIDENCE_TIME = "__page__residence__time";
  19298. let First_Page_Residence_Time = 0;
  19299. let Last_Page_Residence_Time = 0;
  19300. const set_page_residence_time = () => {
  19301. First_Page_Residence_Time = get_time();
  19302. dbSet(PAGE_RESIDENCE_TIME, First_Page_Residence_Time);
  19303. return First_Page_Residence_Time;
  19304. };
  19305. const get_page_residence_time = () => {
  19306. Last_Page_Residence_Time = get_time();
  19307. First_Page_Residence_Time = dbGet(PAGE_RESIDENCE_TIME);
  19308. return Last_Page_Residence_Time - First_Page_Residence_Time;
  19309. };
  19310. const TOTAL_VISIT_COUNT = "__total__visit__count";
  19311. const get_total_visit_count = () => {
  19312. const timeStorge = dbGet(TOTAL_VISIT_COUNT);
  19313. let count = 1;
  19314. if (timeStorge) {
  19315. count = timeStorge;
  19316. count++;
  19317. }
  19318. dbSet(TOTAL_VISIT_COUNT, count);
  19319. return count;
  19320. };
  19321. const FIRST_TIME = "__first_time";
  19322. const set_first_time = () => {
  19323. let time = get_time();
  19324. const timeStorge = dbSet(FIRST_TIME, time);
  19325. return timeStorge;
  19326. };
  19327. const get_residence_time = (type) => {
  19328. let residenceTime = 0;
  19329. const first_time = dbGet(FIRST_TIME);
  19330. const last_time = get_time();
  19331. if (first_time !== 0) {
  19332. residenceTime = last_time - first_time;
  19333. }
  19334. residenceTime = residenceTime < 1 ? 1 : residenceTime;
  19335. if (type === "app") {
  19336. let overtime = residenceTime > APP_PVER_TIME ? true : false;
  19337. return {
  19338. residenceTime,
  19339. overtime
  19340. };
  19341. }
  19342. if (type === "page") {
  19343. let overtime = residenceTime > PAGE_PVER_TIME ? true : false;
  19344. return {
  19345. residenceTime,
  19346. overtime
  19347. };
  19348. }
  19349. return {
  19350. residenceTime
  19351. };
  19352. };
  19353. const eport_Interval = get_report_Interval(OPERATING_TIME);
  19354. let statData = {
  19355. uuid: get_uuid(),
  19356. // 设备标识
  19357. ak: stat_config.appid,
  19358. // uni-app 应用 Appid
  19359. p: "",
  19360. // 手机系统,客户端平台
  19361. ut: get_platform_name(),
  19362. // 平台类型
  19363. mpn: get_pack_name(),
  19364. // 原生平台包名、小程序 appid
  19365. usv: STAT_VERSION,
  19366. // 统计 sdk 版本
  19367. v: get_version(),
  19368. // 应用版本,仅app
  19369. ch: get_channel(),
  19370. // 渠道信息
  19371. cn: "",
  19372. // 国家
  19373. pn: "",
  19374. // 省份
  19375. ct: "",
  19376. // 城市
  19377. t: get_time(),
  19378. // 上报数据时的时间戳
  19379. tt: "",
  19380. brand: sys.brand || "",
  19381. // 手机品牌
  19382. md: sys.model,
  19383. // 手机型号
  19384. sv: "",
  19385. // 手机系统版本
  19386. mpsdk: sys.SDKVersion || "",
  19387. // x程序 sdk version
  19388. mpv: sys.version || "",
  19389. // 小程序平台版本 ,如微信、支付宝
  19390. lang: sys.language,
  19391. // 语言
  19392. pr: sys.pixelRatio,
  19393. // pixelRatio 设备像素比
  19394. ww: sys.windowWidth,
  19395. // windowWidth 可使用窗口宽度
  19396. wh: sys.windowHeight,
  19397. // windowHeight 可使用窗口高度
  19398. sw: sys.screenWidth,
  19399. // screenWidth 屏幕宽度
  19400. sh: sys.screenHeight
  19401. // screenHeight 屏幕高度
  19402. };
  19403. if (sys.platform) {
  19404. switch (sys.platform) {
  19405. case "android":
  19406. statData.p = "a";
  19407. break;
  19408. case "ios":
  19409. statData.p = "i";
  19410. break;
  19411. case "harmonyos":
  19412. statData.p = "h";
  19413. break;
  19414. }
  19415. }
  19416. if (sys.system) {
  19417. statData.sv = sys.system.replace(/(Android|iOS)\s/, "");
  19418. }
  19419. class Report {
  19420. constructor() {
  19421. this.self = "";
  19422. this.__licationShow = false;
  19423. this.__licationHide = false;
  19424. this.statData = statData;
  19425. this._navigationBarTitle = {
  19426. config: "",
  19427. page: "",
  19428. report: "",
  19429. lt: ""
  19430. };
  19431. this._query = {};
  19432. let registerInterceptor = typeof uni.addInterceptor === "function";
  19433. if (registerInterceptor) {
  19434. this.addInterceptorInit();
  19435. this.interceptLogin();
  19436. this.interceptShare(true);
  19437. this.interceptRequestPayment();
  19438. }
  19439. }
  19440. addInterceptorInit() {
  19441. let self2 = this;
  19442. uni.addInterceptor("setNavigationBarTitle", {
  19443. invoke(args) {
  19444. self2._navigationBarTitle.page = args.title;
  19445. }
  19446. });
  19447. }
  19448. interceptLogin() {
  19449. let self2 = this;
  19450. uni.addInterceptor("login", {
  19451. complete() {
  19452. self2._login();
  19453. }
  19454. });
  19455. }
  19456. interceptShare(type) {
  19457. let self2 = this;
  19458. if (!type) {
  19459. self2._share();
  19460. return;
  19461. }
  19462. uni.addInterceptor("share", {
  19463. success() {
  19464. self2._share();
  19465. },
  19466. fail() {
  19467. self2._share();
  19468. }
  19469. });
  19470. }
  19471. interceptRequestPayment() {
  19472. let self2 = this;
  19473. uni.addInterceptor("requestPayment", {
  19474. success() {
  19475. self2._payment("pay_success");
  19476. },
  19477. fail() {
  19478. self2._payment("pay_fail");
  19479. }
  19480. });
  19481. }
  19482. _login() {
  19483. this.sendEventRequest(
  19484. {
  19485. key: "login"
  19486. },
  19487. 0
  19488. );
  19489. }
  19490. _share() {
  19491. this.sendEventRequest(
  19492. {
  19493. key: "share"
  19494. },
  19495. 0
  19496. );
  19497. }
  19498. _payment(key) {
  19499. this.sendEventRequest(
  19500. {
  19501. key
  19502. },
  19503. 0
  19504. );
  19505. }
  19506. /**
  19507. * 进入应用触发
  19508. */
  19509. applicationShow() {
  19510. if (this.__licationHide) {
  19511. const time = get_residence_time("app");
  19512. if (time.overtime) {
  19513. let lastPageRoute = uni.getStorageSync("_STAT_LAST_PAGE_ROUTE");
  19514. let options = {
  19515. path: lastPageRoute,
  19516. scene: this.statData.sc,
  19517. cst: 2
  19518. };
  19519. this.sendReportRequest(options);
  19520. } else {
  19521. const scene = get_scene();
  19522. if (scene !== this.statData.sc) {
  19523. let lastPageRoute = uni.getStorageSync("_STAT_LAST_PAGE_ROUTE");
  19524. let options = {
  19525. path: lastPageRoute,
  19526. scene,
  19527. cst: 2
  19528. };
  19529. this.sendReportRequest(options);
  19530. }
  19531. }
  19532. this.__licationHide = false;
  19533. }
  19534. }
  19535. /**
  19536. * 离开应用触发
  19537. * @param {Object} self
  19538. * @param {Object} type
  19539. */
  19540. applicationHide(self2, type) {
  19541. if (!self2) {
  19542. self2 = get_page_vm();
  19543. }
  19544. this.__licationHide = true;
  19545. const time = get_residence_time();
  19546. const route = get_page_route(self2);
  19547. uni.setStorageSync("_STAT_LAST_PAGE_ROUTE", route);
  19548. this.sendHideRequest(
  19549. {
  19550. urlref: route,
  19551. urlref_ts: time.residenceTime
  19552. },
  19553. type
  19554. );
  19555. set_first_time();
  19556. }
  19557. /**
  19558. * 进入页面触发
  19559. */
  19560. pageShow(self2) {
  19561. this._navigationBarTitle = {
  19562. config: "",
  19563. page: "",
  19564. report: "",
  19565. lt: ""
  19566. };
  19567. const route = get_page_route(self2);
  19568. const routepath = get_route(self2);
  19569. this._navigationBarTitle.config = get_page_name(routepath);
  19570. if (this.__licationShow) {
  19571. set_first_time();
  19572. uni.setStorageSync("_STAT_LAST_PAGE_ROUTE", route);
  19573. this.__licationShow = false;
  19574. return;
  19575. }
  19576. const time = get_residence_time("page");
  19577. if (time.overtime) {
  19578. let options = {
  19579. path: route,
  19580. scene: this.statData.sc,
  19581. cst: 3
  19582. };
  19583. this.sendReportRequest(options);
  19584. }
  19585. set_first_time();
  19586. }
  19587. /**
  19588. * 离开页面触发
  19589. */
  19590. pageHide(self2) {
  19591. if (!this.__licationHide) {
  19592. const time = get_residence_time("page");
  19593. let route = get_page_route(self2);
  19594. let lastPageRoute = uni.getStorageSync("_STAT_LAST_PAGE_ROUTE");
  19595. if (!lastPageRoute) {
  19596. lastPageRoute = route;
  19597. }
  19598. uni.setStorageSync("_STAT_LAST_PAGE_ROUTE", route);
  19599. this.sendPageRequest({
  19600. url: route,
  19601. urlref: lastPageRoute,
  19602. urlref_ts: time.residenceTime
  19603. });
  19604. return;
  19605. }
  19606. }
  19607. /**
  19608. * 发送请求,应用维度上报
  19609. * @param {Object} options 页面信息
  19610. * @param {Boolean} type 是否立即上报
  19611. */
  19612. sendReportRequest(options, type) {
  19613. this._navigationBarTitle.lt = "1";
  19614. this._navigationBarTitle.config = get_page_name(options.path);
  19615. let is_opt = options.query && JSON.stringify(options.query) !== "{}";
  19616. let query = is_opt ? "?" + JSON.stringify(options.query) : "";
  19617. const last_time = get_last_visit_time();
  19618. if (last_time !== 0 || !last_time) {
  19619. const odid = get_odid();
  19620. {
  19621. const have_device = is_handle_device();
  19622. if (!have_device) {
  19623. this.statData.odid = odid;
  19624. }
  19625. }
  19626. }
  19627. Object.assign(this.statData, {
  19628. lt: "1",
  19629. url: options.path + query || "",
  19630. t: get_time(),
  19631. sc: get_scene(options.scene),
  19632. fvts: get_first_visit_time(),
  19633. lvts: last_time,
  19634. tvc: get_total_visit_count(),
  19635. // create session type 上报类型 ,1 应用进入 2.后台30min进入 3.页面30min进入
  19636. cst: options.cst || 1
  19637. });
  19638. if (get_platform_name() === "n") {
  19639. this.getProperty(type);
  19640. } else {
  19641. this.getNetworkInfo(type);
  19642. }
  19643. }
  19644. /**
  19645. * 发送请求,页面维度上报
  19646. * @param {Object} opt
  19647. */
  19648. sendPageRequest(opt) {
  19649. let { url, urlref, urlref_ts } = opt;
  19650. this._navigationBarTitle.lt = "11";
  19651. let options = {
  19652. ak: this.statData.ak,
  19653. uuid: this.statData.uuid,
  19654. p: this.statData.p,
  19655. lt: "11",
  19656. ut: this.statData.ut,
  19657. url,
  19658. tt: this.statData.tt,
  19659. urlref,
  19660. urlref_ts,
  19661. ch: this.statData.ch,
  19662. usv: this.statData.usv,
  19663. t: get_time()
  19664. };
  19665. this.request(options);
  19666. }
  19667. /**
  19668. * 进入后台上报数据
  19669. * @param {Object} opt
  19670. * @param {Object} type
  19671. */
  19672. sendHideRequest(opt, type) {
  19673. let { urlref, urlref_ts } = opt;
  19674. let options = {
  19675. ak: this.statData.ak,
  19676. uuid: this.statData.uuid,
  19677. p: this.statData.p,
  19678. lt: "3",
  19679. ut: this.statData.ut,
  19680. urlref,
  19681. urlref_ts,
  19682. ch: this.statData.ch,
  19683. usv: this.statData.usv,
  19684. t: get_time()
  19685. };
  19686. this.request(options, type);
  19687. }
  19688. /**
  19689. * 自定义事件上报
  19690. */
  19691. sendEventRequest({ key = "", value = "" } = {}) {
  19692. let routepath = "";
  19693. try {
  19694. routepath = get_route();
  19695. } catch (error) {
  19696. const launch_options = dbGet("__launch_options");
  19697. routepath = launch_options.path;
  19698. }
  19699. this._navigationBarTitle.config = get_page_name(routepath);
  19700. this._navigationBarTitle.lt = "21";
  19701. let options = {
  19702. ak: this.statData.ak,
  19703. uuid: this.statData.uuid,
  19704. p: this.statData.p,
  19705. lt: "21",
  19706. ut: this.statData.ut,
  19707. url: routepath,
  19708. ch: this.statData.ch,
  19709. e_n: key,
  19710. e_v: typeof value === "object" ? JSON.stringify(value) : value.toString(),
  19711. usv: this.statData.usv,
  19712. t: get_time()
  19713. };
  19714. this.request(options);
  19715. }
  19716. sendPushRequest(options, cid) {
  19717. let time = get_time();
  19718. const statData2 = {
  19719. lt: "101",
  19720. cid,
  19721. t: time,
  19722. ut: this.statData.ut
  19723. };
  19724. const stat_data = handle_data({
  19725. 101: [statData2]
  19726. });
  19727. let optionsData = {
  19728. usv: STAT_VERSION,
  19729. //统计 SDK 版本号
  19730. t: time,
  19731. //发送请求时的时间戮
  19732. requests: stat_data
  19733. };
  19734. if (get_platform_name() === "n" && this.statData.p === "a") {
  19735. setTimeout(() => {
  19736. this.sendRequest(optionsData);
  19737. }, 200);
  19738. return;
  19739. }
  19740. this.sendRequest(optionsData);
  19741. }
  19742. /**
  19743. * 获取wgt资源版本
  19744. */
  19745. getProperty(type) {
  19746. plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
  19747. this.statData.v = wgtinfo.version || "";
  19748. this.getNetworkInfo(type);
  19749. });
  19750. }
  19751. /**
  19752. * 获取网络信息
  19753. */
  19754. getNetworkInfo(type) {
  19755. uni.getNetworkType({
  19756. success: (result) => {
  19757. this.statData.net = result.networkType;
  19758. this.getLocation(type);
  19759. }
  19760. });
  19761. }
  19762. /**
  19763. * 获取位置信息
  19764. */
  19765. getLocation(type) {
  19766. if (stat_config.getLocation) {
  19767. uni.getLocation({
  19768. type: "wgs84",
  19769. geocode: true,
  19770. success: (result) => {
  19771. if (result.address) {
  19772. this.statData.cn = result.address.country;
  19773. this.statData.pn = result.address.province;
  19774. this.statData.ct = result.address.city;
  19775. }
  19776. this.statData.lat = result.latitude;
  19777. this.statData.lng = result.longitude;
  19778. this.request(this.statData, type);
  19779. }
  19780. });
  19781. } else {
  19782. this.statData.lat = 0;
  19783. this.statData.lng = 0;
  19784. this.request(this.statData, type);
  19785. }
  19786. }
  19787. /**
  19788. * 发送请求
  19789. * @param {Object} data 上报数据
  19790. * @param {Object} type 类型
  19791. */
  19792. request(data, type) {
  19793. let time = get_time();
  19794. const title = this._navigationBarTitle;
  19795. Object.assign(data, {
  19796. ttn: title.page,
  19797. ttpj: title.config,
  19798. ttc: title.report
  19799. });
  19800. let uniStatData = dbGet("__UNI__STAT__DATA") || {};
  19801. if (!uniStatData[data.lt]) {
  19802. uniStatData[data.lt] = [];
  19803. }
  19804. uniStatData[data.lt].push(data);
  19805. dbSet("__UNI__STAT__DATA", uniStatData);
  19806. let page_residence_time = get_page_residence_time();
  19807. if (page_residence_time < eport_Interval && !type)
  19808. return;
  19809. set_page_residence_time();
  19810. const stat_data = handle_data(uniStatData);
  19811. let optionsData = {
  19812. usv: STAT_VERSION,
  19813. //统计 SDK 版本号
  19814. t: time,
  19815. //发送请求时的时间戮
  19816. requests: stat_data
  19817. };
  19818. dbRemove("__UNI__STAT__DATA");
  19819. if (get_platform_name() === "n" && this.statData.p === "a") {
  19820. setTimeout(() => {
  19821. this.sendRequest(optionsData);
  19822. }, 200);
  19823. return;
  19824. }
  19825. this.sendRequest(optionsData);
  19826. }
  19827. getIsReportData() {
  19828. return is_report_data();
  19829. }
  19830. /**
  19831. * 数据上报
  19832. * @param {Object} optionsData 需要上报的数据
  19833. */
  19834. sendRequest(optionsData) {
  19835. {
  19836. if (!uni.__stat_uniCloud_space) {
  19837. console.error(
  19838. "应用未关联服务空间,统计上报失败,请在uniCloud目录右键关联服务空间."
  19839. );
  19840. return;
  19841. }
  19842. const uniCloudObj = uni.__stat_uniCloud_space.importObject(
  19843. "uni-stat-receiver",
  19844. {
  19845. customUI: true
  19846. }
  19847. );
  19848. uniCloudObj.report(optionsData).then(() => {
  19849. }).catch((err) => {
  19850. });
  19851. }
  19852. }
  19853. /**
  19854. * h5 请求
  19855. */
  19856. imageRequest(data) {
  19857. this.getIsReportData().then(() => {
  19858. let image = new Image();
  19859. let options = get_sgin(get_encodeURIComponent_options(data)).options;
  19860. image.src = STAT_H5_URL + "?" + options;
  19861. });
  19862. }
  19863. sendEvent(key, value) {
  19864. if (calibration(key, value))
  19865. return;
  19866. if (key === "title") {
  19867. this._navigationBarTitle.report = value;
  19868. return;
  19869. }
  19870. this.sendEventRequest(
  19871. {
  19872. key,
  19873. value: typeof value === "object" ? JSON.stringify(value) : value
  19874. },
  19875. 1
  19876. );
  19877. }
  19878. }
  19879. class Stat extends Report {
  19880. static getInstance() {
  19881. if (!uni.__stat_instance) {
  19882. uni.__stat_instance = new Stat();
  19883. }
  19884. {
  19885. let space = get_space(nr.config);
  19886. if (!uni.__stat_uniCloud_space) {
  19887. if (space && Object.keys(space).length !== 0) {
  19888. let spaceData = {
  19889. provider: space.provider,
  19890. spaceId: space.spaceId,
  19891. clientSecret: space.clientSecret
  19892. };
  19893. if (space.endpoint) {
  19894. spaceData.endpoint = space.endpoint;
  19895. }
  19896. if (space.provider === "alipay") {
  19897. spaceData.secretKey = space.secretKey;
  19898. spaceData.accessKey = space.accessKey || space.secretId;
  19899. spaceData.spaceAppId = space.spaceAppId || space.appId;
  19900. }
  19901. uni.__stat_uniCloud_space = nr.init(spaceData);
  19902. } else {
  19903. console.error("应用未关联服务空间,请在uniCloud目录右键关联服务空间");
  19904. }
  19905. }
  19906. }
  19907. return uni.__stat_instance;
  19908. }
  19909. constructor() {
  19910. super();
  19911. }
  19912. /**
  19913. * 获取推送id
  19914. */
  19915. pushEvent(options) {
  19916. const ClientID = is_push_clientid();
  19917. if (uni.getPushClientId && ClientID) {
  19918. uni.getPushClientId({
  19919. success: (res) => {
  19920. const cid = res.cid || false;
  19921. if (cid) {
  19922. this.sendPushRequest(options, cid);
  19923. }
  19924. }
  19925. });
  19926. }
  19927. }
  19928. /**
  19929. * 进入应用
  19930. * @param {Object} options 页面参数
  19931. * @param {Object} self 当前页面实例
  19932. */
  19933. launch(options, self2) {
  19934. set_page_residence_time();
  19935. this.__licationShow = true;
  19936. dbSet("__launch_options", options);
  19937. options.cst = 1;
  19938. this.sendReportRequest(options, true);
  19939. }
  19940. load(options, self2) {
  19941. this.self = self2;
  19942. this._query = options;
  19943. }
  19944. appHide(self2) {
  19945. this.applicationHide(self2, true);
  19946. }
  19947. appShow(self2) {
  19948. this.applicationShow(self2);
  19949. }
  19950. show(self2) {
  19951. this.self = self2;
  19952. if (get_page_types(self2) === "page") {
  19953. const isPageReport = is_page_report();
  19954. if (isPageReport) {
  19955. this.pageShow(self2);
  19956. }
  19957. }
  19958. if (get_platform_name() === "h5" || get_platform_name() === "n") {
  19959. if (get_page_types(self2) === "app") {
  19960. this.appShow();
  19961. }
  19962. }
  19963. }
  19964. hide(self2) {
  19965. this.self = self2;
  19966. if (get_page_types(self2) === "page") {
  19967. const isPageReport = is_page_report();
  19968. if (isPageReport) {
  19969. this.pageHide(self2);
  19970. }
  19971. }
  19972. if (get_platform_name() === "h5" || get_platform_name() === "n") {
  19973. if (get_page_types(self2) === "app") {
  19974. this.appHide();
  19975. }
  19976. }
  19977. }
  19978. error(em) {
  19979. let emVal = "";
  19980. if (!em.message) {
  19981. emVal = JSON.stringify(em);
  19982. } else {
  19983. emVal = em.stack;
  19984. }
  19985. let route = "";
  19986. try {
  19987. route = get_route();
  19988. } catch (e2) {
  19989. route = "";
  19990. }
  19991. let options = {
  19992. ak: this.statData.ak,
  19993. uuid: this.statData.uuid,
  19994. p: this.statData.p,
  19995. lt: "31",
  19996. url: route,
  19997. ut: this.statData.ut,
  19998. ch: this.statData.ch,
  19999. mpsdk: this.statData.mpsdk,
  20000. mpv: this.statData.mpv,
  20001. v: this.statData.v,
  20002. em: emVal,
  20003. usv: this.statData.usv,
  20004. t: parseInt((/* @__PURE__ */ new Date()).getTime() / 1e3)
  20005. };
  20006. this.request(options);
  20007. }
  20008. }
  20009. Stat.getInstance();
  20010. function main() {
  20011. {
  20012. {
  20013. uni.report = function(type, options) {
  20014. };
  20015. }
  20016. }
  20017. }
  20018. main();
  20019. const messages = {
  20020. en,
  20021. "zh-Hans": zhHans,
  20022. "zh-Hant": zhHant
  20023. };
  20024. let i18nConfig = {
  20025. locale: uni.getStorageSync("userLanguage") || "zh-Hans",
  20026. // 获取已设置的语言
  20027. messages
  20028. };
  20029. const i18n = createI18n(i18nConfig);
  20030. function createApp() {
  20031. const app = vue.createVueApp(App);
  20032. app.use(i18n);
  20033. app.use(Store);
  20034. return {
  20035. app
  20036. };
  20037. }
  20038. uni.$http = $http;
  20039. $http.baseUrl = "";
  20040. $http.beforeRequest = function(options) {
  20041. };
  20042. $http.afterRequest = function() {
  20043. };
  20044. const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  20045. uni.Vuex = __Vuex__;
  20046. uni.Pinia = __Pinia__;
  20047. __app__.provide("__globalStyles", __uniConfig.styles);
  20048. __app__._component.mpType = "app";
  20049. __app__._component.render = () => {
  20050. };
  20051. __app__.mount("#app");
  20052. })(Vue);